Fix build after command_classes change

Commit 7028626eff (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.
This commit is contained in:
Tom Tromey
2025-11-06 08:33:08 -07:00
parent af68056244
commit 51b48a997d

View File

@@ -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)