Make sure code is only compiled if the appropriate subsystem is enabled
authorSam Lantinga <slouken@libsdl.org>
Fri, 14 Apr 2006 04:46:47 +0000
changeset 1635 92947e3a18db
parent 1634 14f302c5b32c
child 1636 3d0dec74ad01
Make sure code is only compiled if the appropriate subsystem is enabled
include/SDL_config.h.in
src/cdrom/aix/SDL_syscdrom.c
src/cdrom/beos/SDL_syscdrom.cc
src/cdrom/bsdi/SDL_syscdrom.c
src/cdrom/dc/SDL_syscdrom.c
src/cdrom/dummy/SDL_syscdrom.c
src/cdrom/freebsd/SDL_syscdrom.c
src/cdrom/linux/SDL_syscdrom.c
src/cdrom/macos/SDL_syscdrom.c
src/cdrom/macosx/SDL_syscdrom.c
src/cdrom/mint/SDL_syscdrom.c
src/cdrom/openbsd/SDL_syscdrom.c
src/cdrom/os2/SDL_syscdrom.c
src/cdrom/osf/SDL_syscdrom.c
src/cdrom/qnx/SDL_syscdrom.c
src/cdrom/win32/SDL_syscdrom.c
src/joystick/amigaos/SDL_sysjoystick.c
src/joystick/beos/SDL_bejoystick.cc
src/joystick/bsd/SDL_sysjoystick.c
src/joystick/darwin/SDL_sysjoystick.c
src/joystick/dc/SDL_sysjoystick.c
src/joystick/dummy/SDL_sysjoystick.c
src/joystick/linux/SDL_sysjoystick.c
src/joystick/macos/SDL_sysjoystick.c
src/joystick/mint/SDL_sysjoystick.c
src/joystick/os2/SDL_sysjoystick.c
src/joystick/riscos/SDL_sysjoystick.c
src/joystick/win32/SDL_mmjoystick.c
src/loadso/beos/SDL_sysloadso.c
src/loadso/dlopen/SDL_sysloadso.c
src/loadso/dummy/SDL_sysloadso.c
src/loadso/macos/SDL_sysloadso.c
src/loadso/macosx/SDL_sysloadso.c
src/loadso/mint/SDL_sysloadso.c
src/loadso/os2/SDL_sysloadso.c
src/loadso/win32/SDL_sysloadso.c
src/thread/epoc/SDL_sysmutex.cpp
src/thread/epoc/SDL_syssem.cpp
src/thread/epoc/SDL_systhread.cpp
src/timer/amigaos/SDL_systimer.c
src/timer/beos/SDL_systimer.c
src/timer/dc/SDL_systimer.c
src/timer/dummy/SDL_systimer.c
src/timer/epoc/SDL_systimer.cpp
src/timer/macos/SDL_MPWtimer.c
src/timer/macos/SDL_systimer.c
src/timer/mint/SDL_systimer.c
src/timer/os2/SDL_systimer.c
src/timer/riscos/SDL_systimer.c
src/timer/unix/SDL_systimer.c
src/timer/win32/SDL_systimer.c
src/timer/wince/SDL_systimer.c
src/video/epoc/SDL_epocevents.cpp
src/video/epoc/SDL_epocvideo.cpp
--- a/include/SDL_config.h.in	Fri Apr 14 03:56:31 2006 +0000
+++ b/include/SDL_config.h.in	Fri Apr 14 04:46:47 2006 +0000
@@ -214,6 +214,7 @@
 #undef SDL_LOADSO_BEOS
 #undef SDL_LOADSO_DLCOMPAT
 #undef SDL_LOADSO_DLOPEN
+#undef SDL_LOADSO_DUMMY
 #undef SDL_LOADSO_LDG
 #undef SDL_LOADSO_MACOS
 #undef SDL_LOADSO_OS2
@@ -236,6 +237,7 @@
 #undef SDL_TIMER_AMIGA
 #undef SDL_TIMER_BEOS
 #undef SDL_TIMER_DC
+#undef SDL_TIMER_DUMMY
 #undef SDL_TIMER_EPOC
 #undef SDL_TIMER_MACOS
 #undef SDL_TIMER_MINT
