diff --git a/src/wrapped/wrappedcurl.c b/src/wrapped/wrappedcurl.c index e51860807..183f22582 100644 --- a/src/wrapped/wrappedcurl.c +++ b/src/wrapped/wrappedcurl.c @@ -17,11 +17,8 @@ #include "callback.h" #include "elfloader.h" -#ifdef ANDROID - const char* curlName = "libcurl.so"; -#else - const char* curlName = "libcurl.so.4"; -#endif +const char* curlName = "libcurl.so.4"; +#define ALTNAME "libcurl.so" #define ALTNAME "libcurl-gnutls.so.4" #define LIBNAME curl diff --git a/src/wrapped/wrappeddbusmenuglib.c b/src/wrapped/wrappeddbusmenuglib.c index db7351154..2f0696ed7 100644 --- a/src/wrapped/wrappeddbusmenuglib.c +++ b/src/wrapped/wrappeddbusmenuglib.c @@ -18,11 +18,8 @@ #include "emu/x64emu_private.h" #include "callback.h" -#ifdef ANDROID - const char* dbusmenuglibName = "libdbusmenu-glib.so"; -#else - const char* dbusmenuglibName = "libdbusmenu-glib.so.4"; -#endif +const char* dbusmenuglibName = "libdbusmenu-glib.so.4"; +#define ALTNAME "libdbusmenu-glib.so" #define LIBNAME dbusmenuglib diff --git a/src/wrapped/wrappedglesv2.c b/src/wrapped/wrappedglesv2.c index 63b223587..60953a571 100644 --- a/src/wrapped/wrappedglesv2.c +++ b/src/wrapped/wrappedglesv2.c @@ -12,11 +12,8 @@ #include "librarian/library_private.h" #include "x64emu.h" -#ifdef ANDROID - const char* glesv2Name = "libGLESv2.so"; -#else - const char* glesv2Name = "libGLESv2.so.2"; -#endif +const char* glesv2Name = "libGLESv2.so.2"; +#define ALTNAME "libGLESv2.so" #define LIBNAME glesv2 diff --git a/src/wrapped/wrappedgmp.c b/src/wrapped/wrappedgmp.c index b9a2bbee9..03097bb04 100644 --- a/src/wrapped/wrappedgmp.c +++ b/src/wrapped/wrappedgmp.c @@ -19,6 +19,7 @@ #include "callback.h" const char* gmpName = "libgmp.so.10"; +#define ALTNAME "libgmp.so" #define LIBNAME gmp #include "generated/wrappedgmptypes.h" diff --git a/src/wrapped/wrappedidn2.c b/src/wrapped/wrappedidn2.c index b23e77f4d..875774050 100644 --- a/src/wrapped/wrappedidn2.c +++ b/src/wrapped/wrappedidn2.c @@ -12,6 +12,7 @@ #include "x64emu.h" const char* idn2Name = "libidn2.so.0"; +#define ALTNAME "libidn2.so" #define LIBNAME idn2 #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedkrb5.c b/src/wrapped/wrappedkrb5.c index 19b3c10e3..562cfe81e 100644 --- a/src/wrapped/wrappedkrb5.c +++ b/src/wrapped/wrappedkrb5.c @@ -16,11 +16,8 @@ #include "librarian.h" #include "callback.h" -#ifdef ANDROID - const char* krb5Name = "libkrb5.so"; -#else - const char* krb5Name = "libkrb5.so.3"; -#endif +const char* krb5Name = "libkrb5.so.3"; +#define ALTNAME "libkrb5.so" #define LIBNAME krb5 diff --git a/src/wrapped/wrappedldapr.c b/src/wrapped/wrappedldapr.c index 77eb2acd4..1debf5e0d 100644 --- a/src/wrapped/wrappedldapr.c +++ b/src/wrapped/wrappedldapr.c @@ -63,10 +63,6 @@ EXPORT int my_ldap_sasl_interactive_bind_s(x64emu_t* emu, void* ld, void* dn, vo return my->ldap_sasl_interactive_bind_s(ld, dn, mechs, sctrls, cctrls, flags, find_LDAP_SASL_INTERACT_PROC_Fct(f), defaults); } -#ifdef ANDROID -#define NEEDED_LIBS "liblber-2.4.so" -#else #define NEEDED_LIBS "liblber-2.4.so.2" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibdrm.c b/src/wrapped/wrappedlibdrm.c index a1d15e032..73005e578 100644 --- a/src/wrapped/wrappedlibdrm.c +++ b/src/wrapped/wrappedlibdrm.c @@ -19,6 +19,7 @@ #include "myalign.h" const char* libdrmName = "libdrm.so.2"; +#define ALTNAME "libdrm.so" #define LIBNAME libdrm #define ADDED_FUNCTIONS() \ diff --git a/src/wrapped/wrappedlibnettle8.c b/src/wrapped/wrappedlibnettle8.c index 785c33666..06728332b 100644 --- a/src/wrapped/wrappedlibnettle8.c +++ b/src/wrapped/wrappedlibnettle8.c @@ -19,6 +19,7 @@ #include "myalign.h" const char* libnettle8Name = "libnettle.so.8"; +#define ALTNAME "libnettle.so" #define LIBNAME libnettle8 #define ADDED_FUNCTIONS() diff --git a/src/wrapped/wrappedlibunistring2.c b/src/wrapped/wrappedlibunistring2.c index c444d962e..0df1f275d 100644 --- a/src/wrapped/wrappedlibunistring2.c +++ b/src/wrapped/wrappedlibunistring2.c @@ -12,6 +12,7 @@ #include "x64emu.h" const char* libunistring2Name = "libunistring.so.2"; +#define ALTNAME "libunistring.so" #define LIBNAME libunistring2 #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibx11.c b/src/wrapped/wrappedlibx11.c index 7da51e85a..fba0fa72a 100644 --- a/src/wrapped/wrappedlibx11.c +++ b/src/wrapped/wrappedlibx11.c @@ -1621,10 +1621,6 @@ EXPORT void* my__XGetRequest(x64emu_t* emu, my_XDisplay_t* dpy, uint8_t type, si AddAutomaticBridge(lib->w.bridge, vFp, *(void**)dlsym(lib->w.lib, "_XUnlockMutex_fn"), 0, "_XUnlockMutex_fn"); \ if(box64_x11threads) my->XInitThreads(); -#ifdef ANDROID -#define NEEDED_LIBS "libxcb.so" -#else #define NEEDED_LIBS "libxcb.so.1" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxcb.c b/src/wrapped/wrappedlibxcb.c index 81709f429..8fedfa418 100644 --- a/src/wrapped/wrappedlibxcb.c +++ b/src/wrapped/wrappedlibxcb.c @@ -49,10 +49,6 @@ EXPORT void my_xcb_disconnect(x64emu_t* emu, void* conn) del_xcb_connection(conn); } -#ifdef ANDROID -#define NEEDED_LIBS "libXau.so", "libXdmcp.so" -#else #define NEEDED_LIBS "libXau.so.6", "libXdmcp.so.6" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxcbcursor.c b/src/wrapped/wrappedlibxcbcursor.c index e4d1f2d22..aaddba1ff 100644 --- a/src/wrapped/wrappedlibxcbcursor.c +++ b/src/wrapped/wrappedlibxcbcursor.c @@ -17,11 +17,8 @@ #include "box64context.h" #include "emu/x64emu_private.h" -#ifdef ANDROID - const char* libxcbcursorName = "libxcb-cursor.so"; -#else - const char* libxcbcursorName = "libxcb-cursor.so.0"; -#endif +const char* libxcbcursorName = "libxcb-cursor.so.0"; +#define ALTNAME "libxcb-cursor.so" #define LIBNAME libxcbcursor diff --git a/src/wrapped/wrappedlibxcbres.c b/src/wrapped/wrappedlibxcbres.c index 52aa05960..1841476ec 100644 --- a/src/wrapped/wrappedlibxcbres.c +++ b/src/wrapped/wrappedlibxcbres.c @@ -17,11 +17,8 @@ #include "box64context.h" #include "emu/x64emu_private.h" -#ifdef ANDROID - const char* libxcbresName = "libxcb-res.so"; -#else - const char* libxcbresName = "libxcb-res.so.0"; -#endif +const char* libxcbresName = "libxcb-res.so.0"; +#define ALTNAME "libxcb-res.so" #define LIBNAME libxcbres diff --git a/src/wrapped/wrappedlibxcbxinput.c b/src/wrapped/wrappedlibxcbxinput.c index b5b55685e..e9962f9a1 100644 --- a/src/wrapped/wrappedlibxcbxinput.c +++ b/src/wrapped/wrappedlibxcbxinput.c @@ -17,11 +17,8 @@ #include "box64context.h" #include "emu/x64emu_private.h" -#ifdef ANDROID - const char* libxcbxinputName = "libxcb-xinput.so"; -#else - const char* libxcbxinputName = "libxcb-xinput.so.0"; -#endif +const char* libxcbxinputName = "libxcb-xinput.so.0"; +#define ALTNAME "libxcb-xinput.so" #define LIBNAME libxcbxinput #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxext.c b/src/wrapped/wrappedlibxext.c index 9d48a9a9e..e224b6429 100644 --- a/src/wrapped/wrappedlibxext.c +++ b/src/wrapped/wrappedlibxext.c @@ -387,10 +387,6 @@ EXPORT void* my_XextAddDisplay(x64emu_t* emu, void* extinfo, void* dpy, void* ex return ret; } -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libxcb.so", "libXau.so", "libdl.so", "libXdmcp.so" -#else #define NEEDED_LIBS "libX11.so.6", "libxcb.so.1", "libXau.so.6", "libdl.so.2", "libXdmcp.so.6" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxft.c b/src/wrapped/wrappedlibxft.c index bfe1dd64e..433828000 100644 --- a/src/wrapped/wrappedlibxft.c +++ b/src/wrapped/wrappedlibxft.c @@ -51,13 +51,6 @@ EXPORT void* my_XftFontOpen(x64emu_t* emu, void* dpy, int screen, uintptr_t* b) return ret; } - -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libfontconfig.so", "libXrender.so", "libfreetype.so" -#else #define NEEDED_LIBS "libX11.so.6", "libfontconfig.so.1", "libXrender.so.1", "libfreetype.so.6" -#endif - - #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxi.c b/src/wrapped/wrappedlibxi.c index 83d26428a..c502e304b 100644 --- a/src/wrapped/wrappedlibxi.c +++ b/src/wrapped/wrappedlibxi.c @@ -16,10 +16,6 @@ const char* libxiName = "libXi.so.6"; #define LIBNAME libxi -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libXext.so" -#else #define NEEDED_LIBS "libX11.so.6", "libXext.so.6" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxrandr.c b/src/wrapped/wrappedlibxrandr.c index 271af6b2d..439444934 100644 --- a/src/wrapped/wrappedlibxrandr.c +++ b/src/wrapped/wrappedlibxrandr.c @@ -22,10 +22,6 @@ const char* libxrandrName = "libXrandr.so.2"; #define LIBNAME libxrandr -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libXext.so", "libXrender.so" -#else #define NEEDED_LIBS "libX11.so.6", "libXext.so.6", "libXrender.so.1" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxt.c b/src/wrapped/wrappedlibxt.c index 2c851ddb5..b89333c78 100644 --- a/src/wrapped/wrappedlibxt.c +++ b/src/wrapped/wrappedlibxt.c @@ -216,10 +216,6 @@ EXPORT void my_XtAddRawEventHandler(x64emu_t* emu, void* w, uint32_t mask, int n my->XtAddRawEventHandler(w, mask, nonmaskable, findXtEventHandlerFct(f), data); } -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libXext.so" -#else #define NEEDED_LIBS "libX11.so.6", "libXext.so.6" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxtst.c b/src/wrapped/wrappedlibxtst.c index 4e83eabc9..bb226aaf8 100644 --- a/src/wrapped/wrappedlibxtst.c +++ b/src/wrapped/wrappedlibxtst.c @@ -68,10 +68,6 @@ EXPORT int my_XRecordEnableContext(x64emu_t* emu, void* display, void* context, return my->XRecordEnableContext(display, context, find_XRecordInterceptProc_Fct(cb), closure); } -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libXext.so" -#else #define NEEDED_LIBS "libX11.so.6", "libXext.so.6" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedlibxxf86vm.c b/src/wrapped/wrappedlibxxf86vm.c index aeb97060e..e19e95b13 100644 --- a/src/wrapped/wrappedlibxxf86vm.c +++ b/src/wrapped/wrappedlibxxf86vm.c @@ -22,10 +22,6 @@ const char* libxxf86vmName = "libXxf86vm.so.1"; #define LIBNAME libxxf86vm -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libXext.so" -#else #define NEEDED_LIBS "libX11.so.6", "libXext.so.6" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedpango.c b/src/wrapped/wrappedpango.c index 5a47288ae..5051084a6 100644 --- a/src/wrapped/wrappedpango.c +++ b/src/wrapped/wrappedpango.c @@ -17,11 +17,8 @@ #include "box64context.h" #include "emu/x64emu_private.h" -#ifdef ANDROID - const char* pangoName = "libpango-1.0.so"; -#else - const char* pangoName = "libpango-1.0.so.0"; -#endif +const char* pangoName = "libpango-1.0.so.0"; +#define ALTNAME "libpango-1.0.so" #define LIBNAME pango #include "generated/wrappedpangotypes.h" @@ -100,10 +97,6 @@ EXPORT void my_pango_attribute_init(x64emu_t* emu, void* attr, my_PangoAttrClass if(box64_nogtk) \ return -1; -#ifdef ANDROID -#define NEEDED_LIBS "libgobject-2.0.so", "libglib-2.0.so" -#else #define NEEDED_LIBS "libgobject-2.0.so.0", "libglib-2.0.so.0" -#endif #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedpulsemainloopglib.c b/src/wrapped/wrappedpulsemainloopglib.c index b2d7aa949..6bf20107a 100644 --- a/src/wrapped/wrappedpulsemainloopglib.c +++ b/src/wrapped/wrappedpulsemainloopglib.c @@ -17,11 +17,8 @@ #include "librarian.h" #include "myalign.h" -#ifdef ANDROID - const char* pulsemainloopglibName = "libpulse-mainloop-glib.so"; -#else - const char* pulsemainloopglibName = "libpulse-mainloop-glib.so.0"; -#endif +const char* pulsemainloopglibName = "libpulse-mainloop-glib.so.0"; +#define ALTNAME "libpulse-mainloop-glib.so" #define LIBNAME pulsemainloopglib @@ -41,11 +38,6 @@ EXPORT void* my_pa_glib_mainloop_get_api(x64emu_t* emu, void* mainloop) if(box64_nopulse) \ return -1; -#ifdef ANDROID -#define NEEDED_LIBS "libpulse.so" -#else #define NEEDED_LIBS "libpulse.so.0" -#endif - #include "wrappedlib_init.h" diff --git a/src/wrapped/wrappedxinerama.c b/src/wrapped/wrappedxinerama.c index ac53ac3ba..4bc5e3be1 100644 --- a/src/wrapped/wrappedxinerama.c +++ b/src/wrapped/wrappedxinerama.c @@ -16,10 +16,6 @@ const char* xineramaName = "libXinerama.so.1"; #define LIBNAME xinerama -#ifdef ANDROID -#define NEEDED_LIBS "libX11.so", "libXext.so" -#else #define NEEDED_LIBS "libX11.so.6", "libXext.so.6" -#endif #include "wrappedlib_init.h"