Correctly report which version of libncurses was linked#1241
Merged
koutcher merged 1 commit intojonas:masterfrom Nov 20, 2022
Merged
Correctly report which version of libncurses was linked#1241koutcher merged 1 commit intojonas:masterfrom
koutcher merged 1 commit intojonas:masterfrom
Conversation
krobelus
approved these changes
Oct 21, 2022
koutcher
reviewed
Nov 19, 2022
src/tig.c
Outdated
| #ifdef NCURSES_VERSION | ||
| printf("%s version %s.%d\n", | ||
| #ifdef NCURSES_WIDECHAR | ||
| #ifdef HAVE_NCURSESW_CURSES_H |
Collaborator
There was a problem hiding this comment.
Thanks for reporting and fixing the problem. To be consistent with ax_with_curses.m4 we probably have to make it #if defined(HAVE_NCURSESW_CURSES_H) || defined(HAVE_NCURSESW_H), don't you think ?
Contributor
Author
There was a problem hiding this comment.
I believe you're correct and I've force-pushed an update that uses both. I'm not sure how I missed that.
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`).
82e37fd to
5636769
Compare
vxsl
pushed a commit
to vxsl/tig
that referenced
this pull request
Mar 18, 2026
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`).
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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.
(See #1240 as an example of where
tig --versionincorrectly reportsncurseswinstead ofncurses).