Re: Another conformance question... This time fputs().
From: Andrey Chernov (ache_at_nagual.pp.ru)
Date: 03/02/04
- Previous message: Eivind Eklund: "Re: Another conformance question... This time fputs()."
- In reply to: Jordan K. Hubbard: "Another conformance question... This time fputs()."
- Next in thread: Bruce Evans: "Re: Another conformance question... This time fputs()."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Tue, 2 Mar 2004 14:10:25 +0300 To: "Jordan K. Hubbard" <jkh@queasyweasel.com>
On Tue, Mar 02, 2004 at 02:04:59AM -0800, Jordan K. Hubbard wrote:
> errno = 9, rc = -1
> fwrite errno = 9, rc = 0
>
> Just to save you the grepping, errno #9 is EBADF, "bad file number".
They are right. According to POSIX for fwrite(), fputs(), fputc():
[EBADF] The file descriptor underlying stream is not a valid file
descriptor open for writing.
> In both cases, we get EACCES for fputs() or fwrite() attempts on a
There is no EACCES in POSIX for this functions. Please don't reinvent the
wheel.
The next almost matching candidate for this functions is only:
[ENXIO] A request was made of a nonexistent device, or the request was
outside the capabilities of the device.
-- Andrey Chernov | http://ache.pp.ru/ _______________________________________________ freebsd-arch@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-arch To unsubscribe, send any mail to "freebsd-arch-unsubscribe@freebsd.org"
- Previous message: Eivind Eklund: "Re: Another conformance question... This time fputs()."
- In reply to: Jordan K. Hubbard: "Another conformance question... This time fputs()."
- Next in thread: Bruce Evans: "Re: Another conformance question... This time fputs()."
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]