fopen + mmap
Ulrich Drepper
drepper@redhat.com
Sat Jan 19 14:11:00 GMT 2002
Roland McGrath <roland@frob.com> writes:
> I don't have ANSI C on hand, but my recollection is pretty clear that
> fflush is specifically defined for input streams (to discard buffered
> input).
C89 never said this and neither does C99. I have both standards here.
> POSIX.1-1996 section 8.2.3 (p 213 in the ISO printing) specifically
> mentions using fflush on input streams to synchronize the file
> position.
This text is still present but it is clearly an error. Unix/POSIX
directly refer to ISO C for the definition of fflush() and therefore
the function isn't defined for input streams. You participated in
writing a standard, you know how these things can slip in. The
OpenGroup is soon starting to collect defect reports for TR1 of XPG6.
This is something which should be reported and fixed.
--
---------------. ,-. 1325 Chesapeake Terrace
Ulrich Drepper \ ,-------------------' \ Sunnyvale, CA 94089 USA
Red Hat `--' drepper at redhat.com `------------------------
More information about the Libc-hacker
mailing list