From bc981208fa1d2253fe7a2ac71792cd3aa60bd958 Mon Sep 17 00:00:00 2001 From: Oliver Tappe Date: Sun, 25 Jul 2010 11:31:56 +0000 Subject: [PATCH] * 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 --- src/system/libroot/posix/locale/setlocale.cpp | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/system/libroot/posix/locale/setlocale.cpp b/src/system/libroot/posix/locale/setlocale.cpp index f79c90f6a1..a4688688d5 100644 --- a/src/system/libroot/posix/locale/setlocale.cpp +++ b/src/system/libroot/posix/locale/setlocale.cpp @@ -51,7 +51,7 @@ GetLocalesFromEnvironment(int category, const char** locales) if (!locale || *locale == '\0') locale = "POSIX"; locales[lc] = locale; - if (lastLocale && strcmp(locale, lastLocale) != 0) + if (lastLocale && strcasecmp(locale, lastLocale) != 0) haveDifferentLocales = true; } if (!haveDifferentLocales) { @@ -94,8 +94,8 @@ setlocale(int category, const char* locale) // backend bool needBackend = false; for (int lc = 0; lc <= LC_LAST; lc++) { - if (locales[lc] != NULL && strcmp(locales[lc], "POSIX") != 0 - && strcmp(locales[lc], "C") != 0) { + if (locales[lc] != NULL && strcasecmp(locales[lc], "POSIX") != 0 + && strcasecmp(locales[lc], "C") != 0) { needBackend = true; break; }