Blame SOURCES/expect-5.45-segfault-with-stubs.patch

6b7353
diff -up expect5.45/exp_clib.c.orig expect5.45/exp_clib.c
6b7353
--- expect5.45/exp_clib.c.orig	2010-09-01 00:20:27.000000000 +0200
6b7353
+++ expect5.45/exp_clib.c	2015-05-19 12:01:22.413349423 +0200
6b7353
@@ -84,6 +84,8 @@ would appreciate credit if this program
6b7353
 #ifndef _STDLIB
6b7353
 #define _STDLIB
6b7353
 
6b7353
+#include <tcl.h>
6b7353
+
6b7353
 extern void		abort _ANSI_ARGS_((void));
6b7353
 extern double		atof _ANSI_ARGS_((CONST char *string));
6b7353
 extern int		atoi _ANSI_ARGS_((CONST char *string));
6b7353
@@ -114,7 +116,6 @@ extern unsigned long	strtoul _ANSI_ARGS_
6b7353
 #include <stdlib.h>		/* for malloc */
6b7353
 #endif
6b7353
 
6b7353
-#include <tcl.h>
6b7353
 #include "expect.h"
6b7353
 #define TclRegError exp_TclRegError
6b7353
 
6b7353
@@ -1465,6 +1466,467 @@ TclGetRegError()
6b7353
  */
6b7353
 
