On Tue, Jun 12, 2001 at 12:41:27PM -0700, Edward Moy wrote:
> I made a private copy of stdint.h and changed:
>
> < #define INT32_MIN -2147483648
> ---
> > #define INT32_MIN -2147483647
>
> After setting cflags to use my stdint.h, I rebuilt, and the build
> succeeded! There were no "decimal constant is so large that it is
> unsigned" warnings.
>
> I ran make test, and (after remembering to unsetenv LANG, which without it,
> causes bogus test failures), I get:
>
> Failed 3 test scripts out of 371, 99.19% okay.
try
#define INT32_MIN -2147483647-1
It stands a reasonable chance of fixing some problems you may have found.
[In that I know some bits of perl's implementation are assuming that IV_MIN
is a negative power of 2, and that -IV_MIN [the value] can be got
with the expression (UV)-IV_MIN
And some are assuming that (UV)-IV_MIN is bigger than IV_MAX. Not equal/
And these assumptions may break. They may well be wrong assumptions, but
they are there. And how many systems with 1s complement integers or
sign and magnitude integers are there out there wanting to run perl?
[these things will work on a 2s complement system, but is undefined behaviour
by the gospel according to ANSI.]
Nicholas Clark