mdbx-windows: one more workaround for Wine.

SetFileInformationByHandle() is not implemented by Wine.

Change-Id: I61783c8d173397094cd6cbad7efc9d7aac57b470
002c:Call KERNEL32.SetFileInformationByHandle(00000060,00000006,0022f890,00000008) ret=127dd1b2
002c:fixme:file:SetFileInformationByHandle 0000000000000060, 6, 000000000022F890, 8
002c:Ret  KERNEL32.SetFileInformationByHandle() retval=00000000 ret=127dd1b2

Related to https://github.com/erthink/libmdbx/issues/83
This commit is contained in:
Leonid Yuriev 2020-02-22 20:00:25 +03:00
parent 289f2896d0
commit fbf55e17cb

View File

@ -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);