diff options
author | Ulrich Drepper <drepper@redhat.com> | 2000-11-24 21:13:13 +0000 |
---|---|---|
committer | Ulrich Drepper <drepper@redhat.com> | 2000-11-24 21:13:13 +0000 |
commit | 2debc8c54bf6e752554f212be7e3d50524d2b867 (patch) | |
tree | 2a9f2f3bb013b0b580556bbb830b0c2eb4094ece /iconv | |
parent | d64a397a543831f55bded895dca6f00f093ef4ee (diff) | |
download | glibc-2debc8c54bf6e752554f212be7e3d50524d2b867.zip glibc-2debc8c54bf6e752554f212be7e3d50524d2b867.tar.gz glibc-2debc8c54bf6e752554f212be7e3d50524d2b867.tar.bz2 |
Update.
2000-11-24 Ulrich Drepper <drepper@redhat.com>
* iconv/gconv_conf.c (insert_module): Replace old entry if new one
hsa same names but lower cost.
2000-11-23 Jakub Jelinek <jakub@redhat.com>
* sysdeps/sparc/sparc32/dl-machine.h: Ifdef out handling for relocs
which never occur during bootstrap.
* sysdeps/sparc/sparc64/dl-machine.h: Likewise.
Diffstat (limited to 'iconv')
-rw-r--r-- | iconv/gconv_conf.c | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/iconv/gconv_conf.c b/iconv/gconv_conf.c index a9b45813..15a5907 100644 --- a/iconv/gconv_conf.c +++ b/iconv/gconv_conf.c @@ -196,7 +196,17 @@ insert_module (struct gconv_module *newp, int tobefreed) if (root != NULL) { - /* This is a no new conversion. */ + /* This is a no new conversion. But maybe the cost is + better. */ + if (newp->cost_hi < root->cost_hi + || (newp->cost_hi == root->cost_hi + && newp->cost_lo < root->cost_lo)) + { + root->cost_hi = newp->cost_hi; + root->cost_lo = newp->cost_lo; + root->module_name = newp->module_name; + } + if (tobefreed) free (newp); return; |