ref: 19f4d62e77c2b66116a48c6605f2cc9f239e53b0
dir: /src/libc/stdio/freopen.c/
#include <stdio.h> #include "../syscall.h" #include "../libc.h" #undef freopen FILE * freopen(const char * restrict name, const char * restrict mode, FILE * restrict fp) { if (fclose(fp) == EOF) return NULL; return _fpopen(name, mode, fp); }