diff options
Diffstat (limited to 'lib/libc/stdio/clrerr.c')
-rw-r--r-- | lib/libc/stdio/clrerr.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/lib/libc/stdio/clrerr.c b/lib/libc/stdio/clrerr.c index 8d924b3..bae0b72 100644 --- a/lib/libc/stdio/clrerr.c +++ b/lib/libc/stdio/clrerr.c @@ -39,8 +39,10 @@ __FBSDID("$FreeBSD$"); #include "namespace.h" #include <stdio.h> #include "un-namespace.h" +#include "local.h" #include "libc_private.h" -#undef clearerr + +#define __sclearerr(p) ((void)((p)->_flags &= ~(__SERR|__SEOF))) void clearerr(fp) @@ -50,3 +52,10 @@ clearerr(fp) __sclearerr(fp); FUNLOCKFILE(fp); } + +void +clearerr_unlocked(FILE *fp) +{ + + __sclearerr(fp); +} |