Skip to content

Commit a74b588

Browse files
committed
Deprecate AF_MAX and PF_MAX
1 parent 48193e8 commit a74b588

File tree

26 files changed

+262
-8
lines changed

26 files changed

+262
-8
lines changed

libc-test/test/linux_elf.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ use libc::*;
77
include!(concat!(env!("OUT_DIR"), "/linux_elf.rs"));
88

99
#[cfg(not(target_os = "linux"))]
10-
fn main() { println!("PASSED 0 tests"); }
10+
fn main() {
11+
println!("PASSED 0 tests");
12+
}

libc-test/test/linux_fcntl.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ use libc::*;
77
include!(concat!(env!("OUT_DIR"), "/linux_fcntl.rs"));
88

99
#[cfg(not(any(target_os = "linux", target_os = "android")))]
10-
fn main() { println!("PASSED 0 tests"); }
10+
fn main() {
11+
println!("PASSED 0 tests");
12+
}

libc-test/test/linux_ipv6.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ use libc::*;
77
include!(concat!(env!("OUT_DIR"), "/linux_ipv6.rs"));
88

99
#[cfg(not(target_os = "linux"))]
10-
fn main() { println!("PASSED 0 tests"); }
10+
fn main() {
11+
println!("PASSED 0 tests");
12+
}

libc-test/test/linux_strerror_r.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ use libc::*;
77
include!(concat!(env!("OUT_DIR"), "/linux_strerror_r.rs"));
88

99
#[cfg(not(any(target_os = "linux", target_os = "android")))]
10-
fn main() { println!("PASSED 0 tests"); }
10+
fn main() {
11+
println!("PASSED 0 tests");
12+
}

libc-test/test/linux_termios.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,4 +7,6 @@ use libc::*;
77
include!(concat!(env!("OUT_DIR"), "/linux_termios.rs"));
88

99
#[cfg(not(any(target_os = "linux", target_os = "android")))]
10-
fn main() { println!("PASSED 0 tests"); }
10+
fn main() {
11+
println!("PASSED 0 tests");
12+
}

src/fuchsia/aarch64.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,19 @@ pub const MINSIGSTKSZ: ::size_t = 6144;
6666
pub const SIGSTKSZ: ::size_t = 12288;
6767

6868
#[doc(hidden)]
69+
#[deprecated(
70+
since = "0.2.55",
71+
note = "If you are using this report to: \
72+
https://github.com/rust-lang/libc/issues/665"
73+
)]
6974
pub const PF_MAX: ::c_int = 43;
7075
#[doc(hidden)]
76+
#[deprecated(
77+
since = "0.2.55",
78+
note = "If you are using this report to: \
79+
https://github.com/rust-lang/libc/issues/665"
80+
)]
81+
#[allow(deprecated)]
7182
pub const AF_MAX: ::c_int = PF_MAX;
7283

7384
pub const SYS_io_setup: ::c_long = 0;

src/fuchsia/x86_64.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -486,6 +486,17 @@ pub const SIGSTKSZ: ::size_t = 8192;
486486
pub const MINSIGSTKSZ: ::size_t = 2048;
487487

488488
#[doc(hidden)]
489+
#[deprecated(
490+
since = "0.2.55",
491+
note = "If you are using this report to: \
492+
https://github.com/rust-lang/libc/issues/665"
493+
)]
489494
pub const AF_MAX: ::c_int = 42;
490495
#[doc(hidden)]
496+
#[deprecated(
497+
since = "0.2.55",
498+
note = "If you are using this report to: \
499+
https://github.com/rust-lang/libc/issues/665"
500+
)]
501+
#[allow(deprecated)]
491502
pub const PF_MAX: ::c_int = AF_MAX;

src/unix/bsd/apple/mod.rs

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2083,6 +2083,11 @@ pub const AF_NETBIOS: ::c_int = 33;
20832083
pub const AF_PPP: ::c_int = 34;
20842084
pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
20852085
#[doc(hidden)]
2086+
#[deprecated(
2087+
since = "0.2.55",
2088+
note = "If you are using this report to: \
2089+
https://github.com/rust-lang/libc/issues/665"
2090+
)]
20862091
pub const AF_MAX: ::c_int = 40;
20872092
pub const AF_SYS_CONTROL: ::c_int = 2;
20882093

@@ -2125,11 +2130,21 @@ pub const PF_SYSTEM: ::c_int = AF_SYSTEM;
21252130
pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
21262131
pub const PF_PPP: ::c_int = AF_PPP;
21272132
#[doc(hidden)]
2128-
#[deprecated(since = "0.2.55")]
2133+
#[deprecated(
2134+
since = "0.2.55",
2135+
note = "If you are using this report to: \
2136+
https://github.com/rust-lang/libc/issues/665"
2137+
)]
2138+
#[allow(deprecated)]
21292139
pub const PF_MAX: ::c_int = AF_MAX;
21302140

