don't use a sgttyb struct
This commit is contained in:
parent
ef85335f8f
commit
bc8229b952
1 changed files with 5 additions and 3 deletions
|
@ -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…
Add table
Reference in a new issue