guard the private header
[reactos.git] / reactos / lib / crtdll / old cruft / stdio / stdiohk.c
1 /* Copyright (C) 1995 DJ Delorie, see COPYING.DJ for details */
2 #include <msvcrt/stdio.h>
3 #include <msvcrt/internal/file.h>
4
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 void __stdio_cleanup_proc(void)
15 {
16 _fwalk(fcloseall_helper);
17 }
18
19 void (*__stdio_cleanup_hook)(void) = __stdio_cleanup_proc;