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
This commit is contained in:
Warner Losh
2023-11-24 13:12:57 -07:00
parent a2f733abcf
commit a6fe717c2a
33 changed files with 1 additions and 68 deletions
-1
View File
@@ -37,7 +37,6 @@ SOFTWARE.
* See ./ToDo * See ./ToDo
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>
-1
View File
@@ -30,7 +30,6 @@ SOFTWARE.
* one subnet to a BOOTP server on a different subnet. * one subnet to a BOOTP server on a different subnet.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>
-1
View File
@@ -39,7 +39,6 @@
* from arp.c 8.2 (Berkeley) 1/2/94 * from arp.c 8.2 (Berkeley) 1/2/94
*/ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
/* /*
* Verify that we are at least 4.4 BSD * Verify that we are at least 4.4 BSD
-4
View File
@@ -36,10 +36,6 @@
%{ %{
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
-4
View File
@@ -29,10 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <netinet/in.h> #include <netinet/in.h>
-4
View File
@@ -32,10 +32,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/wait.h> #include <sys/wait.h>
#include <netinet/in.h> #include <netinet/in.h>
-1
View File
@@ -23,7 +23,6 @@
* For semi-intelligent modem handling. * For semi-intelligent modem handling.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/utsname.h> #include <sys/utsname.h>
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
/* /*
* Getty table initializations. * Getty table initializations.
* *
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
/* /*
* Melbourne getty. * Melbourne getty.
*/ */
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
/* /*
* This is a slightly modified chunk of getgrent(3). All the YP support * This is a slightly modified chunk of getgrent(3). All the YP support
* and unneeded functions have been stripped out. * and unneeded functions have been stripped out.
-1
View File
@@ -26,7 +26,6 @@
* POSSIBILITY OF SUCH DAMAGE. * POSSIBILITY OF SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/time.h> #include <sys/time.h>
#include <sys/socket.h> #include <sys/socket.h>
-3
View File
@@ -40,9 +40,6 @@
* Author: Jeff Forys, University of Utah CSS * Author: Jeff Forys, University of Utah CSS
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
-3
View File
@@ -40,9 +40,6 @@
* Author: Jeff Forys, University of Utah CSS * Author: Jeff Forys, University of Utah CSS
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
-3
View File
@@ -40,9 +40,6 @@
* Author: Jeff Forys, University of Utah CSS * Author: Jeff Forys, University of Utah CSS
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/time.h> #include <sys/time.h>
-3
View File
@@ -40,9 +40,6 @@
* Author: Jeff Forys, University of Utah CSS * Author: Jeff Forys, University of Utah CSS
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#include <netinet/in.h> #include <netinet/in.h>
-3
View File
@@ -40,9 +40,6 @@
* Author: Jeff Forys, University of Utah CSS * Author: Jeff Forys, University of Utah CSS
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/param.h> #include <sys/param.h>
#include <sys/time.h> #include <sys/time.h>
#include <netinet/in.h> #include <netinet/in.h>
-1
View File
@@ -4,7 +4,6 @@
* There is no copyright, you can use it as you want. * There is no copyright, you can use it as you want.
*/ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/mount.h> #include <sys/mount.h>
#include <sys/file.h> #include <sys/file.h>
-3
View File
@@ -27,9 +27,6 @@
* Mountain View, California 94043 * Mountain View, California 94043
*/ */
#ifndef lint
#endif
/* /*
* rstat service: built with rstat.x and derived from rpc.rstatd.c * rstat service: built with rstat.x and derived from rpc.rstatd.c
* *
-1
View File
@@ -27,7 +27,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
-1
View File
@@ -1,6 +1,5 @@
/* $NetBSD: mdreloc.c,v 1.23 2003/07/26 15:04:38 mrg Exp $ */ /* $NetBSD: mdreloc.c,v 1.23 2003/07/26 15:04:38 mrg Exp $ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/stat.h> #include <sys/stat.h>
#include <sys/mman.h> #include <sys/mman.h>
-1
View File
@@ -32,7 +32,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <stdlib.h> #include <stdlib.h>
+1 -1
View File
@@ -29,7 +29,7 @@
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/sysctl.h> #include <sys/sysctl.h>
-1
View File
@@ -32,7 +32,6 @@
#ifndef _RTLD_AVOID_LIBC_DEPS_H_ #ifndef _RTLD_AVOID_LIBC_DEPS_H_
#define _RTLD_AVOID_LIBC_DEPS_H_ #define _RTLD_AVOID_LIBC_DEPS_H_
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/fcntl.h> #include <sys/fcntl.h>
#include <sys/stat.h> #include <sys/stat.h>
-1
View File
@@ -38,7 +38,6 @@
* John Polstra <jdp@polstra.com>. * John Polstra <jdp@polstra.com>.
*/ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/mount.h> #include <sys/mount.h>
#include <sys/mman.h> #include <sys/mman.h>
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
#include <sys/types.h> #include <sys/types.h>
#include <sys/uio.h> #include <sys/uio.h>
#include <sys/stat.h> #include <sys/stat.h>
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
/* debug print routines */ /* debug print routines */
#include <sys/types.h> #include <sys/types.h>
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
/* /*
* process.c handles the requests, which can be of three types: * process.c handles the requests, which can be of three types:
* ANNOUNCE - announce to a user that a talk is wanted * ANNOUNCE - announce to a user that a talk is wanted
-3
View File
@@ -29,9 +29,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#ifndef lint
#endif /* not lint */
/* /*
* Routines to handle insertion, deletion, etc on the table * Routines to handle insertion, deletion, etc on the table
* of requests kept by the daemon. Nothing fancy here, linear * of requests kept by the daemon. Nothing fancy here, linear
-1
View File
@@ -25,7 +25,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
-1
View File
@@ -25,7 +25,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>
-1
View File
@@ -25,7 +25,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
-1
View File
@@ -25,7 +25,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/types.h> #include <sys/types.h>
#include <sys/socket.h> #include <sys/socket.h>
#include <sys/stat.h> #include <sys/stat.h>
-1
View File
@@ -25,7 +25,6 @@
* SUCH DAMAGE. * SUCH DAMAGE.
*/ */
#include <sys/cdefs.h>
#include <sys/param.h> #include <sys/param.h>
#include <sys/ioctl.h> #include <sys/ioctl.h>
#include <sys/socket.h> #include <sys/socket.h>