Re: Fw: [PATCH newlib 0/1] sys/signal.h needs sys/_intsup.h

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <[email protected]>
On Aug 26 18:28, Joel Sherrill wrote:
> We recently added this to sys/signal.h:
> 
> #if __STDINT_EXP(INT_MAX) > 0x7fff
> #define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1)
> #else
> #define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("65535") - 1)
> #endif
> 
> And -ffreestanding breaks that. I see two solutions:
> 
> (1) Add __STDINT_EXP to gcc's stdint-gcc.h
> (2) Switch that #if to something else
> 
> I think something like this is an OK substitute works equivalently:
> 
> #if __SIZEOF_INT__ > 2

or even __SIZEOF_INT__ >= 4 to be extra *extra* paranoid, but yeah,
sure, go ahead.  The commmit message should just briefly explain the
freestanding implementation issue.


Corinna
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.