Date: Tue, 2 Mar 2004 14:10:25 +0300 From: Andrey Chernov <ache@nagual.pp.ru> To: "Jordan K. Hubbard" <jkh@queasyweasel.com> Cc: freebsd-arch@FreeBSD.ORG Subject: Re: Another conformance question... This time fputs(). Message-ID: <20040302111025.GA99496@nagual.pp.ru> In-Reply-To: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com> References: <1060DC2A-6C31-11D8-9000-000393BB9222@queasyweasel.com>
next in thread | previous in thread | raw e-mail | index | archive | help
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/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20040302111025.GA99496>