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.
14 files changed:
#include <stdarg.h>
#include <string.h>
#include <errno.h>
+#include <limits.h>
#include <sys/mman.h>
#include <sys/param.h>
#include <netinet/in.h>
#include <pwd.h>
#include <time.h>
-#include <string.h>
#include <ctype.h>
-#include <time.h>
#define BLOCKING (1ul << 14)
#include "tag.h"
#include "commit.h"
#include "cache.h"
-#include <string.h>
-#include <limits.h>
const char *commit_type = "commit";
* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdio.h>
-#include <stdlib.h>
-#include <string.h>
#include <ctype.h>
#include <time.h>
#include "tag.h"
#include "delta.h"
#include "cache.h"
-#include <string.h>
/* the delta object definition (it can alias any other object) */
struct delta {
/*
* Copyright (C) 2005 Junio C Hamano
*/
-#include <limits.h>
#include "cache.h"
#include "strbuf.h"
#include "diff.h"
#include <sys/types.h>
#include <sys/wait.h>
#include <signal.h>
-#include <limits.h>
#include "cache.h"
#include "diff.h"
#include "diffcore.h"
-#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"
/*
* 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;
#include "cache.h"
#include "tag.h"
#include "delta.h"
-#include <stdlib.h>
-#include <string.h>
struct object **objs;
int nr_objs;
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdarg.h>
#include "cache.h"
struct cache_entry **active_cache = NULL;
-#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"
* This handles basic git sha1 object files - packing, unpacking,
* creation etc.
*/
-#include <stdarg.h>
-#include <limits.h>
#include "cache.h"
#include "delta.h"
*
* Copyright (C) Linus Torvalds, 2005
*/
-#include <stdarg.h>
#include "cache.h"
static void report(const char *prefix, const char *err, va_list params)