diff --git a/build_tools/iwyu.osx.imp b/build_tools/iwyu.osx.imp index e00305fed..f55ba0be4 100644 --- a/build_tools/iwyu.osx.imp +++ b/build_tools/iwyu.osx.imp @@ -1,6 +1,6 @@ # Map file for the include-what-you-use tool on OS X. For some reason # the version installed by HomeBrew doesn't have useful mappings for the -# system provided private headers. +# system provided headers. This also has mappings for FreeBSD. [ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -9,6 +9,7 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -20,6 +21,7 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, @@ -51,32 +53,35 @@ { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, + { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, { include: ["", "private", "", "public"] }, # { include: ["<>", "private", "<>", "public"] }, + { symbol: ["sig_atomic_t", "private", "", "public"] }, + { symbol: ["va_end", "private", "", "public"] }, + { symbol: ["va_list", "private", "", "public"] }, + { symbol: ["va_start", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["NULL", "private", "", "public"] }, { symbol: ["off_t", "private", "", "public"] }, - { symbol: ["size_t", "private", "", "public"] }, - { symbol: ["size_t", "private", "", "public"] }, - { symbol: ["size_t", "private", "", "public"] }, { symbol: ["off_t", "private", "", "public"] }, - { symbol: ["size_t", "private", "", "public"] }, - { symbol: ["ssize_t", "private", "", "public"] }, + { symbol: ["size_t", "private", "", "public"] }, + { symbol: ["ssize_t", "private", "", "public"] }, { symbol: ["intptr_t", "private", "", "public"] }, - { symbol: ["ssize_t", "private", "", "public"] }, { symbol: ["gid_t", "private", "", "public"] }, { symbol: ["uid_t", "private", "", "public"] }, { symbol: ["pid_t", "private", "", "public"] }, @@ -84,11 +89,9 @@ { symbol: ["uid_t", "private", "", "public"] }, { symbol: ["gid_t", "private", "", "public"] }, { symbol: ["timeval", "private", "", "public"] }, - { symbol: ["__uint32_t", "private", "", "public"] }, - { symbol: ["uint32_t", "private", "", "public"] }, + { symbol: ["__uint32_t", "private", "", "public"] }, { symbol: ["uint32_t", "private", "", "public"] }, { symbol: ["intptr_t", "private", "", "public"] }, - { symbol: ["size_t", "private", "", "public"] }, { symbol: ["tparm", "private", "", "public"] }, { symbol: ["ERR", "private", "", "public"] }, { symbol: ["select", "private", "", "public"] }, diff --git a/build_tools/lint.fish b/build_tools/lint.fish index f54b1dd7c..266c15027 100755 --- a/build_tools/lint.fish +++ b/build_tools/lint.fish @@ -76,9 +76,6 @@ if set -q c_files[1] echo ======================================== echo Running IWYU echo ======================================== - # The stderr to stdout redirection is because cppcheck, incorrectly IMHO, writes its - # diagnostic messages to stderr. Anyone running this who wants to capture its output will - # expect those messages to be written to stdout. for c_file in $c_files switch $kernel_name case Darwin FreeBSD diff --git a/src/autoload.cpp b/src/autoload.cpp index 960b586e7..7ecd3cbe9 100644 --- a/src/autoload.cpp +++ b/src/autoload.cpp @@ -4,9 +4,11 @@ #include #include #include +#include #include #include #include + #include #include #include diff --git a/src/builtin.cpp b/src/builtin.cpp index 47d5d2edb..e7470806c 100644 --- a/src/builtin.cpp +++ b/src/builtin.cpp @@ -23,10 +23,10 @@ #include #include #include +#include #include #include #include -#include #include #include #include diff --git a/src/builtin_commandline.cpp b/src/builtin_commandline.cpp index 2ba5b2356..1a81226bb 100644 --- a/src/builtin_commandline.cpp +++ b/src/builtin_commandline.cpp @@ -3,6 +3,7 @@ #include #include +#include #include #include diff --git a/src/builtin_complete.cpp b/src/builtin_complete.cpp index 30fe087be..b80d7e89b 100644 --- a/src/builtin_complete.cpp +++ b/src/builtin_complete.cpp @@ -1,8 +1,9 @@ // Functions used for implementing the complete builtin. #include "config.h" // IWYU pragma: keep -#include +#include #include + #include #include #include diff --git a/src/builtin_printf.cpp b/src/builtin_printf.cpp index b26ecf49f..4f41505e2 100644 --- a/src/builtin_printf.cpp +++ b/src/builtin_printf.cpp @@ -54,6 +54,8 @@ #include #include #include +#include +#include #include #include #include diff --git a/src/builtin_set.cpp b/src/builtin_set.cpp index b89c12e23..9aa5519e2 100644 --- a/src/builtin_set.cpp +++ b/src/builtin_set.cpp @@ -2,12 +2,14 @@ #include "config.h" // IWYU pragma: keep #include +#include #include #include #include #include #include #include + #include #include #include diff --git a/src/builtin_set_color.cpp b/src/builtin_set_color.cpp index 40390ffff..fcbf5b02d 100644 --- a/src/builtin_set_color.cpp +++ b/src/builtin_set_color.cpp @@ -13,7 +13,9 @@ #elif HAVE_NCURSES_TERM_H #include #endif + #include +#include #include #include #include diff --git a/src/builtin_string.cpp b/src/builtin_string.cpp index 3547e88c8..4293b0d06 100644 --- a/src/builtin_string.cpp +++ b/src/builtin_string.cpp @@ -9,10 +9,12 @@ #include #include #include +#include +#include #include -#include #include #include + #include #include #include diff --git a/src/color.cpp b/src/color.cpp index 19cf2228b..235e70841 100644 --- a/src/color.cpp +++ b/src/color.cpp @@ -2,6 +2,7 @@ #include "config.h" // IWYU pragma: keep #include +#include #include #include #include // IWYU pragma: keep diff --git a/src/common.cpp b/src/common.cpp index 174cbd575..db906422e 100644 --- a/src/common.cpp +++ b/src/common.cpp @@ -15,7 +15,6 @@ #include #include #include -#include #include #include #include diff --git a/src/common.h b/src/common.h index 91d4396b4..0d1ee5777 100644 --- a/src/common.h +++ b/src/common.h @@ -6,10 +6,10 @@ #include #include #include // IWYU pragma: keep +#include #include #include #include -#include #include #include #include diff --git a/src/env_universal_common.cpp b/src/env_universal_common.cpp index 0047283cf..47b54cd4c 100644 --- a/src/env_universal_common.cpp +++ b/src/env_universal_common.cpp @@ -15,6 +15,8 @@ #if !defined(__APPLE__) && !defined(__CYGWIN__) #include #endif +#include +#include #include #include #ifdef __CYGWIN__ @@ -26,9 +28,9 @@ #include #include // IWYU pragma: keep #include // IWYU pragma: keep - #include #include + #include #include #include diff --git a/src/event.cpp b/src/event.cpp index 2b0a68c8c..3fb88b43c 100644 --- a/src/event.cpp +++ b/src/event.cpp @@ -2,6 +2,7 @@ #include "config.h" // IWYU pragma: keep #include +#include #include #include diff --git a/src/expand.cpp b/src/expand.cpp index a6bec6e0f..90f3305e6 100644 --- a/src/expand.cpp +++ b/src/expand.cpp @@ -12,13 +12,13 @@ #include #include #include + #ifdef HAVE_SYS_SYSCTL_H #include // IWYU pragma: keep #endif #ifdef SunOS #include #endif -#include #if __APPLE__ #include #else diff --git a/src/fallback.h b/src/fallback.h index cb5775c35..e8ddfec03 100644 --- a/src/fallback.h +++ b/src/fallback.h @@ -7,6 +7,7 @@ // compiling several modules that include this header because they use symbols which are defined as // macros in . // IWYU pragma: no_include +#include #include #include // The following include must be kept despite what IWYU says. That's because of the interaction diff --git a/src/fish.cpp b/src/fish.cpp index 39ebab886..5b74264a4 100644 --- a/src/fish.cpp +++ b/src/fish.cpp @@ -22,6 +22,7 @@ Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA #include #include #include +#include #include #include #include diff --git a/src/fish_key_reader.cpp b/src/fish_key_reader.cpp index b850cbd28..69819ffc1 100644 --- a/src/fish_key_reader.cpp +++ b/src/fish_key_reader.cpp @@ -11,12 +11,14 @@ #include #include #include +#include #include #include #include #include #include #include + #include #include #include diff --git a/src/highlight.h b/src/highlight.h index bffe6ba13..a4fd9b6bd 100644 --- a/src/highlight.h +++ b/src/highlight.h @@ -3,6 +3,7 @@ #define FISH_HIGHLIGHT_H #include +#include #include #include diff --git a/src/history.cpp b/src/history.cpp index 73e511721..31b04263d 100644 --- a/src/history.cpp +++ b/src/history.cpp @@ -6,6 +6,7 @@ #include #include #include +#include #include #include #include diff --git a/src/history.h b/src/history.h index c64625eed..6a29d20ce 100644 --- a/src/history.h +++ b/src/history.h @@ -4,6 +4,7 @@ // IWYU pragma: no_include #include +#include #include #include #include diff --git a/src/parse_tree.h b/src/parse_tree.h index c5652cff0..4f78fd4b0 100644 --- a/src/parse_tree.h +++ b/src/parse_tree.h @@ -4,6 +4,7 @@ #include #include +#include #include #include #include diff --git a/src/parse_util.cpp b/src/parse_util.cpp index 98a0ec65b..eea3680a8 100644 --- a/src/parse_util.cpp +++ b/src/parse_util.cpp @@ -6,7 +6,6 @@ #include #include -#include #include #include diff --git a/src/postfork.h b/src/postfork.h index df0a74cba..0a82a4553 100644 --- a/src/postfork.h +++ b/src/postfork.h @@ -5,6 +5,7 @@ #include "config.h" +#include #include #if HAVE_SPAWN_H #include diff --git a/src/screen.h b/src/screen.h index 3d515a2fb..6ae6f0cb7 100644 --- a/src/screen.h +++ b/src/screen.h @@ -8,13 +8,14 @@ // of text around to handle text insertion. #ifndef FISH_SCREEN_H #define FISH_SCREEN_H +#include "config.h" // IWYU pragma: keep #include #include #include -#include #include +#include #include #include #include diff --git a/src/wildcard.cpp b/src/wildcard.cpp index 15fbe59de..8cc6ca3de 100644 --- a/src/wildcard.cpp +++ b/src/wildcard.cpp @@ -5,10 +5,12 @@ #include #include #include +#include #include #include #include #include + #include #include #include