From 2e5746d60c48acffe82b3838e5ce5b56203ea0c2 Mon Sep 17 00:00:00 2001 From: "jan.nijtmans" Date: Wed, 20 Jan 2021 08:52:10 +0000 Subject: Possible fix (workaround) for [8c025f8f0d]: Run-time error on tcl 8.6.11 32 bits (from cross-compile Centos6.9 64-bits). Since autoconf-2.59 has limited support for cross-compilation, a better fix has to wait for Tcl 8.7 (which uses autoconf-2.70) --- generic/tcl.h | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/generic/tcl.h b/generic/tcl.h index 85594c1..64dd8bae 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -366,6 +366,15 @@ typedef long LONG; # undef HAVE_STRUCT_STAT64 #endif /* __APPLE__ */ +/* Cross-compiling 32-bit on a 64-bit platform? Then our + * configure script does the wrong thing. Correct that here. + */ +#if defined(__GNUC__) && !defined(_WIN32) && !defined(__LP64__) +# undef TCL_WIDE_INT_IS_LONG +# undef TCL_WIDE_INT_TYPE +# define TCL_WIDE_INT_TYPE long long +#endif + /* * Define Tcl_WideInt to be a type that is (at least) 64-bits wide, and define * Tcl_WideUInt to be the unsigned variant of that type (assuming that where -- cgit v0.12