Do not override locale if already set by app
https://bugs.freedesktop.org/show_bug.cgi?id=105492
This commit is contained in:
parent
198358dd8f
commit
923b5be626
|
@ -45,10 +45,15 @@ retry_locale:
|
||||||
is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
|
is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
|
||||||
if (!is_locale_initialized)
|
if (!is_locale_initialized)
|
||||||
{
|
{
|
||||||
|
char *loc;
|
||||||
|
|
||||||
is_locale_initialized = FcTrue;
|
is_locale_initialized = FcTrue;
|
||||||
if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
|
if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
|
||||||
(void *)(intptr_t) is_locale_initialized))
|
(void *)(intptr_t) is_locale_initialized))
|
||||||
goto retry_locale;
|
goto retry_locale;
|
||||||
|
|
||||||
|
loc = setlocale (LC_ALL, NULL);
|
||||||
|
if (!loc || strcmp (loc, "C") == 0)
|
||||||
setlocale (LC_ALL, "");
|
setlocale (LC_ALL, "");
|
||||||
}
|
}
|
||||||
retry_config:
|
retry_config:
|
||||||
|
|
Loading…
Reference in New Issue