Commit Graph

194 Commits

Author SHA1 Message Date
Gary V. Vaughan
cb2c3d2ed8 Libtool now builds with the help of Autoconf-2.50!
* configure.ac (AC_PREREQ):  Require Autoconf-2.50 or newer.
(AC_PROG_CPP, AC_EXEEXT, AC_OBJEXT):  Removed.  Autoconf-2.50
doesn't have the AC_REQUIRE bug that required these to be called
explicitly from here.  Autoconf-2.50 uses this file instead of...
* configure.in: ...this, which is now deleted.
* cdemo/configure.ac, cdemo/configure.in: Ditto.
* demo/configure.ac, demo/configure.in: Ditto.
* depdemo/configure.ac, depdemo/configure.in: Ditto.
* libltdl/configure.ac, libltdl/configure.in: Ditto.
* mdemo/configure.ac, mdemo/configure.in: Ditto.
* pdemo/configure.ac, pdemo/configure.in: Ditto.
* libltdl/acconfig.h:  Deleted.
* Makefile.am (libtool): libtool now depends on configure.ac.
* libtool.m4 (_LT_AC_LOCK):  Use 2.50's AC_LANG_PUSH/AC_LANG_POP
instead of 2.13's AC_LANG_SAVE/AC_LANG_RESTORE.
(AC_LIBTOOL_LANG_C_CONFIG): Ditto.
(AC_LIBTOOL_LANG_CXX_CONFIG): Ditto.
* libtoolize.in:  Use $configure_ac, instead of hardcoding
configure.in.
2001-06-28 22:02:06 +00:00
Gary V. Vaughan
2d0b02d866 * NEWS: Updated.
* libltdl/ltdl,c (LT_DLMUTEX_LOCK): Renamed from MUTEX_LOCK to
avoid potential namespace clash.
(LT_DLMUTEX_UNLOCK, LT_DLMUTEX_SETERROR, LT_DLMUTEX_GETERROR):
Ditto.
(lt_dlmutex_lock_func): Renamed from mutex_lock to avoid a
namespace clash of NCR MP-RAS.
(lt_dlmutex_unlock_func, lt_dlmutex_seterror_func,
lt_dlmutex_geterror_func): Ditto.
Reported by Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
2001-06-26 01:37:48 +00:00
Gary V. Vaughan
f2b86e159b * libltdl/ltdl.c (LT_DLSTRLEN): Call strlen only if the argument
is non-NULL and non-zero in length.  Changed all calls to strlen
appropriately.
2001-06-26 01:06:00 +00:00
Gary V. Vaughan
62216889fc * libltdl/ltdl.c: Prototype all static functions. 2001-06-26 00:53:37 +00:00
Gary V. Vaughan
6c7f7fe214 * ltdl.m4: Bump serial number to 3.
(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.
2001-06-26 00:50:39 +00:00
Gary V. Vaughan
7396e09d88 * libtool.m4, ltmain.in, libltdl/configure.in,
tests/quote.test:  Remove stale references to ltconfig.
2001-04-24 23:22:35 +00:00
Gary V. Vaughan
fb267cab4e * ltdl.m4 (AC_C_INLINE): No longer required.
* libltdl/ltdl.c (strdup, strcmp, strchr, strrchr, memcpy, trim,
free_vars):  Revoke inline keyword from declarations.  `static
inline' is not very portable, and in addition Unixware 7.1.1's
compiler says you can't access static variables from inline
functions.
Reported by Peter Eisentraut  <peter_e@gmx.net>
2001-04-24 22:53:48 +00:00
Peter Eisentraut
3a75446c04 * doc/PLATFORMS: With this patch, freebsd4.3 passes the test
suite.
* libltdl/ltdl.c (lt_dlexit): Quit loop if only resident modules
are left.
2001-04-23 21:16:38 +00:00
Gary V. Vaughan
3050795c98 * ltdl.m4 (AC_CHECK_HEADERS): UW7 has sys/dl.h, so we must
check for that here.
* libltdl/ltdl.c (HAVE_SYS_DL_H):  Include it if necessary for
the dlopen loader.
Reported by Matthew Schalit <mschalit@pacbell.net>
2001-04-22 22:50:54 +00:00
Alexandre Oliva
69355e247f formatting change 2001-04-16 20:39:44 +00:00
Gary V. Vaughan
c0b7dcf2f9 * libltdl/ltdl.c (sys_shl_open): Cache a handle for the `self'
module, since HPUX adds module symbols into the `self' pool if
it is opened later.  Return the cached pointer if the caller
subsequently tries to open `self'.
(sys_shl_sym): Diagnose NULL modules.
2001-04-08 10:34:45 +00:00
Gary V. Vaughan
1d08896a95 From Ahmed Masud <masud@googgun.com>
* libltdl/ltdl.c (sys_shl_open):  Return a NULL module handle
for self opening.
(sys_shl_close):  Be careful not to close a NULL module handle.
(sys_shl_sym):  Allow shl_findsym() to open NULL modules, but
discard the modified module address it returns.
2001-04-05 22:05:49 +00:00
Gary V. Vaughan
da8bfb3dee * libltdl/ltdl.c (lt_dlopen): When reading the .la file,
reallocate the line buffer size if the line overflows the
original buffer.
Reported by Nick Hudson <skrll@netbsd.org>
2001-04-05 21:32:49 +00:00
Edward M. Lee
d35d97b0af * libltdl/ltdl.c: Use windows paths while calling LoadLibrary. 2001-03-31 00:12:41 +00:00
Gary V. Vaughan
066ce19719 * NEWS: Updated.
* 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.
2001-02-23 22:58:20 +00:00
Gary V. Vaughan
b37d4417e5 * libltdl/ltdl.c (lt_dlcaller_register): dont set an unsigned
type to a negative number.
Reported by Guenter Millahn <Guenter.Millahn@Informatik.TU-Cottbus.DE>
2001-02-20 01:51:50 +00:00
Gary V. Vaughan
230d659fcc * libltdl/ltdl.c (load_deplibs): Make sure the depcount is reset,
even when deplibs are not used because of the patch below.
2001-02-02 20:38:53 +00:00
Gary V. Vaughan
482d62add6 * ltdl.m4 (AC_LTDL_SYS_DLOPEN_DEPLIBS): If we know that the host
architecture automatically loads deplibs, then...
* libltdl/ltdl.c (load_deplibs): ...don't manually load each one.
2001-02-02 19:02:38 +00:00
Gary V. Vaughan
2b9f5eb2b4 * libltdl/ltdl.c (load_deplibs): If loading a deplib fails,
don't sweat -- it may be a lib that is already statically linked
into the loading application.

* libltdl/ltdl.c: Clean up the shadowing of the global handles
variable.
(LT_DLRESIDENT_FLAGS): Add extra parens to satisfy -Wall.
(load_deplibs):  Cast isspace() argument to an int to satisfy
-Wall.
2001-01-31 00:07:32 +00:00
Alexandre Oliva
679fb05bf2 * libltdl/Makefile.am (CLEANFILES): Clean conditionally-built
libraries.
2001-01-29 02:01:41 +00:00
Gary V. Vaughan
61510e8475 * NEWS: Updated.
* doc/libtool.texi (User defined module data): Updated.
* libltdl/ltdl.c (lt_dlhandle_next): New function.
* libltdl/ltdl.h (lt_dlhandle_next): Prototypes.
2001-01-08 01:52:12 +00:00
Gary V. Vaughan
bd96d1928a * NEWS: Updated.
* 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.
2001-01-05 09:33:39 +00:00
Gary V. Vaughan
c821715109 * libltdl/ltdl.h: formatting change. 2001-01-04 22:06:11 +00:00
Gary V. Vaughan
22218cc780 * libltdl/ltdl.c (lt_dlexit): Was checking for residency of the
wrong module.
Reported by Robert Boehne  <rboehne@ricardo-us.com>
2000-12-20 23:50:09 +00:00
Utz-Uwe Haus
6da151bd3c * libltdl/ltdl.c (lt_dlopen): Changed "dl_dependency_libs" keyword
to "dependency_libs".
2000-12-16 01:09:44 +00:00
Tod Milam
2c856a4196 * libltdl/ltdl.c (lt_dlexit): Reset the loaders value to zero when
the last module has been unloaded.
2000-12-14 21:08:03 +00:00
Gary V. Vaughan
4ae2e67203 * doc/libtool.texi (Libltdl interface): Add documentation.
* 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.
2000-12-02 23:50:54 +00:00
Gary V. Vaughan
c2cc89dcb2 * libltdl/ltdl.h (lt_dlhandle): Rename the wrapped structure
to prevent nameclash when used from C++.
* libltdl/ltdl.c: Fixed all references.
2000-11-29 22:59:56 +00:00
Gary V. Vaughan
ccee1e498a * libltdl/ltdl.c (lt_dlopen): Change the default search order
for modules.  If the named module has no directory component,
always start the search with the user_search_path directories,
and then fall back on the current directory only if that fails.
2000-11-29 01:33:24 +00:00
Gary V. Vaughan
99daa5464b * libltdl/Makefile.am (libltdl_la_LDFLAGS): increment the version
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.
2000-11-21 08:53:34 +00:00
Gary V. Vaughan
e637d738c9 * ltdl.c: Relegate non-POSIX-compliant symbols (e.g. those
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.
2000-11-19 01:23:17 +00:00
Gary V. Vaughan
223e9ede2f * ltdl.c: Reformatted.
* ltdl.h: ditto.
2000-11-17 18:44:28 +00:00
Alexandre Oliva
6aa6b1b1d9 * libltdl/ltdl.c (load_deplibs): Don't append shlib_ext; use
lt_dlopenext() instead.
2000-09-04 06:09:25 +00:00
Alexandre Oliva
c82ec3eb1c * libltdl/ltdl.c (lt_dlopen): Set dlname from library_names if
dlname is empty.
2000-09-04 01:52:34 +00:00
Ken Block
f523ce38f8 * libltdl/ltdl.h: Also check for __cplusplus, __STDC__ is not
by Compaq C++ compiler
2000-07-10 07:17:35 +00:00
Thomas Tanner
264e859d07 * NEWS: update
* doc/libtool.texi (libltdl): rename lt_(find|next|add|remove)_dlloader
  to lt_dlloader_*
* libltdl/ltdl.c: ditto
* libltdl/ltdl.h: ditto, add declaration of lt_dlloader_(find|remove)
2000-05-11 15:17:27 +00:00
Pavel Roskin
94022a0210 * libltdl/ltdl.c: Typo. 2000-05-06 10:46:49 +00:00
Paul Sokolovsky
c8eefcf574 * ltdl.c: support lt_dlopen(0) for win32 2000-05-05 02:31:48 +00:00
Thomas Tanner
508df1487b * NEWS: reformatting
* ltmain.in (ILD): add extra convenience library scanning pass

* ltmain.in (ILD): accept -R flags for libraries, too

* ltmain.in (ILD): correclty merge the dlpreopened libraries
  with deplibs

* ltmain.in (install mode): remove directories from filenames
  before relinking (reported by Elrond <Elrond@Wunder-Nett.org>)

* doc/libtool.texi (libltdl): rename Library -> Lesser,
  clarify exception clause
* libltdl/ltdl.c, libltdl.h (License): ditto
2000-03-26 23:01:20 +00:00
Gary V. Vaughan
e884b6d673 * libltdl/ltdl.c (lt_find_dlhandle): Deleted. This was B.S.
far cleaner to use lt_dlforeach and lt_dlgetinfo.
* libltdl/ltdl.h:  Prototype deleted.
* doc/libtool.texi: Documentation deleted.
* NEWS: annoncement deleted.
2000-02-24 02:15:35 +00:00
Gary V. Vaughan
65e997bb2c * libltdl/ltdl.c (lt_find_dlhandle): New function.
(tryall_dlopen): Use it.
* libltdl/ltdl.h:  Prototype it.
* doc/libtool.texi: Document it.
* NEWS: updated.
2000-02-21 22:27:24 +00:00
Gary V. Vaughan
b87267f513 * libltdl/ltdl.c (lt_remove_dlloader): typo, s/=/==/g. 2000-02-21 22:09:36 +00:00
Gary V. Vaughan
7b0532e642 * libltdl/ltdl.c (lt_dlinit): removed unused variable, `loader'. 2000-02-21 22:03:16 +00:00
Gary V. Vaughan
2ca76b52bd * libltdl/ltdl.h (lt_dlloader_data_t): New type for loader
instance data.
(lt_user_dlloader): New lt_dlloader_data_t field.
(lt_module_open_t): Add lt_dlloader_data_t parameter.
(lt_module_close_t): Add lt_dlloader_data_t parameter.
(lt_find_sym_t): Add lt_dlloader_data_t parameter.
(lt_dlloader_exit_t): Add lt_dlloader_data_t parameter.
* libltdl/ltdl.c:  A sprinkling of /*ARGSUSED*/ markers to
reassure lint that the unused arguments are intentional.
(lt_dlloader_t): New lt_dlloader_data_t field.
(lt_dlloader_data): New function to return the contents of the
dlloader_data field.
(sys_dl_open): Take an additional lt_dlloader_data_t argument.
(sys_dl_close): Ditto.
(sys_dl_sym): Ditto.
(sys_dl): Initialise lt_dlloader_data_t field.
(sys_shl_open, sys_shl_close, sys_shl_sym, sys_shl): As above.
(sys_wll_open, sys_wll_close, sys_wll_sym, sys_wll): As above.
(sys_bedl_open, sys_bedl_close, sys_bedl_sym, sys_bedl): As
above.
(sys_dld_open, sys_dld_close, sys_dld_sym, sys_dld): As above.
(presym_init, presym_exit, presym_open, presym_close, presym_sym,
presym): As above.
(lt_dlinit): Call presym_init with additional argument.
(lt_dlexit): Call dlloader_exit method with additional argument.
(tryall_dlopen): Call module_open method with additional argument.
(lt_dlclose): Call module_close method with additional argument.
(lt_dlsym): Call find_sym method with additional argument.
(lt_add_dlloader): Initialise dlloader_data field.
(lt_remove_dlloader): Call dlloader_exit method with additional
argument.
2000-02-07 18:17:21 +00:00
Gary V. Vaughan
9218f3bcc2 * libltdl/ltdl.c (find_file): Prevent early release of memory
in filename/*pdir.
From Jon Leichter <jon@symas.com>
2000-02-03 12:54:29 +00:00
Gary V. Vaughan
ade92ab63b (sys_wll_init): Deleted. No longer required. And this time,
with feeling!
(sys_wll_exit): Ditto.
2000-02-03 12:33:06 +00:00
Gary V. Vaughan
f802484346 * NEWS: updated.
* 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.
2000-02-02 22:43:14 +00:00
Thomas Tanner
112b7cb29f * libltdl/ltdl.c: replace NULL with 0, remove unused system
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
2000-02-02 10:05:42 +00:00
Gary V. Vaughan
4d1f56497a * libltdl/ltdl.h (lt_dlrealloc): removed declaration.
* libltdl/ltdl.c (lt_dlrealloc): removed definition.
(lt_dladderror): Instead of calling lt_dlrealloc, use lt_dlmalloc,
and lt_dlfree.
2000-01-31 10:40:12 +00:00
Gary V. Vaughan
e9898ee435 * libltdl/ltdl.h (lt_dlrealloc): Added declaration.
* libltdl/ltdl.c (lt_dlrealloc): Added default definition.
2000-01-28 14:26:40 +00:00