#define NORETURN __attribute__((__noreturn__))
#else
#define NORETURN
-#endif
-
#ifndef __attribute__
-#define __attribute(x)
+#define __attribute__(x)
+#endif
#endif
/*
* 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
#define ALTERNATE_DB_ENVIRONMENT "GIT_ALTERNATE_OBJECT_DIRECTORIES"
+extern const char **get_pathspec(const char *prefix, char **pathspec);
+extern const char *setup_git_directory(void);
+extern char *prefix_path(const char *prefix, int len, char *path);
+
#define alloc_nr(x) (((x)+16)*3/2)
/* Initialize and use the cache information */
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];
};