]> granicus.if.org Git - libvpx/commitdiff
avoid redefining WIN32_LEAN_AND_MEAN
authorJames Zern <jzern@google.com>
Tue, 22 Nov 2016 23:15:53 +0000 (15:15 -0800)
committerJames Zern <jzern@google.com>
Tue, 22 Nov 2016 23:15:53 +0000 (15:15 -0800)
fixes redef errors when the macro is supplied elsewhere, e.g., the
command line

Change-Id: Ic15726817a43e30595d50562ef1f077060c193cf

test/register_state_check.h
test/video_source.h
vpx_ports/arm_cpudetect.c
vpx_ports/x86.h

index b8ba34328ce727f8b09d1fe603cc8d04556ec4ec..84641c8e999e2f7e0a3b4d094c7a434cb15064d7 100644 (file)
@@ -32,7 +32,9 @@
 
 #undef NOMINMAX
 #define NOMINMAX
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #include <winnt.h>
 
index 424bb2cfb4aa6ccf07de992f1cf1799540d62ec1..54f692865b6b0829f6b2f17082a691ebbec850a0 100644 (file)
@@ -13,7 +13,9 @@
 #if defined(_WIN32)
 #undef NOMINMAX
 #define NOMINMAX
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #endif
 #include <cstdio>
index 79c60f7a19128b69f4d05f7d3d4ae98fd9afdfce..4f9d480ade6fd8e650dcaa7aba30ca4c70d49964 100644 (file)
@@ -58,8 +58,12 @@ int arm_cpu_caps(void) {
 
 #elif defined(_MSC_VER) /* end !CONFIG_RUNTIME_CPU_DETECT */
 /*For GetExceptionCode() and EXCEPTION_ILLEGAL_INSTRUCTION.*/
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
+#ifndef WIN32_EXTRA_LEAN
 #define WIN32_EXTRA_LEAN
+#endif
 #include <windows.h>
 
 int arm_cpu_caps(void) {
index 11c98fc7622d4809c1d257fe91491a89e530b888..5aabb9e3afa9ced65000863463de303acbb37371 100644 (file)
@@ -142,7 +142,9 @@ static INLINE uint64_t xgetbv(void) {
 #if defined(_MSC_VER) && _MSC_VER >= 1700
 #undef NOMINMAX
 #define NOMINMAX
+#ifndef WIN32_LEAN_AND_MEAN
 #define WIN32_LEAN_AND_MEAN
+#endif
 #include <windows.h>
 #if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP)
 #define getenv(x) NULL