]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules
authorPeter Eisentraut <peter_e@gmx.net>
Mon, 23 Apr 2001 21:28:25 +0000 (21:28 +0000)
committerGary V. Vaughan <gary@gnu.org>
Mon, 23 Apr 2001 21:28:25 +0000 (21:28 +0000)
are left.

ChangeLog
libltdl/ltdl.c

index 5922796fd454ecb78cfcf478e62985791f5b1fea..0d65ed0570ff0ff79d37aac4cd31ab89f216d31a 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2001-04-23  Peter Eisentraut  <peter_e@gmx.net>
+
+       * libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules
+       are left.
+       
 2001-04-23  Gary V. Vaughan  <gvv@techie.com>
 
        From Albert Chin-A-Young <china@thewrittenword.com>
index 5a9ebc41e01b20678142f9b08c5a3efd745c6411..8e8f00961e35c378d42855cdabcb76a1ad246ded 100644 (file)
@@ -1384,11 +1384,14 @@ lt_dlexit ()
       for (level = 1; handles; ++level)
        {
          lt_dlhandle cur = handles;
+         int saw_nonresident = 0;
 
          while (cur)
            {
              lt_dlhandle tmp = cur;
              cur = cur->next;
+             if (!LT_DLIS_RESIDENT (tmp))
+               saw_nonresident = 1;
              if (!LT_DLIS_RESIDENT (tmp) && tmp->info.ref_count <= level)
                {
                  if (lt_dlclose (tmp))
@@ -1397,6 +1400,9 @@ lt_dlexit ()
                    }
                }
            }
+         /* done if only resident modules are left */
+         if (!saw_nonresident)
+           break;
        }
 
       /* close all loaders */