diff options
author | Elliott Hughes <enh@google.com> | 2018-02-14 15:21:45 -0800 |
---|---|---|
committer | Elliott Hughes <enh@google.com> | 2018-02-14 15:25:21 -0800 |
commit | 457852666cb870a844df016962fac487cb5e7559 (patch) | |
tree | b6d5ea190fca3841b956dc1cbe714fdef8982655 /libc/stdio/stdio_ext.cpp | |
parent | 38a78728c343f6398763ae8d7e3e8202b927a056 (diff) |
Add __fseterr.
Trivial, obvious counterpart to the standard ferror(3) and clearerr(3),
and lets us build bison out of the box.
Bug: http://b/64273806
Test: ran tests
Change-Id: I20affabddb71210051165c41e86adfe5ae04f77f
Diffstat (limited to 'libc/stdio/stdio_ext.cpp')
-rw-r--r-- | libc/stdio/stdio_ext.cpp | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/libc/stdio/stdio_ext.cpp b/libc/stdio/stdio_ext.cpp index 8cf4f4b3d..e17b62a05 100644 --- a/libc/stdio/stdio_ext.cpp +++ b/libc/stdio/stdio_ext.cpp @@ -72,6 +72,10 @@ void _flushlbf() { fflush(NULL); } +void __fseterr(FILE* fp) { + fp->_flags |= __SERR; +} + int __fsetlocking(FILE* fp, int type) { int old_state = _EXT(fp)->_caller_handles_locking ? FSETLOCKING_BYCALLER : FSETLOCKING_INTERNAL; if (type == FSETLOCKING_QUERY) { |