[PATCH 5/6] Remove miscellaneous debris from libio.
Zack Weinberg
zackw@panix.com
Sun Feb 11 19:06:00 GMT 2018
On Sun, Feb 11, 2018 at 1:07 PM, Andreas Schwab <schwab@linux-m68k.org> wrote:
> On Feb 11 2018, Zack Weinberg <zackw@panix.com> wrote:
>
>> diff --git a/libio/fileops.c b/libio/fileops.c
>> index fb39bec63cd..618c0d5c311 100644
>> --- a/libio/fileops.c
>> +++ b/libio/fileops.c
>> @@ -468,11 +468,6 @@ int
>> _IO_new_file_underflow (FILE *fp)
>> {
>> ssize_t count;
>> -#if 0
>> - /* SysV does not make this test; take it out for compatibility */
>> - if (fp->_flags & _IO_EOF_SEEN)
>> - return (EOF);
>> -#endif
>
> AFAICS, this is an area where we are not conforming to the C standard
> (the EOF indicator is supposed to be sticking, see fgetc, and only
> clearerr can fix that).
Yes, I think you're right. I would generally be in favor of changing
to conform; the BSD lineage was always conformant and I think
compatibility with those is more important than compatibility with
legacy SysV nowadays. And we're already contemplating a bunch of
stdio-related changes in this release cycle, so now is a good time.
I don't want to make any behavioral changes in this patch series,
though, and if I changed it I'd need to write a test case and that
looks nontrivial right now, so what I'll do is leave those #if 0
blocks in place and maybe come back to it in a separate discussion.
Sound good?
zw
More information about the Libc-alpha
mailing list