zsh-workers
 help / color / mirror / code / Atom feed
From: Roderick Schertler <roderick@ibcinc.com>
To: zsh-workers@ibcinc.com
Subject: Re: typeahead fix
Date: Mon, 12 Jun 1995 13:27:45 -0400	[thread overview]
Message-ID: <1675.802978065@ibcinc.com> (raw)
In-Reply-To: Richard Coleman's message of Thu, 08 Jun 1995 14:59:54 -0400

On Thu, 08 Jun 1995 14:59:54 -0400, Richard Coleman <coleman@math.gatech.edu> 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
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 <sys/ioctl.h>
+# define CLOBBERS_TYPEAHEAD
+# define NO_TTY_DISCIPLINE
+#endif


             reply	other threads:[~1995-06-12 22:28 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
1995-06-12 17:27 Roderick Schertler [this message]
  -- strict thread matches above, loose matches on Subject: below --
1995-06-08 11:17 Ultrix " P.Stephenson
1995-06-08 18:59 ` Richard Coleman

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1675.802978065@ibcinc.com \
    --to=roderick@ibcinc.com \
    --cc=zsh-workers@ibcinc.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).