Skip to content

std::os::errno returns platform specific value. fixes #21898 #21932

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 3 commits into from
Feb 17, 2015

Conversation

Jormundir
Copy link
Contributor

Changes std::os::errno to return i32, the return type used by the function being delegated to.

This is my first contribution, so feel free to give me advice. I'll be happy to correct things.

@rust-highfive
Copy link
Contributor

Thanks for the pull request, and welcome! The Rust team is excited to review your changes, and you should hear from @brson (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. 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 CONTRIBUTING.md for more information.

@@ -353,7 +353,7 @@ impl IoError {
/// operating system) between the call(s) for which errors are
/// being checked and the call of this function.
pub fn last_error() -> IoError {
IoError::from_errno(os::errno() as uint, true)
IoError::from_errno(os::errno() as i32, true)
Copy link
Member

Choose a reason for hiding this comment

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

I think you may be able to remove this cast now.

@alexcrichton
Copy link
Member

This may not be precisely where we want to end up, (see my comment), but I think this is "more correct" for now so it's fine by me to merge.

@alexcrichton alexcrichton assigned alexcrichton and unassigned brson Feb 4, 2015
@Jormundir
Copy link
Contributor Author

@alexcrichton thank you for the review. I'll take those casts out tonight to finish this off.

@alexcrichton
Copy link
Member

@bors: r+ e4a7461

@bors
Copy link
Collaborator

bors commented Feb 10, 2015

⌛ Testing commit e4a7461 with merge 0f4d450...

@bors
Copy link
Collaborator

bors commented Feb 10, 2015

💔 Test failed - auto-win-32-opt

@Jormundir
Copy link
Contributor Author

What's the procedure for these types of platform specific failures? Should I fix the failures in the output and lean on the test suite, or should I go whole hog and set up a windows vm to test before making a patch commit?

@alexcrichton
Copy link
Member

Either way is fine, all platforms will need to pass tests for this to land, however. There probably aren't too many problems, though, so setting up a VM may not be necessary.

@steveklabnik
Copy link
Member

@alexcrichton it seems @Jormundir has updated, r?

@alexcrichton
Copy link
Member

@bors: r+ 64d33b1

@bors
Copy link
Collaborator

bors commented Feb 16, 2015

⌛ Testing commit 64d33b1 with merge 18c7f2d...

bors added a commit that referenced this pull request Feb 16, 2015
Changes std::os::errno to return i32, the return type used by the function being delegated to.

This is my first contribution, so feel free to give me advice. I'll be happy to correct things.
@bors
Copy link
Collaborator

bors commented Feb 16, 2015

💔 Test failed - auto-win-64-opt

@Jormundir
Copy link
Contributor Author

The test failure was due to file permissions?

@alexcrichton
Copy link
Member

@bors: retry

@bors
Copy link
Collaborator

bors commented Feb 17, 2015

⌛ Testing commit 64d33b1 with merge 22224ca...

bors added a commit that referenced this pull request Feb 17, 2015
Changes std::os::errno to return i32, the return type used by the function being delegated to.

This is my first contribution, so feel free to give me advice. I'll be happy to correct things.
@bors
Copy link
Collaborator

bors commented Feb 17, 2015

@bors bors merged commit 64d33b1 into rust-lang:master Feb 17, 2015
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.

6 participants