git: a6fe717c2a87 - main - libexec: Automated cleanup of cdefs and other formatting

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

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

commit a6fe717c2a876105123214c05176cd74106fb94b
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:23:59 +0000

    libexec: 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
---
 libexec/bootpd/bootpd.c                | 1 -
 libexec/bootpd/bootpgw/bootpgw.c       | 1 -
 libexec/bootpd/rtmsg.c                 | 1 -
 libexec/ftpd/ftpcmd.y                  | 4 ----
 libexec/ftpd/logwtmp.c                 | 4 ----
 libexec/ftpd/popen.c                   | 4 ----
 libexec/getty/chat.c                   | 1 -
 libexec/getty/init.c                   | 3 ---
 libexec/getty/subr.c                   | 3 ---
 libexec/mknetid/parse_group.c          | 3 ---
 libexec/phttpget/phttpget.c            | 1 -
 libexec/rbootd/bpf.c                   | 3 ---
 libexec/rbootd/conf.c                  | 3 ---
 libexec/rbootd/parseconf.c             | 3 ---
 libexec/rbootd/rmpproto.c              | 3 ---
 libexec/rbootd/utils.c                 | 3 ---
 libexec/rpc.rquotad/rquotad.c          | 1 -
 libexec/rpc.rstatd/rstat_proc.c        | 3 ---
 libexec/rtld-elf/aarch64/reloc.c       | 1 -
 libexec/rtld-elf/arm/reloc.c           | 1 -
 libexec/rtld-elf/riscv/reloc.c         | 1 -
 libexec/rtld-elf/rtld-libc/rtld_libc.c | 2 +-
 libexec/rtld-elf/rtld-libc/rtld_libc.h | 1 -
 libexec/rtld-elf/rtld.c                | 1 -
 libexec/talkd/announce.c               | 3 ---
 libexec/talkd/print.c                  | 3 ---
 libexec/talkd/process.c                | 3 ---
 libexec/talkd/table.c                  | 3 ---
 libexec/tftpd/tests/functional.c       | 1 -
 libexec/tftpd/tftp-file.c              | 1 -
 libexec/tftpd/tftp-io.c                | 1 -
 libexec/tftpd/tftp-options.c           | 1 -
 libexec/tftpd/tftp-transfer.c          | 1 -
 33 files changed, 1 insertion(+), 68 deletions(-)

diff --git a/libexec/bootpd/bootpd.c b/libexec/bootpd/bootpd.c
index 14edf3333722..f73671dab074 100644
--- a/libexec/bootpd/bootpd.c
+++ b/libexec/bootpd/bootpd.c
@@ -37,7 +37,6 @@ SOFTWARE.
  *	See ./ToDo
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
diff --git a/libexec/bootpd/bootpgw/bootpgw.c b/libexec/bootpd/bootpgw/bootpgw.c
index 74f159cb397e..168231002c0b 100644
--- a/libexec/bootpd/bootpgw/bootpgw.c
+++ b/libexec/bootpd/bootpgw/bootpgw.c
@@ -30,7 +30,6 @@ SOFTWARE.
  * one subnet to a BOOTP server on a different subnet.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/param.h>
 #include <sys/socket.h>
diff --git a/libexec/bootpd/rtmsg.c b/libexec/bootpd/rtmsg.c
index a0ee5ed6897b..f2dbaf6eae33 100644
--- a/libexec/bootpd/rtmsg.c
+++ b/libexec/bootpd/rtmsg.c
@@ -39,7 +39,6 @@
  * from arp.c	8.2 (Berkeley) 1/2/94
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 /*
  * Verify that we are at least 4.4 BSD
diff --git a/libexec/ftpd/ftpcmd.y b/libexec/ftpd/ftpcmd.y
index 620acad07395..742de2f4c086 100644
--- a/libexec/ftpd/ftpcmd.y
+++ b/libexec/ftpd/ftpcmd.y
@@ -36,10 +36,6 @@
 
 %{
 
-#ifndef lint
-#endif /* not lint */
-
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/libexec/ftpd/logwtmp.c b/libexec/ftpd/logwtmp.c
index 376af74b2d7c..85db1f13419d 100644
--- a/libexec/ftpd/logwtmp.c
+++ b/libexec/ftpd/logwtmp.c
@@ -29,10 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <netinet/in.h>
diff --git a/libexec/ftpd/popen.c b/libexec/ftpd/popen.c
index e950e78dcc30..5f48356a376f 100644
--- a/libexec/ftpd/popen.c
+++ b/libexec/ftpd/popen.c
@@ -32,10 +32,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/wait.h>
 #include <netinet/in.h>
diff --git a/libexec/getty/chat.c b/libexec/getty/chat.c
index b4e6cf83899e..f1fa6f504b85 100644
--- a/libexec/getty/chat.c
+++ b/libexec/getty/chat.c
@@ -23,7 +23,6 @@
  * For semi-intelligent modem handling.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/utsname.h>
