Andrew's git
/
gitweb.git
/ diff
summary
|
log
|
commit
| diff |
tree
commit
grep
author
committer
pickaxe
?
re
Mark the variable declarations in .h files as extern
author
Petr Baudis
<pasky@ucw.cz>
Tue, 10 May 2005 22:58:16 +0000
(
00:58
+0200)
committer
Petr Baudis
<xpasky@machine.sinus.cz>
Tue, 10 May 2005 22:58:16 +0000
(
00:58
+0200)
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
patch
|
blob
|
history
object.h
patch
|
blob
|
history
raw
|
patch
|
inline
| side by side (parent:
92747a9
)
diff --git
a/cache.h
b/cache.h
index 1dba4057031dc8d9421ec8a388b36ee9c3494077..f8329aedfdef678b71d2fa07783b92f9a9aa079e 100644
(file)
--- 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)
#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"
#define DB_ENVIRONMENT "SHA1_FILE_DIRECTORY"
#define DEFAULT_DB_ENVIRONMENT ".git/objects"
diff --git
a/object.h
b/object.h
index d53a35a4d7321b5ec970103208ac576f9f722dff..09700d376077b2d6136620faf6efb77ee679deeb 100644
(file)
--- a/
object.h
+++ b/
object.h
@@
-15,8
+15,8
@@
struct object {
struct object_list *refs;
};
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);
struct object *lookup_object(unsigned char *sha1);