Skip to content

Commit

Permalink
bin: Automated cleanup of cdefs and other formatting
Browse files Browse the repository at this point in the history
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
  • Loading branch information
bsdimp committed Nov 27, 2023
1 parent 0b8224d commit e043f37
Show file tree
Hide file tree
Showing 69 changed files with 0 additions and 180 deletions.
1 change: 0 additions & 1 deletion bin/cat/cat.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/capsicum.h>
#include <sys/param.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/cp/utils.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/acl.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion bin/date/date.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/dd/args.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/param.h>

#include <ctype.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/dd/conv.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/param.h>

#include <err.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/dd/conv_tab.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>

#include <signal.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/dd/misc.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>

#include <err.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/dd/position.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/mtio.h>

Expand Down
1 change: 0 additions & 1 deletion bin/ed/glbl.c
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/wait.h>
Expand Down
2 changes: 0 additions & 2 deletions bin/getfacl/getfacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,8 +30,6 @@
* and send the results to stdout
*/


#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/acl.h>
Expand Down
1 change: 0 additions & 1 deletion bin/kenv/kenv.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/sysctl.h>
#include <err.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/ls/cmp.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>

Expand Down
3 changes: 0 additions & 3 deletions bin/ls/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/stat.h>
#include <sys/acl.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/ls/util.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>

Expand Down
3 changes: 0 additions & 3 deletions bin/pax/ar_io.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/ioctl.h>
#include <sys/mtio.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/ar_subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/buf_subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <errno.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/cache.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <string.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/cpio.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/file_subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/ftree.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/gen_subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion bin/pax/getoldopt.c
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@
* in the Public Domain for your edification and enjoyment.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
Expand Down
4 changes: 0 additions & 4 deletions bin/pax/options.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,10 +33,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <sys/mtio.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/pat_rep.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <stdio.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/sel_subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/tables.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/tar.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/stat.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/pax/tty_subs.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/stat.h>
#include <fcntl.h>
Expand Down
1 change: 0 additions & 1 deletion bin/pkill/pkill.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,6 @@
* POSSIBILITY OF SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/param.h>
#include <sys/sysctl.h>
Expand Down
4 changes: 0 additions & 4 deletions bin/ps/fmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/time.h>
#include <sys/resource.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/ps/keyword.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif
#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/resource.h>
Expand Down
4 changes: 0 additions & 4 deletions bin/ps/nlist.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/sysctl.h>

Expand Down
4 changes: 0 additions & 4 deletions bin/ps/print.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,10 +29,6 @@
* SUCH DAMAGE.
*/

#if 0
#endif

#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/time.h>
#include <sys/resource.h>
Expand Down
1 change: 0 additions & 1 deletion bin/pwait/pwait.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
* OF SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/event.h>
#include <sys/time.h>
Expand Down
1 change: 0 additions & 1 deletion bin/realpath/realpath.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/param.h>

#include <err.h>
Expand Down
1 change: 0 additions & 1 deletion bin/setfacl/file.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/acl.h>

Expand Down
1 change: 0 additions & 1 deletion bin/setfacl/mask.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/acl.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion bin/setfacl/merge.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/acl.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion bin/setfacl/remove.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/types.h>
#include <sys/acl.h>
#include <sys/stat.h>
Expand Down
1 change: 0 additions & 1 deletion bin/setfacl/setfacl.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@
* SUCH DAMAGE.
*/

#include <sys/cdefs.h>
#include <sys/param.h>
#include <sys/acl.h>
#include <sys/queue.h>
Expand Down
3 changes: 0 additions & 3 deletions bin/sh/alias.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,6 @@
* SUCH DAMAGE.
*/

#ifndef lint
#endif /* not lint */
#include <sys/cdefs.h>
#include <stdlib.h>
#include "shell.h"
#include "output.h"
Expand Down
Loading

0 comments on commit e043f37

Please sign in to comment.