diff --git a/include/Makefile b/include/Makefile index a7759c338ecc..56b26187ab5e 100644 --- a/include/Makefile +++ b/include/Makefile @@ -9,7 +9,7 @@ CLEANFILES= osreldate.h version vers.c SUBDIR= rpcsvc rpc FILES= a.out.h ar.h assert.h bitstring.h ctype.h db.h dirent.h disktab.h \ - dlfcn.h elf.h err.h fnmatch.h fstab.h \ + dlfcn.h elf-hints.h err.h fnmatch.h fstab.h \ fts.h glob.h grp.h strhash.h \ hesiod.h histedit.h ieeefp.h ifaddrs.h iso646.h langinfo.h \ libgen.h limits.h link.h locale.h malloc.h memory.h mpool.h \ diff --git a/include/elf-hints.h b/include/elf-hints.h index 963308378330..e009074a98e7 100644 --- a/include/elf-hints.h +++ b/include/elf-hints.h @@ -26,11 +26,8 @@ * $FreeBSD$ */ -#ifndef _ELF_H_ -#define _ELF_H_ - -#include -#include +#ifndef _ELF_HINTS_H_ +#define _ELF_HINTS_H_ /* * Hints file produced by ldconfig. @@ -50,4 +47,4 @@ struct elfhints_hdr { #define _PATH_ELF_HINTS "/var/run/ld-elf.so.hints" -#endif /* !_ELF_H_ */ +#endif /* !_ELF_HINTS_H_ */ diff --git a/include/elf.h b/include/elf.h deleted file mode 100644 index 963308378330..000000000000 --- a/include/elf.h +++ /dev/null @@ -1,53 +0,0 @@ -/*- - * Copyright (c) 1997 John D. Polstra. - * All rights reserved. - * - * Redistribution and use in source and binary forms, with or without - * modification, are permitted provided that the following conditions - * are met: - * 1. Redistributions of source code must retain the above copyright - * notice, this list of conditions and the following disclaimer. - * 2. Redistributions in binary form must reproduce the above copyright - * notice, this list of conditions and the following disclaimer in the - * documentation and/or other materials provided with the distribution. - * - * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND - * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE - * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE - * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE - * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL - * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS - * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) - * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT - * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY - * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF - * SUCH DAMAGE. - * - * $FreeBSD$ - */ - -#ifndef _ELF_H_ -#define _ELF_H_ - -#include -#include - -/* - * Hints file produced by ldconfig. - */ -struct elfhints_hdr { - u_int32_t magic; /* Magic number */ - u_int32_t version; /* File version (1) */ - u_int32_t strtab; /* Offset of string table in file */ - u_int32_t strsize; /* Size of string table */ - u_int32_t dirlist; /* Offset of directory list in - string table */ - u_int32_t dirlistlen; /* strlen(dirlist) */ - u_int32_t spare[26]; /* Room for expansion */ -}; - -#define ELFHINTS_MAGIC 0x746e6845 - -#define _PATH_ELF_HINTS "/var/run/ld-elf.so.hints" - -#endif /* !_ELF_H_ */ diff --git a/lib/libc/gen/nlist.c b/lib/libc/gen/nlist.c index ed0fd48ab052..2e35e3682d65 100644 --- a/lib/libc/gen/nlist.c +++ b/lib/libc/gen/nlist.c @@ -54,7 +54,8 @@ static char sccsid[] = "@(#)nlist.c 8.1 (Berkeley) 6/4/93"; #define _NLIST_DO_ELF #ifdef _NLIST_DO_ELF -#include +#include +#include #endif int __fdnlist __P((int, struct nlist *)); diff --git a/libexec/rtld-elf/rtld.h b/libexec/rtld-elf/rtld.h index 68b6c4e312c7..5ac7c1280015 100644 --- a/libexec/rtld-elf/rtld.h +++ b/libexec/rtld-elf/rtld.h @@ -28,11 +28,12 @@ #ifndef RTLD_H /* { */ #define RTLD_H 1 +#include #include #include +#include #include -#include #include #include "rtld_machdep.h" diff --git a/sbin/ldconfig/elfhints.c b/sbin/ldconfig/elfhints.c index cda226976942..9bdf56e4271e 100644 --- a/sbin/ldconfig/elfhints.c +++ b/sbin/ldconfig/elfhints.c @@ -32,7 +32,7 @@ #include #include -#include +#include #include #include #include diff --git a/sbin/ldconfig/ldconfig.c b/sbin/ldconfig/ldconfig.c index 5c655b45d6ce..00c951dcde4c 100644 --- a/sbin/ldconfig/ldconfig.c +++ b/sbin/ldconfig/ldconfig.c @@ -40,7 +40,7 @@ static const char rcsid[] = #include #include #include -#include +#include #include #include #include diff --git a/sys/boot/i386/boot2/boot2.c b/sys/boot/i386/boot2/boot2.c index 67b906463fac..ef3f504d65b7 100644 --- a/sys/boot/i386/boot2/boot2.c +++ b/sys/boot/i386/boot2/boot2.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -30,7 +31,6 @@ #include #include -#include #include diff --git a/sys/boot/i386/gptboot/gptboot.c b/sys/boot/i386/gptboot/gptboot.c index 67b906463fac..ef3f504d65b7 100644 --- a/sys/boot/i386/gptboot/gptboot.c +++ b/sys/boot/i386/gptboot/gptboot.c @@ -23,6 +23,7 @@ #include #include #include +#include #include #include @@ -30,7 +31,6 @@ #include #include -#include #include diff --git a/usr.bin/brandelf/brandelf.c b/usr.bin/brandelf/brandelf.c index ec591e687204..75cc78368203 100644 --- a/usr.bin/brandelf/brandelf.c +++ b/usr.bin/brandelf/brandelf.c @@ -28,7 +28,8 @@ * $FreeBSD$ */ -#include +#include +#include #include #include #include diff --git a/usr.bin/gcore/aoutcore.c b/usr.bin/gcore/aoutcore.c index b5f6143730f0..65dd35e5e56e 100644 --- a/usr.bin/gcore/aoutcore.c +++ b/usr.bin/gcore/aoutcore.c @@ -63,11 +63,11 @@ static const char rcsid[] = #include #include #include +#include #include #include -#include #include #include #include diff --git a/usr.bin/gcore/elfcore.c b/usr.bin/gcore/elfcore.c index 775fd3b7f9e4..4cb5f0f93fe3 100644 --- a/usr.bin/gcore/elfcore.c +++ b/usr.bin/gcore/elfcore.c @@ -29,11 +29,11 @@ #include #include #include +#include #include #include #include #include -#include #include #include #include diff --git a/usr.bin/gcore/gcore.c b/usr.bin/gcore/gcore.c index b5f6143730f0..65dd35e5e56e 100644 --- a/usr.bin/gcore/gcore.c +++ b/usr.bin/gcore/gcore.c @@ -63,11 +63,11 @@ static const char rcsid[] = #include #include #include +#include #include #include -#include #include #include #include diff --git a/usr.bin/gprof/elf.c b/usr.bin/gprof/elf.c index 359d76e5a7f9..ed1aeb1447ee 100644 --- a/usr.bin/gprof/elf.c +++ b/usr.bin/gprof/elf.c @@ -1,8 +1,13 @@ +#ifndef lint +static const char rcsid[] = + "$FreeBSD$"; +#endif /* not lint */ + #include #include #include +#include -#include #include #include #include diff --git a/usr.bin/ldd/ldd.c b/usr.bin/ldd/ldd.c index cf9ebde6fc35..0f82b89af9d5 100644 --- a/usr.bin/ldd/ldd.c +++ b/usr.bin/ldd/ldd.c @@ -34,8 +34,8 @@ static const char rcsid[] = #endif /* not lint */ #include +#include #include -#include #include #include #include diff --git a/usr.bin/ldd/sods.c b/usr.bin/ldd/sods.c index 69176162c868..9b150ec5a9ff 100644 --- a/usr.bin/ldd/sods.c +++ b/usr.bin/ldd/sods.c @@ -38,11 +38,11 @@ static const char rcsid[] = #include #include +#include #define FREEBSD_AOUT #include -#include #include #include diff --git a/usr.sbin/crunch/crunchide/exec_elf32.c b/usr.sbin/crunch/crunchide/exec_elf32.c index 45883f437e2e..00874084180b 100644 --- a/usr.sbin/crunch/crunchide/exec_elf32.c +++ b/usr.sbin/crunch/crunchide/exec_elf32.c @@ -1,5 +1,3 @@ -/* $NetBSD: exec_elf32.c,v 1.4 1997/08/12 06:07:24 mikel Exp $ */ - /* * Copyright (c) 1997 Christopher G. Demetriou. All rights reserved. * @@ -32,8 +30,12 @@ #include #ifndef lint +#if 0 __RCSID("$NetBSD: exec_elf32.c,v 1.4 1997/08/12 06:07:24 mikel Exp $"); #endif +static const char rcsid[] = + "$FreeBSD$"; +#endif #ifndef ELFSIZE #define ELFSIZE 32 @@ -53,7 +55,7 @@ __RCSID("$NetBSD: exec_elf32.c,v 1.4 1997/08/12 06:07:24 mikel Exp $"); #if (defined(NLIST_ELF32) && (ELFSIZE == 32)) || \ (defined(NLIST_ELF64) && (ELFSIZE == 64)) -#include +#include #define CONCAT(x,y) __CONCAT(x,y) #define ELFNAME(x) CONCAT(elf,CONCAT(ELFSIZE,CONCAT(_,x))) diff --git a/usr.sbin/kgzip/elfhdr.h b/usr.sbin/kgzip/elfhdr.h index b14b9f10ac65..f6891194bdb4 100644 --- a/usr.sbin/kgzip/elfhdr.h +++ b/usr.sbin/kgzip/elfhdr.h @@ -26,7 +26,8 @@ * $FreeBSD$ */ -#include +#include +#include #include "kgz.h" /* Section header indices */ diff --git a/usr.sbin/kgzip/kgzcmp.c b/usr.sbin/kgzip/kgzcmp.c index 09086ada8d91..b692315b1856 100644 --- a/usr.sbin/kgzip/kgzcmp.c +++ b/usr.sbin/kgzip/kgzcmp.c @@ -29,6 +29,7 @@ #include #include #include +#include #include #include @@ -37,7 +38,6 @@ #include #include -#include #include "aouthdr.h" #include "elfhdr.h"