GNU bug report logs - #43195
[PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo

Previous Next

Package: emacs;

Reported by: Fangrui Song <maskray <at> google.com>

Date: Fri, 4 Sep 2020 05:08:01 UTC

Severity: normal

Tags: patch

Done: Eli Zaretskii <eliz <at> gnu.org>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: help-debbugs <at> gnu.org (GNU bug Tracking System)
To: Eli Zaretskii <eliz <at> gnu.org>
Cc: tracker <at> debbugs.gnu.org
Subject: bug#43195: closed ([PATCH] Remove definitions of UP, BC and PC
 which should be provided by terminfo)
Date: Sat, 12 Sep 2020 07:50:01 +0000
[Message part 1 (text/plain, inline)]
Your message dated Sat, 12 Sep 2020 10:49:05 +0300
with message-id <83k0wze8pa.fsf <at> gnu.org>
and subject line Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo
has caused the debbugs.gnu.org bug report #43195,
regarding [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo
to be marked as done.

(If you believe you have received this mail in error, please contact
help-debbugs <at> gnu.org.)


-- 
43195: http://debbugs.gnu.org/cgi/bugreport.cgi?bug=43195
GNU Bug Tracking System
Contact help-debbugs <at> gnu.org with problems
[Message part 2 (message/rfc822, inline)]
From: Fangrui Song <maskray <at> google.com>
To: bug-gnu-emacs <at> gnu.org
Cc: Fangrui Song <maskray <at> google.com>
Subject: [PATCH] Remove definitions of UP, BC and PC which should be provided
 by terminfo
Date: Thu,  3 Sep 2020 17:57:48 -0700
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.
---
 src/terminfo.c | 6 ------
 1 file changed, 6 deletions(-)

diff --git a/src/terminfo.c b/src/terminfo.c
index 51fd32e9e0..cc93d1012e 100644
--- a/src/terminfo.c
+++ b/src/terminfo.c
@@ -21,12 +21,6 @@
 
 #include "lisp.h"
 
-/* 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.  */
-
-char *UP, *BC, PC;
-
 /* Interface to curses/terminfo library.
    Turns out that all of the terminfo-level routines look
    like their termcap counterparts except for tparm, which replaces
-- 
2.28.0.526.ge36021eeef-goog



[Message part 3 (message/rfc822, inline)]
From: Eli Zaretskii <eliz <at> gnu.org>
To: Fāng-ruì Sòng <maskray <at> google.com>
Cc: 43195-done <at> debbugs.gnu.org
Subject: Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which
 should be provided by terminfo
Date: Sat, 12 Sep 2020 10:49:05 +0300
> From: Fāng-ruì Sòng <maskray <at> google.com>
> Date: Sat, 12 Sep 2020 00:33:27 -0700
> Cc: 43195 <at> debbugs.gnu.org
> 
> > > 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?
> 
> Yep! The new code should work in other cases, -fcommon/-fno-common x
> libtinfo.a/libtinfo.so

OK, so I'm closing the bug report.

Thanks.


This bug report was last modified 4 years and 304 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.