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

windows: Disable _CRT_SECURE_NO_WARNINGS again.

Ryan C. Gordon 8 лет назад
Родитель
Сommit
5fb9119ebc
3 измененных файлов с 8 добавлено и 1 удалено
  1. 1 1
      src/physfs_internal.h
  2. 4 0
      src/physfs_platform_windows.c
  3. 3 0
      src/physfs_platform_winrt.cpp

+ 1 - 1
src/physfs_internal.h

@@ -15,7 +15,7 @@
 #endif
 #endif
 
 
 /* Turn off MSVC warnings that are aggressively anti-portability. */
 /* Turn off MSVC warnings that are aggressively anti-portability. */
-#ifdef _MSC_VER
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
 #define _CRT_SECURE_NO_WARNINGS 1
 #define _CRT_SECURE_NO_WARNINGS 1
 #endif
 #endif
 
 

+ 4 - 0
src/physfs_platform_windows.c

@@ -16,6 +16,10 @@
 #undef UNICODE
 #undef UNICODE
 #endif
 #endif
 
 
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS 1
+#endif
+
 #define WIN32_LEAN_AND_MEAN 1
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>
 #include <windows.h>
 
 

+ 3 - 0
src/physfs_platform_winrt.cpp

@@ -17,6 +17,9 @@
 
 
 #ifdef PHYSFS_PLATFORM_WINRT
 #ifdef PHYSFS_PLATFORM_WINRT
 
 
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS 1
+#endif
 #include <windows.h>
 #include <windows.h>
 
 
 #include "physfs_internal.h"
 #include "physfs_internal.h"