diff options
| author | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-10-30 17:25:49 +0100 |
|---|---|---|
| committer | ManoloFLTK <41016272+ManoloFLTK@users.noreply.github.com> | 2019-10-30 17:25:49 +0100 |
| commit | 2f64c6a86194db91be2ca873036b683f8f5b8739 (patch) | |
| tree | b550a610346859721e378fb602fbeec91c80d4da /src/drivers/X11/Fl_X11_System_Driver.cxx | |
| parent | ffcf8bd0b78255ad7ad3a62a5826c1fa6096cd5e (diff) | |
Concentrate source code that supports Darwin + XQuartz + fink as test platform
Diffstat (limited to 'src/drivers/X11/Fl_X11_System_Driver.cxx')
| -rw-r--r-- | src/drivers/X11/Fl_X11_System_Driver.cxx | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/src/drivers/X11/Fl_X11_System_Driver.cxx b/src/drivers/X11/Fl_X11_System_Driver.cxx index f406dce02..412d64667 100644 --- a/src/drivers/X11/Fl_X11_System_Driver.cxx +++ b/src/drivers/X11/Fl_X11_System_Driver.cxx @@ -520,13 +520,6 @@ int Fl_X11_System_Driver::utf8locale() { #if HAVE_DLSYM && HAVE_DLFCN_H #include <dlfcn.h> // for dlopen et al -static void* fl_dlopen(const char *filename1, const char *filename2) -{ - void *ptr = dlopen(filename1, RTLD_LAZY | RTLD_GLOBAL); - if (!ptr) ptr = dlopen(filename2, RTLD_LAZY | RTLD_GLOBAL); - return ptr; -} - bool Fl_X11_System_Driver::probe_for_GTK(int major, int minor, void **ptr_gtk) { typedef void (*init_t)(int*, void*); *ptr_gtk = NULL; @@ -536,18 +529,14 @@ bool Fl_X11_System_Driver::probe_for_GTK(int major, int minor, void **ptr_gtk) { *ptr_gtk = RTLD_DEFAULT; // Caution: NULL under linux, not-NULL under Darwin } else { // Try first with GTK3 - *ptr_gtk = fl_dlopen("libgtk-3.so", "libgtk-3.so.0"); + *ptr_gtk = Fl::system_driver()->dlopen("libgtk3.0.so"); if (*ptr_gtk) { #ifdef DEBUG puts("selected GTK-3\n"); #endif } else { // Try then with GTK2 -# ifdef __APPLE_CC__ // allows testing on Darwin + X11 - *ptr_gtk = ::dlopen("/sw/lib/libgtk-x11-2.0.dylib", RTLD_LAZY | RTLD_GLOBAL); -#else - *ptr_gtk = fl_dlopen("libgtk-x11-2.0.so", "libgtk-x11-2.0.so.0"); -#endif + *ptr_gtk = Fl::system_driver()->dlopen("libgtk-x11-2.0.so"); } if (*ptr_gtk) { #ifdef DEBUG |
