summaryrefslogtreecommitdiff
path: root/iconv/gconv_db.c
diff options
context:
space:
mode:
authorUlrich Drepper <drepper@redhat.com>2001-07-27 17:34:53 +0000
committerUlrich Drepper <drepper@redhat.com>2001-07-27 17:34:53 +0000
commit9a018f6c44b7393e4ac1f57d504b9c054e2d0533 (patch)
tree824941e3d79629e9609554717a5099d086b2ab3e /iconv/gconv_db.c
parent97b0f3d3a715c8486d48a26933260af9028a8bdb (diff)
Update.
2001-07-27 Ulrich Drepper <drepper@redhat.com> * iconv/gconv_cache.c (__gconv_compare_alias_cache): New function. * iconv/gconv_int.h: Add prototype for __gconv_compare_alias_cache. * iconv/gconv_charset.h: Replace __gconv_lookup_alias prototype with __gconv_compare_alias prototype. * iconv/gconv_db.c (__gconv_lookup_alias): Removed. (__gconv_compare_alias): New function. * locale/findlocale.c (_nl_find_locale): Ise __gconv_compare_alias instead of calling __gconv_lookup_alias twice and compare here.
Diffstat (limited to 'iconv/gconv_db.c')
-rw-r--r--iconv/gconv_db.c13
1 files changed, 10 insertions, 3 deletions
diff --git a/iconv/gconv_db.c b/iconv/gconv_db.c
index 47861d19ca..9bd27c5e69 100644
--- a/iconv/gconv_db.c
+++ b/iconv/gconv_db.c
@@ -632,13 +632,20 @@ do_lookup_alias (const char *name)
}
-const char *
-__gconv_lookup_alias (const char *name)
+int
+internal_function
+__gconv_compare_alias (const char *name1, const char *name2)
{
+ int result;
+
/* Ensure that the configuration data is read. */
__libc_once (once, __gconv_read_conf);
- return do_lookup_alias (name) ?: name;
+ if (__gconv_compare_alias_cache (name1, name2, &result) != 0)
+ result = strcmp (do_lookup_alias (name1) ?: name1,
+ do_lookup_alias (name2) ?: name2);
+
+ return result;
}