From 85dfd5b9783208070155be3d4b0f374aaa6b2190 Mon Sep 17 00:00:00 2001 From: ptitSeb Date: Tue, 9 Mar 2021 18:20:32 +0100 Subject: More wrapped libc functions --- src/wrapped/wrappedlibc.c | 22 +++++++--------------- 1 file changed, 7 insertions(+), 15 deletions(-) (limited to 'src/wrapped/wrappedlibc.c') diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index 50e354e9..0542d999 100755 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -769,24 +769,16 @@ EXPORT int my___isoc99_sscanf(x64emu_t* emu, void* stream, void* fmt, void* b) return ((iFppp_t)f)(stream, fmt, VARARGS); } #endif - -EXPORT int my_vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) { - #ifndef NOALIGN +#endif +EXPORT int my_vsnprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_list_t b) { // need to align on arm - myStackAlign((const char*)fmt, (uint32_t*)b, emu->scratch); - PREPARE_VALIST; - void* f = vsnprintf; - int r = ((iFpupp_t)f)(buff, s, fmt, VARARGS); - return r; - #else - void* f = vsnprintf; - int r = ((iFpupp_t)f)(buff, s, fmt, (uint32_t*)b); + CONVERT_VALIST(b); + int r = vsnprintf(buff, s, fmt, VARARGS); return r; - #endif } -EXPORT int my___vsnprintf(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) __attribute__((alias("my_vsnprintf"))); -EXPORT int my___vsnprintf_chk(x64emu_t* emu, void* buff, uint32_t s, void * fmt, void * b, va_list V) __attribute__((alias("my_vsnprintf"))); - +EXPORT int my___vsnprintf(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_list_t b) __attribute__((alias("my_vsnprintf"))); +EXPORT int my___vsnprintf_chk(x64emu_t* emu, void* buff, size_t s, void * fmt, x64_va_list_t b) __attribute__((alias("my_vsnprintf"))); +#if 0 EXPORT int my_vasprintf(x64emu_t* emu, void* strp, void* fmt, void* b, va_list V) { #ifndef NOALIGN -- cgit 1.4.1