Skip to content

build: Always check tgetent return code#1664

Closed
marv wants to merge 1 commit intovim:masterfrom
marv:tgetent-retcode-check
Closed

build: Always check tgetent return code#1664
marv wants to merge 1 commit intovim:masterfrom
marv:tgetent-retcode-check

Conversation

@marv
Copy link
Copy Markdown

@marv marv commented Apr 28, 2017

Hey folks,
I finally found the root cause of the problem I experienced and reported in issue #1601 thanks to the extra information I got from #1634. I explicitly set the terminal library by passing --with-tlib=ncurses. Due to the logic in the configure script this caused the check to determine whether the tgetent returns zero or non-zero when given a non-existent terminal. The check is only run when $olibs != $LIBS which is not met when --with-tlib is passed, because in that case $LIBS is intentionally set to $olibs in oder to meet the $olibs = $LIBS condition of the subsequent check for the function tgetent. Therefore TGETENT_ZERO_ERR won't be defined even if the specified terminal library returns zero.
My best judgement is that the check should be run no matter if the terminal library was explicitly given or automatically selected. The proposed patched removes the condition around the check, so that it's always run

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #1664 into master will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##           master    #1664      +/-   ##
==========================================
+ Coverage   74.87%    74.9%   +0.02%     
==========================================
  Files          76       76              
  Lines      124888   124888              
==========================================
+ Hits        93516    93543      +27     
+ Misses      31372    31345      -27
Impacted Files Coverage Δ
src/undo.c 81.69% <0%> (-0.07%) ⬇️
src/gui.c 45.56% <0%> (ø) ⬆️
src/evalfunc.c 80.95% <0%> (+0.02%) ⬆️
src/gui_gtk_x11.c 47.44% <0%> (+0.05%) ⬆️
src/window.c 81.25% <0%> (+0.13%) ⬆️
src/channel.c 83.92% <0%> (+0.13%) ⬆️
src/os_unix.c 58.78% <0%> (+0.48%) ⬆️
src/version.c 80.3% <0%> (+1.01%) ⬆️
src/if_xcmdsrv.c 84.62% <0%> (+1.29%) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b7637c4...62df145. Read the comment docs.

@brammool brammool closed this in 696cbd2 Apr 28, 2017
desvp pushed a commit to desvp/vim that referenced this pull request May 30, 2017
Problem:    Configure check for return value of tgetent is skipped.
Solution:   Always perform the check. (Marvin Schmidt, closes vim#1664)
dpelle pushed a commit to dpelle/vim that referenced this pull request Jul 31, 2017
Problem:    Configure check for return value of tgetent is skipped.
Solution:   Always perform the check. (Marvin Schmidt, closes vim#1664)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants