mdbx-windows: уточнение проверок макросов MinGW и устранение предупреждений (backport).

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-11-08 19:44:42 +03:00
parent cce052e869
commit af1d01ffb3
6 changed files with 11 additions and 6 deletions

View File

@ -18,7 +18,13 @@
* <http://www.OpenLDAP.org/license.html>.
*/
#if (defined(__MINGW__) || defined(__MINGW32__) || defined(__MINGW64__)) && \
!defined(__USE_MINGW_ANSI_STDIO)
#define __USE_MINGW_ANSI_STDIO 1
#endif /* MinGW */
#include "mdbx.h"
#include <limits.h>
#include <stdint.h>
#include <stdio.h>

View File

@ -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 */

View File

@ -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__)

View File

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

View File

@ -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++"

View File

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