diff options
| author | ptitSeb <sebastien.chev@gmail.com> | 2021-03-08 18:34:07 +0100 |
|---|---|---|
| committer | ptitSeb <sebastien.chev@gmail.com> | 2021-03-08 18:34:07 +0100 |
| commit | 62c22e55e704edd4cd5fdb0b95eb9f9f79bc37fe (patch) | |
| tree | 3b8aa89489eec843737a8942b5e3c20109fc8f76 /src/wrapped | |
| parent | 23eef578f76ef2bd1bf03726e227129fdcc7ec6e (diff) | |
| download | box64-62c22e55e704edd4cd5fdb0b95eb9f9f79bc37fe.tar.gz box64-62c22e55e704edd4cd5fdb0b95eb9f9f79bc37fe.zip | |
Attempts at conversion of va_list
Diffstat (limited to 'src/wrapped')
| -rwxr-xr-x | src/wrapped/wrappedlibc.c | 20 | ||||
| -rwxr-xr-x | src/wrapped/wrappedlibc_private.h | 2 |
2 files changed, 7 insertions, 15 deletions
diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 03825002..4790b868 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -575,22 +575,14 @@ EXPORT int my_printf(x64emu_t *emu, void* fmt, void* b) { return vprintf((const char*)fmt, VARARGS); } EXPORT int my___printf_chk(x64emu_t *emu, void* fmt, void* b) __attribute__((alias("my_printf"))); -#if 0 -EXPORT int my_vprintf(x64emu_t *emu, void* fmt, void* b, va_list V) { - #ifndef NOALIGN - // need to align on arm - myStackAlign((const char*)fmt, (uint32_t*)b, emu->scratch); - PREPARE_VALIST; - void* f = vprintf; - return ((iFpp_t)f)(fmt, VARARGS); - #else - // other platform don't need that - void* f = vprintf; - return ((iFpp_t)f)(fmt, (uint32_t*)b); - #endif + +EXPORT int my_vprintf(x64emu_t *emu, void* fmt, x64_va_list_t b) { + CONVERT_VALIST(b); + return vprintf(fmt, VARARGS); } -EXPORT int my___vprintf_chk(x64emu_t *emu, void* fmt, void* b, va_list V) __attribute__((alias("my_vprintf"))); +EXPORT int my___vprintf_chk(x64emu_t *emu, void* fmt, x64_va_list_t b) __attribute__((alias("my_vprintf"))); +#if 0 EXPORT int my_vfprintf(x64emu_t *emu, void* F, void* fmt, void* b) { #ifndef NOALIGN // need to align on arm diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index a957630c..5b2e36b5 100755 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -2055,7 +2055,7 @@ GO(usleep, iFu) //GO(vhangup, //GO(vlimit, //GO(vmsplice, -//GO(vprintf, +GOM(vprintf, iFEpp) //GO(__vprintf_chk, //GOW(vscanf, //GOW(__vsnprintf, |