From robionekenobi via https://bugs.wireshark.org/bugzilla/show_bug.cgi?id=9375 :
authorPascal Quantin <pascal.quantin@gmail.com>
Tue, 5 Nov 2013 21:49:57 +0000 (21:49 -0000)
committerPascal Quantin <pascal.quantin@gmail.com>
Tue, 5 Nov 2013 21:49:57 +0000 (21:49 -0000)
Avoid a 'GetVersionEx deprecated' warning when compiling with MSVC2013

svn path=/trunk/; revision=53095

config.nmake

index 4670cc71f356aa95531e0eccf0d8eb896e1072fe..8b33ebe41621e8139709cf16d914e91159f15e40 100644 (file)
@@ -923,6 +923,11 @@ APPVER=5.02
 #                                   add Psapi.lib to the TARGETLIBS macro and compile the program with -DPSAPI_VERSION=1. 
 #                                   To use run-time dynamic linking, load Psapi.dll.
 #                                   http://msdn.microsoft.com/en-us/library/windows/desktop/ms683219(v=vs.85).aspx
+# -DBUILD_WINDOWS                   Starting from VS2103, GetVersionEx is deprecated and we are recommended to use
+#                                   VerifyVersionInfo instead
+#                                   http://msdn.microsoft.com/en-us/library/windows/desktop/ms724429(v=vs.85).aspx
+#                                   http://msdn.microsoft.com/en-us/library/windows/desktop/ms725491(v=vs.85).aspx
+#                                   To continue to use GetVersionEx, we can define BUILD_WINDOWS
 #
 ##Note: LOCAL_CFLAGS are flags used for *all* compilations
 ##      STANDARD_CFLAGS (see below) are flags used just for *Wireshark* compilations
@@ -940,6 +945,11 @@ APPVER=5.02
 LOCAL_CFLAGS=/Zi /W3 /MD /DWIN32_LEAN_AND_MEAN /DMSC_VER_REQUIRED=$(MSC_VER_REQUIRED) \
             /D_CRT_SECURE_NO_DEPRECATE /D_CRT_NONSTDC_NO_DEPRECATE -DPSAPI_VERSION=1
 
+!IF "$(MSVC_VARIANT)" == "MSVC2013"   || \
+        "$(MSVC_VARIANT)" == "MSVC2013EE"
+LOCAL_CFLAGS=$(LOCAL_CFLAGS) /DBUILD_WINDOWS
+!ENDIF
+
 !IF "$(WIRESHARK_TARGET_PLATFORM)" != "win64"
 LOCAL_CFLAGS=$(LOCAL_CFLAGS) /D_BIND_TO_CURRENT_CRT_VERSION=1
 !ENDIF