Skip to content

Commit 5636769

Browse files
committed
Correctly report which version of libncurses was linked
Later versions of ncurses (20111030 and up) support NCURSES_WIDECHAR even when compiling with libncurses instead of libncursesw. Have tig correctly report whether it was linked against libncursesw or libncurses based off the same defines we set in the build script and use to determine which headers to include. Per the build system, either of HAVE_NCURSESW_H or HAVE_NCURSESW_CURSES_H may indicate the presence of ncursesw, so both are checked. (See jonas#1240 as an example of where `tig --version` incorrectly reports `ncursesw` instead of `ncurses`).
1 parent 06f7d75 commit 5636769

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/tig.c

+1-1
Original file line numberDiff line numberDiff line change
@@ -557,7 +557,7 @@ parse_options(int argc, const char *argv[], bool pager_mode)
557557
printf("tig version %s\n", TIG_VERSION);
558558
#ifdef NCURSES_VERSION
559559
printf("%s version %s.%d\n",
560-
#ifdef NCURSES_WIDECHAR
560+
#if defined(HAVE_NCURSESW_CURSES_H) || defined(HAVE_NCURSESW_H)
561561
"ncursesw",
562562
#else
563563
"ncurses",

0 commit comments

Comments
 (0)