]> git.pond.sub.org Git - empserver/commitdiff
(min, max) [_WIN32, __GNUC__]: Add min and max macros for
authorRon Koenderink <rkoenderink@yahoo.ca>
Sun, 1 Jan 2006 16:02:48 +0000 (16:02 +0000)
committerRon Koenderink <rkoenderink@yahoo.ca>
Sun, 1 Jan 2006 16:02:48 +0000 (16:02 +0000)
mingw/gcc compile environment.  min/max are not included
in stdlib.h in mingw/gcc environment.

include/misc.h

index 81da2c55b2579404326fd754735b49b556ad7001..f238b369c422c4e356d7216795cfc2276e2541b2 100644 (file)
@@ -48,9 +48,11 @@ typedef long ssize_t;
 /* integral mismatch, due to misuse of sector short */
 #ifndef __GNUC__
 #pragma warning (disable : 4761 )
+#else
+#define max(a,b) ((a)>(b)?(a):(b))
+#define min(a,b) ((a)<(b)?(a):(b))
 #endif
 
-#include <windef.h>
 #include <io.h>
 
 #define random rand