X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__towrite.c;h=4c9c66ae79c9e8c5abe8750df8ebfce149b1e061;hb=dec8f0a4fa7aa533c843e6eaec862be674ff3a1a;hp=4bf96f4dfb505a9bffa2be928bab02ad62840ef1;hpb=f753049a50132a23849ef89a8af5ff86ad595c25;p=musl diff --git a/src/stdio/__towrite.c b/src/stdio/__towrite.c index 4bf96f4d..4c9c66ae 100644 --- a/src/stdio/__towrite.c +++ b/src/stdio/__towrite.c @@ -3,7 +3,7 @@ int __towrite(FILE *f) { f->mode |= f->mode-1; - if (f->flags & (F_NOWR)) { + if (f->flags & F_NOWR) { f->flags |= F_ERR; return EOF; } @@ -17,8 +17,7 @@ int __towrite(FILE *f) return 0; } -/* Link flush-on-exit code iff any stdio write functions are linked. */ -void __fflush_on_exit() +hidden void __towrite_needs_stdio_exit() { - fflush(0); + __stdio_exit_needed(); }