[Webkit-unassigned] [Bug 73563] New: use NOMINMAX instead of #define min min

bugzilla-daemon at webkit.org bugzilla-daemon at webkit.org
Thu Dec 1 07:45:09 PST 2011


https://bugs.webkit.org/show_bug.cgi?id=73563

           Summary: use NOMINMAX instead of #define min min
           Product: WebKit
           Version: 528+ (Nightly build)
          Platform: PC
        OS/Version: Windows 7
            Status: UNCONFIRMED
          Severity: Normal
          Priority: P2
         Component: JavaScriptCore
        AssignedTo: webkit-unassigned at lists.webkit.org
        ReportedBy: harris.pc at gmail.com


This is a patch from my code.  I'm working with QT 4.7.4,
but I've checked webkit's code on the trunk via trac's Source Browse and I see the problem still exists.

Instead of using #define min min and #define max max, to avoid problems with windef.h
just use #define NOMINMAX

This is actually what is done in wtf/Platform.h although I think that only applies for WINCE.



=== modified file 'qt/src/3rdparty/javascriptcore/JavaScriptCore/config.h'
--- qt/src/3rdparty/javascriptcore/JavaScriptCore/config.h      2011-10-08 14:07:42 +0000
+++ qt/src/3rdparty/javascriptcore/JavaScriptCore/config.h      2011-12-01 15:14:46 +0000
@@ -41,8 +41,7 @@

 // If we don't define these, they get defined in windef.h. 
 // We want to use std::min and std::max
-#define max max
-#define min min
+#define NOMINMAX       /* Windows min and max conflict with standard macros */

 #if !COMPILER(MSVC7) && !OS(WINCE)
 // We need to define this before the first #include of stdlib.h or it won't contain rand_s.

-- 
Configure bugmail: https://bugs.webkit.org/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug.



More information about the webkit-unassigned mailing list