Commit Graph

194 Commits

Author SHA1 Message Date
Alexandre Oliva
61b5e233b4 added acinclude.m4 1999-03-14 05:43:03 +00:00
Thomas Tanner
61bb801686 * libltdl/ltdl.c: removed FILENAME_MAX since LTDL_FILENAME_MAX
is sufficient and doesn't break HP/UX
1999-03-12 20:47:44 +00:00
Alexandre Oliva
c7c23418fd * */configure.in: AC_SUBST(LIBTOOL_DEPS)
* */Makefile.am $(OBJECTS): depend on libtool
(libtool): rebuild automatically
1999-03-11 21:28:36 +00:00
Alexandre Oliva
50b30fa4d5 * libltdl/ltdl.c (strdup): cannot return str when it's NULL
because of const correctness
1999-03-11 03:14:54 +00:00
Alexandre Oliva
b96c596a21 * libltdl/ltdl.c (strdup): always use our own, because the
standard strdup won't use lt_dlmalloc
1999-03-11 02:50:13 +00:00
Alexandre Oliva
477712665e * libltdl/configure.in (libltdl_cv_need_uscore): do not assume
dlfcn.h and LTDL_LAZY exist; use LTDL_GLOBAL and LTDL_LAZY_OR_NOW.
This test is likely to fail if self-dlopening does not work,
especially because we do not link the program with
-export-dynamic.  Let's just hope that platforms whose symbol
names start with underscores will also accept underscores for
dlopen.  We should probably use libtool to compile and link this
test, so that we can use -export-dynamic.
1999-03-11 00:58:19 +00:00
Alexandre Oliva
ec1c9b7646 * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE):
avoid introducing multiple --enable options when re-running
config.status
* libltdl/configure.in: if enable_ltdl_* is not set, assume no
* configure.in: if enable_ltdl_install is not set, enable it
1999-03-10 21:23:37 +00:00
Alexandre Oliva
6862fbcb71 * libltdl/configure.in: only assume implicit installation if
libltdl was libtoolized.  If not, print a warning message
suggesting the use of --enable-ltdl-install or of one of the
AC_LIBLTDL_* macros.
1999-03-10 20:39:03 +00:00
Thomas Tanner
c7e268df7d * configure.in: fix spacing for --disable-ltdl-install,
always configure libltdl, add libltdl/acinclude.m4 to
  ACINCLUDE_M4_LIST, disable installation of libltdl if necessary
* libltdl/Makefile.am: set version info for libltdl.la
* libltdl/configure.in: don't check whether
  enable_ltdl_convenience/install was set so that libltdl
  can be used as independent package (libltdl.tar.gz) without
  the need to use --enable-ltdl*
* libltdl/ltdl.c: minor cleanups, allocate the line cache
  dynamically (lt_dlopen)
