[Scummvm-cvs-logs] scummvm master -> 2fa63ca01586c4e5fda8eb12dca444d47a2375f1

fingolfin max at quendi.de
Tue May 3 14:31:51 CEST 2011


This automated email contains information about 4 new commits which have been
pushed to the 'scummvm' repo located at https://github.com/scummvm/scummvm .

Summary:
ff6533e1b3 PSP: Fix more forbidden symbol clashes
1a570c14e3 DINGUX: Remove unused (?) include
a50c36d138 ANDROID: Fix various forbidden symbol clashes
2fa63ca015 COMMON: Forbid use of getcwd&getwd; add macro to enable unistd.h compatibility


Commit: ff6533e1b3d9d65397ccc1876a0849075aad2430
    https://github.com/scummvm/scummvm/commit/ff6533e1b3d9d65397ccc1876a0849075aad2430
Author: Max Horn (max at quendi.de)
Date: 2011-05-03T05:14:21-07:00

Commit Message:
PSP: Fix more forbidden symbol clashes

Changed paths:
    backends/fs/psp/psp-fs-factory.cpp
    backends/fs/psp/psp-fs.cpp
    backends/saves/psp/psp-saves.cpp
    backends/timer/psp/timer.cpp



diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp
index 7fd8d8b..6b0364b 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -24,8 +24,29 @@
 
 #if defined(__PSP__)
 
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+//   __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+//   __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
+// Avoid clashes with unistd.h
+#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
+
 #include "backends/fs/psp/psp-fs-factory.h"
 #include "backends/fs/psp/psp-fs.h"
+#include "backends/platform/psp/powerman.h"
+
+#include <unistd.h>
 
 DECLARE_SINGLETON(PSPFilesystemFactory);
 
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index e7fa265..b36b7a0 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -24,6 +24,28 @@
 
 #if defined(__PSP__)
 
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+//   __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+//   __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+
+// Avoid clashes with unistd.h
+#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
+
 #include "backends/fs/psp/psp-fs.h"
 #include "backends/fs/psp/psp-stream.h"
 #include "common/bufferedstream.h"
diff --git a/backends/saves/psp/psp-saves.cpp b/backends/saves/psp/psp-saves.cpp
index 66c63df..5752d2f 100644
--- a/backends/saves/psp/psp-saves.cpp
+++ b/backends/saves/psp/psp-saves.cpp
@@ -23,6 +23,20 @@
  *
  */
 
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+//   __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+//   __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include "common/scummsys.h"
 
 #ifdef __PSP__
diff --git a/backends/timer/psp/timer.cpp b/backends/timer/psp/timer.cpp
index 746ff97..9e36b43 100644
--- a/backends/timer/psp/timer.cpp
+++ b/backends/timer/psp/timer.cpp
@@ -23,6 +23,20 @@
  *
  */
 
+// Disable printf override in common/forbidden.h to avoid
+// clashes with pspdebug.h from the PSP SDK.
+// That header file uses
+//   __attribute__((format(printf,1,2)));
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the PSP SDK to use the equally
+// legal and valid
+//   __attribute__((format(__printf__,1,2)));
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the PSP port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include "common/scummsys.h"
 
 #if defined (__PSP__)


Commit: 1a570c14e37fd9d48eb9b3f9f9611eb1a7541f9c
    https://github.com/scummvm/scummvm/commit/1a570c14e37fd9d48eb9b3f9f9611eb1a7541f9c
Author: Max Horn (max at quendi.de)
Date: 2011-05-03T05:28:15-07:00

Commit Message:
DINGUX: Remove unused (?) include

Changed paths:
    backends/platform/dingux/main.cpp



diff --git a/backends/platform/dingux/main.cpp b/backends/platform/dingux/main.cpp
index c5dccc5..cf25e1c 100644
--- a/backends/platform/dingux/main.cpp
+++ b/backends/platform/dingux/main.cpp
@@ -30,8 +30,6 @@
 
 #if defined(DINGUX)
 
