Skip to content
This repository has been archived by the owner on Sep 22, 2022. It is now read-only.

Commit

Permalink
mdbx++: add ifndef-guard for _CRT_SECURE_NO_WARNINGS.
Browse files Browse the repository at this point in the history
  • Loading branch information
erthink committed Oct 22, 2021
1 parent 3312328 commit 5babf08
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/internals.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions src/mdbx.c++
Original file line number Diff line number Diff line change
Expand Up @@ -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++"

Expand Down
2 changes: 1 addition & 1 deletion src/osal.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
2 changes: 2 additions & 0 deletions test/base.h
Original file line number Diff line number Diff line change
Expand Up @@ -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 */
Expand Down

0 comments on commit 5babf08

Please sign in to comment.