1999-03-10 16:16:03 +00:00
Alexandre Oliva
6e60d47735 * libltdl/ltdl.c (lt_dlopen): some preprocessors choke if the `#'
of `#define' is not in column 1; let's go back to fortran! :-)
Add #undefs too, to avoid potential warnings or errors.
1999-03-10 14:33:22 +00:00
Alexandre Oliva
ed604d082d * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE):
renamed convenience libltdl, dropped toinst hack for installable
* libltdl/Makefile.am: ditto
* libltdl/configure.in: ditto; abort if none of the macros is used
1999-03-09 23:09:01 +00:00
Thomas Tanner
adf5912c04 * libltdl/ltdl.c (lt_dlopen): don't hardcode the length of the
constant strings
1999-03-09 23:00:24 +00:00
Alexandre Oliva
68799c0077 * libtool.m4 (AC_LIBLTDL_INSTALLABLE, AC_LIBLTDL_CONVENIENCE):
new macros
* NEWS: ditto
* libltdl/configure.in: if none of the new macros or configure
arguments are used, warn and build convenience library only
* libltdl/Makefile.am: conditionally build convenience libltdl.la
* mdemo/configure.in: use AC_LIBLTDL_CONVENIENCE
* mdemo/Makefile.am: refer to @LIBLTDL@
1999-03-09 22:02:09 +00:00
Alexandre Oliva
c61f3ded62 * libltdl/Makefile.am (@TOINST@/libltdl.la): do not hide the
command that creates the TOINST directory; remove `-o $@' from the
LINK command, $(LINK) already contains it.
1999-03-08 18:20:26 +00:00
Alexandre Oliva
a78b093478 * libltdl/Makefile.am, libltdl/configure.in, mdemo/Makefile.am:
libltdl must not be renamed; if there's a problem with the install
option, let's fix it, not just work around it by breaking code of
users of the convenience library
1999-03-08 17:40:42 +00:00
Thomas Tanner
0984f95203 * TODO: updated (libltdl build problem fixed)
* doc/libtool.texi (libltdl interface): removed the line which
  promised that lt_dlopen will return NULL if it can't resolve all
  symbols
* libltdl/Makefile.am, libltdl/configure.in: fixed build problem:
  renamed the convenience library to libltdlc.la and the
  installed version to libltdl.la
* ltmain.in (wrapper script): replaced the "T" suffix of the program
  file name with a "lt-" prefix
* mdemo/Makefile.am: use libltdlc.la
* tests/Makefile.am, tests/demo-nofast.test: added demo to
  test --enable-fast-install=no
1999-03-08 15:56:45 +00:00
Alexandre Oliva
ae8fc72897 * libltdl/ltdl.c (LTDL_LAZY_OR_NOW): renamed from LTDL_NOW; prefer
LAZY loading because it's much faster and NOW is apparently
partially broken on FreeBSD
Reported by Archie Cobbs <archie@whistle.com>
1999-03-06 20:24:57 +00:00
Thomas Tanner
11cb604bc9 * TODO: added items for next alpha release, ILD etc.
* libltdl/ltdl.c: removed unnecessary check from presym_sym,
  fixed bug in lt_dlclose, allow lt_dlopenext(NULL),
  set deplibs for lt_dlopen(NULL)
1999-02-25 06:46:55 +00:00
Alexandre Oliva
f95e55ad09 * libltdl/configure.in: check for dld.h
* libltdl/ltdl.c: include dld.h
(dld_open) it's spelled memory_error, not no_memory_error
Reported by Stefan Burstroem <f94sbu@efd.lth.se>
1999-02-22 19:24:55 +00:00
Thomas Tanner
b965590d78 * libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle
when dlopening the executable
* libtool.m4 (AC_LIBTOOL_DLOPEN): removed the redundant "yes: "
  prefix for lt_cv_dlopen, renamed lt_cv_dlopen_LIBS
  to lt_cv_dlopen_libs (more consistent)
* ltmain.in: implemented -dl[pre]open self, necessary for
  lt_dlopen(NULL), generation of exported symbols was broken
1999-02-21 15:38:02 +00:00
Archie Cobbs
7666c21afd * libltdl/ltdl.c (lt_dlopen): use newhandle instead of handle
where appropriate, when dlopening a non-libtool library
1999-02-20 05:23:31 +00:00
Alexandre Oliva
e906347209 * libltdl/ltdl.c (lt_dlmalloc, lt_dlfree): SunOS' cc can't cope
with argument lists, we __P even in the definition
1999-02-17 11:56:27 +00:00
Thomas Tanner
c361d1cfeb * cdemo/Makefile.am: renamed *foo1 to *foo, removed $(MATH_LIB)
* 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)
1999-02-15 16:46:55 +00:00
Alexandre Oliva
e578da5e16 * libltdl/configure.in: add a DESCRIPTION argument to AC_DEFINEs
where appropriate, so as to get rid of acconfig.h
* libltdl/acconfig.h: removed
1999-02-13 19:55:58 +00:00
Thomas Tanner
6d34bd85f0 * *demo/Makefile.am: use $(MATHLIB)
* *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
1999-02-13 15:43:04 +00:00
Gary V. Vaughan
ec379bc0dc * libltdl/ltdl.h (_LTDLL_EXTERN): libltdl is no longer linked as a
shared library, so the _declspec's were preventing the linker from
resolving symbols on win32.  They have been removed now.
1999-02-12 17:35:39 +00:00
Alexandre Oliva
b37f61a8d4 * libltdl/ltdl.c (tryall_dlopen): strcmp filenames was reversed 1999-02-12 12:59:32 +00:00
Thomas Tanner
c8b71d5f7f added automake stamp files 1999-02-12 12:56:06 +00:00
Thomas Tanner
b35a0be8c3 added acconfig.h 1999-02-11 23:50:17 +00:00
Thomas Tanner
17915a088c * autogen: libltdl needs autoheader
* demo/Makefile.am: renamed hell.debug to hell.static
  (we're demonstrating static linking, not debugging)
* tests/demo*: ditto
* doc/libtool.texi (libltdl): documented new lt_dlopen(NULL)
  feature
* libltdl/acconfig.h: required for config.h
* libltdl/configure.in: use config.h
* libltdl/ltdl.c: use config.h, support lt_dlopen(NULL)
  (returns a handle for the program itself)
* ltconfig.in: minor reformatting
* ltmain.in: in lt_preloaded_symbols always define
  the program's symbols first, for -export-dynamic list all
  program symbols together, -export-symbols was broken for
  programs, minor reformatting
* mdemo/Makefile.am: renamed mdemo.debug to mdemo.static
* tests/mdemo*: ditto, mdemo.test was completely broken
1999-02-11 23:48:25 +00:00
Alexandre Oliva
54ee3fb2b1 * libtool.m4 (ac_cv_sys_global_symbol_pipe): accept TAB in
addition to space as separator, and allow more than one space
between the symbol code and the symbol name; HP/UX's nm, for
example, uses two spaces
* ltconfig.in (global_symbol_pipe): ditto
(bsdi4, deplibs_check_method): variable name was misspelled
* libltdl/configure.in (libltdl_cv_preloaded_symbols): rewrite
test, so as not to depend on the way global_symbol_pipe is
initialized; the current test would get false positives, as
global_symbol_pipe was initialized `x=""', not `x='
1999-02-04 15:09:14 +00:00
Alexandre Oliva
425940e0ab * libltdl/ltdl.c (find_module): initialize filename if dir is NULL
Reported by Godmar Back <gback@cs.utah.edu>

