diff options
Diffstat (limited to 'src/stdio/freopen.c')
-rw-r--r-- | src/stdio/freopen.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/src/stdio/freopen.c b/src/stdio/freopen.c index 050e556b..0fd0a2f8 100644 --- a/src/stdio/freopen.c +++ b/src/stdio/freopen.c @@ -23,6 +23,7 @@ /** reopen a file stream with a new file **/ +GCC_SSE_HACK FILE * freopen(const char * restrict filename, const char * restrict mode, FILE * restrict stream) { struct { @@ -69,6 +70,7 @@ FILE * freopen(const char * restrict filename, const char * restrict mode, FILE } if (openmode == -1) { + __undefined("\"%s\" is not a valid mode for fopen() or freopen()", mode); #ifdef EINVAL errno = EINVAL; #endif @@ -102,6 +104,8 @@ FILE * freopen(const char * restrict filename, const char * restrict mode, FILE return stream; } +CHECK_3(FILE *, NULL, freopen, const char * restrict, const char * restrict, FILE * restrict) + /*** changes the file associated with ARGUMENT(stream) to ARGUMENT(filename). The meaning of ARGUMENT(mode) is the same as with |