Auto merge of #395 - lemonrock:windows_posix_errors, r=alexcrichton
Adding POSIX 'E' error code constants for Windows Believe it or not, Windows actually defines a few POSIX 'E' error codes (eg EINVAL). By adding them to libc, the Windows bindings for things like `read()` become useful.
This commit is contained in:
commit
a49950c179
@ -105,6 +105,47 @@ pub const LC_MONETARY: ::c_int = 3;
|
|||||||
pub const LC_NUMERIC: ::c_int = 4;
|
pub const LC_NUMERIC: ::c_int = 4;
|
||||||
pub const LC_TIME: ::c_int = 5;
|
pub const LC_TIME: ::c_int = 5;
|
||||||
|
|
||||||
|
pub const EPERM: ::c_int = 1;
|
||||||
|
pub const ENOENT: ::c_int = 2;
|
||||||
|
pub const ESRCH: ::c_int = 3;
|
||||||
|
pub const EINTR: ::c_int = 4;
|
||||||
|
pub const EIO: ::c_int = 5;
|
||||||
|
pub const ENXIO: ::c_int = 6;
|
||||||
|
pub const E2BIG: ::c_int = 7;
|
||||||
|
pub const ENOEXEC: ::c_int = 8;
|
||||||
|
pub const EBADF: ::c_int = 9;
|
||||||
|
pub const ECHILD: ::c_int = 10;
|
||||||
|
pub const EAGAIN: ::c_int = 11;
|
||||||
|
pub const ENOMEM: ::c_int = 12;
|
||||||
|
pub const EACCES: ::c_int = 13;
|
||||||
|
pub const EFAULT: ::c_int = 14;
|
||||||
|
pub const EBUSY: ::c_int = 16;
|
||||||
|
pub const EEXIST: ::c_int = 17;
|
||||||
|
pub const EXDEV: ::c_int = 18;
|
||||||
|
pub const ENODEV: ::c_int = 19;
|
||||||
|
pub const ENOTDIR: ::c_int = 20;
|
||||||
|
pub const EISDIR: ::c_int = 21;
|
||||||
|
pub const EINVAL: ::c_int = 22;
|
||||||
|
pub const ENFILE: ::c_int = 23;
|
||||||
|
pub const EMFILE: ::c_int = 24;
|
||||||
|
pub const ENOTTY: ::c_int = 25;
|
||||||
|
pub const EFBIG: ::c_int = 27;
|
||||||
|
pub const ENOSPC: ::c_int = 28;
|
||||||
|
pub const ESPIPE: ::c_int = 29;
|
||||||
|
pub const EROFS: ::c_int = 30;
|
||||||
|
pub const EMLINK: ::c_int = 31;
|
||||||
|
pub const EPIPE: ::c_int = 32;
|
||||||
|
pub const EDOM: ::c_int = 33;
|
||||||
|
pub const ERANGE: ::c_int = 34;
|
||||||
|
pub const EDEADLK: ::c_int = 36;
|
||||||
|
pub const EDEADLOCK: ::c_int = 36;
|
||||||
|
pub const ENAMETOOLONG: ::c_int = 38;
|
||||||
|
pub const ENOLCK: ::c_int = 39;
|
||||||
|
pub const ENOSYS: ::c_int = 40;
|
||||||
|
pub const ENOTEMPTY: ::c_int = 41;
|
||||||
|
pub const EILSEQ: ::c_int = 42;
|
||||||
|
pub const STRUNCATE: ::c_int = 80;
|
||||||
|
|
||||||
#[cfg(target_env = "msvc")] // " if " -- appease style checker
|
#[cfg(target_env = "msvc")] // " if " -- appease style checker
|
||||||
#[link(name = "msvcrt")]
|
#[link(name = "msvcrt")]
|
||||||
extern {}
|
extern {}
|
||||||
|
Loading…
Reference in New Issue
Block a user