chiark / gitweb /
min()/max() macros conflict with ones defined by Windows (or at least MinGW)
authorJacob Nevins <jacobn@chiark.greenend.org.uk>
Wed, 1 Jun 2005 22:56:20 +0000 (22:56 +0000)
committerJacob Nevins <jacobn@chiark.greenend.org.uk>
Wed, 1 Jun 2005 22:56:20 +0000 (22:56 +0000)
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]

puzzles.h

index 8be90095fc19fb3b72ca2b47920200c30af53f69..fbef531a32bd6fc795af97cd0116c0e60f68cb9d 100644 (file)
--- a/puzzles.h
+++ b/puzzles.h
 #define STR(x) STR_INT(x)
 
 /* NB not perfect because they evaluate arguments multiple times. */
+#ifndef max
 #define max(x,y) ( (x)>(y) ? (x) : (y) )
+#endif /* max */
+#ifndef min
 #define min(x,y) ( (x)<(y) ? (x) : (y) )
+#endif /* min */
 
 enum {
     LEFT_BUTTON = 0x0200,