summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
authordkf <dkf@noemail.net>2002-09-24 14:23:58 (GMT)
committerdkf <dkf@noemail.net>2002-09-24 14:23:58 (GMT)
commit95e061fe474c9125ddea8570644662b7d3b466a9 (patch)
tree5d83129aba496ab9e76f3aa3eebb88c512c397d0 /unix
parent140420f55e139fc1e6fd688e44639f545991865a (diff)
downloadtcl-95e061fe474c9125ddea8570644662b7d3b466a9.zip
tcl-95e061fe474c9125ddea8570644662b7d3b466a9.tar.gz
tcl-95e061fe474c9125ddea8570644662b7d3b466a9.tar.bz2
* unix/tcl.m4 (SC_TCL_64BIT_FLAGS): Yet more robust 64-bit value
detection to close [Bug 613117] on more systems. FossilOrigin-Name: e46a5828536749c89372a251214311c7dd01d8d7
Diffstat (limited to 'unix')
-rw-r--r--unix/tcl.m413
1 files changed, 9 insertions, 4 deletions
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index c476bb3..63748e1 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -2383,11 +2383,16 @@ AC_DEFUN(SC_TCL_EARLY_FLAGS,[
AC_DEFUN(SC_TCL_64BIT_FLAGS, [
AC_MSG_CHECKING([for 64-bit integer type])
AC_CACHE_VAL(tcl_cv_type_64bit,[
+ tcl_cv_type_64bit=none
+ # See if the compiler knows natively about __int64
AC_TRY_COMPILE(,[__int64 value = (__int64) 0;],
- tcl_cv_type_64bit=__int64,tcl_cv_type_64bit=none
- AC_TRY_RUN([#include <unistd.h>
- int main() {exit(!(sizeof(long long) > sizeof(long)));}
- ], tcl_cv_type_64bit="long long"))])
+ tcl_type_64bit=__int64, tcl_type_64bit="long long")
+ # See if we should use long anyway Note that we substitute in the
+ # type that is our current guess for a 64-bit type inside this check
+ # program, so it should be modified only carefully...
+ AC_TRY_RUN([#include <unistd.h>
+ int main() {exit(!(sizeof(]${tcl_type_64bit}[) > sizeof(long)));}
+ ], tcl_cv_type_64bit=${tcl_type_64bit},:,:)])
if test "${tcl_cv_type_64bit}" = none ; then
AC_DEFINE(TCL_WIDE_INT_IS_LONG)
AC_MSG_RESULT(using long)