Skip to content

Commit 789c381

Browse files
committed
Auto merge of #1423 - Susurrus:issue_665, r=gnzlbg
Remove AF_MAX, PF_MAX, NET_MAXID constants These constants have already been deprecated for a few releases with a deprecation notice, so they can finally be removed. Closes #665
2 parents 2b351c2 + 215f095 commit 789c381

File tree

21 files changed

+1
-334
lines changed

21 files changed

+1
-334
lines changed

libc-test/build.rs

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1093,11 +1093,6 @@ fn test_dragonflybsd(target: &str) {
10931093
| "PORT_SOURCE_SIGNAL"
10941094
| "PTHREAD_STACK_MIN" => true,
10951095

1096-
// These change all the time from release to release of linux
1097-
// distros, let's just not bother trying to verify them. They
1098-
// shouldn't be used in code anyway...
1099-
"AF_MAX" | "PF_MAX" => true,
1100-
11011096
_ => false,
11021097
}
11031098
});
@@ -1600,7 +1595,7 @@ fn test_freebsd(target: &str) {
16001595
// These constants were removed in FreeBSD 11 (svn r262489),
16011596
// and they've never had any legitimate use outside of the
16021597
// base system anyway.
1603-
"CTL_MAXID" | "KERN_MAXID" | "HW_MAXID" | "NET_MAXID"
1598+
"CTL_MAXID" | "KERN_MAXID" | "HW_MAXID"
16041599
| "USER_MAXID" => true,
16051600

16061601
_ => false,

src/fuchsia/aarch64.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -64,19 +64,3 @@ s! {
6464

6565
pub const MINSIGSTKSZ: ::size_t = 6144;
6666
pub const SIGSTKSZ: ::size_t = 12288;
67-
68-
#[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-
)]
74-
pub const PF_MAX: ::c_int = 43;
75-
#[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)]
82-
pub const AF_MAX: ::c_int = PF_MAX;

src/fuchsia/x86_64.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -150,19 +150,3 @@ pub const MAP_32BIT: ::c_int = 0x0040;
150150

151151
pub const SIGSTKSZ: ::size_t = 8192;
152152
pub const MINSIGSTKSZ: ::size_t = 2048;
153-
154-
#[doc(hidden)]
155-
#[deprecated(
156-
since = "0.2.55",
157-
note = "If you are using this report to: \
158-
https://github.com/rust-lang/libc/issues/665"
159-
)]
160-
pub const AF_MAX: ::c_int = 42;
161-
#[doc(hidden)]
162-
#[deprecated(
163-
since = "0.2.55",
164-
note = "If you are using this report to: \
165-
https://github.com/rust-lang/libc/issues/665"
166-
)]
167-
#[allow(deprecated)]
168-
pub const PF_MAX: ::c_int = AF_MAX;

src/unix/bsd/apple/mod.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -2110,13 +2110,6 @@ pub const AF_SYSTEM: ::c_int = 32;
21102110
pub const AF_NETBIOS: ::c_int = 33;
21112111
pub const AF_PPP: ::c_int = 34;
21122112
pub const pseudo_AF_HDRCMPLT: ::c_int = 35;
2113-
#[doc(hidden)]
2114-
#[deprecated(
2115-
since = "0.2.55",
2116-
note = "If you are using this report to: \
2117-
https://github.com/rust-lang/libc/issues/665"
2118-
)]
2119-
pub const AF_MAX: ::c_int = 40;
21202113
pub const AF_SYS_CONTROL: ::c_int = 2;
21212114

21222115
pub const SYSPROTO_EVENT: ::c_int = 1;
@@ -2157,23 +2150,6 @@ pub const PF_NATM: ::c_int = AF_NATM;
21572150
pub const PF_SYSTEM: ::c_int = AF_SYSTEM;
21582151
pub const PF_NETBIOS: ::c_int = AF_NETBIOS;
21592152
pub const PF_PPP: ::c_int = AF_PPP;
2160-
#[doc(hidden)]
2161-
#[deprecated(
2162-
since = "0.2.55",
2163-
note = "If you are using this report to: \
2164-
https://github.com/rust-lang/libc/issues/665"
2165-
)]
2166-
#[allow(deprecated)]
2167-
pub const PF_MAX: ::c_int = AF_MAX;
2168-
2169-
#[doc(hidden)]
2170-
#[deprecated(
2171-
since = "0.2.55",
2172-
note = "If you are using this report to: \
2173-
https://github.com/rust-lang/libc/issues/665"
2174-
)]
2175-
#[allow(deprecated)]
2176-
pub const NET_MAXID: ::c_int = AF_MAX;
21772153

