simplify atexit and fflush-on-exit handling

This commit is contained in:
Rich Felker 2011-10-14 23:00:24 -04:00
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);
}