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

Re: typeahead fix

On Thu, 08 Jun 1995 14:59:54 -0400, Richard Coleman <coleman@xxxxxxxxxxxxxxx> said:

> I've looked through the configuration scripts for zsh 2.5.03 and it
> defines CLOBBERS_TYPEAHEAD for ultrix and dgux.

I found this myself at beta 7 and I've been sitting on a patch, pending
making it configure-friendly.  Sorry about that.  (I still haven't made
it configure-friendly.)

Two things turned up when I re-defined CLOBBERS_TYPEAHEAD for DGUX:

  - FIONREAD wasn't being defined because <sys/ioctl.h> wasn't being
    included.  ioctl.h is only included if TIOCGWINSZ isn't defined in
    termios.h (and if it is defined in ioctl.h).  There are a couple of
    places in the source which test macros defined in ioctl.h directly
    (eg FIONREAD, and TIOCSETD as I learned).  If that continues to be
    the case I think that ioctl.h should be included unconditionally.

  - After I included <sys/ioctl.h> a couple of other parts of the code
    started being used, and one of them turned up a bug in the OS:  Under
    some circumstances (in emacs when piping text through zsh and
    reading back the result) the ioctl() to set the line discipline
    hangs.  In DGUX starting with rev 5.4 line disciplines 0 and 1 have
    been merged so setting the discipline to NTTYDISC should
    theoretically be superfluous but harmless.  Since it's obviously not
    harmless I disabled it.  (The system specific test is yucky but the
    best I can think to do.)

> What is the relationship/lineage between ultrix and dgux?

I think that Ultrix is a derivative of BSD 4.3.  DGUX is a SVR4.

Roderick Schertler
International Bonded Couriers/Miami

diff -ur ./Src/init.c ../zsh/Src/init.c
--- ./Src/init.c	Mon Apr 17 21:42:17 1995
+++ ../zsh/Src/init.c	Tue Apr 25 17:59:05 1995
@@ -305,7 +305,7 @@
 	SHTTY = movefd((isatty(0)) ? dup(0) : open("/dev/tty", O_RDWR));
 	if (SHTTY == -1) opts[MONITOR] = OPT_UNSET;
 	else {
-# if defined(TIOCSETD) && defined(NTTYDISC)
+# if defined(TIOCSETD) && defined(NTTYDISC) && !defined(NO_TTY_DISCIPLINE)
         int ldisc = NTTYDISC;
         ioctl(SHTTY, TIOCSETD, (char *)&ldisc);
diff -ur ./Src/system.h ../zsh/Src/system.h
--- ./Src/system.h	Mon Apr 17 21:42:06 1995
+++ ../zsh/Src/system.h	Tue Apr 25 18:00:14 1995
@@ -481,3 +481,9 @@
 extern short ospeed;
+#ifdef DGUX
+# include <sys/ioctl.h>

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