This is the mail archive of the
libc-alpha@sourceware.org
mailing list for the glibc project.
Re: [PATCH 5/6] Remove miscellaneous debris from libio.
- From: Zack Weinberg <zackw at panix dot com>
- To: Andreas Schwab <schwab at linux-m68k dot org>
- Cc: GNU C Library <libc-alpha at sourceware dot org>, Florian Weimer <fweimer at redhat dot com>, Adhemerval Zanella <adhemerval dot zanella at linaro dot org>
- Date: Sun, 11 Feb 2018 13:53:44 -0500
- Subject: Re: [PATCH 5/6] Remove miscellaneous debris from libio.
- Authentication-results: sourceware.org; auth=none
- References: <20180211163558.14124-1-zackw@panix.com> <20180211163558.14124-6-zackw@panix.com> <87h8qnwgbg.fsf@linux-m68k.org>
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