--- a/src/cdrom/aix/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/aix/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -23,6 +23,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_AIX
+
 /* Functions for system-level CD-ROM audio control */
 
 /*#define DEBUG_CDROM 1*/
@@ -655,3 +657,4 @@
 	}
 }
 
+#endif /* SDL_CDROM_AIX */
--- a/src/cdrom/beos/SDL_syscdrom.cc	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/beos/SDL_syscdrom.cc	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_BEOS
+
 /* Functions for system-level CD-ROM audio control on BeOS
    (not completely implemented yet)
  */
@@ -407,3 +409,4 @@
 	}
 }
 
+#endif /* SDL_CDROM_BEOS */
--- a/src/cdrom/bsdi/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/bsdi/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_BSDI
+
 /*
  * Functions for system-level CD-ROM audio control for BSD/OS 4.x
  * This started life out as a copy of the freebsd/SDL_cdrom.c file but was
@@ -536,3 +538,5 @@
 		}
 	SDL_numcds = 0;
 }
+
+#endif /* SDL_CDROM_BSDI */
--- a/src/cdrom/dc/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/dc/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_DC
+
 /* Functions for system-level CD-ROM audio control */
 
 #include <dc/cdrom.h>
@@ -161,3 +163,5 @@
 {
 
 }
+
+#endif /* SDL_CDROM_DC */
--- a/src/cdrom/dummy/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/dummy/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#if defined(SDL_CDROM_DUMMY) || defined(SDL_CDROM_DISABLED)
+
 /* Stub functions for system-level CD-ROM audio control */
 
 #include "SDL_cdrom.h"
@@ -36,3 +38,4 @@
 	return;
 }
 
+#endif /* SDL_CDROM_DUMMY || SDL_CDROM_DISABLED */
--- a/src/cdrom/freebsd/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/freebsd/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_FREEBSD
+
 /* Functions for system-level CD-ROM audio control */
 
 #include <sys/types.h>
@@ -401,3 +403,4 @@
 	}
 }
 
+#endif /* SDL_CDROM_FREEBSD */
--- a/src/cdrom/linux/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/linux/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_LINUX
+
 /* Functions for system-level CD-ROM audio control */
 
 #include <string.h>	/* For strerror() */
@@ -559,3 +561,4 @@
 	}
 }
 
+#endif /* SDL_CDROM_LINUX */
--- a/src/cdrom/macos/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/macos/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_MACOS
+
 /* MacOS functions for system-level CD-ROM audio control */
 
 #include <Devices.h>
@@ -520,3 +522,4 @@
 		SDL_memset(SDL_cdlist + SDL_numcds, 0, sizeof(SDL_cdlist[0]));
 }
 
+#endif /* SDL_CDROM_MACOS */
--- a/src/cdrom/macosx/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/macosx/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_MACOSX
+
 #include "SDL_syscdrom_c.h"
 
 #pragma mark -- Globals --
@@ -502,3 +504,4 @@
     return;
 }
 
+#endif /* SDL_CDROM_MACOSX */
--- a/src/cdrom/mint/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/mint/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_MINT
+
 /*
 	Atari MetaDOS CD-ROM functions
 
@@ -311,3 +313,5 @@
 {
 	return SDL_SYS_CDioctl(cdrom->id, CDROMEJECT, 0);
 }
+
+#endif /* SDL_CDROM_MINT */
--- a/src/cdrom/openbsd/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/openbsd/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_OPENBSD
+
 /* Functions for system-level CD-ROM audio control */
 
 #include <sys/types.h>
@@ -410,3 +412,4 @@
 	}
 }
 
+#endif /* SDL_CDROM_OPENBSD */
--- a/src/cdrom/os2/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/os2/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_OS2
+
 /* Functions for system-level CD-ROM audio control */
 
 #define INCL_MCIOS2
@@ -388,3 +390,4 @@
 	}
 }
 
+#endif /* SDL_CDROM_OS2 */
--- a/src/cdrom/osf/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/osf/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -20,6 +20,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_OSF
+
 /* Functions for system-level CD-ROM audio control */
 
 /* #define DEBUG_CDROM 1 */
@@ -439,4 +441,4 @@
     }
 }
 
-
+#endif /* SDL_CDROM_OSF */
--- a/src/cdrom/qnx/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/qnx/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_QNX
+
 /* Functions for system-level CD-ROM audio control */
 
 #include <sys/types.h>
