diff options
| -rw-r--r-- | src/wrapped/generated/functions_list.txt | 2 | ||||
| -rw-r--r-- | src/wrapped/generated/wrappedlibctypes.h | 2 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibc.c | 13 | ||||
| -rw-r--r-- | src/wrapped/wrappedlibc_private.h | 4 |
4 files changed, 19 insertions, 2 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt index 9ec09008..313cc996 100644 --- a/src/wrapped/generated/functions_list.txt +++ b/src/wrapped/generated/functions_list.txt @@ -4108,7 +4108,9 @@ wrappedlibc: - printf - wprintf - iFpA: + - __isoc99_vscanf - vprintf + - vscanf - vwprintf - iFSp: - _IO_file_stat diff --git a/src/wrapped/generated/wrappedlibctypes.h b/src/wrapped/generated/wrappedlibctypes.h index 6e38ef3d..a7a31670 100644 --- a/src/wrapped/generated/wrappedlibctypes.h +++ b/src/wrapped/generated/wrappedlibctypes.h @@ -157,7 +157,9 @@ typedef int32_t (*iFppipppp_t)(void*, void*, int32_t, void*, void*, void*, void* GO(execlp, iFpV_t) \ GO(printf, iFpV_t) \ GO(wprintf, iFpV_t) \ + GO(__isoc99_vscanf, iFpA_t) \ GO(vprintf, iFpA_t) \ + GO(vscanf, iFpA_t) \ GO(vwprintf, iFpA_t) \ GO(_IO_file_stat, iFSp_t) \ GO(__sysv_signal, pFip_t) \ diff --git a/src/wrapped/wrappedlibc.c b/src/wrapped/wrappedlibc.c index c8f23d0c..a62c5b78 100644 --- a/src/wrapped/wrappedlibc.c +++ b/src/wrapped/wrappedlibc.c @@ -932,8 +932,21 @@ EXPORT int my_sscanf(x64emu_t* emu, void* stream, void* fmt, uint64_t* b) return vsscanf(stream, fmt, VARARGS); } +EXPORT int my_vscanf(x64emu_t* emu, void* fmt, x64_va_list_t b) +{ + (void)emu; + #ifdef CONVERT_VALIST + CONVERT_VALIST(b); + #else + myStackAlignScanfValist(emu, (const char*)fmt, emu->scratch, b); + PREPARE_VALIST; + #endif + return vscanf(fmt, VARARGS); +} + 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"))); +EXPORT int my___isoc99_vscanf(x64emu_t* emu, void* fmt, void* b) __attribute__((alias("my_vscanf"))); EXPORT int my___isoc99_vswscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my_vswscanf"))); EXPORT int my___isoc99_vfscanf(x64emu_t* emu, void* stream, void* fmt, void* b) __attribute__((alias("my_vfscanf"))); diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h index c38718cc..583bd268 100644 --- a/src/wrapped/wrappedlibc_private.h +++ b/src/wrapped/wrappedlibc_private.h @@ -985,7 +985,7 @@ GOM(__isoc99_sscanf, iFEppV) GOM(__isoc99_swscanf, iFEppV) GOM(__isoc99_vfscanf, iFEppA) //GO(__isoc99_vfwscanf, iFppA) -//GO(__isoc99_vscanf, iFpA) +GOM(__isoc99_vscanf, iFEpA) GOM(__isoc99_vsscanf, iFEppA) GOM(__isoc99_vswscanf, iFEppA) //GO(__isoc99_vwscanf, iFpA) @@ -2172,7 +2172,7 @@ GO(vhangup, iFv) GO(vmsplice, lFipLu) GOM(vprintf, iFEpA) GOM(__vprintf_chk, iFEvpp) -//GOW(vscanf, iFpA) +GOWM(vscanf, iFEpA) GOWM(__vsnprintf, iFEpLpA) GOWM(vsnprintf, iFEpLpA) GOM(__vsnprintf_chk, iFEpLiLpp) |