tz64code2006b.tar.gz
Ken Pizzini
tz. at explicate.org
Thu Feb 23 12:40:20 UTC 2006
On Wed, Feb 22, 2006 at 10:28:14PM -0800, Paul Eggert wrote:
> >> (If so then a #ifdef or two should fix the problem on systems
> >> based on a moderately modern glibc,
>
> There's no easy way to use #ifdefs, since the values in question
> (e.g., the number of bits in a time_t) can't be computed by the
> preprocessor.
I was thinking about a #ifdef for INT64_MAX (but see below), not an #if
that does a preprocessor-time check of the time_t; I'm quite aware that
the latter can not work.
> >> -DLLONG_MAX
> >> should be added to the list of CFLAGS adjustments in the
> >> Makefile.)
>
> Hmm, your compiler has long long and INT64_MAX, but not LLONG_MAX?
> Which compiler is this? Which header defines INT64_MAX? Does your
> compiler have stdint.h? If so, does -DHAVE_STDINT_H work? It's what
> the Makefile recommends.
On one of my ia386 systems which uses
$ gcc -v 2>&1 | grep version
gcc version 3.3.6 (Gentoo 3.3.6, ssp-3.3.6-1.0, pie-8.7.8)
there is no LLONG_MAX defined in stdint.h, but INT64_MAX is defined.
But... it is just a fluke that my misguided suggestion worked for
Bennett Todd. It was merely the fact that LLONG_MAX was *defined* that
fixed his compile by having the compiler "typedef long long int_fast64_t",
which happens to work fine with gcc. What LLONG_MAX is set to is
irrelevant, as far as the code is concerned; the only reference to it
being this one #ifdef.
Using -DHAVE_STDINT_H is indeed the correct fix.
--Ken Pizzini
More information about the tz
mailing list