From 11488e63b694176951e991ad87c9ef7c76db50c9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20Ho=C5=99e=C5=88ovsk=C3=BD?= Date: Sat, 6 Jul 2019 16:55:10 +0200 Subject: [PATCH] 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. --- include/internal/catch_session.cpp | 2 +- include/internal/catch_session.h | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/include/internal/catch_session.cpp b/include/internal/catch_session.cpp index 5aee5d99..f9818f74 100644 --- a/include/internal/catch_session.cpp +++ b/include/internal/catch_session.cpp @@ -197,7 +197,7 @@ namespace Catch { 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 ) { char **utf8Argv = new char *[ argc ]; diff --git a/include/internal/catch_session.h b/include/internal/catch_session.h index af820da4..4e83d520 100644 --- a/include/internal/catch_session.h +++ b/include/internal/catch_session.h @@ -26,7 +26,7 @@ namespace Catch { void libIdentify(); 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 ); #endif