mirror of
https://github.com/isar/libmdbx.git
synced 2025-11-20 15:35:01 +08:00
mdbx-windows: more crutches for MinGW.
More for https://github.com/erthink/libmdbx/issues/155 Change-Id: I7de6122ff160372b2dcfd2a0a26e332cb52d0560
This commit is contained in:
@@ -191,7 +191,7 @@ void __hot maker::pair(serial_t serial, const buffer &key, buffer &value,
|
||||
|
||||
void maker::setup(const config::actor_params_pod &actor, unsigned actor_id,
|
||||
unsigned thread_number) {
|
||||
#if defined(__cpp_constexpr)
|
||||
#if CONSTEXPR_ENUM_FLAGS_OPERATIONS
|
||||
static_assert(unsigned(MDBX_INTEGERKEY | MDBX_REVERSEKEY | MDBX_DUPSORT |
|
||||
MDBX_INTEGERDUP | MDBX_REVERSEDUP) < UINT16_MAX,
|
||||
"WTF?");
|
||||
@@ -328,7 +328,7 @@ void __hot maker::mk_begin(const serial_t serial, const essentials ¶ms,
|
||||
|
||||
void __hot maker::mk_continue(const serial_t serial, const essentials ¶ms,
|
||||
result &out) {
|
||||
#if defined(__cpp_constexpr)
|
||||
#if CONSTEXPR_ENUM_FLAGS_OPERATIONS
|
||||
static_assert(
|
||||
(essentials::prng_fill_flag &
|
||||
unsigned(MDBX_DUPSORT | MDBX_DUPFIXED | MDBX_INTEGERKEY |
|
||||
|
||||
@@ -123,6 +123,9 @@ void output_nocheckloglevel_ap(const logging::loglevel priority,
|
||||
struct tm tm;
|
||||
#ifdef _MSC_VER
|
||||
int rc = _localtime32_s(&tm, (const __time32_t *)&now.utc);
|
||||
#elif defined(_WIN32) || defined(_WIN64)
|
||||
const time_t time_proxy = now.utc;
|
||||
int rc = localtime_s(&tm, &time_proxy);
|
||||
#else
|
||||
time_t time = now.utc;
|
||||
int rc = localtime_r(&time, &tm) ? MDBX_SUCCESS : errno;
|
||||
|
||||
Reference in New Issue
Block a user