Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

3.0.2 dgux typeahead patch



The typeahead kluge which is use on Ultrix is necessary for dgux as
well.  Additionally, it's necessary to include ioctl.h in zle_main.c
otherwise FIONREAD won't be defined so the kluge won't kick in.  (Maybe
this should be done in system.h instead.)

Otherwise everything works wonderfully, thanks for the great work.

Index: Src/zle_main.c
Prereq:  2.29 
--- Src/zle_main.c	Tue Dec 17 15:14:11 1996
+++ ../zsh/Src/zle_main.c	Mon Dec 23 16:54:04 1996
@@ -47,6 +47,9 @@
 #define ZLEGLOBALS
 #define ZLE
 #include "zsh.h"
+#ifdef CLOBBERS_TYPEAHEAD
+#  include <sys/ioctl.h>	/* for FIONREAD */
+#endif
 
 static int emacs_cur_bindtab[256], eofchar, eofsent;
 static int viins_cur_bindtab[256];
Index: configure.in
Prereq:  2.28 
--- configure.in	Tue Dec 17 15:14:12 1996
+++ ../zsh/configure.in	Mon Dec 23 16:37:36 1996
@@ -592,17 +592,21 @@
 ])
 AC_DEFINE_UNQUOTED(WTMP_FILE_CONFIG, "$zsh_cv_path_wtmp")
 
-dnl ----------------------------
-dnl TYPEAHEAD KLUDGE FOR ULTRIX
-dnl ----------------------------
+dnl ----------------
+dnl TYPEAHEAD KLUDGE
+dnl ----------------
 dnl Some systems clobber typeahead when you go from canonical input
 dnl processing to non-canonical, so we need a FIONREAD ioctl.
 dnl I don't know how to check this with configure, so I am using the
 dnl system names directly.
 dnl The doubled square brackets are necessary because autoconf uses m4.
 AC_CACHE_CHECK(if typeahead needs FIONREAD, zsh_cv_sys_clobbers_typeahead,
-[test `echo $host_os | sed 's/^\([[a-z]]*\).*/\1/'` = ultrix &&
-zsh_cv_sys_clobbers_typeahead=yes || zsh_cv_sys_clobbers_typeahead=no])
+[case x-$host_os in
+    x-ultrix* | x-dgux*)
+	zsh_cv_sys_clobbers_typeahead=yes;;
+    *)
+	zsh_cv_sys_clobbers_typeahead=no;;
+esac])
 if test $zsh_cv_sys_clobbers_typeahead = yes; then
   AC_DEFINE(CLOBBERS_TYPEAHEAD)
 fi

-- 
Roderick Schertler
roderick@xxxxxxxx



Messages sorted by: Reverse Date, Date, Thread, Author