Make sure code is only compiled if the appropriate subsystem is enabled

This commit is contained in:
Sam Lantinga
2006-04-14 04:46:47 +00:00
parent 3ca6badbcf
commit 4ffa1daabc
54 changed files with 173 additions and 6 deletions

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_AIX */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_BEOS */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
SDL_numcds = 0;
}
#endif /* SDL_CDROM_BSDI */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
{
}
#endif /* SDL_CDROM_DC */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
return;
}
#endif /* SDL_CDROM_DUMMY || SDL_CDROM_DISABLED */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_FREEBSD */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_LINUX */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
SDL_memset(SDL_cdlist + SDL_numcds, 0, sizeof(SDL_cdlist[0]));
}
#endif /* SDL_CDROM_MACOS */

View File

@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_MACOSX
#include "SDL_syscdrom_c.h"
#pragma mark -- Globals --
@@ -502,3 +504,4 @@ static void SDL_SYS_CDClose(SDL_CD *cdrom)
return;
}
#endif /* SDL_CDROM_MACOSX */

View File

@@ -21,6 +21,8 @@
*/
#include "SDL_config.h"
#ifdef SDL_CDROM_MINT
/*
Atari MetaDOS CD-ROM functions
@@ -311,3 +313,5 @@ static int SDL_SYS_CDEject(SDL_CD *cdrom)
{
return SDL_SYS_CDioctl(cdrom->id, CDROMEJECT, 0);
}
#endif /* SDL_CDROM_MINT */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_OPENBSD */

View File

@@ -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 @@ if ( SDL_numcds > 0 )
}
}
#endif /* SDL_CDROM_OS2 */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
}
}
#endif /* SDL_CDROM_OSF */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
SDL_numcds = 0;
}
}
#endif /* SDL_CDROM_QNX */

View File

@@ -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 @@ void SDL_SYS_CDQuit(void)
SDL_numcds = 0;
}
}
#endif /* SDL_CDROM_WIN32 */