diff options
| author | kjnash <k.j.nash@usa.net> | 2022-10-26 12:35:18 (GMT) |
|---|---|---|
| committer | kjnash <k.j.nash@usa.net> | 2022-10-26 12:35:18 (GMT) |
| commit | 1e0a98c9aa064a2472cb7a62b51b86252528782b (patch) | |
| tree | e8abd26b5fc9a3e83614c3d3a01290eb551939f4 /win | |
| parent | 2ecf92f50b4fad000f8cf4b368ce47c6035bdf4c (diff) | |
| parent | 42b1c587058185cf982966c733806b5d6dd8625d (diff) | |
| download | tcl-1e0a98c9aa064a2472cb7a62b51b86252528782b.zip tcl-1e0a98c9aa064a2472cb7a62b51b86252528782b.tar.gz tcl-1e0a98c9aa064a2472cb7a62b51b86252528782b.tar.bz2 | |
Merge 8.7
Diffstat (limited to 'win')
| -rw-r--r-- | win/Makefile.in | 4 | ||||
| -rw-r--r-- | win/rules.vc | 36 | ||||
| -rw-r--r-- | win/tclWinChan.c | 4 | ||||
| -rw-r--r-- | win/tclWinConsole.c | 2 | ||||
| -rw-r--r-- | win/tclWinPipe.c | 2 | ||||
| -rw-r--r-- | win/tclWinPort.h | 3 | ||||
| -rw-r--r-- | win/tclWinSerial.c | 2 | ||||
| -rw-r--r-- | win/tclWinSock.c | 14 | ||||
| -rw-r--r-- | win/tclWinTime.c | 14 |
9 files changed, 55 insertions, 26 deletions
diff --git a/win/Makefile.in b/win/Makefile.in index 7b9440e..7bfe028 100644 --- a/win/Makefile.in +++ b/win/Makefile.in @@ -889,8 +889,8 @@ install-libraries: libraries install-tzdata install-msgs @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl "$(MODULE_INSTALL_DIR)/8.7/msgcat-1.7.1.tm"; @echo "Installing package tcltest 2.5.5 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.5.tm"; - @echo "Installing package platform 1.0.18 as a Tcl Module"; - @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.18.tm"; + @echo "Installing package platform 1.0.19 as a Tcl Module"; + @$(COPY) $(ROOT_DIR)/library/platform/platform.tcl "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.19.tm"; @echo "Installing package platform::shell 1.1.4 as a Tcl Module"; @$(COPY) $(ROOT_DIR)/library/platform/shell.tcl "$(MODULE_INSTALL_DIR)/8.4/platform/shell-1.1.4.tm"; @echo "Installing encodings"; diff --git a/win/rules.vc b/win/rules.vc index fdc68e0..0dd6ef2 100644 --- a/win/rules.vc +++ b/win/rules.vc @@ -24,7 +24,7 @@ _RULES_VC = 1 # For modifications that are not backward-compatible, you *must* change
# the major version.
RULES_VERSION_MAJOR = 1
-RULES_VERSION_MINOR = 10
+RULES_VERSION_MINOR = 11
# The PROJECT macro must be defined by parent makefile.
!if "$(PROJECT)" == ""
@@ -707,7 +707,7 @@ LINKERFLAGS = $(LINKERFLAGS) -ltcg !if defined(_TK_H)
!if [echo TK_MAJOR_VERSION = \>> versions.vc] \
- && [nmakehlp -V $(_TK_H) TK_MAJOR_VERSION >> versions.vc]
+ && [nmakehlp -V $(_TK_H) "define TK_MAJOR_VERSION" >> versions.vc]
!endif
!if [echo TK_MINOR_VERSION = \>> versions.vc] \
&& [nmakehlp -V $(_TK_H) TK_MINOR_VERSION >> versions.vc]
@@ -877,6 +877,11 @@ TCL_THREADS = 0 USE_THREAD_ALLOC= 0
!endif
+!if [nmakehlp -f $(OPTS) "tcl8"]
+!message *** Build for Tcl8
+TCL_BUILD_FOR = 8
+!endif
+
!if $(TCL_MAJOR_VERSION) == 8
!if [nmakehlp -f $(OPTS) "time64bit"]
!message *** Force 64-bit time_t
@@ -1146,7 +1151,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 +1171,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 +1195,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.
@@ -1198,7 +1215,11 @@ TCL_INCLUDES = -I"$(_TCLDIR)\generic" -I"$(_TCLDIR)\win" !endif # TCLINSTALL
+!if !$(STATIC_BUILD) && "$(TCL_BUILD_FOR)" == "8"
+tcllibs = "$(TCLSTUBLIB)"
+!else
tcllibs = "$(TCLSTUBLIB)" "$(TCLIMPLIB)"
+!endif
!endif # $(DOING_TCL)
@@ -1218,7 +1239,7 @@ WISHNAMEPREFIX = wish WISHNAME = $(WISHNAMEPREFIX)$(TK_VERSION)$(SUFX).exe
TKLIBNAME8 = tk$(TK_VERSION)$(SUFX).$(EXT)
TKLIBNAME9 = tcl9tk$(TK_VERSION)$(SUFX).$(EXT)
-!if $(TCL_MAJOR_VERSION) == 8
+!if $(TCL_MAJOR_VERSION) == 8 || "$(TCL_BUILD_FOR)" == "8"
TKLIBNAME = tk$(TK_VERSION)$(SUFX).$(EXT)
TKIMPLIBNAME = tk$(TK_VERSION)$(SUFX).lib
!else
@@ -1275,14 +1296,18 @@ tklibs = "$(TKSTUBLIB)" "$(TKIMPLIB)" PRJIMPLIB = $(OUT_DIR)\$(PROJECT)$(VERSION)$(SUFX).lib
PRJLIBNAME8 = $(PROJECT)$(VERSION)$(SUFX).$(EXT)
PRJLIBNAME9 = tcl9$(PROJECT)$(VERSION)$(SUFX).$(EXT)
-!if $(TCL_MAJOR_VERSION) == 8
+!if $(TCL_MAJOR_VERSION) == 8 || "$(TCL_BUILD_FOR)" == "8"
PRJLIBNAME = $(PRJLIBNAME8)
!else
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,
@@ -1429,6 +1454,9 @@ COMPILERFLAGS = /D_ATL_XP_TARGETING !if "$(TCL_UTF_MAX)" == "3"
OPTDEFINES = $(OPTDEFINES) /DTCL_UTF_MAX=3
!endif
+!if "$(TCL_BUILD_FOR)" == "8"
+OPTDEFINES = $(OPTDEFINES) /DTCL_MAJOR_VERSION=8
+!endif
# Like the TEA system only set this non empty for non-Tk extensions
# Note: some extensions use PACKAGE_NAME and others use PACKAGE_TCLNAME
diff --git a/win/tclWinChan.c b/win/tclWinChan.c index 62991fc..166636c 100644 --- a/win/tclWinChan.c +++ b/win/tclWinChan.c @@ -1325,7 +1325,7 @@ TclpGetDefaultStdChannel( */ if (Tcl_SetChannelOption(NULL,channel,"-translation","auto")!=TCL_OK || - Tcl_SetChannelOption(NULL,channel,"-eofchar","\032 {}")!=TCL_OK || + Tcl_SetChannelOption(NULL,channel,"-eofchar","\x1A {}")!=TCL_OK || Tcl_SetChannelOption(NULL,channel,"-buffering",bufMode)!=TCL_OK) { Tcl_Close(NULL, channel); return (Tcl_Channel) NULL; @@ -1402,7 +1402,7 @@ TclWinOpenFileChannel( */ Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto"); - Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\032 {}"); + Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\x1A {}"); return infoPtr->channel; } diff --git a/win/tclWinConsole.c b/win/tclWinConsole.c index 753a572..6688ab1 100644 --- a/win/tclWinConsole.c +++ b/win/tclWinConsole.c @@ -2199,7 +2199,7 @@ TclWinOpenConsoleChannel( */ Tcl_SetChannelOption(NULL, chanInfoPtr->channel, "-translation", "auto"); - Tcl_SetChannelOption(NULL, chanInfoPtr->channel, "-eofchar", "\032 {}"); + Tcl_SetChannelOption(NULL, chanInfoPtr->channel, "-eofchar", "\x1A {}"); Tcl_SetChannelOption(NULL, chanInfoPtr->channel, "-encoding", "utf-16"); return chanInfoPtr->channel; } diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c index 4a39e8c..4a84038 100644 --- a/win/tclWinPipe.c +++ b/win/tclWinPipe.c @@ -1833,7 +1833,7 @@ TclpCreateCommandChannel( */ Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto"); - Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\032 {}"); + Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\x1A {}"); return infoPtr->channel; } diff --git a/win/tclWinPort.h b/win/tclWinPort.h index b61e481..d7d60a4 100644 --- a/win/tclWinPort.h +++ b/win/tclWinPort.h @@ -461,6 +461,9 @@ typedef DWORD_PTR * PDWORD_PTR; # pragma warning(disable:4090) /* see: https://developercommunity.visualstudio.com/t/c-compiler-incorrect-propagation-of-const-qualifie/390711 */ # pragma warning(disable:4146) # pragma warning(disable:4244) +#if !defined(_WIN64) +# pragma warning(disable:4305) +#endif # pragma warning(disable:4267) # pragma warning(disable:4996) #endif diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c index f087d70..449a8d7 100644 --- a/win/tclWinSerial.c +++ b/win/tclWinSerial.c @@ -1514,7 +1514,7 @@ TclWinOpenSerialChannel( */ Tcl_SetChannelOption(NULL, infoPtr->channel, "-translation", "auto"); - Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\032 {}"); + Tcl_SetChannelOption(NULL, infoPtr->channel, "-eofchar", "\x1A {}"); return infoPtr->channel; } diff --git a/win/tclWinSock.c b/win/tclWinSock.c index 56d2ba4..3980006 100644 --- a/win/tclWinSock.c +++ b/win/tclWinSock.c @@ -1199,15 +1199,14 @@ TcpSetOptionProc( if ((len > 1) && (optionName[1] == 'k') && (strncmp(optionName, "-keepalive", len) == 0)) { - BOOL val; - int boolVar, rtn; + BOOL boolVar; + int rtn; if (Tcl_GetBoolean(interp, value, &boolVar) != TCL_OK) { return TCL_ERROR; } - val = boolVar ? TRUE : FALSE; rtn = setsockopt(sock, SOL_SOCKET, SO_KEEPALIVE, - (const char *) &val, sizeof(BOOL)); + (const char *) &boolVar, sizeof(boolVar)); if (rtn != 0) { Tcl_WinConvertError(WSAGetLastError()); if (interp) { @@ -1221,15 +1220,14 @@ TcpSetOptionProc( } if ((len > 1) && (optionName[1] == 'n') && (strncmp(optionName, "-nodelay", len) == 0)) { - BOOL val; - int boolVar, rtn; + BOOL boolVar; + int rtn; if (Tcl_GetBoolean(interp, value, &boolVar) != TCL_OK) { return TCL_ERROR; } - val = boolVar ? TRUE : FALSE; rtn = setsockopt(sock, IPPROTO_TCP, TCP_NODELAY, - (const char *) &val, sizeof(BOOL)); + (const char *) &boolVar, sizeof(boolVar)); if (rtn != 0) { Tcl_WinConvertError(WSAGetLastError()); if (interp) { diff --git a/win/tclWinTime.c b/win/tclWinTime.c index a7e8474..e8401a5 100644 --- a/win/tclWinTime.c +++ b/win/tclWinTime.c @@ -791,14 +791,14 @@ TclpGetDate( { struct tm *tmPtr; time_t time; -#if defined(_WIN64) || (defined(_USE_64BIT_TIME_T) || (defined(_MSC_VER) && _MSC_VER < 1400)) +#if defined(_WIN64) || defined(_USE_64BIT_TIME_T) # define t2 *t /* no need to cripple time to 32-bit */ #else time_t t2 = *(__time32_t *) t; #endif if (!useGMT) { -#if defined(_MSC_VER) && (_MSC_VER >= 1900) +#if defined(_MSC_VER) # undef timezone /* prevent conflict with timezone() function */ long timezone = 0; #endif @@ -815,7 +815,7 @@ TclpGetDate( return TclpLocaltime(&t2); } -#if defined(_MSC_VER) && (_MSC_VER >= 1900) +#if defined(_MSC_VER) _get_timezone(&timezone); #endif @@ -1451,11 +1451,11 @@ TclpGmtime( * Posix gmtime_r function. */ -#if defined(_WIN64) || defined(_USE_64BIT_TIME_T) || (defined(_MSC_VER) && _MSC_VER < 1400) +#if defined(_WIN64) || defined(_USE_64BIT_TIME_T) return gmtime(timePtr); #else return _gmtime32((const __time32_t *) timePtr); -#endif /* _WIN64 || _USE_64BIT_TIME_T || _MSC_VER < 1400 */ +#endif /* _WIN64 || _USE_64BIT_TIME_T */ } /* @@ -1486,11 +1486,11 @@ TclpLocaltime( * provide a Posix localtime_r function. */ -#if defined(_WIN64) || defined(_USE_64BIT_TIME_T) || (defined(_MSC_VER) && _MSC_VER < 1400) +#if defined(_WIN64) || defined(_USE_64BIT_TIME_T) return localtime(timePtr); #else return _localtime32((const __time32_t *) timePtr); -#endif /* _WIN64 || _USE_64BIT_TIME_T || _MSC_VER < 1400 */ +#endif /* _WIN64 || _USE_64BIT_TIME_T */ } #endif /* TCL_NO_DEPRECATED */ |
