* libltdl/ltdl.c (lt_dlopen, non-.la): find_file now returns 0 on

failure
This commit is contained in:
Alexandre Oliva 1999-01-27 06:55:40 +00:00 committed by Alexandre Oliva
parent 9b2ff91e8e
commit 09616d6977
2 changed files with 14 additions and 11 deletions

View File

@ -1,5 +1,8 @@
1999-01-27 Alexandre Oliva <oliva@dcc.unicamp.br> 1999-01-27 Alexandre Oliva <oliva@dcc.unicamp.br>
* libltdl/ltdl.c (lt_dlopen, non-.la): find_file now returns 0 on
failure
* Makefile.am (ltconfig, ltmain.sh): some broken makes don't like * Makefile.am (ltconfig, ltmain.sh): some broken makes don't like
macros in targets; replace $(srcdir) with @srcdir@ macros in targets; replace $(srcdir) with @srcdir@
* configure.in (ACINCLUDE_M4_LIST): same problem; expand $srcdir * configure.in (ACINCLUDE_M4_LIST): same problem; expand $srcdir

View File

@ -1150,8 +1150,6 @@ lt_dlopen (filename)
} }
if (handle != newhandle) { if (handle != newhandle) {
unload_deplibs(handle); unload_deplibs(handle);
free(handle);
handle = newhandle;
} }
} else { } else {
/* not a libtool module */ /* not a libtool module */
@ -1169,11 +1167,13 @@ lt_dlopen (filename)
newhandle = handle; newhandle = handle;
if (tryall_dlopen(&handle, filename) if (tryall_dlopen(&handle, filename)
&& (!dir && (!dir
|| (find_file(basename, user_search_path, 0, &handle) || (!find_file(basename, user_search_path, 0, &handle)
&& find_file(basename, getenv("LTDL_LIBRARY_PATH"), && !find_file(basename,
getenv("LTDL_LIBRARY_PATH"),
0, &handle) 0, &handle)
#ifdef LTDL_SHLIBPATH_VAR #ifdef LTDL_SHLIBPATH_VAR
&& find_file(basename, getenv(LTDL_SHLIBPATH_VAR), && !find_file(basename,
getenv(LTDL_SHLIBPATH_VAR),
0, &handle) 0, &handle)
#endif #endif
))) { ))) {
@ -1182,11 +1182,11 @@ lt_dlopen (filename)
free(dir); free(dir);
return 0; return 0;
} }
if (handle != newhandle) { }
if (newhandle != handle) {
free(handle); free(handle);
handle = newhandle; handle = newhandle;
} }
}
if (!handle->usage) { if (!handle->usage) {
handle->usage = 1; handle->usage = 1;
handle->name = name; handle->name = name;