summaryrefslogtreecommitdiffstats
path: root/newlib/libc/syscalls/sysisatty.c
diff options
context:
space:
mode:
Diffstat (limited to 'newlib/libc/syscalls/sysisatty.c')
-rw-r--r--newlib/libc/syscalls/sysisatty.c15
1 files changed, 15 insertions, 0 deletions
diff --git a/newlib/libc/syscalls/sysisatty.c b/newlib/libc/syscalls/sysisatty.c
new file mode 100644
index 000000000..5a6b8d455
--- /dev/null
+++ b/newlib/libc/syscalls/sysisatty.c
@@ -0,0 +1,15 @@
+/* connector for isatty */
+
+#include <reent.h>
+#include <unistd.h>
+
+int
+_DEFUN (isatty, (fd),
+ int fd)
+{
+#ifdef REENTRANT_SYSCALLS_PROVIDED
+ return _isatty_r (_REENT, fd);
+#else
+ return _isatty (fd);
+#endif
+}