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/mesa/main/compiler.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/mesa/main/compiler.h') diff --git a/src/mesa/main/compiler.h b/src/mesa/main/compiler.h index 32efe843415..a8cddaf8fd7 100644 --- a/src/mesa/main/compiler.h +++ b/src/mesa/main/compiler.h @@ -90,7 +90,7 @@ extern "C" { /** * Disable assorted warnings */ -#if !defined(OPENSTEP) && (defined(__WIN32__) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) +#if !defined(OPENSTEP) && (defined(_WIN32) && !defined(__CYGWIN__)) && !defined(BUILD_FOR_SNAP) # if !defined(__GNUC__) /* mingw environment */ # pragma warning( disable : 4068 ) /* unknown pragma */ # pragma warning( disable : 4710 ) /* function 'foo' not inlined */ @@ -246,7 +246,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) -#if !defined(CAPI) && defined(WIN32) && !defined(BUILD_FOR_SNAP) +#if !defined(CAPI) && defined(_WIN32) && !defined(BUILD_FOR_SNAP) #define CAPI _cdecl #endif @@ -256,7 +256,7 @@ static INLINE GLuint CPU_TO_LE32(GLuint x) * than GNU C */ #ifndef _ASMAPI -#if defined(WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/ +#if defined(_WIN32) && !defined(BUILD_FOR_SNAP)/* was: !defined( __GNUC__ ) && !defined( VMS ) && !defined( __INTEL_COMPILER )*/ #define _ASMAPI __cdecl #else #define _ASMAPI -- cgit v1.2.3