1999-02-04  Godmar Back  <gback@cs.utah.edu>

* libltdl/ltdl.c (lt_dlopenext): missing space for terminator when
allocating memory for shlib_ext
1999-02-04 12:39:24 +00:00
Alexandre Oliva
b579b04417 * ltdl.c (lt_dlopenext): tmp would be trashed if shlib_ext was
longer than 3 characters
1999-02-03 07:55:40 +00:00
Alexandre Oliva
0e57eec185 * libltdl/ltdl.c (find_file): fix endless loop condition
(find_module): filename allocation was off by 1
1999-01-27 07:41:15 +00:00
Alexandre Oliva
dc07a72c9a * libltdl/Makefile.am (distclean-local): renamed from
distclean-hook, that didn't work
1999-01-27 07:22:04 +00:00
Alexandre Oliva
09616d6977 * libltdl/ltdl.c (lt_dlopen, non-.la): find_file now returns 0 on
failure
1999-01-27 06:55:40 +00:00
Alexandre Oliva
e54b1b6916 * libltdl/Makefile.am (@TOINST@/libltdl.la): if installation is
enabled, create to-be-installed libltdl.la within @TOINST@
directory
(noinst_LTLIBRARIES): even if installation is enabled, build
convenience libltdl.la, otherwise builds of random packages may
fail if the user happens to enable installation
(distclean-hook): wipe out $(TOINST)
* libltdl/configure.in: set TOINST and LIBLIBS as appropriate;
don't set NOINSTLIBS any more
* mdemo/Makefile.am: use libltdl.la
1999-01-27 06:15:21 +00:00
Alexandre Oliva
bf0865ed59 * libltdl/ltdl.c (find_file): oops, filenamesize was miscomputed 1999-01-27 06:05:44 +00:00
Alexandre Oliva
c2db1b3525 * libltdl/ltdl.c (find_file): allocate filename dynamically 1999-01-27 05:42:21 +00:00
Alexandre Oliva
ad4654e94a * libltdl/configure.in (AC_PROG_LIBTOOL): automake does not
recognize it and fail, better keep using AM_PROG_LIBTOOL until the
next release of automake
* demo/configure.in, cdemo/configure.in: ditto
* depdemo/configure.in, mdemo/configure.in: ditto
1999-01-27 05:36:49 +00:00
Alexandre Oliva
77eba97d29 * libltdl/ltdl.c: make all global strings char[], not char*; check
that all calls to malloc() are properly cast
(strdup, strchr, strrchr, trim, free_vars): declare as inline
(find_module): allocate filename dynamically; support null dir
(free_vars): free dir and name only if non-null
(lt_dlopen): keep dir as NULL if not given; fix expression that
calculated the size of name; only free and name if non-null
(lt_dlopenext): allocate tmp dynamically
1999-01-27 04:31:23 +00:00
Thomas Tanner
a5f6b87d4a * cdemo/configure.in: renamed AM_PROG_LIBTOOL to AC_PROG_LIBTOOL
* demo/configure.in: likewise
* depdemo/configure.in: likewise
* libltdl/configure.in: likewise
* mdemo/configure.in: likewise
* libltdl/ltdl.c: in find_module() check whether libdir is defined,
  tryall_dlopen(): move deallocation of an already opened handle
  to lt_dlopen(), allocate the directory in lt_dlopen() dynamically,
  minor cleanups, fixed memory leak (name)