-#include <unistd.h>
-
 int main(int argc, char* argv[]) {
 
 	g_system = new OSystem_SDL_Dingux();


Commit: a50c36d1381be2e7d0748a2c734e41357fd4920f
    https://github.com/scummvm/scummvm/commit/a50c36d1381be2e7d0748a2c734e41357fd4920f
Author: Max Horn (max at quendi.de)
Date: 2011-05-03T05:29:01-07:00

Commit Message:
ANDROID: Fix various forbidden symbol clashes

Changed paths:
    backends/platform/android/android.cpp
    backends/platform/android/events.cpp
    backends/platform/android/gfx.cpp
    backends/platform/android/jni.cpp
    backends/platform/android/texture.cpp



diff --git a/backends/platform/android/android.cpp b/backends/platform/android/android.cpp
index 7cf1e98..b1d0727 100644
--- a/backends/platform/android/android.cpp
+++ b/backends/platform/android/android.cpp
@@ -28,6 +28,20 @@
 // Allow use of stuff in <time.h>
 #define FORBIDDEN_SYMBOL_EXCEPTION_time_h
 
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+//   __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+//   __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include <sys/time.h>
 #include <sys/resource.h>
 #include <sys/system_properties.h>
diff --git a/backends/platform/android/events.cpp b/backends/platform/android/events.cpp
index 09466b4..2f140f0 100644
--- a/backends/platform/android/events.cpp
+++ b/backends/platform/android/events.cpp
@@ -25,6 +25,23 @@
 
 #if defined(__ANDROID__)
 
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+//   __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+//   __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include "common/events.h"
 
 #include "backends/platform/android/android.h"
diff --git a/backends/platform/android/gfx.cpp b/backends/platform/android/gfx.cpp
index fae428d..ebce58e 100644
--- a/backends/platform/android/gfx.cpp
+++ b/backends/platform/android/gfx.cpp
@@ -25,6 +25,23 @@
 
 #if defined(__ANDROID__)
 
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+//   __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+//   __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include "common/endian.h"
 #include "graphics/conversion.h"
 
diff --git a/backends/platform/android/jni.cpp b/backends/platform/android/jni.cpp
index f23d71b..13aef11 100644
--- a/backends/platform/android/jni.cpp
+++ b/backends/platform/android/jni.cpp
@@ -25,6 +25,23 @@
 
 #if defined(__ANDROID__)
 
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+//   __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+//   __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include "base/main.h"
 #include "base/version.h"
 #include "common/config-manager.h"
diff --git a/backends/platform/android/texture.cpp b/backends/platform/android/texture.cpp
index 2d73783..c830676 100644
--- a/backends/platform/android/texture.cpp
+++ b/backends/platform/android/texture.cpp
@@ -25,6 +25,23 @@
 
 #if defined(__ANDROID__)
 
+// Allow use of stuff in <time.h>
+#define FORBIDDEN_SYMBOL_EXCEPTION_time_h
+
+// Disable printf override in common/forbidden.h to avoid
+// clashes with log.h from the Android SDK.
+// That header file uses
+//   __attribute__ ((format(printf, 3, 4)))
+// which gets messed up by our override mechanism; this could
+// be avoided by either changing the Android SDK to use the equally
+// legal and valid
+//   __attribute__ ((format(printf, 3, 4)))
+// or by refining our printf override to use a varadic macro
+// (which then wouldn't be portable, though).
+// Anyway, for now we just disable the printf override globally
+// for the Android port
+#define FORBIDDEN_SYMBOL_EXCEPTION_printf
+
 #include "base/main.h"
 #include "graphics/surface.h"
 


Commit: 2fa63ca01586c4e5fda8eb12dca444d47a2375f1
    https://github.com/scummvm/scummvm/commit/2fa63ca01586c4e5fda8eb12dca444d47a2375f1
Author: Max Horn (max at quendi.de)
Date: 2011-05-03T05:30:25-07:00

Commit Message:
COMMON: Forbid use of getcwd&getwd; add macro to enable unistd.h compatibility

Changed paths:
    backends/fs/n64/n64-fs.cpp
    backends/fs/posix/posix-fs-factory.cpp
    backends/fs/posix/posix-fs.cpp
    backends/fs/psp/psp-fs-factory.cpp
    backends/fs/psp/psp-fs.cpp
    backends/fs/wii/wii-fs.cpp
    backends/platform/dc/dc-fs.cpp
    backends/platform/ps2/savefilemgr.cpp
    backends/platform/samsungtv/main.cpp
    backends/platform/webos/main.cpp
    backends/platform/wii/main.cpp
    common/forbidden.h
    engines/engine.cpp



diff --git a/backends/fs/n64/n64-fs.cpp b/backends/fs/n64/n64-fs.cpp
index 75c1e0b..a56a494 100644
--- a/backends/fs/n64/n64-fs.cpp
+++ b/backends/fs/n64/n64-fs.cpp
@@ -22,6 +22,8 @@
 
 #ifdef __N64__
 
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
 #include "backends/fs/n64/n64-fs.h"
 #include "backends/fs/n64/romfsstream.h"
 
diff --git a/backends/fs/posix/posix-fs-factory.cpp b/backends/fs/posix/posix-fs-factory.cpp
index a69cf6b..a82b176 100644
--- a/backends/fs/posix/posix-fs-factory.cpp
+++ b/backends/fs/posix/posix-fs-factory.cpp
@@ -25,9 +25,8 @@
 #if defined(UNIX)
 
 // Re-enable some forbidden symbols  to avoid clashes with stat.h and unistd.h.
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
 
 #include "backends/fs/posix/posix-fs-factory.h"
 #include "backends/fs/posix/posix-fs.h"
diff --git a/backends/fs/posix/posix-fs.cpp b/backends/fs/posix/posix-fs.cpp
index 7aa17e5..26b4464 100644
--- a/backends/fs/posix/posix-fs.cpp
+++ b/backends/fs/posix/posix-fs.cpp
@@ -24,10 +24,9 @@
 
 #if defined(UNIX)
 
-// Re-enable some forbidden symbols  to avoid clashes with stat.h and unistd.h.
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+// Re-enable some forbidden symbols to avoid clashes with stat.h and unistd.h.
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
 
 #include "backends/fs/posix/posix-fs.h"
 #include "backends/fs/stdiostream.h"
diff --git a/backends/fs/psp/psp-fs-factory.cpp b/backends/fs/psp/psp-fs-factory.cpp
index 6b0364b..aee541d 100644
--- a/backends/fs/psp/psp-fs-factory.cpp
+++ b/backends/fs/psp/psp-fs-factory.cpp
@@ -38,9 +38,7 @@
 // for the PSP port
 #define FORBIDDEN_SYMBOL_EXCEPTION_printf
 
-// Avoid clashes with unistd.h
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 
 #include "backends/fs/psp/psp-fs-factory.h"
 #include "backends/fs/psp/psp-fs.h"
diff --git a/backends/fs/psp/psp-fs.cpp b/backends/fs/psp/psp-fs.cpp
index b36b7a0..908430b 100644
--- a/backends/fs/psp/psp-fs.cpp
+++ b/backends/fs/psp/psp-fs.cpp
@@ -40,11 +40,9 @@
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_time_h
 
-#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 
-// Avoid clashes with unistd.h
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
+#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
 
 #include "backends/fs/psp/psp-fs.h"
 #include "backends/fs/psp/psp-stream.h"
diff --git a/backends/fs/wii/wii-fs.cpp b/backends/fs/wii/wii-fs.cpp
index 74c7cf9..eb631df 100644
--- a/backends/fs/wii/wii-fs.cpp
+++ b/backends/fs/wii/wii-fs.cpp
@@ -23,9 +23,9 @@
 #if defined(__WII__)
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_time_h
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
 #define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
 
 #include "backends/fs/wii/wii-fs.h"
 #include "backends/fs/wii/wii-fs-factory.h"
diff --git a/backends/platform/dc/dc-fs.cpp b/backends/platform/dc/dc-fs.cpp
index e07dfbf..a024b5d 100644
--- a/backends/platform/dc/dc-fs.cpp
+++ b/backends/platform/dc/dc-fs.cpp
@@ -22,9 +22,7 @@
  * $Id$
  */
 
-// Avoid clashes with unistd.h
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_unlink
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 
 #include "dc.h"
 #include "backends/fs/abstract-fs.h"
diff --git a/backends/platform/ps2/savefilemgr.cpp b/backends/platform/ps2/savefilemgr.cpp
index 871ce11..010357c 100644
--- a/backends/platform/ps2/savefilemgr.cpp
+++ b/backends/platform/ps2/savefilemgr.cpp
@@ -24,8 +24,7 @@
  */
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_printf
-#define FORBIDDEN_SYMBOL_EXCEPTION_chdir
-#define FORBIDDEN_SYMBOL_EXCEPTION_mkdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 
 #include "common/config-manager.h"
 #include "common/zlib.h"
diff --git a/backends/platform/samsungtv/main.cpp b/backends/platform/samsungtv/main.cpp
index 3beb971..a1962dd 100644
--- a/backends/platform/samsungtv/main.cpp
+++ b/backends/platform/samsungtv/main.cpp
@@ -23,6 +23,8 @@
  *
  */
 
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
 #include "backends/platform/samsungtv/samsungtv.h"
 #include "backends/plugins/sdl/sdl-provider.h"
 #include "base/main.h"
diff --git a/backends/platform/webos/main.cpp b/backends/platform/webos/main.cpp
index bbf55c6..eefdd30 100644
--- a/backends/platform/webos/main.cpp
+++ b/backends/platform/webos/main.cpp
@@ -23,6 +23,8 @@
  *
  */
 
+#define FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
+
 #include "backends/platform/webos/webos.h"
 #include "backends/plugins/sdl/sdl-provider.h"
 #include "base/main.h"
diff --git a/backends/platform/wii/main.cpp b/backends/platform/wii/main.cpp
index 959931d..3965f51 100644
--- a/backends/platform/wii/main.cpp
+++ b/backends/platform/wii/main.cpp
@@ -20,6 +20,7 @@
  */
 
 #define FORBIDDEN_SYMBOL_EXCEPTION_chdir
+#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
 #define FORBIDDEN_SYMBOL_EXCEPTION_printf
 
 #include <sys/stat.h>
diff --git a/common/forbidden.h b/common/forbidden.h
index c22c646..af22b2e 100644
--- a/common/forbidden.h
+++ b/common/forbidden.h
@@ -144,68 +144,91 @@
 #endif
 
 
+//
 // Disable various symbols from time.h
+//
 #ifndef FORBIDDEN_SYMBOL_EXCEPTION_time_h
 
-/*
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_time_t
-#undef time_t
-#define time_t	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
-*/
-
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_asctime
-#undef asctime
-#define asctime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
-
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_clock
-#undef clock
-#define clock()	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
-
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_ctime
-#undef ctime
-#define ctime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
-
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_difftime
-#undef difftime
-#define difftime(a,b)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
+	/*
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_time_t
+	#undef time_t
+	#define time_t	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+	*/
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_asctime
+	#undef asctime
+	#define asctime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_clock
+	#undef clock
+	#define clock()	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_ctime
+	#undef ctime
+	#define ctime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_difftime
+	#undef difftime
+	#define difftime(a,b)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getdate
+	#undef getdate
+	#define getdate(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_gmtime
+	#undef gmtime
+	#define gmtime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_localtime
+	#undef localtime
+	#define localtime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_mktime
+	#undef mktime
+	#define mktime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
+
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_time
+	#undef time
+	#define time(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getdate
-#undef getdate
-#define getdate(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
+#endif // FORBIDDEN_SYMBOL_EXCEPTION_time_h
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_gmtime
-#undef gmtime
-#define gmtime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
+//
+// Disable various symbols from unistd.h
+//
+#ifndef FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_localtime
-#undef localtime
-#define localtime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_chdir
+	#undef chdir
+	#define chdir(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_mktime
-#undef mktime
-#define mktime(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+	#undef getcwd
+	#define getcwd(a,b)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_time
-#undef time
-#define time(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
-
-#endif // FORBIDDEN_SYMBOL_EXCEPTION_time_h
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_getwd
+	#undef getwd
+	#define getwd(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
 
+	#ifndef FORBIDDEN_SYMBOL_EXCEPTION_unlink
+	#undef unlink
+	#define unlink(a)	FORBIDDEN_SYMBOL_REPLACEMENT
+	#endif
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_chdir
-#undef chdir
-#define chdir(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
+#endif // FORBIDDEN_SYMBOL_EXCEPTION_unistd_h
 
 #ifndef FORBIDDEN_SYMBOL_EXCEPTION_mkdir
 #undef mkdir
@@ -224,11 +247,6 @@
 #define setvbuf(a,b,c,d)	FORBIDDEN_SYMBOL_REPLACEMENT
 #endif
 
-#ifndef FORBIDDEN_SYMBOL_EXCEPTION_unlink
-#undef unlink
-#define unlink(a)	FORBIDDEN_SYMBOL_REPLACEMENT
-#endif
-
 /*
  * We also would like to disable the following symbols;
  * however, these are also frequently used in regular code,
diff --git a/engines/engine.cpp b/engines/engine.cpp
index 217740d..2c1d3a7 100644
--- a/engines/engine.cpp
+++ b/engines/engine.cpp
@@ -22,6 +22,8 @@
  * $Id$
  */
 
+#define FORBIDDEN_SYMBOL_EXCEPTION_getcwd
+
 #if defined(WIN32) && !defined(_WIN32_WCE) && !defined(__SYMBIAN32__)
 #define WIN32_LEAN_AND_MEAN
 #include <windows.h>






More information about the Scummvm-git-logs mailing list