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

Add more items for FreeBSD #2549

Merged
merged 5 commits into from Nov 20, 2021
Merged

Conversation

GuillaumeGomez
Copy link
Member

No description provided.

@rust-highfive
Copy link

r? @Amanieu

(rust-highfive has picked a reviewer for you, use r? to override)

@GuillaumeGomez
Copy link
Member Author

This is now ready!

@GuillaumeGomez
Copy link
Member Author

r? @JohnTitor

@rust-highfive rust-highfive assigned JohnTitor and unassigned Amanieu Nov 18, 2021
@GuillaumeGomez GuillaumeGomez force-pushed the more-freebsd branch 3 times, most recently from 3c01a0a to 38398eb Compare November 18, 2021 16:53
@JohnTitor
Copy link
Member

It'd be great if you could also rebase this to test with a new FreeBSD 14 CI, as it currently doesn't gate bors (I guess #2545 will be merged in an hour).

@GuillaumeGomez
Copy link
Member Author

Sure! Please ping me then so I can update my PR.

@JohnTitor
Copy link
Member

@GuillaumeGomez It has been merged now!

@GuillaumeGomez
Copy link
Member Author

I added some freebsd14 items and updated the other cfgs. Let's see if the CI is happy. :)

@GuillaumeGomez
Copy link
Member Author

CI is happy! \o/

pub const CTL_SYSCTL_DEBUG: ::c_int = 0;
pub const CTL_SYSCTL_NAME: ::c_int = 1;
pub const CTL_SYSCTL_NEXT: ::c_int = 2;
pub const CTL_SYSCTL_NAME2OID: ::c_int = 3;
pub const CTL_SYSCTL_OIDFMT: ::c_int = 4;
pub const CTL_SYSCTL_OIDDESCR: ::c_int = 5;
pub const CTL_SYSCTL_OIDLABEL: ::c_int = 6;
cfg_if! {
if #[cfg(any(freebsd13, freebsd14))] {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's avoid using cfg(freebsdN) here, it makes it hard to maintain FreeBSD N modules when removing/adding a module (that's why I moved kinfo_proc).

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The problem is that there isn't a way to say "all freebsd version starting X".

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also the problem with kinfo_proc was different: it was included in all version by default, in here it's only included in freebsd13 and freebsd14. If freebsd15 is released, it won't be impacted.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I meant, if we add FreeBSD 15, for instance, we will have to tweak each cfgs, it'll bring more tasks. But we declare them on FreeBSD 13 and FreeBSD 14, we'll just have to copy the FreeBSD 14 module, and if something is changed, we need to change them only.
However, I just remembered #2465, TL;DR newly added consts don't have to be gated and we can just declare them for simplicity.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Oh nice! Updating then.

@GuillaumeGomez
Copy link
Member Author

Simplified consts handling as suggested. :)

@JohnTitor
Copy link
Member

Hm, seems there are still cfg'd consts, is there any reason that they should be?

@GuillaumeGomez
Copy link
Member Author

Definitely not, my bad, completely missed them... Updating.

@GuillaumeGomez
Copy link
Member Author

Done!

@JohnTitor
Copy link
Member

Great, thanks! @bors r+

@bors
Copy link
Contributor

bors commented Nov 19, 2021

📌 Commit 441f195 has been approved by JohnTitor

@bors
Copy link
Contributor

bors commented Nov 19, 2021

⌛ Testing commit 441f195 with merge 73320c5...

@bors
Copy link
Contributor

bors commented Nov 20, 2021

☀️ Test successful - checks-actions, checks-cirrus-freebsd-11, checks-cirrus-freebsd-12, checks-cirrus-freebsd-13
Approved by: JohnTitor
Pushing 73320c5 to master...

@bors bors merged commit 73320c5 into rust-lang:master Nov 20, 2021
@GuillaumeGomez GuillaumeGomez deleted the more-freebsd branch November 20, 2021 11:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

5 participants