From bc8229b9520c8fde619aea37fa07f882c323fb90 Mon Sep 17 00:00:00 2001 From: ceriel Date: Thu, 29 Jan 1987 13:01:28 +0000 Subject: [PATCH] don't use a sgttyb struct --- lang/cem/libcc/gen/isatty.c | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) 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; -- 2.34.1