about summary refs log tree commit diff
path: root/sysdeps/unix
diff options
context:
space:
mode:
Diffstat (limited to 'sysdeps/unix')
-rw-r--r--sysdeps/unix/sysv/linux/arm/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket-constants.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/socket.h4
-rw-r--r--sysdeps/unix/sysv/linux/bits/time.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/timex.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/types/struct_msqid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/types/struct_semid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/types/struct_shmid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/bits/uio-ext.h1
-rw-r--r--sysdeps/unix/sysv/linux/csky/bits/struct_stat.h4
-rw-r--r--sysdeps/unix/sysv/linux/features-time64.h9
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/hppa/bits/wordsize.h21
-rw-r--r--sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h12
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/socket-constants.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/struct_stat.h14
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/net/if_packet.h2
-rw-r--r--sysdeps/unix/sysv/linux/netash/ash.h2
-rw-r--r--sysdeps/unix/sysv/linux/neteconet/ec.h2
-rw-r--r--sysdeps/unix/sysv/linux/netiucv/iucv.h2
-rw-r--r--sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h4
-rw-r--r--sysdeps/unix/sysv/linux/pidfd_getpid.c4
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h3
-rw-r--r--sysdeps/unix/sysv/linux/s390/bits/struct_stat.h4
-rw-r--r--sysdeps/unix/sysv/linux/sh/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h2
-rw-r--r--sysdeps/unix/sysv/linux/sparc/bits/wordsize.h3
-rw-r--r--sysdeps/unix/sysv/linux/sys/epoll.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/prctl.h2
-rw-r--r--sysdeps/unix/sysv/linux/sys/timerfd.h4
-rw-r--r--sysdeps/unix/sysv/linux/sys/timex.h2
-rw-r--r--sysdeps/unix/sysv/linux/timespec_get.c2
-rw-r--r--sysdeps/unix/sysv/linux/timespec_getres.c2
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/struct_stat.h8
-rw-r--r--sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h2
52 files changed, 117 insertions, 90 deletions
diff --git a/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h b/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h
index 255feaa8cb..89534fea85 100644
--- a/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/arm/bits/struct_stat.h
@@ -28,7 +28,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;			/* Device.  */
@@ -83,13 +83,13 @@ struct stat
 # else
     __ino64_t st_ino;			/* File serial number.	*/
 # endif
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
   };
 
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -125,7 +125,7 @@ struct stat64
     unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
 #  endif
     __ino64_t st_ino;			/* File serial number.		*/
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
   };
 #endif
 
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/socket.h b/sysdeps/unix/sysv/linux/bits/socket.h
index 0d86feb4ca..6dab283a2e 100644
--- a/sysdeps/unix/sysv/linux/bits/socket.h
+++ b/sysdeps/unix/sysv/linux/bits/socket.h
@@ -180,7 +180,7 @@ typedef __socklen_t socklen_t;
 #include <bits/sockaddr.h>
 
 /* Structure describing a generic socket address.  */
