2022-08-01 20:08:23 +00:00
|
|
|
#include <sgtty.h>
|
|
|
|
|
|
|
|
int isatty(int fd)
|
2018-06-13 12:44:25 +00:00
|
|
|
{
|
|
|
|
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, ...)
|
|
|
|
*/
|
|
|
|
|
2022-08-01 20:08:23 +00:00
|
|
|
if (gtty(fd, (void*) buf) < 0) return 0;
|
2018-06-13 12:44:25 +00:00
|
|
|
return 1;
|
|
|
|
}
|