Updated patch for readline, removing a couple __BEOS__ workarounds that are no longer needed on Haiku, and added a workaround for Haiku not having the non-posix ECHOCTL, not sure if this is a correct fix, but it allows it to compile.

This commit is contained in:
Scott McCreary
2009-06-29 19:20:32 +00:00
parent 19c8634b47
commit 6bd6f69256

View File

@@ -0,0 +1,41 @@
diff -urN readline-6.0/configure.in readline-6.0-haiku/configure.in
--- readline-6.0/configure.in 2009-06-29 10:44:13.000000000 +0000
+++ readline-6.0-haiku/configure.in 2009-06-29 10:39:19.000000000 +0000
@@ -85,6 +85,9 @@
i[[3456]]86-*-beos*)
cross_cache=${srcdir}/cross-build/x86-beos.cache
;;
+ i[[3456]]86-*-haiku*)
+ cross_cache=${srcdir}/cross-build/x86-haiku.cache
+ ;;
*) echo "configure: cross-compiling for $host is not supported" >&2
;;
esac
diff -urN readline-6.0/rltty.c readline-6.0-haiku/rltty.c
--- readline-6.0/rltty.c 2009-06-29 10:44:16.000000000 +0000
+++ readline-6.0-haiku/rltty.c 2009-06-29 11:21:11.000000000 +0000
@@ -238,7 +238,12 @@
TIOTYPE oldtio, *tiop;
{
_rl_echoing_p = (oldtio.sgttyb.sg_flags & ECHO);
+
+#if defined (ECHOCTL)
_rl_echoctl = (oldtio.sgttyb.sg_flags & ECHOCTL);
+#else
+ _rl_echoctl = (oldtio.sgttyb.sg_flags);
+#endif
/* Copy the original settings to the structure we're going to use for
our settings. */
@@ -517,7 +522,11 @@
TIOTYPE oldtio, *tiop;
{
_rl_echoing_p = (oldtio.c_lflag & ECHO);
+#if defined (ECHOCTL)
_rl_echoctl = (oldtio.c_lflag & ECHOCTL);
+#else
+ _rl_echoctl = (oldtio.c_lflag);
+#endif
tiop->c_lflag &= ~(ICANON | ECHO);