Skip to content

Commit

Permalink
Make sure code is only compiled if the appropriate subsystem is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
slouken committed Apr 14, 2006
1 parent d393a67 commit 0be06ec
Show file tree
Hide file tree
Showing 54 changed files with 173 additions and 6 deletions.
2 changes: 2 additions & 0 deletions include/SDL_config.h.in
Expand Up @@ -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
Expand All @@ -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
Expand Down
3 changes: 3 additions & 0 deletions src/cdrom/aix/SDL_syscdrom.c
Expand Up @@ -23,6 +23,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_AIX

/* Functions for system-level CD-ROM audio control */

/*#define DEBUG_CDROM 1*/
Expand Down Expand Up @@ -655,3 +657,4 @@ void SDL_SYS_CDQuit(void)
}
}

#endif /* SDL_CDROM_AIX */
3 changes: 3 additions & 0 deletions src/cdrom/beos/SDL_syscdrom.cc
Expand Up @@ -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)
*/
Expand Down Expand Up @@ -407,3 +409,4 @@ void SDL_SYS_CDQuit(void)
}
}

#endif /* SDL_CDROM_BEOS */
4 changes: 4 additions & 0 deletions src/cdrom/bsdi/SDL_syscdrom.c
Expand Up @@ -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
Expand Down Expand Up @@ -536,3 +538,5 @@ void SDL_SYS_CDQuit(void)
}
SDL_numcds = 0;
}

#endif /* SDL_CDROM_BSDI */
4 changes: 4 additions & 0 deletions src/cdrom/dc/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_DC

/* Functions for system-level CD-ROM audio control */

#include <dc/cdrom.h>
Expand Down Expand Up @@ -161,3 +163,5 @@ void SDL_SYS_CDQuit(void)
{

}

#endif /* SDL_CDROM_DC */
3 changes: 3 additions & 0 deletions src/cdrom/dummy/SDL_syscdrom.c
Expand Up @@ -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"
Expand All @@ -36,3 +38,4 @@ void SDL_SYS_CDQuit(void)
return;
}

#endif /* SDL_CDROM_DUMMY || SDL_CDROM_DISABLED */
3 changes: 3 additions & 0 deletions src/cdrom/freebsd/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_FREEBSD

/* Functions for system-level CD-ROM audio control */

#include <sys/types.h>
Expand Down Expand Up @@ -401,3 +403,4 @@ void SDL_SYS_CDQuit(void)
}
}

#endif /* SDL_CDROM_FREEBSD */
3 changes: 3 additions & 0 deletions src/cdrom/linux/SDL_syscdrom.c
Expand Up @@ -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() */
Expand Down Expand Up @@ -559,3 +561,4 @@ void SDL_SYS_CDQuit(void)
}
}

#endif /* SDL_CDROM_LINUX */
3 changes: 3 additions & 0 deletions src/cdrom/macos/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_MACOS

/* MacOS functions for system-level CD-ROM audio control */

#include <Devices.h>
Expand Down Expand Up @@ -520,3 +522,4 @@ void SDL_SYS_CDQuit(void)
SDL_memset(SDL_cdlist + SDL_numcds, 0, sizeof(SDL_cdlist[0]));
}

#endif /* SDL_CDROM_MACOS */
3 changes: 3 additions & 0 deletions src/cdrom/macosx/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_MACOSX

#include "SDL_syscdrom_c.h"

#pragma mark -- Globals --
Expand Down Expand Up @@ -502,3 +504,4 @@ static void SDL_SYS_CDClose(SDL_CD *cdrom)
return;
}

#endif /* SDL_CDROM_MACOSX */
4 changes: 4 additions & 0 deletions src/cdrom/mint/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_MINT

/*
Atari MetaDOS CD-ROM functions
Expand Down Expand Up @@ -311,3 +313,5 @@ static int SDL_SYS_CDEject(SDL_CD *cdrom)
{
return SDL_SYS_CDioctl(cdrom->id, CDROMEJECT, 0);
}

#endif /* SDL_CDROM_MINT */
3 changes: 3 additions & 0 deletions src/cdrom/openbsd/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_OPENBSD

/* Functions for system-level CD-ROM audio control */

#include <sys/types.h>
Expand Down Expand Up @@ -410,3 +412,4 @@ void SDL_SYS_CDQuit(void)
}
}

#endif /* SDL_CDROM_OPENBSD */
3 changes: 3 additions & 0 deletions src/cdrom/os2/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_OS2

/* Functions for system-level CD-ROM audio control */

#define INCL_MCIOS2
Expand Down Expand Up @@ -388,3 +390,4 @@ if ( SDL_numcds > 0 )
}
}

#endif /* SDL_CDROM_OS2 */
4 changes: 3 additions & 1 deletion src/cdrom/osf/SDL_syscdrom.c
Expand Up @@ -20,6 +20,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_OSF

/* Functions for system-level CD-ROM audio control */

/* #define DEBUG_CDROM 1 */
Expand Down Expand Up @@ -439,4 +441,4 @@ void SDL_SYS_CDQuit(void)
}
}


