Blame SOURCES/gpm-1.20.1-weak-wgetch.patch

ebbdd0
--- gpm-1.20.1/src/lib/libcurses.c.weak-wgetch	2002-12-24 17:57:16.000000000 -0500
ebbdd0
+++ gpm-1.20.1/src/lib/libcurses.c	2004-03-22 15:51:24.000000000 -0500
ebbdd0
@@ -41,7 +41,12 @@
ebbdd0
 #endif /* HAVE_NCURSES_CURSES_H */
ebbdd0
 #endif /* HAVE_NCURSES_H */
ebbdd0
 
ebbdd0
-#define GET(win) ((win) ? wgetch(win) : getch())
ebbdd0
+/* If win != NULL, it must have been created by ncurses anyway.
ebbdd0
+   Avoid circular library dependencies.  */
ebbdd0
+#pragma weak wgetch
ebbdd0
+#pragma weak stdscr
ebbdd0
+
ebbdd0
+#define GET(win) ((win && wgetch) ? wgetch(win) : getch())
ebbdd0
 
ebbdd0
 int Gpm_Wgetch(WINDOW *win)
ebbdd0
 {
ebbdd0
--- gpm-1.20.1/configure.ac.weak-wgetch	2004-03-22 15:49:51.000000000 -0500
ebbdd0
+++ gpm-1.20.1/configure.ac	2004-03-22 15:51:24.000000000 -0500
ebbdd0
@@ -115,7 +115,7 @@
ebbdd0
             AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
ebbdd0
         else :; fi
ebbdd0
     done
ebbdd0
-    SHARED_LIBS="$LIBS $TERMLIBS -lc"
ebbdd0
+    SHARED_LIBS="-lc"
ebbdd0
     LIBS=$SAVELIBS ;;
ebbdd0
 esac