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-17 Gary V. Vaughan <gary@oranda.demon.co.uk>
+
+ * 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 <gary@oranda.demon.co.uk>
* libltdl/ltdl.c (find_file): memory error fixed.
#include <stdlib.h>
#endif
+#if HAVE_UNISTD_H
+#include <unistd.h>
+#endif
+
#if HAVE_STDIO_H
#include <stdio.h>
#endif
}
} 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;
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)