diff mbox series

[2/8] io: Add time64 alias for fcntl

Message ID f18c52d25ea0879d42c05a1a641837b0a47a00f0.1625492203.git.fweimer@redhat.com
State Superseded
Delegated to: Adhemerval Zanella Netto
Headers show
Series Additional time64 aliases | expand

Checks

Context Check Description
dj/TryBot-apply_patch success Patch applied to master at the time it was sent

Commit Message

Florian Weimer July 5, 2021, 1:41 p.m. UTC
---
 io/Makefile                                   |  2 ++
 io/fcntl.h                                    | 27 ++++++++++++++-----
 io/tst-fcntl-time64.c                         |  1 +
 sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/csky/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/fcntl64.c             |  3 +++
 sysdeps/unix/sysv/linux/hppa/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist     |  1 +
 .../sysv/linux/m68k/coldfire/libc.abilist     |  1 +
 .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  1 +
 .../sysv/linux/microblaze/be/libc.abilist     |  1 +
 .../sysv/linux/microblaze/le/libc.abilist     |  1 +
 .../sysv/linux/mips/mips32/fpu/libc.abilist   |  1 +
 .../sysv/linux/mips/mips32/nofpu/libc.abilist |  1 +
 .../sysv/linux/mips/mips64/n32/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist    |  1 +
 .../linux/powerpc/powerpc32/fpu/libc.abilist  |  1 +
 .../powerpc/powerpc32/nofpu/libc.abilist      |  1 +
 .../unix/sysv/linux/s390/s390-32/libc.abilist |  1 +
 sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  1 +
 .../sysv/linux/sparc/sparc32/libc.abilist     |  1 +
 23 files changed, 45 insertions(+), 7 deletions(-)
 create mode 100644 io/tst-fcntl-time64.c

Comments

Lukasz Majewski July 20, 2021, 8:41 a.m. UTC | #1
Hi Florian,

> ---
>  io/Makefile                                   |  2 ++
>  io/fcntl.h                                    | 27
> ++++++++++++++----- io/tst-fcntl-time64.c                         |
> 1 + sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  1 +
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  1 +
>  sysdeps/unix/sysv/linux/csky/libc.abilist     |  1 +
>  sysdeps/unix/sysv/linux/fcntl64.c             |  3 +++
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     |  1 +
>  sysdeps/unix/sysv/linux/i386/libc.abilist     |  1 +
>  .../sysv/linux/m68k/coldfire/libc.abilist     |  1 +
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  1 +
>  .../sysv/linux/microblaze/be/libc.abilist     |  1 +
>  .../sysv/linux/microblaze/le/libc.abilist     |  1 +
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   |  1 +
>  .../sysv/linux/mips/mips32/nofpu/libc.abilist |  1 +
>  .../sysv/linux/mips/mips64/n32/libc.abilist   |  1 +
>  sysdeps/unix/sysv/linux/nios2/libc.abilist    |  1 +
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  |  1 +
>  .../powerpc/powerpc32/nofpu/libc.abilist      |  1 +
>  .../unix/sysv/linux/s390/s390-32/libc.abilist |  1 +
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  1 +
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  1 +
>  .../sysv/linux/sparc/sparc32/libc.abilist     |  1 +
>  23 files changed, 45 insertions(+), 7 deletions(-)
>  create mode 100644 io/tst-fcntl-time64.c
> 
> diff --git a/io/Makefile b/io/Makefile
> index 1a16990205..6120ee0cd7 100644
> --- a/io/Makefile
> +++ b/io/Makefile
> @@ -88,6 +88,8 @@ tests-time64 := \
>    tst-utime-time64 \
>    tst-utimensat-time64 \
>    tst-utimes-time64 \
> +  tst-fcntl-time64 \
> +  # tests-time64

The comment line '#' - is it needed?

>  
>  # 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 f3b5e0ef77..8917a73b42 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;

I cannot find the __fcntl_time64 definition in glibc sources. Will this
function be added in the future?

> +# else
> +extern int __fcntl_time64 (int __fd, int __request, ...) __THROW;
> +#  define fcntl64 __fcntl_time64
> +#  define fcntl __fcntl_time64
> +# endif
>  #endif
>  

