aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJohannes Schickel2013-07-04 01:23:06 +0200
committerJohannes Schickel2013-07-04 01:25:46 +0200
commit86c656a75ba7a6766d1886fb723f8727de4e68a7 (patch)
tree9e52f56c818407823378892d6f10dfa8dc477083
parent83f705583681c6157e8ba33d9dd542f434dcb94b (diff)
downloadscummvm-rg350-86c656a75ba7a6766d1886fb723f8727de4e68a7.tar.gz
scummvm-rg350-86c656a75ba7a6766d1886fb723f8727de4e68a7.tar.bz2
scummvm-rg350-86c656a75ba7a6766d1886fb723f8727de4e68a7.zip
SDL: Fix compilation on Solaris 10.
This replaces a dummy FILE definition before including the SDL headers with simply using the toolchain's definition on Solaris. This is pretty harmless because we only allow FILE to be used in the SDL headers by this. Fixes bug #3614514 "#define FILE FAKE_FILE doesn't work on Solaris (w/ patch)". Thanks to lblume for his patch!
-rw-r--r--backends/platform/sdl/sdl-sys.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/backends/platform/sdl/sdl-sys.h b/backends/platform/sdl/sdl-sys.h
index ca3c586e03..eccf73815d 100644
--- a/backends/platform/sdl/sdl-sys.h
+++ b/backends/platform/sdl/sdl-sys.h
@@ -35,8 +35,11 @@
// it with an alternate slightly less unfriendly override.
#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_FILE)
#undef FILE
+// Solaris has typedef __FILE FILE in several places already
+#if !defined(__sun)
typedef struct { int FAKE; } FAKE_FILE;
#define FILE FAKE_FILE
+#endif // (__sun)
#endif
#if !defined(FORBIDDEN_SYMBOL_ALLOW_ALL) && !defined(FORBIDDEN_SYMBOL_EXCEPTION_strcasecmp)