2 # include <dirstream.h>
3 # include <dirent/dirent.h>
7 struct scandir_cancel_struct
14 /* Now define the internal interfaces. */
15 extern DIR *__opendir (const char *__name
);
16 extern DIR *__opendirat (int dfd
, const char *__name
) internal_function
;
17 extern DIR *__fdopendir (int __fd
);
18 extern int __closedir (DIR *__dirp
);
19 extern struct dirent
*__readdir (DIR *__dirp
);
20 extern struct dirent64
*__readdir64 (DIR *__dirp
);
21 extern int __readdir_r (DIR *__dirp
, struct dirent
*__entry
,
22 struct dirent
**__result
);
23 extern int __readdir64_r (DIR *__dirp
, struct dirent64
*__entry
,
24 struct dirent64
**__result
);
25 extern int __scandir64 (const char * __dir
,
26 struct dirent64
*** __namelist
,
27 int (*__selector
) (const struct dirent64
*),
28 int (*__cmp
) (const struct dirent64
**,
29 const struct dirent64
**));
30 extern __ssize_t
__getdents (int __fd
, char *__buf
, size_t __nbytes
)
32 extern __ssize_t
__getdents64 (int __fd
, char *__buf
, size_t __nbytes
)
34 extern int __alphasort64 (const struct dirent64
**a
, const struct dirent64
**b
)
36 extern int __versionsort64 (const struct dirent64
**a
,
37 const struct dirent64
**b
)
39 extern DIR *__alloc_dir (int fd
, bool close_fd
, int flags
,
40 const struct stat64
*statp
)
42 extern void __scandir_cancel_handler (void *arg
);
44 libc_hidden_proto (rewinddir
)
45 libc_hidden_proto (scandirat
)
46 libc_hidden_proto (scandirat64
)