mdbx: makes handling NDEBUG option more convenient.

Change-Id: Icb8f2ddc66273d4ef4b17f1a27e6a34d2ffadd47
This commit is contained in:
Leonid Yuriev
2019-08-26 22:57:14 +03:00
parent eb37dad115
commit 55ca2f0ed1
3 changed files with 9 additions and 3 deletions

View File

@@ -15,10 +15,16 @@
/* *INDENT-OFF* */
/* clang-format off */
/* In case the MDBX_DEBUG is undefined set it corresponding to NDEBUG */
#ifndef MDBX_DEBUG
#ifdef NDEBUG
# define MDBX_DEBUG 0
#else
# define MDBX_DEBUG 1
#endif
#endif
/* Undefine the NDEBUG if debugging is enforced by MDBX_DEBUG */
#if MDBX_DEBUG
# undef NDEBUG
#endif