GNU indent does not process this well, and nothing else in the tree
uses this convention, so drop it.
(GNU indent is enforced by gnulib when running `make distcheck`.)
* libltdl/ltdl.c: Delete ^L.
* libltdl/ltdl.h: Likewise.
* gnulib: Update to the latest git version.
* gl-mod/bootstrap: Likewise.
* bootstrap: Regenerate.
* gl/top/README-release.diff: Update the patch for the latest
changes in gnulib's README-release.
See maintain.texi (Copyright Notices) for rules for maintaining
the years in copyright notices.
* All Files (Copyright): Updated with missing 2011 and 2012.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* cfg.mk (local-checks-to-fix): Remove sc_space_tab from list of
disabled checks.
(exclude_file_name_regexp--sc_space_tab): Don't flag space-tab
sequences in diff files as an error.
* Makefile.am, build-aux/general.m4sh, build-aux/git-hooks/commit-msg,
build-aux/ltmain.m4sh, libltdl/loaders/dyld.c,
libltdl/loaders/shl_load.c, libltdl/ltdl.h, libltdl/ltdl.mk,
libltdl/slist.c, libtoolize.m4sh, m4/ltoptions.m4, tests/demo/dlmain.c,
tests/depdemo/main.c, tests/libtoolize.at, tests/lt_dladvise.at,
tests/pdemo/longer_file_name_dlmain.c, tests/sh.test, tests/static.at,
tests/stresstest.at, tests/template.at: Fix space-tab sequences by
reversing them in regexps, and deleting leading spaces in indentation.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
* libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Move the
declaration of lt__PROGRAM__LTX_preloaded_symbols to global
scope and make sure it has "C" linkage. Makes exceptions.at
succeed on MSVC.
Signed-off-by: Peter Rosin <peda@lysator.liu.se>
On some systems, lt_preloaded_symbols may not be declared
const due to relocation issues. C99 requires qualification to
match for compatible declarations, so ensure we declare
const'ness in the same way everywhere; link-time optimization
may otherwise rightfully complain about inconsistencies.
Since ltdl.h may not depend upon config.h, rely on system
defines for choosing const'ness.
* NEWS: Update.
* doc/libtool.texi (Dlpreopening): Document this issue.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms):
[__WINDOWS__, __CYGWIN__, _WIN32_WCE]: Define LT_DLSYM_CONST
according to system defines. Remove old shell cruft. Use
LT_DLSYM_CONST for lt_${my_prefix}_LTX_preloaded_symbols.
* libltdl/libltdl/lt_system.h (LT_DLSYM_CONST): Likewise,
define LT_DLSYM_CONST according to system defines.
* tests/demo/foo.h (LT_DLSYM_CONST): Likewise.
* tests/pdemo/foo.h (LT_DLSYM_CONST): Likewise.
* tests/demo/dlmain.c (lt_dlsymlist): Use LT_DLSYM_CONST.
* tests/pdemo/longer_file_name_dlmain.c (lt_dlsymlist):
Likewise.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Likewise
for configure test code.
* libltdl/ltdl.c (preloaded_symbols): Use LT_DLSYM_CONST.
* libltdl/ltdl.h (LTDL_SET_PRELOADED_SYMBOLS): Likewise.
Signed-off-by: Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
* libltdl/m4/ltdl.m4 (LTDL_INIT): Check for a libltdl that
provides lt_dladvise_preopen when deciding if installed libltdl
is 'new enough'.
* libltdl/libltdl/lt__private.h (lt__advise): Add a new
is_preload flag.
* libltdl/ltdl.c (lt_dladvise_preload): New api call to set it.
(try_dlopen): If it is set, and the search of preloaded modules
didn't return a match, don't bother searching the filesystem.
* libltdl/ltdl.h (lt_dladvise_preload): Declare it.
* doc/libtool.texi (Libltdl Interface): Document it.
* tests/lt_dladvise.at: Test it (and incidentally add some test
coverage for `libtool -dlpreopen').
* NEWS: Announce it.
visibility set according to the underlying implementation.
Here, we add lt_dlopenadvise() to allow callers to request,
among other things, local or global symbol visibility from the
underlying dlloader:
* libltdl/ltdl.c (LT_DLRESIDENT_FLAG): Removed.
(LT_DLIS_RESIDENT): Use public is_resident info field.
(LT_DLIS_SYMLOCAL, LT_DLIS_SYMGLOBAL): New macros to test for
module symbol visibility status.
(tryall_dlopen): If vtable->module_open() was able to act on
either is_symlocal or is_symglobal hints, store that in
the handle flags.
(lt_dlopenadvise): New function that works like lt_dlopen(),
but accepts an advise type to determine whether to ask
dlloaders to change default symbol visibility.
(lt_dlopen, lt_dlopenext): Just call lt_dlopenadvise() with
the correct parameters.
(lt_dladvise_init, lt_dladvise_destroy): New functions to
initialize and destroy an advise type hint.
(lt_dladvise_ext, lt_dladvise_resident, lt_dladvise_local)
(lt_dladvise_global): Set hints on an advise type.
(openadvise): Factored out of lt_dlopenadvise.
(has_library_ext): Factored out of lt_dlopenadvise.
* libltdl/ltdl.h: Declare all of the above.
(lt_dlinfo): New fields for advise hints.
* libltdl/libltdl/lt_dlloader.h (lt_module_open): Add a new
advise parameter. Adjust all callers.
(lt_dladvise): New opaque type for advise hints.
* libltdl/libltdl/lt__private.h (lt__advise): Declare
contents of opaque lt_dladvise type.
* libltdl/libltdl/lt_error.h (CONFLICTING_FLAGS): New error
for attempts to have local and global symbol visibility at the
same time.
* libltdl/loaders/dld_link.c, libltdl/loaders/dyld.c,
libltdl/loaders/load_add_on.c, libltdl/loaders/loadlibrary.c,
libltdl/loaders/preopen.c, libltdl/loaders/shl_load.c: Adjust.
* libltdl/loaders/dlopen.c (RTLD_LOCAL, RTLD_GLOBAL): Try to
define these symbols if the system has equivalents.
(vmopen): If unable to act on a caller request to set symbol
visibility, then unset the relevant hints in the advise type.
* tests/lt_dladvise.at: New tests for the above.
* doc/libtool.texi (Libltdl Interface): Updated.
* NEWS: Updated.
with module visibilty when linked with programs written for the
old API.
(lt_dlinterface_register): New name.
* Makefile.am (VERSION_INFO): Bumped.
* doc/libtool.texi (User defined module data): Updated.
most libltdl headers to libtldl/libltdl to allow
#include <libltdl/ltdl.h> to always work.
* libltdl/Makefile.am, libltdl/loaders/Makefile.am: Look for includes
in the new location.
* libltdl/libltdl/lt__alloc.h, libltdl/libltdl/lt__dirent.h,
libltdl/libltdl/lt__glibc.h, libltdl/libltdl/lt__private.h,
libltdl/libltdl/lt_dlloader.h, libltdl/libltdl/lt_error.h,
libltdl/libltdl/lt_system.h, libltdl/libltdl/ltdl.h,
libltdl/libltdl/slist.h: Added files, moved from libtdl/.
* libltdl/lt__alloc.h, libltdl/lt__dirent.h, libltdl/lt__glibc.h,
libltdl/lt__private.h, libltdl/lt_dlloader.h, libltdl/lt_error.h,
libltdl/lt_system.h, libltdl/ltdl.h, libltdl/slist.h: Removed, moved
to libltdl/libltdl.
compatible. Instead, revert to the old way of doing things with
an array of symbol name vs. address, and adding the originator as
the first symbol but with a NULL address:
* config/ltmain.in (func_extract_dlsyms): Store originator as a
NULL address symbol.
* libltdl/ltdl.h (lt_dlsymbol): Removed.
(lt_dlsymlist): Remove originator field.
(LTDL_SET_PRELOADED_SYMBOLS): Adjust.
* libltdl/loaders/preopen.c (vm_open, lt_dlpreload_open): Adjust
for new types.
(vm_sym): Skip the new originator symbol when scanning symbol
names.
* m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Adjust preloaded symbols
test file to match.
* NEWS: Updated.
lt__handle to better reflect the naming scheme.
* libltdl/ltdl.h (lt_dlhandle): Be truly opaque with a void *.
* libltdl/lt_dlloader.c (lt_dlloader_remove): Party to
lt__private.h, so use internal lt__handle instead of opaque
lt_dlhandle.
* libltdl/ltdl.c (LT_DLGET_FLAG, LT_DLSET_FLAG): Add a cast to
internal lt__handle type.
(try_dlopen, tryall_dlopen, load_deplibs, unload_deplibs): Ditto.
(lt_dlexit, lt_dlclose, lt_dlsym): Use lt__handle to iterate
throught the handle list.
(try_dlopen): Use lt__zalloc instead of MALLOC and memset.
* libltdl/ltdl.h (lt_dlcaller_id): Be truly opaque with a void *.
(lt_dlhandle_interface): New callback type for filtering handles
according to the interface they present.
* libltdl/ltdl.c (lt_dlcaller_register): Take an id and an
interface check callback, and generate a caller_id.
(iterator): New static variable for the use of...
(lt_dlhandle_first): New function. Set the iterator for
subsequent calls to lt_dlhandle_next.
(lt_dlhandle_next): Either work as before when iterator is unset,
or else skip handles that fail the interface check in iterator set
by lt_dlhandle_first.
* libltdl/ltdl.h (lt_dlhandle_first): Declaration.
* doc/libtool.texi (User defined module data): Document the new
APIs.
* NEWS: Updated.
`loaders' list management into a new SList ADT. In the process,
the API for writing loaders is a little cleaner, so all the
existing loaders were tweaked to take advantage of that:
* libltdl/slist.h, libltdl/slist.c: New files implementing a
generic singly linked list container ADT. The ADT is purely
internal, and none of its API's are visible from an installed
libltdl.
* libltdl/lt_dlloader.h (lt_dlloader): Removed next field again
:-) Renamed to lt_dlvtable for API. Changed all callers.
(lt_dlloader_get): New function to turn an lt_dlloader into its
associated lt_dlvtable.
(lt_dlloader_add): Removed unused data parameter. The caller
data belongs to (and is set by) the loader itself, not the
loader's client. Changed all callers.
(lt_dlloader_name, lt_dlloader_data): Removed. Use
lt_dlloader_get instead!
* libltdl/lt__private.h: Include slist.h.
(lt__alloc_die_callback): Add missing LT_SCOPE to declaration.
(lt_dlhandle_struct): Use lt_dlvtable instead of opaque
lt_dlloader.
* libltdl/ltdl.c (lt_dlexit): Rewritten for the new loader API.
(loaders, lt_dlloader_add, lt_dlloader_remove, lt_dlloader_next,
lt_dlloader_find): Moved from here...
* libltdl/lt_dlloader.c ((loaders, lt_dlloader_add,
lt_dlloader_remove, lt_dlloader_next, lt_dlloader_find): ...to
here. And rewritten in terms of new SList interface.
* libltdl/ltdl.c (lt_dlexit, tryall_dlopen): Rewritten in terms of
new lt_dlloader interface.
* libltdl/Makefile.am (libdlloader_la_SOURCES): Add slist.h and
slist.c. Move lt_dlloader.h from here...
(pkginclude_HEADERS): ...to here.
(libltdl_la_SOURCES): Add lt_dlloader.c and lt_dlloader.h.
than my move of the module field into lt_dlinfo:
* libltdl/ltdl.c (lt_caller_data, lt_dlhandle_struct): Move from
here...
* libltdl/lt__private.h (lt_caller_data, lt_dlhandle_struct):
...to here. And put the module field back here...
* libltdl/ltdl.h (lt_dlinfo): ...instead of here.
* libltdl/loaders/loadlibrary.c (vm_open): Adjust.
operation of libtool (neither would work alone). First, there is
a new feature that allows libraries to preopen modules. This
entails a backwards incompatible change to the libltdl API for
separating out the preloaded symbol lists by owner. Second, in
the tradition of "eating our own dogfood", libltdl now preloads
its own dlloaders. The internal API for dlloaders has also had to
change in a backwards incompatible way in support of the new
library preloading feature. If you don't use preloaded libraries,
you needn't change your project sources, though you will need to
recompile against the new libltdl. The API changes are mostly
confined to dlloaders, so you probably needn't worry about those
(unless you have written a custom loader that you want libltdl to
use):
* configure.ac (AC_CONFIG_FILES): Add libltdl/loaders/Makefile.
* libltdl/configure.ac (AC_CONFIG_FILES): Add loaders/Makefile.
* libltdl/loaders: New directory for module loaders, to simplify
Makefile rules, and to give the loaders themselves names that are
unique in the first few characters.
* libtoolize.in (func_copy_all_files): Copy recursively to pick up
the loaders directory contents.
* libltdl/loaders/Makefile.am: New file. Move module building
rules to here...
* libltdl/Makefile.am: ...from here.
(VERSION_INFO): Bumped version info to signify interface changes.
(libltdl_la_CPPFLAGS, libltdlc_la_CPPFLAGS): Set LTDLOPEN
appropriately for each library.
* libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-load_add_on.c,
libltdl/loader-loadlibrary.c libltdl/loader-preopen.c,
libltdl/loader-shl_load.c: Moved from here...
* libltdl/loaders/dld_link.c, libltdl/loaders/dlopen.c,
libltdl/loaders/dyld.c, libltdl/loaders/load_add_on.c,
libltdl/loaders/loadlibrary.c libltdl/loaders/preopen.c,
libltdl/loaders/shl_load.c: ...to here.
(get_vtable): New entry function for each.
* libltdl/loaders/preopen.c (lt_dlsymlists_t): Replaced by...
(symlist_chain): ...a new structure which maps lists of preloaded
symbols from the object that loads them.
(lt_dlpreload_open): New function to automatically open all
preloaded modules belonging to a named object (ORIGINATOR).
* libltdl/lt__alloc.c (lt__zalloc): New function to return a block
of zeroed out new memory.
* libltdl/lt__alloc.h (lt__zalloc): Prototype it.
* libltdl/lt__private.h (lt__alloc_die_callback): Add missing
prototype.
(lt__error_strings): Make this opaque to callers.
* libltdl/lt_error.c (lt__error_strings): Move the implementation
to here.
* libltdl/lt_dlloader.h (lt_user_dlloader): Add extra fields to
make originator focused preloading possible. *BREAKS BACKWARDS
COMPATIBILITY*
(lt_dlloader_add): Take advantage of new fields to simplify
paramater list.
* libltdl/lt_system.h (LT_STR): New ANSI stringification macro.
(LT_CONC): Fix it to work from within macros.
* libltdl/ltdl.c (loader_init, loader_init_callback): Simplify
dlloader loading.
(get_vtable, preloaded_symbols): Point these at the preopen.c
symbols to bootstrap the loader chain.
(lt_dlinit): Load the preopen dlloader manually, and then use it
to load any other preloaded dlloaders.
(lt_dlloader_add): Simplify parameter list. Populate new
fields. Chain new loaders according to priority field.
* libltdl/ltdl.h (lt_dlsymlist): Add a new originator field.
(lt_dlpreload_callback_func): Type of a callback for automatic
lt_dlpreload_open loading.
(LTDL_SET_PRELOADED_SYMBOLS): Adjust to hook into preloaded
symbols from the "@PROGRAM@" originator.
* tests/demo/dlmain.c (main): Use mangled preloaded_symbols symbol.
* tests/pdemo/longer_file_name_dlmain.c (main): Ditto.
* ltmain.in: Don't spew spurious warnings when dlopening and
dlpreopening modules.
(func_generate_dlsyms): Factored out from multiple copies in the
rest of the code. Generate originator keyed symbol lists.
(func_extract_archives): Also factored. Extract the contents of
convenience archives for linking with dependent libraries when
--whole-archive is not available.
[darwin]: Don't try to link $old_library unless it exists, and
$lib is a bundle.
* m4/ltdl.m4 (AC_LTDL_DLLIB): Check for all possible dynamic
loading libraries/apis rather that stopping when an acceptable one
is discovered.
(LT_DLLOADERS): New variable for holding dlloaders that can be
preloaded.
* doc/libtool.texi: Document interface changes.
* NEWS: Updated.
* libltdl/ltdl.c (lt_dlhandle_struct): ...from here. Changed all
callers.
* libltdl/loader-loadlibrary.c (sys_wll_open): Use new inteface to
scan loaded handle->info.module fields for previously loaded
modules.
* doc/libtool.texi (User defined module data): Document changes to
the interface.
* NEWS: Updated.
Reported by Chuck Wilson <cwilson@ece.gatech.edu>
Applications should assume that the native dlopen is NOT
thread-safe, and take care of locking themselves. All application
calls into libltdl should thus be protected by the caller.
* libltdl/lt_mutex.c, libltdl/lt_mutex.h: Removed.
* libltdl/Makefile.am (pkginclude_HEADERS): Removed lt_mutex.h.
(libltdl_la_SOURCES): Removed lt_mutex.c and lt_mutex.h.
* libltdl/ltdl.h: Don't include lt_mutex.h.
* libltdl/lt__private.h (LT__MUTEX_GETERROR, LT__MUTEX_SETERROR)
(LT__MUTEX_SETERRORSTR): Renamed to...
(LT__GETERROR, LT__SETERROR, LT__SETERRORSTR): ...this. Changed
all callers.
(LT__MUTEX_LOCK, LT__MUTEX_UNLOCK, lt_dlmutex_lock)
(lt_dlmutex_unlock, lt_dlmutex_seterror, lt_dlmutex_geterror):
Removed. Changed all callers.
* doc/libtool.texi (Thread Saftey in libltdl):
* NEWS: Updated.
libltdl/argz.h, libltdl/lt__glibc.h, libltdl/lt_dlloader.h,
libltdl/lt__dirent.c, libltdl/lt__dirent.h, libltdl/lt__private.h,
libltdl/lt__alloc.c, libltdl/lt__alloc.h, libltdl/lt_system.h,
libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-loadlibrary.c,
libltdl/loader-shl_load.c, libltdl/lt_error.h, libltdl/lt_mutex.h:
Autoconf either defines to 1 or undefs the discovery macros it
puts in config.h, and many (non-GNU) compilers throw a spurious
warning when testing an #undef macro with #if. For consistency,
while we are touching all these lines, use defined(MACRO) style
throughout.
Reported by Bob Friesenhahn <bfriesen@simple.dallas.tx.us>
them as libtool modules. Currently loader-preopen.c is linked
unconditionally and other appropriate loaders discovered by
AC_LTDL_DLLIB are built and linked in:
* libltdl/Makefile.am (libltdl_la_SOURCES): Add loader-preopen
module.
* m4/ltdl.m4 (AC_LTDL_DLLIB): Use AC_LIBOBJ to add appropriate
loaders to libltdl.
* libltdl/lt_system.h (LT_SCOPE): Moved to here.
* libltdl/ltdl.h (lt_dlloader, lt_user_data, lt_module)
(lt_module_open, lt_module_close, lt_find_sym, lt_dlloader_exit)
(struct lt_user_dlloader, lt_dlloader_next, lt_dlloader_find)
(lt_dlloader_name, lt_dlloader_data, lt_dlloader_add)
(lt_dlloader_remove): Moved declarations...
* libltdl/lt_loader.h: ...to here.
* libltdl/ltdl.c: Include lt_loader.h. Move loader implementation
code from here...
* libltdl/loader-dld_link.c, libltdl/loader-dlopen.c,
libltdl/loader-dyld.c, libltdl/loader-load_add_on.c,
libltdl/loader-loadlibrary.c, libltdl/loader-preopen.c,
libltdl/loader-shl_load.c: ...to here.
* tests/cdemo/Makefile.am, tests/demo/Makefile.am,
tests/depdemo/Makefile.am, tests/f77demo/Makefile.am,
tests/mdemo/Makefile.am, tests/mdemo2/Makefile.am,
tests/pdemo/Makefile.am, tests/tagdemo/Makefile.am (AM_CPPFLAGS):
Add -I$(top_srcdir)/../.. so that libltdl include files can be
written as #include <libltdl/lt_dlloader.h> and found correctly.
modules. Mutex handling is not currently useful in combination
with posix threads, and should be easier to replace if it is in a
separate module. Additionally, we can factor out the loaders in
such a way as to depend on only the portability layer and these
new mutex and error modules now:
* libltdl/Makefile.am (pkginclude_HEADERS): Install lt_error.h and
lt_mutex.h to $includedir/libltdl.
(libltdl_la_SOURCES): Build lt_error and lt_mutex objects.
* libltdl/ltdl.h (LT_SCOPE): Moved from here...
* libltdl/lt_system.h (LT_SCOPE): ...to here.
* libltdl/ltdl.c (lt_dlerror_strings, LT_DLSTRERROR): Moved from
here...
* libltdl/lt__private.h (lt__error_strings, LT__STRERROR): ...to
here as additional internal interfaces to lt_error. Changed all
callers.
* libltdl/ltdl.c (LT_DLMUTEX_LOCK, LT_DLMUTEX_UNLOCK)
(LT_DLMUTEX_SETERROR, LT_DLMUTEX_GETERROR, lt_dlmutex_lock_func)
(lt_dlmutex_unlock_func, lt_dlmutex_geterror_func)
(lt_dllast_error): Moved from here...
(LT__MUTEX_LOCK, LT__MUTEX_UNLOCK, LT__MUTEX_SETERRORSTR)
(LT__MUTEX_GETERROR, lt__mutex_lock_func, lt__mutex_unlock_func)
(lt__mutex_geterror_func, lt__last_error): ...to here as
additional internal interfaces to lt_mutex. Changed all callers.
(LT_MUTEX_SETERROR): Take an errorcode rather than a string.
Changed all callers.
* libltdl/ltdl.c, libltdl/ltdl.h (lt_dlmutex_register): Moved from
here...
* libltdl/lt_mutex.c, libltdl/lt_mutex.h (lt_dlmutex_register):
...to here. New files.
* libltdl/ltdl.c, libltdl/ltdl.h (lt_dladderror, lt_dlseterror)
(lt_dlerror_table):
Moved from here...
* libltdl/lt_error.c, libltdl/lt_error.h (lt_dladderror)
(lt_dlseterror, lt_dlerror_table): ...to here. New files.
There was no clean separation of abstraction layers in libltdl.
The first step in fixing this is to factor out the memory
management abstraction, making a start on removing promiscuity
from the underlying portability layer:
* doc/libtool.texi (Libltdl interface): Remove lt_dlmalloc,
lt_dlrealloc and lt_dlfree references. The memory management
layer used by libltdl is now private.
* libltdl/lt_system.h: New installed header for system portability
abstraction.
* libltdl/ltdl.h: Use it.
* libltdl/lt__alloc.c, libltdl/lt__alloc.h: New module above
system portability layer to abstract ltdl's memory management.
* libltdl/ltdl.c: Use lt__alloc.h.
(closedir): Use free.
(opendir): Use malloc/free.
(lt__xalloc_die_callback): Report memory failures through
lt_dlerror.
(lt_dlinit): Use it to initialise memory management.
(LT_DLMALLOC, LT_DLREALLOC, LT_DLFREE, LT_EMALLOC, LT_EREALLOC)
(rpl_strdup, rpl_realloc, lt_estrdup, lt_emalloc, lt_erealloc):
Removed in favour of...
(lt__strdup, lt__memdup, MALLOC, REALLOC, FREE): ...these calls
from libltdl/lt__alloc.h. Changed all callers.
(rpl_argz_append, rpl_argz_create_sep, rpl_argz_insert): As part
of the portability layer, these functions no longer use libltdl
memory management API.
(free_vars): Factored out.
(LT_DLMEM_REASSIGN): While redoing memory handling, renamed...
* libltdl/lt__alloc.h (MEMREASSIGN): ...to this.
* libltdl/Makefile.am (AUTOMAKE_OPTIONS): Let automake track
dependencies automatically.
(pkgincludedir): Override from parent package's setting.
(pkginclude_HEADERS): Install lt_system.h.
(libltdl_la_SOURCES): Add new files.
* NEWS: Updated.
Reported by Dalibor Topic <robilad@kaffe.org>
defined, unless __CYGWIN__ or __CYGWIN32__ are defined.
(LT_SCOPE): Now set without reference to __CYGWIN__ definition,
since __WINDOWS__ now implies !__CYGWIN__ after canonicalisation.
(LT_PARAMS, lt_ptr): Use canonicalised __WINDOWS__ to determine
which values to set these macros to.
* 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.