-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Split up Solaris and illumos targets #1716
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
Conversation
r? @JohnTitor (rust_highfive has picked a reviewer for you, use r? to override) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here are some comments to help contextualize some of the changes.
@@ -1361,7 +1312,7 @@ pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; | |||
|
|||
#[deprecated(since = "0.2.64", note = "Not stable across OS versions")] | |||
pub const RLIM_NLIMITS: rlim_t = 7; | |||
pub const RLIM_INFINITY: rlim_t = 0x7fffffff; | |||
pub const RLIM_INFINITY: rlim_t = 0xfffffffffffffffd; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This was previously using the 32-bit value. Given that all of the illumos/Solaris targets are 64-bit today, it made sense to use that value.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Wouldn’t it be a good idea to make this definition different for 32 and 64 bit targets ?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The existing builds for rust on both Solaris and illumos target only x86_64. If/when someone is inclined to set up a 32-bit build, they'll need to check all of the libc interfaces, this constant included, for conformance.
@@ -1018,7 +969,7 @@ pub const O_CREAT: ::c_int = 256; | |||
pub const O_EXCL: ::c_int = 1024; | |||
pub const O_NOCTTY: ::c_int = 2048; | |||
pub const O_TRUNC: ::c_int = 512; | |||
pub const O_NOFOLLOW: ::c_int = 0x200000; | |||
pub const O_NOFOLLOW: ::c_int = 0x20000; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This appears to have been a typo during the initial import.
pub const CSTART: ::tcflag_t = 0o21; | ||
pub const CSTOP: ::tcflag_t = 0o23; | ||
pub const CSWTCH: ::tcflag_t = 0o32; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were transcription errors, given they were 0-prefixed octal values in the source header
s_no_extra_traits! { | ||
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] | ||
pub union door_desc_t__d_data { | ||
pub d_desc: door_desc_t__d_data__d_desc, | ||
d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */ | ||
} | ||
|
||
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] | ||
pub struct door_desc_t { | ||
pub d_attributes: door_attr_t, | ||
pub d_data: door_desc_t__d_data, | ||
} | ||
|
||
#[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] | ||
pub struct door_arg_t { | ||
pub data_ptr: *const ::c_char, | ||
pub data_size: ::size_t, | ||
pub desc_ptr: *const door_desc_t, | ||
pub dec_num: ::c_uint, | ||
pub rbuf: *const ::c_char, | ||
pub rsize: ::size_t, | ||
} | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Being not thrilled with the type naming mess, I've hidden the doors API from the new illumos target for now. We can circle back in the future to address it. At least one error was made when it was imported (dec_num
should be desc_num
in door_arg_t
, for example)
Thanks for the PR!
I'd like to fork ctest repo and use that repo until @gnzlbg gets back since I have no permission on the original repo. Would you mind sending PR(s) to the repo? |
Yes, of course! Some of these issues were frustrating to find, as they would have been caught by the tests (had they actually been run). |
The additional |
If/when this is merged, what are your thoughts about a patch version bump for the package? Do you have some preferred criteria for what's necessary to meet that threshold? |
Usually, I release a new version if requested as mentioned in contributing guide. So if you want me to release it once this PR gets merged, I'm happy to do so :) |
Once this is merged, I'll circle back to do another round of testing with the rust-lang/rust#55553 wad and then open a ticket here requesting the version bump. Thanks! |
With the tests added, are there any other changes you'd like to see made to this before it goes in? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, sorry for the delay!
No worries! Thanks. |
While they share a common lineage, Solaris and illumos are distinct (and diverging) platforms which should be handled differently in libc. This PR splits them up and addresses some all of the
libc-test
failures which appeared on illumos. I have a separate branch for thelibc-test
updates, but given thatctest
does not support illumos today, and the maintainer appears to be absent, those updates only function with that dependency overridden.This is one of the last remaining pre-req updates required for rust-lang/rust#55553