opnsense-ports/sysutils/modules/files/patch-cmdModule.c
Franco Fichtner a868b95932 */*: sync with upstream
Taken from: FreeBSD
2016-08-20 08:07:07 +02:00

21 lines
692 B
C

--- cmdModule.c.orig 2016-08-09 09:37:36 UTC
+++ cmdModule.c
@@ -640,8 +640,16 @@ int Execute_TclFile( Tcl_Interp *interp
case TCL_OK: gotPartial = 0;
continue; /** while **/
- case TCL_ERROR: interp->errorLine = ((linenum-1)-gotPartial) +
- interp->errorLine;
+ case TCL_ERROR:
+#if (TCL_MAJOR_VERSION > 8) \
+ || (TCL_MAJOR_VERSION == 8 && TCL_MINOR_VERSION >= 6)
+ Tcl_SetErrorLine(
+ interp,
+ ((linenum-1)-gotPartial) + Tcl_GetErrorLine(interp));
+#else
+ interp->errorLine =
+ ((linenum-1)-gotPartial) + interp->errorLine;
+#endif
/* FALLTHROUGH */
case TCL_LEVEL0_RETURN: