summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libs/libmdbx/src/mdbx.h5
-rw-r--r--libs/libmdbx/src/src/elements/core.c10
-rw-r--r--libs/libmdbx/src/src/elements/lck-windows.c2
3 files changed, 11 insertions, 6 deletions
diff --git a/libs/libmdbx/src/mdbx.h b/libs/libmdbx/src/mdbx.h
index a832448943..8070ce6622 100644
--- a/libs/libmdbx/src/mdbx.h
+++ b/libs/libmdbx/src/mdbx.h
@@ -555,11 +555,6 @@
#include <windows.h>
#include <winnt.h>
-
-#ifndef FSCTL_GET_EXTERNAL_BACKING
-#define FSCTL_GET_EXTERNAL_BACKING CTL_CODE(FILE_DEVICE_FILE_SYSTEM, 196, METHOD_BUFFERED, FILE_ANY_ACCESS)
-#endif
-
#ifndef __mode_t_defined
typedef unsigned short mode_t;
#endif
diff --git a/libs/libmdbx/src/src/elements/core.c b/libs/libmdbx/src/src/elements/core.c
index ce940ae902..9277f94270 100644
--- a/libs/libmdbx/src/src/elements/core.c
+++ b/libs/libmdbx/src/src/elements/core.c
@@ -17891,7 +17891,12 @@ uint64_t mdbx_key_from_jsonInteger(const int64_t json_integer) {
const uint64_t key = biased_zero +
(exponent << IEEE754_DOUBLE_MANTISSA_SIZE) +
(mantissa - IEEE754_DOUBLE_IMPLICIT_LEAD);
+#if !defined(_MSC_VER) || \
+ defined( \
+ _DEBUG) /* Workaround for MSVC error LNK2019: unresolved external \
+ symbol __except1 referenced in function __ftol3_except */
assert(key == mdbx_key_from_double((double)json_integer));
+#endif /* Workaround for MSVC */
return key;
}
@@ -17913,7 +17918,12 @@ uint64_t mdbx_key_from_jsonInteger(const int64_t json_integer) {
const uint64_t key = biased_zero -
(exponent << IEEE754_DOUBLE_MANTISSA_SIZE) -
(mantissa - IEEE754_DOUBLE_IMPLICIT_LEAD);
+#if !defined(_MSC_VER) || \
+ defined( \
+ _DEBUG) /* Workaround for MSVC error LNK2019: unresolved external \
+ symbol __except1 referenced in function __ftol3_except */
assert(key == mdbx_key_from_double((double)json_integer));
+#endif /* Workaround for MSVC */
return key;
}
diff --git a/libs/libmdbx/src/src/elements/lck-windows.c b/libs/libmdbx/src/src/elements/lck-windows.c
index 6a2142ea88..264937d9c1 100644
--- a/libs/libmdbx/src/src/elements/lck-windows.c
+++ b/libs/libmdbx/src/src/elements/lck-windows.c
@@ -753,11 +753,11 @@ static void mdbx_winnt_import(void) {
const HINSTANCE hKernel32dll = GetModuleHandleA("kernel32.dll");
GET_PROC_ADDR(hKernel32dll, GetFileInformationByHandleEx);
- GET_PROC_ADDR(hKernel32dll, SetFileInformationByHandle);
GET_PROC_ADDR(hKernel32dll, GetTickCount64);
if (!mdbx_GetTickCount64)
mdbx_GetTickCount64 = stub_GetTickCount64;
if (!mdbx_RunningUnderWine()) {
+ GET_PROC_ADDR(hKernel32dll, SetFileInformationByHandle);
GET_PROC_ADDR(hKernel32dll, GetVolumeInformationByHandleW);
GET_PROC_ADDR(hKernel32dll, GetFinalPathNameByHandleW);
GET_PROC_ADDR(hKernel32dll, PrefetchVirtualMemory);