isatty()

Vincent Rivière vincent.riviere@freesbee.fr
Thu Jan 3 11:09:00 GMT 2008


Hello.

I see in the sources that isatty() is not handled as the other syscalls:
- there is no _isatty_r() in reent
- there is no _isatty() at all
- there is no isatty() in syscalls
- libgloss implements directly isatty(), not _isatty()

There is the usual errno problem:
For example, the implementation of isatty() in libnosys fills "extern 
int errno", but the user applications will read __errno_r(_REENT) 
instead. Usually, the errno translation occurs in the _r function, but 
in this case, the _r function does not exist.

However, this is not a big issue, because errno is rarely read after 
calling isatty().

Is there a reason for the spacial handling of isatty() ?

-- 
Vincent Rivière



More information about the Newlib mailing list