Add some missing errnos from POSIX. Nothing in FreeBSD generates

these at the moment, but applications that test for them will now
have a better chance of compiling.

I have intentionally omitted errnos that are only good for STREAMS,
since apps that use STREAMS won't compile anyway.  The exception is
EPROTO, which was apparently intended for STREAMS, but worth having
anyway because Linux (mis)uses it for other things.
This commit is contained in:
das 2005-04-02 12:33:28 +00:00
parent ed4814bbdf
commit 1e73b68cbc
2 changed files with 12 additions and 1 deletions

View File

@ -149,5 +149,10 @@ const char *const sys_errlist[] = {
/* General */
"Programming error", /* 88 - EDOOFUS */
"Bad message", /* 89 - EBADMSG */
"Multihop attempted", /* 90 - EMULTIHOP */
"Link has been severed", /* 91 - ENOLINK */
"Protocol error", /* 92 - EPROTO */
};
const int sys_nerr = sizeof(sys_errlist) / sizeof(sys_errlist[0]);

View File

@ -166,9 +166,15 @@ __END_DECLS
#define ENOATTR 87 /* Attribute not found */
#define EDOOFUS 88 /* Programming error */
#endif /* _POSIX_SOURCE */
#define ELAST 88 /* Must be equal largest errno */
#define EBADMSG 89 /* Bad message */
#define EMULTIHOP 90 /* Multihop attempted */
#define ENOLINK 91 /* Link has been severed */
#define EPROTO 92 /* Protocol error */
#ifndef _POSIX_SOURCE
#define ELAST 92 /* Must be equal largest errno */
#endif /* _POSIX_SOURCE */
#ifdef _KERNEL