From f7e8d74310d64ef59c9c8084cbfab3b3ee372dff Mon Sep 17 00:00:00 2001 From: dkf Date: Thu, 21 Feb 2002 16:49:38 +0000 Subject: Improving 'long long' detection... --- ChangeLog | 5 +++++ generic/tcl.h | 17 +++++++++++------ 2 files changed, 16 insertions(+), 6 deletions(-) diff --git a/ChangeLog b/ChangeLog index 8845e51..33e68f2 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2002-02-21 Donal K. Fellows + + * generic/tcl.h: Better guessing of LP64/ILP32 architecture, but + now sensitive to presence of (suitable) + 2002-02-20 Don Porter * generic/tcl.decls (Tcl_RegExpRange,Tcl_GetIndexFromObjStruct): diff --git a/generic/tcl.h b/generic/tcl.h index f9246e7..d44f49f 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -13,7 +13,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tcl.h,v 1.117 2002/02/20 18:46:29 dgp Exp $ + * RCS: @(#) $Id: tcl.h,v 1.118 2002/02/21 16:49:38 dkf Exp $ */ #ifndef _TCL @@ -383,11 +383,16 @@ typedef struct _stati64 Tcl_StatBuf; * Don't know what platform it is and configure hasn't discovered what * is going on for us. Try to guess... */ -# if (0x80000000L < 0) -# define TCL_WIDE_INT_IS_LONG 1 -# else -# define TCL_WIDE_INT_TYPE long long -# endif +# ifdef NO_LIMITS_H +# error please define either TCL_WIDE_INT_TYPE or TCL_WIDE_INT_IS_LONG +# else /* !NO_LIMITS_H */ +# include +# if (INT_MAX < LONG_MAX) +# define TCL_WIDE_INT_IS_LONG 1 +# else +# define TCL_WIDE_INT_TYPE long long +# endif +# endif /* NO_LIMITS_H */ # endif /* __WIN32__ */ #endif /* !TCL_WIDE_INT_TYPE & !TCL_WIDE_INT_IS_LONG */ #ifdef TCL_WIDE_INT_IS_LONG -- cgit v0.12