summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-01-20 08:52:10 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-01-20 08:52:10 (GMT)
commit2e5746d60c48acffe82b3838e5ce5b56203ea0c2 (patch)
tree99e6c6ebd9a9011df41fc49171675234db6758bf /generic/tcl.h
parent850c978dcc26d83f71e3df857a75250b458e313e (diff)
downloadtcl-2e5746d60c48acffe82b3838e5ce5b56203ea0c2.zip
tcl-2e5746d60c48acffe82b3838e5ce5b56203ea0c2.tar.gz
tcl-2e5746d60c48acffe82b3838e5ce5b56203ea0c2.tar.bz2
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)
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h9
1 files changed, 9 insertions, 0 deletions
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