]> git.ipfire.org Git - thirdparty/glibc.git/commitdiff
(_IO_file_overflow): Set error when try to write on a read-only
authorUlrich Drepper <drepper@redhat.com>
Sun, 6 Apr 1997 00:43:48 +0000 (00:43 +0000)
committerUlrich Drepper <drepper@redhat.com>
Sun, 6 Apr 1997 00:43:48 +0000 (00:43 +0000)
stream.

libio/fileops.c

index 3a0bdaaa628ad122b2527df06d9b2279d9c9137b..3d494e31c15a27ee6de90a8b3c946e7575db7f90 100644 (file)
@@ -317,6 +317,7 @@ DEFUN(_IO_file_overflow, (f, ch),
 {
   if (f->_flags & _IO_NO_WRITES) /* SET ERROR */
     {
+      f->_flags |= _IO_ERR_SEEN;
       __set_errno (EBADF);
       return EOF;
     }