From 51b48a997d68537b2f8129d86b34fd84bae4082a Mon Sep 17 00:00:00 2001 From: Tom Tromey Date: Thu, 6 Nov 2025 08:33:08 -0700 Subject: [PATCH] Fix build after command_classes change Commit 7028626eff3 (gdb: make command classes be bitmaps) broke the build, causing the compiler to issue an error message about the global scm-cmd.c:command_classes being redefined as a different type. Renaming the global fix the problem. --- gdb/guile/scm-cmd.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/gdb/guile/scm-cmd.c b/gdb/guile/scm-cmd.c index d2172d98618..1a64ad2e591 100644 --- a/gdb/guile/scm-cmd.c +++ b/gdb/guile/scm-cmd.c @@ -548,7 +548,7 @@ gdbscm_parse_command_name (const char *name, /* NOTREACHED */ } -static const scheme_integer_constant command_classes[] = +static const scheme_integer_constant gdbscm_command_classes[] = { /* Note: alias and user are special; pseudo appears to be unused, and there is no reason to expose tui, I think. */ @@ -576,9 +576,9 @@ gdbscm_valid_command_class_p (int command_class) { int i; - for (i = 0; command_classes[i].name != NULL; ++i) + for (i = 0; gdbscm_command_classes[i].name != NULL; ++i) { - if (command_classes[i].value == command_class) + if (gdbscm_command_classes[i].value == command_class) return 1; } @@ -903,7 +903,7 @@ gdbscm_initialize_commands (void) = gdbscm_make_smob_type (command_smob_name, sizeof (command_smob)); scm_set_smob_print (command_smob_tag, cmdscm_print_command_smob); - gdbscm_define_integer_constants (command_classes, 1); + gdbscm_define_integer_constants (gdbscm_command_classes, 1); gdbscm_define_functions (command_functions, 1); for (i = 0; i < N_COMPLETERS; ++i) -- 2.47.3