#include <c-strcase.h>
#include <ftoastr.h>
+#include <dlfcn.h>
+
#include "lisp.h"
#include "blockinput.h"
#include "frame.h"
#include "fontset.h"
#include "composite.h"
#include "ccl.h"
-#include "dynlib.h"
#include "termhooks.h"
#include "termopts.h"
static int x_initialized = 0;
static unsigned x_display_id = 0;
static char *initial_display = NULL;
- static dynlib_handle_ptr *handle = NULL;
char *dpy_name;
+ static void *handle = NULL;
Lisp_Object lisp_dpy_name = Qnil;
block_input ();
dpyinfo->connection = -1;
if (!handle)
- handle = dynlib_open (NULL);
+ handle = dlopen (NULL, RTLD_LAZY);
#ifdef GDK_WINDOWING_X11
if (!strcmp (G_OBJECT_TYPE_NAME (dpy), "GdkX11Display") && handle)
{
void *(*gdk_x11_display_get_xdisplay) (GdkDisplay *)
- = dynlib_sym (handle, "gdk_x11_display_get_xdisplay");
+ = dlsym (handle, "gdk_x11_display_get_xdisplay");
int (*x_connection_number) (void *)
- = dynlib_sym (handle, "XConnectionNumber");
+ = dlsym (handle, "XConnectionNumber");
if (x_connection_number
&& gdk_x11_display_get_xdisplay)
{
struct wl_display *wl_dpy = gdk_wayland_display_get_wl_display (dpy);
int (*display_get_fd) (struct wl_display *)
- = dynlib_sym (handle, "wl_display_get_fd");
+ = dlsym (handle, "wl_display_get_fd");
if (display_get_fd)
dpyinfo->connection = display_get_fd (wl_dpy);