summaryrefslogtreecommitdiff
path: root/math/mpexpr/files/patch-generic_mpparse.c
diff options
context:
space:
mode:
authorPietro Cerutti <gahr@FreeBSD.org>2013-11-06 14:50:24 +0000
committerPietro Cerutti <gahr@FreeBSD.org>2013-11-06 14:50:24 +0000
commit76079b1b6468bd5a9e18074c763d590c1bffdf27 (patch)
tree1c65d7023a8708c90820b5b5b6ec785434aa348d /math/mpexpr/files/patch-generic_mpparse.c
parentUpdate KDevelop to 4.5.2. (diff)
- Fix build with Tcl 8.6
- Take maintainership (tcltk@FreeBSD.org) - Add LICENSE - Switch to USES+=gmake tcl - Add regression-test target - STAGE-clean
Notes
Notes: svn path=/head/; revision=332997
Diffstat (limited to 'math/mpexpr/files/patch-generic_mpparse.c')
-rw-r--r--math/mpexpr/files/patch-generic_mpparse.c28
1 files changed, 28 insertions, 0 deletions
diff --git a/math/mpexpr/files/patch-generic_mpparse.c b/math/mpexpr/files/patch-generic_mpparse.c
new file mode 100644
index 000000000000..56140eb42a12
--- /dev/null
+++ b/math/mpexpr/files/patch-generic_mpparse.c
@@ -0,0 +1,28 @@
+--- generic/mpparse.c.orig 2013-11-06 15:29:52.000000000 +0100
++++ generic/mpparse.c 2013-11-06 15:36:11.000000000 +0100
+@@ -283,7 +283,9 @@
+ continue;
+ } else if (c == '\0') {
+ Tcl_ResetResult(interp);
+- sprintf(interp->result, "missing %c", termChar);
++ char buf[10];
++ sprintf(buf, "missing %c", termChar);
++ Tcl_SetObjResult(interp, Tcl_NewStringObj(buf, -1));
+ *termPtr = string-1;
+ return TCL_ERROR;
+ } else {
+@@ -349,12 +351,12 @@
+ if (result != TCL_OK) {
+ return result;
+ }
+- length = strlen(interp->result);
++ length = strlen(Tcl_GetStringResult(interp));
+ shortfall = length + 1 - (pvPtr->end - pvPtr->next);
+ if (shortfall > 0) {
+ (*pvPtr->expandProc)(pvPtr, shortfall);
+ }
+- strcpy(pvPtr->next, interp->result);
++ strcpy(pvPtr->next, Tcl_GetStringResult(interp));
+ pvPtr->next += length;
+ Tcl_ResetResult(interp);
+ } else {