SHA256
3
0
forked from pool/gpm
gpm/gpm-weak-wgetch.patch

37 lines
1.1 KiB
Diff
Raw Normal View History

---
configure.ac.footer | 2 +-
src/lib/libcurses.c | 7 ++++++-
2 files changed, 7 insertions(+), 2 deletions(-)
Index: configure.ac.footer
===================================================================
--- configure.ac.footer.orig 2013-04-16 12:26:55.701393713 +0200
+++ configure.ac.footer 2013-04-16 12:29:05.441356326 +0200
@@ -148,7 +148,7 @@ No|no|N|n) SHARED_LIBS=-lc ;;
AC_CHECK_LIB($i, wgetch,,,$TERMLIBS)
else :; fi
done
- SHARED_LIBS="$LIBS $TERMLIBS -lc"
+ SHARED_LIBS="-lc"
LIBS=$SAVELIBS ;;
esac
Index: src/lib/libcurses.c
===================================================================
--- src/lib/libcurses.c.orig 2012-10-26 23:21:38.000000000 +0200
+++ src/lib/libcurses.c 2013-04-16 12:26:55.834390599 +0200
@@ -41,7 +41,12 @@
#endif /* HAVE_NCURSES_CURSES_H */
#endif /* HAVE_NCURSES_H */
-#define GET(win) ((win) ? wgetch(win) : getch())
+/* If win != NULL, it must have been created by ncurses anyway.
+ Avoid circular library dependencies. */
+#pragma weak wgetch
+#pragma weak stdscr
+
+#define GET(win) ((win && wgetch) ? wgetch(win) : getch())
int Gpm_Wgetch(WINDOW *win)
{