summaryrefslogtreecommitdiff
path: root/cache.h
diff options
context:
space:
mode:
authorJunio C Hamano <junkio@cox.net>2005-08-28 23:02:01 -0700
committerJunio C Hamano <junkio@cox.net>2005-08-28 23:02:01 -0700
commit10d781b9caa4f71495c7b34963bef137216f86a8 (patch)
treeeec73f3aec2ea1255bb3e131bd54e0a04e64d0f2 /cache.h
parent928f74de22536129b696218073a3940ae4ab1199 (diff)
parentfb2af0375bcef9f5f5cbb1f4dc9f81459ce1f4b1 (diff)
downloadgit-10d781b9caa4f71495c7b34963bef137216f86a8.tar.gz
Merge refs/heads/portable from http://www.cs.berkeley.edu/~ejr/gits/git.git
Diffstat (limited to 'cache.h')
-rw-r--r--cache.h12
1 files changed, 8 insertions, 4 deletions
diff --git a/cache.h b/cache.h
index 1478631b40..d407f39001 100644
--- a/cache.h
+++ b/cache.h
@@ -58,7 +58,11 @@
* We accept older names for now but warn.
*/
extern char *gitenv_bc(const char *);
+#ifdef __GNUC__
#define gitenv(e) (getenv(e) ? : gitenv_bc(e))
+#else
+#define gitenv(e) (getenv(e) ? getenv(e) : gitenv_bc(e))
+#endif
/*
* Basic data structures for the directory cache
@@ -100,7 +104,7 @@ struct cache_entry {
unsigned int ce_size;
unsigned char sha1[20];
unsigned short ce_flags;
- char name[0];
+ char name[];
};
#define CE_NAMEMASK (0x0fff)
@@ -283,7 +287,7 @@ extern int checkout_entry(struct cache_entry *ce, struct checkout *state);
extern struct alternate_object_database {
struct alternate_object_database *next;
char *name;
- char base[0]; /* more */
+ char base[]; /* more */
} *alt_odb_list;
extern void prepare_alt_odb(void);
@@ -296,7 +300,7 @@ extern struct packed_git {
unsigned int pack_last_used;
unsigned int pack_use_cnt;
unsigned char sha1[20];
- char pack_name[0]; /* something like ".git/objects/pack/xxxxx.pack" */
+ char pack_name[]; /* something like ".git/objects/pack/xxxxx.pack" */
} *packed_git;
struct pack_entry {
@@ -311,7 +315,7 @@ struct ref {
unsigned char new_sha1[20];
unsigned char force;
struct ref *peer_ref; /* when renaming */
- char name[0];
+ char name[];
};
extern int git_connect(int fd[2], char *url, const char *prog);