summaryrefslogtreecommitdiffstats
path: root/generic/tcl.h
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tcl.h')
-rw-r--r--generic/tcl.h4
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 */