From f753049a50132a23849ef89a8af5ff86ad595c25 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 14 Oct 2011 23:00:24 -0400 Subject: simplify atexit and fflush-on-exit handling --- src/stdio/__towrite.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/stdio/__towrite.c') diff --git a/src/stdio/__towrite.c b/src/stdio/__towrite.c index b4587419..4bf96f4d 100644 --- a/src/stdio/__towrite.c +++ b/src/stdio/__towrite.c @@ -18,4 +18,7 @@ int __towrite(FILE *f) } /* Link flush-on-exit code iff any stdio write functions are linked. */ -int (*const __fflush_on_exit)(FILE *) = fflush; +void __fflush_on_exit() +{ + fflush(0); +} -- cgit v1.2.1