target/xtensa: Use glib2 instead of strcasecmp/strncasecmp
This is a change in semantics. g_ascii_strcasecmp() doesn't honour locale but strcasecmp() does. But this is OK for at least one reason: (1) QEMU always runs with the C locale so there's not an actual behaviour change here Signed-off-by: Kostiantyn Kostiuk <kkostiuk@redhat.com> Reviewed-by: Peter Maydell <peter.maydell@linaro.org> Link: https://lore.kernel.org/r/20260327134401.270186-10-kkostiuk@redhat.com Signed-off-by: Paolo Bonzini <pbonzini@redhat.com>
Kostiantyn Kostiuk committed
Mar 27, 2026 at 15:43 UTC
52d200214259fecb585aeaf44862daa961c08194
1 file changed
+2
-2
target/xtensa/xtensa-isa.c
+2
-2
@@ -370,7 +370,7 @@ int xtensa_isa_name_compare(const void *v1, const void *v2)
370
xtensa_lookup_entry *e1 = (xtensa_lookup_entry *)v1;
371
xtensa_lookup_entry *e2 = (xtensa_lookup_entry *)v2;
372
373
- return strcasecmp(e1->key, e2->key);
373
+ return g_ascii_strcasecmp(e1->key, e2->key);
374
}
375
376
@@ -513,7 +513,7 @@ xtensa_format xtensa_format_lookup(xtensa_isa isa, const char *fmtname)
513
}
514
515
for (fmt = 0; fmt < intisa->num_formats; fmt++) {
516
- if (strcasecmp(fmtname, intisa->formats[fmt].name) == 0) {
516
+ if (g_ascii_strcasecmp(fmtname, intisa->formats[fmt].name) == 0) {
517
return fmt;
518
}
519
}