-struct sockaddr
+struct __attribute_struct_may_alias__ sockaddr
   {
     __SOCKADDR_COMMON (sa_);	/* Common data: address family and length.  */
     char sa_data[14];		/* Address data.  */
@@ -193,7 +193,7 @@ struct sockaddr
 #define _SS_PADSIZE \
   (_SS_SIZE - __SOCKADDR_COMMON_SIZE - sizeof (__ss_aligntype))
 
-struct sockaddr_storage
+struct __attribute_struct_may_alias__ sockaddr_storage
   {
     __SOCKADDR_COMMON (ss_);	/* Address family, etc.  */
     char __ss_padding[_SS_PADSIZE];
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 */
diff --git a/sysdeps/unix/sysv/linux/bits/uio-ext.h b/sysdeps/unix/sysv/linux/bits/uio-ext.h
index 7854cccef3..ead7a09156 100644
--- a/sysdeps/unix/sysv/linux/bits/uio-ext.h
+++ b/sysdeps/unix/sysv/linux/bits/uio-ext.h
@@ -47,6 +47,7 @@ extern ssize_t process_vm_writev (pid_t __pid, const struct iovec *__lvec,
 #define RWF_SYNC	0x00000004 /* per-IO O_SYNC.  */
 #define RWF_NOWAIT	0x00000008 /* per-IO nonblocking mode.  */
 #define RWF_APPEND	0x00000010 /* per-IO O_APPEND.  */
+#define RWF_NOAPPEND	0x00000020 /* per-IO negation of O_APPEND */
 
 __END_DECLS
 
diff --git a/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h b/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h
index 4b4822d6d0..47a9f0aaff 100644
--- a/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/csky/bits/struct_stat.h
@@ -43,7 +43,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;		/* Device.  */
@@ -88,7 +88,7 @@ struct stat
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;		/* Device.  */
diff --git a/sysdeps/unix/sysv/linux/features-time64.h b/sysdeps/unix/sysv/linux/features-time64.h
index dd3442c2ea..8d573cd23e 100644
--- a/sysdeps/unix/sysv/linux/features-time64.h
+++ b/sysdeps/unix/sysv/linux/features-time64.h
@@ -24,9 +24,8 @@
 # if _TIME_BITS == 64
 #  if ! defined (_FILE_OFFSET_BITS) || _FILE_OFFSET_BITS != 64
 #   error "_TIME_BITS=64 is allowed only with _FILE_OFFSET_BITS=64"
-#  elif __TIMESIZE == 32
-#   define __USE_TIME_BITS64	1
 #  endif
+#  define __USE_TIME_BITS64	1
 # elif _TIME_BITS == 32
 #  if __TIMESIZE > 32
 #   error "_TIME_BITS=32 is not compatible with __TIMESIZE > 32"
@@ -34,4 +33,10 @@
 # else
 #  error Invalid _TIME_BITS value (can only be 32 or 64-bit)
 # endif
+#elif __TIMESIZE == 64
+# define __USE_TIME_BITS64      1
+#endif
+
+#if defined __USE_TIME_BITS64 && __TIMESIZE == 32
+# define __USE_TIME64_REDIRECTS 1
 #endif
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h b/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h
index 58b523d03a..80a76a17dc 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/socket-constants.h
@@ -54,7 +54,7 @@
 # define SO_TIMESTAMPNS_NEW 0x4039
 # define SO_TIMESTAMPING_NEW 0x403A
 
-# 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/hppa/bits/struct_stat.h b/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h
index 069efdbc55..09ea40054b 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/hppa/bits/struct_stat.h
@@ -28,7 +28,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;			/* Device.  */
@@ -83,13 +83,13 @@ struct stat
 # else
     __ino64_t st_ino;			/* File serial number.	*/
 # endif
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
   };
 
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -125,7 +125,7 @@ struct stat64
     unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
 #  endif
     __ino64_t st_ino;			/* File serial number.		*/
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
   };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h
index 2bc7cac06d..4995e0a4a5 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_msqid_ds.h
+++ b/sysdeps/unix/sysv/linux/hppa/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/hppa/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h
index dd8fbebcf4..df88949dc2 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_semid_ds.h
+++ b/sysdeps/unix/sysv/linux/hppa/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/hppa/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h
index 58ac572b6e..cb3b0303aa 100644
--- a/sysdeps/unix/sysv/linux/hppa/bits/types/struct_shmid_ds.h
+++ b/sysdeps/unix/sysv/linux/hppa/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 */
diff --git a/sysdeps/unix/sysv/linux/hppa/bits/wordsize.h b/sysdeps/unix/sysv/linux/hppa/bits/wordsize.h
new file mode 100644
index 0000000000..6ecbfe7c86
--- /dev/null
+++ b/sysdeps/unix/sysv/linux/hppa/bits/wordsize.h
@@ -0,0 +1,21 @@
+/* Copyright (C) 1999-2024 Free Software Foundation, Inc.
+   This file is part of the GNU C Library.
+
+   The GNU C Library is free software; you can redistribute it and/or
+   modify it under the terms of the GNU Lesser General Public
+   License as published by the Free Software Foundation; either
+   version 2.1 of the License, or (at your option) any later version.
+
+   The GNU C Library is distributed in the hope that it will be useful,
+   but WITHOUT ANY WARRANTY; without even the implied warranty of
+   MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
+   Lesser General Public License for more details.
+
+   You should have received a copy of the GNU Lesser General Public
+   License along with the GNU C Library; if not, see
+   <https://www.gnu.org/licenses/>.  */
+
+#define __WORDSIZE			32
+#define __WORDSIZE_TIME64_COMPAT32	1
+#define __WORDSIZE32_SIZE_ULONG		0
+#define __WORDSIZE32_PTRDIFF_LONG	0
diff --git a/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h b/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h
index 3b1db157bc..b7f20189b1 100644
--- a/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/m68k/bits/struct_stat.h
@@ -25,7 +25,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;			/* Device.  */
@@ -80,13 +80,13 @@ struct stat
 # else
     __ino64_t st_ino;			/* File serial number.	*/
 # endif
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
   };
 
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -122,7 +122,7 @@ struct stat64
     unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
 #  endif
     __ino64_t st_ino;			/* File serial number.		*/
