From 590cb1130c02eda66059e9e942f9d0a7768b147a Mon Sep 17 00:00:00 2001 From: blueloveTH Date: Sun, 27 Aug 2023 19:23:13 +0800 Subject: [PATCH] fix https://github.com/blueloveTH/pocketpy/issues/129 --- src/io.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/io.cpp b/src/io.cpp index 9516e3e6..4ece9df1 100644 --- a/src/io.cpp +++ b/src/io.cpp @@ -4,7 +4,7 @@ namespace pkpy{ static FILE* io_fopen(const char* name, const char* mode){ -#if _WIN32 +#if _MSC_VER FILE* fp; errno_t err = fopen_s(&fp, name, mode); if(err != 0) return nullptr; @@ -15,7 +15,7 @@ static FILE* io_fopen(const char* name, const char* mode){ } static size_t io_fread(void* buffer, size_t size, size_t count, FILE* fp){ -#if _WIN32 +#if _MSC_VER return fread_s(buffer, std::numeric_limits::max(), size, count, fp); #else return fread(buffer, size, count, fp);