Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added extensive constants to make use of the BSD's sysctl function. #285

Merged
merged 2 commits into from
May 14, 2016

Conversation

raphaelcohn
Copy link
Contributor

sysctl usage does differ significantly across the BSDs, and, whilst
some constants overlap, many do not. It is easier to maintain them
in separate modules, rather than trying to tease out common definitions.

@rust-highfive
Copy link

r? @alexcrichton

(rust_highfive has picked a reviewer for you, use r? to override)

@alexcrichton
Copy link
Member

Thanks! Looks like some of the CI failures are legitimate though?

@raphaelcohn
Copy link
Contributor Author

OK will take a look in the morning...
On 11 May 2016 10:37 p.m., "Alex Crichton" [email protected] wrote:

Thanks! Looks like some of the CI failures are legitimate though?


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#285 (comment)

@raphaelcohn
Copy link
Contributor Author

OK, looks like I missed some duplicate definitions which had been added piecemeal. I'm beginning to wonder, even though it creates apparent duplication, whether it would be better to drop the attempt to create a hierarchy of unices and just push all definitions down to a per-OS file. It could make maintenance easier. Thoughts? Alternatively, a kickstarter campaign to flesh out all remaining libc bits and bobs... I'd be game for that.

@alexcrichton
Copy link
Member

Heh, yeah the organization as-is may be a bit of an opportunistic optimization that may not be worth it in the end, but we probably don't want to shift it all around just yet.

@raphaelcohn
Copy link
Contributor Author

Fair enough
On 12 May 2016 9:47 p.m., "Alex Crichton" [email protected] wrote:

Heh, yeah the organization as-is may be a bit of an opportunistic
optimization that may not be worth it in the end, but we probably don't
want to shift it all around just yet.


You are receiving this because you authored the thread.
Reply to this email directly or view it on GitHub
#285 (comment)

@alexcrichton
Copy link
Member

Looks like travis is still having some problems though?

@raphaelcohn
Copy link
Contributor Author

OK, I think I've fixed this. (I must say, I'm dead impressed with your CI builds. They're very effective).
Turns out the problem was I grepp'd for duplicate pub const KERN_PROC: but missed the ones pub const KERN_PROC :. Would this be worth an addition to the style checks?

@raphaelcohn
Copy link
Contributor Author

OK, looks like we're just down to bitrig failing now...I'll try again...

sysctl usage does differ significantly across the BSDs, and, whilst
some constants overlap, many do not. It is easier to maintain them
in separate modules, rather than trying to tease out common definitions.
@alexcrichton
Copy link
Member

@bors: r+ 786d505

@bors
Copy link
Contributor

bors commented May 14, 2016

⌛ Testing commit 786d505 with merge 72519bf...

bors added a commit that referenced this pull request May 14, 2016
Added extensive constants to make use of the BSD's sysctl function.

sysctl usage does differ significantly across the BSDs, and, whilst
some constants overlap, many do not. It is easier to maintain them
in separate modules, rather than trying to tease out common definitions.
@bors
Copy link
Contributor

bors commented May 14, 2016

☀️ Test successful - status-appveyor, travis

@bors bors merged commit 786d505 into rust-lang:master May 14, 2016
@Nercury
Copy link
Contributor

Nercury commented May 15, 2016

@raphaelcohn It looks like libc::HW_NCPU is now missing on auto-linux-64-cross-netbsd. Is this intentional? (issue here: rust-lang/rust#33500 (comment))

alexcrichton added a commit to alexcrichton/libc that referenced this pull request May 16, 2016
Removed by accident in rust-lang#285
@alexcrichton alexcrichton mentioned this pull request May 16, 2016
bors added a commit that referenced this pull request May 16, 2016
Add back HW_NCPU

Removed by accident in #285
@alexcrichton
Copy link
Member

Ah yeah that's accidentally, I'm adding it back in #291

Susurrus pushed a commit to Susurrus/libc that referenced this pull request Mar 26, 2017
Use libc constants in sys/signal.rs.

Work toward rust-lang#264.
danielverkamp pushed a commit to danielverkamp/libc that referenced this pull request Apr 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants