From 36b8337d5c3d2a64a32883f1a372db98482828c7 Mon Sep 17 00:00:00 2001 From: "Kaveh R. Ghazi" Date: Wed, 16 Dec 1998 09:34:57 +0000 Subject: [PATCH] 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 --- gcc/ChangeLog | 7 +++++++ gcc/cccp.c | 5 ----- gcc/cpplib.c | 6 ------ gcc/machmode.h | 12 +----------- gcc/system.h | 9 +++++++++ 5 files changed, 17 insertions(+), 22 deletions(-) diff --git a/gcc/ChangeLog b/gcc/ChangeLog index f7013557252..800d6ba4ffd 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +Wed Dec 16 12:28:54 1998 Kaveh R. Ghazi + + * cccp.c: Don't define MIN/MAX anymore. + * cpplib.c: Likewise. + * machmode.h: Likewise. + * system.h: Provide definitions for MIN/MAX. + Tue Dec 15 23:47:42 1998 Zack Weinberg * fix-header.c: Don't define xstrdup here. diff --git a/gcc/cccp.c b/gcc/cccp.c index d7bdbffd74a..440081c72f0 100644 --- a/gcc/cccp.c +++ b/gcc/cccp.c @@ -87,11 +87,6 @@ static int hack_vms_include_specification (); #define INO_T_EQ(a, b) 0 #endif -#undef MIN -#undef MAX -#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) -#define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) - /* Find the largest host integer type and set its size and type. Watch out: on some crazy hosts `long' is shorter than `int'. */ diff --git a/gcc/cpplib.c b/gcc/cpplib.c index fb85bf56ffb..63c9ff15b32 100644 --- a/gcc/cpplib.c +++ b/gcc/cpplib.c @@ -45,12 +45,6 @@ Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ extern char *update_path PARAMS ((char *, char *)); -#undef MIN -#undef MAX -#define MIN(X,Y) ((X) < (Y) ? (X) : (Y)) -#define MAX(X,Y) ((X) > (Y) ? (X) : (Y)) - - /* By default, colon separates directories in a path. */ #ifndef PATH_SEPARATOR #define PATH_SEPARATOR ':' diff --git a/gcc/machmode.h b/gcc/machmode.h index 8f2ed9539e1..2e2eb15d553 100644 --- a/gcc/machmode.h +++ b/gcc/machmode.h @@ -22,17 +22,7 @@ Boston, MA 02111-1307, USA. */ #define HAVE_MACHINE_MODES /* Strictly speaking, this isn't the proper place to include these definitions, - but this file is included by every GCC file. - - 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)) + but this file is included by every GCC file. */ /* Find the largest host integer type and set its size and type. */ 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 #endif -- 2.30.2