mirror of
https://github.com/isar/libmdbx.git
synced 2024-12-30 01:34:14 +08:00
mdbx-windows: check _WIN32_WINNT
definition.
Related to https://github.com/erthink/libmdbx/issues/155 Change-Id: I49c294bd0fa055026b742a12a6f6ea9cd805cf02
This commit is contained in:
parent
ab1fc94a5b
commit
33e8b19ea4
7
mdbx.h
7
mdbx.h
@ -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
|
||||
|
@ -143,6 +143,11 @@ __extern_C key_t ftok(const char *, int);
|
||||
#endif /* SunOS/Solaris */
|
||||
|
||||
#if defined(_WIN32) || defined(_WIN64)
|
||||
#ifndef _WIN32_WINNT
|
||||
#define _WIN32_WINNT 0x0601 /* Windows 7 */
|
||||
#elif _WIN32_WINNT < 0x0500
|
||||
#error At least 'Windows 2000' API is required for libmdbx.
|
||||
#endif /* _WIN32_WINNT */
|
||||
#ifndef WIN32_LEAN_AND_MEAN
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#endif /* WIN32_LEAN_AND_MEAN */
|
||||
|
Loading…
x
Reference in New Issue
Block a user