Description: <short summary of the patch>
 TODO: Put a short summary on the line above and replace this paragraph
 with a longer explanation of this change. Complete the meta-information
 with other relevant fields (see below for details). To make it easier, the
 information below has been extracted from the changelog. Adjust it or drop
 it.
 .
 gcl (2.6.10-2) unstable; urgency=high
 .
   * 2.6.11pre test 1
Author: Camm Maguire <camm@debian.org>

---
The information above should follow the Patch Tagging Guidelines, please
checkout http://dep.debian.net/deps/dep3/ to learn about the format. Here
are templates for supplementary fields that you might want to add:

Origin: <vendor|upstream|other>, <url of original patch>
Bug: <url in upstream bugtracker>
Bug-Debian: http://bugs.debian.org/<bugnumber>
Bug-Ubuntu: https://launchpad.net/bugs/<bugnumber>
Forwarded: <no|not-needed|url proving that it has been forwarded>
Reviewed-By: <name and email of someone who approved the patch>
Last-Update: <YYYY-MM-DD>

--- gcl-2.6.10.orig/configure
+++ gcl-2.6.10/configure
@@ -8626,24 +8626,9 @@ if test "$enable_tcltk" = "yes" ; then
 $as_echo_n "checking for tcl/tk... " >&6; }
 
 
-if test -d "${TCL_CONFIG_PREFIX}"  ; then true ; else
-rm -f conftest.tcl
-cat >> conftest.tcl <<EOF
-
-set dir [set tcl_library]
-if { [file exists [file join [set dir] tclConfig.sh]] } {
-      puts  [set dir]
-      exit
-  }
-set dir [file dirname [set tcl_library]]
-if { [file exists [file join [set dir] tclConfig.sh]] } {
-      puts  [set dir]
-  }
+ if test -d "${TCL_CONFIG_PREFIX}"  ; then true ; else
 
-EOF
-#cp conftest.tcl foo.tcl
-
-# Extract the first word of "tclsh", so it can be a program name with args.
+    # Extract the first word of "tclsh", so it can be a program name with args.
 set dummy tclsh; ac_word=$2
 { $as_echo "$as_me:${as_lineno-$LINENO}: checking for $ac_word" >&5
 $as_echo_n "checking for $ac_word... " >&6; }
@@ -8681,82 +8666,77 @@ $as_echo "no" >&6; }
 fi
 
 
-#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH})
 
-if test "${TCLSH}" = "" ; then true ; else
-TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl`
-fi
-fi
-if test -f ${TCL_CONFIG_PREFIX}/tclConfig.sh  ; then . ${TCL_CONFIG_PREFIX}/tclConfig.sh ; fi
+    if test "${TCLSH}" = "" ; then true ; else
 
+       rm -f conftest.tcl
+       cat >> conftest.tcl <<EOF
 
-if test -d "${TK_CONFIG_PREFIX}"  ; then true ; else
-if test -f ${TCL_CONFIG_PREFIX}/tkConfig.sh ; then
-TK_CONFIG_PREFIX=${TCL_CONFIG_PREFIX}
-else
-#rm -f conftest.tcl
-#cat >> conftest.tcl <<EOF
-#[
-#set dir [set tk_library]
-#if { [file exists [file join [set dir] tkConfig.sh]] } {
-#      puts  [set dir]
-#      exit
-#  }
-#set dir [file dirname [set tk_library]]
-#if { [file exists [file join [set dir] tkConfig.sh]] } {
-#      puts  [set dir]
-#  }
-#exit 0
-#]
-#EOF
-#cp conftest.tcl foo.tcl
-#AC_CHECK_PROG(TKSH,wish,wish,${TKSH})
-##AC_CHECK_PROG(TKSH,wish8.0,wish8.0,${TKSH})
-#if test "${TKSH}" = "" ; then true ; else
-#TK_CONFIG_PREFIX=`${TKSH} < conftest.tcl`
-#fi
-
-if test "${TCLSH}" = "" ; then true ; else
-	TK_CONFIG_PREFIX=`echo tcl_findLibrary \"tk\" \"${TCL_VERSION}\" \"\" \"tkConfig.sh\" \"TK_LIBRARY\" tk_library | ${TCLSH} 2>&1 | ${AWK} '/"source / {if (i++) next;sub("/[^/]*$","",$2);print $2}'`
-fi
+ puts [set tcl_version]
 
