Skip to content

Commit 3b4385c

Browse files
committed
refactor: deprecate RAND_MAX constant in FreeBSD
This constant does not seem to have had any changes since a binding was defined in all modules but the FreeBSD tree. This deprecation may or may not be worth it, as the only real change was between FreeBSD 12 and FreeBSD 13.
1 parent f4d6777 commit 3b4385c

5 files changed

Lines changed: 30 additions & 0 deletions

File tree

src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -259,6 +259,12 @@ s! {
259259
}
260260

261261
pub const ELAST: c_int = 96;
262+
#[deprecated(
263+
since = "0.2.187",
264+
note = "This constant, among others often used in C for the purposes of denoting the latest \
265+
value or limit in a set of constants, has been deprecated. See #3131 for details and \
266+
discussion."
267+
)]
262268
pub const RAND_MAX: c_int = 0x7fff_fffd;
263269
pub const KI_NSPARE_PTR: usize = 6;
264270
pub const MINCORE_SUPER: c_int = 0x20;

src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -303,6 +303,12 @@ s! {
303303
}
304304
}
305305

306+
#[deprecated(
307+
since = "0.2.187",
308+
note = "This constant, among others often used in C for the purposes of denoting the latest \
309+
value or limit in a set of constants, has been deprecated. See #3131 for details and \
310+
discussion."
311+
)]
306312
pub const RAND_MAX: c_int = 0x7fff_fffd;
307313
pub const ELAST: c_int = 97;
308314

src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -316,6 +316,12 @@ s! {
316316
}
317317
}
318318

319+
#[deprecated(
320+
since = "0.2.187",
321+
note = "This constant, among others often used in C for the purposes of denoting the latest \
322+
value or limit in a set of constants, has been deprecated. See #3131 for details and \
323+
discussion."
324+
)]
319325
pub const RAND_MAX: c_int = 0x7fff_ffff;
320326
pub const ELAST: c_int = 97;
321327

src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -318,6 +318,12 @@ s! {
318318
}
319319
}
320320

321+
#[deprecated(
322+
since = "0.2.187",
323+
note = "This constant, among others often used in C for the purposes of denoting the latest \
324+
value or limit in a set of constants, has been deprecated. See #3131 for details and \
325+
discussion."
326+
)]
321327
pub const RAND_MAX: c_int = 0x7fff_ffff;
322328
pub const ELAST: c_int = 97;
323329

src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -320,6 +320,12 @@ s! {
320320
}
321321
}
322322

323+
#[deprecated(
324+
since = "0.2.187",
325+
note = "This constant, among others often used in C for the purposes of denoting the latest \
326+
value or limit in a set of constants, has been deprecated. See #3131 for details and \
327+
discussion."
328+
)]
323329
pub const RAND_MAX: c_int = 0x7fff_ffff;
324330
pub const ELAST: c_int = 97;
325331

0 commit comments

Comments
 (0)