aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Weimer <fweimer@redhat.com>2021-07-21 11:42:31 +0200
committerFlorian Weimer <fweimer@redhat.com>2021-07-21 11:58:16 +0200
commit8a40aff86ba5f64a3a84883e539cb67bd48db030 (patch)
treea780670b42c8cb18516bb7e952971292e0780978
parent82c395d91ea4f69120d453aeec398e3042cad5fc (diff)
downloadglibc-8a40aff86ba5f64a3a84883e539cb67bd48db030.zip
glibc-8a40aff86ba5f64a3a84883e539cb67bd48db030.tar.gz
glibc-8a40aff86ba5f64a3a84883e539cb67bd48db030.tar.bz2
io: Add time64 alias for fcntl
Reviewed-by: Adhemerval Zanella <adhemerval.zanella@linaro.org>
-rw-r--r--io/Makefile2
-rw-r--r--io/fcntl.h27
-rw-r--r--io/tst-fcntl-time64.c1
-rw-r--r--sysdeps/unix/sysv/linux/Versions1
-rw-r--r--sysdeps/unix/sysv/linux/arm/be/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/arm/le/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/csky/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/fcntl64.c3
-rw-r--r--sysdeps/unix/sysv/linux/hppa/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/i386/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/be/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/le/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/nios2/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sh/be/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sh/le/libc.abilist1
-rw-r--r--sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist1
24 files changed, 46 insertions, 7 deletions
diff --git a/io/Makefile b/io/Makefile
index ebb7d56..9871ecb 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -90,6 +90,8 @@ tests-time64 := \
tst-utime-time64 \
tst-utimensat-time64 \
tst-utimes-time64 \
+ tst-fcntl-time64 \
+ # tests-time64
# Likewise for statx, but we do not need static linking here.
tests-internal += tst-statx tst-file_change_detection
diff --git a/io/fcntl.h b/io/fcntl.h
index f3b5e0e..8917a73 100644
--- a/io/fcntl.h
+++ b/io/fcntl.h
@@ -172,17 +172,30 @@ typedef __pid_t pid_t;
This function is a cancellation point and therefore not marked with
__THROW. */
-#ifndef __USE_FILE_OFFSET64
+#ifndef __USE_TIME_BITS64
+# ifndef __USE_FILE_OFFSET64
extern int fcntl (int __fd, int __cmd, ...);
-#else
-# ifdef __REDIRECT
-extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
# else
-# define fcntl fcntl64
+# ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __cmd, ...), fcntl64);
+# else
+# define fcntl fcntl64
+# endif
# endif
-#endif
-#ifdef __USE_LARGEFILE64
+# ifdef __USE_LARGEFILE64
extern int fcntl64 (int __fd, int __cmd, ...);
+# endif
+#else /* __USE_TIME_BITS64 */
+# ifdef __REDIRECT
+extern int __REDIRECT (fcntl, (int __fd, int __request, ...),
+ __fcntl_time64) __THROW;
+extern int __REDIRECT (fcntl64, (int __fd, int __request, ...),
+ __fcntl_time64) __THROW;
+# else
+extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
+# define fcntl64 __fcntl_time64
+# define fcntl __fcntl_time64
+# endif
#endif
/* Open FILE and return a new file descriptor for it, or -1 on error.
diff --git a/io/tst-fcntl-time64.c b/io/tst-fcntl-time64.c
new file mode 100644
index 0000000..ef4a518
--- /dev/null
+++ b/io/tst-fcntl-time64.c
@@ -0,0 +1 @@
+#include "tst-fcntl.c"
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index a78bf88..4f0e167 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -209,6 +209,7 @@ libc {
__ctime64;
__ctime64_r;
__difftime64;
+ __fcntl_time64;
__fstat64_time64;
__fstatat64_time64;
__futimens64;
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index bfb5d09..225cd17 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -203,6 +203,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index cd64167..3731f38 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -200,6 +200,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 121e5ad..6678218 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2359,6 +2359,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/fcntl64.c b/sysdeps/unix/sysv/linux/fcntl64.c
index ed19c32..e65233d 100644
--- a/sysdeps/unix/sysv/linux/fcntl64.c
+++ b/sysdeps/unix/sysv/linux/fcntl64.c
@@ -54,6 +54,9 @@ libc_hidden_def (__libc_fcntl64)
weak_alias (__libc_fcntl64, __fcntl64)
libc_hidden_weak (__fcntl64)
weak_alias (__libc_fcntl64, fcntl64)
+#if __TIMESIZE != 64
+weak_alias (__libc_fcntl64, __fcntl_time64)
+#endif
#ifdef __OFF_T_MATCHES_OFF64_T
weak_alias (__libc_fcntl64, __libc_fcntl)
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index 1ef5669..8f105d3 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2310,6 +2310,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index 287cd4e..53ddabd 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2493,6 +2493,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index f01a129..23168e8 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -204,6 +204,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index beb2453..a63ac56 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2437,6 +2437,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 5ab2304..f9f6dfb 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2410,6 +2410,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index c3a61c9..97d03fa 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2407,6 +2407,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 1e66953..0deeb17 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2402,6 +2402,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index cd26df6..55432c5 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2400,6 +2400,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index a5002c8..daa0d49 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2408,6 +2408,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index 04f33ca..36dcfc8 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2449,6 +2449,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 089577f..8283409 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2464,6 +2464,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index fc97125..590eda0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2497,6 +2497,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index e16ddd9..08b0215 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2462,6 +2462,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index 3437843..416db82 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2317,6 +2317,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index 4e7c6ba..6be813c 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2314,6 +2314,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 9274380..ce61dd9 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2457,6 +2457,7 @@ GLIBC_2.34 __cnd_timedwait64 F
GLIBC_2.34 __ctime64 F
GLIBC_2.34 __ctime64_r F
GLIBC_2.34 __difftime64 F
+GLIBC_2.34 __fcntl_time64 F
GLIBC_2.34 __fstat64_time64 F
GLIBC_2.34 __fstatat64_time64 F
GLIBC_2.34 __fts64_children_time64 F