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

Rimvydas Jasinskas zrj at crater.dragonflybsd.org
Sat Dec 23 08:38:39 PST 2017


commit 1d638d9700dbf454f40c66499f6fc0471f177aab
Author: zrj <rimvydas.jasinskas at gmail.com>
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(-)

http://gitweb.dragonflybsd.org/dragonfly.git/commitdiff/1d638d9700dbf454f40c66499f6fc0471f177aab


-- 
DragonFly BSD source repository



More information about the Commits mailing list