public inbox for libc-hacker@sourceware.org
 help / color / mirror / Atom feed
From: Andreas Schwab <schwab@suse.de>
To: libc-hacker@sourceware.cygnus.com (GNU C Library)
Subject: Re: [Gurusamy Sarathy <gsar@activestate.com>] ferror() after fread() on a FILE* opened for write
Date: Wed, 21 Jul 1999 09:53:00 -0000	[thread overview]
Message-ID: <je1ze26j29.fsf@hawking.suse.de> (raw)
In-Reply-To: <u8g12i3qhc.fsf@arthur.rhein-neckar.de>

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1: Type: text/plain, Size: 919 bytes --]

Andreas Jaeger <aj@arthur.rhein-neckar.de> writes:

|> >>>>> Ulrich Drepper writes:
|> 
|> Uli> hjl@lucon.org (H.J. Lu) writes:
|> >> This patch should pass the test. The problem is _IO_file_xsgetn
|> >> and _IO_XXX_file_xsputn may call read/write directly.
|> 
|> Uli> This is not necessary.  Don't add it.
|> 
|> Are you sure?  Check the current Posix draft of the Austin Group for
|> fread/fgetc and fwrite/fputc.  They explicitly mention EBADF for:
|>   
|>   The filedescriptor underlying stream is not a valid file descriptor
|>   open for reading (writing with fwrite/fputc).

If you use std{in,out,err} then the underlying fd _is_ valid for both
read and write (until you change that with freopen).

Andreas.

-- 
Andreas Schwab                                  "And now for something
schwab@suse.de                                   completely different."
SuSE GmbH, Schanzäckerstr. 10, D-90443 Nürnberg

  reply	other threads:[~1999-07-21  9:53 UTC|newest]

Thread overview: 7+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
     [not found] <je673e84m3.fsf@hawking.suse.de>
1999-07-21  7:27 ` H.J. Lu
1999-07-21  7:33   ` Andreas Schwab
1999-07-21  8:08     ` H.J. Lu
1999-07-21  9:00       ` Ulrich Drepper
1999-07-21  9:45         ` Andreas Jaeger
1999-07-21  9:53           ` Andreas Schwab [this message]
1999-07-21 15:25           ` Ulrich Drepper

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=je1ze26j29.fsf@hawking.suse.de \
    --to=schwab@suse.de \
    --cc=libc-hacker@sourceware.cygnus.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).