]> git.ipfire.org Git - thirdparty/libtool.git/commit
Backported the following patches from the development branch:
authorGary V. Vaughan <gary@gnu.org>
Sun, 2 Sep 2001 18:54:31 +0000 (18:54 +0000)
committerGary V. Vaughan <gary@gnu.org>
Sun, 2 Sep 2001 18:54:31 +0000 (18:54 +0000)
commitb460173eee081e91ac376266af641c7b72c62a20
treef276eab1367881a815e34fcee601f1dd175a4fd7
parent8ee0a517295aea1907b45f3f48ea53dcf104a0b3
Backported the following patches from the development branch:

Based on a patch from Marius Vollmer <mvo@zagadka.ping.de>:
* NEWS: updated.
* ltdl.m4 (AC_LIB_LTDL): Check for unistd.h.
* libltdl/ltdl.c: Include unistd.h if it exists.
(LTDL_SEARCHPATH_VAR): Macro to prevent hardcoding
"LTDL_LIBRARY_PATH".
(LTDL_ARCHIVE_EXT): Macro to prevent hardcoding ".la".
(archive_ext): Have only one copy of ".la" in the readonly
segment of the compiled library.
(find_handle_callback): Don't bother trying to dlopen the file if
it doesn't exist.
(find_handle): Don't bother searching for files if no search_path
was supplied.
(file_not_found): A new function to determine whether the last
error was due to a file not found condition.
(try_dlopen): Renamed from lt_dlopen() and changed to have the
same footprint as tryall_dlopen.  This involved a minor rewrite of
much of the internals of this function.
(lt_dlopen): A new function wrapped arounf try_dlopen().
(lt_dlopenext): If a file already has a suitable extension, don't
bother adding additional extensions and trying to open those.
Tidy up the rest of the code to prevent continued searching with
an eventual FILE_NOT_FOUND when a genuine failure earlier in the
search process could be legitimately reported.

* libltdl/ltdl.c (argz_create_sep): Don't forget to include the
terminating '0' when counting argz_len.
(argz_create_sep): When canonicalizing argz, don't forget to copy
the terminating '0', incase canonicalization has shortened argz.
(argz_stringify): Don't covert the final '0' to a separator.

* libltdl/ltdl.c (lt_dlhandle_next): Now we can loop through all
loaded module handles as originally intended.

* libltdl/ltdl.c (lt_dlseterror): Oops.  This never worked
either, due to a pair of typos.  Now fixed.

* libltdl/ltdl.c (N_ELEMENTS):  Deleted.  How come nobody noticed
there was no way this could have ever worked?
(lt_dlcaller_set_data): Now that valid caller_ids must be
non-zero, allocate an addition entry in the caller_data vector and
use a zero valued key as the end marker.
(lt_dlcaller_get_data): Iterate up to the end marker in one pass.

* libltdl/ltdl.c (lt_dlcaller_register): Caller ids are allocated
starting from value `1', so that clients can use a value of zero
to indicate that libltdl has not yet initialised.

* libltdl/ltdl.c (find_file_callback): Fix a multiple free()
bug.
(tryall_dlopen_module): Remove some unused variables.

* libltdl/ltdl.c (lt_dlinsertsearchdir): Calculate the address
of the end of user_search_path correctly.

* libltdl/ltdl.c (rpl_argz_stringify): New fallback implementation.
* ltdl.m4 (AC_LTDL_FUNC_ARGZ):  Test for argz_stringify in libc.
* libltdl/ltdl.c (lt_argz_insertinorder): Renamed from
lt_argz_insert to make room for...
(lt_argz_insert): Wraps argz_insert with libltdl error handling.
(lt_dlpath_insertdir): Insert new path elements into an
argzized path.
(lt_dlinsertsearchdir): New function to insert new search
directories anywhere into user_search_path using the above.
(lt_dladdsearchdir): Rewritten to use lt_dlpath_insertdir.
* libltdl/ltdl.h (lt_dlinsertsearchdir): Prototype for export.
* doc/libtool.texi (Libltdl interface): Document it.
ChangeLog
NEWS
libltdl/ltdl.c
libltdl/ltdl.h
ltdl.m4