mirror of
https://github.com/mozilla/gecko-dev.git
synced 2024-10-15 14:25:52 +00:00
Bug 1422415 - Part 1: Remove HAVE_SETLOCALE because setlocale() is available on all supported platforms. r=glandium
This commit is contained in:
parent
c0258f303a
commit
19ae59f64d
@ -1875,7 +1875,7 @@ dnl ========================================================
|
||||
|
||||
MOZ_CHECK_ALLOCATOR
|
||||
|
||||
AC_CHECK_FUNCS(setlocale localeconv)
|
||||
AC_CHECK_FUNCS(localeconv)
|
||||
|
||||
AC_SUBST(ac_configure_args)
|
||||
|
||||
|
@ -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.
|
||||
|
@ -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";
|
||||
|
Loading…
Reference in New Issue
Block a user