Re: [PATCH] Make SIG2STR_MAX usable in #if

Corinna Vinschen <[email protected]>
Newsgroups gmane.comp.lib.newlib
Message-ID <ZJK/M+EER7mXN/[email protected]>
On Jun 21 09:33, Torbjorn SVENSSON wrote:
> 
>  #if __SIZEOF_INT__ >= 4
> -#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("4294967295") - 1)
> +#define SIG2STR_MAX 21	/* (sizeof("RTMAX+") + sizeof("4294967295") - 1) */
>  #else
> -#define SIG2STR_MAX (sizeof("RTMAX+") + sizeof("65535") - 1)
> +#define SIG2STR_MAX 17	/* (sizeof("RTMAX+") + sizeof("65535") - 1) */
>  #endif
> 
> 
> I have not read the specification, but how come it's 17 and 21?
> 
> From what I can tell, "RTMAX+65535" is not 4 shorter than "RTMAX+4294967295".

That should be 7 + 11 - 1 = 17 and 7 + 6 - 1 = 12, shouldn't it?


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.