Skip to content

Commit 1bd9ffd

Browse files
committed
windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
Also remove all defines in many places and define it in configure stage to keep consistency.
1 parent 82cf681 commit 1bd9ffd

File tree

6 files changed

+2
-18
lines changed

6 files changed

+2
-18
lines changed

build_msvc/common.vcxproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -17,6 +17,7 @@
1717
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
1818
<DisableSpecificWarnings>4018;4244;4267;4715;4805;</DisableSpecificWarnings>
1919
<TreatWarningAsError>true</TreatWarningAsError>
20+
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
2021
</ClCompile>
2122
</ItemDefinitionGroup>
2223
</Project>

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -485,7 +485,7 @@ case $host in
485485
AC_MSG_ERROR("windres not found")
486486
fi
487487

488-
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB"
488+
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601"
489489
LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
490490
if test "x$CXXFLAGS_overridden" = "xno"; then
491491
CXXFLAGS="$CXXFLAGS -w"

src/compat.h

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,10 +11,6 @@
1111
#endif
1212

1313
#ifdef WIN32
14-
#ifdef _WIN32_WINNT
15-
#undef _WIN32_WINNT
16-
#endif
17-
#define _WIN32_WINNT 0x0501
1814
#ifndef WIN32_LEAN_AND_MEAN
1915
#define WIN32_LEAN_AND_MEAN 1
2016
#endif

src/qt/guiutil.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,10 +21,6 @@
2121
#include <util/system.h>
2222

2323
#ifdef WIN32
24-
#ifdef _WIN32_WINNT
25-
#undef _WIN32_WINNT
26-
#endif
27-
#define _WIN32_WINNT 0x0501
2824
#ifdef _WIN32_IE
2925
#undef _WIN32_IE
3026
#endif

src/support/lockedpool.cpp

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,10 +10,6 @@
1010
#endif
1111

1212
#ifdef WIN32
13-
#ifdef _WIN32_WINNT
14-
#undef _WIN32_WINNT
15-
#endif
16-
#define _WIN32_WINNT 0x0501
1713
#define WIN32_LEAN_AND_MEAN 1
1814
#ifndef NOMINMAX
1915
#define NOMINMAX

src/util/system.cpp

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -44,11 +44,6 @@
4444
#pragma warning(disable:4717)
4545
#endif
4646

47-
#ifdef _WIN32_WINNT
48-
#undef _WIN32_WINNT
49-
#endif
50-
#define _WIN32_WINNT 0x0501
51-
5247
#ifdef _WIN32_IE
5348
#undef _WIN32_IE
5449
#endif

0 commit comments

Comments
 (0)