git: 7c43148a9748 - main - stand: Automated cleanup of cdefs and other formatting

From: Warner Losh <imp_at_FreeBSD.org>
Date: Mon, 27 Nov 2023 05:25:04 UTC
The branch main has been updated by imp:

URL: https://cgit.FreeBSD.org/src/commit/?id=7c43148a974877188a930e4078a164f83da8e652

commit 7c43148a974877188a930e4078a164f83da8e652
Author:     Warner Losh <imp@FreeBSD.org>
AuthorDate: 2023-11-24 20:12:57 +0000
Commit:     Warner Losh <imp@FreeBSD.org>
CommitDate: 2023-11-27 05:24:00 +0000

    stand: Automated cleanup of cdefs and other formatting
    
    Apply the following automated changes to try to eliminate
    no-longer-needed sys/cdefs.h includes as well as now-empty
    blank lines in a row.
    
    Remove /^#if.*\n#endif.*\n#include\s+<sys/cdefs.h>.*\n/
    Remove /\n+#include\s+<sys/cdefs.h>.*\n+#if.*\n#endif.*\n+/
    Remove /\n+#if.*\n#endif.*\n+/
    Remove /^#if.*\n#endif.*\n/
    Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/types.h>/
    Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/param.h>/
    Remove /\n+#include\s+<sys/cdefs.h>\n#include\s+<sys/capsicum.h>/
    
    Sponsored by:           Netflix
---
 stand/arm64/libarm64/cache.c            | 1 -
 stand/common/bcache.c                   | 1 -
 stand/common/console.c                  | 1 -
 stand/common/gfx_fb.c                   | 1 -
 stand/common/install.c                  | 1 -
 stand/common/interp_forth.c             | 1 -
 stand/common/load_elf.c                 | 1 -
 stand/common/load_elf_obj.c             | 1 -
 stand/common/ls.c                       | 1 -
 stand/common/reloc_elf.c                | 1 -
 stand/common/self_reloc.c               | 1 -
 stand/common/tslog.c                    | 1 -
 stand/efi/boot1/boot1.c                 | 1 -
 stand/efi/boot1/proto.c                 | 1 -
 stand/efi/boot1/ufs_module.c            | 2 +-
 stand/efi/boot1/zfs_module.c            | 2 +-
 stand/efi/fdt/efi_fdt.c                 | 1 -
 stand/efi/gptboot/proto.c               | 1 -
 stand/efi/libefi/efi_console.c          | 1 -
 stand/efi/libefi/efichar.c              | 1 -
 stand/efi/libefi/efihttp.c              | 1 -
 stand/efi/libefi/efinet.c               | 1 -
 stand/efi/libefi/efizfs.c               | 1 -
 stand/efi/loader/arch/arm/exec.c        | 1 -
 stand/efi/loader/arch/riscv/exec.c      | 1 -
 stand/efi/loader/copy.c                 | 1 -
 stand/i386/boot0/boot0.S                | 7 -------
 stand/i386/boot2/boot2.c                | 1 -
 stand/i386/common/cons.c                | 1 -
 stand/i386/common/drv.c                 | 1 -
 stand/i386/gptboot/gptboot.c            | 1 -
 stand/i386/isoboot/isoboot.c            | 1 -
 stand/i386/libi386/elf32_freebsd.c      | 1 -
 stand/i386/libi386/multiboot.c          | 1 -
 stand/kboot/hostcons.c                  | 1 -
 stand/kboot/hostdisk.c                  | 1 -
 stand/kboot/kbootfdt.c                  | 1 -
 stand/liblua/lutils.c                   | 1 -
 stand/libofw/ofw_console.c              | 1 -
 stand/libofw/ofw_memory.c               | 1 -
 stand/libofw/ofw_net.c                  | 1 -
 stand/libofw/openfirm.h                 | 1 -
 stand/libsa/__main.c                    | 1 -
 stand/libsa/arp.c                       | 1 -
 stand/libsa/bcd.c                       | 1 -
 stand/libsa/cd9660read.c                | 1 -
 stand/libsa/dev.c                       | 1 -
 stand/libsa/ether.c                     | 1 -
 stand/libsa/globals.c                   | 1 -
 stand/libsa/gpt.c                       | 1 -
 stand/libsa/in_cksum.c                  | 1 -
 stand/libsa/ip.c                        | 1 -
 stand/libsa/net.c                       | 1 -
 stand/libsa/netif.c                     | 1 -
 stand/libsa/nfs.c                       | 1 -
 stand/libsa/preload.c                   | 1 -
 stand/libsa/random.c                    | 1 -
 stand/libsa/rarp.c                      | 1 -
 stand/libsa/read.c                      | 1 -
 stand/libsa/readdir.c                   | 1 -
 stand/libsa/tslog.c                     | 1 -
 stand/libsa/twiddle.c                   | 1 -
 stand/libsa/udp.c                       | 1 -
 stand/libsa/write.c                     | 1 -
 stand/libsa/zalloc.c                    | 1 -
 stand/libsa/zfs/nvlist.c                | 1 -
 stand/powerpc/boot1.chrp/boot1.c        | 1 -
 stand/powerpc/ofw/elf_freebsd.c         | 1 -
 stand/uboot/copy.c                      | 1 -
 stand/uboot/elf_freebsd.c               | 1 -
 stand/uboot/glue.c                      | 1 -
 stand/uboot/main.c                      | 1 -
 stand/uboot/net.c                       | 1 -
 stand/uboot/uboot_disk.c                | 1 -
 stand/uboot/uboot_fdt.c                 | 1 -
 stand/userboot/userboot/elf32_freebsd.c | 1 -
 76 files changed, 2 insertions(+), 82 deletions(-)

