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

More precise identification of Redox target #170

Merged
merged 1 commit into from Nov 10, 2016

Conversation

Projects
None yet
3 participants
@jackpot51
Copy link
Contributor

jackpot51 commented Nov 9, 2016

This is a minor change to match the way that the libc and rand crates now have checking for Redox. It is more accurate than checking for cfg(redox).

@jackpot51

This comment has been minimized.

Copy link
Contributor Author

jackpot51 commented Nov 9, 2016

Either this, or a change adding "redox" to https://github.com/rust-lang/rust/blob/master/src/librustc/session/config.rs#L959 need to be done to fix building on Redox.

I would prefer not to modify the compiler :-/

@eddyb

This comment has been minimized.

Copy link

eddyb commented Nov 10, 2016

It's surprising to me that redox doesn't behave like other unices here. Should be at least documented.

@jackpot51

This comment has been minimized.

Copy link
Contributor Author

jackpot51 commented Nov 10, 2016

@eddyb Redox is not a Unix. It is Unix-like in the sense that it has very similar system calls, a similar filesystem, and similar methodology but it does not include a POSIX compatible C library - all system calls are accessed from a Rust crate called redox_syscall

@eddyb

This comment has been minimized.

Copy link

eddyb commented Nov 10, 2016

Interesting - would libstd have to depend on such a library?

@jackpot51

This comment has been minimized.

Copy link
Contributor Author

jackpot51 commented Nov 10, 2016

Yes, I believe so. I have not found the cleanest way to do this yet, but would love to have input into it. I am building a Redox std::sys here: https://github.com/redox-os/rust/tree/redox/src/libstd/sys/redox

At the moment, I am exporting redox_syscall from a custom libc to get around this issue.

@alexcrichton alexcrichton merged commit 8f56ad5 into rust-lang-deprecated:master Nov 10, 2016

2 checks passed

continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.