[ros-diffs] [cfinck] 30843: Don't define the "min" and "max" macros in the general "typedefs.h", they conflict with the similar functions in the "std" namespace in C++ apps then. Instead just define them in widl, this is currently the only place where we need them.

cfinck at svn.reactos.org cfinck at svn.reactos.org
Wed Nov 28 23:01:18 CET 2007


Author: cfinck
Date: Thu Nov 29 01:01:17 2007
New Revision: 30843

URL: http://svn.reactos.org/svn/reactos?rev=30843&view=rev
Log:
Don't define the "min" and "max" macros in the general "typedefs.h", they conflict with the similar functions in the "std" namespace in C++ apps then.
Instead just define them in widl, this is currently the only place where we need them.

Modified:
    trunk/reactos/include/host/typedefs.h
    trunk/reactos/tools/widl/widltypes.h

Modified: trunk/reactos/include/host/typedefs.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/include/host/typedefs.h?rev=30843&r1=30842&r2=30843&view=diff
==============================================================================
--- trunk/reactos/include/host/typedefs.h (original)
+++ trunk/reactos/include/host/typedefs.h Thu Nov 29 01:01:17 2007
@@ -227,9 +227,6 @@
 typedef const UNICODE_STRING *PCUNICODE_STRING;
 
 /* Widely used macros */
-#define min(a, b)               ((a) < (b) ? (a) : (b))
-#define max(a,b)                ((a) < (b) ? (b) : (a))
-
 #define LOBYTE(w)               ((BYTE)(w))
 #define HIBYTE(w)               ((BYTE)(((WORD)(w)>>8)&0xFF))
 #define LOWORD(l)               ((WORD)((DWORD_PTR)(l)))

Modified: trunk/reactos/tools/widl/widltypes.h
URL: http://svn.reactos.org/svn/reactos/trunk/reactos/tools/widl/widltypes.h?rev=30843&r1=30842&r2=30843&view=diff
==============================================================================
--- trunk/reactos/tools/widl/widltypes.h (original)
+++ trunk/reactos/tools/widl/widltypes.h Thu Nov 29 01:01:17 2007
@@ -26,6 +26,9 @@
 #define S_FALSE        ((HRESULT)0x00000001L)
 #define E_OUTOFMEMORY  ((HRESULT)0x8007000EL)
 #define TYPE_E_IOERROR ((HRESULT)0x80028CA2L)
+
+#define min(a, b)  ((a) < (b) ? (a) : (b))
+#define max(a,b)   ((a) < (b) ? (b) : (a))
 
 #include <stdarg.h>
 #include "guiddef.h"




More information about the Ros-diffs mailing list