diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-09-24 14:23:58 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-09-24 14:23:58 (GMT) |
commit | 4070e7b83c2d9c4b201402f4ec0faac88039f000 (patch) | |
tree | 5d83129aba496ab9e76f3aa3eebb88c512c397d0 /unix/tcl.m4 | |
parent | eecec49335f0d2337be70d531e45388e516a3553 (diff) | |
download | tcl-4070e7b83c2d9c4b201402f4ec0faac88039f000.zip tcl-4070e7b83c2d9c4b201402f4ec0faac88039f000.tar.gz tcl-4070e7b83c2d9c4b201402f4ec0faac88039f000.tar.bz2 |
* unix/tcl.m4 (SC_TCL_64BIT_FLAGS): Yet more robust 64-bit value
detection to close [Bug 613117] on more systems.
Diffstat (limited to 'unix/tcl.m4')
-rw-r--r-- | unix/tcl.m4 | 13 |
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) |