Merge branch 'mh/credential-erase-improvements'
[git.git] / statinfo.h
blobfe8df633a4e159850dea80efc5751b06d085a5c5
1 #ifndef STATINFO_H
2 #define STATINFO_H
4 /*
5 * The "cache_time" is just the low 32 bits of the
6 * time. It doesn't matter if it overflows - we only
7 * check it for equality in the 32 bits we save.
8 */
9 struct cache_time {
10 uint32_t sec;
11 uint32_t nsec;
14 struct stat_data {
15 struct cache_time sd_ctime;
16 struct cache_time sd_mtime;
17 unsigned int sd_dev;
18 unsigned int sd_ino;
19 unsigned int sd_uid;
20 unsigned int sd_gid;
21 unsigned int sd_size;
24 #if defined(DT_UNKNOWN) && !defined(NO_D_TYPE_IN_DIRENT)
25 #define DTYPE(de) ((de)->d_type)
26 #else
27 #undef DT_UNKNOWN
28 #undef DT_DIR
29 #undef DT_REG
30 #undef DT_LNK
31 #define DT_UNKNOWN 0
32 #define DT_DIR 1
33 #define DT_REG 2
34 #define DT_LNK 3
35 #define DTYPE(de) DT_UNKNOWN
36 #endif
38 #endif