diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2024-08-29 18:17:49 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2024-08-29 18:17:57 +0200 |
| commit | 9ac536a1dd0a0b9bffebea3244d9533628c19b65 (patch) | |
| tree | e2319b6dd5e1f79427f93f046eca1420c3d86507 /src/wrapped32/wrappedlibc.c | |
| parent | 9820bee5e7e696e82a27d48051d526f289cc0d45 (diff) | |
| download | box64-9ac536a1dd0a0b9bffebea3244d9533628c19b65.tar.gz box64-9ac536a1dd0a0b9bffebea3244d9533628c19b65.zip | |
[BOX32] More fixes to ctype_b_loc and added a few more wrapped functions
Diffstat (limited to 'src/wrapped32/wrappedlibc.c')
| -rwxr-xr-x | src/wrapped32/wrappedlibc.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/wrapped32/wrappedlibc.c b/src/wrapped32/wrappedlibc.c index 5b2b2c6d..fed5a414 100755 --- a/src/wrapped32/wrappedlibc.c +++ b/src/wrapped32/wrappedlibc.c @@ -1178,16 +1178,16 @@ EXPORT int my32___fxstat(x64emu_t *emu, int vers, int fd, void* buf) r = FillStatFromStat64(vers, &st, buf); return r; } - +#endif EXPORT int my32___fxstat64(x64emu_t *emu, int vers, int fd, void* buf) { struct stat64 st; int r = fstat64(fd, &st); //int r = syscall(__NR_stat64, fd, &st); - UnalignStat64(&st, buf); + UnalignStat64_32(&st, buf); return r; } - +#if 0 EXPORT int my32_stat64(x64emu_t* emu, void* path, void* buf) { struct stat64 st; @@ -2309,8 +2309,12 @@ EXPORT int my32_alphasort64(x64emu_t* emu, ptr_t* d1_, ptr_t* d2_) EXPORT void* my32___ctype_b_loc(x64emu_t* emu) { const unsigned short** src =__ctype_b_loc(); - memcpy(emu->libctype, &((*src)[-128]), 384*sizeof(short)); - return &emu->libctype[128]; + if(src != emu->ref_ctype) { + memcpy(emu->libctype, &((*src)[-128]), 384*sizeof(short)); + emu->ref_ctype = src; + emu->ctype = emu->libctype+128; + } + return &emu->ctype; } EXPORT struct __processor_model |