about summary refs log tree commit diff stats
path: root/src
diff options
context:
space:
mode:
authorptitSeb <sebastien.chev@gmail.com>2021-03-08 17:07:45 +0100
committerptitSeb <sebastien.chev@gmail.com>2021-03-08 17:07:45 +0100
commit76f5319b0534be11df62944ffdfb2cf7e2576508 (patch)
tree37845b3a97f6e268bf4e045d86e43d314cba68c2 /src
parent448e5155a416cd3c71ed90480438a0d9f8c2b700 (diff)
downloadbox64-76f5319b0534be11df62944ffdfb2cf7e2576508.tar.gz
box64-76f5319b0534be11df62944ffdfb2cf7e2576508.zip
Fixed a few wrapped functions
Diffstat (limited to 'src')
-rw-r--r--src/wrapped/generated/functions_list.txt1
-rw-r--r--src/wrapped/generated/wrapper.c2
-rw-r--r--src/wrapped/generated/wrapper.h1
-rwxr-xr-xsrc/wrapped/wrappedlibc_private.h14
-rwxr-xr-xsrc/wrapped/wrappedlibdl.c2
-rwxr-xr-xsrc/wrapped/wrappedlibx11.c18
-rwxr-xr-xsrc/wrapped/wrappedlibx11_private.h4
-rwxr-xr-xsrc/wrapped/wrappedxinerama_private.h2
8 files changed, 15 insertions, 29 deletions
diff --git a/src/wrapped/generated/functions_list.txt b/src/wrapped/generated/functions_list.txt
index b07dff88..20157fc9 100644
--- a/src/wrapped/generated/functions_list.txt
+++ b/src/wrapped/generated/functions_list.txt
@@ -112,6 +112,7 @@
 #() dFpp
 #() LFpi
 #() LFpL
+#() LFpp
 #() pFEp
 #() pFii
 #() pFip
diff --git a/src/wrapped/generated/wrapper.c b/src/wrapped/generated/wrapper.c
index 44fc6f31..b1b965c8 100644
--- a/src/wrapped/generated/wrapper.c
+++ b/src/wrapped/generated/wrapper.c
@@ -145,6 +145,7 @@ typedef double (*dFdp_t)(double, void*);
 typedef double (*dFpp_t)(void*, void*);
 typedef uintptr_t (*LFpi_t)(void*, int32_t);
 typedef uintptr_t (*LFpL_t)(void*, uintptr_t);
+typedef uintptr_t (*LFpp_t)(void*, void*);
 typedef void* (*pFEp_t)(x64emu_t*, void*);
 typedef void* (*pFii_t)(int32_t, int32_t);
 typedef void* (*pFip_t)(int32_t, void*);
