]> git.ipfire.org Git - thirdparty/gettext.git/commitdiff
Merge with glibc: Don't make _nl_locale_name visible in glibc.
authorBruno Haible <bruno@clisp.org>
Thu, 29 Nov 2001 13:21:40 +0000 (13:21 +0000)
committerBruno Haible <bruno@clisp.org>
Sun, 21 Jun 2009 21:28:59 +0000 (23:28 +0200)
intl/ChangeLog
intl/dcigettext.c
intl/gettextP.h
intl/localename.c

index 9fbae8f82249804ec714765b73d2539b7c3cbae1..64229a3cbd86cdb2aba2bf707c2f75a6da8c1952 100644 (file)
@@ -1,3 +1,13 @@
+2001-11-29  Bruno Haible  <bruno@clisp.org>
+
+       * gettextP.h (_nl_locale_name): Don't declare inside glibc.
+       * localename.c (_nl_locale_name): Remove _LIBC conditional.
+
+2001-11-27  Ulrich Drepper  <drepper@redhat.com>
+
+       * dcigettext.c (guess_category_value): Inside glibc, use setlocale
+       directly, not _nl_locale_name.
+
 2001-11-27  Ulrich Drepper  <drepper@redhat.com>
 
        * loadmsgcat.c (_nl_init_domain_conv): Modify #if expression.
index 8296666182d2eb0f89d68bb6df462b9b6b209656..cf60cafd9075a0cb9f397a68174d1327120938db 100644 (file)
@@ -1067,9 +1067,14 @@ guess_category_value (category, categoryname)
   if (language != NULL && language[0] == '\0')
     language = NULL;
 
-  /* Proceed with the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and
-    'LANG'.  */
+  /* We have to proceed with the POSIX methods of looking to `LC_ALL',
+     `LC_xxx', and `LANG'.  On some systems this can be done by the
+     `setlocale' function itself.  */
+#ifdef _LIBC
+  retval = setlocale (category, NULL);
+#else
   retval = _nl_locale_name (category, categoryname);
+#endif
 
   /* Ignore LANGUAGE if the locale is set to "C" because
      1. "C" locale usually uses the ASCII encoding, and most international
index bf77e5658c6db8815be3dcda00f216fbb85d3748..3efb53474e099bf0211b5975e69c8ea0ddcccb11 100644 (file)
@@ -122,7 +122,10 @@ struct binding
    This variable is part of the external ABI of the GNU libintl.  */
 extern int _nl_msg_cat_cntr;
 
+#ifndef _LIBC
 const char *_nl_locale_name PARAMS ((int category, const char *categoryname));
+#endif
+
 struct loaded_l10nfile *_nl_find_domain PARAMS ((const char *__dirname,
                                                 char *__locale,
                                                 const char *__domainname,
index 2bca36604d700cb177574fc999b47b51a5b9aca8..a8aad600f9cab6d8046f4782886e34cba93fe3c0 100644 (file)
@@ -372,7 +372,7 @@ _nl_locale_name (category, categoryname)
 
   /* Use the POSIX methods of looking to 'LC_ALL', 'LC_xxx', and 'LANG'.
      On some systems this can be done by the 'setlocale' function itself.  */
-# if defined _LIBC || (defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL)
+# if defined HAVE_SETLOCALE && defined HAVE_LC_MESSAGES && defined HAVE_LOCALE_NULL
   retval = setlocale (category, NULL);
 # else
   /* Setting of LC_ALL overwrites all other.  */