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— 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.- The SVr4
<curses.h>doestypedef char bool;, which clashes with C'sbool(a macro for_Boolfrom<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).