Skip to content

refactor: deprecate RAND_MAX constant in FreeBSD#5119

Open
dybucc wants to merge 2 commits into
rust-lang:mainfrom
dybucc:rand-max-deprecation
Open

refactor: deprecate RAND_MAX constant in FreeBSD#5119
dybucc wants to merge 2 commits into
rust-lang:mainfrom
dybucc:rand-max-deprecation

Conversation

@dybucc

@dybucc dybucc commented May 28, 2026

Copy link
Copy Markdown
Contributor

Description

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.

This type of constant seems like the "delimitter" value mentioned in #3131, so that's why I thought it could be marked for deprecation.

Sources

Checklist

  • Relevant tests in libc-test/semver have been updated
  • No placeholder or unstable values like *LAST or *MAX are included (see #3131)
  • Tested locally (cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI

@rustbot label +stable-nominated

@rustbot

This comment has been minimized.

@dybucc dybucc force-pushed the rand-max-deprecation branch 2 times, most recently from ddee909 to c0316ee Compare June 4, 2026 07:08
@rustbot

This comment has been minimized.

dybucc added a commit to dybucc/libc that referenced this pull request Jun 8, 2026
This is a follow up to rust-lang#5119. In this instance, the deprecated symbol
has been removed to target the 1.0 release, and the SemVer-tracking
plain text files have been updated.
dybucc added a commit to dybucc/libc that referenced this pull request Jun 8, 2026
This is a follow up to rust-lang#5119. In this instance, the deprecated symbol
has been removed to target the 1.0 release, and the SemVer-tracking
plain text files have been updated.
dybucc added a commit to dybucc/libc that referenced this pull request Jun 9, 2026
This is a follow up to rust-lang#5119. In this instance, the deprecated symbol
has been removed to target the 1.0 release, and the SemVer-tracking
plain text files have been updated.
@dybucc dybucc force-pushed the rand-max-deprecation branch from c0316ee to 10b10e8 Compare June 9, 2026 07:12
@rustbot

This comment has been minimized.

@dybucc

dybucc commented Jun 9, 2026

Copy link
Copy Markdown
Contributor Author

CI actually passes. There seems to be an issue with a glob import that is not used, but this has not
been changed in the patch (it's not even part of it, for that matter.) For some reason, rebasing
onto main with dependabot updates has ended up with a warning across all of my open PRs due to
that one (now apparently unused) import.

@rustbot rustbot added the stable-nominated This PR should be considered for cherry-pick to libc's stable release branch label Jun 9, 2026
dybucc added a commit to dybucc/libc that referenced this pull request Jun 15, 2026
This is a follow up to rust-lang#5119. In this instance, the deprecated symbol
has been removed to target the 1.0 release, and the SemVer-tracking
plain text files have been updated.
@dybucc dybucc force-pushed the rand-max-deprecation branch from 10b10e8 to 3b4385c Compare June 15, 2026 15:28
@rustbot

This comment has been minimized.

dybucc added 2 commits June 18, 2026 17:10
This patch adds a new macro that can be used for declaring constants
when these are known to possibly change upstream across target OS/ABI
versions.
This symbol has been modified in the last few versions of FreeBSD. It
can possibly be assumed that the constant is likely to change upstream,
and users should likely be advised of its use.

The link in the doc comment is broken until rust-lang#5179 gets merged.
@rustbot

rustbot commented Jun 18, 2026

Copy link
Copy Markdown
Collaborator

This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed.

Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

S-waiting-on-review stable-nominated This PR should be considered for cherry-pick to libc's stable release branch

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants