merge bitcoin#25422: globally define NOMINMAX when building with mingw-w64

This commit is contained in:
Kittywhiskers Van Gogh 2022-06-20 11:43:21 +01:00
parent 000495df8e
commit 3f143096c8
No known key found for this signature in database
GPG Key ID: 30CD0C065E5C4AAD
6 changed files with 3 additions and 15 deletions

View File

@ -758,6 +758,9 @@ case $host in
fi fi
CORE_CPPFLAGS="$CORE_CPPFLAGS -D_MT -DWIN32 -D_WINDOWS -D_WIN32_WINNT=0x0601 -D_WIN32_IE=0x0501 -DWIN32_LEAN_AND_MEAN" 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 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 dnl That breaks our ability to build dll's with static libgcc/libstdc++/libssp. Override

View File

@ -11,9 +11,6 @@
#endif #endif
#ifdef WIN32 #ifdef WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#ifdef FD_SETSIZE #ifdef FD_SETSIZE
#undef FD_SETSIZE // prevent redefinition compiler warning #undef FD_SETSIZE // prevent redefinition compiler warning
#endif #endif

View File

@ -11,9 +11,6 @@
#include <sys/utsname.h> #include <sys/utsname.h>
#include <unistd.h> #include <unistd.h>
#else #else
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <codecvt> #include <codecvt>
#include <limits> #include <limits>
#include <windows.h> #include <windows.h>

View File

@ -29,9 +29,6 @@
#include <cmath> #include <cmath>
#ifdef WIN32 #ifdef WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <shellapi.h> #include <shellapi.h>
#include <shlobj.h> #include <shlobj.h>
#include <shlwapi.h> #include <shlwapi.h>

View File

@ -10,9 +10,6 @@
#endif #endif
#ifdef WIN32 #ifdef WIN32
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <windows.h> #include <windows.h>
#else #else
#include <sys/mman.h> // for mmap #include <sys/mman.h> // for mmap

View File

@ -60,9 +60,6 @@
#pragma warning(disable:4717) #pragma warning(disable:4717)
#endif #endif
#ifndef NOMINMAX
#define NOMINMAX
#endif
#include <codecvt> #include <codecvt>
#include <io.h> /* for _commit */ #include <io.h> /* for _commit */