First steps to get conformtest fully working
[platform/upstream/glibc.git] / include / dirent.h
1 #ifndef _DIRENT_H
2 # include <dirent/dirent.h>
3 # ifndef _ISOMAC
4 # include <dirstream.h>
5 # include <sys/stat.h>
6 # include <stdbool.h>
7
8 struct scandir_cancel_struct
9 {
10   DIR *dp;
11   void *v;
12   size_t cnt;
13 };
14
15 /* Now define the internal interfaces.  */
16 extern DIR *__opendir (const char *__name);
17 extern DIR *__opendirat (int dfd, const char *__name) internal_function;
18 extern DIR *__fdopendir (int __fd);
19 extern int __closedir (DIR *__dirp);
20 extern struct dirent *__readdir (DIR *__dirp);
21 extern struct dirent64 *__readdir64 (DIR *__dirp);
22 extern int __readdir_r (DIR *__dirp, struct dirent *__entry,
23                         struct dirent **__result);
24 extern int __readdir64_r (DIR *__dirp, struct dirent64 *__entry,
25                           struct dirent64 **__result);
26 extern int __scandir64 (const char * __dir,
27                         struct dirent64 *** __namelist,
28                         int (*__selector) (const struct dirent64 *),
29                         int (*__cmp) (const struct dirent64 **,
30                                       const struct dirent64 **));
31 extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
32      internal_function;
33 extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
34      internal_function;
35 extern int __alphasort64 (const struct dirent64 **a, const struct dirent64 **b)
36      __attribute_pure__;
37 extern int __versionsort64 (const struct dirent64 **a,
38                             const struct dirent64 **b)
39      __attribute_pure__;
40 extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
41                          const struct stat64 *statp)
42      internal_function;
43 extern void __scandir_cancel_handler (void *arg);
44
45 libc_hidden_proto (rewinddir)
46 libc_hidden_proto (scandirat)
47 libc_hidden_proto (scandirat64)
48 # endif
49
50 #endif