diff --git a/stand/arm64/libarm64/cache.c b/stand/arm64/libarm64/cache.c
index 291b55f3b250..7b74f584ffe3 100644
--- a/stand/arm64/libarm64/cache.c
+++ b/stand/arm64/libarm64/cache.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include <machine/armreg.h>
diff --git a/stand/common/bcache.c b/stand/common/bcache.c
index 2b4603525740..f4805cbaa715 100644
--- a/stand/common/bcache.c
+++ b/stand/common/bcache.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 /*
  * Simple hashed block cache
diff --git a/stand/common/console.c b/stand/common/console.c
index d9d075ef7bde..82cb552b4ef2 100644
--- a/stand/common/console.c
+++ b/stand/common/console.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <stand.h>
 #include <string.h>
diff --git a/stand/common/gfx_fb.c b/stand/common/gfx_fb.c
index 27ac66f259b1..c10d227a5fc8 100644
--- a/stand/common/gfx_fb.c
+++ b/stand/common/gfx_fb.c
@@ -82,7 +82,6 @@
  * from VGA colors to console colors, while we are reading RGB data.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <stand.h>
 #include <teken.h>
diff --git a/stand/common/install.c b/stand/common/install.c
index 418799822e4e..b827b1fe9da2 100644
--- a/stand/common/install.c
+++ b/stand/common/install.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <net/if.h>
diff --git a/stand/common/interp_forth.c b/stand/common/interp_forth.c
index 0320e081d406..854addb22d5c 100644
--- a/stand/common/interp_forth.c
+++ b/stand/common/interp_forth.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>		/* to pick up __FreeBSD_version */
 #include <string.h>
 #include <stand.h>
diff --git a/stand/common/load_elf.c b/stand/common/load_elf.c
index 9f3b015fef7e..d53c0f8b5b84 100644
--- a/stand/common/load_elf.c
+++ b/stand/common/load_elf.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/endian.h>
 #include <sys/exec.h>
diff --git a/stand/common/load_elf_obj.c b/stand/common/load_elf_obj.c
index 86e0fb2b5d22..263553df5e90 100644
--- a/stand/common/load_elf_obj.c
+++ b/stand/common/load_elf_obj.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/exec.h>
 #include <sys/linker.h>
diff --git a/stand/common/ls.c b/stand/common/ls.c
index daeecfa488da..0cf57f7e281c 100644
--- a/stand/common/ls.c
+++ b/stand/common/ls.c
@@ -37,7 +37,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <ufs/ufs/dinode.h>
 #include <ufs/ufs/dir.h>
