summaryrefslogtreecommitdiffstats
path: root/generic/tclPosixStr.c
diff options
context:
space:
mode:
Diffstat (limited to 'generic/tclPosixStr.c')
-rw-r--r--generic/tclPosixStr.c56
1 files changed, 16 insertions, 40 deletions
diff --git a/generic/tclPosixStr.c b/generic/tclPosixStr.c
index 411eb27..a11b532 100644
--- a/generic/tclPosixStr.c
+++ b/generic/tclPosixStr.c
@@ -31,7 +31,7 @@
*----------------------------------------------------------------------
*/
-const char *
+CONST char *
Tcl_ErrnoId(void)
{
switch (errno) {
@@ -74,9 +74,6 @@ Tcl_ErrnoId(void)
#ifdef EBADMSG
case EBADMSG: return "EBADMSG";
#endif
-#ifdef ECANCELED
- case ECANCELED: return "ECANCELED";
-#endif
#ifdef EBADR
case EBADR: return "EBADR";
#endif
@@ -203,7 +200,7 @@ Tcl_ErrnoId(void)
#ifdef ELIBEXEC
case ELIBEXEC: return "ELIBEXEC";
#endif
-#if defined(ELIBMAX) && (!defined(ECANCELED) || (ELIBMAX != ECANCELED))
+#ifdef ELIBMAX
case ELIBMAX: return "ELIBMAX";
#endif
#ifdef ELIBSCN
@@ -272,7 +269,7 @@ Tcl_ErrnoId(void)
#ifdef ENOLCK
case ENOLCK: return "ENOLCK";
#endif
-#ifdef ENOLINK
+#if defined(ENOLINK) && (!defined(ESOCKTNOSUPPORT) || (ESOCKTNOSUPPORT != ENOLINK))
case ENOLINK: return "ENOLINK";
#endif
#ifdef ENOMEM
@@ -287,7 +284,7 @@ Tcl_ErrnoId(void)
#ifdef ENOPKG
case ENOPKG: return "ENOPKG";
#endif
-#ifdef ENOPROTOOPT
+#if defined(ENOPROTOOPT) && (!defined(EPFNOSUPPORT) || (EPFNOSUPPORT != ENOPROTOOPT))
case ENOPROTOOPT: return "ENOPROTOOPT";
#endif
#ifdef ENOSPC
@@ -311,9 +308,6 @@ Tcl_ErrnoId(void)
#ifdef ENOTCONN
case ENOTCONN: return "ENOTCONN";
#endif
-#ifdef ENOTRECOVERABLE
- case ENOTRECOVERABLE: return "ENOTRECOVERABLE";
-#endif
#ifdef ENOTDIR
case ENOTDIR: return "ENOTDIR";
#endif
@@ -341,15 +335,9 @@ 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
@@ -489,7 +477,7 @@ Tcl_ErrnoId(void)
*----------------------------------------------------------------------
*/
-const char *
+CONST char *
Tcl_ErrnoMsg(
int err) /* Error number (such as in errno variable). */
{
@@ -504,13 +492,13 @@ Tcl_ErrnoMsg(
case EADDRINUSE: return "address already in use";
#endif
#ifdef EADDRNOTAVAIL
- case EADDRNOTAVAIL: return "cannot assign requested address";
+ case EADDRNOTAVAIL: return "can't assign requested address";
#endif
#ifdef EADV
case EADV: return "advertise error";
#endif
#ifdef EAFNOSUPPORT
- case EAFNOSUPPORT: return "address family not supported by protocol";
+ case EAFNOSUPPORT: return "address family not supported by protocol family";
#endif
#ifdef EAGAIN
case EAGAIN: return "resource temporarily unavailable";
@@ -533,9 +521,6 @@ 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
@@ -654,15 +639,15 @@ Tcl_ErrnoMsg(
case EL3RST: return "level 3 reset";
#endif
#ifdef ELIBACC
- case ELIBACC: return "cannot access a needed shared library";
+ case ELIBACC: return "can not access a needed shared library";
#endif
#ifdef ELIBBAD
case ELIBBAD: return "accessing a corrupted shared library";
#endif
#ifdef ELIBEXEC
- case ELIBEXEC: return "cannot exec a shared library directly";
+ case ELIBEXEC: return "can not exec a shared library directly";
#endif
-#if defined(ELIBMAX) && (!defined(ECANCELED) || (ELIBMAX != ECANCELED))
+#ifdef ELIBMAX
case ELIBMAX: return
"attempting to link in more shared libraries than system limit";
#endif
@@ -732,7 +717,7 @@ Tcl_ErrnoMsg(
#ifdef ENOLCK
case ENOLCK: return "no locks available";
#endif
-#ifdef ENOLINK
+#if defined(ENOLINK) && (!defined(ESOCKTNOSUPPORT) || (ESOCKTNOSUPPORT != ENOLINK))
case ENOLINK: return "link has been severed";
#endif
#ifdef ENOMEM
@@ -747,7 +732,7 @@ Tcl_ErrnoMsg(
#ifdef ENOPKG
case ENOPKG: return "package not installed";
#endif
-#ifdef ENOPROTOOPT
+#if defined(ENOPROTOOPT) && (!defined(EPFNOSUPPORT) || (EPFNOSUPPORT != ENOPROTOOPT))
case ENOPROTOOPT: return "bad protocol option";
#endif
#ifdef ENOSPC
@@ -771,9 +756,6 @@ 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
@@ -801,15 +783,9 @@ 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
@@ -871,7 +847,7 @@ Tcl_ErrnoMsg(
case ERREMOTE: return "object is remote";
#endif
#ifdef ESHUTDOWN
- case ESHUTDOWN: return "cannot send after socket shutdown";
+ case ESHUTDOWN: return "can't send after socket shutdown";
#endif
#ifdef ESOCKTNOSUPPORT
case ESOCKTNOSUPPORT: return "socket type not supported";
@@ -898,7 +874,7 @@ Tcl_ErrnoMsg(
case ETIMEDOUT: return "connection timed out";
#endif
#ifdef ETOOMANYREFS
- case ETOOMANYREFS: return "too many references: cannot splice";
+ case ETOOMANYREFS: return "too many references: can't splice";
#endif
#ifdef ETXTBSY
case ETXTBSY: return "text file or pseudo-device busy";
@@ -951,7 +927,7 @@ Tcl_ErrnoMsg(
*----------------------------------------------------------------------
*/
-const char *
+CONST char *
Tcl_SignalId(
int sig) /* Number of signal. */
{
@@ -1085,7 +1061,7 @@ Tcl_SignalId(
*----------------------------------------------------------------------
*/
-const char *
+CONST char *
Tcl_SignalMsg(
int sig) /* Number of signal. */
{