From b944573a5e9febfc840913569acdfe89042d9e0c Mon Sep 17 00:00:00 2001 From: Kevin Easton Date: Sat, 16 May 2015 22:20:25 +1000 Subject: [PATCH] Minor fixes to enable compiling against TCL8.5 Define USE_NON_CONST so that the newer TCL headers define functions in the same way as pre-8.4 TCL headers. It will be a good idea to change to USE_COMPAT_CONST instead at some point. Also use ckfree() instead of free() to free an allocation returned by TCL. --- include/ircaux.h | 4 ---- include/tcl_bx.h | 2 +- source/fset.c | 1 + source/tcl_public.c | 2 +- 4 files changed, 3 insertions(+), 6 deletions(-) diff --git a/include/ircaux.h b/include/ircaux.h index af363ca..4027504 100644 --- a/include/ircaux.h +++ b/include/ircaux.h @@ -16,10 +16,6 @@ #include "irc.h" #include "irc_std.h" #include -#ifdef WANT_TCL -#undef USE_TCLALLOC -#include -#endif typedef int comp_len_func (char *, char *, int); typedef int comp_func (char *, char *); diff --git a/include/tcl_bx.h b/include/tcl_bx.h index 692b90c..8816694 100644 --- a/include/tcl_bx.h +++ b/include/tcl_bx.h @@ -26,7 +26,7 @@ void tcl_load (char *, char *, char *, char *); #ifdef WANT_TCL - +#define USE_NON_CONST #include extern Tcl_Interp *tcl_interp; void check_tcl_tand (char *, char *, char *); diff --git a/source/fset.c b/source/fset.c index 9610f93..51730eb 100644 --- a/source/fset.c +++ b/source/fset.c @@ -11,6 +11,7 @@ CVS_REVISION(fset_c) #include "misc.h" #include "list.h" #include "vars.h" +#include "tcl_bx.h" #define MAIN_SOURCE #include "modval.h" diff --git a/source/tcl_public.c b/source/tcl_public.c index 637c081..e5f9a02 100644 --- a/source/tcl_public.c +++ b/source/tcl_public.c @@ -1435,7 +1435,7 @@ struct timeval now1; { for (i=0; icmd); */ Tcl_DStringFree(&ds);