From fc5f4a97487fffc7f5451d216f278d83a8259efe Mon Sep 17 00:00:00 2001 From: Ulrich Drepper Date: Sat, 9 Sep 2000 07:59:23 +0000 Subject: Update. 2000-09-09 Ulrich Drepper * sysdeps/unix/sysv/linux/dl-osinfo.h (DL_SYSDEP_OSCHECK): Use uname before trying to read /proc. Patch by Matt Wilson . * include/sys/utsname.h: Declare __uname. * sysdeps/generic/uname.c: Make uname a weak alias of __uname. * sysdeps/mach/hurd/uname.c: Likewise. * sysdeps/unix/syscalls.list: Likewise. * iconv/gconv_dl.c (do_release_shlib): Rewrite condition for unloading a bit. 2000-09-08 Ulrich Drepper * posix/getopt.c (_getopt_internal): When long_only is set always recognize conflicts just like before. 2000-09-08 Franz Sirl * sysdeps/ia64/Makefile (sysdep-rtld-routines): New variable. --- iconv/gconv_dl.c | 15 ++++++--------- 1 file changed, 6 insertions(+), 9 deletions(-) (limited to 'iconv/gconv_dl.c') diff --git a/iconv/gconv_dl.c b/iconv/gconv_dl.c index 308db52c83..114619ec11 100644 --- a/iconv/gconv_dl.c +++ b/iconv/gconv_dl.c @@ -110,6 +110,7 @@ __gconv_find_shlib (const char *name) { if (found->counter < -TRIES_BEFORE_UNLOAD) { + assert (found->handle == NULL); found->handle = __libc_dlopen (found->name); if (found->handle != NULL) { @@ -162,16 +163,12 @@ do_release_shlib (const void *nodep, VISIT value, int level) assert (obj->counter > 0); --obj->counter; } - else if (obj->counter <= 0) + else if (obj->counter <= 0 && obj->counter >= -TRIES_BEFORE_UNLOAD + && --obj->counter < -TRIES_BEFORE_UNLOAD && obj->handle != NULL) { - if (obj->counter >= -TRIES_BEFORE_UNLOAD) - --obj->counter; - if (obj->counter < -TRIES_BEFORE_UNLOAD && obj->handle != NULL) - { - /* Unload the shared object. */ - __libc_dlclose (obj->handle); - obj->handle = NULL; - } + /* Unload the shared object. */ + __libc_dlclose (obj->handle); + obj->handle = NULL; } } -- cgit v1.2.3