From 1810c3716974ee5efaa40b04555645dc8b9b521c Mon Sep 17 00:00:00 2001 From: Flamefire Date: Tue, 26 Dec 2023 11:08:10 +0000 Subject: [PATCH] Include 'Merge pull request #177 from Jackarain/develop Fix warning '_CRT_SECURE_NO_WARNINGS': macro redefinition' --- src/cstdio.cpp | 2 ++ src/cstdlib.cpp | 2 ++ test/test_system.cpp | 2 ++ 3 files changed, 6 insertions(+) diff --git a/src/cstdio.cpp b/src/cstdio.cpp index 36a55483..a33210a8 100644 --- a/src/cstdio.cpp +++ b/src/cstdio.cpp @@ -8,7 +8,9 @@ #define NOWIDE_SOURCE #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #elif defined(__MINGW32__) && defined(__STRICT_ANSI__) // Need the _w* functions which are extensions on MinGW but not on MinGW-w64 #include <_mingw.h> diff --git a/src/cstdlib.cpp b/src/cstdlib.cpp index ef66e890..61a5131d 100644 --- a/src/cstdlib.cpp +++ b/src/cstdlib.cpp @@ -8,7 +8,9 @@ #define NOWIDE_SOURCE #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif #elif defined(__MINGW32__) && defined(__STRICT_ANSI__) // Need the _w* functions which are extensions on MinGW but not on MinGW-w64 #include <_mingw.h> diff --git a/test/test_system.cpp b/test/test_system.cpp index c6cd94b2..7f2e0108 100644 --- a/test/test_system.cpp +++ b/test/test_system.cpp @@ -5,8 +5,10 @@ // https://www.boost.org/LICENSE_1_0.txt #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS #endif +#endif #include #include