diff options
Diffstat (limited to 'iconv/gconv_db.c')
-rw-r--r-- | iconv/gconv_db.c | 13 |
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; } |