From 447d57a6ac3e0f9dcf52542acbe3fbe77a4cf5df Mon Sep 17 00:00:00 2001 From: nijtmans Date: Mon, 28 Jun 2010 08:50:12 +0000 Subject: [Bug 3019634] errno.h and tclWinPort.h have conflicting definitions. --- ChangeLog | 7 +++++++ generic/tclPosixStr.c | 44 ++++++++++++++++++++++++++++++++++---------- 2 files changed, 41 insertions(+), 10 deletions(-) diff --git a/ChangeLog b/ChangeLog index 71afc2e..fc89d0d 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2010-06-28 Jan Nijtmans + + * generic/tclPosixStr.c [Bug 3019634] errno.h and tclWinPort.h have + conflicting definitions. Added messages for ECANCELED, ENOTRECOVERABLE, + EOTHER and EOWNERDEAD, and fixed various typing mistakes in + other messages. + 2010-06-25 Reinhard Max * tests/socket.test: Prevent a race condition during shutdown of diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c index 4d7c559..a507650 100644 --- a/generic/tclPosixStr.c +++ b/generic/tclPosixStr.c @@ -10,7 +10,7 @@ * See the file "license.terms" for information on usage and redistribution * of this file, and for a DISCLAIMER OF ALL WARRANTIES. * - * RCS: @(#) $Id: tclPosixStr.c,v 1.16 2009/10/21 13:53:14 dkf Exp $ + * RCS: @(#) $Id: tclPosixStr.c,v 1.17 2010/06/28 08:50:12 nijtmans Exp $ */ #include "tclInt.h" @@ -76,6 +76,9 @@ Tcl_ErrnoId(void) #ifdef EBADMSG case EBADMSG: return "EBADMSG"; #endif +#ifdef ECANCELED + case ECANCELED: return "ECANCELED"; +#endif #ifdef EBADR case EBADR: return "EBADR"; #endif @@ -310,6 +313,9 @@ Tcl_ErrnoId(void) #ifdef ENOTCONN case ENOTCONN: return "ENOTCONN"; #endif +#ifdef ENOTRECOVERABLE + case ENOTRECOVERABLE: return "ENOTRECOVERABLE"; +#endif #ifdef ENOTDIR case ENOTDIR: return "ENOTDIR"; #endif @@ -337,9 +343,15 @@ Tcl_ErrnoId(void) #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) case EOPNOTSUPP: return "EOPNOTSUPP"; #endif +#ifdef EOTHER + case EOTHER: return "EOTHER"; +#endif #if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) case EOVERFLOW: return "EOVERFLOW"; #endif +#ifdef EOWNERDEAD + case EOWNERDEAD: return "EOWNERDEAD"; +#endif #ifdef EPERM case EPERM: return "EPERM"; #endif @@ -494,13 +506,13 @@ Tcl_ErrnoMsg( case EADDRINUSE: return "address already in use"; #endif #ifdef EADDRNOTAVAIL - case EADDRNOTAVAIL: return "can't assign requested address"; + case EADDRNOTAVAIL: return "cannot assign requested address"; #endif #ifdef EADV case EADV: return "advertise error"; #endif #ifdef EAFNOSUPPORT - case EAFNOSUPPORT: return "address family not supported by protocol family"; + case EAFNOSUPPORT: return "address family not supported by protocol"; #endif #ifdef EAGAIN case EAGAIN: return "resource temporarily unavailable"; @@ -523,6 +535,9 @@ Tcl_ErrnoMsg( #ifdef EBADMSG case EBADMSG: return "not a data message"; #endif +#ifdef ECANCELED + case ECANCELED: return "operation canceled"; +#endif #ifdef EBADR case EBADR: return "bad request descriptor"; #endif @@ -641,13 +656,13 @@ Tcl_ErrnoMsg( case EL3RST: return "level 3 reset"; #endif #ifdef ELIBACC - case ELIBACC: return "can not access a needed shared library"; + case ELIBACC: return "cannot access a needed shared library"; #endif #ifdef ELIBBAD case ELIBBAD: return "accessing a corrupted shared library"; #endif #ifdef ELIBEXEC - case ELIBEXEC: return "can not exec a shared library directly"; + case ELIBEXEC: return "cannot exec a shared library directly"; #endif #ifdef ELIBMAX case ELIBMAX: return @@ -720,7 +735,7 @@ Tcl_ErrnoMsg( case ENOLCK: return "no locks available"; #endif #ifdef ENOLINK - case ENOLINK: return "link has be severed"; + case ENOLINK: return "link has been severed"; #endif #ifdef ENOMEM case ENOMEM: return "not enough memory"; @@ -758,6 +773,9 @@ Tcl_ErrnoMsg( #ifdef ENOTCONN case ENOTCONN: return "socket is not connected"; #endif +#ifdef ENOTRECOVERABLE + case ENOTRECOVERABLE: return "state not recoverable"; +#endif #ifdef ENOTDIR case ENOTDIR: return "not a directory"; #endif @@ -785,9 +803,15 @@ Tcl_ErrnoMsg( #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) case EOPNOTSUPP: return "operation not supported on socket"; #endif +#ifdef EOTHER + case EOTHER: return "other error"; +#endif #if defined(EOVERFLOW) && (!defined(EFBIG) || (EOVERFLOW != EFBIG)) && (!defined(EINVAL) || (EOVERFLOW != EINVAL)) case EOVERFLOW: return "file too big"; #endif +#ifdef EOWNERDEAD + case EOWNERDEAD: return "owner died"; +#endif #ifdef EPERM case EPERM: return "not owner"; #endif @@ -813,7 +837,7 @@ Tcl_ErrnoMsg( case EPROTO: return "protocol error"; #endif #ifdef EPROTONOSUPPORT - case EPROTONOSUPPORT: return "protocol not suppored"; + case EPROTONOSUPPORT: return "protocol not supported"; #endif #ifdef EPROTOTYPE case EPROTOTYPE: return "protocol wrong type for socket"; @@ -849,7 +873,7 @@ Tcl_ErrnoMsg( case ERREMOTE: return "object is remote"; #endif #ifdef ESHUTDOWN - case ESHUTDOWN: return "can't send afer socket shutdown"; + case ESHUTDOWN: return "cannot send after socket shutdown"; #endif #ifdef ESOCKTNOSUPPORT case ESOCKTNOSUPPORT: return "socket type not supported"; @@ -876,7 +900,7 @@ Tcl_ErrnoMsg( case ETIMEDOUT: return "connection timed out"; #endif #ifdef ETOOMANYREFS - case ETOOMANYREFS: return "too many references: can't splice"; + case ETOOMANYREFS: return "too many references: cannot splice"; #endif #ifdef ETXTBSY case ETXTBSY: return "text file or pseudo-device busy"; @@ -906,7 +930,7 @@ Tcl_ErrnoMsg( #ifdef NO_STRERROR return "unknown POSIX error"; #else - return strerror(errno); + return strerror(err); #endif } } -- cgit v0.12