From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from eplet.mira.net.au (eplet.mira.net.au [203.9.190.17]) by werple.mira.net.au (8.6.12/8.6.9) with ESMTP id IAA02693 for ; Tue, 13 Jun 1995 08:28:34 +1000 Received: from gatech.edu (gatech.edu [130.207.244.244]) by eplet.mira.net.au (8.6.10/8.6.9A) with SMTP id GAA23966 for ; Tue, 13 Jun 1995 06:10:34 +1000 Received: from math (math.skiles.gatech.edu) by gatech.edu with SMTP id AA07586 (5.65c/Gatech-10.0-IDA); Mon, 12 Jun 1995 14:09:39 -0400 Received: by math (5.x/SMI-SVR4) id AA13856; Mon, 12 Jun 1995 14:06:42 -0400 Resent-Date: Mon, 12 Jun 1995 13:27:45 -0400 Old-Return-Path: In-Reply-To: Richard Coleman's message of Thu, 08 Jun 1995 14:59:54 -0400 To: zsh-workers@ibcinc.com Subject: Re: typeahead fix Date: Mon, 12 Jun 1995 13:27:45 -0400 Message-Id: <1675.802978065@ibcinc.com> From: Roderick Schertler Resent-Message-Id: <"sJ8Zi1.0.QO3.n88tl"@math> Resent-From: zsh-workers@math.gatech.edu X-Mailing-List: archive/latest/99 X-Loop: zsh-workers@math.gatech.edu Precedence: list Resent-Sender: zsh-workers-request@math.gatech.edu On Thu, 08 Jun 1995 14:59:54 -0400, Richard Coleman 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 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 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 roderick@ibcinc.com 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; #endif + +#ifdef DGUX +# include +# define CLOBBERS_TYPEAHEAD +# define NO_TTY_DISCIPLINE +#endif