summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in169
-rwxr-xr-xunix/config.status.lineno920
-rwxr-xr-xunix/configure29
-rw-r--r--unix/configure.ac12
-rw-r--r--unix/dltest/Makefile.in77
-rw-r--r--unix/dltest/embtest.c36
-rw-r--r--unix/dltest/pkgπ.c95
-rw-r--r--unix/tcl.m46
-rw-r--r--unix/tcl.spec2
-rw-r--r--unix/tclAppInit.c6
-rw-r--r--unix/tclConfig.h.in3
-rw-r--r--unix/tclConfig.sh.in5
-rw-r--r--unix/tclEpollNotfy.c22
-rw-r--r--unix/tclKqueueNotfy.c18
-rw-r--r--unix/tclLoadDl.c10
-rw-r--r--unix/tclLoadDyld.c24
-rw-r--r--unix/tclLoadNext.c6
-rw-r--r--unix/tclLoadOSF.c6
-rw-r--r--unix/tclLoadShl.c6
-rw-r--r--unix/tclSelectNotfy.c6
-rw-r--r--unix/tclUnixChan.c126
-rw-r--r--unix/tclUnixCompat.c22
-rw-r--r--unix/tclUnixFCmd.c68
-rw-r--r--unix/tclUnixFile.c16
-rw-r--r--unix/tclUnixInit.c19
-rw-r--r--unix/tclUnixPipe.c18
-rw-r--r--unix/tclUnixPort.h9
-rw-r--r--unix/tclUnixSock.c41
-rw-r--r--unix/tclUnixThrd.c68
-rw-r--r--unix/tclUnixTime.c231
-rw-r--r--unix/tclXtNotify.c10
31 files changed, 495 insertions, 1591 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index 4261fa6..fec1811 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -54,7 +54,7 @@ DLL_INSTALL_DIR = @DLL_INSTALL_DIR@
SCRIPT_INSTALL_DIR = $(INSTALL_ROOT)$(TCL_LIBRARY)
# Path name to use when installing Tcl modules.
-MODULE_INSTALL_DIR = $(SCRIPT_INSTALL_DIR)/../tcl8
+MODULE_INSTALL_DIR = $(SCRIPT_INSTALL_DIR)/../tcl9
# Directory in which to install the include file tcl.h:
INCLUDE_INSTALL_DIR = $(INSTALL_ROOT)$(includedir)
@@ -124,7 +124,7 @@ ENV_FLAGS =
# To enable memory debugging, call configure with --enable-symbols=mem
# Warning: if you enable memory debugging, you must do it *everywhere*,
-# including all the code that calls Tcl, and you must use ckalloc and ckfree
+# including all the code that calls Tcl, and you must use Tcl_Alloc and Tcl_Free
# everywhere instead of malloc and free.
TCL_STUB_LIB_FILE = @TCL_STUB_LIB_FILE@
@@ -347,6 +347,8 @@ TOMMATH_OBJS = bn_s_mp_reverse.o bn_s_mp_mul_digs_fast.o \
bn_s_mp_mul_digs.o bn_s_mp_sqr.o bn_s_mp_sub.o
STUB_LIB_OBJS = tclStubLib.o \
+ tclStubCall.o \
+ tclStubLibTbl.o \
tclTomMathStubLib.o \
tclOOStubLib.o \
${COMPAT_OBJS}
@@ -489,6 +491,8 @@ OO_SRCS = \
STUB_SRCS = \
$(GENERIC_DIR)/tclStubLib.c \
+ $(GENERIC_DIR)/tclStubCall.c \
+ $(GENERIC_DIR)/tclStubLibTbl.c \
$(GENERIC_DIR)/tclTomMathStubLib.c \
$(GENERIC_DIR)/tclOOStubLib.c
@@ -1020,7 +1024,7 @@ install-libraries: libraries
else true; \
fi; \
done;
- @for i in 8.4 8.4/platform 8.5 8.6 8.7; \
+ @for i in 9.0 9.0/platform; \
do \
if [ ! -d "$(MODULE_INSTALL_DIR)/$$i" ] ; then \
echo "Making directory $(MODULE_INSTALL_DIR)/$$i"; \
@@ -1041,23 +1045,23 @@ install-libraries: libraries
done
@echo "Installing package http 2.10a1 as a Tcl Module"
@$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl \
- "$(MODULE_INSTALL_DIR)/8.6/http-2.10a1.tm"
+ "$(MODULE_INSTALL_DIR)/9.0/http-2.10a1.tm"
@echo "Installing package opt 0.4.7"
@for i in $(TOP_DIR)/library/opt/*.tcl; do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/opt0.4"; \
done
@echo "Installing package msgcat 1.7.1 as a Tcl Module"
@$(INSTALL_DATA) $(TOP_DIR)/library/msgcat/msgcat.tcl \
- "$(MODULE_INSTALL_DIR)/8.7/msgcat-1.7.1.tm"
+ "$(MODULE_INSTALL_DIR)/9.0/msgcat-1.7.1.tm"
@echo "Installing package tcltest 2.5.4 as a Tcl Module"
@$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl \
- "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.4.tm"
+ "$(MODULE_INSTALL_DIR)/9.0/tcltest-2.5.4.tm"
@echo "Installing package platform 1.0.17 as a Tcl Module"
@$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl \
- "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.17.tm"
+ "$(MODULE_INSTALL_DIR)/9.0/platform-1.0.17.tm"
@echo "Installing package platform::shell 1.1.4 as a Tcl Module"
@$(INSTALL_DATA) $(TOP_DIR)/library/platform/shell.tcl \
- "$(MODULE_INSTALL_DIR)/8.4/platform/shell-1.1.4.tm"
+ "$(MODULE_INSTALL_DIR)/9.0/platform/shell-1.1.4.tm"
@echo "Installing encoding files to $(SCRIPT_INSTALL_DIR)/encoding/"
@for i in $(TOP_DIR)/library/encoding/*.enc; do \
$(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/encoding"; \
@@ -1908,6 +1912,16 @@ Zzutil.o: $(ZLIB_DIR)/zutil.c
tclStubLib.o: $(GENERIC_DIR)/tclStubLib.c
$(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD @CFLAGS_NOLTO@ $(GENERIC_DIR)/tclStubLib.c
+tclStubCall.o: $(GENERIC_DIR)/tclStubCall.c
+ $(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD \
+ -DCFG_RUNTIME_DLLFILE="\"$(TCL_LIB_FILE)\"" \
+ -DCFG_RUNTIME_LIBDIR="\"$(libdir)\"" \
+ -DCFG_RUNTIME_BINDIR="\"$(bindir)\"" \
+ $(GENERIC_DIR)/tclStubCall.c
+
+tclStubLibTbl.o: $(GENERIC_DIR)/tclStubLibTbl.c
+ $(CC) -c $(STUB_CC_SWITCHES) -DSTATIC_BUILD $(GENERIC_DIR)/tclStubLibTbl.c
+
tclTomMathStubLib.o: $(GENERIC_DIR)/tclTomMathStubLib.c
$(CC) -c $(STUB_CC_SWITCHES) @CFLAGS_NOLTO@ $(GENERIC_DIR)/tclTomMathStubLib.c
@@ -2217,6 +2231,8 @@ DISTROOT = /tmp/dist
DISTNAME = tcl${VERSION}${PATCH_LEVEL}
ZIPNAME = tcl${MAJOR_VERSION}${MINOR_VERSION}${PATCH_LEVEL}-src.zip
DISTDIR = $(DISTROOT)/$(DISTNAME)
+DIST_INSTALL_DATA = CPPROG='cp -p' $(INSTALL) -m 644
+DIST_INSTALL_SCRIPT = CPPROG='cp -p' $(INSTALL) -m 755
BUILTIN_PACKAGE_LIST = cookiejar http opt msgcat registry dde tcltest platform
$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.ac $(UNIX_DIR)/tcl.m4 \
@@ -2234,120 +2250,125 @@ $(TOP_DIR)/manifest.uuid:
dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in genstubs \
$(MAC_OSX_DIR)/configure $(TOP_DIR)/manifest.uuid dist-packages ${NATIVE_TCLSH}
rm -rf $(DISTDIR)
- mkdir -p $(DISTDIR)/unix
- cp -p $(TOP_DIR)/manifest.uuid $(DISTDIR)
- cp -p $(UNIX_DIR)/*.[ch] $(DISTDIR)/unix
- cp -p $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
- chmod 664 $(DISTDIR)/unix/Makefile.in
- cp -p $(UNIX_DIR)/configure $(UNIX_DIR)/configure.ac \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/unix
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/manifest.uuid $(DISTDIR)
+ $(DIST_INSTALL_DATA) $(UNIX_DIR)/*.[ch] $(DISTDIR)/unix
+ $(DIST_INSTALL_DATA) $(UNIX_DIR)/Makefile.in $(DISTDIR)/unix
+ $(DIST_INSTALL_DATA) $(UNIX_DIR)/configure.ac \
$(UNIX_DIR)/tcl.m4 $(UNIX_DIR)/aclocal.m4 \
$(UNIX_DIR)/tclConfig.sh.in $(UNIX_DIR)/tclooConfig.sh \
$(UNIX_DIR)/install-sh \
- $(UNIX_DIR)/README $(UNIX_DIR)/ldAix $(UNIX_DIR)/tcl.spec \
+ $(UNIX_DIR)/README $(UNIX_DIR)/tcl.spec \
$(UNIX_DIR)/installManPage $(UNIX_DIR)/tclConfig.h.in \
$(UNIX_DIR)/tcl.pc.in $(DISTDIR)/unix
- chmod 775 $(DISTDIR)/unix/configure
- chmod 775 $(DISTDIR)/unix/ldAix
- @mkdir $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/*.[cdh] $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/*.decls $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/README $(DISTDIR)/generic
- cp -p $(GENERIC_DIR)/tclGetDate.y $(DISTDIR)/generic
- cp -p $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog $(TOP_DIR)/README.md \
+ $(DIST_INSTALL_SCRIPT) $(UNIX_DIR)/configure $(UNIX_DIR)/ldAix $(DISTDIR)/unix
+ $(INSTALL_DATA_DIR) $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/*.[cdh] $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/*.decls $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/README $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(GENERIC_DIR)/tclGetDate.y $(DISTDIR)/generic
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/changes $(TOP_DIR)/ChangeLog $(TOP_DIR)/README.md \
$(TOP_DIR)/ChangeLog.[12]??? $(TOP_DIR)/license.terms \
$(DISTDIR)
- @mkdir $(DISTDIR)/library
- cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \
$(TOP_DIR)/library/manifest.txt \
$(TOP_DIR)/library/tclIndex $(DISTDIR)/library
@for i in $(BUILTIN_PACKAGE_LIST); do \
- mkdir $(DISTDIR)/library/$$i;\
- cp -p $(TOP_DIR)/library/$$i/*.tcl $(DISTDIR)/library/$$i; \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/$$i;\
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/library/$$i/*.tcl $(DISTDIR)/library/$$i; \
done
- cp -p $(TOP_DIR)/library/cookiejar/*.txt.gz $(DISTDIR)/library/cookiejar
- @mkdir $(DISTDIR)/library/encoding
- cp -p $(TOP_DIR)/library/encoding/*.enc $(DISTDIR)/library/encoding
- @mkdir $(DISTDIR)/library/msgs
- cp -p $(TOP_DIR)/library/msgs/*.msg $(DISTDIR)/library/msgs
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/library/cookiejar/*.txt.gz $(DISTDIR)/library/cookiejar
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/encoding
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/library/encoding/*.enc $(DISTDIR)/library/encoding
+ $(INSTALL_DATA_DIR) $(DISTDIR)/library/msgs
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/library/msgs/*.msg $(DISTDIR)/library/msgs
@echo cp -r $(TOP_DIR)/library/tzdata $(DISTDIR)/library/tzdata
@( cd $(TOP_DIR); find library/tzdata -type f -print ) \
| ( cd $(TOP_DIR) ; xargs tar cf - ) \
| ( cd $(DISTDIR) ; tar xfp - )
- @mkdir $(DISTDIR)/doc
- cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/doc
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(TOP_DIR)/doc/*.[13n] \
$(TOP_DIR)/doc/man.macros $(DISTDIR)/doc
- @mkdir $(DISTDIR)/compat
- cp -p $(TOP_DIR)/license.terms $(COMPAT_DIR)/*.[ch] \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/compat
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(COMPAT_DIR)/*.[ch] \
$(COMPAT_DIR)/README $(DISTDIR)/compat
- @mkdir $(DISTDIR)/compat/zlib
+ $(INSTALL_DATA_DIR) $(DISTDIR)/compat/zlib
@echo cp -r $(COMPAT_DIR)/zlib $(DISTDIR)/compat/zlib
@( cd $(COMPAT_DIR)/zlib; find . -type f -print ) \
| ( cd $(COMPAT_DIR)/zlib ; xargs tar cf - ) \
| ( cd $(DISTDIR)/compat/zlib ; tar xfp - )
- @mkdir $(DISTDIR)/tests
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/tests
- cp -p $(TOP_DIR)/tests/*.test $(TOP_DIR)/tests/README \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/tests
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/tests
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/tests/*.test $(TOP_DIR)/tests/README \
$(TOP_DIR)/tests/httpd $(TOP_DIR)/tests/*.tcl \
$(TOP_DIR)/tests/auto-files.zip $(DISTDIR)/tests
@mkdir $(DISTDIR)/tests/auto0
for i in auto1 auto2 ; \
do \
- mkdir $(DISTDIR)/tests/auto0/$$i ;\
- cp -p $(TOP_DIR)/tests/auto0/$$i/tclIndex $(TOP_DIR)/tests/auto0/$$i/*.tcl \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/tests/auto0/$$i ;\
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/tests/auto0/$$i/tclIndex $(TOP_DIR)/tests/auto0/$$i/*.tcl \
$(DISTDIR)/tests/auto0/$$i; \
done;
for i in modules modules/mod1 modules/mod2 ; \
do \
- mkdir $(DISTDIR)/tests/auto0/$$i ;\
- cp -p $(TOP_DIR)/tests/auto0/$$i/*.tm \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/tests/auto0/$$i ;\
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/tests/auto0/$$i/*.tm \
$(DISTDIR)/tests/auto0/$$i; \
done;
- @mkdir $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/configure.ac $(TOP_DIR)/win/configure \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/Makefile.in $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/configure.ac \
$(TOP_DIR)/win/tclConfig.sh.in $(TOP_DIR)/win/tclooConfig.sh \
$(TOP_DIR)/win/tcl.m4 $(TOP_DIR)/win/aclocal.m4 \
$(TOP_DIR)/win/tclsh.exe.manifest.in \
$(DISTDIR)/win
- cp -p $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.ico $(TOP_DIR)/win/*.rc \
+ $(DIST_INSTALL_SCRIPT) $(TOP_DIR)/win/configure $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/*.[ch] $(TOP_DIR)/win/*.ico $(TOP_DIR)/win/*.rc \
$(DISTDIR)/win
- cp -p $(TOP_DIR)/win/*.bat $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/*.vc $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/tcl.ds* $(DISTDIR)/win
- cp -p $(TOP_DIR)/win/README $(DISTDIR)/win
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/win
- @mkdir $(DISTDIR)/macosx
- cp -p $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/*.bat $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/*.vc $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/tcl.ds* $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/win/README $(DISTDIR)/win
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/win
+ $(INSTALL_DATA_DIR) $(DISTDIR)/macosx
+ $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/GNUmakefile $(MAC_OSX_DIR)/README \
$(MAC_OSX_DIR)/*.c $(MAC_OSX_DIR)/*.in \
$(MAC_OSX_DIR)/*.ac $(MAC_OSX_DIR)/*.xcconfig \
- $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx
- cp -p $(TOP_DIR)/license.terms $(DISTDIR)/macosx
- @mkdir $(DISTDIR)/macosx/Tcl.xcode
- cp -p $(MAC_OSX_DIR)/Tcl.xcode/project.pbxproj \
+ $(DISTDIR)/macosx
+ $(DIST_INSTALL_SCRIPT) $(MAC_OSX_DIR)/configure $(DISTDIR)/macosx
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/license.terms $(DISTDIR)/macosx
+ $(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tcl.xcode
+ $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tcl.xcode/project.pbxproj \
$(MAC_OSX_DIR)/Tcl.xcode/default.pbxuser \
$(DISTDIR)/macosx/Tcl.xcode
- @mkdir $(DISTDIR)/macosx/Tcl.xcodeproj
- cp -p $(MAC_OSX_DIR)/Tcl.xcodeproj/project.pbxproj \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/macosx/Tcl.xcodeproj
+ $(DIST_INSTALL_DATA) $(MAC_OSX_DIR)/Tcl.xcodeproj/project.pbxproj \
$(MAC_OSX_DIR)/Tcl.xcodeproj/default.pbxuser \
$(DISTDIR)/macosx/Tcl.xcodeproj
- @mkdir $(DISTDIR)/unix/dltest
- cp -p $(UNIX_DIR)/dltest/*.c $(UNIX_DIR)/dltest/Makefile.in \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/unix/dltest
+ $(DIST_INSTALL_DATA) $(UNIX_DIR)/dltest/*.c $(UNIX_DIR)/dltest/Makefile.in \
$(UNIX_DIR)/dltest/README $(DISTDIR)/unix/dltest
- @mkdir $(DISTDIR)/tools
- cp -p $(TOOL_DIR)/README $(TOOL_DIR)/*.c $(TOOL_DIR)/*.svg \
+ $(INSTALL_DATA_DIR) $(DISTDIR)/tools
+ $(DIST_INSTALL_DATA) $(TOOL_DIR)/README $(TOOL_DIR)/*.c $(TOOL_DIR)/*.svg \
$(TOOL_DIR)/*.tcl $(TOOL_DIR)/*.bmp \
$(TOOL_DIR)/valgrind_suppress $(DISTDIR)/tools
- @mkdir $(DISTDIR)/libtommath
- cp -p $(TOMMATH_SRCS) $(TOMMATH_DIR)/*.h $(DISTDIR)/libtommath
- @mkdir $(DISTDIR)/pkgs
- cp -p $(TOP_DIR)/pkgs/README $(DISTDIR)/pkgs
- cp -p $(TOP_DIR)/pkgs/package.list.txt $(DISTDIR)/pkgs
+ chmod 755 $(DISTDIR)/tools/checkLibraryDoc.tcl \
+ $(DISTDIR)/tools/findBadExternals.tcl \
+ $(DISTDIR)/tools/loadICU.tcl \
+ $(DISTDIR)/tools/makeTestCases.tcl $(DISTDIR)/tools/tclZIC.tcl \
+ $(DISTDIR)/tools/tcltk-man2html.tcl
+ $(INSTALL_DATA_DIR) $(DISTDIR)/libtommath
+ $(DIST_INSTALL_DATA) $(TOMMATH_SRCS) $(TOMMATH_DIR)/*.h $(DISTDIR)/libtommath
+ $(INSTALL_DATA_DIR) $(DISTDIR)/pkgs
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/pkgs/README $(DISTDIR)/pkgs
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/pkgs/package.list.txt $(DISTDIR)/pkgs
for i in `ls $(DISTROOT)/pkgs/*.tar.gz 2> /dev/null`; do \
tar -C $(DISTDIR)/pkgs -xzf "$$i"; \
done
- cp -p $(TOP_DIR)/.travis.yml $(DISTDIR)
- mkdir -p $(DISTDIR)/.github/workflows
- cp -p $(TOP_DIR)/.github/workflows/*.yml $(DISTDIR)/.github/workflows
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/.travis.yml $(DISTDIR)
+ $(INSTALL_DATA_DIR) $(DISTDIR)/.github/workflows
+ $(DIST_INSTALL_DATA) $(TOP_DIR)/.github/workflows/*.yml $(DISTDIR)/.github/workflows
alldist: dist
rm -f $(DISTROOT)/$(DISTNAME)-src.tar.gz $(DISTROOT)/$(ZIPNAME)
@@ -2359,7 +2380,7 @@ alldist: dist
#--------------------------------------------------------------------------
# This target creates the HTML folder for Tcl & Tk and places it in
# DISTDIR/html. It uses the tcltk-man2html.tcl tool from the Tcl group's tool
-# workspace. It depends on the Tcl & Tk being in directories called tcl8.* &
+# workspace. It depends on the Tcl & Tk being in directories called tcl9.* &
# tk8.* up two directories from the TOOL_DIR.
#
# Note that for platforms where this is important, it is more common to use a
diff --git a/unix/config.status.lineno b/unix/config.status.lineno
deleted file mode 100755
index 12d4f40..0000000
--- a/unix/config.status.lineno
+++ /dev/null
@@ -1,920 +0,0 @@
-#! /bin/bash
-# Generated by configure.
-# Run this file to recreate the current configuration.
-# Compiler output produced by configure, useful for debugging
-# configure, is in config.log if it exists.
-
-debug=false
-ac_cs_recheck=false
-ac_cs_silent=false
-SHELL=${CONFIG_SHELL-/bin/bash}
-## --------------------- ##
-## M4sh Initialization. ##
-## --------------------- ##
-
-# Be Bourne compatible
-if test -n "${ZSH_VERSION+set}" && (emulate sh) >/dev/null 2>&1; then
- emulate sh
- NULLCMD=:
- # Zsh 3.x and 4.x performs word splitting on ${1+"$@"}, which
- # is contrary to our usage. Disable this feature.
- alias -g '${1+"$@"}'='"$@"'
-elif test -n "${BASH_VERSION+set}" && (set -o posix) >/dev/null 2>&1; then
- set -o posix
-fi
-DUALCASE=1; export DUALCASE # for MKS sh
-
-# Support unset when possible.
-if ( (MAIL=60; unset MAIL) || exit) >/dev/null 2>&1; then
- as_unset=unset
-else
- as_unset=false
-fi
-
-
-# Work around bugs in pre-3.0 UWIN ksh.
-$as_unset ENV MAIL MAILPATH
-PS1='$ '
-PS2='> '
-PS4='+ '
-
-# NLS nuisances.
-for as_var in \
- LANG LANGUAGE LC_ADDRESS LC_ALL LC_COLLATE LC_CTYPE LC_IDENTIFICATION \
- LC_MEASUREMENT LC_MESSAGES LC_MONETARY LC_NAME LC_NUMERIC LC_PAPER \
- LC_TELEPHONE LC_TIME
-do
- if (set +x; test -z "`(eval $as_var=C; export $as_var) 2>&1`"); then
- eval $as_var=C; export $as_var
- else
- $as_unset $as_var
- fi
-done
-
-# Required to use basename.
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-if (basename /) >/dev/null 2>&1 && test "X`basename / 2>&1`" = "X/"; then
- as_basename=basename
-else
- as_basename=false
-fi
-
-
-# Name of the executable.
-as_me=`$as_basename "$0" ||
-$as_expr X/"$0" : '.*/\([^/][^/]*\)/*$' \| \
- X"$0" : 'X\(//\)$' \| \
- X"$0" : 'X\(/\)$' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X/"$0" |
- sed '/^.*\/\([^/][^/]*\)\/*$/{ s//\1/; q; }
- /^X\/\(\/\/\)$/{ s//\1/; q; }
- /^X\/\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
-
-
-# PATH needs CR, and LINENO needs CR and PATH.
-# Avoid depending upon Character Ranges.
-as_cr_letters='abcdefghijklmnopqrstuvwxyz'
-as_cr_LETTERS='ABCDEFGHIJKLMNOPQRSTUVWXYZ'
-as_cr_Letters=$as_cr_letters$as_cr_LETTERS
-as_cr_digits='0123456789'
-as_cr_alnum=$as_cr_Letters$as_cr_digits
-
-# The user is always right.
-if test "${PATH_SEPARATOR+set}" != set; then
- echo "#! /bin/sh" >conf$$.sh
- echo "exit 0" >>conf$$.sh
- chmod +x conf$$.sh
- if (PATH="/nonexistent;."; conf$$.sh) >/dev/null 2>&1; then
- PATH_SEPARATOR=';'
- else
- PATH_SEPARATOR=:
- fi
- rm -f conf$$.sh
-fi
-
-
- as_lineno_1=103
- as_lineno_2=104
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" || {
- # Find who we are. Look in the path if we contain no path at all
- # relative or not.
- case $0 in
- *[\\/]* ) as_myself=$0 ;;
- *) as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in $PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- test -r "$as_dir/$0" && as_myself=$as_dir/$0 && break
-done
-
- ;;
- esac
- # We did not find ourselves, most probably we were run as `sh COMMAND'
- # in which case we are not to be found in the path.
- if test "x$as_myself" = x; then
- as_myself=$0
- fi
- if test ! -f "$as_myself"; then
- { { echo "$as_me:128: error: cannot find myself; rerun with an absolute path" >&5
-echo "$as_me: error: cannot find myself; rerun with an absolute path" >&2;}
- { (exit 1); exit 1; }; }
- fi
- case $CONFIG_SHELL in
- '')
- as_save_IFS=$IFS; IFS=$PATH_SEPARATOR
-for as_dir in /bin$PATH_SEPARATOR/usr/bin$PATH_SEPARATOR$PATH
-do
- IFS=$as_save_IFS
- test -z "$as_dir" && as_dir=.
- for as_base in sh bash ksh sh5; do
- case $as_dir in
- /*)
- if ("$as_dir/$as_base" -c '
- as_lineno_1=143
- as_lineno_2=144
- as_lineno_3=`(expr $as_lineno_1 + 1) 2>/dev/null`
- test "x$as_lineno_1" != "x$as_lineno_2" &&
- test "x$as_lineno_3" = "x$as_lineno_2" ') 2>/dev/null; then
- $as_unset BASH_ENV || test "${BASH_ENV+set}" != set || { BASH_ENV=; export BASH_ENV; }
- $as_unset ENV || test "${ENV+set}" != set || { ENV=; export ENV; }
- CONFIG_SHELL=$as_dir/$as_base
- export CONFIG_SHELL
- exec "$CONFIG_SHELL" "$0" ${1+"$@"}
- fi;;
- esac
- done
-done
-;;
- esac
-
- # Create $as_me.lineno as a copy of $as_myself, but with 160
- # uniformly replaced by the line number. The first 'sed' inserts a
- # line-number line before each line; the second 'sed' does the real
- # work. The second script uses 'N' to pair each line-number line
- # with the numbered line, and appends trailing '-' during
- # substitution so that 165 is not a special case at line end.
- # (Raja R Harinath suggested sed '=', and Paul Eggert wrote the
- # second 'sed' script. Blame Lee E. McMahon for sed's syntax. :-)
- sed '=' <$as_myself |
- sed '
- N
- s,$,-,
- : loop
- s,^\(['$as_cr_digits']*\)\(.*\)[$]LINENO\([^'$as_cr_alnum'_]\),\1\2\1\3,
- t loop
- s,-$,,
- s,^['$as_cr_digits']*\n,,
- ' >$as_me.lineno &&
- chmod +x $as_me.lineno ||
- { { echo "$as_me:179: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&5
-echo "$as_me: error: cannot create $as_me.lineno; rerun with a POSIX shell" >&2;}
- { (exit 1); exit 1; }; }
-
- # Don't try to exec as it changes $[0], causing all sort of problems
- # (the dirname of $[0] is not the place where we might find the
- # original and so on. Autoconf is especially sensible to this).
- . ./$as_me.lineno
- # Exit status is that of the last command.
- exit
-}
-
-
-case `echo "testing\c"; echo 1,2,3`,`echo -n testing; echo 1,2,3` in
- *c*,-n*) ECHO_N= ECHO_C='
-' ECHO_T=' ' ;;
- *c*,* ) ECHO_N=-n ECHO_C= ECHO_T= ;;
- *) ECHO_N= ECHO_C='\c' ECHO_T= ;;
-esac
-
-if expr a : '\(a\)' >/dev/null 2>&1; then
- as_expr=expr
-else
- as_expr=false
-fi
-
-rm -f conf$$ conf$$.exe conf$$.file
-echo >conf$$.file
-if ln -s conf$$.file conf$$ 2>/dev/null; then
- # We could just check for DJGPP; but this test a) works b) is more generic
- # and c) will remain valid once DJGPP supports symlinks (DJGPP 2.04).
- if test -f conf$$.exe; then
- # Don't use ln at all; we don't have any links
- as_ln_s='cp -p'
- else
- as_ln_s='ln -s'
- fi
-elif ln conf$$.file conf$$ 2>/dev/null; then
- as_ln_s=ln
-else
- as_ln_s='cp -p'
-fi
-rm -f conf$$ conf$$.exe conf$$.file
-
-if mkdir -p . 2>/dev/null; then
- as_mkdir_p=:
-else
- test -d ./-p && rmdir ./-p
- as_mkdir_p=false
-fi
-
-as_executable_p="test -f"
-
-# Sed expression to map a string onto a valid CPP name.
-as_tr_cpp="eval sed 'y%*$as_cr_letters%P$as_cr_LETTERS%;s%[^_$as_cr_alnum]%_%g'"
-
-# Sed expression to map a string onto a valid variable name.
-as_tr_sh="eval sed 'y%*+%pp%;s%[^_$as_cr_alnum]%_%g'"
-
-
-# IFS
-# We need space, tab and new line, in precisely that order.
-as_nl='
-'
-IFS=" $as_nl"
-
-# CDPATH.
-$as_unset CDPATH
-
-exec 6>&1
-
-# Open the log real soon, to keep \$[0] and so on meaningful, and to
-# report actual input values of CONFIG_FILES etc. instead of their
-# values after options handling. Logging --version etc. is OK.
-exec 5>>config.log
-{
- echo
- sed 'h;s/./-/g;s/^.../## /;s/...$/ ##/;p;x;p;x' <<_ASBOX
-## Running $as_me. ##
-_ASBOX
-} >&5
-cat >&5 <<_CSEOF
-
-This file was extended by tcl $as_me 8.6, which was
-generated by GNU Autoconf 2.59. Invocation command line was
-
- CONFIG_FILES = $CONFIG_FILES
- CONFIG_HEADERS = $CONFIG_HEADERS
- CONFIG_LINKS = $CONFIG_LINKS
- CONFIG_COMMANDS = $CONFIG_COMMANDS
- $ $0 $@
-
-_CSEOF
-echo "on `(hostname || uname -n) 2>/dev/null | sed 1q`" >&5
-echo >&5
-config_files=" Makefile:../unix/Makefile.in dltest/Makefile:../unix/dltest/Makefile.in tclConfig.sh:../unix/tclConfig.sh.in tcl.pc:../unix/tcl.pc.in"
-
-ac_cs_usage="\
-\`$as_me' instantiates files from templates according to the
-current configuration.
-
-Usage: $0 [OPTIONS] [FILE]...
-
- -h, --help print this help, then exit
- -V, --version print version number, then exit
- -q, --quiet do not print progress messages
- -d, --debug don't remove temporary files
- --recheck update $as_me by reconfiguring in the same conditions
- --file=FILE[:TEMPLATE]
- instantiate the configuration file FILE
-
-Configuration files:
-$config_files
-
-Configuration commands:
-$config_commands
-
-Report bugs to <bug-autoconf@gnu.org>."
-ac_cs_version="\
-tcl config.status 8.6
-configured by ./configure, generated by GNU Autoconf 2.59,
- with options \"'--prefix=/home/jima/space/ins/lin64/dynamic/main'\"
-
-Copyright (C) 2003 Free Software Foundation, Inc.
-This config.status script is free software; the Free Software Foundation
-gives unlimited permission to copy, distribute and modify it."
-srcdir=/home/jima/space/bui/lin64/dynamic/main/tcl/unix
-# If no file are specified by the user, then we need to provide default
-# value. By we need to know if files were specified by the user.
-ac_need_defaults=:
-while test $# != 0
-do
- case $1 in
- --*=*)
- ac_option=`expr "x$1" : 'x\([^=]*\)='`
- ac_optarg=`expr "x$1" : 'x[^=]*=\(.*\)'`
- ac_shift=:
- ;;
- -*)
- ac_option=$1
- ac_optarg=$2
- ac_shift=shift
- ;;
- *) # This is not an option, so the user has probably given explicit
- # arguments.
- ac_option=$1
- ac_need_defaults=false;;
- esac
-
- case $ac_option in
- # Handling of the options.
- -recheck | --recheck | --rechec | --reche | --rech | --rec | --re | --r)
- ac_cs_recheck=: ;;
- --version | --vers* | -V )
- echo "$ac_cs_version"; exit 0 ;;
- --he | --h)
- # Conflict between --help and --header
- { { echo "$as_me:336: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: ambiguous option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; };;
- --help | --hel | -h )
- echo "$ac_cs_usage"; exit 0 ;;
- --debug | --d* | -d )
- debug=: ;;
- --file | --fil | --fi | --f )
- $ac_shift
- CONFIG_FILES="$CONFIG_FILES $ac_optarg"
- ac_need_defaults=false;;
- --header | --heade | --head | --hea )
- $ac_shift
- CONFIG_HEADERS="$CONFIG_HEADERS $ac_optarg"
- ac_need_defaults=false;;
- -q | -quiet | --quiet | --quie | --qui | --qu | --q \
- | -silent | --silent | --silen | --sile | --sil | --si | --s)
- ac_cs_silent=: ;;
-
- # This is an error.
- -*) { { echo "$as_me:358: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&5
-echo "$as_me: error: unrecognized option: $1
-Try \`$0 --help' for more information." >&2;}
- { (exit 1); exit 1; }; } ;;
-
- *) ac_config_targets="$ac_config_targets $1" ;;
-
- esac
- shift
-done
-
-ac_configure_extra_args=
-
-if $ac_cs_silent; then
- exec 6>/dev/null
- ac_configure_extra_args="$ac_configure_extra_args --silent"
-fi
-
-if $ac_cs_recheck; then
- echo "running /bin/bash ./configure " '--prefix=/home/jima/space/ins/lin64/dynamic/main' $ac_configure_extra_args " --no-create --no-recursion" >&6
- exec /bin/bash ./configure '--prefix=/home/jima/space/ins/lin64/dynamic/main' $ac_configure_extra_args --no-create --no-recursion
-fi
-
-#
-# INIT-COMMANDS section.
-#
-
-VERSION=8.6
-
-for ac_config_target in $ac_config_targets
-do
- case "$ac_config_target" in
- # Handling of arguments.
- "Tcl-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tcl-Info.plist:../macosx/Tcl-Info.plist.in" ;;
- "Tclsh-Info.plist" ) CONFIG_FILES="$CONFIG_FILES Tclsh-Info.plist:../macosx/Tclsh-Info.plist.in" ;;
- "Makefile" ) CONFIG_FILES="$CONFIG_FILES Makefile:../unix/Makefile.in" ;;
- "dltest/Makefile" ) CONFIG_FILES="$CONFIG_FILES dltest/Makefile:../unix/dltest/Makefile.in" ;;
- "tclConfig.sh" ) CONFIG_FILES="$CONFIG_FILES tclConfig.sh:../unix/tclConfig.sh.in" ;;
- "tcl.pc" ) CONFIG_FILES="$CONFIG_FILES tcl.pc:../unix/tcl.pc.in" ;;
- "Tcl.framework" ) CONFIG_COMMANDS="$CONFIG_COMMANDS Tcl.framework" ;;
- *) { { echo "$as_me:399: error: invalid argument: $ac_config_target" >&5
-echo "$as_me: error: invalid argument: $ac_config_target" >&2;}
- { (exit 1); exit 1; }; };;
- esac
-done
-
-# If the user did not use the arguments to specify the items to instantiate,
-# then the envvar interface is used. Set only those that are not.
-# We use the long form for the default assignment because of an extremely
-# bizarre bug on SunOS 4.1.3.
-if $ac_need_defaults; then
- test "${CONFIG_FILES+set}" = set || CONFIG_FILES=$config_files
- test "${CONFIG_COMMANDS+set}" = set || CONFIG_COMMANDS=$config_commands
-fi
-
-# Have a temporary directory for convenience. Make it in the build tree
-# simply because there is no reason to put it here, and in addition,
-# creating and moving files from /tmp can sometimes cause problems.
-# Create a temporary directory, and hook for its removal unless debugging.
-$debug ||
-{
- trap 'exit_status=$?; rm -rf $tmp && exit $exit_status' 0
- trap '{ (exit 1); exit 1; }' 1 2 13 15
-}
-
-# Create a (secure) tmp directory for tmp files.
-
-{
- tmp=`(umask 077 && mktemp -d -q "./confstatXXXXXX") 2>/dev/null` &&
- test -n "$tmp" && test -d "$tmp"
-} ||
-{
- tmp=./confstat$$-$RANDOM
- (umask 077 && mkdir $tmp)
-} ||
-{
- echo "$me: cannot create a temporary directory in ." >&2
- { (exit 1); exit 1; }
-}
-
-
-#
-# CONFIG_FILES section.
-#
-
-# No need to generate the scripts if there are no CONFIG_FILES.
-# This happens for instance when ./config.status config.h
-if test -n "$CONFIG_FILES"; then
- # Protect against being on the right side of a sed subst in config.status.
- sed 's/,@/@@/; s/@,/@@/; s/,;t t$/@;t t/; /@;t t$/s/[\\&,]/\\&/g;
- s/@@/,@/; s/@@/@,/; s/@;t t$/,;t t/' >$tmp/subs.sed <<\CEOF
-s,@SHELL@,/bin/bash,;t t
-s,@PATH_SEPARATOR@,:,;t t
-s,@PACKAGE_NAME@,tcl,;t t
-s,@PACKAGE_TARNAME@,tcl,;t t
-s,@PACKAGE_VERSION@,8.6,;t t
-s,@PACKAGE_STRING@,tcl 8.6,;t t
-s,@PACKAGE_BUGREPORT@,,;t t
-s,@exec_prefix@,/home/jima/space/ins/lin64/dynamic/main,;t t
-s,@prefix@,/home/jima/space/ins/lin64/dynamic/main,;t t
-s,@program_transform_name@,s,x,x,,;t t
-s,@bindir@,${exec_prefix}/bin,;t t
-s,@sbindir@,${exec_prefix}/sbin,;t t
-s,@libexecdir@,${exec_prefix}/libexec,;t t
-s,@datadir@,${prefix}/share,;t t
-s,@sysconfdir@,${prefix}/etc,;t t
-s,@sharedstatedir@,${prefix}/com,;t t
-s,@localstatedir@,${prefix}/var,;t t
-s,@libdir@,/home/jima/space/ins/lin64/dynamic/main/lib,;t t
-s,@includedir@,${prefix}/include,;t t
-s,@oldincludedir@,/usr/include,;t t
-s,@infodir@,${prefix}/info,;t t
-s,@mandir@,${prefix}/man,;t t
-s,@build_alias@,,;t t
-s,@host_alias@,,;t t
-s,@target_alias@,,;t t
-s,@DEFS@,-DPACKAGE_NAME=\"tcl\" -DPACKAGE_TARNAME=\"tcl\" -DPACKAGE_VERSION=\"8.6\" -DPACKAGE_STRING=\"tcl\ 8.6\" -DPACKAGE_BUGREPORT=\"\" -DSTDC_HEADERS=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_STAT_H=1 -DHAVE_STDLIB_H=1 -DHAVE_STRING_H=1 -DHAVE_MEMORY_H=1 -DHAVE_STRINGS_H=1 -DHAVE_INTTYPES_H=1 -DHAVE_STDINT_H=1 -DHAVE_UNISTD_H=1 -DHAVE_SYS_PARAM_H=1 -DUSE_THREAD_ALLOC=1 -D_REENTRANT=1 -D_THREAD_SAFE=1 -DHAVE_PTHREAD_ATTR_SETSTACKSIZE=1 -DHAVE_PTHREAD_ATFORK=1 -DTCL_THREADS=1 -DTCL_CFGVAL_ENCODING=\"iso8859-1\" -DHAVE_ZLIB=1 -DMODULE_SCOPE=extern\ __attribute__\(\(__visibility__\(\"hidden\"\)\)\) -DHAVE_HIDDEN=1 -DHAVE_CAST_TO_UNION=1 -DTCL_SHLIB_EXT=\".so\" -DNDEBUG=1 -DTCL_CFG_OPTIMIZED=1 -DTCL_TOMMATH=1 -DMP_PREC=4 -D_LARGEFILE64_SOURCE=1 -DTCL_WIDE_INT_IS_LONG=1 -DHAVE_GETCWD=1 -DHAVE_MKSTEMP=1 -DHAVE_OPENDIR=1 -DHAVE_STRTOL=1 -DHAVE_WAITPID=1 -DHAVE_GETNAMEINFO=1 -DHAVE_GETADDRINFO=1 -DHAVE_FREEADDRINFO=1 -DHAVE_GAI_STRERROR=1 -DHAVE_STRUCT_ADDRINFO=1 -DHAVE_STRUCT_IN6_ADDR=1 -DHAVE_STRUCT_SOCKADDR_IN6=1 -DHAVE_STRUCT_SOCKADDR_STORAGE=1 -DHAVE_GETPWUID_R_5=1 -DHAVE_GETPWUID_R=1 -DHAVE_GETPWNAM_R_5=1 -DHAVE_GETPWNAM_R=1 -DHAVE_GETGRGID_R_5=1 -DHAVE_GETGRGID_R=1 -DHAVE_GETGRNAM_R_5=1 -DHAVE_GETGRNAM_R=1 -DHAVE_GETHOSTBYNAME_R_6=1 -DHAVE_GETHOSTBYNAME_R=1 -DHAVE_GETHOSTBYADDR_R_8=1 -DHAVE_GETHOSTBYADDR_R=1 -DHAVE_TERMIOS_H=1 -DHAVE_SYS_IOCTL_H=1 -DHAVE_SYS_TIME_H=1 -DTIME_WITH_SYS_TIME=1 -DHAVE_GMTIME_R=1 -DHAVE_LOCALTIME_R=1 -DHAVE_MKTIME=1 -DHAVE_TM_GMTOFF=1 -DHAVE_TIMEZONE_VAR=1 -DHAVE_STRUCT_STAT_ST_BLOCKS=1 -DHAVE_STRUCT_STAT_ST_BLKSIZE=1 -DHAVE_BLKCNT_T=1 -DHAVE_INTPTR_T=1 -DHAVE_UINTPTR_T=1 -DNO_UNION_WAIT=1 -DHAVE_SIGNED_CHAR=1 -DHAVE_LANGINFO=1 -DHAVE_MKSTEMPS=1 -DHAVE_FTS=1 -DHAVE_SYS_IOCTL_H=1 -DTCL_UNLOAD_DLLS=1 -DHAVE_CPUID=1 ,;t t
-s,@ECHO_C@,,;t t
-s,@ECHO_N@,-n,;t t
-s,@ECHO_T@,,;t t
-s,@LIBS@,-lz -lpthread,;t t
-s,@MAN_FLAGS@,,;t t
-s,@CC@,gcc,;t t
-s,@CFLAGS@, -pipe ,;t t
-s,@LDFLAGS@, -Wl,--export-dynamic ,;t t
-s,@CPPFLAGS@,,;t t
-s,@ac_ct_CC@,gcc,;t t
-s,@EXEEXT@,,;t t
-s,@OBJEXT@,o,;t t
-s,@CPP@,gcc -E,;t t
-s,@EGREP@,grep -E,;t t
-s,@TCL_THREADS@,1,;t t
-s,@TCLSH_PROG@,/home/jima/space/ins/lin64/dynamic/main/bin/tclsh8.6,;t t
-s,@ZLIB_OBJS@,,;t t
-s,@ZLIB_SRCS@,,;t t
-s,@ZLIB_INCLUDE@,,;t t
-s,@RANLIB@,ranlib,;t t
-s,@ac_ct_RANLIB@,ranlib,;t t
-s,@AR@,ar,;t t
-s,@ac_ct_AR@,ar,;t t
-s,@LIBOBJS@,,;t t
-s,@TCL_LIBS@,-ldl -lz -lpthread -lieee -lm,;t t
-s,@DL_LIBS@,-ldl,;t t
-s,@DL_OBJS@,tclLoadDl.o,;t t
-s,@PLAT_OBJS@,,;t t
-s,@PLAT_SRCS@,,;t t
-s,@LDAIX_SRC@,,;t t
-s,@CFLAGS_DEBUG@,-g,;t t
-s,@CFLAGS_OPTIMIZE@,-O2,;t t
-s,@CFLAGS_WARNING@,-Wall,;t t
-s,@LDFLAGS_DEBUG@,,;t t
-s,@LDFLAGS_OPTIMIZE@,,;t t
-s,@CC_SEARCH_FLAGS@,-Wl,-rpath,${LIB_RUNTIME_DIR},;t t
-s,@LD_SEARCH_FLAGS@,-Wl,-rpath,${LIB_RUNTIME_DIR},;t t
-s,@STLIB_LD@,${AR} cr,;t t
-s,@SHLIB_LD@,${CC} ${CFLAGS} ${LDFLAGS} -shared,;t t
-s,@TCL_SHLIB_LD_EXTRAS@,,;t t
-s,@TK_SHLIB_LD_EXTRAS@,,;t t
-s,@SHLIB_LD_LIBS@,${LIBS},;t t
-s,@SHLIB_CFLAGS@,-fPIC,;t t
-s,@SHLIB_SUFFIX@,.so,;t t
-s,@MAKE_LIB@,${SHLIB_LD} -o $@ ${OBJS} ${SHLIB_LD_LIBS} ${TCL_SHLIB_LD_EXTRAS} ${TK_SHLIB_LD_EXTRAS} ${LD_SEARCH_FLAGS},;t t
-s,@MAKE_STUB_LIB@,${STLIB_LD} $@ ${STUB_LIB_OBJS} ; ${RANLIB} $@,;t t
-s,@INSTALL_LIB@,$(INSTALL_LIBRARY) $(LIB_FILE) "$(LIB_INSTALL_DIR)/$(LIB_FILE)",;t t
-s,@DLL_INSTALL_DIR@,$(LIB_INSTALL_DIR),;t t
-s,@INSTALL_STUB_LIB@,$(INSTALL_LIBRARY) $(STUB_LIB_FILE) "$(LIB_INSTALL_DIR)/$(STUB_LIB_FILE)",;t t
-s,@CFLAGS_DEFAULT@,$(CFLAGS_OPTIMIZE),;t t
-s,@LDFLAGS_DEFAULT@,$(LDFLAGS_OPTIMIZE),;t t
-s,@DTRACE@,,;t t
-s,@TCL_VERSION@,8.6,;t t
-s,@TCL_MAJOR_VERSION@,8,;t t
-s,@TCL_MINOR_VERSION@,6,;t t
-s,@TCL_PATCH_LEVEL@,.8,;t t
-s,@TCL_YEAR@,,;t t
-s,@PKG_CFG_ARGS@,'--prefix=/home/jima/space/ins/lin64/dynamic/main' ,;t t
-s,@TCL_LIB_FILE@,libtcl8.6.so,;t t
-s,@TCL_LIB_FLAG@,-ltcl8.6,;t t
-s,@TCL_LIB_SPEC@,-L/home/jima/space/ins/lin64/dynamic/main/lib -ltcl8.6,;t t
-s,@TCL_STUB_LIB_FILE@,libtclstub8.6.a,;t t
-s,@TCL_STUB_LIB_FLAG@,-ltclstub8.6,;t t
-s,@TCL_STUB_LIB_SPEC@,-L/home/jima/space/ins/lin64/dynamic/main/lib -ltclstub8.6,;t t
-s,@TCL_STUB_LIB_PATH@,/home/jima/space/ins/lin64/dynamic/main/lib/libtclstub8.6.a,;t t
-s,@TCL_INCLUDE_SPEC@,-I/home/jima/space/ins/lin64/dynamic/main/include,;t t
-s,@TCL_BUILD_STUB_LIB_SPEC@,-L/home/jima/space/bui/lin64/dynamic/main/tcl/unix -ltclstub8.6,;t t
-s,@TCL_BUILD_STUB_LIB_PATH@,/home/jima/space/bui/lin64/dynamic/main/tcl/unix/libtclstub8.6.a,;t t
-s,@TCL_SRC_DIR@,/home/jima/space/bui/lin64/dynamic/main/tcl,;t t
-s,@CFG_TCL_SHARED_LIB_SUFFIX@,${VERSION}.so,;t t
-s,@CFG_TCL_UNSHARED_LIB_SUFFIX@,${VERSION}.a,;t t
-s,@TCL_SHARED_BUILD@,1,;t t
-s,@LD_LIBRARY_PATH_VAR@,LD_LIBRARY_PATH,;t t
-s,@TCL_BUILD_LIB_SPEC@,-L/home/jima/space/bui/lin64/dynamic/main/tcl/unix -ltcl8.6,;t t
-s,@TCL_LIB_VERSIONS_OK@,ok,;t t
-s,@TCL_SHARED_LIB_SUFFIX@,${VERSION}${SHLIB_SUFFIX},;t t
-s,@TCL_UNSHARED_LIB_SUFFIX@,${VERSION}.a,;t t
-s,@TCL_HAS_LONGLONG@,,;t t
-s,@INSTALL_TZDATA@,,;t t
-s,@DTRACE_SRC@,,;t t
-s,@DTRACE_HDR@,,;t t
-s,@DTRACE_OBJ@,,;t t
-s,@MAKEFILE_SHELL@,/bin/sh,;t t
-s,@BUILD_DLTEST@,$(DLTEST_TARGETS),;t t
-s,@TCL_PACKAGE_PATH@,/home/jima/space/ins/lin64/dynamic/main/lib ,;t t
-s,@TCL_MODULE_PATH@,,;t t
-s,@TCL_LIBRARY@,$(prefix)/lib/tcl$(VERSION),;t t
-s,@PRIVATE_INCLUDE_DIR@,$(includedir),;t t
-s,@HTML_DIR@,$(DISTDIR)/html,;t t
-s,@PACKAGE_DIR@,/home/jima/space/ins/lin64/dynamic/main/lib,;t t
-s,@EXTRA_CC_SWITCHES@,,;t t
-s,@EXTRA_APP_CC_SWITCHES@,,;t t
-s,@EXTRA_INSTALL@,,;t t
-s,@EXTRA_INSTALL_BINARIES@,@:,;t t
-s,@EXTRA_BUILD_HTML@,@:,;t t
-s,@EXTRA_TCLSH_LIBS@,,;t t
-s,@DLTEST_LD@,${SHLIB_LD},;t t
-s,@DLTEST_SUFFIX@,,;t t
-CEOF
-
- # Split the substitutions into bite-sized pieces for seds with
- # small command number limits, like on Digital OSF/1 and HP-UX.
- ac_max_sed_lines=48
- ac_sed_frag=1 # Number of current file.
- ac_beg=1 # First line for current file.
- ac_end=$ac_max_sed_lines # Line after last line for current file.
- ac_more_lines=:
- ac_sed_cmds=
- while $ac_more_lines; do
- if test $ac_beg -gt 1; then
- sed "1,${ac_beg}d; ${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- else
- sed "${ac_end}q" $tmp/subs.sed >$tmp/subs.frag
- fi
- if test ! -s $tmp/subs.frag; then
- ac_more_lines=false
- else
- # The purpose of the label and of the branching condition is to
- # speed up the sed processing (if there are no `@' at all, there
- # is no need to browse any of the substitutions).
- # These are the two extra sed commands mentioned above.
- (echo ':t
- /@[a-zA-Z_][a-zA-Z_0-9]*@/!b' && cat $tmp/subs.frag) >$tmp/subs-$ac_sed_frag.sed
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds="sed -f $tmp/subs-$ac_sed_frag.sed"
- else
- ac_sed_cmds="$ac_sed_cmds | sed -f $tmp/subs-$ac_sed_frag.sed"
- fi
- ac_sed_frag=`expr $ac_sed_frag + 1`
- ac_beg=$ac_end
- ac_end=`expr $ac_end + $ac_max_sed_lines`
- fi
- done
- if test -z "$ac_sed_cmds"; then
- ac_sed_cmds=cat
- fi
-fi # test -n "$CONFIG_FILES"
-
-for ac_file in : $CONFIG_FILES; do test "x$ac_file" = x: && continue
- # Support "outfile[:infile[:infile...]]", defaulting infile="outfile.in".
- case $ac_file in
- - | *:- | *:-:* ) # input from stdin
- cat >$tmp/stdin
- ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- *:* ) ac_file_in=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_file=`echo "$ac_file" | sed 's,:.*,,'` ;;
- * ) ac_file_in=$ac_file.in ;;
- esac
-
- # Compute @srcdir@, @top_srcdir@, and @INSTALL@ for subdirectories.
- ac_dir=`(dirname "$ac_file") 2>/dev/null ||
-$as_expr X"$ac_file" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_file" : 'X\(//\)[^/]' \| \
- X"$ac_file" : 'X\(//\)$' \| \
- X"$ac_file" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_file" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:660: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
-
- if test x"$ac_file" != x-; then
- { echo "$as_me:732: creating $ac_file" >&5
-echo "$as_me: creating $ac_file" >&6;}
- rm -f "$ac_file"
- fi
- # Let's still pretend it is `configure' which instantiates (i.e., don't
- # use $as_me), people would be surprised to read:
- # /* config.h. Generated by config.status. */
- if test x"$ac_file" = x-; then
- configure_input=
- else
- configure_input="$ac_file. "
- fi
- configure_input=$configure_input"Generated from `echo $ac_file_in |
- sed 's,.*/,,'` by configure."
-
- # First look for the input files in the build tree, otherwise in the
- # src tree.
- ac_file_inputs=`IFS=:
- for f in $ac_file_in; do
- case $f in
- -) echo $tmp/stdin ;;
- [\\/$]*)
- # Absolute (can't be DOS-style, as IFS=:)
- test -f "$f" || { { echo "$as_me:755: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- echo "$f";;
- *) # Relative
- if test -f "$f"; then
- # Build tree
- echo "$f"
- elif test -f "$srcdir/$f"; then
- # Source tree
- echo "$srcdir/$f"
- else
- # /dev/null tree
- { { echo "$as_me:768: error: cannot find input file: $f" >&5
-echo "$as_me: error: cannot find input file: $f" >&2;}
- { (exit 1); exit 1; }; }
- fi;;
- esac
- done` || { (exit 1); exit 1; }
- sed "
-
-:t
-/@[a-zA-Z_][a-zA-Z_0-9]*@/!b
-s,@configure_input@,$configure_input,;t t
-s,@srcdir@,$ac_srcdir,;t t
-s,@abs_srcdir@,$ac_abs_srcdir,;t t
-s,@top_srcdir@,$ac_top_srcdir,;t t
-s,@abs_top_srcdir@,$ac_abs_top_srcdir,;t t
-s,@builddir@,$ac_builddir,;t t
-s,@abs_builddir@,$ac_abs_builddir,;t t
-s,@top_builddir@,$ac_top_builddir,;t t
-s,@abs_top_builddir@,$ac_abs_top_builddir,;t t
-" $ac_file_inputs | (eval "$ac_sed_cmds") >$tmp/out
- rm -f $tmp/stdin
- if test x"$ac_file" != x-; then
- mv $tmp/out $ac_file
- else
- cat $tmp/out
- rm -f $tmp/out
- fi
-
-done
-
-#
-# CONFIG_COMMANDS section.
-#
-for ac_file in : $CONFIG_COMMANDS; do test "x$ac_file" = x: && continue
- ac_dest=`echo "$ac_file" | sed 's,:.*,,'`
- ac_source=`echo "$ac_file" | sed 's,[^:]*:,,'`
- ac_dir=`(dirname "$ac_dest") 2>/dev/null ||
-$as_expr X"$ac_dest" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$ac_dest" : 'X\(//\)[^/]' \| \
- X"$ac_dest" : 'X\(//\)$' \| \
- X"$ac_dest" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$ac_dest" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- { if $as_mkdir_p; then
- mkdir -p "$ac_dir"
- else
- as_dir="$ac_dir"
- as_dirs=
- while test ! -d "$as_dir"; do
- as_dirs="$as_dir $as_dirs"
- as_dir=`(dirname "$as_dir") 2>/dev/null ||
-$as_expr X"$as_dir" : 'X\(.*[^/]\)//*[^/][^/]*/*$' \| \
- X"$as_dir" : 'X\(//\)[^/]' \| \
- X"$as_dir" : 'X\(//\)$' \| \
- X"$as_dir" : 'X\(/\)' \| \
- . : '\(.\)' 2>/dev/null ||
-echo X"$as_dir" |
- sed '/^X\(.*[^/]\)\/\/*[^/][^/]*\/*$/{ s//\1/; q; }
- /^X\(\/\/\)[^/].*/{ s//\1/; q; }
- /^X\(\/\/\)$/{ s//\1/; q; }
- /^X\(\/\).*/{ s//\1/; q; }
- s/.*/./; q'`
- done
- test ! -n "$as_dirs" || mkdir $as_dirs
- fi || { { echo "$as_me:837: error: cannot create directory \"$ac_dir\"" >&5
-echo "$as_me: error: cannot create directory \"$ac_dir\"" >&2;}
- { (exit 1); exit 1; }; }; }
-
- ac_builddir=.
-
-if test "$ac_dir" != .; then
- ac_dir_suffix=/`echo "$ac_dir" | sed 's,^\.[\\/],,'`
- # A "../" for each directory in $ac_dir_suffix.
- ac_top_builddir=`echo "$ac_dir_suffix" | sed 's,/[^\\/]*,../,g'`
-else
- ac_dir_suffix= ac_top_builddir=
-fi
-
-case $srcdir in
- .) # No --srcdir option. We are building in place.
- ac_srcdir=.
- if test -z "$ac_top_builddir"; then
- ac_top_srcdir=.
- else
- ac_top_srcdir=`echo $ac_top_builddir | sed 's,/$,,'`
- fi ;;
- [\\/]* | ?:[\\/]* ) # Absolute path.
- ac_srcdir=$srcdir$ac_dir_suffix;
- ac_top_srcdir=$srcdir ;;
- *) # Relative path.
- ac_srcdir=$ac_top_builddir$srcdir$ac_dir_suffix
- ac_top_srcdir=$ac_top_builddir$srcdir ;;
-esac
-
-# Do not use `cd foo && pwd` to compute absolute paths, because
-# the directories may not exist.
-case `pwd` in
-.) ac_abs_builddir="$ac_dir";;
-*)
- case "$ac_dir" in
- .) ac_abs_builddir=`pwd`;;
- [\\/]* | ?:[\\/]* ) ac_abs_builddir="$ac_dir";;
- *) ac_abs_builddir=`pwd`/"$ac_dir";;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_builddir=${ac_top_builddir}.;;
-*)
- case ${ac_top_builddir}. in
- .) ac_abs_top_builddir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_builddir=${ac_top_builddir}.;;
- *) ac_abs_top_builddir=$ac_abs_builddir/${ac_top_builddir}.;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_srcdir=$ac_srcdir;;
-*)
- case $ac_srcdir in
- .) ac_abs_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_srcdir=$ac_srcdir;;
- *) ac_abs_srcdir=$ac_abs_builddir/$ac_srcdir;;
- esac;;
-esac
-case $ac_abs_builddir in
-.) ac_abs_top_srcdir=$ac_top_srcdir;;
-*)
- case $ac_top_srcdir in
- .) ac_abs_top_srcdir=$ac_abs_builddir;;
- [\\/]* | ?:[\\/]* ) ac_abs_top_srcdir=$ac_top_srcdir;;
- *) ac_abs_top_srcdir=$ac_abs_builddir/$ac_top_srcdir;;
- esac;;
-esac
-
-
- { echo "$as_me:907: executing $ac_dest commands" >&5
-echo "$as_me: executing $ac_dest commands" >&6;}
- case $ac_dest in
- Tcl.framework ) n=Tcl &&
- f=$n.framework && v=Versions/$VERSION &&
- rm -rf $f && mkdir -p $f/$v/Resources &&
- ln -s $v/$n $v/Resources $f && ln -s ../../../$n $f/$v &&
- ln -s ../../../../$n-Info.plist $f/$v/Resources/Info.plist &&
- unset n f v
- ;;
- esac
-done
-
-{ (exit 0); exit 0; }
diff --git a/unix/configure b/unix/configure
index 05e83d6..5933760 100755
--- a/unix/configure
+++ b/unix/configure
@@ -1,6 +1,6 @@
#! /bin/sh
# Guess values for system-dependent variables and create Makefiles.
-# Generated by GNU Autoconf 2.70 for tcl 8.7.
+# Generated by GNU Autoconf 2.70 for tcl 9.0.
#
#
# Copyright (C) 1992-1996, 1998-2017, 2020 Free Software Foundation, Inc.
@@ -607,8 +607,8 @@ MAKEFLAGS=
# Identity of this package.
PACKAGE_NAME='tcl'
PACKAGE_TARNAME='tcl'
-PACKAGE_VERSION='8.7'
-PACKAGE_STRING='tcl 8.7'
+PACKAGE_VERSION='9.0'
+PACKAGE_STRING='tcl 9.0'
PACKAGE_BUGREPORT=''
PACKAGE_URL=''
@@ -1371,7 +1371,7 @@ if test "$ac_init_help" = "long"; then
# Omit some internal or obsolete options to make the list less imposing.
# This message is too long to be a string in the A/UX 3.1 sh.
cat <<_ACEOF
-\`configure' configures tcl 8.7 to adapt to many kinds of systems.
+\`configure' configures tcl 9.0 to adapt to many kinds of systems.
Usage: $0 [OPTION]... [VAR=VALUE]...
@@ -1433,7 +1433,7 @@ fi
if test -n "$ac_init_help"; then
case $ac_init_help in
- short | recursive ) echo "Configuration of tcl 8.7:";;
+ short | recursive ) echo "Configuration of tcl 9.0:";;
esac
cat <<\_ACEOF
@@ -1550,7 +1550,7 @@ fi
test -n "$ac_init_help" && exit $ac_status
if $ac_init_version; then
cat <<\_ACEOF
-tcl configure 8.7
+tcl configure 9.0
generated by GNU Autoconf 2.70
Copyright (C) 2020 Free Software Foundation, Inc.
@@ -2018,7 +2018,7 @@ cat >config.log <<_ACEOF
This file contains any messages produced by compilers while
running configure, to aid debugging if configure makes a mistake.
-It was created by tcl $as_me 8.7, which was
+It was created by tcl $as_me 9.0, which was
generated by GNU Autoconf 2.70. Invocation command line was
$ $0$ac_configure_args_raw
@@ -2680,10 +2680,10 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
-TCL_VERSION=8.7
-TCL_MAJOR_VERSION=8
-TCL_MINOR_VERSION=7
-TCL_PATCH_LEVEL="a4"
+TCL_VERSION=9.0
+TCL_MAJOR_VERSION=9
+TCL_MINOR_VERSION=0
+TCL_PATCH_LEVEL="a2"
VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
@@ -10425,9 +10425,6 @@ fi
printf "%s\n" "#define USE_VFORK 1" >>confdefs.h
-printf "%s\n" "#define TCL_DEFAULT_ENCODING \"utf-8\"" >>confdefs.h
-
-
printf "%s\n" "#define TCL_LOAD_FROM_MEMORY 1" >>confdefs.h
@@ -11848,7 +11845,7 @@ cat >>$CONFIG_STATUS <<\_ACEOF || ac_write_fail=1
# report actual input values of CONFIG_FILES etc. instead of their
# values after options handling.
ac_log="
-This file was extended by tcl $as_me 8.7, which was
+This file was extended by tcl $as_me 9.0, which was
generated by GNU Autoconf 2.70. Invocation command line was
CONFIG_FILES = $CONFIG_FILES
@@ -11907,7 +11904,7 @@ ac_cs_config_escaped=`printf "%s\n" "$ac_cs_config" | sed "s/^ //; s/'/'\\\\\\\\
cat >>$CONFIG_STATUS <<_ACEOF || ac_write_fail=1
ac_cs_config='$ac_cs_config_escaped'
ac_cs_version="\\
-tcl config.status 8.7
+tcl config.status 9.0
configured by $0, generated by GNU Autoconf 2.70,
with options \\"\$ac_cs_config\\"
diff --git a/unix/configure.ac b/unix/configure.ac
index 067fc70..685a335 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -3,7 +3,7 @@ dnl This file is an input file used by the GNU "autoconf" program to
dnl generate the file "configure", which is run during Tcl installation
dnl to configure the system for the local environment.
-AC_INIT([tcl],[8.7])
+AC_INIT([tcl],[9.0])
AC_PREREQ([2.69])
dnl This is only used when included from macosx/configure.ac
@@ -23,10 +23,10 @@ m4_ifdef([SC_USE_CONFIG_HEADERS], [
#endif /* _TCLCONFIG */])
])
-TCL_VERSION=8.7
-TCL_MAJOR_VERSION=8
-TCL_MINOR_VERSION=7
-TCL_PATCH_LEVEL="a4"
+TCL_VERSION=9.0
+TCL_MAJOR_VERSION=9
+TCL_MINOR_VERSION=0
+TCL_PATCH_LEVEL="a2"
VERSION=${TCL_VERSION}
EXTRA_INSTALL_BINARIES=${EXTRA_INSTALL_BINARIES:-"@:"}
@@ -579,8 +579,6 @@ if test "`uname -s`" = "Darwin" ; then
AC_CHECK_FUNCS(OSSpinLockLock)
fi
AC_DEFINE(USE_VFORK, 1, [Should we use vfork() instead of fork()?])
- AC_DEFINE(TCL_DEFAULT_ENCODING, "utf-8",
- [Are we to override what our default encoding is?])
AC_DEFINE(TCL_LOAD_FROM_MEMORY, 1,
[Can this platform load code from memory?])
AC_DEFINE(TCL_WIDE_CLICKS, 1,
diff --git a/unix/dltest/Makefile.in b/unix/dltest/Makefile.in
index 500bf97..7a872c5 100644
--- a/unix/dltest/Makefile.in
+++ b/unix/dltest/Makefile.in
@@ -25,13 +25,19 @@ LDFLAGS = @LDFLAGS_DEFAULT@ @LDFLAGS@
CC_SWITCHES = $(CFLAGS) -I${SRC_DIR}/../../generic -DTCL_MEM_DEBUG \
${SHLIB_CFLAGS} -DUSE_TCL_STUBS ${AC_FLAGS}
-all: pkga${SHLIB_SUFFIX} pkgb${SHLIB_SUFFIX} pkgc${SHLIB_SUFFIX} pkgd${SHLIB_SUFFIX} pkge${SHLIB_SUFFIX} pkgua${SHLIB_SUFFIX} pkgooa${SHLIB_SUFFIX}
+all: embtest tcl9pkga${SHLIB_SUFFIX} tcl9pkgb${SHLIB_SUFFIX} tcl9pkgc${SHLIB_SUFFIX} tcl9pkgd${SHLIB_SUFFIX} tcl9pkge${SHLIB_SUFFIX} tcl9pkgua${SHLIB_SUFFIX} tcl9pkgooa${SHLIB_SUFFIX}
@if test -n "$(DLTEST_SUFFIX)"; then $(MAKE) dltest_suffix; fi
@touch ../dltest.marker
-dltest_suffix: pkga${DLTEST_SUFFIX} pkgb${DLTEST_SUFFIX} pkgc${DLTEST_SUFFIX} pkgd${DLTEST_SUFFIX} pkge${DLTEST_SUFFIX} pkgua${DLTEST_SUFFIX} pkgooa${DLTEST_SUFFIX}
+dltest_suffix: tcl9pkga${DLTEST_SUFFIX} tcl9pkgb${DLTEST_SUFFIX} tcl9pkgc${DLTEST_SUFFIX} tcl9pkgd${DLTEST_SUFFIX} tcl9pkge${DLTEST_SUFFIX} tcl9pkgua${DLTEST_SUFFIX} tcl9pkgooa${DLTEST_SUFFIX}
@touch ../dltest.marker
+embtest.o: $(SRC_DIR)/embtest.c
+ $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/embtest.c
+
+pkgπ.o: $(SRC_DIR)/pkgπ.c
+ $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgπ.c
+
pkga.o: $(SRC_DIR)/pkga.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkga.c
@@ -53,50 +59,59 @@ pkgua.o: $(SRC_DIR)/pkgua.c
pkgooa.o: $(SRC_DIR)/pkgooa.c
$(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgooa.c
-pkga${SHLIB_SUFFIX}: pkga.o
- ${SHLIB_LD} -o pkga${SHLIB_SUFFIX} pkga.o ${SHLIB_LD_LIBS}
+embtest: embtest.o
+ $(CC) -o $@ embtest.o ${SHLIB_LD_LIBS}
+
+tcl9pkgπ${SHLIB_SUFFIX}: pkgπ.o
+ ${SHLIB_LD} -o $@ pkgπ.o ${SHLIB_LD_LIBS}
+
+tcl9pkga${SHLIB_SUFFIX}: pkga.o
+ ${SHLIB_LD} -o $@ pkga.o ${SHLIB_LD_LIBS}
+
+tcl9pkgb${SHLIB_SUFFIX}: pkgb.o
+ ${SHLIB_LD} -o $@ pkgb.o ${SHLIB_LD_LIBS}
-pkgb${SHLIB_SUFFIX}: pkgb.o
- ${SHLIB_LD} -o pkgb${SHLIB_SUFFIX} pkgb.o ${SHLIB_LD_LIBS}
+tcl9pkgc${SHLIB_SUFFIX}: pkgc.o
+ ${SHLIB_LD} -o $@ pkgc.o ${SHLIB_LD_LIBS}
-pkgc${SHLIB_SUFFIX}: pkgc.o
- ${SHLIB_LD} -o pkgc${SHLIB_SUFFIX} pkgc.o ${SHLIB_LD_LIBS}
+tcl9pkgd${SHLIB_SUFFIX}: pkgd.o
+ ${SHLIB_LD} -o $@ pkgd.o ${SHLIB_LD_LIBS}
-pkgd${SHLIB_SUFFIX}: pkgd.o
- ${SHLIB_LD} -o pkgd${SHLIB_SUFFIX} pkgd.o ${SHLIB_LD_LIBS}
+tcl9pkge${SHLIB_SUFFIX}: pkge.o
+ ${SHLIB_LD} -o $@ pkge.o ${SHLIB_LD_LIBS}
-pkge${SHLIB_SUFFIX}: pkge.o
- ${SHLIB_LD} -o pkge${SHLIB_SUFFIX} pkge.o ${SHLIB_LD_LIBS}
+tcl9pkgua${SHLIB_SUFFIX}: pkgua.o
+ ${SHLIB_LD} -o $@ pkgua.o ${SHLIB_LD_LIBS}
-pkgua${SHLIB_SUFFIX}: pkgua.o
- ${SHLIB_LD} -o pkgua${SHLIB_SUFFIX} pkgua.o ${SHLIB_LD_LIBS}
+tcl9pkgooa${SHLIB_SUFFIX}: pkgooa.o
+ ${SHLIB_LD} -o $@ pkgooa.o ${SHLIB_LD_LIBS}
-pkgooa${SHLIB_SUFFIX}: pkgooa.o
- ${SHLIB_LD} -o pkgooa${SHLIB_SUFFIX} pkgooa.o ${SHLIB_LD_LIBS}
+tcl9pkgπ${DLTEST_SUFFIX}: pkgπ.o
+ ${DLTEST_LD} -o $@ pkgπ.o ${SHLIB_LD_LIBS}
-pkga${DLTEST_SUFFIX}: pkga.o
- ${DLTEST_LD} -o pkga${DLTEST_SUFFIX} pkga.o ${SHLIB_LD_LIBS}
+tcl9pkga${DLTEST_SUFFIX}: pkga.o
+ ${DLTEST_LD} -o $@ pkga.o ${SHLIB_LD_LIBS}
-pkgb${DLTEST_SUFFIX}: pkgb.o
- ${DLTEST_LD} -o pkgb${DLTEST_SUFFIX} pkgb.o ${SHLIB_LD_LIBS}
+tcl9pkgb${DLTEST_SUFFIX}: pkgb.o
+ ${DLTEST_LD} -o $@ pkgb.o ${SHLIB_LD_LIBS}
-pkgc${DLTEST_SUFFIX}: pkgc.o
- ${DLTEST_LD} -o pkgc${DLTEST_SUFFIX} pkgc.o ${SHLIB_LD_LIBS}
+tcl9pkgc${DLTEST_SUFFIX}: pkgc.o
+ ${DLTEST_LD} -o $@ pkgc.o ${SHLIB_LD_LIBS}
-pkgd${DLTEST_SUFFIX}: pkgd.o
- ${DLTEST_LD} -o pkgd${DLTEST_SUFFIX} pkgd.o ${SHLIB_LD_LIBS}
+tcl9pkgd${DLTEST_SUFFIX}: pkgd.o
+ ${DLTEST_LD} -o $@ pkgd.o ${SHLIB_LD_LIBS}
-pkge${DLTEST_SUFFIX}: pkge.o
- ${DLTEST_LD} -o pkge${DLTEST_SUFFIX} pkge.o ${SHLIB_LD_LIBS}
+tcl9pkge${DLTEST_SUFFIX}: pkge.o
+ ${DLTEST_LD} -o $@ pkge.o ${SHLIB_LD_LIBS}
-pkgua${DLTEST_SUFFIX}: pkgua.o
- ${DLTEST_LD} -o pkgua${DLTEST_SUFFIX} pkgua.o ${SHLIB_LD_LIBS}
+tcl9pkgua${DLTEST_SUFFIX}: pkgua.o
+ ${DLTEST_LD} -o $@ pkgua.o ${SHLIB_LD_LIBS}
-pkgooa${DLTEST_SUFFIX}: pkgooa.o
- ${DLTEST_LD} -o pkgooa${DLTEST_SUFFIX} pkgooa.o ${SHLIB_LD_LIBS}
+tcl9pkgooa${DLTEST_SUFFIX}: pkgooa.o
+ ${DLTEST_LD} -o $@ pkgooa.o ${SHLIB_LD_LIBS}
clean:
- rm -f *.o lib.exp ../dltest.marker
+ rm -f embtest *.o lib.exp ../dltest.marker
@if test "$(SHLIB_SUFFIX)" != ""; then \
echo "rm -f *${SHLIB_SUFFIX}" ; \
rm -f *${SHLIB_SUFFIX} ; \
diff --git a/unix/dltest/embtest.c b/unix/dltest/embtest.c
new file mode 100644
index 0000000..1111268
--- /dev/null
+++ b/unix/dltest/embtest.c
@@ -0,0 +1,36 @@
+#include "tcl.h"
+#include <stdio.h>
+
+MODULE_SCOPE const TclStubs *tclStubsPtr;
+
+int main(int argc, char **argv) {
+ const char *version;
+ int exitcode = 0;
+
+ if (tclStubsPtr != NULL) {
+ printf("ERROR: stub table is already initialized");
+ exitcode = 1;
+ }
+ tclStubsPtr = NULL;
+ version = Tcl_SetPanicProc(Tcl_ConsolePanic);
+ if (tclStubsPtr == NULL) {
+ printf("ERROR: Tcl_SetPanicProc does not initialize the stub table\n");
+ exitcode = 1;
+ }
+ tclStubsPtr = NULL;
+ version = Tcl_InitSubsystems();
+ if (tclStubsPtr == NULL) {
+ printf("ERROR: Tcl_InitSubsystems does not initialize the stub table\n");
+ exitcode = 1;
+ }
+ tclStubsPtr = NULL;
+ version = Tcl_FindExecutable(argv[0]);
+ if (tclStubsPtr == NULL) {
+ printf("ERROR: Tcl_FindExecutable does not initialize the stub table\n");
+ exitcode = 1;
+ }
+ if (!exitcode) {
+ printf("All OK!\n");
+ }
+ return exitcode;
+}
diff --git a/unix/dltest/pkgπ.c b/unix/dltest/pkgπ.c
new file mode 100644
index 0000000..1cf95cf
--- /dev/null
+++ b/unix/dltest/pkgπ.c
@@ -0,0 +1,95 @@
+/*
+ * pkgπ.c --
+ *
+ * This file contains a simple Tcl package "pkgπ" that is intended for
+ * testing the Tcl dynamic loading facilities.
+ *
+ * Copyright © 1995 Sun Microsystems, Inc.
+ *
+ * See the file "license.terms" for information on usage and redistribution of
+ * this file, and for a DISCLAIMER OF ALL WARRANTIES.
+ */
+
+#undef STATIC_BUILD
+#include "tcl.h"
+
+/*
+ * Prototypes for procedures defined later in this file:
+ */
+
+static int Pkg\u03C0_\u03A0ObjCmd(ClientData clientData,
+ Tcl_Interp *interp, int objc, Tcl_Obj *const objv[]);
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Pkga_EqObjCmd --
+ *
+ * This procedure is invoked to process the "pkga_eq" Tcl command. It
+ * expects two arguments and returns 1 if they are the same, 0 if they
+ * are different.
+ *
+ * Results:
+ * A standard Tcl result.
+ *
+ * Side effects:
+ * See the user documentation.
+ *
+ *----------------------------------------------------------------------
+ */
+
+static int
+Pkg\u03C0_\u03A0ObjCmd(
+ void *dummy, /* Not used. */
+ Tcl_Interp *interp, /* Current interpreter. */
+ int objc, /* Number of arguments. */
+ Tcl_Obj *const objv[]) /* Argument objects. */
+{
+ int result;
+ const char *str1, *str2;
+ int len1, len2;
+ (void)dummy;
+
+ if (objc != 1) {
+ Tcl_WrongNumArgs(interp, 1, objv, "");
+ return TCL_ERROR;
+ }
+
+ Tcl_SetObjResult(interp, Tcl_NewDoubleObj(3.14159));
+ return TCL_OK;
+}
+
+/*
+ *----------------------------------------------------------------------
+ *
+ * Pkgπ_Init --
+ *
+ * This is a package initialization procedure, which is called by Tcl
+ * when this package is to be added to an interpreter.
+ *
+ * Results:
+ * None.
+ *
+ * Side effects:
+ * None.
+ *
+ *----------------------------------------------------------------------
+ */
+
+DLLEXPORT int
+Pkg\u03C0_Init(
+ Tcl_Interp *interp) /* Interpreter in which the package is to be
+ * made available. */
+{
+ int code;
+
+ if (Tcl_InitStubs(interp, "9.0", 0) == NULL) {
+ return TCL_ERROR;
+ }
+ code = Tcl_PkgProvide(interp, "pkgπ", "1.0");
+ if (code != TCL_OK) {
+ return code;
+ }
+ Tcl_CreateObjCommand(interp, "π", Pkg\u03C0_\u03A0ObjCmd, NULL, NULL);
+ return TCL_OK;
+}
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 0f22ae1..c1dad2c 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -93,11 +93,11 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
`ls -d /usr/local/lib 2>/dev/null` \
`ls -d /usr/contrib/lib 2>/dev/null` \
`ls -d /usr/pkg/lib 2>/dev/null` \
- `ls -d /usr/lib/tcl8.7 2>/dev/null` \
+ `ls -d /usr/lib/tcl9.0 2>/dev/null` \
`ls -d /usr/lib 2>/dev/null` \
`ls -d /usr/lib64 2>/dev/null` \
- `ls -d /usr/local/lib/tcl8.7 2>/dev/null` \
- `ls -d /usr/local/lib/tcl/tcl8.7 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl9.0 2>/dev/null` \
+ `ls -d /usr/local/lib/tcl/tcl9.0 2>/dev/null` \
; do
if test -f "$i/tclConfig.sh" ; then
ac_cv_c_tclconfig="`(cd $i; pwd)`"
diff --git a/unix/tcl.spec b/unix/tcl.spec
index b62fa2b..b0a8016 100644
--- a/unix/tcl.spec
+++ b/unix/tcl.spec
@@ -4,7 +4,7 @@
Name: tcl
Summary: Tcl scripting language development environment
-Version: 8.7a4
+Version: 9.0a2
Release: 2
License: BSD
Group: Development/Languages
diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c
index f3caae7..f649c59 100644
--- a/unix/tclAppInit.c
+++ b/unix/tclAppInit.c
@@ -12,8 +12,6 @@
* this file, and for a DISCLAIMER OF ALL WARRANTIES.
*/
-#undef BUILD_tcl
-#undef STATIC_BUILD
#include "tcl.h"
#if TCL_MAJOR_VERSION < 9 && TCL_MINOR_VERSION < 7
# define Tcl_LibraryInitProc Tcl_PackageInitProc
@@ -157,10 +155,10 @@ Tcl_AppInit(
*/
#ifdef DJGPP
- (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
Tcl_NewStringObj("~/tclsh.rc", -1), TCL_GLOBAL_ONLY);
#else
- (Tcl_ObjSetVar2)(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
+ Tcl_ObjSetVar2(interp, Tcl_NewStringObj("tcl_rcFileName", -1), NULL,
Tcl_NewStringObj("~/.tclshrc", -1), TCL_GLOBAL_ONLY);
#endif
diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in
index 0bf3c3d..6a61bd0 100644
--- a/unix/tclConfig.h.in
+++ b/unix/tclConfig.h.in
@@ -417,9 +417,6 @@
/* Are bytecode statistics enabled? */
#undef TCL_COMPILE_STATS
-/* Are we to override what our default encoding is? */
-#undef TCL_DEFAULT_ENCODING
-
/* Is Tcl built as a framework? */
#undef TCL_FRAMEWORK
diff --git a/unix/tclConfig.sh.in b/unix/tclConfig.sh.in
index f2ac768..30d0bda 100644
--- a/unix/tclConfig.sh.in
+++ b/unix/tclConfig.sh.in
@@ -21,11 +21,6 @@ TCL_CC='@CC@'
# -D flags for use with the C compiler.
TCL_DEFS='@DEFS@'
-# 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@'
TCL_CFLAGS_OPTIMIZE='@CFLAGS_OPTIMIZE@'
diff --git a/unix/tclEpollNotfy.c b/unix/tclEpollNotfy.c
index 23c88b2..a6a183b 100644
--- a/unix/tclEpollNotfy.c
+++ b/unix/tclEpollNotfy.c
@@ -207,7 +207,7 @@ PlatformEventsControl(
}
if (isNew) {
newPedPtr = (struct PlatformEventData *)
- ckalloc(sizeof(struct PlatformEventData));
+ Tcl_Alloc(sizeof(struct PlatformEventData));
newPedPtr->filePtr = filePtr;
newPedPtr->tsdPtr = tsdPtr;
filePtr->pedPtr = newPedPtr;
@@ -287,14 +287,14 @@ TclpFinalizeNotifier(
tsdPtr->triggerPipe[1] = -1;
}
#endif /* HAVE_EVENTFD */
- ckfree(tsdPtr->triggerFilePtr->pedPtr);
- ckfree(tsdPtr->triggerFilePtr);
+ Tcl_Free(tsdPtr->triggerFilePtr->pedPtr);
+ Tcl_Free(tsdPtr->triggerFilePtr);
if (tsdPtr->eventsFd > 0) {
close(tsdPtr->eventsFd);
tsdPtr->eventsFd = 0;
}
if (tsdPtr->readyEvents) {
- ckfree(tsdPtr->readyEvents);
+ Tcl_Free(tsdPtr->readyEvents);
tsdPtr->maxReadyEvents = 0;
}
pthread_mutex_unlock(&tsdPtr->notifierMutex);
@@ -339,7 +339,7 @@ PlatformEventsInit(void)
if (errno) {
Tcl_Panic("Tcl_InitNotifier: %s", "could not create mutex");
}
- filePtr = (FileHandler *) ckalloc(sizeof(FileHandler));
+ filePtr = (FileHandler *) Tcl_Alloc(sizeof(FileHandler));
#ifdef HAVE_EVENTFD
tsdPtr->triggerEventFd = eventfd(0, EFD_CLOEXEC | EFD_NONBLOCK);
if (tsdPtr->triggerEventFd <= 0) {
@@ -360,7 +360,7 @@ PlatformEventsInit(void)
PlatformEventsControl(filePtr, tsdPtr, EPOLL_CTL_ADD, 1);
if (!tsdPtr->readyEvents) {
tsdPtr->maxReadyEvents = 512;
- tsdPtr->readyEvents = (struct epoll_event *) ckalloc(
+ tsdPtr->readyEvents = (struct epoll_event *) Tcl_Alloc(
tsdPtr->maxReadyEvents * sizeof(tsdPtr->readyEvents[0]));
}
LIST_INIT(&tsdPtr->firstReadyFileHandlerPtr);
@@ -508,7 +508,7 @@ TclpCreateFileHandler(
int isNew = (filePtr == NULL);
if (isNew) {
- filePtr = (FileHandler *) ckalloc(sizeof(FileHandler));
+ filePtr = (FileHandler *) Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = fd;
filePtr->readyMask = 0;
filePtr->nextPtr = tsdPtr->firstFileHandlerPtr;
@@ -565,7 +565,7 @@ TclpDeleteFileHandler(
PlatformEventsControl(filePtr, tsdPtr, EPOLL_CTL_DEL, 0);
if (filePtr->pedPtr) {
- ckfree(filePtr->pedPtr);
+ Tcl_Free(filePtr->pedPtr);
}
/*
@@ -577,7 +577,7 @@ TclpDeleteFileHandler(
} else {
prevPtr->nextPtr = filePtr->nextPtr;
}
- ckfree(filePtr);
+ Tcl_Free(filePtr);
}
/*
@@ -671,7 +671,7 @@ TclpWaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr = (FileHandlerEvent *)
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
@@ -747,7 +747,7 @@ TclpWaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr = (FileHandlerEvent *)
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
diff --git a/unix/tclKqueueNotfy.c b/unix/tclKqueueNotfy.c
index ab3732d..2f62378 100644
--- a/unix/tclKqueueNotfy.c
+++ b/unix/tclKqueueNotfy.c
@@ -166,7 +166,7 @@ PlatformEventsControl(
if (isNew) {
newPedPtr = (struct PlatformEventData *)
- ckalloc(sizeof(struct PlatformEventData));
+ Tcl_Alloc(sizeof(struct PlatformEventData));
newPedPtr->filePtr = filePtr;
newPedPtr->tsdPtr = tsdPtr;
filePtr->pedPtr = newPedPtr;
@@ -288,7 +288,7 @@ TclpFinalizeNotifier(
tsdPtr->eventsFd = 0;
}
if (tsdPtr->readyEvents) {
- ckfree(tsdPtr->readyEvents);
+ Tcl_Free(tsdPtr->readyEvents);
tsdPtr->maxReadyEvents = 0;
}
pthread_mutex_unlock(&tsdPtr->notifierMutex);
@@ -355,13 +355,13 @@ TclpInitNotifier(void)
} else if (fcntl(tsdPtr->eventsFd, F_SETFD, FD_CLOEXEC) == -1) {
Tcl_Panic("fcntl: %s", strerror(errno));
}
- filePtr = (FileHandler *) ckalloc(sizeof(FileHandler));
+ filePtr = (FileHandler *) Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = tsdPtr->triggerPipe[0];
filePtr->mask = TCL_READABLE;
PlatformEventsControl(filePtr, tsdPtr, EV_ADD, 1);
if (!tsdPtr->readyEvents) {
tsdPtr->maxReadyEvents = 512;
- tsdPtr->readyEvents = (struct kevent *) ckalloc(
+ tsdPtr->readyEvents = (struct kevent *) Tcl_Alloc(
tsdPtr->maxReadyEvents * sizeof(tsdPtr->readyEvents[0]));
}
LIST_INIT(&tsdPtr->firstReadyFileHandlerPtr);
@@ -517,7 +517,7 @@ TclpCreateFileHandler(
int isNew = (filePtr == NULL);
if (isNew) {
- filePtr = (FileHandler *) ckalloc(sizeof(FileHandler));
+ filePtr = (FileHandler *) Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = fd;
filePtr->readyMask = 0;
filePtr->nextPtr = tsdPtr->firstFileHandlerPtr;
@@ -573,7 +573,7 @@ TclpDeleteFileHandler(
PlatformEventsControl(filePtr, tsdPtr, EV_DELETE, 0);
if (filePtr->pedPtr) {
- ckfree(filePtr->pedPtr);
+ Tcl_Free(filePtr->pedPtr);
}
/*
@@ -585,7 +585,7 @@ TclpDeleteFileHandler(
} else {
prevPtr->nextPtr = filePtr->nextPtr;
}
- ckfree(filePtr);
+ Tcl_Free(filePtr);
}
/*
@@ -687,7 +687,7 @@ TclpWaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr = (FileHandlerEvent *)
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
@@ -747,7 +747,7 @@ TclpWaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr = (FileHandlerEvent *)
- ckalloc(sizeof(FileHandlerEvent));
+ Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index 342dff6..bd3e92c 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -106,7 +106,7 @@ TclpDlopen(
*/
Tcl_DString ds;
- const char *fileName = Tcl_GetString(pathPtr);
+ const char *fileName = TclGetString(pathPtr);
native = Tcl_UtfToExternalDString(NULL, fileName, -1, &ds);
/*
@@ -127,11 +127,11 @@ TclpDlopen(
if (interp) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"couldn't load file \"%s\": %s",
- Tcl_GetString(pathPtr), errorStr));
+ TclGetString(pathPtr), errorStr));
}
return TCL_ERROR;
}
- newHandle = (Tcl_LoadHandle)ckalloc(sizeof(*newHandle));
+ newHandle = (Tcl_LoadHandle)Tcl_Alloc(sizeof(*newHandle));
newHandle->clientData = handle;
newHandle->findSymbolProcPtr = &FindSymbol;
newHandle->unloadFileProcPtr = &UnloadFile;
@@ -191,7 +191,7 @@ FindSymbol(
#ifdef __cplusplus
if (proc == NULL) {
char buf[32];
- sprintf(buf, "%d", Tcl_DStringLength(&ds));
+ sprintf(buf, "%d", (int)Tcl_DStringLength(&ds));
Tcl_DStringInit(&newName);
TclDStringAppendLiteral(&newName, "__Z");
Tcl_DStringAppend(&newName, buf, -1);
@@ -256,7 +256,7 @@ UnloadFile(
void *handle = loadHandle->clientData;
dlclose(handle);
- ckfree(loadHandle);
+ Tcl_Free(loadHandle);
}
/*
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 7cd48f2..24240af 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -184,7 +184,7 @@ TclpDlopen(
*/
nativePath = (const char *)Tcl_FSGetNativePath(pathPtr);
- nativeFileName = Tcl_UtfToExternalDString(NULL, Tcl_GetString(pathPtr),
+ nativeFileName = Tcl_UtfToExternalDString(NULL, TclGetString(pathPtr),
-1, &ds);
#if TCL_DYLD_USE_DLFCN
@@ -258,7 +258,7 @@ TclpDlopen(
module = NSLinkModule(dyldObjFileImage, nativePath, nsflags);
NSDestroyObjectFileImage(dyldObjFileImage);
if (module) {
- modulePtr = (Tcl_DyldModuleHandle *)ckalloc(sizeof(Tcl_DyldModuleHandle));
+ modulePtr = (Tcl_DyldModuleHandle *)Tcl_Alloc(sizeof(Tcl_DyldModuleHandle));
modulePtr->module = module;
modulePtr->nextPtr = NULL;
} else {
@@ -278,13 +278,13 @@ TclpDlopen(
|| dyldLibHeader || modulePtr
#endif /* TCL_DYLD_USE_NSMODULE */
) {
- dyldLoadHandle = (Tcl_DyldLoadHandle *)ckalloc(sizeof(Tcl_DyldLoadHandle));
+ dyldLoadHandle = (Tcl_DyldLoadHandle *)Tcl_Alloc(sizeof(Tcl_DyldLoadHandle));
dyldLoadHandle->dlHandle = dlHandle;
#if TCL_DYLD_USE_NSMODULE || defined(TCL_LOAD_FROM_MEMORY)
dyldLoadHandle->dyldLibHeader = dyldLibHeader;
dyldLoadHandle->modulePtr = modulePtr;
#endif /* TCL_DYLD_USE_NSMODULE || TCL_LOAD_FROM_MEMORY */
- newHandle = (Tcl_LoadHandle)ckalloc(sizeof(*newHandle));
+ newHandle = (Tcl_LoadHandle)Tcl_Alloc(sizeof(*newHandle));
newHandle->clientData = dyldLoadHandle;
newHandle->findSymbolProcPtr = &FindSymbol;
newHandle->unloadFileProcPtr = &UnloadFile;
@@ -382,7 +382,7 @@ FindSymbol(
modulePtr = modulePtr->nextPtr;
}
if (modulePtr == NULL) {
- modulePtr = (Tcl_DyldModuleHandle *)ckalloc(sizeof(Tcl_DyldModuleHandle));
+ modulePtr = (Tcl_DyldModuleHandle *)Tcl_Alloc(sizeof(Tcl_DyldModuleHandle));
modulePtr->module = module;
modulePtr->nextPtr = dyldLoadHandle->modulePtr;
dyldLoadHandle->modulePtr = modulePtr;
@@ -457,12 +457,12 @@ UnloadFile(
(void) NSUnLinkModule(modulePtr->module,
NSUNLINKMODULE_OPTION_RESET_LAZY_REFERENCES);
modulePtr = modulePtr->nextPtr;
- ckfree(ptr);
+ Tcl_Free(ptr);
}
#endif /* TCL_DYLD_USE_NSMODULE */
}
- ckfree(dyldLoadHandle);
- ckfree(loadHandle);
+ Tcl_Free(dyldLoadHandle);
+ Tcl_Free(loadHandle);
}
/*
@@ -583,7 +583,7 @@ TclpLoadMemory(
if ((size_t) codeSize >= sizeof(struct fat_header) +
fh_nfat_arch * sizeof(struct fat_arch)) {
- void *fatarchs = (char*)buffer + sizeof(struct fat_header);
+ void *fatarchs = (char *)buffer + sizeof(struct fat_header);
const NXArchInfo *arch = NXGetLocalArchInfo();
struct fat_arch *fa;
@@ -664,14 +664,14 @@ TclpLoadMemory(
* Stash the module reference within the load handle we create and return.
*/
- modulePtr = (Tcl_DyldModuleHandle *)ckalloc(sizeof(Tcl_DyldModuleHandle));
+ modulePtr = (Tcl_DyldModuleHandle *)Tcl_Alloc(sizeof(Tcl_DyldModuleHandle));
modulePtr->module = module;
modulePtr->nextPtr = NULL;
- dyldLoadHandle = (Tcl_DyldLoadHandle *)ckalloc(sizeof(Tcl_DyldLoadHandle));
+ dyldLoadHandle = (Tcl_DyldLoadHandle *)Tcl_Alloc(sizeof(Tcl_DyldLoadHandle));
dyldLoadHandle->dlHandle = NULL;
dyldLoadHandle->dyldLibHeader = NULL;
dyldLoadHandle->modulePtr = modulePtr;
- newHandle = (Tcl_LoadHandle)ckalloc(sizeof(*newHandle));
+ newHandle = (Tcl_LoadHandle)Tcl_Alloc(sizeof(*newHandle));
newHandle->clientData = dyldLoadHandle;
newHandle->findSymbolProcPtr = &FindSymbol;
newHandle->unloadFileProcPtr = &UnloadFile;
diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c
index 2055210..c50e5aa 100644
--- a/unix/tclLoadNext.c
+++ b/unix/tclLoadNext.c
@@ -61,7 +61,7 @@ TclpDlopen(
NXStream *errorStream = NXOpenMemory(0,0,NX_READWRITE);
- fileName = Tcl_GetString(pathPtr);
+ fileName = TclGetString(pathPtr);
/*
* First try the full path the user gave us. This is particularly
@@ -101,7 +101,7 @@ TclpDlopen(
}
NXCloseMemory(errorStream, NX_FREEBUFFER);
- newHandle = (Tcl_LoadHandle) ckalloc(sizeof(*newHandle));
+ newHandle = (Tcl_LoadHandle) Tcl_Alloc(sizeof(*newHandle));
newHandle->clientData = INT2PTR(1);
newHandle->findSymbolProcPtr = &FindSymbol;
newHandle->unloadFileProcPtr = &UnloadFile;
@@ -175,7 +175,7 @@ UnloadFile(
* TclpDlopen(). The loadHandle is a token
* that represents the loaded file. */
{
- ckfree(loadHandle);
+ Tcl_Free(loadHandle);
}
/*
diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c
index bb58871..bc49de2 100644
--- a/unix/tclLoadOSF.c
+++ b/unix/tclLoadOSF.c
@@ -79,7 +79,7 @@ TclpDlopen(
Tcl_LoadHandle newHandle;
ldr_module_t lm;
char *pkg;
- char *fileName = Tcl_GetString(pathPtr);
+ char *fileName = TclGetString(pathPtr);
const char *native;
/*
@@ -128,7 +128,7 @@ TclpDlopen(
} else {
pkg++;
}
- newHandle = (Tcl_LoadHandle)ckalloc(sizeof(*newHandle));
+ newHandle = (Tcl_LoadHandle)Tcl_Alloc(sizeof(*newHandle));
newHandle->clientData = pkg;
newHandle->findSymbolProcPtr = &FindSymbol;
newHandle->unloadFileProcPtr = &UnloadFile;
@@ -193,7 +193,7 @@ UnloadFile(
* TclpDlopen(). The loadHandle is a token
* that represents the loaded file. */
{
- ckfree(loadHandle);
+ Tcl_Free(loadHandle);
}
/*
diff --git a/unix/tclLoadShl.c b/unix/tclLoadShl.c
index 5bf97eb..ad75a91 100644
--- a/unix/tclLoadShl.c
+++ b/unix/tclLoadShl.c
@@ -57,7 +57,7 @@ TclpDlopen(
shl_t handle;
Tcl_LoadHandle newHandle;
const char *native;
- char *fileName = Tcl_GetString(pathPtr);
+ char *fileName = TclGetString(pathPtr);
/*
* The flags below used to be BIND_IMMEDIATE; they were changed at the
@@ -97,7 +97,7 @@ TclpDlopen(
fileName, Tcl_PosixError(interp)));
return TCL_ERROR;
}
- newHandle = (Tcl_LoadHandle)ckalloc(sizeof(*newHandle));
+ newHandle = (Tcl_LoadHandle)Tcl_Alloc(sizeof(*newHandle));
newHandle->clientData = handle;
newHandle->findSymbolProcPtr = &FindSymbol;
newHandle->unloadFileProcPtr = *unloadProcPtr = &UnloadFile;
@@ -182,7 +182,7 @@ UnloadFile(
shl_t handle = (shl_t) loadHandle->clientData;
shl_unload(handle);
- ckfree(loadHandle);
+ Tcl_Free(loadHandle);
}
/*
diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c
index 82f2ef7..1103dd2 100644
--- a/unix/tclSelectNotfy.c
+++ b/unix/tclSelectNotfy.c
@@ -459,7 +459,7 @@ TclpCreateFileHandler(
FileHandler *filePtr = LookUpFileHandler(tsdPtr, fd, NULL);
if (filePtr == NULL) {
- filePtr = (FileHandler *) ckalloc(sizeof(FileHandler));
+ filePtr = (FileHandler *) Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = fd;
filePtr->readyMask = 0;
filePtr->nextPtr = tsdPtr->firstFileHandlerPtr;
@@ -568,7 +568,7 @@ TclpDeleteFileHandler(
} else {
prevPtr->nextPtr = filePtr->nextPtr;
}
- ckfree(filePtr);
+ Tcl_Free(filePtr);
}
#if defined(__CYGWIN__)
@@ -858,7 +858,7 @@ TclpWaitForEvent(
if (filePtr->readyMask == 0) {
FileHandlerEvent *fileEvPtr =
- (FileHandlerEvent *) ckalloc(sizeof(FileHandlerEvent));
+ (FileHandlerEvent *) Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 4cb9af0..25bc70f 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -128,10 +128,6 @@ static int FileInputProc(void *instanceData, char *buf,
int toRead, int *errorCode);
static int FileOutputProc(void *instanceData,
const char *buf, int toWrite, int *errorCode);
-#ifndef TCL_NO_DEPRECATED
-static int FileSeekProc(void *instanceData, long offset,
- int mode, int *errorCode);
-#endif
static int FileTruncateProc(void *instanceData,
long long length);
static long long FileWideSeekProc(void *instanceData,
@@ -163,14 +159,10 @@ static int TtySetOptionProc(void *instanceData,
static const Tcl_ChannelType fileChannelType = {
"file", /* Type name. */
TCL_CHANNEL_VERSION_5, /* v5 channel */
- TCL_CLOSE2PROC, /* Close proc. */
+ NULL, /* Close proc. */
FileInputProc, /* Input proc. */
FileOutputProc, /* Output proc. */
-#ifndef TCL_NO_DEPRECATED
- FileSeekProc, /* Seek proc. */
-#else
NULL,
-#endif
NULL, /* Set option proc. */
NULL, /* Get option proc. */
FileWatchProc, /* Initialize notifier. */
@@ -193,7 +185,7 @@ static const Tcl_ChannelType fileChannelType = {
static const Tcl_ChannelType ttyChannelType = {
"tty", /* Type name. */
TCL_CHANNEL_VERSION_5, /* v5 channel */
- TCL_CLOSE2PROC, /* Close proc. */
+ NULL, /* Close proc. */
FileInputProc, /* Input proc. */
FileOutputProc, /* Output proc. */
NULL, /* Seek proc. */
@@ -283,7 +275,7 @@ FileInputProc(
*/
do {
- bytesRead = read(fsPtr->fd, buf, (size_t) toRead);
+ bytesRead = read(fsPtr->fd, buf, toRead);
} while ((bytesRead < 0) && (errno == EINTR));
if (bytesRead < 0) {
@@ -332,7 +324,7 @@ FileOutputProc(
return 0;
}
- written = write(fsPtr->fd, buf, (size_t) toWrite);
+ written = write(fsPtr->fd, buf, toWrite);
if (written >= 0) {
return written;
}
@@ -383,7 +375,7 @@ FileCloseProc(
errorCode = errno;
}
}
- ckfree(fsPtr);
+ Tcl_Free(fsPtr);
return errorCode;
}
@@ -434,67 +426,6 @@ TtyCloseProc(
/*
*----------------------------------------------------------------------
*
- * FileSeekProc --
- *
- * This function is called by the generic IO level to move the access
- * point in a file based channel.
- *
- * Results:
- * -1 if failed, the new position if successful. An output argument
- * contains the POSIX error code if an error occurred, or zero.
- *
- * Side effects:
- * Moves the location at which the channel will be accessed in future
- * operations.
- *
- *----------------------------------------------------------------------
- */
-#ifndef TCL_NO_DEPRECATED
-static int
-FileSeekProc(
- void *instanceData, /* File state. */
- long offset, /* Offset to seek to. */
- int mode, /* Relative to where should we seek? Can be
- * one of SEEK_START, SEEK_SET or SEEK_END. */
- int *errorCodePtr) /* To store error code. */
-{
- FileState *fsPtr = (FileState *)instanceData;
- long long oldLoc, newLoc;
-
- /*
- * Save our current place in case we need to roll-back the seek.
- */
-
- oldLoc = TclOSseek(fsPtr->fd, (Tcl_SeekOffset) 0, SEEK_CUR);
- if (oldLoc == -1) {
- /*
- * Bad things are happening. Error out...
- */
-
- *errorCodePtr = errno;
- return -1;
- }
-
- newLoc = TclOSseek(fsPtr->fd, (Tcl_SeekOffset) offset, mode);
-
- /*
- * Check for expressability in our return type, and roll-back otherwise.
- */
-
- if (newLoc > INT_MAX) {
- *errorCodePtr = EOVERFLOW;
- TclOSseek(fsPtr->fd, (Tcl_SeekOffset) oldLoc, SEEK_SET);
- return -1;
- } else {
- *errorCodePtr = (newLoc == -1) ? errno : 0;
- }
- return (int) newLoc;
-}
-#endif
-
-/*
- *----------------------------------------------------------------------
- *
* FileWideSeekProc --
*
* This function is called by the generic IO level to move the access
@@ -663,7 +594,7 @@ TtySetOptionProc(
const char *value) /* New value for option. */
{
TtyState *fsPtr = (TtyState *)instanceData;
- unsigned int len, vlen;
+ size_t len, vlen;
TtyAttrs tty;
int argc;
const char **argv;
@@ -748,7 +679,7 @@ TtySetOptionProc(
" two elements with each a single 8-bit character", -1));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", NULL);
}
- ckfree(argv);
+ Tcl_Free(argv);
return TCL_ERROR;
}
@@ -771,7 +702,7 @@ TtySetOptionProc(
}
iostate.c_cc[VSTOP] = character;
}
- ckfree(argv);
+ Tcl_Free(argv);
tcsetattr(fsPtr->fileState.fd, TCSADRAIN, &iostate);
return TCL_OK;
@@ -813,14 +744,14 @@ TtySetOptionProc(
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
"VALUE", NULL);
}
- ckfree(argv);
+ Tcl_Free(argv);
return TCL_ERROR;
}
ioctl(fsPtr->fileState.fd, TIOCMGET, &control);
for (i = 0; i < argc-1; i += 2) {
if (Tcl_GetBoolean(interp, argv[i+1], &flag) == TCL_ERROR) {
- ckfree(argv);
+ Tcl_Free(argv);
return TCL_ERROR;
}
if (Tcl_UtfNcasecmp(argv[i], "DTR", strlen(argv[i])) == 0) {
@@ -844,7 +775,7 @@ TtySetOptionProc(
}
#else /* TIOCSBRK & TIOCCBRK */
UNSUPPORTED_OPTION("-ttycontrol BREAK");
- ckfree(argv);
+ Tcl_Free(argv);
return TCL_ERROR;
#endif /* TIOCSBRK & TIOCCBRK */
} else {
@@ -855,13 +786,13 @@ TtySetOptionProc(
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
"VALUE", NULL);
}
- ckfree(argv);
+ Tcl_Free(argv);
return TCL_ERROR;
}
} /* -ttycontrol options loop */
ioctl(fsPtr->fileState.fd, TIOCMSET, &control);
- ckfree(argv);
+ Tcl_Free(argv);
return TCL_OK;
#else /* TIOCMGET&TIOCMSET */
UNSUPPORTED_OPTION("-ttycontrol");
@@ -1002,7 +933,7 @@ TtyGetOptionProc(
Tcl_DString *dsPtr) /* Where to store value(s). */
{
TtyState *fsPtr = (TtyState *)instanceData;
- unsigned int len;
+ size_t len;
char buf[3*TCL_INTEGER_SPACE + 16];
int valid = 0; /* Flag if valid option parsed. */
struct termios iostate;
@@ -1730,7 +1661,7 @@ TclpOpenFileChannel(
sprintf(channelName, "file%d", fd);
}
- fsPtr = (TtyState *)ckalloc(sizeof(TtyState));
+ fsPtr = (TtyState *)Tcl_Alloc(sizeof(TtyState));
fsPtr->fileState.validMask = channelPermissions | TCL_EXCEPTION;
fsPtr->fileState.fd = fd;
#ifdef SUPPORTS_TTY
@@ -1755,7 +1686,7 @@ TclpOpenFileChannel(
if (Tcl_SetChannelOption(interp, fsPtr->fileState.channel,
"-translation", translation) != TCL_OK) {
- Tcl_Close(NULL, fsPtr->fileState.channel);
+ Tcl_CloseEx(NULL, fsPtr->fileState.channel, 0);
return NULL;
}
}
@@ -1789,32 +1720,37 @@ Tcl_MakeFileChannel(
char channelName[16 + TCL_INTEGER_SPACE];
int fd = PTR2INT(handle);
const Tcl_ChannelType *channelTypePtr;
- struct sockaddr sockaddr;
- socklen_t sockaddrLen = sizeof(sockaddr);
+ struct stat buf;
if (mode == 0) {
return NULL;
}
- sockaddr.sa_family = AF_UNSPEC;
-
#ifdef SUPPORTS_TTY
if (isatty(fd)) {
channelTypePtr = &ttyChannelType;
sprintf(channelName, "serial%d", fd);
} else
#endif /* SUPPORTS_TTY */
- if ((getsockname(fd, (struct sockaddr *) &sockaddr, &sockaddrLen) == 0)
- && (sockaddrLen > 0)
- && (sockaddr.sa_family == AF_INET
- || sockaddr.sa_family == AF_INET6)) {
- return (Tcl_Channel)TclpMakeTcpClientChannelMode(INT2PTR(fd), mode);
+ if (fstat(fd, &buf) == 0 && S_ISSOCK(buf.st_mode)) {
+ struct sockaddr sockaddr;
+ socklen_t sockaddrLen = sizeof(sockaddr);
+
+ sockaddr.sa_family = AF_UNSPEC;
+ if ((getsockname(fd, (struct sockaddr *)&sockaddr, &sockaddrLen) == 0)
+ && (sockaddrLen > 0)
+ && (sockaddr.sa_family == AF_INET
+ || sockaddr.sa_family == AF_INET6)) {
+ return (Tcl_Channel)TclpMakeTcpClientChannelMode(INT2PTR(fd), mode);
+ }
+ goto normalChannelAfterAll;
} else {
+ normalChannelAfterAll:
channelTypePtr = &fileChannelType;
sprintf(channelName, "file%d", fd);
}
- fsPtr = (TtyState *)ckalloc(sizeof(TtyState));
+ fsPtr = (TtyState *)Tcl_Alloc(sizeof(TtyState));
fsPtr->fileState.fd = fd;
fsPtr->fileState.validMask = mode | TCL_EXCEPTION;
fsPtr->fileState.channel = Tcl_CreateChannel(channelTypePtr, channelName,
diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c
index 9e43c01..603285d 100644
--- a/unix/tclUnixCompat.c
+++ b/unix/tclUnixCompat.c
@@ -8,8 +8,6 @@
*/
#include "tclInt.h"
-#include <pwd.h>
-#include <grp.h>
#include <errno.h>
#include <string.h>
@@ -201,7 +199,7 @@ TclpGetPwNam(
if (tsdPtr->pbuflen < 1) {
tsdPtr->pbuflen = 1024;
}
- tsdPtr->pbuf = (char *)ckalloc(tsdPtr->pbuflen);
+ tsdPtr->pbuf = (char *)Tcl_Alloc(tsdPtr->pbuflen);
Tcl_CreateThreadExitHandler(FreePwBuf, NULL);
}
while (1) {
@@ -214,7 +212,7 @@ TclpGetPwNam(
return NULL;
}
tsdPtr->pbuflen *= 2;
- tsdPtr->pbuf = (char *)ckrealloc(tsdPtr->pbuf, tsdPtr->pbuflen);
+ tsdPtr->pbuf = (char *)Tcl_Realloc(tsdPtr->pbuf, tsdPtr->pbuflen);
}
return (pwPtr != NULL ? &tsdPtr->pwd : NULL);
@@ -281,7 +279,7 @@ TclpGetPwUid(
if (tsdPtr->pbuflen < 1) {
tsdPtr->pbuflen = 1024;
}
- tsdPtr->pbuf = (char *)ckalloc(tsdPtr->pbuflen);
+ tsdPtr->pbuf = (char *)Tcl_Alloc(tsdPtr->pbuflen);
Tcl_CreateThreadExitHandler(FreePwBuf, NULL);
}
while (1) {
@@ -294,7 +292,7 @@ TclpGetPwUid(
return NULL;
}
tsdPtr->pbuflen *= 2;
- tsdPtr->pbuf = (char *)ckrealloc(tsdPtr->pbuf, tsdPtr->pbuflen);
+ tsdPtr->pbuf = (char *)Tcl_Realloc(tsdPtr->pbuf, tsdPtr->pbuflen);
}
return (pwPtr != NULL ? &tsdPtr->pwd : NULL);
@@ -340,7 +338,7 @@ FreePwBuf(
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- ckfree(tsdPtr->pbuf);
+ Tcl_Free(tsdPtr->pbuf);
}
#endif /* NEED_PW_CLEANER */
@@ -384,7 +382,7 @@ TclpGetGrNam(
if (tsdPtr->gbuflen < 1) {
tsdPtr->gbuflen = 1024;
}
- tsdPtr->gbuf = (char *)ckalloc(tsdPtr->gbuflen);
+ tsdPtr->gbuf = (char *)Tcl_Alloc(tsdPtr->gbuflen);
Tcl_CreateThreadExitHandler(FreeGrBuf, NULL);
}
while (1) {
@@ -397,7 +395,7 @@ TclpGetGrNam(
return NULL;
}
tsdPtr->gbuflen *= 2;
- tsdPtr->gbuf = (char *)ckrealloc(tsdPtr->gbuf, tsdPtr->gbuflen);
+ tsdPtr->gbuf = (char *)Tcl_Realloc(tsdPtr->gbuf, tsdPtr->gbuflen);
}
return (grPtr != NULL ? &tsdPtr->grp : NULL);
@@ -464,7 +462,7 @@ TclpGetGrGid(
if (tsdPtr->gbuflen < 1) {
tsdPtr->gbuflen = 1024;
}
- tsdPtr->gbuf = (char *)ckalloc(tsdPtr->gbuflen);
+ tsdPtr->gbuf = (char *)Tcl_Alloc(tsdPtr->gbuflen);
Tcl_CreateThreadExitHandler(FreeGrBuf, NULL);
}
while (1) {
@@ -477,7 +475,7 @@ TclpGetGrGid(
return NULL;
}
tsdPtr->gbuflen *= 2;
- tsdPtr->gbuf = (char *)ckrealloc(tsdPtr->gbuf, tsdPtr->gbuflen);
+ tsdPtr->gbuf = (char *)Tcl_Realloc(tsdPtr->gbuf, tsdPtr->gbuflen);
}
return (grPtr != NULL ? &tsdPtr->grp : NULL);
@@ -523,7 +521,7 @@ FreeGrBuf(
{
ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- ckfree(tsdPtr->gbuf);
+ Tcl_Free(tsdPtr->gbuf);
}
#endif /* NEED_GR_CLEANER */
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index 9e9a493..7602709 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -41,8 +41,6 @@
*/
#include "tclInt.h"
-#include <utime.h>
-#include <grp.h>
#ifndef HAVE_STRUCT_STAT_ST_BLKSIZE
#ifndef NO_FSTATFS
#include <sys/statfs.h>
@@ -260,6 +258,11 @@ MODULE_SCOPE long tclMacOSXDarwinRelease;
#else
# define haveRealpath 1
#endif
+#else /* NO_REALPATH */
+/*
+ * At least TclpObjNormalizedPath now requires REALPATH
+*/
+#error NO_REALPATH is not supported
#endif /* NO_REALPATH */
#ifdef HAVE_FTS
@@ -544,7 +547,7 @@ TclUnixCopyFile(
int dontCopyAtts) /* If flag set, don't copy attributes. */
{
int srcFd, dstFd;
- unsigned blockSize; /* Optimal I/O blocksize for filesystem */
+ size_t blockSize; /* Optimal I/O blocksize for filesystem */
char *buffer; /* Data buffer for copy */
size_t nread;
@@ -600,21 +603,21 @@ TclUnixCopyFile(
if (blockSize <= 0) {
blockSize = DEFAULT_COPY_BLOCK_SIZE;
}
- buffer = (char *)ckalloc(blockSize);
+ buffer = (char *)Tcl_Alloc(blockSize);
while (1) {
- nread = (size_t) read(srcFd, buffer, blockSize);
- if ((nread == (size_t) -1) || (nread == 0)) {
+ nread = read(srcFd, buffer, blockSize);
+ if ((nread == TCL_IO_FAILURE) || (nread == 0)) {
break;
}
if ((size_t) write(dstFd, buffer, nread) != nread) {
- nread = (size_t) -1;
+ nread = TCL_IO_FAILURE;
break;
}
}
- ckfree(buffer);
+ Tcl_Free(buffer);
close(srcFd);
- if ((close(dstFd) != 0) || (nread == (size_t) -1)) {
+ if ((close(dstFd) != 0) || (nread == TCL_IO_FAILURE)) {
unlink(dst); /* INTL: Native. */
return TCL_ERROR;
}
@@ -950,8 +953,8 @@ TraverseUnixTree(
{
Tcl_StatBuf statBuf;
const char *source, *errfile;
- int result, sourceLen;
- int targetLen;
+ int result;
+ size_t targetLen, sourceLen;
#ifndef HAVE_FTS
int numProcessed = 0;
Tcl_DirEntry *dirEntPtr;
@@ -1501,10 +1504,11 @@ SetGroupAttribute(
Tcl_DString ds;
struct group *groupPtr = NULL;
const char *string;
+ size_t length;
- string = TclGetString(attributePtr);
+ string = Tcl_GetStringFromObj(attributePtr, &length);
- native = Tcl_UtfToExternalDString(NULL, string, attributePtr->length, &ds);
+ native = Tcl_UtfToExternalDString(NULL, string, length, &ds);
groupPtr = TclpGetGrNam(native); /* INTL: Native. */
Tcl_DStringFree(&ds);
@@ -1567,10 +1571,11 @@ SetOwnerAttribute(
Tcl_DString ds;
struct passwd *pwPtr = NULL;
const char *string;
+ size_t length;
- string = TclGetString(attributePtr);
+ string = Tcl_GetStringFromObj(attributePtr, &length);
- native = Tcl_UtfToExternalDString(NULL, string, attributePtr->length, &ds);
+ native = Tcl_UtfToExternalDString(NULL, string, length, &ds);
pwPtr = TclpGetPwNam(native); /* INTL: Native. */
Tcl_DStringFree(&ds);
@@ -1942,8 +1947,8 @@ TclpObjNormalizePath(
{
const char *currentPathEndPosition;
char cur;
- const char *path = TclGetString(pathPtr);
- size_t pathLen = pathPtr->length;
+ size_t pathLen;
+ const char *path = Tcl_GetStringFromObj(pathPtr, &pathLen);
Tcl_DString ds;
const char *nativePath;
#ifndef NO_REALPATH
@@ -2047,7 +2052,7 @@ TclpObjNormalizePath(
nativePath = Tcl_UtfToExternalDString(NULL, path,nextCheckpoint, &ds);
if (Realpath(nativePath, normPath) != NULL) {
- int newNormLen;
+ size_t newNormLen;
wholeStringOk:
newNormLen = strlen(normPath);
@@ -2081,7 +2086,7 @@ TclpObjNormalizePath(
*/
Tcl_DStringFree(&ds);
- Tcl_ExternalToUtfDString(NULL, normPath, (int) newNormLen, &ds);
+ Tcl_ExternalToUtfDString(NULL, normPath, newNormLen, &ds);
if (path[nextCheckpoint] != '\0') {
/*
@@ -2166,14 +2171,15 @@ TclUnixOpenTemporaryFile(
Tcl_DString templ, tmp;
const char *string;
int fd;
+ size_t length;
/*
* We should also check against making more then TMP_MAX of these.
*/
if (dirObj) {
- string = TclGetString(dirObj);
- Tcl_UtfToExternalDString(NULL, string, dirObj->length, &templ);
+ string = Tcl_GetStringFromObj(dirObj, &length);
+ Tcl_UtfToExternalDString(NULL, string, length, &templ);
} else {
Tcl_DStringInit(&templ);
Tcl_DStringAppend(&templ, DefaultTempDir(), -1); /* INTL: native */
@@ -2182,8 +2188,8 @@ TclUnixOpenTemporaryFile(
TclDStringAppendLiteral(&templ, "/");
if (basenameObj) {
- string = TclGetString(basenameObj);
- Tcl_UtfToExternalDString(NULL, string, basenameObj->length, &tmp);
+ string = Tcl_GetStringFromObj(basenameObj, &length);
+ Tcl_UtfToExternalDString(NULL, string, length, &tmp);
TclDStringAppendDString(&templ, &tmp);
Tcl_DStringFree(&tmp);
} else {
@@ -2194,8 +2200,8 @@ TclUnixOpenTemporaryFile(
#ifdef HAVE_MKSTEMPS
if (extensionObj) {
- string = TclGetString(extensionObj);
- Tcl_UtfToExternalDString(NULL, string, extensionObj->length, &tmp);
+ string = Tcl_GetStringFromObj(extensionObj, &length);
+ Tcl_UtfToExternalDString(NULL, string, length, &tmp);
TclDStringAppendDString(&templ, &tmp);
fd = mkstemps(Tcl_DStringValue(&templ), Tcl_DStringLength(&tmp));
Tcl_DStringFree(&tmp);
@@ -2359,12 +2365,12 @@ static WCHAR *
winPathFromObj(
Tcl_Obj *fileName)
{
- int size;
+ size_t size;
const char *native = (const char *)Tcl_FSGetNativePath(fileName);
WCHAR *winPath;
size = cygwin_conv_path(1, native, NULL, 0);
- winPath = (WCHAR *)ckalloc(size);
+ winPath = (WCHAR *)Tcl_Alloc(size);
cygwin_conv_path(1, native, winPath, size);
return winPath;
@@ -2404,7 +2410,7 @@ GetUnixFileAttributes(
WCHAR *winPath = winPathFromObj(fileName);
fileAttributes = GetFileAttributesW(winPath);
- ckfree(winPath);
+ Tcl_Free(winPath);
if (fileAttributes == -1) {
StatError(interp, fileName);
@@ -2451,7 +2457,7 @@ SetUnixFileAttributes(
fileAttributes = old = GetFileAttributesW(winPath);
if (fileAttributes == -1) {
- ckfree(winPath);
+ Tcl_Free(winPath);
StatError(interp, fileName);
return TCL_ERROR;
}
@@ -2464,12 +2470,12 @@ SetUnixFileAttributes(
if ((fileAttributes != old)
&& !SetFileAttributesW(winPath, fileAttributes)) {
- ckfree(winPath);
+ Tcl_Free(winPath);
StatError(interp, fileName);
return TCL_ERROR;
}
- ckfree(winPath);
+ Tcl_Free(winPath);
return TCL_OK;
}
#elif defined(HAVE_CHFLAGS) && defined(UF_IMMUTABLE)
diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c
index 1ab5d14..05876a8 100644
--- a/unix/tclUnixFile.c
+++ b/unix/tclUnixFile.c
@@ -40,7 +40,7 @@ TclpFindExecutable(
TCL_UNUSED(const char *) /*argv0*/)
{
Tcl_Encoding encoding;
- int length;
+ size_t length;
wchar_t buf[PATH_MAX];
char name[PATH_MAX * 3 + 1];
@@ -729,7 +729,7 @@ TclpGetNativeCwd(
#endif /* USEGETWD */
if ((clientData == NULL) || strcmp(buffer, (const char *) clientData)) {
- char *newCd = (char*)ckalloc(strlen(buffer) + 1);
+ char *newCd = (char *)Tcl_Alloc(strlen(buffer) + 1);
strcpy(newCd, buffer);
return newCd;
@@ -949,6 +949,7 @@ TclpObjLink(
if (linkAction & TCL_CREATE_SYMBOLIC_LINK) {
Tcl_DString ds;
Tcl_Obj *transPtr;
+ size_t length;
/*
* Now we don't want to link to the absolute, normalized path.
@@ -960,8 +961,8 @@ TclpObjLink(
if (transPtr == NULL) {
return NULL;
}
- target = TclGetString(transPtr);
- target = Tcl_UtfToExternalDString(NULL, target, transPtr->length, &ds);
+ target = Tcl_GetStringFromObj(transPtr, &length);
+ target = Tcl_UtfToExternalDString(NULL, target, length, &ds);
Tcl_DecrRefCount(transPtr);
if (symlink(target, src) != 0) {
@@ -1114,8 +1115,7 @@ TclNativeCreateNativeRep(
Tcl_IncrRefCount(validPathPtr);
}
- str = TclGetString(validPathPtr);
- len = validPathPtr->length;
+ str = Tcl_GetStringFromObj(validPathPtr, &len);
Tcl_UtfToExternalDString(NULL, str, len, &ds);
len = Tcl_DStringLength(&ds) + sizeof(char);
if (strlen(Tcl_DStringValue(&ds)) < len - sizeof(char)) {
@@ -1125,7 +1125,7 @@ TclNativeCreateNativeRep(
return NULL;
}
Tcl_DecrRefCount(validPathPtr);
- nativePathPtr = (char *)ckalloc(len);
+ nativePathPtr = (char *)Tcl_Alloc(len);
memcpy(nativePathPtr, Tcl_DStringValue(&ds), len);
Tcl_DStringFree(&ds);
@@ -1166,7 +1166,7 @@ TclNativeDupInternalRep(
len = (strlen((const char*) clientData) + 1) * sizeof(char);
- copy = (char *)ckalloc(len);
+ copy = (char *)Tcl_Alloc(len);
memcpy(copy, clientData, len);
return copy;
}
diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c
index c480a56..f8bca0f 100644
--- a/unix/tclUnixInit.c
+++ b/unix/tclUnixInit.c
@@ -92,7 +92,7 @@ typedef struct {
*/
#ifndef TCL_DEFAULT_ENCODING
-#define TCL_DEFAULT_ENCODING "iso8859-1"
+#define TCL_DEFAULT_ENCODING "utf-8"
#endif
/*
@@ -455,7 +455,7 @@ TclpInitPlatform(void)
void
TclpInitLibraryPath(
char **valuePtr,
- unsigned int *lengthPtr,
+ size_t *lengthPtr,
Tcl_Encoding *encodingPtr)
{
#define LIBRARY_SIZE 32
@@ -512,7 +512,7 @@ TclpInitLibraryPath(
str = Tcl_JoinPath(pathc, pathv, &ds);
Tcl_ListObjAppendElement(NULL, pathPtr, TclDStringToObj(&ds));
}
- ckfree(pathv);
+ Tcl_Free(pathv);
}
/*
@@ -544,9 +544,8 @@ TclpInitLibraryPath(
Tcl_DStringFree(&buffer);
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
- str = TclGetString(pathPtr);
- *lengthPtr = pathPtr->length;
- *valuePtr = (char *)ckalloc(*lengthPtr + 1);
+ str = Tcl_GetStringFromObj(pathPtr, lengthPtr);
+ *valuePtr = (char *)Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, str, *lengthPtr + 1);
Tcl_DecrRefCount(pathPtr);
}
@@ -988,7 +987,7 @@ TclpSetVariables(
*
* Results:
* The return value is the index in environ of an entry with the name
- * "name", or -1 if there is no such entry. The integer at *lengthPtr is
+ * "name", or TCL_INDEX_NONE if there is no such entry. The integer at *lengthPtr is
* filled in with the length of name (if a matching entry is found) or
* the length of the environ array (if no matching entry is found).
*
@@ -998,16 +997,16 @@ TclpSetVariables(
*----------------------------------------------------------------------
*/
-int
+size_t
TclpFindVariable(
const char *name, /* Name of desired environment variable
* (native). */
- int *lengthPtr) /* Used to return length of name (for
+ size_t *lengthPtr) /* Used to return length of name (for
* successful searches) or number of non-NULL
* entries in environ (for unsuccessful
* searches). */
{
- int i, result = -1;
+ size_t i, result = TCL_INDEX_NONE;
const char *env, *p1, *p2;
Tcl_DString envString;
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index e7199bc..85692c9 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -69,7 +69,7 @@ static int SetupStdFile(TclFile file, int type);
static const Tcl_ChannelType pipeChannelType = {
"pipe", /* Type name. */
TCL_CHANNEL_VERSION_5, /* v5 channel */
- TCL_CLOSE2PROC, /* Close proc. */
+ NULL, /* Close proc. */
PipeInputProc, /* Input proc. */
PipeOutputProc, /* Output proc. */
NULL, /* Seek proc. */
@@ -524,7 +524,7 @@ TclpCreateProcess(
errPipeOut = NULL;
fd = GetFd(errPipeIn);
- count = read(fd, errSpace, (size_t) (sizeof(errSpace) - 1));
+ count = read(fd, errSpace, sizeof(errSpace) - 1);
if (count > 0) {
char *end;
@@ -744,7 +744,7 @@ TclpCreateCommandChannel(
{
char channelName[16 + TCL_INTEGER_SPACE];
int channelId;
- PipeState *statePtr = (PipeState *)ckalloc(sizeof(PipeState));
+ PipeState *statePtr = (PipeState *)Tcl_Alloc(sizeof(PipeState));
int mode;
statePtr->inFile = readFile;
@@ -878,7 +878,7 @@ TclGetAndDetachPids(
}
Tcl_SetObjResult(interp, pidsObj);
if (pipePtr->numPids > 0) {
- ckfree(pipePtr->pidPtr);
+ Tcl_Free(pipePtr->pidPtr);
pipePtr->numPids = 0;
}
}
@@ -1008,9 +1008,9 @@ PipeClose2Proc(
}
if (pipePtr->numPids != 0) {
- ckfree(pipePtr->pidPtr);
+ Tcl_Free(pipePtr->pidPtr);
}
- ckfree(pipePtr);
+ Tcl_Free(pipePtr);
if (errorCode == 0) {
return result;
}
@@ -1058,7 +1058,7 @@ PipeInputProc(
*/
do {
- bytesRead = read(GetFd(psPtr->inFile), buf, (size_t) toRead);
+ bytesRead = read(GetFd(psPtr->inFile), buf, toRead);
} while ((bytesRead < 0) && (errno == EINTR));
if (bytesRead < 0) {
@@ -1104,7 +1104,7 @@ PipeOutputProc(
*/
do {
- written = write(GetFd(psPtr->outFile), buf, (size_t) toWrite);
+ written = write(GetFd(psPtr->outFile), buf, toWrite);
} while ((written < 0) && (errno == EINTR));
if (written < 0) {
@@ -1272,7 +1272,7 @@ Tcl_PidObjCmd(
* Get the channel and make sure that it refers to a pipe.
*/
- chan = Tcl_GetChannel(interp, Tcl_GetString(objv[1]), NULL);
+ chan = Tcl_GetChannel(interp, TclGetString(objv[1]), NULL);
if (chan == NULL) {
return TCL_ERROR;
}
diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h
index ece0202..4027f1f 100644
--- a/unix/tclUnixPort.h
+++ b/unix/tclUnixPort.h
@@ -90,11 +90,8 @@ typedef off_t Tcl_SeekOffset;
extern "C" {
#endif
/* Make some symbols available without including <windows.h> */
-# define DWORD unsigned int
# define CP_UTF8 65001
# define GET_MODULE_HANDLE_EX_FLAG_FROM_ADDRESS 0x00000004
-# define HANDLE void *
-# define HINSTANCE void *
# define HMODULE void *
# define MAX_PATH 260
# define SOCKET unsigned int
@@ -675,9 +672,9 @@ typedef int socklen_t;
*---------------------------------------------------------------------------
*/
-#define TclpSysAlloc(size, isBin) malloc((size_t)(size))
-#define TclpSysFree(ptr) free((char *)(ptr))
-#define TclpSysRealloc(ptr, size) realloc((char *)(ptr), (size_t)(size))
+#define TclpSysAlloc(size) malloc(size)
+#define TclpSysFree(ptr) free(ptr)
+#define TclpSysRealloc(ptr, size) realloc(ptr, size)
/*
*---------------------------------------------------------------------------
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 076678c..f81d323 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -159,11 +159,7 @@ static void WrapNotify(void *clientData, int mask);
static const Tcl_ChannelType tcpChannelType = {
"tcp", /* Type name. */
TCL_CHANNEL_VERSION_5, /* v5 channel */
-#ifndef TCL_NO_DEPRECATED
- TcpCloseProc, /* Close proc. */
-#else
- TCL_CLOSE2PROC, /* Close proc. */
-#endif
+ NULL, /* Close proc. */
TcpInputProc, /* Input proc. */
TcpOutputProc, /* Output proc. */
NULL, /* Seek proc. */
@@ -223,7 +219,7 @@ printaddrinfo(
static void
InitializeHostName(
char **valuePtr,
- unsigned int *lengthPtr,
+ size_t *lengthPtr,
Tcl_Encoding *encodingPtr)
{
const char *native = NULL;
@@ -245,12 +241,12 @@ InitializeHostName(
char *dot = strchr(u.nodename, '.');
if (dot != NULL) {
- char *node = (char *)ckalloc(dot - u.nodename + 1);
+ char *node = (char *)Tcl_Alloc(dot - u.nodename + 1);
memcpy(node, u.nodename, dot - u.nodename);
node[dot - u.nodename] = '\0';
hp = TclpGetHostByName(node);
- ckfree(node);
+ Tcl_Free(node);
}
}
if (hp != NULL) {
@@ -289,11 +285,11 @@ InitializeHostName(
*encodingPtr = Tcl_GetEncoding(NULL, NULL);
if (native) {
*lengthPtr = strlen(native);
- *valuePtr = (char *)ckalloc(*lengthPtr + 1);
+ *valuePtr = (char *)Tcl_Alloc(*lengthPtr + 1);
memcpy(*valuePtr, native, *lengthPtr + 1);
} else {
*lengthPtr = 0;
- *valuePtr = (char *)ckalloc(1);
+ *valuePtr = (char *)Tcl_Alloc(1);
*valuePtr[0] = '\0';
}
}
@@ -319,7 +315,8 @@ InitializeHostName(
const char *
Tcl_GetHostName(void)
{
- return Tcl_GetString(TclGetProcessGlobalValue(&hostName));
+ Tcl_Obj *tclObj = TclGetProcessGlobalValue(&hostName);
+ return TclGetString(tclObj);
}
/*
@@ -544,7 +541,7 @@ TcpInputProc(
if (WaitForConnect(statePtr, errorCodePtr) != 0) {
return -1;
}
- bytesRead = recv(statePtr->fds.fd, buf, (size_t) bufSize, 0);
+ bytesRead = recv(statePtr->fds.fd, buf, bufSize, 0);
if (bytesRead >= 0) {
return bytesRead;
}
@@ -594,7 +591,7 @@ TcpOutputProc(
if (WaitForConnect(statePtr, errorCodePtr) != 0) {
return -1;
}
- written = send(statePtr->fds.fd, buf, (size_t) toWrite, 0);
+ written = send(statePtr->fds.fd, buf, toWrite, 0);
if (written >= 0) {
return written;
@@ -652,7 +649,7 @@ TcpCloseProc(
while (fds != NULL) {
TcpFdList *next = fds->next;
- ckfree(fds);
+ Tcl_Free(fds);
fds = next;
}
if (statePtr->addrlist != NULL) {
@@ -661,7 +658,7 @@ TcpCloseProc(
if (statePtr->myaddrlist != NULL) {
freeaddrinfo(statePtr->myaddrlist);
}
- ckfree(statePtr);
+ Tcl_Free(statePtr);
return errorCode;
}
@@ -1434,7 +1431,7 @@ Tcl_OpenTcpClient(
* Allocate a new TcpState for this socket.
*/
- statePtr = (TcpState *)ckalloc(sizeof(TcpState));
+ statePtr = (TcpState *)Tcl_Alloc(sizeof(TcpState));
memset(statePtr, 0, sizeof(TcpState));
statePtr->flags = async ? TCP_ASYNC_CONNECT : 0;
statePtr->cachedBlocking = TCL_MODE_BLOCKING;
@@ -1457,7 +1454,7 @@ Tcl_OpenTcpClient(
statePtr, TCL_READABLE | TCL_WRITABLE);
if (Tcl_SetChannelOption(interp, statePtr->channel, "-translation",
"auto crlf") == TCL_ERROR) {
- Tcl_Close(NULL, statePtr->channel);
+ Tcl_CloseEx(NULL, statePtr->channel, 0);
return NULL;
}
return statePtr->channel;
@@ -1513,7 +1510,7 @@ TclpMakeTcpClientChannelMode(
TcpState *statePtr;
char channelName[SOCK_CHAN_LENGTH];
- statePtr = (TcpState *)ckalloc(sizeof(TcpState));
+ statePtr = (TcpState *)Tcl_Alloc(sizeof(TcpState));
memset(statePtr, 0, sizeof(TcpState));
statePtr->fds.fd = PTR2INT(sock);
statePtr->flags = 0;
@@ -1524,7 +1521,7 @@ TclpMakeTcpClientChannelMode(
statePtr, mode);
if (Tcl_SetChannelOption(NULL, statePtr->channel, "-translation",
"auto crlf") == TCL_ERROR) {
- Tcl_Close(NULL, statePtr->channel);
+ Tcl_CloseEx(NULL, statePtr->channel, 0);
return NULL;
}
return statePtr->channel;
@@ -1736,14 +1733,14 @@ Tcl_OpenTcpServerEx(
* Allocate a new TcpState for this socket.
*/
- statePtr = (TcpState *)ckalloc(sizeof(TcpState));
+ statePtr = (TcpState *)Tcl_Alloc(sizeof(TcpState));
memset(statePtr, 0, sizeof(TcpState));
statePtr->acceptProc = acceptProc;
statePtr->acceptProcData = acceptProcData;
sprintf(channelName, SOCK_TEMPLATE, (long) statePtr);
newfds = &statePtr->fds;
} else {
- newfds = (TcpFdList *)ckalloc(sizeof(TcpFdList));
+ newfds = (TcpFdList *)Tcl_Alloc(sizeof(TcpFdList));
memset(newfds, (int) 0, sizeof(TcpFdList));
fds->next = newfds;
}
@@ -1827,7 +1824,7 @@ TcpAccept(
(void) fcntl(newsock, F_SETFD, FD_CLOEXEC);
- newSockState = (TcpState *)ckalloc(sizeof(TcpState));
+ newSockState = (TcpState *)Tcl_Alloc(sizeof(TcpState));
memset(newSockState, 0, sizeof(TcpState));
newSockState->flags = 0;
newSockState->fds.fd = newsock;
diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c
index 8a16d0b..1a70b35 100644
--- a/unix/tclUnixThrd.c
+++ b/unix/tclUnixThrd.c
@@ -160,14 +160,6 @@ PCondTimedWait(
}
#endif /* HAVE_PTHREAD_MUTEX_RECURSIVE */
-#ifndef TCL_NO_DEPRECATED
-typedef struct {
- char nabuf[16];
-} ThreadSpecificData;
-
-static Tcl_ThreadDataKey dataKey;
-#endif /* TCL_NO_DEPRECATED */
-
/*
* globalLock is used to serialize creation of mutexes, condition variables,
* and thread local storage. This is the only place that can count on the
@@ -222,7 +214,7 @@ TclpThreadCreate(
Tcl_ThreadId *idPtr, /* Return, the ID of the thread */
Tcl_ThreadCreateProc *proc, /* Main() function of the thread */
ClientData clientData, /* The one argument to Main() */
- int stackSize, /* Size of stack for the new thread */
+ size_t stackSize, /* Size of stack for the new thread */
int flags) /* Flags controlling behaviour of the new
* thread. */
{
@@ -577,7 +569,7 @@ Tcl_MutexLock(
* Double inside global lock check to avoid a race condition.
*/
- pmutexPtr = (PMutex *)ckalloc(sizeof(PMutex));
+ pmutexPtr = (PMutex *)Tcl_Alloc(sizeof(PMutex));
PMutexInit(pmutexPtr);
*mutexPtr = (Tcl_Mutex) pmutexPtr;
TclRememberMutex(mutexPtr);
@@ -641,7 +633,7 @@ TclpFinalizeMutex(
if (pmutexPtr != NULL) {
PMutexDestroy(pmutexPtr);
- ckfree(pmutexPtr);
+ Tcl_Free(pmutexPtr);
*mutexPtr = NULL;
}
}
@@ -687,7 +679,7 @@ Tcl_ConditionWait(
*/
if (*condPtr == NULL) {
- pcondPtr = (pthread_cond_t *)ckalloc(sizeof(pthread_cond_t));
+ pcondPtr = (pthread_cond_t *)Tcl_Alloc(sizeof(pthread_cond_t));
pthread_cond_init(pcondPtr, NULL);
*condPtr = (Tcl_Condition) pcondPtr;
TclRememberCondition(condPtr);
@@ -775,59 +767,11 @@ TclpFinalizeCondition(
if (pcondPtr != NULL) {
pthread_cond_destroy(pcondPtr);
- ckfree(pcondPtr);
+ Tcl_Free(pcondPtr);
*condPtr = NULL;
}
}
-#endif /* TCL_THREADS */
-
-/*
- *----------------------------------------------------------------------
- *
- * TclpReaddir, TclpInetNtoa --
- *
- * These procedures replace core C versions to be used in a threaded
- * environment.
- *
- * Results:
- * See documentation of C functions.
- *
- * Side effects:
- * See documentation of C functions.
- *
- * Notes:
- * TclpReaddir is no longer used by the core (see 1095909), but it
- * appears in the internal stubs table (see #589526).
- *
- *----------------------------------------------------------------------
- */
-
-#ifndef TCL_NO_DEPRECATED
-Tcl_DirEntry *
-TclpReaddir(
- TclDIR * dir)
-{
- return TclOSreaddir(dir);
-}
-
-#undef TclpInetNtoa
-char *
-TclpInetNtoa(
- struct in_addr addr)
-{
-#if TCL_THREADS
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&dataKey);
- unsigned char *b = (unsigned char*) &addr.s_addr;
-
- sprintf(tsdPtr->nabuf, "%u.%u.%u.%u", b[0], b[1], b[2], b[3]);
- return tsdPtr->nabuf;
-#else
- return inet_ntoa(addr);
-#endif
-}
-#endif /* TCL_NO_DEPRECATED */
-#if TCL_THREADS
/*
* Additions by AOL for specialized thread memory allocator.
*/
@@ -917,7 +861,7 @@ TclpThreadCreateKey(void)
{
pthread_key_t *ptkeyPtr;
- ptkeyPtr = (pthread_key_t *)TclpSysAlloc(sizeof(pthread_key_t), 0);
+ ptkeyPtr = (pthread_key_t *)TclpSysAlloc(sizeof(pthread_key_t));
if (NULL == ptkeyPtr) {
Tcl_Panic("unable to allocate thread key!");
}
diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c
index e0c7ac8..94a666a 100644
--- a/unix/tclUnixTime.c
+++ b/unix/tclUnixTime.c
@@ -16,37 +16,9 @@
#endif
/*
- * TclpGetDate is coded to return a pointer to a 'struct tm'. For thread
- * safety, this structure must be in thread-specific data. The 'tmKey'
- * variable is the key to this buffer.
- */
-
-#ifndef TCL_NO_DEPRECATED
-static Tcl_ThreadDataKey tmKey;
-typedef struct {
- struct tm gmtime_buf;
- struct tm localtime_buf;
-} ThreadSpecificData;
-
-/*
- * If we fall back on the thread-unsafe versions of gmtime and localtime, use
- * this mutex to try to protect them.
- */
-
-TCL_DECLARE_MUTEX(tmMutex)
-
-static char *lastTZ = NULL; /* Holds the last setting of the TZ
- * environment variable, or an empty string if
- * the variable was not set. */
-
-/*
* Static functions declared in this file.
*/
-static void SetTZIfNecessary(void);
-static void CleanupMemory(ClientData clientData);
-#endif /* TCL_NO_DEPRECATED */
-
static void NativeScaleTime(Tcl_Time *timebuf,
ClientData clientData);
static void NativeGetTime(Tcl_Time *timebuf,
@@ -94,10 +66,10 @@ IsTimeNative(void)
*----------------------------------------------------------------------
*/
-unsigned long
+unsigned long long
TclpGetSeconds(void)
{
- return time(NULL);
+ return (unsigned long long) time(NULL);
}
/*
@@ -123,7 +95,7 @@ TclpGetMicroseconds(void)
Tcl_Time time;
GetTime(&time);
- return ((long long) time.sec)*1000000 + time.usec;
+ return ((long long)(unsigned long) time.sec)*1000000 + time.usec;
}
/*
@@ -145,30 +117,31 @@ TclpGetMicroseconds(void)
*----------------------------------------------------------------------
*/
-unsigned long
+unsigned long long
TclpGetClicks(void)
{
- unsigned long now;
+ unsigned long long now;
#ifdef NO_GETTOD
if (!IsTimeNative()) {
Tcl_Time time;
GetTime(&time);
- now = time.sec*1000000 + time.usec;
+ now = ((unsigned long long)(unsigned long) time.sec)*1000000 +
+ time.usec;
} else {
/*
* A semi-NativeGetTime, specialized to clicks.
*/
struct tms dummy;
- now = (unsigned long) times(&dummy);
+ now = (unsigned long long) times(&dummy);
}
#else /* !NO_GETTOD */
Tcl_Time time;
GetTime(&time);
- now = time.sec*1000000 + time.usec;
+ now = ((unsigned long long) time.sec)*1000000 + time.usec;
#endif /* NO_GETTOD */
return now;
@@ -181,7 +154,7 @@ TclpGetClicks(void)
* TclpGetWideClicks --
*
* This procedure returns a WideInt value that represents the highest
- * resolution clock available on the system. There are no garantees on
+ * resolution clock available on the system. There are no guarantees on
* what the resolution will be. In Tcl we will call this value a "click".
* The start time is also system dependent.
*
@@ -290,17 +263,15 @@ TclpWideClickInMicrosec(void)
static int initialized = 0;
static double scale = 0.0;
- if (initialized) {
- return scale;
- } else {
+ if (!initialized) {
mach_timebase_info_data_t tb;
mach_timebase_info(&tb);
/* value of tb.numer / tb.denom = 1 click in nanoseconds */
- scale = ((double)tb.numer) / tb.denom / 1000;
+ scale = ((double) tb.numer) / tb.denom / 1000;
initialized = 1;
- return scale;
}
+ return scale;
#else
#error Wide high-resolution clicks not implemented on this platform
#endif /* MAC_OSX_TCL */
@@ -338,116 +309,6 @@ Tcl_GetTime(
/*
*----------------------------------------------------------------------
*
- * TclpGetDate --
- *
- * This function converts between seconds and struct tm. If useGMT is
- * true, then the returned date will be in Greenwich Mean Time (GMT).
- * Otherwise, it will be in the local time zone.
- *
- * Results:
- * Returns a static tm structure.
- *
- * Side effects:
- * None.
- *
- *----------------------------------------------------------------------
- */
-
-#ifndef TCL_NO_DEPRECATED
-struct tm *
-TclpGetDate(
- const time_t *time,
- int useGMT)
-{
- if (useGMT) {
- return TclpGmtime(time);
- } else {
- return TclpLocaltime(time);
- }
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TclpGmtime --
- *
- * Wrapper around the 'gmtime' library function to make it thread safe.
- *
- * Results:
- * Returns a pointer to a 'struct tm' in thread-specific data.
- *
- * Side effects:
- * Invokes gmtime or gmtime_r as appropriate.
- *
- *----------------------------------------------------------------------
- */
-
-struct tm *
-TclpGmtime(
- const time_t *timePtr) /* Pointer to the number of seconds since the
- * local system's epoch */
-{
- /*
- * Get a thread-local buffer to hold the returned time.
- */
-
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tmKey);
-
-#ifdef HAVE_GMTIME_R
- gmtime_r(timePtr, &tsdPtr->gmtime_buf);
-#else
- Tcl_MutexLock(&tmMutex);
- memcpy(&tsdPtr->gmtime_buf, gmtime(timePtr), sizeof(struct tm));
- Tcl_MutexUnlock(&tmMutex);
-#endif
-
- return &tsdPtr->gmtime_buf;
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * TclpLocaltime --
- *
- * Wrapper around the 'localtime' library function to make it thread
- * safe.
- *
- * Results:
- * Returns a pointer to a 'struct tm' in thread-specific data.
- *
- * Side effects:
- * Invokes localtime or localtime_r as appropriate.
- *
- *----------------------------------------------------------------------
- */
-
-struct tm *
-TclpLocaltime(
- const time_t *timePtr) /* Pointer to the number of seconds since the
- * local system's epoch */
-{
- /*
- * Get a thread-local buffer to hold the returned time.
- */
-
- ThreadSpecificData *tsdPtr = TCL_TSD_INIT(&tmKey);
-
- SetTZIfNecessary();
-#ifdef HAVE_LOCALTIME_R
- localtime_r(timePtr, &tsdPtr->localtime_buf);
-#else
- Tcl_MutexLock(&tmMutex);
- memcpy(&tsdPtr->localtime_buf, localtime(timePtr), sizeof(struct tm));
- Tcl_MutexUnlock(&tmMutex);
-#endif
-
- return &tsdPtr->localtime_buf;
-}
-#endif /* TCL_NO_DEPRECATED */
-
-/*
- *----------------------------------------------------------------------
- *
* Tcl_SetTimeProc --
*
* TIP #233 (Virtualized Time): Registers two handlers for the
@@ -559,72 +420,6 @@ NativeGetTime(
timePtr->sec = tv.tv_sec;
timePtr->usec = tv.tv_usec;
}
-/*
- *----------------------------------------------------------------------
- *
- * SetTZIfNecessary --
- *
- * Determines whether a call to 'tzset' is needed prior to the next call
- * to 'localtime' or examination of the 'timezone' variable.
- *
- * Results:
- * None.
- *
- * Side effects:
- * If 'tzset' has never been called in the current process, or if the
- * value of the environment variable TZ has changed since the last call
- * to 'tzset', then 'tzset' is called again.
- *
- *----------------------------------------------------------------------
- */
-
-#ifndef TCL_NO_DEPRECATED
-static void
-SetTZIfNecessary(void)
-{
- const char *newTZ = getenv("TZ");
-
- Tcl_MutexLock(&tmMutex);
- if (newTZ == NULL) {
- newTZ = "";
- }
- if (lastTZ == NULL || strcmp(lastTZ, newTZ)) {
- tzset();
- if (lastTZ == NULL) {
- Tcl_CreateExitHandler(CleanupMemory, NULL);
- } else {
- ckfree(lastTZ);
- }
- lastTZ = (char *) ckalloc(strlen(newTZ) + 1);
- strcpy(lastTZ, newTZ);
- }
- Tcl_MutexUnlock(&tmMutex);
-}
-
-/*
- *----------------------------------------------------------------------
- *
- * CleanupMemory --
- *
- * Releases the private copy of the TZ environment variable upon exit
- * from Tcl.
- *
- * Results:
- * None.
- *
- * Side effects:
- * Frees allocated memory.
- *
- *----------------------------------------------------------------------
- */
-
-static void
-CleanupMemory(
- TCL_UNUSED(ClientData))
-{
- ckfree(lastTZ);
-}
-#endif /* TCL_NO_DEPRECATED */
/*
* Local Variables:
diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c
index 3d90135..61dc731 100644
--- a/unix/tclXtNotify.c
+++ b/unix/tclXtNotify.c
@@ -268,7 +268,7 @@ static void
SetTimer(
const Tcl_Time *timePtr) /* Timeout value, may be NULL. */
{
- long timeout;
+ unsigned long timeout;
if (!initialized) {
InitNotifier();
@@ -281,7 +281,7 @@ SetTimer(
if (timePtr) {
timeout = timePtr->sec * 1000 + timePtr->usec / 1000;
notifier.currentTimeout = XtAppAddTimeOut(notifier.appContext,
- (unsigned long) timeout, TimerProc, NULL);
+ timeout, TimerProc, NULL);
} else {
notifier.currentTimeout = 0;
}
@@ -359,7 +359,7 @@ CreateFileHandler(
}
}
if (filePtr == NULL) {
- filePtr = (FileHandler *) ckalloc(sizeof(FileHandler));
+ filePtr = (FileHandler *) Tcl_Alloc(sizeof(FileHandler));
filePtr->fd = fd;
filePtr->read = 0;
filePtr->write = 0;
@@ -470,7 +470,7 @@ DeleteFileHandler(
if (filePtr->mask & TCL_EXCEPTION) {
XtRemoveInput(filePtr->except);
}
- ckfree(filePtr);
+ Tcl_Free(filePtr);
}
/*
@@ -525,7 +525,7 @@ FileProc(
*/
filePtr->readyMask |= mask;
- fileEvPtr = (FileHandlerEvent *) ckalloc(sizeof(FileHandlerEvent));
+ fileEvPtr = (FileHandlerEvent *) Tcl_Alloc(sizeof(FileHandlerEvent));
fileEvPtr->header.proc = FileHandlerEventProc;
fileEvPtr->fd = filePtr->fd;
Tcl_QueueEvent((Tcl_Event *) fileEvPtr, TCL_QUEUE_TAIL);