summaryrefslogtreecommitdiff
path: root/src/stdio/clearerr.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/stdio/clearerr.c')
-rw-r--r--src/stdio/clearerr.c10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stdio/clearerr.c b/src/stdio/clearerr.c
new file mode 100644
index 00000000..3bf94d30
--- /dev/null
+++ b/src/stdio/clearerr.c
@@ -0,0 +1,10 @@
+#include "stdio_impl.h"
+
+void clearerr(FILE *f)
+{
+ FLOCK(f);
+ f->flags &= ~(F_EOF|F_ERR);
+ FUNLOCK(f);
+}
+
+weak_alias(clearerr, clearerr_unlocked);