Commit Graph

3021 Commits

Author SHA1 Message Date
Ralf Wildenhues
f5bb5e0e7a * libltdl/lt_dlloader.c (loader_callback, lt_dlloader_get): Use
NULL, not 0, for the benefit of too picky compilers like PGI.
* slist.c (slist_tail): Likewise.  Include stddef.h, for NULL.
Report by Jeff Squyres.
2007-09-07 02:44:57 +00:00
Eric Blake
22204a9ff8 * libltdl/ltdl.c (lt_dlcaller_get_data): Work even when no caller
has set data.
2007-09-05 14:48:54 +00:00
Ralf Wildenhues
6621aa6b9b * doc/libtool.texi (User defined module data)
<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.
2007-09-04 18:01:33 +00:00
Ralf Wildenhues
e14f5d12ae * NEWS: Update. 2007-09-01 10:55:42 +00:00
Ralf Wildenhues
4fd2348691 * libltdl/ltdl.c (trim): Fix possible write beyond array bound. 2007-09-01 10:49:19 +00:00
Ralf Wildenhues
361ec0ead5 * libltdl/ltdl.c (lt_dlopenadvise): Instead of asserting, return
FILE_NOT_FOUND if the filename is "".
2007-09-01 10:43:28 +00:00
Ralf Wildenhues
86a2c620c8 * libltdl/ltdl.c (try_dlopen): Fix computation of extension,
avoids subtracting pointer from NULL pointer.
2007-09-01 10:42:34 +00:00
Ralf Wildenhues
8dbd989470 * libltdl/ltdl.c (try_dlopen, lt_dlforeachfile): Do not test
array address of sys_dlsearch_path against NULL, rather test for
nonempty contents.
Coverity reports CID 148 and CID 149 via Jeff Squyres.
2007-09-01 08:13:20 +00:00
Ralf Wildenhues
fbbe0e88e4 * libltdl/ltdl.c (tryall_dlopen_module): Fix string length
computation: do not allocate more than needed.
2007-09-01 08:10:02 +00:00
Ralf Wildenhues
9b115eaaa6 * libltdl/loaders/preopen.c (vm_close): `module' is unused.
Coverity report CID 158 via Jeff Squyres.
2007-08-30 18:39:10 +00:00
Ralf Wildenhues
f7b428d2d9 * libltdl/ltdl.c (parse_dotla_file): If we run out of memory,
do not close the .la file twice.
Coverity report CID 440 via Jeff Squyres.
2007-08-30 18:23:24 +00:00
Ralf Wildenhues
56e12a2db6 * libltdl/ltdl.c (has_library_ext): Remove dead code.
Coverity report CID 561 against Open MPI via Jeff Squyres.
2007-08-30 18:18:31 +00:00
Ralf Wildenhues
208dd66070 * libltdl/slist.c (slist_remove): When a matching item is found,
break out of the loop to return the first match; also fixes
possible NULL dereference.
2007-08-29 21:01:20 +00:00
Ralf Wildenhues
1e63751c04 * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LINKER_SHLIBS)
(_LT_LANG_CXX_CONFIG) [ linux ]: Add support for IBM XL 8.0
C/C++ (xlc*, xlC*) and IBM XL Fortran 10.1 (xlf*) on GNU/Linux,
tested on ppc, pending a $shlibpath_var related fix.
(_LT_SYS_HIDDEN_LIBDEPS): Double-quote $output_verbose_link_cmd
properly during evaluation, obsoleting $no_glob_subst mangling.
* NEWS: Update.
2007-08-29 20:54:53 +00:00
Ralf Wildenhues
134fc3083b * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [ linux ]
[ k*bsd*-gnu ] <shlibpath_overrides_runpath>: Avoid spurious
output in runpath test.
2007-08-18 09:18:44 +00:00
Ralf Wildenhues
b4f7879633 * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC) [ mingw, cygwin ]
<GCJ>: Do not use -DDLL_EXPORT.
Report by Ross Ridge <rridge@csclub.uwaterloo.ca>.
2007-08-16 18:22:03 +00:00
Ralf Wildenhues
a26314cfd8 * Makefile.am (edit): Do not warn against manual editing for the
generated files libtool, libtoolize, libltdl/m4/ltversion.m4,
tests/defs, as they are still in a preferred source code form as
required by GPL.
Report by DJ Delorie.
2007-08-16 18:18:39 +00:00
Dirk Mueller
f5df807204 * libltdl/ltdl.c (parse_dotla_file): Avoid a strlen. When
reading .la files, cope with files that are not
newline-terminated.
2007-08-15 21:38:31 +00:00
Tilman Koschnick
713e2ae052 * libltdl/m4/libtool.m4 (_LT_COMPILER_PIC, _LT_LANG_CXX_CONFIG)
[ linux ]: Treat pgcpp as Portland Group C++ compiler as well.
2007-08-05 11:44:44 +00:00
Ralf Wildenhues
2e54f75846 * libltdl/ltdl.c (try_dlopen): Use `attempt' rather than
`filename', as the former has the needed extension when called
by lt_dlopenext.
Report by Brian Barrett.
2007-08-05 11:06:14 +00:00
Peter Rosin
8b8688e3ee * Makefile.am: Pass STRIP through to the testsuite, so that
tests that run configure will use the same strip program.
2007-07-26 22:44:39 +00:00
Ralf Wildenhues
28be809ea3 * tests/mdemo-exec.test: Also try absolute library names.
* tests/mdemo/main.c (test_dl, main): Try lt_dlopenext as well.
* THANKS: Update.
Report by Brian Barrett.
2007-07-24 05:10:03 +00:00
Ralf Wildenhues
6baa7daaf3 * ChangeLog: Fix typo. 2007-07-24 03:44:24 +00:00
Ralf Wildenhues
c0f72e1d8d Update all mention of FDL to 1.2. 2007-07-23 22:35:29 +00:00
Ralf Wildenhues
0a0134c0fc * doc/fdl.texi: Update to GFDL 1.2.
* doc/libtool.texi: Adjust.  Put License in Appendix.
2007-07-23 22:33:12 +00:00
Ralf Wildenhues
be2de73790 * libltdl/config/ltmain.m4sh (func_mode_link): Remove each
intermediate relinked object after use, to avoid quadratic space
complexity when linking partially.
Report by Isidor Zeuner <eezyy@gmx.net>.
2007-07-23 17:46:28 +00:00
Eric Blake
a54fca4ff1 Fix ChangeLog entry. 2007-07-23 17:44:35 +00:00
Eric Blake
310551c9c4 * libltdl/config/ltmain.m4sh: Whitespace cleanup. 2007-07-23 12:23:27 +00:00
Eric Blake
0c71a62ede * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src:
chase_symlinks): Avoid compiler warning.
2007-07-23 12:10:31 +00:00
Peter Rosin
781fc82e1b * libltdl/config/ltmain.m4sh (func_emit_cwrapperexe_src): Add
support for Microsoft Visual C. Also, older MinGW versions
seem to need stdint.h to find intptr_t.
2007-07-22 17:57:10 +00:00
Ralf Wildenhues
b3251f4d7e * libltdl/m4/libtool.m4 (_LT_SYS_DYNAMIC_LINKER) [linux]:
Ignore lines in ld.so.conf starting with 'hwcap '.
2007-07-22 08:55:11 +00:00
Charles Wilson
3c72a3a00d * tests/cdemo-exec.test: use $EXEEXT where appropriate
to correct mingw cross-compile issues.
* demo-deplibs.test: Ditto.
* demo-exec.test: Ditto.
* demo-inst.test: Ditto.
* demo-relink.test: Ditto.
* depdemo-exec.test: Ditto.
* depdemo-inst.test: Ditto.
* depdemo-relink.test: Ditto.
* f77demo-exec.test: Ditto.
* fcdemo-exec.test: Ditto.
* mdemo-exec.test: Ditto.
* mdemo-inst.test: Ditto.
* mdemo2-exec.test: Ditto.
* pdemo-exec.test: Ditto.
* pdemo-inst.test: Ditto.
* tagdemo-exec.test: Ditto.
2007-07-16 22:53:06 +00:00
Peter Rosin
8623a050c8 * AUTHORS, THANKS: Peter Ekberg got married, now Peter Rosin. 2007-07-14 18:46:19 +00:00
Charles Wilson
f88b089413 * libltdl/m4/libtool.m4 (func_dirname_and_basename) <XSI>:
New function.
(func_dirname_and_basename) <!XSI>: New function.
* libltdl/config/ltmain.m4sh (func_ltwrapper_scriptname):
Call it.  Also, take advantage of missed optimization using
func_dirname's additional arguments.
(func_mode_compile): Call it.
(func_mode_install): Call it.
(func_mode_link): Call it.
2007-07-13 07:21:39 +00:00
Peter Rosin
5a3cf05510 * libltdl/config/ltmain.m4sh (func_mode_link): Strip the cwrapper
using $STRIP instead of relying on the tools to support -s, which
MSVC doesn't.
2007-07-12 06:47:06 +00:00
Peter O'Gorman
688e0a551c * libltdl/config/libtool.m4sh: Don't pass -msg_* through to the
linker.
Reported by Bob Friesenhahn  <bfriesen@simple.dallas.tx.us>
2007-07-07 05:09:10 +00:00
Bob Friesenhahn
7429314926 * libltdl/lt__alloc.c, libltdl/loaders/preopen.c,
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.
2007-07-04 23:05:05 +00:00
Eric Blake
59bc6b59d0 * libltdl/ltdl.c (advise_dup): Delete function no longer used
after memleak fix three days ago.
2007-07-04 21:28:00 +00:00
Ralf Wildenhues
c177a30000 * libltdl/m4/libtool.m4 (_LT_ENABLE_LOCK) [ solaris ]: Cater to
old Sparc Solaris 7 ld that does not understand `-64'.
Report by Vincent Lefevre <vincent@vinc17.org>.
2007-07-03 05:09:40 +00:00
Ralf Wildenhues
35526d6c64 * libltdl/m4/lt~obsolete.m4 (LTOBSOLETE_VERSION): New macro, to
force-pull in this file by aclocal.
* libltdl/m4/libtool.m4 (LT_INIT): Require LTOBSOLETE_VERSION.
* tests/libtoolize.at (upgrading verbatim style aclocal.m4):
Adjust.
Report by H. J. Lu <hjl@lucon.org>.
2007-07-01 20:55:13 +00:00
Ralf Wildenhues
3679372cbb * libltdl/ltdl.c (tryall_dlopen): Rename argument to have typed
alias of `advise' instead of allocating a copy.  Fixes memleak.
2007-07-01 06:12:46 +00:00
Peter Breitenlohner
ffcd2881d3 * libltdl/m4/libtool.m4 (LT_SYS_DLOPEN_SELF): Correct a typo
("-dld" instead of "-ldld").
2007-06-30 09:31:28 +00:00
Gary V. Vaughan
a894e3baee Add a test to simulate a failure visible on systems which
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.
2007-06-24 20:46:47 +00:00
Gary V. Vaughan
e6e96742ef Reenable compilation of libltdl with C++:
* libltdl/ltdl.c (tryall_dlopen): Rename the try variable to
attempt, and cast explicitly.
(advise_dup): Add explicit cast.
2007-06-24 19:05:46 +00:00
Peter O'Gorman
4b008019bc * libltdl/config/ltmain.m4sh (version-number) [irix]: Don't subtract
1 from major as it may be less than age.
2007-06-22 06:21:03 +00:00
Noah Misch
27c76a8994 * tests/f77demo/configure.ac [--with-dist]: New option. Skip most
Fortran checks when given.
* tests/fcdemo/configure.ac [--with-dist]: Likewise.
* Makefile.am (@DIST_MAKEFILE_LIST@): Pass --with-dist.
Reported by Benoit Sigoure <tsuna@lrde.epita.fr>.
2007-06-21 19:02:36 +00:00
Charles Wilson
91a80d8bb3 * AUTHORS: Add myself. 2007-06-19 06:22:02 +00:00
Charles Wilson
f9137c1440 * libltdl/config/ltmain.m4sh: Add new magic variable
for use with cwrapper.
(func_ltwrapper_script_p): New function.
(func_ltwrapper_executable_p): New function.
(func_ltwrapper_scriptname): New function.
(func_ltwrapper_p): Accomodate both wrapper scripts and
wrapper executables.
(func_mode_execute): Handle $file that is a wrapper
script and $file that is a wrapper executable differently.
(func_mode_install) [cygwin|mingw]: If $file is a wrapper
executable, use func_ltwrapper_scriptname to determine
wrapper script name. Afterwards, always use
func_ltwrapper_script_p instead of func_ltwrapper_p.
(func_emit_libtool_wrapper_script): Rename to...
(func_emit_wrapper): ...this. All callers changed.
(func_emit_libtool_cwrapperexe_source): Rename to...
(func_emit_cwrapperexe_src): ...this. All callers changed.
Embed new magic_exe variable into source. Private transient
wrapper script now called foo_ltshwrapperTMP, not
foo_ltshwrapper.
(func_emit_cwrapperexe_src) [main, mingw]: Use _spawnv
and return child's exit code manually rather than rely on
broken execv.
(func_mode_link) [cygwin|mingw]: Don't call dirname and
basename directly; use func_dirname and func_basename
when computing cwrapper names.  Use cwrapper to generate
wrapper script, and use pathname returned by
func_ltwrapper_scriptname instead of $output.
(func_mode_link) [NOT cygwin|mingw]: move wrapper script
generation for non-win32 inside case statement, as default
case.
(func_mode_uninstall) [$name's extension != .lo|.la]:
'clean' mode must handle $file differently if it is a libtool
wrapper script, or if it is a libtool wrapper executable.
* tests/destdir.at [Simple DESTDIR install]: $EXEEXT fixups.
* tests/destdir.at [DESTDIR with in-package deplibs]: Ditto.
2007-06-19 05:43:16 +00:00
Noah Misch
691ddc8da2 * AUTHORS: Add myself. 2007-06-18 03:49:19 +00:00
Peter O'Gorman
b91bf57ce1 * libltdl/m4/libtool.m4 (LT_CMD_MAX_LEN): add quotes to
the test -n.
2007-06-18 02:07:22 +00:00