ldconfig.c (14260) | ldconfig.c (17142) |
---|---|
1/* 2 * Copyright (c) 1993,1995 Paul Kranenburg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * | 1/* 2 * Copyright (c) 1993,1995 Paul Kranenburg 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 13 unchanged lines hidden (view full) --- 22 * IN NO EVENT SHALL THE AUTHOR BE LIABLE FOR ANY DIRECT, INDIRECT, 23 * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 29 * |
30 * $Id: ldconfig.c,v 1.13 1996/01/09 00:04:35 pk Exp $ | 30 * $Id: ldconfig.c,v 1.12 1996/02/26 02:22:33 pst Exp $ |
31 */ 32 33#include <sys/param.h> 34#include <sys/types.h> 35#include <sys/stat.h> 36#include <sys/file.h> 37#include <sys/time.h> 38#include <sys/mman.h> 39#include <sys/resource.h> 40#include <dirent.h> 41#include <errno.h> | 31 */ 32 33#include <sys/param.h> 34#include <sys/types.h> 35#include <sys/stat.h> 36#include <sys/file.h> 37#include <sys/time.h> 38#include <sys/mman.h> 39#include <sys/resource.h> 40#include <dirent.h> 41#include <errno.h> |
42#include <err.h> 43#include <ctype.h> |
|
42#include <fcntl.h> 43#include <ar.h> 44#include <ranlib.h> 45#include <a.out.h> 46#include <stab.h> 47#include <stdio.h> 48#include <stdlib.h> 49#include <string.h> --- 59 unchanged lines hidden (view full) --- 109 } 110 } 111 112 if (justread || merge) { 113 if ((rval = readhints()) != 0) 114 return rval; 115 if (justread) { 116 listhints(); | 44#include <fcntl.h> 45#include <ar.h> 46#include <ranlib.h> 47#include <a.out.h> 48#include <stab.h> 49#include <stdio.h> 50#include <stdlib.h> 51#include <string.h> --- 59 unchanged lines hidden (view full) --- 111 } 112 } 113 114 if (justread || merge) { 115 if ((rval = readhints()) != 0) 116 return rval; 117 if (justread) { 118 listhints(); |
117 return; | 119 return 0; |
118 } 119 } 120 121 if (!nostd) 122 std_search_path(); 123 124 for (i = 0; i < n_search_dirs; i++) 125 rval |= dodir(search_dirs[i], 1); --- 157 unchanged lines hidden (view full) --- 283 hdr.hh_nbucket = 1 * nhints; 284 n = hdr.hh_nbucket * sizeof(struct hints_bucket); 285 hdr.hh_hashtab = sizeof(struct hints_header); 286 hdr.hh_strtab = hdr.hh_hashtab + n; 287 hdr.hh_strtab_sz = strtab_sz; 288 hdr.hh_ehints = hdr.hh_strtab + hdr.hh_strtab_sz; 289 290 if (verbose) | 120 } 121 } 122 123 if (!nostd) 124 std_search_path(); 125 126 for (i = 0; i < n_search_dirs; i++) 127 rval |= dodir(search_dirs[i], 1); --- 157 unchanged lines hidden (view full) --- 285 hdr.hh_nbucket = 1 * nhints; 286 n = hdr.hh_nbucket * sizeof(struct hints_bucket); 287 hdr.hh_hashtab = sizeof(struct hints_header); 288 hdr.hh_strtab = hdr.hh_hashtab + n; 289 hdr.hh_strtab_sz = strtab_sz; 290 hdr.hh_ehints = hdr.hh_strtab + hdr.hh_strtab_sz; 291 292 if (verbose) |
291 printf("Totals: entries %d, buckets %d, string size %d\n", | 293 printf("Totals: entries %d, buckets %ld, string size %d\n", |
292 nhints, hdr.hh_nbucket, strtab_sz); 293 294 /* Allocate buckets and string table */ 295 blist = (struct hints_bucket *)xmalloc(n); 296 bzero((char *)blist, n); 297 for (i = 0; i < hdr.hh_nbucket; i++) 298 /* Empty all buckets */ 299 blist[i].hi_next = -1; --- 174 unchanged lines hidden --- | 294 nhints, hdr.hh_nbucket, strtab_sz); 295 296 /* Allocate buckets and string table */ 297 blist = (struct hints_bucket *)xmalloc(n); 298 bzero((char *)blist, n); 299 for (i = 0; i < hdr.hh_nbucket; i++) 300 /* Empty all buckets */ 301 blist[i].hi_next = -1; --- 174 unchanged lines hidden --- |