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

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