windows: Disable _CRT_SECURE_NO_WARNINGS again.
authorRyan C. Gordon <icculus@icculus.org>
Wed, 16 Aug 2017 21:19:16 -0400
changeset 1590 5aa450209e6a
parent 1589 e4f75163b60d
child 1591 97d3641bfba3
windows: Disable _CRT_SECURE_NO_WARNINGS again.
src/physfs_internal.h
src/physfs_platform_windows.c
src/physfs_platform_winrt.cpp
--- a/src/physfs_internal.h	Wed Aug 16 20:03:24 2017 -0400
+++ b/src/physfs_internal.h	Wed Aug 16 21:19:16 2017 -0400
@@ -15,7 +15,7 @@
 #endif
 
 /* 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
 #endif
 
--- a/src/physfs_platform_windows.c	Wed Aug 16 20:03:24 2017 -0400
+++ b/src/physfs_platform_windows.c	Wed Aug 16 21:19:16 2017 -0400
@@ -16,6 +16,10 @@
 #undef UNICODE
 #endif
 
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS 1
+#endif
+
 #define WIN32_LEAN_AND_MEAN 1
 #include <windows.h>
 
--- a/src/physfs_platform_winrt.cpp	Wed Aug 16 20:03:24 2017 -0400
+++ b/src/physfs_platform_winrt.cpp	Wed Aug 16 21:19:16 2017 -0400
@@ -17,6 +17,9 @@
 
 #ifdef PHYSFS_PLATFORM_WINRT
 
+#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS)
+#define _CRT_SECURE_NO_WARNINGS 1
+#endif
 #include <windows.h>
 
 #include "physfs_internal.h"