simplify atexit and fflush-on-exit handling

This commit is contained in:
Rich Felker
2011-10-14 23:00:24 -04:00
parent 8e8ddeff7e
commit f753049a50
3 changed files with 12 additions and 9 deletions

View File

@ -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);
}