Re: SA_RESETHAND

2020-05-21 Thread Bruno Haible
Paul Eggert wrote: > > - Should glibc define SA_RESETHAND as ((int)0x8000) ? > >Then SA_RESETHAND could not be used in preprocessor directives any more. > > POSIX would allow that, as it doesn't require SA_RESETHAND to be usable > in preprocessor directives.

Re: SA_RESETHAND

2020-05-21 Thread Paul Eggert
On 5/21/20 8:15 AM, Bruno Haible wrote: - Should glibc define SA_RESETHAND as ((int)0x8000) ? Then SA_RESETHAND could not be used in preprocessor directives any more. POSIX would allow that, as it doesn't require SA_RESETHAND to be usable in preprocessor directives. However, too

SA_RESETHAND

2020-05-21 Thread Bruno Haible
SA_ONSTACK | */ SA_RESETHAND; return 0; } $ clang -Wall foo.c -E | grep sa_flags int sa_flags; act.sa_flags = 0x8000; $ clang -Wall foo.c -fsanitize=implicit-integer-sign-change $ ./a.out foo.c:7:50: runtime error: implicit conversion from type 'unsigned int' of value 2147483648

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-27 Thread Jim Meyering
Pádraig Brady wrote: > On 16/07/11 01:51, Paul Eggert wrote: >> On 07/15/11 03:28, Pádraig Brady wrote: >>> What I was getting was that it's probably better to leave >>> the following to the app too: >>> >>> #ifndef SA_RESETHAND >>> # defi

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-20 Thread Pádraig Brady
On 16/07/11 01:51, Paul Eggert wrote: > On 07/15/11 03:28, Pádraig Brady wrote: >> What I was getting was that it's probably better to leave >> the following to the app too: >> >> #ifndef SA_RESETHAND >> # define SA_RESETHAND 0 >> /* Now the ap

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-16 Thread Bastien ROUCARIES
re the intent of a program on certain platforms. > >> Absolutely. What I was getting was that it's probably better to leave >> the following to the app too: >> >> #ifndef SA_RESETHAND >> # define SA_RESETHAND 0 >> /* Now the app writer knows they need to handle this

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-15 Thread Paul Eggert
i b/doc/posix-functions/sigaction.texi index d03e516..6a059a6 100644 --- a/doc/posix-functions/sigaction.texi +++ b/doc/posix-functions/sigaction.texi @@ -33,8 +33,12 @@ missing on some platforms: mingw. @item +Support for SA_RESETHAND is missing on some platforms: +NonStop. + +@item Support f

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-15 Thread Paul Eggert
On 07/15/11 03:28, Pádraig Brady wrote: > What I was getting was that it's probably better to leave > the following to the app too: > > #ifndef SA_RESETHAND > # define SA_RESETHAND 0 > /* Now the app writer knows they need to handle this case */ > #endif Yes, you

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-15 Thread Eric Blake
Absolutely. What I was getting was that it's probably better to leave > the following to the app too: > > #ifndef SA_RESETHAND > # define SA_RESETHAND 0 > /* Now the app writer knows they need to handle this case */ > #endif Can't the gnulib sigaction module be taught to

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-15 Thread Pádraig Brady
rogram then does: >> >> #ifndef SA_RESETHAND >> /* do something else */ >> #endif > > Well, as a matter of style, I prefer this: > >if (! SA_RESETHAND) > do_something_else (); > > as that's much more likely to detect bitrot in the &q

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-15 Thread Bruno Haible
Paul Eggert wrote: > --- a/doc/posix-functions/sigaction.texi > +++ b/doc/posix-functions/sigaction.texi A documentation update for the header file, in doc/posix-headers/signal.texi, would also be useful. Bruno -- In memoriam Natalya Estemirova

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-15 Thread Paul Eggert
On 07/14/11 17:25, Pádraig Brady wrote: > I'm not sure about defining these to 0 in gnulib. > That will silently ignore the intent of a program on certain platforms. > Wouldn't it be better to fail to compile so that each program then does: > > #ifndef SA_RESETHA

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-14 Thread Pádraig Brady
On 14/07/11 23:33, Paul Eggert wrote: > [CC'ing bug-gnulib re <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9076>.] > > On 07/13/11 23:54, Joachim Schmitz wrote: > >> coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally and on HP >> NonStop these don

Re: bug#9076: coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally

2011-07-14 Thread Paul Eggert
[CC'ing bug-gnulib re <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=9076>.] On 07/13/11 23:54, Joachim Schmitz wrote: > coreutils-8.12 uses SA_RESETHAND and SA_RESTART unconditionally and on HP > NonStop these don't exist. Thanks for reporting this. I think coreutils