-# endif /* __USE_TIME_BITS64 */
+# endif /* __USE_TIME64_REDIRECTS */
   };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h
index 0f4693fb1f..ff1e269f14 100644
--- a/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/microblaze/bits/struct_stat.h
@@ -26,7 +26,7 @@
 #ifndef __USE_FILE_OFFSET64
 struct stat
 {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
         __dev_t         st_dev;     /* Device.  */
@@ -64,7 +64,7 @@ struct stat
 # endif
         unsigned int            __glibc_reserved4;
         unsigned int            __glibc_reserved5;
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
 };
 #else /* __USE_FILE_OFFSET64 */
 /* MS: If __USE_FILE_OFFSET64 is setup then struct stat should match stat64
@@ -74,7 +74,7 @@ struct stat
  * create one ifdef to separate stats structures.  */
 struct stat
 {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
         unsigned long long      st_dev;     /* Device.  */
@@ -112,14 +112,14 @@ struct stat
 # endif
         unsigned int            __glibc_reserved4;
         unsigned int            __glibc_reserved5;
-# endif /* __USE_TIME_BITS64 */
+# endif /* __USE_TIME64_REDIRECTS */
 };
 #endif /* __USE_FILE_OFFSET64 */
 
 #ifdef __USE_LARGEFILE64
 struct stat64
 {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
         unsigned long long      st_dev;     /* Device.  */
@@ -157,7 +157,7 @@ struct stat64
 #  endif
         unsigned int            __glibc_reserved4;
         unsigned int            __glibc_reserved5;
-# endif /* __USE_TIME_BITS64 */
+# endif /* __USE_TIME64_REDIRECTS */
 };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h b/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h
index c6908a2793..77ffc8b890 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/socket-constants.h
@@ -54,7 +54,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/mips/bits/struct_stat.h b/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h
index 277ebad9b6..50a4b367f6 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/mips/bits/struct_stat.h
@@ -29,7 +29,7 @@
 /* Structure describing file characteristics.  */
 struct stat
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     unsigned long int st_dev;
@@ -82,13 +82,13 @@ struct stat
     __blkcnt64_t st_blocks;	/* Number of 512-byte blocks allocated.  */
 #  endif
     long int st_pad5[14];
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
   };
 
 # ifdef __USE_LARGEFILE64
 struct stat64
   {
-#  ifdef __USE_TIME_BITS64
+#  ifdef __USE_TIME64_REDIRECTS
 #   include <bits/struct_stat_time64_helper.h>
 #  else
     unsigned long int st_dev;
@@ -123,7 +123,7 @@ struct stat64
     long int st_pad3;
     __blkcnt64_t st_blocks;	/* Number of 512-byte blocks allocated.  */
     long int st_pad4[14];
-#  endif /* __USE_TIME_BITS64  */
+#  endif /* __USE_TIME64_REDIRECTS  */
   };
 # endif /* __USE_LARGEFILE64  */
 
