atom feed2 messages in net.sourceforge.lists.courier-users[courier-users] maxlongsize may be a ...
FromSent OnAttachments
Alessandro VeselySep 29, 2004 8:56 am 
Sam VarshavchikSep 29, 2004 4:28 pm 
Subject:[courier-users] maxlongsize may be a 64-bit portability issue
From:Alessandro Vesely (ves@tana.it)
Date:Sep 29, 2004 8:56:01 am
List:net.sourceforge.lists.courier-users

The maxlongsize.h header used to define the max size of a decimal representation of the largest long int using the size of its string representation as given in limits.h, i.e. (simplified slightly)

#define MAXLONGSIZE MAXLONGSIZE1(ULONG_MAX) #define MAXLONGSIZE1(x) MAXLONGSIZE2(x) #define MAXLONGSIZE2(x) sizeof( # x )

However, the max in limits.h can be given in hex format, e.g. 0xffffffff rather than 4294967295. Note that since hex format requires two extra chars "0x", it will not be shorter than the equivalent decimal representation unless the number has 40 or more bits.

OT: Why 40? I couldn't do better than solve 2 + log16(x) = log10(x), approx. 2^39.2