]> git.lyx.org Git - features.git/commitdiff
Do not redefine WINVER
authorGeorg Baum <baum@lyx.org>
Sun, 8 May 2016 10:18:07 +0000 (12:18 +0200)
committerRichard Heck <rgheck@lyx.org>
Sun, 29 May 2016 21:55:44 +0000 (17:55 -0400)
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

index 618c5315efb10b0a786fa5ff6e399a16e9c83b3a..42016f7094eb7f33abe56afd7fb77b4fdcd8d5ee 100644 (file)
  * 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