From unknown Wed Jun 18 23:12:47 2025 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 X-Mailer: MIME-tools 5.509 (Entity 5.509) Content-Type: text/plain; charset=utf-8 From: bug#43195 <43195@debbugs.gnu.org> To: bug#43195 <43195@debbugs.gnu.org> Subject: Status: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo Reply-To: bug#43195 <43195@debbugs.gnu.org> Date: Thu, 19 Jun 2025 06:12:47 +0000 retitle 43195 [PATCH] Remove definitions of UP, BC and PC which should be p= rovided by terminfo reassign 43195 emacs submitter 43195 Fangrui Song severity 43195 normal tag 43195 patch thanks From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 01:07:40 2020 Received: (at submit) by debbugs.gnu.org; 4 Sep 2020 05:07:40 +0000 Received: from localhost ([127.0.0.1]:36938 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kE3wq-0004Rh-6p for submit@debbugs.gnu.org; Fri, 04 Sep 2020 01:07:40 -0400 Received: from lists.gnu.org ([209.51.188.17]:57500) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from <3FZFRXwcKDX4ocumtc0iqqing.eqodwi-ipw-goceuipw.qti@flex--maskray.bounces.google.com>) id 1kE03J-0008CA-0O for submit@debbugs.gnu.org; Thu, 03 Sep 2020 20:58:05 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:53104) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from <3FZFRXwcKDX4ocumtc0iqqing.eqodwi-ipw-goceuipw.qti@flex--maskray.bounces.google.com>) id 1kE03I-0001Y2-Nh for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 20:58:04 -0400 Received: from mail-pf1-x449.google.com ([2607:f8b0:4864:20::449]:43817) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from <3FZFRXwcKDX4ocumtc0iqqing.eqodwi-ipw-goceuipw.qti@flex--maskray.bounces.google.com>) id 1kE03D-0002BU-QM for bug-gnu-emacs@gnu.org; Thu, 03 Sep 2020 20:58:04 -0400 Received: by mail-pf1-x449.google.com with SMTP id c190so3048873pfa.10 for ; Thu, 03 Sep 2020 17:57:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=sender:date:message-id:mime-version:subject:from:to:cc; bh=2EBkfbXrXavlLnDLA2/E0JLybZivrwvWYYYVdsIArYI=; b=OfuEUgMj8/c1yXS0zp01lZPGGucR23OrDJ90BVPQpI69jWfHuyy3bi6XiSjeQrVEUF KMRAM4pKhS8G1h0Gxr2RxXa3x+m2c0DT5fMF7UV1BNLpmIVWfFS3h/w12QR8J77q1dpY 9mxlOaxOxF6an4XTrlOUY5ETJectDMGgrFcapGYUmxLwnpbbuSv4QPJJm/I0Qm0vGcjB k6TVXU+rAXPcNTUXOWJ2COVCWG3yu8d+5w4LExciP+cSYiqOihQRQ4qhBAnqZPMMRA8N 4bjmn7tC/E8C4snRZfZhrWJ0k5MNvHA43wRm1UQyjpbSc9UHqjSMqxUbhTuasPkjSS3W A4TA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:date:message-id:mime-version:subject:from :to:cc; bh=2EBkfbXrXavlLnDLA2/E0JLybZivrwvWYYYVdsIArYI=; b=rULVJ/ZKsYHWEgFEGV8drubfq3kakPDOMrP0dtaTZmY2QDh4jeyz+kMBR+6rbddsTt AAmOuE1fbm2CeC8q9m61DNGB7H4g6XZ3pQjrXbOXIOpQ1deXvnLfyPNyKoyaAz62L2Hu W+X/GMQAFoWA+n53t1ZcueHkC4HChk5TyJXhHUtm7XaNyCyBa0pJxPhccDvo2DDC8AsP CSTxnPMyw+kaJ6164j4xsU2v21drHQFO22f9PwdB808CaKfhQWXNBELbX5tnMEq93Uf0 6uMsJ4DfKTpQPbhMZBYGX3tldCb2liFzPbHzO/x6oDjnelPFOksjMpkd34rjRgfSeEEv AGTA== X-Gm-Message-State: AOAM533BmaOwlOR+2H2j2ch7JjSXDd1snZ8HR881GLYBZKN2ntCpgeZR aO+CJxWYsuXhTCT4Tr04iKEIXbU9hRZcZ5RZ0CpjBIsaiF7eEyplVVNb2KF8AGlBn2Q2OdJjRK1 xNXekxohpcwPcFAck3naQpvxmaWI0iT04ZtvoVPaB5PPz5rcPQbNQuiPbIWlYSrk= X-Google-Smtp-Source: ABdhPJxu9HrKX/BI4HmvT0ETmV6zqSyVXUl5bXQQqNoMfyF2Sxzd4TiepCOPgNEduElAUQsgqVRTRngbkB9f X-Received: from maskray1.svl.corp.google.com ([2620:15c:2ce:0:a6ae:11ff:fe11:4abb]) (user=maskray job=sendgmr) by 2002:a62:d44e:0:b029:13c:1611:652f with SMTP id u14-20020a62d44e0000b029013c1611652fmr4466598pfl.15.1599181077168; Thu, 03 Sep 2020 17:57:57 -0700 (PDT) Date: Thu, 3 Sep 2020 17:57:48 -0700 Message-Id: <20200904005748.1538513-1-maskray@google.com> Mime-Version: 1.0 X-Mailer: git-send-email 2.28.0.526.ge36021eeef-goog Subject: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo From: Fangrui Song To: bug-gnu-emacs@gnu.org Content-Type: text/plain; charset="UTF-8" Received-SPF: pass client-ip=2607:f8b0:4864:20::449; envelope-from=3FZFRXwcKDX4ocumtc0iqqing.eqodwi-ipw-goceuipw.qti@flex--maskray.bounces.google.com; helo=mail-pf1-x449.google.com X-detected-operating-system: by eggs.gnu.org: No matching host in p0f cache. That's all we know. X-Spam_score_int: -100 X-Spam_score: -10.1 X-Spam_bar: ---------- X-Spam_report: (-10.1 / 5.0 requ) BAYES_00=-1.9, DKIMWL_WL_MED=-0.5, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_NONE=0.001, SPF_PASS=-0.001, USER_IN_DEF_DKIM_WL=-7.5 autolearn=ham autolearn_force=no X-Spam_action: no action X-Spam-Score: -1.3 (-) X-Debbugs-Envelope-To: submit X-Mailman-Approved-At: Fri, 04 Sep 2020 01:07:38 -0400 Cc: Fangrui Song X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -2.3 (--) 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 03:37:03 2020 Received: (at 43195) by debbugs.gnu.org; 4 Sep 2020 07:37:03 +0000 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 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 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 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 Date: Fri, 04 Sep 2020 10:36:45 +0300 Message-Id: <83wo1at2lu.fsf@gnu.org> From: Eli Zaretskii To: Fangrui Song In-Reply-To: <20200904005748.1538513-1-maskray@google.com> (bug-gnu-emacs@gnu.org) Subject: Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo References: <20200904005748.1538513-1-maskray@google.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43195 Cc: 43195@debbugs.gnu.org, maskray@google.com X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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 From debbugs-submit-bounces@debbugs.gnu.org Fri Sep 04 11:38:15 2020 Received: (at 43195) by debbugs.gnu.org; 4 Sep 2020 15:38:15 +0000 Received: from localhost ([127.0.0.1]:40390 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEDn4-0007Rh-Rg for submit@debbugs.gnu.org; Fri, 04 Sep 2020 11:38:15 -0400 Received: from mail-pf1-f176.google.com ([209.85.210.176]:34216) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kEDn3-0007RT-7U for 43195@debbugs.gnu.org; Fri, 04 Sep 2020 11:38:13 -0400 Received: by mail-pf1-f176.google.com with SMTP id v196so4821521pfc.1 for <43195@debbugs.gnu.org>; Fri, 04 Sep 2020 08:38:13 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=fVExDgdVoClVf1h2hdOBElrP+JoAmt7Hzes2Tfm0H6U=; b=QVMZs9eU7zqLzlI0MWjGG6HCaFmDJxDr3nNfJUGZuwil/B74ONB4UP4iMrPKzGRlD9 hNm8KIJG5hNzVfdpJ6oy/nfl305bLe1FIaW9hl/wQY/6XaF39OL5itiEUlSRu5QQs9SR g/sGW9bUeTJZ3nmdYL/MaG9Dn/2tiMzE8zKUTqDAKeKY9UmEkph9lYoQsTPO97s4byik +Uq6xZmwU+o4SIZg9Jh9LoXiN/PZHPYgK33xQHHaZCigeajA/E1oOCJO9NQCRM0dG/OZ TPhZJdRlJ/kZ9ARkTeLnxfLunI+/Js0JkrGIGybPwkcGz4vCX7qlz4jKnQVQMJyn57xT 4+jg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=fVExDgdVoClVf1h2hdOBElrP+JoAmt7Hzes2Tfm0H6U=; b=abBl9zcvIYxGCRdqZ0kVRpX4kxUg46W4GnsY5t5vlI/3lcQG5d2dTCTysqOY2Vxxyd zFJcvRs3rZ0d0Hp76kb9vNyZRru6qgRz7W5VtsiJY2VJL/aLj1bKs11DnpBGv4ZLiPCy v/zwTijsw10TvAzFxLlvgqq5WzOzKypDDOrtgaAkZ54wJiDx5nKOOgyzEnFAA3sfmKLH Y2O54B8b7a6uKIGO8YcBPnwfF7s0fHemo1H69Ct7v195vR/XejwxcQ1OZft7IOTjtYXZ X1X4bs44P6Jg/l5GU06o3dhSCViW0PoxScEegih17BH8SDkLQGchZJAlSYse7/9gsten 0tew== X-Gm-Message-State: AOAM531+GtBLYkWe7R50pfreg3gfXABsHl15hdE5nMhpUmtdPb+hhUjp HDC0urU0dnX7NF9YzShhgGc6Dw== X-Google-Smtp-Source: ABdhPJxtcypiaSeXqo0usbDV7I5Q8DzfcwBrIYW5bg7djxP+/ySEKnycmTeVvXfbfBAbNHfM4HzsuA== X-Received: by 2002:a65:6093:: with SMTP id t19mr7513942pgu.13.1599233886877; Fri, 04 Sep 2020 08:38:06 -0700 (PDT) Received: from google.com ([2620:15c:2ce:0:a6ae:11ff:fe11:4abb]) by smtp.gmail.com with ESMTPSA id c3sm7071649pfo.120.2020.09.04.08.38.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2020 08:38:06 -0700 (PDT) Date: Fri, 4 Sep 2020 08:38:03 -0700 From: Fangrui Song To: Eli Zaretskii Subject: Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo Message-ID: <20200904153803.esenh3j2af4ymyd7@google.com> References: <20200904005748.1538513-1-maskray@google.com> <83wo1at2lu.fsf@gnu.org> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii; format=flowed Content-Disposition: inline In-Reply-To: <83wo1at2lu.fsf@gnu.org> X-Spam-Score: -4.8 (----) X-Debbugs-Envelope-To: 43195 Cc: 43195@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -5.8 (-----) On 2020-09-04, Eli Zaretskii wrote: >> 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 > Looks great! Thanks! One nit, #if !TERMINFO probably should be #ifndef TERMINFO 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 From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 12 03:19:57 2020 Received: (at 43195) by debbugs.gnu.org; 12 Sep 2020 07:19:57 +0000 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 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 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 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 Date: Sat, 12 Sep 2020 10:19:48 +0300 Message-Id: <83lfhfea23.fsf@gnu.org> From: Eli Zaretskii To: Fangrui Song In-Reply-To: <20200904153803.esenh3j2af4ymyd7@google.com> (message from Fangrui Song on Fri, 4 Sep 2020 08:38:03 -0700) Subject: Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo References: <20200904005748.1538513-1-maskray@google.com> <83wo1at2lu.fsf@gnu.org> <20200904153803.esenh3j2af4ymyd7@google.com> X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43195 Cc: 43195@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > 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? From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 12 03:33:48 2020 Received: (at 43195) by debbugs.gnu.org; 12 Sep 2020 07:33:48 +0000 Received: from localhost ([127.0.0.1]:46110 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH02e-0001RZ-3d for submit@debbugs.gnu.org; Sat, 12 Sep 2020 03:33:48 -0400 Received: from mail-pg1-f179.google.com ([209.85.215.179]:34007) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH02a-0001RJ-AF for 43195@debbugs.gnu.org; Sat, 12 Sep 2020 03:33:47 -0400 Received: by mail-pg1-f179.google.com with SMTP id u13so8047304pgh.1 for <43195@debbugs.gnu.org>; Sat, 12 Sep 2020 00:33:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=jViMqXLFyr8aEyYE6YVQWyIOr6KvRSGGT3T0/FzKCec=; b=i78InrmmhKXzrDT/Kl0YeQJLv0Gk4Zl9Qpn/hnF3BcIJbZorUl/4O8dsdmvhYlEGjy FD/9Qm27uirIY6wNP2mqYYwYZHzJj2uzAxyWy+ymF1PxxaQvKhOlg1+ABj7rsgQMmEwl u1etwf7sM/VrirSV7aBVWnnPzMrpW20mZFCEeCiCNOjELju8C9Jcp7cx9uL7xa8u1tx7 CADkTNwqW+N/5k2XSgxoifPqNHhpOcSlapR8dZvvTpL8WRgVl+LF4Yelm/XCge8gHjwy 9kiz/WCPyPXbxfspdfNfvRp4Dl0Dk9wlCQYJa0m5WErjfxzai7QcUnk97B9RmZK3093F FdWA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=jViMqXLFyr8aEyYE6YVQWyIOr6KvRSGGT3T0/FzKCec=; b=EP213vUaZ8OzonAkDk2awfYGFpoIFbAMpwTrpnZsDRmlzlRVT5XfItY3Y6ogek9U3V lqpKYJm4wJNQuOHHoGOSJ79yf2X0BPS1XNic0UXGTzUu5Xr9eAKvKxekULVl0RgqI67G jFosP8i26JgOexoXOUuRJ5WXJR/d6HKTIOfWg25Q25GruepXb/pxvmNcph7nzDLc1Gbw QPRPw/h8kR9oe5xju/kVr+i0tmsKTpXVAXmxYU5Y8L/TQAwRGHve3oxJTbglxg+tuX5M aaN4LDvKNcJUDfw5/rgKwTGz3erP5hJcXK5u2JBwUt6oI4VjnAvTZKrLLHYJxXL+QoZh Bjhw== X-Gm-Message-State: AOAM531V5kj5h+vwMkz3fVhjLwhHp1hVwuWnVjuOSFXIgPM2mKIE5z2M pJuNvEFC5hA4YbBztz5LovD64bsfq/hZUqAtcARDOw== X-Google-Smtp-Source: ABdhPJxvNiUwL0APDYycPYxiyJwfQwFZFHiVmZIDdR+cf3rIMGDbzsEhG6x9PLNZut1Z3CKZEsPv6JHxyE70dGhP5K4= X-Received: by 2002:a63:c64d:: with SMTP id x13mr4228798pgg.380.1599896018179; Sat, 12 Sep 2020 00:33:38 -0700 (PDT) MIME-Version: 1.0 References: <20200904005748.1538513-1-maskray@google.com> <83wo1at2lu.fsf@gnu.org> <20200904153803.esenh3j2af4ymyd7@google.com> <83lfhfea23.fsf@gnu.org> In-Reply-To: <83lfhfea23.fsf@gnu.org> From: =?UTF-8?B?RsSBbmctcnXDrCBTw7JuZw==?= Date: Sat, 12 Sep 2020 00:33:27 -0700 Message-ID: Subject: Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo To: Eli Zaretskii Content-Type: text/plain; charset="UTF-8" X-Spam-Score: -8.0 (--------) X-Debbugs-Envelope-To: 43195 Cc: 43195@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -9.0 (---------) On Sat, Sep 12, 2020 at 12:19 AM Eli Zaretskii wrote: > > > 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? Yep! The new code should work in other cases, -fcommon/-fno-common x libtinfo.a/libtinfo.so From debbugs-submit-bounces@debbugs.gnu.org Sat Sep 12 03:49:18 2020 Received: (at 43195-done) by debbugs.gnu.org; 12 Sep 2020 07:49:18 +0000 Received: from localhost ([127.0.0.1]:46159 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH0Hd-0001oi-QX for submit@debbugs.gnu.org; Sat, 12 Sep 2020 03:49:18 -0400 Received: from eggs.gnu.org ([209.51.188.92]:33978) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1kH0Ha-0001oR-Dn for 43195-done@debbugs.gnu.org; Sat, 12 Sep 2020 03:49:16 -0400 Received: from fencepost.gnu.org ([2001:470:142:3::e]:59372) by eggs.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1kH0HV-0005Uu-3Q; Sat, 12 Sep 2020 03:49:09 -0400 Received: from [176.228.60.248] (port=1692 helo=home-c4e4a596f7) by fencepost.gnu.org with esmtpsa (TLS1.2:RSA_AES_256_CBC_SHA1:256) (Exim 4.82) (envelope-from ) id 1kH0HT-0005V8-Vh; Sat, 12 Sep 2020 03:49:08 -0400 Date: Sat, 12 Sep 2020 10:49:05 +0300 Message-Id: <83k0wze8pa.fsf@gnu.org> From: Eli Zaretskii To: =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= In-Reply-To: (message from =?utf-8?B?RsSBbmctcnXDrCBTw7JuZw==?= on Sat, 12 Sep 2020 00:33:27 -0700) Subject: Re: bug#43195: [PATCH] Remove definitions of UP, BC and PC which should be provided by terminfo References: <20200904005748.1538513-1-maskray@google.com> <83wo1at2lu.fsf@gnu.org> <20200904153803.esenh3j2af4ymyd7@google.com> <83lfhfea23.fsf@gnu.org> MIME-version: 1.0 Content-type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Spam-Score: -2.3 (--) X-Debbugs-Envelope-To: 43195-done Cc: 43195-done@debbugs.gnu.org X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: debbugs-submit-bounces@debbugs.gnu.org Sender: "Debbugs-submit" X-Spam-Score: -3.3 (---) > From: Fāng-ruì Sòng > Date: Sat, 12 Sep 2020 00:33:27 -0700 > Cc: 43195@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. From unknown Wed Jun 18 23:12:47 2025 Received: (at fakecontrol) by fakecontrolmessage; To: internal_control@debbugs.gnu.org From: Debbugs Internal Request Subject: Internal Control Message-Id: bug archived. Date: Sat, 10 Oct 2020 11:24:08 +0000 User-Agent: Fakemail v42.6.9 # This is a fake control message. # # The action: # bug archived. thanks # This fakemail brought to you by your local debbugs # administrator