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

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