Просмотр исходного кода

fix https://github.com/blueloveTH/pocketpy/issues/129

blueloveTH 2 лет назад
Родитель
Сommit
590cb1130c
1 измененных файлов с 2 добавлено и 2 удалено
  1. 2 2
      src/io.cpp

+ 2 - 2
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<size_t>::max(), size, count, fp);
 #else
     return fread(buffer, size, count, fp);