diff options
author | Tom de Vries <tdevries@suse.de> | 2023-04-29 07:04:27 +0200 |
---|---|---|
committer | Tom de Vries <tdevries@suse.de> | 2023-04-29 07:04:27 +0200 |
commit | e5cbbbf79ad269983f744414a7efece6784dd682 (patch) | |
tree | c0fb5b96f4926774437e6ab9b275c032d23d6acc /gdb/utils.c | |
parent | 1b05f1083a4e18e5141ddce7551b79d07d9b272d (diff) | |
download | gdb-e5cbbbf79ad269983f744414a7efece6784dd682.zip gdb-e5cbbbf79ad269983f744414a7efece6784dd682.tar.gz gdb-e5cbbbf79ad269983f744414a7efece6784dd682.tar.bz2 |
[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
Diffstat (limited to 'gdb/utils.c')
-rw-r--r-- | gdb/utils.c | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/gdb/utils.c b/gdb/utils.c index b5bb84c..002a588 100644 --- a/gdb/utils.c +++ b/gdb/utils.c @@ -1304,10 +1304,12 @@ maintenance_info_screen (const char *args, int from_tty) ? " (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 " @@ -1325,10 +1327,12 @@ maintenance_info_screen (const char *args, int from_tty) 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 " |