shithub: scc

ref: 0717542bba2021b87f92ab99fbd1851618e17da5
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);
}