summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tclIO.c22
-rwxr-xr-xunix/configure2
-rw-r--r--unix/tcl.m42
3 files changed, 16 insertions, 10 deletions
diff --git a/generic/tclIO.c b/generic/tclIO.c
index 8e2c405..11a3c9d 100644
--- a/generic/tclIO.c
+++ b/generic/tclIO.c
@@ -4198,16 +4198,17 @@ WriteChars(
consumedSomething = 1;
while (consumedSomething && (srcLen + savedLF + endEncoding > 0)) {
consumedSomething = 0;
- stage = statePtr->outputStage;
- stageMax = statePtr->bufSize;
- stageLen = stageMax;
-
- toWrite = stageLen;
- if (toWrite > srcLen) {
- toWrite = srcLen;
- }
if (translate) {
+ stage = statePtr->outputStage;
+ stageMax = statePtr->bufSize;
+ stageLen = stageMax;
+
+ toWrite = stageLen;
+ if (toWrite > srcLen) {
+ toWrite = srcLen;
+ }
+
if (savedLF) {
/*
* A '\n' was left over from last call to TranslateOutputEOL()
@@ -4234,8 +4235,9 @@ WriteChars(
stageLen = stageMax;
}
} else {
- memcpy(stage, src, toWrite);
- stageLen = toWrite;
+ stage = (char *) src;
+ stageLen = srcLen;
+ toWrite = stageLen;
}
src += toWrite;
srcLen -= toWrite;
diff --git a/unix/configure b/unix/configure
index 666c2de..5fd9dea 100755
--- a/unix/configure
+++ b/unix/configure
@@ -7008,6 +7008,7 @@ fi
TCL_NEEDS_EXP_FILE=1
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
TCL_SHLIB_LD_EXTRAS='-Wl,--out-implib,$@.a'
+ TK_SHLIB_LD_EXTRAS='-Wl,--out-implib,$@.a'
echo "$as_me:$LINENO: checking for Cygwin version of gcc" >&5
echo $ECHO_N "checking for Cygwin version of gcc... $ECHO_C" >&6
if test "${ac_cv_cygwin+set}" = set; then
@@ -7741,6 +7742,7 @@ fi
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="${CC} -shared"
TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$@"
+ TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$@"
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""
diff --git a/unix/tcl.m4 b/unix/tcl.m4
index 7dae611..72094bb 100644
--- a/unix/tcl.m4
+++ b/unix/tcl.m4
@@ -1218,6 +1218,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
TCL_NEEDS_EXP_FILE=1
TCL_EXPORT_FILE_SUFFIX='${VERSION}\$\{DBGX\}.dll.a'
TCL_SHLIB_LD_EXTRAS='-Wl,--out-implib,$[@].a'
+ TK_SHLIB_LD_EXTRAS='-Wl,--out-implib,$[@].a'
AC_CACHE_CHECK(for Cygwin version of gcc,
ac_cv_cygwin,
AC_TRY_COMPILE([
@@ -1531,6 +1532,7 @@ AC_DEFUN([SC_CONFIG_CFLAGS], [
SHLIB_CFLAGS="-fPIC"
SHLIB_LD="${CC} -shared"
TCL_SHLIB_LD_EXTRAS="-Wl,-soname=\$[@]"
+ TK_SHLIB_LD_EXTRAS="-Wl,-soname,\$[@]"
SHLIB_SUFFIX=".so"
DL_OBJS="tclLoadDl.o"
DL_LIBS=""