public inbox for gentoo-commits@lists.gentoo.org
 help / color / mirror / Atom feed
* [gentoo-commits] gentoo-x86 commit in sys-cluster/torque/files: tcl8.6.patch torque-2.5.9-tcl8.6.patch torque-3.0.6-tcl8.6.patch torque-2.5.12-tcl8.6.patch
@ 2013-03-08  5:02 Justin Bronder (jsbronder)
  0 siblings, 0 replies; only message in thread
From: Justin Bronder (jsbronder) @ 2013-03-08  5:02 UTC (permalink / raw
  To: gentoo-commits

jsbronder    13/03/08 05:02:15

  Added:                tcl8.6.patch
  Removed:              torque-2.5.9-tcl8.6.patch torque-3.0.6-tcl8.6.patch
                        torque-2.5.12-tcl8.6.patch
  Log:
  Fix #453154 correctly.
  
  (Portage version: 2.1.11.50/cvs/Linux x86_64, signed Manifest commit with key 4D7043C9)

Revision  Changes    Path
1.1                  sys-cluster/torque/files/tcl8.6.patch

file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/files/tcl8.6.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-cluster/torque/files/tcl8.6.patch?rev=1.1&content-type=text/plain

Index: tcl8.6.patch
===================================================================
From 061f15e06d6cf85e951cd321360067de5f0b2ce0 Mon Sep 17 00:00:00 2001
From: Justin Bronder <jsbronder@gmail.com>
Date: Thu, 7 Mar 2013 22:33:04 -0500
Subject: [PATCH] support tcl-8.6

---
 src/cmds/qstat.c                | 13 +++++++++----
 src/scheduler.tcl/pbs_tclWrap.c |  6 +++---
 2 files changed, 12 insertions(+), 7 deletions(-)

diff --git a/src/cmds/qstat.c b/src/cmds/qstat.c
index 5f85de7..7f289ba 100644
--- a/src/cmds/qstat.c
+++ b/src/cmds/qstat.c
@@ -88,6 +88,11 @@
 #if TCL_QSTAT
 #include <sys/stat.h>
 #include <tcl.h>
+#if TCL_MAJOR_VERSION <=8 && TCL_MINOR_VERSION < 6
+#define Tcl_GetStringResult(x) x->result
+#define Tcl_GetErrorLine(x) x->errorLine
+#define Tcl_SetResult(x, y, z) x->result = y
+#endif
 #if TCLX
 #include <tclExtend.h>
 #endif
@@ -1856,7 +1861,7 @@ tcl_init(void)
   if (Tcl_Init(interp) == TCL_ERROR)
     {
     fprintf(stderr, "Tcl_Init error: %s",
-            interp->result);
+            Tcl_GetStringResult(interp));
     }
 
 #if TCLX
@@ -1869,7 +1874,7 @@ tcl_init(void)
     {
 #endif
     fprintf(stderr, "Tclx_Init error: %s",
-            interp->result);
+            Tcl_GetStringResult(interp));
     }
 
 #endif /* TCLX */
@@ -1980,10 +1985,10 @@ void tcl_run(
     trace = (char *)Tcl_GetVar(interp, "errorInfo", 0);
 
     if (trace == NULL)
-      trace = interp->result;
+      trace = Tcl_GetStringResult(interp);
 
     fprintf(stderr, "%s: TCL error @ line %d: %s\n",
-            script, interp->errorLine, trace);
+            script, Tcl_GetErrorLine(interp), trace);
     }
 
   Tcl_DeleteInterp(interp);
diff --git a/src/scheduler.tcl/pbs_tclWrap.c b/src/scheduler.tcl/pbs_tclWrap.c
index e859ae5..194c24b 100644
--- a/src/scheduler.tcl/pbs_tclWrap.c
+++ b/src/scheduler.tcl/pbs_tclWrap.c
@@ -924,7 +924,7 @@ char *argv[];
 
   if (argc != 2)
     {
-    sprintf(interp->result,
+    sprintf(Tcl_GetStringResult(interp),
             "%s: wrong # args: job_id", argv[0]);
     return TCL_ERROR;
     }
@@ -936,11 +936,11 @@ char *argv[];
     return TCL_OK;
     }
 
-  interp->result = "0";
+  Tcl_SetResult(interp, "0", TCL_STATIC);
 
   if (pbs_rerunjob(connector, argv[1], extend))
     {
-    interp->result = "-1";
+    Tcl_SetResult(interp, "-1", TCL_STATIC);
     msg = pbs_geterrmsg(connector);
     sprintf(log_buffer, "%s (%d)", msg ? msg : fail, pbs_errno);
     log_err(-1, argv[0], log_buffer);
-- 
1.7.12.4






^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2013-03-08  5:02 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-03-08  5:02 [gentoo-commits] gentoo-x86 commit in sys-cluster/torque/files: tcl8.6.patch torque-2.5.9-tcl8.6.patch torque-3.0.6-tcl8.6.patch torque-2.5.12-tcl8.6.patch Justin Bronder (jsbronder)

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox