ncurses/ncurses-5.7-gpm.dif

27 lines
791 B
Plaintext
Raw Normal View History

--- ncurses/base/lib_mouse.c
+++ ncurses/base/lib_mouse.c 2010-01-12 10:24:16.223429669 +0000
@@ -380,6 +380,11 @@ allow_gpm_mouse(void)
{
bool result = FALSE;
+#ifdef weak_symbol
+ /* Danger Robinson: do not use dlopen for libgpm if already loaded */
+ if ((Gpm_Wgetch))
+ return FALSE;
+#endif
/* GPM does printf's without checking if stdout is a terminal */
if (isatty(fileno(stdout))) {
char *list = getenv("NCURSES_GPM_TERMS");
--- ncurses/curses.priv.h
+++ ncurses/curses.priv.h 2008-04-11 15:33:59.000000000 +0000
@@ -608,6 +608,9 @@ typedef struct {
#if USE_GPM_SUPPORT
#undef buttons /* term.h defines this, and gpm uses it! */
#include <gpm.h>
+#ifdef weak_symbol
+weak_symbol(Gpm_Wgetch);
+#endif
#ifdef HAVE_LIBDL
/* link dynamically to GPM */