Another conformance question... This time fputs().

Jordan K. Hubbard jkh at queasyweasel.com
Wed Mar 3 12:21:56 PST 2004


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



More information about the freebsd-standards mailing list