diff options
author | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-16 09:34:57 +0000 |
---|---|---|
committer | ghazi <ghazi@138bc75d-0d04-0410-961f-82ee72b054a4> | 1998-12-16 09:34:57 +0000 |
commit | 65cee25926ef6815fd1148aab6c047d70c0af304 (patch) | |
tree | 13df1d3560a85b86537dcaa32af351b3f93ecefc /gcc/system.h | |
parent | d122429113a32dd1d2c1538f770438527d78ac63 (diff) | |
download | gcc-65cee25926ef6815fd1148aab6c047d70c0af304.tar.gz |
* cccp.c: Don't define MIN/MAX anymore.
* cpplib.c: Likewise.
* machmode.h: Likewise.
* system.h: Provide definitions for MIN/MAX.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@24339 138bc75d-0d04-0410-961f-82ee72b054a4
Diffstat (limited to 'gcc/system.h')
-rw-r--r-- | gcc/system.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gcc/system.h b/gcc/system.h index daa47eb1bbd..5b3daae5167 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 |