fsck-cache: sort entries by inode number
[gitweb.git] / cache.h
diff --git a/cache.h b/cache.h
index a10243d192f5444a58a056ef5a21a4386af26fb3..940ced03148782c549a309249729c942b6cc9b85 100644 (file)
--- a/cache.h
+++ b/cache.h
 #define deflateBound(c,s)  ((s) + (((s) + 7) >> 3) + (((s) + 63) >> 6) + 11)
 #endif
 
+#ifdef DT_UNKNOWN
+#define DTYPE(de)      ((de)->d_type)
+#else
+#define DT_UNKNOWN     0
+#define DT_DIR         1
+#define DT_REG         2
+#define DTYPE(de)      DT_UNKNOWN
+#endif
+
 /*
  * Basic data structures for the directory cache
  *
@@ -137,6 +146,7 @@ extern int write_sha1_from_fd(const unsigned char *sha1, int fd);
 extern int has_sha1_file(const unsigned char *sha1);
 
 /* Convert to/from hex/sha1 representation */
+extern int get_sha1(const char *str, unsigned char *sha1);
 extern int get_sha1_hex(const char *hex, unsigned char *sha1);
 extern char *sha1_to_hex(const unsigned char *sha1);   /* static buffer result! */