123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- #ifndef _FTW_H
- #define _FTW_H 1
- #include <features.h>
- #include <sys/types.h>
- #include <sys/stat.h>
- __BEGIN_DECLS
- enum
- {
- FTW_F,
- #define FTW_F FTW_F
- FTW_D,
- #define FTW_D FTW_D
- FTW_DNR,
- #define FTW_DNR FTW_DNR
- FTW_NS,
- #define FTW_NS FTW_NS
- #if defined __USE_BSD || defined __USE_XOPEN_EXTENDED
- FTW_SL,
- # define FTW_SL FTW_SL
- #endif
- #ifdef __USE_XOPEN_EXTENDED
- FTW_DP,
- # define FTW_DP FTW_DP
- FTW_SLN
- # define FTW_SLN FTW_SLN
- #endif
- };
- #ifdef __USE_XOPEN_EXTENDED
- enum
- {
- FTW_PHYS = 1,
- # define FTW_PHYS FTW_PHYS
- FTW_MOUNT = 2,
- # define FTW_MOUNT FTW_MOUNT
- FTW_CHDIR = 4,
- # define FTW_CHDIR FTW_CHDIR
- FTW_DEPTH = 8
- # define FTW_DEPTH FTW_DEPTH
- # ifdef __USE_GNU
- ,
- FTW_ACTIONRETVAL = 16
- # define FTW_ACTIONRETVAL FTW_ACTIONRETVAL
- # endif
- };
- #ifdef __USE_GNU
- enum
- {
- FTW_CONTINUE = 0,
- # define FTW_CONTINUE FTW_CONTINUE
- FTW_STOP = 1,
- # define FTW_STOP FTW_STOP
- FTW_SKIP_SUBTREE = 2,
- # define FTW_SKIP_SUBTREE FTW_SKIP_SUBTREE
- FTW_SKIP_SIBLINGS = 3,
- # define FTW_SKIP_SIBLINGS FTW_SKIP_SIBLINGS
- };
- #endif
- struct FTW
- {
- int base;
- int level;
- };
- #endif
- typedef int (*__ftw_func_t) (const char *__filename,
- const struct stat *__status, int __flag);
- #ifdef __USE_LARGEFILE64
- typedef int (*__ftw64_func_t) (const char *__filename,
- const struct stat64 *__status, int __flag);
- #endif
- #ifdef __USE_XOPEN_EXTENDED
- typedef int (*__nftw_func_t) (const char *__filename,
- const struct stat *__status, int __flag,
- struct FTW *__info);
- # ifdef __USE_LARGEFILE64
- typedef int (*__nftw64_func_t) (const char *__filename,
- const struct stat64 *__status,
- int __flag, struct FTW *__info);
- # endif
- #endif
- #ifdef __UCLIBC_HAS_FTW__
- # ifndef __USE_FILE_OFFSET64
- extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors)
- __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func,
- int __descriptors), ftw64) __nonnull ((1, 2));
- # else
- # define ftw ftw64
- # endif
- # endif
- # ifdef __USE_LARGEFILE64
- extern int ftw64 (const char *__dir, __ftw64_func_t __func,
- int __descriptors) __nonnull ((1, 2));
- # endif
- #endif
- #if defined __UCLIBC_HAS_NFTW__ && defined __USE_XOPEN_EXTENDED
- # ifndef __USE_FILE_OFFSET64
- extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors,
- int __flag) __nonnull ((1, 2));
- # else
- # ifdef __REDIRECT
- extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func,
- int __descriptors, int __flag), nftw64)
- __nonnull ((1, 2));
- # else
- # define nftw nftw64
- # endif
- # endif
- # ifdef __USE_LARGEFILE64
- extern int nftw64 (const char *__dir, __nftw64_func_t __func,
- int __descriptors, int __flag) __nonnull ((1, 2));
- # endif
- #endif
- __END_DECLS
- #endif
|