From: Rich Felker <dalias@libc.org>
To: musl@lists.openwall.com
Subject: Re: [PATCH] remaining steps for time64 switchover
Date: Mon, 21 Oct 2019 08:43:35 -0400 [thread overview]
Message-ID: <20191021124335.GH16318@brightrain.aerifal.cx> (raw)
In-Reply-To: <20191021024643.GA6192@brightrain.aerifal.cx>
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@aerifal.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
next prev parent reply other threads:[~2019-10-21 12:43 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-10-21 2:46 Rich Felker
2019-10-21 12:43 ` Rich Felker [this message]
2019-10-27 4:15 ` Rich Felker
2019-10-27 4:26 ` Rich Felker
2019-10-27 8:32 ` Laurent Bercot
2019-10-27 14:53 ` Rich Felker
2019-10-27 20:12 ` Matias Fonzo
2019-10-27 21:14 ` Rich Felker
2019-10-27 21:53 ` Matias Fonzo
2019-10-27 23:27 ` Laurent Bercot
2019-10-28 21:31 ` Matias Fonzo
2019-10-28 22:22 ` Rich Felker
2019-10-29 19:52 ` Rich Felker
2019-10-29 19:53 ` Rich Felker
2019-10-29 23:08 ` Rich Felker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20191021124335.GH16318@brightrain.aerifal.cx \
--to=dalias@libc.org \
--cc=musl@lists.openwall.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this public inbox
https://git.vuxu.org/mirror/musl/
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).