]> git.ipfire.org Git - thirdparty/glibc.git/blame - include/dirent.h
Add *-ldbl.h headers to include/bits
[thirdparty/glibc.git] / include / dirent.h
CommitLineData
a5f4e34a 1#ifndef _DIRENT_H
450bf206
AS
2# ifndef _ISOMAC
3# include <dirstream.h>
4# endif
a5f4e34a 5# include <dirent/dirent.h>
31341567 6# ifndef _ISOMAC
1812d50b 7# include <sys/stat.h>
4b2faf49 8# include <stdbool.h>
bdbf022d 9
c55fbd1e
UD
10struct scandir_cancel_struct
11{
12 DIR *dp;
13 void *v;
14 size_t cnt;
15};
16
bdbf022d 17/* Now define the internal interfaces. */
4587a421 18extern DIR *__opendir (const char *__name) attribute_hidden;
fc3d9497 19extern DIR *__opendirat (int dfd, const char *__name) attribute_hidden;
4587a421
L
20extern DIR *__fdopendir (int __fd) attribute_hidden;
21extern int __closedir (DIR *__dirp) attribute_hidden;
22extern struct dirent *__readdir (DIR *__dirp) attribute_hidden;
c19559b0 23extern struct dirent64 *__readdir64 (DIR *__dirp);
4587a421 24libc_hidden_proto (__readdir64)
4d3a563f 25extern int __readdir_r (DIR *__dirp, struct dirent *__entry,
c19559b0 26 struct dirent **__result);
56ddf355
UD
27extern int __readdir64_r (DIR *__dirp, struct dirent64 *__entry,
28 struct dirent64 **__result);
a784e502 29extern int __scandir64 (const char * __dir,
56ddf355 30 struct dirent64 *** __namelist,
a784e502
UD
31 int (*__selector) (const struct dirent64 *),
32 int (*__cmp) (const struct dirent64 **,
33 const struct dirent64 **));
67cc348d
RM
34extern __ssize_t __getdirentries (int __fd, char *__restrict __buf,
35 size_t __nbytes,
36 __off_t *__restrict __basep)
37 __THROW __nonnull ((2, 4));
4d3a563f 38extern __ssize_t __getdents (int __fd, char *__buf, size_t __nbytes)
fc3d9497 39 attribute_hidden;
4d3a563f 40extern __ssize_t __getdents64 (int __fd, char *__buf, size_t __nbytes)
fc3d9497 41 attribute_hidden;
3fb8a93a 42extern int __alphasort64 (const struct dirent64 **a, const struct dirent64 **b)
fb4dfa0c 43 __attribute_pure__;
3fb8a93a
UD
44extern int __versionsort64 (const struct dirent64 **a,
45 const struct dirent64 **b)
fb4dfa0c 46 __attribute_pure__;
28377d1b 47extern DIR *__alloc_dir (int fd, bool close_fd, int flags,
fc3d9497 48 const struct stat64 *statp) attribute_hidden;
2f5c1b00 49extern __typeof (rewinddir) __rewinddir;
64a4af28 50extern __typeof (seekdir) __seekdir;
2c7bbfaf 51extern __typeof (dirfd) __dirfd;
c120981d 52libc_hidden_proto (dirfd);
d369ad76 53
83c10893 54extern void __scandir_cancel_handler (void *arg) attribute_hidden;
d2ee815a
RM
55extern int __scandir_tail (DIR *dp,
56 struct dirent ***namelist,
57 int (*select) (const struct dirent *),
58 int (*cmp) (const struct dirent **,
59 const struct dirent **))
fc3d9497 60 attribute_hidden;
c0123b3b
AZ
61# if !_DIRENT_MATCHES_DIRENT64
62extern int __scandir_tail (DIR *dp,
63 struct dirent ***namelist,
64 int (*select) (const struct dirent *),
65 int (*cmp) (const struct dirent **,
66 const struct dirent **))
67 attribute_hidden;
68# endif
d2ee815a
RM
69extern int __scandir64_tail (DIR *dp,
70 struct dirent64 ***namelist,
71 int (*select) (const struct dirent64 *),
72 int (*cmp) (const struct dirent64 **,
73 const struct dirent64 **))
fc3d9497 74 attribute_hidden;
83c10893 75
2f5c1b00 76libc_hidden_proto (__rewinddir)
40176158 77extern __typeof (scandirat) __scandirat;
8303c740 78
3d1870fa 79# if IS_IN (rtld) && !defined NO_RTLD_HIDDEN
8303c740
L
80extern __typeof (__rewinddir) __rewinddir attribute_hidden;
81# endif
31341567 82# endif
7fb90fb8 83
a5f4e34a 84#endif