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/platform/sdl | |
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/platform/sdl')
-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 |
3 files changed, 13 insertions, 9 deletions
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" |