@@ -545,3 +547,5 @@
         SDL_numcds = 0;
     }
 }
+
+#endif /* SDL_CDROM_QNX */
--- a/src/cdrom/win32/SDL_syscdrom.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/cdrom/win32/SDL_syscdrom.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_CDROM_WIN32
+
 /* Functions for system-level CD-ROM audio control */
 
 #define WIN32_LEAN_AND_MEAN
@@ -379,3 +381,5 @@
 		SDL_numcds = 0;
 	}
 }
+
+#endif /* SDL_CDROM_WIN32 */
--- a/src/joystick/amigaos/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/amigaos/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_AMIGA
+
 /* This is the system specific header for the SDL joystick API */
 
 #include <libraries/lowlevel.h>
@@ -225,7 +227,7 @@
 		LowLevelBase=NULL;
 		SDL_numjoysticks=0;
 	}
-
 	return;
 }
 
+#endif /* SDL_JOYSTICK_AMIGA */
--- a/src/joystick/beos/SDL_bejoystick.cc	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/beos/SDL_bejoystick.cc	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_BEOS
+
 /* This is the system specific header for the SDL joystick API */
 
 #include <be/support/String.h>
@@ -231,3 +233,5 @@
 }
 
 }; // extern "C"
+
+#endif /* SDL_JOYSTICK_BEOS */
--- a/src/joystick/bsd/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/bsd/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_USBHID
+
 /*
  * Joystick driver for the uhid(4) interface found in OpenBSD,
  * NetBSD and FreeBSD.
@@ -575,3 +577,4 @@
 	r->status = SREPORT_UNINIT;
 }
 
+#endif /* SDL_JOYSTICK_USBHID */
--- a/src/joystick/darwin/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/darwin/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_IOKIT
+
 /* SDL joystick driver for Darwin / Mac OS X, based on the IOKit HID API */
 /* Written 2001 by Max Horn */
 
@@ -836,3 +838,5 @@
 	while (NULL != gpDeviceList)
 		gpDeviceList = HIDDisposeDevice (&gpDeviceList);
 }
+
+#endif /* SDL_JOYSTICK_IOKIT */
--- a/src/joystick/dc/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/dc/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_DC
+
 #include "SDL_events.h"
 #include "SDL_joystick.h"
 #include "../SDL_sysjoystick.h"
@@ -187,3 +189,5 @@
 {
 	return;
 }
+
+#endif /* SDL_JOYSTICK_DC */
--- a/src/joystick/dummy/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/dummy/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#if defined(SDL_JOYSTICK_DUMMY) || defined(SDL_JOYSTICK_DISABLED)
+
 /* This is the system specific header for the SDL joystick API */
 
 #include "SDL_joystick.h"
@@ -78,3 +80,4 @@
 	return;
 }
 
+#endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */
--- a/src/joystick/linux/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/linux/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_LINUX
+
 /* This is the system specific header for the SDL joystick API */
 
 #include <sys/stat.h>
@@ -1195,3 +1197,4 @@
 	SDL_joylist[0].fname = NULL;
 }
 
+#endif /* SDL_JOYSTICK_LINUX */
--- a/src/joystick/macos/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/macos/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_MACOS
+
 /*  SDL stuff  --  "SDL_sysjoystick.c"
     MacOS joystick functions by Frederick Reitberger
 
@@ -315,3 +317,4 @@
     ISpShutdown();
 }
 
+#endif /* SDL_JOYSTICK_MACOS */
--- a/src/joystick/mint/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/mint/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_MINT
+
 /*
  *	Atari Joystick/Joypad drivers
  *
@@ -627,3 +629,5 @@
 	JOYPAD_IO.directions=0xff7f;
 	jp_joypads[1] |= (((~(JOYPAD_IO.directions))>>12) & 15)<<12;
 }
+
+#endif /* SDL_JOYSTICK_MINT */
--- a/src/joystick/os2/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/os2/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_OS2
+
 /* OS/2 Joystick driver, contributed by Daniel Caetano */
 
 #include <mem.h>
@@ -663,4 +665,4 @@
 return chcnt;
 }
 
