about summary refs log tree commit diff stats
path: root/src/wrapped/wrappedlibc.c
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-09 18:20:32 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-09 18:20:32 +0100
commit85dfd5b9783208070155be3d4b0f374aaa6b2190 (patch)
treea5554c75b031264cecacb2c91efa87fcb2559fed /src/wrapped/wrappedlibc.c
parentb23fcc83c1a5e5be3a60772835e40b7b3f664755 (diff)
downloadbox64-85dfd5b9783208070155be3d4b0f374aaa6b2190.tar.gz
box64-85dfd5b9783208070155be3d4b0f374aaa6b2190.zip
More wrapped libc functions
Diffstat (limited to 'src/wrapped/wrappedlibc.c')
-rwxr-xr-xsrc/wrapped/wrappedlibc.c22
1 files changed, 7 insertions, 15 deletions
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