#endif /* SDL_CDROM_OSF */
4 changes: 4 additions & 0 deletions src/cdrom/qnx/SDL_syscdrom.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_CDROM_QNX

/* Functions for system-level CD-ROM audio control */

#include <sys/types.h>
Expand Down Expand Up @@ -545,3 +547,5 @@ void SDL_SYS_CDQuit(void)
SDL_numcds = 0;
}
}

#endif /* SDL_CDROM_QNX */
4 changes: 4 additions & 0 deletions src/cdrom/win32/SDL_syscdrom.c
Expand Up @@ -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
Expand Down Expand Up @@ -379,3 +381,5 @@ void SDL_SYS_CDQuit(void)
SDL_numcds = 0;
}
}

#endif /* SDL_CDROM_WIN32 */
4 changes: 3 additions & 1 deletion src/joystick/amigaos/SDL_sysjoystick.c
Expand Up @@ -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>
Expand Down Expand Up @@ -225,7 +227,7 @@ void SDL_SYS_JoystickQuit(void)
LowLevelBase=NULL;
SDL_numjoysticks=0;
}

return;
}

#endif /* SDL_JOYSTICK_AMIGA */
4 changes: 4 additions & 0 deletions src/joystick/beos/SDL_bejoystick.cc
Expand Up @@ -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>
Expand Down Expand Up @@ -231,3 +233,5 @@ void SDL_SYS_JoystickQuit(void)
}

}; // extern "C"

#endif /* SDL_JOYSTICK_BEOS */
3 changes: 3 additions & 0 deletions src/joystick/bsd/SDL_sysjoystick.c
Expand Up @@ -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.
Expand Down Expand Up @@ -575,3 +577,4 @@ report_free(struct report *r)
r->status = SREPORT_UNINIT;
}

#endif /* SDL_JOYSTICK_USBHID */
4 changes: 4 additions & 0 deletions src/joystick/darwin/SDL_sysjoystick.c
Expand Up @@ -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 */

Expand Down Expand Up @@ -836,3 +838,5 @@ void SDL_SYS_JoystickQuit(void)
while (NULL != gpDeviceList)
gpDeviceList = HIDDisposeDevice (&gpDeviceList);
}

#endif /* SDL_JOYSTICK_IOKIT */
4 changes: 4 additions & 0 deletions src/joystick/dc/SDL_sysjoystick.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_JOYSTICK_DC

#include "SDL_events.h"
#include "SDL_joystick.h"
#include "../SDL_sysjoystick.h"
Expand Down Expand Up @@ -187,3 +189,5 @@ void SDL_SYS_JoystickQuit(void)
{
return;
}

#endif /* SDL_JOYSTICK_DC */
3 changes: 3 additions & 0 deletions src/joystick/dummy/SDL_sysjoystick.c
Expand Up @@ -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"
Expand Down Expand Up @@ -78,3 +80,4 @@ void SDL_SYS_JoystickQuit(void)
return;
}

#endif /* SDL_JOYSTICK_DUMMY || SDL_JOYSTICK_DISABLED */
3 changes: 3 additions & 0 deletions src/joystick/linux/SDL_sysjoystick.c
Expand Up @@ -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>
Expand Down Expand Up @@ -1195,3 +1197,4 @@ void SDL_SYS_JoystickQuit(void)
SDL_joylist[0].fname = NULL;
}

#endif /* SDL_JOYSTICK_LINUX */
3 changes: 3 additions & 0 deletions src/joystick/macos/SDL_sysjoystick.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_JOYSTICK_MACOS

/* SDL stuff -- "SDL_sysjoystick.c"
MacOS joystick functions by Frederick Reitberger
Expand Down Expand Up @@ -315,3 +317,4 @@ void SDL_SYS_JoystickQuit(void)
ISpShutdown();
}

#endif /* SDL_JOYSTICK_MACOS */
4 changes: 4 additions & 0 deletions src/joystick/mint/SDL_sysjoystick.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_JOYSTICK_MINT

/*
* Atari Joystick/Joypad drivers
*
Expand Down Expand Up @@ -627,3 +629,5 @@ static void UpdateJoypads(void)
JOYPAD_IO.directions=0xff7f;
jp_joypads[1] |= (((~(JOYPAD_IO.directions))>>12) & 15)<<12;
}

#endif /* SDL_JOYSTICK_MINT */
4 changes: 3 additions & 1 deletion src/joystick/os2/SDL_sysjoystick.c
Expand Up @@ -21,6 +21,8 @@
*/
#include "SDL_config.h"

#ifdef SDL_JOYSTICK_OS2

/* OS/2 Joystick driver, contributed by Daniel Caetano */

#include <mem.h>
Expand Down Expand Up @@ -663,4 +665,4 @@ if (*joyenv==stopchar)
return chcnt;
}


#endif /* SDL_JOYSTICK_OS2 */
3 changes: 3 additions & 0 deletions src/joystick/riscos/SDL_sysjoystick.c
Expand Up @@ -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
Expand Down Expand Up @@ -171,3 +173,4 @@ void SDL_SYS_JoystickQuit(void)
return;
}

#endif /* SDL_JOYSTICK_RISCOS */

0 comments on commit 0be06ec

Please sign in to comment.