summaryrefslogtreecommitdiff
path: root/src/stdafx.h
diff options
context:
space:
mode:
authortruelight <truelight@openttd.org>2007-08-03 23:26:12 +0000
committertruelight <truelight@openttd.org>2007-08-03 23:26:12 +0000
commitb3bed1eda1001aa5cabe3df4f8686cc1f42bb2b8 (patch)
tree47bcbff81f8436d0eb4b71288672b2917abb4e8d /src/stdafx.h
parentc76c4bf6e9f7fe8e0537ec96a7cc00d5e7273502 (diff)
downloadopenttd-b3bed1eda1001aa5cabe3df4f8686cc1f42bb2b8.tar.xz
(svn r10778) -Fix: one-liners to allow MSVC and WINCE to work together (or anyway, a step towards that goal)
-Fix: put DEBUG lines under WINCE via a function designed for just that under WINCE
Diffstat (limited to 'src/stdafx.h')
-rw-r--r--src/stdafx.h18
1 files changed, 14 insertions, 4 deletions
diff --git a/src/stdafx.h b/src/stdafx.h
index 7dae3ebdb..20f565679 100644
--- a/src/stdafx.h
+++ b/src/stdafx.h
@@ -142,7 +142,9 @@
# define _WIN32_WINNT 0x0500 // Windows 2000
# define _WIN32_WINDOWS 0x400 // Windows 95
+#if !defined(WINCE)
# define WINVER 0x0400 // Windows NT 4.0 / Windows 95
+#endif
# define _WIN32_IE_ 0x0401 // 4.01 (win98 and NT4SP5+)
# define WIN32_LEAN_AND_MEAN // Exclude rarely-used stuff from Windows headers
@@ -168,9 +170,11 @@
# define NORETURN __declspec(noreturn)
# define FORCEINLINE __forceinline
# define inline _inline
-# define CDECL _cdecl
+# if !defined(WINCE)
+# define CDECL _cdecl
+# endif
int CDECL snprintf(char *str, size_t size, const char *format, ...);
-# if _MSC_VER < 1400
+# if _MSC_VER < 1400 || defined(WINCE)
int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap);
# endif
@@ -191,8 +195,14 @@
# endif
# endif
-# define strcasecmp stricmp
-# define strncasecmp strnicmp
+# if defined(WINCE)
+# define strcasecmp _stricmp
+# define strncasecmp _strnicmp
+# undef DEBUG
+# else
+# define strcasecmp stricmp
+# define strncasecmp strnicmp
+# endif
/* suppress: warning C4005: 'offsetof' : macro redefinition (VC8) */
#endif /* defined(_MSC_VER) */