diff options
author | Max Horn | 2010-11-29 16:35:29 +0000 |
---|---|---|
committer | Max Horn | 2010-11-29 16:35:29 +0000 |
commit | 4bed2b3ff588452ed754d0758bf9b1b0df0e8c92 (patch) | |
tree | 2e60b680b6f3d696a281b534606e425a3faf16e8 /backends | |
parent | f0fdff21f641097ea0bd18493580b42ed12dac6a (diff) | |
download | scummvm-rg350-4bed2b3ff588452ed754d0758bf9b1b0df0e8c92.tar.gz scummvm-rg350-4bed2b3ff588452ed754d0758bf9b1b0df0e8c92.tar.bz2 scummvm-rg350-4bed2b3ff588452ed754d0758bf9b1b0df0e8c92.zip |
SDL: Trying to cleanup the FORBIDDEN_SYMBOL situation
svn-id: r54575
Diffstat (limited to 'backends')
-rw-r--r-- | backends/audiocd/sdl/sdl-audiocd.cpp | 3 | ||||
-rw-r--r-- | backends/events/dinguxsdl/dinguxsdl-events.cpp | 3 | ||||
-rw-r--r-- | backends/events/gp2xsdl/gp2xsdl-events.cpp | 3 | ||||
-rw-r--r-- | backends/events/linuxmotosdl/linuxmotosdl-events.cpp | 3 | ||||
-rw-r--r-- | backends/events/sdl/sdl-events.cpp | 3 | ||||
-rw-r--r-- | backends/fs/windows/windows-fs-factory.cpp | 4 | ||||
-rw-r--r-- | backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp | 3 | ||||
-rw-r--r-- | backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp | 3 | ||||
-rw-r--r-- | backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h | 3 | ||||
-rw-r--r-- | backends/midi/windows.cpp | 6 | ||||
-rw-r--r-- | backends/platform/ps2/systemps2.cpp | 3 | ||||
-rw-r--r-- | backends/platform/sdl/sdl-sys.h | 13 | ||||
-rw-r--r-- | backends/platform/sdl/sdl.cpp | 3 | ||||
-rw-r--r-- | backends/platform/sdl/win32/win32.cpp | 6 | ||||
-rw-r--r-- | backends/timer/sdl/sdl-timer.cpp | 3 |
15 files changed, 18 insertions, 44 deletions
diff --git a/backends/audiocd/sdl/sdl-audiocd.cpp b/backends/audiocd/sdl/sdl-audiocd.cpp index 362ed0fc47..4136c34403 100644 --- a/backends/audiocd/sdl/sdl-audiocd.cpp +++ b/backends/audiocd/sdl/sdl-audiocd.cpp @@ -27,9 +27,6 @@ #if defined(SDL_BACKEND) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_ALLOW_ALL - #include "backends/audiocd/sdl/sdl-audiocd.h" SdlAudioCDManager::SdlAudioCDManager() diff --git a/backends/events/dinguxsdl/dinguxsdl-events.cpp b/backends/events/dinguxsdl/dinguxsdl-events.cpp index 427b14fdae..7a7443299c 100644 --- a/backends/events/dinguxsdl/dinguxsdl-events.cpp +++ b/backends/events/dinguxsdl/dinguxsdl-events.cpp @@ -27,9 +27,6 @@ #if defined(DINGUX) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/events/dinguxsdl/dinguxsdl-events.h" #define PAD_UP SDLK_UP diff --git a/backends/events/gp2xsdl/gp2xsdl-events.cpp b/backends/events/gp2xsdl/gp2xsdl-events.cpp index b3818940c6..184f1d9b64 100644 --- a/backends/events/gp2xsdl/gp2xsdl-events.cpp +++ b/backends/events/gp2xsdl/gp2xsdl-events.cpp @@ -27,9 +27,6 @@ #if defined(GP2X) || defined(GP2XWIZ) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/events/gp2xsdl/gp2xsdl-events.h" #if defined(GP2X) #include "backends/platform/gp2x/gp2x-hw.h" diff --git a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp index aa9214d89f..751e4f06ed 100644 --- a/backends/events/linuxmotosdl/linuxmotosdl-events.cpp +++ b/backends/events/linuxmotosdl/linuxmotosdl-events.cpp @@ -27,9 +27,6 @@ #if defined(LINUXMOTO) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/events/linuxmotosdl/linuxmotosdl-events.h" #include "backends/platform/linuxmoto/linuxmoto-sdl.h" diff --git a/backends/events/sdl/sdl-events.cpp b/backends/events/sdl/sdl-events.cpp index 83d726c92d..94be1d2185 100644 --- a/backends/events/sdl/sdl-events.cpp +++ b/backends/events/sdl/sdl-events.cpp @@ -27,9 +27,6 @@ #if defined(SDL_BACKEND) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/events/sdl/sdl-events.h" #include "backends/platform/sdl/sdl.h" #include "common/config-manager.h" diff --git a/backends/fs/windows/windows-fs-factory.cpp b/backends/fs/windows/windows-fs-factory.cpp index f7b9c837f2..ae9485a121 100644 --- a/backends/fs/windows/windows-fs-factory.cpp +++ b/backends/fs/windows/windows-fs-factory.cpp @@ -22,11 +22,11 @@ * $Id$ */ -#if defined(WIN32) - // Disable symbol overrides so that we can use system headers. #define FORBIDDEN_SYMBOL_ALLOW_ALL +#if defined(WIN32) + #include "backends/fs/windows/windows-fs-factory.h" #include "backends/fs/windows/windows-fs.cpp" diff --git a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp index fb164638b9..3c043ca986 100644 --- a/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp +++ b/backends/graphics/dinguxsdl/dinguxsdl-graphics.cpp @@ -27,9 +27,6 @@ #if defined(DINGUX) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/graphics/dinguxsdl/dinguxsdl-graphics.h" #include "backends/events/dinguxsdl/dinguxsdl-events.h" #include "graphics/scaler/aspect.h" diff --git a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp index e785935e4d..75a1f17674 100644 --- a/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp +++ b/backends/graphics/gp2xsdl/gp2xsdl-graphics.cpp @@ -27,9 +27,6 @@ #ifdef GP2X -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/graphics/gp2xsdl/gp2xsdl-graphics.h" #include "graphics/scaler/aspect.h" #include <SDL_gp2x.h> diff --git a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h index 2a928ed7e1..8124aca778 100644 --- a/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h +++ b/backends/graphics/linuxmotosdl/linuxmotosdl-graphics.h @@ -26,9 +26,6 @@ #ifndef BACKENDS_GRAPHICS_SDL_LINUXMOTO_H #define BACKENDS_GRAPHICS_SDL_LINUXMOTO_H -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/graphics/sdl/sdl-graphics.h" class LinuxmotoSdlGraphicsManager : public SdlGraphicsManager { diff --git a/backends/midi/windows.cpp b/backends/midi/windows.cpp index 40d9bd8ebd..a50fb4259f 100644 --- a/backends/midi/windows.cpp +++ b/backends/midi/windows.cpp @@ -22,13 +22,13 @@ * $Id$ */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/scummsys.h" #if defined(WIN32) && !defined(_WIN32_WCE) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_ALLOW_ALL - #define WIN32_LEAN_AND_MEAN #include <windows.h> // winnt.h defines ARRAYSIZE, but we want our own one... diff --git a/backends/platform/ps2/systemps2.cpp b/backends/platform/ps2/systemps2.cpp index 1b3ae6ba47..da5d55b3fc 100644 --- a/backends/platform/ps2/systemps2.cpp +++ b/backends/platform/ps2/systemps2.cpp @@ -26,9 +26,6 @@ // Disable symbol overrides so that we can use system headers. #define FORBIDDEN_SYMBOL_ALLOW_ALL -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_ALLOW_ALL - #include <kernel.h> #include <stdio.h> #include <stdlib.h> diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h index 57310807a8..23a25f0a82 100644 --- a/backends/platform/sdl/sdl-sys.h +++ b/backends/platform/sdl/sdl-sys.h @@ -26,16 +26,21 @@ #ifndef BACKEND_SDL_SYS_H #define BACKEND_SDL_SYS_H -// Include the SDL headers, working around the fact that SDL_rwops.h -// uses a FILE pointer in one place, which conflicts with common/forbidden.h +// The purpose of this header is to include the SDL headers in a uniform +// fashion, even on the Symbian port. +// Moreover, it contains a workaround for the fact that SDL_rwops.h uses +// a FILE pointer in one place, which conflicts with common/forbidden.h. + #include "common/scummsys.h" // Remove FILE override from common/forbidden.h, and replace // it with an alternate slightly less unfriendly override. +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE) #undef FILE typedef struct { int FAKE; } FAKE_FILE; #define FILE FAKE_FILE +#endif #if defined(__SYMBIAN32__) #include <esdl\SDL.h> @@ -43,8 +48,10 @@ typedef struct { int FAKE; } FAKE_FILE; #include <SDL.h> #endif -// Finally forbid FILE again +// Finally forbid FILE again (if it was forbidden to start with) +#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE) #undef FILE #define FILE FORBIDDEN_SYMBOL_REPLACEMENT +#endif #endif diff --git a/backends/platform/sdl/sdl.cpp b/backends/platform/sdl/sdl.cpp index 8d9694b4f7..82ff537c51 100644 --- a/backends/platform/sdl/sdl.cpp +++ b/backends/platform/sdl/sdl.cpp @@ -23,9 +23,6 @@ * */ -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #ifdef WIN32 #define WIN32_LEAN_AND_MEAN #include <windows.h> diff --git a/backends/platform/sdl/win32/win32.cpp b/backends/platform/sdl/win32/win32.cpp index 9723d1f68e..01471e9cb2 100644 --- a/backends/platform/sdl/win32/win32.cpp +++ b/backends/platform/sdl/win32/win32.cpp @@ -23,6 +23,9 @@ * */ +// Disable symbol overrides so that we can use system headers. +#define FORBIDDEN_SYMBOL_ALLOW_ALL + #include "common/scummsys.h" #ifdef WIN32 @@ -31,9 +34,6 @@ #include <windows.h> #undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one... -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_ALLOW_ALL - #include "backends/platform/sdl/win32/win32.h" #include "backends/fs/windows/windows-fs-factory.h" diff --git a/backends/timer/sdl/sdl-timer.cpp b/backends/timer/sdl/sdl-timer.cpp index e810d3e646..0a4cd428de 100644 --- a/backends/timer/sdl/sdl-timer.cpp +++ b/backends/timer/sdl/sdl-timer.cpp @@ -28,9 +28,6 @@ #if defined(SDL_BACKEND) -// Disable symbol overrides so that we can use system headers. -#define FORBIDDEN_SYMBOL_EXCEPTION_FILE - #include "backends/timer/sdl/sdl-timer.h" static Uint32 timer_handler(Uint32 interval, void *param) { |