From owner-freebsd-standards@FreeBSD.ORG Wed Mar 3 12:21:56 2004 Return-Path: Delivered-To: freebsd-standards@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id A55D616A4CE; Wed, 3 Mar 2004 12:21:56 -0800 (PST) Received: from jkh-gw.brierdr.com (adsl-64-173-3-158.dsl.sntc01.pacbell.net [64.173.3.158]) by mx1.FreeBSD.org (Postfix) with ESMTP id 5A70F43D5D; Wed, 3 Mar 2004 12:21:56 -0800 (PST) (envelope-from jkh@queasyweasel.com) Received: from [64.173.15.98] (IDENT:15686-ident-is-a-completely-pointless-protocol-that-offers-no-security-or-traceability-at-all-so-ta@adsl-64-173-15-98.dsl.sntc01.pacbell.net [64.173.15.98]) by jkh-gw.brierdr.com (8.12.10/8.12.10) with ESMTP id i23KLFrF024880; Wed, 3 Mar 2004 12:21:15 -0800 (PST) (envelope-from jkh@queasyweasel.com) In-Reply-To: <20040303161532.GA27304@VARK.homeunix.com> References: <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> Mime-Version: 1.0 (Apple Message framework v612) Content-Type: text/plain; charset=US-ASCII; format=flowed Message-Id: <6759E5CE-6D50-11D8-9000-000393BB9222@queasyweasel.com> Content-Transfer-Encoding: 7bit From: "Jordan K. Hubbard" Date: Wed, 3 Mar 2004 12:21:50 -0800 To: David Schultz X-Mailer: Apple Mail (2.612) cc: standards@FreeBSD.ORG Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-standards@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Standards compliance List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 03 Mar 2004 20:21:56 -0000 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