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