diff options
Diffstat (limited to 'newlib/libc/posix/_isatty.c')
-rw-r--r-- | newlib/libc/posix/_isatty.c | 21 |
1 files changed, 0 insertions, 21 deletions
diff --git a/newlib/libc/posix/_isatty.c b/newlib/libc/posix/_isatty.c deleted file mode 100644 index 7d6ccae7c..000000000 --- a/newlib/libc/posix/_isatty.c +++ /dev/null @@ -1,21 +0,0 @@ -/* isatty.c */ - -/* Dumb implementation so programs will at least run. */ - -#include <sys/stat.h> -#include <errno.h> - -int -_DEFUN(_isatty, (fd), int fd) -{ - struct stat buf; - - if (fstat (fd, &buf) < 0) { - errno = EBADF; - return 0; - } - if (S_ISCHR (buf.st_mode)) - return 1; - errno = ENOTTY; - return 0; -} |