diff --git a/src/cstdio.cpp b/src/cstdio.cpp index 0aa46ed7..2ff9574c 100644 --- a/src/cstdio.cpp +++ b/src/cstdio.cpp @@ -8,7 +8,9 @@ #define BOOST_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 4234a715..ab0d4455 100644 --- a/src/cstdlib.cpp +++ b/src/cstdlib.cpp @@ -8,7 +8,9 @@ #define BOOST_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 2c0e37e7..76171375 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