From 755a512e6a3c2b015b8d54dc98f2f48bb9dd3971 Mon Sep 17 00:00:00 2001 From: Sam James Date: Sun, 29 Jan 2023 05:40:05 +0000 Subject: 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 --- dumpelf.c | 14 -------------- paxelf.c | 14 -------------- paxelf.h | 7 ------- paxinc.c | 8 -------- paxinc.h | 11 +---------- paxldso.c | 17 ----------------- paxldso.h | 4 ---- paxmacho.c | 13 ------------- paxmacho.h | 4 ---- pspax.c | 22 +--------------------- scanelf.c | 23 ----------------------- scanmacho.c | 20 -------------------- seccomp-bpf.c | 1 - seccomp-bpf.h | 2 -- security.c | 13 ------------- security.h | 2 -- xfuncs.c | 7 ------- xfuncs.h | 2 -- 18 files changed, 2 insertions(+), 182 deletions(-) diff --git a/dumpelf.c b/dumpelf.c index 877b0db..4742a50 100644 --- a/dumpelf.c +++ b/dumpelf.c @@ -8,21 +8,7 @@ const char argv0[] = "dumpelf"; -#include -#include -#include -#include -#include -#include -#include -#include -#include - #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); diff --git a/paxelf.c b/paxelf.c index b072ba0..331f1b4 100644 --- a/paxelf.c +++ b/paxelf.c @@ -6,21 +6,7 @@ * Copyright 2005-2012 Mike Frysinger - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "paxinc.h" -#include "elf.h" -#include "paxelf.h" -#include "porting.h" -#include "xfuncs.h" /* * Setup a bunch of helper functions to translate diff --git a/paxelf.h b/paxelf.h index 31ef298..f252969 100644 --- a/paxelf.h +++ b/paxelf.h @@ -11,13 +11,6 @@ #ifndef _PAX_ELF_H #define _PAX_ELF_H -#include -#include -#include -#include - -#include "elf.h" - typedef struct { const void *phdr; const void *shdr; diff --git a/paxinc.c b/paxinc.c index f87e8a6..64a3069 100644 --- a/paxinc.c +++ b/paxinc.c @@ -11,14 +11,6 @@ #define IN_paxinc #include "paxinc.h" -#include -#include -#include -#include -#include - -#include "xfuncs.h" - char do_reverse_endian; /* some of this ar code was taken from busybox */ diff --git a/paxinc.h b/paxinc.h index 52bbefd..3dd163a 100644 --- a/paxinc.h +++ b/paxinc.h @@ -11,16 +11,6 @@ #ifndef _PAX_INC_H #define _PAX_INC_H -#include -#include -#include -#include -#include -#include -#include -#include -#include - #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" diff --git a/paxldso.c b/paxldso.c index d40d7ef..ce7facd 100644 --- a/paxldso.c +++ b/paxldso.c @@ -6,24 +6,7 @@ * Copyright 2004-2016 Mike Frysinger - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "paxinc.h" -#include "elf.h" -#include "paxelf.h" -#include "paxldso.h" -#include "xfuncs.h" /* * ld.so.cache logic diff --git a/paxldso.h b/paxldso.h index fd9f344..91c7eed 100644 --- a/paxldso.h +++ b/paxldso.h @@ -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 */ diff --git a/paxmacho.c b/paxmacho.c index 39db1cb..74f02da 100644 --- a/paxmacho.c +++ b/paxmacho.c @@ -7,20 +7,7 @@ * 2008-2021 Fabian Groffen - */ -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "paxinc.h" -#include "macho.h" -#include "paxmacho.h" -#include "xfuncs.h" /* lil' static string pool */ static const char STR_BE[] = "BE"; diff --git a/paxmacho.h b/paxmacho.h index b109af5..48ac854 100644 --- a/paxmacho.h +++ b/paxmacho.h @@ -12,10 +12,6 @@ #ifndef _PAX_MACHO_H #define _PAX_MACHO_H -#include -#include -#include - #include "macho.h" #define MGET(swapped, value) (swapped ? (__typeof__(value))bswap_32(value) : value) diff --git a/pspax.c b/pspax.c index 369ed37..6094882 100644 --- a/pspax.c +++ b/pspax.c @@ -14,32 +14,12 @@ const char argv0[] = "pspax"; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #include "paxinc.h" -#include "elf.h" -#include "pax_utils_version.h" -#include "paxelf.h" -#include "security.h" +#include #ifdef WANT_SYSCAP # undef _POSIX_SOURCE # include - # define WRAP_SYSCAP(x) x #else # define WRAP_SYSCAP(x) diff --git a/scanelf.c b/scanelf.c index d6bb14b..50497b2 100644 --- a/scanelf.c +++ b/scanelf.c @@ -8,30 +8,7 @@ const char argv0[] = "scanelf"; -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #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 -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - #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 #include -#include #include #include #include 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 - #if defined(__aarch64__) /* AARCH64 */ #define SECCOMP_BPF_AVAILABLE diff --git a/security.c b/security.c index f1a34df..19bf78f 100644 --- a/security.c +++ b/security.c @@ -5,21 +5,8 @@ * Copyright 2015 Mike Frysinger - */ -#include - -#ifdef WANT_SECCOMP -#include -#include -#endif - -#include -#include -#include -#include - #include "paxinc.h" #include "seccomp-bpf.h" -#include "security.h" #ifdef __linux__ diff --git a/security.h b/security.h index ef2e82a..65e1ad5 100644 --- a/security.h +++ b/security.h @@ -9,8 +9,6 @@ #ifndef _PAX_SECURITY_H #define _PAX_SECURITY_H -#include - /* Whether to enable features that significantly impact speed. */ #ifdef SLOW_SECURITY # define USE_SLOW_SECURITY 1 diff --git a/xfuncs.c b/xfuncs.c index a68756b..cd73dfa 100644 --- a/xfuncs.c +++ b/xfuncs.c @@ -6,14 +6,7 @@ * Copyright 2004-2012 Mike Frysinger - */ -#include -#include -#include -#include -#include - #include "paxinc.h" -#include "xfuncs.h" char *xstrdup(const char *s) { diff --git a/xfuncs.h b/xfuncs.h index 5781d61..61577ec 100644 --- a/xfuncs.h +++ b/xfuncs.h @@ -9,8 +9,6 @@ #ifndef __XFUNCS_H__ #define __XFUNCS_H__ -#include - char *xstrdup(const char *s); void *xmalloc(size_t size); void *xzalloc(size_t size); -- cgit v1.2.3-65-gdbad