Skip to content

Commit e38c194

Browse files
committed
Move Win32 defines to configure.ac to ensure they are globally defined
common.vcxproj used for MSVC builds
1 parent 37f236a commit e38c194

File tree

6 files changed

+2
-17
lines changed

6 files changed

+2
-17
lines changed

build_msvc/common.vcxproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
<AdditionalOptions>/utf-8 %(AdditionalOptions)</AdditionalOptions>
2424
<DisableSpecificWarnings>4018;4244;4267;4715;4805;</DisableSpecificWarnings>
2525
<TreatWarningAsError>true</TreatWarningAsError>
26-
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;%(PreprocessorDefinitions)</PreprocessorDefinitions>
26+
<PreprocessorDefinitions>_WIN32_WINNT=0x0601;_WIN32_IE=0x0501;WIN32_LEAN_AND_MEAN;%(PreprocessorDefinitions)</PreprocessorDefinitions>
2727
<AdditionalIncludeDirectories>..\..\src;..\..\src\univalue\include;..\..\src\secp256k1\include;..\..\src\leveldb\include;..\..\src\leveldb\helpers\memenv;%(AdditionalIncludeDirectories)</AdditionalIncludeDirectories>
2828
</ClCompile>
2929
</ItemDefinitionGroup>

configure.ac

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -496,7 +496,7 @@ case $host in
496496
AC_MSG_ERROR("windres not found")
497497
fi
498498

499-
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601"
499+
CPPFLAGS="$CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -DBOOST_THREAD_USE_LIB -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
500500
LEVELDB_TARGET_FLAGS="-DOS_WINDOWS"
501501
if test "x$CXXFLAGS_overridden" = "xno"; then
502502
CXXFLAGS="$CXXFLAGS -w"

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
@@ -44,12 +44,6 @@
4444
#pragma warning(disable:4717)
4545
#endif
4646

47-
#ifdef _WIN32_IE
48-
#undef _WIN32_IE
49-
#endif
50-
#define _WIN32_IE 0x0501
51-
52-
#define WIN32_LEAN_AND_MEAN 1
5347
#ifndef NOMINMAX
5448
#define NOMINMAX
5549
#endif

0 commit comments

Comments
 (0)