From 11cb604bc937a9308a16e7b6899f4e333f4d241b Mon Sep 17 00:00:00 2001 From: Thomas Tanner Date: Thu, 25 Feb 1999 06:46:55 +0000 Subject: [PATCH] * 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) --- ChangeLog | 7 +++++++ TODO | 49 +++++++++++++++++++++++++++++++++++++++++++++---- libltdl/ltdl.c | 13 +++++++------ 3 files changed, 59 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index a7fa6d89b..8d0cd05b2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +1999-02-25 Thomas Tanner + + * 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-24 Alexandre Oliva * ltmain.in (file_magic_regex): sed `10q' is faster than `11,$d' diff --git a/TODO b/TODO index 1697e8a9d..76e7d5842 100644 --- a/TODO +++ b/TODO @@ -1,14 +1,53 @@ +For next alpha release: +*********************** + +* Fast installation (linking on demand in the build tree) +must be optional. + +* check whether the version of libtool.m4 is compatible +with ltconfig/ltmain.sh + +* libltdl is broken when configured with --enable-ltdl-install + +* check whether the "file" command is available + +* update the NEWS file + +* Tom Lane adds that HP-UX's linker, at least (I've also found this on +AIX 4), distinguishes between global function and global variable +references. This means that we cannot declare every symbol as `extern +char'. Find a workaround. + For next public release: ************************ +* Inter-library dependencies should be fully tracked by libtool +and need to work for ltlibraries too. This requires looking up +installed libtool libraries for transparent support. +Thomas Tanner has a patch for this. + * Alexandre Oliva suggests that we should have an option to hardcode paths into libraries, as well as binaries: `... -Wl,-soname -Wl,/tmp/libtest.so.0 ...'. Tim Mooney wants the same thing. -* Tom Lane adds that HP-UX's linker, at least (I've also found this on -AIX 4), distinguishes between global function and global variable -references. This means that we cannot declare every symbol as `extern -char'. Find a workaround. +* Lists of exported symbols should be stored in the pseudo library +so that the size of lt_preloaded_symbols can be reduced. + +* Godmar Back writes: + libltdl uses such stdio functions as fopen, fgets, feof, fclose, and others. + These functions are not async-signal-safe. While this does not make + libltdl unusable, it restricts its usefulness and puts an + unnecessary burden on the user. + + As a remedy, I'd recommend to replace those functions with functions + that POSIX says are async-signal-safe, such as open, read, close. + This will require you to handle interrupted system calls and implement + fgets, but the former isn't hard and there's plenty of implementations + out from which you can steal the latter. + + I believe relying on async-signal-safe functions to the greatest extent + possible would greatly improve libltdl's ability to be embedded in and + used by other systems. * Documentation: @@ -19,6 +58,8 @@ char'. Find a workaround. - Purpose and usage of convenience libraries must be better documented +- some new internal variables are not documented yet. + In the future: ************** diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 9f08672b8..2b4432730 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -658,7 +658,7 @@ presym_sym (handle, symbol) syms++; while (syms->address) { - if (syms->address && strcmp(syms->name, symbol) == 0) + if (strcmp(syms->name, symbol) == 0) return syms->address; syms++; } @@ -1051,6 +1051,8 @@ lt_dlopen (filename) return 0; } handle->usage = 0; + handle->depcount = 0; + handle->deplibs = 0; newhandle = handle; if (tryall_dlopen(&newhandle, 0) != 0) { lt_dlfree(handle); @@ -1244,10 +1246,8 @@ lt_dlopenext (filename) int len; const char *saved_error = last_error; - if (!filename) { - last_error = file_not_found_error; - return 0; - } + if (!filename) + return lt_dlopen(filename); len = strlen(filename); if (!len) { last_error = file_not_found_error; @@ -1322,7 +1322,8 @@ lt_dlclose (handle) handles = handle->next; error = handle->type->lib_close(handle); error += unload_deplibs(handle); - lt_dlfree(handle->filename); + if (handle->filename) + lt_dlfree(handle->filename); if (handle->name) lt_dlfree(handle->name); lt_dlfree(handle); -- 2.47.3