From 883550481f885ab2865ab71819167230d21d4c14 Mon Sep 17 00:00:00 2001 From: Petr Baudis Date: Wed, 11 May 2005 00:58:16 +0200 Subject: 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. --- cache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cache.h') diff --git a/cache.h b/cache.h index 1dba40570..f8329aedf 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" -- cgit v1.2.1