diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-30 17:55:29 +0200 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-30 17:55:29 +0200 |
| commit | 0d2492bfde70c85e81973c03cb076efa553d60e0 (patch) | |
| tree | 51a5ab16af6886da5c18966d43b435cf85c5549f /src | |
| parent | 1a3483e086e88f56d17d82cb3251cc3869688f22 (diff) | |
| download | box64-0d2492bfde70c85e81973c03cb076efa553d60e0.tar.gz box64-0d2492bfde70c85e81973c03cb076efa553d60e0.zip | |
Added wrapped swprintf
Diffstat (limited to 'src')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 19 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 2 |
2 files changed, 6 insertions, 15 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 451d9b6d..82b06656 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -713,9 +713,9 @@ EXPORT int my_sscanf(x64emu_t* emu, void* stream, void* fmt, uint64_t* b) return vsscanf(stream, fmt, VARARGS); } -#if 0 EXPORT int my__IO_vfscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my_vfscanf"))); EXPORT int my___isoc99_vsscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my_vsscanf"))); +#if 0 EXPORT int my___isoc99_vfscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my_vfscanf"))); #endif @@ -839,22 +839,13 @@ EXPORT int my___swprintf_chk(x64emu_t* emu, void* s, size_t n, int32_t flag, siz PREPARE_VALIST; return vswprintf(s, n, (const wchar_t*)fmt, VARARGS); } -#if 0 -EXPORT int my_swprintf(x64emu_t* emu, void* s, uint32_t n, void* fmt, void *b) +EXPORT int my_swprintf(x64emu_t* emu, void* s, size_t n, void* fmt, uint64_t* b) { - #ifndef NOALIGN - myStackAlignW((const char*)fmt, b, emu->scratch); + myStackAlignW(emu, (const char*)fmt, b, emu->scratch, R_EAX, 3); PREPARE_VALIST; - void* f = vswprintf; - int r = ((iFpupp_t)f)(s, n, fmt, VARARGS); - return r; - #else - void* f = vswprintf; - int r = ((iFpupp_t)f)(s, n, fmt, b); - return r; - #endif + return vswprintf(s, n, (const wchar_t*)fmt, VARARGS); } -#endif + EXPORT void my__ITM_addUserCommitAction(x64emu_t* emu, void* cb, uint32_t b, void* c) { // disabled for now... Are all this _ITM_ stuff really mendatory? diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index 7b7225b4..d96ace4a 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -1908,7 +1908,7 @@ GOW(strxfrm_l, LFppLL) GOM(swapcontext, iFEpp) //Weak //GOW(swapoff, //GOW(swapon, -//GO(swprintf, +GOM(swprintf, iFEpLpV) GOM(__swprintf_chk, iFEpLiLpV) //GO(swscanf, //GOW(symlink, |