diff options
| author | dkf <donal.k.fellows@manchester.ac.uk> | 2023-05-24 16:02:24 (GMT) |
|---|---|---|
| committer | dkf <donal.k.fellows@manchester.ac.uk> | 2023-05-24 16:02:24 (GMT) |
| commit | 29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f (patch) | |
| tree | 76a21d1b72f69d7f7218eb0332f9d2afbed472d5 /unix | |
| parent | 4a3c559932945a74fed481561274ceedc4afe555 (diff) | |
| parent | 70a3d08fc4eb639c20c5613ea5952a0dfdd5e935 (diff) | |
| download | tcl-29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f.zip tcl-29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f.tar.gz tcl-29225e440c7dfc3b4fb54d8bb5a8b32fd9604d6f.tar.bz2 | |
merge core-8-branch
Diffstat (limited to 'unix')
| -rw-r--r-- | unix/Makefile.in | 54 | ||||
| -rw-r--r-- | unix/README | 4 | ||||
| -rwxr-xr-x | unix/configure | 114 | ||||
| -rw-r--r-- | unix/configure.ac | 5 | ||||
| -rw-r--r-- | unix/dltest/Makefile.in | 15 | ||||
| -rw-r--r-- | unix/dltest/pkga.c | 2 | ||||
| -rw-r--r-- | unix/dltest/pkgb.c | 7 | ||||
| -rw-r--r-- | unix/dltest/pkgooa.c | 15 | ||||
| -rw-r--r-- | unix/dltest/pkgt.c | 116 | ||||
| -rw-r--r-- | unix/dltest/pkgua.c | 2 | ||||
| -rwxr-xr-x | unix/install-sh | 4 | ||||
| -rw-r--r-- | unix/tcl.m4 | 26 | ||||
| -rw-r--r-- | unix/tcl.pc.in | 2 | ||||
| -rw-r--r-- | unix/tclAppInit.c | 2 | ||||
| -rw-r--r-- | unix/tclConfig.h.in | 12 | ||||
| -rw-r--r-- | unix/tclLoadDl.c | 2 | ||||
| -rw-r--r-- | unix/tclSelectNotfy.c | 5 | ||||
| -rw-r--r-- | unix/tclUnixChan.c | 22 | ||||
| -rw-r--r-- | unix/tclUnixCompat.c | 2 | ||||
| -rw-r--r-- | unix/tclUnixFCmd.c | 10 | ||||
| -rw-r--r-- | unix/tclUnixFile.c | 12 | ||||
| -rw-r--r-- | unix/tclUnixInit.c | 13 | ||||
| -rw-r--r-- | unix/tclUnixNotfy.c | 2 | ||||
| -rw-r--r-- | unix/tclUnixPipe.c | 12 | ||||
| -rw-r--r-- | unix/tclUnixPort.h | 2 | ||||
| -rw-r--r-- | unix/tclUnixSock.c | 202 | ||||
| -rw-r--r-- | unix/tclUnixTest.c | 4 | ||||
| -rw-r--r-- | unix/tclUnixThrd.c | 8 | ||||
| -rw-r--r-- | unix/tclUnixTime.c | 4 | ||||
| -rw-r--r-- | unix/tclXtNotify.c | 2 |
30 files changed, 473 insertions, 209 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in index 1769aa4..996cd30 100644 --- a/unix/Makefile.in +++ b/unix/Makefile.in @@ -335,9 +335,9 @@ TOMMATH_OBJS = bn_s_mp_reverse.o bn_s_mp_mul_digs_fast.o \ bn_mp_init_i64.o bn_mp_init_u64.o \ bn_s_mp_karatsuba_sqr.o bn_s_mp_balance_mul.o \ bn_mp_lshd.o bn_mp_mod.o bn_mp_mod_2d.o bn_mp_mul.o bn_mp_mul_2.o \ - bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_neg.o bn_mp_or.o \ - bn_mp_radix_size.o bn_mp_radix_smap.o bn_mp_set_i64.o \ - bn_mp_read_radix.o bn_mp_rshd.o \ + bn_mp_mul_2d.o bn_mp_mul_d.o bn_mp_neg.o bn_mp_or.o bn_mp_pack.o \ + bn_mp_pack_count.o bn_mp_radix_size.o bn_mp_radix_smap.o \ + bn_mp_set_i64.o bn_mp_read_radix.o bn_mp_rshd.o \ bn_mp_set_u64.o bn_mp_shrink.o \ bn_mp_sqr.o bn_mp_sqrt.o bn_mp_sub.o bn_mp_sub_d.o \ bn_mp_signed_rsh.o \ @@ -853,7 +853,7 @@ clean: clean-packages distclean: distclean-packages clean rm -rf Makefile config.status config.cache config.log tclConfig.sh \ - tclConfig.h *.plist Tcl.framework tcl.pc + tclConfig.h *.plist Tcl.framework tcl.pc tclUuid.h (cd dltest ; $(MAKE) distclean) depend: @@ -952,6 +952,27 @@ valgrind: ${TCL_EXE} ${TCLTEST_EXE} $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind \ $(TESTFLAGS) +testresults/valgrind/%.result: ${TCL_EXE} ${TCLTEST_EXE} + @mkdir -p testresults/valgrind + $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCLTEST_EXE} \ + $(TOP_DIR)/tests/all.tcl -singleproc 1 -constraints valgrind \ + -file $(basename $(notdir $@)) > $@.tmp 2>&1 + @mv $@.tmp $@ +.PRECIOUS: testresults/valgrind/%.result + + +testresults/valgrind/%.success: testresults/valgrind/%.result + @printf '%s' valgrind >&2 + @printf ' %s' $(basename $(notdir $@)) >&2 + @printf '\n >&2' + @status=$$(./${TCLTEST_EXE} $(TOP_DIR)/tools/valgrind_check_success \ + file $(basename $@).result); \ + if [ "$$status" -eq 1 ]; then touch $@; exit 0; else exit 1; fi + +valgrind_each: $(addprefix testresults/valgrind/,$(addsuffix .success,$(notdir\ + $(wildcard $(TOP_DIR)/tests/*.test)))) + + valgrindshell: ${TCL_EXE} $(SHELL_ENV) $(VALGRIND) $(VALGRINDARGS) ./${TCL_EXE} $(SCRIPT) @@ -1041,9 +1062,9 @@ install-libraries: libraries do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/cookiejar0.2"; \ done - @echo "Installing package http 2.10a4 as a Tcl Module" + @echo "Installing package http 2.10b1 as a Tcl Module" @$(INSTALL_DATA) $(TOP_DIR)/library/http/http.tcl \ - "$(MODULE_INSTALL_DIR)/8.6/http-2.10a4.tm" + "$(MODULE_INSTALL_DIR)/8.6/http-2.10b1.tm" @echo "Installing package opt0.4 files to $(SCRIPT_INSTALL_DIR)/opt0.4/" @for i in $(TOP_DIR)/library/opt/*.tcl; do \ $(INSTALL_DATA) $$i "$(SCRIPT_INSTALL_DIR)/opt0.4"; \ @@ -1051,12 +1072,12 @@ install-libraries: libraries @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" - @echo "Installing package tcltest 2.5.5 as a Tcl Module" + @echo "Installing package tcltest 2.5.6 as a Tcl Module" @$(INSTALL_DATA) $(TOP_DIR)/library/tcltest/tcltest.tcl \ - "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.5.tm" - @echo "Installing package platform 1.0.18 as a Tcl Module" + "$(MODULE_INSTALL_DIR)/8.5/tcltest-2.5.6.tm" + @echo "Installing package platform 1.0.19 as a Tcl Module" @$(INSTALL_DATA) $(TOP_DIR)/library/platform/platform.tcl \ - "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.18.tm" + "$(MODULE_INSTALL_DIR)/8.4/platform-1.0.19.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" @@ -1690,6 +1711,12 @@ bn_mp_neg.o: $(TOMMATH_DIR)/bn_mp_neg.c $(MATHHDRS) bn_mp_or.o: $(TOMMATH_DIR)/bn_mp_or.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_or.c +bn_mp_pack.o: $(TOMMATH_DIR)/bn_mp_pack.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_pack.c + +bn_mp_pack_count.o: $(TOMMATH_DIR)/bn_mp_pack_count.c $(MATHHDRS) + $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_pack_count.c + bn_mp_radix_size.o: $(TOMMATH_DIR)/bn_mp_radix_size.c $(MATHHDRS) $(CC) -c $(CC_SWITCHES) $(TOMMATH_DIR)/bn_mp_radix_size.c @@ -2266,9 +2293,8 @@ dist: $(UNIX_DIR)/configure $(UNIX_DIR)/tclConfig.h.in $(UNIX_DIR)/tcl.pc.in gen 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 \ - $(TOP_DIR)/ChangeLog.[12]??? $(TOP_DIR)/license.terms \ - $(DISTDIR) + cp -p $(TOP_DIR)/changes $(TOP_DIR)/README.md \ + $(TOP_DIR)/license.terms $(DISTDIR) @mkdir $(DISTDIR)/library cp -p $(TOP_DIR)/license.terms $(TOP_DIR)/library/*.tcl \ $(TOP_DIR)/library/manifest.txt \ @@ -2398,7 +2424,7 @@ html-tk: ${NATIVE_TCLSH} @EXTRA_BUILD_HTML@ BUILD_HTML = \ - @${NATIVE_TCLSH} $(TOOL_DIR)/tcltk-man2html.tcl \ + @${NATIVE_TCLSH} -encoding utf-8 $(TOOL_DIR)/tcltk-man2html.tcl \ --useversion=$(MAJOR_VERSION).$(MINOR_VERSION) \ --htmldir="$(HTML_INSTALL_DIR)" \ --srcdir=$(TOP_DIR) $(BUILD_HTML_FLAGS) diff --git a/unix/README b/unix/README index b8adc71..9dad93a 100644 --- a/unix/README +++ b/unix/README @@ -8,11 +8,11 @@ MacOSX platform too, but they all depend on UNIX (POSIX/ANSI C) interfaces and some of them only make sense under UNIX. Updated forms of the information found in this file is available at: - https://www.tcl-tk.org/doc/howto/compile.html#unix + https://www.tcl-lang.org/doc/howto/compile.html#unix For information on platforms where Tcl is known to compile, along with any porting notes for getting it to work on those platforms, see: - https://www.tcl-tk.org/software/tcltk/platforms.html + https://www.tcl-lang.org/software/tcltk/platforms.html The rest of this file contains instructions on how to do this. The release should compile and run either "out of the box" or with trivial changes on any diff --git a/unix/configure b/unix/configure index 3d7a61e..7bb92a4 100755 --- a/unix/configure +++ b/unix/configure @@ -6506,16 +6506,16 @@ then : do64bit_ok=yes fi;; - arm64|arm64e) - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch arm64e flag" >&5 -printf %s "checking if compiler accepts -arch arm64e flag... " >&6; } -if test ${tcl_cv_cc_arch_arm64e+y} + arm64) + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if compiler accepts -arch arm64 flag" >&5 +printf %s "checking if compiler accepts -arch arm64 flag... " >&6; } +if test ${tcl_cv_cc_arch_arm64+y} then : printf %s "(cached) " >&6 else $as_nop hold_cflags=$CFLAGS - CFLAGS="$CFLAGS -arch arm64e" + CFLAGS="$CFLAGS -arch arm64" cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ @@ -6529,20 +6529,20 @@ main (void) _ACEOF if ac_fn_c_try_link "$LINENO" then : - tcl_cv_cc_arch_arm64e=yes + tcl_cv_cc_arch_arm64=yes else $as_nop - tcl_cv_cc_arch_arm64e=no + tcl_cv_cc_arch_arm64=no fi rm -f core conftest.err conftest.$ac_objext conftest.beam \ conftest$ac_exeext conftest.$ac_ext CFLAGS=$hold_cflags fi -{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_arm64e" >&5 -printf "%s\n" "$tcl_cv_cc_arch_arm64e" >&6; } - if test $tcl_cv_cc_arch_arm64e = yes +{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: $tcl_cv_cc_arch_arm64" >&5 +printf "%s\n" "$tcl_cv_cc_arch_arm64" >&6; } + if test $tcl_cv_cc_arch_arm64 = yes then : - CFLAGS="$CFLAGS -arch arm64e" + CFLAGS="$CFLAGS -arch arm64" do64bit_ok=yes fi;; @@ -6554,7 +6554,7 @@ printf "%s\n" "$as_me: WARNING: Don't know how enable 64-bit on architecture \`a else $as_nop # Check for combined 32-bit and 64-bit fat build - if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64|arm64e) ' \ + if echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64|arm64) ' \ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) ' then : @@ -6654,7 +6654,7 @@ printf "%s\n" "#define MODULE_SCOPE __private_extern__" >>confdefs.h fi CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" - LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + LD_LIBRARY_PATH_VAR="DYLD_FALLBACK_LIBRARY_PATH" printf "%s\n" "#define MAC_OSX_TCL 1" >>confdefs.h @@ -7631,56 +7631,6 @@ printf "%s\n" "#define _LARGEFILE64_SOURCE 1" >>confdefs.h tcl_flags="$tcl_flags _LARGEFILE64_SOURCE" fi - - if test ${tcl_cv_flag__largefile_source64+y} -then : - printf %s "(cached) " >&6 -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#include <sys/stat.h> -int -main (void) -{ -char *p = (char *)open64; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - tcl_cv_flag__largefile_source64=no -else $as_nop - cat confdefs.h - <<_ACEOF >conftest.$ac_ext -/* end confdefs.h. */ -#define _LARGEFILE_SOURCE64 1 -#include <sys/stat.h> -int -main (void) -{ -char *p = (char *)open64; - ; - return 0; -} -_ACEOF -if ac_fn_c_try_compile "$LINENO" -then : - tcl_cv_flag__largefile_source64=yes -else $as_nop - tcl_cv_flag__largefile_source64=no -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi -rm -f core conftest.err conftest.$ac_objext conftest.beam conftest.$ac_ext -fi - - if test "x${tcl_cv_flag__largefile_source64}" = "xyes" ; then - -printf "%s\n" "#define _LARGEFILE_SOURCE64 1" >>confdefs.h - - tcl_flags="$tcl_flags _LARGEFILE_SOURCE64" - fi - if test "x${tcl_flags}" = "x" ; then { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: none" >&5 printf "%s\n" "none" >&6; } @@ -7691,8 +7641,8 @@ printf "%s\n" "${tcl_flags}" >&6; } - { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for 64-bit integer type" >&5 -printf %s "checking for 64-bit integer type... " >&6; } + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking if 'long' and 'long long' have the same size (64-bit)?" >&5 +printf %s "checking if 'long' and 'long long' have the same size (64-bit)?... " >&6; } if test ${tcl_cv_type_64bit+y} then : printf %s "(cached) " >&6 @@ -7729,6 +7679,8 @@ printf "%s\n" "#define TCL_WIDE_INT_IS_LONG 1" >>confdefs.h { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: yes" >&5 printf "%s\n" "yes" >&6; } else + { printf "%s\n" "$as_me:${as_lineno-$LINENO}: result: no" >&5 +printf "%s\n" "no" >&6; } # Now check for auxiliary declarations { printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking for struct dirent64" >&5 printf %s "checking for struct dirent64... " >&6; } @@ -8238,6 +8190,36 @@ printf "%s\n" "#define NO_WAIT3 1" >>confdefs.h fi +ac_fn_c_check_func "$LINENO" "fork" "ac_cv_func_fork" +if test "x$ac_cv_func_fork" = xyes +then : + +else $as_nop + +printf "%s\n" "#define NO_FORK 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "mknod" "ac_cv_func_mknod" +if test "x$ac_cv_func_mknod" = xyes +then : + +else $as_nop + +printf "%s\n" "#define NO_MKNOD 1" >>confdefs.h + +fi + +ac_fn_c_check_func "$LINENO" "tcdrain" "ac_cv_func_tcdrain" +if test "x$ac_cv_func_tcdrain" = xyes +then : + +else $as_nop + +printf "%s\n" "#define NO_TCDRAIN 1" >>confdefs.h + +fi + ac_fn_c_check_func "$LINENO" "uname" "ac_cv_func_uname" if test "x$ac_cv_func_uname" = xyes then : @@ -9647,7 +9629,7 @@ fi #-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even even if +# On some systems strstr is broken: it returns a pointer even if # the original string is empty. #-------------------------------------------------------------------- diff --git a/unix/configure.ac b/unix/configure.ac index fe56798..a695390 100644 --- a/unix/configure.ac +++ b/unix/configure.ac @@ -233,6 +233,9 @@ AC_REPLACE_FUNCS(mkstemp opendir strtol waitpid) AC_CHECK_FUNC(strerror, , [AC_DEFINE(NO_STRERROR, 1, [Do we have strerror()])]) AC_CHECK_FUNC(getwd, , [AC_DEFINE(NO_GETWD, 1, [Do we have getwd()])]) AC_CHECK_FUNC(wait3, , [AC_DEFINE(NO_WAIT3, 1, [Do we have wait3()])]) +AC_CHECK_FUNC(fork, , [AC_DEFINE(NO_FORK, 1, [Do we have fork()])]) +AC_CHECK_FUNC(mknod, , [AC_DEFINE(NO_MKNOD, 1, [Do we have mknod()])]) +AC_CHECK_FUNC(tcdrain, , [AC_DEFINE(NO_TCDRAIN, 1, [Do we have tcdrain()])]) AC_CHECK_FUNC(uname, , [AC_DEFINE(NO_UNAME, 1, [Do we have uname()])]) if test "`uname -s`" = "Darwin" && \ @@ -391,7 +394,7 @@ AC_CHECK_FUNC(memmove, , [ AC_DEFINE(NO_STRING_H, 1, [Do we have <string.h>?]) ]) #-------------------------------------------------------------------- -# On some systems strstr is broken: it returns a pointer even even if +# On some systems strstr is broken: it returns a pointer even if # the original string is empty. #-------------------------------------------------------------------- diff --git a/unix/dltest/Makefile.in b/unix/dltest/Makefile.in index 500bf97..b1b483b 100644 --- a/unix/dltest/Makefile.in +++ b/unix/dltest/Makefile.in @@ -17,7 +17,7 @@ TCL_VERSION= @TCL_VERSION@ CFLAGS_DEBUG = @CFLAGS_DEBUG@ CFLAGS_OPTIMIZE = @CFLAGS_OPTIMIZE@ -CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@ -DTCL_NO_DEPRECATED=1 +CFLAGS = @CFLAGS_DEFAULT@ @CFLAGS@ -DTCL_NO_DEPRECATED=1 -Wall -Wextra -Wc++-compat -Wconversion -Werror LDFLAGS_DEBUG = @LDFLAGS_DEBUG@ LDFLAGS_OPTIMIZE = @LDFLAGS_OPTIMIZE@ LDFLAGS = @LDFLAGS_DEFAULT@ @LDFLAGS@ @@ -25,11 +25,11 @@ 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: pkga${SHLIB_SUFFIX} pkgb${SHLIB_SUFFIX} pkgc${SHLIB_SUFFIX} pkgd${SHLIB_SUFFIX} pkge${SHLIB_SUFFIX} pkgt${SHLIB_SUFFIX} pkgua${SHLIB_SUFFIX} pkgooa${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: pkga${DLTEST_SUFFIX} pkgb${DLTEST_SUFFIX} pkgc${DLTEST_SUFFIX} pkgd${DLTEST_SUFFIX} pkge${DLTEST_SUFFIX} pkgt${DLTEST_SUFFIX} pkgua${DLTEST_SUFFIX} pkgooa${DLTEST_SUFFIX} @touch ../dltest.marker pkga.o: $(SRC_DIR)/pkga.c @@ -47,6 +47,9 @@ pkgd.o: $(SRC_DIR)/pkgd.c pkge.o: $(SRC_DIR)/pkge.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkge.c +pkgt.o: $(SRC_DIR)/pkgt.c + $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgt.c + pkgua.o: $(SRC_DIR)/pkgua.c $(CC) -c $(CC_SWITCHES) $(SRC_DIR)/pkgua.c @@ -68,6 +71,9 @@ pkgd${SHLIB_SUFFIX}: pkgd.o pkge${SHLIB_SUFFIX}: pkge.o ${SHLIB_LD} -o pkge${SHLIB_SUFFIX} pkge.o ${SHLIB_LD_LIBS} +pkgt${SHLIB_SUFFIX}: pkgt.o + ${SHLIB_LD} -o pkgt${SHLIB_SUFFIX} pkgt.o ${SHLIB_LD_LIBS} + pkgua${SHLIB_SUFFIX}: pkgua.o ${SHLIB_LD} -o pkgua${SHLIB_SUFFIX} pkgua.o ${SHLIB_LD_LIBS} @@ -89,6 +95,9 @@ pkgd${DLTEST_SUFFIX}: pkgd.o pkge${DLTEST_SUFFIX}: pkge.o ${DLTEST_LD} -o pkge${DLTEST_SUFFIX} pkge.o ${SHLIB_LD_LIBS} +pkgt${DLTEST_SUFFIX}: pkgt.o + ${DLTEST_LD} -o pkgt${DLTEST_SUFFIX} pkgt.o ${SHLIB_LD_LIBS} + pkgua${DLTEST_SUFFIX}: pkgua.o ${DLTEST_LD} -o pkgua${DLTEST_SUFFIX} pkgua.o ${SHLIB_LD_LIBS} diff --git a/unix/dltest/pkga.c b/unix/dltest/pkga.c index 579c323..d24a23e 100644 --- a/unix/dltest/pkga.c +++ b/unix/dltest/pkga.c @@ -51,7 +51,7 @@ Pkga_EqObjCmd( str1 = Tcl_GetStringFromObj(objv[1], &len1); str2 = Tcl_GetStringFromObj(objv[2], &len2); if (len1 == len2) { - result = (Tcl_UtfNcmp(str1, str2, len1) == 0); + result = (Tcl_UtfNcmp(str1, str2, (size_t)len1) == 0); } else { result = 0; } diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c index e9645a4..c16a362 100644 --- a/unix/dltest/pkgb.c +++ b/unix/dltest/pkgb.c @@ -13,6 +13,9 @@ #undef STATIC_BUILD #include "tcl.h" +#if defined(_WIN32) && defined(_MSC_VER) +# define snprintf _snprintf +#endif /* *---------------------------------------------------------------------- @@ -52,7 +55,7 @@ Pkgb_SubObjCmd( if ((Tcl_GetIntFromObj(interp, objv[1], &first) != TCL_OK) || (Tcl_GetIntFromObj(interp, objv[2], &second) != TCL_OK)) { char buf[TCL_INTEGER_SPACE]; - sprintf(buf, "%d", Tcl_GetErrorLine(interp)); + snprintf(buf, sizeof(buf), "%d", Tcl_GetErrorLine(interp)); Tcl_AppendResult(interp, " in line: ", buf, NULL); return TCL_ERROR; } @@ -109,7 +112,7 @@ Pkgb_DemoObjCmd( if (Tcl_GetWideIntFromObj(interp, objv[3], &numChars) != TCL_OK) { return TCL_ERROR; } - result = Tcl_UtfNcmp(Tcl_GetString(objv[1]), Tcl_GetString(objv[2]), numChars); + result = Tcl_UtfNcmp(Tcl_GetString(objv[1]), Tcl_GetString(objv[2]), (size_t)numChars); Tcl_SetObjResult(interp, Tcl_NewIntObj(result)); return TCL_OK; } diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c index ec9fbfd..e75a2c3 100644 --- a/unix/dltest/pkgooa.c +++ b/unix/dltest/pkgooa.c @@ -94,6 +94,15 @@ static TclOOStubs stubsCopy = { #ifdef Tcl_GetObjectClassName ,NULL #endif +#ifdef Tcl_MethodIsType2 + ,NULL +#endif +#ifdef Tcl_NewInstanceMethod2 + ,NULL +#endif +#ifdef Tcl_NewMethod2 + ,NULL +#endif }; DLLEXPORT int @@ -116,18 +125,18 @@ Pkgooa_Init( } if (tclStubsPtr == NULL) { Tcl_AppendResult(interp, "Tcl stubs are not initialized, " - "did you compile using -DUSE_TCL_STUBS? "); + "did you compile using -DUSE_TCL_STUBS? ", NULL); return TCL_ERROR; } if (Tcl_OOInitStubs(interp) == NULL) { return TCL_ERROR; } if (tclOOStubsPtr == NULL) { - Tcl_AppendResult(interp, "TclOO stubs are not initialized"); + Tcl_AppendResult(interp, "TclOO stubs are not initialized", NULL); return TCL_ERROR; } if (tclOOIntStubsPtr == NULL) { - Tcl_AppendResult(interp, "TclOO internal stubs are not initialized"); + Tcl_AppendResult(interp, "TclOO internal stubs are not initialized", NULL); return TCL_ERROR; } diff --git a/unix/dltest/pkgt.c b/unix/dltest/pkgt.c new file mode 100644 index 0000000..0c4b3d7 --- /dev/null +++ b/unix/dltest/pkgt.c @@ -0,0 +1,116 @@ +/* + * pkgt.c -- + * + * This file contains a simple Tcl package "pkgt" 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" + +static int TraceProc2 ( + void *clientData, + Tcl_Interp *interp, + ptrdiff_t level, + const char *command, + Tcl_Command commandInfo, + ptrdiff_t objc, + struct Tcl_Obj *const *objv) +{ + (void)clientData; + (void)interp; + (void)level; + (void)command; + (void)commandInfo; + (void)objc; + (void)objv; + + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Pkgt_EqObjCmd2 -- + * + * This procedure is invoked to process the "pkgt_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 +Pkgt_EqObjCmd2( + void *dummy, /* Not used. */ + Tcl_Interp *interp, /* Current interpreter. */ + ptrdiff_t objc, /* Number of arguments. */ + Tcl_Obj *const objv[]) /* Argument objects. */ +{ + Tcl_WideInt result; + const char *str1, *str2; + ptrdiff_t len1, len2; + (void)dummy; + + if (objc != 3) { + Tcl_WrongNumArgs(interp, 1, objv, "string1 string2"); + return TCL_ERROR; + } + + str1 = Tcl_GetStringFromObj(objv[1], &len1); + str2 = Tcl_GetStringFromObj(objv[2], &len2); + if (len1 == len2) { + result = (Tcl_UtfNcmp(str1, str2, (size_t)len1) == 0); + } else { + result = 0; + } + Tcl_SetObjResult(interp, Tcl_NewWideIntObj(result)); + return TCL_OK; +} + +/* + *---------------------------------------------------------------------- + * + * Pkgt_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 +Pkgt_Init( + Tcl_Interp *interp) /* Interpreter in which the package is to be + * made available. */ +{ + int code; + + if (Tcl_InitStubs(interp, "8.7-", 0) == NULL) { + return TCL_ERROR; + } + code = Tcl_PkgProvide(interp, "pkgt", "1.0"); + if (code != TCL_OK) { + return code; + } + Tcl_CreateObjCommand2(interp, "pkgt_eq", Pkgt_EqObjCmd2, NULL, NULL); + Tcl_CreateObjTrace2(interp, 0, 0, TraceProc2, NULL, NULL); + return TCL_OK; +} diff --git a/unix/dltest/pkgua.c b/unix/dltest/pkgua.c index 16684a8..409d7c1 100644 --- a/unix/dltest/pkgua.c +++ b/unix/dltest/pkgua.c @@ -138,7 +138,7 @@ PkguaEqObjCmd( str1 = Tcl_GetStringFromObj(objv[1], &len1); str2 = Tcl_GetStringFromObj(objv[2], &len2); if (len1 == len2) { - result = (Tcl_UtfNcmp(str1, str2, len1) == 0); + result = (Tcl_UtfNcmp(str1, str2, (size_t)len1) == 0); } else { result = 0; } diff --git a/unix/install-sh b/unix/install-sh index 21b733a..b6593f3 100755 --- a/unix/install-sh +++ b/unix/install-sh @@ -329,7 +329,7 @@ do ' 0 # Because "mkdir -p" follows existing symlinks and we likely work - # directly in world-writeable /tmp, make sure that the '$tmpdir' + # directly in world-writable /tmp, make sure that the '$tmpdir' # directory is successfully created first before we actually test # 'mkdir -p'. if (umask $mkdir_umask && @@ -515,4 +515,4 @@ done # time-stamp-format: "%:y-%02m-%02d.%02H" # time-stamp-time-zone: "UTC0" # time-stamp-end: "; # UTC" -# End:
\ No newline at end of file +# End: diff --git a/unix/tcl.m4 b/unix/tcl.m4 index 3730343..3717893 100644 --- a/unix/tcl.m4 +++ b/unix/tcl.m4 @@ -1406,16 +1406,16 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ CFLAGS="$CFLAGS -arch x86_64" do64bit_ok=yes ]);; - arm64|arm64e) - AC_CACHE_CHECK([if compiler accepts -arch arm64e flag], - tcl_cv_cc_arch_arm64e, [ + arm64) + AC_CACHE_CHECK([if compiler accepts -arch arm64 flag], + tcl_cv_cc_arch_arm64, [ hold_cflags=$CFLAGS - CFLAGS="$CFLAGS -arch arm64e" + CFLAGS="$CFLAGS -arch arm64" AC_LINK_IFELSE([AC_LANG_PROGRAM([[]], [[]])], - [tcl_cv_cc_arch_arm64e=yes],[tcl_cv_cc_arch_arm64e=no]) + [tcl_cv_cc_arch_arm64=yes],[tcl_cv_cc_arch_arm64=no]) CFLAGS=$hold_cflags]) - AS_IF([test $tcl_cv_cc_arch_arm64e = yes], [ - CFLAGS="$CFLAGS -arch arm64e" + AS_IF([test $tcl_cv_cc_arch_arm64 = yes], [ + CFLAGS="$CFLAGS -arch arm64" do64bit_ok=yes ]);; *) @@ -1423,7 +1423,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ esac ], [ # Check for combined 32-bit and 64-bit fat build - AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64|arm64e) ' \ + AS_IF([echo "$CFLAGS " |grep -E -q -- '-arch (ppc64|x86_64|arm64) ' \ && echo "$CFLAGS " |grep -E -q -- '-arch (ppc|i386) '], [ fat_32_64=yes]) ]) @@ -1459,7 +1459,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [ ]) CC_SEARCH_FLAGS="" LD_SEARCH_FLAGS="" - LD_LIBRARY_PATH_VAR="DYLD_LIBRARY_PATH" + LD_LIBRARY_PATH_VAR="DYLD_FALLBACK_LIBRARY_PATH" AC_DEFINE(MAC_OSX_TCL, 1, [Is this a Mac I see before me?]) PLAT_OBJS='${MAC_OSX_OBJS}' PLAT_SRCS='${MAC_OSX_SRCS}' @@ -2329,7 +2329,6 @@ AC_DEFUN([SC_TCL_LINK_LIBS], [ # Might define the following vars: # _ISOC99_SOURCE # _LARGEFILE64_SOURCE -# _LARGEFILE_SOURCE64 # #-------------------------------------------------------------------- @@ -2353,8 +2352,6 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ [char *p = (char *)strtoll; char *q = (char *)strtoull;]) SC_TCL_EARLY_FLAG(_LARGEFILE64_SOURCE,[#include <sys/stat.h>], [struct stat64 buf; int i = stat64("/", &buf);]) - SC_TCL_EARLY_FLAG(_LARGEFILE_SOURCE64,[#include <sys/stat.h>], - [char *p = (char *)open64;]) if test "x${tcl_flags}" = "x" ; then AC_MSG_RESULT([none]) else @@ -2381,7 +2378,7 @@ AC_DEFUN([SC_TCL_EARLY_FLAGS],[ #-------------------------------------------------------------------- AC_DEFUN([SC_TCL_64BIT_FLAGS], [ - AC_MSG_CHECKING([for 64-bit integer type]) + AC_MSG_CHECKING([if 'long' and 'long long' have the same size (64-bit)?]) AC_CACHE_VAL(tcl_cv_type_64bit,[ tcl_cv_type_64bit=none # See if we could use long anyway Note that we substitute in the @@ -2391,9 +2388,10 @@ AC_DEFUN([SC_TCL_64BIT_FLAGS], [ case 1: case (sizeof(long long)==sizeof(long)): ; }]])],[tcl_cv_type_64bit="long long"],[])]) if test "${tcl_cv_type_64bit}" = none ; then - AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, [Do 'long' and 'long long' have the same size (64-bit)?]) + AC_DEFINE(TCL_WIDE_INT_IS_LONG, 1, ['long' and 'long long' have the same size]) AC_MSG_RESULT([yes]) else + AC_MSG_RESULT([no]) # Now check for auxiliary declarations AC_CACHE_CHECK([for struct dirent64], tcl_cv_struct_dirent64,[ AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[#include <sys/types.h> diff --git a/unix/tcl.pc.in b/unix/tcl.pc.in index 21ea0ce..5f90c41 100644 --- a/unix/tcl.pc.in +++ b/unix/tcl.pc.in @@ -8,7 +8,7 @@ libfile=@TCL_LIB_FILE@ Name: Tool Command Language Description: Tcl is a powerful, easy-to-learn dynamic programming language, suitable for a wide range of uses. -URL: https://www.tcl-tk.org/ +URL: https://www.tcl-lang.org/ Version: @TCL_VERSION@@TCL_PATCH_LEVEL@ Requires.private: zlib >= 1.2.3, libtommath >= 1.2.0 Libs: -L${libdir} @TCL_LIB_FLAG@ @TCL_STUB_LIB_FLAG@ diff --git a/unix/tclAppInit.c b/unix/tclAppInit.c index 05d25de..b203487 100644 --- a/unix/tclAppInit.c +++ b/unix/tclAppInit.c @@ -91,7 +91,7 @@ main( TclZipfs_AppHook(&argc, &argv); #endif - Tcl_Main((size_t)argc, argv, TCL_LOCAL_APPINIT); + Tcl_Main(argc, argv, TCL_LOCAL_APPINIT); return 0; /* Needed only to prevent compiler warning. */ } diff --git a/unix/tclConfig.h.in b/unix/tclConfig.h.in index 1acc55d..f5c0e8b 100644 --- a/unix/tclConfig.h.in +++ b/unix/tclConfig.h.in @@ -340,6 +340,9 @@ /* Do we have fd_set? */ #undef NO_FD_SET +/* Do we have fork() */ +#undef NO_FORK + /* Do we have fstatfs()? */ #undef NO_FSTATFS @@ -352,6 +355,9 @@ /* Do we have memmove()? */ #undef NO_MEMMOVE +/* Do we have mknod() */ +#undef NO_MKNOD + /* Do we have realpath() */ #undef NO_REALPATH @@ -367,6 +373,9 @@ /* Do we have <sys/wait.h>? */ #undef NO_SYS_WAIT_H +/* Do we have tcdrain() */ +#undef NO_TCDRAIN + /* Do we have uname() */ #undef NO_UNAME @@ -483,9 +492,6 @@ /* Add the _LARGEFILE64_SOURCE flag when building */ #undef _LARGEFILE64_SOURCE -/* Add the _LARGEFILE_SOURCE64 flag when building */ -#undef _LARGEFILE_SOURCE64 - /* # needed in sys/socket.h Should OS/390 do the right thing with sockets? */ #undef _OE_SOCKETS diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c index 5c19ea3..afceafd 100644 --- a/unix/tclLoadDl.c +++ b/unix/tclLoadDl.c @@ -191,7 +191,7 @@ FindSymbol( #ifdef __cplusplus if (proc == NULL) { char buf[32]; - sprintf(buf, "%d", Tcl_DStringLength(&ds)); + snprintf(buf, sizeof(buf), "%d", Tcl_DStringLength(&ds)); Tcl_DStringInit(&newName); TclDStringAppendLiteral(&newName, "__Z"); Tcl_DStringAppend(&newName, buf, TCL_INDEX_NONE); diff --git a/unix/tclSelectNotfy.c b/unix/tclSelectNotfy.c index 732e4c9..fc77e77 100644 --- a/unix/tclSelectNotfy.c +++ b/unix/tclSelectNotfy.c @@ -938,7 +938,10 @@ TclAsyncNotifier( *flagPtr = value; if (!asyncPending) { asyncPending = 1; - write(triggerPipe, "S", 1); + if (write(triggerPipe, "S", 1) != 1) { + asyncPending = 0; + return 0; + }; } return 1; } diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c index 3751d6e..f9a054a 100644 --- a/unix/tclUnixChan.c +++ b/unix/tclUnixChan.c @@ -1250,7 +1250,7 @@ TtyGetOptionProc( valid = 1; TtyGetAttributes(fsPtr->fileState.fd, &tty); - sprintf(buf, "%d,%c,%d,%d", tty.baud, tty.parity, tty.data, tty.stop); + snprintf(buf, sizeof(buf), "%d,%c,%d,%d", tty.baud, tty.parity, tty.data, tty.stop); Tcl_DStringAppendElement(dsPtr, buf); } @@ -1296,9 +1296,9 @@ TtyGetOptionProc( inBuffered = Tcl_InputBuffered(fsPtr->fileState.channel); outBuffered = Tcl_OutputBuffered(fsPtr->fileState.channel); - sprintf(buf, "%d", inBuffered+inQueue); + snprintf(buf, sizeof(buf), "%d", inBuffered+inQueue); Tcl_DStringAppendElement(dsPtr, buf); - sprintf(buf, "%d", outBuffered+outQueue); + snprintf(buf, sizeof(buf), "%d", outBuffered+outQueue); Tcl_DStringAppendElement(dsPtr, buf); } @@ -1337,9 +1337,9 @@ TtyGetOptionProc( } return TCL_ERROR; } - sprintf(buf, "%d", ws.ws_col); + snprintf(buf, sizeof(buf), "%d", ws.ws_col); Tcl_DStringAppendElement(dsPtr, buf); - sprintf(buf, "%d", ws.ws_row); + snprintf(buf, sizeof(buf), "%d", ws.ws_row); Tcl_DStringAppendElement(dsPtr, buf); } #endif /* TIOCGWINSZ */ @@ -1705,7 +1705,7 @@ TtyParseMode( * * We cannot if/else/endif the strchr arguments, it has to be the whole * function. On AIX this function is apparently a macro, and macros do - * not allow pre-processor directives in their arguments. + * not allow preprocessor directives in their arguments. */ if ( @@ -1894,13 +1894,13 @@ TclpOpenFileChannel( translation = "auto crlf"; channelTypePtr = &ttyChannelType; TtyInit(fd); - sprintf(channelName, "serial%d", fd); + snprintf(channelName, sizeof(channelName), "serial%d", fd); } else #endif /* SUPPORTS_TTY */ { translation = NULL; channelTypePtr = &fileChannelType; - sprintf(channelName, "file%d", fd); + snprintf(channelName, sizeof(channelName), "file%d", fd); } fsPtr = (TtyState *)ckalloc(sizeof(TtyState)); @@ -1955,7 +1955,7 @@ TclpOpenFileChannel( Tcl_Channel Tcl_MakeFileChannel( void *handle, /* OS level handle. */ - int mode) /* ORed combination of TCL_READABLE and + int mode) /* OR'ed combination of TCL_READABLE and * TCL_WRITABLE to indicate file mode. */ { TtyState *fsPtr; @@ -1974,7 +1974,7 @@ Tcl_MakeFileChannel( #ifdef SUPPORTS_TTY if (isatty(fd)) { channelTypePtr = &ttyChannelType; - sprintf(channelName, "serial%d", fd); + snprintf(channelName, sizeof(channelName), "serial%d", fd); } else #endif /* SUPPORTS_TTY */ if ((getsockname(fd, (struct sockaddr *) &sockaddr, &sockaddrLen) == 0) @@ -1984,7 +1984,7 @@ Tcl_MakeFileChannel( return (Tcl_Channel)TclpMakeTcpClientChannelMode(INT2PTR(fd), mode); } else { channelTypePtr = &fileChannelType; - sprintf(channelName, "file%d", fd); + snprintf(channelName, sizeof(channelName), "file%d", fd); } fsPtr = (TtyState *)ckalloc(sizeof(TtyState)); diff --git a/unix/tclUnixCompat.c b/unix/tclUnixCompat.c index 7bd840a..3a7778e 100644 --- a/unix/tclUnixCompat.c +++ b/unix/tclUnixCompat.c @@ -736,7 +736,7 @@ CopyGrp( * * CopyHostent -- * - * Copies string fields of the hostnent structure to the private buffer, + * Copies string fields of the hostent structure to the private buffer, * honouring the size of the buffer. * * Results: diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c index 818209d..f8eaeb5 100644 --- a/unix/tclUnixFCmd.c +++ b/unix/tclUnixFCmd.c @@ -1,7 +1,7 @@ /* * tclUnixFCmd.c * - * This file implements the unix specific portion of file manipulation + * This file implements the Unix specific portion of file manipulation * subcommands of the "file" command. All filename arguments should * already be translated to native format. * @@ -340,7 +340,7 @@ DoRenameFile( } /* - * IRIX returns EIO when you attept to move a directory into itself. We + * IRIX returns EIO when you attempt to move a directory into itself. We * just map EIO to EINVAL get the right message on SGI. Most platforms * don't return EIO except in really strange cases. */ @@ -730,7 +730,7 @@ DoCreateDirectory( * * Recursively copies a directory. The target directory dst must not * already exist. Note that this function does not merge two directory - * hierarchies, even if the target directory is an an empty directory. + * hierarchies, even if the target directory is an empty directory. * * Results: * If the directory was successfully copied, returns TCL_OK. Otherwise @@ -1422,7 +1422,7 @@ GetOwnerAttribute( Tcl_DString ds; (void) Tcl_ExternalToUtfDString(NULL, pwPtr->pw_name, TCL_INDEX_NONE, &ds); - *attributePtrPtr = TclDStringToObj(&ds); + *attributePtrPtr = Tcl_DStringToObj(&ds); } return TCL_OK; } @@ -2339,7 +2339,7 @@ TclpCreateTemporaryDirectory( Tcl_ExternalToUtfDString(NULL, Tcl_DStringValue(&templ), Tcl_DStringLength(&templ), &tmp); Tcl_DStringFree(&templ); - return TclDStringToObj(&tmp); + return Tcl_DStringToObj(&tmp); } #if defined(__CYGWIN__) diff --git a/unix/tclUnixFile.c b/unix/tclUnixFile.c index d1b656b..aecdb3b 100644 --- a/unix/tclUnixFile.c +++ b/unix/tclUnixFile.c @@ -39,8 +39,7 @@ void TclpFindExecutable( TCL_UNUSED(const char *) /*argv0*/) { - Tcl_Encoding encoding; - int length; + size_t length; wchar_t buf[PATH_MAX] = L""; char name[PATH_MAX * 3 + 1]; @@ -51,9 +50,8 @@ TclpFindExecutable( /* Strip '.exe' part. */ length -= 4; } - encoding = Tcl_GetEncoding(NULL, NULL); TclSetObjNameOfExecutable( - Tcl_NewStringObj(name, length), encoding); + Tcl_NewStringObj(name, length), NULL); } #else void @@ -703,7 +701,7 @@ TclpObjLstat( * is either the given clientData, if the working directory hasn't * changed, or a new clientData (owned by our caller), giving the new * native path, or NULL if the current directory could not be determined. - * If NULL is returned, the caller can examine the standard posix error + * If NULL is returned, the caller can examine the standard Posix error * codes to determine the cause of the problem. * * Side effects: @@ -997,7 +995,7 @@ TclpObjLink( } Tcl_ExternalToUtfDString(NULL, link, length, &ds); - linkPtr = TclDStringToObj(&ds); + linkPtr = Tcl_DStringToObj(&ds); Tcl_IncrRefCount(linkPtr); return linkPtr; } @@ -1062,7 +1060,7 @@ TclpNativeToNormalized( Tcl_DString ds; Tcl_ExternalToUtfDString(NULL, (const char *) clientData, TCL_INDEX_NONE, &ds); - return TclDStringToObj(&ds); + return Tcl_DStringToObj(&ds); } /* diff --git a/unix/tclUnixInit.c b/unix/tclUnixInit.c index 21910e1..ce08425 100644 --- a/unix/tclUnixInit.c +++ b/unix/tclUnixInit.c @@ -469,7 +469,7 @@ TclpInitLibraryPath( * Look for the library relative to the TCL_LIBRARY env variable. If the * last dirname in the TCL_LIBRARY path does not match the last dirname in * the installLib variable, use the last dir name of installLib in - * addition to the orginal TCL_LIBRARY path. + * addition to the original TCL_LIBRARY path. */ str = getenv("TCL_LIBRARY"); /* INTL: Native. */ @@ -490,7 +490,7 @@ TclpInitLibraryPath( * installed. */ - sprintf(installLib, "lib/tcl%s", TCL_VERSION); + snprintf(installLib, sizeof(installLib), "lib/tcl%s", TCL_VERSION); /* * If TCL_LIBRARY is set, search there. @@ -510,7 +510,7 @@ TclpInitLibraryPath( pathv[pathc - 1] = installLib + 4; str = Tcl_JoinPath(pathc, pathv, &ds); - Tcl_ListObjAppendElement(NULL, pathPtr, TclDStringToObj(&ds)); + Tcl_ListObjAppendElement(NULL, pathPtr, Tcl_DStringToObj(&ds)); } ckfree(pathv); } @@ -886,8 +886,11 @@ TclpSetVariables( GetSystemInfo(&sysInfo); + if (osInfo.dwMajorVersion == 10 && osInfo.dwBuildNumber >= 22000) { + osInfo.dwMajorVersion = 11; + } Tcl_SetVar2(interp, "tcl_platform", "os", "Windows NT", TCL_GLOBAL_ONLY); - sprintf(buffer, "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion); + snprintf(buffer, sizeof(buffer), "%d.%d", osInfo.dwMajorVersion, osInfo.dwMinorVersion); Tcl_SetVar2(interp, "tcl_platform", "osVersion", buffer, TCL_GLOBAL_ONLY); if (sysInfo.wProcessorArchitecture < NUMPROCESSORS) { Tcl_SetVar2(interp, "tcl_platform", "machine", @@ -984,7 +987,7 @@ TclpSetVariables( * TclpFindVariable -- * * Locate the entry in environ for a given name. On Unix this routine is - * case sensetive, on Windows this matches mixed case. + * case sensitive, on Windows this matches mixed case. * * Results: * The return value is the index in environ of an entry with the name diff --git a/unix/tclUnixNotfy.c b/unix/tclUnixNotfy.c index 943e7d7..0a2b695 100644 --- a/unix/tclUnixNotfy.c +++ b/unix/tclUnixNotfy.c @@ -439,7 +439,7 @@ AtForkChild(void) /* * The tsdPtr from before the fork is copied as well. But since we - * are paranoic, we don't trust its condvar and reset it. + * are paranoiac, we don't trust its condvar and reset it. */ #ifdef __CYGWIN__ DestroyWindow(tsdPtr->hwnd); diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c index c53360a..a7ad056 100644 --- a/unix/tclUnixPipe.c +++ b/unix/tclUnixPipe.c @@ -393,12 +393,12 @@ TclpCreateProcess( * receive no standard input. */ TclFile outputFile, /* If non-NULL, gives the file that receives * output from the child process. If - * outputFile file is not writeable or is + * outputFile file is not writable or is * NULL, output from the child will be * discarded. */ TclFile errorFile, /* If non-NULL, gives the file that receives * errors from the child process. If errorFile - * file is not writeable or is NULL, errors + * file is not writable or is NULL, errors * from the child will be discarded. errorFile * may be the same as outputFile. */ Tcl_Pid *pidPtr) /* If this function is successful, pidPtr is @@ -475,7 +475,7 @@ TclpCreateProcess( || (!joinThisError && !SetupStdFile(errorFile, TCL_STDERR)) || (joinThisError && ((dup2(1,2) == -1) || (fcntl(2, F_SETFD, 0) != 0)))) { - sprintf(errSpace, + snprintf(errSpace, sizeof(errSpace), "%dforked process couldn't set up input/output", errno); len = strlen(errSpace); if (len != (size_t) write(fd, errSpace, len)) { @@ -490,7 +490,7 @@ TclpCreateProcess( RestoreSignals(); execvp(newArgv[0], newArgv); /* INTL: Native. */ - sprintf(errSpace, "%dcouldn't execute \"%.150s\"", errno, argv[0]); + snprintf(errSpace, sizeof(errSpace), "%dcouldn't execute \"%.150s\"", errno, argv[0]); len = strlen(errSpace); if (len != (size_t) write(fd, errSpace, len)) { Tcl_Panic("TclpCreateProcess: unable to write to errPipeOut"); @@ -548,7 +548,7 @@ TclpCreateProcess( * here, since this is the error case. [Bug: 6148] */ - Tcl_WaitPid((Tcl_Pid) INT2PTR(pid), &status, 0); + Tcl_WaitPid((Tcl_Pid)INT2PTR(pid), &status, 0); } if (errPipeIn) { @@ -782,7 +782,7 @@ TclpCreateCommandChannel( * natural to use "pipe%d". */ - sprintf(channelName, "file%d", channelId); + snprintf(channelName, sizeof(channelName), "file%d", channelId); statePtr->channel = Tcl_CreateChannel(&pipeChannelType, channelName, statePtr, mode); return statePtr->channel; diff --git a/unix/tclUnixPort.h b/unix/tclUnixPort.h index 791c2a3..5d5b14b 100644 --- a/unix/tclUnixPort.h +++ b/unix/tclUnixPort.h @@ -504,7 +504,7 @@ extern int gettimeofday(struct timeval *tp, /* *--------------------------------------------------------------------------- - * Not all systems declare the errno variable in errno.h. so this file does it + * Not all systems declare the errno variable in errno.h, so this file does it * explicitly. The list of system error messages also isn't generally declared * in a header file anywhere. *--------------------------------------------------------------------------- diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c index 217d5ce..45a3c4d 100644 --- a/unix/tclUnixSock.c +++ b/unix/tclUnixSock.c @@ -10,6 +10,7 @@ */ #include "tclInt.h" +#include <netinet/tcp.h> /* * Helper macros to make parts of this file clearer. The macros do exactly @@ -40,7 +41,7 @@ typedef union { } address; /* - * This structure describes per-instance state of a tcp based channel. + * This structure describes per-instance state of a tcp-based channel. */ typedef struct TcpState TcpState; @@ -53,7 +54,7 @@ typedef struct TcpFdList { struct TcpState { Tcl_Channel channel; /* Channel associated with this file. */ - int flags; /* ORed combination of the bitfields defined + int flags; /* OR'ed combination of the bitfields defined * below. */ TcpFdList fds; /* The file descriptors of the sockets. */ int interest; /* Event types of interest */ @@ -81,7 +82,7 @@ struct TcpState { }; /* - * These bits may be ORed together into the "flags" field of a TcpState + * These bits may be OR'ed together into the "flags" field of a TcpState * structure. */ @@ -139,6 +140,9 @@ static int TcpInputProc(void *instanceData, char *buf, int toRead, int *errorCode); static int TcpOutputProc(void *instanceData, const char *buf, int toWrite, int *errorCode); +static int TcpSetOptionProc(void *instanceData, + Tcl_Interp *interp, const char *optionName, + const char *value); static void TcpThreadActionProc(void *instanceData, int action); static void TcpWatchProc(void *instanceData, int mask); static int WaitForConnect(TcpState *statePtr, int *errorCodePtr); @@ -160,7 +164,7 @@ static const Tcl_ChannelType tcpChannelType = { TcpInputProc, /* Input proc. */ TcpOutputProc, /* Output proc. */ NULL, /* Seek proc. */ - NULL, /* Set option proc. */ + TcpSetOptionProc, /* Set option proc. */ TcpGetOptionProc, /* Get option proc. */ TcpWatchProc, /* Initialize notifier. */ TcpGetHandleProc, /* Get OS handles out of channel. */ @@ -318,29 +322,6 @@ Tcl_GetHostName(void) /* * ---------------------------------------------------------------------- * - * TclpHasSockets -- - * - * Detect if sockets are available on this platform. - * - * Results: - * Returns TCL_OK. - * - * Side effects: - * None. - * - * ---------------------------------------------------------------------- - */ - -int -TclpHasSockets( - TCL_UNUSED(Tcl_Interp *)) -{ - return TCL_OK; -} - -/* - * ---------------------------------------------------------------------- - * * TclpFinalizeSockets -- * * Performs per-thread socket subsystem finalization. @@ -408,17 +389,17 @@ TcpBlockModeProc( * * Check the state of an async connect process. If a connection attempt * terminated, process it, which may finalize it or may start the next - * attempt. If a connect error occures, it is saved in + * attempt. If a connect error occurs, it is saved in * statePtr->connectError to be reported by 'fconfigure -error'. * * There are two modes of operation, defined by errorCodePtr: - * * non-NULL: Called by explicite read/write command. Blocks if the + * * non-NULL: Called by explicit read/write command. Blocks if the * socket is blocking. * May return two error codes: * * EWOULDBLOCK: if connect is still in progress * * ENOTCONN: if connect failed. This would be the error message - * of a rect or sendto syscall so this is emulated here. - * * NULL: Called by a backround operation. Do not block and do not + * of a recv or sendto syscall so this is emulated here. + * * NULL: Called by a background operation. Do not block and do not * return any error code. * * Results: @@ -450,7 +431,7 @@ WaitForConnect( } /* - * Check if an async connect is running. If not return ok + * Check if an async connect is running. If not return ok. */ if (!GOT_BITS(statePtr->flags, TCP_ASYNC_PENDING)) { @@ -537,7 +518,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; } @@ -587,7 +568,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; @@ -808,6 +789,87 @@ TcpHostPortList( /* *---------------------------------------------------------------------- * + * TcpSetOptionProc -- + * + * Sets TCP channel specific options. + * + * Results: + * None, unless an error happens. + * + * Side effects: + * Changes attributes of the socket at the system level. + * + *---------------------------------------------------------------------- + */ + +static int +TcpSetOptionProc( + void *instanceData, /* Socket state. */ + Tcl_Interp *interp, /* For error reporting - can be NULL. */ + const char *optionName, /* Name of the option to set. */ + const char *value) /* New value for option. */ +{ + TcpState *statePtr = (TcpState *)instanceData; + size_t len = 0; + + if (optionName != NULL) { + len = strlen(optionName); + } + + if ((len > 1) && (optionName[1] == 'k') && + (strncmp(optionName, "-keepalive", len) == 0)) { + int val = 0, ret; + + if (Tcl_GetBoolean(interp, value, &val) != TCL_OK) { + return TCL_ERROR; + } +#if defined(SO_KEEPALIVE) + ret = setsockopt(statePtr->fds.fd, SOL_SOCKET, SO_KEEPALIVE, + (const char *) &val, sizeof(int)); +#else + ret = -1; + Tcl_SetErrno(ENOTSUP); +#endif + if (ret < 0) { + if (interp) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't set socket option: %s", + Tcl_PosixError(interp))); + } + return TCL_ERROR; + } + return TCL_OK; + } + if ((len > 1) && (optionName[1] == 'n') && + (strncmp(optionName, "-nodelay", len) == 0)) { + int val = 0, ret; + + if (Tcl_GetBoolean(interp, value, &val) != TCL_OK) { + return TCL_ERROR; + } +#if defined(SOL_TCP) && defined(TCP_NODELAY) + ret = setsockopt(statePtr->fds.fd, SOL_TCP, TCP_NODELAY, + (const char *) &val, sizeof(int)); +#else + ret = -1; + Tcl_SetErrno(ENOTSUP); +#endif + if (ret < 0) { + if (interp) { + Tcl_SetObjResult(interp, Tcl_ObjPrintf( + "couldn't set socket option: %s", + Tcl_PosixError(interp))); + } + return TCL_ERROR; + } + return TCL_OK; + } + return Tcl_BadChannelOption(interp, optionName, "keepalive nodelay"); +} + +/* + *---------------------------------------------------------------------- + * * TcpGetOptionProc -- * * Computes an option value for a TCP socket based channel, or a list of @@ -828,7 +890,7 @@ TcpHostPortList( static int TcpGetOptionProc( - void *instanceData, /* Socket state. */ + void *instanceData, /* Socket state. */ Tcl_Interp *interp, /* For error reporting - can be NULL. */ const char *optionName, /* Name of the option to retrieve the value * for, or NULL to get all options and their @@ -839,8 +901,6 @@ TcpGetOptionProc( TcpState *statePtr = (TcpState *)instanceData; size_t len = 0; - WaitForConnect(statePtr, NULL); - if (optionName != NULL) { len = strlen(optionName); } @@ -849,6 +909,7 @@ TcpGetOptionProc( (strncmp(optionName, "-error", len) == 0)) { socklen_t optlen = sizeof(int); + WaitForConnect(statePtr, NULL); if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) { /* * Suppress errors as long as we are not done. @@ -873,6 +934,7 @@ TcpGetOptionProc( if ((len > 1) && (optionName[1] == 'c') && (strncmp(optionName, "-connecting", len) == 0)) { + WaitForConnect(statePtr, NULL); Tcl_DStringAppend(dsPtr, GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT) ? "1" : "0", TCL_INDEX_NONE); return TCL_OK; @@ -883,6 +945,7 @@ TcpGetOptionProc( address peername; socklen_t size = sizeof(peername); + WaitForConnect(statePtr, NULL); if (GOT_BITS(statePtr->flags, TCP_ASYNC_CONNECT)) { /* * In async connect output an empty string @@ -930,10 +993,11 @@ TcpGetOptionProc( if ((len == 0) || ((len > 1) && (optionName[1] == 's') && (strncmp(optionName, "-sockname", len) == 0))) { TcpFdList *fds; - address sockname; - socklen_t size; + address sockname; + socklen_t size; int found = 0; + WaitForConnect(statePtr, NULL); if (len == 0) { Tcl_DStringAppendElement(dsPtr, "-sockname"); Tcl_DStringStartSublist(dsPtr); @@ -967,9 +1031,49 @@ TcpGetOptionProc( } } + if ((len == 0) || ((len > 1) && (optionName[1] == 'k') && + (strncmp(optionName, "-keepalive", len) == 0))) { + int opt = 0; +#if defined(SO_KEEPALIVE) + socklen_t size = sizeof(opt); +#endif + + if (len == 0) { + Tcl_DStringAppendElement(dsPtr, "-keepalive"); + } +#if defined(SO_KEEPALIVE) + getsockopt(statePtr->fds.fd, SOL_SOCKET, SO_KEEPALIVE, + (char *) &opt, &size); +#endif + Tcl_DStringAppendElement(dsPtr, opt ? "1" : "0"); + if (len > 0) { + return TCL_OK; + } + } + + if ((len == 0) || ((len > 1) && (optionName[1] == 'n') && + (strncmp(optionName, "-nodelay", len) == 0))) { + int opt = 0; +#if defined(SOL_TCP) && defined(TCP_NODELAY) + socklen_t size = sizeof(opt); +#endif + + if (len == 0) { + Tcl_DStringAppendElement(dsPtr, "-nodelay"); + } +#if defined(SOL_TCP) && defined(TCP_NODELAY) + getsockopt(statePtr->fds.fd, SOL_TCP, TCP_NODELAY, + (char *) &opt, &size); +#endif + Tcl_DStringAppendElement(dsPtr, opt ? "1" : "0"); + if (len > 0) { + return TCL_OK; + } + } + if (len > 0) { return Tcl_BadChannelOption(interp, optionName, - "connecting peername sockname"); + "connecting keepalive nodelay peername sockname"); } return TCL_OK; @@ -1100,7 +1204,7 @@ TcpWatchProc( * socket file descriptor is writable when the other end of the socket * is closed. This is in contrast to the guarantees Tcl makes that * its channels become writable and fire writable events on an error - * conditon. This has caused a leak of file descriptors in a state of + * condition. This has caused a leak of file descriptors in a state of * background flushing. See Tcl ticket 1758a0b603. * * As a workaround, when our caller indicates an interest in writable @@ -1444,7 +1548,7 @@ Tcl_OpenTcpClient( return NULL; } - sprintf(channelName, SOCK_TEMPLATE, PTR2INT(statePtr)); + snprintf(channelName, sizeof(channelName), SOCK_TEMPLATE, PTR2INT(statePtr)); statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, statePtr, TCL_READABLE | TCL_WRITABLE); @@ -1500,7 +1604,7 @@ Tcl_MakeTcpClientChannel( void * TclpMakeTcpClientChannelMode( void *sock, /* The socket to wrap up into a channel. */ - int mode) /* ORed combination of TCL_READABLE and + int mode) /* OR'ed combination of TCL_READABLE and * TCL_WRITABLE to indicate file mode. */ { TcpState *statePtr; @@ -1511,7 +1615,7 @@ TclpMakeTcpClientChannelMode( statePtr->fds.fd = PTR2INT(sock); statePtr->flags = 0; - sprintf(channelName, SOCK_TEMPLATE, PTR2INT(statePtr)); + snprintf(channelName, sizeof(channelName), SOCK_TEMPLATE, PTR2INT(statePtr)); statePtr->channel = Tcl_CreateChannel(&tcpChannelType, channelName, statePtr, mode); @@ -1546,6 +1650,7 @@ Tcl_OpenTcpServerEx( const char *service, /* Port number to open. */ const char *myHost, /* Name of local host. */ unsigned int flags, /* Flags. */ + int backlog, /* Length of OS listen backlog queue. */ Tcl_TcpAcceptProc *acceptProc, /* Callback for accepting connections from new * clients. */ @@ -1711,7 +1816,10 @@ Tcl_OpenTcpServerEx( chosenport = ntohs(sockname.sa4.sin_port); } } - status = listen(sock, SOMAXCONN); + if (backlog < 0) { + backlog = SOMAXCONN; + } + status = listen(sock, backlog); if (status < 0) { if (howfar < LISTEN) { howfar = LISTEN; @@ -1733,7 +1841,7 @@ Tcl_OpenTcpServerEx( memset(statePtr, 0, sizeof(TcpState)); statePtr->acceptProc = acceptProc; statePtr->acceptProcData = acceptProcData; - sprintf(channelName, SOCK_TEMPLATE, PTR2INT(statePtr)); + snprintf(channelName, sizeof(channelName), SOCK_TEMPLATE, PTR2INT(statePtr)); newfds = &statePtr->fds; } else { newfds = (TcpFdList *)ckalloc(sizeof(TcpFdList)); @@ -1825,7 +1933,7 @@ TcpAccept( newSockState->flags = 0; newSockState->fds.fd = newsock; - sprintf(channelName, SOCK_TEMPLATE, PTR2INT(newSockState)); + snprintf(channelName, sizeof(channelName), SOCK_TEMPLATE, PTR2INT(newSockState)); newSockState->channel = Tcl_CreateChannel(&tcpChannelType, channelName, newSockState, TCL_READABLE | TCL_WRITABLE); diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c index 80e8081..ee1229b 100644 --- a/unix/tclUnixTest.c +++ b/unix/tclUnixTest.c @@ -190,7 +190,7 @@ TestfilehandlerCmd( Tcl_WrongNumArgs(interp, 2, objv, "index"); return TCL_ERROR; } - sprintf(buf, "%d %d", pipePtr->readCount, pipePtr->writeCount); + snprintf(buf, sizeof(buf), "%d %d", pipePtr->readCount, pipePtr->writeCount); Tcl_AppendResult(interp, buf, NULL); } else if (strcmp(Tcl_GetString(objv[1]), "create") == 0) { if (objc != 5) { @@ -594,7 +594,7 @@ TestgotsigCmd( * * Implements the "testchmod" cmd. Used when testing "file" command. * The only attribute used by the Windows platform is the user write - * flag; if this is not set, the file is made read-only. Otehrwise, the + * flag; if this is not set, the file is made read-only. Otherwise, the * file is made read-write. * * Results: diff --git a/unix/tclUnixThrd.c b/unix/tclUnixThrd.c index aa5926e..c67495e 100644 --- a/unix/tclUnixThrd.c +++ b/unix/tclUnixThrd.c @@ -222,7 +222,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 */ + TCL_HASH_TYPE stackSize, /* Size of stack for the new thread */ int flags) /* Flags controlling behaviour of the new * thread. */ { @@ -236,7 +236,7 @@ TclpThreadCreate( #ifdef HAVE_PTHREAD_ATTR_SETSTACKSIZE if (stackSize != TCL_THREAD_STACK_DEFAULT) { - pthread_attr_setstacksize(&attr, stackSize); + pthread_attr_setstacksize(&attr, (size_t)stackSize); #ifdef TCL_THREAD_STACK_MIN } else { /* @@ -255,7 +255,7 @@ TclpThreadCreate( result = pthread_attr_getstacksize(&attr, &size); if (!result && (size < TCL_THREAD_STACK_MIN)) { - pthread_attr_setstacksize(&attr, (size_t) TCL_THREAD_STACK_MIN); + pthread_attr_setstacksize(&attr, (size_t)TCL_THREAD_STACK_MIN); } #endif /* TCL_THREAD_STACK_MIN */ } @@ -827,7 +827,7 @@ TclpInetNtoa( 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]); + snprintf(tsdPtr->nabuf, sizeof(tsdPtr->nabuf), "%u.%u.%u.%u", b[0], b[1], b[2], b[3]); return tsdPtr->nabuf; #else return inet_ntoa(addr); diff --git a/unix/tclUnixTime.c b/unix/tclUnixTime.c index 6ca641d..f242cf4 100644 --- a/unix/tclUnixTime.c +++ b/unix/tclUnixTime.c @@ -132,7 +132,7 @@ TclpGetMicroseconds(void) * TclpGetClicks -- * * This procedure returns a value that represents the highest resolution - * clock available on the system. There are no garantees on what the + * 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. * @@ -181,7 +181,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. * diff --git a/unix/tclXtNotify.c b/unix/tclXtNotify.c index 45bda3e..4388009 100644 --- a/unix/tclXtNotify.c +++ b/unix/tclXtNotify.c @@ -17,7 +17,7 @@ #include "tclInt.h" /* - * This structure is used to keep track of the notifier info for a a + * This structure is used to keep track of the notifier info for a * registered file. */ |
