diff --git a/gcl-2.6.10-tcl8.patch b/gcl-2.6.10-tcl8.patch new file mode 100644 index 0000000..a8b5abc --- /dev/null +++ b/gcl-2.6.10-tcl8.patch @@ -0,0 +1,101 @@ +--- gcl-tk/tkMain.c.orig 2014-02-05 09:12:48.539168683 -0700 ++++ gcl-tk/tkMain.c 2014-02-05 09:24:13.138923809 -0700 +@@ -42,6 +42,11 @@ + #if (TK_MINOR_VERSION==0 && TK_MAJOR_VERSION==4) + #define TkCreateMainWindow Tk_CreateMainWindow + #endif ++#if TCL_MAJOR_VERSION >= 8 ++#define INTERP_RESULT(interp) Tcl_GetStringResult(interp) ++#else ++#define INTERP_RESULT(interp) (interp)->result ++#endif + + + /*-------------------------------------------------------------------*/ +@@ -206,7 +211,7 @@ + + if (Tk_ParseArgv(interp, (Tk_Window) NULL, &argc, (const char **)argv, argTable, 0) + != TCL_OK) { +- fprintf(stderr, "%s\n", interp->result); ++ fprintf(stderr, "%s\n", INTERP_RESULT(interp)); + exit(1); + } + if (name == NULL) { +@@ -239,7 +244,7 @@ + + /* mainWindow = TkCreateMainWindow(interp, display, name/\* , "Tk" *\/); */ + /* if (mainWindow == NULL) { */ +-/* fprintf(stderr, "%s\n", interp->result); */ ++/* fprintf(stderr, "%s\n", INTERP_RESULT(interp)); */ + /* exit(1); */ + /* } */ + /* #ifndef __MINGW32__ */ +@@ -290,7 +295,7 @@ + */ + + if (Tcl_AppInit(interp) != TCL_OK) { +- fprintf(stderr, "Tcl_AppInit failed: %s\n", interp->result); ++ fprintf(stderr, "Tcl_AppInit failed: %s\n", INTERP_RESULT(interp)); + } + + /* +@@ -300,7 +305,7 @@ + if (geometry != NULL) { + code = Tcl_VarEval(interp, "wm geometry . ", geometry, (char *) NULL); + if (code != TCL_OK) { +- fprintf(stderr, "%s\n", interp->result); ++ fprintf(stderr, "%s\n", INTERP_RESULT(interp)); + } + } + +@@ -330,13 +335,13 @@ + + fullName = Tcl_TildeSubst(interp, tcl_RcFileName, &buffer); + if (fullName == NULL) { +- fprintf(stderr, "%s\n", interp->result); ++ fprintf(stderr, "%s\n", INTERP_RESULT(interp)); + } else { + f = fopen(fullName, "r"); + if (f != NULL) { + code = Tcl_EvalFile(interp, fullName); + if (code != TCL_OK) { +- fprintf(stderr, "%s\n", interp->result); ++ fprintf(stderr, "%s\n", INTERP_RESULT(interp)); + } + fclose(f); + } +@@ -371,7 +376,7 @@ + error: + msg = Tcl_GetVar(interp, "errorInfo", TCL_GLOBAL_ONLY); + if (msg == NULL) { +- msg = interp->result; ++ msg = INTERP_RESULT(interp); + } + dfprintf(stderr, "%s\n", msg); + Tcl_Eval(interp, errorExitCmd); +@@ -496,13 +501,13 @@ + || code) + { + char buf[4]; +- char *p = buf; ++ char *p = buf, *string; + /*header */ + *p++ = (code ? '1' : '0'); + bcopy(msg->msg_id,p,3); + /* end header */ +- if(sock_write_str2(dsfd, m_reply, buf, 4 , +- interp->result, strlen(interp->result)) ++ string = INTERP_RESULT(interp); ++ if(sock_write_str2(dsfd, m_reply, buf, 4, string, strlen(string)) + < 0) + { /* what do we want to do if the write failed */} + +@@ -686,7 +691,7 @@ + code = Tcl_Eval(interp, szCmd); + if (code != TCL_OK) + { +- dfprintf(stderr, "TCL Error int bind : %s\n", interp->result); ++ dfprintf(stderr, "TCL Error int bind : %s\n", INTERP_RESULT(interp)); + + } + return code; diff --git a/gcl.spec b/gcl.spec index 313ebe8..3f959d5 100644 --- a/gcl.spec +++ b/gcl.spec @@ -7,7 +7,7 @@ Name: gcl Version: 2.6.10 -Release: 1%{?dist} +Release: 2%{?dist} Summary: GNU Common Lisp Group: Development/Languages @@ -80,6 +80,9 @@ Patch15: %{name}-2.6.8-reloc-type.patch Patch16: %{name}-2.6.10-largefile.patch # Applied upstream. This patch fixes a broken sprintf call in the TCL code. Patch17: %{name}-2.6.8-tcl.patch +# Submitted upstream by Andrey Grozin. Adapt to TCL 8.6 where interp->result +# must be replaced by Tcl_GetStringResult(interp). +Patch18: %{name}-2.6.10-tcl8.patch BuildRequires: libXaw-devel BuildRequires: readline-devel @@ -183,6 +186,7 @@ gcl_exec_t. %patch15 %patch16 %patch17 +%patch18 # Ensure the frame pointer doesn't get added back sed -i 's/"-fomit-frame-pointer"/""/' configure @@ -340,6 +344,9 @@ fi %changelog +* Wed Feb 5 2014 Jerry James - 2.6.10-2 +- Add -tcl8 patch to prepare for TCL 8.6 + * Fri Nov 15 2013 Jerry James - 2.6.10-1 - New upstream release - Drop upstreamed patches