diff --git a/stand/common/reloc_elf.c b/stand/common/reloc_elf.c
index a7243bc634fd..cf5010a06ccd 100644
--- a/stand/common/reloc_elf.c
+++ b/stand/common/reloc_elf.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <machine/elf.h>
 
diff --git a/stand/common/self_reloc.c b/stand/common/self_reloc.c
index 39dad510b0b0..a4faeeace63f 100644
--- a/stand/common/self_reloc.c
+++ b/stand/common/self_reloc.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <elf.h>
 #include <bootstrap.h>
diff --git a/stand/common/tslog.c b/stand/common/tslog.c
index 6f27b9ebc316..8a17b0ca110c 100644
--- a/stand/common/tslog.c
+++ b/stand/common/tslog.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <stand.h>
diff --git a/stand/efi/boot1/boot1.c b/stand/efi/boot1/boot1.c
index 19627e870201..908baf400972 100644
--- a/stand/efi/boot1/boot1.c
+++ b/stand/efi/boot1/boot1.c
@@ -19,7 +19,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <machine/elf.h>
 #include <machine/stdarg.h>
diff --git a/stand/efi/boot1/proto.c b/stand/efi/boot1/proto.c
index cec4e2d1942c..6660d39a921b 100644
--- a/stand/efi/boot1/proto.c
+++ b/stand/efi/boot1/proto.c
@@ -19,7 +19,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <machine/elf.h>
 #include <machine/stdarg.h>
diff --git a/stand/efi/boot1/ufs_module.c b/stand/efi/boot1/ufs_module.c
index 6848dd79eec0..0bdd5c018b06 100644
--- a/stand/efi/boot1/ufs_module.c
+++ b/stand/efi/boot1/ufs_module.c
@@ -32,7 +32,7 @@
 
 #include <stdarg.h>
 #include <stdbool.h>
-#include <sys/cdefs.h>
+
 #include <sys/param.h>
 #include <sys/disk/bsd.h>
 #include <efi.h>
diff --git a/stand/efi/boot1/zfs_module.c b/stand/efi/boot1/zfs_module.c
index 01b95e06e38f..16722b33f0b9 100644
--- a/stand/efi/boot1/zfs_module.c
+++ b/stand/efi/boot1/zfs_module.c
@@ -26,7 +26,7 @@
 #include <stddef.h>
 #include <stdarg.h>
 #include <stdbool.h>
-#include <sys/cdefs.h>
+
 #include <sys/param.h>
 #include <sys/queue.h>
 #include <efi.h>
diff --git a/stand/efi/fdt/efi_fdt.c b/stand/efi/fdt/efi_fdt.c
index 7010a272d9db..adf830e44182 100644
--- a/stand/efi/fdt/efi_fdt.c
+++ b/stand/efi/fdt/efi_fdt.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <stand.h>
 #include <efi.h>
diff --git a/stand/efi/gptboot/proto.c b/stand/efi/gptboot/proto.c
index 54a229db7bca..e2face6c23e5 100644
--- a/stand/efi/gptboot/proto.c
+++ b/stand/efi/gptboot/proto.c
@@ -23,7 +23,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <machine/elf.h>
 #include <machine/stdarg.h>
diff --git a/stand/efi/libefi/efi_console.c b/stand/efi/libefi/efi_console.c
index 1758cd9d4d6d..4a3219ef3017 100644
--- a/stand/efi/libefi/efi_console.c
+++ b/stand/efi/libefi/efi_console.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <efi.h>
 #include <efilib.h>
diff --git a/stand/efi/libefi/efichar.c b/stand/efi/libefi/efichar.c
index 0703c167de47..86642d325754 100644
--- a/stand/efi/libefi/efichar.c
+++ b/stand/efi/libefi/efichar.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <errno.h>
 #ifdef _STANDALONE
diff --git a/stand/efi/libefi/efihttp.c b/stand/efi/libefi/efihttp.c
index 081b34336cb0..bcc0f7e4d79e 100644
--- a/stand/efi/libefi/efihttp.c
+++ b/stand/efi/libefi/efihttp.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <netinet/in.h>
diff --git a/stand/efi/libefi/efinet.c b/stand/efi/libefi/efinet.c
index ede8b7297f17..62fc203c83b5 100644
--- a/stand/efi/libefi/efinet.c
+++ b/stand/efi/libefi/efinet.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <net/ethernet.h>
 #include <netinet/in.h>
