about summary refs log tree commit diff
path: root/locale
diff options
context:
space:
mode:
authorRoland McGrath <roland@gnu.org>2002-08-30 08:11:12 +0000
committerRoland McGrath <roland@gnu.org>2002-08-30 08:11:12 +0000
commitccaf7306707314c44a8f636cc198a80fa7db12b1 (patch)
tree083ae368fc6e472dbb7fdfb3284be876fbaf974e /locale
parent44fbaddd54ae136c11814858d5feaa2c58a3046c (diff)
downloadglibc-ccaf7306707314c44a8f636cc198a80fa7db12b1.tar.gz
glibc-ccaf7306707314c44a8f636cc198a80fa7db12b1.tar.xz
glibc-ccaf7306707314c44a8f636cc198a80fa7db12b1.zip
* locale/localename.c: If the current locale is the global locale, use
	_nl_current_names; otherwise use the locale object.

2002-08-29  Roland McGrath  <roland@frob.com>

	* sysdeps/mach/hurd/bits/local_lim.h (NAME_MAX): New macro.
2002-08-29  Roland McGrath  <roland@redhat.com>
Diffstat (limited to 'locale')
-rw-r--r--locale/localename.c8
1 files changed, 3 insertions, 5 deletions
diff --git a/locale/localename.c b/locale/localename.c
index 045cc712d2..377ec296a6 100644
--- a/locale/localename.c
+++ b/locale/localename.c
@@ -34,9 +34,7 @@ const char *
 attribute_hidden
 __current_locale_name (int category)
 {
-#if 0
-  return _NL_CURRENT_DATA (category)->name;
-#else
-  return _nl_current_names[category];
-#endif
+  return (_NL_CURRENT_LOCALE == &_nl_global_locale
+	  ? _nl_current_names[category]
+	  : _NL_CURRENT_LOCALE->__locales[category]->name);
 }