This repository has been archived on 2025-02-12. You can view files and clone it, but you cannot make any changes to it's state, such as pushing and creating new issues, pull requests or comments.
pic32-newlib/newlib/libgloss/sparc/libsys/isatty.c
2009-02-02 03:03:19 +00:00

17 lines
239 B
C

/* isatty.c */
/* Dumb implementation so programs will at least run. */
#include <sys/stat.h>
int
isatty (int fd)
{
struct stat buf;
if (fstat (fd, &buf) < 0)
return 0;
if (S_ISCHR (buf.st_mode))
return 1;
return 0;
}