fixed more binutils issues (newer gcc/libc)
[zpugcc/jano.git] / toolchain / gcc / newlib / libc / posix / isatty.c
blob2732ca2a0aa7694964ea3365de21a8ce30e13402
1 /* isatty.c */
3 /* Dumb implementation so programs will at least run. */
5 #include <sys/stat.h>
7 int
8 _DEFUN(isatty, (fd), int fd)
10 struct stat buf;
12 if (fstat (fd, &buf) < 0)
13 return 0;
14 if (S_ISCHR (buf.st_mode))
15 return 1;
16 return 0;