11 #include <bits/alltypes.h>
13 typedef struct __DIR_s DIR;
19 unsigned short d_reclen;
24 #define d_fileno d_ino
28 DIR *opendir(const char *);
29 struct dirent *readdir(DIR *);
30 int readdir_r(DIR *, struct dirent *, struct dirent **);
31 void rewinddir(DIR *);
32 void seekdir(DIR *, long);
36 int alphasort(const struct dirent **, const struct dirent **);
37 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
39 #if defined(_GNU_SOURCE) || defined(_BSD_SOURCE)
49 #define IFTODT(x) ((x)>>12 & 017)
50 #define DTTOIF(x) ((x)<<12)
54 int versionsort(const struct dirent **, const struct dirent **);
57 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
58 #define dirent64 dirent
59 #define readdir64 readdir
60 #define readdir64_r readdir_r
61 #define scandir64 scandir
62 #define alphasort64 alphasort
63 #define versionsort64 versionsort