diff options
author | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-01-18 10:18:01 -0300 |
---|---|---|
committer | Adhemerval Zanella <adhemerval.zanella@linaro.org> | 2024-04-02 15:28:36 -0300 |
commit | a4ed0471d71739928a0d0fa3258b3ff3b158e9b9 (patch) | |
tree | db8118e3d4c787cdae80d343bb40bb7fc7ed2926 /sysdeps/unix/sysv/linux/bits | |
parent | a0698a5e92ceeed3409d28623b1d599da6bc887d (diff) | |
download | glibc-a4ed0471d71739928a0d0fa3258b3ff3b158e9b9.tar.gz glibc-a4ed0471d71739928a0d0fa3258b3ff3b158e9b9.tar.xz glibc-a4ed0471d71739928a0d0fa3258b3ff3b158e9b9.zip |
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 'sysdeps/unix/sysv/linux/bits')
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/socket-constants.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/time.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/timex.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h | 2 | ||||
-rw-r--r-- | sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h | 2 |
6 files changed, 6 insertions, 6 deletions
diff --git a/sysdeps/unix/sysv/linux/bits/socket-constants.h b/sysdeps/unix/sysv/linux/bits/socket-constants.h index d997dbf594..b2102d3abf 100644 --- a/sysdeps/unix/sysv/linux/bits/socket-constants.h +++ b/sysdeps/unix/sysv/linux/bits/socket-constants.h @@ -64,7 +64,7 @@ # define SO_TIMESTAMPNS_NEW 64 # define SO_TIMESTAMPING_NEW 65 -# ifdef __USE_TIME_BITS64 +# ifdef __USE_TIME64_REDIRECTS # define SO_RCVTIMEO SO_RCVTIMEO_NEW # define SO_SNDTIMEO SO_SNDTIMEO_NEW # define SO_TIMESTAMP SO_TIMESTAMP_NEW diff --git a/sysdeps/unix/sysv/linux/bits/time.h b/sysdeps/unix/sysv/linux/bits/time.h index b70ba58a7d..cab4057971 100644 --- a/sysdeps/unix/sysv/linux/bits/time.h +++ b/sysdeps/unix/sysv/linux/bits/time.h @@ -77,7 +77,7 @@ __BEGIN_DECLS /* Tune a POSIX clock. */ extern int clock_adjtime (__clockid_t __clock_id, struct timex *__utx) __THROW __nonnull((2)); -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # if defined(__REDIRECT_NTH) extern int __REDIRECT_NTH (clock_adjtime, (__clockid_t __clock_id, struct timex *__utx), diff --git a/sysdeps/unix/sysv/linux/bits/timex.h b/sysdeps/unix/sysv/linux/bits/timex.h index 398d8094f2..03ccde6d0a 100644 --- a/sysdeps/unix/sysv/linux/bits/timex.h +++ b/sysdeps/unix/sysv/linux/bits/timex.h @@ -25,7 +25,7 @@ struct timex { -# if defined __USE_TIME_BITS64 || (__TIMESIZE == 64 && __WORDSIZE == 32) +# if defined __USE_TIME64_REDIRECTS || (__TIMESIZE == 64 && __WORDSIZE == 32) unsigned int modes; /* mode selector */ int :32; /* pad */ long long offset; /* time offset (usec) */ diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h index fae50281c7..86296ca922 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h @@ -26,7 +26,7 @@ The type `struct msg' is opaque. */ struct msqid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_msqid64_ds_helper.h> #else struct ipc_perm msg_perm; /* structure describing operation permission */ diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h index 3c277ed1d8..2ac89b3ce4 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a set of semaphores. */ struct semid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_semid64_ds_helper.h> #else struct ipc_perm sem_perm; /* operation permission struct */ diff --git a/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h index 09de0b4e3a..1012ed0317 100644 --- a/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h +++ b/sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h @@ -23,7 +23,7 @@ /* Data structure describing a shared memory segment. */ struct shmid_ds { -#ifdef __USE_TIME_BITS64 +#ifdef __USE_TIME64_REDIRECTS # include <bits/types/struct_shmid64_ds_helper.h> #else struct ipc_perm shm_perm; /* operation permission struct */ |