21312141
#[doc(hidden)]
2132-
#[deprecated(since = "0.2.55")]
2142+
#[deprecated(
2143+
since = "0.2.55",
2144+
note = "If you are using this report to: \
2145+
https://github.com/rust-lang/libc/issues/665"
2146+
)]
2147+
#[allow(deprecated)]
21332148
pub const NET_MAXID: ::c_int = AF_MAX;
21342149

21352150
pub const NET_RT_DUMP: ::c_int = 1;

src/unix/bsd/freebsdlike/dragonfly/mod.rs

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -891,9 +891,22 @@ pub const TCP_FASTKEEP: ::c_int = 128;
891891
pub const AF_BLUETOOTH: ::c_int = 33;
892892
pub const AF_MPLS: ::c_int = 34;
893893
pub const AF_IEEE80211: ::c_int = 35;
894+
#[doc(hidden)]
895+
#[deprecated(
896+
since = "0.2.55",
897+
note = "If you are using this report to: \
898+
https://github.com/rust-lang/libc/issues/665"
899+
)]
894900
pub const AF_MAX: ::c_int = 36;
895901

896902
pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
903+
#[doc(hidden)]
904+
#[deprecated(
905+
since = "0.2.55",
906+
note = "If you are using this report to: \
907+
https://github.com/rust-lang/libc/issues/665"
908+
)]
909+
#[allow(deprecated)]
897910
pub const PF_MAX: ::c_int = AF_MAX;
898911

899912
pub const NET_RT_DUMP: ::c_int = 1;
@@ -904,6 +917,12 @@ pub const NET_RT_MAXID: ::c_int = 4;
904917
pub const SOMAXOPT_SIZE: ::c_int = 65536;
905918

906919
#[doc(hidden)]
920+
#[deprecated(
921+
since = "0.2.55",
922+
note = "If you are using this report to: \
923+
https://github.com/rust-lang/libc/issues/665"
924+
)]
925+
#[allow(deprecated)]
907926
pub const NET_MAXID: ::c_int = AF_MAX;
908927

909928
pub const MSG_UNUSED09: ::c_int = 0x00000200;

src/unix/bsd/freebsdlike/freebsd/mod.rs

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -625,6 +625,11 @@ pub const AF_IEEE80211: ::c_int = 37;
625625
pub const AF_INET_SDP: ::c_int = 40;
626626
pub const AF_INET6_SDP: ::c_int = 42;
627627
#[doc(hidden)]
628+
#[deprecated(
629+
since = "0.2.55",
630+
note = "If you are using this report to: \
631+
https://github.com/rust-lang/libc/issues/665"
632+
)]
628633
pub const AF_MAX: ::c_int = 42;
629634

630635
// https://github.com/freebsd/freebsd/blob/master/sys/net/if.h#L140
@@ -636,7 +641,6 @@ pub const IFF_POINTOPOINT: ::c_int = 0x10; // (i) is a point-to-point link
636641
// 0x20 was IFF_SMART
637642
pub const IFF_RUNNING: ::c_int = 0x40; // (d) resources allocated
638643
#[doc(hidden)]
639-
#[doc(hidden)]
640644
#[deprecated(
641645
since="0.2.54",
642646
note="IFF_DRV_RUNNING is deprecated. Use the portable IFF_RUNNING instead"
@@ -934,6 +938,12 @@ pub const PF_IEEE80211: ::c_int = AF_IEEE80211;
934938
pub const PF_INET_SDP: ::c_int = AF_INET_SDP;
935939
pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP;
936940
#[doc(hidden)]
941+
#[deprecated(
942+
since = "0.2.55",
943+
note = "If you are using this report to: \
944+
https://github.com/rust-lang/libc/issues/665"
945+
)]
946+
#[allow(deprecated)]
937947
pub const PF_MAX: ::c_int = AF_MAX;
938948

939949
pub const NET_RT_DUMP: ::c_int = 1;
@@ -971,6 +981,7 @@ pub const SHM_ANON: *mut ::c_char = 1 as *mut ::c_char;
971981
// compatibility only, and are scheduled to be removed in libc 1.0.0.
972982
#[doc(hidden)]
973983
#[deprecated(since="0.2.54",note="Removed in FreeBSD 11")]
984+
#[allow(deprecated)]
974985
pub const NET_MAXID: ::c_int = AF_MAX;
975986
#[doc(hidden)]
976987
#[deprecated(since="0.2.54",note="Removed in FreeBSD 11")]

0 commit comments

Comments
 (0)