On Tue, Feb 21, 2006 at 01:30:51PM +0000, Bennett Todd wrote:
Did get a warning:
cc -DTZDIR=\"/usr/share/zoneinfo\" -Os -Dtzname=__tzname -Dtzset=__tzset -DLLONG_MAX=INT64_MAX -c -o localtime.o localtime.c localtime.c: In function `differ_by_repeat': localtime.c:331: warning: comparison is always false due to limited range of data type
but I still seem to have gotten a working build.
Yeah, that warning is harmless; it is an odd bit of code which is trying to determine if time_t is a floating point type. To the compiler it looks an awful lot like the programmer might have been confused, but in this case the compiles-to-boolean-constant is by design (the test in question needs implementation details that the preprocessor can't help with, so the more usual testing with #if can't be used here).
(If so then a #ifdef or two should fix the problem on systems based on a moderately modern glibc, and regardless -DLLONG_MAX should be added to the list of CFLAGS adjustments in the Makefile.)
Actually, I don't do glibc, my system is based on uClibc.
Er, right... I wasn't thinking straight. <stdint.h> is a *compiler* specific (not library specific) header. Make that "a moderately modern gcc", or even "any compiler supporting C99" that should be automagically supported without requiring a -DLLONG_MAX flag. --Ken Pizzini