diff options
Diffstat (limited to 'io/sys/stat.h')
-rw-r--r-- | io/sys/stat.h | 113 |
1 files changed, 103 insertions, 10 deletions
diff --git a/io/sys/stat.h b/io/sys/stat.h index 549375c087..f7874ec5ba 100644 --- a/io/sys/stat.h +++ b/io/sys/stat.h @@ -209,21 +209,51 @@ extern int stat (const char *__restrict __file, that file descriptor FD is open on and put them in BUF. */ extern int fstat (int __fd, struct stat *__buf) __THROW __nonnull ((2)); #else -# ifdef __REDIRECT_NTH +# ifdef __USE_TIME_BITS64 +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (stat, (const char *__restrict __file, + struct stat *__restrict __buf), + __stat64_time64) + __nonnull ((1, 2)); +extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), + __fstat64_time64) + __nonnull ((2)); +# else +# define stat __stat64_time64 +# define fstat __fstat64_time64 +# endif +# else +# ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (stat, (const char *__restrict __file, struct stat *__restrict __buf), stat64) __nonnull ((1, 2)); extern int __REDIRECT_NTH (fstat, (int __fd, struct stat *__buf), fstat64) __nonnull ((2)); -# else -# define stat stat64 -# define fstat fstat64 +# else +# define stat stat64 +# define fstat fstat64 +# endif # endif #endif #ifdef __USE_LARGEFILE64 +# ifndef __USE_TIME_BITS64 extern int stat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); extern int fstat64 (int __fd, struct stat64 *__buf) __THROW __nonnull ((2)); +# else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (stat64, (const char *__restrict __file, + struct stat64 *__restrict __buf), + __stat64_time64) + __nonnull ((1, 2)); +extern int __REDIRECT_NTH (fstat64, (int __fd, struct stat64 *__buf), + __fstat64_time64) + __nonnull ((2)); +# else +# define stat64 __stat64_time64 +# define fstat64 __fstat64_time +# endif +# endif #endif #ifdef __USE_ATFILE @@ -235,20 +265,44 @@ extern int fstatat (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); # else -# ifdef __REDIRECT_NTH +# ifdef __USE_TIME_BITS64 +# ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file, struct stat *__restrict __buf, int __flag), - fstatat64) __nonnull ((2, 3)); + __fstatat64_time64) __nonnull ((2, 3)); +# else +# define fstatat __fstatat64_time64 +# endif # else -# define fstatat fstatat64 +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (fstatat, (int __fd, const char *__restrict __file, + struct stat *__restrict __buf, + int __flag), + fstatat64) __nonnull ((2, 3)); +# else +# define fstatat fstatat64 +# endif # endif # endif # ifdef __USE_LARGEFILE64 +# ifndef __USE_TIME_BITS64 extern int fstatat64 (int __fd, const char *__restrict __file, struct stat64 *__restrict __buf, int __flag) __THROW __nonnull ((2, 3)); +# else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (fstatat64, (int __fd, + const char *__restrict __file, + struct stat64 *__restrict __buf, + int __flag), + __fstatat64_time64) + __nonnull ((2, 3)); +# else +# define fstatat64 __fstatat64_time64 +# endif +# endif # endif #endif @@ -259,19 +313,37 @@ extern int fstatat64 (int __fd, const char *__restrict __file, extern int lstat (const char *__restrict __file, struct stat *__restrict __buf) __THROW __nonnull ((1, 2)); # else -# ifdef __REDIRECT_NTH +# ifdef __USE_TIME_BITS64 +# ifdef __REDIRECT_NTH extern int __REDIRECT_NTH (lstat, (const char *__restrict __file, - struct stat *__restrict __buf), lstat64) + struct stat *__restrict __buf), __lstat64_time64) __nonnull ((1, 2)); +# else +# define lstat __lstat64_time64 +# endif # else -# define lstat lstat64 +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (lstat, + (const char *__restrict __file, + struct stat *__restrict __buf), lstat64) + __nonnull ((1, 2)); +# else +# define lstat lstat64 +# endif # endif # endif # ifdef __USE_LARGEFILE64 +# ifndef __USE_TIME_BITS64 extern int lstat64 (const char *__restrict __file, struct stat64 *__restrict __buf) __THROW __nonnull ((1, 2)); +# else +extern int __REDIRECT_NTH (lstat64, (const char *__restrict __file, + struct stat64 *__restrict __buf), + __lstat64_time64) + __nonnull ((1, 2)); +# endif # endif #endif @@ -355,17 +427,38 @@ extern int mkfifoat (int __fd, const char *__path, __mode_t __mode) #endif #ifdef __USE_ATFILE +# ifndef __USE_TIME_BITS64 /* Set file access and modification times relative to directory file descriptor. */ extern int utimensat (int __fd, const char *__path, const struct timespec __times[2], int __flags) __THROW __nonnull ((2)); +# else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (utimensat, (int fd, const char *__path, + const struct timespec __times[2], + int flags), + __utimensat64) __nonnull ((2)); +# else +# define utimensat __utimensat64 +# endif +# endif #endif #ifdef __USE_XOPEN2K8 +# ifndef __USE_TIME_BITS64 /* Set file access and modification times of the file associated with FD. */ extern int futimens (int __fd, const struct timespec __times[2]) __THROW; + +# else +# ifdef __REDIRECT_NTH +extern int __REDIRECT_NTH (futimens, (int fd, const struct timespec __times[2]), + __futimens64); +# else +# define futimens __futimens64 +# endif +# endif #endif #ifdef __USE_GNU |