summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch')
-rw-r--r--sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch57
1 files changed, 57 insertions, 0 deletions
diff --git a/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch b/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch
new file mode 100644
index 000000000000..ed7ec08c2ea7
--- /dev/null
+++ b/sci-libs/vtk/files/vtk-5.10.1-tcl8.6.patch
@@ -0,0 +1,57 @@
+ Common/vtkTclUtil.cxx | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+diff --git a/Common/vtkTclUtil.cxx b/Common/vtkTclUtil.cxx
+index 390b0a4..2b7bccb 100644
+--- a/Common/vtkTclUtil.cxx
++++ b/Common/vtkTclUtil.cxx
+@@ -21,6 +21,12 @@
+ #include <string>
+ #include <vtksys/SystemTools.hxx>
+
++#if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION < 6)
++#define vtkTclGetErrorLine(m) (m->errorLine)
++#else
++#define vtkTclGetErrorLine(m) (Tcl_GetErrorLine(m))
++#endif
++
+ extern "C"
+ {
+ #if (TCL_MAJOR_VERSION == 8) && (TCL_MINOR_VERSION >= 4)
+@@ -490,13 +496,15 @@ VTKTCL_EXPORT void vtkTclVoidFunc(void *arg)
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ arg2->command << endl <<
+ Tcl_GetVar(arg2->interp,(char *)("errorInfo"),0) <<
+- " at line number " << arg2->interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(arg2->interp));
+ }
+ else
+ {
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ arg2->command << endl <<
+- " at line number " << arg2->interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(arg2->interp));
+ }
+ }
+ }
+@@ -723,14 +731,15 @@ void vtkTclCommand::Execute(vtkObject *, unsigned long, void *)
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ this->StringCommand << endl <<
+ Tcl_GetVar(this->Interp,(char *)("errorInfo"),0) <<
+- " at line number " << this->Interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(this->Interp));
+ }
+ else
+ {
+ vtkGenericWarningMacro("Error returned from vtk/tcl callback:\n" <<
+ this->StringCommand << endl <<
+- " at line number " <<
+- this->Interp->errorLine);
++ " at line number " <<
++ vtkTclGetErrorLine(this->Interp));
+ }
+ }
+ else if (res == -1)