From 1bd9ffdd44000b208d29d35451f4dc9f1ac9318f Mon Sep 17 00:00:00 2001 From: Chun Kuan Lee Date: Thu, 13 Dec 2018 18:24:30 +0800 Subject: windows: Set _WIN32_WINNT to 0x0601 (Windows 7) Also remove all defines in many places and define it in configure stage to keep consistency. --- build_msvc/common.vcxproj | 1 + configure.ac | 2 +- src/compat.h | 4 ---- src/qt/guiutil.cpp | 4 ---- src/support/lockedpool.cpp | 4 ---- src/util/system.cpp | 5 ----- 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/build_msvc/common.vcxproj b/build_msvc/common.vcxproj index c7c20622e4..a9fb0c8916 100644 --- a/build_msvc/common.vcxproj +++ b/build_msvc/common.vcxproj @@ -17,6 +17,7 @@ /utf-8 %(AdditionalOptions) 4018;4244;4267;4715;4805; true + _WIN32_WINNT=0x0601;%(PreprocessorDefinitions) diff --git a/configure.ac b/configure.ac index c4b1d63bfe..8d7334ab64 100644 --- a/configure.ac +++ b/configure.ac @@ -485,7 +485,7 @@ case $host in AC_MSG_ERROR("windres not found") fi - CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB" + CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601" LEVELDB_TARGET_FLAGS="-DOS_WINDOWS" if test "x$CXXFLAGS_overridden" = "xno"; then CXXFLAGS="$CXXFLAGS -w" diff --git a/src/compat.h b/src/compat.h index 7b164d5630..68f6eb692c 100644 --- a/src/compat.h +++ b/src/compat.h @@ -11,10 +11,6 @@ #endif #ifdef WIN32 -#ifdef _WIN32_WINNT -#undef _WIN32_WINNT -#endif -#define _WIN32_WINNT 0x0501 #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN 1 #endif diff --git a/src/qt/guiutil.cpp b/src/qt/guiutil.cpp index 71e987c8f4..ba0a5abdf3 100644 --- a/src/qt/guiutil.cpp +++ b/src/qt/guiutil.cpp @@ -21,10 +21,6 @@ #include #ifdef WIN32 -#ifdef _WIN32_WINNT -#undef _WIN32_WINNT -#endif -#define _WIN32_WINNT 0x0501 #ifdef _WIN32_IE #undef _WIN32_IE #endif diff --git a/src/support/lockedpool.cpp b/src/support/lockedpool.cpp index 627018083e..5c2050e4a2 100644 --- a/src/support/lockedpool.cpp +++ b/src/support/lockedpool.cpp @@ -10,10 +10,6 @@ #endif #ifdef WIN32 -#ifdef _WIN32_WINNT -#undef _WIN32_WINNT -#endif -#define _WIN32_WINNT 0x0501 #define WIN32_LEAN_AND_MEAN 1 #ifndef NOMINMAX #define NOMINMAX diff --git a/src/util/system.cpp b/src/util/system.cpp index 06317a3a90..789dcfaba9 100644 --- a/src/util/system.cpp +++ b/src/util/system.cpp @@ -44,11 +44,6 @@ #pragma warning(disable:4717) #endif -#ifdef _WIN32_WINNT -#undef _WIN32_WINNT -#endif -#define _WIN32_WINNT 0x0501 - #ifdef _WIN32_IE #undef _WIN32_IE #endif -- cgit v1.2.3