diff --git a/libexec/getty/init.c b/libexec/getty/init.c
index a3fb952e93bf..c304f86b568f 100644
--- a/libexec/getty/init.c
+++ b/libexec/getty/init.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 /*
  * Getty table initializations.
  *
diff --git a/libexec/getty/subr.c b/libexec/getty/subr.c
index 68035c22a333..05186f593bf4 100644
--- a/libexec/getty/subr.c
+++ b/libexec/getty/subr.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 /*
  * Melbourne getty.
  */
diff --git a/libexec/mknetid/parse_group.c b/libexec/mknetid/parse_group.c
index 4fcb5bbc2d9c..c385dfad5190 100644
--- a/libexec/mknetid/parse_group.c
+++ b/libexec/mknetid/parse_group.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 /*
  * This is a slightly modified chunk of getgrent(3). All the YP support
  * and unneeded functions have been stripped out.
diff --git a/libexec/phttpget/phttpget.c b/libexec/phttpget/phttpget.c
index e51fdaea59e3..33ef1eb04edf 100644
--- a/libexec/phttpget/phttpget.c
+++ b/libexec/phttpget/phttpget.c
@@ -26,7 +26,6 @@
  * POSSIBILITY OF SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/time.h>
 #include <sys/socket.h>
diff --git a/libexec/rbootd/bpf.c b/libexec/rbootd/bpf.c
index 39914264c8da..449d9bb5567b 100644
--- a/libexec/rbootd/bpf.c
+++ b/libexec/rbootd/bpf.c
@@ -40,9 +40,6 @@
  * Author: Jeff Forys, University of Utah CSS
  */
 
-#ifndef lint
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
diff --git a/libexec/rbootd/conf.c b/libexec/rbootd/conf.c
index d11c367a1695..dc9e3ac6a60d 100644
--- a/libexec/rbootd/conf.c
+++ b/libexec/rbootd/conf.c
@@ -40,9 +40,6 @@
  * Author: Jeff Forys, University of Utah CSS
  */
 
-#ifndef lint
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/time.h>
 
diff --git a/libexec/rbootd/parseconf.c b/libexec/rbootd/parseconf.c
index 18a73c592da2..7a8b1028b497 100644
--- a/libexec/rbootd/parseconf.c
+++ b/libexec/rbootd/parseconf.c
@@ -40,9 +40,6 @@
  * Author: Jeff Forys, University of Utah CSS
  */
 
-#ifndef lint
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/time.h>
diff --git a/libexec/rbootd/rmpproto.c b/libexec/rbootd/rmpproto.c
index b1459c998588..8f431255d85b 100644
--- a/libexec/rbootd/rmpproto.c
+++ b/libexec/rbootd/rmpproto.c
@@ -40,9 +40,6 @@
  * Author: Jeff Forys, University of Utah CSS
  */
 
-#ifndef lint
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/time.h>
 #include <netinet/in.h>
diff --git a/libexec/rbootd/utils.c b/libexec/rbootd/utils.c
index 4cf333bbbea0..e89c7d085f49 100644
--- a/libexec/rbootd/utils.c
+++ b/libexec/rbootd/utils.c
@@ -40,9 +40,6 @@
  * Author: Jeff Forys, University of Utah CSS
  */
 
-#ifndef lint
-#endif /* not lint */
-
 #include <sys/param.h>
 #include <sys/time.h>
 #include <netinet/in.h>
diff --git a/libexec/rpc.rquotad/rquotad.c b/libexec/rpc.rquotad/rquotad.c
index a8ff56a0171a..ce55bd87da62 100644
--- a/libexec/rpc.rquotad/rquotad.c
+++ b/libexec/rpc.rquotad/rquotad.c
@@ -4,7 +4,6 @@
  * There is no copyright, you can use it as you want.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/mount.h>
 #include <sys/file.h>
diff --git a/libexec/rpc.rstatd/rstat_proc.c b/libexec/rpc.rstatd/rstat_proc.c
index 74ac15071a95..ba4874bda382 100644
--- a/libexec/rpc.rstatd/rstat_proc.c
+++ b/libexec/rpc.rstatd/rstat_proc.c
@@ -27,9 +27,6 @@
  * Mountain View, California  94043
  */
 
-#ifndef lint
-#endif
-
 /*
  * rstat service:  built with rstat.x and derived from rpc.rstatd.c
  *
diff --git a/libexec/rtld-elf/aarch64/reloc.c b/libexec/rtld-elf/aarch64/reloc.c
index 907377f2619a..44d390c5e083 100644
--- a/libexec/rtld-elf/aarch64/reloc.c
+++ b/libexec/rtld-elf/aarch64/reloc.c
@@ -27,7 +27,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <stdlib.h>
diff --git a/libexec/rtld-elf/arm/reloc.c b/libexec/rtld-elf/arm/reloc.c
index 6efc9f499761..4683ebf74fee 100644
--- a/libexec/rtld-elf/arm/reloc.c
+++ b/libexec/rtld-elf/arm/reloc.c
@@ -1,6 +1,5 @@
 /*	$NetBSD: mdreloc.c,v 1.23 2003/07/26 15:04:38 mrg Exp $	*/
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/stat.h>
 #include <sys/mman.h>
