diff --git a/src/internals.h b/src/internals.h index a3ba11b1..dbe7aeac 100644 --- a/src/internals.h +++ b/src/internals.h @@ -67,7 +67,7 @@ #endif #ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS -#endif +#endif /* _CRT_SECURE_NO_WARNINGS */ #if _MSC_VER > 1800 #pragma warning(disable : 4464) /* relative include path contains '..' */ #endif diff --git a/src/mdbx.c++ b/src/mdbx.c++ index 82770c69..a6db48ff 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -5,9 +5,9 @@ // Non-inline part of the libmdbx C++ API (preliminary) // -#ifdef _MSC_VER +#if defined(_MSC_VER) && !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS -#endif +#endif /* _CRT_SECURE_NO_WARNINGS */ #include "../mdbx.h++" diff --git a/src/osal.h b/src/osal.h index 478b7328..2e8359b5 100644 --- a/src/osal.h +++ b/src/osal.h @@ -33,7 +33,7 @@ #if defined(_WIN32) || defined(_WIN64) #if !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS -#endif +#endif /* _CRT_SECURE_NO_WARNINGS */ #if !defined(_NO_CRT_STDIO_INLINE) && MDBX_BUILD_SHARED_LIBRARY && \ !defined(xMDBX_TOOLS) && MDBX_WITHOUT_MSVC_CRT #define _NO_CRT_STDIO_INLINE diff --git a/test/base.h b/test/base.h index 790ffd0f..89fd91e0 100644 --- a/test/base.h +++ b/test/base.h @@ -23,7 +23,9 @@ #define _WIN32_WINNT 0x0601 /* Windows 7 */ #endif #ifdef _MSC_VER +#ifndef _CRT_SECURE_NO_WARNINGS #define _CRT_SECURE_NO_WARNINGS +#endif /* _CRT_SECURE_NO_WARNINGS */ #pragma warning(push, 1) #pragma warning(disable : 4548) /* expression before comma has no effect; \ expected expression with side - effect */