2011-04-28 Kalev Lember <kalev@smartlink.ee>
Reviewed by NOBODY (OOPS!).
Add missing _WIN32_WINNT and WINVER definitions
https://bugs.webkit.org/show_bug.cgi?id=59702
Moved _WIN32_WINNT and WINVER definitions to config.h so that they are
available for all source files.
In particular, wtf/FastMalloc.cpp uses CreateTimerQueueTimer and
DeleteTimerQueueTimer which are both guarded by
#if (_WIN32_WINNT >= 0x0500)
in MinGW headers.
* config.h:
* wtf/Assertions.cpp:
diff --git a/Source/JavaScriptCore/config.h b/Source/JavaScriptCore/config.h
index 394bba5..67aaea4 100644
--- a/Source/JavaScriptCore/config.h
+++ b/Source/JavaScriptCore/config.h
@@ -66,6 +66,14 @@
#if OS(WINDOWS)
+#ifndef _WIN32_WINNT
+#define _WIN32_WINNT 0x0500
+#endif
+
+#ifndef WINVER
+#define WINVER 0x0500
+#endif
+
// If we don't define these, they get defined in windef.h.
// We want to use std::min and std::max
#define max max
diff --git a/Source/JavaScriptCore/wtf/Assertions.cpp b/Source/JavaScriptCore/wtf/Assertions.cpp
index 930368c..c927585 100644
--- a/Source/JavaScriptCore/wtf/Assertions.cpp
+++ b/Source/JavaScriptCore/wtf/Assertions.cpp
@@ -42,12 +42,6 @@
#endif
#if COMPILER(MSVC) && !OS(WINCE) && !PLATFORM(BREWMP)
-#ifndef WINVER
-#define WINVER 0x0500
-#endif
-#ifndef _WIN32_WINNT
-#define _WIN32_WINNT 0x0500
-#endif
#include <crtdbg.h>
#endif