* Re: typeahead fix
@ 1995-06-12 17:27 Roderick Schertler
0 siblings, 0 replies; 2+ messages in thread
From: Roderick Schertler @ 1995-06-12 17:27 UTC (permalink / raw)
To: zsh-workers
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
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: typeahead fix
1995-06-08 11:17 Ultrix " P.Stephenson
@ 1995-06-08 18:59 ` Richard Coleman
0 siblings, 0 replies; 2+ messages in thread
From: Richard Coleman @ 1995-06-08 18:59 UTC (permalink / raw)
To: zsh-workers
> In fact, the code is there already, #ifdef'd behind a test for
> CLOBBERS_TYPEAHEAD (actually, that was a bit of a giveaway). This is
> one of the old buildzsh definitions that hasn't made it into configure
> yet. The problem is that it's not that easy to test. I've therefore
> just added an ad hoc test for Ultrix to configure.in.
>
> By the way, there's another phantom preprocessor definition:
> TTY_NEEDS_DRAINING. Someone, somewhere may find this coming back to
> haunt them.
I've looked through the configuration scripts for zsh 2.5.03 and it
defines CLOBBERS_TYPEAHEAD for ultrix and dgux. It defines
TTY_NEEDS_DRAINING for ultrix. People on these machines should check
whether either of these are needed.
What is the relationship/lineage between ultrix and dgux?
I've changed the patch around a little. Test this and make sure it is
ok.
rc
*** configure.in 1995/05/23 03:50:13 1.23
--- configure.in 1995/06/08 18:36:36 1.25
***************
*** 414,419 ****
--- 414,433 ----
done
AC_DEFINE_UNQUOTED(WTMP_FILE_CONFIG, "$wtmp_file")
AC_MSG_RESULT($wtmp_file)
+
+ 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_MSG_CHECKING(if typeahead needs FIONREAD)
+ AC_CACHE_VAL(zsh_cv_clobbers_typeahead,
+ [test `echo $host_os | sed 's/^\([[a-z]]*\).*/\1/'` = ultrix &&
+ zsh_cv_clobbers_typeahead=yes || zsh_cv_clobbers_typeahead=no])
+ AC_MSG_RESULT($zsh_cv_clobbers_typeahead)
+ if test $zsh_cv_clobbers_typeahead = yes; then
+ AC_DEFINE(CLOBBERS_TYPEAHEAD)
+ fi
AC_OUTPUT(Makefile Src/Makefile Doc/Makefile Etc/Makefile Misc/Makefile \
Util/Makefile Functions/Makefile Startup_Files/Makefile, \
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~1995-06-12 22:28 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1995-06-12 17:27 typeahead fix Roderick Schertler
-- strict thread matches above, loose matches on Subject: below --
1995-06-08 11:17 Ultrix " P.Stephenson
1995-06-08 18:59 ` Richard Coleman
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).