Bug in isatty (errno setting/clearing)
Peter da Silva
peter at graffiti.UUCP
Mon Sep 2 23:21:11 AEST 1985
> I got out MY V6 manuals and the following is a quote from the getc(III)
>
> DIAGNOSTICS
> c-bit is set on EOF or error; from C, negative return indicates
> EOF. Moreover, 'errno' is set by this routine just as it is for
> a system call (see introduction (II)).
>
> Also putc, putw, fcreat, fflush, all happen to munge errno, as necessary.
>
> So in V6, we have errno munged by the library routines in section 3.
And in V6 putc didn't wreck arguments with side-effects like V7 putc does,
because it's a macro. It'd be hard to ensure the behaviour of errno in a
macro, I would think. At the least it'd slow things down (losing a bit of why
you made it a macro in the first place). Also is this from libc or libS?
More information about the Comp.bugs.4bsd.ucb-fixes
mailing list