* replace use of strcmp with strcasecmp, as locale names are supposed to be
case insensitive git-svn-id: file:///srv/svn/repos/haiku/haiku/trunk@37735 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
@@ -51,7 +51,7 @@ GetLocalesFromEnvironment(int category, const char** locales)
|
|||||||
if (!locale || *locale == '\0')
|
if (!locale || *locale == '\0')
|
||||||
locale = "POSIX";
|
locale = "POSIX";
|
||||||
locales[lc] = locale;
|
locales[lc] = locale;
|
||||||
if (lastLocale && strcmp(locale, lastLocale) != 0)
|
if (lastLocale && strcasecmp(locale, lastLocale) != 0)
|
||||||
haveDifferentLocales = true;
|
haveDifferentLocales = true;
|
||||||
}
|
}
|
||||||
if (!haveDifferentLocales) {
|
if (!haveDifferentLocales) {
|
||||||
@@ -94,8 +94,8 @@ setlocale(int category, const char* locale)
|
|||||||
// backend
|
// backend
|
||||||
bool needBackend = false;
|
bool needBackend = false;
|
||||||
for (int lc = 0; lc <= LC_LAST; lc++) {
|
for (int lc = 0; lc <= LC_LAST; lc++) {
|
||||||
if (locales[lc] != NULL && strcmp(locales[lc], "POSIX") != 0
|
if (locales[lc] != NULL && strcasecmp(locales[lc], "POSIX") != 0
|
||||||
&& strcmp(locales[lc], "C") != 0) {
|
&& strcasecmp(locales[lc], "C") != 0) {
|
||||||
needBackend = true;
|
needBackend = true;
|
||||||
break;
|
break;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user