未验证 提交 e5bbffa8 编写于 作者: J joanna.wozna.intel 提交者: GitHub

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

test=develop
上级 70cee22f
......@@ -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
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册