Bug 1422415 - Part 1: Remove HAVE_SETLOCALE because setlocale() is available on all supported platforms. r=glandium

This commit is contained in:
André Bargull 2018-01-19 05:19:40 -08:00
parent c0258f303a
commit 19ae59f64d
3 changed files with 3 additions and 9 deletions

View File

@ -1875,7 +1875,7 @@ dnl ========================================================
MOZ_CHECK_ALLOCATOR
AC_CHECK_FUNCS(setlocale localeconv)
AC_CHECK_FUNCS(localeconv)
AC_SUBST(ac_configure_args)

View File

@ -8961,9 +8961,7 @@ main(int argc, char** argv, char** envp)
int result;
#ifdef HAVE_SETLOCALE
setlocale(LC_ALL, "");
#endif
// Special-case stdout and stderr. We bump their refcounts to prevent them
// from getting closed and then having some printf fail somewhere.

View File

@ -639,12 +639,8 @@ JSRuntime::getDefaultLocale()
if (defaultLocale)
return defaultLocale;
const char* locale;
#ifdef HAVE_SETLOCALE
locale = setlocale(LC_ALL, nullptr);
#else
locale = getenv("LANG");
#endif
const char* locale = setlocale(LC_ALL, nullptr);
// convert to a well-formed BCP 47 language tag
if (!locale || !strcmp(locale, "C"))
locale = "und";