Skip to content

Commit

Permalink
windows: Set _WIN32_WINNT to 0x0601 (Windows 7)
Browse files Browse the repository at this point in the history
Also remove all defines in many places and define it in configure stage to keep consistency.
  • Loading branch information
ken2812221 committed Jan 23, 2019
1 parent 82cf681 commit 1bd9ffd
Show file tree
Hide file tree
Showing 6 changed files with 2 additions and 18 deletions.
1 change: 1 addition & 0 deletions build_msvc/common.vcxproj
Original file line number Diff line number Diff line change
Expand Up @@ -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>
2 changes: 1 addition & 1 deletion configure.ac
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
4 changes: 0 additions & 4 deletions src/compat.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/qt/guiutil.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 0 additions & 4 deletions src/support/lockedpool.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 0 additions & 5 deletions src/util/system.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1bd9ffd

Please sign in to comment.