Building the curses module against the native SVr4 curses — for example on illumos/Solaris with ./configure --with-curses=curses — fails, because Modules/_cursesmodule.c uses several optional functions unconditionally that old SVr4 curses does not provide.
Implicit-declaration errors:
wattr_get, wattr_set, wattr_on, wattr_off, wcolor_set — the window.attr_get(), attr_set(), attr_on(), attr_off() and color_set() methods (the X/Open attr_t API).
slk_attr_on, slk_attr_off, slk_attr_set, slk_color — the soft-label attribute functions.
scr_set — SVr4 has scr_dump()/scr_restore()/scr_init() but not scr_set(), so gating the whole family on scr_dump alone is not enough.
Other optional curses functions (is_pad, resizeterm, …) are already probed and #ifdef-gated; these are not.
Two more problems surface once those are gated:
update_lines_cols() is compiled only under HAVE_CURSES_RESIZETERM/HAVE_CURSES_RESIZE_TERM, but it is used unconditionally (e.g. by set_term()), so a curses without resizeterm() fails to link.
- The SVr4
<curses.h> does typedef char bool;, which clashes with C's bool (a macro for _Bool from <stdbool.h>) and fails to compile.
test.test_curses also needs to tolerate such a curses: skip the tests that use the now-optional functions, and treat the native curses of NetBSD and illumos/Solaris as having a broken newterm() (they crash on repeated newterm()/delscreen(), like ncurses before 6.5).
Linked PRs
Linked PRs
Building the
cursesmodule against the native SVr4 curses — for example on illumos/Solaris with./configure --with-curses=curses— fails, becauseModules/_cursesmodule.cuses several optional functions unconditionally that old SVr4 curses does not provide.Implicit-declaration errors:
wattr_get,wattr_set,wattr_on,wattr_off,wcolor_set— thewindow.attr_get(),attr_set(),attr_on(),attr_off()andcolor_set()methods (the X/Openattr_tAPI).slk_attr_on,slk_attr_off,slk_attr_set,slk_color— the soft-label attribute functions.scr_set— SVr4 hasscr_dump()/scr_restore()/scr_init()but notscr_set(), so gating the whole family onscr_dumpalone is not enough.Other optional curses functions (
is_pad,resizeterm, …) are already probed and#ifdef-gated; these are not.Two more problems surface once those are gated:
update_lines_cols()is compiled only underHAVE_CURSES_RESIZETERM/HAVE_CURSES_RESIZE_TERM, but it is used unconditionally (e.g. byset_term()), so a curses withoutresizeterm()fails to link.<curses.h>doestypedef char bool;, which clashes with C'sbool(a macro for_Boolfrom<stdbool.h>) and fails to compile.test.test_cursesalso needs to tolerate such a curses: skip the tests that use the now-optional functions, and treat the native curses of NetBSD and illumos/Solaris as having a brokennewterm()(they crash on repeatednewterm()/delscreen(), like ncurses before 6.5).Linked PRs
Linked PRs