Skip to content

Commit 07a80aa

Browse files
authored
Deprecate rustix::net::SendFlags::EOT and add EOR. (bytecodealliance#1054)
* Deprecate `rustix::net::SendFlags::EOT` and add `EOR`. In `rustix::net::SendFlags`, deprecate the mis-spelled `EOT` and add the correctly-spelled `EOT`. Fixes bytecodealliance#1053. * Fix the libc backend too.
1 parent 14a88ef commit 07a80aa

File tree

2 files changed

+9
-2
lines changed

2 files changed

+9
-2
lines changed

src/backend/libc/net/send_recv.rs

+5-1
Original file line numberDiff line numberDiff line change
@@ -27,9 +27,13 @@ bitflags! {
2727
/// `MSG_DONTWAIT`
2828
#[cfg(not(windows))]
2929
const DONTWAIT = bitcast!(c::MSG_DONTWAIT);
30-
/// `MSG_EOR`
30+
/// Deprecated alias for [`EOR`].
3131
#[cfg(not(windows))]
32+
#[deprecated(note = "`rustix::net::SendFlags::EOT` is renamed to `rustix::net::SendFlags::EOR`.")]
3233
const EOT = bitcast!(c::MSG_EOR);
34+
/// `MSG_EOR`
35+
#[cfg(not(windows))]
36+
const EOR = bitcast!(c::MSG_EOR);
3337
/// `MSG_MORE`
3438
#[cfg(not(any(
3539
bsd,

src/backend/linux_raw/net/send_recv.rs

+4-1
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,11 @@ bitflags! {
1616
const DONTROUTE = c::MSG_DONTROUTE;
1717
/// `MSG_DONTWAIT`
1818
const DONTWAIT = c::MSG_DONTWAIT;
19-
/// `MSG_EOT`
19+
/// Deprecated alias for [`EOR`].
20+
#[deprecated(note = "`rustix::net::SendFlags::EOT` is renamed to `rustix::net::SendFlags::EOR`.")]
2021
const EOT = c::MSG_EOR;
22+
/// `MSG_EOR`
23+
const EOR = c::MSG_EOR;
2124
/// `MSG_MORE`
2225
const MORE = c::MSG_MORE;
2326
/// `MSG_NOSIGNAL`

0 commit comments

Comments
 (0)