summaryrefslogtreecommitdiff
path: root/vpx_ports
diff options
context:
space:
mode:
authorJames Zern <jzern@google.com>2016-11-15 12:16:14 -0800
committerJames Zern <jzern@google.com>2016-11-15 12:18:38 -0800
commit0412193bb9775f6be0f9f6c74b90ff705e584d92 (patch)
tree146a65994e9710e8b495adebfb54cb8ab22e58f1 /vpx_ports
parenteff68a3a4df99b8f475a1e3e5eb842bcb928fe00 (diff)
downloadlibvpx-0412193bb9775f6be0f9f6c74b90ff705e584d92.tar
libvpx-0412193bb9775f6be0f9f6c74b90ff705e584d92.tar.gz
libvpx-0412193bb9775f6be0f9f6c74b90ff705e584d92.tar.bz2
libvpx-0412193bb9775f6be0f9f6c74b90ff705e584d92.zip
vpx_timer.h,x86.h: define NOMINMAX for windows.h
avoids the definition of min/max macros in headers that may appear in c++ unit tests. the codebase uses VPXMIN/MAX for this purpose in any case Change-Id: I2b679b045d64fb34fd8780f704e3caf10a758d82
Diffstat (limited to 'vpx_ports')
-rw-r--r--vpx_ports/vpx_timer.h2
-rw-r--r--vpx_ports/x86.h3
2 files changed, 5 insertions, 0 deletions
diff --git a/vpx_ports/vpx_timer.h b/vpx_ports/vpx_timer.h
index 4aae30e94..c1f1b6027 100644
--- a/vpx_ports/vpx_timer.h
+++ b/vpx_ports/vpx_timer.h
@@ -21,6 +21,8 @@
/*
* Win32 specific includes
*/
+#undef NOMINMAX
+#define NOMINMAX
#ifndef WIN32_LEAN_AND_MEAN
#define WIN32_LEAN_AND_MEAN
#endif
diff --git a/vpx_ports/x86.h b/vpx_ports/x86.h
index 6ba02cf1f..11c98fc76 100644
--- a/vpx_ports/x86.h
+++ b/vpx_ports/x86.h
@@ -140,6 +140,9 @@ static INLINE uint64_t xgetbv(void) {
#endif
#if defined(_MSC_VER) && _MSC_VER >= 1700
+#undef NOMINMAX
+#define NOMINMAX
+#define WIN32_LEAN_AND_MEAN
#include <windows.h>
#if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP)
#define getenv(x) NULL