aboutsummaryrefslogtreecommitdiff
path: root/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
diff options
context:
space:
mode:
Diffstat (limited to 'libc/src/unix/bsd/netbsdlike/netbsd/mod.rs')
-rw-r--r--libc/src/unix/bsd/netbsdlike/netbsd/mod.rs154
1 files changed, 89 insertions, 65 deletions
diff --git a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
index ad53c19..9d710eb 100644
--- a/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
+++ b/libc/src/unix/bsd/netbsdlike/netbsd/mod.rs
@@ -1,9 +1,9 @@
pub type clock_t = ::c_uint;
pub type suseconds_t = ::c_int;
pub type dev_t = u64;
-pub type blksize_t = ::int32_t;
-pub type fsblkcnt_t = ::uint64_t;
-pub type fsfilcnt_t = ::uint64_t;
+pub type blksize_t = i32;
+pub type fsblkcnt_t = u64;
+pub type fsfilcnt_t = u64;
pub type idtype_t = ::c_int;
pub type mqd_t = ::c_int;
type __pthread_spin_t = __cpu_simple_lock_nv_t;
@@ -77,9 +77,9 @@ s! {
pub st_size: ::off_t,
pub st_blocks: ::blkcnt_t,
pub st_blksize: ::blksize_t,
- pub st_flags: ::uint32_t,
- pub st_gen: ::uint32_t,
- pub st_spare: [::uint32_t; 2],
+ pub st_flags: u32,
+ pub st_gen: u32,
+ pub st_spare: [u32; 2],
}
pub struct addrinfo {
@@ -163,22 +163,22 @@ s! {
pub struct kevent {
pub ident: ::uintptr_t,
- pub filter: ::uint32_t,
- pub flags: ::uint32_t,
- pub fflags: ::uint32_t,
- pub data: ::int64_t,
+ pub filter: u32,
+ pub flags: u32,
+ pub fflags: u32,
+ pub data: i64,
pub udata: ::intptr_t,
}
pub struct dqblk {
- pub dqb_bhardlimit: ::uint32_t,
- pub dqb_bsoftlimit: ::uint32_t,
- pub dqb_curblocks: ::uint32_t,
- pub dqb_ihardlimit: ::uint32_t,
- pub dqb_isoftlimit: ::uint32_t,
- pub dqb_curinodes: ::uint32_t,
- pub dqb_btime: ::int32_t,
- pub dqb_itime: ::int32_t,
+ pub dqb_bhardlimit: u32,
+ pub dqb_bsoftlimit: u32,
+ pub dqb_curblocks: u32,
+ pub dqb_ihardlimit: u32,
+ pub dqb_isoftlimit: u32,
+ pub dqb_curinodes: u32,
+ pub dqb_btime: i32,
+ pub dqb_itime: i32,
}
pub struct Dl_info {
@@ -261,10 +261,10 @@ s! {
pub sdl_len: ::c_uchar,
pub sdl_family: ::c_uchar,
pub sdl_index: ::c_ushort,
- pub sdl_type: ::uint8_t,
- pub sdl_nlen: ::uint8_t,
- pub sdl_alen: ::uint8_t,
- pub sdl_slen: ::uint8_t,
+ pub sdl_type: u8,
+ pub sdl_nlen: u8,
+ pub sdl_alen: u8,
+ pub sdl_slen: u8,
pub sdl_data: [::c_char; 12],
}
@@ -304,7 +304,7 @@ s_no_extra_traits! {
pub sin_family: ::sa_family_t,
pub sin_port: ::in_port_t,
pub sin_addr: ::in_addr,
- pub sin_zero: [::int8_t; 8],
+ pub sin_zero: [i8; 8],
}
pub struct dirent {
@@ -331,18 +331,18 @@ s_no_extra_traits! {
pub f_favail: ::fsfilcnt_t,
pub f_fresvd: ::fsfilcnt_t,
- pub f_syncreads: ::uint64_t,
- pub f_syncwrites: ::uint64_t,
+ pub f_syncreads: u64,
+ pub f_syncwrites: u64,
- pub f_asyncreads: ::uint64_t,
- pub f_asyncwrites: ::uint64_t,
+ pub f_asyncreads: u64,
+ pub f_asyncwrites: u64,
pub f_fsidx: ::fsid_t,
pub f_fsid: ::c_ulong,
pub f_namemax: ::c_ulong,
pub f_owner: ::uid_t,
- pub f_spare: [::uint32_t; 4],
+ pub f_spare: [u32; 4],
pub f_fstypename: [::c_char; 32],
pub f_mntonname: [::c_char; 1024],
@@ -853,8 +853,21 @@ 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;
+#[doc(hidden)]
+#[deprecated(
+ since = "0.2.55",
+ note = "If you are using this report to: \
+ https://github.com/rust-lang/libc/issues/665"
+)]
pub const AF_MAX: ::c_int = 36;
+#[doc(hidden)]
+#[deprecated(
+ since = "0.2.55",
+ note = "If you are using this report to: \
+ https://github.com/rust-lang/libc/issues/665"
+)]
+#[allow(deprecated)]
pub const NET_MAXID: ::c_int = AF_MAX;
pub const NET_RT_DUMP: ::c_int = 1;
pub const NET_RT_FLAGS: ::c_int = 2;
@@ -870,6 +883,14 @@ pub const PF_KEY: ::c_int = pseudo_AF_KEY;
pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH;
pub const PF_MPLS: ::c_int = AF_MPLS;
pub const PF_ROUTE: ::c_int = AF_ROUTE;
+
+#[doc(hidden)]
+#[deprecated(
+ since = "0.2.55",
+ note = "If you are using this report to: \
+ https://github.com/rust-lang/libc/issues/665"
+)]
+#[allow(deprecated)]
pub const PF_MAX: ::c_int = AF_MAX;
pub const MSG_NBIO: ::c_int = 0x1000;
@@ -1086,43 +1107,43 @@ pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1;
pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2;
pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL;
-pub const EVFILT_AIO: ::uint32_t = 2;
-pub const EVFILT_PROC: ::uint32_t = 4;
-pub const EVFILT_READ: ::uint32_t = 0;
-pub const EVFILT_SIGNAL: ::uint32_t = 5;
-pub const EVFILT_TIMER: ::uint32_t = 6;
-pub const EVFILT_VNODE: ::uint32_t = 3;
-pub const EVFILT_WRITE: ::uint32_t = 1;
-
-pub const EV_ADD: ::uint32_t = 0x1;
-pub const EV_DELETE: ::uint32_t = 0x2;
-pub const EV_ENABLE: ::uint32_t = 0x4;
-pub const EV_DISABLE: ::uint32_t = 0x8;
-pub const EV_ONESHOT: ::uint32_t = 0x10;
-pub const EV_CLEAR: ::uint32_t = 0x20;
-pub const EV_RECEIPT: ::uint32_t = 0x40;
-pub const EV_DISPATCH: ::uint32_t = 0x80;
-pub const EV_FLAG1: ::uint32_t = 0x2000;
-pub const EV_ERROR: ::uint32_t = 0x4000;
-pub const EV_EOF: ::uint32_t = 0x8000;
-pub const EV_SYSFLAGS: ::uint32_t = 0xf000;
-
-pub const NOTE_LOWAT: ::uint32_t = 0x00000001;
-pub const NOTE_DELETE: ::uint32_t = 0x00000001;
-pub const NOTE_WRITE: ::uint32_t = 0x00000002;
-pub const NOTE_EXTEND: ::uint32_t = 0x00000004;
-pub const NOTE_ATTRIB: ::uint32_t = 0x00000008;
-pub const NOTE_LINK: ::uint32_t = 0x00000010;
-pub const NOTE_RENAME: ::uint32_t = 0x00000020;
-pub const NOTE_REVOKE: ::uint32_t = 0x00000040;
-pub const NOTE_EXIT: ::uint32_t = 0x80000000;
-pub const NOTE_FORK: ::uint32_t = 0x40000000;
-pub const NOTE_EXEC: ::uint32_t = 0x20000000;
-pub const NOTE_PDATAMASK: ::uint32_t = 0x000fffff;
-pub const NOTE_PCTRLMASK: ::uint32_t = 0xf0000000;
-pub const NOTE_TRACK: ::uint32_t = 0x00000001;
-pub const NOTE_TRACKERR: ::uint32_t = 0x00000002;
-pub const NOTE_CHILD: ::uint32_t = 0x00000004;
+pub const EVFILT_AIO: u32 = 2;
+pub const EVFILT_PROC: u32 = 4;
+pub const EVFILT_READ: u32 = 0;
+pub const EVFILT_SIGNAL: u32 = 5;
+pub const EVFILT_TIMER: u32 = 6;
+pub const EVFILT_VNODE: u32 = 3;
+pub const EVFILT_WRITE: u32 = 1;
+
+pub const EV_ADD: u32 = 0x1;
+pub const EV_DELETE: u32 = 0x2;
+pub const EV_ENABLE: u32 = 0x4;
+pub const EV_DISABLE: u32 = 0x8;
+pub const EV_ONESHOT: u32 = 0x10;
+pub const EV_CLEAR: u32 = 0x20;
+pub const EV_RECEIPT: u32 = 0x40;
+pub const EV_DISPATCH: u32 = 0x80;
+pub const EV_FLAG1: u32 = 0x2000;
+pub const EV_ERROR: u32 = 0x4000;
+pub const EV_EOF: u32 = 0x8000;
+pub const EV_SYSFLAGS: u32 = 0xf000;
+
+pub const NOTE_LOWAT: u32 = 0x00000001;
+pub const NOTE_DELETE: u32 = 0x00000001;
+pub const NOTE_WRITE: u32 = 0x00000002;
+pub const NOTE_EXTEND: u32 = 0x00000004;
+pub const NOTE_ATTRIB: u32 = 0x00000008;
+pub const NOTE_LINK: u32 = 0x00000010;
+pub const NOTE_RENAME: u32 = 0x00000020;
+pub const NOTE_REVOKE: u32 = 0x00000040;
+pub const NOTE_EXIT: u32 = 0x80000000;
+pub const NOTE_FORK: u32 = 0x40000000;
+pub const NOTE_EXEC: u32 = 0x20000000;
+pub const NOTE_PDATAMASK: u32 = 0x000fffff;
+pub const NOTE_PCTRLMASK: u32 = 0xf0000000;
+pub const NOTE_TRACK: u32 = 0x00000001;
+pub const NOTE_TRACKERR: u32 = 0x00000002;
+pub const NOTE_CHILD: u32 = 0x00000004;
pub const TMP_MAX : ::c_uint = 308915776;
@@ -1492,6 +1513,9 @@ extern {
#[link_name = "__lutimes50"]
pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int;
+ #[link_name = "__gettimeofday50"]
+ pub fn gettimeofday(tp: *mut ::timeval,
+ tz: *mut ::c_void) -> ::c_int;
pub fn getnameinfo(sa: *const ::sockaddr,
salen: ::socklen_t,
host: *mut ::c_char,