[Scummvm-cvs-logs] SF.net SVN: scummvm:[54572] scummvm/trunk/backends

fingolfin at users.sourceforge.net fingolfin at users.sourceforge.net
Mon Nov 29 17:16:51 CET 2010


Revision: 54572
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54572&view=rev
Author:   fingolfin
Date:     2010-11-29 16:16:50 +0000 (Mon, 29 Nov 2010)

Log Message:
-----------
SDL: Move #include <SDL.h> into a special wrapper file

Modified Paths:
--------------
    scummvm/trunk/backends/audiocd/sdl/sdl-audiocd.h
    scummvm/trunk/backends/events/sdl/sdl-events.h
    scummvm/trunk/backends/graphics/openglsdl/openglsdl-graphics.h
    scummvm/trunk/backends/graphics/sdl/sdl-graphics.cpp
    scummvm/trunk/backends/graphics/sdl/sdl-graphics.h
    scummvm/trunk/backends/mixer/sdl/sdl-mixer.h
    scummvm/trunk/backends/mutex/sdl/sdl-mutex.cpp
    scummvm/trunk/backends/platform/dingux/dingux.h
    scummvm/trunk/backends/platform/gph/gph-main.cpp
    scummvm/trunk/backends/platform/openpandora/op-main.cpp
    scummvm/trunk/backends/platform/sdl/sdl.h
    scummvm/trunk/backends/platform/wince/CEDevice.cpp
    scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp
    scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp
    scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp
    scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp
    scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp
    scummvm/trunk/backends/plugins/sdl/sdl-provider.cpp
    scummvm/trunk/backends/timer/sdl/sdl-timer.h

Added Paths:
-----------
    scummvm/trunk/backends/platform/sdl/sdl-sys.h

Modified: scummvm/trunk/backends/audiocd/sdl/sdl-audiocd.h
===================================================================
--- scummvm/trunk/backends/audiocd/sdl/sdl-audiocd.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/audiocd/sdl/sdl-audiocd.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -28,11 +28,7 @@
 
 #include "backends/audiocd/default/default-audiocd.h"
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
+#include "backends/platform/sdl/sdl-sys.h"
 
 /**
  * The SDL audio cd manager. Implements real audio cd playback.

Modified: scummvm/trunk/backends/events/sdl/sdl-events.h
===================================================================
--- scummvm/trunk/backends/events/sdl/sdl-events.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/events/sdl/sdl-events.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -28,12 +28,9 @@
 
 #include "backends/events/default/default-events.h"
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
+#include "backends/platform/sdl/sdl-sys.h"
 
+
 /**
  * The SDL event source.
  */

Modified: scummvm/trunk/backends/graphics/openglsdl/openglsdl-graphics.h
===================================================================
--- scummvm/trunk/backends/graphics/openglsdl/openglsdl-graphics.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/graphics/openglsdl/openglsdl-graphics.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -26,7 +26,7 @@
 #ifndef BACKENDS_GRAPHICS_OPENGLSDL_H
 #define BACKENDS_GRAPHICS_OPENGLSDL_H
 
-#include <SDL.h>
+#include "backends/platform/sdl/sdl-sys.h"
 #if defined(ARRAYSIZE) && !defined(_WINDOWS_)
 #undef ARRAYSIZE
 #endif

Modified: scummvm/trunk/backends/graphics/sdl/sdl-graphics.cpp
===================================================================
--- scummvm/trunk/backends/graphics/sdl/sdl-graphics.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/graphics/sdl/sdl-graphics.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -25,9 +25,6 @@
 
 #if defined(SDL_BACKEND)
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "backends/graphics/sdl/sdl-graphics.h"
 #include "backends/events/sdl/sdl-events.h"
 #include "backends/platform/sdl/sdl.h"

Modified: scummvm/trunk/backends/graphics/sdl/sdl-graphics.h
===================================================================
--- scummvm/trunk/backends/graphics/sdl/sdl-graphics.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/graphics/sdl/sdl-graphics.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -33,12 +33,9 @@
 
 #include "backends/events/sdl/sdl-events.h"
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
+#include "backends/platform/sdl/sdl-sys.h"
 
