From 1be630f89ce2e7226b0c98d013bd38039383ac8d Mon Sep 17 00:00:00 2001 From: Alan Somers Date: Mon, 2 Sep 2019 10:46:01 -0600 Subject: [PATCH] Deprecate AIO_LISTIO_MAX This value can vary at runtime. Applications should instead use sysconf(3) with _SC_AIO_LISTIO_MAX. --- src/unix/bsd/apple/mod.rs | 4 ++++ src/unix/bsd/freebsdlike/mod.rs | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 6d0a5bfe32ced..8af0c8eed6fd1 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -2814,6 +2814,10 @@ 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; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 2561e2504e630..a496a1c97aad4 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -239,6 +239,10 @@ cfg_if! { } } +#[deprecated( + since="0.2.64", + note="Can vary at runtime. Use sysconf(3) instead") +] pub const AIO_LISTIO_MAX: ::c_int = 16; pub const AIO_CANCELED: ::c_int = 1; pub const AIO_NOTCANCELED: ::c_int = 2;