* 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.
* NEWS: Updated,
General reformat and tify up in line with Autoconf-2.50 support.
(AC_LTDL_FUNC_ARGZ): Test for system implementations of a
handful of argz API calls, the error_t type, and the argz.h
header.
* libltdl/configure.ac (AM_INIT_AUTOMAKE): Bump version number.
* libltdl/ltdl.c (rpl_argz_append, rpl_argz_create_sep.
rpl_argz_insert, rpl_rgz_next): Fallback implementations of
the similarly named functions for machines that don;t use glibc.
(lt_dlrealloc): New memory function pointer that can be set by
the client. Defaults to rpl_realloc, which in turn uses only
lt_dlmalloc and lt_dlfree.
(LT_EMALLOC, LT_EREALLOC): Set internal out-of-memory error
inside the functions called by these new macros. Simplified all
callers by removing explicit client error reporting.
(memmove): Fallback implementation of overlap safe memory copy
function.
(tryall_dlopen): Factorized common code into...
(tryall_dlopen_module): ...this new helper function.
(canonicalize_path): Changed function signature to return success
or failure. Updated all callers.
(foreachfile_callback): Make use of argz API.
(LT_DLSTRLEN): Moved from here...
* libltdl/ltdl.h (LT_STRLEN): ...to here. Updated all callers.
(lt_dlrealloc): Declare new memory management handle.
* ltdl.c (lt_dladderror): Don't use `index' as a variable name,
since it is a function on BSD based boxes.
(lt_dlseterror): Ditto.
(lt_dlexit): Remove unused errormsg declaration.
(foreach_dirinpath): Make sure filename is initialised.
(find_handle): Return NULL for a failed search.
(foreachfile_callback): Don't reuse data2 symbol from prototype
in func declaration to prevent symbol shadowing.
* ltdl.h (lt_dlmutex_seterror): Don't use `error' as a parameter
name, since it is a function on glibc boxes.
(AC_LIB_LTDL): Require AC_HEADER_DIRENT for ltdl.c.
* libltdl/ltdl.h (lt_dlforeachfile): Prototype for new function.
* libltdl/ltdl.c: Include an appropriate header for the
opendir/dirent api.
(foreach_dirinpath): Visit each file in a list of directories.
(find_file_callback): Factor out the core of find_file() to make
use of foreach_dirinpath().
(find_file): Use it!
(find_handle_callback, find_handle): Ditto.
(lt_dlforeachfile): New function to find files in a searchpath.,,
(foreachfile_callback): ...using this callback.
* doc/libtool.texi (Libltdl interface): Document new
lt_dlforeachfile api call.
* doc/libtool.texi (Thread Safety in libltdl): New node describing
the application the new MT API.
* libltdl/ltdl.h: Prototypes.
* libltdl/ltdl.c: Use these functions throughout the rest of
the file to provide thread locking.
(lt_dlmutex_register): New function to set callbacks for
multi-threaded calls into libltdl.
(lt_dl_mutex_lock): Type of a locking callback function.
(lt_dl_mutex_lock): Type of an unlocking callback function.
(lt_dl_mutex_seterror): Type of a callback function to save the
last libltdl error message in thread local storage.
(lt_dl_mutex_geterror): Type of a callback function to retrieve
the last saved error message from thread local storage.
* doc/libtool.texi (User defined module data): Document it all.
* ltdl.m4: Check for memcpy, or else bcopy.
* ltdl.c (lt_caller_data): New type.
(lt_dl_handle_struct): Add an lt_caller_data field.
(lt_dlcaller_register, lt_dlcaller_set_data,
lt_dlcaller_get_data): New functions.
(rpl_memcpy): A minimal fallback implementation.
(rpl_realloc): A realloc implemented with lt_dlmalloc and
lt_dlfree.
(LT_DLMALLOC, LT_DLFREE, LT_DLREALLOC, LT_DLMEM_REASSIGN):
New memory handling convenience macros. Use them
appropriately throughout the rest of this file.
* ltdl.h (lt_dlcaller_register, lt_dlcaller_set_data,
lt_dlcaller_get_data): Prototyped.
* libltdl/ltdl.h (lt_dlmakeresident, lt_dlisresident): Add
prototypes.
(LT_DLERROR_CLOSE_RESIDENT_MODULE): New error status.
* libltdl/ltdl.c (lt_dlmakeresident, lt_dlisresident): Allow
making and testing of resident module status, which prevents a
module from being lt_dlclosed.
(lt_dlopen): If lt_dlopen()ing self, make the module resident.
(lt_dlclose): Return an error if the module is resident.
number to reflect the breakage of binary compatibility.
* doc/libtool.texi (Libltdl interface): Document
LT_NON_POSIX_NAMESPACE.
* libltdl/ltdl.h (LT_POSIX_NAMESPACE): Deleted. The default is
now to use this namespace, so the cpp macro is no longer
necessary.
ending in ``_t'') to deprecated #define compatibility macros.
Also ease up on the namespace pollution, so that only ``lt_''
and ``LT_'' prefixes are taken from the global namespace.
* ltdl.h: ditto.
far cleaner to use lt_dlforeach and lt_dlgetinfo.
* libltdl/ltdl.h: Prototype deleted.
* doc/libtool.texi: Documentation deleted.
* NEWS: annoncement deleted.
* doc/libtool.texi (Libltdl interface): Moved user defined module
loader documentation from here...
(Module loaders for libltdl) ...to here, and updated the text and
added examples.
* ltdl.m4 (AC_CHECK_FUNCS): check strcmp for lt_find_dlloader.
* libltdl/ltdl.h: Reformatted and commented for readability.
(struct lt_user_dlloader): New data type for passing
initialisation pointers to lt_add_dlloader.
(LTDL_ERROR_INVALID_LOADER): New error message when non loader
handles are passed to the user loader API.
(LTDL_ERROR_INIT_LOADER): New error when loader initialisation
fails.
(LTDL_ERROR_REMOVE_LOADER): New error when loader removal fails.
(lt_module_open_t): renamed from lt_lib_open_t.
(lt_module_close_t): renamed from lt_lib_close_t.
(lt_dlloader_exit_t): renamed from lt_dlloader_exit_t.
* libltdl/ltdl.c: Reordered builtin loaders so that the "dld"
loader no longer occurs before "dlopen" on some platforms and
after it on others.
(lt_dlloader_t): Moved here from ltdl.h, added a field,
"loader_name", for identifying the loader, and renamed from
lt_dltype_t. Renamed type variables to loader IFF of type
lt_dlloader_t.
(lt_module_t): Renamed from lt_syshandle. Renamed handle variables
to module IFF of type lt_module_t.
(LTDL_TYPE_TOP): Deleted. No longer required.
(sys_dl): Initialised as a struct lt_user_dlloader.
(sys_dl_init): Deleted. No longer required.
(sys_dl_exit): Ditto.
(sys_shl): Initialised as a struct lt_user_dlloader.
(sys_shl_init): Deleted. No longer required.
(sys_shl_exit): Ditto.
(sys_wll): Initialised as a struct lt_user_dlloader.
(sys_wll_init): Deleted. No longer required.
(sys_wll_exit): Ditto.
(sys_bedl): Initialised as a struct lt_user_dlloader.
(sys_bedl_init): Deleted. No longer required.
(sys_bedl_exit): Ditto.
(sys_dld): Initialised as a struct lt_user_dlloader.
(sys_dld_init): Deleted. No longer required.
(sys_dld_exit): Ditto.
(sys_presym): Initialised as a struct lt_user_dlloader.
(lt_mod_init_t): Moved to here from ltdl.h.
(lt_dlinit): Add builtin loaders using the user loader API.
(lt_dlexit): Unregister and free all loaders.
(lt_add_dlloader): New function to add a new module loader after the
loader specified in the argument.
(lt_remove_dlloader): New function to remove a module loader.
(lt_next_dlloader): New function for iterating over module loaders.
(lt_dlloader_name): Accessor function for name of dlloader.
(lt_find_dlloader): New function to get a reference to a registered
module loader.
(strcmp): static implementation incase the host has none.
(lt_dlgettypes, lt_dlsettypes): Removed.
and app_private pointers from lt_dlhandle_t
* libltdl/ltdl.c (presym_add_list): new preloaded symbols
don't need to be added to the end
* libltdl/ltdl.c (lt_dlgetdata, lt_dlsetdata): removed
* libltdl/ltdl.h: ditto
* doc/libtool.texi (libltdl interface): ditto
* doc/libtool.texi (Libltdl interface): Document new entry
points.
* libltdl/ltdl.c (lt_dladderror): New function to add a user
defined error message to the tables used by lt_dlerror().
(lt_dlseterror): New function to allow setting of last_error by
user modules.
(ltdl_error_strings): New preprocessor generated table of internal
error diagnostic strings.
(user_error_strings): New internal list of registered user error
diagnostic strings.
(throughout!): Use error messages from ltdl_error_strings.
* libltdl/ltdl.h (ltdl_error_table): New macro to tabulate
internal diagnostic error strings alongside enum keys.
* doc/libtool.texi (Libltdl interface): Document new entry
points.
* libltdl/ltdl.c (lt_dltype_t): Use new type definitions for
existing fields.
(lt_dladdtype): New function to add a new ltdl dynamic loader
type to the end of the list of valid types..
(lt_dlgettypes): New function to return the complete list of ltdl
dynamic loader types.
(lt_dlsettypes): New function to replace the list of ltdl dynamic
loader types entirely -- e.g. to prepend a new type to the
existing list.
(sys_dl_open, sys_dl_close, sys_dl_sym): Work with lt_syshandle..
(sys_shl_open, sys_shl_close, sys_shl_sym): ditto.
(sys_dld_open, sys_dld_close, sys_dld_sym): ditto.
(sys_wll_open, sys_wll_close, sys_wll_sym): ditto.
(sys_bedl_open, sys_bedl_close, sys_bedl_sym): ditto.
(presym_open, presym_close, presym_sym): ditto.
(tryall_dlopen): Call lt_lib_open_t functions lt_syshandle
compatibly.
(lt_dlclose): Call lt_lib_close_t functions lt_syshandle
compatibly.
(lt_dlsym): Call lt_find_sym_t functions lt_syshandle compatibly.
(lt_dltype_t): moved type declaration from here...
* libltdl/ltdl.h (lt_dltype_t): ...to here.
(lt_syshandle): new type for low level system handles passed by
loader functions
(lt_mod_init_t): New type for functions implementing the
initialisation for an ltdl dynamic loader.
(lt_mod_exit_t): Type of exit functions for the same.
(lt_lib_open_t): Type of loader functions for the same.
(lt_lib_close_t): Type of unloader functions for the same.
(lt_find_sym_t): Type of symbol resolver functions for the same.
programs, libraries and objects, allow linking of shared libraries
against static libraries/objects on platforms that support it
but print a warning, fix some typos
* partially revert my previous change and
update only copyright notices of files that were actually modified
* NEWS: update
* libltdl/Makefile.am: version number was wrong
* libltdl/ltdl.c (tryall_dlopen): revert Gary's change
since it breaks dlpreopening
* ltdl.m4: ditto
* libltdl/ltdl.c (sys_search_path): search in the system default
library search path, too
* ltdl.m4 (AC_LTDL_SYSSEARCHPATH): extract the path
* libltdl/ltdl.c (find_module): remove bogus file_not_found_error
* libltdl/ltdl.c (load_deplibs): implement loading of dependency
libraries
* libltdl/ltdl.c (unload_deplibs): implement unloading of dependency
libraries
* libltdl/ltdl.c (lt_dlexit): correctly close all modules and
their dependencies
* libltdl/ltdl.c (lt_dlforeach): new function
* libltdl/ltdl.h: ditto
* doc/libtool.texi (using libltdl): document it
* libtool.m4: reformatting, only add -I$topsrc_dir/libltdl to
INCLTDL
* libtoolize.in: reformatting
* ltconfig.in: reformatting
* ltmain.in: reformatting
* mdemo/configure.in: AC_SUBST INCLTDL
* mdemo/Makefile.am: use INCLTDL
* tests/Makefile.am: reexport OBJEXT and EXEEXT
* tests/dryrun.test: use them for building main.obj and mdemo.exe
wrapping other macros to make a portable compound statement from
multiple C statements in the expansion.
(LTDL_SET_PRELOADED_SYMBOLS): Use the above macros to add an
extern declaration for lt_preloaded_symbols, to remove
dependency on undefined symbol from libltdl.dll on cygwin (and
other -no-undefined architectures).
* libltdl/ltdl.c (lt_preloaded_symbols): No longer defined here.
* doc/libtool.texi (using libltdl): document new lt_dlinfo struct,
replace NULL with @code{NULL}, document lt_dlsetdata(),
lt_dlgetdata() and lt_dlgetinfo()
* libltdl/Makefile.am: increment interface version number
* libltdl/configure.in: set version number to 1.1
* libltdl/ltdl.c: make some variables public by moving them
to the info struct, add support for application specific data
within module handles, new lt_dlsetdata(), lt_dlgetdata() and
lt_dlgetinfo() functions,
fix memory leaks, minor cleanups
* libltdl/ltdl.h: ditto
* mdemo/main.c: demonstrate use of lt_dlgetinfo,
improved handling of errors
* ltconfig.in: set hardcode_into_libs = yes for GNU/Hurd, Linux
and Solaris, only hardcode *all* run-paths if hardcode_into_libs
is set to 'all', otherwise hardcode only user-specified rpaths
into libraries
* ltmain.in: minor cleanups, we don't need to add user-specified
rpaths to compile_rpath, finalize_rpath is sufficient
* ltconfig.in: transform linux* -> *linux-gnu* _after_ host_os has
been set! (reported by Bruno Haible <haible@ilog.fr>)
* configure.in: AC_SUBST reload_flag, deplibs_check_method
and file_magic_cmd
* README: use 'libtool --version' instead of 'ltconfig --version'
(suggested by Francios Pinard <pinard@iro.umontreal.ca>
not compiling for a Windows target.
* libltdl/ltdl.c (canonicalize_path): New function to
ensure internal paths use '/' directory separators.
(find_file): use canonicalize_path. Memory management
changed to cope.
(lt_dlopen): ditto.
(free_vars): Removed `dir' and `name', which are now handled
internally.
as suitable for the target host.
(LTDL_PATHSEP_CHAR): Similarly with ':' or ';'.
* libltdl/ltdl.c: Use LTDL_DIRSEP_CHAR and LTDL_PATHSEP_CHAR
instead of hardcoding throughout.
Reported by Jon Leichter <jon@symas.com>
* libltdl/Makefile.am: Use -no-undefined for dll compliance.
* libltdl/configure.in: Use AC_LIBTOOL_WIN32_DLL for dll
compliance.
* libltdl/ltdl.c: Define and use LTDL_GLOBAL_DATA to correctly
export global data symbols from libtldl.dll.
* libltdl/ltdl.h: Define and use LTDL_SCOPE to declare data
symbols as dllexport, dllimport or plain ornary extern depending
in the context in which it is used.
* README: updated (BeOS support, no longer shared libraries
support for AmigaOS), cleanups, we have now two mailing lists
* REAMDE-alpha: autogen -> bootstrap, we have now two mailing lists
* THANKS: added Xavier Pianet
* doc/PLATFORMS: BeOS works
* doc/libtool.texi: we have now to two mailing lists,
updated -dlopen self documentation, documented libltdl's license,
put each author in a separate line,
inter-library dependencies on uninstalled libtool libraries are
now supported, cleanups and minor corrections
* libltdl/COPYING.LIB: new file
* libltdl/ltdl.[ch]: added special exception to the LGPL license
* libtool.spec: removed, it was outdated
* Makefile.am: removed libtool.spec
* ltmain.in: use TMPDIR when possible, create a subdirectory
in the temporary directory, added -export-symbols-regex to the help,
* cdemo/foo1.c: renamed to foo.c
* libltdl/ltdl.c: eliminated lt_dltype, in presym_open():
search for @PROGRAM@ if filename == 0, in lt_dlopen():
fixed bug for filename == 0
* libltdl/ltdl.h: use __P macro for lt_dlmalloc/free
* libtool.m4: new macro AC_LIBTOOL_DLOPEN: checks for dlopen
and dlopen(NULL) support
* ltconfig.in: added new variables dlopen and dlopen_self,
--enable-dlopen[-self] flags for AC_LIBTOOL_DLOPEN
* ltmain.in: use dlopen[_self], dlpreopen files if there's no
dlopen support, build lt_preloaded_symbols only if
-dl[pre]open was used, include program symbols if -export-dynamic
was specified and there's no dlopen(NULL) support
* mdemo/configure.in: use AC_LIBTOOL_DLOPEN
* mdemo/main.c: demonstrate lt_dlopen(0)
* *demo/configure.in: use AC_CHECK_LIBM
* doc/libtool.texi: renamed file_magic_command to file_magic_cmd,
renamed archive_sym_cmds to archive_expsym_cmds
* ltconfig.in: ditto
* ltmain.in: ditto
* libltdl/ltdl.c: use lt_dlmalloc/free
* libltdl/ltdl.h: define lt_dlmalloc/free
* libtool.m4: added AC_CHECK_LIBM macro
* ltconfig.in: renamed archive_sym_cmds to archive_expsym_cmds,
added always_export_symbols, export_symbols_cmd, exclude_expsyms,
include_expsyms, removed archive_cmds for cygwin/mingw and AIX,
on Solaris store the exported symbols list in objdir
* ltmain.in: allow -export-symbols for modules, use thread_safe flag,
add include_expsyms to the exported symbols
added function lt_dlopenext(), removed reference to
LTDL_PRELOADED_SYMBOLS in LTDL_SET_PRELOADED_SYMBOLS
* libltdl/ltdl.c: partially reverted Alexandre's dynamic string
allocation change (it was not necessary and the code was unreadable),
cleanups, removed usr_search_path_size, renamed usr_search_path
to user_search_path, in find_module() also check for moved
modules, merged find_file() and find_library(),
added lt_dlopenext(), in lt_dladdsearchdir() no longer reset
the search path if 'search_dir' == NULL and don't use realloc()
(might not be available on all platforms),
removed __P((void)) in the declaration of lt_dlgetsearchpath()
* libltdl/ltdl.h: added lt_dlopenext()
* ltconfig.in: AIX archive commands were broken,
fixed a MAJOR bug in global_symbol_pipe which caused
"demo-shared.test;demo-make.test" to fail (libtool must not extract
undefined symbols of libraries, i.e. symcode must not contain 'U')
* tests/Makefile.am (clean-local): "make distclean" in cdemo, too
without arguments, that calls lt_dlpreopen_default_ with
lt_dlpreloaded_symbols
* libltdl/ltdl.c (lt_dlpreopen_default_): renamed from
lt_dlpreopen_default
old-fashioned archive, use a copy of libobjs saved before
convenience libraries are appended
* libltdl/ltdl.h (_LTDLL_EXPORT, _LTDLL_IMPORT): use cygwin or
unix library import/export primitives; this may be convenient for
people willing to create DLLs
(_LTDLL_EXTERN): select _LTDLL_EXPORT or _LTDLL_IMPORT depending
on _LTDL_COMPILE_
* libltdl/ltdl.h, libltdl/ltdl.c (lt_dlpreopen): new function,
that replaces the current preloaded_symbols list with its
argument, and returns the old value, initially NULL
(dldpre_init): don't refer to dld_preloaded_symbols any more
(dldpre_open, dldpre_sym): search preloaded_symbols
(lt_dlpreopen_default): call lt_dlpreopen with
dld_preloaded_symbols, that is declared as extern; it should be
called from the main program or from some static library without
-no-undefined
(lt_dlerror): new function, that returns the error message for the
last error occurred; the error message is kept in the static
variable last_error
* libltdl/configure.in (enable-ltdl-install): moved back from
enable-install; other packages might use enable-install already,
better have fine grained control over this.
* libltdl/Makefile.am (libltdls.la): discarded