summaryrefslogtreecommitdiffstats
path: root/sbin/ldconfig
diff options
context:
space:
mode:
authorrich <rich@FreeBSD.org>1994-06-15 22:41:19 +0000
committerrich <rich@FreeBSD.org>1994-06-15 22:41:19 +0000
commitc2b2b846578d61b4bd2deae514c6669ba71a6b5d (patch)
treefc74fe81900a764f41153f6c45e592474d9cb257 /sbin/ldconfig
parent24f89c1469242434ab6ab918657aa2085fad5ddc (diff)
downloadFreeBSD-src-c2b2b846578d61b4bd2deae514c6669ba71a6b5d.zip
FreeBSD-src-c2b2b846578d61b4bd2deae514c6669ba71a6b5d.tar.gz
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.
Diffstat (limited to 'sbin/ldconfig')
-rw-r--r--sbin/ldconfig/ldconfig.82
-rw-r--r--sbin/ldconfig/ldconfig.c19
2 files changed, 13 insertions, 8 deletions
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 <sys/param.h>
-#include <stdio.h>
-#include <stdlib.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/file.h>
#include <sys/time.h>
#include <sys/mman.h>
#include <sys/resource.h>
-#include <fcntl.h>
+#include <dirent.h>
#include <errno.h>
+#include <fcntl.h>
#include <ar.h>
#include <ranlib.h>
#include <a.out.h>
#include <stab.h>
+#include <stdio.h>
+#include <stdlib.h>
#include <string.h>
-#include <dirent.h>
+#include <unistd.h>
#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;
}
OpenPOWER on IntegriCloud