diff options
author | Darkvater <Darkvater@openttd.org> | 2007-03-07 18:58:28 +0000 |
---|---|---|
committer | Darkvater <Darkvater@openttd.org> | 2007-03-07 18:58:28 +0000 |
commit | 1a2576cd7ea8051ab5da17bc192924fe5ba871c3 (patch) | |
tree | ba99aff4f6b2c185df22ce8dd28562996f0a5441 /src/stdafx.h | |
parent | 663bf46352c27241f17bf2cb1591344c4b347368 (diff) | |
download | openttd-1a2576cd7ea8051ab5da17bc192924fe5ba871c3.tar.xz |
(svn r9055) -Codechange: Change windows unicode handling and allow a pure non-unicode build to function. Win9x binaries will be possible with mingw/nightly system.
Diffstat (limited to 'src/stdafx.h')
-rw-r--r-- | src/stdafx.h | 14 |
1 files changed, 8 insertions, 6 deletions
diff --git a/src/stdafx.h b/src/stdafx.h index 022ca61e5..3c9419f84 100644 --- a/src/stdafx.h +++ b/src/stdafx.h @@ -198,14 +198,16 @@ * call to the same function and is not thread- or reentrancy-safe */ #if !defined(STRGEN) # if defined(WIN32) || defined(WIN64) -# if defined(WINCE) +# include <tchar.h> /* XXX - WinCE without MSVCRT doesn't support wfopen, so it seems */ -# else -# define fopen(file, mode) _wfopen(OTTD2FS(file), L ## mode) -# endif - const char *FS2OTTD(const wchar_t *name); - const wchar_t *OTTD2FS(const char *name); +# if !defined(WINCE) +# define fopen(file, mode) _tfopen(OTTD2FS(file), _T(mode)) +# endif /* WINCE */ + + const char *FS2OTTD(const TCHAR *name); + const TCHAR *OTTD2FS(const char *name); # else + # define fopen(file, mode) fopen(OTTD2FS(file), mode) const char *FS2OTTD(const char *name); const char *OTTD2FS(const char *name); |