shithub: scc

ref: 1ec4d62ccec0872d1ecc64f6834e5ea8d36f7a1f
dir: /lib/c/freopen.c/

View raw version

#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);
}