summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--generic/tkClipboard.c8
-rw-r--r--generic/tkCmds.c6
-rw-r--r--macosx/tkMacOSXClipboard.c8
-rwxr-xr-xunix/configure10
-rw-r--r--unix/configure.ac10
-rwxr-xr-xwin/configure6
-rw-r--r--win/configure.ac6
7 files changed, 36 insertions, 18 deletions
diff --git a/generic/tkClipboard.c b/generic/tkClipboard.c
index a972230..1f4298d 100644
--- a/generic/tkClipboard.c
+++ b/generic/tkClipboard.c
@@ -709,7 +709,13 @@ ClipboardGetProc(
* used). */
const char *portion) /* New information to be appended. */
{
- Tcl_DStringAppend((Tcl_DString *)clientData, portion, -1);
+ Tcl_Encoding utf8 = Tcl_GetEncoding(NULL, "utf-8");
+ Tcl_DString ds;
+
+ Tcl_ExternalToUtfDString(utf8, portion, -1, &ds);
+ Tcl_DStringAppend((Tcl_DString *) clientData, Tcl_DStringValue(&ds), Tcl_DStringLength(&ds));
+ Tcl_DStringFree(&ds);
+ Tcl_FreeEncoding(utf8);
return TCL_OK;
}
diff --git a/generic/tkCmds.c b/generic/tkCmds.c
index e57f21e..36981af 100644
--- a/generic/tkCmds.c
+++ b/generic/tkCmds.c
@@ -1113,14 +1113,16 @@ Tk_TkwaitObjCmd(
static char *
WaitVariableProc(
ClientData clientData, /* Pointer to integer to set to 1. */
- TCL_UNUSED(Tcl_Interp *), /* Interpreter containing variable. */
- TCL_UNUSED(const char *), /* Name of variable. */
+ Tcl_Interp *interp, /* Interpreter containing variable. */
+ const char *name1, /* Name of variable. */
TCL_UNUSED(const char *), /* Second part of variable name. */
TCL_UNUSED(int)) /* Information about what happened. */
{
int *donePtr = (int *)clientData;
*donePtr = 1;
+ Tcl_UntraceVar(interp, name1, TCL_TRACE_WRITES|TCL_TRACE_UNSETS,
+ WaitVariableProc, clientData);
return NULL;
}
diff --git a/macosx/tkMacOSXClipboard.c b/macosx/tkMacOSXClipboard.c
index 8e2b4a4..41887f4 100644
--- a/macosx/tkMacOSXClipboard.c
+++ b/macosx/tkMacOSXClipboard.c
@@ -137,13 +137,7 @@ TkSelGetSelection(
string = [pb stringForType:type];
}
if (string) {
- if (target == dispPtr->utf8Atom) {
- result = proc(clientData, interp, string.UTF8String);
- } else if (target == XA_STRING) {
- const char *latin1 = [string
- cStringUsingEncoding:NSISOLatin1StringEncoding];
- result = proc(clientData, interp, latin1);
- }
+ result = proc(clientData, interp, string.UTF8String);
}
} else {
Tcl_SetObjResult(interp, Tcl_ObjPrintf(
diff --git a/unix/configure b/unix/configure
index 51cc17e..208483b 100755
--- a/unix/configure
+++ b/unix/configure
@@ -8696,14 +8696,18 @@ else
fi
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"
+ TK_LIB_FLAG="-l"
+ if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ TK_LIB_FLAG="${TK_LIB_FLAG}tcl9"
+ fi
if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then
- TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
+ TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`"
TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}"
else
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TK_LIB_FLAG="-ltk${TK_VERSION}"
+ TK_LIB_FLAG="${TK_LIB_FLAG}tk${TK_VERSION}"
else
- TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
+ TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`"
fi
TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}"
fi
diff --git a/unix/configure.ac b/unix/configure.ac
index 4f74644..b728ce1 100644
--- a/unix/configure.ac
+++ b/unix/configure.ac
@@ -652,14 +652,18 @@ else
fi
# libdir must be a fully qualified path and not ${exec_prefix}/lib
eval libdir="$libdir"
+ TK_LIB_FLAG="-l"
+ if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ TK_LIB_FLAG="${TK_LIB_FLAG}tcl9"
+ fi
if test "${ac_cv_cygwin}" = "yes" -a "$SHARED_BUILD" = "1"; then
- TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
+ TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`"
TK_BUILD_LIB_SPEC="-L\$(TOP_DIR)/win ${TK_LIB_FLAG}"
else
if test "${TCL_LIB_VERSIONS_OK}" = "ok"; then
- TK_LIB_FLAG="-ltk${TK_VERSION}"
+ TK_LIB_FLAG="${TK_LIB_FLAG}tk${TK_VERSION}"
else
- TK_LIB_FLAG="-ltk`echo ${TK_VERSION} | tr -d .`"
+ TK_LIB_FLAG="${TK_LIB_FLAG}tk`echo ${TK_VERSION} | tr -d .`"
fi
TK_BUILD_LIB_SPEC="-L`pwd | sed -e 's/ /\\\\ /g'` ${TK_LIB_FLAG}"
fi
diff --git a/win/configure b/win/configure
index 1309818..872005d 100755
--- a/win/configure
+++ b/win/configure
@@ -5825,7 +5825,11 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
# I left out the other vars that also need to get defined here.
# we also need to double check about spaces in path names
-eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\""
+TK_LIB_FLAG="-l"
+if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ TK_LIB_FLAG="${TK_LIB_FLAG}tcl9"
+fi
+eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\""
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"
diff --git a/win/configure.ac b/win/configure.ac
index a6b45b8..5fd3b8e 100644
--- a/win/configure.ac
+++ b/win/configure.ac
@@ -260,7 +260,11 @@ eval "TK_STUB_LIB_FILE=${LIBPREFIX}tkstub${VER}${LIBSUFFIX}"
# FIXME: All of this var junk needs to be done in tcl.m4 !!!!
# I left out the other vars that also need to get defined here.
# we also need to double check about spaces in path names
-eval "TK_LIB_FLAG=\"-ltk${VER}${LIBFLAGSUFFIX}\""
+TK_LIB_FLAG="-l"
+if test "${TCL_MAJOR_VERSION}" -gt 8 ; then
+ TK_LIB_FLAG="${TK_LIB_FLAG}tcl9"
+fi
+eval "TK_LIB_FLAG=\"${TK_LIB_FLAG}${VER}${LIBFLAGSUFFIX}\""
TK_LIB_SPEC="-L${libdir} ${TK_LIB_FLAG}"
TK_BUILD_LIB_SPEC="-L`pwd` ${TK_LIB_FLAG}"