Skip to content

Commit 1a78595

Browse files
bors[bot]asomers
andauthored
Merge #1467
1467: Add more errno definitions for better backwards compat with 0.21.0 r=asomers a=asomers Fixes #1464 Co-authored-by: Alan Somers <[email protected]>
2 parents eac4b65 + 459b385 commit 1a78595

File tree

2 files changed

+118
-0
lines changed

2 files changed

+118
-0
lines changed

CHANGELOG.md

+5
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ This project adheres to [Semantic Versioning](https://semver.org/).
1111
(#[1464](https://github.com/nix-rust/nix/pull/1464))
1212

1313
### Fixed
14+
15+
- Added more errno definitions for better backwards compatibility with
16+
Nix 0.21.0.
17+
(#[1467](https://github.com/nix-rust/nix/pull/1467))
18+
1419
### Removed
1520

1621
## [0.22.0] - 9 July 2021

src/errno.rs

+113
Original file line numberDiff line numberDiff line change
@@ -905,6 +905,22 @@ mod consts {
905905
EHWPOISON = libc::EHWPOISON,
906906
}
907907

908+
#[deprecated(
909+
since = "0.22.1",
910+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
911+
)]
912+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
913+
#[deprecated(
914+
since = "0.22.1",
915+
note = "use nix::errno::Errno::EDEADLOCK instead"
916+
)]
917+
pub const EDEADLOCK: Errno = Errno::EDEADLK;
918+
#[deprecated(
919+
since = "0.22.1",
920+
note = "use nix::errno::Errno::ENOTSUP instead"
921+
)]
922+
pub const ENOTSUP: Errno = Errno::EOPNOTSUPP;
923+
908924
impl Errno {
909925
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
910926
pub const EDEADLOCK: Errno = Errno::EDEADLK;
@@ -1167,6 +1183,22 @@ mod consts {
11671183
EQFULL = libc::EQFULL,
11681184
}
11691185

1186+
#[deprecated(
1187+
since = "0.22.1",
1188+
note = "use nix::errno::Errno::ELAST instead"
1189+
)]
1190+
pub const ELAST: Errno = Errno::EQFULL;
1191+
#[deprecated(
1192+
since = "0.22.1",
1193+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
1194+
)]
1195+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
1196+
#[deprecated(
1197+
since = "0.22.1",
1198+
note = "use nix::errno::Errno::EDEADLOCK instead"
1199+
)]
1200+
pub const EDEADLOCK: Errno = Errno::EDEADLK;
1201+
11701202
impl Errno {
11711203
pub const ELAST: Errno = Errno::EQFULL;
11721204
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
@@ -1392,6 +1424,27 @@ mod consts {
13921424
EOWNERDEAD = libc::EOWNERDEAD,
13931425
}
13941426

1427+
#[deprecated(
1428+
since = "0.22.1",
1429+
note = "use nix::errno::Errno::ELAST instead"
1430+
)]
1431+
pub const ELAST: Errno = Errno::EOWNERDEAD;
1432+
#[deprecated(
1433+
since = "0.22.1",
1434+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
1435+
)]
1436+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
1437+
#[deprecated(
1438+
since = "0.22.1",
1439+
note = "use nix::errno::Errno::EDEADLOCK instead"
1440+
)]
1441+
pub const EDEADLOCK: Errno = Errno::EDEADLK;
1442+
#[deprecated(
1443+
since = "0.22.1",
1444+
note = "use nix::errno::Errno::EOPNOTSUPP instead"
1445+
)]
1446+
pub const EOPNOTSUPP: Errno = Errno::ENOTSUP;
1447+
13951448
impl Errno {
13961449
pub const ELAST: Errno = Errno::EOWNERDEAD;
13971450
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
@@ -1607,6 +1660,27 @@ mod consts {
16071660
EASYNC = libc::EASYNC,
16081661
}
16091662

1663+
#[deprecated(
1664+
since = "0.22.1",
1665+
note = "use nix::errno::Errno::ELAST instead"
1666+
)]
1667+
pub const ELAST: Errno = Errno::EASYNC;
1668+
#[deprecated(
1669+
since = "0.22.1",
1670+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
1671+
)]
1672+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
1673+
#[deprecated(
1674+
since = "0.22.1",
1675+
note = "use nix::errno::Errno::EDEADLOCK instead"
1676+
)]
1677+
pub const EDEADLOCK: Errno = Errno::EDEADLK;
1678+
#[deprecated(
1679+
since = "0.22.1",
1680+
note = "use nix::errno::Errno::EOPNOTSUPP instead"
1681+
)]
1682+
pub const EOPNOTSUPP: Errno = Errno::ENOTSUP;
1683+
16101684
impl Errno {
16111685
pub const ELAST: Errno = Errno::EASYNC;
16121686
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
@@ -1821,6 +1895,17 @@ mod consts {
18211895
EPROTO = libc::EPROTO,
18221896
}
18231897

1898+
#[deprecated(
1899+
since = "0.22.1",
1900+
note = "use nix::errno::Errno::ELAST instead"
1901+
)]
1902+
pub const ELAST: Errno = Errno::ENOTSUP;
1903+
#[deprecated(
1904+
since = "0.22.1",
1905+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
1906+
)]
1907+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
1908+
18241909
impl Errno {
18251910
pub const ELAST: Errno = Errno::ENOTSUP;
18261911
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
@@ -2034,6 +2119,17 @@ mod consts {
20342119
EPROTO = libc::EPROTO,
20352120
}
20362121

2122+
#[deprecated(
2123+
since = "0.22.1",
2124+
note = "use nix::errno::Errno::ELAST instead"
2125+
)]
2126+
pub const ELAST: Errno = Errno::ENOTSUP;
2127+
#[deprecated(
2128+
since = "0.22.1",
2129+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
2130+
)]
2131+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
2132+
20372133
impl Errno {
20382134
pub const ELAST: Errno = Errno::ENOTSUP;
20392135
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
@@ -2237,6 +2333,12 @@ mod consts {
22372333
EPROTO = libc::EPROTO,
22382334
}
22392335

2336+
#[deprecated(
2337+
since = "0.22.1",
2338+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
2339+
)]
2340+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
2341+
22402342
impl Errno {
22412343
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
22422344
}
@@ -2464,6 +2566,17 @@ mod consts {
24642566
ESTALE = libc::ESTALE,
24652567
}
24662568

2569+
#[deprecated(
2570+
since = "0.22.1",
2571+
note = "use nix::errno::Errno::ELAST instead"
2572+
)]
2573+
pub const ELAST: Errno = Errno::ELAST;
2574+
#[deprecated(
2575+
since = "0.22.1",
2576+
note = "use nix::errno::Errno::EWOULDBLOCK instead"
2577+
)]
2578+
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;
2579+
24672580
impl Errno {
24682581
pub const ELAST: Errno = Errno::ESTALE;
24692582
pub const EWOULDBLOCK: Errno = Errno::EAGAIN;

0 commit comments

Comments
 (0)