From: Gary V. Vaughan Date: Tue, 16 Jul 2002 09:12:30 +0000 (+0000) Subject: * libltdl/ltdl.c (tryall_dlopen): We need to catch missing file X-Git-Tag: release-1-5~97 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=f57ca23232e5784effb15f1b94a332ad4bb37408;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (tryall_dlopen): We need to catch missing file errors early so that file_not_found() can detect what happened. --- diff --git a/ChangeLog b/ChangeLog index 4a78754a2..3521b6a9e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-07-16 Gary V. Vaughan + + * 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 * libtool.m4 (AC_LIBTOOL_SYS_DYNAMIC_LINKER) [mingw]: Remove diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 57fb5af87..0ef64f7c1 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -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) {