diff options
author | dkf <donal.k.fellows@manchester.ac.uk> | 2002-02-21 16:49:38 (GMT) |
---|---|---|
committer | dkf <donal.k.fellows@manchester.ac.uk> | 2002-02-21 16:49:38 (GMT) |
commit | f7e8d74310d64ef59c9c8084cbfab3b3ee372dff (patch) | |
tree | f5a4ab692cae8bcab8c37e334cd7faa3b01b2b25 | |
parent | 1b68a794fbf3b691a32ee555081d3e61c5ea2ad0 (diff) | |
download | tcl-f7e8d74310d64ef59c9c8084cbfab3b3ee372dff.zip tcl-f7e8d74310d64ef59c9c8084cbfab3b3ee372dff.tar.gz tcl-f7e8d74310d64ef59c9c8084cbfab3b3ee372dff.tar.bz2 |
Improving 'long long' detection...
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | generic/tcl.h | 17 |
2 files changed, 16 insertions, 6 deletions
@@ -1,3 +1,8 @@ +2002-02-21 Donal K. Fellows <fellowsd@cs.man.ac.uk> + + * generic/tcl.h: Better guessing of LP64/ILP32 architecture, but + now sensitive to presence of (suitable) <limits.h> + 2002-02-20 Don Porter <dgp@users.sourceforge.net> * 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 <limit.h> +# 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 |