-/* Copyright (C) 1992, 1996, 1997 Free Software Foundation, Inc.
+/* Copyright (C) 1992, 1996, 1997, 1998 Free Software Foundation, Inc.
This file is part of the GNU C Library.
The GNU C Library is free software; you can redistribute it and/or
#include <features.h>
#include <sys/types.h>
-#include <bits/stat.h>
+#include <sys/stat.h>
__BEGIN_DECLS
/* Convenient types for callback functions. */
typedef int (*__ftw_func_t) __P ((__const char *__filename,
__const struct stat *__status, int __flag));
+#ifdef __USE_LARGEFILE64
+typedef int (*__ftw64_func_t) __P ((__const char *__filename,
+ __const struct stat64 *__status,
+ int __flag));
+#endif
#ifdef __USE_XOPEN_EXTENDED
typedef int (*__nftw_func_t) __P ((__const char *__filename,
__const struct stat *__status, int __flag,
struct FTW *__info));
+# ifdef __USE_LARGEFILE64
+typedef int (*__nftw64_func_t) __P ((__const char *__filename,
+ __const struct stat64 *__status,
+ int __flag, struct FTW *__info));
+# endif
#endif
/* Call a function on every element in a directory tree. */
+#ifndef __USE_FILE_OFFSET64
extern int ftw __P ((__const char *__dir, __ftw_func_t __func,
int __descriptors));
+#else
+# ifdef __REDIRECT
+extern int __REDIRECT (ftw, __P ((__const char *__dir, __ftw_func_t __func,
+ int __descriptors)), ftw64);
+# else
+# define ftw ftw64
+# endif
+#endif
+#ifdef __USE_LARGEFILE64
+extern int ftw64 __P ((__const char *__dir, __ftw64_func_t __func,
+ int __descriptors));
+#endif
#ifdef __USE_XOPEN_EXTENDED
/* Call a function on every element in a directory tree. FLAG allows
to specify the behaviour more detailed. */
+# ifndef __USE_FILE_OFFSET64
extern int nftw __P ((__const char *__dir, __nftw_func_t __func,
int __descriptors, int __flag));
+# else
+# ifdef __REDIRECT
+extern int __REDIRECT (nftw, __P ((__const char *__dir, __nftw_func_t __func,
+ int __descriptors, int __flag)), nftw64);
+# else
+# define nftw nftw64
+# endif
+# endif
+# ifdef __USE_LARGEFILE64
+extern int nftw64 __P ((__const char *__dir, __nftw64_func_t __func,
+ int __descriptors, int __flag));
+# endif
#endif
__END_DECLS