1#include <stdio.h>23#include "../syscall.h"4#include "../libc.h"56#undef freopen78FILE *9freopen(const char * restrict name, const char * restrict mode,10 FILE * restrict fp)11{12 if (fclose(fp) == EOF)13 return NULL;14 return _fpopen(name, mode, fp);15}