This is the mail archive of the libc-hacker@sources.redhat.com mailing list for the glibc project.

Note that libc-hacker is a closed list. You may look at the archives of this list, but subscription and posting are not open.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: fopen + mmap


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   `------------------------


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]