Mesa (master): windows: Always set NOMINMAX to remove min/max macros
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Wed Dec 2 18:52:48 UTC 2020
Module: Mesa
Branch: master
Commit: 852d91edcd48f8e923124a848abd20cabedeede4
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=852d91edcd48f8e923124a848abd20cabedeede4
Author: Jesse Natalie <jenatali at microsoft.com>
Date: Wed Nov 18 18:14:41 2020 -0800
windows: Always set NOMINMAX to remove min/max macros
Reviewed-by: Francisco Jerez <currojerez at riseup.net>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/7680>
---
meson.build | 1 +
src/gallium/drivers/swr/rasterizer/common/os.h | 2 ++
2 files changed, 3 insertions(+)
diff --git a/meson.build b/meson.build
index 834e47525ee..f51bc66cb1b 100644
--- a/meson.build
+++ b/meson.build
@@ -988,6 +988,7 @@ elif host_machine.system() == 'windows'
'-D_SCL_SECURE_NO_DEPRECATE',
'-D_ALLOW_KEYWORD_MACROS',
'-D_HAS_EXCEPTIONS=0', # Tell C++ STL to not use exceptions
+ '-DNOMINMAX',
]
else
pre_args += ['-D__MSVCRT_VERSION__=0x0700']
diff --git a/src/gallium/drivers/swr/rasterizer/common/os.h b/src/gallium/drivers/swr/rasterizer/common/os.h
index a37b9f430ea..cc13936d8e9 100644
--- a/src/gallium/drivers/swr/rasterizer/common/os.h
+++ b/src/gallium/drivers/swr/rasterizer/common/os.h
@@ -39,7 +39,9 @@
#undef NOMINMAX
#define UNICODE
#else
+#undef UNICODE
#include <windows.h>
+#define UNICODE
#endif
#include <intrin.h>
#include <cstdint>
More information about the mesa-commit
mailing list