21782154
pub const NET_RT_DUMP: ::c_int = 1;
21792155
pub const NET_RT_FLAGS: ::c_int = 2;

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

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -917,23 +917,8 @@ pub const TCP_FASTKEEP: ::c_int = 128;
917917
pub const AF_BLUETOOTH: ::c_int = 33;
918918
pub const AF_MPLS: ::c_int = 34;
919919
pub const AF_IEEE80211: ::c_int = 35;
920-
#[doc(hidden)]
921-
#[deprecated(
922-
since = "0.2.55",
923-
note = "If you are using this report to: \
924-
https://github.com/rust-lang/libc/issues/665"
925-
)]
926-
pub const AF_MAX: ::c_int = 36;
927920

928921
pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
929-
#[doc(hidden)]
930-
#[deprecated(
931-
since = "0.2.55",
932-
note = "If you are using this report to: \
933-
https://github.com/rust-lang/libc/issues/665"
934-
)]
935-
#[allow(deprecated)]
936-
pub const PF_MAX: ::c_int = AF_MAX;
937922

938923
pub const NET_RT_DUMP: ::c_int = 1;
939924
pub const NET_RT_FLAGS: ::c_int = 2;
@@ -942,15 +927,6 @@ pub const NET_RT_MAXID: ::c_int = 4;
942927

943928
pub const SOMAXOPT_SIZE: ::c_int = 65536;
944929

945-
#[doc(hidden)]
946-
#[deprecated(
947-
since = "0.2.55",
948-
note = "If you are using this report to: \
949-
https://github.com/rust-lang/libc/issues/665"
950-
)]
951-
#[allow(deprecated)]
952-
pub const NET_MAXID: ::c_int = AF_MAX;
953-
954930
pub const MSG_UNUSED09: ::c_int = 0x00000200;
955931
pub const MSG_NOSIGNAL: ::c_int = 0x00000400;
956932
pub const MSG_SYNC: ::c_int = 0x00000800;

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

Lines changed: 0 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -646,13 +646,6 @@ pub const AF_BLUETOOTH: ::c_int = 36;
646646
pub const AF_IEEE80211: ::c_int = 37;
647647
pub const AF_INET_SDP: ::c_int = 40;
648648
pub const AF_INET6_SDP: ::c_int = 42;
649-
#[doc(hidden)]
650-
#[deprecated(
651-
since = "0.2.55",
652-
note = "If you are using this report to: \
653-
https://github.com/rust-lang/libc/issues/665"
654-
)]
655-
pub const AF_MAX: ::c_int = 42;
656649

657650
// https://github.com/freebsd/freebsd/blob/master/sys/net/if.h#L140
658651
pub const IFF_UP: ::c_int = 0x1; // (n) interface is up
@@ -959,14 +952,6 @@ pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
959952
pub const PF_IEEE80211: ::c_int = AF_IEEE80211;
960953
pub const PF_INET_SDP: ::c_int = AF_INET_SDP;
961954
pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP;
962-
#[doc(hidden)]
963-
#[deprecated(
964-
since = "0.2.55",
965-
note = "If you are using this report to: \
966-
https://github.com/rust-lang/libc/issues/665"
967-
)]
968-
#[allow(deprecated)]
969-
pub const PF_MAX: ::c_int = AF_MAX;
970955

971956
pub const NET_RT_DUMP: ::c_int = 1;
972957
pub const NET_RT_FLAGS: ::c_int = 2;
@@ -1003,10 +988,6 @@ pub const SHM_ANON: *mut ::c_char = 1 as *mut ::c_char;
1003988
// compatibility only, and are scheduled to be removed in libc 1.0.0.
1004989
#[doc(hidden)]
1005990
#[deprecated(since="0.2.54",note="Removed in FreeBSD 11")]
1006-
#[allow(deprecated)]
1007-
pub const NET_MAXID: ::c_int = AF_MAX;
1008-
#[doc(hidden)]
1009-
#[deprecated(since="0.2.54",note="Removed in FreeBSD 11")]
1010991
pub const CTL_MAXID: ::c_int = 10;
1011992
#[doc(hidden)]
1012993
#[deprecated(since="0.2.54",note="Removed in FreeBSD 11")]

src/unix/bsd/netbsdlike/netbsd/mod.rs

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -883,22 +883,6 @@ pub const AF_BLUETOOTH: ::c_int = 31;
883883
pub const AF_IEEE80211: ::c_int = 32;
884884
pub const AF_MPLS: ::c_int = 33;
885885
pub const AF_ROUTE: ::c_int = 34;
886-
#[doc(hidden)]
887-
#[deprecated(
888-
since = "0.2.55",
889-
note = "If you are using this report to: \
890-
https://github.com/rust-lang/libc/issues/665"
891-
)]
892-
pub const AF_MAX: ::c_int = 36;
893-
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-
)]
900-
#[allow(deprecated)]
901-
pub const NET_MAXID: ::c_int = AF_MAX;
902886
pub const NET_RT_DUMP: ::c_int = 1;
903887
pub const NET_RT_FLAGS: ::c_int = 2;
904888
pub const NET_RT_OOOIFLIST: ::c_int = 3;
@@ -914,15 +898,6 @@ pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
914898
pub const PF_MPLS: ::c_int = AF_MPLS;
915899
pub const PF_ROUTE: ::c_int = AF_ROUTE;
916900

