Mail Archives: djgpp-workers/2003/03/01/08:38:03
Hello.
Eli Zaretskii wrote:
>
> > Date: Thu, 27 Feb 2003 14:40:28 +0000
> > From: "Richard Dawe" <rich AT phekda DOT freeserve DOT co DOT uk>
> >
> > I noticed the other day that isatty uses values rather than using
> > the constants from <libc/getdinfo.h>. So I fixed that. I also made
> > it use a _get_dev_info call, rather than duplicating that code.
> > Using _get_dev_info means that it will detect bad file descriptors
> > and return errno == EBADF and -1 (as required by POSIX).
> > I also added a test program. See the patch below.
> >
> > OK to commit?
>
> Yes, thanks.
Committed.
> Please add something to wc204.txi about isatty testing invalid
> handles and returning EBADF, unlike in previous versions.
Yes, of course. Thanks for catching that! I added this text to
src/docs/kb/wc204.txi.
"The function @code{isatty} now checks whether the file descriptor
passed to it is a valid. If not, it will fail and set @code{errno} to
@code{EBADF}."
Bye, Rich =]
--
Richard Dawe [ http://www.phekda.freeserve.co.uk/richdawe/ ]
- Raw text -