6b7353
 /*
6b7353
+ * following stolen from tcl8.0.4/generic/tclPosixStr.c
6b7353
+ */
6b7353
+
6b7353
+/*
6b7353
+ *----------------------------------------------------------------------
6b7353
+ *
6b7353
+ * Tcl_ErrnoMsg --
6b7353
+ *
6b7353
+ *     Return a human-readable message corresponding to a given
6b7353
+ *     errno value.
6b7353
+ *
6b7353
+ * Results:
6b7353
+ *     The return value is the standard POSIX error message for
6b7353
+ *     errno.  This procedure is used instead of strerror because
6b7353
+ *     strerror returns slightly different values on different
6b7353
+ *     machines (e.g. different capitalizations), which cause
6b7353
+ *     problems for things such as regression tests.  This procedure
6b7353
+ *     provides messages for most standard errors, then it calls
6b7353
+ *     strerror for things it doesn't understand.
6b7353
+ *
6b7353
+ * Side effects:
6b7353
+ *     None.
6b7353
+ *
6b7353
+ *----------------------------------------------------------------------
6b7353
+ */
6b7353
+
6b7353
+static
6b7353
+char *
6b7353
+Tcl_ErrnoMsg(err)
6b7353
+    int err;                   /* Error number (such as in errno variable). */
6b7353
+{
6b7353
+    switch (err) {
6b7353
+#ifdef E2BIG
6b7353
+       case E2BIG: return "argument list too long";
6b7353
+#endif
6b7353
+#ifdef EACCES
6b7353
+       case EACCES: return "permission denied";
6b7353
+#endif
6b7353
+#ifdef EADDRINUSE
6b7353
+       case EADDRINUSE: return "address already in use";
6b7353
+#endif
6b7353
+#ifdef EADDRNOTAVAIL
6b7353
+       case EADDRNOTAVAIL: return "can't assign requested address";
6b7353
+#endif
6b7353
+#ifdef EADV
6b7353
+       case EADV: return "advertise error";
6b7353
+#endif
6b7353
+#ifdef EAFNOSUPPORT
6b7353
+       case EAFNOSUPPORT: return "address family not supported by protocol family";
6b7353
+#endif
6b7353
+#ifdef EAGAIN
6b7353
+       case EAGAIN: return "resource temporarily unavailable";
6b7353
+#endif
6b7353
+#ifdef EALIGN
6b7353
+       case EALIGN: return "EALIGN";
6b7353
+#endif
6b7353
+#if defined(EALREADY) && (!defined(EBUSY) || (EALREADY != EBUSY ))
6b7353
+       case EALREADY: return "operation already in progress";
6b7353
+#endif
6b7353
+#ifdef EBADE
6b7353
+       case EBADE: return "bad exchange descriptor";
6b7353
+#endif
6b7353
+#ifdef EBADF
6b7353
+       case EBADF: return "bad file number";
6b7353
+#endif
6b7353
+#ifdef EBADFD
6b7353
+       case EBADFD: return "file descriptor in bad state";
6b7353
+#endif
6b7353
+#ifdef EBADMSG
6b7353
+       case EBADMSG: return "not a data message";
6b7353
+#endif
6b7353
+#ifdef EBADR
6b7353
+       case EBADR: return "bad request descriptor";
6b7353
+#endif
6b7353
+#ifdef EBADRPC
6b7353
+       case EBADRPC: return "RPC structure is bad";
6b7353
+#endif
6b7353
+#ifdef EBADRQC
6b7353
+       case EBADRQC: return "bad request code";
6b7353
+#endif
6b7353
+#ifdef EBADSLT
6b7353
+       case EBADSLT: return "invalid slot";
6b7353
+#endif
6b7353
+#ifdef EBFONT
6b7353
+       case EBFONT: return "bad font file format";
6b7353
+#endif
6b7353
+#ifdef EBUSY
6b7353
+       case EBUSY: return "file busy";
6b7353
+#endif
6b7353
+#ifdef ECHILD
6b7353
+       case ECHILD: return "no children";
6b7353
+#endif
6b7353
+#ifdef ECHRNG
6b7353
+       case ECHRNG: return "channel number out of range";
6b7353
+#endif
6b7353
+#ifdef ECOMM
6b7353
+       case ECOMM: return "communication error on send";
6b7353
+#endif
6b7353
+#ifdef ECONNABORTED
6b7353
+       case ECONNABORTED: return "software caused connection abort";
6b7353
+#endif
6b7353
+#ifdef ECONNREFUSED
6b7353
+       case ECONNREFUSED: return "connection refused";
6b7353
+#endif
6b7353
+#ifdef ECONNRESET
6b7353
+       case ECONNRESET: return "connection reset by peer";
6b7353
+#endif
6b7353
+#if defined(EDEADLK) && (!defined(EWOULDBLOCK) || (EDEADLK != EWOULDBLOCK))
6b7353
+       case EDEADLK: return "resource deadlock avoided";
6b7353
+#endif
6b7353
+#if defined(EDEADLOCK) && (!defined(EDEADLK) || (EDEADLOCK != EDEADLK))
6b7353
+       case EDEADLOCK: return "resource deadlock avoided";
6b7353
+#endif
6b7353
+#ifdef EDESTADDRREQ
6b7353
+       case EDESTADDRREQ: return "destination address required";
6b7353
+#endif
6b7353
+#ifdef EDIRTY
6b7353
+       case EDIRTY: return "mounting a dirty fs w/o force";
6b7353
+#endif
6b7353
+#ifdef EDOM
6b7353
+       case EDOM: return "math argument out of range";
6b7353
+#endif
6b7353
+#ifdef EDOTDOT
6b7353
+       case EDOTDOT: return "cross mount point";
6b7353
+#endif
6b7353
+#ifdef EDQUOT
6b7353
+       case EDQUOT: return "disk quota exceeded";
6b7353
+#endif
6b7353
+#ifdef EDUPPKG
6b7353
+       case EDUPPKG: return "duplicate package name";
6b7353
+#endif
6b7353
+#ifdef EEXIST
6b7353
+       case EEXIST: return "file already exists";
6b7353
+#endif
6b7353
+#ifdef EFAULT
6b7353
+       case EFAULT: return "bad address in system call argument";
6b7353
+#endif
6b7353
+#ifdef EFBIG
6b7353
+       case EFBIG: return "file too large";
6b7353
+#endif
6b7353
+#ifdef EHOSTDOWN
6b7353
+       case EHOSTDOWN: return "host is down";
6b7353
+#endif
6b7353
+#ifdef EHOSTUNREACH
6b7353
+       case EHOSTUNREACH: return "host is unreachable";
6b7353
+#endif
6b7353
+#if defined(EIDRM) && (!defined(EINPROGRESS) || (EIDRM != EINPROGRESS))
6b7353
+       case EIDRM: return "identifier removed";
6b7353
+#endif
6b7353
+#ifdef EINIT
6b7353
+       case EINIT: return "initialization error";
6b7353
+#endif
6b7353
+#ifdef EINPROGRESS
6b7353
+       case EINPROGRESS: return "operation now in progress";
6b7353
+#endif
6b7353
+#ifdef EINTR
6b7353
+       case EINTR: return "interrupted system call";
6b7353
+#endif
6b7353
+#ifdef EINVAL
6b7353
+       case EINVAL: return "invalid argument";
6b7353
+#endif
6b7353
+#ifdef EIO
6b7353
+       case EIO: return "I/O error";
6b7353
+#endif
6b7353
+#ifdef EISCONN
6b7353
+       case EISCONN: return "socket is already connected";
6b7353
+#endif
6b7353
+#ifdef EISDIR
6b7353
+       case EISDIR: return "illegal operation on a directory";
6b7353
+#endif
6b7353
+#ifdef EISNAME
6b7353
+       case EISNAM: return "is a name file";
6b7353
+#endif
6b7353
+#ifdef ELBIN
6b7353
+       case ELBIN: return "ELBIN";
6b7353
+#endif
6b7353
+#ifdef EL2HLT
6b7353
+       case EL2HLT: return "level 2 halted";
6b7353
+#endif
6b7353
+#ifdef EL2NSYNC
6b7353
+       case EL2NSYNC: return "level 2 not synchronized";
6b7353
+#endif
6b7353
+#ifdef EL3HLT
6b7353
+       case EL3HLT: return "level 3 halted";
6b7353
+#endif
6b7353
+#ifdef EL3RST
6b7353
+       case EL3RST: return "level 3 reset";
6b7353
+#endif
6b7353
+#ifdef ELIBACC
6b7353
+       case ELIBACC: return "can not access a needed shared library";
6b7353
+#endif
6b7353
+#ifdef ELIBBAD
6b7353
+       case ELIBBAD: return "accessing a corrupted shared library";
6b7353
+#endif
6b7353
+#ifdef ELIBEXEC
6b7353
+       case ELIBEXEC: return "can not exec a shared library directly";
6b7353
+#endif
6b7353
+#ifdef ELIBMAX
6b7353
+       case ELIBMAX: return
6b7353
+               "attempting to link in more shared libraries than system limit";
6b7353
+#endif
6b7353
+#ifdef ELIBSCN
6b7353
+       case ELIBSCN: return ".lib section in a.out corrupted";
6b7353
+#endif
6b7353
+#ifdef ELNRNG
6b7353
+       case ELNRNG: return "link number out of range";
6b7353
+#endif
6b7353
+#if defined(ELOOP) && (!defined(ENOENT) || (ELOOP != ENOENT))
6b7353
+       case ELOOP: return "too many levels of symbolic links";
6b7353
+#endif
6b7353
+#ifdef EMFILE
6b7353
+       case EMFILE: return "too many open files";
6b7353
+#endif
6b7353
+#ifdef EMLINK
6b7353
+       case EMLINK: return "too many links";
6b7353
+#endif
6b7353
+#ifdef EMSGSIZE
6b7353
+       case EMSGSIZE: return "message too long";
6b7353
+#endif
6b7353
+#ifdef EMULTIHOP
6b7353
+       case EMULTIHOP: return "multihop attempted";
6b7353
+#endif
6b7353
+#ifdef ENAMETOOLONG
6b7353
+       case ENAMETOOLONG: return "file name too long";
6b7353
+#endif
6b7353
+#ifdef ENAVAIL
6b7353
+       case ENAVAIL: return "not available";
6b7353
+#endif
6b7353
+#ifdef ENET
6b7353
+       case ENET: return "ENET";
6b7353
+#endif
6b7353
+#ifdef ENETDOWN
6b7353
+       case ENETDOWN: return "network is down";
6b7353
+#endif
6b7353
+#ifdef ENETRESET
6b7353
+       case ENETRESET: return "network dropped connection on reset";
6b7353
+#endif
6b7353
+#ifdef ENETUNREACH
6b7353
+       case ENETUNREACH: return "network is unreachable";
6b7353
+#endif
6b7353
+#ifdef ENFILE
6b7353
+       case ENFILE: return "file table overflow";
6b7353
+#endif
6b7353
+#ifdef ENOANO
6b7353
+       case ENOANO: return "anode table overflow";
6b7353
+#endif
6b7353
+#if defined(ENOBUFS) && (!defined(ENOSR) || (ENOBUFS != ENOSR))
6b7353
+       case ENOBUFS: return "no buffer space available";
6b7353
+#endif
6b7353
+#ifdef ENOCSI
6b7353
+       case ENOCSI: return "no CSI structure available";
6b7353
+#endif
6b7353
+#if defined(ENODATA) && (!defined(ECONNREFUSED) || (ENODATA != ECONNREFUSED))
6b7353
+       case ENODATA: return "no data available";
6b7353
+#endif
6b7353
+#ifdef ENODEV
6b7353
+       case ENODEV: return "no such device";
6b7353
+#endif
6b7353
+#ifdef ENOENT
6b7353
+       case ENOENT: return "no such file or directory";
6b7353
+#endif
6b7353
+#ifdef ENOEXEC
6b7353
+       case ENOEXEC: return "exec format error";
6b7353
+#endif
6b7353
+#ifdef ENOLCK
6b7353
+       case ENOLCK: return "no locks available";
6b7353
+#endif
6b7353
+#ifdef ENOLINK
6b7353
+       case ENOLINK: return "link has be severed";
6b7353
+#endif
6b7353
+#ifdef ENOMEM
6b7353
+       case ENOMEM: return "not enough memory";
6b7353
+#endif
6b7353
+#ifdef ENOMSG
6b7353
+       case ENOMSG: return "no message of desired type";
6b7353
+#endif
6b7353
+#ifdef ENONET
6b7353
+       case ENONET: return "machine is not on the network";
6b7353
+#endif
6b7353
+#ifdef ENOPKG
6b7353
+       case ENOPKG: return "package not installed";
6b7353
+#endif
6b7353
+#ifdef ENOPROTOOPT
6b7353
+       case ENOPROTOOPT: return "bad proocol option";
6b7353
+#endif
6b7353
+#ifdef ENOSPC
6b7353
+       case ENOSPC: return "no space left on device";
6b7353
+#endif
6b7353
+#if defined(ENOSR) && (!defined(ENAMETOOLONG) || (ENAMETOOLONG != ENOSR))
6b7353
+       case ENOSR: return "out of stream resources";
6b7353
+#endif
6b7353
+#if defined(ENOSTR) && (!defined(ENOTTY) || (ENOTTY != ENOSTR))
6b7353
+       case ENOSTR: return "not a stream device";
6b7353
+#endif
6b7353
+#ifdef ENOSYM
6b7353
+       case ENOSYM: return "unresolved symbol name";
6b7353
+#endif
6b7353
+#ifdef ENOSYS
6b7353
+       case ENOSYS: return "function not implemented";
6b7353
+#endif
6b7353
+#ifdef ENOTBLK
6b7353
+       case ENOTBLK: return "block device required";
6b7353
+#endif
6b7353
+#ifdef ENOTCONN
6b7353
+       case ENOTCONN: return "socket is not connected";
6b7353
+#endif
6b7353
+#ifdef ENOTDIR
6b7353
+       case ENOTDIR: return "not a directory";
6b7353
+#endif
6b7353
+#if defined(ENOTEMPTY) && (!defined(EEXIST) || (ENOTEMPTY != EEXIST))
6b7353
+       case ENOTEMPTY: return "directory not empty";
6b7353
+#endif
6b7353
+#ifdef ENOTNAM
6b7353
+       case ENOTNAM: return "not a name file";
6b7353
+#endif
6b7353
+#ifdef ENOTSOCK
6b7353
+       case ENOTSOCK: return "socket operation on non-socket";
6b7353
+#endif
6b7353
+#ifdef ENOTSUP
6b7353
+       case ENOTSUP: return "operation not supported";
6b7353
+#endif
6b7353
+#ifdef ENOTTY
6b7353
+       case ENOTTY: return "inappropriate device for ioctl";
6b7353
+#endif
6b7353
+#ifdef ENOTUNIQ
6b7353
+       case ENOTUNIQ: return "name not unique on network";
6b7353
+#endif
6b7353
+#ifdef ENXIO
6b7353
+       case ENXIO: return "no such device or address";
6b7353
+#endif
6b7353
+#if defined(EOPNOTSUPP) &&  (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
6b7353
+       case EOPNOTSUPP: return "operation not supported on socket";
6b7353
+#endif
6b7353
+#ifdef EPERM
6b7353
+       case EPERM: return "not owner";
6b7353
+#endif
6b7353
+#if defined(EPFNOSUPPORT) && (!defined(ENOLCK) || (ENOLCK != EPFNOSUPPORT))
6b7353
+       case EPFNOSUPPORT: return "protocol family not supported";
6b7353
+#endif
6b7353
+#ifdef EPIPE
6b7353
+       case EPIPE: return "broken pipe";
6b7353
+#endif
6b7353
+#ifdef EPROCLIM
6b7353
+       case EPROCLIM: return "too many processes";
6b7353
+#endif
6b7353
+#ifdef EPROCUNAVAIL
6b7353
+       case EPROCUNAVAIL: return "bad procedure for program";
6b7353
+#endif
6b7353
+#ifdef EPROGMISMATCH
6b7353
+       case EPROGMISMATCH: return "program version wrong";
6b7353
+#endif
6b7353
+#ifdef EPROGUNAVAIL
6b7353
+       case EPROGUNAVAIL: return "RPC program not available";
6b7353
+#endif
6b7353
+#ifdef EPROTO
6b7353
+       case EPROTO: return "protocol error";
6b7353
+#endif
6b7353
+#ifdef EPROTONOSUPPORT
6b7353
+       case EPROTONOSUPPORT: return "protocol not suppored";
6b7353
+#endif
6b7353
+#ifdef EPROTOTYPE
6b7353
+       case EPROTOTYPE: return "protocol wrong type for socket";
6b7353
+#endif
6b7353
+#ifdef ERANGE
6b7353
+       case ERANGE: return "math result unrepresentable";
6b7353
+#endif
6b7353
+#if defined(EREFUSED) && (!defined(ECONNREFUSED) || (EREFUSED != ECONNREFUSED))
6b7353
+       case EREFUSED: return "EREFUSED";
6b7353
+#endif
6b7353
+#ifdef EREMCHG
6b7353
+       case EREMCHG: return "remote address changed";
6b7353
+#endif
6b7353
+#ifdef EREMDEV
6b7353
+       case EREMDEV: return "remote device";
6b7353
+#endif
6b7353
+#ifdef EREMOTE
6b7353
+       case EREMOTE: return "pathname hit remote file system";
6b7353
+#endif
6b7353
+#ifdef EREMOTEIO
6b7353
+       case EREMOTEIO: return "remote i/o error";
6b7353
+#endif
6b7353
+#ifdef EREMOTERELEASE
6b7353
+       case EREMOTERELEASE: return "EREMOTERELEASE";
6b7353
+#endif
6b7353
+#ifdef EROFS
6b7353
+       case EROFS: return "read-only file system";
6b7353
+#endif
6b7353
+#ifdef ERPCMISMATCH
6b7353
+       case ERPCMISMATCH: return "RPC version is wrong";
6b7353
+#endif
6b7353
+#ifdef ERREMOTE
6b7353
+       case ERREMOTE: return "object is remote";
6b7353
+#endif
6b7353
+#ifdef ESHUTDOWN
6b7353
+       case ESHUTDOWN: return "can't send afer socket shutdown";
6b7353
+#endif
6b7353
+#ifdef ESOCKTNOSUPPORT
6b7353
+       case ESOCKTNOSUPPORT: return "socket type not supported";
6b7353
+#endif
6b7353
+#ifdef ESPIPE
6b7353
+       case ESPIPE: return "invalid seek";
6b7353
+#endif
6b7353
+#ifdef ESRCH
6b7353
+       case ESRCH: return "no such process";
6b7353
+#endif
6b7353
+#ifdef ESRMNT
6b7353
+       case ESRMNT: return "srmount error";
6b7353
+#endif
6b7353
+#ifdef ESTALE
6b7353
+       case ESTALE: return "stale remote file handle";
6b7353
+#endif
6b7353
+#ifdef ESUCCESS
6b7353
+       case ESUCCESS: return "Error 0";
6b7353
+#endif
6b7353
+#if defined(ETIME) && (!defined(ELOOP) || (ETIME != ELOOP))
6b7353
+       case ETIME: return "timer expired";
6b7353
+#endif
6b7353
+#if defined(ETIMEDOUT) && (!defined(ENOSTR) || (ETIMEDOUT != ENOSTR))
6b7353
+       case ETIMEDOUT: return "connection timed out";
6b7353
+#endif
6b7353
+#ifdef ETOOMANYREFS
6b7353
+       case ETOOMANYREFS: return "too many references: can't splice";
6b7353
+#endif
6b7353
+#ifdef ETXTBSY
6b7353
+       case ETXTBSY: return "text file or pseudo-device busy";
6b7353
+#endif
6b7353
+#ifdef EUCLEAN
6b7353
+       case EUCLEAN: return "structure needs cleaning";
6b7353
+#endif
6b7353
+#ifdef EUNATCH
6b7353
+       case EUNATCH: return "protocol driver not attached";
6b7353
+#endif
6b7353
+#ifdef EUSERS
6b7353
+       case EUSERS: return "too many users";
6b7353
+#endif
6b7353
+#ifdef EVERSION
6b7353
+       case EVERSION: return "version mismatch";
6b7353
+#endif
6b7353
+#if defined(EWOULDBLOCK) && (!defined(EAGAIN) || (EWOULDBLOCK != EAGAIN))
6b7353
+       case EWOULDBLOCK: return "operation would block";
6b7353
+#endif
6b7353
+#ifdef EXDEV
6b7353
+       case EXDEV: return "cross-domain link";
6b7353
+#endif
6b7353
+#ifdef EXFULL
6b7353
+       case EXFULL: return "message tables full";
6b7353
+#endif
6b7353
+       default:
6b7353
+#ifdef NO_STRERROR
6b7353
+           return "unknown POSIX error";
6b7353
+#else
6b7353
+           return strerror(errno);
6b7353
+#endif
6b7353
+    }
6b7353
+}
6b7353
+
6b7353
+/*
6b7353
+ * end of excerpt from tcl8.0.X/generic/tclPosixStr.c
6b7353
+ */
6b7353
+
6b7353
+/*
6b7353
  * stolen from exp_log.c - this function is called from the Expect library
6b7353
  * but the one that the library supplies calls Tcl functions.  So we supply
6b7353
  * our own.
6b7353
diff -up expect5.45/expect.h.orig expect5.45/expect.h
6b7353
--- expect5.45/expect.h.orig	2010-09-01 00:20:27.000000000 +0200
6b7353
+++ expect5.45/expect.h	2015-05-19 12:00:58.674248152 +0200
6b7353
@@ -258,6 +258,46 @@ typedef long LONG;
6b7353
 typedef struct Tcl_RegExp_ *Tcl_RegExp;
6b7353
 
6b7353
 /*
6b7353
+ * The following declarations either map ckalloc and ckfree to
6b7353
+ * malloc and free, or they map them to procedures with all sorts
6b7353
+ * of debugging hooks defined in tclCkalloc.c.
6b7353
+ */
6b7353
+
6b7353
+#ifdef TCL_MEM_DEBUG
6b7353
+
6b7353
+#  define Tcl_Alloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
6b7353
+#  define Tcl_Free(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
6b7353
+#  define Tcl_Realloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
6b7353
+#  define ckalloc(x) Tcl_DbCkalloc(x, __FILE__, __LINE__)
6b7353
+#  define ckfree(x)  Tcl_DbCkfree(x, __FILE__, __LINE__)
6b7353
+#  define ckrealloc(x,y) Tcl_DbCkrealloc((x), (y),__FILE__, __LINE__)
6b7353
+
6b7353
+#else
6b7353
+
6b7353
+/*
6b7353
+ * If USE_TCLALLOC is true, then we need to call Tcl_Alloc instead of
6b7353
+ * the native malloc/free.  The only time USE_TCLALLOC should not be
6b7353
+ * true is when compiling the Tcl/Tk libraries on Unix systems.  In this
6b7353
+ * case we can safely call the native malloc/free directly as a performance
6b7353
+ * optimization.
6b7353
+ */
6b7353
+
6b7353
+#  if USE_TCLALLOC
6b7353
+#     define ckalloc(x) Tcl_Alloc(x)
6b7353
+#     define ckfree(x) Tcl_Free(x)
6b7353
+#     define ckrealloc(x,y) Tcl_Realloc(x,y)
6b7353
+#  else
6b7353
+#     define ckalloc(x) malloc(x)
6b7353
+#     define ckfree(x)  free(x)
6b7353
+#     define ckrealloc(x,y) realloc(x,y)
6b7353
+#  endif
6b7353
+#  define Tcl_DumpActiveMemory(x)
6b7353
+#  define Tcl_ValidateAllMemory(x,y)
6b7353
+
6b7353
+#endif /* !TCL_MEM_DEBUG */
6b7353
+
6b7353
+
6b7353
+/*
6b7353
  * These function have been renamed. The old names are deprecated, but we
6b7353
  * define these macros for backwards compatibilty.
6b7353
  */
6b7353
@@ -268,6 +308,14 @@ typedef struct Tcl_RegExp_ *Tcl_RegExp;
6b7353
 #define Tcl_Return Tcl_SetResult
6b7353
 #define Tcl_TildeSubst Tcl_TranslateFileName
6b7353
 
6b7353
+/*
6b7353
+ * In later releases, Tcl_Panic will be the correct name to use.  For now
6b7353
+ * we leave it as panic to avoid breaking existing binaries.
6b7353
+ */
6b7353
+
6b7353
+#define Tcl_Panic panic
6b7353
+#define Tcl_PanicVA panicVA
6b7353
+
6b7353
 #endif /* RESOURCE_INCLUDED */
6b7353
 
6b7353
 #undef TCL_STORAGE_CLASS