Ok.

>  /* 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 0000000000..ef4a5182cb
> --- /dev/null
> +++ b/io/tst-fcntl-time64.c
> @@ -0,0 +1 @@
> +#include "tst-fcntl.c"

Ok.

> diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> b/sysdeps/unix/sysv/linux/arm/be/libc.abilist index
> 85d572ba84..1243e62e45 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
> 79be7bcce3..4750d5db49 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
> 1aad4a1be0..6e3263d2fd 100644 ---
> a/sysdeps/unix/sysv/linux/csky/libc.abilist +++
> b/sysdeps/unix/sysv/linux/csky/libc.abilist @@ -2335,6 +2335,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 ed19c327b9..e65233de4b
> 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
> 59f61b4b48..d21cefe909 100644 ---
> a/sysdeps/unix/sysv/linux/hppa/libc.abilist +++
> b/sysdeps/unix/sysv/linux/hppa/libc.abilist @@ -2288,6 +2288,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
> 0acf01c432..f10f233bf6 100644 ---
> a/sysdeps/unix/sysv/linux/i386/libc.abilist +++
> b/sysdeps/unix/sysv/linux/i386/libc.abilist @@ -2471,6 +2471,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
> a030d33f83..577f5f171d 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
> 9ba724cff0..af68a21c02 100644 ---
> a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist +++
> b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist @@ -2415,6 +2415,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
> 31a33e2d05..c875c87f93 100644 ---
> a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist +++
> b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist @@ -2386,6
> +2386,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
> 4faaa64714..23835351e3 100644 ---
> a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist +++
> b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist @@ -2383,6
> +2383,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
> b283bb5a3d..08a16d9140 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist @@ -2380,6
> +2380,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
> 6145a5c1a3..88a739586c 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist @@ -2378,6
> +2378,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
> ebbfdc0fe4..a7f8058932 100644 ---
> a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist +++
> b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist @@ -2386,6
> +2386,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
> e7cb508d19..00242d3e83 100644 ---
> a/sysdeps/unix/sysv/linux/nios2/libc.abilist +++
> b/sysdeps/unix/sysv/linux/nios2/libc.abilist @@ -2425,6 +2425,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
> 7742c0f9f7..2589b685d6 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist @@
> -2442,6 +2442,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
> d0786c84a9..e4b172a6e0 100644 ---
> a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist +++
> b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist @@
> -2475,6 +2475,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
> fd09d6a21b..be2908b27a 100644 ---
> a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist +++
> b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist @@ -2440,6
> +2440,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
> 48f13e2b53..4797150a1c 100644 ---
> a/sysdeps/unix/sysv/linux/sh/be/libc.abilist +++
> b/sysdeps/unix/sysv/linux/sh/be/libc.abilist @@ -2295,6 +2295,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
> e1ff04148b..4d38657618 100644 ---
> a/sysdeps/unix/sysv/linux/sh/le/libc.abilist +++
> b/sysdeps/unix/sysv/linux/sh/le/libc.abilist @@ -2292,6 +2292,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
> 2100ecc3f9..fe026eb19e 100644 ---
> a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist +++
> b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist @@ -2435,6
> +2435,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

Ok.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Lukasz Majewski July 20, 2021, 8:45 a.m. UTC | #2
On Tue, 20 Jul 2021 10:41:10 +0200
Lukasz Majewski <lukma@denx.de> wrote:

> > +#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;  
> 
> I cannot find the __fcntl_time64 definition in glibc sources. Will
> this function be added in the future?

Ok. I've overlooked it - this is a weak alias in the
sysdeps/unix/sysv/linux/fcntl64.c function.


Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Florian Weimer July 20, 2021, 8:50 a.m. UTC | #3
* Lukasz Majewski:

>> diff --git a/io/Makefile b/io/Makefile
>> index 1a16990205..6120ee0cd7 100644
>> --- a/io/Makefile
>> +++ b/io/Makefile
>> @@ -88,6 +88,8 @@ tests-time64 := \
>>    tst-utime-time64 \
>>    tst-utimensat-time64 \
>>    tst-utimes-time64 \
>> +  tst-fcntl-time64 \
>> +  # tests-time64
>
> The comment line '#' - is it needed?

It's there to swallow the training \ on the preceding line.  Once the
list is long, I find such comments quite helpful.

Thanks,
Florian
Lukasz Majewski July 20, 2021, 9:16 a.m. UTC | #4
On Tue, 20 Jul 2021 10:50:13 +0200
Florian Weimer <fweimer@redhat.com> wrote:

> * Lukasz Majewski:
> 
> >> diff --git a/io/Makefile b/io/Makefile
> >> index 1a16990205..6120ee0cd7 100644
> >> --- a/io/Makefile
> >> +++ b/io/Makefile
> >> @@ -88,6 +88,8 @@ tests-time64 := \
> >>    tst-utime-time64 \
> >>    tst-utimensat-time64 \
> >>    tst-utimes-time64 \
> >> +  tst-fcntl-time64 \
> >> +  # tests-time64  
> >
> > The comment line '#' - is it needed?  
> 
> It's there to swallow the training \ on the preceding line.  Once the
> list is long, I find such comments quite helpful.

Ok. Thanks for the explanation.

> 
> Thanks,
> Florian
> 




Best regards,

Lukasz Majewski

--

DENX Software Engineering GmbH,      Managing Director: Wolfgang Denk
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-59 Fax: (+49)-8142-66989-80 Email: lukma@denx.de
Adhemerval Zanella July 20, 2021, 7:49 p.m. UTC | #5
LGTM, with a small fix below.

Reviewed-by: Adhemerval Zanella  <adhemerval.zanella@linaro.org>

On 05/07/2021 10:41, Florian Weimer via Libc-alpha wrote:
> ---
>  io/Makefile                                   |  2 ++
>  io/fcntl.h                                    | 27 ++++++++++++++-----
>  io/tst-fcntl-time64.c                         |  1 +
>  sysdeps/unix/sysv/linux/arm/be/libc.abilist   |  1 +
>  sysdeps/unix/sysv/linux/arm/le/libc.abilist   |  1 +
>  sysdeps/unix/sysv/linux/csky/libc.abilist     |  1 +
>  sysdeps/unix/sysv/linux/fcntl64.c             |  3 +++
>  sysdeps/unix/sysv/linux/hppa/libc.abilist     |  1 +
>  sysdeps/unix/sysv/linux/i386/libc.abilist     |  1 +
>  .../sysv/linux/m68k/coldfire/libc.abilist     |  1 +
>  .../unix/sysv/linux/m68k/m680x0/libc.abilist  |  1 +
>  .../sysv/linux/microblaze/be/libc.abilist     |  1 +
>  .../sysv/linux/microblaze/le/libc.abilist     |  1 +
>  .../sysv/linux/mips/mips32/fpu/libc.abilist   |  1 +
>  .../sysv/linux/mips/mips32/nofpu/libc.abilist |  1 +
>  .../sysv/linux/mips/mips64/n32/libc.abilist   |  1 +
>  sysdeps/unix/sysv/linux/nios2/libc.abilist    |  1 +
>  .../linux/powerpc/powerpc32/fpu/libc.abilist  |  1 +
>  .../powerpc/powerpc32/nofpu/libc.abilist      |  1 +
>  .../unix/sysv/linux/s390/s390-32/libc.abilist |  1 +
>  sysdeps/unix/sysv/linux/sh/be/libc.abilist    |  1 +
>  sysdeps/unix/sysv/linux/sh/le/libc.abilist    |  1 +
>  .../sysv/linux/sparc/sparc32/libc.abilist     |  1 +
>  23 files changed, 45 insertions(+), 7 deletions(-)
>  create mode 100644 io/tst-fcntl-time64.c
> 
> diff --git a/io/Makefile b/io/Makefile
> index 1a16990205..6120ee0cd7 100644
> --- a/io/Makefile
> +++ b/io/Makefile
> @@ -88,6 +88,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

Ok.

> diff --git a/io/fcntl.h b/io/fcntl.h
> index f3b5e0ef77..8917a73b42 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.

Ok.

> diff --git a/io/tst-fcntl-time64.c b/io/tst-fcntl-time64.c
> new file mode 100644
> index 0000000000..ef4a5182cb
> --- /dev/null
> +++ b/io/tst-fcntl-time64.c
> @@ -0,0 +1 @@
> +#include "tst-fcntl.c"

Ok.

> diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
> index 85d572ba84..1243e62e45 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 79be7bcce3..4750d5db49 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 1aad4a1be0..6e3263d2fd 100644
> --- a/sysdeps/unix/sysv/linux/csky/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
> @@ -2335,6 +2335,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 ed19c327b9..e65233de4b 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)

Ok.

> diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
> index 59f61b4b48..d21cefe909 100644
> --- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
> @@ -2288,6 +2288,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 0acf01c432..f10f233bf6 100644
> --- a/sysdeps/unix/sysv/linux/i386/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
> @@ -2471,6 +2471,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 a030d33f83..577f5f171d 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 9ba724cff0..af68a21c02 100644
> --- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
> @@ -2415,6 +2415,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 31a33e2d05..c875c87f93 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
> @@ -2386,6 +2386,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 4faaa64714..23835351e3 100644
> --- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
> @@ -2383,6 +2383,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 b283bb5a3d..08a16d9140 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
> @@ -2380,6 +2380,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 6145a5c1a3..88a739586c 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
> @@ -2378,6 +2378,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 ebbfdc0fe4..a7f8058932 100644
> --- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
> @@ -2386,6 +2386,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 e7cb508d19..00242d3e83 100644
> --- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
> @@ -2425,6 +2425,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 7742c0f9f7..2589b685d6 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
> @@ -2442,6 +2442,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 d0786c84a9..e4b172a6e0 100644
> --- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
> @@ -2475,6 +2475,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 fd09d6a21b..be2908b27a 100644
> --- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
> @@ -2440,6 +2440,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 48f13e2b53..4797150a1c 100644
> --- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
> @@ -2295,6 +2295,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 e1ff04148b..4d38657618 100644
> --- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
> @@ -2292,6 +2292,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 2100ecc3f9..fe026eb19e 100644
> --- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> +++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
> @@ -2435,6 +2435,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
> 

It misses the Versions, which was added on the previous patch.
diff mbox series

Patch

diff --git a/io/Makefile b/io/Makefile
index 1a16990205..6120ee0cd7 100644
--- a/io/Makefile
+++ b/io/Makefile
@@ -88,6 +88,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 f3b5e0ef77..8917a73b42 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 0000000000..ef4a5182cb
--- /dev/null
+++ b/io/tst-fcntl-time64.c
@@ -0,0 +1 @@ 
+#include "tst-fcntl.c"
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 85d572ba84..1243e62e45 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 79be7bcce3..4750d5db49 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 1aad4a1be0..6e3263d2fd 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2335,6 +2335,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 ed19c327b9..e65233de4b 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 59f61b4b48..d21cefe909 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2288,6 +2288,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 0acf01c432..f10f233bf6 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2471,6 +2471,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 a030d33f83..577f5f171d 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 9ba724cff0..af68a21c02 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2415,6 +2415,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 31a33e2d05..c875c87f93 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2386,6 +2386,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 4faaa64714..23835351e3 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2383,6 +2383,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 b283bb5a3d..08a16d9140 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2380,6 +2380,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 6145a5c1a3..88a739586c 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2378,6 +2378,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 ebbfdc0fe4..a7f8058932 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2386,6 +2386,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 e7cb508d19..00242d3e83 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2425,6 +2425,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 7742c0f9f7..2589b685d6 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2442,6 +2442,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 d0786c84a9..e4b172a6e0 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2475,6 +2475,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 fd09d6a21b..be2908b27a 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2440,6 +2440,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 48f13e2b53..4797150a1c 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2295,6 +2295,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 e1ff04148b..4d38657618 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2292,6 +2292,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 2100ecc3f9..fe026eb19e 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2435,6 +2435,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