-
+#endif /* SDL_JOYSTICK_OS2 */
--- a/src/joystick/riscos/SDL_sysjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/riscos/SDL_sysjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_RISCOS
+
 /*
    RISC OS - Joystick support by Alan Buckley (alan_baa@hotmail.com) - 10 April 2003
 
@@ -171,3 +173,4 @@
 	return;
 }
 
+#endif /* SDL_JOYSTICK_RISCOS */
--- a/src/joystick/win32/SDL_mmjoystick.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/joystick/win32/SDL_mmjoystick.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_JOYSTICK_WINMM
+
 /* Win32 MultiMedia Joystick driver, contributed by Andrei de A. Formiga */
 
 #define WIN32_LEAN_AND_MEAN
@@ -416,3 +418,5 @@
 	}
 	SDL_SetError("%s", errbuf);
 }
+
+#endif /* SDL_JOYSTICK_WINMM */
--- a/src/loadso/beos/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/beos/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_BEOS
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -71,3 +73,4 @@
 	}
 }
 
+#endif /* SDL_LOADSO_BEOS */
--- a/src/loadso/dlopen/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/dlopen/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_DLOPEN
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -63,3 +65,4 @@
 	}
 }
 
+#endif /* SDL_LOADSO_DLOPEN */
--- a/src/loadso/dummy/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/dummy/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#if defined(SDL_LOADSO_DUMMY) || defined(SDL_LOADSO_DISABLED)
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -45,3 +47,4 @@
     /* no-op. */
 }
 
+#endif /* SDL_LOADSO_DUMMY || SDL_LOADSO_DISABLED */
--- a/src/loadso/macos/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/macos/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_MACOS
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -101,3 +103,4 @@
 	}
 }
 
+#endif /* SDL_LOADSO_MACOS */
--- a/src/loadso/macosx/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/macosx/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_DLCOMPAT
+
 /* Please note that dlcompat apparently ships in current Mac OS X versions
  *  as a system library that provides compatibility with the Unix "dlopen"
  *  interface. In order to allow SDL to work on older OS X releases and also
@@ -1399,3 +1401,4 @@
 	}
 }
 
+#endif /* SDL_LOADSO_DLCOMPAT */
--- a/src/loadso/mint/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/mint/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_LDG
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -57,3 +59,4 @@
 	}
 }
 
+#endif /* SDL_LOADSO_LDG */
--- a/src/loadso/os2/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/os2/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_OS2
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -66,3 +68,4 @@
         DosFreeModule((HMODULE) handle);
 }
 
+#endif /* SDL_LOADSO_OS2 */
--- a/src/loadso/win32/SDL_sysloadso.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/loadso/win32/SDL_sysloadso.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_LOADSO_WIN32
+
 /* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
 /* System dependent library loading routines                           */
 
@@ -134,3 +136,4 @@
 	}
 }
 
+#endif /* SDL_LOADSO_WIN32 */
--- a/src/thread/epoc/SDL_sysmutex.cpp	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/thread/epoc/SDL_sysmutex.cpp	Fri Apr 14 04:46:47 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_sysmutex.cpp
--- a/src/thread/epoc/SDL_syssem.cpp	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/thread/epoc/SDL_syssem.cpp	Fri Apr 14 04:46:47 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_syssem.cpp
--- a/src/thread/epoc/SDL_systhread.cpp	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/thread/epoc/SDL_systhread.cpp	Fri Apr 14 04:46:47 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_systhread.cpp
--- a/src/timer/amigaos/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/amigaos/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_AMIGA
+
 #include <stdio.h>
 #include <time.h>
 #include <signal.h>
@@ -261,3 +263,5 @@
 {
 	return;
 }
+
+#endif /* SDL_TIMER_AMIGA */
--- a/src/timer/beos/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/beos/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_BEOS
+
 #include <be/kernel/OS.h>
 
 #include "SDL_thread.h"
@@ -89,3 +91,5 @@
 {
 	return;
 }
+
+#endif /* SDL_TIMER_BEOS */
--- a/src/timer/dc/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/dc/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_DC
+
 #include <kos.h>
 
 #include "SDL_thread.h"
@@ -94,3 +96,5 @@
 {
 	return;
 }
