Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.kernel.org/pub/scm/git/git.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPetr Baudis <pasky@ucw.cz>2005-05-11 02:58:16 +0400
committerPetr Baudis <xpasky@machine.sinus.cz>2005-05-11 02:58:16 +0400
commit883550481f885ab2865ab71819167230d21d4c14 (patch)
tree4552762e553e923bd013858b23a55ef125fdb501
parent92747a907cba83938def6e7eb3ee1b4d3d9e609f (diff)
Mark the variable declarations in .h files as extern
This allows git to be built even with linkers which are not smart enough to join those symbols, and makes this correct C. Pointed out by several people.
-rw-r--r--cache.h4
-rw-r--r--object.h4
2 files changed, 4 insertions, 4 deletions
diff --git a/cache.h b/cache.h
index 1dba405703..f8329aedfd 100644
--- a/cache.h
+++ b/cache.h
@@ -96,8 +96,8 @@ static inline unsigned int create_ce_mode(unsigned int mode)
#define cache_entry_size(len) ((offsetof(struct cache_entry,name) + (len) + 8) & ~7)
-struct cache_entry **active_cache;
-unsigned int active_nr, active_alloc, active_cache_changed;
+extern struct cache_entry **active_cache;
+extern unsigned int active_nr, active_alloc, active_cache_changed;
#define DB_ENVIRONMENT "SHA1_FILE_DIRECTORY"
#define DEFAULT_DB_ENVIRONMENT ".git/objects"
diff --git a/object.h b/object.h
index d53a35a4d7..09700d3760 100644
--- a/object.h
+++ b/object.h
@@ -15,8 +15,8 @@ struct object {
struct object_list *refs;
};
-int nr_objs;
-struct object **objs;
+extern int nr_objs;
+extern struct object **objs;
struct object *lookup_object(unsigned char *sha1);