On Tue, 8 Jul 2008, Antoine Leca wrote:
So, I think, using traditional ANSI C header "limits.h"
is more generic than using modern headers "bits/wordsize.h", like...
This is a very good point. I just looked at our i686/x86_64 glibc
/usr/include/limits.h header and found these lines:
#include <bits/wordsize.h>
# if __WORDSIZE == 64
# define LONG_MAX 9223372036854775807L
# else
# define LONG_MAX 2147483647L
# endif
# define LONG_MIN (-LONG_MAX - 1L)
# if __WORDSIZE == 64
# define ULONG_MAX 18446744073709551615UL
# else
# define ULONG_MAX 4294967295UL
# endif
Thus, assuming that other biarch versions of <limits.h> do something
analogous (as they certainly do for glibc), testing LONG_MAX should do the
job and there is no need to use <bits/wordsize.h> (that may or may not
exist).
And there should be no problems with
#if LONG_MAX == 9223372036854775807L
in 32 bit mode, because 9223372036854775807L=0x7fffffffffffffff is truncated
to 0xffffffff whereas LONG_MAX=0x7fffffff.
Best regards
Peter Breitenlohner <[EMAIL PROTECTED]>
_______________________________________________
Freetype-devel mailing list
[email protected]
http://lists.nongnu.org/mailman/listinfo/freetype-devel