+
+#endif /* SDL_TIMER_DC */
--- a/src/timer/dummy/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/dummy/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#if defined(SDL_TIMER_DUMMY) || defined(SDL_TIMERS_DISABLED)
+
 #include "SDL_timer.h"
 #include "../SDL_timer_c.h"
 
@@ -85,3 +87,5 @@
 {
 	return;
 }
+
+#endif /* SDL_TIMER_DUMMY || SDL_TIMERS_DISABLED */
--- a/src/timer/epoc/SDL_systimer.cpp	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/epoc/SDL_systimer.cpp	Fri Apr 14 04:46:47 2006 +0000
@@ -19,6 +19,9 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
+
+#ifdef SDL_TIMER_EPOC
 
 /*
     SDL_systimer.cpp
@@ -109,3 +112,5 @@
 }
 
 }; // extern "C"
+
+#endif /* SDL_TIMER_EPOC */
--- a/src/timer/macos/SDL_MPWtimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/macos/SDL_MPWtimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_MACOS
+
 #include <Types.h>
 #include <Timer.h>
 #include <OSUtils.h>
@@ -146,3 +148,5 @@
 {
 	RmvTime((QElemPtr)&gExtendedTimerRec.tmTask);
 }
+
+#endif /* SDL_TIMER_MACOS */
--- a/src/timer/macos/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/macos/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_MACOS
+
 #include <Types.h>
 #include <Timer.h>
 #include <OSUtils.h>
@@ -172,3 +174,5 @@
 {
 	RmvTime((QElemPtr)&gExtendedTimerRec.tmTask);
 }
+
+#endif /* SDL_TIMER_MACOS */
--- a/src/timer/mint/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/mint/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_MINT
+
 /*
  *	TOS/MiNT timer driver
  *	based on vbl vector
@@ -151,3 +153,5 @@
 {
 	return;
 }
+
+#endif /* SDL_TIMER_MINT */
--- a/src/timer/os2/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/os2/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_OS2
+
 #define INCL_DOSMISC
 #define INCL_DOSERRORS
 #define INCL_DOSSEMAPHORES
@@ -222,4 +224,4 @@
         return;
 }
 
-
+#endif /* SDL_TIMER_OS2 */
--- a/src/timer/riscos/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/riscos/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_RISCOS
+
 #include <stdio.h>
 #include <time.h>
 #include <sys/time.h>
@@ -227,3 +229,5 @@
 }
 
 #endif /* SDL_THREADS_DISABLED */
+
+#endif /* SDL_TIMER_RISCOS */
--- a/src/timer/unix/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/unix/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_UNIX
+
 #include <stdio.h>
 #include <sys/time.h>
 #include <signal.h>
@@ -234,3 +236,5 @@
 }
 
 #endif /* USE_ITIMER */
+
+#endif /* SDL_TIMER_UNIX */
--- a/src/timer/win32/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/win32/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_WIN32
+
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <mmsystem.h>
@@ -155,3 +157,4 @@
 	return;
 }
 
+#endif /* SDL_TIMER_WIN32 */
--- a/src/timer/wince/SDL_systimer.c	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/timer/wince/SDL_systimer.c	Fri Apr 14 04:46:47 2006 +0000
@@ -21,6 +21,8 @@
 */
 #include "SDL_config.h"
 
+#ifdef SDL_TIMER_WINCE
+
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>
 #include <mmsystem.h>
@@ -192,3 +194,5 @@
 {
 	return;
 }
+
+#endif /* SDL_TIMER_WINCE */
--- a/src/video/epoc/SDL_epocevents.cpp	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/video/epoc/SDL_epocevents.cpp	Fri Apr 14 04:46:47 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_epocevents.cpp
--- a/src/video/epoc/SDL_epocvideo.cpp	Fri Apr 14 03:56:31 2006 +0000
+++ b/src/video/epoc/SDL_epocvideo.cpp	Fri Apr 14 04:46:47 2006 +0000
@@ -19,6 +19,7 @@
     Sam Lantinga
     slouken@libsdl.org
 */
+#include "SDL_config.h"
 
 /*
     SDL_epocvideo.cpp
@@ -27,8 +28,6 @@
     Epoc version by Hannu Viitala (hannu.j.viitala@mbnet.fi)
 */
 
-
-
 extern "C" {
 #include "SDL_timer.h"
 #include "SDL_video.h"