mirror of
https://github.com/libvirt/libvirt.git
synced 2025-02-25 18:55:26 -06:00
maint: avoid locale-sensitivity in string case comparisons
strcase{cmp/str} have the drawback of being sensitive to the global
locale; this is unacceptable in a library setting. Prefer a
hard-coded C locale alternative for all but virsh, which is user
facing and where the global locale isn't changing externally.
* .gnulib: Update to latest, for c-strcasestr change.
* bootstrap.conf (gnulib_modules): Drop strcasestr, add c-strcase
and c-strcasestr.
* cfg.mk (sc_avoid_strcase): New rule.
(exclude_file_name_regexp--sc_avoid_strcase): New exception.
* src/internal.h (STRCASEEQ, STRCASENEQ, STRCASEEQLEN)
(STRCASENEQLEN): Adjust offenders.
* src/qemu/qemu_monitor_text.c (qemuMonitorTextEjectMedia):
Likewise.
* tools/virsh.c (namesorter): Document exception.
This commit is contained in:
@@ -22,6 +22,8 @@ gnulib_modules='
|
||||
areadlink
|
||||
base64
|
||||
c-ctype
|
||||
c-strcase
|
||||
c-strcasestr
|
||||
canonicalize-lgpl
|
||||
chown
|
||||
close
|
||||
@@ -63,7 +65,6 @@ sigpipe
|
||||
snprintf
|
||||
socket
|
||||
stpcpy
|
||||
strcasestr
|
||||
strchrnul
|
||||
strndup
|
||||
strerror
|
||||
|
||||
Reference in New Issue
Block a user