aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChun Kuan Lee <ken2812221@gmail.com>2018-12-13 18:24:30 +0800
committerChun Kuan Lee <ken2812221@gmail.com>2019-01-23 16:28:27 +0800
commit1bd9ffdd44000b208d29d35451f4dc9f1ac9318f (patch)
treea2f891b8606a0833f14914eb7235e923038480ff
parent82cf6813a4ef1b4a5439eb6cddb1ab426f3c31a2 (diff)
windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
Also remove all defines in many places and define it in configure stage to keep consistency.
-rw-r--r--build_msvc/common.vcxproj1
-rw-r--r--configure.ac2
-rw-r--r--src/compat.h4
-rw-r--r--src/qt/guiutil.cpp4
-rw-r--r--src/support/lockedpool.cpp4
-rw-r--r--src/util/system.cpp5
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 @@
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
<DisableSpecificWarnings>4018;4244;4267;4715;4805;</DisableSpecificWarnings>
<TreatWarningAsError>true</TreatWarningAsError>
+ <PreprocessorDefinitions>_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
</ClCompile>
</ItemDefinitionGroup>
</Project>
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 <util/system.h>
#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