FreeBSD port (42): ptsname

Roland McGrath roland@redhat.com
Fri Sep 20 13:18:00 GMT 2002


> Still the caller (ptsname) needs a patch so that it doesn't convert
> the correct errno from __isatty to an incorrect one (EBADF to ENOTTY).

Thanks, I fixed that.  However, I don't see why you changed isatty in a
hairy way.  The ioctl call will set errno.  I just fixed it not to save and
restore it.  I've also made that file moot by adding bsd4.4/isatty.c that
just includes the sysdeps/posix one, which uses tcgetattr rather than
ioctl.  In bsd4.4 tcgetattr is just one ioctl (not the several in bsd), so
there is no extra overhead with it.  Anyway I suspect one day the old
ioctls will disappear and so should not be used.



More information about the Libc-alpha mailing list