This is the mail archive of the libc-hacker@sourceware.cygnus.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: [Gurusamy Sarathy <gsar@activestate.com>] ferror() after fread() on a FILE* opened for write


>>>>> 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).

But this is marked as a new addition.

Andreas
-- 
 Andreas Jaeger   aj@arthur.rhein-neckar.de    jaeger@informatik.uni-kl.de
  for pgp-key finger ajaeger@aixd1.rhrk.uni-kl.de

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]