aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas Schwab <schwab@suse.de>1999-07-21 13:24:21 +0000
committerAndreas Schwab <schwab@suse.de>1999-07-21 13:24:21 +0000
commit580345725c57c4f339bbac9dd4137a8f17c9a88a (patch)
tree035cce5f3f4b3be4ea0100458a0425c3d7e4c3e4
parent566089a08a8dc91c0f8dfac399a26749b319a7b3 (diff)
downloadglibc-580345725c57c4f339bbac9dd4137a8f17c9a88a.tar
glibc-580345725c57c4f339bbac9dd4137a8f17c9a88a.tar.gz
glibc-580345725c57c4f339bbac9dd4137a8f17c9a88a.tar.bz2
glibc-580345725c57c4f339bbac9dd4137a8f17c9a88a.zip
* libio/fileops.c (_IO_new_file_underflow): Set error indicator
when reading from write-only stream. * libio/oldfileops.c (_IO_old_file_underflow): Likewise. * libio/wfileops.c (_IO_wfile_underflow): Likewise. 1999-07-21 Andreas Schwab <schwab@suse.de>
-rw-r--r--ChangeLog7
-rw-r--r--libio/fileops.c1
-rw-r--r--libio/oldfileops.c1
-rw-r--r--libio/wfileops.c1
4 files changed, 10 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index aea5664428..f78d1aac4f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,5 +1,12 @@
1999-07-21 Andreas Schwab <schwab@suse.de>
+ * libio/fileops.c (_IO_new_file_underflow): Set error indicator
+ when reading from write-only stream.
+ * libio/oldfileops.c (_IO_old_file_underflow): Likewise.
+ * libio/wfileops.c (_IO_wfile_underflow): Likewise.
+
+1999-07-21 Andreas Schwab <schwab@suse.de>
+
* nss/test-netdb.c (output_hostent): Don't crash if h_aliases is
NULL.
diff --git a/libio/fileops.c b/libio/fileops.c
index 8ced77b4c3..decb9d7185 100644
--- a/libio/fileops.c
+++ b/libio/fileops.c
@@ -358,6 +358,7 @@ _IO_new_file_underflow (fp)
if (fp->_flags & _IO_NO_READS)
{
+ fp->_flags |= _IO_ERR_SEEN;
__set_errno (EBADF);
return EOF;
}
diff --git a/libio/oldfileops.c b/libio/oldfileops.c
index 02445215df..fd118a64e4 100644
--- a/libio/oldfileops.c
+++ b/libio/oldfileops.c
@@ -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;
}
diff --git a/libio/wfileops.c b/libio/wfileops.c
index f3f8bf25dd..3489b36fb1 100644
--- a/libio/wfileops.c
+++ b/libio/wfileops.c
@@ -120,6 +120,7 @@ _IO_wfile_underflow (fp)
if (fp->_flags & _IO_NO_READS)
{
+ fp->_flags |= _IO_ERR_SEEN;
__set_errno (EBADF);
return WEOF;
}