mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2025-12-24 19:40:10 +01:00
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 <vlee@freedesktop.org> Reviewed-by: Brian Paul <brianp@vmware.com>
This commit is contained in:
parent
df5eb0c9bc
commit
17a574d7cd
14 changed files with 20 additions and 20 deletions
|
|
@ -167,7 +167,7 @@
|
|||
#if HAVE_CONFIG_H
|
||||
#include <config.h>
|
||||
#else
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define vsnprintf util_vsnprintf
|
||||
#define snprintf util_snprintf
|
||||
#define HAVE_VSNPRINTF 0
|
||||
|
|
|
|||
|
|
@ -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 <stdio.h>
|
||||
#endif
|
||||
#include <stddef.h>
|
||||
|
|
@ -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, ...);
|
||||
|
|
|
|||
|
|
@ -22,7 +22,7 @@ unsigned show_fps = 0;
|
|||
static void usage(char *name)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [ options ] shader_filename\n", name);
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
fprintf(stderr, "\n" );
|
||||
fprintf(stderr, "options:\n");
|
||||
fprintf(stderr, " -fps show frames per second\n");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ unsigned draw_strip = 0;
|
|||
static void usage(char *name)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [ options ] shader_filename\n", name);
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
fprintf(stderr, "\n" );
|
||||
fprintf(stderr, "options:\n");
|
||||
fprintf(stderr, " -fps show frames per second\n");
|
||||
|
|
|
|||
|
|
@ -23,7 +23,7 @@ unsigned show_fps = 0;
|
|||
static void usage(char *name)
|
||||
{
|
||||
fprintf(stderr, "usage: %s [ options ] shader_filename\n", name);
|
||||
#ifndef WIN32
|
||||
#ifndef _WIN32
|
||||
fprintf(stderr, "\n" );
|
||||
fprintf(stderr, "options:\n");
|
||||
fprintf(stderr, " -fps show frames per second\n");
|
||||
|
|
|
|||
|
|
@ -47,7 +47,7 @@
|
|||
#include <string.h>
|
||||
#include <stdlib.h>
|
||||
#include <stdio.h>
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#include <stdint.h>
|
||||
#endif
|
||||
#include "GL/glxproto.h"
|
||||
|
|
|
|||
|
|
@ -138,7 +138,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
print '# define GL_PREFIX(n) GLNAME(CONCAT(gl,n))'
|
||||
print '# endif'
|
||||
print ''
|
||||
print '#if defined(PTHREADS) || defined(WIN32)'
|
||||
print '#if defined(PTHREADS) || defined(_WIN32)'
|
||||
print '# define THREADS'
|
||||
print '#endif'
|
||||
print ''
|
||||
|
|
|
|||
|
|
@ -78,7 +78,7 @@ class PrintGenericStubs(gl_XML.gl_print_base):
|
|||
print '#define GLOBL_FN(x) GLOBL x'
|
||||
print '#endif'
|
||||
print ''
|
||||
print '#if defined(PTHREADS) || defined(WIN32)'
|
||||
print '#if defined(PTHREADS) || defined(_WIN32)'
|
||||
print '# define THREADS'
|
||||
print '#endif'
|
||||
print ''
|
||||
|
|
|
|||
|
|
@ -43,7 +43,7 @@
|
|||
|
||||
#if !(defined(USE_X86_ASM) || defined(USE_X86_64_ASM) || defined(USE_SPARC_ASM))
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(_WIN32)
|
||||
#define KEYWORD1 GLAPI
|
||||
#else
|
||||
#define KEYWORD1 PUBLIC
|
||||
|
|
|
|||
|
|
@ -125,7 +125,7 @@ static int ThreadSafe;
|
|||
void
|
||||
u_current_destroy(void)
|
||||
{
|
||||
#if defined(THREADS) && defined(WIN32)
|
||||
#if defined(THREADS) && defined(_WIN32)
|
||||
u_tsd_destroy(&u_current_table_tsd);
|
||||
u_tsd_destroy(&u_current_user_tsd);
|
||||
#endif
|
||||
|
|
|
|||
|
|
@ -153,7 +153,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
|
|||
* IMPORTANT: Link with multithreaded runtime library when THREADS are
|
||||
* used!
|
||||
*/
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
|
||||
struct u_tsd {
|
||||
DWORD key;
|
||||
|
|
@ -225,7 +225,7 @@ u_tsd_set(struct u_tsd *tsd, void *ptr)
|
|||
}
|
||||
}
|
||||
|
||||
#endif /* WIN32 */
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
/*
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -57,7 +57,7 @@
|
|||
#endif
|
||||
|
||||
|
||||
#ifdef WIN32
|
||||
#ifdef _WIN32
|
||||
#define vsnprintf _vsnprintf
|
||||
#elif defined(__IBMC__) || defined(__IBMCPP__) || ( defined(__VMS) && __CRTL_VER < 70312000 )
|
||||
extern int vsnprintf(char *str, size_t count, const char *fmt, va_list arg);
|
||||
|
|
|
|||
|
|
@ -82,7 +82,7 @@ extern void _mesa_test_os_sse_support( void );
|
|||
extern void _mesa_test_os_sse_exception_support( void );
|
||||
|
||||
|
||||
#if defined(WIN32)
|
||||
#if defined(_WIN32)
|
||||
#ifndef STATUS_FLOAT_MULTIPLE_TRAPS
|
||||
# define STATUS_FLOAT_MULTIPLE_TRAPS (0xC00002B5L)
|
||||
#endif
|
||||
|
|
@ -110,7 +110,7 @@ static LONG WINAPI ExceptionFilter(LPEXCEPTION_POINTERS exp)
|
|||
|
||||
return EXCEPTION_CONTINUE_EXECUTION;
|
||||
}
|
||||
#endif /* WIN32 */
|
||||
#endif /* _WIN32 */
|
||||
|
||||
|
||||
/**
|
||||
|
|
@ -149,7 +149,7 @@ void _mesa_check_os_sse_support( void )
|
|||
if (ret || !enabled)
|
||||
_mesa_x86_cpu_features &= ~(X86_FEATURE_XMM);
|
||||
}
|
||||
#elif defined(WIN32)
|
||||
#elif defined(_WIN32)
|
||||
LPTOP_LEVEL_EXCEPTION_FILTER oldFilter;
|
||||
|
||||
/* Install our ExceptionFilter */
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue