Relay-Version: version B 2.10 5/3/83; site utzoo.UUCP Posting-Version: version B 2.10.2 9/18/84 (Fortune 01.1b1); site graffiti.UUCP Path: utzoo!watmath!clyde!burl!ulysses!allegra!mit-eddie!think!harvard!seismo!ut-sally!ut-ngp!shell!graffiti!peter From: peter@graffiti.UUCP (Peter da Silva) Newsgroups: net.bugs.4bsd Subject: Re: Bug in isatty (errno setting/clearing) Message-ID: <156@graffiti.UUCP> Date: Mon, 2-Sep-85 09:21:11 EDT Article-I.D.: graffiti.156 Posted: Mon Sep 2 09:21:11 1985 Date-Received: Wed, 4-Sep-85 06:26:17 EDT References: <965@sdcsvax.UUCP> <2200011@uiucuxc> <304@celerity.UUCP> Organization: The Power Elite, Houston, TX Lines: 15 > 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?