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

+1-6
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

-16
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

-16
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

-24
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

-24
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

-19
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

-25
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

-24
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

-7
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

-16
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;

src/unix/linux_like/emscripten/mod.rs

-15
Original file line numberDiff line numberDiff line change
@@ -921,25 +921,10 @@ pub const AF_IB: ::c_int = 27;
921921
pub const AF_MPLS: ::c_int = 28;
922922
pub const AF_NFC: ::c_int = 39;
923923
pub const AF_VSOCK: ::c_int = 40;
924-
#[doc(hidden)]
925-
#[deprecated(
926-
since = "0.2.55",
927-
note = "If you are using this report to: \
928-
https://github.com/rust-lang/libc/issues/665"
929-
)]
930-
pub const AF_MAX: ::c_int = 42;
931924
pub const PF_IB: ::c_int = AF_IB;
932925
pub const PF_MPLS: ::c_int = AF_MPLS;
933926
pub const PF_NFC: ::c_int = AF_NFC;
934927
pub const PF_VSOCK: ::c_int = AF_VSOCK;
935-
#[doc(hidden)]
936-
#[allow(deprecated)]
937-
#[deprecated(
938-
since = "0.2.55",
939-
note = "If you are using this report to: \
940-
https://github.com/rust-lang/libc/issues/665"
941-
)]
942-
pub const PF_MAX: ::c_int = AF_MAX;
943928

944929
// System V IPC
945930
pub const IPC_PRIVATE: ::key_t = 0;

src/unix/linux_like/linux/gnu/mod.rs

-16
Original file line numberDiff line numberDiff line change
@@ -874,22 +874,6 @@ pub const M_PERTURB: ::c_int = -6;
874874
pub const M_ARENA_TEST: ::c_int = -7;
875875
pub const M_ARENA_MAX: ::c_int = -8;
876876

877-
#[doc(hidden)]
878-
#[deprecated(
879-
since = "0.2.55",
880-
note = "If you are using this report to: \
881-
https://github.com/rust-lang/libc/issues/665"
882-
)]
883-
pub const AF_MAX: ::c_int = 45;
884-
#[doc(hidden)]
885-
#[deprecated(
886-
since = "0.2.55",
887-
note = "If you are using this report to: \
888-
https://github.com/rust-lang/libc/issues/665"
889-
)]
890-
#[allow(deprecated)]
891-
pub const PF_MAX: ::c_int = AF_MAX;
892-
893877
pub const AT_STATX_SYNC_TYPE: ::c_int = 0x6000;
894878
pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0x0000;
895879
pub const AT_STATX_FORCE_SYNC: ::c_int = 0x2000;

src/unix/linux_like/linux/musl/b32/arm.rs

-16
Original file line numberDiff line numberDiff line change
@@ -828,22 +828,6 @@ pub const SYS_pkey_mprotect: ::c_long = 394;
828828
pub const SYS_pkey_alloc: ::c_long = 395;
829829
pub const SYS_pkey_free: ::c_long = 396;
830830

831-
#[doc(hidden)]
832-
#[deprecated(
833-
since = "0.2.55",
834-
note = "If you are using this report to: \
835-
https://github.com/rust-lang/libc/issues/665"
836-
)]
837-
pub const AF_MAX: ::c_int = 45;
838-
#[doc(hidden)]
839-
#[allow(deprecated)]
840-
#[deprecated(
841-
since = "0.2.55",
842-
note = "If you are using this report to: \
843-
https://github.com/rust-lang/libc/issues/665"
844-
)]
845-
pub const PF_MAX: ::c_int = AF_MAX;
846-
847831
extern {
848832
pub fn getrandom(
849833
buf: *mut ::c_void,

src/unix/linux_like/linux/musl/b32/mips.rs

-16
Original file line numberDiff line numberDiff line change
@@ -836,19 +836,3 @@ pub const SYS_mlock2: ::c_long = 4000 + 359;
836836
pub const SYS_copy_file_range: ::c_long = 4000 + 360;
837837
pub const SYS_preadv2: ::c_long = 4000 + 361;
838838
pub const SYS_pwritev2: ::c_long = 4000 + 362;
839-
840-
#[doc(hidden)]
841-
#[deprecated(
842-
since = "0.2.55",
843-
note = "If you are using this report to: \
844-
https://github.com/rust-lang/libc/issues/665"
845-
)]
846-
pub const AF_MAX: ::c_int = 42;
847-
#[doc(hidden)]
848-
#[deprecated(
849-
since = "0.2.55",
850-
note = "If you are using this report to: \
851-
https://github.com/rust-lang/libc/issues/665"
852-
)]
853-
#[allow(deprecated)]
854-
pub const PF_MAX: ::c_int = AF_MAX;

0 commit comments

Comments
 (0)