From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.devel Subject: Should Emacs 26 be portable to Glibc 2.28? Date: Wed, 7 Mar 2018 18:09:49 -0800 Organization: UCLA Computer Science Department Message-ID: <96913ef6-44d4-cd63-8a37-5080be2d22dc@cs.ucla.edu> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: multipart/mixed; boundary="------------0CAC221C269E22970168E0B8" X-Trace: blaine.gmane.org 1520474938 6921 195.159.176.226 (8 Mar 2018 02:08:58 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Thu, 8 Mar 2018 02:08:58 +0000 (UTC) User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.6.0 To: Emacs development discussions Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Thu Mar 08 03:08:54 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1etkzD-0000jx-FP for ged-emacs-devel@m.gmane.org; Thu, 08 Mar 2018 03:08:51 +0100 Original-Received: from localhost ([::1]:36453 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etl1F-0007s6-NC for ged-emacs-devel@m.gmane.org; Wed, 07 Mar 2018 21:10:57 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:35131) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1etl0I-0007Kj-4f for emacs-devel@gnu.org; Wed, 07 Mar 2018 21:09:59 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1etl0E-0005ry-VU for emacs-devel@gnu.org; Wed, 07 Mar 2018 21:09:58 -0500 Original-Received: from zimbra.cs.ucla.edu ([131.179.128.68]:34078) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1etl0E-0005oX-NR for emacs-devel@gnu.org; Wed, 07 Mar 2018 21:09:54 -0500 Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id DF84F1616D1 for ; Wed, 7 Mar 2018 18:09:52 -0800 (PST) Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10032) with ESMTP id yeB-EyMgrUtF for ; Wed, 7 Mar 2018 18:09:51 -0800 (PST) Original-Received: from localhost (localhost [127.0.0.1]) by zimbra.cs.ucla.edu (Postfix) with ESMTP id D083D1616D2 for ; Wed, 7 Mar 2018 18:09:51 -0800 (PST) X-Virus-Scanned: amavisd-new at zimbra.cs.ucla.edu Original-Received: from zimbra.cs.ucla.edu ([127.0.0.1]) by localhost (zimbra.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id GzbKQKtnmGWw for ; Wed, 7 Mar 2018 18:09:51 -0800 (PST) Original-Received: from Penguin.CS.UCLA.EDU (Penguin.CS.UCLA.EDU [131.179.64.200]) by zimbra.cs.ucla.edu (Postfix) with ESMTPSA id B78911616D1 for ; Wed, 7 Mar 2018 18:09:51 -0800 (PST) Content-Language: en-US X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x [fuzzy] X-Received-From: 131.179.128.68 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:223470 This is a multi-part message in MIME format. --------------0CAC221C269E22970168E0B8 Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit The attached patch, which I've installed into Emacs master, fixes a incompatibility between Emacs and the planned 2.28 release of glibc. Should I install it into the emacs-26 branch? glibc 2.28 is currently scheduled for August, so this shouldn't be much of an issue until then; however, as the patch is reasonably conservative and it's likely there won't be another Emacs release before August, it might make sense to install this patch into the emacs-26 branch now. The underlying problem is that Emacs (via gnulib) mucks with glibc internals that are planned to change in glibc 2.28. For more see the thread here: https://lists.gnu.org/r/bug-gnulib/2018-03/msg00000.html --------------0CAC221C269E22970168E0B8 Content-Type: text/x-patch; name="t.patch" Content-Transfer-Encoding: 7bit Content-Disposition: attachment; filename="t.patch" diff --git a/lib/fpending.c b/lib/fpending.c index c84e3a5b4e..789f50e4e4 100644 --- a/lib/fpending.c +++ b/lib/fpending.c @@ -32,7 +32,7 @@ __fpending (FILE *fp) /* Most systems provide FILE as a struct and the necessary bitmask in , because they need it for implementing getc() and putc() as fast macros. */ -#if defined _IO_ftrylockfile || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ +#if defined _IO_EOF_SEEN || __GNU_LIBRARY__ == 1 /* GNU libc, BeOS, Haiku, Linux libc5 */ return fp->_IO_write_ptr - fp->_IO_write_base; #elif defined __sferror || defined __DragonFly__ || defined __ANDROID__ /* FreeBSD, NetBSD, OpenBSD, DragonFly, Mac OS X, Cygwin, Minix 3, Android */ diff --git a/lib/stdio-impl.h b/lib/stdio-impl.h index 78d896e9f5..05c5752a24 100644 --- a/lib/stdio-impl.h +++ b/lib/stdio-impl.h @@ -18,6 +18,12 @@ the same implementation of stdio extension API, except that some fields have different naming conventions, or their access requires some casts. */ +/* Glibc 2.28 made _IO_IN_BACKUP private. For now, work around this + problem by defining it ourselves. FIXME: Do not rely on glibc + internals. */ +#if !defined _IO_IN_BACKUP && defined _IO_EOF_SEEN +# define _IO_IN_BACKUP 0x100 +#endif /* BSD stdio derived implementations. */ --------------0CAC221C269E22970168E0B8--