*: check defined(_WIN32) instead of defined(WIN32)

Only _WIN32 is defined by the compiler, and WIN32 is not standardized
and may be missing.

Closes #169
This commit is contained in:
Max Kellermann
2017-12-12 10:22:20 +01:00
parent d9552d8a6d
commit dfaf08743c
91 changed files with 226 additions and 225 deletions

View File

@@ -36,7 +36,7 @@
#include <ctype.h>
#endif
#ifdef WIN32
#ifdef _WIN32
#include "Win32.hxx"
#include <windows.h>
#endif
@@ -73,7 +73,7 @@ try {
folded.SetSize(folded_length);
return UCharToUTF8({folded.begin(), folded.size()});
#elif defined(WIN32)
#elif defined(_WIN32)
const auto u = MultiByteToWideChar(CP_UTF8, src);
const int size = LCMapStringEx(LOCALE_NAME_INVARIANT,

View File

@@ -32,7 +32,7 @@
#include <ctype.h>
#endif
#ifdef WIN32
#ifdef _WIN32
#include "Win32.hxx"
#include "util/AllocatedString.hxx"
#include <windows.h>
@@ -103,7 +103,7 @@ IcuCollate(const char *a, const char *b) noexcept
}
#endif
#elif defined(WIN32)
#elif defined(_WIN32)
AllocatedString<wchar_t> wa = nullptr, wb = nullptr;
try {