diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-03-03 09:36:18 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2021-06-15 10:42:11 -0300 |
commit | 19873b18b08c97be8bf370398f6dff2b3472f52f (patch) | |
tree | 001e050d198a0cb021b4f2ca006898c7ec1b6c09 /io/ftw.h | |
parent | 70961aee1823481caac6e00a40cf1f2bdbf7ffb5 (diff) | |
download | glibc-19873b18b08c97be8bf370398f6dff2b3472f52f.tar.gz glibc-19873b18b08c97be8bf370398f6dff2b3472f52f.tar.xz glibc-19873b18b08c97be8bf370398f6dff2b3472f52f.zip |
io: Add ftw64 with 64-bit time_t support
Similar to fts, ftw routines passes a stat pointer that might differ of size and layout when 64-bit time API is used. Checked on i686-linux-gnu and x86_64-linux-gnu. Reviewed-by: Lukasz Majewski <lukma@denx.de> Reviewed-by: Carlos O'Donell <carlos@redhat.com> Tested-by: Carlos O'Donell <carlos@redhat.com>
Diffstat (limited to 'io/ftw.h')
-rw-r--r-- | io/ftw.h | 46 |
1 files changed, 44 insertions, 2 deletions
diff --git a/io/ftw.h b/io/ftw.h index 751d689cdb..446498856d 100644 --- a/io/ftw.h +++ b/io/ftw.h @@ -137,15 +137,36 @@ extern int ftw (const char *__dir, __ftw_func_t __func, int __descriptors) __nonnull ((1, 2)); #else # ifdef __REDIRECT +# ifndef __USE_TIME_BITS64 extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func, int __descriptors), ftw64) __nonnull ((1, 2)); +# else +extern int __REDIRECT (ftw, (const char *__dir, __ftw_func_t __func, + int __descriptors), __ftw64_time64) + __nonnull ((1, 2)); +# endif # else -# define ftw ftw64 +# ifndef __USE_TIME_BITS64 +# define ftw ftw64 +# else +# define ftw __ftw64_time64 +# endif # endif #endif #ifdef __USE_LARGEFILE64 +# ifndef __USE_TIME_BITS64 extern int ftw64 (const char *__dir, __ftw64_func_t __func, int __descriptors) __nonnull ((1, 2)); +# else +# ifdef __REDIRECT +extern int __REDIRECT (ftw64, (const char *__dir, __ftw64_func_t __func, + int __descriptors), + __ftw64_time64) + __nonnull ((1, 2)); +# else +# define nftw64 __nftw64_time64 +# endif +# endif #endif #ifdef __USE_XOPEN_EXTENDED @@ -159,16 +180,37 @@ extern int nftw (const char *__dir, __nftw_func_t __func, int __descriptors, int __flag) __nonnull ((1, 2)); # else # ifdef __REDIRECT +# ifndef __USE_TIME_BITS64 extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func, int __descriptors, int __flag), nftw64) __nonnull ((1, 2)); +# else +extern int __REDIRECT (nftw, (const char *__dir, __nftw_func_t __func, + int __descriptors, int __flag), __nftw64_time64) + __nonnull ((1, 2)); +# endif # else -# define nftw nftw64 +# ifndef __USE_TIME_BITS64 +# define nftw nftw64 +# else +# define nftw __nftw64_time64 +# endif # endif # endif # ifdef __USE_LARGEFILE64 +# ifndef __USE_TIME_BITS64 extern int nftw64 (const char *__dir, __nftw64_func_t __func, int __descriptors, int __flag) __nonnull ((1, 2)); +# else +# ifdef __REDIRECT +extern int __REDIRECT (nftw64, (const char *__dir, __nftw64_func_t __func, + int __descriptors, int __flag), + __nftw64_time64) + __nonnull ((1, 2)); +# else +# define nftw64 __nftw64_time64 +# endif +# endif # endif #endif |