usr.bin: 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 6bfca4dcab
commit 5e3934b15a
207 changed files with 7 additions and 476 deletions

View File

@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/sbuf.h>
#include <sys/wait.h>

View File

@ -30,7 +30,6 @@
* easy regression testing.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/wait.h>

View File

@ -29,7 +29,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/elf_common.h>

View File

@ -26,7 +26,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <bzlib.h>

View File

@ -34,7 +34,6 @@
* specially.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -77,7 +77,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <ctype.h>

View File

@ -28,9 +28,6 @@
* Mountain View, California 94043
*/
#if 0
#endif
#include <sys/cdefs.h>
/*
* Copyright (C) 1986, Sun Microsystems, Inc.

View File

@ -40,10 +40,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/stat.h>

View File

@ -40,10 +40,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/stat.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stddef.h>
#include "chpass.h"

View File

@ -40,9 +40,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <ctype.h>

View File

@ -32,9 +32,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdint.h>

View File

@ -11,7 +11,6 @@
* Spencer Garrett <srg@quick.com>
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>

View File

@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>

View File

@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <unistd.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <unistd.h>

View File

@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>
#include <limits.h>

View File

@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/mman.h>
#include <sys/stat.h>

View File

@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <capsicum_helpers.h>

View File

@ -44,7 +44,6 @@
* assumption about the input.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <ctype.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <limits.h>
#include <stddef.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <ctype.h>
#include <limits.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <ctype.h>
#include <limits.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <limits.h>
#include <stdio.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include <limits.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <ctype.h>
#include <limits.h>

View File

@ -38,7 +38,6 @@
* Authors: Ken Merry <ken@FreeBSD.org>, Will Andrews <will@FreeBSD.org>
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/callout.h>
#include <sys/ioctl.h>

View File

@ -64,7 +64,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/capsicum.h>
#include <sys/stat.h>

View File

@ -62,9 +62,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/capsicum.h>
#include <sys/procdesc.h>
#include <sys/types.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>

View File

@ -10,7 +10,6 @@
* Upgraded to function properly on 64-bit machines.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdio.h>

View File

@ -29,7 +29,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>

View File

@ -32,8 +32,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -32,8 +32,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/ucred.h>
#include <sys/stat.h>

View File

@ -29,8 +29,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/stat.h>

View File

@ -32,8 +32,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -32,8 +32,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -32,7 +32,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>

View File

@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>
#include <sys/stat.h>

View File

@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/uio.h>

View File

@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -32,10 +32,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/socket.h>
#include <sys/stat.h>

View File

@ -30,7 +30,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/user.h>
#include <sys/stat.h>

View File

@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <err.h>
#include <fcntl.h>
#include <stdio.h>

View File

@ -29,7 +29,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/socket.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include "gprof.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include "gprof.h"

View File

@ -33,7 +33,6 @@
/* From: */
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/mman.h>
#include <sys/stat.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/time.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include "gprof.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include <string.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include <string.h>

View File

@ -31,7 +31,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/mman.h>
#include <sys/stat.h>

View File

@ -34,7 +34,6 @@
* Dodge. It is used in place of <sys/queue.h> to get a better performance.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/queue.h>

View File

@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <assert.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <sys/conf.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <ctype.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <err.h>

View File

@ -28,7 +28,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/capsicum.h>
#include <capsicum_helpers.h>

View File

@ -24,7 +24,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/capsicum.h>
#include <sys/types.h>
#include <sys/sbuf.h>

View File

@ -35,9 +35,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
/*
* Argument scanning and profile reading code. Default parameters are set

View File

@ -35,10 +35,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/capsicum.h>
#include <capsicum_helpers.h>

View File

@ -26,9 +26,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
void add_typename(const char *);
void alloc_typenames(void);
int compute_code_target(void);

View File

@ -35,9 +35,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <ctype.h>
#include <err.h>

View File

@ -35,9 +35,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
/*
* Here we have the token scanner for indent. It scans off one token and puts
* it in the global variable "token". It returns a code, indicating the type

View File

@ -35,9 +35,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include <stdio.h>

View File

@ -35,9 +35,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <err.h>
#include <stdio.h>

View File

@ -32,7 +32,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#define _WANT_SYSVMSG_INTERNALS
#include <sys/msg.h>

View File

@ -30,7 +30,6 @@
* changes in ipcrm.c was done by Edwin Groothuis <edwin@FreeBSD.org>
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#define _WANT_SYSVMSG_INTERNALS

View File

@ -27,7 +27,6 @@
* ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/proc.h>
#define _WANT_SYSVMSG_INTERNALS

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/uio.h>
#include <sys/ktrace.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/jail.h>
#include <sys/stat.h>

View File

@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/file.h>
#include <sys/proc.h>

View File

@ -27,7 +27,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/capsicum.h>
#include <sys/ktr.h>

View File

@ -27,7 +27,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/types.h>

View File

@ -30,7 +30,6 @@
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/wait.h>

View File

@ -31,7 +31,7 @@
/*
* CHARMAP file handling for localedef.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/tree.h>

View File

@ -31,7 +31,7 @@
/*
* LC_COLLATE database generation routines for localedef.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/tree.h>

View File

@ -33,7 +33,7 @@
*/
/* Common header files. */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <stdarg.h>
#include <stdio.h>

View File

@ -25,7 +25,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/wait.h>

View File

@ -40,9 +40,6 @@
* SUCH DAMAGE.
*/
#if 0
#endif
#include <sys/cdefs.h>
/*
* login [ name ]

View File

@ -33,7 +33,6 @@
* @APPLE_BSD_LICENSE_HEADER_END@
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <bsm/libbsm.h>

View File

@ -58,7 +58,6 @@
The Netherlands
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>

View File

@ -5,7 +5,6 @@
*
*/
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/mount.h>
#include <sys/sysctl.h>

View File

@ -35,7 +35,6 @@
* SUCH DAMAGE.
*/
#include <sys/cdefs.h>
#include <sys/types.h>
#include <errno.h>
#include <unistd.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include <sys/wait.h>
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "def.h"
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
/*
* Mail -- a mail program
*

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include <fcntl.h>
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include <sys/file.h>
#include <sys/wait.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include <pwd.h>
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include <errno.h>
#include <fcntl.h>

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include "rcv.h"
#include <ctype.h>
#include "extern.h"

View File

@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/
#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
/*
* Mail -- a mail program
*

Some files were not shown because too many files have changed in this diff Show More