diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 5ce676d2b7c2d..0c80d0badc4f2 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -3733,6 +3733,12 @@ pub const MNT_NOWAIT: c_int = 2; // pub const THREAD_STANDARD_POLICY: c_int = 1; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_STANDARD_POLICY_COUNT: c_int = 0; pub const THREAD_EXTENDED_POLICY: c_int = 1; pub const THREAD_TIME_CONSTRAINT_POLICY: c_int = 2; @@ -3795,6 +3801,12 @@ pub const VM_PAGE_QUERY_PAGE_CS_NX: i32 = 0x400; // mach/task_info.h pub const TASK_THREAD_TIMES_INFO: u32 = 3; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const HOST_CPU_LOAD_INFO_COUNT: u32 = 4; pub const MACH_TASK_BASIC_INFO: u32 = 20; @@ -3858,6 +3870,12 @@ pub const COPYFILE_STATE_DST_BSIZE: c_int = 12; pub const COPYFILE_STATE_BSIZE: c_int = 13; // +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const ATTR_BIT_MAP_COUNT: c_ushort = 5; pub const FSOPT_NOFOLLOW: u32 = 0x1; pub const FSOPT_NOFOLLOW_ANY: u32 = 0x800; @@ -4029,36 +4047,114 @@ const fn __DARWIN_ALIGN32(p: usize) -> usize { (p + __DARWIN_ALIGNBYTES32) & !__DARWIN_ALIGNBYTES32 } +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_EXTENDED_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_TIME_CONSTRAINT_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_PRECEDENCE_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_BACKGROUND_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_THROUGHPUT_QOS_POLICY_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_BASIC_INFO_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_IDENTIFIER_INFO_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const THREAD_EXTENDED_INFO_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const TASK_THREAD_TIMES_INFO_COUNT: u32 = (size_of::() / size_of::()) as u32; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const MACH_TASK_BASIC_INFO_COUNT: u32 = (size_of::() / size_of::()) as u32; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t = (size_of::() / size_of::()) as mach_msg_type_number_t; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index c6dd17697adae..e119f8bfcfbb2 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1569,6 +1569,12 @@ pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: c_int = 8; pub const NFNL_SUBSYS_CTHELPER: c_int = 9; pub const NFNL_SUBSYS_NFTABLES: c_int = 10; pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NFNL_SUBSYS_COUNT: c_int = 12; pub const NFNL_MSG_BATCH_BEGIN: c_int = NLMSG_MIN_TYPE; diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 4c9392ab2434e..9eaed528fd9fa 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -1899,6 +1899,12 @@ pub const NFNL_SUBSYS_CTHELPER: c_int = 9; pub const NFNL_SUBSYS_NFTABLES: c_int = 10; pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11; pub const NFNL_SUBSYS_HOOK: c_int = 12; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const NFNL_SUBSYS_COUNT: c_int = 13; pub const NFNL_MSG_BATCH_BEGIN: c_int = crate::NLMSG_MIN_TYPE; diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index b31c31bd1f6c8..de4bc72966031 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -186,6 +186,12 @@ pub const PRIV_USER: c_uint = PRIV_DEBUG | PRIV_AWARE_RESET | PRIV_PFEXEC; +#[deprecated( + since = "0.2.187", + note = "This constant, among others often used in C for the purposes of denoting the latest \ + value or limit in a set of constants, has been deprecated. See #3131 for details and \ + discussion." +)] pub const LGRP_RSRC_COUNT: crate::lgrp_rsrc_t = 2; pub const LGRP_RSRC_CPU: crate::lgrp_rsrc_t = 0; pub const LGRP_RSRC_MEM: crate::lgrp_rsrc_t = 1;