From: Gary V. Vaughan Date: Mon, 8 Jan 2001 01:59:21 +0000 (+0000) Subject: * NEWS: Updated. X-Git-Tag: multi-language-merge-point~91 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=da4f5f79d7315c866904f23eaa6b86b99745912d;p=thirdparty%2Flibtool.git * 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. --- diff --git a/ChangeLog b/ChangeLog index 9171d9b89..100e09dee 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2001-01-07 Gary V. Vaughan + + * 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-05 Gary V. Vaughan * NEWS: Updated. diff --git a/NEWS b/NEWS index 63b556afe..eb6fb54af 100644 --- a/NEWS +++ b/NEWS @@ -14,7 +14,8 @@ New in 1.3d: 2000-??-??; CVS version 1.3c, Libtool team: * Support -dlopen and -dlpreopen for libraries. * Libtool now allows you to link shared libraries against static code. * New functions in libltdl: - lt_dlgetinfo, lt_dlforeach provide access to module specific data in handles. + lt_dlgetinfo, lt_dlhandle_next and lt_dlforeach provide access to module + specific data in handles. lt_dlcaller_register, lt_dlcaller_set_data and lt_dlcaller_get_data provide management for user storage of per module data. lt_dlloader_next, lt_dlloader_name, lt_dlloader_find, lt_dlloader_add and @@ -101,10 +102,10 @@ New in 1.3: 1999-04-29, Libtool team: libtool libraries. Linking of uninstalled libtool libraries into libraries is under development for 1.4. * Do not drop library dependencies on platforms that allow them. -* Linking with uninstalled libraries no longer picks installed ones by +* Linking with uninstalled libraries no longer picks installed ones by mistake. * Use libraries from the build tree when running uninstalled - executables (may require double linking). + executables (may require double linking). * Allow developers to optimize for build-tree executions. * Support -export-symbols-regex for controlled symbol exporting. * Support -R to hardcode directories in library search paths. @@ -175,11 +176,11 @@ New in 1.2d: 1998-12-16; CVS version 1.2c, Libtool team: It is still undocumented, but you can already find some examples in: * New mdemo directory, with tests of -module and dlopening examples. Be aware that libltdl is only known to work on a few platforms such as - GNU/Linux and Solaris2. Some mdemo tests are known to FAIL on several + GNU/Linux and Solaris2. Some mdemo tests are known to FAIL on several other platforms; please ignore these failures by now (or work to fix them :-). * Inter-library dependencies patch finally integrated, but there's - still much porting to do. See PORTING for details (some plans for the + still much porting to do. See PORTING for details (some plans for the future in mail/deplibs in the CVS tree). * New option -export-symbols to control symbol exporting when possible. * Fixed -export-dynamic problem with C++ programs in egcs 1.1. diff --git a/doc/libtool.texi b/doc/libtool.texi index b3c4fd97a..822780bc8 100644 --- a/doc/libtool.texi +++ b/doc/libtool.texi @@ -3140,8 +3140,8 @@ Return @code{NULL} on failure. @end deftypefun Furthermore, in order to save you from having to keep a list of the -handles of all the modules you have loaded, this function will supply -the @var{handle} for each loaded module to a given callback: +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}}) For each loaded module call the function @var{func}. The argument @@ -3151,6 +3151,13 @@ As soon as @var{func} returns a non-zero value for one of the handles, @code{lt_dlforeach} will stop calling @var{func} and immediately return 1. Otherwise 0 is returned. @end deftypefun + +@deftypefun lt_dlhandle lt_dlhandle_next (@w{lt_dlhandle place}) +Iterate over the loaded module handles, returning the first handle in the +list if @var{place} is @code{NULL}, and the next one on subsequent calls. +If @var{place} is the last element in the list of loaded modules, this +function returns @code{NULL}. +@end deftypefun Of course, you would still need to maintain your own list of loaded module handles to parallel the list maintained by libltdl if there are diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 56c693c7c..6c36b4126 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -2488,6 +2488,13 @@ lt_dlgetinfo (handle) return &(handle->info); } +lt_dlhandle +lt_dlhandle_next (place) + lt_dlhandle place; +{ + return place ? place->next : (lt_dlhandle) 0; +} + int lt_dlforeach (func, data) int (*func) LT_PARAMS((lt_dlhandle handle, lt_ptr data)); diff --git a/libltdl/ltdl.h b/libltdl/ltdl.h index 5af1af124..6dd20ef72 100644 --- a/libltdl/ltdl.h +++ b/libltdl/ltdl.h @@ -203,8 +203,9 @@ typedef struct { number of times lt_dlclosed. */ } lt_dlinfo; -extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); -extern int lt_dlforeach LT_PARAMS(( +extern const lt_dlinfo *lt_dlgetinfo LT_PARAMS((lt_dlhandle handle)); +extern lt_dlhandle lt_dlhandle_next LT_PARAMS((lt_dlhandle place)); +extern int lt_dlforeach LT_PARAMS(( int (*func) (lt_dlhandle handle, lt_ptr data), lt_ptr data));