aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWerner Koch <[email protected]>2014-06-23 08:22:32 +0000
committerWerner Koch <[email protected]>2014-06-23 08:24:01 +0000
commitbb4d5c2d5f20afff4f5382b33e9f530e3352c06f (patch)
treedf05269fb66175d8103d8cfb400df97f612a0bb0
parentPC/SC cleanup. (diff)
downloadgnupg-bb4d5c2d5f20afff4f5382b33e9f530e3352c06f.tar.gz
gnupg-bb4d5c2d5f20afff4f5382b33e9f530e3352c06f.zip
intl: Fix for uClibc.
* intl/localename.c (gl_locale_name_thread_unsafe): Take care of uCLIBC. -- Patch provided by "vriera". GnuPG-bug-id: 1642
-rw-r--r--intl/localename.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/intl/localename.c b/intl/localename.c
index 89a9692bb..3f9d0b05f 100644
--- a/intl/localename.c
+++ b/intl/localename.c
@@ -2607,7 +2607,7 @@ gl_locale_name_thread_unsafe (int category, const char *categoryname)
locale_t thread_locale = uselocale (NULL);
if (thread_locale != LC_GLOBAL_LOCALE)
{
-# if __GLIBC__ >= 2
+# if __GLIBC__ >= 2 && !defined(__UCLIBC__)
/* Work around an incorrect definition of the _NL_LOCALE_NAME macro in
glibc < 2.12.
See <http://sourceware.org/bugzilla/show_bug.cgi?id=10968>. */
@@ -2771,7 +2771,8 @@ gl_locale_name_thread (int category, const char *categoryname)
However it does not specify the exact format. Neither do SUSV2 and
ISO C 99. So we can use this feature only on selected systems (e.g.
those using GNU C Library). */
-#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2)
+#if defined _LIBC || (defined __GLIBC__ && __GLIBC__ >= 2 \
+ && (!defined __UCLIBC__ || defined __UCLIBC_HAS_LOCALE__))
# define HAVE_LOCALE_NULL
#endif