--- a/stdafx.h Tue Nov 28 14:32:24 2006 +0000
+++ b/stdafx.h Tue Nov 28 14:42:31 2006 +0000
@@ -154,6 +154,19 @@
# include <stddef.h>
#endif /* defined(_MSC_VER) */
+/* NOTE: the string returned by these functions is only valid until the next
+ * call to the same function and is not thread- or reentrancy-safe */
+#if !defined(STRGEN)
+# if defined(WIN32) || defined(WIN64)
+# define fopen(file, mode) _wfopen(OTTD2FS(file), L ## mode)
+ const char *FS2OTTD(const wchar_t *name);
+ const wchar_t *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);
+# endif /* WIN32 */
+#endif /* STRGEN */
// Windows has always LITTLE_ENDIAN
#if defined(WIN32) || defined(__OS2__) || defined(WIN64)