From: Gary V. Vaughan Date: Mon, 17 Jan 2000 15:21:33 +0000 (+0000) Subject: * libltdl/ltdl.c (tryall_dlopen): Abort with X-Git-Tag: release-1-3d~219 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f7c496a099e84b8e263fbcad7725afcedc781373;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (tryall_dlopen): Abort with file_not_found_error before trying all lib_open() methods if the file to be dlopened doesn't exist. * ltdl.m4 (AC_HAVE_HEADERS): add unistd.h. --- diff --git a/ChangeLog b/ChangeLog index f50e86b56..b967f0cec 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2000-01-17 Gary V. Vaughan + + * libltdl/ltdl.c (tryall_dlopen): Abort with + file_not_found_error before trying all lib_open() methods + if the file to be dlopened doesn't exist. + * ltdl.m4 (AC_HAVE_HEADERS): add unistd.h. + 2000-01-16 Gary V. Vaughan * libltdl/ltdl.c (find_file): memory error fixed. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index d06fee2f9..901991d03 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -54,6 +54,10 @@ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA #include #endif +#if HAVE_UNISTD_H +#include +#endif + #if HAVE_STDIO_H #include #endif @@ -940,6 +944,10 @@ tryall_dlopen (handle, filename) } } else cur->info.filename = 0; + if (access (filename, F_OK) < 0) { + last_error = file_not_found_error; + return 1; + } while (type) { if (type->lib_open(cur, filename) == 0) break; diff --git a/ltdl.m4 b/ltdl.m4 index 84e1c667c..12961f95d 100644 --- a/ltdl.m4 +++ b/ltdl.m4 @@ -33,7 +33,7 @@ dnl of the ltdl objects -- including compiler checks (above) and header dnl checks (below). AC_REQUIRE([AC_HEADER_STDC])dnl -AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h ctype.h dlfcn.h dl.h dld.h) +AC_CHECK_HEADERS(malloc.h memory.h stdlib.h stdio.h unistd.h ctype.h dlfcn.h dl.h dld.h) AC_CHECK_HEADERS(string.h strings.h, break) AC_CHECK_FUNCS(strchr index, break) AC_CHECK_FUNCS(strrchr rindex, break)