Obey the gods of source compatability. Progress is evil. (apparently)
git-svn-id: file:///srv/svn/repos/haiku/trunk/current@136 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
+4
-127
@@ -1,12 +1,5 @@
|
||||
/*
|
||||
* errno.h
|
||||
*
|
||||
* POSIX style error codes.
|
||||
* Be values used where required to keep compatibility.
|
||||
*
|
||||
* Errors beginning with B_ can be found in os/support/Errors.h
|
||||
* those starting with ERR_ are kernel only and are found in
|
||||
* private/kernel/kerrors.h
|
||||
*/
|
||||
|
||||
#ifndef _POSIX_ERRNO_H
|
||||
@@ -17,130 +10,14 @@ extern "C"
|
||||
{
|
||||
#endif
|
||||
|
||||
#include <limits.h>
|
||||
#include <Errors.h>
|
||||
|
||||
#define ENOERR 0
|
||||
#define EOK ENOERR /* some code assumes EOK exists */
|
||||
|
||||
/* XXX - Fix this once TLS works */
|
||||
extern int errno;
|
||||
|
||||
/* We're defining values based on the values that Be used, hence
|
||||
* the starting point at + 0x7000
|
||||
*/
|
||||
#define POSIX_ERROR_START LONG_MIN + 0x7000
|
||||
|
||||
/* The basic error codes that don't have a B_ equivalent
|
||||
*
|
||||
* NB when adding codes make sure that support/Errors.h didn't
|
||||
* define a value or it needs to go in the bottom section and
|
||||
* have an identical value assigned.
|
||||
* NB new values just go on the bottom.
|
||||
*/
|
||||
enum {
|
||||
E2BIG = POSIX_ERROR_START + 1,
|
||||
ECHILD,
|
||||
EDEADLK,
|
||||
EFBIG,
|
||||
EMLINK,
|
||||
ENFILE,
|
||||
ENODEV,
|
||||
ENOLCK,
|
||||
ENOSYS,
|
||||
ENOTTY, /* +10 */
|
||||
ENXIO,
|
||||
ESPIPE,
|
||||
ESRCH,
|
||||
EFPOS,
|
||||
ESIGPARM,
|
||||
EDOM,
|
||||
ERANGE,
|
||||
EPROTOTYPE,
|
||||
EPROTONOSUPPORT,
|
||||
EPFNOSUPPORT, /* +20 */
|
||||
EAFNOSUPPORT,
|
||||
EADDRINUSE,
|
||||
EADDRNOTAVAIL,
|
||||
ENETDOWN,
|
||||
ENETUNREACH,
|
||||
ENETRESET,
|
||||
ECONNABORTED,
|
||||
ECONNRESET,
|
||||
EISCONN,
|
||||
ENOTCONN, /* +30 */
|
||||
ESHUTDOWN,
|
||||
ECONNREFUSED,
|
||||
EHOSTUNREACH,
|
||||
ENOPROTOOPT,
|
||||
ENOBUFS,
|
||||
EINPROGRESS,
|
||||
EALREADY,
|
||||
EILSEQ,
|
||||
ENOMSG,
|
||||
ESTALE, /* +40 */
|
||||
EOVERFLOW,
|
||||
EMSGSIZE,
|
||||
EOPNOTSUPP,
|
||||
ENOTSOCK,
|
||||
|
||||
/* These are additional to the Be ones */
|
||||
EBADMSG,
|
||||
ECANCELLED,
|
||||
EDESTADDRREQ,
|
||||
EDQUOT,
|
||||
EHOSTDOWN,
|
||||
EIDRM, /* +50 */
|
||||
EISDIR,
|
||||
EMULTIHOP,
|
||||
ENODATA,
|
||||
ENOLINK,
|
||||
ENOSR,
|
||||
ENOSTR,
|
||||
EPROTO,
|
||||
EPROTOOPT,
|
||||
ETIME,
|
||||
EFTYPE, /* +60 */
|
||||
ETOOMANYREFS
|
||||
};
|
||||
|
||||
/*
|
||||
* Errors with Be equivalents
|
||||
*/
|
||||
|
||||
/* TODO: add comments showing what the equivalent Be errors are... */
|
||||
|
||||
/* NB - These have strange values to be the same as the Be values... */
|
||||
|
||||
/* General errors */
|
||||
enum {
|
||||
ENOMEM = LONG_MIN,
|
||||
EIO,
|
||||
EACCES,
|
||||
EINVAL = LONG_MIN + 5,
|
||||
ETIMEDOUT = LONG_MIN + 9,
|
||||
EINTR,
|
||||
EWOULDBLOCK,
|
||||
EAGAIN = EWOULDBLOCK,
|
||||
EBUSY = LONG_MIN + 14,
|
||||
EPERM
|
||||
};
|
||||
|
||||
/* Storage kit/File system errors */
|
||||
enum {
|
||||
EBADF = LONG_MIN + 0x6000,
|
||||
EEXIST = EBADF + 2,
|
||||
ENOENT,
|
||||
ENAMETOOLONG,
|
||||
ENOTDIR,
|
||||
ENOTEMPTY,
|
||||
ENOSPC,
|
||||
EROFS,
|
||||
EMFILE = EBADF + 10,
|
||||
EXDEV,
|
||||
ELOOP,
|
||||
EPIPE
|
||||
};
|
||||
|
||||
/* An odd ball! */
|
||||
#define ENOEXEC LONG_MIN + 0x1302
|
||||
|
||||
#ifdef __cplusplus
|
||||
} /* "C" */
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user