summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-25 10:01:36 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2022-06-25 10:01:36 (GMT)
commit4ddfabceb1dd92219b221373226f24345bd86759 (patch)
treedccec125103eba842f379dfcfa174b8349ce64b9 /win
parent1b7e7f9d63511b6a708a4b20a4f4f66b242eca97 (diff)
downloadtk-4ddfabceb1dd92219b221373226f24345bd86759.zip
tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.gz
tk-4ddfabceb1dd92219b221373226f24345bd86759.tar.bz2
TIP #628 for Tk: Shared 8.7/9.0 build environment
Diffstat (limited to 'win')
-rwxr-xr-xwin/configure12
-rw-r--r--win/configure.ac12
-rw-r--r--win/rules.vc20
-rw-r--r--win/tkWinCursor.c2
-rw-r--r--win/tkWinDialog.c2
-rw-r--r--win/tkWinFont.c14
-rw-r--r--win/tkWinInit.c2
-rw-r--r--win/tkWinMenu.c6
-rw-r--r--win/tkWinWm.c14
-rw-r--r--win/ttkWinXPTheme.c6
10 files changed, 61 insertions, 29 deletions
diff --git a/win/configure b/win/configure
index 1cdc6f4..bb26d7a 100755
--- a/win/configure
+++ b/win/configure
@@ -5871,7 +5871,11 @@ else
fi
fi
-eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
+if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ;
+else
+ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ;
+fi
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
# I left out the other vars that also need to get defined here.
# we also need to double check about spaces in path names
@@ -5883,7 +5887,11 @@ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\""
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
eval "TK_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_LIB_FLAG}\""
-eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\""
+if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ eval "TK_STUB_LIB_FLAG=\"-ltkstub${LIBFLAGSUFFIX}\""
+else
+ eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\""
+fi
eval "TK_BUILD_STUB_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_STUB_LIB_FLAG}\""
TK_STUB_LIB_SPEC="-L${libdir} ${TK_STUB_LIB_FLAG}"
diff --git a/win/configure.ac b/win/configure.ac
index c843ebc..ae5a1e3 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -259,7 +259,11 @@ else
fi
fi
-eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
+if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${LIBSUFFIX}" ;
+else
+ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}" ;
+fi
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
# I left out the other vars that also need to get defined here.
# we also need to double check about spaces in path names
@@ -271,7 +275,11 @@ eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\""
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
eval "TK_BUILD_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_LIB_FLAG}\""
-eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\""
+if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ eval "TK_STUB_LIB_FLAG=\"-ltkstub${LIBFLAGSUFFIX}\""
+else
+ eval "TK_STUB_LIB_FLAG=\"-ltkstub${VER}${LIBFLAGSUFFIX}\""
+fi
eval "TK_BUILD_STUB_LIB_SPEC=\"-L`$CYGPATH $(pwd)` ${TK_STUB_LIB_FLAG}\""
TK_STUB_LIB_SPEC="-L${libdir} ${TK_STUB_LIB_FLAG}"
diff --git a/win/rules.vc b/win/rules.vc
index 47c0742..4280b9b 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -693,7 +693,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg
!if [echo REM = This file is generated from rules.vc > versions.vc]
!endif
!if [echo TCL_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V "$(_TCL_H)" TCL_MAJOR_VERSION >> versions.vc]
+ && [nmakehlp -V "$(_TCL_H)" "define TCL_MAJOR_VERSION" >> versions.vc]
!endif
!if [echo TCL_MINOR_VERSION = \>> versions.vc] \
&& [nmakehlp -V "$(_TCL_H)" TCL_MINOR_VERSION >> versions.vc]
@@ -1146,7 +1146,11 @@ TCLLIBNAME = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
TCLLIB = $(OUT_DIR)\$(TCLLIBNAME)
TCLSCRIPTZIP = $(OUT_DIR)\$(TCLSCRIPTZIPNAME)
+!if $(TCL_MAJOR_VERSION) == 8
TCLSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
+!else
+TCLSTUBLIBNAME = $(STUBPREFIX).lib
+!endif
TCLSTUBLIB = $(OUT_DIR)\$(TCLSTUBLIBNAME)
TCL_INCLUDES = -I"$(WIN_DIR)" -I"$(GENERICDIR)"
@@ -1162,7 +1166,11 @@ TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)$(SUFX:t=).exe
TCLSH = $(_TCLDIR)\bin\tclsh$(TCL_VERSION)t$(SUFX:t=).exe
!endif
+!if $(TCL_MAJOR_VERSION) == 8
TCLSTUBLIB = $(_TCLDIR)\lib\tclstub$(TCL_VERSION).lib
+!else
+TCLSTUBLIB = $(_TCLDIR)\lib\tclstub.lib
+!endif
TCLIMPLIB = $(_TCLDIR)\lib\tcl$(TCL_VERSION)$(SUFX:t=).lib
# When building extensions, may be linking against Tcl that does not add
# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
@@ -1182,7 +1190,11 @@ TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)$(SUFX:t=).exe
!if !exist($(TCLSH))
TCLSH = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclsh$(TCL_VERSION)t$(SUFX:t=).exe
!endif
+!if $(TCL_MAJOR_VERSION) == 8
TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub$(TCL_VERSION).lib
+!else
+TCLSTUBLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tclstub.lib
+!endif
TCLIMPLIB = $(_TCLDIR)\win\$(BUILDDIRTOP)\tcl$(TCL_VERSION)$(SUFX:t=).lib
# When building extensions, may be linking against Tcl that does not add
# "t" suffix (e.g. 8.5 or 8.7). If lib not found check for that possibility.
@@ -1282,7 +1294,11 @@ PRJLIBNAME = $(PRJLIBNAME9)
!endif
PRJLIB = $(OUT_DIR)\$(PRJLIBNAME)
+!if $(TCL_MAJOR_VERSION) == 8
PRJSTUBLIBNAME = $(STUBPREFIX)$(VERSION).lib
+!else
+PRJSTUBLIBNAME = $(STUBPREFIX).lib
+!endif
PRJSTUBLIB = $(OUT_DIR)\$(PRJSTUBLIBNAME)
# If extension parent makefile has not defined a resource definition file,
@@ -1418,7 +1434,7 @@ OPTDEFINES = $(OPTDEFINES) /DTCL_CFG_DO64BIT
OPTDEFINES = $(OPTDEFINES) /DNO_STRTOI64=1
!endif
-!if "$(TCL_MAJOR_VERSION)" == "8"
+!if $(TCL_MAJOR_VERSION) == 8
!if "$(_USE_64BIT_TIME_T)" == "1"
OPTDEFINES = $(OPTDEFINES) /D_USE_64BIT_TIME_T=1
!endif
diff --git a/win/tkWinCursor.c b/win/tkWinCursor.c
index d79ab5f..cd4d46d 100644
--- a/win/tkWinCursor.c
+++ b/win/tkWinCursor.c
@@ -98,7 +98,7 @@ TkGetCursorByName(
{
const struct CursorName *namePtr;
TkWinCursor *cursorPtr;
- TkSizeT argc;
+ Tcl_Size argc;
const char **argv = NULL;
(void)tkwin;
diff --git a/win/tkWinDialog.c b/win/tkWinDialog.c
index 0bfc7f1..2e1b9d3 100644
--- a/win/tkWinDialog.c
+++ b/win/tkWinDialog.c
@@ -2056,7 +2056,7 @@ MakeFilter(
*p = '\0';
} else {
- TkSizeT len;
+ Tcl_Size len;
if (valuePtr == NULL) {
len = 0;
diff --git a/win/tkWinFont.c b/win/tkWinFont.c
index ddee969..3812c3a 100644
--- a/win/tkWinFont.c
+++ b/win/tkWinFont.c
@@ -790,7 +790,7 @@ Tk_MeasureChars(
Tk_Font tkfont, /* Font in which characters will be drawn. */
const char *source, /* UTF-8 string to be displayed. Need not be
* '\0' terminated. */
- int numBytes, /* Maximum number of bytes to consider from
+ Tcl_Size numBytes, /* Maximum number of bytes to consider from
* source string. */
int maxLength, /* If >= 0, maxLength specifies the longest
* permissible line length in pixels; don't
@@ -1018,8 +1018,8 @@ TkpMeasureCharsInContext(
* '\0' terminated. */
TCL_UNUSED(int), /* Maximum number of bytes to consider from
* source string in all. */
- int rangeStart, /* Index of first byte to measure. */
- int rangeLength, /* Length of range to measure in bytes. */
+ Tcl_Size rangeStart, /* Index of first byte to measure. */
+ Tcl_Size rangeLength, /* Length of range to measure in bytes. */
int maxLength, /* If >= 0, maxLength specifies the longest
* permissible line length; don't consider any
* character that would cross this x-position.
@@ -1072,7 +1072,7 @@ Tk_DrawChars(
* is passed to this function. If they are not
* stripped out, they will be displayed as
* regular printing characters. */
- int numBytes, /* Number of bytes in string. */
+ Tcl_Size numBytes, /* Number of bytes in string. */
int x, int y) /* Coordinates at which to place origin of
* string when drawing. */
{
@@ -1416,9 +1416,9 @@ TkpDrawAngledCharsInContext(
* passed to this function. If they are not
* stripped out, they will be displayed as
* regular printing characters. */
- int numBytes, /* Number of bytes in string. */
- int rangeStart, /* Index of first byte to draw. */
- int rangeLength, /* Length of range to draw in bytes. */
+ Tcl_Size numBytes, /* Number of bytes in string. */
+ Tcl_Size rangeStart, /* Index of first byte to draw. */
+ Tcl_Size rangeLength, /* Length of range to draw in bytes. */
double x, double y, /* Coordinates at which to place origin of the
* whole (not just the range) string when
* drawing. */
diff --git a/win/tkWinInit.c b/win/tkWinInit.c
index f171fa2..cb77c62 100644
--- a/win/tkWinInit.c
+++ b/win/tkWinInit.c
@@ -70,7 +70,7 @@ TkpGetAppName(
Tcl_Interp *interp,
Tcl_DString *namePtr) /* A previously initialized Tcl_DString. */
{
- TkSizeT argc, namelength;
+ Tcl_Size argc, namelength;
const char **argv = NULL, *name, *p;
name = Tcl_GetVar2(interp, "argv0", NULL, TCL_GLOBAL_ONLY);
diff --git a/win/tkWinMenu.c b/win/tkWinMenu.c
index 5c31ca0..bee43b7 100644
--- a/win/tkWinMenu.c
+++ b/win/tkWinMenu.c
@@ -1258,7 +1258,7 @@ TkWinHandleMenuEvent(
hashEntryPtr = Tcl_FindHashEntry(&tsdPtr->winMenuTable,
*plParam);
if (hashEntryPtr != NULL) {
- TkSizeT i, len;
+ Tcl_Size i, len;
int underline;
Tcl_Obj *labelPtr;
WCHAR *wlabel;
@@ -1286,7 +1286,7 @@ TkWinHandleMenuEvent(
Tcl_DStringFree(&ds);
Tcl_DStringInit(&ds);
wlabel = Tcl_UtfToWCharDString(src, len, &ds);
- if (((TkSizeT)underline + 1 < len + 1) && (menuChar ==
+ if (((Tcl_Size)underline + 1 < len + 1) && (menuChar ==
Tcl_UniCharToUpper(wlabel[underline]))) {
*plResult = (2 << 16) | i;
returnResult = 1;
@@ -1474,7 +1474,7 @@ void
RecursivelyClearActiveMenu(
TkMenu *menuPtr) /* The menu to reset. */
{
- TkSizeT i;
+ Tcl_Size i;
TkMenuEntry *mePtr;
TkActivateMenuEntry(menuPtr, -1);
diff --git a/win/tkWinWm.c b/win/tkWinWm.c
index e568f0c..d647688 100644
--- a/win/tkWinWm.c
+++ b/win/tkWinWm.c
@@ -2685,7 +2685,7 @@ Tk_WmObjCmd(
WMOPT_WITHDRAW
};
int index;
- TkSizeT length;
+ Tcl_Size length;
const char *argv1;
TkWindow *winPtr, **winPtrPtr = &winPtr;
TkDisplay *dispPtr = ((TkWindow *) tkwin)->dispPtr;
@@ -2915,7 +2915,7 @@ WmAttributesCmd(
LONG style, exStyle, styleBit, *stylePtr = NULL;
const char *string;
int i, boolean;
- TkSizeT length;
+ Tcl_Size length;
int config_fullscreen = 0, updatewrapper = 0;
int fullscreen_attr_changed = 0, fullscreen_attr = 0;
@@ -3212,7 +3212,7 @@ WmClientCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- TkSizeT length;
+ Tcl_Size length;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?name?");
@@ -3813,7 +3813,7 @@ WmGroupCmd(
WmInfo *wmPtr = winPtr->wmInfoPtr;
Tk_Window tkwin2;
const char *argv3;
- TkSizeT length;
+ Tcl_Size length;
if ((objc != 3) && (objc != 4)) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?pathName?");
@@ -4246,7 +4246,7 @@ WmIconnameCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- TkSizeT length;
+ Tcl_Size length;
if (objc > 4) {
Tcl_WrongNumArgs(interp, 2, objv, "window ?newName?");
@@ -4874,7 +4874,7 @@ WmProtocolCmd(
ProtocolHandler *protPtr, *prevPtr;
Atom protocol;
const char *cmd;
- TkSizeT cmdLength;
+ Tcl_Size cmdLength;
Tcl_Obj *resultObj;
if ((objc < 3) || (objc > 5)) {
@@ -5367,7 +5367,7 @@ WmTitleCmd(
{
WmInfo *wmPtr = winPtr->wmInfoPtr;
const char *argv3;
- TkSizeT length;
+ Tcl_Size length;
HWND wrapper;
if (objc > 4) {
diff --git a/win/ttkWinXPTheme.c b/win/ttkWinXPTheme.c
index 6917192..5d3e1ce 100644
--- a/win/ttkWinXPTheme.c
+++ b/win/ttkWinXPTheme.c
@@ -832,7 +832,7 @@ static void TextElementSize(
RECT rc = {0, 0};
HRESULT hr = S_OK;
const char *src;
- TkSizeT len;
+ Tcl_Size len;
Tcl_DString ds;
if (!InitElementData(elementData, tkwin, 0))
@@ -871,7 +871,7 @@ static void TextElementDraw(
RECT rc = BoxToRect(b);
HRESULT hr = S_OK;
const char *src;
- TkSizeT len;
+ Tcl_Size len;
Tcl_DString ds;
if (!InitElementData(elementData, tkwin, d))
@@ -1120,7 +1120,7 @@ Ttk_CreateVsapiElement(
Ttk_StateTable *stateTable;
Ttk_Padding pad = {0, 0, 0, 0};
int flags = 0;
- TkSizeT length = 0;
+ Tcl_Size length = 0;
char *name;
LPWSTR wname;
const Ttk_ElementSpec *elementSpec = &GenericElementSpec;