Go to most recent revision | Details | Last modification | View Log | RSS feed
Rev | Author | Line No. | Line |
---|---|---|---|
4973 | right-hear | 1 | /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */ |
2 | #include |
||
3 | #include |
||
4 | #include |
||
5 | |||
6 | static void fcloseall_helper(FILE *f) |
||
7 | { |
||
8 | fflush(f); |
||
9 | if (fileno(f) > 2) |
||
10 | fclose(f); |
||
11 | } |
||
12 | |||
13 | void __stdio_cleanup_proc(void) |
||
14 | { |
||
15 | _fwalk(fcloseall_helper); |
||
16 | } |
||
17 | |||
18 | void (*__stdio_cleanup_hook)(void) = __stdio_cleanup_proc; |