f5eb9f67b029c14f56e8717fc9a4aaea1d4ee297
[musl] / include / ftw.h
1 #ifndef _FTW_H
2 #define _FTW_H
3
4 #ifdef __cplusplus
5 extern "C" {
6 #endif
7
8 #include <features.h>
9
10 /* Normally we do not nest header includes. However useless bloat
11  * like ftw may be treated as a special case. Otherwise we would
12  * have to deal with duplicating all the stat.h mess. */
13 #include <sys/stat.h>
14
15 #define FTW_F   1
16 #define FTW_D   2
17 #define FTW_DNR 3
18 #define FTW_NS  4
19 #define FTW_SL  5
20 #define FTW_DP  6
21 #define FTW_SLN 7
22
23 #define FTW_PHYS  1
24 #define FTW_MOUNT 2
25 #define FTW_CHDIR 4
26 #define FTW_DEPTH 8
27
28 struct FTW
29 {
30         int base;
31         int level;
32 };
33
34 int ftw(const char *, int (*)(const char *, const struct stat *, int), int);
35 int nftw(const char *, int (*)(const char *, const struct stat *, int, struct FTW *), int, int);
36
37 #if defined(_LARGEFILE64_SOURCE) || defined(_GNU_SOURCE)
38 #define ftw64 ftw
39 #define nftw64 nftw
40 #endif
41
42 #ifdef __cplusplus
43 }
44 #endif
45
46 #endif