about summary refs log tree commit diff
path: root/io
diff options
context:
space:
mode:
Diffstat (limited to 'io')
-rw-r--r--io/sys/poll.h11
-rw-r--r--io/sys/stat.h113
-rw-r--r--io/utime.h11
3 files changed, 125 insertions, 10 deletions
diff --git a/io/sys/poll.h b/io/sys/poll.h
index 08f29df540..e640efb2bc 100644
--- a/io/sys/poll.h
+++ b/io/sys/poll.h
@@ -66,6 +66,17 @@ extern int ppoll (struct pollfd *__fds, nfds_t __nfds,
 		  const __sigset_t *__ss)
     __attr_access ((__write_only__, 1, 2));
 
+# ifdef __USE_TIME_BITS64
+#  ifdef __REDIRECT
+extern int __REDIRECT (ppoll, (struct pollfd *__fds, nfds_t __nfds,
+                               const struct timespec *__timeout,
+                               const __sigset_t *__ss),
+                       __ppoll64)
+    __attr_access ((__write_only__, 1, 2));
+#  else
+#  define ppoll __ppoll64
+#  endif
+# endif
 #endif
 
 __END_DECLS
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
diff --git a/io/utime.h b/io/utime.h
index c7612d0838..1a645a3fff 100644
--- a/io/utime.h
+++ b/io/utime.h
@@ -46,10 +46,21 @@ struct utimbuf
 
 /* Set the access and modification times of FILE to those given in
    *FILE_TIMES.  If FILE_TIMES is NULL, set them to the current time.  */
+#ifndef __USE_TIME_BITS64
 extern int utime (const char *__file,
 		  const struct utimbuf *__file_times)
      __THROW __nonnull ((1));
 
+#else
+# ifdef __REDIRECT_NTH
+extern int __REDIRECT_NTH (utime, (const char *__file,
+                                   const struct utimbuf *__file_times),
+                           __utime64);
+# else
+#  define utime __utime64
+# endif
+#endif
+
 __END_DECLS
 
 #endif /* utime.h */