+
 #if !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
 // Uncomment this to enable the 'on screen display' code.
 #define USE_OSD	1

Modified: scummvm/trunk/backends/mixer/sdl/sdl-mixer.h
===================================================================
--- scummvm/trunk/backends/mixer/sdl/sdl-mixer.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/mixer/sdl/sdl-mixer.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -26,12 +26,7 @@
 #ifndef BACKENDS_MIXER_SDL_H
 #define BACKENDS_MIXER_SDL_H
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
-
+#include "backends/platform/sdl/sdl-sys.h"
 #include "sound/mixer_intern.h"
 
 /**

Modified: scummvm/trunk/backends/mutex/sdl/sdl-mutex.cpp
===================================================================
--- scummvm/trunk/backends/mutex/sdl/sdl-mutex.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/mutex/sdl/sdl-mutex.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -25,16 +25,9 @@
 
 #if defined(SDL_BACKEND)
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_EXCEPTION_FILE
-
 #include "backends/mutex/sdl/sdl-mutex.h"
+#include "backends/platform/sdl/sdl-sys.h"
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
 
 OSystem::MutexRef SdlMutexManager::createMutex() {
 	return (OSystem::MutexRef) SDL_CreateMutex();

Modified: scummvm/trunk/backends/platform/dingux/dingux.h
===================================================================
--- scummvm/trunk/backends/platform/dingux/dingux.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/dingux/dingux.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -28,7 +28,6 @@
 
 #if defined(DINGUX)
 
-#include <SDL.h>
 #include "backends/base-backend.h"
 #include "backends/platform/sdl/sdl.h"
 #include "backends/platform/sdl/posix/posix.h"

Modified: scummvm/trunk/backends/platform/gph/gph-main.cpp
===================================================================
--- scummvm/trunk/backends/platform/gph/gph-main.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/gph/gph-main.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,12 +23,8 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "backends/platform/sdl/sdl-sys.h"
 
-#include "common/scummsys.h"
-#include <SDL/SDL.h>
-
 // #include "backends/platform/gph/gph-options.h"
 #include "backends/platform/gph/gph-sdl.h"
 #include "backends/platform/gph/gph-hw.h"

Modified: scummvm/trunk/backends/platform/openpandora/op-main.cpp
===================================================================
--- scummvm/trunk/backends/platform/openpandora/op-main.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/openpandora/op-main.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -26,8 +26,7 @@
 // Disable symbol overrides so that we can use system headers.
 #define FORBIDDEN_SYMBOL_ALLOW_ALL
 
-#include "common/scummsys.h"
-#include <SDL/SDL.h>
+#include "backends/platform/sdl/sdl-sys.h"
 
 #include "backends/platform/openpandora/op-sdl.h"
 #include "backends/plugins/posix/posix-provider.h"

Copied: scummvm/trunk/backends/platform/sdl/sdl-sys.h (from rev 54571, scummvm/trunk/backends/timer/sdl/sdl-timer.h)
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl-sys.h	                        (rev 0)
+++ scummvm/trunk/backends/platform/sdl/sdl-sys.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -0,0 +1,50 @@
+/* ScummVM - Graphic Adventure Engine
+ *
+ * ScummVM is the legal property of its developers, whose names
+ * are too numerous to list here. Please refer to the COPYRIGHT
+ * file distributed with this source distribution.
+ *
+ * This program is free software; you can redistribute it and/or
+ * modify it under the terms of the GNU General Public License
+ * as published by the Free Software Foundation; either version 2
+ * of the License, or (at your option) any later version.
+
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
+ * GNU General Public License for more details.
+
+ * You should have received a copy of the GNU General Public License
+ * along with this program; if not, write to the Free Software
+ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
+ *
+ * $URL: https://scummvm.svn.sourceforge.net/svnroot/scummvm/scummvm/branches/gsoc2010-opengl/backends/events/sdl/sdl-events.h $
+ * $Id: sdl-events.h 53434 2010-10-13 15:42:33Z lordhoto $
+ *
+ */
+
+#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
+
+#include "common/scummsys.h"
+
+// Remove FILE override from common/forbidden.h, and replace
+// it with an alternate slightly less unfriendly override.
+#undef FILE
+typedef struct { int FAKE; } FAKE_FILE;
+#define FILE FAKE_FILE
+
+#if defined(__SYMBIAN32__)
+#include <esdl\SDL.h>
+#else
+#include <SDL.h>
+#endif
+
+// Finally forbid FILE again
+#undef FILE 
+#define FILE	FORBIDDEN_SYMBOL_REPLACEMENT
+
+#endif