diff --git a/libexec/rtld-elf/riscv/reloc.c b/libexec/rtld-elf/riscv/reloc.c
index d806e1ec3d63..43522a5a790f 100644
--- a/libexec/rtld-elf/riscv/reloc.c
+++ b/libexec/rtld-elf/riscv/reloc.c
@@ -32,7 +32,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 
 #include <stdlib.h>
diff --git a/libexec/rtld-elf/rtld-libc/rtld_libc.c b/libexec/rtld-elf/rtld-libc/rtld_libc.c
index ef61c2b094bc..c4feab5e184d 100644
--- a/libexec/rtld-elf/rtld-libc/rtld_libc.c
+++ b/libexec/rtld-elf/rtld-libc/rtld_libc.c
@@ -29,7 +29,7 @@
  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
  * SUCH DAMAGE.
  */
-#include <sys/cdefs.h>
+
 #include <sys/param.h>
 #include <sys/types.h>
 #include <sys/sysctl.h>
diff --git a/libexec/rtld-elf/rtld-libc/rtld_libc.h b/libexec/rtld-elf/rtld-libc/rtld_libc.h
index 57a11af90e11..35b4ef32cf87 100644
--- a/libexec/rtld-elf/rtld-libc/rtld_libc.h
+++ b/libexec/rtld-elf/rtld-libc/rtld_libc.h
@@ -32,7 +32,6 @@
 #ifndef _RTLD_AVOID_LIBC_DEPS_H_
 #define _RTLD_AVOID_LIBC_DEPS_H_
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/fcntl.h>
 #include <sys/stat.h>
diff --git a/libexec/rtld-elf/rtld.c b/libexec/rtld-elf/rtld.c
index 831a854cffb8..49de41f81583 100644
--- a/libexec/rtld-elf/rtld.c
+++ b/libexec/rtld-elf/rtld.c
@@ -38,7 +38,6 @@
  * John Polstra <jdp@polstra.com>.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/mount.h>
 #include <sys/mman.h>
diff --git a/libexec/talkd/announce.c b/libexec/talkd/announce.c
index a12a1ed18e55..80c663ba48b4 100644
--- a/libexec/talkd/announce.c
+++ b/libexec/talkd/announce.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 #include <sys/types.h>
 #include <sys/uio.h>
 #include <sys/stat.h>
diff --git a/libexec/talkd/print.c b/libexec/talkd/print.c
index 9d48fe347906..8852dceba193 100644
--- a/libexec/talkd/print.c
+++ b/libexec/talkd/print.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 /* debug print routines */
 
 #include <sys/types.h>
diff --git a/libexec/talkd/process.c b/libexec/talkd/process.c
index 4ea01a45169f..39ef14a37be1 100644
--- a/libexec/talkd/process.c
+++ b/libexec/talkd/process.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 /*
  * process.c handles the requests, which can be of three types:
  *	ANNOUNCE - announce to a user that a talk is wanted
diff --git a/libexec/talkd/table.c b/libexec/talkd/table.c
index ff4aed54b014..0de6ff52c667 100644
--- a/libexec/talkd/table.c
+++ b/libexec/talkd/table.c
@@ -29,9 +29,6 @@
  * SUCH DAMAGE.
  */
 
-#ifndef lint
-#endif /* not lint */
-
 /*
  * Routines to handle insertion, deletion, etc on the table
  * of requests kept by the daemon. Nothing fancy here, linear
diff --git a/libexec/tftpd/tests/functional.c b/libexec/tftpd/tests/functional.c
index 1d5c1e17c420..0bdbcfe559ed 100644
--- a/libexec/tftpd/tests/functional.c
+++ b/libexec/tftpd/tests/functional.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/libexec/tftpd/tftp-file.c b/libexec/tftpd/tftp-file.c
index 949cf9c74752..405d1b9018c9 100644
--- a/libexec/tftpd/tftp-file.c
+++ b/libexec/tftpd/tftp-file.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>
diff --git a/libexec/tftpd/tftp-io.c b/libexec/tftpd/tftp-io.c
index b5f39423fd60..d43e5f5505f9 100644
--- a/libexec/tftpd/tftp-io.c
+++ b/libexec/tftpd/tftp-io.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/libexec/tftpd/tftp-options.c b/libexec/tftpd/tftp-options.c
index ee413603fbfb..7a261ac3d7c3 100644
--- a/libexec/tftpd/tftp-options.c
+++ b/libexec/tftpd/tftp-options.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/types.h>
 #include <sys/socket.h>
 #include <sys/stat.h>
diff --git a/libexec/tftpd/tftp-transfer.c b/libexec/tftpd/tftp-transfer.c
index 5655d912ab6a..ea386f8a3c1a 100644
--- a/libexec/tftpd/tftp-transfer.c
+++ b/libexec/tftpd/tftp-transfer.c
@@ -25,7 +25,6 @@
  * SUCH DAMAGE.
  */
 
-#include <sys/cdefs.h>
 #include <sys/param.h>
 #include <sys/ioctl.h>
 #include <sys/socket.h>