From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Eli Zaretskii Newsgroups: gmane.emacs.bugs Subject: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo Date: Sat, 12 Sep 2020 10:19:48 +0300 Message-ID: <83lfhfea23.fsf@gnu.org> References: <20200904005748.1538513-1-maskray@google.com> <83wo1at2lu.fsf@gnu.org> <20200904153803.esenh3j2af4ymyd7@google.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="26718"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43195@debbugs.gnu.org To: Fangrui Song Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sat Sep 12 09:20:10 2020 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1kGzpS-0006qb-Nh for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Sep 2020 09:20:10 +0200 Original-Received: from localhost ([::1]:36026 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGzpR-0001fv-Pe for geb-bug-gnu-emacs@m.gmane-mx.org; Sat, 12 Sep 2020 03:20:09 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:33856) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kGzpL-0001fd-2p for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2020 03:20:03 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:34552) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kGzpK-0002V7-Ps for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2020 03:20:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kGzpK-000160-J5 for bug-gnu-emacs@gnu.org; Sat, 12 Sep 2020 03:20:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Eli Zaretskii Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sat, 12 Sep 2020 07:20:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 43195 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Original-Received: via spool by 43195-submit@debbugs.gnu.org id=B43195.15998951974197 (code B ref 43195); Sat, 12 Sep 2020 07:20:02 +0000 Original-Received: (at 43195) by debbugs.gnu.org; 12 Sep 2020 07:19:57 +0000 Original-Received: from localhost ([127.0.0.1]:46098 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGzpF-00015d-Ai for submit@debbugs.gnu.org; Sat, 12 Sep 2020 03:19:57 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:58172) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kGzpE-00015R-Ck for 43195@debbugs.gnu.org; Sat, 12 Sep 2020 03:19:56 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:59032) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kGzp9-0002UK-4j; Sat, 12 Sep 2020 03:19:51 -0400 Original-Received: from [176.228.60.248] (port=3228 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kGzp8-0001kp-Fl; Sat, 12 Sep 2020 03:19:50 -0400 In-Reply-To: <20200904153803.esenh3j2af4ymyd7@google.com> (message from Fangrui Song on Fri, 4 Sep 2020 08:38:03 -0700) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:187881 Archived-At: > Date: Fri, 4 Sep 2020 08:38:03 -0700 > From: Fangrui Song > Cc: 43195@debbugs.gnu.org > > >diff --git a/src/terminfo.c b/src/terminfo.c > >index 51fd32e..0765996 100644 > >--- a/src/terminfo.c > >+++ b/src/terminfo.c > >@@ -23,9 +23,12 @@ > > > > /* Define these variables that serve as global parameters to termcap, > > so that we do not need to conditionalize the places in Emacs > >- that set them. */ > >+ that set them. But don't do that for terminfo, as that could > >+ cause link errors when using -fno-common. */ > > > >+#if !TERMINFO > > char *UP, *BC, PC; > >+#endif > > > > /* Interface to curses/terminfo library. > > Turns out that all of the terminfo-level routines look > > > > Looks great! Thanks! Thanks, installed for Emacs 27.2. > One nit, > > #if !TERMINFO > > probably should be > > #ifndef TERMINFO That's the same thing with modern compilers. > I don't know whether it is worth mentioning that -fcommon/-fno-common does not > cause a linker error when libtinfo.so is linked (a common/regular definition > preempts a shared definition). > > -fno-common + libtinfo.a => multiple definition error OK, but the change works even in these other cases, right?