From: Ulrich Drepper Date: Sun, 6 Apr 1997 00:43:48 +0000 (+0000) Subject: (_IO_file_overflow): Set error when try to write on a read-only X-Git-Tag: cvs/libc20x-ud-970417~43 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=72de2dcd21cb71e7c29d0e77c24a1f389f9af0c3;p=thirdparty%2Fglibc.git (_IO_file_overflow): Set error when try to write on a read-only stream. --- diff --git a/libio/fileops.c b/libio/fileops.c index 3a0bdaaa628..3d494e31c15 100644 --- a/libio/fileops.c +++ b/libio/fileops.c @@ -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; }