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 d2700bd93f5133e9d9b1fe882f36d9e909be61b5..40bd30ea239da460ca2887448cc1929cf56090f5 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 ebb383dafa2d331576f869f0eeffe88d91369bc3..dfa188660639ac27384c68a0d2bc3f2ca190a912 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c4ad26797d69e762b701aa906b9bed1271..7bbbb2bf43bebae1ec8fe785d38c5bbba0e77cfe 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 d383d4ea552d9a092e3960e36d1dc3f97feaecdd..544e3d2a522816553148b2d5d9dcfb86943baa8f 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 81b2a29abb87642a2d1a56cf45ee932f16db1603..725fb46968a7eeeb67cd4ae31810de6e2fffa2b0 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 22b19bbfecf52c0b0158a2f84273c9bb7efd3d64..5d7828cf792baa9109d9868e2939ea9a5508f25c 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 53fb155c0dcb7e94d3878f3a0634890003552bda..4b08762d7b35b056506d9532dcd538d142c20636 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 f033f3766c64a70957125cfaef97eabf13aa49dc..74e599a206b33595c1f7e3d830cf721a2ae0be3e 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c4ad26797d69e762b701aa906b9bed1271..7bbbb2bf43bebae1ec8fe785d38c5bbba0e77cfe 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 e61571c121fc781d1254c33c39575025e6dcb436..65661542a56bce5bc0a23dceb4dff7a42e722f4b 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 81b2a29abb87642a2d1a56cf45ee932f16db1603..725fb46968a7eeeb67cd4ae31810de6e2fffa2b0 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 22b19bbfecf52c0b0158a2f84273c9bb7efd3d64..5d7828cf792baa9109d9868e2939ea9a5508f25c 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 22b0b28b8349c5e80f59b44637b5bec56f071050..69642e578a5f16e783c2afe4f67744a9b17e8c73 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 922c2ce55191abbef4c8e6ce672cb1dd5a184daa..a92d1f077b20ff49071689fcd75feee820fe1b3a 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c4ad26797d69e762b701aa906b9bed1271..7bbbb2bf43bebae1ec8fe785d38c5bbba0e77cfe 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 08faafead1f00dd58852b6b35f279ed2cf602afe..d88338e69540e5e00f0761f77e498933e862dd39 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 81b2a29abb87642a2d1a56cf45ee932f16db1603..725fb46968a7eeeb67cd4ae31810de6e2fffa2b0 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 0f7b66a168862a3b707643bb2114a8bb1ee8e5c2..f87681471aaf8c9e16da22ced16f0629daa2cf73 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 b958604e91f3ed8b008164687ef269af3f30c858..6f69b4f960b8bc2f5691ba89b580e4cdeee09b43 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c4ad26797d69e762b701aa906b9bed1271..7bbbb2bf43bebae1ec8fe785d38c5bbba0e77cfe 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 d383d4ea552d9a092e3960e36d1dc3f97feaecdd..544e3d2a522816553148b2d5d9dcfb86943baa8f 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 81b2a29abb87642a2d1a56cf45ee932f16db1603..725fb46968a7eeeb67cd4ae31810de6e2fffa2b0 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 ce6a6bd0ea62d9c0c79df24ef33f34b8dfccef0d..8a4d509a8b0e654ad35cc5cdaad499be585bf608 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 9544b49636f3904d3a0f0b6b18568db1b534365c..32544cfe24d7637d1169767cc90ac3f10887ecfd 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 e277c3f05c62fec053dbc5847e4a6cb6dcf19e58..e20bf19eaa77b44230ec054ee331b8b1971ec79c 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index f28aece8fa4bd662f0df89931cb6174a5db92047..c734dbb5708525bd2e045290b02b5ac718730df9 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 5184eb5977ece3775fe5f7a6659a83d6da24ca44..fe6f0948582b9bb241fc600c34c625e085cca32b 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 8d19378191bacd8a43080a7f96027befcfd30e4c..ab8c642d825aba458641de167f3e250f6f3c4514 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 92551b9f9faff14d02353e31d9af8050fca77330..4ffc4d4a2b699fa19d2ab0c3bcb4d175a203e436 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 3291a63620a2d491ef788102d267de91e6284d1a..48d4ac8044dbfa032f63c088e08f39a216d8e20a 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 6ea73437b52baf7e53b7dc218a36d6c3c7bbf85c..f821e73fcc574ac47f70931e37a3e4a809c69917 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 9544b49636f3904d3a0f0b6b18568db1b534365c..32544cfe24d7637d1169767cc90ac3f10887ecfd 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 e277c3f05c62fec053dbc5847e4a6cb6dcf19e58..e20bf19eaa77b44230ec054ee331b8b1971ec79c 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index f28aece8fa4bd662f0df89931cb6174a5db92047..c734dbb5708525bd2e045290b02b5ac718730df9 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 5184eb5977ece3775fe5f7a6659a83d6da24ca44..fe6f0948582b9bb241fc600c34c625e085cca32b 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 8d19378191bacd8a43080a7f96027befcfd30e4c..ab8c642d825aba458641de167f3e250f6f3c4514 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 92551b9f9faff14d02353e31d9af8050fca77330..4ffc4d4a2b699fa19d2ab0c3bcb4d175a203e436 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 27d36b5125ef6791cfcaa0873f0fd55c64e34600..6e2f2808687c7a06e710d9d560d2c290e560a05a 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 5ff43bba1f7ccdb8dc75b9ec2e0c7d98044532f2..c1a4b7da3091f5d5b75f5ad2dde606a301e98ec9 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 5faa157856d87d175eab1706c5146c16f60d04d9..aeb73ab5f20f9d569639c06c1c8c05f30ed28b65 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c4ad26797d69e762b701aa906b9bed1271..7bbbb2bf43bebae1ec8fe785d38c5bbba0e77cfe 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 08faafead1f00dd58852b6b35f279ed2cf602afe..d88338e69540e5e00f0761f77e498933e862dd39 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 81b2a29abb87642a2d1a56cf45ee932f16db1603..725fb46968a7eeeb67cd4ae31810de6e2fffa2b0 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 ce6a6bd0ea62d9c0c79df24ef33f34b8dfccef0d..cde3fd027b75e2a85d7d23df2e36cc2feda14db8 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 fd0c816cf6fd489be549091b73e10052dacb5108..8e0035456fc718e376aecb735430cebd68d5fa4e 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 b6cbb18f4776521d0ad07c6f1ffa97c3513db87e..ac9bfd204a84006e8d871600aae3f0e9d10ec1b0 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index 171c11a34f8f0db180362a1ed32e8969a516ff76..9fb15dccb2e0d6e91cd5fccfb75d3f93bd955019 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 bc2d6d1f514dffc7eafddd5c34adee8c86a34a09..28be484528574b2fa87c038818b947d393048b0f 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 b19801d51a067d8211b1b211dd395ebfaff7ce1f..fb1d4020f683cc22885195ac63a384ecd9880dba 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 557e324fde9d7eb5415943c33b3cda7912f739f3..e5fa0f7ad129e01f9ce11fb4094afcfcee769035 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 dcb896fd5fba811fa190c7cc1e6246f76ec4de76..585d98e908081eb1e6c1b19b8812d1b017fe7f07 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 b32f913c4ca07653a5a25cd1b7f7058eb17fc61a..04e0fcca11c1f5d6b49cd37612bae20d2f3bc053 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 c4305655c70275714a82ad32140f9b79a3fccb84..370b6901e261d088f466849356434253d4057f80 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 0018ad1e20f62a4bb426908c9397ee1253954cd5..4f4fcb0c5b74d7142e781f232b7615f9c86ef2ce 100644 (file)
@@ -1 +1 @@
-#define IPC_STAT 2
+#define IPC_STAT 0x102
index bc8436c4ad26797d69e762b701aa906b9bed1271..7bbbb2bf43bebae1ec8fe785d38c5bbba0e77cfe 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 d383d4ea552d9a092e3960e36d1dc3f97feaecdd..544e3d2a522816553148b2d5d9dcfb86943baa8f 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 6cdac1311aeddc56e54235c883bb767ae93c657d..adc01e34262e6a3901df67b14b8dc3beae4f5763 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 22b19bbfecf52c0b0158a2f84273c9bb7efd3d64..5d7828cf792baa9109d9868e2939ea9a5508f25c 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;
 };