diff options
Diffstat (limited to 'src/stdio/ferror.c')
-rw-r--r-- | src/stdio/ferror.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/src/stdio/ferror.c b/src/stdio/ferror.c new file mode 100644 index 0000000..f535fbe --- /dev/null +++ b/src/stdio/ferror.c @@ -0,0 +1,10 @@ +#include "stdio_impl.h" + +#undef ferror + +int ferror(FILE *f) +{ + return !!(f->flags & F_ERR); +} + +weak_alias(ferror, ferror_unlocked); |