use a more-correct integer type, and silence 64-bit warnings as a bonus
[musl] / include / dirent.h
1 #ifndef _DIRENT_H
2 #define _DIRENT_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #define __NEED_ino_t
9 #define __NEED_off_t
10
11 #include <bits/alltypes.h>
12
13 typedef struct __DIR_s DIR;
14
15 struct dirent
16 {
17         ino_t d_ino;
18         off_t d_off;
19         unsigned short d_reclen;
20         unsigned char d_type;
21         char d_name[1];
22 };
23
24 int            closedir(DIR *);
25 DIR           *fdopendir(int);
26 DIR           *opendir(const char *);
27 struct dirent *readdir(DIR *);
28 int            readdir_r(DIR *, struct dirent *, struct dirent **);
29 void           rewinddir(DIR *);
30 void           seekdir(DIR *, long);
31 long           telldir(DIR *);
32 int            dirfd(DIR *);
33
34 int alphasort(const struct dirent **, const struct dirent **);
35 int scandir(const char *, struct dirent ***, int (*)(const struct dirent *), int (*)(const struct dirent **, const struct dirent **));
36
37 #ifdef __cplusplus
38 extern }
39 #endif
40
41 #endif