mdbx-windows: more crutches for MinGW.

More for https://github.com/erthink/libmdbx/issues/155

Change-Id: I7de6122ff160372b2dcfd2a0a26e332cb52d0560
This commit is contained in:
Leonid Yuriev
2021-05-08 10:59:15 +03:00
parent 33e8b19ea4
commit 5ae120af80
9 changed files with 127 additions and 90 deletions

View File

@@ -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 &params,
void __hot maker::mk_continue(const serial_t serial, const essentials &params,
result &out) {
#if defined(__cpp_constexpr)
#if CONSTEXPR_ENUM_FLAGS_OPERATIONS
static_assert(
(essentials::prng_fill_flag &
unsigned(MDBX_DUPSORT | MDBX_DUPFIXED | MDBX_INTEGERKEY |

View File

@@ -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;