mirror of git://sourceware.org/git/glibc.git
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.
This commit is contained in:
parent
97b0f3d3a7
commit
9a018f6c44
11
ChangeLog
11
ChangeLog
|
|
@ -1,3 +1,14 @@
|
||||||
|
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.
|
||||||
|
|
||||||
2001-07-26 Mark Kettenis <kettenis@gnu.org>
|
2001-07-26 Mark Kettenis <kettenis@gnu.org>
|
||||||
|
|
||||||
* hurd/hurdsig.c (_hurd_internal_post_signal): Fix handling of
|
* hurd/hurdsig.c (_hurd_internal_post_signal): Fix handling of
|
||||||
|
|
|
||||||
|
|
@ -57,4 +57,5 @@ upstr (char *dst, const char *str)
|
||||||
|
|
||||||
|
|
||||||
/* If NAME is an codeset alias expand it. */
|
/* If NAME is an codeset alias expand it. */
|
||||||
extern const char *__gconv_lookup_alias (const char *name);
|
extern int __gconv_compare_alias (const char *name1, const char *name2)
|
||||||
|
internal_function;
|
||||||
|
|
|
||||||
|
|
@ -632,13 +632,20 @@ do_lookup_alias (const char *name)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
const char *
|
int
|
||||||
__gconv_lookup_alias (const char *name)
|
internal_function
|
||||||
|
__gconv_compare_alias (const char *name1, const char *name2)
|
||||||
{
|
{
|
||||||
|
int result;
|
||||||
|
|
||||||
/* Ensure that the configuration data is read. */
|
/* Ensure that the configuration data is read. */
|
||||||
__libc_once (once, __gconv_read_conf);
|
__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;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -188,6 +188,12 @@ extern int __gconv_lookup_cache (const char *toset, const char *fromset,
|
||||||
int flags)
|
int flags)
|
||||||
internal_function;
|
internal_function;
|
||||||
|
|
||||||
|
/* Compare the two name for whether they are after alias expansion the
|
||||||
|
same. This function uses the cache and fails if none is
|
||||||
|
loaded. */
|
||||||
|
extern int __gconv_compare_alias_cache (const char *name1, const char *name2,
|
||||||
|
int *result) internal_function;
|
||||||
|
|
||||||
/* Free data associated with a step's structure. */
|
/* Free data associated with a step's structure. */
|
||||||
extern void __gconv_release_step (struct __gconv_step *step)
|
extern void __gconv_release_step (struct __gconv_step *step)
|
||||||
internal_function;
|
internal_function;
|
||||||
|
|
|
||||||
|
|
@ -207,9 +207,9 @@ _nl_find_locale (const char *locale_path, size_t locale_path_len,
|
||||||
ccodeset = (char *) alloca (strlen (codeset) + 3);
|
ccodeset = (char *) alloca (strlen (codeset) + 3);
|
||||||
strip (ccodeset, codeset);
|
strip (ccodeset, codeset);
|
||||||
|
|
||||||
if (strcmp (__gconv_lookup_alias (upstr (ccodeset, ccodeset)),
|
if (__gconv_compare_alias (upstr (ccodeset, ccodeset),
|
||||||
__gconv_lookup_alias (upstr (clocale_codeset,
|
upstr (clocale_codeset,
|
||||||
clocale_codeset))) != 0)
|
clocale_codeset)) != 0)
|
||||||
/* The codesets are not identical, don't use the locale. */
|
/* The codesets are not identical, don't use the locale. */
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue