shithub: scc

ref: 3367504a83d695f670edea4382b87b1ba17f7893
dir: /src/libc/stdio/freopen.c/

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