From 17a574d7cd8c541c902cc0da40362a32d965e77b Mon Sep 17 00:00:00 2001 From: Vinson Lee Date: Tue, 4 Sep 2012 22:53:42 -0700 Subject: Use the correct macro _WIN32 for Windows. The correct predefined macro for Windows is _WIN32, not WIN32 or __WIN32__. _WIN32 is defined for 32-bit and 64-bit version of Windows by both MSVC and MinGW compilers. http://sourceforge.net/p/predef/wiki/OperatingSystems http://msdn.microsoft.com/en-us/library/b0084kay.aspx This patch also fixes a MinGW automake build error. Signed-off-by: Vinson Lee Reviewed-by: Brian Paul --- src/gallium/auxiliary/util/u_snprintf.c | 2 +- src/gallium/auxiliary/util/u_string.h | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) (limited to 'src/gallium/auxiliary') diff --git a/src/gallium/auxiliary/util/u_snprintf.c b/src/gallium/auxiliary/util/u_snprintf.c index f0d53b3cecd..e16f103e3f5 100644 --- a/src/gallium/auxiliary/util/u_snprintf.c +++ b/src/gallium/auxiliary/util/u_snprintf.c @@ -167,7 +167,7 @@ #if HAVE_CONFIG_H #include #else -#ifdef WIN32 +#ifdef _WIN32 #define vsnprintf util_vsnprintf #define snprintf util_snprintf #define HAVE_VSNPRINTF 0 diff --git a/src/gallium/auxiliary/util/u_string.h b/src/gallium/auxiliary/util/u_string.h index ed15981f1a5..15630ad0791 100644 --- a/src/gallium/auxiliary/util/u_string.h +++ b/src/gallium/auxiliary/util/u_string.h @@ -35,7 +35,7 @@ #ifndef U_STRING_H_ #define U_STRING_H_ -#if !defined(WIN32) && !defined(XF86_LIBC_H) +#if !defined(_WIN32) && !defined(XF86_LIBC_H) #include #endif #include @@ -64,7 +64,7 @@ util_strchrnul(const char *s, char c) #endif -#ifdef WIN32 +#ifdef _WIN32 int util_vsnprintf(char *, size_t, const char *, va_list); int util_snprintf(char *str, size_t size, const char *format, ...); -- cgit v1.2.3