]> granicus.if.org Git - libvpx/commitdiff
vpx_timer.h,x86.h: define NOMINMAX for windows.h
authorJames Zern <jzern@google.com>
Tue, 15 Nov 2016 20:16:14 +0000 (12:16 -0800)
committerJames Zern <jzern@google.com>
Tue, 15 Nov 2016 20:18:38 +0000 (12:18 -0800)
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

vpx_ports/vpx_timer.h
vpx_ports/x86.h

index 4aae30e947451bf6f6b4be2f41c4a6aa1c938287..c1f1b602750fd85ece72cc070f186be11760c35b 100644 (file)
@@ -21,6 +21,8 @@
 /*
  * Win32 specific includes
  */
+#undef NOMINMAX
+#define NOMINMAX
 #ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
 #endif
index 6ba02cf1fcc185dbedc6037a5bb9e62d9f9acf30..11c98fc7622d4809c1d257fe91491a89e530b888 100644 (file)
@@ -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