aboutsummaryrefslogtreecommitdiff
path: root/configure.ac
diff options
context:
space:
mode:
authorfanquake <fanquake@gmail.com>2022-06-20 11:43:21 +0100
committerfanquake <fanquake@gmail.com>2022-06-20 12:22:05 +0100
commit58a9601dffa6d9b3b881a476169458787d382919 (patch)
treead17aa0f9a79d38db266d618827173f795024012 /configure.ac
parenta09033e22c4f072c86a1885dd476f3059e5416d1 (diff)
downloadbitcoin-58a9601dffa6d9b3b881a476169458787d382919.tar.xz
build: globally define NOMINMAX
Define (and document) `NOMINMAX` once, rather than across multiple source files. Defining this prevents the definition of min/max macros when using mingw-w64, which may conflict with unprefixed std::min/max usage. While that might not be the case for us, we'd always prefer to use the standard library in any case. For example: https://github.com/mingw-w64/mingw-w64/blob/73cadc06c62c6af5faf76f64ef08e684b48de48c/mingw-w64-headers/include/ntdef.h#L289-L300
Diffstat (limited to 'configure.ac')
-rw-r--r--configure.ac3
1 files changed, 3 insertions, 0 deletions
diff --git a/configure.ac b/configure.ac
index a4a23474c8..11b4abde5e 100644
--- a/configure.ac
+++ b/configure.ac
@@ -710,6 +710,9 @@ case $host in
fi
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN"
+ dnl Prevent the definition of min/max macros.
+ dnl We always want to use the standard library.
+ CORE_CPPFLAGS="$CORE_CPPFLAGS -DNOMINMAX"
dnl libtool insists upon adding -nostdlib and a list of objects/libs to link against.
dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override