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 <windows.h>
 #	include <winsock.h>
+#define USE_WINDOWS_DWORD
 #else
 #	include <sys/socket.h>
 #	include <netinet/in.h>
@@ -47,7 +48,6 @@
 #	include <sys/ioctl.h>
 #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 <stdio.h>
 #include <string.h>
 #include <fnmatch.h>
-
-#ifdef OSF1
-#define _XOPEN_SOURCE_EXTENDED
-#endif
 #include <unistd.h>
-#ifdef OSF1
-#undef _XOPEN_SOURCE_EXTENDED
-#endif
 
 #include <stdarg.h>
 #include <sys/types.h>
@@ -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 <mmsystem.h>
 #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 <stdlib.h>
 #include <stdarg.h>
 
-#define USE_WINDOWS_DWORD
 #include "doomtype.h"
 #include "m_alloc.h"
 #include <math.h>