* libltdl/ltdl.h (lt_dlmutex_register, lt_dlmutex_lock)

(lt_dlmutex_unlock, lt_dlmutex_seterror, lt_dlmutex_geterror)
(lt_dlmalloc, lt_dlrealloc, lt_dlfree): Remove deprecated APIs.
* doc/libtool.tex: Updated.
* NEWS: Updated.
This commit is contained in:
Gary V. Vaughan 2005-09-27 10:41:07 +00:00
parent 9d4089fbbb
commit 6db2a8ba58
5 changed files with 28 additions and 82 deletions

View File

@ -1,5 +1,11 @@
2005-09-27 Gary V. Vaughan <gary@gnu.org>
* libltdl/ltdl.h (lt_dlmutex_register, lt_dlmutex_lock)
(lt_dlmutex_unlock, lt_dlmutex_seterror, lt_dlmutex_geterror)
(lt_dlmalloc, lt_dlrealloc, lt_dlfree): Remove deprecated APIs.
* doc/libtool.tex: Updated.
* NEWS: Updated.
* libltdl/ltdl.c (lt_dlcaller_register): Renamed to avoid problems
with module visibilty when linked with programs written for the
old API.

13
NEWS
View File

@ -1,9 +1,16 @@
NEWS - list of user-visible changes between releases of GNU Libtool
New in 2.1b: 2005-??-??; CVS version 2.1a, Libtool team:
New in 1.9h: 2005-??-??; CVS version 2.1a, Libtool team:
* New tests for support of Automake subdir-objects.
* Support for Portland Group compiler on GNU/Linux.
* Fix libltdl on static platforms.
* New lt_dlinterface_register, lt_dlinterface_set_data and
lt_dlinterface_get_data libltdl API calls to maintain separation of
concerns between modules loaded by different libraries.
* Removed deprecated APIs from libltdl: lt_dlcaller_register,
lt_dlcaller_get_data, lt_dlcaller_set_data, lt_dlmutex_register,
lt_dlmutex_lock, lt_dlmutex_unlock, lt_dlmutex_seterror,
lt_dlmutex_geterror, lt_dlmalloc, lt_dlrealloc, lt_dlfree.
* Support for Portland Group compiler on GNU/Linux.
* Support for linux-dietlibc (`diet' as well as `diet-dyn', separately).
* Shell optimizations which break use of the stdin file descriptor in libtool.
* `libtoolize --install' now also installs `install-sh'.
@ -13,8 +20,6 @@ New in 2.1b: 2005-??-??; CVS version 2.1a, Libtool team:
* Detection of compiler wrappers like distcc/ccache and $host_alias prefix.
* Initial Support for FC (modern Fortran).
* Fixed a regression that prevented use of libltdl without autotools.
New in 1.9h: 2004-??-??; CVS version 1.9g, Libtool team:
* Bug fixes.
New in 1.9f: 2004-10-23; CVS version 1.9e, Libtool team:

View File

@ -3441,10 +3441,6 @@ separator in addition to @samp{/}. On Windows, this contains
@noindent
The following types are defined in @file{ltdl.h}:
@deftp {Type} lt_ptr
@code{lt_ptr} is a generic pointer.
@end deftp
@deftp {Type} lt_dlhandle
@code{lt_dlhandle} is a module ``handle''.
Every lt_dlopened module has a handle associated with it.
@ -3546,7 +3542,7 @@ then the module is unloaded.
Return 0 on success.
@end deftypefun
@deftypefun lt_ptr lt_dlsym (lt_dlhandle @var{handle}, const char *@var{name})
@deftypefun {void *} lt_dlsym (lt_dlhandle @var{handle}, const char *@var{name})
Return the address in the module @var{handle}, where the symbol given
by the null-terminated string @var{name} is loaded.
If the symbol cannot be found, @code{NULL} is returned.
@ -3581,7 +3577,7 @@ by @code{LT_PATHSEP_CHAR}. Return 0 on success.
Return the current user-defined library search path.
@end deftypefun
@deftypefun int lt_dlforeachfile (@w{const char *@var{search_path}}, @w{int (*@var{func}) (const char *@var{filename}, lt_ptr @var{data})}, @w{lt_ptr @var{data}})
@deftypefun int lt_dlforeachfile (@w{const char *@var{search_path}}, @w{int (*@var{func}) (const char *@var{filename}, void * @var{data})}, @w{void * @var{data}})
In some applications you may not want to load individual modules with
known names, but rather find all of the modules in a set of
directories and load them all during initialisation. With this function
@ -3698,13 +3694,13 @@ If you wish to use libltdl in a multithreaded environment, then you
must mutex lock around libltdl calls, since they may in turn be calling
non-thread-safe system calls on some target hosts.
Some old releases of libtool provided a mutex locking API that was
unusable with POSIX threads, so callers were forced to lock around all
libltdl API calls anyway. That mutex locking API was next to useless,
and is not present in current releases.
Some old releases of libtool provided a mutex locking @sc{api} that
was unusable with POSIX threads, so callers were forced to lock around
all libltdl @sc{api} calls anyway. That mutex locking @sc{api} was
next to useless, and is not present in current releases.
Some future release of libtool may provide a new POSIX thread
compliant mutex locking API.
compliant mutex locking @sc{api}.
@node User defined module data
@section Data associated with loaded modules
@ -3739,7 +3735,7 @@ Furthermore, in order to save you from having to keep a list of the
handles of all the modules you have loaded, these functions allow you to
iterate over libltdl's list of loaded modules:
@deftypefun int lt_dlforeach (@w{int (*@var{func}) (lt_dlhandle @var{handle}, lt_ptr @var{data})}, @w{lt_ptr @var{data}})
@deftypefun int lt_dlforeach (@w{int (*@var{func}) (lt_dlhandle @var{handle}, void * @var{data})}, @w{void * @var{data}})
For each loaded module call the function @var{func}. The argument
@var{handle} is the handle of one of the loaded modules, @var{data} is
the @var{data} argument passed to @code{lt_dlforeach}.
@ -3796,7 +3792,7 @@ if you supply an @var{id_string} and @var{iface}, then the resulting
returned by @samp{lt_dlhandle_next}.
@end deftypefun
@deftypefun lt_ptr lt_dlcaller_set_data (@w{lt_dlinterface_id @var{key}}, @w{lt_dlhandle @var{handle}}, @w{lt_ptr @var{data}})
@deftypefun {void *} lt_dlcaller_set_data (@w{lt_dlinterface_id @var{key}}, @w{lt_dlhandle @var{handle}}, @w{void * @var{data}})
Set @var{data} as the set of data uniquely associated with @var{key} and
@var{handle} for later retrieval. This function returns the @var{data}
previously associated with @var{key} and @var{handle} if any. A result of
@ -3806,7 +3802,7 @@ from @code{lt_dlerror()}.
For example, to correctly remove some associated data:
@example
lt_ptr stale = lt_dlcaller_set_data (key, handle, 0);
void *stale = lt_dlcaller_set_data (key, handle, 0);
if (stale != NULL)
@{
free (stale);
@ -3824,7 +3820,7 @@ else
@end example
@end deftypefun
@deftypefun lt_ptr lt_dlcaller_get_data (@w{lt_dlinterface_id @var{key}}, @w{lt_dlhandle @var{handle}})
@deftypefun {void *} lt_dlcaller_get_data (@w{lt_dlinterface_id @var{key}}, @w{lt_dlhandle @var{handle}})
Return the address of the data associated with @var{key} and
@var{handle}, or else @code{NULL} if there is none.
@end deftypefun
@ -3988,7 +3984,7 @@ from memory. If the function fails for some reason, set the error
message with @code{lt_dlseterror} and return non-zero.
@end deftypefn
@deftypefn {Type} lt_ptr lt_find_sym (@w{lt_module @var{module},} @w{const char *@var{symbol}})
@deftypefn {Type} {void *} lt_find_sym (@w{lt_module @var{module},} @w{const char *@var{symbol}})
The type of the symbol lookup function for a user defined module loader.
Implementation of such a function should return the address of the named
@var{symbol} in the module @var{module}, or else set the error message

View File

@ -2202,29 +2202,3 @@ lt_dlforeach (int (*func) (lt_dlhandle handle, void *data), void *data)
return errors;
}
/* These symbols are part of the published interface to libltdl,
although they are no longer used. */
LT_GLOBAL_DATA void *(*lt_dlmalloc) (size_t size) = 0;
LT_GLOBAL_DATA void *(*lt_dlrealloc) (void *ptr, size_t size) = 0;
LT_GLOBAL_DATA void (*lt_dlfree) (void *ptr) = 0;
/*ARGSUSED*/
int
lt_dlmutex_register (lt_dlmutex_lock *lock, lt_dlmutex_unlock *unlock,
lt_dlmutex_seterror *seterror,
lt_dlmutex_geterror *geterror)
{
static int warned = 0;
if (warned++ == 0)
{
fputs ("libltdl: WARNING: lt_dlmutex_register() is deprecated,\n"
"libltdl: WARNING: this version of libltdl is not thread safe.\n",
stderr);
}
return 0;
}

View File

@ -133,42 +133,7 @@ LT_SCOPE int lt_dlforeach (
int (*func) (lt_dlhandle handle, void *data),
void *data);
/* --- BINARY COMPATIBILITY WITH OLD LIBLTDL --- */
typedef void lt_dlmutex_lock (void);
typedef void lt_dlmutex_unlock (void);
typedef void lt_dlmutex_seterror (const char *errmsg);
typedef const char *lt_dlmutex_geterror (void);
LT_SCOPE void * (*lt_dlmalloc) (size_t size);
LT_SCOPE void * (*lt_dlrealloc) (void *ptr, size_t size);
LT_SCOPE void (*lt_dlfree) (void *ptr);
LT_SCOPE int lt_dlmutex_register (lt_dlmutex_lock *lock,
lt_dlmutex_unlock *unlock,
lt_dlmutex_seterror *seterror,
lt_dlmutex_geterror *geterror);
# define lt_ptr void *
/* --- SOURCE COMPATIBILITY WITH ANCIENT LIBLTDL --- */
#if defined(LT_NON_POSIX_NAMESPACE)
# define lt_ptr_t void *
# define lt_module_t lt_module
# define lt_module_open_t lt_module_open
# define lt_module_close_t lt_module_close
# define lt_find_sym_t lt_find_sym
# define lt_dlloader_exit_t lt_dlloader_exit
# define lt_dlloader_t lt_dlloader
# define lt_dlloader_data_t lt_user_data
#endif
#define lt_ptr void *
LT_END_C_DECLS