Modified: scummvm/trunk/backends/platform/sdl/sdl.h
===================================================================
--- scummvm/trunk/backends/platform/sdl/sdl.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/sdl/sdl.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -26,11 +26,7 @@
 #ifndef PLATFORM_SDL_H
 #define PLATFORM_SDL_H
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
+#include "backends/platform/sdl/sdl-sys.h"
 
 #include "backends/modular-backend.h"
 #include "backends/mixer/sdl/sdl-mixer.h"

Modified: scummvm/trunk/backends/platform/wince/CEDevice.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEDevice.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/wince/CEDevice.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,12 +23,9 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
 #include "CEDevice.h"
 
-#include <SDL.h>
+#include "backends/platform/sdl/sdl-sys.h"
 
 #include "backends/platform/wince/wince-sdl.h"
 

Modified: scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/wince/CEgui/GUIElement.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,11 +23,8 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "backends/platform/sdl/sdl-sys.h"
 
-#include <SDL.h>
-
 #include "Toolbar.h"
 
 #include "SDL_ImageResource.h"

Modified: scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/wince/CEgui/PanelKeyboard.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,11 +23,7 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include <SDL.h>
-
+#include "backends/platform/sdl/sdl-sys.h"
 #include "PanelKeyboard.h"
 
 namespace CEGUI {

Modified: scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/wince/CEgui/SDL_ImageResource.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,10 +23,7 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include "SDL.h"
+#include "backends/platform/sdl/sdl-sys.h"
 #include "SDL_ImageResource.h"
 
 namespace CEGUI {

Modified: scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/wince/CEgui/ToolbarHandler.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,11 +23,7 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
-
-#include <SDL.h>
-
+#include "backends/platform/sdl/sdl-sys.h"
 #include "ToolbarHandler.h"
 
 namespace CEGUI {

Modified: scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp
===================================================================
--- scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/platform/wince/CEkeys/EventsBuffer.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -23,11 +23,8 @@
  *
  */
 
-// Disable symbol overrides so that we can use system headers.
-#define FORBIDDEN_SYMBOL_ALLOW_ALL
+#include "backends/platform/sdl/sdl-sys.h"
 
-#include <SDL.h>
-
 #include "EventsBuffer.h"
 
 namespace CEKEYS {

Modified: scummvm/trunk/backends/plugins/sdl/sdl-provider.cpp
===================================================================
--- scummvm/trunk/backends/plugins/sdl/sdl-provider.cpp	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/plugins/sdl/sdl-provider.cpp	2010-11-29 16:16:50 UTC (rev 54572)
@@ -32,10 +32,8 @@
 #include "backends/plugins/dynamic-plugin.h"
 #include "common/fs.h"
 
-#include "SDL.h"
-#include "SDL_loadso.h"
+#include "backends/platform/sdl/sdl-sys.h"
 
-
 class SDLPlugin : public DynamicPlugin {
 protected:
 	void *_dlHandle;

Modified: scummvm/trunk/backends/timer/sdl/sdl-timer.h
===================================================================
--- scummvm/trunk/backends/timer/sdl/sdl-timer.h	2010-11-29 14:03:36 UTC (rev 54571)
+++ scummvm/trunk/backends/timer/sdl/sdl-timer.h	2010-11-29 16:16:50 UTC (rev 54572)
@@ -28,11 +28,7 @@
 
 #include "backends/timer/default/default-timer.h"
 
-#if defined(__SYMBIAN32__)
-#include <esdl\SDL.h>
-#else
-#include <SDL.h>
-#endif
+#include "backends/platform/sdl/sdl-sys.h"
 
 /**
  * SDL timer manager. Setups the timer callback for


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list