mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-15 11:00:04 +08:00
a302b48c21
* libc/sys/arc/Makefile.am: New file. * libc/sys/arc/Makefile.in: Ditto. * libc/sys/arc/aclocal.m4: Ditto. * libc/sys/arc/configure: Ditto. * libc/sys/arc/configure.in: Ditto. * libc/sys/arc/crt0.S: Ditto. * libc/sys/arc/isatty.c: Ditto. * libc/sys/arc/mem-layout.c: Ditto. * libc/sys/arc/sbrk.c: Ditto. * libc/sys/arc/syscalls.c: Ditto. * libc/sys/arc/sys/syscall.h: Ditto.
18 lines
239 B
C
18 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;
|
|
}
|