ttyname.c
Joel Sherrill
joel.sherrill@oarcorp.com
Tue Nov 18 23:15:00 GMT 2008
Hi,
With RTEMS, we build newlib before the OS. We do not have
access to termios yet. So the new ttyname.c does not compile
for RTEMS inside newlib. Would it be OK to use isatty()
instead of this?
/* Must be a terminal. */
if (tcgetattr (fd, &tty) < 0)
return errno; /* Can be EBADF or ENOTTY */
newlib already assumes isatty() exists.
Attached is a patch.
2008-11-18 Joel Sherrill <joel.sherrill@oarcorp.com>
* libc/unix/ttyname.c: Use isatty() instead of tcgetattr().
--
Joel Sherrill, Ph.D. Director of Research & Development
joel.sherrill@OARcorp.com On-Line Applications Research
Ask me about RTEMS: a free RTOS Huntsville AL 35805
Support Available (256) 722-9985
-------------- next part --------------
A non-text attachment was scrubbed...
Name: ttyname.diff
Type: text/x-patch
Size: 881 bytes
Desc: not available
URL: <http://sourceware.org/pipermail/newlib/attachments/20081118/ed98a754/attachment.bin>
More information about the Newlib
mailing list