Revert "Replace zero-length array decls with []."
[git.git] / cache.h
diff --git a/cache.h b/cache.h
index f14a4ce..0dcd2fe 100644 (file)
--- a/cache.h
+++ b/cache.h
 #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
@@ -140,6 +143,10 @@ extern char *get_graft_file(void);
 
 #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 */
@@ -306,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];
 };