From: Joel Rosdahl Date: Sun, 29 Aug 2010 10:02:44 +0000 (+0200) Subject: Remove includes that are redundant after system.h introduction X-Git-Tag: v3.1~37 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=1b298bb748ebb5575f30a2d113f9c1f82936e918;p=thirdparty%2Fccache.git Remove includes that are redundant after system.h introduction --- diff --git a/args.c b/args.c index 41d763c3d..234836be4 100644 --- a/args.c +++ b/args.c @@ -18,10 +18,6 @@ #include "ccache.h" -#include -#include -#include - struct args * args_init(int init_argc, char **init_args) { diff --git a/ccache.c b/ccache.c index 3bc717b20..9e1516130 100644 --- a/ccache.c +++ b/ccache.c @@ -31,17 +31,6 @@ #include "language.h" #include "manifest.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include - static const char VERSION_TEXT[] = MYNAME " version %s\n" "\n" diff --git a/cleanup.c b/cleanup.c index 69f4954b4..1cf729d74 100644 --- a/cleanup.c +++ b/cleanup.c @@ -19,13 +19,6 @@ #include "ccache.h" -#include -#include -#include -#include -#include -#include - /* * When "max files" or "max cache size" is reached, one of the 16 cache * subdirectories is cleaned up. When doing so, files are deleted (in LRU diff --git a/counters.c b/counters.c index d237522fb..91531626a 100644 --- a/counters.c +++ b/counters.c @@ -19,7 +19,6 @@ /* A simple array of unsigned integers used for the statistics counters. */ #include "ccache.h" -#include /* * Allocate and initialize a struct counters. Data entries up to the size are diff --git a/execute.c b/execute.c index 45b1469c2..a97239195 100644 --- a/execute.c +++ b/execute.c @@ -18,18 +18,6 @@ #include "ccache.h" -#include -#include -#ifdef HAVE_SYS_WAIT_H -#include -#endif -#include -#include -#include -#include -#include -#include - static char * find_executable_in_path(const char *name, const char *exclude_name, char *path); diff --git a/exitfn.c b/exitfn.c index 6def242de..1393f3dd1 100644 --- a/exitfn.c +++ b/exitfn.c @@ -17,9 +17,6 @@ */ #include "ccache.h" -#include -#include -#include struct exit_function { void (*function)(void *); diff --git a/hash.c b/hash.c index 0e43f8620..f6a3dc2d1 100644 --- a/hash.c +++ b/hash.c @@ -19,13 +19,6 @@ #include "ccache.h" -#include -#include -#include -#include -#include -#include - #define HASH_DELIMITER "\000cCaChE" void diff --git a/hashutil.c b/hashutil.c index f7c72f03c..fd753329d 100644 --- a/hashutil.c +++ b/hashutil.c @@ -20,14 +20,6 @@ #include "hashutil.h" #include "murmurhashneutral2.h" -#include -#include -#include -#include -#include -#include -#include - unsigned hash_from_string(void *str) { diff --git a/lockfile.c b/lockfile.c index bc6d2cdec..73300f5c8 100644 --- a/lockfile.c +++ b/lockfile.c @@ -17,10 +17,6 @@ */ #include "ccache.h" -#include -#include -#include -#include /* * This function acquires a lockfile for the given path. Returns true if the diff --git a/manifest.c b/manifest.c index 50cf564c9..b016fecd7 100644 --- a/manifest.c +++ b/manifest.c @@ -22,15 +22,6 @@ #include "manifest.h" #include "murmurhashneutral2.h" -#include -#include -#include -#include -#include -#include -#include -#include -#include #include /* diff --git a/mdfour.c b/mdfour.c index 541e85772..6547dc070 100644 --- a/mdfour.c +++ b/mdfour.c @@ -18,9 +18,6 @@ #include "ccache.h" -#include -#include - /* NOTE: This code makes no attempt to be fast! */ static struct mdfour *m; diff --git a/system.h b/system.h index cc50b1d09..bf46c4661 100644 --- a/system.h +++ b/system.h @@ -20,9 +20,22 @@ #define CCACHE_SYSTEM_H #include "config.h" + #include +#ifdef HAVE_SYS_MMAN_H +#include +#endif #include #include +#ifdef HAVE_SYS_WAIT_H +#include +#endif + +#include +#include +#include +#include +#include #include #include #include @@ -30,5 +43,7 @@ #include #include #include +#include +#include #endif /* CCACHE_SYSTEM_H */ diff --git a/test/framework.c b/test/framework.c index f3fae2762..0398831ee 100644 --- a/test/framework.c +++ b/test/framework.c @@ -18,8 +18,7 @@ #include "ccache.h" #include "test/framework.h" -#include -#include + #if defined(HAVE_TERMIOS_H) #define USE_COLOR #include diff --git a/test/framework.h b/test/framework.h index e78b47b4a..ab3e6076e 100644 --- a/test/framework.h +++ b/test/framework.h @@ -20,8 +20,6 @@ #define TEST_FRAMEWORK_H #include "ccache.h" -#include -#include /*****************************************************************************/ diff --git a/test/main.c b/test/main.c index 0de08b5c4..739d45255 100644 --- a/test/main.c +++ b/test/main.c @@ -18,9 +18,11 @@ */ #include "test/framework.h" +#ifdef HAVE_GETOPT_LONG +#include +#else #include "getopt_long.h" -#include -#include +#endif #define SUITE(name) unsigned suite_##name(unsigned); #include "test/suites.h" diff --git a/test/util.c b/test/util.c index 370fd4bde..f71403224 100644 --- a/test/util.c +++ b/test/util.c @@ -16,14 +16,7 @@ * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA */ -#include -#include -#include -#include -#include -#include -#include -#include +#include "system.h" int path_exists(const char *path) diff --git a/unify.c b/unify.c index 4b5b868d5..9364553e3 100644 --- a/unify.c +++ b/unify.c @@ -32,13 +32,6 @@ #include "ccache.h" -#include -#include -#include -#include -#include -#include - static const char *const s_tokens[] = { "...", ">>=", "<<=", "+=", "-=", "*=", "/=", "%=", "&=", "^=", "|=", ">>", "<<", "++", "--", "->", "&&", "||", "<=", ">=", diff --git a/util.c b/util.c index 319aa191f..ddf0db0d6 100644 --- a/util.c +++ b/util.c @@ -19,22 +19,6 @@ #include "ccache.h" -#include -#include -#ifdef HAVE_SYS_MMAN_H -#include -#endif -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include -#include #include #ifdef HAVE_PWD_H