From 79ad3e6203b825b7c16efba57698c9fe3b50b4a1 Mon Sep 17 00:00:00 2001 From: Christoph Oelckers Date: Sun, 14 Jul 2019 16:55:01 +0200 Subject: [PATCH] - define _WIN32_WINNT to 0x600 (Vista) in the CMake project instead of littering all files with inconsistent settings for the target version. --- CMakeLists.txt | 2 +- src/d_anonstats.cpp | 1 - src/win32/hardware.cpp | 1 - src/win32/helperthread.cpp | 1 - src/win32/i_cd.cpp | 1 - src/win32/i_crash.cpp | 1 - src/win32/i_dijoy.cpp | 1 - src/win32/i_input.cpp | 5 ----- src/win32/i_keyboard.cpp | 1 - src/win32/i_main.cpp | 1 - src/win32/i_mouse.cpp | 1 - src/win32/i_rawps2.cpp | 1 - src/win32/i_specialpaths.cpp | 1 - src/win32/i_xinput.cpp | 1 - src/win32/st_start.cpp | 1 - 15 files changed, 1 insertion(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 7646af756f..1b5f72c2c8 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -219,7 +219,7 @@ if( MSVC ) set( DEB_C_FLAGS "/D _CRTDBG_MAP_ALLOC /MTd" ) # Disable warnings for unsecure CRT functions from VC8+ - set( ALL_C_FLAGS "${ALL_C_FLAGS} /wd4996 /DUNICODE /D_UNICODE" ) + set( ALL_C_FLAGS "${ALL_C_FLAGS} /wd4996 /DUNICODE /D_UNICODE /D_WIN32_WINNT=0x0600" ) # The CMake configurations set /GR and /MD by default, which conflict with our settings. string(REPLACE "/MD " " " CMAKE_CXX_FLAGS_RELEASE ${CMAKE_CXX_FLAGS_RELEASE} ) diff --git a/src/d_anonstats.cpp b/src/d_anonstats.cpp index 7378fc17ac..4b03191499 100644 --- a/src/d_anonstats.cpp +++ b/src/d_anonstats.cpp @@ -12,7 +12,6 @@ void D_ConfirmSendStats() #else // !NO_SEND_STATS #if defined(_WIN32) -#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #include #include diff --git a/src/win32/hardware.cpp b/src/win32/hardware.cpp index 2674d553ae..98af9957c8 100644 --- a/src/win32/hardware.cpp +++ b/src/win32/hardware.cpp @@ -32,7 +32,6 @@ ** */ -#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN #include #include diff --git a/src/win32/helperthread.cpp b/src/win32/helperthread.cpp index f6f74554fe..f5874b99ef 100644 --- a/src/win32/helperthread.cpp +++ b/src/win32/helperthread.cpp @@ -35,7 +35,6 @@ ** */ -#define _WIN32_WINNT 0x0400 #include "helperthread.h" //========================================================================== diff --git a/src/win32/i_cd.cpp b/src/win32/i_cd.cpp index cd00fbcfc9..4e1c633b31 100644 --- a/src/win32/i_cd.cpp +++ b/src/win32/i_cd.cpp @@ -32,7 +32,6 @@ ** */ -#define _WIN32_WINNT 0x0400 #define WIN32_LEAN_AND_MEAN #include #include diff --git a/src/win32/i_crash.cpp b/src/win32/i_crash.cpp index 52daf378d5..1a2df352a0 100644 --- a/src/win32/i_crash.cpp +++ b/src/win32/i_crash.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include #include diff --git a/src/win32/i_dijoy.cpp b/src/win32/i_dijoy.cpp index 471152fe83..a47b28f9d4 100644 --- a/src/win32/i_dijoy.cpp +++ b/src/win32/i_dijoy.cpp @@ -35,7 +35,6 @@ #define WIN32_LEAN_AND_MEAN #define DIRECTINPUT_VERSION 0x800 -#define _WIN32_WINNT 0x0501 #include #include #ifndef __GNUC__ diff --git a/src/win32/i_input.cpp b/src/win32/i_input.cpp index cbfa2864bb..fb6239869f 100644 --- a/src/win32/i_input.cpp +++ b/src/win32/i_input.cpp @@ -35,11 +35,6 @@ // DI3 only supports up to 4 mouse buttons, and I want the joystick to // be read using DirectInput instead of winmm. -#define DIRECTINPUT_VERSION 0x800 -#if !defined(_WIN32_WINNT) || (_WIN32_WINNT < 0x0501) -#define _WIN32_WINNT 0x0501 // Support the mouse wheel and session notification. -#endif - #define WIN32_LEAN_AND_MEAN #define __BYTEBOOL__ #ifndef __GNUC__ diff --git a/src/win32/i_keyboard.cpp b/src/win32/i_keyboard.cpp index 69571cbfd1..7ab02ada0d 100644 --- a/src/win32/i_keyboard.cpp +++ b/src/win32/i_keyboard.cpp @@ -35,7 +35,6 @@ #define WIN32_LEAN_AND_MEAN #define DIRECTINPUT_VERSION 0x800 -#define _WIN32_WINNT 0x0501 #include #include diff --git a/src/win32/i_main.cpp b/src/win32/i_main.cpp index de4b5e2c94..6d9c9f7713 100644 --- a/src/win32/i_main.cpp +++ b/src/win32/i_main.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include #include diff --git a/src/win32/i_mouse.cpp b/src/win32/i_mouse.cpp index 9915479b70..e786a11c73 100644 --- a/src/win32/i_mouse.cpp +++ b/src/win32/i_mouse.cpp @@ -35,7 +35,6 @@ #define WIN32_LEAN_AND_MEAN #define DIRECTINPUT_VERSION 0x800 -#define _WIN32_WINNT 0x0501 #include #include diff --git a/src/win32/i_rawps2.cpp b/src/win32/i_rawps2.cpp index 2fdfe4c217..a4214e4798 100644 --- a/src/win32/i_rawps2.cpp +++ b/src/win32/i_rawps2.cpp @@ -34,7 +34,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include "i_input.h" diff --git a/src/win32/i_specialpaths.cpp b/src/win32/i_specialpaths.cpp index c354fe9656..d109d077ca 100644 --- a/src/win32/i_specialpaths.cpp +++ b/src/win32/i_specialpaths.cpp @@ -33,7 +33,6 @@ ** */ -#define _WIN32_WINNT 0x0600 #include #include #include diff --git a/src/win32/i_xinput.cpp b/src/win32/i_xinput.cpp index 50108991ab..710d2f295b 100644 --- a/src/win32/i_xinput.cpp +++ b/src/win32/i_xinput.cpp @@ -36,7 +36,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 #include #include #include diff --git a/src/win32/st_start.cpp b/src/win32/st_start.cpp index dc6b0694d7..8acb6ddbb0 100644 --- a/src/win32/st_start.cpp +++ b/src/win32/st_start.cpp @@ -35,7 +35,6 @@ // HEADER FILES ------------------------------------------------------------ #define WIN32_LEAN_AND_MEAN -#define _WIN32_WINNT 0x0501 // required to get the MARQUEE defines #include #include #include "resource.h"