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

This commit is contained in:
Леонид Юрьев (Leonid Yuriev) 2022-11-08 19:44:42 +03:00
parent 2558903081
commit c270306580
6 changed files with 12 additions and 8 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

@ -24419,6 +24419,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 */
#if (defined(_WIN32) || defined(_WIN64)) && !defined(UNICODE)
#define UNICODE

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

@ -363,11 +363,11 @@ actor_status osal_actor_info(const mdbx_pid_t pid) {
case /* STATUS_ASSERTION_FAILURE */ 0xC0000420L:
case /* STATUS_HEAP_CORRUPTION */ 0xC0000374L:
case /* STATUS_CONTROL_STACK_VIOLATION */ 0xC00001B2L:
log_error("pid %u, exception 0x%x", pid, ExitCode);
log_error("pid %zu, exception 0x%x", (intptr_t)pid, (unsigned)ExitCode);
status = as_coredump;
break;
default:
log_error("pid %u, exit code %u", pid, ExitCode);
log_error("pid %zu, exit code %u", (intptr_t)pid, (unsigned)ExitCode);
status = as_failed;
break;
}