search for: _io_error

Displaying 2 results from an estimated 2 matches for "_io_error".

Did you mean: io_error
2020 Jul 25
0
[klibc:master] stdio: Define all the _unlocked functions and macros
...LE * __f) { return _fwrite(__p, __s * __n, __f) / __s; } +#define fwrite_unlocked(p, s, n, f) fwrite((p), (s), (n), (f)) __extern_inline int fileno(FILE *__f) { return __f->_IO_fileno; } +#define fileno_unlocked(f) fileno(f) __extern_inline int ferror(FILE *__f) { return __f->_IO_error; } +#define ferror_unlocked(f) ferror(f) __extern_inline int feof(FILE *__f) { return __f->_IO_eof; } +#define feof_unlocked(f) feof(f) __extern_inline void clearerr(FILE *__f) { __f->_IO_error = 0; __f->_IO_eof = 0; } +#define clearerr_unlocked(f) clearerr(f) #endif #...
2020 Jul 25
0
[klibc:master] stdio: Add extern definition of clearerr()
...IST) += errlist.o diff --git a/usr/klibc/stdio/clearerr.c b/usr/klibc/stdio/clearerr.c new file mode 100644 index 00000000..fb565144 --- /dev/null +++ b/usr/klibc/stdio/clearerr.c @@ -0,0 +1,8 @@ +#define __NO_STDIO_INLINES +#include "stdioint.h" + +void clearerr(FILE *__f) +{ + __f->_IO_error = 0; + __f->_IO_eof = 0; +}