mdbx-windows: check _WIN32_WINNT definition.

Related to https://github.com/erthink/libmdbx/issues/155

Change-Id: I49c294bd0fa055026b742a12a6f6ea9cd805cf02
This commit is contained in:
Leonid Yuriev
2021-05-08 15:27:57 +03:00
parent ab1fc94a5b
commit 33e8b19ea4
2 changed files with 11 additions and 1 deletions

7
mdbx.h
View File

@@ -616,7 +616,12 @@ extern LIBMDBX_VERINFO_API const struct MDBX_build_info {
* So, if you doubt, just build MDBX as the separate DLL and don't worry. */
#ifndef MDBX_CONFIG_MANUAL_TLS_CALLBACK
#if defined(_WIN32_WINNT_VISTA) && WINVER >= _WIN32_WINNT_VISTA
#ifndef _WIN32_WINNT
#error Non-dll build libmdbx requires target Windows version \
to be explicitly defined via _WIN32_WINNT for properly \
handling thread local storage destructors.
#endif
#if _WIN32_WINNT >= 0x0600 /* Windows Vista */
/* As described above mdbx_dll_handler() is NOT needed forWindows Vista
* and later. */
#define MDBX_CONFIG_MANUAL_TLS_CALLBACK 0