Commit 923b5be6 authored by Akira TAGOH's avatar Akira TAGOH

Do not override locale if already set by app

https://bugs.freedesktop.org/show_bug.cgi?id=105492
parent 198358dd
......@@ -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);
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment