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: Fri, 04 Sep 2020 10:36:45 +0300 Message-ID: <83wo1at2lu.fsf@gnu.org> References: <20200904005748.1538513-1-maskray@google.com> Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="22954"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 43195@debbugs.gnu.org, maskray@google.com To: Fangrui Song Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Sep 04 09:38:09 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 1kE6IT-0005t8-1Q for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 09:38:09 +0200 Original-Received: from localhost ([::1]:38674 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kE6IS-0003IL-48 for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 04 Sep 2020 03:38:08 -0400 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:37536) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1kE6IM-0003I1-J0 for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 03:38:02 -0400 Original-Received: from debbugs.gnu.org ([209.51.188.43]:53842) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1kE6IM-0006cV-9y for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 03:38:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1kE6IM-0006Wf-7T for bug-gnu-emacs@gnu.org; Fri, 04 Sep 2020 03:38: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: Fri, 04 Sep 2020 07:38: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.159920502325007 (code B ref 43195); Fri, 04 Sep 2020 07:38:02 +0000 Original-Received: (at 43195) by debbugs.gnu.org; 4 Sep 2020 07:37:03 +0000 Original-Received: from localhost ([127.0.0.1]:37155 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE6HP-0006VH-Kd for submit@debbugs.gnu.org; Fri, 04 Sep 2020 03:37:03 -0400 Original-Received: from eggs.gnu.org ([209.51.188.92]:55500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE6HN-0006Ui-Sx for 43195@debbugs.gnu.org; Fri, 04 Sep 2020 03:37:02 -0400 Original-Received: from fencepost.gnu.org ([2001:470:142:3::e]:54249) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kE6HI-0006Xo-J7; Fri, 04 Sep 2020 03:36:56 -0400 Original-Received: from [176.228.60.248] (port=4935 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kE6HH-0008It-VR; Fri, 04 Sep 2020 03:36:56 -0400 In-Reply-To: <20200904005748.1538513-1-maskray@google.com> (bug-gnu-emacs@gnu.org) 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:187090 Archived-At: > Cc: Fangrui Song > Date: Thu, 3 Sep 2020 17:57:48 -0700 > From: Fangrui Song via "Bug reports for GNU Emacs, > the Swiss army knife of text editors" > > Otherwise if terminfo.c is compiled with -fno-common (GCC 10 and clang > 11 default) and the archive version of the terminfo library is linked, > there will be a multiple definition linker error. > > * src/terminfo.c (UP, BC, PC): Delete. Given the comment there, I think this should be conditioned on actually using terminfo. Does the following patch work for you? 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