aboutsummaryrefslogtreecommitdiff
path: root/gcc/system.h
diff options
context:
space:
mode:
authorKaveh R. Ghazi <ghazi@caip.rutgers.edu>1998-12-16 09:34:57 +0000
committerKaveh Ghazi <ghazi@gcc.gnu.org>1998-12-16 09:34:57 +0000
commit36b8337d5c3d2a64a32883f1a372db98482828c7 (patch)
tree13df1d3560a85b86537dcaa32af351b3f93ecefc /gcc/system.h
parent93eba43433774cd6b70e140d87e04c3f8404202b (diff)
downloadgcc-36b8337d5c3d2a64a32883f1a372db98482828c7.zip
gcc-36b8337d5c3d2a64a32883f1a372db98482828c7.tar.gz
gcc-36b8337d5c3d2a64a32883f1a372db98482828c7.tar.bz2
cccp.c: Don't define MIN/MAX anymore.
* cccp.c: Don't define MIN/MAX anymore. * cpplib.c: Likewise. * machmode.h: Likewise. * system.h: Provide definitions for MIN/MAX. From-SVN: r24339
Diffstat (limited to 'gcc/system.h')
-rw-r--r--gcc/system.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h
index daa47eb..5b3daae 100644
--- a/gcc/system.h
+++ b/gcc/system.h
@@ -171,6 +171,15 @@ extern int errno;
# define O_WRONLY 1
#endif
+/* Some systems define these in, e.g., param.h. We undefine these names
+ here to avoid the warnings. We prefer to use our definitions since we
+ know they are correct. */
+
+#undef MIN
+#undef MAX
+#define MIN(X,Y) ((X) < (Y) ? (X) : (Y))
+#define MAX(X,Y) ((X) > (Y) ? (X) : (Y))
+
#ifdef HAVE_SYS_WAIT_H
#include <sys/wait.h>
#endif