![]() |
|
Message-ID: <20250325212052.GN1827@brightrain.aerifal.cx> Date: Tue, 25 Mar 2025 17:20:52 -0400 From: Rich Felker <dalias@...c.org> To: Alex Rønne Petersen <alex@...xrp.com> Cc: musl@...ts.openwall.com Subject: Re: [PATCH] powerpc, powerpc64, s390x: remove unsigned suffix on SA_* macros On Mon, Mar 24, 2025 at 05:24:32PM +0100, Alex Rønne Petersen wrote: > I'm not really sure why this was ever here. It's not done for any other ports, > and AFAICT glibc doesn't do this either. It causes -Wsign-conversion warnings in > code that's completely fine, such as `act->sa_flags & SA_SIGINFO`. > --- > arch/powerpc/bits/signal.h | 16 ++++++++-------- > arch/powerpc64/bits/signal.h | 16 ++++++++-------- > arch/s390x/bits/signal.h | 16 ++++++++-------- > 3 files changed, 24 insertions(+), 24 deletions(-) > > diff --git a/arch/powerpc/bits/signal.h b/arch/powerpc/bits/signal.h > index c1bf3caf..de1af5c5 100644 > --- a/arch/powerpc/bits/signal.h > +++ b/arch/powerpc/bits/signal.h > @@ -70,14 +70,14 @@ typedef struct __ucontext { > mcontext_t uc_mcontext; > } ucontext_t; > > -#define SA_NOCLDSTOP 1U > -#define SA_NOCLDWAIT 2U > -#define SA_SIGINFO 4U > -#define SA_ONSTACK 0x08000000U > -#define SA_RESTART 0x10000000U > -#define SA_NODEFER 0x40000000U > -#define SA_RESETHAND 0x80000000U > -#define SA_RESTORER 0x04000000U > +#define SA_NOCLDSTOP 1 > +#define SA_NOCLDWAIT 2 > +#define SA_SIGINFO 4 > +#define SA_ONSTACK 0x08000000 > +#define SA_RESTART 0x10000000 > +#define SA_NODEFER 0x40000000 > +#define SA_RESETHAND 0x80000000 > +#define SA_RESTORER 0x04000000 Unfortunately this seems to leave the signedness inconsistent: SA_RESETHAND is still unsigned. Should that be fixed too by defining it as a negative value? That might be the motivation for why they were all made unsigned on ppc originally... 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.