-fi
-fi
-#AC_MSG_CHECKING(TK_CONFIG_PREFIX=${TK_CONFIG_PREFIX})
-if test -f ${TK_CONFIG_PREFIX}/tkConfig.sh  ; then . ${TK_CONFIG_PREFIX}/tkConfig.sh ; fi
-
-if test -d ${TK_CONFIG_PREFIX}/tk${TK_VERSION} ; then
-  TK_LIBRARY=${TK_CONFIG_PREFIX}/tk${TK_VERSION}
-  else
-  if test -d ${TK_CONFIG_PREFIX}/../tk${TK_VERSION} ; then
-    TK_LIBRARY=${TK_CONFIG_PREFIX}/../tk${TK_VERSION}
-  fi
-fi
-if test -d ${TK_CONFIG_PREFIX}/tcl${TCL_VERSION} ; then
-  TCL_LIBRARY=${TK_CONFIG_PREFIX}/tcl${TCL_VERSION}
-  else
-  if test -d ${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION} ; then
-    TCL_LIBRARY=${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION}
-  fi
-fi
-if test -f ${TK_CONFIG_PREFIX}/../include/tk.h ; then
-  TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../include
-  else
-  if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then
-    TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
-  fi
-fi
-if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then
-  TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include
-  else
-  if test -f /usr/include/tcl${TCL_VERSION}/tcl.h ; then
-    TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
-  fi
-fi
+ EOF
 
