switch all existing 32-bit archs to 64-bit time_t
authorRich Felker <dalias@aerifal.cx>
Fri, 2 Aug 2019 19:41:27 +0000 (15:41 -0400)
committerRich Felker <dalias@aerifal.cx>
Sat, 2 Nov 2019 22:30:56 +0000 (18:30 -0400)
commit38143339646a4ccce8afe298c34467767c899f51
treea5eb879534856a4c13a7c7dfbb69f91713a08140
parent5127927f4ba449aff16f6a6db0224a24490ff5b9
switch all existing 32-bit archs to 64-bit time_t

this commit preserves ABI fully for existing interface boundaries
between libc and libc consumers (applications or libraries), by
retaining existing symbol names for the legacy 32-bit interfaces and
redirecting sources compiled against the new headers to alternate
symbol names. this does not necessarily, however, preserve the
pairwise ABI of libc consumers with one another; where they use
time_t-derived types in their interfaces with one another, it may be
necessary to synchronize updates with each other.

the intent is that ABI resulting from this commit already be stable
and permanent, but it will not be officially so until a release is
made. changes to some header-defined types that do not play any role
in the ABI between libc and its consumers may still be subject to
change.

mechanically, the changes made by this commit for each 32-bit arch are
as follows:

- _REDIR_TIME64 is defined to activate the symbol redirections in
  public headers

- COMPAT_SRC_DIRS is defined in arch.mak to activate build of ABI
  compat shims to serve as definitions for the original symbol names

- time_t and suseconds_t definitions are changed to long long (64-bit)

- IPC_STAT definition is changed to add the IPC_TIME64 bit (0x100),
  triggering conversion of semid_ds, shmid_ds, and msqid_ds split
  low/high time bits into new time_t members

- structs semid_ds, shmid_ds, msqid_ds, and stat are modified to add
  new 64-bit time_t/timespec members at the end, maintaining existing
  layout of other members.

- socket options (SO_*) and ioctl (sockios) command macros are
  redefined to use the kernel's "_NEW" values.

in addition, on archs where vdso clock_gettime is used, the
VDSO_CGT_SYM macro definition in syscall_arch.h is changed to use a
new time64 vdso function if available, and a new VDSO_CGT32_SYM macro
is added for use as fallback on kernels lacking time64.
85 files changed:
arch/arm/arch.mak [new file with mode: 0644]
arch/arm/bits/alltypes.h.in
arch/arm/bits/ioctl_fix.h
arch/arm/bits/ipcstat.h
arch/arm/bits/msg.h
arch/arm/bits/sem.h
arch/arm/bits/shm.h
arch/arm/bits/socket.h [new file with mode: 0644]
arch/arm/bits/stat.h
arch/arm/syscall_arch.h
arch/i386/arch.mak [new file with mode: 0644]
arch/i386/bits/alltypes.h.in
arch/i386/bits/ioctl_fix.h [new file with mode: 0644]
arch/i386/bits/ipcstat.h
arch/i386/bits/msg.h
arch/i386/bits/sem.h
arch/i386/bits/shm.h
arch/i386/bits/socket.h [new file with mode: 0644]
arch/i386/bits/stat.h
arch/i386/syscall_arch.h
arch/m68k/arch.mak [new file with mode: 0644]
arch/m68k/bits/alltypes.h.in
arch/m68k/bits/ioctl_fix.h [new file with mode: 0644]
arch/m68k/bits/ipcstat.h
arch/m68k/bits/msg.h
arch/m68k/bits/sem.h
arch/m68k/bits/shm.h
arch/m68k/bits/socket.h [new file with mode: 0644]
arch/m68k/bits/stat.h
arch/microblaze/arch.mak [new file with mode: 0644]
arch/microblaze/bits/alltypes.h.in
arch/microblaze/bits/ioctl_fix.h [new file with mode: 0644]
arch/microblaze/bits/ipcstat.h
arch/microblaze/bits/msg.h
arch/microblaze/bits/sem.h
arch/microblaze/bits/shm.h
arch/microblaze/bits/socket.h [new file with mode: 0644]
arch/microblaze/bits/stat.h
arch/mips/arch.mak [new file with mode: 0644]
arch/mips/bits/alltypes.h.in
arch/mips/bits/ioctl.h
arch/mips/bits/ipcstat.h
arch/mips/bits/msg.h
arch/mips/bits/sem.h
arch/mips/bits/shm.h
arch/mips/bits/socket.h
arch/mips/bits/stat.h
arch/mips/syscall_arch.h
arch/mipsn32/arch.mak [new file with mode: 0644]
arch/mipsn32/bits/alltypes.h.in
arch/mipsn32/bits/ioctl.h
arch/mipsn32/bits/ipcstat.h
arch/mipsn32/bits/msg.h
arch/mipsn32/bits/sem.h
arch/mipsn32/bits/shm.h
arch/mipsn32/bits/socket.h
arch/mipsn32/bits/stat.h
arch/mipsn32/syscall_arch.h
arch/or1k/arch.mak [new file with mode: 0644]
arch/or1k/bits/alltypes.h.in
arch/or1k/bits/ioctl_fix.h [new file with mode: 0644]
arch/or1k/bits/ipcstat.h
arch/or1k/bits/msg.h
arch/or1k/bits/sem.h
arch/or1k/bits/shm.h
arch/or1k/bits/socket.h [new file with mode: 0644]
arch/or1k/bits/stat.h
arch/powerpc/arch.mak [new file with mode: 0644]
arch/powerpc/bits/alltypes.h.in
arch/powerpc/bits/ioctl.h
arch/powerpc/bits/ipcstat.h
arch/powerpc/bits/msg.h
arch/powerpc/bits/sem.h
arch/powerpc/bits/shm.h
arch/powerpc/bits/socket.h
arch/powerpc/bits/stat.h
arch/sh/arch.mak [new file with mode: 0644]
arch/sh/bits/alltypes.h.in
arch/sh/bits/ioctl.h
arch/sh/bits/ipcstat.h
arch/sh/bits/msg.h
arch/sh/bits/sem.h
arch/sh/bits/shm.h
arch/sh/bits/socket.h [new file with mode: 0644]
arch/sh/bits/stat.h