Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions src/fuchsia/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1592,6 +1592,12 @@ pub const LOCK_UN: c_int = 8;
pub const SS_ONSTACK: c_int = 1;
pub const SS_DISABLE: c_int = 2;

#[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 PATH_MAX: c_int = 4096;

pub const FD_SETSIZE: c_int = 1024;
Expand Down
6 changes: 6 additions & 0 deletions src/new/linux_uapi/linux/can/j1939.rs
Original file line number Diff line number Diff line change
Expand Up @@ -57,4 +57,10 @@ s! {
}
}

#[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 J1939_FILTER_MAX: c_int = 512;
6 changes: 6 additions & 0 deletions src/new/linux_uapi/linux/can/raw.rs
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,12 @@
pub use crate::linux::can::*;

pub const SOL_CAN_RAW: c_int = SOL_CAN_BASE + CAN_RAW;
#[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 CAN_RAW_FILTER_MAX: c_int = 512;

// FIXME(cleanup): use `c_enum!`, which needs to be adapted to allow omitting a type.
Expand Down
18 changes: 18 additions & 0 deletions src/new/qurt/limits.rs
Original file line number Diff line number Diff line change
Expand Up @@ -27,11 +27,29 @@ pub const USHRT_MAX: c_ushort = 65535;
// POSIX Limits
pub const ARG_MAX: c_int = 4096;
pub const CHILD_MAX: c_int = 25;
#[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 LINK_MAX: c_int = 8;
pub const MAX_CANON: c_int = 255;
pub const MAX_INPUT: c_int = 255;
#[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 NAME_MAX: c_int = 255;
pub const OPEN_MAX: c_int = 20;
#[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 PATH_MAX: c_int = 260;
pub const PIPE_BUF: c_int = 512;
pub const STREAM_MAX: c_int = 20;
Expand Down
6 changes: 6 additions & 0 deletions src/new/qurt/signal.rs
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,12 @@ pub const SIG_SETMASK: c_int = 3;
pub const POSIX_MSG: c_int = 7;
pub const POSIX_NOTIF: c_int = 8;
pub const SIGRTMIN: c_int = 10;
#[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 SIGRTMAX: c_int = 32;

// Notification types (from QuRT signal.h)
Expand Down
90 changes: 90 additions & 0 deletions src/unix/aix/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -932,6 +932,12 @@ pub const RTAX_IFP: c_int = 4;
pub const RTAX_IFA: c_int = 5;
pub const RTAX_AUTHOR: c_int = 6;
pub const RTAX_BRD: c_int = 7;
#[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 RTAX_MAX: c_int = 8;
pub const RTF_UP: c_int = 0x1;
pub const RTF_GATEWAY: c_int = 0x2;
Expand Down Expand Up @@ -1445,6 +1451,12 @@ pub const L_GETPROCINFO: c_int = 7;
pub const L_GETXINFO: c_int = 8;

// sys/limits.h
#[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 PATH_MAX: c_int = 1023;
pub const PAGESIZE: c_int = 4096;
pub const IOV_MAX: c_int = 16;
Expand All @@ -1454,13 +1466,55 @@ pub const OPEN_MAX: c_int = 65534;
pub const MAX_INPUT: c_int = 512;
pub const MAX_CANON: c_int = 256;
pub const ARG_MAX: c_int = 1048576;
#[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 BC_BASE_MAX: c_int = 99;
#[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 BC_DIM_MAX: c_int = 0x800;
#[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 BC_SCALE_MAX: c_int = 99;
#[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 BC_STRING_MAX: c_int = 0x800;
#[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 CHARCLASS_NAME_MAX: c_int = 14;
pub const CHILD_MAX: c_int = 128;
#[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 COLL_WEIGHTS_MAX: c_int = 4;
#[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 EXPR_NEST_MAX: c_int = 32;
pub const NZERO: c_int = 20;

Expand Down Expand Up @@ -1537,11 +1591,25 @@ pub const SIGSTKSZ: size_t = 4096;
pub const MINSIGSTKSZ: size_t = 1200;

