From d2e3a201b9595c6a43fd8457fe9b91d49c6f6c5c Mon Sep 17 00:00:00 2001 From: Georg Baum Date: Sun, 8 May 2016 12:18:07 +0200 Subject: [PATCH] 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. --- src/support/os_win32.h | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/src/support/os_win32.h b/src/support/os_win32.h index 618c5315ef..42016f7094 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 -- 2.39.5