ref: 67d90c41c1d5ef13d67cc0a3ce2bd7de1cc53037
dir: /lib/c/freopen.c/
#include <stdio.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);
}