>From 58a8d251770e4f25b42923a69218dfcb685e2992 Mon Sep 17 00:00:00 2001 From: Rich Felker Date: Sun, 20 Oct 2019 19:00:01 -0400 Subject: [PATCH 12/17] switch m68k to 64-bit time_t --- arch/m68k/arch.mak | 1 + arch/m68k/bits/alltypes.h.in | 5 +++-- 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/stat.h | 6 +++++- 7 files changed, 35 insertions(+), 20 deletions(-) create mode 100644 arch/m68k/arch.mak 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/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/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; }; -- 2.21.0