mirror of
https://github.com/OpenTTD/OpenTTD.git
synced 2025-03-09 23:50:25 +00:00
(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.
This commit is contained in:
parent
880412c5fd
commit
1945653380
13
src/stdafx.h
13
src/stdafx.h
@ -14,16 +14,16 @@
|
|||||||
# define INT64_MAX 9223372036854775807LL
|
# define INT64_MAX 9223372036854775807LL
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#include <stdio.h>
|
#include <cstdio>
|
||||||
#include <stddef.h>
|
#include <cstddef>
|
||||||
#include <string.h>
|
#include <cstring>
|
||||||
#include <stdlib.h>
|
#include <cstdlib>
|
||||||
#include <limits.h>
|
#include <climits>
|
||||||
|
|
||||||
// MacOS X will use an NSAlert to display failed assertaions since they're lost unless running from a terminal
|
// 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
|
// strgen always runs from terminal and don't need a window for asserts
|
||||||
#if !defined(__APPLE__) || defined(STRGEN)
|
#if !defined(__APPLE__) || defined(STRGEN)
|
||||||
# include <assert.h>
|
# include <cassert>
|
||||||
#else
|
#else
|
||||||
# include "os/macosx/macos.h"
|
# include "os/macosx/macos.h"
|
||||||
#endif
|
#endif
|
||||||
@ -157,7 +157,6 @@
|
|||||||
# define strcasecmp stricmp
|
# define strcasecmp stricmp
|
||||||
# define strncasecmp strnicmp
|
# define strncasecmp strnicmp
|
||||||
// suppress: warning C4005: 'offsetof' : macro redefinition (VC8)
|
// suppress: warning C4005: 'offsetof' : macro redefinition (VC8)
|
||||||
# include <stddef.h>
|
|
||||||
#endif /* defined(_MSC_VER) */
|
#endif /* defined(_MSC_VER) */
|
||||||
|
|
||||||
#if defined(WINCE)
|
#if defined(WINCE)
|
||||||
|
Loading…
Reference in New Issue
Block a user