#[path = "../wasi/errno.rs"]
pub(crate) mod errno;
pub(crate) mod env;
pub(crate) mod event;
pub(crate) mod fs;
pub(crate) mod io;
pub(crate) mod mem;
pub(crate) mod net;
pub(crate) mod process;
pub(crate) mod rand;
pub(crate) mod resolve;
pub(crate) mod sync;
pub(crate) mod thread;
pub(crate) mod time;
use crate::ErrorKind;
pub(crate) type RawHandle = i32;
pub(crate) unsafe fn close(_fd: RawHandle) {}
pub(crate) const OTHER_ERROR: i32 = errno::EIO;
pub(crate) const ERRORS: &[(i32, ErrorKind)] = {
use ErrorKind::*;
use errno::*;
&[
(ENOENT, NotFound),
(EACCES, PermissionDenied),
(EPERM, PermissionDenied),
(ENOTCAPABLE, PermissionDenied),
(EEXIST, AlreadyExists),
(EAGAIN, WouldBlock),
(EINPROGRESS, InProgress),
(EALREADY, InProgress),
(EINTR, Interrupted),
(EINVAL, InvalidInput),
(ETIMEDOUT, TimedOut),
(ENOTSUP, Unsupported),
(ENOSYS, Unsupported),
(EAFNOSUPPORT, Unsupported),
(EPROTONOSUPPORT, Unsupported),
(ENOMEM, OutOfMemory),
(EBADF, BadHandle),
(ENOTSOCK, BadHandle),
(EPIPE, BrokenPipe),
(ENOTDIR, NotADirectory),
(EISDIR, IsADirectory),
(ENOTEMPTY, DirectoryNotEmpty),
(ENAMETOOLONG, InvalidFilename),
(ERANGE, BufferTooSmall),
(ELOOP, FilesystemLoop),
(ENOSPC, StorageFull),
(EDQUOT, QuotaExceeded),
(EFBIG, FileTooLarge),
(EROFS, ReadOnlyFilesystem),
(EXDEV, CrossesDevices),
(EMLINK, TooManyLinks),
(EMFILE, TooManyOpenFiles),
(ENFILE, TooManyOpenFiles),
(EBUSY, ResourceBusy),
(EDEADLK, Deadlock),
(ESPIPE, NotSeekable),
(ETXTBSY, ExecutableFileBusy),
(ECONNREFUSED, ConnectionRefused),
(ECONNRESET, ConnectionReset),
(ECONNABORTED, ConnectionAborted),
(ENOTCONN, NotConnected),
(EISCONN, AlreadyConnected),
(EADDRINUSE, AddrInUse),
(EADDRNOTAVAIL, AddrNotAvailable),
(ENETDOWN, NetworkDown),
(ENETUNREACH, NetworkUnreachable),
(EHOSTUNREACH, HostUnreachable),
(EMSGSIZE, MessageTooLong),
(ESRCH, NoSuchProcess),
(ECANCELED, Canceled),
]
};