git: fflush(3): Return success on a read-only stream.

Rimvydas Jasinskas zrj at
Sat Dec 23 08:38:39 PST 2017

commit 1d638d9700dbf454f40c66499f6fc0471f177aab
Author: zrj <rimvydas.jasinskas at>
Date:   Sat Dec 23 10:29:47 2017 +0200

    fflush(3): Return success on a read-only stream.
    Loosen up the requirements for opened streams. It is needed to support c++
    runtime lib after ext/basic_file_stdio.c s/this->sync()/fflush()/ change.
    It likely needed for libc++ too.
    Adjust the manpage for behaviour change and only set _w to 0 when stream is
    not currently reading in fpurge(4) to avoid failures in fflush(4).
    Taken-from: FreeBSD

Summary of changes:
 lib/libc/stdio/fflush.3 | 14 ++++++++------
 lib/libc/stdio/fflush.c | 25 +++++++++++++++----------
 lib/libc/stdio/fpurge.c |  2 +-
 3 files changed, 24 insertions(+), 17 deletions(-)

DragonFly BSD source repository

More information about the Commits mailing list