summaryrefslogtreecommitdiffstats
path: root/unix
diff options
context:
space:
mode:
Diffstat (limited to 'unix')
-rw-r--r--unix/Makefile.in152
-rwxr-xr-xunix/configure7
-rw-r--r--unix/configure.ac8
-rw-r--r--unix/dltest/pkgb.c2
-rw-r--r--unix/dltest/pkgooa.c27
-rw-r--r--unix/dltest/pkgt.c8
-rwxr-xr-xunix/install-sh37
-rw-r--r--unix/tclLoadDl.c2
-rw-r--r--unix/tclLoadDyld.c2
-rw-r--r--unix/tclLoadNext.c2
-rw-r--r--unix/tclLoadOSF.c2
-rw-r--r--unix/tclUnixChan.c56
-rw-r--r--unix/tclUnixFCmd.c6
-rw-r--r--unix/tclUnixPipe.c27
-rw-r--r--unix/tclUnixSock.c8
-rw-r--r--unix/tclUnixTest.c32
-rw-r--r--unix/tclXtTest.c2
17 files changed, 221 insertions, 159 deletions
diff --git a/unix/Makefile.in b/unix/Makefile.in
index c63bddc..29a28eb 100644
--- a/unix/Makefile.in
+++ b/unix/Makefile.in
@@ -150,8 +150,8 @@ SHELL = @MAKEFILE_SHELL@
# around; better to use the install-sh script that comes with the
# distribution, which is slower but guaranteed to work.
-INSTALL_STRIP_PROGRAM = -s
-INSTALL_STRIP_LIBRARY = -S -x
+INSTALL_STRIP_PROGRAM = strip
+INSTALL_STRIP_LIBRARY = strip -x
INSTALL = $(SHELL) $(UNIX_DIR)/install-sh -c
INSTALL_PROGRAM = ${INSTALL}
@@ -235,7 +235,7 @@ PKGS_DIR = $(TOP_DIR)/pkgs
# Must be absolute because of the cd dltest $(DLTEST_DIR)/configure below.
DLTEST_DIR = @TCL_SRC_DIR@/unix/dltest
# Must be absolute to so the corresponding tcltest's tcl_library is absolute.
-TCL_BUILDTIME_LIBRARY = @TCL_SRC_DIR@/library
+TCL_BUILDTIME_LIBRARY = @TCL_BUILDTIME_LIBRARY@
ZLIB_DIR = ${COMPAT_DIR}/zlib
ZLIB_INCLUDE = @ZLIB_INCLUDE@
@@ -882,13 +882,22 @@ SHELL_ENV = @LD_LIBRARY_PATH_VAR@=`pwd`:${@LD_LIBRARY_PATH_VAR@} \
TCLLIBPATH="@abs_builddir@/pkgs" \
TCL_LIBRARY="${TCL_BUILDTIME_LIBRARY}"
-${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST}
+${TCLTEST_EXE}: ${TCLTEST_OBJS} ${TCL_LIB_FILE} ${TCL_STUB_LIB_FILE} ${BUILD_DLTEST} ${TCL_ZIP_FILE}
$(MAKE) tcltest-real LIB_RUNTIME_DIR="`pwd`"
tcltest-real:
${CC} ${CFLAGS} ${LDFLAGS} ${TCLTEST_OBJS} \
@TCL_BUILD_LIB_SPEC@ ${TCL_STUB_LIB_FILE} ${LIBS} @EXTRA_TCLSH_LIBS@ \
${CC_SEARCH_FLAGS} -o ${TCLTEST_EXE}
+ @if test "${ZIPFS_BUILD}" = "2" ; then \
+ if test "x$(MACHER)" = "x" ; then \
+ cat ${TCL_ZIP_FILE} >> ${TCLTEST_EXE}; \
+ else $(MACHER) append ${TCLTEST_EXE} ${TCL_ZIP_FILE} /tmp/macher_output; \
+ mv /tmp/macher_output ${TCLTEST_EXE}; chmod u+x ${TCLTEST_EXE}; \
+ fi; \
+ ${NATIVE_ZIP} -A ${TCLTEST_EXE} \
+ || echo 'ignore zip-error by adjust sfx process (not executable?)'; \
+ fi
# Note, in the targets below TCL_LIBRARY needs to be set or else "make test"
# won't work in the case where the compilation directory isn't the same as the
@@ -997,8 +1006,8 @@ install: $(INSTALL_TARGETS)
install-strip:
$(MAKE) $(INSTALL_TARGETS) \
- INSTALL_PROGRAM="$(INSTALL_PROGRAM) ${INSTALL_STRIP_PROGRAM}" \
- INSTALL_LIBRARY="$(INSTALL_LIBRARY) ${INSTALL_STRIP_LIBRARY}"
+ INSTALL_PROGRAM="STRIPPROG='${INSTALL_STRIP_PROGRAM}' $(INSTALL_PROGRAM) -s" \
+ INSTALL_LIBRARY="STRIPPROG='${INSTALL_STRIP_LIBRARY}' $(INSTALL_LIBRARY) -s"
install-binaries: binaries
@for i in "$(LIB_INSTALL_DIR)" "$(BIN_INSTALL_DIR)" \
@@ -2233,6 +2242,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 = $(INSTALL) -p -m 644
+DIST_INSTALL_SCRIPT = $(INSTALL) -p -m 755
BUILTIN_PACKAGE_LIST = cookiejar http opt msgcat registry dde tcltest platform
$(UNIX_DIR)/configure: $(UNIX_DIR)/configure.ac $(UNIX_DIR)/tcl.m4 \
@@ -2258,120 +2269,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)/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)/README.md \
$(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/*.dat.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/*.dat.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)/libtommath
+ $(INSTALL_DATA_DIR) $(DISTDIR)/libtommath
@echo cp -r $(TOP_DIR)/libtommath $(DISTDIR)/libtommath
@( cd $(TOP_DIR)/libtommath; find . -type f -print ) \
| ( cd $(TOP_DIR)/libtommath ; xargs tar cf - ) \
| ( cd $(DISTDIR)/libtommath ; 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 $(TOP_DIR)/win/tclUuid.h.in \
$(TOP_DIR)/win/gitmanifest.in $(TOP_DIR)/win/svnmanifest.in \
$(TOP_DIR)/win/x86_64-w64-mingw32-nmakehlp.exe $(DISTDIR)/win
chmod 775 $(DISTDIR)/win/x86_64-w64-mingw32-nmakehlp.exe
- 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.xcodeproj
- cp -p $(MAC_OSX_DIR)/Tcl.xcodeproj/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.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)/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)/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)
diff --git a/unix/configure b/unix/configure
index eb63649..ce98b3b 100755
--- a/unix/configure
+++ b/unix/configure
@@ -691,6 +691,7 @@ TCL_PATCH_LEVEL
TCL_MINOR_VERSION
TCL_MAJOR_VERSION
TCL_VERSION
+TCL_BUILDTIME_LIBRARY
INSTALL_MSGS
INSTALL_LIBRARIES
TCL_ZIP_FILE
@@ -10885,6 +10886,12 @@ INSTALL_LIBRARIES=install-libraries
INSTALL_MSGS=install-msgs
fi
+# Point to tcl script library if we are not embedding it.
+if test "${ZIPFS_BUILD}" = 0; then
+TCL_BUILDTIME_LIBRARY=${TCL_SRC_DIR}/library
+fi
+
+
diff --git a/unix/configure.ac b/unix/configure.ac
index 0f06e62..99a096e 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -870,11 +870,17 @@ AC_MSG_RESULT([no])
INSTALL_LIBRARIES=install-libraries
INSTALL_MSGS=install-msgs
fi
+
+# Point to tcl script library if we are not embedding it.
+if test "${ZIPFS_BUILD}" = 0; then
+TCL_BUILDTIME_LIBRARY=${TCL_SRC_DIR}/library
+fi
+
AC_SUBST(ZIPFS_BUILD)
AC_SUBST(TCL_ZIP_FILE)
AC_SUBST(INSTALL_LIBRARIES)
AC_SUBST(INSTALL_MSGS)
-
+AC_SUBST(TCL_BUILDTIME_LIBRARY)
#--------------------------------------------------------------------
# The statements below define the symbol TCL_PACKAGE_PATH, which
diff --git a/unix/dltest/pkgb.c b/unix/dltest/pkgb.c
index 9e9f64f..165c5e3 100644
--- a/unix/dltest/pkgb.c
+++ b/unix/dltest/pkgb.c
@@ -56,7 +56,7 @@ Pkgb_SubObjCmd(
|| (Tcl_GetIntFromObj(interp, objv[2], &second) != TCL_OK)) {
char buf[TCL_INTEGER_SPACE];
snprintf(buf, sizeof(buf), "%d", Tcl_GetErrorLine(interp));
- Tcl_AppendResult(interp, " in line: ", buf, NULL);
+ Tcl_AppendResult(interp, " in line: ", buf, (void *)NULL);
return TCL_ERROR;
}
Tcl_SetObjResult(interp, Tcl_NewIntObj(first - second));
diff --git a/unix/dltest/pkgooa.c b/unix/dltest/pkgooa.c
index e75a2c3..60e3864 100644
--- a/unix/dltest/pkgooa.c
+++ b/unix/dltest/pkgooa.c
@@ -84,25 +84,8 @@ static TclOOStubs stubsCopy = {
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
NULL, NULL, NULL, NULL, NULL, NULL, NULL,
- NULL, NULL, NULL, NULL, NULL, NULL, NULL
-#ifdef Tcl_MethodIsPrivate
- ,NULL
-#endif
-#ifdef Tcl_GetClassOfObject
- ,NULL
-#endif
-#ifdef Tcl_GetObjectClassName
- ,NULL
-#endif
-#ifdef Tcl_MethodIsType2
- ,NULL
-#endif
-#ifdef Tcl_NewInstanceMethod2
- ,NULL
-#endif
-#ifdef Tcl_NewMethod2
- ,NULL
-#endif
+ NULL, NULL, NULL, NULL, NULL, NULL, NULL,
+ NULL, NULL, NULL, NULL, NULL, NULL
};
DLLEXPORT int
@@ -125,18 +108,18 @@ Pkgooa_Init(
}
if (tclStubsPtr == NULL) {
Tcl_AppendResult(interp, "Tcl stubs are not initialized, "
- "did you compile using -DUSE_TCL_STUBS? ", NULL);
+ "did you compile using -DUSE_TCL_STUBS? ", (void *)NULL);
return TCL_ERROR;
}
if (Tcl_OOInitStubs(interp) == NULL) {
return TCL_ERROR;
}
if (tclOOStubsPtr == NULL) {
- Tcl_AppendResult(interp, "TclOO stubs are not initialized", NULL);
+ Tcl_AppendResult(interp, "TclOO stubs are not initialized", (void *)NULL);
return TCL_ERROR;
}
if (tclOOIntStubsPtr == NULL) {
- Tcl_AppendResult(interp, "TclOO internal stubs are not initialized", NULL);
+ Tcl_AppendResult(interp, "TclOO internal stubs are not initialized", (void *)NULL);
return TCL_ERROR;
}
diff --git a/unix/dltest/pkgt.c b/unix/dltest/pkgt.c
index 0c4b3d7..522f4db 100644
--- a/unix/dltest/pkgt.c
+++ b/unix/dltest/pkgt.c
@@ -16,10 +16,10 @@
static int TraceProc2 (
void *clientData,
Tcl_Interp *interp,
- ptrdiff_t level,
+ Tcl_Size level,
const char *command,
Tcl_Command commandInfo,
- ptrdiff_t objc,
+ Tcl_Size objc,
struct Tcl_Obj *const *objv)
{
(void)clientData;
@@ -55,12 +55,12 @@ static int
Pkgt_EqObjCmd2(
void *dummy, /* Not used. */
Tcl_Interp *interp, /* Current interpreter. */
- ptrdiff_t objc, /* Number of arguments. */
+ Tcl_Size objc, /* Number of arguments. */
Tcl_Obj *const objv[]) /* Argument objects. */
{
Tcl_WideInt result;
const char *str1, *str2;
- ptrdiff_t len1, len2;
+ Tcl_Size len1, len2;
(void)dummy;
if (objc != 3) {
diff --git a/unix/install-sh b/unix/install-sh
index b6593f3..ec298b5 100755
--- a/unix/install-sh
+++ b/unix/install-sh
@@ -1,7 +1,7 @@
#!/bin/sh
# install - install a program, script, or datafile
-scriptversion=2020-07-26.22; # UTC
+scriptversion=2020-11-14.01; # UTC
# This originates from X11R5 (mit/util/scripts/install.sh), which was
# later released in X11R6 (xc/config/util/install.sh) with the
@@ -73,6 +73,7 @@ mode=0755
# This is like GNU 'install' as of coreutils 8.32 (2020).
mkdir_umask=22
+backupsuffix=
chgrpcmd=
chmodcmd=$chmodprog
chowncmd=
@@ -103,19 +104,28 @@ Options:
--version display version info and exit.
-c (ignored)
- -C install only if different (preserve the last data modification time)
+ -C install only if different (preserve data modification time)
-d create directories instead of installing files.
-g GROUP $chgrpprog installed files to GROUP.
-m MODE $chmodprog installed files to MODE.
-o USER $chownprog installed files to USER.
+ -p pass -p to $cpprog.
-s $stripprog installed files.
- -S OPTION $stripprog installed files using OPTION.
+ -S SUFFIX attempt to back up existing files, with suffix SUFFIX.
-t DIRECTORY install into DIRECTORY.
-T report an error if DSTFILE is a directory.
Environment variables override the default commands:
CHGRPPROG CHMODPROG CHOWNPROG CMPPROG CPPROG MKDIRPROG MVPROG
RMPROG STRIPPROG
+
+By default, rm is invoked with -f; when overridden with RMPROG,
+it's up to you to specify -f if you want it.
+
+If -S is not specified, no backups are attempted.
+
+Email bug reports to bug-automake@gnu.org.
+Automake home page: https://www.gnu.org/software/automake/
"
while test $# -ne 0; do
@@ -142,9 +152,11 @@ while test $# -ne 0; do
-o) chowncmd="$chownprog $2"
shift;;
+ -p) cpprog="$cpprog -p";;
+
-s) stripcmd=$stripprog;;
- -S) stripcmd="$stripprog $2"
+ -S) backupsuffix="$2"
shift;;
-t)
@@ -263,6 +275,10 @@ do
dstdir=$dst
test -d "$dstdir"
dstdir_status=$?
+ # Don't chown directories that already exist.
+ if test $dstdir_status = 0; then
+ chowncmd=""
+ fi
else
# Waiting for this to be detected by the "$cpprog $src $dsttmp" command
@@ -329,7 +345,7 @@ do
' 0
# Because "mkdir -p" follows existing symlinks and we likely work
- # directly in world-writable /tmp, make sure that the '$tmpdir'
+ # directly in world-writeable /tmp, make sure that the '$tmpdir'
# directory is successfully created first before we actually test
# 'mkdir -p'.
if (umask $mkdir_umask &&
@@ -477,6 +493,13 @@ do
then
rm -f "$dsttmp"
else
+ # If $backupsuffix is set, and the file being installed
+ # already exists, attempt a backup. Don't worry if it fails,
+ # e.g., if mv doesn't support -f.
+ if test -n "$backupsuffix" && test -f "$dst"; then
+ $doit $mvcmd -f "$dst" "$dst$backupsuffix" 2>/dev/null
+ fi
+
# Rename the file to the real destination.
$doit $mvcmd -f "$dsttmp" "$dst" 2>/dev/null ||
@@ -491,9 +514,9 @@ do
# file should still install successfully.
{
test ! -f "$dst" ||
- $doit $rmcmd -f "$dst" 2>/dev/null ||
+ $doit $rmcmd "$dst" 2>/dev/null ||
{ $doit $mvcmd -f "$dst" "$rmtmp" 2>/dev/null &&
- { $doit $rmcmd -f "$rmtmp" 2>/dev/null; :; }
+ { $doit $rmcmd "$rmtmp" 2>/dev/null; :; }
} ||
{ echo "$0: cannot unlink or rename $dst" >&2
(exit 1); exit 1
diff --git a/unix/tclLoadDl.c b/unix/tclLoadDl.c
index afceafd..13b183b 100644
--- a/unix/tclLoadDl.c
+++ b/unix/tclLoadDl.c
@@ -224,7 +224,7 @@ FindSymbol(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\": %s", symbol, errorStr));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol,
- NULL);
+ (void *)NULL);
}
}
return proc;
diff --git a/unix/tclLoadDyld.c b/unix/tclLoadDyld.c
index 854d4bd..b831e36 100644
--- a/unix/tclLoadDyld.c
+++ b/unix/tclLoadDyld.c
@@ -410,7 +410,7 @@ FindSymbol(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\": %s", symbol, errMsg));
Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol,
- NULL);
+ (void *)NULL);
}
return (void *)proc;
}
diff --git a/unix/tclLoadNext.c b/unix/tclLoadNext.c
index dc827fc..b52fa2a 100644
--- a/unix/tclLoadNext.c
+++ b/unix/tclLoadNext.c
@@ -146,7 +146,7 @@ FindSymbol(
if (proc == NULL && interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\"", symbol));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (void *)NULL);
}
return proc;
}
diff --git a/unix/tclLoadOSF.c b/unix/tclLoadOSF.c
index 03698fa..81468b8 100644
--- a/unix/tclLoadOSF.c
+++ b/unix/tclLoadOSF.c
@@ -164,7 +164,7 @@ FindSymbol(
if (retval == NULL && interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot find symbol \"%s\"", symbol));
- Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, NULL);
+ Tcl_SetErrorCode(interp, "TCL", "LOOKUP", "LOAD_SYMBOL", symbol, (void *)NULL);
}
return retval;
}
diff --git a/unix/tclUnixChan.c b/unix/tclUnixChan.c
index 8785ff7..5a32d03 100644
--- a/unix/tclUnixChan.c
+++ b/unix/tclUnixChan.c
@@ -112,7 +112,7 @@ typedef struct {
if (interp) { \
Tcl_SetObjResult(interp, Tcl_ObjPrintf( \
"%s not supported for this platform", (detail))); \
- Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", NULL); \
+ Tcl_SetErrorCode(interp, "TCL", "UNSUPPORTED", (void *)NULL); \
}
/*
@@ -286,7 +286,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) {
@@ -335,7 +335,7 @@ FileOutputProc(
return 0;
}
- written = write(fsPtr->fd, buf, (size_t)toWrite);
+ written = write(fsPtr->fd, buf, toWrite);
if (written >= 0) {
return written;
}
@@ -549,6 +549,20 @@ FileWideSeekProc(
*----------------------------------------------------------------------
*/
+/*
+ * Bug ad5a57f2f271: Tcl_NotifyChannel is not a Tcl_FileProc,
+ * so do not pass it to directly to Tcl_CreateFileHandler.
+ * Instead, pass a wrapper which is a Tcl_FileProc.
+ */
+static void
+FileWatchNotifyChannelWrapper(
+ void *clientData,
+ int mask)
+{
+ Tcl_Channel channel = (Tcl_Channel)clientData;
+ Tcl_NotifyChannel(channel, mask);
+}
+
static void
FileWatchProc(
void *instanceData, /* The file state. */
@@ -559,15 +573,13 @@ FileWatchProc(
FileState *fsPtr = (FileState *)instanceData;
/*
- * Make sure we only register for events that are valid on this file. Note
- * that we are passing Tcl_NotifyChannel directly to Tcl_CreateFileHandler
- * with the channel pointer as the client data.
+ * Make sure we only register for events that are valid on this file.
*/
mask &= fsPtr->validMask;
if (mask) {
Tcl_CreateFileHandler(fsPtr->fd, mask,
- (Tcl_FileProc *) Tcl_NotifyChannel, fsPtr->channel);
+ FileWatchNotifyChannelWrapper, fsPtr->channel);
} else {
Tcl_DeleteFileHandler(fsPtr->fd);
}
@@ -898,7 +910,7 @@ TtySetOptionProc(
"bad value for -handshake: must be one of"
" xonxoff, rtscts, dtrdsr or none", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", NULL);
+ "VALUE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -919,7 +931,7 @@ TtySetOptionProc(
Tcl_SetObjResult(interp, Tcl_NewStringObj(
"bad value for -xchar: should be a list of"
" two elements with each a single 8-bit character", -1));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "XCHAR", (void *)NULL);
}
ckfree(argv);
return TCL_ERROR;
@@ -985,7 +997,7 @@ TtySetOptionProc(
"bad value for -ttycontrol: should be a list of"
" signal,value pairs", -1));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", NULL);
+ "VALUE", (void *)NULL);
}
ckfree(argv);
return TCL_ERROR;
@@ -1027,7 +1039,7 @@ TtySetOptionProc(
"bad signal \"%s\" for -ttycontrol: must be"
" DTR, RTS or BREAK", argv[i]));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", NULL);
+ "VALUE", (void *)NULL);
}
ckfree(argv);
return TCL_ERROR;
@@ -1059,7 +1071,7 @@ TtySetOptionProc(
"bad mode \"%s\" for -closemode: must be"
" default, discard, or drain", value));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", NULL);
+ "VALUE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1117,7 +1129,7 @@ TtySetOptionProc(
"bad mode \"%s\" for -inputmode: must be"
" normal, password, raw, or reset", value));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "FCONFIGURE",
- "VALUE", NULL);
+ "VALUE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1695,7 +1707,7 @@ TtyParseMode(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s: should be baud,parity,data,stop", bad));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1725,7 +1737,7 @@ TtyParseMode(
"n, o, or e"
#endif /* PAREXT */
));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1734,7 +1746,7 @@ TtyParseMode(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s data: should be 5, 6, 7, or 8", bad));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1742,7 +1754,7 @@ TtyParseMode(
if (interp != NULL) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"%s stop: should be 1 or 2", bad));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "SERIALMODE", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1849,7 +1861,7 @@ TclpOpenFileChannel(
if (interp != (Tcl_Interp *) NULL) {
Tcl_AppendResult(interp, "couldn't open \"",
TclGetString(pathPtr), "\": filename is invalid on this platform",
- NULL);
+ (void *)NULL);
}
return NULL;
}
@@ -2137,13 +2149,13 @@ Tcl_GetOpenFile(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" wasn't opened for writing", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "NOT_WRITABLE",
- NULL);
+ (void *)NULL);
return TCL_ERROR;
} else if (!forWriting && !(chanMode & TCL_READABLE)) {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" wasn't opened for reading", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "NOT_READABLE",
- NULL);
+ (void *)NULL);
return TCL_ERROR;
}
@@ -2175,7 +2187,7 @@ Tcl_GetOpenFile(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"cannot get a FILE * for \"%s\"", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL",
- "FILE_FAILURE", NULL);
+ "FILE_FAILURE", (void *)NULL);
return TCL_ERROR;
}
*filePtr = f;
@@ -2186,7 +2198,7 @@ Tcl_GetOpenFile(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"\"%s\" cannot be used to get a FILE *", chanID));
Tcl_SetErrorCode(interp, "TCL", "VALUE", "CHANNEL", "NO_DESCRIPTOR",
- NULL);
+ (void *)NULL);
return TCL_ERROR;
}
diff --git a/unix/tclUnixFCmd.c b/unix/tclUnixFCmd.c
index f8eaeb5..b009d97 100644
--- a/unix/tclUnixFCmd.c
+++ b/unix/tclUnixFCmd.c
@@ -1515,7 +1515,7 @@ SetGroupAttribute(
" group \"%s\" does not exist",
TclGetString(fileName), string));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SETGRP",
- "NO_GROUP", NULL);
+ "NO_GROUP", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1581,7 +1581,7 @@ SetOwnerAttribute(
" user \"%s\" does not exist",
TclGetString(fileName), string));
Tcl_SetErrorCode(interp, "TCL", "OPERATION", "SETOWN",
- "NO_USER", NULL);
+ "NO_USER", (void *)NULL);
}
return TCL_ERROR;
}
@@ -1676,7 +1676,7 @@ SetPermissionsAttribute(
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
"unknown permission string format \"%s\"",
modeStringPtr));
- Tcl_SetErrorCode(interp, "TCL", "VALUE", "PERMISSION", NULL);
+ Tcl_SetErrorCode(interp, "TCL", "VALUE", "PERMISSION", (void *)NULL);
}
return TCL_ERROR;
}
diff --git a/unix/tclUnixPipe.c b/unix/tclUnixPipe.c
index 92cd168..63e576b 100644
--- a/unix/tclUnixPipe.c
+++ b/unix/tclUnixPipe.c
@@ -421,7 +421,8 @@ TclpCreateProcess(
char errSpace[200 + TCL_INTEGER_SPACE];
Tcl_DString *dsArray;
char **newArgv;
- int pid, i;
+ int pid;
+ int i;
#if defined(HAVE_POSIX_SPAWNP)
int childErrno;
static int use_spawn = -1;
@@ -608,7 +609,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;
@@ -1142,7 +1143,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) {
@@ -1188,7 +1189,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) {
@@ -1215,6 +1216,20 @@ PipeOutputProc(
*----------------------------------------------------------------------
*/
+/*
+ * Bug ad5a57f2f271: Tcl_NotifyChannel is not a Tcl_FileProc,
+ * so do not pass it to directly to Tcl_CreateFileHandler.
+ * Instead, pass a wrapper which is a Tcl_FileProc.
+ */
+static void
+PipeWatchNotifyChannelWrapper(
+ void *clientData,
+ int mask)
+{
+ Tcl_Channel channel = (Tcl_Channel)clientData;
+ Tcl_NotifyChannel(channel, mask);
+}
+
static void
PipeWatchProc(
void *instanceData, /* The pipe state. */
@@ -1229,7 +1244,7 @@ PipeWatchProc(
newmask = mask & (TCL_READABLE | TCL_EXCEPTION);
if (newmask) {
Tcl_CreateFileHandler(GetFd(psPtr->inFile), newmask,
- (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel);
+ PipeWatchNotifyChannelWrapper, psPtr->channel);
} else {
Tcl_DeleteFileHandler(GetFd(psPtr->inFile));
}
@@ -1238,7 +1253,7 @@ PipeWatchProc(
newmask = mask & (TCL_WRITABLE | TCL_EXCEPTION);
if (newmask) {
Tcl_CreateFileHandler(GetFd(psPtr->outFile), newmask,
- (Tcl_FileProc *) Tcl_NotifyChannel, psPtr->channel);
+ PipeWatchNotifyChannelWrapper, psPtr->channel);
} else {
Tcl_DeleteFileHandler(GetFd(psPtr->outFile));
}
diff --git a/unix/tclUnixSock.c b/unix/tclUnixSock.c
index 45a3c4d..d6e5386 100644
--- a/unix/tclUnixSock.c
+++ b/unix/tclUnixSock.c
@@ -146,7 +146,7 @@ static int TcpSetOptionProc(void *instanceData,
static void TcpThreadActionProc(void *instanceData, int action);
static void TcpWatchProc(void *instanceData, int mask);
static int WaitForConnect(TcpState *statePtr, int *errorCodePtr);
-static void WrapNotify(void *clientData, int mask);
+static Tcl_FileProc WrapNotify;
/*
* This structure describes the channel type structure for TCP socket
@@ -1218,10 +1218,10 @@ TcpWatchProc(
*/
statePtr->interest = mask;
- Tcl_CreateFileHandler(statePtr->fds.fd, mask|TCL_READABLE,
- (Tcl_FileProc *) WrapNotify, statePtr);
+ Tcl_CreateFileHandler(statePtr->fds.fd, mask|TCL_READABLE,
+ WrapNotify, statePtr);
} else {
- Tcl_DeleteFileHandler(statePtr->fds.fd);
+ Tcl_DeleteFileHandler(statePtr->fds.fd);
}
}
diff --git a/unix/tclUnixTest.c b/unix/tclUnixTest.c
index ee1229b..4f052a8 100644
--- a/unix/tclUnixTest.c
+++ b/unix/tclUnixTest.c
@@ -162,7 +162,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
if (i >= MAX_PIPES) {
- Tcl_AppendResult(interp, "bad index ", objv[2], NULL);
+ Tcl_AppendResult(interp, "bad index ", objv[2], (void *)NULL);
return TCL_ERROR;
}
pipePtr = &testPipes[i];
@@ -191,7 +191,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
snprintf(buf, sizeof(buf), "%d %d", pipePtr->readCount, pipePtr->writeCount);
- Tcl_AppendResult(interp, buf, NULL);
+ Tcl_AppendResult(interp, buf, (void *)NULL);
} else if (strcmp(Tcl_GetString(objv[1]), "create") == 0) {
if (objc != 5) {
Tcl_WrongNumArgs(interp, 2, objv, "index readMode writeMode");
@@ -200,7 +200,7 @@ TestfilehandlerCmd(
if (pipePtr->readFile == NULL) {
if (!TclpCreatePipe(&pipePtr->readFile, &pipePtr->writeFile)) {
Tcl_AppendResult(interp, "couldn't open pipe: ",
- Tcl_PosixError(interp), NULL);
+ Tcl_PosixError(interp), (void *)NULL);
return TCL_ERROR;
}
#ifdef O_NONBLOCK
@@ -208,7 +208,7 @@ TestfilehandlerCmd(
fcntl(GetFd(pipePtr->writeFile), F_SETFL, O_NONBLOCK);
#else
Tcl_AppendResult(interp, "can't make pipes non-blocking",
- NULL);
+ (void *)NULL);
return TCL_ERROR;
#endif
}
@@ -224,7 +224,7 @@ TestfilehandlerCmd(
Tcl_CreateFileHandler(GetFd(pipePtr->readFile), 0,
TestFileHandlerProc, pipePtr);
} else {
- Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[3]), "\"", NULL);
+ Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[3]), "\"", (void *)NULL);
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[4]), "writable") == 0) {
@@ -236,7 +236,7 @@ TestfilehandlerCmd(
Tcl_CreateFileHandler(GetFd(pipePtr->writeFile), 0,
TestFileHandlerProc, pipePtr);
} else {
- Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[4]), "\"", NULL);
+ Tcl_AppendResult(interp, "bad read mode \"", Tcl_GetString(objv[4]), "\"", (void *)NULL);
return TCL_ERROR;
}
} else if (strcmp(Tcl_GetString(objv[1]), "empty") == 0) {
@@ -268,7 +268,7 @@ TestfilehandlerCmd(
memset(buffer, 'b', 10);
TclFormatInt(buf, write(GetFd(pipePtr->writeFile), buffer, 10));
- Tcl_AppendResult(interp, buf, NULL);
+ Tcl_AppendResult(interp, buf, (void *)NULL);
} else if (strcmp(Tcl_GetString(objv[1]), "oneevent") == 0) {
Tcl_DoOneEvent(TCL_FILE_EVENTS|TCL_DONT_WAIT);
} else if (strcmp(Tcl_GetString(objv[1]), "wait") == 0) {
@@ -277,7 +277,7 @@ TestfilehandlerCmd(
return TCL_ERROR;
}
if (pipePtr->readFile == NULL) {
- Tcl_AppendResult(interp, "pipe ", Tcl_GetString(objv[2]), " doesn't exist", NULL);
+ Tcl_AppendResult(interp, "pipe ", Tcl_GetString(objv[2]), " doesn't exist", (void *)NULL);
return TCL_ERROR;
}
if (strcmp(Tcl_GetString(objv[3]), "readable") == 0) {
@@ -302,7 +302,7 @@ TestfilehandlerCmd(
} else {
Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
"\": must be close, clear, counts, create, empty, fill, "
- "fillpartial, oneevent, wait, or windowevent", NULL);
+ "fillpartial, oneevent, wait, or windowevent", (void *)NULL);
return TCL_ERROR;
}
return TCL_OK;
@@ -369,13 +369,13 @@ TestfilewaitCmd(
mask = TCL_WRITABLE|TCL_READABLE;
} else {
Tcl_AppendResult(interp, "bad argument \"", Tcl_GetString(objv[2]),
- "\": must be readable, writable, or both", NULL);
+ "\": must be readable, writable, or both", (void *)NULL);
return TCL_ERROR;
}
if (Tcl_GetChannelHandle(channel,
(mask & TCL_READABLE) ? TCL_READABLE : TCL_WRITABLE,
(ClientData*) &data) != TCL_OK) {
- Tcl_AppendResult(interp, "couldn't get channel file", NULL);
+ Tcl_AppendResult(interp, "couldn't get channel file", (void *)NULL);
return TCL_ERROR;
}
fd = PTR2INT(data);
@@ -467,7 +467,7 @@ TestforkCmd(
pid = fork();
if (pid == -1) {
Tcl_AppendResult(interp,
- "Cannot fork", NULL);
+ "Cannot fork", (void *)NULL);
return TCL_ERROR;
}
/* Only needed when pthread_atfork is not present,
@@ -522,7 +522,7 @@ TestalarmCmd(
action.sa_flags = SA_RESTART;
if (sigaction(SIGALRM, &action, NULL) < 0) {
- Tcl_AppendResult(interp, "sigaction: ", Tcl_PosixError(interp), NULL);
+ Tcl_AppendResult(interp, "sigaction: ", Tcl_PosixError(interp), (void *)NULL);
return TCL_ERROR;
}
(void) alarm(sec);
@@ -531,7 +531,7 @@ TestalarmCmd(
Tcl_AppendResult(interp,
"warning: sigaction SA_RESTART not support on this platform",
- NULL);
+ (void *)NULL);
return TCL_ERROR;
#endif
}
@@ -582,7 +582,7 @@ TestgotsigCmd(
TCL_UNUSED(int) /*objc*/,
TCL_UNUSED(Tcl_Obj *const *))
{
- Tcl_AppendResult(interp, gotsig, NULL);
+ Tcl_AppendResult(interp, gotsig, (void *)NULL);
gotsig = "0";
return TCL_OK;
}
@@ -634,7 +634,7 @@ TestchmodCmd(
}
if (chmod(translated, mode) != 0) {
Tcl_AppendResult(interp, translated, ": ", Tcl_PosixError(interp),
- NULL);
+ (void *)NULL);
return TCL_ERROR;
}
Tcl_DStringFree(&buffer);
diff --git a/unix/tclXtTest.c b/unix/tclXtTest.c
index 882f497..e660c69 100644
--- a/unix/tclXtTest.c
+++ b/unix/tclXtTest.c
@@ -117,7 +117,7 @@ TesteventloopCmd(
framePtr = oldFramePtr;
} else {
Tcl_AppendResult(interp, "bad option \"", Tcl_GetString(objv[1]),
- "\": must be done or wait", NULL);
+ "\": must be done or wait", (void *)NULL);
return TCL_ERROR;
}
return TCL_OK;