mdbx-windows: fix build for Windows XP/2000 (_WIN32_WINNT < 0x0600).

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

Change-Id: Ibd795817e05b6da39ef270ce7b55b31d963d07b0
This commit is contained in:
Leonid Yuriev
2021-05-08 10:12:41 +03:00
parent 8e078fb708
commit ab1fc94a5b
5 changed files with 63 additions and 1 deletions

View File

@@ -216,6 +216,13 @@ template <> struct path_to_pchar<std::string> {
#if defined(_WIN32) || defined(_WIN64)
#ifndef WC_ERR_INVALID_CHARS
static const DWORD WC_ERR_INVALID_CHARS =
(6 /* Windows Vista */ <= /* MajorVersion */ LOBYTE(LOWORD(GetVersion())))
? 0x00000080
: 0;
#endif /* WC_ERR_INVALID_CHARS */
template <> struct path_to_pchar<std::wstring> {
std::string str;
path_to_pchar(const std::wstring &path) {