diff --git a/inkcpp_compiler/binary_emitter.cpp b/inkcpp_compiler/binary_emitter.cpp index 61cc9ddf..4f281843 100644 --- a/inkcpp_compiler/binary_emitter.cpp +++ b/inkcpp_compiler/binary_emitter.cpp @@ -14,7 +14,7 @@ #include #include -#ifndef WIN32 +#ifndef _MSC_VER # include #endif @@ -26,7 +26,7 @@ using std::string; char* strtok_s(char* s, const char* sep, char** context) { -#if defined(_WIN32) || defined(_WIN64) +#ifdef _MSC_VER return ::strtok_s(s, sep, context); #else if (context == nullptr || sep == nullptr || (s == nullptr && *context == nullptr)) { diff --git a/inkcpp_compiler/reporter.cpp b/inkcpp_compiler/reporter.cpp index ab6e01ba..b3786e43 100644 --- a/inkcpp_compiler/reporter.cpp +++ b/inkcpp_compiler/reporter.cpp @@ -68,8 +68,8 @@ namespace ink::compiler::internal _list = list; // Make sure our buffer is empty -#ifdef WIN32 - _Tidy(); +#ifdef _MSC_VER + _Tidy(); #endif } @@ -90,8 +90,8 @@ namespace ink::compiler::internal // Clear our state _list = nullptr; -#ifdef WIN32 - _Tidy(); +#ifdef _MSC_VER + _Tidy(); #endif // Should we throw?