[gdb/build] Fix build without ncurses in maintenance_info_screen
authorTom de Vries <tdevries@suse.de>
Sat, 29 Apr 2023 05:04:27 +0000 (07:04 +0200)
committerTom de Vries <tdevries@suse.de>
Sat, 29 Apr 2023 05:04:27 +0000 (07:04 +0200)
commite5cbbbf79ad269983f744414a7efece6784dd682
treec0fb5b96f4926774437e6ab9b275c032d23d6acc
parent1b05f1083a4e18e5141ddce7551b79d07d9b272d
[gdb/build] Fix build without ncurses in maintenance_info_screen

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
gdb/utils.c