]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
* libio/fileops.c (_IO_new_file_underflow): Set error indicator
authorAndreas Schwab <schwab@suse.de>
Wed, 21 Jul 1999 16:08:34 +0000 (16:08 +0000)
committerAndreas Schwab <schwab@suse.de>
Wed, 21 Jul 1999 16:08:34 +0000 (16:08 +0000)
when reading from write-only stream.
* libio/oldfileops.c (_IO_old_file_underflow): Likewise.

libio/fileops.c
libio/oldfileops.c

index f5ec0e2b9ec5531af3e0927887f3b58dec182183..b9d4d69e885a96624d0a65fb1ee2d648b4252d41 100644 (file)
@@ -348,6 +348,7 @@ _IO_new_file_underflow (fp)
 
   if (fp->_flags & _IO_NO_READS)
     {
+      fp->_flags |= _IO_ERR_SEEN;
       __set_errno (EBADF);
       return EOF;
     }
index fe29a7965b0e8777a807b0b254cda87cffeafe70..2f25ecc7634584efc0e214531d18443998b13217 100644 (file)
@@ -314,6 +314,7 @@ _IO_old_file_underflow (fp)
 
   if (fp->_flags & _IO_NO_READS)
     {
+      fp->_flags |= _IO_ERR_SEEN;
       __set_errno (EBADF);
       return EOF;
     }