Commit 453ee06
gh-154055: Gate optional curses functions absent on old SVr4 curses
Build hygiene so the curses modules build against a limited curses (e.g. the
native SVr4 curses of illumos/Solaris), matching how other optional functions
are already gated:
* Probe and #ifdef-gate the X/Open attr_t functions (window.attr_get/attr_set/
attr_on/attr_off/color_set), the soft-label attribute functions
(slk_attr_on/off/set, slk_color) and scr_set(); scr_set is probed separately
from the scr_dump family, which SVr4 has without it.
* Stop gating update_lines_cols() on resizeterm(): it only reads LINES/COLS and
is used unconditionally (e.g. by set_term()), so a build without resizeterm()
failed to link.
* On Solaris/illumos define _BOOL (and include <stdbool.h>) so the SVr4
<curses.h> "typedef char bool" does not clash with C's bool.
test.test_curses: skip or guard the tests that use the now-optional functions,
split test_attributes so its chtype-based part still runs, and treat the native
curses of NetBSD and illumos/Solaris as having broken newterm() (they crash on
repeated newterm()/delscreen(), like ncurses before 6.5).
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>1 parent 4b60b46 commit 453ee06
8 files changed
Lines changed: 781 additions & 29 deletions
File tree
- Include
- Lib/test
- Misc/NEWS.d/next/Build
- Modules
- clinic
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
43 | 43 | | |
44 | 44 | | |
45 | 45 | | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
46 | 55 | | |
47 | 56 | | |
48 | 57 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
84 | 84 | | |
85 | 85 | | |
86 | 86 | | |
87 | | - | |
88 | | - | |
| 87 | + | |
| 88 | + | |
| 89 | + | |
| 90 | + | |
89 | 91 | | |
90 | | - | |
| 92 | + | |
| 93 | + | |
| 94 | + | |
| 95 | + | |
91 | 96 | | |
92 | 97 | | |
93 | 98 | | |
| |||
1143 | 1148 | | |
1144 | 1149 | | |
1145 | 1150 | | |
| 1151 | + | |
| 1152 | + | |
| 1153 | + | |
| 1154 | + | |
| 1155 | + | |
| 1156 | + | |
| 1157 | + | |
| 1158 | + | |
1146 | 1159 | | |
1147 | 1160 | | |
| 1161 | + | |
1148 | 1162 | | |
1149 | 1163 | | |
1150 | 1164 | | |
| |||
1170 | 1184 | | |
1171 | 1185 | | |
1172 | 1186 | | |
1173 | | - | |
1174 | | - | |
1175 | | - | |
1176 | | - | |
1177 | | - | |
1178 | 1187 | | |
1179 | 1188 | | |
| 1189 | + | |
1180 | 1190 | | |
1181 | 1191 | | |
1182 | 1192 | | |
| |||
1386 | 1396 | | |
1387 | 1397 | | |
1388 | 1398 | | |
| 1399 | + | |
1389 | 1400 | | |
1390 | | - | |
| 1401 | + | |
| 1402 | + | |
1391 | 1403 | | |
1392 | 1404 | | |
1393 | 1405 | | |
| |||
1849 | 1861 | | |
1850 | 1862 | | |
1851 | 1863 | | |
1852 | | - | |
1853 | | - | |
1854 | | - | |
| 1864 | + | |
| 1865 | + | |
| 1866 | + | |
| 1867 | + | |
| 1868 | + | |
1855 | 1869 | | |
1856 | 1870 | | |
1857 | 1871 | | |
| |||
Lines changed: 4 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
2433 | 2433 | | |
2434 | 2434 | | |
2435 | 2435 | | |
| 2436 | + | |
2436 | 2437 | | |
2437 | 2438 | | |
2438 | 2439 | | |
| |||
2458 | 2459 | | |
2459 | 2460 | | |
2460 | 2461 | | |
| 2462 | + | |
2461 | 2463 | | |
| 2464 | + | |
2462 | 2465 | | |
2463 | 2466 | | |
2464 | 2467 | | |
| |||
2482 | 2485 | | |
2483 | 2486 | | |
2484 | 2487 | | |
| 2488 | + | |
2485 | 2489 | | |
| 2490 | + | |
2486 | 2491 | | |
2487 | 2492 | | |
2488 | 2493 | | |
| |||
2499 | 2504 | | |
2500 | 2505 | | |
2501 | 2506 | | |
| 2507 | + | |
2502 | 2508 | | |
| 2509 | + | |
2503 | 2510 | | |
2504 | 2511 | | |
2505 | 2512 | | |
| |||
2516 | 2523 | | |
2517 | 2524 | | |
2518 | 2525 | | |
| 2526 | + | |
2519 | 2527 | | |
| 2528 | + | |
2520 | 2529 | | |
2521 | 2530 | | |
2522 | 2531 | | |
| |||
2538 | 2547 | | |
2539 | 2548 | | |
2540 | 2549 | | |
| 2550 | + | |
2541 | 2551 | | |
2542 | 2552 | | |
2543 | 2553 | | |
| |||
6065 | 6075 | | |
6066 | 6076 | | |
6067 | 6077 | | |
| 6078 | + | |
6068 | 6079 | | |
6069 | 6080 | | |
6070 | 6081 | | |
| |||
6081 | 6092 | | |
6082 | 6093 | | |
6083 | 6094 | | |
| 6095 | + | |
6084 | 6096 | | |
6085 | 6097 | | |
6086 | 6098 | | |
| |||
7444 | 7456 | | |
7445 | 7457 | | |
7446 | 7458 | | |
7447 | | - | |
7448 | 7459 | | |
7449 | | - | |
| 7460 | + | |
| 7461 | + | |
| 7462 | + | |
7450 | 7463 | | |
7451 | 7464 | | |
7452 | 7465 | | |
| |||
7515 | 7528 | | |
7516 | 7529 | | |
7517 | 7530 | | |
7518 | | - | |
7519 | | - | |
7520 | 7531 | | |
7521 | 7532 | | |
7522 | 7533 | | |
| |||
8353 | 8364 | | |
8354 | 8365 | | |
8355 | 8366 | | |
| 8367 | + | |
8356 | 8368 | | |
8357 | 8369 | | |
8358 | 8370 | | |
| |||
8370 | 8382 | | |
8371 | 8383 | | |
8372 | 8384 | | |
| 8385 | + | |
8373 | 8386 | | |
| 8387 | + | |
8374 | 8388 | | |
8375 | 8389 | | |
8376 | 8390 | | |
| |||
8388 | 8402 | | |
8389 | 8403 | | |
8390 | 8404 | | |
| 8405 | + | |
8391 | 8406 | | |
| 8407 | + | |
8392 | 8408 | | |
8393 | 8409 | | |
8394 | 8410 | | |
| |||
8412 | 8428 | | |
8413 | 8429 | | |
8414 | 8430 | | |
| 8431 | + | |
8415 | 8432 | | |
| 8433 | + | |
8416 | 8434 | | |
8417 | 8435 | | |
8418 | 8436 | | |
| |||
8429 | 8447 | | |
8430 | 8448 | | |
8431 | 8449 | | |
| 8450 | + | |
8432 | 8451 | | |
8433 | 8452 | | |
8434 | 8453 | | |
| |||
0 commit comments