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

Switch to libc definitons of errno constants #807

Merged
merged 4 commits into from
Dec 8, 2017

Conversation

Susurrus
Copy link
Contributor

@Susurrus Susurrus commented Dec 3, 2017

Still need to do OpenBSD and NetBSD. Primary goal with this first pass is to see what doesn't exist properly in libc.

Closes #487.

@Susurrus Susurrus force-pushed the libcify_errnos branch 3 times, most recently from 9f5d329 to 288cb98 Compare December 3, 2017 06:43
@Susurrus Susurrus changed the title WIP: Switch to libc definitons of errno constants Switch to libc definitons of errno constants Dec 3, 2017
@Susurrus Susurrus changed the title Switch to libc definitons of errno constants WIP: Switch to libc definitons of errno constants Dec 3, 2017
@Susurrus
Copy link
Contributor Author

Susurrus commented Dec 3, 2017

I think with this change all the constant checks done at the bottom of src/errno.rs can be safely removed also. Unless there's an objection, once I get all platforms passing with this change I'll add that as another commit as well.

@Susurrus Susurrus mentioned this pull request Dec 3, 2017
8 tasks
@Susurrus Susurrus force-pushed the libcify_errnos branch 2 times, most recently from 65df780 to 2a311a1 Compare December 3, 2017 21:31
@Susurrus Susurrus force-pushed the libcify_errnos branch 2 times, most recently from c90a6f3 to f846cdf Compare December 4, 2017 03:15
@Susurrus Susurrus changed the title WIP: Switch to libc definitons of errno constants Switch to libc definitons of errno constants Dec 4, 2017
@Susurrus
Copy link
Contributor Author

Susurrus commented Dec 4, 2017

This should be ready to merge once the FreeBSD tests pass. Note that there are more improvements that could be made to the errno code, but I wanted to restrict this PR to just using libc for constants and removing any unnecessary testing for it.

@Susurrus
Copy link
Contributor Author

Susurrus commented Dec 5, 2017

Note that the check of the size of IoVec<&[u8]> matching iovec is the only check that might be worth keeping (and is removed by this PR), but I'm worried in how fragile our IoVec API is if it relies on the compiler making these the same size. Probably worth a glance at that code to make sure we aren't doing anything too onerous there.

Bryant Mairs added 4 commits December 5, 2017 07:48
This was doing testing for errno constants and a few other
types that is no longer necessary now that these types are
all tested within the libc project itself.
Now that these constants are verified within libc,
these tests are no longer necessary.
@Susurrus
Copy link
Contributor Author

Susurrus commented Dec 8, 2017

bors r+

bors bot added a commit that referenced this pull request Dec 8, 2017
807: Switch to libc definitons of errno constants r=Susurrus a=Susurrus

Still need to do OpenBSD and NetBSD. Primary goal with this first pass is to see what doesn't exist properly in `libc`.

Closes #487.
@bors
Copy link
Contributor

bors bot commented Dec 8, 2017

@bors bors bot merged commit a79d228 into nix-rust:master Dec 8, 2017
@Susurrus Susurrus deleted the libcify_errnos branch December 8, 2017 17:03
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.

None yet

1 participant