bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: abort() on Windows 2008 Server


From: Bruno Haible
Subject: Re: abort() on Windows 2008 Server
Date: Tue, 21 Oct 2008 01:16:23 +0200
User-agent: KMail/1.5.4

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

[Prev in Thread] Current Thread [Next in Thread]