917-
#[doc(hidden)]
918-
#[deprecated(
919-
since = "0.2.55",
920-
note = "If you are using this report to: \
921-
https://github.com/rust-lang/libc/issues/665"
922-
)]
923-
#[allow(deprecated)]
924-
pub const PF_MAX: ::c_int = AF_MAX;
925-
926901
pub const MSG_NBIO: ::c_int = 0x1000;
927902
pub const MSG_WAITFORONE: ::c_int = 0x2000;
928903
pub const MSG_NOTIFICATION: ::c_int = 0x4000;

src/unix/bsd/netbsdlike/openbsd/mod.rs

Lines changed: 0 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -834,22 +834,6 @@ pub const AF_BLUETOOTH: ::c_int = 32;
834834
pub const AF_MPLS: ::c_int = 33;
835835
pub const pseudo_AF_PFLOW: ::c_int = 34;
836836
pub const pseudo_AF_PIPEX: ::c_int = 35;
837-
#[doc(hidden)]
838-
#[deprecated(
839-
since = "0.2.55",
840-
note = "If you are using this report to: \
841-
https://github.com/rust-lang/libc/issues/665"
842-
)]
843-
pub const AF_MAX: ::c_int = 36;
844-
845-
#[doc(hidden)]
846-
#[allow(deprecated)]
847-
#[deprecated(
848-
since = "0.2.55",
849-
note = "If you are using this report to: \
850-
https://github.com/rust-lang/libc/issues/665"
851-
)]
852-
pub const NET_MAXID: ::c_int = AF_MAX;
853837
pub const NET_RT_DUMP: ::c_int = 1;
854838
pub const NET_RT_FLAGS: ::c_int = 2;
855839
pub const NET_RT_IFLIST: ::c_int = 3;
@@ -872,14 +856,6 @@ pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
872856
pub const PF_MPLS: ::c_int = AF_MPLS;
873857
pub const PF_PFLOW: ::c_int = pseudo_AF_PFLOW;
874858
pub const PF_PIPEX: ::c_int = pseudo_AF_PIPEX;
875-
#[doc(hidden)]
876-
#[allow(deprecated)]
877-
#[deprecated(
878-
since = "0.2.55",
879-
note = "If you are using this report to: \
880-
https://github.com/rust-lang/libc/issues/665"
881-
)]
882-
pub const PF_MAX: ::c_int = AF_MAX;
883859

884860
pub const SCM_TIMESTAMP: ::c_int = 0x04;
885861

src/unix/haiku/mod.rs

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -800,13 +800,6 @@ pub const AF_NOTIFY: ::c_int = 8;
800800
pub const AF_LOCAL: ::c_int = 9;
801801
pub const AF_UNIX: ::c_int = AF_LOCAL;
802802
pub const AF_BLUETOOTH: ::c_int = 10;
803-
#[doc(hidden)]
804-
#[deprecated(
805-
since = "0.2.55",
806-
note = "If you are using this report to: \
807-
https://github.com/rust-lang/libc/issues/665"
808-
)]
809-
pub const AF_MAX: ::c_int = 11;
810803

811804
pub const IP_OPTIONS: ::c_int = 1;
812805
pub const IP_HDRINCL: ::c_int = 2;

src/unix/linux_like/android/mod.rs

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -952,22 +952,6 @@ pub const SOL_ATALK: ::c_int = 258;
952952
pub const SOL_NETROM: ::c_int = 259;
953953
pub const SOL_ROSE: ::c_int = 260;
954954

955-
#[doc(hidden)]
956-
#[deprecated(
957-
since = "0.2.55",
958-
note = "If you are using this report to: \
959-
https://github.com/rust-lang/libc/issues/665"
960-
)]
961-
pub const AF_MAX: ::c_int = 43;
962-
#[doc(hidden)]
963-
#[deprecated(
964-
since = "0.2.55",
965-
note = "If you are using this report to: \
966-
https://github.com/rust-lang/libc/issues/665"
967-
)]
968-
#[allow(deprecated)]
969-
pub const PF_MAX: ::c_int = AF_MAX;
970-
971955
/* DCCP socket options */
972956
pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1;
973957
pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2;

0 commit comments

Comments
 (0)