Skip to main content

error_code/
defs.rs

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