From 38143339646a4ccce8afe298c34467767c899f51 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Fri, 2 Aug 2019 15:41:27 -0400 Subject: [PATCH] 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. --- arch/arm/arch.mak | 1 + arch/arm/bits/alltypes.h.in | 5 +++-- arch/arm/bits/ioctl_fix.h | 5 +++++ arch/arm/bits/ipcstat.h | 2 +- arch/arm/bits/msg.h | 15 +++++++++------ arch/arm/bits/sem.h | 10 ++++++---- arch/arm/bits/shm.h | 16 ++++++++++------ arch/arm/bits/socket.h | 5 +++++ arch/arm/bits/stat.h | 6 +++++- arch/arm/syscall_arch.h | 4 +++- arch/i386/arch.mak | 1 + arch/i386/bits/alltypes.h.in | 5 +++-- arch/i386/bits/ioctl_fix.h | 4 ++++ arch/i386/bits/ipcstat.h | 2 +- arch/i386/bits/msg.h | 15 +++++++++------ arch/i386/bits/sem.h | 10 ++++++---- arch/i386/bits/shm.h | 16 ++++++++++------ arch/i386/bits/socket.h | 5 +++++ arch/i386/bits/stat.h | 6 +++++- arch/i386/syscall_arch.h | 4 +++- arch/m68k/arch.mak | 1 + arch/m68k/bits/alltypes.h.in | 5 +++-- arch/m68k/bits/ioctl_fix.h | 4 ++++ arch/m68k/bits/ipcstat.h | 2 +- arch/m68k/bits/msg.h | 15 +++++++++------ arch/m68k/bits/sem.h | 10 ++++++---- arch/m68k/bits/shm.h | 16 ++++++++++------ arch/m68k/bits/socket.h | 5 +++++ arch/m68k/bits/stat.h | 6 +++++- arch/microblaze/arch.mak | 1 + arch/microblaze/bits/alltypes.h.in | 5 +++-- arch/microblaze/bits/ioctl_fix.h | 4 ++++ arch/microblaze/bits/ipcstat.h | 2 +- arch/microblaze/bits/msg.h | 15 +++++++++------ arch/microblaze/bits/sem.h | 10 ++++++---- arch/microblaze/bits/shm.h | 16 ++++++++++------ arch/microblaze/bits/socket.h | 5 +++++ arch/microblaze/bits/stat.h | 6 +++++- arch/mips/arch.mak | 1 + arch/mips/bits/alltypes.h.in | 5 +++-- arch/mips/bits/ioctl.h | 4 ++-- arch/mips/bits/ipcstat.h | 2 +- arch/mips/bits/msg.h | 27 +++++++++++++++------------ arch/mips/bits/sem.h | 10 ++++++---- arch/mips/bits/shm.h | 15 ++++++++++----- arch/mips/bits/socket.h | 7 +++++-- arch/mips/bits/stat.h | 12 ++++++++---- arch/mips/syscall_arch.h | 4 +++- arch/mipsn32/arch.mak | 1 + arch/mipsn32/bits/alltypes.h.in | 5 +++-- arch/mipsn32/bits/ioctl.h | 4 ++-- arch/mipsn32/bits/ipcstat.h | 2 +- arch/mipsn32/bits/msg.h | 27 +++++++++++++++------------ arch/mipsn32/bits/sem.h | 10 ++++++---- arch/mipsn32/bits/shm.h | 15 ++++++++++----- arch/mipsn32/bits/socket.h | 7 +++++-- arch/mipsn32/bits/stat.h | 12 ++++++++---- arch/mipsn32/syscall_arch.h | 4 +++- arch/or1k/arch.mak | 1 + arch/or1k/bits/alltypes.h.in | 5 +++-- arch/or1k/bits/ioctl_fix.h | 4 ++++ arch/or1k/bits/ipcstat.h | 2 +- arch/or1k/bits/msg.h | 15 +++++++++------ arch/or1k/bits/sem.h | 10 ++++++---- arch/or1k/bits/shm.h | 16 ++++++++++------ arch/or1k/bits/socket.h | 5 +++++ arch/or1k/bits/stat.h | 10 +++++++--- arch/powerpc/arch.mak | 1 + arch/powerpc/bits/alltypes.h.in | 5 +++-- arch/powerpc/bits/ioctl.h | 4 ++-- arch/powerpc/bits/ipcstat.h | 2 +- arch/powerpc/bits/msg.h | 15 +++++++++------ arch/powerpc/bits/sem.h | 10 ++++++---- arch/powerpc/bits/shm.h | 16 +++++++++------- arch/powerpc/bits/socket.h | 7 +++++-- arch/powerpc/bits/stat.h | 6 +++++- arch/sh/arch.mak | 1 + arch/sh/bits/alltypes.h.in | 5 +++-- arch/sh/bits/ioctl.h | 4 ++-- arch/sh/bits/ipcstat.h | 2 +- arch/sh/bits/msg.h | 15 +++++++++------ arch/sh/bits/sem.h | 10 ++++++---- arch/sh/bits/shm.h | 16 ++++++++++------ arch/sh/bits/socket.h | 5 +++++ arch/sh/bits/stat.h | 6 +++++- 85 files changed, 420 insertions(+), 217 deletions(-) create mode 100644 arch/arm/arch.mak create mode 100644 arch/arm/bits/socket.h create mode 100644 arch/i386/arch.mak create mode 100644 arch/i386/bits/ioctl_fix.h create mode 100644 arch/i386/bits/socket.h create mode 100644 arch/m68k/arch.mak create mode 100644 arch/m68k/bits/ioctl_fix.h create mode 100644 arch/m68k/bits/socket.h create mode 100644 arch/microblaze/arch.mak create mode 100644 arch/microblaze/bits/ioctl_fix.h create mode 100644 arch/microblaze/bits/socket.h create mode 100644 arch/mips/arch.mak create mode 100644 arch/mipsn32/arch.mak create mode 100644 arch/or1k/arch.mak create mode 100644 arch/or1k/bits/ioctl_fix.h create mode 100644 arch/or1k/bits/socket.h create mode 100644 arch/powerpc/arch.mak create mode 100644 arch/sh/arch.mak create mode 100644 arch/sh/bits/socket.h diff --git a/arch/arm/arch.mak b/arch/arm/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/arm/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/arm/bits/alltypes.h.in b/arch/arm/bits/alltypes.h.in index d2700bd9..40bd30ea 100644 --- a/arch/arm/bits/alltypes.h.in +++ b/arch/arm/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -19,5 +20,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/arm/bits/ioctl_fix.h b/arch/arm/bits/ioctl_fix.h index ebb383da..dfa18866 100644 --- a/arch/arm/bits/ioctl_fix.h +++ b/arch/arm/bits/ioctl_fix.h @@ -1,2 +1,7 @@ #undef FIOQSIZE #define FIOQSIZE 0x545e + +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/arm/bits/ipcstat.h b/arch/arm/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/arm/bits/ipcstat.h +++ b/arch/arm/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/arm/bits/msg.h b/arch/arm/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/arm/bits/msg.h +++ b/arch/arm/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/arm/bits/sem.h b/arch/arm/bits/sem.h index d383d4ea..544e3d2a 100644 --- a/arch/arm/bits/sem.h +++ b/arch/arm/bits/sem.h @@ -1,9 +1,9 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; @@ -13,4 +13,6 @@ struct semid_ds { #endif long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/arm/bits/shm.h b/arch/arm/bits/shm.h index 81b2a29a..725fb469 100644 --- a/arch/arm/bits/shm.h +++ b/arch/arm/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/arm/bits/socket.h b/arch/arm/bits/socket.h new file mode 100644 index 00000000..4d1f645b --- /dev/null +++ b/arch/arm/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/arm/bits/stat.h b/arch/arm/bits/stat.h index 22b19bbf..5d7828cf 100644 --- a/arch/arm/bits/stat.h +++ b/arch/arm/bits/stat.h @@ -14,8 +14,12 @@ struct stat { off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + ino_t st_ino; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - ino_t st_ino; }; diff --git a/arch/arm/syscall_arch.h b/arch/arm/syscall_arch.h index 53fb155c..4b08762d 100644 --- a/arch/arm/syscall_arch.h +++ b/arch/arm/syscall_arch.h @@ -99,7 +99,9 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo } #define VDSO_USEFUL -#define VDSO_CGT_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_VER "LINUX_2.6" +#define VDSO_CGT_SYM "__vdso_clock_gettime64" #define VDSO_CGT_VER "LINUX_2.6" #define SYSCALL_FADVISE_6_ARG diff --git a/arch/i386/arch.mak b/arch/i386/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/i386/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/i386/bits/alltypes.h.in b/arch/i386/bits/alltypes.h.in index f033f376..74e599a2 100644 --- a/arch/i386/bits/alltypes.h.in +++ b/arch/i386/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -29,5 +30,5 @@ TYPEDEF struct { __attribute__((__aligned__(8))) long long __ll; long double __l TYPEDEF struct { alignas(8) long long __ll; long double __ld; } max_align_t; #endif -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/i386/bits/ioctl_fix.h b/arch/i386/bits/ioctl_fix.h new file mode 100644 index 00000000..29c9d8ba --- /dev/null +++ b/arch/i386/bits/ioctl_fix.h @@ -0,0 +1,4 @@ +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/i386/bits/ipcstat.h b/arch/i386/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/i386/bits/ipcstat.h +++ b/arch/i386/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/i386/bits/msg.h b/arch/i386/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/i386/bits/msg.h +++ b/arch/i386/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/i386/bits/sem.h b/arch/i386/bits/sem.h index e61571c1..65661542 100644 --- a/arch/i386/bits/sem.h +++ b/arch/i386/bits/sem.h @@ -1,11 +1,13 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/i386/bits/shm.h b/arch/i386/bits/shm.h index 81b2a29a..725fb469 100644 --- a/arch/i386/bits/shm.h +++ b/arch/i386/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/i386/bits/socket.h b/arch/i386/bits/socket.h new file mode 100644 index 00000000..4d1f645b --- /dev/null +++ b/arch/i386/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/i386/bits/stat.h b/arch/i386/bits/stat.h index 22b19bbf..5d7828cf 100644 --- a/arch/i386/bits/stat.h +++ b/arch/i386/bits/stat.h @@ -14,8 +14,12 @@ struct stat { off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + ino_t st_ino; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - ino_t st_ino; }; diff --git a/arch/i386/syscall_arch.h b/arch/i386/syscall_arch.h index 22b0b28b..69642e57 100644 --- a/arch/i386/syscall_arch.h +++ b/arch/i386/syscall_arch.h @@ -83,7 +83,9 @@ static inline long __syscall6(long n, long a1, long a2, long a3, long a4, long a } #define VDSO_USEFUL -#define VDSO_CGT_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_VER "LINUX_2.6" +#define VDSO_CGT_SYM "__vdso_clock_gettime64" #define VDSO_CGT_VER "LINUX_2.6" #define SYSCALL_USE_SOCKETCALL diff --git a/arch/m68k/arch.mak b/arch/m68k/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/m68k/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/m68k/bits/alltypes.h.in b/arch/m68k/bits/alltypes.h.in index 922c2ce5..a92d1f07 100644 --- a/arch/m68k/bits/alltypes.h.in +++ b/arch/m68k/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -23,5 +24,5 @@ TYPEDEF long double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/m68k/bits/ioctl_fix.h b/arch/m68k/bits/ioctl_fix.h new file mode 100644 index 00000000..29c9d8ba --- /dev/null +++ b/arch/m68k/bits/ioctl_fix.h @@ -0,0 +1,4 @@ +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/m68k/bits/ipcstat.h b/arch/m68k/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/m68k/bits/ipcstat.h +++ b/arch/m68k/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/m68k/bits/msg.h b/arch/m68k/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/m68k/bits/msg.h +++ b/arch/m68k/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/m68k/bits/sem.h b/arch/m68k/bits/sem.h index 08faafea..d88338e6 100644 --- a/arch/m68k/bits/sem.h +++ b/arch/m68k/bits/sem.h @@ -1,11 +1,13 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; unsigned short sem_nsems; long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/m68k/bits/shm.h b/arch/m68k/bits/shm.h index 81b2a29a..725fb469 100644 --- a/arch/m68k/bits/shm.h +++ b/arch/m68k/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/m68k/bits/socket.h b/arch/m68k/bits/socket.h new file mode 100644 index 00000000..4d1f645b --- /dev/null +++ b/arch/m68k/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/m68k/bits/stat.h b/arch/m68k/bits/stat.h index 0f7b66a1..f8768147 100644 --- a/arch/m68k/bits/stat.h +++ b/arch/m68k/bits/stat.h @@ -14,8 +14,12 @@ struct stat { off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + ino_t st_ino; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - ino_t st_ino; }; diff --git a/arch/microblaze/arch.mak b/arch/microblaze/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/microblaze/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/microblaze/bits/alltypes.h.in b/arch/microblaze/bits/alltypes.h.in index b958604e..6f69b4f9 100644 --- a/arch/microblaze/bits/alltypes.h.in +++ b/arch/microblaze/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -19,5 +20,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/microblaze/bits/ioctl_fix.h b/arch/microblaze/bits/ioctl_fix.h new file mode 100644 index 00000000..29c9d8ba --- /dev/null +++ b/arch/microblaze/bits/ioctl_fix.h @@ -0,0 +1,4 @@ +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/microblaze/bits/ipcstat.h b/arch/microblaze/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/microblaze/bits/ipcstat.h +++ b/arch/microblaze/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/microblaze/bits/msg.h b/arch/microblaze/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/microblaze/bits/msg.h +++ b/arch/microblaze/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/microblaze/bits/sem.h b/arch/microblaze/bits/sem.h index d383d4ea..544e3d2a 100644 --- a/arch/microblaze/bits/sem.h +++ b/arch/microblaze/bits/sem.h @@ -1,9 +1,9 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; @@ -13,4 +13,6 @@ struct semid_ds { #endif long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/microblaze/bits/shm.h b/arch/microblaze/bits/shm.h index 81b2a29a..725fb469 100644 --- a/arch/microblaze/bits/shm.h +++ b/arch/microblaze/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/microblaze/bits/socket.h b/arch/microblaze/bits/socket.h new file mode 100644 index 00000000..4d1f645b --- /dev/null +++ b/arch/microblaze/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/microblaze/bits/stat.h b/arch/microblaze/bits/stat.h index ce6a6bd0..8a4d509a 100644 --- a/arch/microblaze/bits/stat.h +++ b/arch/microblaze/bits/stat.h @@ -14,8 +14,12 @@ struct stat { blksize_t st_blksize; int __st_blksize_padding; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + unsigned __unused[2]; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - unsigned __unused[2]; }; diff --git a/arch/mips/arch.mak b/arch/mips/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/mips/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/mips/bits/alltypes.h.in b/arch/mips/bits/alltypes.h.in index 9544b496..32544cfe 100644 --- a/arch/mips/bits/alltypes.h.in +++ b/arch/mips/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -19,5 +20,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/mips/bits/ioctl.h b/arch/mips/bits/ioctl.h index e277c3f0..e20bf19e 100644 --- a/arch/mips/bits/ioctl.h +++ b/arch/mips/bits/ioctl.h @@ -110,5 +110,5 @@ #define SIOCATMARK _IOR('s', 7, int) #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/mips/bits/ipcstat.h b/arch/mips/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/mips/bits/ipcstat.h +++ b/arch/mips/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/mips/bits/msg.h b/arch/mips/bits/msg.h index f28aece8..c734dbb5 100644 --- a/arch/mips/bits/msg.h +++ b/arch/mips/bits/msg.h @@ -1,19 +1,19 @@ struct msqid_ds { struct ipc_perm msg_perm; #if _MIPSEL || __MIPSEL || __MIPSEL__ - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; #else - int __unused1; - time_t msg_stime; - int __unused2; - time_t msg_rtime; - int __unused3; - time_t msg_ctime; + unsigned long __msg_stime_hi; + unsigned long __msg_stime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_ctime_hi; + unsigned long __msg_ctime_lo; #endif unsigned long msg_cbytes; msgqnum_t msg_qnum; @@ -21,4 +21,7 @@ struct msqid_ds { pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/mips/bits/sem.h b/arch/mips/bits/sem.h index 5184eb59..fe6f0948 100644 --- a/arch/mips/bits/sem.h +++ b/arch/mips/bits/sem.h @@ -1,7 +1,7 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; + unsigned long __sem_otime_lo; + unsigned long __sem_ctime_lo; #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; @@ -9,6 +9,8 @@ struct semid_ds { char __sem_nsems_pad[sizeof(long)-sizeof(short)]; unsigned short sem_nsems; #endif - long __unused3; - long __unused4; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_hi; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/mips/bits/shm.h b/arch/mips/bits/shm.h index 8d193781..ab8c642d 100644 --- a/arch/mips/bits/shm.h +++ b/arch/mips/bits/shm.h @@ -3,14 +3,19 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; + unsigned long __shm_atime_lo; + unsigned long __shm_dtime_lo; + unsigned long __shm_ctime_lo; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; + unsigned short __shm_atime_hi; + unsigned short __shm_dtime_hi; + unsigned short __shm_ctime_hi; + unsigned short __pad1; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/mips/bits/socket.h b/arch/mips/bits/socket.h index 92551b9f..4ffc4d4a 100644 --- a/arch/mips/bits/socket.h +++ b/arch/mips/bits/socket.h @@ -16,13 +16,16 @@ #define SO_RCVBUF 0x1002 #define SO_SNDLOWAT 0x1003 #define SO_RCVLOWAT 0x1004 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 #define SO_ERROR 0x1007 #define SO_TYPE 0x1008 #define SO_ACCEPTCONN 0x1009 #define SO_PROTOCOL 0x1028 #define SO_DOMAIN 0x1029 +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 diff --git a/arch/mips/bits/stat.h b/arch/mips/bits/stat.h index 3291a636..48d4ac80 100644 --- a/arch/mips/bits/stat.h +++ b/arch/mips/bits/stat.h @@ -12,11 +12,15 @@ struct stat { dev_t st_rdev; long __st_padding2[2]; off_t st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; blksize_t st_blksize; long __st_padding3; blkcnt_t st_blocks; - long __st_padding4[14]; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long __st_padding4[2]; }; diff --git a/arch/mips/syscall_arch.h b/arch/mips/syscall_arch.h index 6ea73437..f821e73f 100644 --- a/arch/mips/syscall_arch.h +++ b/arch/mips/syscall_arch.h @@ -142,7 +142,9 @@ static inline long __syscall7(long n, long a, long b, long c, long d, long e, lo } #define VDSO_USEFUL -#define VDSO_CGT_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_VER "LINUX_2.6" +#define VDSO_CGT_SYM "__vdso_clock_gettime64" #define VDSO_CGT_VER "LINUX_2.6" #define SO_SNDTIMEO_OLD 0x1005 diff --git a/arch/mipsn32/arch.mak b/arch/mipsn32/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/mipsn32/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/mipsn32/bits/alltypes.h.in b/arch/mipsn32/bits/alltypes.h.in index 9544b496..32544cfe 100644 --- a/arch/mipsn32/bits/alltypes.h.in +++ b/arch/mipsn32/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -19,5 +20,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/mipsn32/bits/ioctl.h b/arch/mipsn32/bits/ioctl.h index e277c3f0..e20bf19e 100644 --- a/arch/mipsn32/bits/ioctl.h +++ b/arch/mipsn32/bits/ioctl.h @@ -110,5 +110,5 @@ #define SIOCATMARK _IOR('s', 7, int) #define SIOCSPGRP _IOW('s', 8, pid_t) #define SIOCGPGRP _IOR('s', 9, pid_t) -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/mipsn32/bits/ipcstat.h b/arch/mipsn32/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/mipsn32/bits/ipcstat.h +++ b/arch/mipsn32/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/mipsn32/bits/msg.h b/arch/mipsn32/bits/msg.h index f28aece8..c734dbb5 100644 --- a/arch/mipsn32/bits/msg.h +++ b/arch/mipsn32/bits/msg.h @@ -1,19 +1,19 @@ struct msqid_ds { struct ipc_perm msg_perm; #if _MIPSEL || __MIPSEL || __MIPSEL__ - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; #else - int __unused1; - time_t msg_stime; - int __unused2; - time_t msg_rtime; - int __unused3; - time_t msg_ctime; + unsigned long __msg_stime_hi; + unsigned long __msg_stime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_ctime_hi; + unsigned long __msg_ctime_lo; #endif unsigned long msg_cbytes; msgqnum_t msg_qnum; @@ -21,4 +21,7 @@ struct msqid_ds { pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/mipsn32/bits/sem.h b/arch/mipsn32/bits/sem.h index 5184eb59..fe6f0948 100644 --- a/arch/mipsn32/bits/sem.h +++ b/arch/mipsn32/bits/sem.h @@ -1,7 +1,7 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - time_t sem_ctime; + unsigned long __sem_otime_lo; + unsigned long __sem_ctime_lo; #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; @@ -9,6 +9,8 @@ struct semid_ds { char __sem_nsems_pad[sizeof(long)-sizeof(short)]; unsigned short sem_nsems; #endif - long __unused3; - long __unused4; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_hi; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/mipsn32/bits/shm.h b/arch/mipsn32/bits/shm.h index 8d193781..ab8c642d 100644 --- a/arch/mipsn32/bits/shm.h +++ b/arch/mipsn32/bits/shm.h @@ -3,14 +3,19 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - time_t shm_dtime; - time_t shm_ctime; + unsigned long __shm_atime_lo; + unsigned long __shm_dtime_lo; + unsigned long __shm_ctime_lo; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; - unsigned long __pad1; - unsigned long __pad2; + unsigned short __shm_atime_hi; + unsigned short __shm_dtime_hi; + unsigned short __shm_ctime_hi; + unsigned short __pad1; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/mipsn32/bits/socket.h b/arch/mipsn32/bits/socket.h index 92551b9f..4ffc4d4a 100644 --- a/arch/mipsn32/bits/socket.h +++ b/arch/mipsn32/bits/socket.h @@ -16,13 +16,16 @@ #define SO_RCVBUF 0x1002 #define SO_SNDLOWAT 0x1003 #define SO_RCVLOWAT 0x1004 -#define SO_RCVTIMEO 0x1006 -#define SO_SNDTIMEO 0x1005 #define SO_ERROR 0x1007 #define SO_TYPE 0x1008 #define SO_ACCEPTCONN 0x1009 #define SO_PROTOCOL 0x1028 #define SO_DOMAIN 0x1029 +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 #define SO_NO_CHECK 11 #define SO_PRIORITY 12 diff --git a/arch/mipsn32/bits/stat.h b/arch/mipsn32/bits/stat.h index 27d36b51..6e2f2808 100644 --- a/arch/mipsn32/bits/stat.h +++ b/arch/mipsn32/bits/stat.h @@ -9,11 +9,15 @@ struct stat { dev_t st_rdev; long __pad2[2]; off_t st_size; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; blksize_t st_blksize; long __pad3; blkcnt_t st_blocks; - long __pad4[14]; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; + long __pad4[2]; }; diff --git a/arch/mipsn32/syscall_arch.h b/arch/mipsn32/syscall_arch.h index 5ff43bba..c1a4b7da 100644 --- a/arch/mipsn32/syscall_arch.h +++ b/arch/mipsn32/syscall_arch.h @@ -116,7 +116,9 @@ static inline long __syscall6(long n, long a, long b, long c, long d, long e, lo } #define VDSO_USEFUL -#define VDSO_CGT_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_SYM "__vdso_clock_gettime" +#define VDSO_CGT32_VER "LINUX_2.6" +#define VDSO_CGT_SYM "__vdso_clock_gettime64" #define VDSO_CGT_VER "LINUX_2.6" #define SO_SNDTIMEO_OLD 0x1005 diff --git a/arch/or1k/arch.mak b/arch/or1k/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/or1k/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/or1k/bits/alltypes.h.in b/arch/or1k/bits/alltypes.h.in index 5faa1578..aeb73ab5 100644 --- a/arch/or1k/bits/alltypes.h.in +++ b/arch/or1k/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -14,5 +15,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/or1k/bits/ioctl_fix.h b/arch/or1k/bits/ioctl_fix.h new file mode 100644 index 00000000..29c9d8ba --- /dev/null +++ b/arch/or1k/bits/ioctl_fix.h @@ -0,0 +1,4 @@ +#undef SIOCGSTAMP +#undef SIOCGSTAMPNS +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/or1k/bits/ipcstat.h b/arch/or1k/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/or1k/bits/ipcstat.h +++ b/arch/or1k/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/or1k/bits/msg.h b/arch/or1k/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/or1k/bits/msg.h +++ b/arch/or1k/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/or1k/bits/sem.h b/arch/or1k/bits/sem.h index 08faafea..d88338e6 100644 --- a/arch/or1k/bits/sem.h +++ b/arch/or1k/bits/sem.h @@ -1,11 +1,13 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; unsigned short sem_nsems; long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/or1k/bits/shm.h b/arch/or1k/bits/shm.h index 81b2a29a..725fb469 100644 --- a/arch/or1k/bits/shm.h +++ b/arch/or1k/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/or1k/bits/socket.h b/arch/or1k/bits/socket.h new file mode 100644 index 00000000..4d1f645b --- /dev/null +++ b/arch/or1k/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/or1k/bits/stat.h b/arch/or1k/bits/stat.h index ce6a6bd0..cde3fd02 100644 --- a/arch/or1k/bits/stat.h +++ b/arch/or1k/bits/stat.h @@ -14,8 +14,12 @@ struct stat { blksize_t st_blksize; int __st_blksize_padding; blkcnt_t st_blocks; - struct timespec st_atim; - struct timespec st_mtim; - struct timespec st_ctim; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; unsigned __unused[2]; + struct timespec st_atim; + struct timespec st_mtim; + struct timespec st_ctim; }; diff --git a/arch/powerpc/arch.mak b/arch/powerpc/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/powerpc/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/powerpc/bits/alltypes.h.in b/arch/powerpc/bits/alltypes.h.in index fd0c816c..8e003545 100644 --- a/arch/powerpc/bits/alltypes.h.in +++ b/arch/powerpc/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -18,5 +19,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/powerpc/bits/ioctl.h b/arch/powerpc/bits/ioctl.h index b6cbb18f..ac9bfd20 100644 --- a/arch/powerpc/bits/ioctl.h +++ b/arch/powerpc/bits/ioctl.h @@ -116,5 +116,5 @@ #define FIOGETOWN 0x8903 #define SIOCGPGRP 0x8904 #define SIOCATMARK 0x8905 -#define SIOCGSTAMP 0x8906 -#define SIOCGSTAMPNS 0x8907 +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/powerpc/bits/ipcstat.h b/arch/powerpc/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/powerpc/bits/ipcstat.h +++ b/arch/powerpc/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/powerpc/bits/msg.h b/arch/powerpc/bits/msg.h index 171c11a3..9fb15dcc 100644 --- a/arch/powerpc/bits/msg.h +++ b/arch/powerpc/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - int __unused1; - time_t msg_stime; - int __unused2; - time_t msg_rtime; - int __unused3; - time_t msg_ctime; + unsigned long __msg_stime_hi; + unsigned long __msg_stime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_ctime_hi; + unsigned long __msg_ctime_lo; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/powerpc/bits/sem.h b/arch/powerpc/bits/sem.h index bc2d6d1f..28be4845 100644 --- a/arch/powerpc/bits/sem.h +++ b/arch/powerpc/bits/sem.h @@ -1,10 +1,12 @@ struct semid_ds { struct ipc_perm sem_perm; - int __unused1; - time_t sem_otime; - int __unused2; - time_t sem_ctime; + unsigned long __sem_otime_hi; + unsigned long __sem_otime_lo; + unsigned long __sem_ctime_hi; + unsigned long __sem_ctime_lo; unsigned short __sem_nsems_pad, sem_nsems; long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/powerpc/bits/shm.h b/arch/powerpc/bits/shm.h index b19801d5..fb1d4020 100644 --- a/arch/powerpc/bits/shm.h +++ b/arch/powerpc/bits/shm.h @@ -2,19 +2,21 @@ struct shmid_ds { struct ipc_perm shm_perm; - int __unused1; - time_t shm_atime; - int __unused2; - time_t shm_dtime; - int __unused3; - time_t shm_ctime; - int __unused4; + unsigned long __shm_atime_hi; + unsigned long __shm_atime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_ctime_hi; + unsigned long __shm_ctime_lo; size_t shm_segsz; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/powerpc/bits/socket.h b/arch/powerpc/bits/socket.h index 557e324f..e5fa0f7a 100644 --- a/arch/powerpc/bits/socket.h +++ b/arch/powerpc/bits/socket.h @@ -15,8 +15,6 @@ #define SO_REUSEPORT 15 #define SO_RCVLOWAT 16 #define SO_SNDLOWAT 17 -#define SO_RCVTIMEO 18 -#define SO_SNDTIMEO 19 #define SO_PASSCRED 20 #define SO_PEERCRED 21 #define SO_ACCEPTCONN 30 @@ -25,3 +23,8 @@ #define SO_RCVBUFFORCE 33 #define SO_PROTOCOL 38 #define SO_DOMAIN 39 +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/powerpc/bits/stat.h b/arch/powerpc/bits/stat.h index dcb896fd..585d98e9 100644 --- a/arch/powerpc/bits/stat.h +++ b/arch/powerpc/bits/stat.h @@ -13,8 +13,12 @@ struct stat { off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + unsigned __unused[2]; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - unsigned __unused[2]; }; diff --git a/arch/sh/arch.mak b/arch/sh/arch.mak new file mode 100644 index 00000000..aa4d05ce --- /dev/null +++ b/arch/sh/arch.mak @@ -0,0 +1 @@ +COMPAT_SRC_DIRS = compat/time32 diff --git a/arch/sh/bits/alltypes.h.in b/arch/sh/bits/alltypes.h.in index b32f913c..04e0fcca 100644 --- a/arch/sh/bits/alltypes.h.in +++ b/arch/sh/bits/alltypes.h.in @@ -1,3 +1,4 @@ +#define _REDIR_TIME64 1 #define _Addr int #define _Int64 long long #define _Reg int @@ -23,5 +24,5 @@ TYPEDEF double double_t; TYPEDEF struct { long long __ll; long double __ld; } max_align_t; -TYPEDEF long time_t; -TYPEDEF long suseconds_t; +TYPEDEF long long time_t; +TYPEDEF long long suseconds_t; diff --git a/arch/sh/bits/ioctl.h b/arch/sh/bits/ioctl.h index c4305655..370b6901 100644 --- a/arch/sh/bits/ioctl.h +++ b/arch/sh/bits/ioctl.h @@ -108,5 +108,5 @@ #define SIOCATMARK _IOR('s', 7, int) #define SIOCSPGRP _IOW('s', 8, int) #define SIOCGPGRP _IOW('s', 9, int) -#define SIOCGSTAMP _IOR('s', 100, char[8]) -#define SIOCGSTAMPNS _IOR('s', 101, char[8]) +#define SIOCGSTAMP _IOR(0x89, 6, char[16]) +#define SIOCGSTAMPNS _IOR(0x89, 7, char[16]) diff --git a/arch/sh/bits/ipcstat.h b/arch/sh/bits/ipcstat.h index 0018ad1e..4f4fcb0c 100644 --- a/arch/sh/bits/ipcstat.h +++ b/arch/sh/bits/ipcstat.h @@ -1 +1 @@ -#define IPC_STAT 2 +#define IPC_STAT 0x102 diff --git a/arch/sh/bits/msg.h b/arch/sh/bits/msg.h index bc8436c4..7bbbb2bf 100644 --- a/arch/sh/bits/msg.h +++ b/arch/sh/bits/msg.h @@ -1,15 +1,18 @@ struct msqid_ds { struct ipc_perm msg_perm; - time_t msg_stime; - int __unused1; - time_t msg_rtime; - int __unused2; - time_t msg_ctime; - int __unused3; + unsigned long __msg_stime_lo; + unsigned long __msg_stime_hi; + unsigned long __msg_rtime_lo; + unsigned long __msg_rtime_hi; + unsigned long __msg_ctime_lo; + unsigned long __msg_ctime_hi; unsigned long msg_cbytes; msgqnum_t msg_qnum; msglen_t msg_qbytes; pid_t msg_lspid; pid_t msg_lrpid; unsigned long __unused[2]; + time_t msg_stime; + time_t msg_rtime; + time_t msg_ctime; }; diff --git a/arch/sh/bits/sem.h b/arch/sh/bits/sem.h index d383d4ea..544e3d2a 100644 --- a/arch/sh/bits/sem.h +++ b/arch/sh/bits/sem.h @@ -1,9 +1,9 @@ struct semid_ds { struct ipc_perm sem_perm; - time_t sem_otime; - long __unused1; - time_t sem_ctime; - long __unused2; + unsigned long __sem_otime_lo; + unsigned long __sem_otime_hi; + unsigned long __sem_ctime_lo; + unsigned long __sem_ctime_hi; #if __BYTE_ORDER == __LITTLE_ENDIAN unsigned short sem_nsems; char __sem_nsems_pad[sizeof(long)-sizeof(short)]; @@ -13,4 +13,6 @@ struct semid_ds { #endif long __unused3; long __unused4; + time_t sem_otime; + time_t sem_ctime; }; diff --git a/arch/sh/bits/shm.h b/arch/sh/bits/shm.h index 6cdac131..adc01e34 100644 --- a/arch/sh/bits/shm.h +++ b/arch/sh/bits/shm.h @@ -3,17 +3,21 @@ struct shmid_ds { struct ipc_perm shm_perm; size_t shm_segsz; - time_t shm_atime; - int __unused1; - time_t shm_dtime; - int __unused2; - time_t shm_ctime; - int __unused3; + unsigned long __shm_atime_lo; + unsigned long __shm_atime_hi; + unsigned long __shm_dtime_lo; + unsigned long __shm_dtime_hi; + unsigned long __shm_ctime_lo; + unsigned long __shm_ctime_hi; pid_t shm_cpid; pid_t shm_lpid; unsigned long shm_nattch; unsigned long __pad1; unsigned long __pad2; + unsigned long __pad3; + time_t shm_atime; + time_t shm_dtime; + time_t shm_ctime; }; struct shminfo { diff --git a/arch/sh/bits/socket.h b/arch/sh/bits/socket.h new file mode 100644 index 00000000..4d1f645b --- /dev/null +++ b/arch/sh/bits/socket.h @@ -0,0 +1,5 @@ +#define SO_TIMESTAMP 63 +#define SO_TIMESTAMPNS 64 +#define SO_TIMESTAMPING 65 +#define SO_RCVTIMEO 66 +#define SO_SNDTIMEO 67 diff --git a/arch/sh/bits/stat.h b/arch/sh/bits/stat.h index 22b19bbf..5d7828cf 100644 --- a/arch/sh/bits/stat.h +++ b/arch/sh/bits/stat.h @@ -14,8 +14,12 @@ struct stat { off_t st_size; blksize_t st_blksize; blkcnt_t st_blocks; + struct { + long tv_sec; + long tv_nsec; + } __st_atim32, __st_mtim32, __st_ctim32; + ino_t st_ino; struct timespec st_atim; struct timespec st_mtim; struct timespec st_ctim; - ino_t st_ino; }; -- 2.25.1