From c2b2b846578d61b4bd2deae514c6669ba71a6b5d Mon Sep 17 00:00:00 2001 From: rich Date: Wed, 15 Jun 1994 22:41:19 +0000 Subject: Changes from Paul Kranenburg which bring us into sync with his sources: handling of errors through the standard err() and warn() more fixes for Geoff Rehmet's NULL pointer bug. fixes NULL pointer bugs when linking mono and nested X servers. supports a `-nostdlib' option. accept object files without a symbol table don't attempt dynamic linking when `-A' is given a few variable names have chaged (desc -> fd), and the formatting has changed which should make it much easier to track his sources. I tested 'make world' for /usr/src and X twice with these changes. --- sbin/ldconfig/ldconfig.8 | 2 ++ sbin/ldconfig/ldconfig.c | 19 +++++++++++-------- 2 files changed, 13 insertions(+), 8 deletions(-) (limited to 'sbin/ldconfig') diff --git a/sbin/ldconfig/ldconfig.8 b/sbin/ldconfig/ldconfig.8 index 32c35af..1ca25a4 100644 --- a/sbin/ldconfig/ldconfig.8 +++ b/sbin/ldconfig/ldconfig.8 @@ -62,6 +62,8 @@ Do not scan .Sq /usr/lib , .Sq /usr/X386/lib +, +.Sq /usr/X11R6/lib and .Sq /usr/local/lib for shared libraries. diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index ec92b9c..b31271f 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -27,26 +27,27 @@ * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. * - * $Id: ldconfig.c,v 1.5 1994/02/13 20:42:30 jkh Exp $ + * $Id: ldconfig.c,v 1.6 1994/06/05 19:04:11 ats Exp $ */ #include -#include -#include #include #include #include #include #include #include -#include +#include #include +#include #include #include #include #include +#include +#include #include -#include +#include #include "ld.h" @@ -74,6 +75,7 @@ static struct shlib_list *shlib_head = NULL, **shlib_tail = &shlib_head; static void enter __P((char *, char *, char *, int *, int)); static int dodir __P((char *, int)); static int build_hints __P((void)); +static int listhints __P((void)); int main(argc, argv) @@ -111,7 +113,7 @@ char *argv[]; return listhints(); if (!nostd) - std_search_dirs(NULL); + std_search_path(); for (i = 0; i < n_search_dirs; i++) rval |= dodir(search_dirs[i], 1); @@ -349,7 +351,7 @@ build_hints() return 0; } -int +static int listhints() { int fd; @@ -375,7 +377,8 @@ listhints() hdr = (struct hints_header *)addr; if (HH_BADMAG(*hdr)) { - fprintf(stderr, "%s: Bad magic: %d\n"); + fprintf(stderr, "%s: Bad magic: %o\n", + _PATH_LD_HINTS, hdr->hh_magic); return -1; } -- cgit v1.1