Define WASI libc errno constants.

This commit is contained in:
Dan Gohman 2019-04-19 10:18:41 -07:00
parent 58ba8129c4
commit 1168782b3f
1 changed files with 79 additions and 0 deletions

View File

@ -366,6 +366,85 @@ pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1;
pub const AT_SYMLINK_FOLLOW: c_int = 0x2;
pub const AT_REMOVEDIR: c_int = 0x4;
pub const E2BIG: c_int = __WASI_E2BIG as c_int;
pub const EACCES: c_int = __WASI_EACCES as c_int;
pub const EADDRINUSE: c_int = __WASI_EADDRINUSE as c_int;
pub const EADDRNOTAVAIL: c_int = __WASI_EADDRNOTAVAIL as c_int;
pub const EAFNOSUPPORT: c_int = __WASI_EAFNOSUPPORT as c_int;
pub const EAGAIN: c_int = __WASI_EAGAIN as c_int;
pub const EALREADY: c_int = __WASI_EALREADY as c_int;
pub const EBADF: c_int = __WASI_EBADF as c_int;
pub const EBADMSG: c_int = __WASI_EBADMSG as c_int;
pub const EBUSY: c_int = __WASI_EBUSY as c_int;
pub const ECANCELED: c_int = __WASI_ECANCELED as c_int;
pub const ECHILD: c_int = __WASI_ECHILD as c_int;
pub const ECONNABORTED: c_int = __WASI_ECONNABORTED as c_int;
pub const ECONNREFUSED: c_int = __WASI_ECONNREFUSED as c_int;
pub const ECONNRESET: c_int = __WASI_ECONNRESET as c_int;
pub const EDEADLK: c_int = __WASI_EDEADLK as c_int;
pub const EDESTADDRREQ: c_int = __WASI_EDESTADDRREQ as c_int;
pub const EDOM: c_int = __WASI_EDOM as c_int;
pub const EDQUOT: c_int = __WASI_EDQUOT as c_int;
pub const EEXIST: c_int = __WASI_EEXIST as c_int;
pub const EFAULT: c_int = __WASI_EFAULT as c_int;
pub const EFBIG: c_int = __WASI_EFBIG as c_int;
pub const EHOSTUNREACH: c_int = __WASI_EHOSTUNREACH as c_int;
pub const EIDRM: c_int = __WASI_EIDRM as c_int;
pub const EILSEQ: c_int = __WASI_EILSEQ as c_int;
pub const EINPROGRESS: c_int = __WASI_EINPROGRESS as c_int;
pub const EINTR: c_int = __WASI_EINTR as c_int;
pub const EINVAL: c_int = __WASI_EINVAL as c_int;
pub const EIO: c_int = __WASI_EIO as c_int;
pub const EISCONN: c_int = __WASI_EISCONN as c_int;
pub const EISDIR: c_int = __WASI_EISDIR as c_int;
pub const ELOOP: c_int = __WASI_ELOOP as c_int;
pub const EMFILE: c_int = __WASI_EMFILE as c_int;
pub const EMLINK: c_int = __WASI_EMLINK as c_int;
pub const EMSGSIZE: c_int = __WASI_EMSGSIZE as c_int;
pub const EMULTIHOP: c_int = __WASI_EMULTIHOP as c_int;
pub const ENAMETOOLONG: c_int = __WASI_ENAMETOOLONG as c_int;
pub const ENETDOWN: c_int = __WASI_ENETDOWN as c_int;
pub const ENETRESET: c_int = __WASI_ENETRESET as c_int;
pub const ENETUNREACH: c_int = __WASI_ENETUNREACH as c_int;
pub const ENFILE: c_int = __WASI_ENFILE as c_int;
pub const ENOBUFS: c_int = __WASI_ENOBUFS as c_int;
pub const ENODEV: c_int = __WASI_ENODEV as c_int;
pub const ENOENT: c_int = __WASI_ENOENT as c_int;
pub const ENOEXEC: c_int = __WASI_ENOEXEC as c_int;
pub const ENOLCK: c_int = __WASI_ENOLCK as c_int;
pub const ENOLINK: c_int = __WASI_ENOLINK as c_int;
pub const ENOMEM: c_int = __WASI_ENOMEM as c_int;
pub const ENOMSG: c_int = __WASI_ENOMSG as c_int;
pub const ENOPROTOOPT: c_int = __WASI_ENOPROTOOPT as c_int;
pub const ENOSPC: c_int = __WASI_ENOSPC as c_int;
pub const ENOSYS: c_int = __WASI_ENOSYS as c_int;
pub const ENOTCONN: c_int = __WASI_ENOTCONN as c_int;
pub const ENOTDIR: c_int = __WASI_ENOTDIR as c_int;
pub const ENOTEMPTY: c_int = __WASI_ENOTEMPTY as c_int;
pub const ENOTRECOVERABLE: c_int = __WASI_ENOTRECOVERABLE as c_int;
pub const ENOTSOCK: c_int = __WASI_ENOTSOCK as c_int;
pub const ENOTSUP: c_int = __WASI_ENOTSUP as c_int;
pub const ENOTTY: c_int = __WASI_ENOTTY as c_int;
pub const ENXIO: c_int = __WASI_ENXIO as c_int;
pub const EOVERFLOW: c_int = __WASI_EOVERFLOW as c_int;
pub const EOWNERDEAD: c_int = __WASI_EOWNERDEAD as c_int;
pub const EPERM: c_int = __WASI_EPERM as c_int;
pub const EPIPE: c_int = __WASI_EPIPE as c_int;
pub const EPROTO: c_int = __WASI_EPROTO as c_int;
pub const EPROTONOSUPPORT: c_int = __WASI_EPROTONOSUPPORT as c_int;
pub const EPROTOTYPE: c_int = __WASI_EPROTOTYPE as c_int;
pub const ERANGE: c_int = __WASI_ERANGE as c_int;
pub const EROFS: c_int = __WASI_EROFS as c_int;
pub const ESPIPE: c_int = __WASI_ESPIPE as c_int;
pub const ESRCH: c_int = __WASI_ESRCH as c_int;
pub const ESTALE: c_int = __WASI_ESTALE as c_int;
pub const ETIMEDOUT: c_int = __WASI_ETIMEDOUT as c_int;
pub const ETXTBSY: c_int = __WASI_ETXTBSY as c_int;
pub const EXDEV: c_int = __WASI_EXDEV as c_int;
pub const ENOTCAPABLE: c_int = __WASI_ENOTCAPABLE as c_int;
pub const EOPNOTSUPP: c_int = ENOTSUP;
pub const EWOULDBLOCK: c_int = EAGAIN;
pub const __WASI_ADVICE_NORMAL: u8 = 0;
pub const __WASI_ADVICE_SEQUENTIAL: u8 = 1;
pub const __WASI_ADVICE_RANDOM: u8 = 2;