]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove includes that are redundant after system.h introduction
authorJoel Rosdahl <joel@rosdahl.net>
Sun, 29 Aug 2010 10:02:44 +0000 (12:02 +0200)
committerJoel Rosdahl <joel@rosdahl.net>
Sun, 29 Aug 2010 10:02:44 +0000 (12:02 +0200)
18 files changed:
args.c
ccache.c
cleanup.c
counters.c
execute.c
exitfn.c
hash.c
hashutil.c
lockfile.c
manifest.c
mdfour.c
system.h
test/framework.c
test/framework.h
test/main.c
test/util.c
unify.c
util.c

diff --git a/args.c b/args.c
index 41d763c3dd4d84094b77c857b4b48ddd3c5056e7..234836be4af2f17cfcba4b87e2600567f56cb844 100644 (file)
--- a/args.c
+++ b/args.c
 
 #include "ccache.h"
 
-#include <assert.h>
-#include <stdlib.h>
-#include <string.h>
-
 struct args *
 args_init(int init_argc, char **init_args)
 {
index 3bc717b207b27ee936e1a940b88f7eb28ab01a12..9e1516130f8bc89e6fa85155c2cdc26c3fce9e9e 100644 (file)
--- a/ccache.c
+++ b/ccache.c
 #include "language.h"
 #include "manifest.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <stdio.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
 static const char VERSION_TEXT[] =
 MYNAME " version %s\n"
 "\n"
index 69f4954b40152d9eb5c567b0c32631e0b18e1e29..1cf729d74371a847e475c932b83037fed1b97e18 100644 (file)
--- a/cleanup.c
+++ b/cleanup.c
 
 #include "ccache.h"
 
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
-#include <time.h>
-
 /*
  * 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
index d237522fb6747092d1f5fb44acb4530571495d91..91531626ac4967fc63e7eced5cec4a8d434d36ce 100644 (file)
@@ -19,7 +19,6 @@
 /* A simple array of unsigned integers used for the statistics counters. */
 
 #include "ccache.h"
-#include <stdlib.h>
 
 /*
  * Allocate and initialize a struct counters. Data entries up to the size are
index 45b1469c246c6ecfcdb1270e3d717005992be4f3..a97239195ae7cc39026a6d05fcf8c991ac2ee7d2 100644 (file)
--- a/execute.c
+++ b/execute.c
 
 #include "ccache.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_SYS_WAIT_H
-#include <sys/wait.h>
-#endif
-#include <fcntl.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <unistd.h>
-
 static char *
 find_executable_in_path(const char *name, const char *exclude_name, char *path);
 
index 6def242de86375c133ebebf06a6d1f4eb22c23be..1393f3dd1bc7e5b2735020264d6bb02b9a2a9df3 100644 (file)
--- a/exitfn.c
+++ b/exitfn.c
@@ -17,9 +17,6 @@
  */
 
 #include "ccache.h"
-#include <stdlib.h>
-#include <string.h>
-#include <errno.h>
 
 struct exit_function {
        void (*function)(void *);
diff --git a/hash.c b/hash.c
index 0e43f862003ab658c70f0851da2649dcc92f5ae1..f6a3dc2d1d4a4de5e3cb9b9da5320d32021381e0 100644 (file)
--- a/hash.c
+++ b/hash.c
 
 #include "ccache.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <fcntl.h>
-#include <stdio.h>
-#include <string.h>
-#include <unistd.h>
-
 #define HASH_DELIMITER "\000cCaChE"
 
 void
index f7c72f03c0467d18f11860dccfdb7656342573b2..fd753329dc4df03ac9fdb9477b70252d3e219b0a 100644 (file)
 #include "hashutil.h"
 #include "murmurhashneutral2.h"
 
-#include <errno.h>
-#include <fcntl.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
-#include <sys/types.h>
-#include <sys/wait.h>
-
 unsigned
 hash_from_string(void *str)
 {
index bc6d2cdeccc6acca94e4e9edf234c7122dc4dbfb..73300f5c8671e15fbc0784488f8a95bef1fc001a 100644 (file)
  */
 
 #include "ccache.h"
-#include <errno.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
 
 /*
  * This function acquires a lockfile for the given path. Returns true if the
index 50cf564c9ea2e23d1381aabf40c7a889ef0a5a6e..b016fecd7014fd8d6c3a04bdda33ebdb89eebed5 100644 (file)
 #include "manifest.h"
 #include "murmurhashneutral2.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <assert.h>
-#include <fcntl.h>
-#include <inttypes.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <unistd.h>
 #include <zlib.h>
 
 /*
index 541e8577275306939be732c9cd01babf16e53442..6547dc07053a94024308be882ac0893f05e6fcd6 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -18,9 +18,6 @@
 
 #include "ccache.h"
 
-#include <stdlib.h>
-#include <string.h>
-
 /* NOTE: This code makes no attempt to be fast! */
 
 static struct mdfour *m;
index cc50b1d09c80a0e79064ee18a782ec9ba8208ff6..bf46c4661b791a8d3b1c3928a953d95abe980388 100644 (file)
--- a/system.h
+++ b/system.h
 #define CCACHE_SYSTEM_H
 
 #include "config.h"
+
 #include <sys/file.h>
+#ifdef HAVE_SYS_MMAN_H
+#include <sys/mman.h>
+#endif
 #include <sys/stat.h>
 #include <sys/types.h>
+#ifdef HAVE_SYS_WAIT_H
+#include <sys/wait.h>
+#endif
+
+#include <assert.h>
+#include <ctype.h>
+#include <dirent.h>
+#include <errno.h>
+#include <fcntl.h>
 #include <inttypes.h>
 #include <stdarg.h>
 #include <stddef.h>
@@ -30,5 +43,7 @@
 #include <stdlib.h>
 #include <string.h>
 #include <unistd.h>
+#include <time.h>
+#include <utime.h>
 
 #endif /* CCACHE_SYSTEM_H */
index f3fae2762306efbbe8cf089171a2be8a1338f0c2..0398831ee726ed6b14af5c71863d3ec5756752bc 100644 (file)
@@ -18,8 +18,7 @@
 
 #include "ccache.h"
 #include "test/framework.h"
-#include <errno.h>
-#include <stdio.h>
+
 #if defined(HAVE_TERMIOS_H)
 #define USE_COLOR
 #include <termios.h>
index e78b47b4a2560316b37d125857e1a5f3fab27d52..ab3e6076e6570802b89f0d5754b273f02766044e 100644 (file)
@@ -20,8 +20,6 @@
 #define TEST_FRAMEWORK_H
 
 #include "ccache.h"
-#include <string.h>
-#include <stdlib.h>
 
 /*****************************************************************************/
 
index 0de08b5c48f917a1a9e5dce904af2bbe27f60abe..739d45255eadc8235b22532013c7923860d2843f 100644 (file)
  */
 
 #include "test/framework.h"
+#ifdef HAVE_GETOPT_LONG
+#include <getopt.h>
+#else
 #include "getopt_long.h"
-#include <stdlib.h>
-#include <stdio.h>
+#endif
 
 #define SUITE(name) unsigned suite_##name(unsigned);
 #include "test/suites.h"
index 370fd4bde8a351a243188590e64c3ca61d8a71f0..f714032245c24b9c053e98ec3f5db5fb889ed3b6 100644 (file)
  * Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA
  */
 
-#include <errno.h>
-#include <stdio.h>
-#include <string.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <unistd.h>
-#include <fcntl.h>
-#include <stdlib.h>
+#include "system.h"
 
 int
 path_exists(const char *path)
diff --git a/unify.c b/unify.c
index 4b5b868d5843cf7f2b67328919ffdbf3385bae96..9364553e37ee925766d89bd652fdda7d3b46f0a7 100644 (file)
--- a/unify.c
+++ b/unify.c
 
 #include "ccache.h"
 
-#include <sys/types.h>
-#include <ctype.h>
-#include <fcntl.h>
-#include <string.h>
-#include <unistd.h>
-#include <stdlib.h>
-
 static const char *const s_tokens[] = {
        "...", ">>=", "<<=", "+=", "-=", "*=", "/=", "%=", "&=", "^=",
        "|=",  ">>",  "<<",  "++", "--", "->", "&&", "||", "<=", ">=",
diff --git a/util.c b/util.c
index 319aa191fb3f88d420f8fec46b48d8968fa89261..ddf0db0d6eaefd1c0de368c12d658804836040ca 100644 (file)
--- a/util.c
+++ b/util.c
 
 #include "ccache.h"
 
-#include <sys/types.h>
-#include <sys/stat.h>
-#ifdef HAVE_SYS_MMAN_H
-#include <sys/mman.h>
-#endif
-#include <fcntl.h>
-#include <ctype.h>
-#include <unistd.h>
-#include <stdarg.h>
-#include <dirent.h>
-#include <utime.h>
-#include <errno.h>
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
-#include <time.h>
 #include <zlib.h>
 
 #ifdef HAVE_PWD_H