summaryrefslogtreecommitdiff
path: root/data/patches/gnuzilla-bug-1095298.patch
diff options
context:
space:
mode:
authorRuben Rodriguez <ruben@gnu.org>2015-03-08 15:14:03 +0000
committerRuben Rodriguez <ruben@gnu.org>2015-03-08 15:14:03 +0000
commit9a0fd32cf6e2ada37675bc743532c5004b16e5e3 (patch)
treed66faa3279486d2e8ad72bf70e7ef522460372a0 /data/patches/gnuzilla-bug-1095298.patch
parent2732de330618bc29b7ab07f4004d8e84f698cf95 (diff)
Added patches to fix build bugs for Windows, MacOS and Android
Diffstat (limited to 'data/patches/gnuzilla-bug-1095298.patch')
-rw-r--r--data/patches/gnuzilla-bug-1095298.patch30
1 files changed, 30 insertions, 0 deletions
diff --git a/data/patches/gnuzilla-bug-1095298.patch b/data/patches/gnuzilla-bug-1095298.patch
new file mode 100644
index 0000000..aa075a2
--- /dev/null
+++ b/data/patches/gnuzilla-bug-1095298.patch
@@ -0,0 +1,30 @@
+--- a/intl/locale/src/nsLocaleService.cpp
++++ a/intl/locale/src/nsLocaleService.cpp
+@@ -135,17 +135,25 @@ nsLocaleService::nsLocaleService(void)
+
+ for( i = 0; i < LocaleListLength; i++ ) {
+ nsresult result;
+ // setlocale( , "") evaluates LC_* and LANG
+ char* lc_temp = setlocale(posix_locale_category[i], "");
+ CopyASCIItoUTF16(LocaleList[i], category);
+ category_platform = category;
+ category_platform.AppendLiteral("##PLATFORM");
+- if (lc_temp != nullptr) {
++
++ bool lc_temp_valid = lc_temp != nullptr;
++
++#if defined(MOZ_WIDGET_ANDROID)
++ // Treat the "C" env as nothing useful. See Bug 1095298.
++ lc_temp_valid = lc_temp_valid && strcmp(lc_temp, "C") != 0;
++#endif
++
++ if (lc_temp_valid) {
+ result = nsPosixLocale::GetXPLocale(lc_temp, xpLocale);
+ CopyASCIItoUTF16(lc_temp, platformLocale);
+ } else {
+ if ( lang == nullptr ) {
+ platformLocale.AssignLiteral("en_US");
+ result = nsPosixLocale::GetXPLocale("en-US", xpLocale);
+ } else {
+ CopyASCIItoUTF16(lang, platformLocale);
+