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,11 +45,16 @@ retry_locale:
|
|||
is_locale_initialized = (intptr_t) fc_atomic_ptr_get (&static_is_locale_initialized);
|
||||
if (!is_locale_initialized)
|
||||
{
|
||||
char *loc;
|
||||
|
||||
is_locale_initialized = FcTrue;
|
||||
if (!fc_atomic_ptr_cmpexch (&static_is_locale_initialized, NULL,
|
||||
(void *)(intptr_t) is_locale_initialized))
|
||||
goto retry_locale;
|
||||
setlocale (LC_ALL, "");
|
||||
|
||||
loc = setlocale (LC_ALL, NULL);
|
||||
if (!loc || strcmp (loc, "C") == 0)
|
||||
setlocale (LC_ALL, "");
|
||||
}
|
||||
retry_config:
|
||||
config = fc_atomic_ptr_get (&_fcConfig);
|
||||
|
|
Loading…
Reference in New Issue