Add NOMINMAX define due to windows.h max/min macro conflict (#25637)

test=develop
fix_copy_if_different
joanna.wozna.intel 5 years ago committed by GitHub
parent 70cee22fde
commit e5bbffa84c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -17,6 +17,9 @@
#include <fcntl.h>
#include <sys/stat.h>
#ifdef _WIN32
#ifndef NOMINMAX
#define NOMINMAX // msvc max/min macro conflict with std::min/max
#endif
#include <windows.h>
#else
#include <sys/syscall.h>

@ -17,6 +17,9 @@ limitations under the License. */
#ifdef _WIN32
#include <malloc.h>
#ifndef NOMINMAX
#define NOMINMAX // msvc max/min macro conflict with std::min/max
#endif
#include <windows.h> // VirtualLock/VirtualUnlock
#else
#include <sys/mman.h> // for mlock and munlock

@ -27,6 +27,9 @@ limitations under the License. */
#if defined(_WIN32)
#include <intrin.h>
#ifndef NOMINMAX
#define NOMINMAX // msvc max/min macro conflict with std::min/max
#endif
#include <windows.h>
#endif // _WIN32

@ -23,7 +23,9 @@ limitations under the License. */
#include <sys/sysctl.h>
#include <sys/types.h>
#elif defined(_WIN32)
#ifndef NOMINMAX
#define NOMINMAX // msvc max/min macro conflict with std::min/max
#endif
#include <windows.h>
#else
#include <unistd.h>

@ -19,9 +19,11 @@ limitations under the License. */
#endif // __GNUC__
#if !defined(_WIN32)
#include <dlfcn.h> // dladdr
#else // _WIN32
#define NOMINMAX // msvc max/min macro conflict with std::min/max
#include <dlfcn.h> // dladdr
#else // _WIN32
#ifndef NOMINMAX
#define NOMINMAX // msvc max/min macro conflict with std::min/max
#endif
#include <windows.h> // GetModuleFileName
#endif

Loading…
Cancel
Save