[6/8] socket: Add time64 alias for sendmsg

Message ID bd055d3220c7ccb8513cd469d00bb287cbde0a63.1626708388.git.fweimer@redhat.com
State New
Headers show
Series
  • Additional time64 system call wrappers
Related show

Commit Message

Noah Goldstein via Libc-alpha July 19, 2021, 3:29 p.m.
---
 socket/sys/socket.h                                  | 12 ++++++++++++
 sysdeps/unix/sysv/linux/Versions                     |  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/hppa/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/i386/libc.abilist            |  1 +
 sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist     |  1 +
 sysdeps/unix/sysv/linux/microblaze/be/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/microblaze/le/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist |  1 +
 .../unix/sysv/linux/mips/mips32/nofpu/libc.abilist   |  1 +
 sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist |  1 +
 sysdeps/unix/sysv/linux/nios2/libc.abilist           |  1 +
 .../sysv/linux/powerpc/powerpc32/fpu/libc.abilist    |  1 +
 .../sysv/linux/powerpc/powerpc32/nofpu/libc.abilist  |  1 +
 sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist    |  1 +
 sysdeps/unix/sysv/linux/sendmsg.c                    |  3 +++
 sysdeps/unix/sysv/linux/sh/be/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/sh/le/libc.abilist           |  1 +
 sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist   |  1 +
 22 files changed, 35 insertions(+)

-- 
2.31.1

Patch

diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index b70ba58ba6..e779dc837f 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -170,8 +170,20 @@  extern ssize_t recvfrom (int __fd, void *__restrict __buf, size_t __n,
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
+#ifndef __USE_TIME_BITS64
 extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
 			int __flags);
+#else
+# ifdef __REDIRECT
+extern ssize_t __REDIRECT (sendmsg, (int __fd, const struct msghdr *__message,
+				     int __flags),
+			   __sendmsg64);
+# else
+extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
+			    int __flags);
+#  defien sendmsg __sendmsg64
+# endif
+#endif
 
 #ifdef __USE_GNU
 /* Send a VLEN messages as described by VMESSAGES to socket FD.
diff --git a/sysdeps/unix/sysv/linux/Versions b/sysdeps/unix/sysv/linux/Versions
index 8cc7d6ea15..e03ebf9aff 100644
--- a/sysdeps/unix/sysv/linux/Versions
+++ b/sysdeps/unix/sysv/linux/Versions
@@ -267,6 +267,7 @@  libc {
     __semtimedop64;
     __sem_timedwait64;
     __sendmmsg64;
+    __sendmsg64;
     __setitimer64;
     __settimeofday64;
     __shmctl64;
diff --git a/sysdeps/unix/sysv/linux/arm/be/libc.abilist b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
index 5966d4b869..c3c96f24c4 100644
--- a/sysdeps/unix/sysv/linux/arm/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/be/libc.abilist
@@ -268,6 +268,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/arm/le/libc.abilist b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
index 0ba0a7f031..2786afa406 100644
--- a/sysdeps/unix/sysv/linux/arm/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/arm/le/libc.abilist
@@ -265,6 +265,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/csky/libc.abilist b/sysdeps/unix/sysv/linux/csky/libc.abilist
index 59b6af995f..da3f538b40 100644
--- a/sysdeps/unix/sysv/linux/csky/libc.abilist
+++ b/sysdeps/unix/sysv/linux/csky/libc.abilist
@@ -2424,6 +2424,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/hppa/libc.abilist b/sysdeps/unix/sysv/linux/hppa/libc.abilist
index cf9f0372d0..47d376ff62 100644
--- a/sysdeps/unix/sysv/linux/hppa/libc.abilist
+++ b/sysdeps/unix/sysv/linux/hppa/libc.abilist
@@ -2375,6 +2375,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/i386/libc.abilist b/sysdeps/unix/sysv/linux/i386/libc.abilist
index e1b9ad8229..d6b038b6a3 100644
--- a/sysdeps/unix/sysv/linux/i386/libc.abilist
+++ b/sysdeps/unix/sysv/linux/i386/libc.abilist
@@ -2559,6 +2559,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
index 6c6e132c12..ab9e0955dd 100644
--- a/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/coldfire/libc.abilist
@@ -269,6 +269,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
index 4a5a31a54b..479d17be35 100644
--- a/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
+++ b/sysdeps/unix/sysv/linux/m68k/m680x0/libc.abilist
@@ -2502,6 +2502,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
index 638ee4d1d8..90302842f5 100644
--- a/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/be/libc.abilist
@@ -2475,6 +2475,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
index d6b6c85f74..dcfd52ec31 100644
--- a/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/microblaze/le/libc.abilist
@@ -2472,6 +2472,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
index 8bab590546..c72c2a7101 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/fpu/libc.abilist
@@ -2467,6 +2467,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
index 33cc242f26..6725735b59 100644
--- a/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips32/nofpu/libc.abilist
@@ -2465,6 +2465,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
index b8d2cceade..5c2e228628 100644
--- a/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/mips/mips64/n32/libc.abilist
@@ -2473,6 +2473,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/nios2/libc.abilist b/sysdeps/unix/sysv/linux/nios2/libc.abilist
index f99820e4ff..e0ffbb5687 100644
--- a/sysdeps/unix/sysv/linux/nios2/libc.abilist
+++ b/sysdeps/unix/sysv/linux/nios2/libc.abilist
@@ -2514,6 +2514,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
index 1e7837c971..105dda5300 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/fpu/libc.abilist
@@ -2529,6 +2529,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
index de62b347b0..b079847f84 100644
--- a/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
+++ b/sysdeps/unix/sysv/linux/powerpc/powerpc32/nofpu/libc.abilist
@@ -2562,6 +2562,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
index 2f4b06e27c..b3b55c9c68 100644
--- a/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/s390/s390-32/libc.abilist
@@ -2527,6 +2527,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/sendmsg.c b/sysdeps/unix/sysv/linux/sendmsg.c
index d1d1946280..eb99325a0e 100644
--- a/sysdeps/unix/sysv/linux/sendmsg.c
+++ b/sysdeps/unix/sysv/linux/sendmsg.c
@@ -32,3 +32,6 @@  __libc_sendmsg (int fd, const struct msghdr *msg, int flags)
 }
 weak_alias (__libc_sendmsg, sendmsg)
 weak_alias (__libc_sendmsg, __sendmsg)
+#if __TIMESIZE != 64
+weak_alias (__sendmsg, __sendmsg64)
+#endif
diff --git a/sysdeps/unix/sysv/linux/sh/be/libc.abilist b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
index c01917dca8..54174a2263 100644
--- a/sysdeps/unix/sysv/linux/sh/be/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/be/libc.abilist
@@ -2382,6 +2382,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/sh/le/libc.abilist b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
index d0449dc285..3028f6c334 100644
--- a/sysdeps/unix/sysv/linux/sh/le/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sh/le/libc.abilist
@@ -2379,6 +2379,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F
diff --git a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
index 309ce62d75..8b0ae536e2 100644
--- a/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
+++ b/sysdeps/unix/sysv/linux/sparc/sparc32/libc.abilist
@@ -2522,6 +2522,7 @@  GLIBC_2.34 __sem_timedwait64 F
 GLIBC_2.34 __semctl64 F
 GLIBC_2.34 __semtimedop64 F
 GLIBC_2.34 __sendmmsg64 F
+GLIBC_2.34 __sendmsg64 F
 GLIBC_2.34 __setitimer64 F
 GLIBC_2.34 __settimeofday64 F
 GLIBC_2.34 __shmctl64 F