|
Message-ID: <20191027041524.GW16318@brightrain.aerifal.cx> Date: Sun, 27 Oct 2019 00:15:24 -0400 From: Rich Felker <dalias@...c.org> To: musl@...ts.openwall.com Subject: Re: [PATCH] remaining steps for time64 switchover On Mon, Oct 21, 2019 at 08:43:35AM -0400, Rich Felker wrote: > 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". If there's any possibility of having a little-endian 32-bit powerpc target, then I think it's probably best not to do this -- it would have to be backed out conditional on endianness. 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.