With a build without ncurses we run into:
...
src/gdb/utils.c: In function ‘void maintenance_info_screen(const char*, int)’:
src/gdb/utils.c:1310:7: error: ‘COLS’ was not declared in this scope
COLS);
^~~~
src/gdb/utils.c:1331:8: error: ‘LINES’ was not declared in this scope
LINES);
^~~~~
...
Fix this by using HAVE_LIBCURSES.
Tested on x86_64-linux.
PR build/30391
Bug: https://sourceware.org/bugzilla/show_bug.cgi?id=30391
? " (unlimited - 1)"
: "")));
+#ifdef HAVE_LIBCURSES
gdb_printf (gdb_stdout,
_("Number of characters curses thinks "
"are in a line is %d.\n"),
COLS);
+#endif
gdb_printf (gdb_stdout,
_("Number of characters environment thinks "
rows,
rows == sqrt_int_max ? " (unlimited)" : "");
+#ifdef HAVE_LIBCURSES
gdb_printf (gdb_stdout,
_("Number of lines curses thinks "
"are in a page is %d.\n"),
LINES);
+#endif
gdb_printf (gdb_stdout,
_("Number of lines environment thinks "