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

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