#ifndef _FTW_H
#define _FTW_H 1
#include
#include
#include
__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
#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
#ifdef __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
|