min()/max() macros conflict with ones defined by Windows (or at least MinGW)

headers; but MIN()/MAX() conflict with glib. Let's keep the lower-case ones,
and assume that any provided by the system have the obvious semantics.

[originally from svn r5900]
This commit is contained in:
Jacob Nevins
2005-06-01 22:56:20 +00:00
parent 55a3d377b1
commit 09c396b8a8

View File

@ -22,8 +22,12 @@
#define STR(x) STR_INT(x) #define STR(x) STR_INT(x)
/* NB not perfect because they evaluate arguments multiple times. */ /* NB not perfect because they evaluate arguments multiple times. */
#ifndef max
#define max(x,y) ( (x)>(y) ? (x) : (y) ) #define max(x,y) ( (x)>(y) ? (x) : (y) )
#endif /* max */
#ifndef min
#define min(x,y) ( (x)<(y) ? (x) : (y) ) #define min(x,y) ( (x)<(y) ? (x) : (y) )
#endif /* min */
enum { enum {
LEFT_BUTTON = 0x0200, LEFT_BUTTON = 0x0200,