Pārlūkot izejas kodu

don't use a sgttyb struct

ceriel 37 gadi atpakaļ
vecāks
revīzija
bc8229b952
1 mainītis faili ar 5 papildinājumiem un 3 dzēšanām
  1. 5 3
      lang/cem/libcc/gen/isatty.c

+ 5 - 3
lang/cem/libcc/gen/isatty.c

@@ -1,8 +1,10 @@
-#include <sgtty.h>
-
 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;