// sys/params.h
// FIXME(msrv): when we bump past the MSRV where `expect` and the `reason`
// parameter to that attribute got stabilized, use that to justfiy that this is
// not meant to be deprecated, but the value it relies on should be deprecated.
#[allow(deprecated)]
pub const MAXPATHLEN: c_int = PATH_MAX + 1;
pub const MAXSYMLINKS: c_int = 20;
pub const MAXHOSTNAMELEN: c_int = 256;
pub const MAXUPRC: c_int = 128;
#[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 NGROUPS_MAX: c_ulong = 2048;
// FIXME(msrv): when we bump past the MSRV where `expect` and the `reason`
// parameter to that attribute got stabilized, use that to justfiy that this is
// not meant to be deprecated, but the value it relies on should be deprecated.
#[allow(deprecated)]
pub const NGROUPS: c_ulong = NGROUPS_MAX;
pub const NOFILE: c_int = OPEN_MAX;

Expand Down Expand Up @@ -1739,6 +1807,12 @@ pub const SIGXCPU: c_int = 24;
pub const SIGXFSZ: c_int = 25;
pub const SIGTRAP: c_int = 5;
pub const SIGCLD: c_int = 20;
#[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 SIGRTMAX: c_int = 57;
pub const SIGRTMIN: c_int = 50;
pub const SI_USER: c_int = 0;
Expand Down Expand Up @@ -1817,6 +1891,12 @@ pub const AF_INET6: c_int = 24;
pub const AF_INTF: c_int = 20;
pub const AF_RIF: c_int = 21;
pub const AF_NDD: c_int = 23;
#[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 AF_MAX: c_int = 30;
pub const PF_UNSPEC: c_int = AF_UNSPEC;
pub const PF_UNIX: c_int = AF_UNIX;
Expand All @@ -1843,6 +1923,16 @@ pub const PF_RIF: c_int = AF_RIF;
pub const PF_INTF: c_int = AF_INTF;
pub const PF_NDD: c_int = AF_NDD;
pub const PF_INET6: c_int = AF_INET6;
// FIXME(msrv): when we bump past the MSRV where `expect` and the `reason`
// parameter to that attribute got stabilized, use that to justfiy that this is
// both meant to be deprecated, and is defined in terms of a deprecated value.
#[allow(deprecated)]
#[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 PF_MAX: c_int = AF_MAX;
pub const SF_CLOSE: c_int = 1;
pub const SF_REUSE: c_int = 2;
Expand Down
64 changes: 60 additions & 4 deletions src/unix/bsd/apple/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2014,6 +2014,12 @@ pub const CPU_STATE_USER: c_int = 0;
pub const CPU_STATE_SYSTEM: c_int = 1;
pub const CPU_STATE_IDLE: c_int = 2;
pub const CPU_STATE_NICE: c_int = 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 CPU_STATE_MAX: c_int = 4;

pub const PROCESSOR_BASIC_INFO: c_int = 1;
Expand Down Expand Up @@ -3396,13 +3402,61 @@ pub const HW_TARGET: c_int = 26;
pub const HW_PRODUCT: c_int = 27;
pub const HW_MAXID: c_int = 28;
pub const USER_CS_PATH: 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 USER_BC_BASE_MAX: c_int = 2;
#[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 USER_BC_DIM_MAX: c_int = 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 USER_BC_SCALE_MAX: c_int = 4;
#[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 USER_BC_STRING_MAX: c_int = 5;
#[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 USER_COLL_WEIGHTS_MAX: c_int = 6;
#[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 USER_EXPR_NEST_MAX: c_int = 7;
#[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 USER_LINE_MAX: c_int = 8;
#[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 USER_RE_DUP_MAX: c_int = 9;
pub const USER_POSIX2_VERSION: c_int = 10;
pub const USER_POSIX2_C_BIND: c_int = 11;
Expand Down Expand Up @@ -3447,10 +3501,6 @@ pub const SIGEV_THREAD: c_int = 3;
pub const AIO_CANCELED: c_int = 2;
pub const AIO_NOTCANCELED: c_int = 4;
pub const AIO_ALLDONE: c_int = 1;
#[deprecated(
since = "0.2.64",
note = "Can vary at runtime. Use sysconf(3) instead"
)]
pub const AIO_LISTIO_MAX: c_int = 16;
pub const LIO_NOP: c_int = 0;
pub const LIO_WRITE: c_int = 2;
Expand Down Expand Up @@ -3526,6 +3576,12 @@ pub const RTV_SSTHRESH: c_int = 0x20;
pub const RTV_RTT: c_int = 0x40;
pub const RTV_RTTVAR: c_int = 0x80;

#[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 RTAX_MAX: c_int = 8;

pub const KERN_PROCARGS2: c_int = 49;
Expand Down
Loading
Loading