From: ceriel Date: Thu, 29 Jan 1987 13:01:28 +0000 (+0000) Subject: don't use a sgttyb struct X-Git-Tag: release-5-5~4881 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=bc8229b9520c8fde619aea37fa07f882c323fb90;p=ack.git don't use a sgttyb struct --- diff --git a/lang/cem/libcc/gen/isatty.c b/lang/cem/libcc/gen/isatty.c index 5152801ad..4fa9cad35 100644 --- a/lang/cem/libcc/gen/isatty.c +++ b/lang/cem/libcc/gen/isatty.c @@ -1,8 +1,10 @@ -#include - isatty(f) { - struct sgttyb ttyb; + char buf[128]; + /* not a sgttyb struct; it might not be large enough; + I know for a fact that it is'nt large enough on PC/IX, + where gtty is an ioctl(..., TCGETA, ...) + */ if (gtty(f, &ttyb) < 0) return 0; return 1;