summaryrefslogtreecommitdiffstats
path: root/iwyu
diff options
context:
space:
mode:
authorDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:00:29 +0000
committerDaniel Baumann <daniel.baumann@progress-linux.org>2024-04-28 09:00:29 +0000
commit52e25213825024b8bb446eb26b03bedc9d5c2103 (patch)
treeda70bf44b2423f6f8e9a070c063fed79d190b489 /iwyu
parentInitial commit. (diff)
downloadhtop-52e25213825024b8bb446eb26b03bedc9d5c2103.tar.xz
htop-52e25213825024b8bb446eb26b03bedc9d5c2103.zip
Adding upstream version 3.2.2.upstream/3.2.2upstream
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'iwyu')
-rw-r--r--iwyu/htop.imp24
-rwxr-xr-xiwyu/run_iwyu.sh14
2 files changed, 38 insertions, 0 deletions
diff --git a/iwyu/htop.imp b/iwyu/htop.imp
new file mode 100644
index 0000000..1416d74
--- /dev/null
+++ b/iwyu/htop.imp
@@ -0,0 +1,24 @@
+[
+ { include: ["<curses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+ { include: ["<ncurses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+ { include: ["<ncurses/curses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+ { include: ["<ncurses/ncurses.h>", "private", "\"ProvideCurses.h\"", "public"] },
+
+ { include: ["<bits/types/struct_tm.h>", "private", "<time.h>", "public"] },
+
+ { include: ["<bits/getopt_core.h>", "private", "<unistd.h>", "public"] },
+
+ { include: ["<sys/dirent.h>", "private", "<dirent.h>", "public"] },
+
+ { include: ["<sys/signal.h>", "private", "<signal.h>", "public"] },
+
+ { include: ["<sys/_stdarg.h>", "private", "<stdarg.h>", "public"] },
+
+ { include: ["<sys/limits.h>", "private", "<limits.h>", "public"] },
+
+ { include: ["<x86/_inttypes.h>", "private", "<inttypes.h>", "public"] },
+
+ { include: ["<linux/capability.h>", "private", "<sys/capability.h>", "public"] },
+
+ { include: ["<bits/mman-shared.h>", "private", "<sys/mman.h>", "public"] },
+]
diff --git a/iwyu/run_iwyu.sh b/iwyu/run_iwyu.sh
new file mode 100755
index 0000000..6139ebe
--- /dev/null
+++ b/iwyu/run_iwyu.sh
@@ -0,0 +1,14 @@
+#!/bin/sh
+
+SCRIPT=$(readlink -f "$0")
+SCRIPTDIR=$(dirname "$SCRIPT")
+SOURCEDIR="$SCRIPTDIR/.."
+
+PKG_NL3=$(pkg-config --cflags libnl-3.0)
+
+IWYU=${IWYU:-iwyu}
+
+cd "$SOURCEDIR" || exit
+
+make clean
+make -k -s CC="$IWYU" CFLAGS="-Xiwyu --no_comments -Xiwyu --no_fwd_decl -Xiwyu --mapping_file='$SCRIPTDIR/htop.imp' $PKG_NL3"