From: Alexandre Oliva Date: Mon, 4 Sep 2000 01:52:04 +0000 (+0000) Subject: * libltdl/ltdl.c (lt_dlopen): Set dlname from library_names if X-Git-Tag: multi-language-merge-point~152 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7930e3dbe0f446b7c55042f60debddc37ae37129;p=thirdparty%2Flibtool.git * libltdl/ltdl.c (lt_dlopen): Set dlname from library_names if dlname is empty. --- diff --git a/ChangeLog b/ChangeLog index c83549e57..7487e9bce 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,5 +1,8 @@ 2000-09-03 Alexandre Oliva + * libltdl/ltdl.c (lt_dlopen): Set dlname from library_names if + dlname is empty. + * ltdl.m4 (HAVE_LIBDL): Look for dlopen in -lsvld. * ltconfig.in: Likewise. diff --git a/libltdl/ltdl.c b/libltdl/ltdl.c index 134fbab36..ac2540d6a 100644 --- a/libltdl/ltdl.c +++ b/libltdl/ltdl.c @@ -1,5 +1,5 @@ /* ltdl.c -- system independent dlopen wrapper - Copyright (C) 1998-2000 Free Software Foundation, Inc. + Copyright (C) 1998, 1999, 2000 Free Software Foundation, Inc. Originally by Thomas Tanner This file is part of GNU Libtool. @@ -1440,6 +1440,22 @@ lt_dlopen (filename) else if (strcmp(line, "installed=no\n") == 0) installed = 0; + else +# undef STR_LIBRARY_NAMES +# define STR_LIBRARY_NAMES "library_names=" + if (! dlname && + strncmp(line, STR_LIBRARY_NAMES, + sizeof(STR_LIBRARY_NAMES) - 1) == 0) { + char *last_libname; + error = trim(&dlname, + &line[sizeof(STR_LIBRARY_NAMES) - 1]); + if (! error && dlname && + (last_libname = strrchr(dlname, ' ')) != NULL) { + last_libname = strdup(last_libname + 1); + free(dlname); + dlname = last_libname; + } + } if (error) break; }