commit 41f2770fc9de9e4f6629782af1e3b1884a7d77be
Author: Georg Baum <[email protected]>
Date: Sun May 8 12:18:07 2016 +0200
Do not redefine WINVER
Compiling different parts of the sources with different WINVER may lead to
subtle and hard to detect problems. Better use the same value everywhere.
The existing error message suggests that this was wanted anyway, and it
fixes a compiler warning when cross-compiling for mingw on linux. Our code
does not require a specific value, only a minimum value of 0x5000, which
means the resulting executable will require at least Windows 2000.
diff --git a/src/support/os_win32.h b/src/support/os_win32.h
index 618c531..42016f7 100644
--- a/src/support/os_win32.h
+++ b/src/support/os_win32.h
@@ -35,10 +35,13 @@
* Note: __CYGWIN__ can be defined here if building in _WIN32 mode.
*/
#if defined(__MINGW32__) || defined(__CYGWIN__) || defined(__CYGWIN32__)
-# if defined(WINVER) && WINVER < 0x0500
-# error WINVER must be >= 0x0500
+# if defined(WINVER)
+# if WINVER < 0x0500
+# error WINVER must be >= 0x0500
+# endif
+# else
+# define WINVER 0x0500
# endif
-# define WINVER 0x0500
# define _WIN32_IE 0x0500
#endif