|
|
Message-ID: <20191021124335.GH16318@brightrain.aerifal.cx>
Date: Mon, 21 Oct 2019 08:43:35 -0400
From: Rich Felker <dalias@...c.org>
To: musl@...ts.openwall.com
Subject: Re: [PATCH] remaining steps for time64 switchover
On Sun, Oct 20, 2019 at 10:46:43PM -0400, Rich Felker wrote:
> >From 31aae539d35550a3db0641f25d16968ed6a0702c Mon Sep 17 00:00:00 2001
> From: Rich Felker <dalias@...ifal.cx>
> Date: Sun, 20 Oct 2019 19:24:53 -0400
> Subject: [PATCH 17/17] switch powerpc to 64-bit time_t
>
> ---
> arch/powerpc/arch.mak | 1 +
> arch/powerpc/bits/alltypes.h.in | 5 +++--
> arch/powerpc/bits/ipcstat.h | 2 +-
> arch/powerpc/bits/msg.h | 15 +++++++++------
> arch/powerpc/bits/sem.h | 10 ++++++----
> arch/powerpc/bits/shm.h | 16 +++++++++-------
> arch/powerpc/bits/stat.h | 6 +++++-
> 7 files changed, 34 insertions(+), 21 deletions(-)
> create mode 100644 arch/powerpc/arch.mak
>
> diff --git a/arch/powerpc/arch.mak b/arch/powerpc/arch.mak
> new file mode 100644
> index 00000000..aa4d05ce
> --- /dev/null
> +++ b/arch/powerpc/arch.mak
> @@ -0,0 +1 @@
> +COMPAT_SRC_DIRS = compat/time32
> diff --git a/arch/powerpc/bits/alltypes.h.in b/arch/powerpc/bits/alltypes.h.in
> index fd0c816c..8e003545 100644
> --- a/arch/powerpc/bits/alltypes.h.in
> +++ b/arch/powerpc/bits/alltypes.h.in
> @@ -1,3 +1,4 @@
> +#define _REDIR_TIME64 1
> #define _Addr int
> #define _Int64 long long
> #define _Reg int
> @@ -18,5 +19,5 @@ TYPEDEF double double_t;
>
> TYPEDEF struct { long long __ll; long double __ld; } max_align_t;
>
> -TYPEDEF long time_t;
> -TYPEDEF long suseconds_t;
> +TYPEDEF long long time_t;
> +TYPEDEF long long suseconds_t;
> diff --git a/arch/powerpc/bits/ipcstat.h b/arch/powerpc/bits/ipcstat.h
> index 0018ad1e..4f4fcb0c 100644
> --- a/arch/powerpc/bits/ipcstat.h
> +++ b/arch/powerpc/bits/ipcstat.h
> @@ -1 +1 @@
> -#define IPC_STAT 2
> +#define IPC_STAT 0x102
This could actually be dropped for powerpc...
> diff --git a/arch/powerpc/bits/msg.h b/arch/powerpc/bits/msg.h
> index 171c11a3..9fb15dcc 100644
> --- a/arch/powerpc/bits/msg.h
> +++ b/arch/powerpc/bits/msg.h
> @@ -1,15 +1,18 @@
> struct msqid_ds {
> struct ipc_perm msg_perm;
> - int __unused1;
> - time_t msg_stime;
> - int __unused2;
> - time_t msg_rtime;
> - int __unused3;
> - time_t msg_ctime;
> + unsigned long __msg_stime_hi;
> + unsigned long __msg_stime_lo;
> + unsigned long __msg_rtime_hi;
> + unsigned long __msg_rtime_lo;
> + unsigned long __msg_ctime_hi;
> + unsigned long __msg_ctime_lo;
by making this just:
> + time_t msg_stime;
> + time_t msg_rtime;
> + time_t msg_ctime;
since the alignments and endianness are correct (I'm pretty sure
they're correct for all 3 structs). Any ppc folks want to confirm
that?
It's not a big deal either way but would be slightly "nicer".
Rich
Powered by blists - more mailing lists
Confused about mailing lists and their use? Read about mailing lists on Wikipedia and check out these guidelines on proper formatting of your messages.