1
0
Fork 0
mirror of https://git.freebsd.org/ports.git synced 2025-06-17 18:50:33 -04:00
ports/sysutils/modules/files/patch-cmdModule.c
Pawel Pekala 317d90636d - Convert to USES=tcl changing version of TCL
port depends on to 8.6, bump PORTREVISION
- Add patch fixing build with TCL 8.6
- Regenerate patches with make makepatch

PR:		211690
Submitted by:	Matthieu Volat
2016-08-19 22:09:44 +00: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: