diff --git a/example/example-mdbx.c b/example/example-mdbx.c index 501c430d..a3735f9a 100644 --- a/example/example-mdbx.c +++ b/example/example-mdbx.c @@ -18,7 +18,13 @@ * . */ +#if (defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)) && \ + !defined(__USE_MINGW_ANSI_STDIO) +#define __USE_MINGW_ANSI_STDIO 1 +#endif /* MinGW */ + #include "mdbx.h" + #include #include #include diff --git a/src/base.h b/src/base.h index ec5321ff..57c0d311 100644 --- a/src/base.h +++ b/src/base.h @@ -236,10 +236,6 @@ __extern_C key_t ftok(const char *, int); #elif _WIN32_WINNT < 0x0500 #error At least 'Windows 2000' API is required for libmdbx. #endif /* _WIN32_WINNT */ -#if (defined(__MINGW32__) || defined(__MINGW64__)) && \ - !defined(__USE_MINGW_ANSI_STDIO) -#define __USE_MINGW_ANSI_STDIO 1 -#endif /* MinGW */ #ifndef WIN32_LEAN_AND_MEAN #define WIN32_LEAN_AND_MEAN #endif /* WIN32_LEAN_AND_MEAN */ diff --git a/src/core.c b/src/core.c index 153e06a7..fa07fb1b 100644 --- a/src/core.c +++ b/src/core.c @@ -23233,6 +23233,8 @@ __dll_export "MINGW-64 " MDBX_STRINGIFY(__MINGW64_MAJOR_VERSION) "." MDBX_STRINGIFY(__MINGW64_MINOR_VERSION) #elif defined(__MINGW32__) "MINGW-32 " MDBX_STRINGIFY(__MINGW32_MAJOR_VERSION) "." MDBX_STRINGIFY(__MINGW32_MINOR_VERSION) + #elif defined(__MINGW__) + "MINGW " MDBX_STRINGIFY(__MINGW_MAJOR_VERSION) "." MDBX_STRINGIFY(__MINGW_MINOR_VERSION) #elif defined(__IBMC__) "IBM C " MDBX_STRINGIFY(__IBMC__) #elif defined(__GNUC__) diff --git a/src/internals.h b/src/internals.h index 0f7b6e54..ea7f5fe7 100644 --- a/src/internals.h +++ b/src/internals.h @@ -126,7 +126,7 @@ #if (defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)) && \ !defined(__USE_MINGW_ANSI_STDIO) #define __USE_MINGW_ANSI_STDIO 1 -#endif /* __USE_MINGW_ANSI_STDIO */ +#endif /* MinGW */ #include "../mdbx.h" #include "base.h" diff --git a/src/mdbx.c++ b/src/mdbx.c++ index 2375a1b7..76d831b6 100644 --- a/src/mdbx.c++ +++ b/src/mdbx.c++ @@ -12,7 +12,7 @@ #if (defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)) && \ !defined(__USE_MINGW_ANSI_STDIO) #define __USE_MINGW_ANSI_STDIO 1 -#endif /* __USE_MINGW_ANSI_STDIO */ +#endif /* MinGW */ #include "../mdbx.h++" diff --git a/test/osal-windows.cc b/test/osal-windows.cc index 29ac5cb1..fc19315c 100644 --- a/test/osal-windows.cc +++ b/test/osal-windows.cc @@ -360,6 +360,7 @@ actor_status osal_actor_info(const mdbx_pid_t pid) { status = as_coredump; break; default: + log_error("pid %zu, exit code %u", (intptr_t)pid, (unsigned)ExitCode); status = as_failed; break; }