From: James Zern Date: Tue, 15 Nov 2016 20:16:14 +0000 (-0800) Subject: vpx_timer.h,x86.h: define NOMINMAX for windows.h X-Git-Tag: v1.6.1~92^2~1 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=0412193bb9775f6be0f9f6c74b90ff705e584d92;p=libvpx 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 --- 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 #if WINAPI_FAMILY_PARTITION(WINAPI_FAMILY_APP) #define getenv(x) NULL