don't use a sgttyb struct
This commit is contained in:
parent
b9d428f3bb
commit
cc5353d505
@ -1,8 +1,10 @@
|
|||||||
#include <sgtty.h>
|
|
||||||
|
|
||||||
isatty(f)
|
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;
|
if (gtty(f, &ttyb) < 0) return 0;
|
||||||
return 1;
|
return 1;
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user