From 25ab7da33e1a08e0ae6abdc2c195f6520a789254 Mon Sep 17 00:00:00 2001 From: Leonid Yuriev Date: Sun, 14 Oct 2018 12:12:44 +0300 Subject: [PATCH] mdbx-windows: _NO_CRT_STDIO_INLINE to avoid dependency from CRT. 16 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43 Change-Id: Ie5d33e2a4f1fd281a28eaa6686aaf921ecc956b4 --- src/osal.h | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/src/osal.h b/src/osal.h index 4d13a0f1..22bd84d3 100644 --- a/src/osal.h +++ b/src/osal.h @@ -28,10 +28,16 @@ #pragma warning(disable : 4577) /* 'noexcept' used with no exception handling \ * mode specified; termination on exception is \ * not guaranteed. Specify /EHsc */ +#endif /* _MSC_VER (warnings) */ + +#if defined(_WIN32) || defined(_WIN64) #if !defined(_CRT_SECURE_NO_WARNINGS) #define _CRT_SECURE_NO_WARNINGS #endif -#endif /* _MSC_VER (warnings) */ +#if !defined(_NO_CRT_STDIO_INLINE) && defined(MDBX_BUILD_DLL) +#define _NO_CRT_STDIO_INLINE +#endif +#endif /* Windows */ /*----------------------------------------------------------------------------*/ /* C99 includes */