]> git.ipfire.org Git - thirdparty/ccache.git/commitdiff
Remove standard includes from ccache.h
authorJoel Rosdahl <joel@rosdahl.net>
Wed, 17 Feb 2010 19:53:05 +0000 (20:53 +0100)
committerJoel Rosdahl <joel@rosdahl.net>
Wed, 17 Feb 2010 20:03:27 +0000 (21:03 +0100)
12 files changed:
args.c
ccache.c
ccache.h
cleanup.c
comments.c
execute.c
hash.c
manifest.c
mdfour.c
stats.c
unify.c
util.c

diff --git a/args.c b/args.c
index f629640f04b850a7cb41ad07a9d78072467c9b17..53939bde2fd2a7b92fe91c4db2d2121eff0eb855 100644 (file)
--- a/args.c
+++ b/args.c
@@ -20,6 +20,9 @@
 
 #include "ccache.h"
 
+#include <stdlib.h>
+#include <string.h>
+
 ARGS *args_init(int init_argc, char **init_args)
 {
        ARGS *args;
index bae31443607bff343002f52c1b55b7a6999cbd6a..5ed438887fb1063748e2f8153c332619d7e841fc 100644 (file)
--- a/ccache.c
+++ b/ccache.c
 #include "manifest.h"
 #include "comments.h"
 
+#include <sys/mman.h>
+#include <errno.h>
+#include <stdlib.h>
+#include <stdio.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
+
 /* current working directory taken from $PWD, or getcwd() if $PWD is bad */
 char *current_working_dir;
 
index a44f866dd7792744019b66e2f031347efe7f832a..41b5ff0e36babbd5c6c5c5994aae104a21336872 100644 (file)
--- a/ccache.h
+++ b/ccache.h
@@ -4,32 +4,9 @@
 #define CCACHE_VERSION "3.0pre0"
 
 #include "config.h"
+#include "mdfour.h"
 
-#include <stdio.h>
-#include <unistd.h>
-#include <stdlib.h>
-#include <errno.h>
-#include <sys/types.h>
-#include <sys/stat.h>
-#include <sys/wait.h>
-#include <sys/mman.h>
-#include <fcntl.h>
-#include <time.h>
-#include <string.h>
-#include <ctype.h>
-#include <utime.h>
-#include <stdarg.h>
-#include <dirent.h>
-#include <limits.h>
 #include <sys/file.h>
-#ifdef HAVE_PWD_H
-#include <pwd.h>
-#endif
-#ifdef HAVE_SYS_TIME_H
-#include <sys/time.h>
-#endif
-
-#include <zlib.h>
 
 #ifdef __GNUC__
 #define ATTR_FORMAT(x, y, z) __attribute__((format (x, y, z)))
@@ -81,8 +58,6 @@ enum stats {
        STATS_END
 };
 
-#include "mdfour.h"
-
 void hash_start(struct mdfour *md);
 void hash_string(struct mdfour *md, const char *s);
 void hash_int(struct mdfour *md, int x);
index 170b625d6e7c20ea617d3503fba3e704d9931303..98e62d9609245687a38db6de1b35f1ff9ce72473 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>
+
 static struct files {
        char *fname;
        time_t mtime;
index daf9d8f6da77eed20f88f6cd5e92dcf83e2d2235..378d0d7214ccb1f662e3e560114276f465241afb 100644 (file)
@@ -19,6 +19,9 @@
 #include "ccache.h"
 #include "comments.h"
 
+#include <unistd.h>
+#include <sys/mman.h>
+
 #define HASH(ch)                                                       \
        do {                                                            \
                hashbuf[hashbuflen] = ch;                               \
index 3f936ea33b0c31871dae6cdf40600a098fc7f3f5..ec170a4f550fd696e995fc67b473ec868da26b57 100644 (file)
--- a/execute.c
+++ b/execute.c
 
 #include "ccache.h"
 
+#include <sys/types.h>
+#include <sys/wait.h>
+#include <stdlib.h>
+#include <string.h>
+#include <time.h>
+#include <unistd.h>
 
 /*
   execute a compiler backend, capturing all output to the given paths
diff --git a/hash.c b/hash.c
index 89addc4523e58143d6e2621f773005716da6b81b..f63cfae97001e784d9d9af79c5792a61b38d0115 100644 (file)
--- a/hash.c
+++ b/hash.c
 */
 
 #include "ccache.h"
+
 #include <stdio.h>
+#include <string.h>
+#include <unistd.h>
 
 void hash_buffer(struct mdfour *md, const char *s, int len)
 {
index 3265e87cfd9900fc166dc77c14261b3ffda07251..32779ce7f6fafc3d5999fb183032a688ddfb1506 100644 (file)
  * Ave, Cambridge, MA 02139, USA.
  */
 
+#include "ccache.h"
+#include "hashtable_itr.h"
+#include "hashutil.h"
+#include "manifest.h"
+#include "murmurhashneutral2.h"
+#include "comments.h"
+
 #include <assert.h>
 #include <inttypes.h>
+#include <stdio.h>
+#include <stdlib.h>
 #include <string.h>
 #include <sys/types.h>
 #include <sys/stat.h>
 #include <unistd.h>
 #include <zlib.h>
 
-#include "ccache.h"
-#include "hashtable_itr.h"
-#include "hashutil.h"
-#include "manifest.h"
-#include "murmurhashneutral2.h"
-#include "comments.h"
-
 /*
  * Sketchy specification of the manifest disk format:
  *
index 3091cc3aee6b5fed324154ec2fd0ba70262e0a03..581865b9b8fa387460e5768486660c81464b8cba 100644 (file)
--- a/mdfour.c
+++ b/mdfour.c
@@ -19,6 +19,8 @@
 
 #include "ccache.h"
 
+#include <string.h>
+
 /* NOTE: This code makes no attempt to be fast!
 
    It assumes that a int is at least 32 bits long
diff --git a/stats.c b/stats.c
index 90cd1ca9e1bd21b9d9d2915a853273a8c36f6b3f..80211897fea88f55ce11536f0599bc712e08fe72 100644 (file)
--- a/stats.c
+++ b/stats.c
 
 #include "ccache.h"
 
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <unistd.h>
+
 extern char *stats_file;
 extern char *cache_dir;
 
diff --git a/unify.c b/unify.c
index f4161c78b022c2b5bf01b4c63feec69c45e6bbc5..a5611c1959f142c6c9071508b8961e4341632bf0 100644 (file)
--- a/unify.c
+++ b/unify.c
 
 #include "ccache.h"
 
+#include <sys/mman.h>
+#include <ctype.h>
+#include <string.h>
+#include <unistd.h>
+
 static char *s_tokens[] = {
        "...",  ">>=",  "<<=",  "+=",   "-=",   "*=",   "/=",   "%=",   "&=",   "^=",
        "|=",   ">>",   "<<",   "++",   "--",   "->",   "&&",   "||",   "<=",   ">=",
diff --git a/util.c b/util.c
index 564095159a837521d45d76fdd7e129ac143c6bae..1da2e3af5df66cd2861cb4e011f5b1e9dc236a75 100644 (file)
--- a/util.c
+++ b/util.c
 
 #include "ccache.h"
 
+#include <ctype.h>
+#include <sys/types.h>
+#include <stdarg.h>
+#include <dirent.h>
+#include <utime.h>
+#include <errno.h>
+#include <stdio.h>
+#include <stdlib.h>
+#include <string.h>
+#include <zlib.h>
+
+#ifdef HAVE_PWD_H
+#include <pwd.h>
+#endif
+#ifdef HAVE_SYS_TIME_H
+#include <sys/time.h>
+#endif
+
 static FILE *logfile;
 
 /* log a message to the CCACHE_LOGFILE location */