Adding upstream version 4.00~pre53+dfsg.
[syslinux-debian/hramrach.git] / com32 / include / sys / dirent.h
blobbb5e52c7a5abd5ae8db4741494d184ac8d72a5c3
1 /*
2 * sys/dirent.h
3 */
5 #ifndef DIRENT_H
6 #define DIRENT_H
8 #include <stdint.h>
9 #include <sys/types.h>
11 #ifndef NAME_MAX
12 #define NAME_MAX 255
13 #endif
15 struct dirent {
16 uint32_t d_ino;
17 uint32_t d_off;
18 uint16_t d_reclen;
19 uint16_t d_type;
20 char d_name[NAME_MAX + 1];
23 enum dirent_type {
24 DT_UNKNOWN = 0,
25 DT_FIFO = 1,
26 DT_CHR = 2,
27 DT_DIR = 4,
28 DT_BLK = 6,
29 DT_REG = 8,
30 DT_LNK = 10,
31 DT_SOCK = 12,
32 DT_WHT = 14,
36 * Convert between stat structure mode types and directory types.
37 * The stat structure mode types are the same as in Linux.
39 #define IFTODT(mode) (((mode) & 0170000) >> 12)
40 #define DTTOIF(dt) ((dt) << 12)
42 struct _DIR_;
43 typedef struct _DIR_ DIR;
45 #endif /* sys/dirent.h */