@@ -131,7 +131,7 @@ struct stat64
 
 struct stat
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;
@@ -189,7 +189,7 @@ struct stat
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;
@@ -224,7 +224,7 @@ struct stat64
     unsigned int st_pad3;
     __blkcnt64_t st_blocks;
     int st_pad4[14];
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
 };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h
index 4e8bd51b0a..09c53648b7 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_msqid_ds.h
+++ b/sysdeps/unix/sysv/linux/mips/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/mips/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h
index d1a30e3164..0746684a7d 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_semid_ds.h
+++ b/sysdeps/unix/sysv/linux/mips/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/mips/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h
index 8771164b57..c665af1874 100644
--- a/sysdeps/unix/sysv/linux/mips/bits/types/struct_shmid_ds.h
+++ b/sysdeps/unix/sysv/linux/mips/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 */
diff --git a/sysdeps/unix/sysv/linux/net/if_packet.h b/sysdeps/unix/sysv/linux/net/if_packet.h
index 9ffb69b508..c17e1c23c5 100644
--- a/sysdeps/unix/sysv/linux/net/if_packet.h
+++ b/sysdeps/unix/sysv/linux/net/if_packet.h
@@ -26,7 +26,7 @@
    From Linux 2.1 the AF_PACKET interface is preferred and you should
    consider using it in place of this one.  */
 
