[mono/mono] a601831f: Fallback to $LANG if $LC_ALL isn't set.
| Newsgroups | gmane.comp.gnome.mono.patches |
|---|---|
| Message-ID | <0000014193c6ccb4-f1c59829-fc31-415f-a308-ea3c7b717cb5-000000@email.amazonses.com> |
Branch: refs/heads/master
Home: https://github.com/mono/mono
Compare: https://github.com/mono/mono/compare/5d250224236e...a601831f63a9
Commit: a601831f63a9d29741a02aad200bf28aa6e71413
Author: Jonathan Pryor <[email protected]> (jonpryor)
Date: 2013-10-07 16:31:06 GMT
URL: https://github.com/mono/mono/commit/a601831f63a9d29741a02aad200bf28aa6e71413
Fallback to $LANG if $LC_ALL isn't set.
Fixes: https://bugzilla.xamarin.com/show_bug.cgi?id=15214
This is a regression introduced in be532638.
Xamarin.Android assumes that the $LANG environment variable can be
used to control System.Globalization.CultureInfo.CurrentCulture,
setting LANG based on the current Java locale.
This was broken in be532638 because $LANG was no longer being checked
to determine the default locale, as $LC_ALL was not set.
Fix the fallback logic so that $LANG is checked when $LC_ALL is not.
Changed paths:
M mono/metadata/locales.c
Modified: mono/metadata/locales.c
===================================================================
@@ -402,7 +402,7 @@ static gint32 string_invariant_indexof_char (MonoString *source, gint32 sindex,
const char *locale;
locale = g_getenv ("LC_ALL");
- if (locale != NULL){
+ if (locale == NULL) {
locale = g_getenv ("LANG");
if (locale == NULL)
locale = setlocale (LC_ALL, NULL);
_______________________________________________
Mono-patches maillist - [email protected]
http://lists.ximian.com/mailman/listinfo/mono-patches