-
Notifications
You must be signed in to change notification settings - Fork 1.1k
DragonFly has different stat, dirent, clock_t, ino_t, nlink_t, blksize_t #117
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
Conversation
Move FreeBSD's stat into freebsd_{x86,x86_64}.rs.
Maybe, we should really split dragonfly and freebsd completely? |
I had to duplicate utsname as DragonFly uses 32 bytes instead of 256.
Thanks! I don't mind if freebsd/dragonfly are completely separated, they just seemed to have a lot of definitions in common from the original liblibc. Could you change the organization here to |
@alexcrichton : Ok, will split it from FreeBSD and will come up with another pull request |
There is no shared x86 and x86_64 code between the two anymore. Instead these 4 lines of code were duplicated. We now only share architecture-independet code between FreeBSD and DragonFly.
@alexcrichton : Ok there we go. There is currently no other architecture than x86_64 for DragonFly, that's why I kept all code in x86_64.rs, but still use the cfg_if in mod.rs to be on the safe side when new architecture arrive. |
@@ -221,6 +229,9 @@ fn main() { | |||
// sighandler_t is crazy across platforms | |||
"sighandler_t" => true, | |||
|
|||
// does not exists on DragonFly | |||
"fflags_t" if dragonfly => true, |
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.
Perhaps this could just be removed from the dragonfly definitions? It should be fine to push the typedef down lower into each respective module.
Looks good to me, thanks @mneumann! |
As this pull-request became stale, I opened up a new one (#194) which fixes all current issues. Closing this one. |
As described in rust-lang#117, the `AsExtStr` trait is defined to return a raw `*const libc::c_char`. Its impl for `OsStr` simply borrowed the byte slice from its `OsStr` argument and cast it to a `*const libc::c_char`, which does not construct a proper null-terminated C string. Given this, the `AsExtStr` is not necessary and is removed. `NixPath` is updated to yield `CStr`. Fixes rust-lang#117, rust-lang#120 Thanks to @dead10ck
Move FreeBSD's stat into freebsd_{x86,x86_64}.rs.