summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2021-06-25 14:03:55 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2021-06-25 14:03:55 (GMT)
commitce4804bf2c760215562c9ca1c5f76589611050cb (patch)
treef7eae2bd3b367bc716ce851d7e988a3b3b8e14dc /win
parent7951ebbd2e2809e4c48986c8bc50b39eb0b2b75a (diff)
parenta6691785d8bdaa339449e8df532a8b11a8690909 (diff)
downloadtcl-ce4804bf2c760215562c9ca1c5f76589611050cb.zip
tcl-ce4804bf2c760215562c9ca1c5f76589611050cb.tar.gz
tcl-ce4804bf2c760215562c9ca1c5f76589611050cb.tar.bz2
Merge 8.7
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in4
-rw-r--r--win/README9
-rwxr-xr-xwin/configure2
-rw-r--r--win/configure.ac2
-rw-r--r--win/makefile.vc36
-rw-r--r--win/nmakehlp.c44
-rw-r--r--win/rules.vc2
-rw-r--r--win/tcl.m42
-rw-r--r--win/tclWinFile.c2
9 files changed, 49 insertions, 54 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 8e1ef95..383b9c7 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -541,7 +541,7 @@ $(TCLSH): $(TCLSH_OBJS) @LIBRARIES@ $(TCL_STUB_LIB_FILE) tclsh.$(RES) ${TCL_ZIP_
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
$(COPY) tclsh.exe.manifest $(TCLSH).manifest
@VC_MANIFEST_EMBED_EXE@
- @if test "${ZIPFS_BUILD}" = "2" ; then \
+ if test "${ZIPFS_BUILD}" = "2" ; then \
cat ${TCL_ZIP_FILE} >> ${TCLSH}; \
${NATIVE_ZIP} -A ${TCLSH} \
|| echo 'ignore zip-error by adjust sfx process (not executable?)'; \
@@ -866,7 +866,7 @@ install-libraries: libraries install-tzdata install-msgs
$(COPY) "$$i" "$(SCRIPT_INSTALL_DIR)"; \
done;
@echo "Installing package cookiejar 0.2"
- @for j in $(ROOT_DIR)/library/cookiejar/*.{tcl,txt.gz}; \
+ @for j in $(ROOT_DIR)/library/cookiejar/*.{tcl,gz}; \
do \
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \
done;
diff --git a/win/README b/win/README
index 117db7e..df65d1d 100644
--- a/win/README
+++ b/win/README
@@ -9,7 +9,7 @@ that are specific to Microsoft Windows.
The information in this file is maintained on the web at:
- http://www.tcl.tk/doc/howto/compile.html#win
+ https://www.tcl-lang.org/doc/howto/compile.html#win
2. Compiling Tcl
----------------
@@ -29,7 +29,7 @@ In order to compile Tcl for Windows, you need the following:
or
- Cygwin + MinGW-w64 [http://cygwin.com/install.html]
+ Cygwin + MinGW-w64 [https://cygwin.com/install.html]
(win32 or win64)
or
@@ -42,11 +42,6 @@ In order to compile Tcl for Windows, you need the following:
Msys + MinGW-w64 [http://mingw-w64.sourceforge.net/]
(win32 or win64)
- or
-
- Msys + MinGW [http://www.mingw.org/download.shtml]
- (win32 only)
-
In practice, this release is built with Visual C++ 6.0 and the TEA
Makefile.
diff --git a/win/configure b/win/configure
index e484ff0..fead87c 100755
--- a/win/configure
+++ b/win/configure
@@ -2403,7 +2403,7 @@ SHELL=/bin/sh
TCL_VERSION=8.7
TCL_MAJOR_VERSION=8
TCL_MINOR_VERSION=7
-TCL_PATCH_LEVEL="a4"
+TCL_PATCH_LEVEL="a6"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
diff --git a/win/configure.ac b/win/configure.ac
index 87ffd8d..d378115 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -15,7 +15,7 @@ SHELL=/bin/sh
TCL_VERSION=8.7
TCL_MAJOR_VERSION=8
TCL_MINOR_VERSION=7
-TCL_PATCH_LEVEL="a4"
+TCL_PATCH_LEVEL="a6"
VER=$TCL_MAJOR_VERSION$TCL_MINOR_VERSION
TCL_DDE_VERSION=1.4
diff --git a/win/makefile.vc b/win/makefile.vc
index e38c6e8..f56feec 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -965,24 +965,6 @@ install-binaries:
@$(CPY) "$(TCLSTUBLIB)" "$(LIB_INSTALL_DIR)\"
install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
- @if not exist "$(SCRIPT_INSTALL_DIR)" \
- $(MKDIR) "$(SCRIPT_INSTALL_DIR)"
- @if not exist "$(SCRIPT_INSTALL_DIR)\opt0.4" \
- $(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4"
- @if not exist "$(SCRIPT_INSTALL_DIR)\cookiejar0.2" \
- $(MKDIR) "$(SCRIPT_INSTALL_DIR)\cookiejar0.2"
- @if not exist "$(MODULE_INSTALL_DIR)" \
- $(MKDIR) "$(MODULE_INSTALL_DIR)"
- @if not exist "$(MODULE_INSTALL_DIR)\8.4" \
- $(MKDIR) "$(MODULE_INSTALL_DIR)\8.4"
- @if not exist "$(MODULE_INSTALL_DIR)\8.4\platform" \
- $(MKDIR) "$(MODULE_INSTALL_DIR)\8.4\platform"
- @if not exist "$(MODULE_INSTALL_DIR)\8.5" \
- $(MKDIR) "$(MODULE_INSTALL_DIR)\8.5"
- @if not exist "$(MODULE_INSTALL_DIR)\8.6" \
- $(MKDIR) "$(MODULE_INSTALL_DIR)\8.6"
- @if not exist "$(MODULE_INSTALL_DIR)\8.7" \
- $(MKDIR) "$(MODULE_INSTALL_DIR)\8.7"
@if not exist "$(LIB_INSTALL_DIR)\nmake" \
$(MKDIR) "$(LIB_INSTALL_DIR)\nmake"
@echo Installing header files
@@ -996,6 +978,8 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
@$(CPY) "$(TOMMATHDIR)\tommath.h" "$(INCLUDE_INSTALL_DIR)\"
!if !$(TCL_EMBED_SCRIPTS)
@echo Installing library files to $(SCRIPT_INSTALL_DIR)
+ @if not exist "$(SCRIPT_INSTALL_DIR)" \
+ $(MKDIR) "$(SCRIPT_INSTALL_DIR)"
@$(CPY) "$(ROOT)\library\history.tcl" "$(SCRIPT_INSTALL_DIR)\"
@$(CPY) "$(ROOT)\library\init.tcl" "$(SCRIPT_INSTALL_DIR)\"
@$(CPY) "$(ROOT)\library\clock.tcl" "$(SCRIPT_INSTALL_DIR)\"
@@ -1016,23 +1000,39 @@ install-libraries: tclConfig tcl-nmake install-msgs install-tzdata
@$(CPY) "$(OUT_DIR)\tcl.nmake" "$(LIB_INSTALL_DIR)\nmake\"
!if !$(TCL_EMBED_SCRIPTS)
@echo Installing package cookiejar $(PKG_COOKIEJAR_VER)
+ @if not exist "$(SCRIPT_INSTALL_DIR)\cookiejar0.2" \
+ $(MKDIR) "$(SCRIPT_INSTALL_DIR)\cookiejar0.2"
@$(CPY) "$(ROOT)\library\cookiejar\*.tcl" \
"$(SCRIPT_INSTALL_DIR)\cookiejar0.2\"
@$(CPY) "$(ROOT)\library\cookiejar\*.gz" \
"$(SCRIPT_INSTALL_DIR)\cookiejar0.2\"
@echo Installing package opt $(PKG_OPT_VER)
+ @if not exist "$(SCRIPT_INSTALL_DIR)\opt0.4" \
+ $(MKDIR) "$(SCRIPT_INSTALL_DIR)\opt0.4"
@$(CPY) "$(ROOT)\library\opt\*.tcl" \
"$(SCRIPT_INSTALL_DIR)\opt0.4\"
+ @if not exist "$(MODULE_INSTALL_DIR)" \
+ $(MKDIR) "$(MODULE_INSTALL_DIR)"
@echo Installing package http $(PKG_HTTP_VER) as a Tcl Module
+ @if not exist "$(MODULE_INSTALL_DIR)\8.6" \
+ $(MKDIR) "$(MODULE_INSTALL_DIR)\8.6"
@$(COPY) "$(ROOT)\library\http\http.tcl" \
"$(MODULE_INSTALL_DIR)\8.6\http-$(PKG_HTTP_VER).tm"
@echo Installing package msgcat $(PKG_MSGCAT_VER) as a Tcl Module
+ @if not exist "$(MODULE_INSTALL_DIR)\8.7" \
+ $(MKDIR) "$(MODULE_INSTALL_DIR)\8.7"
@$(COPY) "$(ROOT)\library\msgcat\msgcat.tcl" \
"$(MODULE_INSTALL_DIR)\8.7\msgcat-$(PKG_MSGCAT_VER).tm"
@echo Installing package tcltest $(PKG_TCLTEST_VER) as a Tcl Module
+ @if not exist "$(MODULE_INSTALL_DIR)\8.5" \
+ $(MKDIR) "$(MODULE_INSTALL_DIR)\8.5"
@$(COPY) "$(ROOT)\library\tcltest\tcltest.tcl" \
"$(MODULE_INSTALL_DIR)\8.5\tcltest-$(PKG_TCLTEST_VER).tm"
@echo Installing package platform $(PKG_PLATFORM_VER) as a Tcl Module
+ @if not exist "$(MODULE_INSTALL_DIR)\8.4" \
+ $(MKDIR) "$(MODULE_INSTALL_DIR)\8.4"
+ @if not exist "$(MODULE_INSTALL_DIR)\8.4\platform" \
+ $(MKDIR) "$(MODULE_INSTALL_DIR)\8.4\platform"
@$(COPY) "$(ROOT)\library\platform\platform.tcl" \
"$(MODULE_INSTALL_DIR)\8.4\platform-$(PKG_PLATFORM_VER).tm"
@echo Installing package platform::shell $(PKG_SHELL_VER) as a Tcl Module
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index 972e8b9..71d727f 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -14,8 +14,10 @@
#define _CRT_SECURE_NO_DEPRECATE
#include <windows.h>
+#ifdef _MSC_VER
#pragma comment (lib, "user32.lib")
#pragma comment (lib, "kernel32.lib")
+#endif
#include <stdio.h>
#include <math.h>
@@ -28,7 +30,7 @@
/* protos */
static int CheckForCompilerFeature(const char *option);
-static int CheckForLinkerFeature(const char **options, int count);
+static int CheckForLinkerFeature(char **options, int count);
static int IsIn(const char *string, const char *substring);
static int SubstituteFile(const char *substs, const char *filename);
static int QualifyPath(const char *path);
@@ -45,8 +47,8 @@ typedef struct {
char buffer[STATICBUFFERSIZE];
} pipeinfo;
-pipeinfo Out = {INVALID_HANDLE_VALUE, '\0'};
-pipeinfo Err = {INVALID_HANDLE_VALUE, '\0'};
+pipeinfo Out = {INVALID_HANDLE_VALUE, ""};
+pipeinfo Err = {INVALID_HANDLE_VALUE, ""};
/*
* exitcodes: 0 == no, 1 == yes, 2 == error
@@ -264,7 +266,7 @@ CheckForCompilerFeature(
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
- FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
(300-chars), 0);
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
return 2;
@@ -317,7 +319,7 @@ CheckForCompilerFeature(
static int
CheckForLinkerFeature(
- const char **options,
+ char **options,
int count)
{
STARTUPINFO si;
@@ -398,7 +400,7 @@ CheckForLinkerFeature(
"Tried to launch: \"%s\", but got error [%u]: ", cmdline, err);
FormatMessage(FORMAT_MESSAGE_FROM_SYSTEM|FORMAT_MESSAGE_IGNORE_INSERTS|
- FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPVOID)&msg[chars],
+ FORMAT_MESSAGE_MAX_WIDTH_MASK, 0L, err, 0, (LPSTR)&msg[chars],
(300-chars), 0);
WriteFile(GetStdHandle(STD_ERROR_HANDLE), msg, lstrlen(msg), &err,NULL);
return 2;
@@ -494,7 +496,6 @@ GetVersionFromFile(
const char *match,
int numdots)
{
- size_t cbBuffer = 100;
static char szBuffer[100];
char *szResult = NULL;
FILE *fp = fopen(filename, "rt");
@@ -504,7 +505,7 @@ GetVersionFromFile(
* Read data until we see our match string.
*/
- while (fgets(szBuffer, cbBuffer, fp) != NULL) {
+ while (fgets(szBuffer, sizeof(szBuffer), fp) != NULL) {
LPSTR p, q;
p = strstr(szBuffer, match);
@@ -514,7 +515,7 @@ GetVersionFromFile(
*/
p += strlen(match);
- while (*p && !isdigit(*p)) {
+ while (*p && !isdigit((unsigned char)*p)) {
++p;
}
@@ -523,14 +524,13 @@ GetVersionFromFile(
*/
q = p;
- while (*q && (strchr("0123456789.ab", *q)) && ((!strchr(".ab", *q)
- && (!strchr("ab", q[-1])) || --numdots))) {
+ while (*q && (strchr("0123456789.ab", *q)) && (((!strchr(".ab", *q)
+ && !strchr("ab", q[-1])) || --numdots))) {
++q;
}
- memcpy(szBuffer, p, q - p);
- szBuffer[q-p] = 0;
- szResult = szBuffer;
+ *q = 0;
+ szResult = p;
break;
}
}
@@ -553,7 +553,7 @@ typedef struct list_item_t {
static list_item_t *
list_insert(list_item_t **listPtrPtr, const char *key, const char *value)
{
- list_item_t *itemPtr = malloc(sizeof(list_item_t));
+ list_item_t *itemPtr = (list_item_t *)malloc(sizeof(list_item_t));
if (itemPtr) {
itemPtr->key = strdup(key);
itemPtr->value = strdup(value);
@@ -602,9 +602,7 @@ SubstituteFile(
const char *substitutions,
const char *filename)
{
- size_t cbBuffer = 1024;
static char szBuffer[1024], szCopy[1024];
- char *szResult = NULL;
list_item_t *substPtr = NULL;
FILE *fp, *sp;
@@ -617,7 +615,7 @@ SubstituteFile(
sp = fopen(substitutions, "rt");
if (sp != NULL) {
- while (fgets(szBuffer, cbBuffer, sp) != NULL) {
+ while (fgets(szBuffer, sizeof(szBuffer), sp) != NULL) {
unsigned char *ks, *ke, *vs, *ve;
ks = (unsigned char*)szBuffer;
while (ks && *ks && isspace(*ks)) ++ks;
@@ -648,7 +646,7 @@ SubstituteFile(
* Run the substitutions over each line of the input
*/
- while (fgets(szBuffer, cbBuffer, fp) != NULL) {
+ while (fgets(szBuffer, sizeof(szBuffer), fp) != NULL) {
list_item_t *p = NULL;
for (p = substPtr; p != NULL; p = p->nextPtr) {
char *m = strstr(szBuffer, p->key);
@@ -665,7 +663,7 @@ SubstituteFile(
memcpy(szBuffer, szCopy, sizeof(szCopy));
}
}
- printf(szBuffer);
+ printf("%s", szBuffer);
}
list_free(&substPtr);
@@ -716,7 +714,8 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
{
HANDLE hSearch;
char path[MAX_PATH+1];
- int dirlen, keylen, ret;
+ size_t dirlen;
+ int keylen, ret;
WIN32_FIND_DATA finfo;
if (dir == NULL || keypath == NULL)
@@ -783,7 +782,8 @@ static int LocateDependencyHelper(const char *dir, const char *keypath)
*/
static int LocateDependency(const char *keypath)
{
- int i, ret;
+ size_t i;
+ int ret;
static const char *paths[] = {"..", "..\\..", "..\\..\\.."};
for (i = 0; i < (sizeof(paths)/sizeof(paths[0])); ++i) {
diff --git a/win/rules.vc b/win/rules.vc
index 71cf166..8a91b58 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -1123,7 +1123,7 @@ STUBPREFIX = $(PROJECT)stub
# TIP 430. Unused for 8.6 but no harm defining it to allow a common rules.vc
TCLSCRIPTZIPNAME = libtcl$(TCL_MAJOR_VERSION).$(TCL_MINOR_VERSION)$(TCL_PATCH_LETTER)$(TCL_RELEASE_SERIAL).zip
-TKSCRIPTZIPNAME = libtk$(TK_MAJOR_VERSION)$(TK_MINOR_VERSION)$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
+TKSCRIPTZIPNAME = libtk$(TK_MAJOR_VERSION).$(TK_MINOR_VERSION)$(TK_PATCH_LETTER)$(TK_RELEASE_SERIAL).zip
!if $(DOING_TCL)
TCLSHNAME = $(PROJECT)sh$(VERSION)$(SUFX).exe
diff --git a/win/tcl.m4 b/win/tcl.m4
index 3b3fc78..ee2256d 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -1067,7 +1067,7 @@ AC_DEFUN([SC_PROG_TCLSH], [
AC_DEFUN([SC_BUILD_TCLSH], [
AC_MSG_CHECKING([for tclsh in Tcl build directory])
- BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}
+ BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}\${EXESUFFIX}
AC_MSG_RESULT($BUILD_TCLSH)
AC_SUBST(BUILD_TCLSH)
])
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index f54349b..4a07f04 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -3140,7 +3140,7 @@ TclNativeCreateNativeRep(
* If there is no "\\?\" prefix but there is a drive or UNC path prefix
* and the path is larger than MAX_PATH chars, no Win32 API function can
* handle that unless it is prefixed with the extended path prefix. See:
- * <http://msdn.microsoft.com/en-us/library/aa365247(VS.85).aspx#maxpath>
+ * <https://docs.microsoft.com/en-us/windows/win32/fileio/naming-a-file#maxpath>
*/
if (((str[0] >= 'A' && str[0] <= 'Z') || (str[0] >= 'a' && str[0] <= 'z'))