Skip to content

Commit 8e0f341

Browse files
committed
Merge #15704: Move Win32 defines to configure.ac to ensure they are globally defined
1ccb9f3 Move Win32 defines to configure.ac to ensure they are globally defined (Luke Dashjr) Pull request description: #9245 no longer needs this, since the main `_WIN32_WINNT` got bumped by something else. So rather than just lose it, might as well get it merged in independently. I'm not aware of any practical effects, but it seems safer to use the same API versions everywhere. ACKs for top commit: fanquake: ACK 1ccb9f3 - checked that the binaries produced are the same. Tree-SHA512: 273e9186579197be01b443b6968e26b9a8031d356fabc5b73aa967fcdb837df195b7ce0fc4e4529c85d9b86da6f2d7ff1bf56a3ff0cbbcd8cee8a9c2bf70a244
2 parents c6b730d + 1ccb9f3 commit 8e0f341

File tree

6 files changed

+2
-17
lines changed

6 files changed

+2
-17
lines changed

build_msvc/common.init.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@
110110
<AdditionalOptions>/utf-8 /std:c++17 %(AdditionalOptions)</AdditionalOptions>
111111
<DisableSpecificWarnings>4018;4221;4244;4267;4334;4715;4805;4834</DisableSpecificWarnings>
112112
<TreatWarningAsError>true</TreatWarningAsError>
113-
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
113+
<PreprocessorDefinitions>_SILENCE_CXX17_CODECVT_HEADER_DEPRECATION_WARNING;_SILENCE_CXX17_OLD_ALLOCATOR_MEMBERS_DEPRECATION_WARNING;ZMQ_STATIC;NOMINMAX;WIN32;HAVE_CONFIG_H;_CRT_SECURE_NO_WARNINGS;_SCL_SECURE_NO_WARNINGS;_CONSOLE;_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
114114
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
115115
</ClCompile>
116116
<Link>

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -604,7 +604,7 @@ case $host in
604604
AC_MSG_ERROR("windres not found")
605605
fi
606606

607-
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601"
607+
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
608608

609609
dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
610610
dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override

src/compat.h

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

1313
#ifdef WIN32
14-
#ifndef WIN32_LEAN_AND_MEAN
15-
#define WIN32_LEAN_AND_MEAN 1
16-
#endif
1714
#ifndef NOMINMAX
1815
#define NOMINMAX
1916
#endif

src/qt/guiutil.cpp

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

2323
#ifdef WIN32
24-
#ifdef _WIN32_IE
25-
#undef _WIN32_IE
26-
#endif
27-
#define _WIN32_IE 0x0501
28-
#define WIN32_LEAN_AND_MEAN 1
2924
#ifndef NOMINMAX
3025
#define NOMINMAX
3126
#endif

src/support/lockedpool.cpp

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

1212
#ifdef WIN32
13-
#define WIN32_LEAN_AND_MEAN 1
1413
#ifndef NOMINMAX
1514
#define NOMINMAX
1615
#endif

src/util/system.cpp

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -48,12 +48,6 @@
4848
#pragma warning(disable:4717)
4949
#endif
5050

51-
#ifdef _WIN32_IE
52-
#undef _WIN32_IE
53-
#endif
54-
#define _WIN32_IE 0x0501
55-
56-
#define WIN32_LEAN_AND_MEAN 1
5751
#ifndef NOMINMAX
5852
#define NOMINMAX
5953
#endif

0 commit comments

Comments
 (0)