From owner-freebsd-arch@FreeBSD.ORG Tue Mar 2 03:10:27 2004 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 7AF9C16A4CE for ; Tue, 2 Mar 2004 03:10:27 -0800 (PST) Received: from nagual.pp.ru (pobrecita.freebsd.ru [194.87.13.42]) by mx1.FreeBSD.org (Postfix) with ESMTP id B73EC43D1D for ; Tue, 2 Mar 2004 03:10:26 -0800 (PST) (envelope-from ache@pobrecita.freebsd.ru) Received: from pobrecita.freebsd.ru (ache@localhost [127.0.0.1]) by nagual.pp.ru (8.12.11/8.12.11) with ESMTP id i22BAP1Z000496; Tue, 2 Mar 2004 14:10:25 +0300 (MSK) (envelope-from ache@pobrecita.freebsd.ru) Received: (from ache@localhost) by pobrecita.freebsd.ru (8.12.11/8.12.11/Submit) id i22BAP9i000495; Tue, 2 Mar 2004 14:10:25 +0300 (MSK) (envelope-from ache) Date: Tue, 2 Mar 2004 14:10:25 +0300 From: Andrey Chernov To: "Jordan K. Hubbard" Message-ID: <20040302111025.GA99496@nagual.pp.ru> Mail-Followup-To: Andrey Chernov , "Jordan K. Hubbard" , freebsd-arch@FreeBSD.ORG References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable In-Reply-To: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> User-Agent: Mutt/1.5.6i X-AntiVirus: checked by AntiVir Milter 1.1-beta; AVE 6.24.0.5; VDF 6.24.0.32 (host: pobrecita.freebsd.ru) cc: freebsd-arch@FreeBSD.ORG Subject: Re: Another conformance question... This time fputs(). X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 02 Mar 2004 11:10:27 -0000 On Tue, Mar 02, 2004 at 02:04:59AM -0800, Jordan K. Hubbard wrote: > errno =3D 9, rc =3D -1 > fwrite errno =3D 9, rc =3D 0 >=20 > Just to save you the grepping, errno #9 is EBADF, "bad file number". =20 They are right. According to POSIX for fwrite(), fputs(), fputc(): [EBADF] The file descriptor underlying stream is not a valid file=20 descriptor open for writing. > In both cases, we get EACCES for fputs() or fwrite() attempts on a=20 There is no EACCES in POSIX for this functions. Please don't reinvent the= =20 wheel. The next almost matching candidate for this functions is only: [ENXIO] A request was made of a nonexistent device, or the request was=20 outside the capabilities of the device. --=20 Andrey Chernov | http://ache.pp.ru/