From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on dcvr.yhbt.net X-Spam-Level: X-Spam-Status: No, score=-4.2 required=3.0 tests=AWL,BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,MAILING_LIST_MULTI, SPF_HELO_PASS,SPF_PASS shortcircuit=no autolearn=ham autolearn_force=no version=3.4.2 Received: from sourceware.org (server2.sourceware.org [8.43.85.97]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by dcvr.yhbt.net (Postfix) with ESMTPS id 09C821F5AE for ; Mon, 27 Jul 2020 08:10:18 +0000 (UTC) Received: from server2.sourceware.org (localhost [IPv6:::1]) by sourceware.org (Postfix) with ESMTP id D3FEB386184A; Mon, 27 Jul 2020 08:10:16 +0000 (GMT) DKIM-Filter: OpenDKIM Filter v2.11.0 sourceware.org D3FEB386184A DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=sourceware.org; s=default; t=1595837416; bh=jXZTT1Q0e3Kboyq9T6YUglyhoI2oKUrVW7jJAmoO2bE=; h=To:Subject:References:Date:In-Reply-To:List-Id:List-Unsubscribe: List-Archive:List-Post:List-Help:List-Subscribe:From:Reply-To:Cc: From; b=vE5etT53Q7ZMx9+zc8KFjgAyVsFPm0bFpLcAMrESNjvwknqANM2gTWjc+RpK3qS7Q wBCsXRhYOdX87oICQP35NvIiUewR4NA5rWO0nX9iCLdzMylss4a5mcM/DhdNmN9sSS dMxJX+GC+ArWdGoS8mkhTnKQuaGxseZF7bhtcUJc= Received: from us-smtp-delivery-1.mimecast.com (us-smtp-delivery-1.mimecast.com [207.211.31.120]) by sourceware.org (Postfix) with ESMTP id BC7B5386181F for ; Mon, 27 Jul 2020 08:10:13 +0000 (GMT) DMARC-Filter: OpenDMARC Filter v1.3.2 sourceware.org BC7B5386181F Received: from mimecast-mx01.redhat.com (mimecast-mx01.redhat.com [209.132.183.4]) (Using TLS) by relay.mimecast.com with ESMTP id us-mta-471-_1aOlknTPCCxeqRNWbkPuw-1; Mon, 27 Jul 2020 04:10:09 -0400 X-MC-Unique: _1aOlknTPCCxeqRNWbkPuw-1 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mimecast-mx01.redhat.com (Postfix) with ESMTPS id E78008015CE; Mon, 27 Jul 2020 08:10:07 +0000 (UTC) Received: from oldenburg2.str.redhat.com (ovpn-112-104.ams2.redhat.com [10.36.112.104]) by smtp.corp.redhat.com (Postfix) with ESMTPS id 950325FC30; Mon, 27 Jul 2020 08:10:06 +0000 (UTC) To: Zack Weinberg Subject: Re: C-kermit fails References: <10CAD3CD-0170-4182-A920-EE825EBAF6B0@rmrco.com> <95d9170b-d925-5037-c841-e1fd17bb680f@cs.ucla.edu> Date: Mon, 27 Jul 2020 10:10:05 +0200 In-Reply-To: (Zack Weinberg's message of "Fri, 24 Jul 2020 16:05:34 -0400") Message-ID: <87365d4bvm.fsf@oldenburg2.str.redhat.com> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/26.3 (gnu/linux) MIME-Version: 1.0 X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Mimecast-Spam-Score: 0 X-Mimecast-Originator: redhat.com Content-Type: text/plain X-BeenThere: libc-alpha@sourceware.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Libc-alpha mailing list List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , From: Florian Weimer via Libc-alpha Reply-To: Florian Weimer Cc: Liam Stitt , Frank da Cruz , Mike , GNU C Library Errors-To: libc-alpha-bounces@sourceware.org Sender: "Libc-alpha" * Zack Weinberg: > On Fri, Jul 24, 2020 at 3:41 PM Frank da Cruz 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