aboutsummaryrefslogtreecommitdiff
path: root/gui
diff options
context:
space:
mode:
authorMax Horn2010-10-30 21:27:42 +0000
committerMax Horn2010-10-30 21:27:42 +0000
commit44393b2dc8ba78342dcbb7df39eca2e9e1f6e429 (patch)
treeb5b2d7013d64ca317072453a7fbbc391174e2851 /gui
parentff34a778318355ffba2ee5700524fccba9fe5cf3 (diff)
downloadscummvm-rg350-44393b2dc8ba78342dcbb7df39eca2e9e1f6e429.tar.gz
scummvm-rg350-44393b2dc8ba78342dcbb7df39eca2e9e1f6e429.tar.bz2
scummvm-rg350-44393b2dc8ba78342dcbb7df39eca2e9e1f6e429.zip
ALL: Add code to help stop people from accidentally using "bad" APIs
A new header file common/forbidden.h is included by scummsys.h and it re-#defines numerous symbols like fopen(), fread(), system(), etc. with garbage, in order to provoke compile errors in any code using them. If a .cpp file really *must* use any of these (e.g. because it is a backend file), then these redefinitions can be disabled by #defining FORBIDDEN_SYMBOL_ALLOW_ALL as the first thing in the .cpp file. Whenever this is done, an explanatory comment should be added. Note that this system cannot catch all "bad" usages (notably the Lua code in the sword25 engine), as it can only work if scummsys.h is included. svn-id: r53961
Diffstat (limited to 'gui')
-rw-r--r--gui/browser_osx.mm3
1 files changed, 3 insertions, 0 deletions
diff --git a/gui/browser_osx.mm b/gui/browser_osx.mm
index a3a09b8ed2..ea77e16c04 100644
--- a/gui/browser_osx.mm
+++ b/gui/browser_osx.mm
@@ -22,6 +22,9 @@
* $Id$
*/
+// Disable symbol overrides so that we can use system headers
+#define FORBIDDEN_SYMBOL_ALLOW_ALL
+
#include "gui/browser.h"
#include "gui/GuiManager.h"
#include "gui/ListWidget.h"