@@ -932,6 +932,12 @@ pub const RTAX_IFP: c_int = 4;
932932pub const RTAX_IFA : c_int = 5 ;
933933pub const RTAX_AUTHOR : c_int = 6 ;
934934pub const RTAX_BRD : c_int = 7 ;
935+ #[ deprecated(
936+ since = "0.2.187" ,
937+ note = "This constant, among others often used in C for the purposes of denoting the latest \
938+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
939+ discussion."
940+ ) ]
935941pub const RTAX_MAX : c_int = 8 ;
936942pub const RTF_UP : c_int = 0x1 ;
937943pub const RTF_GATEWAY : c_int = 0x2 ;
@@ -1445,6 +1451,12 @@ pub const L_GETPROCINFO: c_int = 7;
14451451pub const L_GETXINFO : c_int = 8 ;
14461452
14471453// sys/limits.h
1454+ #[ deprecated(
1455+ since = "0.2.187" ,
1456+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1457+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1458+ discussion."
1459+ ) ]
14481460pub const PATH_MAX : c_int = 1023 ;
14491461pub const PAGESIZE : c_int = 4096 ;
14501462pub const IOV_MAX : c_int = 16 ;
@@ -1454,13 +1466,55 @@ pub const OPEN_MAX: c_int = 65534;
14541466pub const MAX_INPUT : c_int = 512 ;
14551467pub const MAX_CANON : c_int = 256 ;
14561468pub const ARG_MAX : c_int = 1048576 ;
1469+ #[ deprecated(
1470+ since = "0.2.187" ,
1471+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1472+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1473+ discussion."
1474+ ) ]
14571475pub const BC_BASE_MAX : c_int = 99 ;
1476+ #[ deprecated(
1477+ since = "0.2.187" ,
1478+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1479+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1480+ discussion."
1481+ ) ]
14581482pub const BC_DIM_MAX : c_int = 0x800 ;
1483+ #[ deprecated(
1484+ since = "0.2.187" ,
1485+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1486+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1487+ discussion."
1488+ ) ]
14591489pub const BC_SCALE_MAX : c_int = 99 ;
1490+ #[ deprecated(
1491+ since = "0.2.187" ,
1492+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1493+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1494+ discussion."
1495+ ) ]
14601496pub const BC_STRING_MAX : c_int = 0x800 ;
1497+ #[ deprecated(
1498+ since = "0.2.187" ,
1499+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1500+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1501+ discussion."
1502+ ) ]
14611503pub const CHARCLASS_NAME_MAX : c_int = 14 ;
14621504pub const CHILD_MAX : c_int = 128 ;
1505+ #[ deprecated(
1506+ since = "0.2.187" ,
1507+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1508+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1509+ discussion."
1510+ ) ]
14631511pub const COLL_WEIGHTS_MAX : c_int = 4 ;
1512+ #[ deprecated(
1513+ since = "0.2.187" ,
1514+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1515+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1516+ discussion."
1517+ ) ]
14641518pub const EXPR_NEST_MAX : c_int = 32 ;
14651519pub const NZERO : c_int = 20 ;
14661520
@@ -1537,11 +1591,25 @@ pub const SIGSTKSZ: size_t = 4096;
15371591pub const MINSIGSTKSZ : size_t = 1200 ;
15381592
15391593// sys/params.h
1594+ // FIXME(msrv): when we bump past the MSRV where `expect` and the `reason`
1595+ // parameter to that attribute got stabilized, use that to justfiy that this is
1596+ // not meant to be deprecated, but the value it relies on should be deprecated.
1597+ #[ allow( deprecated) ]
15401598pub const MAXPATHLEN : c_int = PATH_MAX + 1 ;
15411599pub const MAXSYMLINKS : c_int = 20 ;
15421600pub const MAXHOSTNAMELEN : c_int = 256 ;
15431601pub const MAXUPRC : c_int = 128 ;
1602+ #[ deprecated(
1603+ since = "0.2.187" ,
1604+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1605+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1606+ discussion."
1607+ ) ]
15441608pub const NGROUPS_MAX : c_ulong = 2048 ;
1609+ // FIXME(msrv): when we bump past the MSRV where `expect` and the `reason`
1610+ // parameter to that attribute got stabilized, use that to justfiy that this is
1611+ // not meant to be deprecated, but the value it relies on should be deprecated.
1612+ #[ allow( deprecated) ]
15451613pub const NGROUPS : c_ulong = NGROUPS_MAX ;
15461614pub const NOFILE : c_int = OPEN_MAX ;
15471615
@@ -1739,6 +1807,12 @@ pub const SIGXCPU: c_int = 24;
17391807pub const SIGXFSZ : c_int = 25 ;
17401808pub const SIGTRAP : c_int = 5 ;
17411809pub const SIGCLD : c_int = 20 ;
1810+ #[ deprecated(
1811+ since = "0.2.187" ,
1812+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1813+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1814+ discussion."
1815+ ) ]
17421816pub const SIGRTMAX : c_int = 57 ;
17431817pub const SIGRTMIN : c_int = 50 ;
17441818pub const SI_USER : c_int = 0 ;
@@ -1817,6 +1891,12 @@ pub const AF_INET6: c_int = 24;
18171891pub const AF_INTF : c_int = 20 ;
18181892pub const AF_RIF : c_int = 21 ;
18191893pub const AF_NDD : c_int = 23 ;
1894+ #[ deprecated(
1895+ since = "0.2.187" ,
1896+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1897+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1898+ discussion."
1899+ ) ]
18201900pub const AF_MAX : c_int = 30 ;
18211901pub const PF_UNSPEC : c_int = AF_UNSPEC ;
18221902pub const PF_UNIX : c_int = AF_UNIX ;
@@ -1843,6 +1923,16 @@ pub const PF_RIF: c_int = AF_RIF;
18431923pub const PF_INTF : c_int = AF_INTF ;
18441924pub const PF_NDD : c_int = AF_NDD ;
18451925pub const PF_INET6 : c_int = AF_INET6 ;
1926+ // FIXME(msrv): when we bump past the MSRV where `expect` and the `reason`
1927+ // parameter to that attribute got stabilized, use that to justfiy that this is
1928+ // both meant to be deprecated, and is defined in terms of a deprecated value.
1929+ #[ allow( deprecated) ]
1930+ #[ deprecated(
1931+ since = "0.2.187" ,
1932+ note = "This constant, among others often used in C for the purposes of denoting the latest \
1933+ value or limit in a set of constants, has been deprecated. See #3131 for details and \
1934+ discussion."
1935+ ) ]
18461936pub const PF_MAX : c_int = AF_MAX ;
18471937pub const SF_CLOSE : c_int = 1 ;
18481938pub const SF_REUSE : c_int = 2 ;
0 commit comments