From 76e94bde6b3410686cd59bd85b0479acefe88243 Mon Sep 17 00:00:00 2001 From: Randy Heit Date: Thu, 14 Sep 2006 00:17:10 +0000 Subject: [PATCH] Added some Linux fixes that were needed after the last commit. SVN r327 (trunk) --- src/cmdlib.cpp | 4 ++-- src/i_net.cpp | 2 +- src/sdl/i_input.cpp | 2 +- src/sdl/i_system.cpp | 11 ++--------- src/sound/fmodsound.cpp | 2 +- src/sound/i_sound.cpp | 2 +- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/src/cmdlib.cpp b/src/cmdlib.cpp index 568e628d1..88df5707b 100644 --- a/src/cmdlib.cpp +++ b/src/cmdlib.cpp @@ -315,8 +315,8 @@ bool CheckWildcards (const char *pattern, const char *text) void FormatGUID (char *text, const GUID &guid) { - sprintf (text, "{%08lx-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", - guid.Data1, guid.Data2, guid.Data3, + sprintf (text, "{%08x-%04x-%04x-%02x%02x-%02x%02x%02x%02x%02x%02x}", + (uint32)guid.Data1, guid.Data2, guid.Data3, guid.Data4[0], guid.Data4[1], guid.Data4[2], guid.Data4[3], guid.Data4[4], guid.Data4[5], diff --git a/src/i_net.cpp b/src/i_net.cpp index bb2ef6ab6..bb7120bda 100644 --- a/src/i_net.cpp +++ b/src/i_net.cpp @@ -37,6 +37,7 @@ # define WIN32_LEAN_AND_MEAN # include # include +#define USE_WINDOWS_DWORD #else # include # include @@ -47,7 +48,6 @@ # include #endif -#define USE_WINDOWS_DWORD #include "doomtype.h" #include "i_system.h" #include "d_event.h" diff --git a/src/sdl/i_input.cpp b/src/sdl/i_input.cpp index 84dd99d7a..535e2addc 100644 --- a/src/sdl/i_input.cpp +++ b/src/sdl/i_input.cpp @@ -23,7 +23,7 @@ static void I_CheckNativeMouse (); static bool GUICapture; static bool NativeMouse = true; -extern BOOL paused; +extern int paused; CVAR (Bool, use_mouse, true, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) CVAR (Bool, m_noprescale, false, CVAR_ARCHIVE|CVAR_GLOBALCONFIG) diff --git a/src/sdl/i_system.cpp b/src/sdl/i_system.cpp index 8f5d537f1..0b8fe6a1f 100644 --- a/src/sdl/i_system.cpp +++ b/src/sdl/i_system.cpp @@ -25,14 +25,7 @@ #include #include #include - -#ifdef OSF1 -#define _XOPEN_SOURCE_EXTENDED -#endif #include -#ifdef OSF1 -#undef _XOPEN_SOURCE_EXTENDED -#endif #include #include @@ -66,7 +59,7 @@ EXTERN_CVAR (String, language) #ifdef USEASM -extern "C" BOOL STACK_ARGS CheckMMX (CPUInfo *cpu); +extern "C" void STACK_ARGS CheckMMX (CPUInfo *cpu); #endif extern "C" @@ -295,7 +288,7 @@ bool gameisdead; void STACK_ARGS I_FatalError (const char *error, ...) { - static BOOL alreadyThrown = false; + static bool alreadyThrown = false; gameisdead = true; if (!alreadyThrown) // ignore all but the first message -- killough diff --git a/src/sound/fmodsound.cpp b/src/sound/fmodsound.cpp index 3c87dcaa2..dd5d4585e 100644 --- a/src/sound/fmodsound.cpp +++ b/src/sound/fmodsound.cpp @@ -38,12 +38,12 @@ #include #include "resource.h" extern HWND Window; +#define USE_WINDOWS_DWORD #else #define FALSE 0 #define TRUE 1 #endif -#define USE_WINDOWS_DWORD #include "templates.h" #include "fmodsound.h" #include "c_cvars.h" diff --git a/src/sound/i_sound.cpp b/src/sound/i_sound.cpp index fe9c996ed..efd8f34bf 100644 --- a/src/sound/i_sound.cpp +++ b/src/sound/i_sound.cpp @@ -39,6 +39,7 @@ #include "resource.h" extern HWND Window; extern HINSTANCE g_hInst; +#define USE_WINDOWS_DWORD #else #define FALSE 0 #define TRUE 1 @@ -48,7 +49,6 @@ extern HINSTANCE g_hInst; #include #include -#define USE_WINDOWS_DWORD #include "doomtype.h" #include "m_alloc.h" #include