diff --git a/src/bits.h b/src/bits.h index 8657ae47..fd36cac9 100644 --- a/src/bits.h +++ b/src/bits.h @@ -864,7 +864,9 @@ typedef struct MDBX_ntxn { /*----------------------------------------------------------------------------*/ /* Debug and Logging stuff */ +#ifndef mdbx_runtime_flags /* avoid override from tools */ extern int mdbx_runtime_flags; +#endif extern MDBX_debug_func *mdbx_debug_logger; extern txnid_t mdbx_debug_edge; diff --git a/src/tools/mdbx_chk.c b/src/tools/mdbx_chk.c index 9ece913d..9d3b9e06 100644 --- a/src/tools/mdbx_chk.c +++ b/src/tools/mdbx_chk.c @@ -20,6 +20,8 @@ #pragma warning(disable : 4996) /* The POSIX name is deprecated... */ #endif /* _MSC_VER (warnings) */ +/* Avoid reference to mdbx_runtime_flags from assert() */ +#define mdbx_runtime_flags (~0u) #include "../bits.h" typedef struct flagbit { diff --git a/src/tools/mdbx_copy.c b/src/tools/mdbx_copy.c index 9b0c833a..f700b178 100644 --- a/src/tools/mdbx_copy.c +++ b/src/tools/mdbx_copy.c @@ -20,6 +20,8 @@ #pragma warning(disable : 4996) /* The POSIX name is deprecated... */ #endif /* _MSC_VER (warnings) */ +/* Avoid reference to mdbx_runtime_flags from assert() */ +#define mdbx_runtime_flags (~0u) #include "../bits.h" #if defined(_WIN32) || defined(_WIN64) diff --git a/src/tools/mdbx_dump.c b/src/tools/mdbx_dump.c index 07951548..8cb9c86e 100644 --- a/src/tools/mdbx_dump.c +++ b/src/tools/mdbx_dump.c @@ -20,7 +20,10 @@ #pragma warning(disable : 4996) /* The POSIX name is deprecated... */ #endif /* _MSC_VER (warnings) */ +/* Avoid reference to mdbx_runtime_flags from assert() */ +#define mdbx_runtime_flags (~0u) #include "../bits.h" + #include #define PRINT 1 diff --git a/src/tools/mdbx_load.c b/src/tools/mdbx_load.c index 9789e83a..9c679acb 100644 --- a/src/tools/mdbx_load.c +++ b/src/tools/mdbx_load.c @@ -20,7 +20,10 @@ #pragma warning(disable : 4996) /* The POSIX name is deprecated... */ #endif /* _MSC_VER (warnings) */ +/* Avoid reference to mdbx_runtime_flags from assert() */ +#define mdbx_runtime_flags (~0u) #include "../bits.h" + #include #if defined(_WIN32) || defined(_WIN64) diff --git a/src/tools/mdbx_stat.c b/src/tools/mdbx_stat.c index e459121d..d4ebc2e6 100644 --- a/src/tools/mdbx_stat.c +++ b/src/tools/mdbx_stat.c @@ -20,6 +20,8 @@ #pragma warning(disable : 4996) /* The POSIX name is deprecated... */ #endif /* _MSC_VER (warnings) */ +/* Avoid reference to mdbx_runtime_flags from assert() */ +#define mdbx_runtime_flags (~0u) #include "../bits.h" #if defined(_WIN32) || defined(_WIN64)