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