From fe34776c08f91cd6f963caeecb0c05700b7edd15 Mon Sep 17 00:00:00 2001 From: "Kirill A. Korinsky" Date: Wed, 30 Aug 2023 15:17:24 +0200 Subject: [PATCH] Never use `int` as fixnums `int` usually enough to hold any pointer (`void*`) on 32-bit machines, but ECL for a while requires support of `long long`. The old test decided that `int` is enough, and ECL can't be bootstraped. Up to `16.1.3` such error can be avoided by `--disable-longdouble` but `20.4.24` makes requirement for `long long` mandatory. Here I've enforced larger type on 32 bit machines. --- src/aclocal.m4 | 16 +--------------- src/configure | 16 +--------------- 2 files changed, 2 insertions(+), 30 deletions(-) diff --git a/src/aclocal.m4 b/src/aclocal.m4 index 084ebbbbf..a4bfb923c 100644 --- a/src/aclocal.m4 +++ b/src/aclocal.m4 @@ -727,21 +727,7 @@ int main() { int bits; FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - if (sizeof(int) >= sizeof(void*)) { - unsigned int t = 1; - signed int l = 0; - int_type="int"; - for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1); - l = (~l) << (bits - 3); -#if 1 - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-(l+1)); -#else - l++; - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-l); -#endif - } else if (sizeof(long) >= sizeof(void*)) { + if (sizeof(long) >= sizeof(void*)) { unsigned long int t = 1; signed long int l = 0; int_type="long int"; diff --git a/src/configure b/src/configure index b0322104b..2f25c581e 100755 --- a/src/configure +++ b/src/configure @@ -8749,21 +8749,7 @@ int main() { int bits; FILE *f=fopen("conftestval", "w"); if (!f) exit(1); - if (sizeof(int) >= sizeof(void*)) { - unsigned int t = 1; - signed int l = 0; - int_type="int"; - for (bits=1; ((t << 1) >> 1) == t; bits++, t <<= 1); - l = (~l) << (bits - 3); -#if 1 - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-(l+1)); -#else - l++; - fprintf(f,"CL_FIXNUM_MIN='%d';",l); - fprintf(f,"CL_FIXNUM_MAX='%d';",-l); -#endif - } else if (sizeof(long) >= sizeof(void*)) { + if (sizeof(long) >= sizeof(void*)) { unsigned long int t = 1; signed long int l = 0; int_type="long int"; -- GitLab