-fi
-
-{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llieee" >&5
+       TCL_VERSION=`${TCLSH} < conftest.tcl`
+    fi
+
+    if test -x /usr/lib/tcl$TCL_VERSION/tclConfig.sh ; then
+      TCL_CONFIG_PREFIX=/usr/lib/tcl$TCL_VERSION
+    fi
+
+ fi
+
+ if test -f ${TCL_CONFIG_PREFIX}/tclConfig.sh  ; then . ${TCL_CONFIG_PREFIX}/tclConfig.sh ; fi
+
+ if test -d "${TK_CONFIG_PREFIX}"  ; then true ; else
+    if test -f ${TCL_CONFIG_PREFIX}/tkConfig.sh ; then
+       TK_CONFIG_PREFIX=${TCL_CONFIG_PREFIX}
+    else
+       if test -x `echo $TCL_CONFIG_PREFIX | sed 's,tcl,tk,g'`/tkConfig.sh ; then
+          TK_CONFIG_PREFIX=`echo $TCL_CONFIG_PREFIX | sed 's,tcl,tk,g'`
+       fi
+    fi
+ fi
+
+ if test -f ${TK_CONFIG_PREFIX}/tkConfig.sh  ; then . ${TK_CONFIG_PREFIX}/tkConfig.sh ; fi
+
+ if test -d ${TCL_CONFIG_PREFIX}/tcl${TCL_VERSION} ; then
+   TCL_LIBRARY=${TCL_CONFIG_PREFIX}/tcl${TCL_VERSION}
+ else
+   if test -d ${TCL_CONFIG_PREFIX}/../tcl${TCL_VERSION} ; then
+     TCL_LIBRARY=${TCL_CONFIG_PREFIX}/../tcl${TCL_VERSION}
+   fi
+ fi
+
+ if test -d ${TK_CONFIG_PREFIX}/tk${TK_VERSION} ; then
+   TK_LIBRARY=${TK_CONFIG_PREFIX}/tk${TK_VERSION}
+ else
+   if test -d ${TK_CONFIG_PREFIX}/../tk${TK_VERSION} ; then
+     TK_LIBRARY=${TK_CONFIG_PREFIX}/../tk${TK_VERSION}
+   fi
+ fi
+
+ if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then
+   TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include
+ else
+   if test -f /usr/include/tcl${TCL_VERSION}/tcl.h ; then
+   	TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
+   fi
+ fi
+
+ if test -f ${TK_CONFIG_PREFIX}/../include/tk.h ; then
+   TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../include
+ else
+   if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then
+   	TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
+   fi
+ fi
+
+ TCL_VERSION_DOT_FREE=`echo ${TCL_VERSION} | tr -d .`
+ if test -f ${TK_CONFIG_PREFIX}/../bin/tcl${TCL_VERSION_DOT_FREE}.dll  ; then
+    TCL_LIBS="-L${TK_CONFIG_PREFIX}/../bin -ltk${TCL_VERSION_DOT_FREE} -ltcl${TCL_VERSION_DOT_FREE}"
+    TCL_STUB_LIBS="-L${TK_CONFIG_PREFIX}/lib -ltkstub${TCL_VERSION_DOT_FREE} -ltclstub${TCL_VERSION_DOT_FREE}"
+ else
+   { $as_echo "$as_me:${as_lineno-$LINENO}: checking for main in -llieee" >&5
 $as_echo_n "checking for main in -llieee... " >&6; }
 if ${ac_cv_lib_lieee_main+:} false; then :
   $as_echo_n "(cached) " >&6
@@ -8792,12 +8772,15 @@ else
   have_ieee=0
 fi
 
-if test "$have_ieee" = "0" ; then
- TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
-fi
-if test "$have_dl" = "0" ; then
- TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-ldl::g"`
-fi
+   if test "$have_ieee" = "0" ; then
+     TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
+   fi
+   if test "$have_dl" = "0" ; then
+     TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-ldl::g"`
+   fi
+   TCL_STUB_LIBS=""
+ fi
+
 
 
 
--- gcl-2.6.10.orig/configure.in
+++ gcl-2.6.10/configure.in
@@ -2538,111 +2538,94 @@ AC_SUBST(INFO_DIR)
 if test "$enable_tcltk" = "yes" ; then
 
 AC_MSG_CHECKING([for tcl/tk])
-
-
-if test -d "${TCL_CONFIG_PREFIX}"  ; then true ; else
-rm -f conftest.tcl
-cat >> conftest.tcl <<EOF
-[
-set dir [set tcl_library]
-if { [file exists [file join [set dir] tclConfig.sh]] } {
-      puts  [set dir]
-      exit	
-  }
-set dir [file dirname [set tcl_library]]
-if { [file exists [file join [set dir] tclConfig.sh]] } {
-      puts  [set dir]
-  }
-]
-EOF
-#cp conftest.tcl foo.tcl
-
-AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH})
-#AC_CHECK_PROG(TCLSH,tclsh8.0,tclsh8.0,${TCLSH})
-
-if test "${TCLSH}" = "" ; then true ; else
-TCL_CONFIG_PREFIX=`${TCLSH} < conftest.tcl`
-fi
-fi
-if test -f ${TCL_CONFIG_PREFIX}/tclConfig.sh  ; then . ${TCL_CONFIG_PREFIX}/tclConfig.sh ; fi
-
-
-if test -d "${TK_CONFIG_PREFIX}"  ; then true ; else
-if test -f ${TCL_CONFIG_PREFIX}/tkConfig.sh ; then
-TK_CONFIG_PREFIX=${TCL_CONFIG_PREFIX}
-else
-#rm -f conftest.tcl
-#cat >> conftest.tcl <<EOF
-#[
-#set dir [set tk_library]
-#if { [file exists [file join [set dir] tkConfig.sh]] } {
-#      puts  [set dir]
-#      exit
-#  }
-#set dir [file dirname [set tk_library]]
-#if { [file exists [file join [set dir] tkConfig.sh]] } {
-#      puts  [set dir]
-#  }
-#exit 0
-#]
-#EOF
-#cp conftest.tcl foo.tcl
-#AC_CHECK_PROG(TKSH,wish,wish,${TKSH})
-##AC_CHECK_PROG(TKSH,wish8.0,wish8.0,${TKSH})
-#if test "${TKSH}" = "" ; then true ; else
-#TK_CONFIG_PREFIX=`${TKSH} < conftest.tcl`
-#fi
-
-if test "${TCLSH}" = "" ; then true ; else
-	TK_CONFIG_PREFIX=`echo tcl_findLibrary \"tk\" \"${TCL_VERSION}\" \"\" \"tkConfig.sh\" \"TK_LIBRARY\" tk_library | ${TCLSH} 2>&1 | ${AWK} '/"source / {if (i++) next;sub("/[[^/]]*$","",$2);print $2}'`
-fi
-
-fi
-fi
-#AC_MSG_CHECKING(TK_CONFIG_PREFIX=${TK_CONFIG_PREFIX})
-if test -f ${TK_CONFIG_PREFIX}/tkConfig.sh  ; then . ${TK_CONFIG_PREFIX}/tkConfig.sh ; fi
-
-if test -d ${TK_CONFIG_PREFIX}/tk${TK_VERSION} ; then
-  TK_LIBRARY=${TK_CONFIG_PREFIX}/tk${TK_VERSION}
-  else
-  if test -d ${TK_CONFIG_PREFIX}/../tk${TK_VERSION} ; then
-    TK_LIBRARY=${TK_CONFIG_PREFIX}/../tk${TK_VERSION}
-  fi
-fi
-if test -d ${TK_CONFIG_PREFIX}/tcl${TCL_VERSION} ; then
-  TCL_LIBRARY=${TK_CONFIG_PREFIX}/tcl${TCL_VERSION}
-  else
-  if test -d ${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION} ; then
-    TCL_LIBRARY=${TK_CONFIG_PREFIX}/../tcl${TCL_VERSION}
-  fi
-fi
-if test -f ${TK_CONFIG_PREFIX}/../include/tk.h ; then
-  TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../include
-  else
-  if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then
-    TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
-  fi	
-fi
-if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then
-  TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include
-  else
-  if test -f /usr/include/tcl${TCL_VERSION}/tcl.h ; then
-    TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
-  fi
-fi
-
-fi
-
-AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0)
-if test "$have_ieee" = "0" ; then
- TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
-fi
-if test "$have_dl" = "0" ; then
- TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-ldl::g"`
-fi
-
+ 
+ 
+ if test -d "${TCL_CONFIG_PREFIX}"  ; then true ; else
+ 
+    AC_CHECK_PROG(TCLSH,tclsh,tclsh,${TCLSH})
+ 
+    if test "${TCLSH}" = "" ; then true ; else
+ 
+       rm -f conftest.tcl
+       cat >> conftest.tcl <<EOF
+ [
+ puts [set tcl_version]
+ ]
+ EOF
+ 
+       TCL_VERSION=`${TCLSH} < conftest.tcl`
+    fi
+ 
+    if test -x /usr/lib/tcl$TCL_VERSION/tclConfig.sh ; then
+      TCL_CONFIG_PREFIX=/usr/lib/tcl$TCL_VERSION
+    fi
+  
+ fi
+ 
+ if test -f ${TCL_CONFIG_PREFIX}/tclConfig.sh  ; then . ${TCL_CONFIG_PREFIX}/tclConfig.sh ; fi
+ 
+ if test -d "${TK_CONFIG_PREFIX}"  ; then true ; else
+    if test -f ${TCL_CONFIG_PREFIX}/tkConfig.sh ; then
+       TK_CONFIG_PREFIX=${TCL_CONFIG_PREFIX}
+    else
+       if test -x `echo $TCL_CONFIG_PREFIX | sed 's,tcl,tk,g'`/tkConfig.sh ; then
+          TK_CONFIG_PREFIX=`echo $TCL_CONFIG_PREFIX | sed 's,tcl,tk,g'`
+       fi      
+    fi
+ fi
+ 
+ if test -f ${TK_CONFIG_PREFIX}/tkConfig.sh  ; then . ${TK_CONFIG_PREFIX}/tkConfig.sh ; fi
+ 
+ if test -d ${TCL_CONFIG_PREFIX}/tcl${TCL_VERSION} ; then
+   TCL_LIBRARY=${TCL_CONFIG_PREFIX}/tcl${TCL_VERSION}
+ else
+   if test -d ${TCL_CONFIG_PREFIX}/../tcl${TCL_VERSION} ; then
+     TCL_LIBRARY=${TCL_CONFIG_PREFIX}/../tcl${TCL_VERSION}
+   fi
+ fi
+ 
+ if test -d ${TK_CONFIG_PREFIX}/tk${TK_VERSION} ; then
+   TK_LIBRARY=${TK_CONFIG_PREFIX}/tk${TK_VERSION}
+ else
+   if test -d ${TK_CONFIG_PREFIX}/../tk${TK_VERSION} ; then
+     TK_LIBRARY=${TK_CONFIG_PREFIX}/../tk${TK_VERSION}
+   fi
+ fi
+ 
+ if test -f ${TCL_CONFIG_PREFIX}/../include/tcl.h ; then
+   TCL_INCLUDE=-I${TCL_CONFIG_PREFIX}/../include
+ else
+   if test -f /usr/include/tcl${TCL_VERSION}/tcl.h ; then
+   	TCL_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
+   fi
+ fi
+ 
+ if test -f ${TK_CONFIG_PREFIX}/../include/tk.h ; then
+   TK_INCLUDE=-I${TK_CONFIG_PREFIX}/../include
+ else
+   if test -f /usr/include/tcl${TCL_VERSION}/tk.h ; then
+   	TK_INCLUDE=-I/usr/include/tcl${TCL_VERSION}
+   fi	
+ fi
+ 
+ TCL_VERSION_DOT_FREE=`echo ${TCL_VERSION} | tr -d .`
+ if test -f ${TK_CONFIG_PREFIX}/../bin/tcl${TCL_VERSION_DOT_FREE}.dll  ; then
+    TCL_LIBS="-L${TK_CONFIG_PREFIX}/../bin -ltk${TCL_VERSION_DOT_FREE} -ltcl${TCL_VERSION_DOT_FREE}"
+    TCL_STUB_LIBS="-L${TK_CONFIG_PREFIX}/lib -ltkstub${TCL_VERSION_DOT_FREE} -ltclstub${TCL_VERSION_DOT_FREE}"
+ else
+   AC_CHECK_LIB(lieee,main,have_ieee=1,have_ieee=0)
+   if test "$have_ieee" = "0" ; then
+     TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-lieee::g" `
+   fi
+   if test "$have_dl" = "0" ; then
+     TCL_LIBS=`echo ${TCL_LIBS} | sed -e "s:-ldl::g"`
+   fi
+   TCL_STUB_LIBS=""
+ fi
+ 
 
 AC_SUBST(TK_CONFIG_PREFIX)
