Eric Blake wrote:
> >   int
> >   sigfillset (sigset_t *set)
> >   {
> > !   *set = ((2U << (NSIG - 1)) - 1)
> > !    #ifdef SIGABRT_COMPAT
> > !    & ~(1U << SIGABRT_COMPAT)
> > !    #endif
> > !    ;
> 
> However, I'm not the biggest fan of #ifdef inside a statement.  Maybe a
> helper macro would make this read a bit cleaner

Yes, I agree. #ifdef inside expressions gets ugly when used inside function
calls like

  printf ("blabla %d",
          ((2U << (NSIG - 1)) - 1)
          #ifdef SIGABRT_COMPAT
          & ~(1U << SIGABRT_COMPAT)
          #endif
         );

(This fails to compile on systems where printf is defined as a macro.)

Committed with the requested change.

Bruno



Reply via email to