1 /* Reentrant versions of isatty system call. */
7 /* Some targets provides their own versions of these functions. Those
8 targets should define REENTRANT_SYSCALLS_PROVIDED in TARGET_CFLAGS. */
11 #ifndef REENTRANT_SYSCALLS_PROVIDED
12 #define REENTRANT_SYSCALLS_PROVIDED
16 #ifdef REENTRANT_SYSCALLS_PROVIDED
18 int _dummy_isatty_syscalls
= 1;
22 /* We use the errno variable used by the system dependent layer. */
28 <<_isatty_r>>---Reentrant version of isatty
35 int _isatty_r(struct _reent *<[ptr]>,
39 This is a reentrant version of <<isatty>>. It
40 takes a pointer to the global data block, which holds
52 if ((ret
= _isatty (fd
)) == -1 && errno
!= 0)
53 _REENT_ERRNO(ptr
) = errno
;
57 #endif /* ! defined (REENTRANT_SYSCALLS_PROVIDED) */