2008-09-19 Eric Blake <ebb9@byu.net>

Supply missing POSIX errno values.
        * libc/include/sys/errno.h (ENOTRECOVERABLE, EOWNERDEAD): Define.
        * libc/string/strerror.c (strerror): Decode them, and ECANCELED.
This commit is contained in:
Jeff Johnston 2008-09-19 16:11:35 +00:00
parent f2c11dadcf
commit 29212ab3cd
3 changed files with 36 additions and 3 deletions

View File

@ -1,3 +1,9 @@
2008-09-19 Eric Blake <ebb9@byu.net>
Supply missing POSIX errno values.
* libc/include/sys/errno.h (ENOTRECOVERABLE, EOWNERDEAD): Define.
* libc/string/strerror.c (strerror): Decode them, and ECANCELED.
2008-09-10 Ken Werner <ken.werner@de.ibm.com> 2008-09-10 Ken Werner <ken.werner@de.ibm.com>
* libc/machine/spu/strcpy.h: Add missing header. * libc/machine/spu/strcpy.h: Add missing header.

View File

@ -148,7 +148,10 @@ extern __IMPORT int sys_nerr;
#define ECASECLASH 137 /* Filename exists with different case */ #define ECASECLASH 137 /* Filename exists with different case */
#define EILSEQ 138 #define EILSEQ 138
#define EOVERFLOW 139 /* Value too large for defined data type */ #define EOVERFLOW 139 /* Value too large for defined data type */
#define ECANCELED 140 /* Operation canceled. */ #define ECANCELED 140 /* Operation canceled */
#define ENOTRECOVERABLE 141 /* State not recoverable */
#define EOWNERDEAD 142 /* Previous owner died */
/* From cygwin32. */ /* From cygwin32. */
#define EWOULDBLOCK EAGAIN /* Operation would block */ #define EWOULDBLOCK EAGAIN /* Operation would block */

View File

@ -274,6 +274,15 @@ Text file busy
o EXDEV o EXDEV
Cross-device link Cross-device link
o ECANCELED
Operation canceled
o ENOTRECOVERABLE
State not recoverable
o EOWNERDEAD
Previous owner died
o- o-
RETURNS RETURNS
@ -436,7 +445,7 @@ _DEFUN (strerror, (errnum),
error = "Host is down"; error = "Host is down";
break; break;
#endif #endif
#ifdef EINPROGRESS #ifdef EINPROGRESS
case EINPROGRESS: case EINPROGRESS:
error = "Connection already in progress"; error = "Connection already in progress";
break; break;
@ -541,7 +550,7 @@ _DEFUN (strerror, (errnum),
error = "Deadlock"; error = "Deadlock";
break; break;
#endif #endif
#ifdef ENETUNREACH #ifdef ENETUNREACH
case ENETUNREACH: case ENETUNREACH:
error = "Network is unreachable"; error = "Network is unreachable";
break; break;
@ -736,6 +745,21 @@ _DEFUN (strerror, (errnum),
error = "Socket is already connected"; error = "Socket is already connected";
break; break;
#endif #endif
#ifdef ECANCELED
case ECANCELED:
error = "Operation canceled";
break;
#endif
#ifdef ENOTRECOVERABLE
case ENOTRECOVERABLE:
error = "State not recoverable";
break;
#endif
#ifdef EOWNERDEAD
case EOWNERDEAD:
error = "Previous owner died";
break;
#endif
#if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP)) #if defined(EOPNOTSUPP) && (!defined(ENOTSUP) || (ENOTSUP != EOPNOTSUPP))
case EOPNOTSUPP: case EOPNOTSUPP:
error = "Operation not supported on socket"; error = "Operation not supported on socket";