diff options
author | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-08-27 16:46:10 (GMT) |
---|---|---|
committer | jan.nijtmans <nijtmans@users.sourceforge.net> | 2023-08-27 16:46:10 (GMT) |
commit | 810a85363a2dab5841ddf1137656ac29a1fc940e (patch) | |
tree | 51440ea75f371003b2498b8f7724ca5fd94b2268 /generic/tcl.h | |
parent | 4fc5e6946cda507e391013d7f34cf510e07012f2 (diff) | |
download | tcl-810a85363a2dab5841ddf1137656ac29a1fc940e.zip tcl-810a85363a2dab5841ddf1137656ac29a1fc940e.tar.gz tcl-810a85363a2dab5841ddf1137656ac29a1fc940e.tar.bz2 |
Fix [64165953a0]: Compilation error of C extensions due to TCL_SIZE_MAX definition
Diffstat (limited to 'generic/tcl.h')
-rw-r--r-- | generic/tcl.h | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/generic/tcl.h b/generic/tcl.h index d0636ce..cdcd909 100644 --- a/generic/tcl.h +++ b/generic/tcl.h @@ -417,11 +417,11 @@ typedef unsigned TCL_WIDE_INT_TYPE Tcl_WideUInt; #if TCL_MAJOR_VERSION < 9 typedef int Tcl_Size; -# define TCL_SIZE_MAX INT_MAX +# define TCL_SIZE_MAX ((int)(((unsigned int)-1)>>1)) # define TCL_SIZE_MODIFIER "" #else typedef ptrdiff_t Tcl_Size; -# define TCL_SIZE_MAX PTRDIFF_MAX +# define TCL_SIZE_MAX ((ptrdiff_t)(((size_t)-1)>>1)) # define TCL_SIZE_MODIFIER TCL_T_MODIFIER #endif /* TCL_MAJOR_VERSION */ |