summaryrefslogtreecommitdiffstats
path: root/win
diff options
context:
space:
mode:
authorjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-14 06:08:50 (GMT)
committerjan.nijtmans <nijtmans@users.sourceforge.net>2020-10-14 06:08:50 (GMT)
commitcfc633e793bcf3f8419aac8b7084c13b2f8dbaa4 (patch)
tree58b484a653058cac3bd24fba45dcc1578ac093c5 /win
parenta09671a0a00f2d3e4abf4747a072da94b0320459 (diff)
parentf70e1f98b3e5235a48e0fbea21515ed7e277e6cd (diff)
downloadtcl-cfc633e793bcf3f8419aac8b7084c13b2f8dbaa4.zip
tcl-cfc633e793bcf3f8419aac8b7084c13b2f8dbaa4.tar.gz
tcl-cfc633e793bcf3f8419aac8b7084c13b2f8dbaa4.tar.bz2
Merge 8.7
Diffstat (limited to 'win')
-rw-r--r--win/Makefile.in14
-rwxr-xr-xwin/configure52
-rw-r--r--win/configure.ac27
-rw-r--r--win/makefile.vc1
-rw-r--r--win/nmakehlp.c2
-rw-r--r--win/rules.vc18
-rw-r--r--win/tcl.dsp2
-rw-r--r--win/tcl.m436
-rw-r--r--win/tclAppInit.c4
-rw-r--r--win/tclConfig.sh.in7
-rw-r--r--win/tclWinFCmd.c4
-rw-r--r--win/tclWinFile.c4
-rw-r--r--win/tclWinInit.c2
-rw-r--r--win/tclWinNotify.c4
-rw-r--r--win/tclWinPipe.c2
-rw-r--r--win/tclWinPort.h13
-rw-r--r--win/tclWinSerial.c14
-rw-r--r--win/tclWinThrd.c56
18 files changed, 101 insertions, 161 deletions
diff --git a/win/Makefile.in b/win/Makefile.in
index 5024a82..f1b72e1 100644
--- a/win/Makefile.in
+++ b/win/Makefile.in
@@ -70,9 +70,6 @@ MAN3_INSTALL_DIR = $(MAN_INSTALL_DIR)/man3
# Directory in which to install manual entries for the built-in Tcl commands:
MANN_INSTALL_DIR = $(MAN_INSTALL_DIR)/mann
-# Libraries built with optimization switches have this additional extension
-TCL_DBGX = @TCL_DBGX@
-
# warning flags
CFLAGS_WARNING = @CFLAGS_WARNING@
@@ -257,7 +254,7 @@ ZIP_INSTALL_OBJS = @ZIP_INSTALL_OBJS@
CC_SWITCHES = -I"${GENERIC_DIR_NATIVE}" -I"${TOMMATH_DIR_NATIVE}" \
-I"${ZLIB_DIR_NATIVE}" -I"${WIN_DIR_NATIVE}" \
-${CFLAGS} ${CFLAGS_WARNING} ${TCL_SHLIB_CFLAGS} -DMP_PREC=4 \
+${CFLAGS} ${CFLAGS_WARNING} ${SHLIB_CFLAGS} -DMP_PREC=4 \
${AC_FLAGS} ${COMPILE_DEBUG_FLAGS} ${NO_DEPRECATED_FLAGS}
CC_OBJNAME = @CC_OBJNAME@
@@ -599,6 +596,7 @@ ${TEST_DLL_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS}
${TEST_EXE_FILE}: ${TCL_STUB_LIB_FILE} ${TCLTEST_OBJS} tclTestMain.${OBJEXT}
@$(RM) ${TEST_EXE_FILE}
+ @$(RM) $(ROOT_DIR_NATIVE)/tests/safe-stock86.test
$(CC) $(CFLAGS) $(TCLTEST_OBJS) tclTestMain.$(OBJEXT) $(TCL_LIB_FILE) $(TCL_STUB_LIB_FILE) $(LIBS) \
tclsh.$(RES) $(CC_EXENAME) $(LDFLAGS_CONSOLE)
$(COPY) tclsh.exe.manifest ${TEST_EXE_FILE}.manifest
@@ -878,15 +876,15 @@ install-libraries: libraries install-tzdata install-msgs
do \
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \
done;
- @echo "Installing package http 2.9.1 as a Tcl Module";
- @$(COPY) $(ROOT_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.9.1.tm";
+ @echo "Installing package http 2.10.0a1 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/http/http.tcl "$(MODULE_INSTALL_DIR)/8.6/http-2.10.0a1.tm";
@echo "Installing package opt 0.4.7";
@for j in $(ROOT_DIR)/library/opt/*.tcl; \
do \
$(COPY) "$$j" "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
done;
- @echo "Installing package msgcat 1.7.0 as a Tcl Module";
- @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl "$(MODULE_INSTALL_DIR)/8.7/msgcat-1.7.0.tm";
+ @echo "Installing package msgcat 1.7.1 as a Tcl Module";
+ @$(COPY) $(ROOT_DIR)/library/msgcat/msgcat.tcl "$(MODULE_INSTALL_DIR)/8.7/msgcat-1.7.1.tm";
@echo "Installing package tcltest 2.5.3 as a Tcl Module";
@$(COPY) $(ROOT_DIR)/library/tcltest/tcltest.tcl "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.3.tm";
@echo "Installing package platform 1.0.14 as a Tcl Module";
diff --git a/win/configure b/win/configure
index e9ba659..d824244 100755
--- a/win/configure
+++ b/win/configure
@@ -669,7 +669,6 @@ EXTRA_CFLAGS
CFG_TCL_EXPORT_FILE_SUFFIX
CFG_TCL_UNSHARED_LIB_SUFFIX
CFG_TCL_SHARED_LIB_SUFFIX
-TCL_DBGX
TCL_BIN_DIR
TCL_SRC_DIR
TCL_DLL_FILE
@@ -4182,7 +4181,7 @@ $as_echo_n "checking compiler flags... " >&6; }
$as_echo "using static flags" >&6; }
runtime=
LIBRARIES="\${STATIC_LIBRARIES}"
- EXESUFFIX="s\${DBGX}.exe"
+ EXESUFFIX="s.exe"
else
# dynamic
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5
@@ -4197,7 +4196,7 @@ $as_echo "using shared flags" >&6; }
runtime=
# Add SHLIB_LD_LIBS to the Make rule, not here.
- EXESUFFIX="\${DBGX}.exe"
+ EXESUFFIX=".exe"
LIBRARIES="\${SHARED_LIBRARIES}"
fi
# Link with gcc since ld does not link to default libs like
@@ -4208,16 +4207,16 @@ $as_echo "using shared flags" >&6; }
-Wl,--out-implib,\$(patsubst %.dll,lib%.a,\$@)"
# DLLSUFFIX is separate because it is the building block for
# users of tclConfig.sh that may build shared or static.
- DLLSUFFIX="\${DBGX}.dll"
- LIBSUFFIX="\${DBGX}.a"
- LIBFLAGSUFFIX="\${DBGX}"
+ DLLSUFFIX=".dll"
+ LIBSUFFIX=".a"
+ LIBFLAGSUFFIX=""
SHLIB_SUFFIX=.dll
EXTRA_CFLAGS="${extra_cflags}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wwrite-strings -Wpointer-arith"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -4300,7 +4299,7 @@ $as_echo " Using 64-bit $MACHINE mode" >&6; }
$as_echo "using static flags" >&6; }
runtime=-MT
LIBRARIES="\${STATIC_LIBRARIES}"
- EXESUFFIX="s\${DBGX}.exe"
+ EXESUFFIX="s.exe"
else
# dynamic
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: using shared flags" >&5
@@ -4308,7 +4307,7 @@ $as_echo "using shared flags" >&6; }
runtime=-MD
# Add SHLIB_LD_LIBS to the Make rule, not here.
LIBRARIES="\${SHARED_LIBRARIES}"
- EXESUFFIX="\${DBGX}.exe"
+ EXESUFFIX=".exe"
case "x`echo \${VisualStudioVersion}`" in
x1[4-9]*)
lflags="${lflags} -nodefaultlib:libucrt.lib"
@@ -4320,9 +4319,9 @@ $as_echo "using shared flags" >&6; }
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\$@"
# DLLSUFFIX is separate because it is the building block for
# users of tclConfig.sh that may build shared or static.
- DLLSUFFIX="\${DBGX}.dll"
- LIBSUFFIX="\${DBGX}.lib"
- LIBFLAGSUFFIX="\${DBGX}"
+ DLLSUFFIX=".dll"
+ LIBSUFFIX=".lib"
+ LIBFLAGSUFFIX=""
if test "$do64bit" != "no" ; then
case "$do64bit" in
@@ -5176,7 +5175,6 @@ fi
if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
- DBGX=""
$as_echo "#define NDEBUG 1" >>confdefs.h
@@ -5188,7 +5186,6 @@ $as_echo "no" >&6; }
else
CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=g
if test "$tcl_ok" = "yes"; then
{ $as_echo "$as_me:${as_lineno-$LINENO}: result: yes (standard debugging)" >&5
$as_echo "yes (standard debugging)" >&6; }
@@ -5223,8 +5220,6 @@ $as_echo "enabled $tcl_ok debugging" >&6; }
fi
-TCL_DBGX=${DBGX}
-
#--------------------------------------------------------------------
# Embed the manifest if we can determine how
#--------------------------------------------------------------------
@@ -5290,10 +5285,6 @@ TCL_SHARED_BUILD=${SHARED_BUILD}
# Perform final evaluations of variables with possible substitutions.
#--------------------------------------------------------------------
-TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
-TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
-TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
-
eval "TCL_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\""
eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
@@ -5312,11 +5303,9 @@ eval "TCL_LIB_SPEC=\"-L${libdir} -ltcl${VER}${FLAGSUFFIX}\""
# Install time header dir can be set via --includedir
eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
-
-eval "DLLSUFFIX=${DLLSUFFIX}"
-eval "LIBPREFIX=${LIBPREFIX}"
-eval "LIBSUFFIX=${LIBSUFFIX}"
-eval "EXESUFFIX=${EXESUFFIX}"
+TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
+TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
+TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}
CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}
@@ -5328,17 +5317,9 @@ CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}
#--------------------------------------------------------------------
if test ${SHARED_BUILD} = 0 ; then
- if test "${DBGX}" = "g"; then
- RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG"
- else
- RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
- fi
+ RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
else
- if test "${DBGX}" = "g"; then
- RC_DEFINES="${RC_DEFINE} DEBUG"
- else
- RC_DEFINES=""
- fi
+ RC_DEFINES=""
fi
#--------------------------------------------------------------------
@@ -5397,7 +5378,6 @@ TCL_WIN_VERSION="$TCL_VERSION.$TCL_RELEASE_LEVEL.`echo $TCL_PATCH_LEVEL | tr -d
-
# win/tcl.m4 doesn't set (CFLAGS)
diff --git a/win/configure.ac b/win/configure.ac
index 08f420a..3381822 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -332,8 +332,6 @@ fi
SC_ENABLE_SYMBOLS
-TCL_DBGX=${DBGX}
-
#--------------------------------------------------------------------
# Embed the manifest if we can determine how
#--------------------------------------------------------------------
@@ -350,10 +348,6 @@ TCL_SHARED_BUILD=${SHARED_BUILD}
# Perform final evaluations of variables with possible substitutions.
#--------------------------------------------------------------------
-TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
-TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
-TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
-
eval "TCL_SRC_DIR=\"`cd $srcdir/..; $CYGPATH $(pwd)`\""
eval "TCL_DLL_FILE=tcl${VER}${DLLSUFFIX}"
@@ -372,11 +366,9 @@ eval "TCL_LIB_SPEC=\"-L${libdir} -ltcl${VER}${FLAGSUFFIX}\""
# Install time header dir can be set via --includedir
eval "TCL_INCLUDE_SPEC=\"-I${includedir}\""
-
-eval "DLLSUFFIX=${DLLSUFFIX}"
-eval "LIBPREFIX=${LIBPREFIX}"
-eval "LIBSUFFIX=${LIBSUFFIX}"
-eval "EXESUFFIX=${EXESUFFIX}"
+TCL_SHARED_LIB_SUFFIX="\${NODOT_VERSION}${DLLSUFFIX}"
+TCL_UNSHARED_LIB_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
+TCL_EXPORT_FILE_SUFFIX="\${NODOT_VERSION}${LIBSUFFIX}"
CFG_TCL_SHARED_LIB_SUFFIX=${TCL_SHARED_LIB_SUFFIX}
CFG_TCL_UNSHARED_LIB_SUFFIX=${TCL_UNSHARED_LIB_SUFFIX}
@@ -388,17 +380,9 @@ CFG_TCL_EXPORT_FILE_SUFFIX=${TCL_EXPORT_FILE_SUFFIX}
#--------------------------------------------------------------------
if test ${SHARED_BUILD} = 0 ; then
- if test "${DBGX}" = "g"; then
- RC_DEFINES="${RC_DEFINE} STATIC_BUILD ${RC_DEFINE} DEBUG"
- else
- RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
- fi
+ RC_DEFINES="${RC_DEFINE} STATIC_BUILD"
else
- if test "${DBGX}" = "g"; then
- RC_DEFINES="${RC_DEFINE} DEBUG"
- else
- RC_DEFINES=""
- fi
+ RC_DEFINES=""
fi
#--------------------------------------------------------------------
@@ -453,7 +437,6 @@ AC_SUBST(TCL_DLL_FILE)
AC_SUBST(TCL_SRC_DIR)
AC_SUBST(TCL_BIN_DIR)
-AC_SUBST(TCL_DBGX)
AC_SUBST(CFG_TCL_SHARED_LIB_SUFFIX)
AC_SUBST(CFG_TCL_UNSHARED_LIB_SUFFIX)
AC_SUBST(CFG_TCL_EXPORT_FILE_SUFFIX)
diff --git a/win/makefile.vc b/win/makefile.vc
index c6b53d0..e3de98e 100644
--- a/win/makefile.vc
+++ b/win/makefile.vc
@@ -688,7 +688,6 @@ $(OUT_DIR)\tclConfig.sh: $(WIN_DIR)\tclConfig.sh.in
@CFLAGS_OPTIMIZE@ -nologo -c -W3 -YX -Fp$(TMP_DIR)\ -MD
@LDFLAGS_DEBUG@ -nologo -machine:$(MACHINE) -debug -debugtype:cv
@LDFLAGS_OPTIMIZE@ -nologo -machine:$(MACHINE) -release -opt:ref -opt:icf,3
-@TCL_DBGX@ $(SUFX)
@TCL_LIB_FILE@ $(PROJECT)$(VERSION)$(SUFX).lib
@TCL_NEEDS_EXP_FILE@
@LIBS@ $(baselibs) $(PRJ_LIBS)
diff --git a/win/nmakehlp.c b/win/nmakehlp.c
index fac32ee..7536ede 100644
--- a/win/nmakehlp.c
+++ b/win/nmakehlp.c
@@ -708,7 +708,7 @@ QualifyPath(
{
char szCwd[MAX_PATH + 1];
- GetFullPathName(szPath, sizeof(szCwd)-1, szCwd, NULL);
+ GetFullPathName(szPath, sizeof(szCwd)-1, szCwd, NULL);
printf("%s\n", szCwd);
return 0;
}
diff --git a/win/rules.vc b/win/rules.vc
index 490f9c3..61df910 100644
--- a/win/rules.vc
+++ b/win/rules.vc
@@ -514,7 +514,7 @@ CFG_ENCODING = \"cp1252\"
# information about supported compiler options etc.
#
# Tcl itself will always use the nmakehlp.c program which is
-# in its own source. This is the "master" copy and kept updated.
+# in its own source. It will be kept updated there.
#
# Extensions built against an installed Tcl will use the installed
# copy of Tcl's nmakehlp.c if there is one and their own version
@@ -730,11 +730,8 @@ MSVCRT = 0
!else
!if [nmakehlp -f $(OPTS) "msvcrt"]
!message *** Doing msvcrt
-MSVCRT = 1
-!else
-!if !$(STATIC_BUILD)
-MSVCRT = 1
!else
+!if $(STATIC_BUILD)
MSVCRT = 0
!endif
!endif
@@ -743,17 +740,12 @@ MSVCRT = 0
!if [nmakehlp -f $(OPTS) "staticpkg"] && $(STATIC_BUILD)
!message *** Doing staticpkg
TCL_USE_STATIC_PACKAGES = 1
-!else
-TCL_USE_STATIC_PACKAGES = 0
!endif
!if [nmakehlp -f $(OPTS) "nothreads"]
!message *** Compile explicitly for non-threaded tcl
TCL_THREADS = 0
USE_THREAD_ALLOC= 0
-!else
-TCL_THREADS = 1
-USE_THREAD_ALLOC= 1
!endif
!if "$(TCL_MAJOR_VERSION)" == "8"
@@ -1051,7 +1043,7 @@ BUILDDIRTOP =$(BUILDDIRTOP)_$(MACHINE)
BUILDDIRTOP =$(BUILDDIRTOP)_VC$(VCVER)
!endif
-!if !$(DEBUG) || $(DEBUG) && $(UNCHECKED)
+!if !$(DEBUG) || $(TCL_VERSION) > 86 || $(DEBUG) && $(UNCHECKED)
SUFX = $(SUFX:g=)
!endif
@@ -1677,7 +1669,7 @@ default-shell: default-setup $(PROJECT)
!ifdef RCFILE
# Note: don't use $** in below rule because there may be other dependencies
-# and only the "master" rc must be passed to the resource compiler
+# and only the "main" rc must be passed to the resource compiler
$(TMP_DIR)\$(PROJECT).res: $(RCDIR)\$(PROJECT).rc
$(RESCMD) $(RCDIR)\$(PROJECT).rc
@@ -1731,7 +1723,7 @@ DISABLE_IMPLICIT_RULES = 0
!if !$(DISABLE_IMPLICIT_RULES)
# Implicit rule definitions - only for building library objects. For stubs and
-# main application, the master makefile should define explicit rules.
+# main application, the makefile should define explicit rules.
{$(ROOT)}.c{$(TMP_DIR)}.obj::
$(CCPKGCMD) @<<
diff --git a/win/tcl.dsp b/win/tcl.dsp
index 065d598..7ab2a38 100644
--- a/win/tcl.dsp
+++ b/win/tcl.dsp
@@ -348,7 +348,7 @@ SOURCE=..\doc\CrtObjCmd.3
# End Source File
# Begin Source File
-SOURCE=..\doc\CrtSlave.3
+SOURCE=..\doc\CrtAlias.3
# End Source File
# Begin Source File
diff --git a/win/tcl.m4 b/win/tcl.m4
index ca04f84..a8aab6b 100644
--- a/win/tcl.m4
+++ b/win/tcl.m4
@@ -280,15 +280,6 @@ AC_DEFUN([SC_LOAD_TCLCONFIG], [
TCL_STUB_LIB_PATH=${TCL_BUILD_STUB_LIB_PATH}
fi
- #
- # eval is required to do the TCL_DBGX substitution
- #
-
- eval "TCL_ZIP_FILE=\"${TCL_ZIP_FILE}\""
- eval "TCL_LIB_FILE=\"${TCL_LIB_FILE}\""
- eval "TCL_LIB_FLAG=\"${TCL_LIB_FLAG}\""
- eval "TCL_LIB_SPEC=\"${TCL_LIB_SPEC}\""
-
eval "TCL_STUB_LIB_FILE=\"${TCL_STUB_LIB_FILE}\""
eval "TCL_STUB_LIB_FLAG=\"${TCL_STUB_LIB_FLAG}\""
eval "TCL_STUB_LIB_SPEC=\"${TCL_STUB_LIB_SPEC}\""
@@ -410,7 +401,6 @@ AC_DEFUN([SC_ENABLE_SHARED], [
# Sets to $(CFLAGS_OPTIMIZE) if false
# LDFLAGS_DEFAULT Sets to $(LDFLAGS_DEBUG) if true
# Sets to $(LDFLAGS_OPTIMIZE) if false
-# DBGX Debug library extension
#
#------------------------------------------------------------------------
@@ -421,7 +411,6 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
if test "$tcl_ok" = "no"; then
CFLAGS_DEFAULT='$(CFLAGS_OPTIMIZE)'
LDFLAGS_DEFAULT='$(LDFLAGS_OPTIMIZE)'
- DBGX=""
AC_DEFINE(NDEBUG, 1, [Is no debugging enabled?])
AC_MSG_RESULT([no])
@@ -429,7 +418,6 @@ AC_DEFUN([SC_ENABLE_SYMBOLS], [
else
CFLAGS_DEFAULT='$(CFLAGS_DEBUG)'
LDFLAGS_DEFAULT='$(LDFLAGS_DEBUG)'
- DBGX=g
if test "$tcl_ok" = "yes"; then
AC_MSG_RESULT([yes (standard debugging)])
fi
@@ -651,7 +639,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_MSG_RESULT([using static flags])
runtime=
LIBRARIES="\${STATIC_LIBRARIES}"
- EXESUFFIX="s\${DBGX}.exe"
+ EXESUFFIX="s.exe"
else
# dynamic
AC_MSG_RESULT([using shared flags])
@@ -665,7 +653,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
runtime=
# Add SHLIB_LD_LIBS to the Make rule, not here.
- EXESUFFIX="\${DBGX}.exe"
+ EXESUFFIX=".exe"
LIBRARIES="\${SHARED_LIBRARIES}"
fi
# Link with gcc since ld does not link to default libs like
@@ -676,16 +664,16 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
-Wl,--out-implib,\$(patsubst %.dll,lib%.a,\[$]@)"
# DLLSUFFIX is separate because it is the building block for
# users of tclConfig.sh that may build shared or static.
- DLLSUFFIX="\${DBGX}.dll"
- LIBSUFFIX="\${DBGX}.a"
- LIBFLAGSUFFIX="\${DBGX}"
+ DLLSUFFIX=".dll"
+ LIBSUFFIX=".a"
+ LIBFLAGSUFFIX=""
SHLIB_SUFFIX=.dll
EXTRA_CFLAGS="${extra_cflags}"
CFLAGS_DEBUG=-g
CFLAGS_OPTIMIZE="-O2 -fomit-frame-pointer"
- CFLAGS_WARNING="-Wall -Wextra -Wwrite-strings -Wpointer-arith"
+ CFLAGS_WARNING="-Wall -Wextra -Wshadow -Wundef -Wwrite-strings -Wpointer-arith"
LDFLAGS_DEBUG=
LDFLAGS_OPTIMIZE=
@@ -750,14 +738,14 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
AC_MSG_RESULT([using static flags])
runtime=-MT
LIBRARIES="\${STATIC_LIBRARIES}"
- EXESUFFIX="s\${DBGX}.exe"
+ EXESUFFIX="s.exe"
else
# dynamic
AC_MSG_RESULT([using shared flags])
runtime=-MD
# Add SHLIB_LD_LIBS to the Make rule, not here.
LIBRARIES="\${SHARED_LIBRARIES}"
- EXESUFFIX="\${DBGX}.exe"
+ EXESUFFIX=".exe"
case "x`echo \${VisualStudioVersion}`" in
x1[[4-9]]*)
lflags="${lflags} -nodefaultlib:libucrt.lib"
@@ -769,9 +757,9 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
MAKE_DLL="\${SHLIB_LD} \$(LDFLAGS) -out:\[$]@"
# DLLSUFFIX is separate because it is the building block for
# users of tclConfig.sh that may build shared or static.
- DLLSUFFIX="\${DBGX}.dll"
- LIBSUFFIX="\${DBGX}.lib"
- LIBFLAGSUFFIX="\${DBGX}"
+ DLLSUFFIX=".dll"
+ LIBSUFFIX=".lib"
+ LIBFLAGSUFFIX=""
if test "$do64bit" != "no" ; then
case "$do64bit" in
@@ -1069,7 +1057,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}${TCL_DBGX}${EXEEXT}
+ BUILD_TCLSH=${TCL_BIN_DIR}/tclsh${TCL_MAJOR_VERSION}${TCL_MINOR_VERSION}${EXEEXT}
AC_MSG_RESULT($BUILD_TCLSH)
AC_SUBST(BUILD_TCLSH)
])
diff --git a/win/tclAppInit.c b/win/tclAppInit.c
index 59c21e5..de5f788 100644
--- a/win/tclAppInit.c
+++ b/win/tclAppInit.c
@@ -29,7 +29,7 @@ extern Tcl_PackageInitProc Tcltest_Init;
extern Tcl_PackageInitProc Tcltest_SafeInit;
#endif /* TCL_TEST */
-#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES
+#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES
extern Tcl_PackageInitProc Registry_Init;
extern Tcl_PackageInitProc Dde_Init;
extern Tcl_PackageInitProc Dde_SafeInit;
@@ -164,7 +164,7 @@ Tcl_AppInit(
return TCL_ERROR;
}
-#if defined(STATIC_BUILD) && TCL_USE_STATIC_PACKAGES
+#if defined(STATIC_BUILD) && defined(TCL_USE_STATIC_PACKAGES) && TCL_USE_STATIC_PACKAGES
if (Registry_Init(interp) == TCL_ERROR) {
return TCL_ERROR;
}
diff --git a/win/tclConfig.sh.in b/win/tclConfig.sh.in
index 5dc6833..776dcb0 100644
--- a/win/tclConfig.sh.in
+++ b/win/tclConfig.sh.in
@@ -23,9 +23,10 @@ TCL_CC='@CC@'
# -D flags for use with the C compiler.
TCL_DEFS='@DEFS@'
-# If TCL was built with debugging symbols, generated libraries contain
-# this string at the end of the library name (before the extension).
-TCL_DBGX=@TCL_DBGX@
+# TCL_DBGX used to be used to distinguish debug vs. non-debug builds.
+# This was a righteous pain so the core doesn't do that any more.
+# DEPRECATED, will be removed in Tcl 9!
+TCL_DBGX=''
# Default flags used in an optimized and debuggable build, respectively.
TCL_CFLAGS_DEBUG='@CFLAGS_DEBUG@'
diff --git a/win/tclWinFCmd.c b/win/tclWinFCmd.c
index 6750d29..ad4bae1 100644
--- a/win/tclWinFCmd.c
+++ b/win/tclWinFCmd.c
@@ -1560,7 +1560,7 @@ GetWinFileAttributes(
}
}
- *attributePtrPtr = Tcl_NewWideIntObj(attr != 0);
+ TclNewIntObj(*attributePtrPtr, attr != 0);
return TCL_OK;
}
@@ -1926,7 +1926,7 @@ TclpObjListVolumes(void)
int i;
char *p;
- resultPtr = Tcl_NewObj();
+ TclNewObj(resultPtr);
/*
* On Win32s:
diff --git a/win/tclWinFile.c b/win/tclWinFile.c
index d2777d7..89f485a 100644
--- a/win/tclWinFile.c
+++ b/win/tclWinFile.c
@@ -1094,7 +1094,6 @@ TclpMatchInDirectory(
do {
const char *utfname;
int checkDrive = 0, isDrive;
- DWORD attr;
native = data.cFileName;
attr = data.dwFileAttributes;
@@ -1445,7 +1444,6 @@ TclpGetUserHome(
int rc = 0;
const char *domain;
WCHAR *wName, *wHomeDir, *wDomain;
- WCHAR buf[MAX_PATH];
Tcl_DStringInit(bufferPtr);
@@ -1511,6 +1509,7 @@ TclpGetUserHome(
size = lstrlenW(wHomeDir);
Tcl_WCharToUtfDString(wHomeDir, size, bufferPtr);
} else {
+ WCHAR buf[MAX_PATH];
/*
* User exists but has no home dir. Return
* "{GetProfilesDirectory}/<user>".
@@ -2818,7 +2817,6 @@ TclpObjNormalizePath(
*/
int len;
- char *path;
Tcl_Obj *tmpPathPtr;
tmpPathPtr = Tcl_NewStringObj(Tcl_DStringValue(&ds),
diff --git a/win/tclWinInit.c b/win/tclWinInit.c
index 420e324..5c3901b 100644
--- a/win/tclWinInit.c
+++ b/win/tclWinInit.c
@@ -189,7 +189,7 @@ TclpInitLibraryPath(
const char *bytes;
int length;
- pathPtr = Tcl_NewObj();
+ TclNewObj(pathPtr);
/*
* Initialize the substring used when locating the script library. The
diff --git a/win/tclWinNotify.c b/win/tclWinNotify.c
index 2ab4efa..7d5249d 100644
--- a/win/tclWinNotify.c
+++ b/win/tclWinNotify.c
@@ -84,12 +84,12 @@ Tcl_InitNotifier(void)
} else {
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- TclpMasterLock();
+ TclpGlobalLock();
if (!initialized) {
initialized = 1;
InitializeCriticalSection(&notifierMutex);
}
- TclpMasterUnlock();
+ TclpGlobalUnlock();
/*
* Register Notifier window class if this is the first thread to use
diff --git a/win/tclWinPipe.c b/win/tclWinPipe.c
index 14270f8..a93688d 100644
--- a/win/tclWinPipe.c
+++ b/win/tclWinPipe.c
@@ -2771,7 +2771,7 @@ Tcl_PidObjCmd(
}
pipePtr = (PipeInfo *) Tcl_GetChannelInstanceData(chan);
- resultPtr = Tcl_NewObj();
+ TclNewObj(resultPtr);
for (i = 0; i < pipePtr->numPids; i++) {
Tcl_ListObjAppendElement(/*interp*/ NULL, resultPtr,
Tcl_NewWideIntObj((unsigned)
diff --git a/win/tclWinPort.h b/win/tclWinPort.h
index edbdbdd..94c8e87 100644
--- a/win/tclWinPort.h
+++ b/win/tclWinPort.h
@@ -14,7 +14,6 @@
#ifndef _TCLWINPORT
#define _TCLWINPORT
-
#if !defined(_WIN64) && !defined(__MINGW_USE_VC2005_COMPAT)
/* See [Bug 3354324]: file mtime sets wrong time */
# define __MINGW_USE_VC2005_COMPAT
@@ -27,7 +26,7 @@
/*
* We must specify the lower version we intend to support.
*
- * WINVER = 0x0500 means Windows 2000 and above
+ * WINVER = 0x0501 means Windows XP and above
*/
#ifndef WINVER
@@ -50,7 +49,9 @@ typedef DWORD_PTR * PDWORD_PTR;
/*
* Ask for the winsock function typedefs, also.
*/
-#define INCL_WINSOCK_API_TYPEDEFS 1
+#ifndef INCL_WINSOCK_API_TYPEDEFS
+# define INCL_WINSOCK_API_TYPEDEFS 1
+#endif
#include <winsock2.h>
#include <ws2tcpip.h>
#ifdef HAVE_WSPIAPI_H
@@ -296,7 +297,7 @@ typedef DWORD_PTR * PDWORD_PTR;
* defined in header files above.
*/
-#if TCL_UNION_WAIT
+#ifdef TCL_UNION_WAIT
# define WAIT_STATUS_TYPE union wait
#else
# define WAIT_STATUS_TYPE int
@@ -438,10 +439,10 @@ typedef DWORD_PTR * PDWORD_PTR;
* Define pid_t and uid_t if they're not already defined.
*/
-#if ! TCL_PID_T
+#if !defined(TCL_PID_T)
# define pid_t int
#endif /* !TCL_PID_T */
-#if ! TCL_UID_T
+#if !defined(TCL_UID_T)
# define uid_t int
#endif /* !TCL_UID_T */
diff --git a/win/tclWinSerial.c b/win/tclWinSerial.c
index 328fbad..f0035b9 100644
--- a/win/tclWinSerial.c
+++ b/win/tclWinSerial.c
@@ -1826,7 +1826,7 @@ SerialSetOptionProc(
*/
if ((len > 4) && (strncmp(optionName, "-ttycontrol", len) == 0)) {
- int i, result = TCL_OK;
+ int i, res = TCL_OK;
if (Tcl_SplitList(interp, value, &argc, &argv) == TCL_ERROR) {
return TCL_ERROR;
@@ -1844,7 +1844,7 @@ SerialSetOptionProc(
for (i = 0; i < argc - 1; i += 2) {
if (Tcl_GetBoolean(interp, argv[i+1], &flag) == TCL_ERROR) {
- result = TCL_ERROR;
+ res = TCL_ERROR;
break;
}
if (strncasecmp(argv[i], "DTR", strlen(argv[i])) == 0) {
@@ -1856,7 +1856,7 @@ SerialSetOptionProc(
Tcl_SetErrorCode(interp, "TCL", "OPERATION",
"FCONFIGURE", "TTY_SIGNAL", NULL);
}
- result = TCL_ERROR;
+ res = TCL_ERROR;
break;
}
} else if (strncasecmp(argv[i], "RTS", strlen(argv[i])) == 0) {
@@ -1868,7 +1868,7 @@ SerialSetOptionProc(
Tcl_SetErrorCode(interp, "TCL", "OPERATION",
"FCONFIGURE", "TTY_SIGNAL", NULL);
}
- result = TCL_ERROR;
+ res = TCL_ERROR;
break;
}
} else if (strncasecmp(argv[i], "BREAK", strlen(argv[i])) == 0) {
@@ -1880,7 +1880,7 @@ SerialSetOptionProc(
Tcl_SetErrorCode(interp, "TCL", "OPERATION",
"FCONFIGURE", "TTY_SIGNAL", NULL);
}
- result = TCL_ERROR;
+ res = TCL_ERROR;
break;
}
} else {
@@ -1891,13 +1891,13 @@ SerialSetOptionProc(
Tcl_SetErrorCode(interp, "TCL", "VALUE", "TTY_SIGNAL",
NULL);
}
- result = TCL_ERROR;
+ res = TCL_ERROR;
break;
}
}
ckfree(argv);
- return result;
+ return res;
}
/*
diff --git a/win/tclWinThrd.c b/win/tclWinThrd.c
index 89f2b12..abd4f84 100644
--- a/win/tclWinThrd.c
+++ b/win/tclWinThrd.c
@@ -22,15 +22,15 @@ _CRTIMP unsigned int __cdecl _controlfp (unsigned int unNew, unsigned int unMask
#endif
/*
- * This is the master lock used to serialize access to other serialization
+ * This is the global lock used to serialize access to other serialization
* data structures.
*/
-static CRITICAL_SECTION masterLock;
+static CRITICAL_SECTION globalLock;
static int initialized = 0;
/*
- * This is the master lock used to serialize initialization and finalization
+ * This is the global lock used to serialize initialization and finalization
* of Tcl as a whole.
*/
@@ -362,7 +362,7 @@ TclpInitLock(void)
initialized = 1;
InitializeCriticalSection(&joinLock);
InitializeCriticalSection(&initLock);
- InitializeCriticalSection(&masterLock);
+ InitializeCriticalSection(&globalLock);
}
EnterCriticalSection(&initLock);
}
@@ -393,7 +393,7 @@ TclpInitUnlock(void)
/*
*----------------------------------------------------------------------
*
- * TclpMasterLock
+ * TclpGlobalLock
*
* This procedure is used to grab a lock that serializes creation of
* mutexes, condition variables, and thread local storage keys.
@@ -405,13 +405,13 @@ TclpInitUnlock(void)
* None.
*
* Side effects:
- * Acquire the master mutex.
+ * Acquire the global mutex.
*
*----------------------------------------------------------------------
*/
void
-TclpMasterLock(void)
+TclpGlobalLock(void)
{
if (!initialized) {
/*
@@ -424,15 +424,15 @@ TclpMasterLock(void)
initialized = 1;
InitializeCriticalSection(&joinLock);
InitializeCriticalSection(&initLock);
- InitializeCriticalSection(&masterLock);
+ InitializeCriticalSection(&globalLock);
}
- EnterCriticalSection(&masterLock);
+ EnterCriticalSection(&globalLock);
}
/*
*----------------------------------------------------------------------
*
- * TclpMasterUnlock
+ * TclpGlobalUnlock
*
* This procedure is used to release a lock that serializes creation and
* deletion of synchronization objects.
@@ -441,15 +441,15 @@ TclpMasterLock(void)
* None.
*
* Side effects:
- * Release the master mutex.
+ * Release the global mutex.
*
*----------------------------------------------------------------------
*/
void
-TclpMasterUnlock(void)
+TclpGlobalUnlock(void)
{
- LeaveCriticalSection(&masterLock);
+ LeaveCriticalSection(&globalLock);
}
/*
@@ -506,14 +506,14 @@ Tcl_GetAllocMutex(void)
void
TclFinalizeLock(void)
{
- TclpMasterLock();
+ TclpGlobalLock();
DeleteCriticalSection(&joinLock);
/*
* Destroy the critical section that we are holding!
*/
- DeleteCriticalSection(&masterLock);
+ DeleteCriticalSection(&globalLock);
initialized = 0;
#if TCL_THREADS
@@ -561,10 +561,10 @@ Tcl_MutexLock(
CRITICAL_SECTION *csPtr;
if (*mutexPtr == NULL) {
- TclpMasterLock();
+ TclpGlobalLock();
/*
- * Double inside master lock check to avoid a race.
+ * Double inside global lock check to avoid a race.
*/
if (*mutexPtr == NULL) {
@@ -573,7 +573,7 @@ Tcl_MutexLock(
*mutexPtr = (Tcl_Mutex)csPtr;
TclRememberMutex(mutexPtr);
}
- TclpMasterUnlock();
+ TclpGlobalUnlock();
}
csPtr = *((CRITICAL_SECTION **)mutexPtr);
EnterCriticalSection(csPtr);
@@ -675,7 +675,7 @@ Tcl_ConditionWait(
*/
if (tsdPtr->flags == WIN_THREAD_UNINIT) {
- TclpMasterLock();
+ TclpGlobalLock();
/*
* Create the per-thread event and queue pointers.
@@ -689,14 +689,14 @@ Tcl_ConditionWait(
tsdPtr->flags = WIN_THREAD_RUNNING;
doExit = 1;
}
- TclpMasterUnlock();
+ TclpGlobalUnlock();
if (doExit) {
/*
* Create a per-thread exit handler to clean up the condEvent. We
- * must be careful to do this outside the Master Lock because
+ * must be careful to do this outside the Global Lock because
* Tcl_CreateThreadExitHandler uses its own ThreadSpecificData,
- * and initializing that may drop back into the Master Lock.
+ * and initializing that may drop back into the Global Lock.
*/
Tcl_CreateThreadExitHandler(FinalizeConditionEvent, tsdPtr);
@@ -704,7 +704,7 @@ Tcl_ConditionWait(
}
if (*condPtr == NULL) {
- TclpMasterLock();
+ TclpGlobalLock();
/*
* Initialize the per-condition queue pointers and Mutex.
@@ -718,7 +718,7 @@ Tcl_ConditionWait(
*condPtr = (Tcl_Condition) winCondPtr;
TclRememberCondition(condPtr);
}
- TclpMasterUnlock();
+ TclpGlobalUnlock();
}
csPtr = *((CRITICAL_SECTION **)mutexPtr);
winCondPtr = *((WinCondition **)condPtr);
@@ -896,7 +896,7 @@ FinalizeConditionEvent(
* This procedure is invoked to clean up a condition variable. This is
* only safe to call at the end of time.
*
- * This assumes the Master Lock is held.
+ * This assumes the Global Lock is held.
*
* Results:
* None.
@@ -1065,19 +1065,19 @@ TclpThreadDeleteKey(
}
void
-TclpThreadSetMasterTSD(
+TclpThreadSetGlobalTSD(
void *tsdKeyPtr,
void *ptr)
{
DWORD *key = (DWORD *)tsdKeyPtr;
if (!TlsSetValue(*key, ptr)) {
- Tcl_Panic("unable to set master TSD value");
+ Tcl_Panic("unable to set global TSD value");
}
}
void *
-TclpThreadGetMasterTSD(
+TclpThreadGetGlobalTSD(
void *tsdKeyPtr)
{
DWORD *key = (DWORD *)tsdKeyPtr;