diff options
author | Rich Felker <dalias@aerifal.cx> | 2011-03-07 18:32:36 -0500 |
---|---|---|
committer | Rich Felker <dalias@aerifal.cx> | 2011-03-07 18:32:36 -0500 |
commit | 5d0d6d983664cc3816d63432397271719dade83c (patch) | |
tree | ce412cc98aeb879ccce64890fc6a2438188717df /include/dirent.h | |
parent | 9fe28f703d44ff1ddecdca945bfb5fc87de5e8ad (diff) | |
download | musl-5d0d6d983664cc3816d63432397271719dade83c.tar.gz musl-5d0d6d983664cc3816d63432397271719dade83c.tar.xz musl-5d0d6d983664cc3816d63432397271719dade83c.zip |
add macros for use with d_type extension field in dirent
Diffstat (limited to 'include/dirent.h')
-rw-r--r-- | include/dirent.h | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/include/dirent.h b/include/dirent.h index a9170936..a9806294 100644 --- a/include/dirent.h +++ b/include/dirent.h @@ -34,6 +34,20 @@ int dirfd(DIR *); int alphasort(const struct dirent **, const struct dirent **); int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **)); +#ifdef _GNU_SOURCE +#define DT_UNKNOWN 0 +#define DT_FIFO 1 +#define DT_CHR 2 +#define DT_DIR 4 +#define DT_BLK 6 +#define DT_REG 8 +#define DT_LNK 10 +#define DT_SOCK 12 +#define DT_WHT 14 +#define IFTODT(x) ((x)>>12 & 017) +#define DTTOIF(x) ((x)<<12) +#endf + #ifdef __cplusplus extern } #endif |