14 #include <bits/alltypes.h>
16 typedef struct __DIR_s DIR;
22 unsigned short d_reclen;
27 #define d_fileno d_ino
31 DIR *opendir(const char *);
32 struct dirent *readdir(DIR *);
33 int readdir_r(DIR *, struct dirent *, struct dirent **);
34 void rewinddir(DIR *);
35 void seekdir(DIR *, long);
39 int alphasort(const struct dirent **, const struct dirent **);
40 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
42 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
52 #define IFTODT(x) ((x)>>12 & 017)
53 #define DTTOIF(x) ((x)<<12)
57 int versionsort(const struct dirent **, const struct dirent **);
61 int getdents(int, struct dirent *, size_t);
64 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
65 #define dirent64 dirent
66 #define readdir64 readdir
67 #define readdir64_r readdir_r
68 #define scandir64 scandir
69 #define alphasort64 alphasort
70 #define versionsort64 versionsort
74 #define getdents64 getdents