about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-11 18:09:44 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-12-11 18:09:44 +0100
commitecbd382ae4b0810cc30dbdae27c032803061c6e7 (patch)
tree72fe30941fb8955d8481ff1139b86fb4ce90e8a0 /src
parent16f63a94c3645352af27e4e0fb113ce06a17dcb6 (diff)
downloadbox64-ecbd382ae4b0810cc30dbdae27c032803061c6e7.tar.gz
box64-ecbd382ae4b0810cc30dbdae27c032803061c6e7.zip
[BOX32] added a few more libc 32bits wrapped functions
Diffstat (limited to 'src')
-rw-r--r--src/wrapped32/generated/functions_list.txt3
-rw-r--r--src/wrapped32/generated/wrapper32.c6
-rw-r--r--src/wrapped32/generated/wrapper32.h3
-rwxr-xr-xsrc/wrapped32/wrappedlibc_private.h12
4 files changed, 14 insertions, 10 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index c4b00fe9..08eaac3e 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -623,7 +623,6 @@
 #() pFpuu -> pFpuu
 #() pFpup -> pFpup
 #() pEpLL -> pEpLL
-#() pEppi -> pEppi
 #() pFppu -> pFppu
 #() pEppL -> pEppL
 #() pFppL -> pFppL
@@ -638,6 +637,7 @@
 #() SEEpp -> SEEpp
 #() SEppS -> SEppS
 #() tEipu -> tEipu
+#() tEppi -> tEppi
 #() vFibp_i -> vFiBi
 #() vFuibp_ -> vFuiB
 #() vFuuBp_ -> vFuuB
@@ -1188,6 +1188,7 @@
 #() pFXLipp -> pFXLipp
 #() pFXpipi -> pFXpipi
 #() pFXppip -> pFXppip
+#() tEpppLi -> tEpppLi
 #() vFiuibp_i -> vFiuiBi
 #() vFXibL_ii -> vFXiBii
 #() iEEBh_ppp -> iEEBppp
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 9645c703..6f16a399 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -714,7 +714,6 @@ typedef void* (*pEpII_t)(void*, int64_t, int64_t);
 typedef void* (*pFpuu_t)(void*, uint32_t, uint32_t);
 typedef void* (*pFpup_t)(void*, uint32_t, void*);
 typedef void* (*pEpLL_t)(void*, uintptr_t, uintptr_t);
-typedef void* (*pEppi_t)(void*, void*, int32_t);
 typedef void* (*pFppu_t)(void*, void*, uint32_t);
 typedef void* (*pEppL_t)(void*, void*, uintptr_t);
 typedef void* (*pFppL_t)(void*, void*, uintptr_t);
@@ -729,6 +728,7 @@ typedef void* (*aEipa_t)(int32_t, void*, void*);
 typedef void* (*SEEpp_t)(x64emu_t*, void*, void*);
 typedef void* (*SEppS_t)(void*, void*, void*);
 typedef char* (*tEipu_t)(int32_t, void*, uint32_t);
+typedef char* (*tEppi_t)(void*, void*, int32_t);
 typedef void (*vFibp_i_t)(int32_t, struct_p_t*, int32_t);
 typedef void (*vFuibp__t)(uint32_t, int32_t, struct_p_t*);
 typedef void (*vFuuBp__t)(uint32_t, uint32_t, struct_p_t*);
@@ -1279,6 +1279,7 @@ typedef void* (*pFppupp_t)(void*, void*, uint32_t, void*, void*);
 typedef void* (*pFXLipp_t)(void*, uintptr_t, int32_t, void*, void*);
 typedef void* (*pFXpipi_t)(void*, void*, int32_t, void*, int32_t);
 typedef void* (*pFXppip_t)(void*, void*, void*, int32_t, void*);
+typedef char* (*tEpppLi_t)(void*, void*, void*, uintptr_t, int32_t);
 typedef void (*vFiuibp_i_t)(int32_t, uint32_t, int32_t, struct_p_t*, int32_t);
 typedef void (*vFXibL_ii_t)(void*, int32_t, struct_L_t*, int32_t, int32_t);
 typedef int32_t (*iEEBh_ppp_t)(x64emu_t*, struct_h_t*, void*, void*, void*);
@@ -2368,7 +2369,6 @@ void pEpII_32(x64emu_t *emu, uintptr_t fcn) { pEpII_t fn = (pEpII_t)fcn; errno =
 void pFpuu_32(x64emu_t *emu, uintptr_t fcn) { pFpuu_t fn = (pFpuu_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); }
 void pFpup_32(x64emu_t *emu, uintptr_t fcn) { pFpup_t fn = (pFpup_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12))); }
 void pEpLL_32(x64emu_t *emu, uintptr_t fcn) { pEpLL_t fn = (pEpLL_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ulong(from_ptri(ulong_t, R_ESP + 12)))); emu->libc_err = errno; }