-struct sockaddr_pkt
+struct __attribute_struct_may_alias__ sockaddr_pkt
   {
     __SOCKADDR_COMMON (spkt_);
     unsigned char spkt_device[14];
diff --git a/sysdeps/unix/sysv/linux/netash/ash.h b/sysdeps/unix/sysv/linux/netash/ash.h
index 7d885d17cc..7a6ff50b17 100644
--- a/sysdeps/unix/sysv/linux/netash/ash.h
+++ b/sysdeps/unix/sysv/linux/netash/ash.h
@@ -22,7 +22,7 @@
 #include <features.h>
 #include <bits/sockaddr.h>
 
-struct sockaddr_ash
+struct __attribute_struct_may_alias__ sockaddr_ash
   {
     __SOCKADDR_COMMON (sash_);		/* Common data: address family etc.  */
     int sash_ifindex;			/* Interface to use.  */
diff --git a/sysdeps/unix/sysv/linux/neteconet/ec.h b/sysdeps/unix/sysv/linux/neteconet/ec.h
index b07a107961..f3132f06ff 100644
--- a/sysdeps/unix/sysv/linux/neteconet/ec.h
+++ b/sysdeps/unix/sysv/linux/neteconet/ec.h
@@ -28,7 +28,7 @@ struct ec_addr
     unsigned char net;			/* Network number.  */
   };
 
-struct sockaddr_ec
+struct __attribute_struct_may_alias__ sockaddr_ec
   {
     __SOCKADDR_COMMON (sec_);
     unsigned char port;			/* Port number.  */
diff --git a/sysdeps/unix/sysv/linux/netiucv/iucv.h b/sysdeps/unix/sysv/linux/netiucv/iucv.h
index f5fad81751..27151e8bbe 100644
--- a/sysdeps/unix/sysv/linux/netiucv/iucv.h
+++ b/sysdeps/unix/sysv/linux/netiucv/iucv.h
@@ -23,7 +23,7 @@
 
 __BEGIN_DECLS
 
-struct sockaddr_iucv
+struct __attribute_struct_may_alias__ sockaddr_iucv
   {
     __SOCKADDR_COMMON (siucv_);
     unsigned short	siucv_port;		/* Reserved */
diff --git a/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h b/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h
index 672c7c6bb8..dab466d881 100644
--- a/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/nios2/bits/struct_stat.h
@@ -43,7 +43,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;		/* Device.  */
@@ -88,7 +88,7 @@ struct stat
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;		/* Device.  */
diff --git a/sysdeps/unix/sysv/linux/pidfd_getpid.c b/sysdeps/unix/sysv/linux/pidfd_getpid.c
index 8567b413dd..30025e5863 100644
--- a/sysdeps/unix/sysv/linux/pidfd_getpid.c
+++ b/sysdeps/unix/sysv/linux/pidfd_getpid.c
@@ -74,8 +74,10 @@ parse_fdinfo (const char *l, void *arg)
 
       /* Ignore invalid large values.  */
       if (INT_MULTIPLY_WRAPV (10, n, &n)
-          || INT_ADD_WRAPV (n, *l++ - '0', &n))
+          || INT_ADD_WRAPV (n, *l - '0', &n))
         return -1;
+
+      l++;
     }
 
   /* -1 indicates that the process is terminated.  */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h
index 6be5055e65..0d3e095c5d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/socket-constants.h
@@ -54,7 +54,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/powerpc/bits/struct_stat.h b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h
index f6328399cd..2cf331544a 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/struct_stat.h
@@ -28,7 +28,7 @@
 #if __WORDSIZE == 32
 struct stat
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -79,13 +79,13 @@ struct stat
 #  endif
     unsigned long int __glibc_reserved4;
     unsigned long int __glibc_reserved5;
-# endif /* __USE_TIME_BITS64 */
+# endif /* __USE_TIME64_REDIRECTS */
   };
 
 # ifdef __USE_LARGEFILE64
 struct stat64
   {
-#  ifdef __USE_TIME_BITS64
+#  ifdef __USE_TIME64_REDIRECTS
 #   include <bits/struct_stat_time64_helper.h>
 #  else
     __dev_t st_dev;			/* Device.  */
@@ -122,7 +122,7 @@ struct stat64
 #   endif
     unsigned long int __glibc_reserved4;
     unsigned long int __glibc_reserved5;
-#  endif /* __USE_TIME_BITS64 */
+#  endif /* __USE_TIME64_REDIRECTS */
   };
 # endif /* __USE_LARGEFILE64 */
 
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h
index 830629cd37..44ae08265d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_msqid_ds.h
+++ b/sysdeps/unix/sysv/linux/powerpc/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/powerpc/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h
index 4370257557..ccee57c28b 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_semid_ds.h
+++ b/sysdeps/unix/sysv/linux/powerpc/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/powerpc/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h
index da1b4b3c56..58145d0a5d 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/types/struct_shmid_ds.h
+++ b/sysdeps/unix/sysv/linux/powerpc/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 */
diff --git a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
index 04ca9debf0..6993fb6b29 100644
--- a/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
+++ b/sysdeps/unix/sysv/linux/powerpc/bits/wordsize.h
@@ -2,10 +2,9 @@
 
 #if defined __powerpc64__
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
-# define __WORDSIZE_TIME64_COMPAT32	0
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
 #endif
+#define __WORDSIZE_TIME64_COMPAT32	1
diff --git a/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h b/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h
index 9911c47bb2..e5c9024fb2 100644
--- a/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/s390/bits/struct_stat.h
@@ -65,7 +65,7 @@ struct stat
 #else
 struct stat
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -166,7 +166,7 @@ struct stat64
 # else
 struct stat64
   {
-#  ifdef __USE_TIME_BITS64
+#  ifdef __USE_TIME64_REDIRECTS
 #   include <bits/struct_stat_time64_helper.h>
 #  else
     __dev_t st_dev;			/* Device.  */
diff --git a/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h b/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h
index cbd4bc0f31..d47cd7be1e 100644
--- a/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/sh/bits/struct_stat.h
@@ -28,7 +28,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;			/* Device.  */
@@ -83,13 +83,13 @@ struct stat
 # else
     __ino64_t st_ino;			/* File serial number.	*/
 # endif
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
   };
 
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -125,7 +125,7 @@ struct stat64
     unsigned long int st_ctimensec;	/* Nsecs of last status change.  */
 #  endif
     __ino64_t st_ino;			/* File serial number.		*/
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
   };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h b/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h
