mirror of
https://github.com/isar/libmdbx.git
synced 2025-12-19 18:12:21 +08:00
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:
@@ -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 */
|
||||
|
||||
|
||||
Reference in New Issue
Block a user