Skip to content

Add support for illumos target #1251

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

Merged
merged 4 commits into from
Feb 12, 2019
Merged

Add support for illumos target #1251

merged 4 commits into from
Feb 12, 2019

Conversation

jasonbking
Copy link
Contributor

This change adds support for an illumos os target to libc. Similar to the BSDs, there is a large deal of overlap (given the common history), so the 'solaris' directory was renamed to 'solarish' (it's the closest thing to an official term to refer to things descending from Solaris as well as Solaris). There were also a number of missing definitions (as well as a couple missing functions) that have proved necessary for building a number of rust programs on illumos or Solaris.

Portions contributed by @papertigers .

and Solaris-derived distributions (i.e. illumos).  In addition, a number
of missing definitions (and compatability functions) that have been
found necessary to run a number of rust binaries on illumos have been
added.

Portions were contributed by Mike Zeller <[email protected]>
@rust-highfive
Copy link

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @alexcrichton (or someone else) soon.

If any changes to this PR are deemed necessary, please add them as extra commits. This ensures that the reviewer can see what has changed since they last reviewed the code. Due to the way GitHub handles out-of-date commits, this should also make it reasonably obvious what issues have or haven't been addressed. Large or tricky changes may require several passes of review and changes.

Please see the contribution instructions for more information.

@jasonbking
Copy link
Contributor Author

The AppVeyor failure appears to be a network related issue, however the Travis CI is flagging rustfmt. I can run the code through rustfmt and update the PR, though should 2015 or 2018 style be used? It may not make a difference between the two, but it would be good to know in general for future PRs. I didn't see anything that discussed it for submitting PRs, but might have missed it.

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 11, 2019

however the Travis CI is flagging rustfmt. I can run the code through rustfmt and update the PR, though should 2015 or 2018 style be used?

Does cargo fmt --all using the latest nightly rustfmt-preview component "do the right thing"? I probably need to add this information to the readme.

@jasonbking
Copy link
Contributor Author

Unless I'm misunderstanding the output, it appears that cargo fmt --all isn't even looking at src/unix/solarish/mod.rs:

cargo fmt --all -v
[test (2015)] "/root/ws/libc/libc-test/test/cmsg.rs"
[custom-build (2015)] "/root/ws/libc/build.rs"
[test (2015)] "/root/ws/libc/libc-test/test/linux_fcntl.rs"
[test (2015)] "/root/ws/libc/libc-test/test/main.rs"
[custom-build (2015)] "/root/ws/libc/libc-test/build.rs"
[lib (2015)] "/root/ws/libc/src/lib.rs"
rustfmt --edition 2015 /root/ws/libc/libc-test/test/cmsg.rs /root/ws/libc/build.rs /root/ws/libc/libc-test/test/linux_fcntl.rs /root/ws/libc/libc-test/test/main.rs /root/ws/libc/libc-test/build.rs /root/ws/libc/src/lib.rs

Running rustfmt --edition 2015 --check on src/unix/solarish/mod.rs shows a number of changes, including to code that wasn't touched by this change. Running the same thing on a src/unix/solaris/mod.rs from the latest (as of a few minutes ago) copy of master shows similar proposed changes (i.e. rustfmt is flagging changes on the current version in master). I can go ahead and push and update with the fixed formatting if that's what's needed.

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

What's your rustfmt version ?

@jasonbking
Copy link
Contributor Author

rustfmt 1.0.1-dev (be135599 2018-12-10)

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

So I can reproduce this, I've filled an issue upstream: rust-lang/rustfmt#3341

Would you mind adding a commit that comments out the rustfmt build bot from the .travis.yml file ? I have no idea what's going on, and we can always re-enable that later.

.travis.yml Outdated
# install: rustup component add rustfmt-preview
# script:
# - rustc ci/style.rs && ./style src
# - cargo fmt --all -- --check
Copy link
Contributor

Choose a reason for hiding this comment

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

Would it be possible to disable only this line? We'd like to keep using the other style checker, I forgot about it :D

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Just the cargo fmt line?

Copy link
Contributor

Choose a reason for hiding this comment

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

Yes

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

Thank you!

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 12, 2019

📌 Commit 0b488bf has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Feb 12, 2019

⌛ Testing commit 0b488bf with merge f09ac0e...

bors added a commit that referenced this pull request Feb 12, 2019
Add support for illumos target

This change adds support for an illumos os target to libc.  Similar to the BSDs, there is a large deal of overlap (given the common history), so the 'solaris' directory was renamed to 'solarish' (it's the closest thing to an official term to refer to things descending from Solaris as well as Solaris).  There were also a number of missing definitions (as well as a couple missing functions) that have proved necessary for building a number of rust programs on illumos or Solaris.

Portions contributed by @papertigers .
@bors
Copy link
Contributor

bors commented Feb 12, 2019

💔 Test failed - checks-travis

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

Looks like style is failing: https://travis-ci.com/rust-lang/libc/jobs/176963291#L214

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

@bors: retry

1 similar comment
@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

@bors: retry

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

@bors: r+

@bors
Copy link
Contributor

bors commented Feb 12, 2019

📌 Commit 821fd8a has been approved by gnzlbg

@bors
Copy link
Contributor

bors commented Feb 12, 2019

⌛ Testing commit 821fd8a with merge 810b8c6...

bors added a commit that referenced this pull request Feb 12, 2019
Add support for illumos target

This change adds support for an illumos os target to libc.  Similar to the BSDs, there is a large deal of overlap (given the common history), so the 'solaris' directory was renamed to 'solarish' (it's the closest thing to an official term to refer to things descending from Solaris as well as Solaris).  There were also a number of missing definitions (as well as a couple missing functions) that have proved necessary for building a number of rust programs on illumos or Solaris.

Portions contributed by @papertigers .
@bors
Copy link
Contributor

bors commented Feb 12, 2019

☀️ Test successful - checks-cirrus, checks-travis, status-appveyor
Approved by: gnzlbg
Pushing 810b8c6 to master...

@bors bors merged commit 821fd8a into rust-lang:master Feb 12, 2019
@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 12, 2019

Thank you!

@jasonbking
Copy link
Contributor Author

With version 0.2.49 tagged, what is required to get the version published to crates.io? It appears that 0.2.48 is still the latest published.

@gnzlbg
Copy link
Contributor

gnzlbg commented Feb 22, 2019

I just needed to do a cargo publish. 0.2.49 is released now! Feel free to ping me about a release the next time you need one, and thank you for working on this!

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