stdafx.h
branch0.5
changeset 5472 16f71955fc3b
parent 5465 30426b385cde
equal deleted inserted replaced
5471:d0fc5d926679 5472:16f71955fc3b
   165 
   165 
   166 /* NOTE: the string returned by these functions is only valid until the next
   166 /* NOTE: the string returned by these functions is only valid until the next
   167  * call to the same function and is not thread- or reentrancy-safe */
   167  * call to the same function and is not thread- or reentrancy-safe */
   168 #if !defined(STRGEN)
   168 #if !defined(STRGEN)
   169 # if defined(WIN32) || defined(WIN64)
   169 # if defined(WIN32) || defined(WIN64)
   170 #  define fopen(file, mode) _wfopen(OTTD2FS(file), L ## mode)
   170 #  include <tchar.h>
   171    const char *FS2OTTD(const wchar_t *name);
   171 #  define fopen(file, mode) _tfopen(OTTD2FS(file), _T(mode))
   172    const wchar_t *OTTD2FS(const char *name);
   172    const char *FS2OTTD(const TCHAR *name);
       
   173    const TCHAR *OTTD2FS(const char *name);
   173 # else
   174 # else
   174 #  define fopen(file, mode) fopen(OTTD2FS(file), mode)
   175 #  define fopen(file, mode) fopen(OTTD2FS(file), mode)
   175    const char *FS2OTTD(const char *name);
   176    const char *FS2OTTD(const char *name);
   176    const char *OTTD2FS(const char *name);
   177    const char *OTTD2FS(const char *name);
   177 # endif /* WIN32 */
   178 # endif /* WIN32 */