From c39976972e4d882f00fc0c4cbd7d25964a1f79f1 Mon Sep 17 00:00:00 2001 From: "Peter S. Mazinger" Date: Fri, 16 Dec 2005 00:57:39 +0000 Subject: glob/ftw/regex_old reworked. regex_old did not have MBS_SUPPORT enabled --- libc/misc/ftw/ftw.c | 18 +++++++++++++----- 1 file changed, 13 insertions(+), 5 deletions(-) (limited to 'libc/misc/ftw') diff --git a/libc/misc/ftw/ftw.c b/libc/misc/ftw/ftw.c index 4bd186561..8a6db98d3 100644 --- a/libc/misc/ftw/ftw.c +++ b/libc/misc/ftw/ftw.c @@ -36,7 +36,6 @@ #define _GNU_SOURCE #include - #if defined (__UCLIBC_HAS_LFS__) && defined L_ftw64 #ifndef L_ftw #define L_ftw @@ -59,17 +58,20 @@ #define NFTW_NAME nftw64 #define INO_T ino64_t #define STAT stat64 -#define LSTAT lstat64 -#define XSTAT stat64 +#define LSTAT __lstat64 +#define XSTAT __stat64 #define FTW_FUNC_T __ftw64_func_t #define NFTW_FUNC_T __nftw64_func_t +#define __readdir __readdir64 #else +#undef __stat +#undef __lstat #define FTW_NAME ftw #define NFTW_NAME nftw #define INO_T ino_t #define STAT stat -#define LSTAT lstat -#define XSTAT stat +#define LSTAT __lstat +#define XSTAT __stat #define FTW_FUNC_T __ftw_func_t #define NFTW_FUNC_T __nftw_func_t #endif @@ -89,6 +91,12 @@ #include #include +#if 1 /*ndef L_ftw64*/ +extern struct dirent *__readdir (DIR *__dirp) __nonnull ((1)) attribute_hidden; +#else +extern struct dirent64 *__readdir64 (DIR *__dirp) __nonnull ((1)) attribute_hidden; +#endif + /* We define PATH_MAX if the system does not provide a definition. This does not artificially limit any operation. PATH_MAX is simply used as a guesstimate for the expected maximal path length. -- cgit v1.2.3