index 59958611c4..e7a6b684cc 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/socket-constants.h
@@ -54,7 +54,7 @@
 # define SO_TIMESTAMPNS_NEW 0x0042
 # define SO_TIMESTAMPING_NEW 0x0043
 
-# 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/sparc/bits/struct_stat.h b/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h
index 4e48634edc..fcab5f4804 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/struct_stat.h
@@ -28,7 +28,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;			/* Device.  */
@@ -79,13 +79,13 @@ struct stat
 # endif
     unsigned long int __glibc_reserved4;
     unsigned long int __glibc_reserved5;
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
   };
 
 #ifdef __USE_LARGEFILE64
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;			/* Device.  */
@@ -126,7 +126,7 @@ struct stat64
 #  endif
     unsigned long int __glibc_reserved4;
     unsigned long int __glibc_reserved5;
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
   };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h
index db783c28d4..ed8d47c9b6 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_msqid_ds.h
+++ b/sysdeps/unix/sysv/linux/sparc/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/sparc/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h
index 1c8a3693db..b9e729b8b4 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_semid_ds.h
+++ b/sysdeps/unix/sysv/linux/sparc/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/sparc/bits/types/struct_shmid_ds.h b/sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h
index 35a0cc36ab..7885d2ab25 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/types/struct_shmid_ds.h
+++ b/sysdeps/unix/sysv/linux/sparc/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 */
diff --git a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
index 7562875ee2..ea103e5970 100644
--- a/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
+++ b/sysdeps/unix/sysv/linux/sparc/bits/wordsize.h
@@ -2,10 +2,9 @@
 
 #if defined __arch64__ || defined __sparcv9
 # define __WORDSIZE	64
-# define __WORDSIZE_TIME64_COMPAT32	1
 #else
 # define __WORDSIZE	32
 # define __WORDSIZE32_SIZE_ULONG	0
 # define __WORDSIZE32_PTRDIFF_LONG	0
-# define __WORDSIZE_TIME64_COMPAT32	0
 #endif
