-
Notifications
You must be signed in to change notification settings - Fork 674
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
Match syntax of libc_bitflags! with bitflags! #725
Conversation
8845dc2
to
cd21efc
Compare
@asomers Want to give this a quick glance-over for me? It should be pretty straight-forward. |
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.
Other than the excessive unsafe
s, it all looks good to me.
bits: [0; FD_SETSIZE as usize / BITS] | ||
} | ||
let mut fdset = unsafe { mem::uninitialized() }; | ||
unsafe { libc::FD_ZERO(&mut fdset) }; |
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 shouldn't require unsafe
. FD_ZERO
is implemented in pure Rust. Same for FD_CLR
, FD_SET
, and FD_ISSET
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.
Same thing as WIFCONTINUED
, this is how they're defined in libc
:
pub unsafe extern "C" fn FD_SET(fd: c_int, set: *mut fd_set);
0276742
to
4588d4c
Compare
@asomers Want to give this another look over now? Should be RFM. |
LGTM. But can you squash the last commit? |
@asomers Squash that last commit into which other commit? I left it separate because it didn't seem appropriate to merge it with any other changes in this patchset. |
Sorry, I thought that the extra bors r+ |
Timed out (retrying...) |
Also update a couple of constant declarations while we're at it.