@@ -961,6 +962,7 @@ void dFdp(x64emu_t *emu, uintptr_t fcn) { dFdp_t fn = (dFdp_t)fcn; emu->xmm[0].d
 void dFpp(x64emu_t *emu, uintptr_t fcn) { dFpp_t fn = (dFpp_t)fcn; emu->xmm[0].d[0]=fn((void*)R_RDI, (void*)R_RSI); }
 void LFpi(x64emu_t *emu, uintptr_t fcn) { LFpi_t fn = (LFpi_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (int32_t)R_RSI); }
 void LFpL(x64emu_t *emu, uintptr_t fcn) { LFpL_t fn = (LFpL_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (uintptr_t)R_RSI); }
+void LFpp(x64emu_t *emu, uintptr_t fcn) { LFpp_t fn = (LFpp_t)fcn; R_RAX=(uintptr_t)fn((void*)R_RDI, (void*)R_RSI); }
 void pFEp(x64emu_t *emu, uintptr_t fcn) { pFEp_t fn = (pFEp_t)fcn; R_RAX=(uintptr_t)fn(emu, (void*)R_RDI); }
 void pFii(x64emu_t *emu, uintptr_t fcn) { pFii_t fn = (pFii_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (int32_t)R_RSI); }
 void pFip(x64emu_t *emu, uintptr_t fcn) { pFip_t fn = (pFip_t)fcn; R_RAX=(uintptr_t)fn((int32_t)R_RDI, (void*)R_RSI); }
diff --git a/src/wrapped/generated/wrapper.h b/src/wrapped/generated/wrapper.h
index 41e078bd..7e4773da 100644
--- a/src/wrapped/generated/wrapper.h
+++ b/src/wrapped/generated/wrapper.h
@@ -142,6 +142,7 @@ void dFdp(x64emu_t *emu, uintptr_t fnc);
 void dFpp(x64emu_t *emu, uintptr_t fnc);
 void LFpi(x64emu_t *emu, uintptr_t fnc);
 void LFpL(x64emu_t *emu, uintptr_t fnc);
+void LFpp(x64emu_t *emu, uintptr_t fnc);
 void pFEp(x64emu_t *emu, uintptr_t fnc);
 void pFii(x64emu_t *emu, uintptr_t fnc);
 void pFip(x64emu_t *emu, uintptr_t fnc);
diff --git a/src/wrapped/wrappedlibc_private.h b/src/wrapped/wrappedlibc_private.h
index 4ac465a5..5a37063d 100755
--- a/src/wrapped/wrappedlibc_private.h
+++ b/src/wrapped/wrappedlibc_private.h
@@ -487,11 +487,11 @@ GOM(getcontext, iFEp)   //Weak
 //GO(getdirentries64, 
 //GO(getdomainname, 
 //GO(__getdomainname_chk, 
-//GOW(getdtablesize, 
-//GOW(getegid, 
+GOW(getdtablesize, iFv)
+GOW(getegid, iFv)
 //GO(getentropy, 
-//GO(getenv, 
-//GOW(geteuid, 
+GO(getenv, pFp)
+GOW(geteuid, pFv)
 //GO(getfsent, 
 //GO(getfsfile, 
 //GO(getfsspec, 
@@ -2184,9 +2184,9 @@ GO(__wctomb_chk, iFpuL)
 //GOW(wctrans, 
 //GO(__wctrans_l, 
 //GOW(wctrans_l, 
-GOW(wctype, uFp)
-GOW(wctype_l, uFpp)
-GO(__wctype_l, uFpp)
+GOW(wctype, LFp)
+GOW(wctype_l, LFpp)
+GO(__wctype_l, LFpp)
 //GO(wcwidth, 
 //GOI(wmemchr, 
 //GOI(wmemcmp, 
diff --git a/src/wrapped/wrappedlibdl.c b/src/wrapped/wrappedlibdl.c
index 95c23f7f..9074cd96 100755
--- a/src/wrapped/wrappedlibdl.c
+++ b/src/wrapped/wrappedlibdl.c
@@ -186,7 +186,7 @@ int my_dlsym_lib(library_t* lib, const char* rsymbol, uintptr_t *start, uintptr_
 void* my_dlsym(x64emu_t* emu, void *handle, void *symbol)
 {
     dlprivate_t *dl = emu->context->dlprivate;
-    uintptr_t start, end;
+    uintptr_t start = 0, end = 0;
     char* rsymbol = (char*)symbol;
     CLEARERR
     if(dlsym_error && box64_log<LOG_DEBUG) {
diff --git a/src/wrapped/wrappedlibx11.c b/src/wrapped/wrappedlibx11.c
index 0db63472..51d71079 100755
--- a/src/wrapped/wrappedlibx11.c
+++ b/src/wrapped/wrappedlibx11.c
@@ -744,24 +744,6 @@ EXPORT void* my_XESetEventToWire(x64emu_t* emu, void* display, int32_t event_num
     return reverse_event_to_wireFct(lib, ret);
 }
 
-EXPORT int my_XCloseDisplay(x64emu_t* emu, void* display)
-{
-    library_t* lib = emu->context->x11lib;
-    x11_my_t *my = (x11_my_t *)lib->priv.w.p2;
-
-    int ret = my->XCloseDisplay(display);
-    return ret;
-}
-
-EXPORT void* my_XOpenDisplay(x64emu_t* emu, void* d)
-{
-    library_t* lib = emu->context->x11lib;
-    x11_my_t *my = (x11_my_t *)lib->priv.w.p2;
-
-    void* ret = my->XOpenDisplay(d);
-    return ret;
-}
-
 EXPORT int my_XRegisterIMInstantiateCallback(x64emu_t* emu, void* d, void* db, void* res_name, void* res_class, void* cb, void* data)
 {
     library_t* lib = emu->context->x11lib;
diff --git a/src/wrapped/wrappedlibx11_private.h b/src/wrapped/wrappedlibx11_private.h
index ac6270b7..7894cf1d 100755
--- a/src/wrapped/wrappedlibx11_private.h
+++ b/src/wrapped/wrappedlibx11_private.h
@@ -71,7 +71,7 @@ GO(XCheckWindowEvent, iFpplp)
 GO(XClearArea, iFppiiuui)
 GO(XClearWindow, iFpp)
 GO(XClipBox, iFpp)
-GOM(XCloseDisplay, iFEp)
+GO(XCloseDisplay, iFp)
 GO(XCloseIM, iFp)
 // _XCloseLC
 //GO(XCloseOM
@@ -806,7 +806,7 @@ GO(XNoOp, iFp)
 // _XNoticePutBitmap
 GO(XOffsetRegion, iFpii)
 //GO(XOMOfOC
-GOM(XOpenDisplay, pFEp)
+GO(XOpenDisplay, pFp)
 GO(XOpenIM, uFpppp)
 // _XOpenLC
 //GO(XOpenOM
diff --git a/src/wrapped/wrappedxinerama_private.h b/src/wrapped/wrappedxinerama_private.h
index 913a8be1..ddc9c299 100755
--- a/src/wrapped/wrappedxinerama_private.h
+++ b/src/wrapped/wrappedxinerama_private.h
@@ -4,7 +4,7 @@
 
 GO(XineramaIsActive, iFp)
 GO(XineramaQueryExtension, iFppp)
-GO(XineramaQueryScreens, iFpp)
+GO(XineramaQueryScreens, pFpp)
 GO(XineramaQueryVersion, iFppp)
 GO(XPanoramiXAllocInfo, pFv)
 GO(XPanoramiXGetScreenCount, iFppp)