about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2024-12-05 15:19:28 +0100
committerptitSeb <sebastien.chev@gmail.com>2024-12-05 15:19:28 +0100
commit122b5e64e8565f344c0b12d3bd64892cc91632b8 (patch)
treecc7cfba72044a4a9628e2409ebbdaf2a09c81752 /src
parent6c66d66b02fa484078b70da84cc2aeb8e4d565ad (diff)
downloadbox64-122b5e64e8565f344c0b12d3bd64892cc91632b8.tar.gz
box64-122b5e64e8565f344c0b12d3bd64892cc91632b8.zip
[BOX32][WRAPPER] Added a couple more 32bits wrapped functions to libc
Diffstat (limited to 'src')
-rw-r--r--src/wrapped32/generated/functions_list.txt2
-rw-r--r--src/wrapped32/generated/wrappedlibctypes32.h1
-rw-r--r--src/wrapped32/generated/wrapper32.c2
-rw-r--r--src/wrapped32/generated/wrapper32.h1
-rwxr-xr-xsrc/wrapped32/wrappedlibc_private.h4
5 files changed, 8 insertions, 2 deletions
diff --git a/src/wrapped32/generated/functions_list.txt b/src/wrapped32/generated/functions_list.txt
index d62e1a1e..011620e9 100644
--- a/src/wrapped32/generated/functions_list.txt
+++ b/src/wrapped32/generated/functions_list.txt
@@ -861,6 +861,7 @@
 #() iFpipp -> iFpipp
 #() iFpCCC -> iFpCCC
 #() iFpWWu -> iFpWWu
+#() iEpuiL -> iEpuiL
 #() iFpuLp -> iFpuLp
 #() iFpupi -> iFpupi
 #() iFpupp -> iFpupp
@@ -1914,6 +1915,7 @@ wrappedlibc:
   - readlinkat
 - iEpipp:
 - iEpipV:
+- iEpuiL:
 - iEpLpp:
 - iEpLpV:
 - iEpppp:
diff --git a/src/wrapped32/generated/wrappedlibctypes32.h b/src/wrapped32/generated/wrappedlibctypes32.h
index 98426e51..8b97cddd 100644
--- a/src/wrapped32/generated/wrappedlibctypes32.h
+++ b/src/wrapped32/generated/wrappedlibctypes32.h
@@ -97,6 +97,7 @@ typedef int32_t (*iEippi_t)(int32_t, void*, void*, int32_t);
 typedef int32_t (*iEippL_t)(int32_t, void*, void*, uintptr_t);
 typedef int32_t (*iEpipp_t)(void*, int32_t, void*, void*);
 typedef int32_t (*iEpipV_t)(void*, int32_t, void*, ...);
+typedef int32_t (*iEpuiL_t)(void*, uint32_t, int32_t, uintptr_t);
 typedef int32_t (*iEpLpp_t)(void*, uintptr_t, void*, void*);
 typedef int32_t (*iEpLpV_t)(void*, uintptr_t, void*, ...);
 typedef int32_t (*iEpppp_t)(void*, void*, void*, void*);
diff --git a/src/wrapped32/generated/wrapper32.c b/src/wrapped32/generated/wrapper32.c
index 4f24519f..4ced3a77 100644
--- a/src/wrapped32/generated/wrapper32.c
+++ b/src/wrapped32/generated/wrapper32.c
@@ -952,6 +952,7 @@ typedef int32_t (*iEpipp_t)(void*, int32_t, void*, void*);
 typedef int32_t (*iFpipp_t)(void*, int32_t, void*, void*);
 typedef int32_t (*iFpCCC_t)(void*, uint8_t, uint8_t, uint8_t);
 typedef int32_t (*iFpWWu_t)(void*, uint16_t, uint16_t, uint32_t);
+typedef int32_t (*iEpuiL_t)(void*, uint32_t, int32_t, uintptr_t);
 typedef int32_t (*iFpuLp_t)(void*, uint32_t, uintptr_t, void*);
 typedef int32_t (*iFpupi_t)(void*, uint32_t, void*, int32_t);
 typedef int32_t (*iFpupp_t)(void*, uint32_t, void*, void*);
