summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorPo Lu <luangruo@yahoo.com>2022-03-15 08:54:30 +0800
committerPo Lu <luangruo@yahoo.com>2022-03-15 08:54:30 +0800
commit3bf5c2a8381c9dac54c88c264091b94847abf1c3 (patch)
treee30b2f7f21f3207cfec20143547095db929f25fc /src
parente56eb02a256a9875dedb2d9bba11b1eff7f487f8 (diff)
downloademacs-3bf5c2a8381c9dac54c88c264091b94847abf1c3.tar.gz
Stop relying on dynlib for PGTK interrupt input
* src/pgtkterm.c (pgtk_term_init): Use dlopen and dlsym directly instead of dynlib functions. (bug#54378)
Diffstat (limited to 'src')
-rw-r--r--src/pgtkterm.c13
1 files changed, 7 insertions, 6 deletions
diff --git a/src/pgtkterm.c b/src/pgtkterm.c
index abcf18e11df..9f9768cf2ab 100644
--- a/src/pgtkterm.c
+++ b/src/pgtkterm.c
@@ -36,6 +36,8 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include <c-strcase.h>
#include <ftoastr.h>
+#include <dlfcn.h>
+
#include "lisp.h"
#include "blockinput.h"
#include "frame.h"
@@ -47,7 +49,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
#include "fontset.h"
#include "composite.h"
#include "ccl.h"
-#include "dynlib.h"
#include "termhooks.h"
#include "termopts.h"
@@ -6545,8 +6546,8 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name)
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 ();
@@ -6720,15 +6721,15 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name)
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)
@@ -6742,7 +6743,7 @@ pgtk_term_init (Lisp_Object display_name, char *resource_name)
{
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);