From: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
To: git@vger.kernel.org
Cc: "Nicolas Sebrecht" <nicolas.s.dev@gmx.fr>,
"Stefan Näwe" <stefan.naewe@googlemail.com>,
fonseca@diku.dk
Subject: Re: [tig] Re: compilation error: undefined reference to `set_tabsize'
Date: Mon, 20 Sep 2010 18:13:49 -0500 [thread overview]
Message-ID: <20100920231349.GK23119@bowser.ece.utexas.edu> (raw)
In-Reply-To: <20100920230559.GJ23119@bowser.ece.utexas.edu>
On Mon, Sep 20, 2010 at 06:05:59PM -0500, Kumar Appaiah wrote:
> On Mon, Sep 20, 2010 at 10:43:44PM +0200, Nicolas Sebrecht wrote:
> > > That change works for me on Cygwin, Ubuntu 10.04, Debian 5.0.6
> > >
> > > Maybe you should say something about your system/OS version ?
> >
> > Naturally. I'm running on Gentoo.
> >
>
> Ack that this also breaks build on CentOS. The simple reason is that
> the ncurses version on CentOS 5.5 is ncurses-5.5, while that on Debian
> Lenny is 5.7+. According to the changelog, 5.6 onwards has
> set_tabsize, so checking for that version of ncurses might be a good
> option.
I have attached a patch which uses the patch number to determine this:
HTH, Thanks!
Kumar
>From d10b7f15160b7d8da74f899f25018591cb33eec0 Mon Sep 17 00:00:00 2001
From: Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
Date: Mon, 20 Sep 2010 18:10:11 -0500
Subject: [PATCH] Check the ncurse version before using set_tabsize
This patch checks the ncurses patch level to decide if set_tabsize is
to be used in place of the TABSIZE macro, for setting the tab size.
---
tig.c | 4 ++++
1 files changed, 4 insertions(+), 0 deletions(-)
diff --git a/tig.c b/tig.c
index 7bc5daa..01b55d7 100644
--- a/tig.c
+++ b/tig.c
@@ -7111,7 +7111,11 @@ init_display(void)
keypad(status_win, TRUE);
wbkgdset(status_win, get_line_attr(LINE_STATUS));
+#if defined(NCURSES_VERSION_PATCH) && (NCURSES_VERSION_PATCH >= 20080119)
set_tabsize(opt_tab_size);
+#else
+ TABSIZE = opt_tab_size;
+#endif
term = getenv("XTERM_VERSION") ? NULL : getenv("COLORTERM");
if (term && !strcmp(term, "gnome-terminal")) {
--
1.7.2.3
next prev parent reply other threads:[~2010-09-20 23:14 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2010-09-20 17:42 [tig] compilation error: undefined reference to `set_tabsize' Nicolas Sebrecht
2010-09-20 18:36 ` Stefan Näwe
2010-09-20 20:43 ` [tig] " Nicolas Sebrecht
2010-09-20 21:48 ` Jonas Fonseca
2010-09-20 23:05 ` Kumar Appaiah
2010-09-20 23:13 ` Kumar Appaiah [this message]
2010-09-21 6:37 ` Stefan Naewe
2010-09-21 12:57 ` Jonas Fonseca
2010-09-21 17:34 ` Nicolas Sebrecht
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20100920231349.GK23119@bowser.ece.utexas.edu \
--to=a.kumar@alumni.iitm.ac.in \
--cc=fonseca@diku.dk \
--cc=git@vger.kernel.org \
--cc=nicolas.s.dev@gmx.fr \
--cc=stefan.naewe@googlemail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).