]> git.ipfire.org Git - thirdparty/libtool.git/commitdiff
* libltdl/ltdl.c (tryall_dlopen): We need to catch missing file
authorGary V. Vaughan <gary@gnu.org>
Tue, 16 Jul 2002 09:12:30 +0000 (09:12 +0000)
committerGary V. Vaughan <gary@gnu.org>
Tue, 16 Jul 2002 09:12:30 +0000 (09:12 +0000)
errors early so that file_not_found() can detect what happened.

ChangeLog
libltdl/ltdl.c

index 4a78754a2f2d7be9ef70dceba25c811554497866..3521b6a9ed679a050bc467ad3837fdaf37282f2c 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2002-07-16  Gary V. Vaughan  <gary@gnu.org>
+
+       * libltdl/ltdl.c (tryall_dlopen): We need to catch missing file
+       errors early so that file_not_found() can detect what happened.
+
 2002-06-26  Bob Friesenhahn  <bfreisen@simple.dallas.tx.us>
 
        * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER) [mingw]: Remove
index 57fb5af874fb111e99c689c7814130cdcb20a1f3..0ef64f7c19640e06197763a35b0f82366500e4c6 100644 (file)
@@ -1910,6 +1910,15 @@ tryall_dlopen (handle, filename)
   cur = *handle;
   if (filename)
     {
+      /* We need to catch missing file errors early so that
+        file_not_found() can detect what happened. */
+      if (access (filename, R_OK) != 0)
+       {
+         LT_DLMUTEX_SETERROR (LT_DLSTRERROR (FILE_NOT_FOUND));
+         ++errors;
+         goto done;
+       }
+
       cur->info.filename = lt_estrdup (filename);
       if (!cur->info.filename)
        {