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

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