X-Git-Url: http://nsz.repo.hu/git/?a=blobdiff_plain;f=src%2Fstdio%2F__towrite.c;h=4c9c66ae79c9e8c5abe8750df8ebfce149b1e061;hb=595416b11dfbc82d40a59d0edd7e3b04ba7a2d6d;hp=b4587419dddbc8585c42ef7126b1a198950aaae2;hpb=e3cd6c5c265cd481db6e0c5b529855d99f0bda30;p=musl diff --git a/src/stdio/__towrite.c b/src/stdio/__towrite.c index b4587419..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,5 +17,7 @@ int __towrite(FILE *f) return 0; } -/* Link flush-on-exit code iff any stdio write functions are linked. */ -int (*const __fflush_on_exit)(FILE *) = fflush; +hidden void __towrite_needs_stdio_exit() +{ + __stdio_exit_needed(); +}