aboutsummaryrefslogtreecommitdiff
path: root/socket/sys
diff options
context:
space:
mode:
authorAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-01-18 10:18:01 -0300
committerAdhemerval Zanella <adhemerval.zanella@linaro.org>2024-04-02 15:28:36 -0300
commita4ed0471d71739928a0d0fa3258b3ff3b158e9b9 (patch)
treedb8118e3d4c787cdae80d343bb40bb7fc7ed2926 /socket/sys
parenta0698a5e92ceeed3409d28623b1d599da6bc887d (diff)
downloadglibc-a4ed0471d71739928a0d0fa3258b3ff3b158e9b9.zip
glibc-a4ed0471d71739928a0d0fa3258b3ff3b158e9b9.tar.gz
glibc-a4ed0471d71739928a0d0fa3258b3ff3b158e9b9.tar.bz2
Always define __USE_TIME_BITS64 when 64 bit time_t is used
It was raised on libc-help [1] that some Linux kernel interfaces expect the libc to define __USE_TIME_BITS64 to indicate the time_t size for the kABI. Different than defined by the initial y2038 design document [2], the __USE_TIME_BITS64 is only defined for ABIs that support more than one time_t size (by defining the _TIME_BITS for each module). The 64 bit time_t redirects are now enabled using a different internal define (__USE_TIME64_REDIRECTS). There is no expected change in semantic or code generation. Checked on x86_64-linux-gnu, i686-linux-gnu, aarch64-linux-gnu, and arm-linux-gnueabi [1] https://sourceware.org/pipermail/libc-help/2024-January/006557.html [2] https://sourceware.org/glibc/wiki/Y2038ProofnessDesign Reviewed-by: DJ Delorie <dj@redhat.com>
Diffstat (limited to 'socket/sys')
-rw-r--r--socket/sys/socket.h14
1 files changed, 7 insertions, 7 deletions
diff --git a/socket/sys/socket.h b/socket/sys/socket.h
index 366eaab..463cf32 100644
--- a/socket/sys/socket.h
+++ b/socket/sys/socket.h
@@ -170,7 +170,7 @@ 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
+#ifndef __USE_TIME64_REDIRECTS
extern ssize_t sendmsg (int __fd, const struct msghdr *__message,
int __flags);
#else
@@ -191,7 +191,7 @@ extern ssize_t __sendmsg64 (int __fd, const struct msghdr *__message,
This function is a cancellation point and therefore not marked with
__THROW. */
-# ifndef __USE_TIME_BITS64
+# ifndef __USE_TIME64_REDIRECTS
extern int sendmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
# else
@@ -204,7 +204,7 @@ extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags);
# define sendmmsg __sendmmsg64
# endif
-# endif /* __USE_TIME_BITS64 */
+# endif /* __USE_TIME64_REDIRECTS */
#endif /* __USE_GNU */
/* Receive a message as described by MESSAGE from socket FD.
@@ -212,7 +212,7 @@ extern int __sendmmsg64 (int __fd, struct mmsghdr *__vmessages,
This function is a cancellation point and therefore not marked with
__THROW. */
-#ifndef __USE_TIME_BITS64
+#ifndef __USE_TIME64_REDIRECTS
extern ssize_t recvmsg (int __fd, struct msghdr *__message, int __flags);
#else
# ifdef __REDIRECT
@@ -231,7 +231,7 @@ extern ssize_t __recvmsg64 (int __fd, struct msghdr *__message, int __flags);
This function is a cancellation point and therefore not marked with
__THROW. */
-# ifndef __USE_TIME_BITS64
+# ifndef __USE_TIME64_REDIRECTS
extern int recvmmsg (int __fd, struct mmsghdr *__vmessages,
unsigned int __vlen, int __flags,
struct timespec *__tmo);
@@ -251,7 +251,7 @@ extern int __REDIRECT (recvmmsg, (int __fd, struct mmsghdr *__vmessages,
/* Put the current value for socket FD's option OPTNAME at protocol level LEVEL
into OPTVAL (which is *OPTLEN bytes long), and set *OPTLEN to the value's
actual length. Returns 0 on success, -1 for errors. */
-#ifndef __USE_TIME_BITS64
+#ifndef __USE_TIME64_REDIRECTS
extern int getsockopt (int __fd, int __level, int __optname,
void *__restrict __optval,
socklen_t *__restrict __optlen) __THROW;
@@ -273,7 +273,7 @@ extern int __getsockopt64 (int __fd, int __level, int __optname,
/* Set socket FD's option OPTNAME at protocol level LEVEL
to *OPTVAL (which is OPTLEN bytes long).
Returns 0 on success, -1 for errors. */
-#ifndef __USE_TIME_BITS64
+#ifndef __USE_TIME64_REDIRECTS
extern int setsockopt (int __fd, int __level, int __optname,
const void *__optval, socklen_t __optlen) __THROW;
#else