summaryrefslogtreecommitdiffstats
path: root/libc-top-half/musl/src/stdio/feof.c
diff options
context:
space:
mode:
Diffstat (limited to 'libc-top-half/musl/src/stdio/feof.c')
-rw-r--r--libc-top-half/musl/src/stdio/feof.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/libc-top-half/musl/src/stdio/feof.c b/libc-top-half/musl/src/stdio/feof.c
new file mode 100644
index 0000000..56da6b9
--- /dev/null
+++ b/libc-top-half/musl/src/stdio/feof.c
@@ -0,0 +1,14 @@
+#include "stdio_impl.h"
+
+#undef feof
+
+int feof(FILE *f)
+{
+ FLOCK(f);
+ int ret = !!(f->flags & F_EOF);
+ FUNLOCK(f);
+ return ret;
+}
+
+weak_alias(feof, feof_unlocked);
+weak_alias(feof, _IO_feof_unlocked);