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.
This commit is contained in:
1
cache.h
1
cache.h
@ -10,6 +10,7 @@
|
|||||||
#include <stdarg.h>
|
#include <stdarg.h>
|
||||||
#include <string.h>
|
#include <string.h>
|
||||||
#include <errno.h>
|
#include <errno.h>
|
||||||
|
#include <limits.h>
|
||||||
#include <sys/mman.h>
|
#include <sys/mman.h>
|
||||||
#include <sys/param.h>
|
#include <sys/param.h>
|
||||||
#include <netinet/in.h>
|
#include <netinet/in.h>
|
||||||
|
@ -7,9 +7,7 @@
|
|||||||
|
|
||||||
#include <pwd.h>
|
#include <pwd.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <time.h>
|
|
||||||
|
|
||||||
#define BLOCKING (1ul << 14)
|
#define BLOCKING (1ul << 14)
|
||||||
|
|
||||||
|
2
commit.c
2
commit.c
@ -1,8 +1,6 @@
|
|||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include <string.h>
|
|
||||||
#include <limits.h>
|
|
||||||
|
|
||||||
const char *commit_type = "commit";
|
const char *commit_type = "commit";
|
||||||
|
|
||||||
|
3
date.c
3
date.c
@ -4,9 +4,6 @@
|
|||||||
* Copyright (C) Linus Torvalds, 2005
|
* Copyright (C) Linus Torvalds, 2005
|
||||||
*/
|
*/
|
||||||
|
|
||||||
#include <stdio.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <ctype.h>
|
#include <ctype.h>
|
||||||
#include <time.h>
|
#include <time.h>
|
||||||
|
|
||||||
|
1
delta.c
1
delta.c
@ -5,7 +5,6 @@
|
|||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "delta.h"
|
#include "delta.h"
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
/* the delta object definition (it can alias any other object) */
|
/* the delta object definition (it can alias any other object) */
|
||||||
struct delta {
|
struct delta {
|
||||||
|
@ -1,7 +1,6 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005 Junio C Hamano
|
* Copyright (C) 2005 Junio C Hamano
|
||||||
*/
|
*/
|
||||||
#include <limits.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "strbuf.h"
|
#include "strbuf.h"
|
||||||
#include "diff.h"
|
#include "diff.h"
|
||||||
|
1
diff.c
1
diff.c
@ -4,7 +4,6 @@
|
|||||||
#include <sys/types.h>
|
#include <sys/types.h>
|
||||||
#include <sys/wait.h>
|
#include <sys/wait.h>
|
||||||
#include <signal.h>
|
#include <signal.h>
|
||||||
#include <limits.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "diff.h"
|
#include "diff.h"
|
||||||
#include "diffcore.h"
|
#include "diffcore.h"
|
||||||
|
@ -1,11 +1,5 @@
|
|||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
|
|
||||||
#include "pull.h"
|
#include "pull.h"
|
||||||
|
|
||||||
|
@ -1,15 +1,8 @@
|
|||||||
/*
|
/*
|
||||||
* Copyright (C) 2005 Junio C Hamano
|
* 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 "cache.h"
|
||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "pull.h"
|
#include "pull.h"
|
||||||
|
|
||||||
static int use_link = 0;
|
static int use_link = 0;
|
||||||
|
2
object.c
2
object.c
@ -5,8 +5,6 @@
|
|||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "tag.h"
|
#include "tag.h"
|
||||||
#include "delta.h"
|
#include "delta.h"
|
||||||
#include <stdlib.h>
|
|
||||||
#include <string.h>
|
|
||||||
|
|
||||||
struct object **objs;
|
struct object **objs;
|
||||||
int nr_objs;
|
int nr_objs;
|
||||||
|
@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) Linus Torvalds, 2005
|
* Copyright (C) Linus Torvalds, 2005
|
||||||
*/
|
*/
|
||||||
#include <stdarg.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
|
|
||||||
struct cache_entry **active_cache = NULL;
|
struct cache_entry **active_cache = NULL;
|
||||||
|
6
rpull.c
6
rpull.c
@ -1,11 +1,5 @@
|
|||||||
#include <fcntl.h>
|
|
||||||
#include <unistd.h>
|
|
||||||
#include <string.h>
|
|
||||||
#include <stdlib.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "commit.h"
|
#include "commit.h"
|
||||||
#include <errno.h>
|
|
||||||
#include <stdio.h>
|
|
||||||
#include "rsh.h"
|
#include "rsh.h"
|
||||||
#include "pull.h"
|
#include "pull.h"
|
||||||
|
|
||||||
|
@ -6,8 +6,6 @@
|
|||||||
* This handles basic git sha1 object files - packing, unpacking,
|
* This handles basic git sha1 object files - packing, unpacking,
|
||||||
* creation etc.
|
* creation etc.
|
||||||
*/
|
*/
|
||||||
#include <stdarg.h>
|
|
||||||
#include <limits.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
#include "delta.h"
|
#include "delta.h"
|
||||||
|
|
||||||
|
1
usage.c
1
usage.c
@ -3,7 +3,6 @@
|
|||||||
*
|
*
|
||||||
* Copyright (C) Linus Torvalds, 2005
|
* Copyright (C) Linus Torvalds, 2005
|
||||||
*/
|
*/
|
||||||
#include <stdarg.h>
|
|
||||||
#include "cache.h"
|
#include "cache.h"
|
||||||
|
|
||||||
static void report(const char *prefix, const char *err, va_list params)
|
static void report(const char *prefix, const char *err, va_list params)
|
||||||
|
Reference in New Issue
Block a user