diff --git a/stand/efi/libefi/efizfs.c b/stand/efi/libefi/efizfs.c
index 83551596bb32..1c80f1ae26b9 100644
--- a/stand/efi/libefi/efizfs.c
+++ b/stand/efi/libefi/efizfs.c
@@ -25,7 +25,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <stand.h>
 
diff --git a/stand/efi/loader/arch/arm/exec.c b/stand/efi/loader/arch/arm/exec.c
index 99ee498b1b65..85a8c26ade30 100644
--- a/stand/efi/loader/arch/arm/exec.c
+++ b/stand/efi/loader/arch/arm/exec.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/linker.h>
 
diff --git a/stand/efi/loader/arch/riscv/exec.c b/stand/efi/loader/arch/riscv/exec.c
index 686a42028608..3c40517ea968 100644
--- a/stand/efi/loader/arch/riscv/exec.c
+++ b/stand/efi/loader/arch/riscv/exec.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/linker.h>
 
diff --git a/stand/efi/loader/copy.c b/stand/efi/loader/copy.c
index 12f7273edacd..3f2d1c6c20b0 100644
--- a/stand/efi/loader/copy.c
+++ b/stand/efi/loader/copy.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include <stand.h>
diff --git a/stand/i386/boot0/boot0.S b/stand/i386/boot0/boot0.S
index d92f8dcb05f1..123e66fca970 100644
--- a/stand/i386/boot0/boot0.S
+++ b/stand/i386/boot0/boot0.S
@@ -16,18 +16,11 @@
  */
 
 /* build options: */
-#ifdef SIO		/* use serial console on COM1.	*/
-#endif
 
 #ifdef PXE		/* enable PXE/INT18 booting with F6 */
 #define SAVE_MORE_MEMORY
 #endif
 
-#ifdef CHECK_DRIVE	/* make sure we boot from a HD. */
-#endif
-
-#ifdef ONLY_F_KEYS	/* Only F1..F6, no digits on console */
-#endif
 
 #ifdef VOLUME_SERIAL	/* support Volume serial number */
 #define B0_BASE	0x1ae	/* move the internal data area */
diff --git a/stand/i386/boot2/boot2.c b/stand/i386/boot2/boot2.c
index da699b58b3b4..b886c70f3808 100644
--- a/stand/i386/boot2/boot2.c
+++ b/stand/i386/boot2/boot2.c
@@ -13,7 +13,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/disklabel.h>
 #include <sys/diskmbr.h>
diff --git a/stand/i386/common/cons.c b/stand/i386/common/cons.c
index c3a44499b5b4..1007d6965d95 100644
--- a/stand/i386/common/cons.c
+++ b/stand/i386/common/cons.c
@@ -13,7 +13,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include <machine/psl.h>
diff --git a/stand/i386/common/drv.c b/stand/i386/common/drv.c
index bc8927dc6c5e..394e1b1e8493 100644
--- a/stand/i386/common/drv.c
+++ b/stand/i386/common/drv.c
@@ -14,7 +14,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include <btxv86.h>
diff --git a/stand/i386/gptboot/gptboot.c b/stand/i386/gptboot/gptboot.c
index 7cae837f9a56..949c00cdf544 100644
--- a/stand/i386/gptboot/gptboot.c
+++ b/stand/i386/gptboot/gptboot.c
@@ -13,7 +13,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/gpt.h>
 #include <sys/dirent.h>
diff --git a/stand/i386/isoboot/isoboot.c b/stand/i386/isoboot/isoboot.c
index 4c3f7af8537a..4ffe83cdc9fe 100644
--- a/stand/i386/isoboot/isoboot.c
+++ b/stand/i386/isoboot/isoboot.c
@@ -13,7 +13,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/gpt.h>
 #include <sys/dirent.h>