+#define __WORDSIZE_TIME64_COMPAT32	1
diff --git a/sysdeps/unix/sysv/linux/sys/epoll.h b/sysdeps/unix/sysv/linux/sys/epoll.h
index 9b51e3bd14..fc8dce45c8 100644
--- a/sysdeps/unix/sysv/linux/sys/epoll.h
+++ b/sysdeps/unix/sysv/linux/sys/epoll.h
@@ -140,7 +140,7 @@ extern int epoll_pwait (int __epfd, struct epoll_event *__events,
 
    This function is a cancellation point and therefore not marked with
    __THROW.  */
-#ifndef __USE_TIME_BITS64
+#ifndef __USE_TIME64_REDIRECTS
 extern int epoll_pwait2 (int __epfd, struct epoll_event *__events,
 			 int __maxevents, const struct timespec *__timeout,
 			 const __sigset_t *__ss)
diff --git a/sysdeps/unix/sysv/linux/sys/prctl.h b/sysdeps/unix/sysv/linux/sys/prctl.h
index b13b846261..79a9b31273 100644
--- a/sysdeps/unix/sysv/linux/sys/prctl.h
+++ b/sysdeps/unix/sysv/linux/sys/prctl.h
@@ -38,7 +38,7 @@
 __BEGIN_DECLS
 
 /* Control process execution.  */
-#ifndef __USE_TIME_BITS64
+#ifndef __USE_TIME64_REDIRECTS
 extern int prctl (int __option, ...) __THROW;
 #else
 # ifdef __REDIRECT
diff --git a/sysdeps/unix/sysv/linux/sys/timerfd.h b/sysdeps/unix/sysv/linux/sys/timerfd.h
index 19d0cbfae0..f66ece306a 100644
--- a/sysdeps/unix/sysv/linux/sys/timerfd.h
+++ b/sysdeps/unix/sysv/linux/sys/timerfd.h
@@ -47,7 +47,7 @@ extern int timerfd_settime (int __ufd, int __flags,
 			    const struct itimerspec *__utmr,
 			    struct itimerspec *__otmr) __THROW;
 
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # if defined(__REDIRECT_NTH)
 extern int __REDIRECT_NTH (timerfd_settime,
                            (int __ufd, int __flags,
@@ -62,7 +62,7 @@ extern int __REDIRECT_NTH (timerfd_settime,
 /* Return the next expiration time of UFD.  */
 extern int timerfd_gettime (int __ufd, struct itimerspec *__otmr) __THROW;
 
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # if defined(__REDIRECT_NTH)
 extern int __REDIRECT_NTH (timerfd_gettime, (int __ufd,
                                              struct itimerspec *__otmr),
diff --git a/sysdeps/unix/sysv/linux/sys/timex.h b/sysdeps/unix/sysv/linux/sys/timex.h
index 28ce022253..568748d767 100644
--- a/sysdeps/unix/sysv/linux/sys/timex.h
+++ b/sysdeps/unix/sysv/linux/sys/timex.h
@@ -54,7 +54,7 @@ struct ntptimeval
 
 __BEGIN_DECLS
 
-#ifndef __USE_TIME_BITS64
+#ifndef __USE_TIME64_REDIRECTS
 extern int adjtimex (struct timex *__ntx) __THROW __nonnull ((1));
 extern int ntp_gettimex (struct ntptimeval *__ntv) __THROW __nonnull ((1));
 
diff --git a/sysdeps/unix/sysv/linux/timespec_get.c b/sysdeps/unix/sysv/linux/timespec_get.c
index c6e5e66289..778d1e3354 100644
--- a/sysdeps/unix/sysv/linux/timespec_get.c
+++ b/sysdeps/unix/sysv/linux/timespec_get.c
@@ -5,7 +5,7 @@
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 2.1 of the License.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sysdeps/unix/sysv/linux/timespec_getres.c b/sysdeps/unix/sysv/linux/timespec_getres.c
index 5acebe2a2c..2eef9e512c 100644
--- a/sysdeps/unix/sysv/linux/timespec_getres.c
+++ b/sysdeps/unix/sysv/linux/timespec_getres.c
@@ -5,7 +5,7 @@
    The GNU C Library is free software; you can redistribute it and/or
    modify it under the terms of the GNU Lesser General Public
    License as published by the Free Software Foundation; either
-   version 2.1 of the License.
+   version 2.1 of the License, or (at your option) any later version.
 
    The GNU C Library is distributed in the hope that it will be useful,
    but WITHOUT ANY WARRANTY; without even the implied warranty of
diff --git a/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h b/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h
index 21aa315d8d..810d6566f0 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h
+++ b/sysdeps/unix/sysv/linux/x86/bits/struct_stat.h
@@ -25,7 +25,7 @@
 
 struct stat
   {
-#ifdef __USE_TIME_BITS64
+#ifdef __USE_TIME64_REDIRECTS
 # include <bits/struct_stat_time64_helper.h>
 #else
     __dev_t st_dev;		/* Device.  */
@@ -95,14 +95,14 @@ struct stat
     __ino64_t st_ino;			/* File serial number.	*/
 #  endif
 # endif
-#endif /* __USE_TIME_BITS64  */
+#endif /* __USE_TIME64_REDIRECTS  */
   };
 
 #ifdef __USE_LARGEFILE64
 /* Note stat64 has the same shape as stat for x86-64.  */
 struct stat64
   {
-# ifdef __USE_TIME_BITS64
+# ifdef __USE_TIME64_REDIRECTS
 #  include <bits/struct_stat_time64_helper.h>
 # else
     __dev_t st_dev;		/* Device.  */
@@ -152,7 +152,7 @@ struct stat64
 #  else
     __ino64_t st_ino;			/* File serial number.		*/
 #  endif
-# endif /* __USE_TIME_BITS64  */
+# endif /* __USE_TIME64_REDIRECTS  */
   };
 #endif
 
diff --git a/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h b/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h
index 9f3d170b65..81867c0316 100644
--- a/sysdeps/unix/sysv/linux/x86/bits/types/struct_semid_ds.h
+++ b/sysdeps/unix/sysv/linux/x86/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 */