error_code/
defs.rs

1//! Definitions used by this library
2
3#[allow(unused)]
4use crate::types::c_int;
5
6#[cfg(any(target_env = "wasi", target_os = "wasi"))]
7///EAGAIN
8pub const EAGAIN: c_int = 6;
9#[cfg(any(target_env = "wasi", target_os = "wasi"))]
10///EWOULDBLOCK
11pub const EWOULDBLOCK: c_int = EAGAIN;
12
13#[cfg(windows)]
14///EAGAIN
15pub const EAGAIN: c_int = 11;
16#[cfg(windows)]
17///EWOULDBLOCK
18pub const EWOULDBLOCK: c_int = 140;
19
20#[cfg(target_os = "fuchsia")]
21///EAGAIN
22pub const EAGAIN: c_int = 11;
23#[cfg(target_os = "fuchsia")]
24///EWOULDBLOCK
25pub const EWOULDBLOCK: c_int = EAGAIN;
26
27#[cfg(target_os = "solid_asp3")]
28///EAGAIN
29pub const EAGAIN: c_int = 11;
30#[cfg(target_os = "solid_asp3")]
31///EWOULDBLOCK
32pub const EWOULDBLOCK: c_int = EAGAIN;
33
34#[cfg(target_os = "vxworks")]
35///EAGAIN
36pub const EAGAIN: c_int = 11;
37#[cfg(target_os = "vxworks")]
38///EWOULDBLOCK
39pub const EWOULDBLOCK: c_int = 70;
40
41#[cfg(target_os = "teeos")]
42///EAGAIN
43pub const EAGAIN: c_int = 11;
44#[cfg(target_os = "teeos")]
45///EWOULDBLOCK
46pub const EWOULDBLOCK: c_int = EAGAIN;
47
48//---------------------
49//unix
50//---------------------
51#[cfg(
52    any(
53        target_env = "newlib",
54        target_os = "solaris", target_os = "illumos", target_os = "nto",
55        target_os = "aix", target_os = "android", target_os = "linux",
56        target_os = "l4re"
57    )
58)]
59///EAGAIN
60pub const EAGAIN: c_int = 11;
61#[cfg(
62    any(
63        target_os = "solaris", target_os = "illumos", target_os = "nto",
64        target_os = "aix", target_os = "android", target_os = "linux",
65        target_os = "l4re"
66    )
67)]
68///EWOULDBLOCK
69pub const EWOULDBLOCK: c_int = EAGAIN;
70#[cfg(
71    any(
72        target_os = "macos", target_os = "ios", target_os = "tvos",
73        target_os = "watchos", target_os = "freebsd", target_os = "dragonfly",
74        target_os = "openbsd", target_os = "netbsd"
75    )
76)]
77///EAGAIN
78pub const EAGAIN: c_int = 35;
79#[cfg(
80    any(
81        target_os = "macos", target_os = "ios", target_os = "tvos",
82        target_os = "watchos", target_os = "freebsd", target_os = "dragonfly",
83        target_os = "openbsd", target_os = "netbsd"
84    )
85)]
86///EWOULDBLOCK
87pub const EWOULDBLOCK: c_int = EAGAIN;
88
89#[cfg(target_os = "redox")]
90///EAGAIN
91pub const EAGAIN: c_int = 11;
92#[cfg(target_os = "redox")]
93///EWOULDBLOCK
94pub const EWOULDBLOCK: c_int = 41;
95
96#[cfg(target_os = "haiku")]
97///EAGAIN
98pub const EAGAIN: c_int = -2147483637;
99#[cfg(target_os = "haiku")]
100///EWOULDBLOCK
101pub const EWOULDBLOCK: c_int = EAGAIN;
102
103#[cfg(target_os = "emscripten")]
104///EAGAIN
105pub const EAGAIN: c_int = 6;
106#[cfg(target_os = "emscripten")]
107///EWOULDBLOCK
108pub const EWOULDBLOCK: c_int = EAGAIN;