Use cctype.h for locale-independent string comparison and to avoid
tricky string conversions like in tr_TR locales.
Signed-off-by: Karel Zak <kzak@redhat.com>
#endif
#include "c.h"
+#include "cctype.h"
#include "closestream.h"
#include "nls.h"
#include "widechar.h"
buf, sizeof(buf));
ref = 1;
- if (rc <= 0 || (strcasecmp(buf, "yes") != 0 &&
+ if (rc <= 0 || (c_strcasecmp(buf, "yes") != 0 &&
strcasecmp(buf, _("yes")) != 0)) {
info = _("Did not write partition table to disk.");
break;
#ifndef UTIL_LINUX_FDISK_LIST_H
#define UTIL_LINUX_FDISK_LIST_H
+#include "cctype.h"
+
extern void list_disklabel(struct fdisk_context *cxt);
extern void list_disk_identifier(struct fdisk_context *cxt);
extern void list_disk_geometry(struct fdisk_context *cxt);
return -EINVAL;
for (i = 0; i < ARRAY_SIZE(modes); i++) {
- if (strcasecmp(str, modes[i]) == 0)
+ if (c_strcasecmp(str, modes[i]) == 0)
return i;
}
for (i = 0; i < NCOLS; i++) {
const char *cn = infos[i].name;
- if (!strncasecmp(name, cn, namesz) && !*(cn + namesz))
+ if (!c_strncasecmp(name, cn, namesz) && !*(cn + namesz))
return i;
}
warnx(_("unknown column: %s"), name);