X-Git-Url: https://git.verplant.org/?a=blobdiff_plain;f=cache.h;h=f0c9b01aa394c0a9a356f4b661141b77a0d7c9f6;hb=0516de30e8bdd26086e2a3edd3375981fd0c34d6;hp=996466795f65a115f2b6375391ff353114610d5e;hpb=75ea6911d64bbe1b202eed61eda3ebaa4d76cb99;p=git.git diff --git a/cache.h b/cache.h index 99646679..f0c9b01a 100644 --- a/cache.h +++ b/cache.h @@ -38,11 +38,10 @@ #define NORETURN __attribute__((__noreturn__)) #else #define NORETURN -#endif - #ifndef __attribute__ #define __attribute__(x) #endif +#endif /* * Intensive research over the course of many years has shown that @@ -59,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 @@ -310,6 +313,7 @@ struct ref { struct ref *next; unsigned char old_sha1[20]; unsigned char new_sha1[20]; + unsigned char force; struct ref *peer_ref; /* when renaming */ char name[0]; }; @@ -323,7 +327,7 @@ extern int get_ack(int fd, unsigned char *result_sha1); extern struct ref **get_remote_heads(int in, struct ref **list, int nr_match, char **match); extern struct packed_git *parse_pack_index(unsigned char *sha1); -extern struct packed_git *parse_pack_index_file(unsigned char *sha1, +extern struct packed_git *parse_pack_index_file(const unsigned char *sha1, char *idx_path); extern void prepare_packed_git(void);