summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-01-21 14:19:18 +0000
committertruelight <truelight@openttd.org>2007-01-21 14:19:18 +0000
commit7ee1ff5af1bf9af1734eacb6d0c4661cb9d2d535 (patch)
treec16815d0918050e64d5f6ea74d28c6ef5eb08dfa /src/stdafx.h
parent465cc38811ccfd59e3cca8d9271ce4dc3ba7bd29 (diff)
downloadopenttd-7ee1ff5af1bf9af1734eacb6d0c4661cb9d2d535.tar.xz
(svn r8306) [WinCE] -Fix: some functions don't exists in WinCE, so give an alternative where possible
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 6c6a21ec7..d400f9c3c 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -157,11 +157,19 @@
# include <stddef.h>
#endif /* defined(_MSC_VER) */
+#if defined(WINCE)
+# define strdup _strdup
+#endif /* WINCE */
+
/* 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)
+# if defined(WINCE)
+/* 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);
# else