diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-12-04 16:58:05 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-12-04 16:58:05 +0100 |
| commit | 9165ec875a36b2d146b7749f8da9bc14f3bb635b (patch) | |
| tree | ca4ba6d04d55456e432e92b1b8cd7f9ac2897bd9 /src/wrapped32 | |
| parent | 6a7997b41eccd62c9743b52e80033a586aebd006 (diff) | |
| download | box64-9165ec875a36b2d146b7749f8da9bc14f3bb635b.tar.gz box64-9165ec875a36b2d146b7749f8da9bc14f3bb635b.zip | |
[BOX32] Some fixes to a few file related 32bits wrapped function (now windows gog installer can be used with box32 and wine)
Diffstat (limited to 'src/wrapped32')
| -rw-r--r-- | src/wrapped32/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped32/generated/wrappedlibctypes32.h | 2 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc.c | 22 | ||||
| -rwxr-xr-x | src/wrapped32/wrappedlibc_private.h | 4 |
4 files changed, 26 insertions, 4 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt index d72fbf5f..d62e1a1e 100644 --- a/src/wrapped32/generated/functions_list.txt +++ b/src/wrapped32/generated/functions_list.txt @@ -1814,6 +1814,8 @@ wrappedlibc: - vEpu: - vEpp: - iEip: + - fstatvfs + - fstatvfs64 - futimens - futimes - iEup: diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h index aa0683f0..98426e51 100644 --- a/src/wrapped32/generated/wrappedlibctypes32.h +++ b/src/wrapped32/generated/wrappedlibctypes32.h @@ -160,6 +160,8 @@ typedef int32_t (*iEpLiLppp_t)(void*, uintptr_t, int32_t, uintptr_t, void*, void GO(ctime, pErl__t) \ GO(asctime, pEriiiiiiiiilt__t) \ GO(_obstack_newchunk, vEpi_t) \ + GO(fstatvfs, iEip_t) \ + GO(fstatvfs64, iEip_t) \ GO(futimens, iEip_t) \ GO(futimes, iEip_t) \ GO(getrlimit, iEup_t) \ diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index 5e9ccfe9..e5fa0d71 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -457,7 +457,7 @@ EXPORT int my32_statvfs64(x64emu_t* emu, void* f, void* r) { struct statvfs s = {0}; int ret = statvfs(f, &s); - if(r) + if(r>=0) UnalignStatVFS64_32(&s, r); return ret; } @@ -466,7 +466,25 @@ EXPORT int my32_statvfs(x64emu_t* emu, void* f, void* r) { struct statvfs s = {0}; int ret = statvfs(f, &s); - if(r) + if(r>=0) + UnalignStatVFS_32(&s, r); + return ret; +} + +EXPORT int my32_fstatvfs64(x64emu_t* emu, int fd, void* r) +{ + struct statvfs s = {0}; + int ret = fstatvfs(fd, &s); + if(r>=0) + UnalignStatVFS64_32(&s, r); + return ret; +} + +EXPORT int my32_fstatvfs(x64emu_t* emu, int fd, void* r) +{ + struct statvfs s = {0}; + int ret = fstatvfs(fd, &s); + if(r>=0) UnalignStatVFS_32(&s, r); return ret; } diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h index 3e9dd212..5c904598 100755 --- a/src/wrapped32/wrappedlibc_private.h +++ b/src/wrapped32/wrappedlibc_private.h @@ -419,8 +419,8 @@ GO(__fsetlocking, iESi) GO(fsetxattr, iEippLi) GOWM(fstatfs, iEip) //%%,noE GOWM(fstatfs64, iEip) //%%,noE -//GO(fstatvfs, iEip) -GOW(fstatvfs64, iEip) // alignment? +GOM(fstatvfs, iEEip) +GOWM(fstatvfs64, iEEip) GOW(fsync, iEi) GOWM(ftell, lEES) GO(ftello, lES) |