FFLUSH STDIO LIBRARY FIX
authorDave Rivers <rivers@ponds.uucp>
Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)
committerDave Rivers <rivers@ponds.uucp>
Fri, 27 Nov 1992 00:00:00 +0000 (00:00 +0000)
commitbb52dabc10a053d04a175d8f25214b94cc0bc10d
tree47623e5557fddaef30eb81849da97cbde0c46bec
parentc394808c7af30ff5bbc4e2d41f712c72929c3999
FFLUSH STDIO LIBRARY FIX

I've discovered the following discrepency in the stdio library
w/ regards to opening a stream using  fopen("file","a+")  and later
calling fflush() on that stream. The fopen() call resets the flags to
__SRW because of the '+' in the mode string.  Later on, fflush() checks
to ensure that the stream being flushed is actually writable.  To do
this, it looks for the __SWR value in the flags, and *not* __SRW.  There
is a comment in stdio.h that implies that __SWR and __SRW will never be
set at the same time.

AUTHOR: Dave Rivers (rivers@ponds.uucp)
386BSD-Patchkit: patch00047
usr/src/lib/libc/stdio/fflush.c