Use _WIN32 macro for detecting MSVC Windows

Previously we used `WIN32`, which sometimes does exist, but according to
https://docs.microsoft.com/en-us/cpp/preprocessor/predefined-macros?view=vs-2019
`_WIN32` is the one that is actually provided by the compiler.

Closes #1676.
This commit is contained in:
Martin Hořeňovský 2019-07-06 16:55:10 +02:00
parent 820271bf24
commit 11488e63b6
No known key found for this signature in database
GPG Key ID: DE48307B8B0D381A
2 changed files with 2 additions and 2 deletions

View File

@ -197,7 +197,7 @@ namespace Catch {
return 0; return 0;
} }
#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE) #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
int Session::applyCommandLine( int argc, wchar_t const * const * argv ) { int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {
char **utf8Argv = new char *[ argc ]; char **utf8Argv = new char *[ argc ];

View File

@ -26,7 +26,7 @@ namespace Catch {
void libIdentify(); void libIdentify();
int applyCommandLine( int argc, char const * const * argv ); int applyCommandLine( int argc, char const * const * argv );
#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE) #if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
int applyCommandLine( int argc, wchar_t const * const * argv ); int applyCommandLine( int argc, wchar_t const * const * argv );
#endif #endif