From b3bed1eda1001aa5cabe3df4f8686cc1f42bb2b8 Mon Sep 17 00:00:00 2001 From: truelight Date: Fri, 3 Aug 2007 23:26:12 +0000 Subject: (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 --- src/stdafx.h | 18 ++++++++++++++---- 1 file changed, 14 insertions(+), 4 deletions(-) (limited to 'src/stdafx.h') 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) */ -- cgit v1.2.3-54-g00ecf