From 5fb9119ebcdc4a53e813027426fb274f369199d9 Mon Sep 17 00:00:00 2001 From: "Ryan C. Gordon" Date: Wed, 16 Aug 2017 21:19:16 -0400 Subject: [PATCH] windows: Disable _CRT_SECURE_NO_WARNINGS again. --- src/physfs_internal.h | 2 +- src/physfs_platform_windows.c | 4 ++++ src/physfs_platform_winrt.cpp | 3 +++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/src/physfs_internal.h b/src/physfs_internal.h index 8b221ab5..07677c7a 100644 --- a/src/physfs_internal.h +++ b/src/physfs_internal.h @@ -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 diff --git a/src/physfs_platform_windows.c b/src/physfs_platform_windows.c index 49d6f550..1a403026 100644 --- a/src/physfs_platform_windows.c +++ b/src/physfs_platform_windows.c @@ -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 diff --git a/src/physfs_platform_winrt.cpp b/src/physfs_platform_winrt.cpp index 5acc8c4c..f50fc9d3 100644 --- a/src/physfs_platform_winrt.cpp +++ b/src/physfs_platform_winrt.cpp @@ -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 #include "physfs_internal.h"