unofficial mirror of libc-alpha@sourceware.org
 help / color / mirror / Atom feed
From: Zack Weinberg <zackw@panix.com>
To: Mike <michael@rmrco.com>, Frank da Cruz <fdc@columbia.edu>
Cc: GNU C Library <libc-alpha@sourceware.org>
Subject: Re: C-kermit fails
Date: Fri, 24 Jul 2020 13:36:47 -0400	[thread overview]
Message-ID: <CAKCAbMgepZbF8DahnnUUFj-biL4NXVXdQER=d00_JtHcKRmuqg@mail.gmail.com> (raw)
In-Reply-To: <10CAD3CD-0170-4182-A920-EE825EBAF6B0@rmrco.com>

On Fri, Jul 24, 2020 at 12:29 PM Mike <michael@rmrco.com> wrote:
> Frank da Cruz wrote:
>> Apparently glibc was changed in a way that broke C-Kermit,
>> so the reaction of Linux packagers was to remove C-Kermit
>> from their distribution.  Somebody else wrote me about
>> this earlier today concerning Debian:
>>
>>> Debian's "solution" to the problem was to drop the package
>>> after the initial bug was filed, without contacting
>>> upstream about it at all(!), hence presumably why this is
>>> news to you. I've done some digging, and it appears glibc
>>> is to blame (they removed an interface in 2.28). This
>>> patch from gentoo, which also apparently didn't think
>>> about telling you (sigh) appears to fix it:
>>>
>>> https://685096.bugs.gentoo.org/attachment.cgi?id=589698
>>
>> I have verified that it compiles now.
>>
>> The right thing to do would be to encourage the glibc
>> people to put back the symbol that they deleted.  Because
>> if this change broke C-Kermit, it's likely to have broken
>> a lot more applications.

The symbol that was removed (_IO_file_flags) was never a documented
part of the stdio interface.  The code that is gated on its definition
uses other undocumented internals of stdio; we do in fact have plans
that may cause those symbols to disappear as well.  This thread is the
first we've heard about C-Kermit depending on it, and we haven't heard
of *any* other application that does.  (Although it's possible that
redistributors of other applications didn't bother telling us about
problems either.)

The right fix for upstream C-Kermit would be to bypass stdin
altogether and use only read(0, &ch, 1), together with the <termios.h>
interfaces for querying the kernel-side input buffer. I looked at the
code briefly and it seems like coninc() and in_chk() already do this.
It's not clear to me why cmdgetc() ever uses getc(stdin) and/or
getchar().

zw

  parent reply	other threads:[~2020-07-24 17:37 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 [this message]
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
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='CAKCAbMgepZbF8DahnnUUFj-biL4NXVXdQER=d00_JtHcKRmuqg@mail.gmail.com' \
    --to=zackw@panix.com \
    --cc=fdc@columbia.edu \
    --cc=libc-alpha@sourceware.org \
    --cc=michael@rmrco.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).