@@ -2602,6 +2603,7 @@ void iEpipp_32(x64emu_t *emu, uintptr_t fcn) { iEpipp_t fn = (iEpipp_t)fcn; errn
 void iFpipp_32(x64emu_t *emu, uintptr_t fcn) { iFpipp_t fn = (iFpipp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(int32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); }
 void iFpCCC_32(x64emu_t *emu, uintptr_t fcn) { iFpCCC_t fn = (iFpCCC_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint8_t, R_ESP + 8), from_ptri(uint8_t, R_ESP + 12), from_ptri(uint8_t, R_ESP + 16)); }
 void iFpWWu_32(x64emu_t *emu, uintptr_t fcn) { iFpWWu_t fn = (iFpWWu_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint16_t, R_ESP + 8), from_ptri(uint16_t, R_ESP + 12), from_ptri(uint32_t, R_ESP + 16)); }
+void iEpuiL_32(x64emu_t *emu, uintptr_t fcn) { iEpuiL_t fn = (iEpuiL_t)fcn; errno = emu->libc_err; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptri(int32_t, R_ESP + 12), from_ulong(from_ptri(ulong_t, R_ESP + 16))); emu->libc_err = errno; }
 void iFpuLp_32(x64emu_t *emu, uintptr_t fcn) { iFpuLp_t fn = (iFpuLp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ulong(from_ptri(ulong_t, R_ESP + 12)), from_ptriv(R_ESP + 16)); }
 void iFpupi_32(x64emu_t *emu, uintptr_t fcn) { iFpupi_t fn = (iFpupi_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptri(int32_t, R_ESP + 16)); }
 void iFpupp_32(x64emu_t *emu, uintptr_t fcn) { iFpupp_t fn = (iFpupp_t)fcn; R_EAX = fn(from_ptriv(R_ESP + 4), from_ptri(uint32_t, R_ESP + 8), from_ptriv(R_ESP + 12), from_ptriv(R_ESP + 16)); }
diff --git a/src/wrapped32/generated/wrapper32.h b/src/wrapped32/generated/wrapper32.h
index a7175dc9..3fb7b43b 100644
--- a/src/wrapped32/generated/wrapper32.h
+++ b/src/wrapped32/generated/wrapper32.h
@@ -902,6 +902,7 @@ void iEpipp_32(x64emu_t *emu, uintptr_t fnc);
 void iFpipp_32(x64emu_t *emu, uintptr_t fnc);
 void iFpCCC_32(x64emu_t *emu, uintptr_t fnc);
 void iFpWWu_32(x64emu_t *emu, uintptr_t fnc);
+void iEpuiL_32(x64emu_t *emu, uintptr_t fnc);
 void iFpuLp_32(x64emu_t *emu, uintptr_t fnc);
 void iFpupi_32(x64emu_t *emu, uintptr_t fnc);
 void iFpupp_32(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped32/wrappedlibc_private.h b/src/wrapped32/wrappedlibc_private.h
index ba7670e6..a31384d0 100755
--- a/src/wrapped32/wrappedlibc_private.h
+++ b/src/wrapped32/wrappedlibc_private.h
@@ -184,7 +184,7 @@ GOM(__ctype_tolower_loc, pEEv)
 DATAM(__ctype_toupper, 4)
 GOM(__ctype_toupper_loc, pEEv)
 // __curbrk // type B
-//GO(cuserid, pEp)
+GO(cuserid, tEp)
 GOM(__cxa_atexit, iEEppp) //%%
 GOM(atexit, iEEp)           //%% just in case
 GOM(__cxa_finalize, vEEp) //%%
@@ -2173,7 +2173,7 @@ GOWM(_ITM_deregisterTMCloneTable, vEEp) //%%
 GOM(__umoddi3, UEUU)        //%%,noE
 GOM(__udivdi3, UEUU)        //%%,noE
 GOM(__divdi3, IEII)         //%%,noE
-//GOM(__poll_chk, iEpuii)     //%%,noE
+GOM(__poll_chk, iEpuiL)     //%%,noE
 
 GO(fallocate64, iEiiII)