+
 AC_SUBST(TK_LIBRARY)
 AC_SUBST(TCL_LIBRARY)
 AC_SUBST(TK_XINCLUDES)
--- gcl-2.6.10.orig/gcl-tk/tk-package.lsp
+++ gcl-2.6.10/gcl-tk/tk-package.lsp
@@ -1,4 +1,4 @@
-(in-package "TK"   :use'("LISP" "SLOOP"))
+(in-package "TK" :use '(#+ansi-cl "CL" #-ansi-cl "LISP" "SLOOP"))
 (in-package "SI")
 (import '(
 string begin end header name
--- gcl-2.6.10.orig/gcl-tk/tkMain.c
+++ gcl-2.6.10/gcl-tk/tkMain.c
@@ -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 @@ TkX_Wish (argc, argv)
 
     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 @@ TkX_Wish (argc, argv)
 
 /*     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 @@ TkX_Wish (argc, argv)
      */
 
     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 @@ TkX_Wish (argc, argv)
     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 @@ TkX_Wish (argc, argv)
     
 	    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 @@ TkX_Wish (argc, argv)
 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 @@ StdinProc(clientData, mask)
 	      || 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 = (char *)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 @@ guiBindCallback(char *szNameCmdProc, cha
   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;
--- gcl-2.6.10.orig/o/gcl_readline.d
+++ gcl-2.6.10/o/gcl_readline.d
@@ -221,7 +221,7 @@ typedef char *rl_compentry_func_t(const
    in case we want to do some simple parsing.  Return the array of matches,
    or NULL if there aren't any. */
 /* extern char **rl_completion_matches(char *,char *(*)(char *,int)); */
-static char **rl_completion(char *text, int start, int end) {
+static char **rl_completion(const char *text, int start, int end) {
 	return rl_completion_matches(text, (rl_compentry_func_t *)rl_completion_words_new);
 }
 #endif
@@ -469,8 +469,8 @@ gcl_init_readline_function(void) {
   char *pn="GCL",*cp=getenv("TERM");
   rl_readline_name=pn;
 #ifdef RL_COMPLETION
-  rl_attempted_completion_function = (CPPFunction *)rl_completion;
-#endif		
+  rl_attempted_completion_function = rl_completion;
+#endif			
   if (isatty(0) && (!cp || strcmp(cp,"dumb")))
     readline_on=1;
   if (!n) {
