Date: Wed, 3 Mar 2004 12:21:50 -0800 From: "Jordan K. Hubbard" <jkh@queasyweasel.com> To: David Schultz <das@FreeBSD.ORG> Cc: standards@FreeBSD.ORG Subject: Re: Another conformance question... This time fputs(). Message-ID: <6759E5CE-6D50-11D8-9000-000393BB9222@queasyweasel.com> In-Reply-To: <20040303161532.GA27304@VARK.homeunix.com> References: <F648D56F-6C28-11D8-9000-000393BB9222@queasyweasel.com> <20040302165323.GA17665@VARK.homeunix.com> <20040303144451.T5253@gamplex.bde.org> <0805074F-6CC9-11D8-9000-000393BB9222@queasyweasel.com> <20040303195618.K1351@gamplex.bde.org> <20040303161532.GA27304@VARK.homeunix.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Mar 3, 2004, at 8:15 AM, David Schultz wrote: > One could argue that EBADF is a perfectly reasonable error code to > return in case (2) as well. It is consistent with the way other > types of stdio streams work. Specifically, if the stream isn't > writable (either because it was opened read-only and we don't have > permission or because it was opened without a writefn and we don't > support it) then we should get a single error code that reflects > the fact that the stream isn't writable. The fputs(3) man page > even says: > > [EBADF] The _stream_ argument is not a writable stream. > > It doesn't say anything about why the stream is not writable. > Thus, there shouldn't be a problem with simply setting errno to > EBADF in all failure cases in __swsetup(). I agree. So, do you want to make the 2nd round of changes or shall I? -- Jordan K. Hubbard Engineering Manager, BSD technology group Apple Computer
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?6759E5CE-6D50-11D8-9000-000393BB9222>