diff --git a/generic/tk.h b/generic/tk.h index 51dc7fbea..481714a6a 100644 --- a/generic/tk.h +++ b/generic/tk.h @@ -147,8 +147,10 @@ typedef struct Tk_StyledElement_ *Tk_StyledElement; typedef const char *Tk_Uid; -#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION == 6) -# define Tcl_Size int +#if (TCL_MAJOR_VERSION < 9) && (TCL_MINOR_VERSION < 7) +# ifndef Tcl_Size +# define Tcl_Size int +# endif # define TCL_SIZE_MAX INT_MAX # define TCL_SIZE_MODIFIER "" #endif diff --git a/win/rules.vc b/win/rules.vc index a8b45e16f..e39a007a1 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -1533,6 +1533,10 @@ INCLUDES = $(INCLUDES) -I"$(GENERICDIR)" -I"$(WIN_DIR)" -I"$(COMPATDIR)" # cflags contains generic flags used for building practically all object files cflags = -nologo -c $(COMPILERFLAGS) $(carch) $(cwarn) -Fp$(TMP_DIR)^\ $(cdebug) +!if $(TCL_MAJOR_VERSION) == 8 && $(TCL_MINOR_VERSION) < 7 +cflags = $(cflags) -DTcl_Size=int +!endif + # appcflags contains $(cflags) and flags for building the application # object files (e.g. tclsh, or wish) pkgcflags contains $(cflags) plus # flags used for building shared object files The two differ in the