SDL: Trying to cleanup the FORBIDDEN_SYMBOL situation

svn-id: r54575
This commit is contained in:
Max Horn 2010-11-29 16:35:29 +00:00
parent f0fdff21f6
commit 4bed2b3ff5
15 changed files with 18 additions and 44 deletions

View file

@ -27,9 +27,6 @@
#if defined(SDL_BACKEND) #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" #include "backends/audiocd/sdl/sdl-audiocd.h"
SdlAudioCDManager::SdlAudioCDManager() SdlAudioCDManager::SdlAudioCDManager()

View file

@ -27,9 +27,6 @@
#if defined(DINGUX) #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" #include "backends/events/dinguxsdl/dinguxsdl-events.h"
#define PAD_UP SDLK_UP #define PAD_UP SDLK_UP

View file

@ -27,9 +27,6 @@
#if defined(GP2X) || defined(GP2XWIZ) #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" #include "backends/events/gp2xsdl/gp2xsdl-events.h"
#if defined(GP2X) #if defined(GP2X)
#include "backends/platform/gp2x/gp2x-hw.h" #include "backends/platform/gp2x/gp2x-hw.h"

View file

@ -27,9 +27,6 @@
#if defined(LINUXMOTO) #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/events/linuxmotosdl/linuxmotosdl-events.h"
#include "backends/platform/linuxmoto/linuxmoto-sdl.h" #include "backends/platform/linuxmoto/linuxmoto-sdl.h"

View file

@ -27,9 +27,6 @@
#if defined(SDL_BACKEND) #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/events/sdl/sdl-events.h"
#include "backends/platform/sdl/sdl.h" #include "backends/platform/sdl/sdl.h"
#include "common/config-manager.h" #include "common/config-manager.h"

View file

@ -22,11 +22,11 @@
* $Id$ * $Id$
*/ */
#if defined(WIN32)
// Disable symbol overrides so that we can use system headers. // Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL #define FORBIDDEN_SYMBOL_ALLOW_ALL
#if defined(WIN32)
#include "backends/fs/windows/windows-fs-factory.h" #include "backends/fs/windows/windows-fs-factory.h"
#include "backends/fs/windows/windows-fs.cpp" #include "backends/fs/windows/windows-fs.cpp"

View file

@ -27,9 +27,6 @@
#if defined(DINGUX) #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/graphics/dinguxsdl/dinguxsdl-graphics.h"
#include "backends/events/dinguxsdl/dinguxsdl-events.h" #include "backends/events/dinguxsdl/dinguxsdl-events.h"
#include "graphics/scaler/aspect.h" #include "graphics/scaler/aspect.h"

View file

@ -27,9 +27,6 @@
#ifdef GP2X #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 "backends/graphics/gp2xsdl/gp2xsdl-graphics.h"
#include "graphics/scaler/aspect.h" #include "graphics/scaler/aspect.h"
#include <SDL_gp2x.h> #include <SDL_gp2x.h>

View file

@ -26,9 +26,6 @@
#ifndef BACKENDS_GRAPHICS_SDL_LINUXMOTO_H #ifndef BACKENDS_GRAPHICS_SDL_LINUXMOTO_H
#define 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" #include "backends/graphics/sdl/sdl-graphics.h"
class LinuxmotoSdlGraphicsManager : public SdlGraphicsManager { class LinuxmotoSdlGraphicsManager : public SdlGraphicsManager {

View file

@ -22,13 +22,13 @@
* $Id$ * $Id$
*/ */
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h" #include "common/scummsys.h"
#if defined(WIN32) && !defined(_WIN32_WCE) #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 #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>
// winnt.h defines ARRAYSIZE, but we want our own one... // winnt.h defines ARRAYSIZE, but we want our own one...

View file

@ -26,9 +26,6 @@
// Disable symbol overrides so that we can use system headers. // Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL #define FORBIDDEN_SYMBOL_ALLOW_ALL
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include <kernel.h> #include <kernel.h>
#include <stdio.h> #include <stdio.h>
#include <stdlib.h> #include <stdlib.h>

View file

@ -26,16 +26,21 @@
#ifndef BACKEND_SDL_SYS_H #ifndef BACKEND_SDL_SYS_H
#define BACKEND_SDL_SYS_H #define BACKEND_SDL_SYS_H
// Include the SDL headers, working around the fact that SDL_rwops.h // The purpose of this header is to include the SDL headers in a uniform
// uses a FILE pointer in one place, which conflicts with common/forbidden.h // 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" #include "common/scummsys.h"
// Remove FILE override from common/forbidden.h, and replace // Remove FILE override from common/forbidden.h, and replace
// it with an alternate slightly less unfriendly override. // it with an alternate slightly less unfriendly override.
#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE)
#undef FILE #undef FILE
typedef struct { int FAKE; } FAKE_FILE; typedef struct { int FAKE; } FAKE_FILE;
#define FILE FAKE_FILE #define FILE FAKE_FILE
#endif
#if defined(__SYMBIAN32__) #if defined(__SYMBIAN32__)
#include <esdl\SDL.h> #include <esdl\SDL.h>
@ -43,8 +48,10 @@ typedef struct { int FAKE; } FAKE_FILE;
#include <SDL.h> #include <SDL.h>
#endif #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 #undef FILE
#define FILE FORBIDDEN_SYMBOL_REPLACEMENT #define FILE FORBIDDEN_SYMBOL_REPLACEMENT
#endif
#endif #endif

View file

@ -23,9 +23,6 @@
* *
*/ */
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
#ifdef WIN32 #ifdef WIN32
#define WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN
#include <windows.h> #include <windows.h>

View file

@ -23,6 +23,9 @@
* *
*/ */
// Disable symbol overrides so that we can use system headers.
#define FORBIDDEN_SYMBOL_ALLOW_ALL
#include "common/scummsys.h" #include "common/scummsys.h"
#ifdef WIN32 #ifdef WIN32
@ -31,9 +34,6 @@
#include <windows.h> #include <windows.h>
#undef ARRAYSIZE // winnt.h defines ARRAYSIZE, but we want our own one... #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/platform/sdl/win32/win32.h"
#include "backends/fs/windows/windows-fs-factory.h" #include "backends/fs/windows/windows-fs-factory.h"

View file

@ -28,9 +28,6 @@
#if defined(SDL_BACKEND) #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" #include "backends/timer/sdl/sdl-timer.h"
static Uint32 timer_handler(Uint32 interval, void *param) { static Uint32 timer_handler(Uint32 interval, void *param) {