Skip to content

Commit 11488e6

Browse files
committed
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.
1 parent 820271b commit 11488e6

File tree

2 files changed

+2
-2
lines changed

2 files changed

+2
-2
lines changed

include/internal/catch_session.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ namespace Catch {
197197
return 0;
198198
}
199199

200-
#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
200+
#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
201201
int Session::applyCommandLine( int argc, wchar_t const * const * argv ) {
202202

203203
char **utf8Argv = new char *[ argc ];

include/internal/catch_session.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ namespace Catch {
2626
void libIdentify();
2727

2828
int applyCommandLine( int argc, char const * const * argv );
29-
#if defined(CATCH_CONFIG_WCHAR) && defined(WIN32) && defined(UNICODE)
29+
#if defined(CATCH_CONFIG_WCHAR) && defined(_WIN32) && defined(UNICODE)
3030
int applyCommandLine( int argc, wchar_t const * const * argv );
3131
#endif
3232

0 commit comments

Comments
 (0)