delorie.com/archives/browse.cgi | search |
X-Authentication-Warning: | delorie.com: mail set sender to djgpp-workers-bounces using -f |
X-Recipient: | djgpp-workers AT delorie DOT com |
From: | "Stephen J. Turnbull" <turnbull AT sk DOT tsukuba DOT ac DOT jp> |
To: | djgpp-workers AT delorie DOT com |
Cc: | Eli Zaretskii <eliz AT gnu DOT org>, Juan Manuel Guerrero |
<juan DOT guerrero AT gmx DOT de> | |
Subject: | Re: Set _IOERR if the file stream has been opened in wrong mode. |
In-Reply-To: | <83fvvc1t0x.fsf@gnu.org> |
References: | <51E5D0C6 DOT 1060404 AT gmx DOT de> |
<83y5951a79 DOT fsf AT gnu DOT org> | |
<51E702E0 DOT 3010809 AT gmx DOT de> | |
<83fvvc1t0x DOT fsf AT gnu DOT org> | |
X-Mailer: | VM undefined under 21.5 (beta32) "habanero" b0d40183ac79 XEmacs |
Lucid (x86_64-unknown-linux) | |
Date: | Thu, 18 Jul 2013 13:22:43 +0900 |
Message-ID: | <8738rcsdik.fsf@uwakimon.sk.tsukuba.ac.jp> |
MIME-Version: | 1.0 |
Reply-To: | djgpp-workers AT delorie DOT com |
Errors-To: | nobody AT delorie DOT com |
X-Mailing-List: | djgpp-workers AT delorie DOT com |
X-Unsubscribes-To: | listserv AT delorie DOT com |
CCing Eli and Juan because I might not be getting through to the DJGPP lists due to an address change or something. Eli Zaretskii writes: > Thanks, but I've already read all that, and found nothing about > reading from a stream open as "w". Who said that is an error? Mac OS X (ie, *BSD) man page for fgets(3): ERRORS [EBADF] The given stream is not a readable stream. and read(2): ERRORS The pread(), read(), and readv() calls will succeed unless: [EBADF] fildes is not a valid file or socket descriptor open for reading. I don't claim this is required for conformance to any independent standard such as ISO C or POSIX, just that it's documented in the BSD man pages. IIRC, DJGPP libc is derived from BSD to avoid (L)GPL implications of merely using the compilation suite, so BSD man pages should be considered carefully, if not as authoritative.
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |