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)
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

diff --git a/arch/arm/arch.mak b/arch/arm/arch.mak
new file mode 100644 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index d2700bd..40bd30e 100644 (file)
@@ -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;
index ebb383d..dfa1886 100644 (file)
@@ -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])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c..7bbbb2b 100644 (file)
@@ -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;
 };
index d383d4e..544e3d2 100644 (file)
@@ -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;
 };
index 81b2a29..725fb46 100644 (file)
@@ -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 (file)
index 0000000..4d1f645
--- /dev/null
@@ -0,0 +1,5 @@
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
index 22b19bb..5d7828c 100644 (file)
@@ -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;
 };
index 53fb155..4b08762 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index f033f37..74e599a 100644 (file)
@@ -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 (file)
index 0000000..29c9d8b
--- /dev/null
@@ -0,0 +1,4 @@
+#undef SIOCGSTAMP
+#undef SIOCGSTAMPNS
+#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
+#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c..7bbbb2b 100644 (file)
@@ -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;
 };
index e61571c..6566154 100644 (file)
@@ -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;
 };
index 81b2a29..725fb46 100644 (file)
@@ -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 (file)
index 0000000..4d1f645
--- /dev/null
@@ -0,0 +1,5 @@
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
index 22b19bb..5d7828c 100644 (file)
@@ -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;
 };
index 22b0b28..69642e5 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index 922c2ce..a92d1f0 100644 (file)
@@ -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 (file)
index 0000000..29c9d8b
--- /dev/null
@@ -0,0 +1,4 @@
+#undef SIOCGSTAMP
+#undef SIOCGSTAMPNS
+#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
+#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c..7bbbb2b 100644 (file)
@@ -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;
 };
index 08faafe..d88338e 100644 (file)
@@ -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;
 };
index 81b2a29..725fb46 100644 (file)
@@ -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 (file)
index 0000000..4d1f645
--- /dev/null
@@ -0,0 +1,5 @@
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
index 0f7b66a..f876814 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index b958604..6f69b4f 100644 (file)
@@ -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 (file)
index 0000000..29c9d8b
--- /dev/null
@@ -0,0 +1,4 @@
+#undef SIOCGSTAMP
+#undef SIOCGSTAMPNS
+#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
+#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c..7bbbb2b 100644 (file)
@@ -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;
 };
index d383d4e..544e3d2 100644 (file)
@@ -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;
 };
index 81b2a29..725fb46 100644 (file)
@@ -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 (file)
index 0000000..4d1f645
--- /dev/null
@@ -0,0 +1,5 @@
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
index ce6a6bd..8a4d509 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index 9544b49..32544cf 100644 (file)
@@ -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;
index e277c3f..e20bf19 100644 (file)
 #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])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index f28aece..c734dbb 100644 (file)
@@ -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;
 };
index 5184eb5..fe6f094 100644 (file)
@@ -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;
 };
index 8d19378..ab8c642 100644 (file)
@@ -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 {
index 92551b9..4ffc4d4 100644 (file)
 #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
index 3291a63..48d4ac8 100644 (file)
@@ -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];
 };
index 6ea7343..f821e73 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index 9544b49..32544cf 100644 (file)
@@ -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;
index e277c3f..e20bf19 100644 (file)
 #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])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index f28aece..c734dbb 100644 (file)
@@ -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;
 };
index 5184eb5..fe6f094 100644 (file)
@@ -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;
 };
index 8d19378..ab8c642 100644 (file)
@@ -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 {
index 92551b9..4ffc4d4 100644 (file)
 #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
index 27d36b5..6e2f280 100644 (file)
@@ -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];
 };
index 5ff43bb..c1a4b7d 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index 5faa157..aeb73ab 100644 (file)
@@ -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 (file)
index 0000000..29c9d8b
--- /dev/null
@@ -0,0 +1,4 @@
+#undef SIOCGSTAMP
+#undef SIOCGSTAMPNS
+#define SIOCGSTAMP      _IOR(0x89, 6, char[16])
+#define SIOCGSTAMPNS    _IOR(0x89, 7, char[16])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c..7bbbb2b 100644 (file)
@@ -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;
 };
index 08faafe..d88338e 100644 (file)
@@ -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;
 };
index 81b2a29..725fb46 100644 (file)
@@ -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 (file)
index 0000000..4d1f645
--- /dev/null
@@ -0,0 +1,5 @@
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
index ce6a6bd..cde3fd0 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index fd0c816..8e00354 100644 (file)
@@ -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;
index b6cbb18..ac9bfd2 100644 (file)
 #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])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index 171c11a..9fb15dc 100644 (file)
@@ -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;
 };
index bc2d6d1..28be484 100644 (file)
@@ -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;
 };
index b19801d..fb1d402 100644 (file)
@@ -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 {
index 557e324..e5fa0f7 100644 (file)
@@ -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
index dcb896f..585d98e 100644 (file)
@@ -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 (file)
index 0000000..aa4d05c
--- /dev/null
@@ -0,0 +1 @@
+COMPAT_SRC_DIRS = compat/time32
index b32f913..04e0fcc 100644 (file)
@@ -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;
index c430565..370b690 100644 (file)
 #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])
index 0018ad1..4f4fcb0 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c..7bbbb2b 100644 (file)
@@ -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;
 };
index d383d4e..544e3d2 100644 (file)
@@ -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;
 };
index 6cdac13..adc01e3 100644 (file)
@@ -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 (file)
index 0000000..4d1f645
--- /dev/null
@@ -0,0 +1,5 @@
+#define SO_TIMESTAMP    63
+#define SO_TIMESTAMPNS  64
+#define SO_TIMESTAMPING 65
+#define SO_RCVTIMEO     66
+#define SO_SNDTIMEO     67
index 22b19bb..5d7828c 100644 (file)
@@ -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;
 };