+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.
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
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,
/* 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. */