diff options
author | Sam James <sam@gentoo.org> | 2023-01-29 05:40:05 +0000 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2023-01-29 05:56:32 +0000 |
commit | 755a512e6a3c2b015b8d54dc98f2f48bb9dd3971 (patch) | |
tree | db89c83c7bf0972b80df309bb8f04bb14d08fd73 | |
parent | .github: add Alpine CI (diff) | |
download | pax-utils-755a512e6a3c2b015b8d54dc98f2f48bb9dd3971.tar.gz pax-utils-755a512e6a3c2b015b8d54dc98f2f48bb9dd3971.tar.bz2 pax-utils-755a512e6a3c2b015b8d54dc98f2f48bb9dd3971.zip |
Undo IWYU fixes
I wasn't paying enough attention, it's better to just fold the needed
bits into porting.h.
This reverts commit ffedc60fa41d307bda28fd108e6ff1b8da1fc2ee.
This reverts commit f8287200aec0ca33ef07fafcdd5aef0aa6eb1306.
This reverts commit aa907a42d89ddfd5a7e64d8182a1da35277f2f6e.
Bug: https://github.com/gentoo/pax-utils/pull/11#issuecomment-1407566344
Signed-off-by: Sam James <sam@gentoo.org>
-rw-r--r-- | dumpelf.c | 14 | ||||
-rw-r--r-- | paxelf.c | 14 | ||||
-rw-r--r-- | paxelf.h | 7 | ||||
-rw-r--r-- | paxinc.c | 8 | ||||
-rw-r--r-- | paxinc.h | 11 | ||||
-rw-r--r-- | paxldso.c | 17 | ||||
-rw-r--r-- | paxldso.h | 4 | ||||
-rw-r--r-- | paxmacho.c | 13 | ||||
-rw-r--r-- | paxmacho.h | 4 | ||||
-rw-r--r-- | pspax.c | 22 | ||||
-rw-r--r-- | scanelf.c | 23 | ||||
-rw-r--r-- | scanmacho.c | 20 | ||||
-rw-r--r-- | seccomp-bpf.c | 1 | ||||
-rw-r--r-- | seccomp-bpf.h | 2 | ||||
-rw-r--r-- | security.c | 13 | ||||
-rw-r--r-- | security.h | 2 | ||||
-rw-r--r-- | xfuncs.c | 7 | ||||
-rw-r--r-- | xfuncs.h | 2 |
18 files changed, 2 insertions, 182 deletions
@@ -8,21 +8,7 @@ const char argv0[] = "dumpelf"; -#include <getopt.h> -#include <inttypes.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <time.h> -#include <unistd.h> - #include "paxinc.h" -#include "elf.h" -#include "pax_utils_version.h" -#include "porting.h" -#include "security.h" /* prototypes */ static void dump_ehdr(const elfobj *elf, const void *ehdr); @@ -6,21 +6,7 @@ * Copyright 2005-2012 Mike Frysinger - <vapier@gentoo.org> */ -#include <fcntl.h> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <unistd.h> - #include "paxinc.h" -#include "elf.h" -#include "paxelf.h" -#include "porting.h" -#include "xfuncs.h" /* * Setup a bunch of helper functions to translate @@ -11,13 +11,6 @@ #ifndef _PAX_ELF_H #define _PAX_ELF_H -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> -#include <sys/types.h> - -#include "elf.h" - typedef struct { const void *phdr; const void *shdr; @@ -11,14 +11,6 @@ #define IN_paxinc #include "paxinc.h" -#include <alloca.h> -#include <stddef.h> -#include <fcntl.h> -#include <sys/stat.h> -#include <unistd.h> - -#include "xfuncs.h" - char do_reverse_endian; /* some of this ar code was taken from busybox */ @@ -11,16 +11,6 @@ #ifndef _PAX_INC_H #define _PAX_INC_H -#include <byteswap.h> -#include <errno.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/types.h> -#include <stdint.h> - #include "porting.h" #include "xfuncs.h" #include "security.h" @@ -45,6 +35,7 @@ #include "elf.h" #include "paxelf.h" #include "paxldso.h" + /* Mach-O love */ #include "macho.h" #include "paxmacho.h" @@ -6,24 +6,7 @@ * Copyright 2004-2016 Mike Frysinger - <vapier@gentoo.org> */ -#include <ctype.h> -#include <fcntl.h> -#include <glob.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <unistd.h> - #include "paxinc.h" -#include "elf.h" -#include "paxelf.h" -#include "paxldso.h" -#include "xfuncs.h" /* * ld.so.cache logic @@ -9,10 +9,6 @@ #ifndef _PAX_LDSO_H #define _PAX_LDSO_H -#include "paxelf.h" -#include "porting.h" -#include "xfuncs.h" - /* * ld.so.cache logic */ @@ -7,20 +7,7 @@ * 2008-2021 Fabian Groffen - <grobian@gentoo.org> */ -#include <byteswap.h> -#include <fcntl.h> -#include <stddef.h> -#include <stdint.h> -#include <stdlib.h> -#include <string.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <unistd.h> - #include "paxinc.h" -#include "macho.h" -#include "paxmacho.h" -#include "xfuncs.h" /* lil' static string pool */ static const char STR_BE[] = "BE"; @@ -12,10 +12,6 @@ #ifndef _PAX_MACHO_H #define _PAX_MACHO_H -#include <stddef.h> -#include <byteswap.h> -#include <stdint.h> - #include "macho.h" #define MGET(swapped, value) (swapped ? (__typeof__(value))bswap_32(value) : value) @@ -14,32 +14,12 @@ const char argv0[] = "pspax"; -#include <grp.h> -#include <ctype.h> -#include <dirent.h> -#include <fcntl.h> -#include <getopt.h> -#include <pwd.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <strings.h> -#include <sys/stat.h> -#include <unistd.h> - #include "paxinc.h" -#include "elf.h" -#include "pax_utils_version.h" -#include "paxelf.h" -#include "security.h" +#include <grp.h> #ifdef WANT_SYSCAP # undef _POSIX_SOURCE # include <sys/capability.h> - # define WRAP_SYSCAP(x) x #else # define WRAP_SYSCAP(x) @@ -8,30 +8,7 @@ const char argv0[] = "scanelf"; -#include <ctype.h> -#include <dirent.h> -#include <errno.h> -#include <fcntl.h> -#include <fnmatch.h> -#include <getopt.h> -#include <inttypes.h> -#include <regex.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <unistd.h> - #include "paxinc.h" -#include "elf.h" -#include "pax_utils_version.h" -#include "paxldso.h" -#include "porting.h" -#include "security.h" -#include "xfuncs.h" #define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') diff --git a/scanmacho.c b/scanmacho.c index c38c5ed..e2aa485 100644 --- a/scanmacho.c +++ b/scanmacho.c @@ -11,27 +11,7 @@ const char argv0[] = "scanmacho"; -#include <dirent.h> -#include <errno.h> -#include <fcntl.h> -#include <getopt.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdint.h> -#include <stdio.h> -#include <stdlib.h> -#include <string.h> -#include <sys/mman.h> -#include <sys/stat.h> -#include <unistd.h> - #include "paxinc.h" -#include "macho.h" -#include "pax_utils_version.h" -#include "paxmacho.h" -#include "porting.h" -#include "security.h" -#include "xfuncs.h" #define IS_MODIFIER(c) (c == '%' || c == '#' || c == '+') diff --git a/seccomp-bpf.c b/seccomp-bpf.c index 7c3923f..1d64172 100644 --- a/seccomp-bpf.c +++ b/seccomp-bpf.c @@ -11,7 +11,6 @@ const char argv0[] = "seccomp-bpf"; #include <err.h> #include <stdio.h> -#include <stddef.h> #include <stdlib.h> #include <unistd.h> #include <sys/mman.h> diff --git a/seccomp-bpf.h b/seccomp-bpf.h index 21499f7..80d6d94 100644 --- a/seccomp-bpf.h +++ b/seccomp-bpf.h @@ -4,8 +4,6 @@ * See seccomp-bpf.c for details. */ #undef SECCOMP_BPF_AVAILABLE -#include <stdint.h> - #if defined(__aarch64__) /* AARCH64 */ #define SECCOMP_BPF_AVAILABLE @@ -5,21 +5,8 @@ * Copyright 2015 Mike Frysinger - <vapier@gentoo.org> */ -#include <errno.h> - -#ifdef WANT_SECCOMP -#include <linux/seccomp.h> -#include <linux/securebits.h> -#endif - -#include <sched.h> -#include <stdbool.h> -#include <sys/prctl.h> -#include <unistd.h> - #include "paxinc.h" #include "seccomp-bpf.h" -#include "security.h" #ifdef __linux__ @@ -9,8 +9,6 @@ #ifndef _PAX_SECURITY_H #define _PAX_SECURITY_H -#include <stdbool.h> - /* Whether to enable features that significantly impact speed. */ #ifdef SLOW_SECURITY # define USE_SLOW_SECURITY 1 @@ -6,14 +6,7 @@ * Copyright 2004-2012 Mike Frysinger - <vapier@gentoo.org> */ -#include <errno.h> -#include <stdbool.h> -#include <stddef.h> -#include <stdlib.h> -#include <string.h> - #include "paxinc.h" -#include "xfuncs.h" char *xstrdup(const char *s) { @@ -9,8 +9,6 @@ #ifndef __XFUNCS_H__ #define __XFUNCS_H__ -#include <stddef.h> - char *xstrdup(const char *s); void *xmalloc(size_t size); void *xzalloc(size_t size); |