Don't check ferror(fp) when reading fp.
authorGeorge Koehler <xkernigh@netscape.net>
Sat, 28 Oct 2017 20:20:48 +0000 (16:20 -0400)
committerGeorge Koehler <xkernigh@netscape.net>
Sat, 28 Oct 2017 20:20:48 +0000 (16:20 -0400)
commit75ae957c751530d8c57c458bfd470dcd8c0d94c7
treef42e36623afa7f4dcc9ee282e26701432a5cb0bc
parent54028e403ef41769e79cdff5089fad9a74dfa154
Don't check ferror(fp) when reading fp.

If feof(fp) or ferror(fp) was set, then our libc returned EOF for all
later reads without trying to read.  Our libc now behaves like BSD
(and probably Illumos and musl) by checking only feof(fp).  For
difference, glibc doesn't check feof(fp).

I described the difference between our libc and BSD libc in
https://sourceforge.net/p/tack/mailman/message/35430300/
lang/cem/libcc.ansi/stdio/fillbuf.c