[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Bruno Haible <address@hidden>] _AC_COMPUTE_INT forgets to include s
Re: [Bruno Haible <address@hidden>] _AC_COMPUTE_INT forgets to include stdio.h, stdlib.h
Tue, 18 Sep 2001 14:35:18 +0200 (CEST)
Paul Eggert writes:
> But I don't think it's a problem, as C constants that do not fit in
> 'int' are of a wider type. For example, with 32-bit int and 64-bit
> long, 9223372036854775807 is of type 'long'.
Right, I was still thinking in K&R C terms.
> This does bring up the good point that the macro doesn't work for
> values greater than LONG_MAX and no greater than ULONG_MAX. So I
> installed the following combined patch which should address that
> issue. This macro does not allow negative numbers
Not allowing negative numbers is a bigger problem than not allowing
values greater than LONG_MAX. When I test for EILSEQ, for example, all
I know is that it will be an 'int' (because errno is an 'int'). It
could be negative.
Please come back from 'unsigned long' to 'long'.