]> git.ipfire.org Git - thirdparty/binutils-gdb.git/commitdiff
[gdb/build] Declare gdb_get_ncolors
authorTom de Vries <tdevries@suse.de>
Thu, 22 Jan 2026 13:12:15 +0000 (14:12 +0100)
committerTom de Vries <tdevries@suse.de>
Thu, 22 Jan 2026 13:12:15 +0000 (14:12 +0100)
Since a recent commit, I run into:
....
gdb/ui-style.c: In lambda function:
gdb/ui-style.c:597:20: error: ‘gdb_get_ncolors’ was not declared in this scope
  597 |       int colors = gdb_get_ncolors ();
      |                    ^~~~~~~~~~~~~~~
make: *** [Makefile:2096: ui-style.o] Error 1
....

Fix this by adding the missing declaration.

gdb/ui-style.h

index 823bf6b62f88dbddd5ccdb25b3b49a2ed31c8afc..fca9150889bd4924d4405ce83ed057a93f87dcc8 100644 (file)
@@ -51,6 +51,9 @@ extern const char * color_space_name (color_space c);
 /* Cast C to RESULT and return true if it's value is valid; false otherwise.  */
 extern bool color_space_safe_cast (color_space *result, long c);
 
+/* Get the number of colors supported by the terminal where GDB is running.  */
+extern int gdb_get_ncolors ();
+
 /* Styles that can be applied to a ui_file.  */
 struct ui_file_style
 {