]> Nishi Git Mirror - dataworks.git/commitdiff
add unlock for windows
authornishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sat, 18 May 2024 17:00:38 +0000 (17:00 +0000)
committernishi <nishi@d4a5a174-5a4a-5b4b-b672-37683c10d7d5>
Sat, 18 May 2024 17:00:38 +0000 (17:00 +0000)
git-svn-id: file:///raid/svn-main/nishi-dataworks/trunk@35 d4a5a174-5a4a-5b4b-b672-37683c10d7d5

Library/util.c

index 9edf28208670536af9a8ed581c02f20450405328..cb47e651326f0f0dabb834e86d96be9084bda743 100644 (file)
@@ -58,6 +58,8 @@ bool __dw_lockfile(FILE* fp){
 
 bool __dw_unlockfile(FILE* fp){
 #ifdef __MINGW32__
+       OVERLAPPED overlap = {0};
+       UnlockFileEx(fp, 0, MAXDWORD, MAXDWORD, &overlap);
 #else
        lockf(fp, F_ULOCK);
 #endif