fontconfig: Branch 'master'

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



 src/fccfg.c |    7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

New commits:
commit 923b5be626a6e03fbaeee0b5cd6d0246c2f8f36f
Author: Akira TAGOH <akira@xxxxxxxxx>
Date:   Wed Mar 14 12:35:05 2018 +0900

    Do not override locale if already set by app
    
    https://bugs.freedesktop.org/show_bug.cgi?id=105492

diff --git a/src/fccfg.c b/src/fccfg.c
index eb0b76d..e311f17 100644
--- a/src/fccfg.c
+++ b/src/fccfg.c
@@ -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);
_______________________________________________
Fontconfig mailing list
Fontconfig@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/fontconfig




[Index of Archives]     [Fedora Fonts]     [Fedora Users]     [Fedora Cloud]     [Kernel]     [Fedora Packaging]     [Fedora Desktop]     [PAM]     [Gimp Graphics Editor]     [Yosemite News]

  Powered by Linux