From: Georg Baum Date: Sun, 8 May 2016 10:18:07 +0000 (+0200) Subject: Do not redefine WINVER X-Git-Tag: 2.3.0alpha1~1643^2~39 X-Git-Url: https://git.lyx.org/gitweb/?a=commitdiff_plain;h=d2e3a201b9595c6a43fd8457fe9b91d49c6f6c5c;p=features.git 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 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