equal
deleted
inserted
replaced
6 /* It seems that we need to include stdint.h before anything else |
6 /* It seems that we need to include stdint.h before anything else |
7 * We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC |
7 * We need INT64_MAX, which for most systems comes from stdint.h. However, MSVC |
8 * does not have stdint.h and apparently neither does MorphOS, so define |
8 * does not have stdint.h and apparently neither does MorphOS, so define |
9 * INT64_MAX for them ourselves. */ |
9 * INT64_MAX for them ourselves. */ |
10 #if !defined(_MSC_VER) && !defined( __MORPHOS__) |
10 #if !defined(_MSC_VER) && !defined( __MORPHOS__) |
11 # define __STDC_LIMIT_MACROS |
11 # if defined (SUNOS) |
12 # include <stdint.h> |
12 /* SunOS/Solaris does not have stdint.h, but inttypes.h defines everything |
|
13 * stdint.h defines and we need. */ |
|
14 # include <inttypes.h> |
|
15 # else |
|
16 # define __STDC_LIMIT_MACROS |
|
17 # include <stdint.h> |
|
18 # endif |
13 #else |
19 #else |
14 # define INT64_MAX 9223372036854775807LL |
20 # define INT64_MAX 9223372036854775807LL |
15 #endif |
21 #endif |
16 |
22 |
17 #include <limits> |
23 #include <limits> |
192 |
198 |
193 /* NOTE: the string returned by these functions is only valid until the next |
199 /* NOTE: the string returned by these functions is only valid until the next |
194 * call to the same function and is not thread- or reentrancy-safe */ |
200 * call to the same function and is not thread- or reentrancy-safe */ |
195 #if !defined(STRGEN) |
201 #if !defined(STRGEN) |
196 # if defined(WIN32) || defined(WIN64) |
202 # if defined(WIN32) || defined(WIN64) |
197 # if defined(WINCE) |
203 # include <tchar.h> |
198 /* XXX - WinCE without MSVCRT doesn't support wfopen, so it seems */ |
204 /* XXX - WinCE without MSVCRT doesn't support wfopen, so it seems */ |
199 # else |
205 # if !defined(WINCE) |
200 # define fopen(file, mode) _wfopen(OTTD2FS(file), L ## mode) |
206 # define fopen(file, mode) _tfopen(OTTD2FS(file), _T(mode)) |
201 # endif |
207 # endif /* WINCE */ |
202 const char *FS2OTTD(const wchar_t *name); |
208 |
203 const wchar_t *OTTD2FS(const char *name); |
209 const char *FS2OTTD(const TCHAR *name); |
|
210 const TCHAR *OTTD2FS(const char *name); |
204 # else |
211 # else |
|
212 |
205 # define fopen(file, mode) fopen(OTTD2FS(file), mode) |
213 # define fopen(file, mode) fopen(OTTD2FS(file), mode) |
206 const char *FS2OTTD(const char *name); |
214 const char *FS2OTTD(const char *name); |
207 const char *OTTD2FS(const char *name); |
215 const char *OTTD2FS(const char *name); |
208 # endif /* WIN32 */ |
216 # endif /* WIN32 */ |
209 #endif /* STRGEN */ |
217 #endif /* STRGEN */ |