mdbx-windows: rework mdbx_assert_fail() and mdbx_panic() to avoid dependency from CRT.

7 of 17 for https://github.com/leo-yuriev/libmdbx/issues/43

Change-Id: I40dc8d6a7d1d955c13c7d328ee904f0e6f30b248
This commit is contained in:
Leonid Yuriev
2018-10-14 01:11:14 +03:00
parent ae2875e248
commit ded5269937
4 changed files with 42 additions and 32 deletions

View File

@@ -868,6 +868,9 @@ void mdbx_panic(const char *fmt, ...)
#endif /* NDEBUG */
#endif /* MDBX_DEBUG */
LIBMDBX_API void mdbx_assert_fail(const MDBX_env *env, const char *msg,
const char *func, int line);
#define mdbx_print(fmt, ...) \
mdbx_debug_log(MDBX_DBG_PRINT, NULL, 0, fmt, ##__VA_ARGS__)
@@ -967,6 +970,9 @@ void mdbx_panic(const char *fmt, ...)
/* assert(3) variant in transaction context */
#define mdbx_tassert(txn, expr) mdbx_assert((txn)->mt_env, expr)
#undef assert
#define assert(expr) mdbx_assert(NULL, expr)
/*----------------------------------------------------------------------------*/
/* Internal prototypes */