[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
276-gary-remove-unusable-deprecated-ltdl-apis.diff
From: |
Gary V. Vaughan |
Subject: |
276-gary-remove-unusable-deprecated-ltdl-apis.diff |
Date: |
Mon, 19 Sep 2005 00:22:38 +0100 |
Repost. Easing back on the lt_ptr removal.
ChangeLog | 6 ++++++
NEWS | 13 +++++++++----
doc/libtool.texi | 28 ++++++++++++----------------
libltdl/ltdl.c | 26 --------------------------
libltdl/ltdl.h | 37 +------------------------------------
5 files changed, 28 insertions(+), 82 deletions(-)
Index: libtool--devo--1.0/ChangeLog
===================================================================
--- libtool--devo--1.0.orig/ChangeLog
+++ libtool--devo--1.0/ChangeLog
@@ -1,5 +1,11 @@
2005-09-17 Gary V. Vaughan <address@hidden>
+ * 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.
Index: libtool--devo--1.0/NEWS
===================================================================
--- libtool--devo--1.0.orig/NEWS
+++ libtool--devo--1.0/NEWS
@@ -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.1
* 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:
Index: libtool--devo--1.0/doc/libtool.texi
===================================================================
--- libtool--devo--1.0.orig/doc/libtool.texi
+++ libtool--devo--1.0/doc/libtool.texi
@@ -3441,10 +3441,6 @@ separator in addition to @samp{/}. On W
@noindent
The following types are defined in @file{ltdl.h}:
address@hidden {Type} lt_ptr
address@hidden is a generic pointer.
address@hidden 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
address@hidden lt_ptr lt_dlsym (lt_dlhandle @var{handle}, const char
address@hidden)
address@hidden {void *} lt_dlsym (lt_dlhandle @var{handle}, const char
address@hidden)
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
Return the current user-defined library search path.
@end deftypefun
address@hidden int lt_dlforeachfile (@w{const char address@hidden, @w{int
(address@hidden) (const char address@hidden, lt_ptr @var{data})}, @w{lt_ptr
@var{data}})
address@hidden int lt_dlforeachfile (@w{const char address@hidden, @w{int
(address@hidden) (const char address@hidden, 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 multithr
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 h
handles of all the modules you have loaded, these functions allow you to
iterate over libltdl's list of loaded modules:
address@hidden int lt_dlforeach (@w{int (address@hidden) (lt_dlhandle
@var{handle}, lt_ptr @var{data})}, @w{lt_ptr @var{data}})
address@hidden int lt_dlforeach (@w{int (address@hidden) (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 @va
returned by @samp{lt_dlhandle_next}.
@end deftypefun
address@hidden lt_ptr lt_dlcaller_set_data (@w{lt_dlinterface_id @var{key}},
@w{lt_dlhandle @var{handle}}, @w{lt_ptr @var{data}})
address@hidden {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
address@hidden lt_ptr lt_dlcaller_get_data (@w{lt_dlinterface_id @var{key}},
@w{lt_dlhandle @var{handle}})
address@hidden {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
message with @code{lt_dlseterror} and return non-zero.
@end deftypefn
address@hidden {Type} lt_ptr lt_find_sym (@w{lt_module @var{module},} @w{const
char address@hidden)
address@hidden {Type} {void *} lt_find_sym (@w{lt_module @var{module},}
@w{const char address@hidden)
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
Index: libtool--devo--1.0/libltdl/ltdl.c
===================================================================
--- libtool--devo--1.0.orig/libltdl/ltdl.c
+++ libtool--devo--1.0/libltdl/ltdl.c
@@ -2202,29 +2202,3 @@ lt_dlforeach (int (*func) (lt_dlhandle h
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;
-}
Index: libtool--devo--1.0/libltdl/ltdl.h
===================================================================
--- libtool--devo--1.0.orig/libltdl/ltdl.h
+++ libtool--devo--1.0/libltdl/ltdl.h
@@ -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
--
Gary V. Vaughan ())_. address@hidden,gnu.org}
Research Scientist ( '/ http://tkd.kicks-ass.net
GNU Hacker / )= http://www.gnu.org/software/libtool
Technical Author `(_~)_ http://sources.redhat.com/autobook