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
diff --git a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs
index a00e333..b63b69f 100644
--- a/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs
+++ b/src/unix/bsd/netbsdlike/openbsdlike/openbsd/x86.rs
@@ -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;