diff --git a/stand/i386/libi386/elf32_freebsd.c b/stand/i386/libi386/elf32_freebsd.c
index 185dc0c08d0f..ae5702e5e65f 100644
--- a/stand/i386/libi386/elf32_freebsd.c
+++ b/stand/i386/libi386/elf32_freebsd.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/exec.h>
 #include <sys/linker.h>
diff --git a/stand/i386/libi386/multiboot.c b/stand/i386/libi386/multiboot.c
index 1ac5aefebf38..e11da0444fcd 100644
--- a/stand/i386/libi386/multiboot.c
+++ b/stand/i386/libi386/multiboot.c
@@ -34,7 +34,6 @@
  * http://www.gnu.org/software/grub/manual/multiboot/multiboot.html
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/exec.h>
 #include <sys/linker.h>
diff --git a/stand/kboot/hostcons.c b/stand/kboot/hostcons.c
index 24e26af2ab19..114188adcff2 100644
--- a/stand/kboot/hostcons.c
+++ b/stand/kboot/hostcons.c
@@ -23,7 +23,6 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include "bootstrap.h"
 #include "host_syscall.h"
diff --git a/stand/kboot/hostdisk.c b/stand/kboot/hostdisk.c
index a659c6e63530..552ae68daced 100644
--- a/stand/kboot/hostdisk.c
+++ b/stand/kboot/hostdisk.c
@@ -24,7 +24,6 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/disk.h>
 #include <stdarg.h>
diff --git a/stand/kboot/kbootfdt.c b/stand/kboot/kbootfdt.c
index 34c475f0bb3a..70844820d345 100644
--- a/stand/kboot/kbootfdt.c
+++ b/stand/kboot/kbootfdt.c
@@ -23,7 +23,6 @@
  * ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <fdt_platform.h>
 #include <libfdt.h>
diff --git a/stand/liblua/lutils.c b/stand/liblua/lutils.c
index d6c9051f9039..1792d0c8c620 100644
--- a/stand/liblua/lutils.c
+++ b/stand/liblua/lutils.c
@@ -25,7 +25,6 @@
  *
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include "lua.h"
diff --git a/stand/libofw/ofw_console.c b/stand/libofw/ofw_console.c
index 76942358e5c5..42ff045e8831 100644
--- a/stand/libofw/ofw_console.c
+++ b/stand/libofw/ofw_console.c
@@ -26,7 +26,6 @@
  * the rights to redistribute these changes.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include "bootstrap.h"
diff --git a/stand/libofw/ofw_memory.c b/stand/libofw/ofw_memory.c
index cd95827cba9a..67a4527e07b4 100644
--- a/stand/libofw/ofw_memory.c
+++ b/stand/libofw/ofw_memory.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/types.h>
 
diff --git a/stand/libofw/ofw_net.c b/stand/libofw/ofw_net.c
index 15bac848a340..b4bcb7a00fe2 100644
--- a/stand/libofw/ofw_net.c
+++ b/stand/libofw/ofw_net.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/socket.h>
diff --git a/stand/libofw/openfirm.h b/stand/libofw/openfirm.h
index f41fc20cfa7d..35d10c320b57 100644
--- a/stand/libofw/openfirm.h
+++ b/stand/libofw/openfirm.h
@@ -60,7 +60,6 @@
  * Prototypes for Open Firmware Interface Routines
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 typedef uint32_t		ihandle_t;
diff --git a/stand/libsa/__main.c b/stand/libsa/__main.c
index f65f3a4105b4..2c057104476c 100644
--- a/stand/libsa/__main.c
+++ b/stand/libsa/__main.c
@@ -30,7 +30,6 @@
  * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 void __main(void);
