diff options
author | glx <glx@openttd.org> | 2018-12-09 02:28:14 +0100 |
---|---|---|
committer | glx22 <glx22@users.noreply.github.com> | 2018-12-27 18:09:16 +0100 |
commit | c540d7244531d501f16b485a3e45e358f98853be (patch) | |
tree | 4d270f06b2aa9b4f796d4828e5bfaf3c09cdd4b1 /src/string.cpp | |
parent | 8890926b0d1069aec7ef53fd84868a7a3ca02c05 (diff) | |
download | openttd-c540d7244531d501f16b485a3e45e358f98853be.tar.xz |
Fix: [Win32] WIN32 may not be defined, always prefer the compiler predefined macro _WIN32
Diffstat (limited to 'src/string.cpp')
-rw-r--r-- | src/string.cpp | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/src/string.cpp b/src/string.cpp index 96e1d8275..ae1b556af 100644 --- a/src/string.cpp +++ b/src/string.cpp @@ -25,7 +25,7 @@ #include <errno.h> // required by vsnprintf implementation for MSVC #endif -#ifdef WIN32 +#ifdef _WIN32 #include "os/windows/win32.h" #endif @@ -359,7 +359,7 @@ bool IsValidChar(WChar key, CharSetFilter afilter) } } -#ifdef WIN32 +#ifdef _WIN32 #if defined(_MSC_VER) && _MSC_VER < 1900 /** * Almost POSIX compliant implementation of \c vsnprintf for VC compiler. @@ -395,7 +395,7 @@ int CDECL vsnprintf(char *str, size_t size, const char *format, va_list ap) } #endif /* _MSC_VER */ -#endif /* WIN32 */ +#endif /* _WIN32 */ /** * Safer implementation of snprintf; same as snprintf except: @@ -592,7 +592,7 @@ int strnatcmp(const char *s1, const char *s2, bool ignore_garbage_at_front) } #endif /* WITH_ICU_SORT */ -#if defined(WIN32) && !defined(STRGEN) && !defined(SETTINGSGEN) +#if defined(_WIN32) && !defined(STRGEN) && !defined(SETTINGSGEN) int res = OTTDStringCompare(s1, s2); if (res != 0) return res - 2; // Convert to normal C return values. #endif |