-void pEppi_32(x64emu_t *emu, uintptr_t fcn) { pEppi_t fn = (pEppi_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); emu->libc_err = errno; }
 void pFppu_32(x64emu_t *emu, uintptr_t fcn) { pFppu_t fn = (pFppu_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); }
 void pEppL_32(x64emu_t *emu, uintptr_t fcn) { pEppL_t fn = (pEppL_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)))); emu->libc_err = errno; }
 void pFppL_32(x64emu_t *emu, uintptr_t fcn) { pFppL_t fn = (pFppL_t)fcn; R_EAX = to_ptrv(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)))); }
@@ -2383,6 +2383,7 @@ void aEipa_32(x64emu_t *emu, uintptr_t fcn) { aEipa_t fn = (aEipa_t)fcn; errno =
 void SEEpp_32(x64emu_t *emu, uintptr_t fcn) { SEEpp_t fn = (SEEpp_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(io_convert_from(fn(emu, from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8)))); emu->libc_err = errno; }
 void SEppS_32(x64emu_t *emu, uintptr_t fcn) { SEppS_t fn = (SEppS_t)fcn; errno = emu->libc_err; R_EAX = to_ptrv(io_convert_from(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), io_convert32(from_ptriv(R_ESP + 12))))); emu->libc_err = errno; }
 void tEipu_32(x64emu_t *emu, uintptr_t fcn) { tEipu_t fn = (tEipu_t)fcn; errno = emu->libc_err; R_EAX = to_cstring(fn(from_ptri(int32_t, R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(uint32_t, R_ESP + 12))); emu->libc_err = errno; }
+void tEppi_32(x64emu_t *emu, uintptr_t fcn) { tEppi_t fn = (tEppi_t)fcn; errno = emu->libc_err; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12))); emu->libc_err = errno; }
 void vFibp_i_32(x64emu_t *emu, uintptr_t fcn) { vFibp_i_t fn = (vFibp_i_t)fcn; struct_p_t arg_8={0}; if (*(ptr_t*)(from_ptr((R_ESP + 8)))) from_struct_p(&arg_8, *(ptr_t*)(from_ptr((R_ESP + 8)))); fn(from_ptri(int32_t, R_ESP + 4), *(ptr_t*)(from_ptr((R_ESP + 8))) ? &arg_8 : NULL, from_ptri(int32_t, R_ESP + 12)); if (*(ptr_t*)(from_ptr((R_ESP + 8)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 8))), &arg_8); }
 void vFuibp__32(x64emu_t *emu, uintptr_t fcn) { vFuibp__t fn = (vFuibp__t)fcn; struct_p_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_p(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(int32_t, R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void vFuuBp__32(x64emu_t *emu, uintptr_t fcn) { vFuuBp__t fn = (vFuuBp__t)fcn; struct_p_t arg_12={0}; fn(from_ptri(uint32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
@@ -2933,6 +2934,7 @@ void pFppupp_32(x64emu_t *emu, uintptr_t fcn) { pFppupp_t fn = (pFppupp_t)fcn; R
 void pFXLipp_32(x64emu_t *emu, uintptr_t fcn) { pFXLipp_t fn = (pFXLipp_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ulong(from_ptri(ulong_t, R_ESP + 8)), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16), from_ptriv(R_ESP + 20))); }
 void pFXpipi_32(x64emu_t *emu, uintptr_t fcn) { pFXpipi_t fn = (pFXpipi_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ptriv(R_ESP + 16), from_ptri(int32_t, R_ESP + 20))); }
 void pFXppip_32(x64emu_t *emu, uintptr_t fcn) { pFXppip_t fn = (pFXppip_t)fcn; R_EAX = to_ptrv(fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16), from_ptriv(R_ESP + 20))); }
+void tEpppLi_32(x64emu_t *emu, uintptr_t fcn) { tEpppLi_t fn = (tEpppLi_t)fcn; errno = emu->libc_err; R_EAX = to_cstring(fn(from_ptriv(R_ESP + 4), from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16)), from_ptri(int32_t, R_ESP + 20))); emu->libc_err = errno; }
 void vFiuibp_i_32(x64emu_t *emu, uintptr_t fcn) { vFiuibp_i_t fn = (vFiuibp_i_t)fcn; struct_p_t arg_16={0}; if (*(ptr_t*)(from_ptr((R_ESP + 16)))) from_struct_p(&arg_16, *(ptr_t*)(from_ptr((R_ESP + 16)))); fn(from_ptri(int32_t, R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), *(ptr_t*)(from_ptr((R_ESP + 16))) ? &arg_16 : NULL, from_ptri(int32_t, R_ESP + 20)); if (*(ptr_t*)(from_ptr((R_ESP + 16)))) to_struct_p(*(ptr_t*)(from_ptr((R_ESP + 16))), &arg_16); }
 void vFXibL_ii_32(x64emu_t *emu, uintptr_t fcn) { vFXibL_ii_t fn = (vFXibL_ii_t)fcn; struct_L_t arg_12={0}; if (*(ptr_t*)(from_ptr((R_ESP + 12)))) from_struct_L(&arg_12, *(ptr_t*)(from_ptr((R_ESP + 12)))); fn(getDisplay(from_ptriv(R_ESP + 4)), from_ptri(int32_t, R_ESP + 8), *(ptr_t*)(from_ptr((R_ESP + 12))) ? &arg_12 : NULL, from_ptri(int32_t, R_ESP + 16), from_ptri(int32_t, R_ESP + 20)); if (*(ptr_t*)(from_ptr((R_ESP + 12)))) to_struct_L(*(ptr_t*)(from_ptr((R_ESP + 12))), &arg_12); }
 void iEEBh_ppp_32(x64emu_t *emu, uintptr_t fcn) { iEEBh_ppp_t fn = (iEEBh_ppp_t)fcn; errno = emu->libc_err; struct_h_t arg_4={0}; R_EAX = fn(emu, *(ptr_t*)(from_ptr((R_ESP + 4))) ? &arg_4 : NULL, from_ptriv(R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); if (*(ptr_t*)(from_ptr((R_ESP + 4)))) to_struct_h(*(ptr_t*)(from_ptr((R_ESP + 4))), &arg_4); emu->libc_err = errno; }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index d8657ce4..6eaa0238 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -664,7 +664,6 @@ void pEpII_32(x64emu_t *emu, uintptr_t fnc);
 void pFpuu_32(x64emu_t *emu, uintptr_t fnc);
 void pFpup_32(x64emu_t *emu, uintptr_t fnc);
 void pEpLL_32(x64emu_t *emu, uintptr_t fnc);
-void pEppi_32(x64emu_t *emu, uintptr_t fnc);
 void pFppu_32(x64emu_t *emu, uintptr_t fnc);
 void pEppL_32(x64emu_t *emu, uintptr_t fnc);
 void pFppL_32(x64emu_t *emu, uintptr_t fnc);
@@ -679,6 +678,7 @@ void aEipa_32(x64emu_t *emu, uintptr_t fnc);
 void SEEpp_32(x64emu_t *emu, uintptr_t fnc);
 void SEppS_32(x64emu_t *emu, uintptr_t fnc);
 void tEipu_32(x64emu_t *emu, uintptr_t fnc);
+void tEppi_32(x64emu_t *emu, uintptr_t fnc);
 void vFibp_i_32(x64emu_t *emu, uintptr_t fnc);
 void vFuibp__32(x64emu_t *emu, uintptr_t fnc);
 void vFuuBp__32(x64emu_t *emu, uintptr_t fnc);
@@ -1229,6 +1229,7 @@ void pFppupp_32(x64emu_t *emu, uintptr_t fnc);
 void pFXLipp_32(x64emu_t *emu, uintptr_t fnc);
 void pFXpipi_32(x64emu_t *emu, uintptr_t fnc);
 void pFXppip_32(x64emu_t *emu, uintptr_t fnc);
+void tEpppLi_32(x64emu_t *emu, uintptr_t fnc);
 void vFiuibp_i_32(x64emu_t *emu, uintptr_t fnc);
 void vFXibL_ii_32(x64emu_t *emu, uintptr_t fnc);
 void iEEBh_ppp_32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h
index 8cc9ce30..bf3b6f3c 100755
--- a/src/wrapped32/wrappedlibc_private.h
+++ b/src/wrapped32/wrappedlibc_private.h
@@ -170,8 +170,8 @@ GOW(__connect, iEipu)
 // copysign // Weak
 // copysignf    // Weak
 // copysignl    // Weak
-//GOW(creat, iEpu)
-//GO(creat64, iEpu)
+GOW(creat, iEpu)
+GO(creat64, iEpu)
 // create_module    // Weak
 GO(ctermid, tEp)
 GOM(ctime, pEErl_)
@@ -195,9 +195,9 @@ GOM(__cxa_thread_atexit_impl, iEEppp) //%%
 // daemon
 DATAV(daylight, 4)
 // __daylight   // type B
-GOW(dcgettext, pEppi)
-GO(__dcgettext, pEppi)
-//GOW(dcngettext, pEpppui)
+GOW(dcgettext, tEppi)
+GO(__dcgettext, tEppi)
+GOW(dcngettext, tEpppLi)
 // __default_morecore
 // __default_rt_sa_restorer_v1
 // __default_rt_sa_restorer_v2
@@ -2020,7 +2020,7 @@ GO(wcstoull, UEpBp_i)
 // wcstouq  // Weak
 // wcswcs   // Weak
 //GO(wcswidth, iEpu)
-//GO(wcsxfrm, uEppu)
+GO(wcsxfrm, LEppL)
 //GOW(wcsxfrm_l, uEppup)
 GO(__wcsxfrm_l, LEppLa)
 GO(wctob, iEu)