diff --git a/stand/libsa/arp.c b/stand/libsa/arp.c
index e461d9322e7e..eff8b9f332a3 100644
--- a/stand/libsa/arp.c
+++ b/stand/libsa/arp.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <net/if.h>
diff --git a/stand/libsa/bcd.c b/stand/libsa/bcd.c
index 600d2bbff703..2f55bf9eda3c 100644
--- a/stand/libsa/bcd.c
+++ b/stand/libsa/bcd.c
@@ -3,7 +3,6 @@
  * Cannot be copyrighted.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 u_char const bcd2bin_data[] = {
diff --git a/stand/libsa/cd9660read.c b/stand/libsa/cd9660read.c
index 4a4501ada529..6062eb061506 100644
--- a/stand/libsa/cd9660read.c
+++ b/stand/libsa/cd9660read.c
@@ -32,7 +32,6 @@
 /* Originally derived from libsa/cd9660.c: */
 /*	$NetBSD: cd9660.c,v 1.5 1997/06/26 19:11:33 drochner Exp $	*/
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <fs/cd9660/iso.h>
 #include <fs/cd9660/cd9660_rrip.h>
diff --git a/stand/libsa/dev.c b/stand/libsa/dev.c
index ea81e0f92115..1edc843d508c 100644
--- a/stand/libsa/dev.c
+++ b/stand/libsa/dev.c
@@ -29,7 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/reboot.h>
 
diff --git a/stand/libsa/ether.c b/stand/libsa/ether.c
index e9dae723e99d..08ef131e9e0e 100644
--- a/stand/libsa/ether.c
+++ b/stand/libsa/ether.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <string.h>
diff --git a/stand/libsa/globals.c b/stand/libsa/globals.c
index ca8d190eeeef..2797045d4faf 100644
--- a/stand/libsa/globals.c
+++ b/stand/libsa/globals.c
@@ -7,7 +7,6 @@
  *	must be included extraneously.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <netinet/in.h>
 #include <netinet/in_systm.h>
diff --git a/stand/libsa/gpt.c b/stand/libsa/gpt.c
index 14e9821eef8e..0ba3f0ee1985 100644
--- a/stand/libsa/gpt.c
+++ b/stand/libsa/gpt.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/gpt.h>
 
diff --git a/stand/libsa/in_cksum.c b/stand/libsa/in_cksum.c
index f4d5a91b1b5a..15b2adb6080c 100644
--- a/stand/libsa/in_cksum.c
+++ b/stand/libsa/in_cksum.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <machine/endian.h>
 
diff --git a/stand/libsa/ip.c b/stand/libsa/ip.c
index 753aeb1bae5e..2c2acf2eda16 100644
--- a/stand/libsa/ip.c
+++ b/stand/libsa/ip.c
@@ -37,7 +37,6 @@
  * once we will implement the support for tcp.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/queue.h>
diff --git a/stand/libsa/net.c b/stand/libsa/net.c
index 20731d90b6aa..76b31c50d1e7 100644
--- a/stand/libsa/net.c
+++ b/stand/libsa/net.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 
diff --git a/stand/libsa/netif.c b/stand/libsa/netif.c
index 30e1528bdfea..d8398b861af0 100644
--- a/stand/libsa/netif.c
+++ b/stand/libsa/netif.c
@@ -31,7 +31,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/cdefs.h>
diff --git a/stand/libsa/nfs.c b/stand/libsa/nfs.c
index 1cc8fb009944..ee6af8a726c7 100644
--- a/stand/libsa/nfs.c
+++ b/stand/libsa/nfs.c
@@ -28,7 +28,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/time.h>
 #include <sys/socket.h>
diff --git a/stand/libsa/preload.c b/stand/libsa/preload.c
index 9ca80e2c6ab2..499075c0efac 100644
--- a/stand/libsa/preload.c
+++ b/stand/libsa/preload.c
@@ -24,7 +24,6 @@
  *
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include "stand.h"
 
diff --git a/stand/libsa/random.c b/stand/libsa/random.c
index a6d903ed2e02..d17d636e1597 100644
--- a/stand/libsa/random.c
+++ b/stand/libsa/random.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 static long randseed = 1;
diff --git a/stand/libsa/rarp.c b/stand/libsa/rarp.c
index 9c5daad5cd42..20bbd56de6e6 100644
--- a/stand/libsa/rarp.c
+++ b/stand/libsa/rarp.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <net/if.h>
diff --git a/stand/libsa/read.c b/stand/libsa/read.c
index df150f8f0fbe..e610f8a0779c 100644
--- a/stand/libsa/read.c
+++ b/stand/libsa/read.c
@@ -58,7 +58,6 @@
  * rights to redistribute these changes.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include "stand.h"
 
diff --git a/stand/libsa/readdir.c b/stand/libsa/readdir.c
index 56c2b880d214..558ff99b265c 100644
--- a/stand/libsa/readdir.c
+++ b/stand/libsa/readdir.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include "stand.h"
 
diff --git a/stand/libsa/tslog.c b/stand/libsa/tslog.c
index 4501746474ea..7a92ee6c23f3 100644
--- a/stand/libsa/tslog.c
+++ b/stand/libsa/tslog.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #if defined(__amd64__) || defined(__i386__)
diff --git a/stand/libsa/twiddle.c b/stand/libsa/twiddle.c
index 43cdca25a367..9ecfbeac3389 100644
--- a/stand/libsa/twiddle.c
+++ b/stand/libsa/twiddle.c
@@ -32,7 +32,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include "stand.h"
 
diff --git a/stand/libsa/udp.c b/stand/libsa/udp.c
index 7a5942bbef95..a0a662a19976 100644
--- a/stand/libsa/udp.c
+++ b/stand/libsa/udp.c
@@ -33,7 +33,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 
diff --git a/stand/libsa/write.c b/stand/libsa/write.c
index 16a6fc7eaa60..06b9bfc63ac2 100644
--- a/stand/libsa/write.c
+++ b/stand/libsa/write.c
@@ -58,7 +58,6 @@
  * rights to redistribute these changes.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include "stand.h"
 
diff --git a/stand/libsa/zalloc.c b/stand/libsa/zalloc.c
index 3bee66c02201..98738cf1f357 100644
--- a/stand/libsa/zalloc.c
+++ b/stand/libsa/zalloc.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 /*
diff --git a/stand/libsa/zfs/nvlist.c b/stand/libsa/zfs/nvlist.c
index e6634ec969d4..6cb496a57b26 100644
--- a/stand/libsa/zfs/nvlist.c
+++ b/stand/libsa/zfs/nvlist.c
@@ -23,7 +23,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/endian.h>
 #include <sys/stdint.h>
diff --git a/stand/powerpc/boot1.chrp/boot1.c b/stand/powerpc/boot1.chrp/boot1.c
index 2804a2a2befd..cdacb05c31ce 100644
--- a/stand/powerpc/boot1.chrp/boot1.c
+++ b/stand/powerpc/boot1.chrp/boot1.c
@@ -15,7 +15,6 @@
  * purpose.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/dirent.h>
 #include <sys/endian.h>
diff --git a/stand/powerpc/ofw/elf_freebsd.c b/stand/powerpc/ofw/elf_freebsd.c
index 5cd8a974cfb6..21ab834f76fa 100644
--- a/stand/powerpc/ofw/elf_freebsd.c
+++ b/stand/powerpc/ofw/elf_freebsd.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/linker.h>
 
diff --git a/stand/uboot/copy.c b/stand/uboot/copy.c
index cc12cfaeef35..e5e985c85b27 100644
--- a/stand/uboot/copy.c
+++ b/stand/uboot/copy.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include <stand.h>
diff --git a/stand/uboot/elf_freebsd.c b/stand/uboot/elf_freebsd.c
index 42ed4080c363..6c764d143881 100644
--- a/stand/uboot/elf_freebsd.c
+++ b/stand/uboot/elf_freebsd.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/linker.h>
 
diff --git a/stand/uboot/glue.c b/stand/uboot/glue.c
index 782636817001..8d8e2a57d1fc 100644
--- a/stand/uboot/glue.c
+++ b/stand/uboot/glue.c
@@ -24,7 +24,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <zlib.h>
diff --git a/stand/uboot/main.c b/stand/uboot/main.c
index 0106243a0e1e..6147757ced71 100644
--- a/stand/uboot/main.c
+++ b/stand/uboot/main.c
@@ -26,7 +26,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 
 #include <stand.h>
diff --git a/stand/uboot/net.c b/stand/uboot/net.c
index e703afcadca4..969724ea02df 100644
--- a/stand/uboot/net.c
+++ b/stand/uboot/net.c
@@ -25,7 +25,6 @@
*** 43 LINES SKIPPED ***