-
Notifications
You must be signed in to change notification settings - Fork 1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Auto merge of #1212 - asomers:cmsg, r=alexcrichton
Fix CMSG_DATA(3) and friends on BSD PR #1098 added the CMSG_DATA(3) family of functions into libc. Because they're defined as macros in C, they had to be rewritten as Rust functions for libc. Also, they can't be tested in CI for the same reason. But that PR erroneously used the same definitions in BSD as in Linux. This commit corrects the definitions for OSX, FreeBSD, DragonflyBSD, OpenBSD, and NetBSD. I renamed a few variables and collapsed a few macros in order to combine the definitions where possible. Fixes #1210
- Loading branch information
Showing
17 changed files
with
220 additions
and
33 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
use dox::mem; | ||
|
||
use PT_FIRSTMACH; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
pub type c_char = u8; | ||
pub type __cpu_simple_lock_nv_t = ::c_int; | ||
|
||
// should be pub(crate), but that requires Rust 1.18.0 | ||
#[doc(hidden)] | ||
pub const _ALIGNBYTES: usize = mem::size_of::<::c_double>() - 1; | ||
|
||
pub const PT_STEP: ::c_int = PT_FIRSTMACH + 0; | ||
pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1; | ||
pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,10 @@ | ||
use dox::mem; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
pub type c_char = i8; | ||
pub type __cpu_simple_lock_nv_t = ::c_uchar; | ||
|
||
// should be pub(crate), but that requires Rust 1.18.0 | ||
#[doc(hidden)] | ||
pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
use dox::mem; | ||
|
||
pub type c_long = i64; | ||
pub type c_ulong = u64; | ||
pub type c_char = u8; | ||
|
||
// should be pub(crate), but that requires Rust 1.18.0 | ||
#[doc(hidden)] | ||
pub const _ALIGNBYTES: usize = mem::size_of::<::c_long>() - 1; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,9 @@ | ||
use dox::mem; | ||
|
||
pub type c_long = i32; | ||
pub type c_ulong = u32; | ||
pub type c_char = i8; | ||
|
||
// should be pub(crate), but that requires Rust 1.18.0 | ||
#[doc(hidden)] | ||
pub const _ALIGNBYTES: usize = mem::size_of::<::c_int>() - 1; |
Oops, something went wrong.