summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-22 18:54:17 (GMT)
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-05-22 18:54:17 (GMT)
commit6b0c3121061df6b323f430700e8077b324b5e9dd (patch)
treed37bc2285bf562dfaf163462ce3a470cec4a7654
parentca67f002194cfe00ec349c7d4e2c936e35f8c669 (diff)
downloadgit-6b0c3121061df6b323f430700e8077b324b5e9dd.zip
git-6b0c3121061df6b323f430700e8077b324b5e9dd.tar.gz
git-6b0c3121061df6b323f430700e8077b324b5e9dd.tar.bz2
Include file cleanups..
Add <limits.h> to the include files handled by "cache.h", and remove extraneous #include directives from various .c files. The rule is that "cache.h" gets all the basic stuff, so that we'll have as few system dependencies as possible.
-rw-r--r--cache.h1
-rw-r--r--commit-tree.c2
-rw-r--r--commit.c2
-rw-r--r--date.c3
-rw-r--r--delta.c1
-rw-r--r--diff-helper.c1
-rw-r--r--diff.c1
-rw-r--r--http-pull.c6
-rw-r--r--local-pull.c7
-rw-r--r--object.c2
-rw-r--r--read-cache.c1
-rw-r--r--rpull.c6
-rw-r--r--sha1_file.c2
-rw-r--r--usage.c1
14 files changed, 1 insertions, 35 deletions
diff --git a/cache.h b/cache.h
index 28e3dbd..d38d9a8 100644
--- a/cache.h
+++ b/cache.h
@@ -10,6 +10,7 @@
#include <stdarg.h>
#include <string.h>
#include <errno.h>
+#include <limits.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <netinet/in.h>
diff --git a/commit-tree.c b/commit-tree.c
index e6f001e..e81e530 100644
--- a/commit-tree.c
+++ b/commit-tree.c
@@ -7,9 +7,7 @@
#include <pwd.h>
#include <time.h>
-#include <string.h>
#include <ctype.h>
-#include <time.h>
#define BLOCKING (1ul << 14)
diff --git a/commit.c b/commit.c
index 3f2235e..b4e000e 100644
--- a/commit.c
+++ b/commit.c
@@ -1,8 +1,6 @@
#include "tag.h"
#include "commit.h"
#include "cache.h"
-#include <string.h>
-#include <limits.h>
const char *commit_type = "commit";
diff --git a/date.c b/date.c
index 1f366a6..ff922fe 100644
--- a/date.c
+++ b/date.c
@@ -4,9 +4,6 @@
* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <ctype.h>
#include <time.h>
diff --git a/delta.c b/delta.c
index 05ef7fd..b31957a 100644
--- a/delta.c
+++ b/delta.c
@@ -5,7 +5,6 @@
#include "tag.h"
#include "delta.h"
#include "cache.h"
-#include <string.h>
/* the delta object definition (it can alias any other object) */
struct delta {
diff --git a/diff-helper.c b/diff-helper.c
index 0bc54a3..2385575 100644
--- a/diff-helper.c
+++ b/diff-helper.c
@@ -1,7 +1,6 @@
/*
* Copyright (C) 2005 Junio C Hamano
*/
-#include <limits.h>
#include "cache.h"
#include "strbuf.h"
#include "diff.h"
diff --git a/diff.c b/diff.c
index eb8424e..4757547 100644
--- a/diff.c
+++ b/diff.c
@@ -4,7 +4,6 @@
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
-#include <limits.h>
#include "cache.h"
#include "diff.h"
#include "diffcore.h"
diff --git a/http-pull.c b/http-pull.c
index cc62f85..ba8585c 100644
--- a/http-pull.c
+++ b/http-pull.c
@@ -1,11 +1,5 @@
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
#include "cache.h"
#include "commit.h"
-#include <errno.h>
-#include <stdio.h>
#include "pull.h"
diff --git a/local-pull.c b/local-pull.c
index 3a342ab..10d4ca8 100644
--- a/local-pull.c
+++ b/local-pull.c
@@ -1,15 +1,8 @@
/*
* Copyright (C) 2005 Junio C Hamano
*/
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
-#include <limits.h>
#include "cache.h"
#include "commit.h"
-#include <errno.h>
-#include <stdio.h>
#include "pull.h"
static int use_link = 0;
diff --git a/object.c b/object.c
index deb6830..d093e17 100644
--- a/object.c
+++ b/object.c
@@ -5,8 +5,6 @@
#include "cache.h"
#include "tag.h"
#include "delta.h"
-#include <stdlib.h>
-#include <string.h>
struct object **objs;
int nr_objs;
diff --git a/read-cache.c b/read-cache.c
index b3eec84..24ebe38 100644
--- a/read-cache.c
+++ b/read-cache.c
@@ -3,7 +3,6 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdarg.h>
#include "cache.h"
struct cache_entry **active_cache = NULL;
diff --git a/rpull.c b/rpull.c
index b48e631..36e49f7 100644
--- a/rpull.c
+++ b/rpull.c
@@ -1,11 +1,5 @@
-#include <fcntl.h>
-#include <unistd.h>
-#include <string.h>
-#include <stdlib.h>
#include "cache.h"
#include "commit.h"
-#include <errno.h>
-#include <stdio.h>
#include "rsh.h"
#include "pull.h"
diff --git a/sha1_file.c b/sha1_file.c
index edbf9f9..e6fdaa2 100644
--- a/sha1_file.c
+++ b/sha1_file.c
@@ -6,8 +6,6 @@
* This handles basic git sha1 object files - packing, unpacking,
* creation etc.
*/
-#include <stdarg.h>
-#include <limits.h>
#include "cache.h"
#include "delta.h"
diff --git a/usage.c b/usage.c
index e774d2e..86211c9 100644
--- a/usage.c
+++ b/usage.c
@@ -3,7 +3,6 @@
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdarg.h>
#include "cache.h"
static void report(const char *prefix, const char *err, va_list params)