* 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_prohibit_strcmp
from list of disabled checks.
(exclude_file_name_regexp--sc_prohibit_strcmp): Ignore
violations in libtool.texi and any demo C files.
* libltdl/libltdl/lt__private.h (strneq, streq): Renamed from
this...
(STRNEQ, STREQ): ..to this. Adjust all callers.
* tests/slist.at: Add STREQ definition. Change all !strcmp calls
to STREQ.
* build-aux/ltmain.m4sh (func_emit_cwrapperexe_src): Add and use
STREQ definition.
Signed-off-by: Gary V. Vaughan <gary@gnu.org>
<lt_dlinterface_register>: Document that a NULL place matches
all modules.
* libltdl/lt_dlloader.c (lt_dlloader_remove): Actually iterate
over all open modules when looking for modules that use it.
If a resident module is found, return but do not set the error
string.
* libltdl/ltdl.c (lt_dlexit): When removing dlloaders, ignore
errors that stem from earlier failed commands. Exposed by the
lt_dladvise test.
Fixes regression over branch-1-5.
Memleak report as Coverity CID 19 via Jeff Squyres.
libltdl/loaders/dyld.c, libltdl/loaders/dlopen.c, libltdl/ltdl.c,
libltdl/lt_error.c, libltdl/lt_dlloader.c, libltdl/lt__dirent.c:
Include lt__private.h prior to any system headers.
* libltdl/lt__alloc.c: Remove redundant inclusion of configuration
header.
need a library prefix like 'lib', such as BeOS. Fix a number
of bugs exposed by this test in order for it to pass.
Currently the prefix is hardcoded as 'lib', as I am not aware
of systems that require a different prefix:
* libltdl/loaders/preopen.c (lt_dlpreload_open): Move error
condition out of test loop to be sure that each originator is
tried, instead of erroring out if the first doesn't match.
Support passing NULL as the originator to load all preloaded
modules originating in the program itself.
* libltdl/lt_dlloader.c (lt_dlloader_dump): New debug function.
* libltdl/libltdl/lt_dlloader.h (lt_dlloader_dump): Declare it
when LT_DEBUG_LOADERS is defined at compile time.
* libltdl/ltdl.c (lt_dlinit): Dump loader list after successful
initialisation.
(tryall_dlopen): Add a new VTABLE parameter to force use of a
specific loader in preference to trying every loader in turn.
Adjust all callers.
(try_dlopen): Always see whether a module was preloaded for
module names with no directory component before searching the
filesystem for a match.
* libltdl/m4/libtool.m4 (_LT_CMD_GLOBAL_SYMBOLS): Declare
a new global_symbol_to_c_name_address_lib_prefix variable.
(global_symbol_to_c_name_address_lib_prefix): The sed
expressions to use when a lib prefix is enforced need to be
slightly different to work with preloaded modules.
* libltdl/config/ltmain.m4sh (func_generate_dlsyms): In order
to name preloaded symbols correctly for the lookup algorithm
to work when the loaded module file must be prefixed with lib.
Use global_symbol_to_c_name_address_lib_prefix when
need_lib_prefix is other than no.
* tests/need_lib_prefix.at: New test to check for breakage on
hosts where need_lib_prefix is unknown.
* Makefile.am (TESTSUITE_AT): Add new test.
* tests/TODO: Note missing tests that would have caught some
of the latent bugs fixed by this patch.
* HACKING: Document libltdl keyword.
* NEWS: Updated.
* libltdl/lt__alloc.c, libltdl/lt_dlloader.c, libltdl/ltdl.c,
libltdl/slist.c, libltdl/libltdl/lt__alloc.h,
libltdl/libltdl/lt_error.h, libltdl/libltdl/slist.h,
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, tests/stresstest.at,
tests/testsuite.at, tests/f77demo/foo.h, tests/fcdemo/foo.h,
tests/mdemo/foo.h, tests/mdemo/foo1.c, tests/mdemo/foo2.c,
tests/mdemo/main.c: Allow sources to be compiled by a C++
compiler: Cast appropriately, add C linkage for `get_vtable'
functions, do not use C++ keyword `delete'.
upstream. Mostly comments, formal item boxing, a sort function,
and const madness reduction.
(slist_new): Removed.
(slist_box, slist_unbox, slist_sort): New.
(SListCompare, SListCallback): Swapped!
(slist_remove, slist_find): Change order of parameters for
orthogonality with slist_foreach. Changed all callers.
* libltdl/lt_dlloader.c (loader_cmp): Renamed to...
(loader_callback): ...this. Return boxed item.
(lt_dlloader_remove): Adjust to new loader_callback semantics;
unbox each removed item before returning.
Remove unused variable.
Remove const from name parameter, since the slist API cannot
guarantee userdata const-ancy for its callback functions.
(lt_dlloader_find): Adjust to new loader_callback semantics; need
to return the contents of the boxed item.
Remove const from name parameter, since the slist API cannot
guarantee userdata const-ancy for its callback functions.
* libltdl/lt_dlloader.h (lt_dlloader_find, lt_dlloader_remove):
Adjust to new constless footprint.
* libltdl/ltdl.c (ltdl_exit): The global `loaders' list is changed
variable `loader' is invalidated. Since some loaders may be
resident modules that cannot be unloaded (though we have none
yet), we must save each `next' address before calling
`lt_dlloader_remove'.
* NEWS: Updated.
* THANKS: Added Ralf.
from slist_new.
* libltdl/ltdl.c (loader_init): Trust lt_dlloader_add(), don't
overwrite its error type, and simplify.
Reported by Ralf Wildenhues <Ralf.Wildenhues@gmx.de>
value of this function is often passed to free, don't declare it
`const'. Responsibility for this memory is given back to the
caller on return.
* libltdl/lt_dlloader.h (lt_dlloader_remove): Ditto.
* libltdl/ltdl.c (lt_dlexit): Adjust.
* 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.