-
Fix macOS build: use CURSES_INCLUDE_DIRS and enable wide-char decls
released this
2026-08-03 17:22:34 +00:00 | 0 commits to master since this releaseTwo latent defects broke the kte target on macOS once TerminalInputHandler
switched from getch() to get_wch().include_directories() referenced CURSES_INCLUDE_DIR, a name FindCurses never
sets (it exports CURSES_INCLUDE_DIRS). The variable expanded to nothing, so
no curses include path was added and the compiler silently fell back to the
macOS SDK's narrow-char header on the default include path.Both the SDK and Homebrew headers declare get_wch and friends only when
NCURSES_WIDECHAR is set, defaulting it to 0 absent a feature-test macro, so
the build failed with "use of undeclared identifier 'get_wch'". We always
request and link the wide library, so define NCURSES_WIDECHAR=1; redefining
it identically is benign on platforms whose headers already set it.kte and kge now compile and link against libncursesw, and the app bundle
vendors it. Full test suite passes.Co-Authored-By: Claude Opus 5 (1M context) noreply@anthropic.com
Downloads