../ScreenManager.c: In function 'ScreenManager_run':
../ScreenManager.c:361:12: error: 'KEY_RESIZE' undeclared (first use in this function); did you mean 'KEY_RESUME'?
361 | case KEY_RESIZE:
| ^~~~~~~~~~
| KEY_RESUME
../ScreenManager.c:361:12: note: each undeclared identifier is reported only once for each function it appears in
Ref:
/*
* KEY_RESIZE is an extended feature that relies upon the SIGWINCH handler
* in ncurses.
*/
#if 1
#ifndef NCURSES_SIGWINCH
#define NCURSES_SIGWINCH 1
#endif
#else
#undef NCURSES_SIGWINCH
#define NCURSES_SIGWINCH 0
#endif
...
#if NCURSES_SIGWINCH
#define KEY_RESIZE 0632 /* Terminal resize event */
#endif
hm, we could #ifdef that. And we could write our own signal handler for sigwinch in case ncurses has been compiled without its own. Or we gracefully complain and exit at the configure stage.
The below line causes a failure to compile htop with gcc-14.1 when ncurses has not been built with --enable-sigwinch. https://github.com/htop-dev/htop/blob/4b3dfa246e9fa0fe3ce7d97e7a37239251ada42b/ScreenManager.c#L361-L365
Ref: