unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Florian Weimer via Libc-alpha <libc-alpha@sourceware.org>
To: Zack Weinberg <zackw@panix.com>
Cc: Liam Stitt <stittl@cuug.ab.ca>, Frank da Cruz <fdc@columbia.edu>,
	Mike <michael@rmrco.com>,
	GNU C Library <libc-alpha@sourceware.org>
Subject: Re: C-kermit fails
Date: Mon, 27 Jul 2020 10:10:05 +0200	[thread overview]
Message-ID: <87365d4bvm.fsf@oldenburg2.str.redhat.com> (raw)
In-Reply-To: <CAKCAbMhzf5qjzOh8zvNfw7u4Ac6N5iD4+qwS6c6WmoXjYnkd7Q@mail.gmail.com> (Zack Weinberg's message of "Fri, 24 Jul 2020 16:05:34 -0400")

* Zack Weinberg:

> On Fri, Jul 24, 2020 at 3:41 PM Frank da Cruz <fdc@columbia.edu> wrote:
>> Somebody else sent a simpler patch, you can see it here:
>>
>> http://kermitproject.org/ckglibc228.diff
>
> This is still wrong, __FILE_defined is another implementation-use-only
> symbol, and it doesn't mean that the things you're actually trying to
> use are available.  (I am sorely tempted to delete it from the next
> release just to underline this point.)  If you need a stopgap for now,
> this is as correct as it gets:
>
> - #ifdef _IO_file_flags            /* Linux */
> + #if __GLIBC__ >= 2           /* GNU libc >= 2.0 */
>
> ... however, we are planning to stop exposing *any* of the internals
> of the FILE struct, Real Soon Now, at which point there will be
> nothing you can put here that will be correct.

I'm not sure if we can really do that (in the sense that there will be
nothing that works to replace this construct), but I completely agree
that this is undefined and should remain so.

If you do not like the stdio library, write your own I/O library (or use
another existing one).  Do not try to patch up the implementation using
internal details.

Keep in mind that each time you access library internals in this way,
you make it harder for us to make changes, including fixes for bugs you
might yourself have requested, because such changes may invalidate
existing programs.

Thanks,
Florian


  reply	other threads:[~2020-07-27  8:10 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-07-24 16:29 C-kermit fails Mike
2020-07-24 16:33 ` Florian Weimer
2020-07-24 17:36 ` Zack Weinberg
2020-07-24 18:47   ` Paul Eggert
2020-07-24 19:41     ` Frank da Cruz
2020-07-24 19:45       ` Frank da Cruz
2020-07-24 20:05       ` Zack Weinberg
2020-07-27  8:10         ` Florian Weimer via Libc-alpha [this message]
2020-07-24 21:07       ` Paul Eggert
2020-07-24 23:45         ` Frank da Cruz
2020-07-25  1:59           ` Paul Eggert
2020-07-31 12:41           ` Maciej W. Rozycki
2020-07-31 18:22             ` Frank da Cruz
2020-07-31 20:23               ` Paul Eggert
2020-08-01  0:17                 ` Frank da Cruz
2020-08-01  8:07                   ` Paul Eggert

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

  List information: https://www.gnu.org/software/libc/involved.html

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=87365d4bvm.fsf@oldenburg2.str.redhat.com \
    --to=libc-alpha@sourceware.org \
    --cc=fdc@columbia.edu \
    --cc=fweimer@redhat.com \
    --cc=michael@rmrco.com \
    --cc=stittl@cuug.ab.ca \
    --cc=zackw@panix.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).