summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorrubidium <rubidium@openttd.org>2007-02-04 11:14:42 +0000
committerrubidium <rubidium@openttd.org>2007-02-04 11:14:42 +0000
commit3675874113079f4e34e9b8124db2431756e10a5d (patch)
treecaf07b3f66fa32a5c092994b3767d58858985abd
parentefea7e8d6ddef372ea3adb9b4e211fe789d864bb (diff)
downloadopenttd-3675874113079f4e34e9b8124db2431756e10a5d.tar.xz
(svn r8572) -Fix: use the C++ version of the Standard C Library headers. This due to the fact that some stl headers will include them anyway and #undef several defines made in stdafx.h.
An example of this is that fopen that we redefine to _wfopen (for Windows Unicode compatability), is reverted to a non-Windows Unicode compatible fopen. This makes it impossible to start openttd with non-ASCII characters in the path or load savegames with non-ASCII characters under Windows.
-rw-r--r--src/stdafx.h13
1 files changed, 6 insertions, 7 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index fb00c11fa..2e2ae1bb6 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -14,16 +14,16 @@
# define INT64_MAX 9223372036854775807LL
#endif
-#include <stdio.h>
-#include <stddef.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
+#include <cstdio>
+#include <cstddef>
+#include <cstring>
+#include <cstdlib>
+#include <climits>
// MacOS X will use an NSAlert to display failed assertaions since they're lost unless running from a terminal
// strgen always runs from terminal and don't need a window for asserts
#if !defined(__APPLE__) || defined(STRGEN)
-# include <assert.h>
+# include <cassert>
#else
# include "os/macosx/macos.h"
#endif
@@ -157,7 +157,6 @@
# define strcasecmp stricmp
# define strncasecmp strnicmp
// suppress: warning C4005: 'offsetof' : macro redefinition (VC8)
-# include <stddef.h>
#endif /* defined(_MSC_VER) */
#if defined(WINCE)