Skip to content

Commit e75ba40

Browse files
committed
Auto merge of #1375 - gnzlbg:deprecate_af_max, r=gnzlbg
Deprecate AF_MAX and PF_MAX
2 parents 08d4488 + dddb9fb commit e75ba40

File tree

21 files changed

+246
-3
lines changed

21 files changed

+246
-3
lines changed

src/fuchsia/aarch64.rs

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,18 @@ 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+
)]
7181
pub const AF_MAX: ::c_int = PF_MAX;
7282

7383
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")]

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

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -853,8 +853,21 @@ pub const AF_BLUETOOTH: ::c_int = 31;
853853
pub const AF_IEEE80211: ::c_int = 32;
854854
pub const AF_MPLS: ::c_int = 33;
855855
pub const AF_ROUTE: ::c_int = 34;
856+
#[doc(hidden)]
857+
#[deprecated(
858+
since = "0.2.55",
859+
note = "If you are using this report to: \
860+
https://github.com/rust-lang/libc/issues/665"
861+
)]
856862
pub const AF_MAX: ::c_int = 36;
857863

864+
#[doc(hidden)]
865+
#[deprecated(
866+
since = "0.2.55",
867+
note = "If you are using this report to: \
868+
https://github.com/rust-lang/libc/issues/665"
869+
)]
870+
#[allow(deprecated)]
858871
pub const NET_MAXID: ::c_int = AF_MAX;
859872
pub const NET_RT_DUMP: ::c_int = 1;
860873
pub const NET_RT_FLAGS: ::c_int = 2;
@@ -870,6 +883,14 @@ pub const PF_KEY: ::c_int = pseudo_AF_KEY;
870883
pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
871884
pub const PF_MPLS: ::c_int = AF_MPLS;
872885
pub const PF_ROUTE: ::c_int = AF_ROUTE;
886+
887+
#[doc(hidden)]
888+
#[deprecated(
889+
since = "0.2.55",
890+
note = "If you are using this report to: \
891+
https://github.com/rust-lang/libc/issues/665"
892+
)]
893+
#[allow(deprecated)]
873894
pub const PF_MAX: ::c_int = AF_MAX;
874895

875896
pub const MSG_NBIO: ::c_int = 0x1000;

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

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -835,9 +835,20 @@ 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;
837837
#[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+
)]
838843
pub const AF_MAX: ::c_int = 36;
839844

840845
#[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+
)]
841852
pub const NET_MAXID: ::c_int = AF_MAX;
842853
pub const NET_RT_DUMP: ::c_int = 1;
843854
pub const NET_RT_FLAGS: ::c_int = 2;
@@ -862,6 +873,12 @@ pub const PF_MPLS: ::c_int = AF_MPLS;
862873
pub const PF_PFLOW: ::c_int = pseudo_AF_PFLOW;
863874
pub const PF_PIPEX: ::c_int = pseudo_AF_PIPEX;
864875
#[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+
)]
865882
pub const PF_MAX: ::c_int = AF_MAX;
866883

867884
pub const SCM_TIMESTAMP: ::c_int = 0x04;

src/unix/haiku/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -770,6 +770,12 @@ pub const AF_NOTIFY: ::c_int = 8;
770770
pub const AF_LOCAL: ::c_int = 9;
771771
pub const AF_UNIX: ::c_int = AF_LOCAL;
772772
pub const AF_BLUETOOTH: ::c_int = 10;
773+
#[doc(hidden)]
774+
#[deprecated(
775+
since = "0.2.55",
776+
note = "If you are using this report to: \
777+
https://github.com/rust-lang/libc/issues/665"
778+
)]
773779
pub const AF_MAX: ::c_int = 11;
774780

775781
pub const IP_OPTIONS: ::c_int = 1;

src/unix/notbsd/android/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -952,8 +952,19 @@ pub const SOL_NETROM: ::c_int = 259;
952952
pub const SOL_ROSE: ::c_int = 260;
953953

954954
#[doc(hidden)]
955+
#[deprecated(
956+
since = "0.2.55",
957+
note = "If you are using this report to: \
958+
https://github.com/rust-lang/libc/issues/665"
959+
)]
955960
pub const AF_MAX: ::c_int = 43;
956961
#[doc(hidden)]
962+
#[deprecated(
963+
since = "0.2.55",
964+
note = "If you are using this report to: \
965+
https://github.com/rust-lang/libc/issues/665"
966+
)]
967+
#[allow(deprecated)]
957968
pub const PF_MAX: ::c_int = AF_MAX;
958969

959970
/* DCCP socket options */

