Add support for NOMINMAX

Francois Gouget fgouget at free.fr
Thu May 10 22:24:08 CDT 2001


   I noticed that you didn't apply this part of the minmax patch:

--- cut here ---
Index: include/windef.h
===================================================================
RCS file: /home/cvs/wine/wine/include/windef.h,v
retrieving revision 1.57
diff -u -r1.57 windef.h
--- include/windef.h	2001/05/07 20:14:00	1.57
+++ include/windef.h	2001/05/11 01:17:37
@@ -14,6 +14,9 @@
 #define WINVER 0x0500
 
 #include "winnt.h"
+#ifndef NOMINMAX
+#include "minmax.h"
+#endif
 
 
 #ifdef __cplusplus
@@ -140,15 +143,6 @@
 #define ADD_LOWORD(dw,val)  ((dw) = ((dw) & 0xffff0000) | LOWORD((DWORD)(dw)+(val)))
 #endif
 
-/* min and max macros */
-#ifndef NOMINMAX
-#ifndef max
-#define max(a,b)   (((a) > (b)) ? (a) : (b))
-#endif
-#ifndef min
-#define min(a,b)   (((a) < (b)) ? (a) : (b))
-#endif
-#endif  /* NOMINMAX */
 
 #ifndef _MAX_PATH
 /* FIXME: These are supposed to be in stdlib.h only */
--- cut here ---


   Why? It doesn't make a big difference but after all, if min/max are
defined in their own header, why not take advantage of it to avoid
duplication? (I hate duplicating code :-)


--
Francois Gouget         fgouget at free.fr        http://fgouget.free.fr/
                           La terre est une bêta...





More information about the wine-devel mailing list