* libtool.m4: renamed all AM_ macros to AC_ and added aliases for
  compatibilty, updated AC_SYS_NM_PARSE (no undefined symbols,
  don't count the symbols)
* ltconfig.in: added thread_safe_flag_spec (not used yet),
  added generic variable for linker options "linkopts" in
  all archive_cmds
* ltmain.in: added -thread-safe flag (unused)
1999-01-27 00:49:06 +00:00
Alexandre Oliva
60d43b8236 * libltdl/ltdl.c (find_module): test old_name and dlname for NULL,
not len==0
1999-01-25 20:58:14 +00:00
Alexandre Oliva
3a2cf81834 * libltdl/configure.in (libltdl_cv_objdir): yes, appending the "/"
in configure.in was much simpler
* libltdl/ltdl.c (objdir): ditto
1999-01-25 15:59:56 +00:00
Alexandre Oliva
f1d990faa4 * libltdl/ltdl.c (objdir): string collation isn't portable; strcat
"/" explicitly.  Or should this be moved to configure.in?
1999-01-25 15:48:45 +00:00
Thomas Tanner
2ad9832810 * libltdl/ltdl.c: allocate the variables in lt_dlopen() dynamically 1999-01-25 10:54:23 +00:00
Thomas Tanner
d045d768ee * libltdl/ltdl.c: minor bugfixes, append a "/" the search
directory only if necessary
* ltconfig.in: added support for FreeBSD >= 3.0
  (patch from Kurt D. Zeilenga)
* THANKS: added Kurt D. Zeilenga
1999-01-24 20:43:52 +00:00
Thomas Tanner
05ba011011 * doc/libtool.texi (libltdl): list supported dlopen mechanisms,
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
1999-01-24 14:24:17 +00:00
Alexandre Oliva
6fffb233f1 * libltdl/ltdl.c (lt_dlopen): if we're reusing a previously opened
handle, don't reset its name nor add it to the list, and free the
name we have allocated
Reported by Edouard G. Parmelan <Edouard.Parmelan@France.NCR.COM>
1999-01-22 17:08:26 +00:00
Alexandre Oliva
981a66b4df * libltdl/configure.in: reintroduce code to detect native library
extension
* libltdl/ltdl.c (lt_dlopen): if a .la file name is given, that's
all.  Otherwise, lt_dlopen now tries to append .la first.  If this
fails, it tries the given filename, and, at last, tries to append
the native library extension to the given filename.
* doc/libtool.texi (lt_dlopen): explain new lookup strategy
1999-01-21 05:08:23 +00:00
Alexandre Oliva
24c33318ba * libltdl/ltdl.c: major rewrite to avoid almost all fixed-size
buffers; only `tmp' in lt_dlopen remained.  But the code got ugly
:-(
1999-01-21 04:27:26 +00:00
Alexandre Oliva
c50684a06e * libltdl/ltdl.c (find_module): remove the libdir argument, and
try to  open library only as old_name and dir/dlname
	(lt_dlopen): use `installed' variable in .la file to decide
	whether to use libdir or objdir
1999-01-20 13:08:50 +00:00
Alexandre Oliva
3770203057 * demo/configure.in (AC_C_CONST): added, for portability
* mdemo/configure.in (AC_C_CONST): ditto
	* libltdl/configure.in (AC_C_CONST, AC_C_INLINE): ditto
	* libltdl/ltdl.c (LTDL_FILENAME_MAX): use FILENAME_MAX if defined
	(FILENAME_MAX): replace all explicit uses with LTDL_FILENAME_MAX
	(presym_free_symlists, trim): don't return void, for portability
	(lt_dlgetsearchpath): replace (void) with __P((void))
1999-01-20 13:01:27 +00:00
Alexandre Oliva
9b0e18ca34 * libltdl/ltdl.c (lt_dlopen): properly detect error condition when
full pathname of non-libtool library is provided
1999-01-20 09:11:29 +00:00
Alexandre Oliva
8c83b51788 * libltdl/configure.in (libltdl_cv_preloaded_symbols,
HAVE_PRELOADED_SYMBOLS): test whether we support -dl*open
	* libltdl/ltdl.c (!HAVE_PRELOADED_SYMBOLS, lt_preloaded_symbols):
	define it to an empty list if libtool won't generate it, so as to
	avoid link errors.  This will cause silent dlopening failures, but
	maybe this is better than failing to link the program...
1999-01-20 09:06:46 +00:00
Alexandre Oliva
c74935fc47 * libltdl/ltdl.h (LTDL_PRELOADED_SYMBOLS): remove it; better to
declare lt_preloaded_symbols
	* doc/libtool.texi (LTDL_PRELOADED_SYMBOLS): ditto
1999-01-20 08:58:51 +00:00
Alexandre Oliva
508d8894a0 * libltdl/Makefile.am (Makefile): depend on libtool 1999-01-19 23:56:32 +00:00
Alexandre Oliva
ec1248eb7b * libtool.m4 (LIBTOOL_DEPS): set it
* libltdl/configure.in (LIBTOOL_DEPS): AC_SUBST it
	* libltdl/Makefile.am (libtool): use it
	* doc/libtool.texi (AM_PROG_LIBTOOL): document it
1999-01-18 13:30:43 +00:00
Thomas Tanner
6b7c38b36c *** empty log message *** 1999-01-17 11:19:40 +00:00
Alexandre Oliva
a2f4fa559b * libltdl/ltdl.h (lt_dlpreopen_default): reverted to a macro
without arguments, that calls lt_dlpreopen_default_ with
	lt_dlpreloaded_symbols
	* libltdl/ltdl.c (lt_dlpreopen_default_): renamed from
	lt_dlpreopen_default
1999-01-17 04:15:06 +00:00
Thomas Tanner
bfe6d93ab4 *** empty log message *** 1999-01-14 16:31:23 +00:00
Thomas Tanner
94cfa949e2 *** empty log message *** 1999-01-13 21:39:14 +00:00
Alexandre Oliva
196265528f * libltdl/configure.in (libltdl_cv_shlibext, LTDL_SHLIB_EXT):
system-dependent extension of shared libraries
	(libltdl_cv_shlibpath_var, LTDL_SHLIBPATH_VAR): system-dependent
	run-time shared library search path
	* libltdl/ltdl.c (dldpre_init, dldpre_exit): unrelate init/exit
	from add/remove symlists, so one may add dld_preloaded_symbols
	from main(), when only a library will call dldpre_init
	(lt_dlopen): use LTDL_SHLIBPATH_VAR, if defined, as secondary
	search path.  Also, if a requested .la file cannot be found, try
	with the LTDL_SHLIB_EXTension instead.
1999-01-13 18:37:25 +00:00
Alexandre Oliva
02fde1ea95 * THANKS: added Raffaele Sena
1999-01-13  Raffaele Sena  <raff@aromatic.com>

	* libltdl/ltdl.c: replaced RTDL with RTLD
1999-01-13 08:59:34 +00:00
Thomas Tanner
89aa144652 *** empty log message *** 1999-01-12 20:42:47 +00:00
Alexandre Oliva
fbd5377930 * configure.in (AC_CONFIG_SUBDIRS): add libltdl, demo, mdemo and
depdemo commented out, so that `dist' works before `check'
	(BUILD_LTDL): will contain libltdl if --enable-ltdl-install
	* Makefile.am (DIST_SUBDIRS): expand SUBDIRS and add depdemo,
	commented out
	(SUBDIRS): add $(BUILT_LTDL)
	* libltdl/Makefile.am (EXTRA_LTLIBRARIES): add libtest.la, the
	same as libltdl but always a convenience library.  Not built by
	default.  Both libraries now depend on the libtool script, that
	depends on ../libtool and is rebuilt when needed
	* mdemo/Makefile.am (mdemo, mdemo.debug): depend on and link with
	../libltdl/libtest.la, that is rebuilt if needed
	(mdemo_LDADD): removed $(LIBADD_M), to avoid silent failures
	(foo1.la): renamed from libfoo1.la; test removing the lib prefix
	* mdemo/foo1.c: renamed libfoo1_LTX symbols to foo1_LTX
	* mdemo/main.c: don't include string.h nor math.h, nor refer to
	sin nor cos
	* tests/mdemo-exec.test: renamed libfoo1.la to foo1.la
	* tests/mdemo-inst.test: ditto
1999-01-10 19:16:30 +00:00
Alexandre Oliva
48fcf6a997 * libltdl/ltdl.c (FILENAME_MAX): use it instead of MAX_FILENAME,
and don't redefine it if already defined; default to 1024, as on
	most systems
	(LT_SYMBOL_LENGTH): renamed from MAX_SYMBOL_LENGTH
	(LT_SYMBOL_OVERHEAD): new macro, that accounts for the size of
 	the _LTX_ separator and the initial underscore
	(lt_dlsym): sym now points to a stack buffer (lsym) if possible,
	or is dynamically allocated.  If allocation fails, a
	buffer_overflow_error is returned.
1999-01-10 19:15:01 +00:00
Thomas Tanner
662305576a *** empty log message *** 1999-01-10 14:44:06 +00:00
Alexandre Oliva
e842493250 *** empty log message *** 1999-01-09 20:05:55 +00:00
Alexandre Oliva
c107321bbd * libltdl/ltdl.c (lt_dlopen): missing strlen in bound test 1999-01-09 15:35:32 +00:00
Thomas Tanner
2a246ffc0d *** empty log message *** 1999-01-09 09:51:44 +00:00
Thomas Tanner
ea4730f0a8 *** empty log message *** 1999-01-06 21:04:20 +00:00
Alexandre Oliva
e1d24d3b02 * ltmain.in (libobjs_save, oldobjs): when building an
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
1999-01-05 23:13:44 +00:00
Thomas Tanner
bd9c24ae34 *** empty log message *** 1999-01-05 18:15:22 +00:00
Thomas Tanner
ec45a29680 *** empty log message *** 1999-01-01 20:01:09 +00:00
Thomas Tanner
48218d83e7 *** empty log message *** 1998-12-31 11:25:57 +00:00
Thomas Tanner
c7c32517c0 *** empty log message *** 1998-12-25 10:39:59 +00:00
Gary V. Vaughan
fa787ea3d3 make wrapper scripts work on win32 1998-12-24 13:40:47 +00:00
Alexandre Oliva
48c804561a * libltdl/Makefile.am: install libltdl conditionally...
* libltdl/configure.in: ... if --enable-ltdl-install is issued
	* libltdl/ltdl.c: removed #ifdef DEBUG
	* mdemo/Makefile.am (mdemo_debug_LDADD, mdemo_debug_DEPENDENCIES):
	use libltdl.la
1998-12-23 19:33:09 +00:00
Alexandre Oliva
0f08944a49 * libltdl/Makefile.am: install libltdl conditionally...
* libltdl/configure.in: ... if --enable-ltdl-install is issued
	* libltdl/ltdl.c: removed #ifdef DEBUG
	* mdemo/Makefile.am (mdemo_debug_LDADD, mdemo_debug_DEPENDENCIES):
	use libltdl.la
1998-12-23 19:13:02 +00:00
Thomas Tanner
f772ee7a8e *** empty log message *** 1998-12-23 13:28:28 +00:00
Thomas Tanner
05928ae6f2 *** empty log message *** 1998-12-23 10:27:14 +00:00
Gary V. Vaughan
7fe8f5c785 misc win32 cleanups 1998-12-21 13:04:14 +00:00
Thomas Tanner
bd8bb66bb7 *** empty log message *** 1998-12-19 19:30:30 +00:00
Thomas Tanner
23d413543d *** empty log message *** 1998-12-18 22:23:51 +00:00
Alexandre Oliva
07978fe161 * ltmain.in (-force-static, force_static): removed
* libltdl/Makefile.am (CFLAGS): ditto
	* libltdl/configure.in: check for memory.h, rindex() and
	dlpreopening.  Fixed NEED_USCORE caching policy.
	* libltdl/ltdl.h (lt_dlsym): make the name argument const
	* libltdl/ltdl.c (types): new variable: head of list of available
	dlopening mechanisms
	(lt_dltype_t): interface of a dlopening mechanism, with pointers
	to functions for init, exit, open, close and sym
	(lt_dlhandle_t): added pointer to interface type
	(strdup): don't name it strdup; it can be troublesome
	(strrchr): ditto; use rindex if available
	(LIBTOOL_STATIC): check HAVE_DLPREOPEN instead, and move to the
	end of the file, so that it becomes the header of the list
	(all): renamed all interface-implementation functions, to avoid
	name clashes, and created lt_dltype_t nodes for all of them
	(lt_dlinit): initialize all available interfaces; remove those
	that fail from the list.  Return failure only if no interfaces
	could be initialized.
	(lt_dlexit): return number of failures
	(tryall_dlopen): try to open the library with all available
	interfaces
	(lt_dlopen): use tryall_dlopen; increased size of fixed buffers.
	We should probably make these bound-checked or dynamically
	allocated for the final release!  Fix bug when filename did not
	contain slashes; should we check for `\\' too?  Try old_library if
	everything else fails.
	(lt_dlclose): use the interface type for closing
	(lt_dlsym): make `symbol' const, use interface type for looking up
	* mdemo/Makefile.am: moved mdemo/modules/* back into mdemo
	(SUBDIRS): removed
	(libfoo2_la_LDFLAGS): added -static; nice test.  However, since it
	causes -lm to linked into hell*, it causes tests that should fail
	to pass
	(noinst_HEADERS): no need to install foo.h
	* mdemo/configure.in: remove modules/Makefile
	tests/mdemo-exec.test: updated accordingly
1998-12-16 05:42:23 +00:00
Alexandre Oliva
1cd80e8044 * libltdl/Makefile.am (EXTRA_DIST): removed, nothing needed
(libtool): automatically update
1998-12-16 02:40:54 +00:00
Alexandre Oliva
e392b24787 * libltdl/configure.in (stdlib.h, unistd.h, stdio.h): check
* libltdl/ltdl.c: include them
1998-12-16 02:39:15 +00:00
Alexandre Oliva
e8e76d36b5 * ltmain.in (convenience, deplibs): propagate dependencies
* libltdl/Makefile.am (noinst_HEADERS): don't install ltdl.h yet
	(noinst_LTLIBRARIES): ditto for libltdl.la
1998-12-09 07:51:54 +00:00
Gary V. Vaughan
9817e05d7b portability enhancements 1998-12-02 13:05:23 +00:00
Thomas Tanner
a4f2b1f846 *** empty log message *** 1998-11-23 21:26:38 +00:00
Alexandre Oliva
405661a0fa * libltdl/ltdl.c: replace NULL with 0, so that we don't depend on
header files defining it.
1998-11-21 07:45:20 +00:00
Alexandre Oliva
d4326213cb * mdemo/Makefile.am (hell_debug_LDFLAGS): -dlpreopen -> -dlopen
(hell_LDFLAGS): added -export-dynamic and -dlopen
	(SUBDIRS, INCLUDES): added modules directory
	(foo1.c, foo2.c, foo.h, libfoo1.sym, libfoo2.sym): moved to modules
	* Makefile.am: ditto
	* tests/mdemo-exec.test, tests/mdemo-inst.test: libraries moved
	* mdemo/modules/Makefile.am: new file

	* */Makefile.am (AUTOMAKE_OPTIONS): added no-dependencies
1998-11-19 22:53:40 +00:00
Alexandre Oliva
e76ee47bce * NEWS: -module and libtldl
* mdemo/Makefile.am: ../libltdl is within $(srcdir)

	* libltdl, Makefile.am: added libltdl (a system independent
	dlopen wrapper library extracted from mdemo)
	* ltmain.in: added -module flag for compiling and linking of
	modules. If enabled it compiles always both .o (with -DLT_RENAME)
	and .lo files
	* mdemo: modified mdemo to work with libltdl
	* tests/ltdl*: added tests for libltdl
1998-11-18 07:29:36 +00:00