diff options
Diffstat (limited to 'libc/src/unix/bsd/netbsdlike/netbsd')
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/aarch64.rs | 6 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/arm.rs | 6 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/mod.rs | 14 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/powerpc.rs | 6 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/sparc64.rs | 4 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/x86.rs | 6 | ||||
-rw-r--r-- | libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs | 6 |
7 files changed, 43 insertions, 5 deletions
diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/aarch64.rs b/libc/src/unix/bsd/netbsdlike/netbsd/aarch64.rs index 66f3301..cda75bc 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/aarch64.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/aarch64.rs @@ -1,3 +1,5 @@ +use dox::mem; + use PT_FIRSTMACH; pub type c_long = i64; @@ -5,6 +7,10 @@ pub type c_ulong = u64; pub type c_char = u8; 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; + pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 0; pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 1; pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 2; diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/arm.rs b/libc/src/unix/bsd/netbsdlike/netbsd/arm.rs index 9e67316..71c2cb7 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/arm.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/arm.rs @@ -1,3 +1,5 @@ +use dox::mem; + use PT_FIRSTMACH; pub type c_long = i32; @@ -5,6 +7,10 @@ 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_longlong>() - 1; + pub const PT_GETREGS: ::c_int = PT_FIRSTMACH + 1; pub const PT_SETREGS: ::c_int = PT_FIRSTMACH + 2; pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3; diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs index 760582c..d3acfb9 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -526,15 +526,16 @@ pub const AF_BLUETOOTH: ::c_int = 31; pub const AF_IEEE80211: ::c_int = 32; pub const AF_MPLS: ::c_int = 33; pub const AF_ROUTE: ::c_int = 34; -pub const AF_MAX: ::c_int = 35; +pub const AF_MAX: ::c_int = 36; pub const NET_MAXID: ::c_int = AF_MAX; pub const NET_RT_DUMP: ::c_int = 1; pub const NET_RT_FLAGS: ::c_int = 2; -pub const NET_RT_OOIFLIST: ::c_int = 3; -pub const NET_RT_OIFLIST: ::c_int = 4; -pub const NET_RT_IFLIST: ::c_int = 5; -pub const NET_RT_MAXID: ::c_int = 6; +pub const NET_RT_OOOIFLIST: ::c_int = 3; +pub const NET_RT_OOIFLIST: ::c_int = 4; +pub const NET_RT_OIFLIST: ::c_int = 5; +pub const NET_RT_IFLIST: ::c_int = 6; +pub const NET_RT_MAXID: ::c_int = 7; pub const PF_OROUTE: ::c_int = AF_OROUTE; pub const PF_ARP: ::c_int = AF_ARP; @@ -1039,6 +1040,7 @@ f! { } } +#[link(name = "rt")] extern { pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; @@ -1051,7 +1053,9 @@ extern { pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; pub fn lio_listio(mode: ::c_int, aiocb_list: *const *mut aiocb, nitems: ::c_int, sevp: *mut sigevent) -> ::c_int; +} +extern { pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int; pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int; pub fn lchflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int; diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/libc/src/unix/bsd/netbsdlike/netbsd/powerpc.rs index 54d069e..3c682c3 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/powerpc.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/powerpc.rs @@ -1,3 +1,5 @@ +use dox::mem; + use PT_FIRSTMACH; pub type c_long = i32; @@ -5,6 +7,10 @@ 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; diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/sparc64.rs b/libc/src/unix/bsd/netbsdlike/netbsd/sparc64.rs index db8f2a9..6a86759 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/sparc64.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/sparc64.rs @@ -2,3 +2,7 @@ pub type c_long = i64; pub type c_ulong = u64; 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 = 0xf; diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/x86.rs b/libc/src/unix/bsd/netbsdlike/netbsd/x86.rs index 8bd1058..4da9968 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/x86.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/x86.rs @@ -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; diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs index 8d3de84..af1b8f8 100644 --- a/libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs +++ b/libc/src/unix/bsd/netbsdlike/netbsd/x86_64.rs @@ -1,3 +1,5 @@ +use dox::mem; + use PT_FIRSTMACH; pub type c_long = i64; @@ -5,6 +7,10 @@ pub type c_ulong = u64; 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_long>() - 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; |