diff --git a/configure.ac b/configure.ac index 62672a3ac..7b61cc971 100644 --- a/configure.ac +++ b/configure.ac @@ -1546,7 +1546,7 @@ fi AS="$CC" if test "x$SYSTYPE" = "xWIN32"; then - ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES) -DWIN32" + ASFLAGS="\$(DEFS) \$(CFLAGS) \$(CPPFLAGS) \$(DEFAULT_INCLUDES) \$(INCLUDES) -D_WIN32" plugin_ldflags="-no-undefined" plugin_libadd="-luser32 -lgdi32 -lwinmm" else diff --git a/include/QF/mathlib.h b/include/QF/mathlib.h index cb3bb0ff9..6bde9100e 100644 --- a/include/QF/mathlib.h +++ b/include/QF/mathlib.h @@ -36,7 +36,7 @@ # define M_PI 3.14159265358979323846 // matches value in gcc v2 math.h #endif -#ifdef WIN32 +#ifdef _WIN32 # if defined (DLL_EXPORT) && defined (BUILD_QFutil) # define QFutil_IMPORT # else diff --git a/libs/audio/renderer/snd_mixa.S b/libs/audio/renderer/snd_mixa.S index 6f52c2182..8eb4c01d9 100644 --- a/libs/audio/renderer/snd_mixa.S +++ b/libs/audio/renderer/snd_mixa.S @@ -34,7 +34,7 @@ #ifdef USE_INTEL_ASM -#ifdef WIN32 +#ifdef _WIN32 # undef PIC //no such thing in win32 #endif diff --git a/libs/console/filelist.c b/libs/console/filelist.c index 8086da0fe..547e816c9 100644 --- a/libs/console/filelist.c +++ b/libs/console/filelist.c @@ -52,7 +52,7 @@ static __attribute__ ((unused)) const char rcsid[] = # include # undef model_t #else -# ifdef WIN32 +# ifdef _WIN32 # include "fnmatch.h" # endif #endif diff --git a/libs/ruamoko/rua_file.c b/libs/ruamoko/rua_file.c index b72468452..92322a6a9 100644 --- a/libs/ruamoko/rua_file.c +++ b/libs/ruamoko/rua_file.c @@ -44,7 +44,7 @@ static __attribute__ ((unused)) const char rcsid[] = # include # undef model_t #else -# ifdef WIN32 +# ifdef _WIN32 # include "fnmatch.h" # endif #endif diff --git a/libs/util/math.S b/libs/util/math.S index 82fb2728b..ddfe92ca4 100644 --- a/libs/util/math.S +++ b/libs/util/math.S @@ -35,7 +35,7 @@ #ifdef USE_INTEL_ASM -#ifdef WIN32 +#ifdef _WIN32 # undef PIC //no such thing in win32 #endif diff --git a/libs/util/pakfile.c b/libs/util/pakfile.c index 41ef6e1ea..a4a588eb4 100644 --- a/libs/util/pakfile.c +++ b/libs/util/pakfile.c @@ -259,7 +259,7 @@ make_parents (const char *_path) for (p = path; *p && (d = strchr (p, '/')); p = d + 1) { t = *d; *d = 0; -#ifdef WIN32 +#ifdef _WIN32 if (mkdir (path) < 0) #else if (mkdir (path, 0777) < 0) diff --git a/libs/util/quakefs.c b/libs/util/quakefs.c index 1532b476d..c6929826e 100644 --- a/libs/util/quakefs.c +++ b/libs/util/quakefs.c @@ -59,7 +59,7 @@ static __attribute__ ((unused)) const char rcsid[] = # include # undef model_t #else -# ifdef WIN32 +# ifdef _WIN32 # include "fnmatch.h" # endif #endif diff --git a/libs/util/quakeio.c b/libs/util/quakeio.c index 68f645e61..8378e1ffc 100644 --- a/libs/util/quakeio.c +++ b/libs/util/quakeio.c @@ -62,7 +62,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "QF/quakefs.h" #include "QF/quakeio.h" -#ifdef WIN32 +#ifdef _WIN32 # ifndef __BORLANDC__ # define setmode _setmode # define O_BINARY _O_BINARY @@ -196,7 +196,7 @@ Qdopen (int fd, const char *mode) int zip = 0; m = alloca (strlen (mode) + 1); -#ifdef WIN32 +#ifdef _WIN32 setmode (fd, O_BINARY); #endif for (p = m; *mode && p - m < ((int) sizeof (m) - 1); mode++) { @@ -240,7 +240,7 @@ Qsubopen (const char *path, int offs, int len, int zip) if (fd == -1) return 0; -#ifdef WIN32 +#ifdef _WIN32 setmode (fd, O_BINARY); #endif diff --git a/libs/util/sys.c b/libs/util/sys.c index 134eb486f..cb6b1e407 100644 --- a/libs/util/sys.c +++ b/libs/util/sys.c @@ -213,7 +213,7 @@ Sys_Print (FILE *stream, const char *fmt, va_list args) dvsprintf (msg, fmt, args); if (stream == stderr) { -#ifdef WIN32 +#ifdef _WIN32 MessageBox (NULL, msg->str, "Fatal Error", 0 /* MB_OK */ ); #endif fputs ("Fatal Error: ", stream); @@ -464,7 +464,7 @@ Sys_TimeID (void) //FIXME I need a new name, one that doesn't make me feel 3 fee void Sys_PageIn (void *ptr, int size) { -//may or may not be useful in linux #ifdef WIN32 +//may or may not be useful in linux #ifdef _WIN32 byte *x; int m, n; diff --git a/libs/util/sys_ia32.S b/libs/util/sys_ia32.S index 93133872a..e43c69129 100644 --- a/libs/util/sys_ia32.S +++ b/libs/util/sys_ia32.S @@ -34,7 +34,7 @@ #ifdef USE_INTEL_ASM -#ifdef WIN32 +#ifdef _WIN32 # undef PIC //no such thing in win32 #endif diff --git a/libs/util/wadfile.c b/libs/util/wadfile.c index 16849303a..71a6183a5 100644 --- a/libs/util/wadfile.c +++ b/libs/util/wadfile.c @@ -321,7 +321,7 @@ make_parents (const char *_path) for (p = path; *p && (d = strchr (p, '/')); p = d + 1) { t = *d; *d = 0; -#ifdef WIN32 +#ifdef _WIN32 if (mkdir (path) < 0) #else if (mkdir (path, 0777) < 0) diff --git a/libs/video/renderer/sw/fpua.S b/libs/video/renderer/sw/fpua.S index eb850ced8..203ffcd0a 100644 --- a/libs/video/renderer/sw/fpua.S +++ b/libs/video/renderer/sw/fpua.S @@ -34,7 +34,7 @@ #ifdef USE_INTEL_ASM -#ifdef WIN32 +#ifdef _WIN32 # undef PIC //no such thing in win32 #endif diff --git a/libs/video/renderer/sw/sw_raclipa.S b/libs/video/renderer/sw/sw_raclipa.S index c47955ae0..1a094b788 100644 --- a/libs/video/renderer/sw/sw_raclipa.S +++ b/libs/video/renderer/sw/sw_raclipa.S @@ -37,7 +37,7 @@ #ifdef USE_INTEL_ASM -#ifdef WIN32 +#ifdef _WIN32 # undef PIC #endif diff --git a/libs/video/targets/vid_sdl.c b/libs/video/targets/vid_sdl.c index 8aee24559..aa64feec2 100644 --- a/libs/video/targets/vid_sdl.c +++ b/libs/video/targets/vid_sdl.c @@ -49,7 +49,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "d_iface.h" -#ifdef WIN32 // FIXME: evil hack to get full DirectSound support with SDL +#ifdef _WIN32 // FIXME: evil hack to get full DirectSound support with SDL #include #include HWND mainwindow; @@ -126,7 +126,7 @@ VID_Init (unsigned char *palette) SDL_ShowCursor (0); // hide the mouse pointer -#ifdef WIN32 +#ifdef _WIN32 // FIXME: EVIL thing - but needed for win32 until // SDL_sound works better - without this DirectSound fails. diff --git a/libs/video/targets/vid_sdl32.c b/libs/video/targets/vid_sdl32.c index e91e690f0..579d85841 100644 --- a/libs/video/targets/vid_sdl32.c +++ b/libs/video/targets/vid_sdl32.c @@ -50,7 +50,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "d_iface.h" #include "d_local.h" -#ifdef WIN32 // FIXME: evil hack to get full DirectSound support with SDL +#ifdef _WIN32 // FIXME: evil hack to get full DirectSound support with SDL #include #include HWND mainwindow; @@ -163,7 +163,7 @@ VID_Init (unsigned char *palette) SDL_ShowCursor (0); // initialize the mouse -#ifdef WIN32 +#ifdef _WIN32 // FIXME: EVIL thing - but needed for win32 until // SDL_sound works better - without this DirectSound fails. diff --git a/libs/video/targets/vid_sgl.c b/libs/video/targets/vid_sgl.c index 8016fe869..7495feae1 100644 --- a/libs/video/targets/vid_sgl.c +++ b/libs/video/targets/vid_sgl.c @@ -55,7 +55,7 @@ static __attribute__ ((unused)) const char rcsid[] = #include "r_cvar.h" #include "sbar.h" -#ifdef WIN32 // FIXME: evil hack to get full DirectSound support with SDL +#ifdef _WIN32 // FIXME: evil hack to get full DirectSound support with SDL # include # include HWND mainwindow; @@ -131,7 +131,7 @@ VID_Init (unsigned char *palette) // Check if we want fullscreen if (vid_fullscreen->int_val) { flags |= SDL_FULLSCREEN; -#ifndef WIN32 // Don't annoy Mesa/3dfx folks +#ifndef _WIN32 // Don't annoy Mesa/3dfx folks // FIXME: Maybe this could be put in a different spot, but I don't // know where. Anyway, it's to work around a 3Dfx Glide bug. // Cvar_SetValue (in_grab, 1); // Needs #include "QF/input.h" @@ -197,7 +197,7 @@ success: SDL_ShowCursor (0); // hide the mouse pointer -#ifdef WIN32 +#ifdef _WIN32 // FIXME: EVIL thing - but needed for win32 until // SDL_sound works better - without this DirectSound fails. diff --git a/nq/source/sys_sdl.c b/nq/source/sys_sdl.c index 71a4268d9..d41854d16 100644 --- a/nq/source/sys_sdl.c +++ b/nq/source/sys_sdl.c @@ -79,7 +79,7 @@ int noconinput; static void startup (void) { -#ifdef WIN32 +#ifdef _WIN32 OSVERSIONINFO vinfo; Sys_MaskFPUExceptions (); @@ -124,7 +124,7 @@ SDL_main (int c, char **v) host_parms.argc = com_argc; host_parms.argv = com_argv; -#ifndef WIN32 +#ifndef _WIN32 noconinput = COM_CheckParm ("-noconinput"); if (!noconinput) fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); diff --git a/qw/source/cl_sys_sdl.c b/qw/source/cl_sys_sdl.c index 93238b296..6c26df549 100644 --- a/qw/source/cl_sys_sdl.c +++ b/qw/source/cl_sys_sdl.c @@ -80,7 +80,7 @@ int noconinput; static void startup (void) { -#ifdef WIN32 +#ifdef _WIN32 OSVERSIONINFO vinfo; Sys_MaskFPUExceptions (); @@ -125,7 +125,7 @@ SDL_main (int c, char **v) host_parms.argc = com_argc; host_parms.argv = com_argv; -#ifndef WIN32 +#ifndef _WIN32 noconinput = COM_CheckParm ("-noconinput"); if (!noconinput) fcntl (0, F_SETFL, fcntl (0, F_GETFL, 0) | O_NONBLOCK); diff --git a/qw/source/sv_main.c b/qw/source/sv_main.c index 7182288e0..efd644017 100644 --- a/qw/source/sv_main.c +++ b/qw/source/sv_main.c @@ -1173,7 +1173,7 @@ SV_PrintIP (byte *ip) static char buf[INET6_ADDRSTRLEN]; if (!inet_ntop (AF_INET6, ip, buf, INET6_ADDRSTRLEN)) #else -# ifdef WIN32 +# ifdef _WIN32 static char buf[16]; strcpy (buf, inet_ntoa (*(struct in_addr*)ip)); if (0) diff --git a/tools/qfmodelgen/source/cmdlib.c b/tools/qfmodelgen/source/cmdlib.c index 2d4d46281..08e8cacee 100644 --- a/tools/qfmodelgen/source/cmdlib.c +++ b/tools/qfmodelgen/source/cmdlib.c @@ -29,7 +29,7 @@ #include "cmdlib.h" -#ifdef WIN32 +#ifdef _WIN32 #include #endif @@ -160,7 +160,7 @@ I_FloatTime (void) void Q_getwd (char *out) { -#ifdef WIN32 +#ifdef _WIN32 _getcwd (out, 256); strcat (out, "\\"); #else @@ -171,7 +171,7 @@ Q_getwd (char *out) void Q_mkdir (char *path) { -#ifdef WIN32 +#ifdef _WIN32 if (_mkdir (path) != -1) return; #else