src/unix/notbsd/emscripten/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -922,12 +922,23 @@ pub const AF_MPLS: ::c_int = 28;
922922
pub const AF_NFC: ::c_int = 39;
923923
pub const AF_VSOCK: ::c_int = 40;
924924
#[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+
)]
925930
pub const AF_MAX: ::c_int = 42;
926931
pub const PF_IB: ::c_int = AF_IB;
927932
pub const PF_MPLS: ::c_int = AF_MPLS;
928933
pub const PF_NFC: ::c_int = AF_NFC;
929934
pub const PF_VSOCK: ::c_int = AF_VSOCK;
930935
#[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+
)]
931942
pub const PF_MAX: ::c_int = AF_MAX;
932943

933944
// System V IPC

src/unix/notbsd/linux/mips/mod.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -895,8 +895,19 @@ pub const NFT_NG_INCREMENTAL: ::c_int = 0;
895895
pub const NFT_NG_RANDOM: ::c_int = 1;
896896

897897
#[doc(hidden)]
898+
#[deprecated(
899+
since = "0.2.55",
900+
note = "If you are using this report to: \
901+
https://github.com/rust-lang/libc/issues/665"
902+
)]
898903
pub const AF_MAX: ::c_int = 45;
899904
#[doc(hidden)]
905+
#[deprecated(
906+
since = "0.2.55",
907+
note = "If you are using this report to: \
908+
https://github.com/rust-lang/libc/issues/665"
909+
)]
910+
#[allow(deprecated)]
900911
pub const PF_MAX: ::c_int = AF_MAX;
901912

902913
f! {

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -828,6 +828,17 @@ pub const SYS_pkey_alloc: ::c_long = 395;
828828
pub const SYS_pkey_free: ::c_long = 396;
829829

830830
#[doc(hidden)]
831+
#[deprecated(
832+
since = "0.2.55",
833+
note = "If you are using this report to: \
834+
https://github.com/rust-lang/libc/issues/665"
835+
)]
831836
pub const AF_MAX: ::c_int = 45;
832837
#[doc(hidden)]
838+
#[allow(deprecated)]
839+
#[deprecated(
840+
since = "0.2.55",
841+
note = "If you are using this report to: \
842+
https://github.com/rust-lang/libc/issues/665"
843+
)]
833844
pub const PF_MAX: ::c_int = AF_MAX;

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

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -837,6 +837,17 @@ pub const SYS_preadv2: ::c_long = 4000 + 361;
837837
pub const SYS_pwritev2: ::c_long = 4000 + 362;
838838

839839
#[doc(hidden)]
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+
)]
840845
pub const AF_MAX: ::c_int = 42;
841846
#[doc(hidden)]
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+
#[allow(deprecated)]
842853
pub const PF_MAX: ::c_int = AF_MAX;

src/unix/notbsd/linux/musl/b32/powerpc.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -854,6 +854,17 @@ pub const SYS_pkey_free: ::c_long = 385;
854854
pub const SYS_pkey_mprotect: ::c_long = 386;
855855

856856
#[doc(hidden)]
857+
#[deprecated(
858+
since = "0.2.55",
859+
note = "If you are using this report to: \
860+
https://github.com/rust-lang/libc/issues/665"
861+
)]
857862
pub const AF_MAX: ::c_int = 43;
858863
#[doc(hidden)]
864+
#[allow(deprecated)]
865+
#[deprecated(
866+
since = "0.2.55",
867+
note = "If you are using this report to: \
868+
https://github.com/rust-lang/libc/issues/665"
869+
)]
859870
pub const PF_MAX: ::c_int = AF_MAX;

src/unix/notbsd/linux/musl/b32/x86.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -936,6 +936,17 @@ pub const UESP: ::c_int = 15;
936936
pub const SS: ::c_int = 16;
937937

938938
#[doc(hidden)]
939+
#[deprecated(
940+
since = "0.2.55",
941+
note = "If you are using this report to: \
942+
https://github.com/rust-lang/libc/issues/665"
943+
)]
939944
pub const AF_MAX: ::c_int = 45;
940945
#[doc(hidden)]
946+
#[allow(deprecated)]
947+
#[deprecated(
948+
since = "0.2.55",
949+
note = "If you are using this report to: \
950+
https://github.com/rust-lang/libc/issues/665"
951+
)]
941952
pub const PF_MAX: ::c_int = AF_MAX;

src/unix/notbsd/linux/musl/b64/aarch64.rs

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

7373
#[doc(hidden)]
74+
#[deprecated(
75+
since = "0.2.55",
76+
note = "If you are using this report to: \
77+
https://github.com/rust-lang/libc/issues/665"
78+
)]
7479
pub const PF_MAX: ::c_int = 45;
7580
#[doc(hidden)]
81+
#[deprecated(
82+
since = "0.2.55",
83+
note = "If you are using this report to: \
84+
https://github.com/rust-lang/libc/issues/665"
85+
)]
86+
#[allow(deprecated)]
7687
pub const AF_MAX: ::c_int = PF_MAX;
7788

7889
pub const MADV_SOFT_OFFLINE: ::c_int = 101;

0 commit comments

Comments
 (0)