Uh oh!
There was an error while loading. Please reload this page.
DragonFly has different stat, dirent, clock_t, ino_t, nlink_t, blksize_t - #117
DragonFly has different stat, dirent, clock_t, ino_t, nlink_t, blksize_t#117mneumann wants to merge 3 commits into
Conversation
Move FreeBSD's stat into freebsd_{x86,x86_64}.rs.mneumann
commented
Dec 29, 2015
Maybe, we should really split dragonfly and freebsd completely? |
I had to duplicate utsname as DragonFly uses 32 bytes instead of 256.
alexcrichton
commented
Jan 10, 2016
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 |
mneumann
commented
Jan 10, 2016
@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.
mneumann
commented
Jan 10, 2016
@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. |
There was a problem hiding this comment.
Perhaps this could just be removed from the dragonfly definitions? It should be fine to push the typedef down lower into each respective module.
alexcrichton
commented
Jan 11, 2016
Looks good to me, thanks @mneumann! |
mneumann
commented
Feb 20, 2016
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`. Fixesrust-lang#117, rust-lang#120 Thanks to @dead10ck
Move FreeBSD's stat into freebsd_{x86,x86_64}.rs.