git/list[1] front-page[2] threads[3] people[4] search[5] about
 

Re: [tig] Re: compilation error: undefined reference to `set_tabsize'

From
Kumar Appaiah <a.kumar@alumni.iitm.ac.in>
Date
Sep 20, 2010, 23:13 UTC
Message-ID
<20100920231349.GK23119@bowser.ece.utexas.edu>
In-Reply-To
<20100920230559.GJ23119@bowser.ece.utexas.edu>
On Mon, Sep 20, 2010 at 06:05:59PM -0500, Kumar Appaiah wrote:
Show 13 quoted lines
> 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
Previous: Kumar AppaiahNext: Stefan Naewe
Message 6 of 9 in “[tig] compilation error: undefined reference to `set_tabsize'”
  1. Nicolas SebrechtSep 20, 2010
  2. Stefan NäweSep 20, 2010
  3. [tig] Re: compilation error: undefined reference to `set_tabsize'Nicolas Sebrecht, Sep 20, 2010
  4. Jonas FonsecaSep 20, 2010
  5. Kumar AppaiahSep 20, 2010
  6. Kumar AppaiahSep 20, 2010
  7. Stefan NaeweSep 21, 2010
  8. Jonas FonsecaSep 21, 2010
  9. [tig] Re: compilation error: undefined reference to `set_tabsize'Nicolas Sebrecht, Sep 21, 2010

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.