diff --git a/Cargo.toml b/Cargo.toml index 107ee46ea3909..353265b056f44 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -4,7 +4,7 @@ version = "1.0.0-alpha.1" authors = ["The Rust Project Developers"] license = "MIT OR Apache-2.0" readme = "README.md" -edition = "2015" +edition = "2021" repository = "https://github.com/rust-lang/libc" homepage = "https://github.com/rust-lang/libc" documentation = "https://docs.rs/libc/" diff --git a/src/fuchsia/aarch64.rs b/src/fuchsia/aarch64.rs index 33e3934d661ad..ddcd9d3f5631e 100644 --- a/src/fuchsia/aarch64.rs +++ b/src/fuchsia/aarch64.rs @@ -1,67 +1,69 @@ +use crate::{c_int, c_long, c_uint, c_ulong, c_ulonglong, c_ushort, off_t, size_t}; + pub type c_char = u8; -pub type __u64 = ::c_ulonglong; +pub type __u64 = c_ulonglong; pub type wchar_t = u32; -pub type nlink_t = ::c_ulong; -pub type blksize_t = ::c_long; +pub type nlink_t = c_ulong; +pub type blksize_t = c_long; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad0: ::c_ulong, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad1: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_uint; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad0: c_ulong, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad1: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_uint; 2], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad0: ::c_ulong, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad1: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_uint; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad0: c_ulong, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad1: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_uint; 2], } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } } // From https://cs.opensource.google/fuchsia/fuchsia/+/main:zircon/third_party/ulib/musl/include/bits/signal.h;l=20-21;drc=0827b18ab9540c46f8037f407d17ea15a79e9ba7 -pub const MINSIGSTKSZ: ::size_t = 6144; -pub const SIGSTKSZ: ::size_t = 12288; +pub const MINSIGSTKSZ: size_t = 6144; +pub const SIGSTKSZ: size_t = 12288; diff --git a/src/fuchsia/mod.rs b/src/fuchsia/mod.rs index 8d0010bbc12b6..7633b3efe4ce0 100644 --- a/src/fuchsia/mod.rs +++ b/src/fuchsia/mod.rs @@ -3,7 +3,7 @@ //! More functions and definitions can be found in the more specific modules //! according to the platform in question. -use c_void; +use crate::c_void; // PUB_TYPE @@ -20,7 +20,7 @@ pub type c_ulonglong = u64; pub type intmax_t = i64; pub type uintmax_t = u64; -pub type locale_t = *mut ::c_void; +pub type locale_t = *mut c_void; pub type size_t = usize; pub type ptrdiff_t = isize; @@ -33,15 +33,15 @@ pub type uid_t = u32; pub type gid_t = u32; pub type in_addr_t = u32; pub type in_port_t = u16; -pub type sighandler_t = ::size_t; -pub type cc_t = ::c_uchar; +pub type sighandler_t = size_t; +pub type cc_t = c_uchar; pub type sa_family_t = u16; -pub type pthread_key_t = ::c_uint; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; -pub type clockid_t = ::c_int; -pub type key_t = ::c_int; -pub type id_t = ::c_uint; +pub type pthread_key_t = c_uint; +pub type speed_t = c_uint; +pub type tcflag_t = c_uint; +pub type clockid_t = c_int; +pub type key_t = c_int; +pub type id_t = c_uint; pub type useconds_t = u32; pub type dev_t = u64; pub type socklen_t = u32; @@ -51,17 +51,17 @@ pub type ino64_t = u64; pub type off64_t = i64; pub type blkcnt64_t = i64; pub type rlim64_t = u64; -pub type mqd_t = ::c_int; -pub type nfds_t = ::c_ulong; -pub type nl_item = ::c_int; -pub type idtype_t = ::c_uint; -pub type loff_t = ::c_longlong; - -pub type __u8 = ::c_uchar; -pub type __u16 = ::c_ushort; -pub type __s16 = ::c_short; -pub type __u32 = ::c_uint; -pub type __s32 = ::c_int; +pub type mqd_t = c_int; +pub type nfds_t = c_ulong; +pub type nl_item = c_int; +pub type idtype_t = c_uint; +pub type loff_t = c_longlong; + +pub type __u8 = c_uchar; +pub type __u16 = c_ushort; +pub type __s16 = c_short; +pub type __u32 = c_uint; +pub type __s32 = c_int; pub type Elf32_Half = u16; pub type Elf32_Word = u32; @@ -81,12 +81,12 @@ pub type ino_t = u64; pub type off_t = i64; pub type blkcnt_t = i64; -pub type shmatt_t = ::c_ulong; -pub type msgqnum_t = ::c_ulong; -pub type msglen_t = ::c_ulong; -pub type fsblkcnt_t = ::c_ulonglong; -pub type fsfilcnt_t = ::c_ulonglong; -pub type rlim_t = ::c_ulonglong; +pub type shmatt_t = c_ulong; +pub type msgqnum_t = c_ulong; +pub type msglen_t = c_ulong; +pub type fsblkcnt_t = c_ulonglong; +pub type fsfilcnt_t = c_ulonglong; +pub type rlim_t = c_ulonglong; pub type c_long = i64; pub type c_ulong = u64; @@ -95,16 +95,16 @@ pub type c_ulong = u64; // Presumably these should be `()` or an `extern type` (when that stabilizes). #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum DIR {} -impl ::Copy for DIR {} -impl ::Clone for DIR { +impl Copy for DIR {} +impl Clone for DIR { fn clone(&self) -> DIR { *self } @@ -112,8 +112,8 @@ impl ::Clone for DIR { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos64_t {} // FIXME: fill this out with a struct -impl ::Copy for fpos64_t {} -impl ::Clone for fpos64_t { +impl Copy for fpos64_t {} +impl Clone for fpos64_t { fn clone(&self) -> fpos64_t { *self } @@ -123,10 +123,10 @@ impl ::Clone for fpos64_t { s! { pub struct group { - pub gr_name: *mut ::c_char, - pub gr_passwd: *mut ::c_char, - pub gr_gid: ::gid_t, - pub gr_mem: *mut *mut ::c_char, + pub gr_name: *mut c_char, + pub gr_passwd: *mut c_char, + pub gr_gid: crate::gid_t, + pub gr_mem: *mut *mut c_char, } pub struct utimbuf { @@ -141,7 +141,7 @@ s! { pub struct timespec { pub tv_sec: time_t, - pub tv_nsec: ::c_long, + pub tv_nsec: c_long, } // FIXME: the rlimit and rusage related functions and types don't exist @@ -214,157 +214,157 @@ s! { pub struct ip_mreqn { pub imr_multiaddr: in_addr, pub imr_address: in_addr, - pub imr_ifindex: ::c_int, + pub imr_ifindex: c_int, } pub struct ipv6_mreq { pub ipv6mr_multiaddr: in6_addr, - pub ipv6mr_interface: ::c_uint, + pub ipv6mr_interface: c_uint, } pub struct hostent { - pub h_name: *mut ::c_char, - pub h_aliases: *mut *mut ::c_char, - pub h_addrtype: ::c_int, - pub h_length: ::c_int, - pub h_addr_list: *mut *mut ::c_char, + pub h_name: *mut c_char, + pub h_aliases: *mut *mut c_char, + pub h_addrtype: c_int, + pub h_length: c_int, + pub h_addr_list: *mut *mut c_char, } pub struct iovec { - pub iov_base: *mut ::c_void, - pub iov_len: ::size_t, + pub iov_base: *mut c_void, + pub iov_len: size_t, } pub struct pollfd { - pub fd: ::c_int, - pub events: ::c_short, - pub revents: ::c_short, + pub fd: c_int, + pub events: c_short, + pub revents: c_short, } pub struct winsize { - pub ws_row: ::c_ushort, - pub ws_col: ::c_ushort, - pub ws_xpixel: ::c_ushort, - pub ws_ypixel: ::c_ushort, + pub ws_row: c_ushort, + pub ws_col: c_ushort, + pub ws_xpixel: c_ushort, + pub ws_ypixel: c_ushort, } pub struct linger { - pub l_onoff: ::c_int, - pub l_linger: ::c_int, + pub l_onoff: c_int, + pub l_linger: c_int, } pub struct sigval { // Actually a union of an int and a void* - pub sival_ptr: *mut ::c_void, + pub sival_ptr: *mut c_void, } // pub struct itimerval { - pub it_interval: ::timeval, - pub it_value: ::timeval, + pub it_interval: crate::timeval, + pub it_value: crate::timeval, } // pub struct tms { - pub tms_utime: ::clock_t, - pub tms_stime: ::clock_t, - pub tms_cutime: ::clock_t, - pub tms_cstime: ::clock_t, + pub tms_utime: crate::clock_t, + pub tms_stime: crate::clock_t, + pub tms_cutime: crate::clock_t, + pub tms_cstime: crate::clock_t, } pub struct servent { - pub s_name: *mut ::c_char, - pub s_aliases: *mut *mut ::c_char, - pub s_port: ::c_int, - pub s_proto: *mut ::c_char, + pub s_name: *mut c_char, + pub s_aliases: *mut *mut c_char, + pub s_port: c_int, + pub s_proto: *mut c_char, } pub struct protoent { - pub p_name: *mut ::c_char, - pub p_aliases: *mut *mut ::c_char, - pub p_proto: ::c_int, + pub p_name: *mut c_char, + pub p_aliases: *mut *mut c_char, + pub p_proto: c_int, } pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_sigevent: ::sigevent, - __td: *mut ::c_void, - __lock: [::c_int; 2], - __err: ::c_int, - __ret: ::ssize_t, + pub aio_fildes: c_int, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_sigevent: crate::sigevent, + __td: *mut c_void, + __lock: [c_int; 2], + __err: c_int, + __ret: ssize_t, pub aio_offset: off_t, - __next: *mut ::c_void, - __prev: *mut ::c_void, + __next: *mut c_void, + __prev: *mut c_void, #[cfg(target_pointer_width = "32")] - __dummy4: [::c_char; 24], + __dummy4: [c_char; 24], #[cfg(target_pointer_width = "64")] - __dummy4: [::c_char; 16], + __dummy4: [c_char; 16], } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - pub __c_ispeed: ::speed_t, - pub __c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub __c_ispeed: crate::speed_t, + pub __c_ospeed: crate::speed_t, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct ucred { - pub pid: ::pid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, + pub pid: crate::pid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, } pub struct sockaddr { pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_in { pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [u8; 8], } pub struct sockaddr_in6 { pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, pub ai_addrlen: socklen_t, - pub ai_addr: *mut ::sockaddr, + pub ai_addr: *mut crate::sockaddr, pub ai_canonname: *mut c_char, @@ -372,46 +372,46 @@ s! { } pub struct sockaddr_ll { - pub sll_family: ::c_ushort, - pub sll_protocol: ::c_ushort, - pub sll_ifindex: ::c_int, - pub sll_hatype: ::c_ushort, - pub sll_pkttype: ::c_uchar, - pub sll_halen: ::c_uchar, - pub sll_addr: [::c_uchar; 8], + pub sll_family: c_ushort, + pub sll_protocol: c_ushort, + pub sll_ifindex: c_int, + pub sll_hatype: c_ushort, + pub sll_pkttype: c_uchar, + pub sll_halen: c_uchar, + pub sll_addr: [c_uchar; 8], } pub struct fd_set { - fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE], + fds_bits: [c_ulong; FD_SETSIZE as usize / ULONG_SIZE], } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *const ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_long, + pub tm_zone: *const c_char, } pub struct sched_param { - pub sched_priority: ::c_int, - pub sched_ss_low_priority: ::c_int, - pub sched_ss_repl_period: ::timespec, - pub sched_ss_init_budget: ::timespec, - pub sched_ss_max_repl: ::c_int, + pub sched_priority: c_int, + pub sched_ss_low_priority: c_int, + pub sched_ss_repl_period: crate::timespec, + pub sched_ss_init_budget: crate::timespec, + pub sched_ss_max_repl: c_int, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct epoll_event { @@ -420,30 +420,30 @@ s! { } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct rlimit64 { @@ -452,68 +452,68 @@ s! { } pub struct glob_t { - pub gl_pathc: ::size_t, + pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, + pub gl_offs: size_t, + pub gl_flags: c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, pub ifa_name: *mut c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union - pub ifa_data: *mut ::c_void, + pub ifa_flags: c_uint, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union + pub ifa_data: *mut c_void, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct spwd { - pub sp_namp: *mut ::c_char, - pub sp_pwdp: *mut ::c_char, - pub sp_lstchg: ::c_long, - pub sp_min: ::c_long, - pub sp_max: ::c_long, - pub sp_warn: ::c_long, - pub sp_inact: ::c_long, - pub sp_expire: ::c_long, - pub sp_flag: ::c_ulong, + pub sp_namp: *mut c_char, + pub sp_pwdp: *mut c_char, + pub sp_lstchg: c_long, + pub sp_min: c_long, + pub sp_max: c_long, + pub sp_warn: c_long, + pub sp_inact: c_long, + pub sp_expire: c_long, + pub sp_flag: c_ulong, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, #[cfg(target_endian = "little")] - pub f_fsid: ::c_ulong, + pub f_fsid: c_ulong, #[cfg(all(target_pointer_width = "32", not(target_arch = "x86_64")))] - __f_unused: ::c_int, + __f_unused: c_int, #[cfg(target_endian = "big")] - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct dqblk { @@ -554,12 +554,12 @@ s! { } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct fsid_t { - __val: [::c_int; 2], + __val: [c_int; 2], } pub struct cpu_set_t { @@ -570,131 +570,131 @@ s! { } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } // System V IPC pub struct msginfo { - pub msgpool: ::c_int, - pub msgmap: ::c_int, - pub msgmax: ::c_int, - pub msgmnb: ::c_int, - pub msgmni: ::c_int, - pub msgssz: ::c_int, - pub msgtql: ::c_int, - pub msgseg: ::c_ushort, + pub msgpool: c_int, + pub msgmap: c_int, + pub msgmax: c_int, + pub msgmnb: c_int, + pub msgmni: c_int, + pub msgssz: c_int, + pub msgtql: c_int, + pub msgseg: c_ushort, } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::c_uint, + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct input_event { - pub time: ::timeval, - pub type_: ::__u16, - pub code: ::__u16, - pub value: ::__s32, + pub time: crate::timeval, + pub type_: crate::__u16, + pub code: crate::__u16, + pub value: crate::__s32, } pub struct input_id { - pub bustype: ::__u16, - pub vendor: ::__u16, - pub product: ::__u16, - pub version: ::__u16, + pub bustype: crate::__u16, + pub vendor: crate::__u16, + pub product: crate::__u16, + pub version: crate::__u16, } pub struct input_absinfo { - pub value: ::__s32, - pub minimum: ::__s32, - pub maximum: ::__s32, - pub fuzz: ::__s32, - pub flat: ::__s32, - pub resolution: ::__s32, + pub value: crate::__s32, + pub minimum: crate::__s32, + pub maximum: crate::__s32, + pub fuzz: crate::__s32, + pub flat: crate::__s32, + pub resolution: crate::__s32, } pub struct input_keymap_entry { - pub flags: ::__u8, - pub len: ::__u8, - pub index: ::__u16, - pub keycode: ::__u32, - pub scancode: [::__u8; 32], + pub flags: crate::__u8, + pub len: crate::__u8, + pub index: crate::__u16, + pub keycode: crate::__u32, + pub scancode: [crate::__u8; 32], } pub struct input_mask { - pub type_: ::__u32, - pub codes_size: ::__u32, - pub codes_ptr: ::__u64, + pub type_: crate::__u32, + pub codes_size: crate::__u32, + pub codes_ptr: crate::__u64, } pub struct ff_replay { - pub length: ::__u16, - pub delay: ::__u16, + pub length: crate::__u16, + pub delay: crate::__u16, } pub struct ff_trigger { - pub button: ::__u16, - pub interval: ::__u16, + pub button: crate::__u16, + pub interval: crate::__u16, } pub struct ff_envelope { - pub attack_length: ::__u16, - pub attack_level: ::__u16, - pub fade_length: ::__u16, - pub fade_level: ::__u16, + pub attack_length: crate::__u16, + pub attack_level: crate::__u16, + pub fade_length: crate::__u16, + pub fade_level: crate::__u16, } pub struct ff_constant_effect { - pub level: ::__s16, + pub level: crate::__s16, pub envelope: ff_envelope, } pub struct ff_ramp_effect { - pub start_level: ::__s16, - pub end_level: ::__s16, + pub start_level: crate::__s16, + pub end_level: crate::__s16, pub envelope: ff_envelope, } pub struct ff_condition_effect { - pub right_saturation: ::__u16, - pub left_saturation: ::__u16, + pub right_saturation: crate::__u16, + pub left_saturation: crate::__u16, - pub right_coeff: ::__s16, - pub left_coeff: ::__s16, + pub right_coeff: crate::__s16, + pub left_coeff: crate::__s16, - pub deadband: ::__u16, - pub center: ::__s16, + pub deadband: crate::__u16, + pub center: crate::__s16, } pub struct ff_periodic_effect { - pub waveform: ::__u16, - pub period: ::__u16, - pub magnitude: ::__s16, - pub offset: ::__s16, - pub phase: ::__u16, + pub waveform: crate::__u16, + pub period: crate::__u16, + pub magnitude: crate::__s16, + pub offset: crate::__s16, + pub phase: crate::__u16, pub envelope: ff_envelope, - pub custom_len: ::__u32, - pub custom_data: *mut ::__s16, + pub custom_len: crate::__u32, + pub custom_data: *mut crate::__s16, } pub struct ff_rumble_effect { - pub strong_magnitude: ::__u16, - pub weak_magnitude: ::__u16, + pub strong_magnitude: crate::__u16, + pub weak_magnitude: crate::__u16, } pub struct ff_effect { - pub type_: ::__u16, - pub id: ::__s16, - pub direction: ::__u16, + pub type_: crate::__u16, + pub id: crate::__s16, + pub direction: crate::__u16, pub trigger: ff_trigger, pub replay: ff_replay, // FIXME(1.0): this is actually a union @@ -710,7 +710,7 @@ s! { #[cfg(target_pointer_width = "32")] pub dlpi_addr: Elf32_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, #[cfg(target_pointer_width = "64")] pub dlpi_phdr: *const Elf64_Phdr, @@ -722,10 +722,10 @@ s! { #[cfg(target_pointer_width = "32")] pub dlpi_phnum: Elf32_Half, - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, - pub dlpi_tls_modid: ::size_t, - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, + pub dlpi_tls_modid: size_t, + pub dlpi_tls_data: *mut c_void, } pub struct Elf32_Phdr { @@ -751,39 +751,39 @@ s! { } pub struct statfs64 { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_frsize: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct pthread_attr_t { @@ -791,96 +791,96 @@ s! { } pub struct sigset_t { - __val: [::c_ulong; 16], + __val: [c_ulong; 16], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_frsize: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 4], } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - __pad1: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - __pad2: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + __pad1: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + __pad2: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub __pad1: ::c_int, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub __pad1: c_int, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct sem_t { - __val: [::c_int; 8], + __val: [c_int; 8], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct termios2 { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; 19], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; 19], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } #[cfg_attr( @@ -892,73 +892,73 @@ s! { repr(align(8)) )] pub struct pthread_mutexattr_t { - size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], } #[cfg_attr(target_pointer_width = "32", repr(align(4)))] #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct pthread_rwlockattr_t { - size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T], } #[repr(align(4))] pub struct pthread_condattr_t { - size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], } } s_no_extra_traits! { pub struct sysinfo { - pub uptime: ::c_ulong, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub __reserved: [::c_char; 256], + pub uptime: c_ulong, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub __reserved: [c_char; 256], } pub struct sockaddr_un { pub sun_family: sa_family_t, - pub sun_path: [::c_char; 108], + pub sun_path: [c_char; 108], } pub struct sockaddr_storage { pub ss_family: sa_family_t, __ss_pad2: [u8; 128 - 2 - 8], - __ss_align: ::size_t, + __ss_align: size_t, } pub struct utsname { - pub sysname: [::c_char; 65], - pub nodename: [::c_char; 65], - pub release: [::c_char; 65], - pub version: [::c_char; 65], - pub machine: [::c_char; 65], - pub domainname: [::c_char; 65], + pub sysname: [c_char; 65], + pub nodename: [c_char; 65], + pub release: [c_char; 65], + pub version: [c_char; 65], + pub machine: [c_char; 65], + pub domainname: [c_char; 65], } pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_ino: crate::ino_t, + pub d_off: off_t, + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct dirent64 { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_ino: crate::ino64_t, + pub d_off: off64_t, + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } // x32 compatibility @@ -976,31 +976,31 @@ s_no_extra_traits! { pad: [i64; 4], #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_flags: ::c_long, + pub mq_flags: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_maxmsg: ::c_long, + pub mq_maxmsg: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_msgsize: ::c_long, + pub mq_msgsize: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_curmsgs: ::c_long, + pub mq_curmsgs: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pad: [::c_long; 4], + pad: [c_long; 4], } pub struct sockaddr_nl { - pub nl_family: ::sa_family_t, - nl_pad: ::c_ushort, + pub nl_family: crate::sa_family_t, + nl_pad: c_ushort, pub nl_pid: u32, pub nl_groups: u32, } pub struct sigevent { - pub sigev_value: ::sigval, - pub sigev_signo: ::c_int, - pub sigev_notify: ::c_int, - pub sigev_notify_function: fn(::sigval), + pub sigev_value: crate::sigval, + pub sigev_signo: c_int, + pub sigev_notify: c_int, + pub sigev_notify_function: fn(crate::sigval), pub sigev_notify_attributes: *mut pthread_attr_t, - pub __pad: [::c_char; 56 - 3 * 8], + pub __pad: [c_char; 56 - 3 * 8], } #[cfg_attr( @@ -1018,7 +1018,7 @@ s_no_extra_traits! { repr(align(8)) )] pub struct pthread_mutex_t { - size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEX_T], } #[cfg_attr( @@ -1036,7 +1036,7 @@ s_no_extra_traits! { repr(align(8)) )] pub struct pthread_rwlock_t { - size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T], } #[cfg_attr(target_pointer_width = "32", repr(align(4)))] @@ -1044,7 +1044,7 @@ s_no_extra_traits! { #[cfg_attr(target_arch = "x86", repr(align(4)))] #[cfg_attr(not(target_arch = "x86"), repr(align(8)))] pub struct pthread_cond_t { - size: [u8; ::__SIZEOF_PTHREAD_COND_T], + size: [u8; crate::__SIZEOF_PTHREAD_COND_T], } } @@ -1073,8 +1073,8 @@ cfg_if! { } } impl Eq for sysinfo {} - impl ::fmt::Debug for sysinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sysinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sysinfo") .field("uptime", &self.uptime) .field("loads", &self.loads) @@ -1093,8 +1093,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sysinfo { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sysinfo { + fn hash(&self, state: &mut H) { self.uptime.hash(state); self.loads.hash(state); self.totalram.hash(state); @@ -1123,16 +1123,16 @@ cfg_if! { } } impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_family", &self.sun_family) // FIXME: .field("sun_path", &self.sun_path) .finish() } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_family.hash(state); self.sun_path.hash(state); } @@ -1150,8 +1150,8 @@ cfg_if! { } } impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_family", &self.ss_family) .field("__ss_align", &self.__ss_align) @@ -1159,8 +1159,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_family.hash(state); self.__ss_align.hash(state); self.__ss_pad2.hash(state); @@ -1196,8 +1196,8 @@ cfg_if! { } } impl Eq for utsname {} - impl ::fmt::Debug for utsname { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utsname { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utsname") // FIXME: .field("sysname", &self.sysname) // FIXME: .field("nodename", &self.nodename) @@ -1207,8 +1207,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for utsname { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utsname { + fn hash(&self, state: &mut H) { self.sysname.hash(state); self.nodename.hash(state); self.release.hash(state); @@ -1231,8 +1231,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -1242,8 +1242,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -1266,8 +1266,8 @@ cfg_if! { } } impl Eq for dirent64 {} - impl ::fmt::Debug for dirent64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent64 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent64") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -1277,8 +1277,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent64 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent64 { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -1296,8 +1296,8 @@ cfg_if! { } } impl Eq for mq_attr {} - impl ::fmt::Debug for mq_attr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mq_attr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mq_attr") .field("mq_flags", &self.mq_flags) .field("mq_maxmsg", &self.mq_maxmsg) @@ -1306,8 +1306,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mq_attr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mq_attr { + fn hash(&self, state: &mut H) { self.mq_flags.hash(state); self.mq_maxmsg.hash(state); self.mq_msgsize.hash(state); @@ -1323,8 +1323,8 @@ cfg_if! { } } impl Eq for sockaddr_nl {} - impl ::fmt::Debug for sockaddr_nl { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_nl { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_nl") .field("nl_family", &self.nl_family) .field("nl_pid", &self.nl_pid) @@ -1332,8 +1332,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_nl { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_nl { + fn hash(&self, state: &mut H) { self.nl_family.hash(state); self.nl_pid.hash(state); self.nl_groups.hash(state); @@ -1350,8 +1350,8 @@ cfg_if! { } } impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_value", &self.sigev_value) .field("sigev_signo", &self.sigev_signo) @@ -1361,8 +1361,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_value.hash(state); self.sigev_signo.hash(state); self.sigev_notify.hash(state); @@ -1377,15 +1377,15 @@ cfg_if! { } } impl Eq for pthread_cond_t {} - impl ::fmt::Debug for pthread_cond_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_cond_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_cond_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_cond_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_cond_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1396,15 +1396,15 @@ cfg_if! { } } impl Eq for pthread_mutex_t {} - impl ::fmt::Debug for pthread_mutex_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_mutex_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_mutex_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_mutex_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_mutex_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1415,15 +1415,15 @@ cfg_if! { } } impl Eq for pthread_rwlock_t {} - impl ::fmt::Debug for pthread_rwlock_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_rwlock_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_rwlock_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_rwlock_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_rwlock_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1448,530 +1448,530 @@ pub const DT_REG: u8 = 8; pub const DT_LNK: u8 = 10; pub const DT_SOCK: u8 = 12; -pub const FD_CLOEXEC: ::c_int = 0x1; - -pub const USRQUOTA: ::c_int = 0; -pub const GRPQUOTA: ::c_int = 1; - -pub const SIGIOT: ::c_int = 6; - -pub const S_ISUID: ::mode_t = 0o4000; -pub const S_ISGID: ::mode_t = 0o2000; -pub const S_ISVTX: ::mode_t = 0o1000; - -pub const IF_NAMESIZE: ::size_t = 16; -pub const IFNAMSIZ: ::size_t = IF_NAMESIZE; - -pub const LOG_EMERG: ::c_int = 0; -pub const LOG_ALERT: ::c_int = 1; -pub const LOG_CRIT: ::c_int = 2; -pub const LOG_ERR: ::c_int = 3; -pub const LOG_WARNING: ::c_int = 4; -pub const LOG_NOTICE: ::c_int = 5; -pub const LOG_INFO: ::c_int = 6; -pub const LOG_DEBUG: ::c_int = 7; - -pub const LOG_KERN: ::c_int = 0; -pub const LOG_USER: ::c_int = 1 << 3; -pub const LOG_MAIL: ::c_int = 2 << 3; -pub const LOG_DAEMON: ::c_int = 3 << 3; -pub const LOG_AUTH: ::c_int = 4 << 3; -pub const LOG_SYSLOG: ::c_int = 5 << 3; -pub const LOG_LPR: ::c_int = 6 << 3; -pub const LOG_NEWS: ::c_int = 7 << 3; -pub const LOG_UUCP: ::c_int = 8 << 3; -pub const LOG_LOCAL0: ::c_int = 16 << 3; -pub const LOG_LOCAL1: ::c_int = 17 << 3; -pub const LOG_LOCAL2: ::c_int = 18 << 3; -pub const LOG_LOCAL3: ::c_int = 19 << 3; -pub const LOG_LOCAL4: ::c_int = 20 << 3; -pub const LOG_LOCAL5: ::c_int = 21 << 3; -pub const LOG_LOCAL6: ::c_int = 22 << 3; -pub const LOG_LOCAL7: ::c_int = 23 << 3; - -pub const LOG_PID: ::c_int = 0x01; -pub const LOG_CONS: ::c_int = 0x02; -pub const LOG_ODELAY: ::c_int = 0x04; -pub const LOG_NDELAY: ::c_int = 0x08; -pub const LOG_NOWAIT: ::c_int = 0x10; - -pub const LOG_PRIMASK: ::c_int = 7; -pub const LOG_FACMASK: ::c_int = 0x3f8; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; - -pub const PRIO_MIN: ::c_int = -20; -pub const PRIO_MAX: ::c_int = 20; - -pub const IPPROTO_ICMP: ::c_int = 1; -pub const IPPROTO_ICMPV6: ::c_int = 58; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_UDP: ::c_int = 17; -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; +pub const FD_CLOEXEC: c_int = 0x1; + +pub const USRQUOTA: c_int = 0; +pub const GRPQUOTA: c_int = 1; + +pub const SIGIOT: c_int = 6; + +pub const S_ISUID: crate::mode_t = 0o4000; +pub const S_ISGID: crate::mode_t = 0o2000; +pub const S_ISVTX: crate::mode_t = 0o1000; + +pub const IF_NAMESIZE: size_t = 16; +pub const IFNAMSIZ: size_t = IF_NAMESIZE; + +pub const LOG_EMERG: c_int = 0; +pub const LOG_ALERT: c_int = 1; +pub const LOG_CRIT: c_int = 2; +pub const LOG_ERR: c_int = 3; +pub const LOG_WARNING: c_int = 4; +pub const LOG_NOTICE: c_int = 5; +pub const LOG_INFO: c_int = 6; +pub const LOG_DEBUG: c_int = 7; + +pub const LOG_KERN: c_int = 0; +pub const LOG_USER: c_int = 1 << 3; +pub const LOG_MAIL: c_int = 2 << 3; +pub const LOG_DAEMON: c_int = 3 << 3; +pub const LOG_AUTH: c_int = 4 << 3; +pub const LOG_SYSLOG: c_int = 5 << 3; +pub const LOG_LPR: c_int = 6 << 3; +pub const LOG_NEWS: c_int = 7 << 3; +pub const LOG_UUCP: c_int = 8 << 3; +pub const LOG_LOCAL0: c_int = 16 << 3; +pub const LOG_LOCAL1: c_int = 17 << 3; +pub const LOG_LOCAL2: c_int = 18 << 3; +pub const LOG_LOCAL3: c_int = 19 << 3; +pub const LOG_LOCAL4: c_int = 20 << 3; +pub const LOG_LOCAL5: c_int = 21 << 3; +pub const LOG_LOCAL6: c_int = 22 << 3; +pub const LOG_LOCAL7: c_int = 23 << 3; + +pub const LOG_PID: c_int = 0x01; +pub const LOG_CONS: c_int = 0x02; +pub const LOG_ODELAY: c_int = 0x04; +pub const LOG_NDELAY: c_int = 0x08; +pub const LOG_NOWAIT: c_int = 0x10; + +pub const LOG_PRIMASK: c_int = 7; +pub const LOG_FACMASK: c_int = 0x3f8; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; + +pub const PRIO_MIN: c_int = -20; +pub const PRIO_MAX: c_int = 20; + +pub const IPPROTO_ICMP: c_int = 1; +pub const IPPROTO_ICMPV6: c_int = 58; +pub const IPPROTO_TCP: c_int = 6; +pub const IPPROTO_UDP: c_int = 17; +pub const IPPROTO_IP: c_int = 0; +pub const IPPROTO_IPV6: c_int = 41; pub const INADDR_LOOPBACK: in_addr_t = 2130706433; pub const INADDR_ANY: in_addr_t = 0; pub const INADDR_BROADCAST: in_addr_t = 4294967295; pub const INADDR_NONE: in_addr_t = 4294967295; -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 2147483647; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; + +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; // Linux-specific fcntls -pub const F_SETLEASE: ::c_int = 1024; -pub const F_GETLEASE: ::c_int = 1025; -pub const F_NOTIFY: ::c_int = 1026; -pub const F_CANCELLK: ::c_int = 1029; -pub const F_DUPFD_CLOEXEC: ::c_int = 1030; -pub const F_SETPIPE_SZ: ::c_int = 1031; -pub const F_GETPIPE_SZ: ::c_int = 1032; -pub const F_ADD_SEALS: ::c_int = 1033; -pub const F_GET_SEALS: ::c_int = 1034; - -pub const F_SEAL_SEAL: ::c_int = 0x0001; -pub const F_SEAL_SHRINK: ::c_int = 0x0002; -pub const F_SEAL_GROW: ::c_int = 0x0004; -pub const F_SEAL_WRITE: ::c_int = 0x0008; +pub const F_SETLEASE: c_int = 1024; +pub const F_GETLEASE: c_int = 1025; +pub const F_NOTIFY: c_int = 1026; +pub const F_CANCELLK: c_int = 1029; +pub const F_DUPFD_CLOEXEC: c_int = 1030; +pub const F_SETPIPE_SZ: c_int = 1031; +pub const F_GETPIPE_SZ: c_int = 1032; +pub const F_ADD_SEALS: c_int = 1033; +pub const F_GET_SEALS: c_int = 1034; + +pub const F_SEAL_SEAL: c_int = 0x0001; +pub const F_SEAL_SHRINK: c_int = 0x0002; +pub const F_SEAL_GROW: c_int = 0x0004; +pub const F_SEAL_WRITE: c_int = 0x0008; // FIXME(#235): Include file sealing fcntls once we have a way to verify them. -pub const SIGTRAP: ::c_int = 5; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_MONOTONIC: ::clockid_t = 1; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3; -pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; -pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5; -pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6; -pub const CLOCK_BOOTTIME: ::clockid_t = 7; -pub const CLOCK_REALTIME_ALARM: ::clockid_t = 8; -pub const CLOCK_BOOTTIME_ALARM: ::clockid_t = 9; -pub const CLOCK_SGI_CYCLE: ::clockid_t = 10; -pub const CLOCK_TAI: ::clockid_t = 11; -pub const TIMER_ABSTIME: ::c_int = 1; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_LOCKS: ::c_int = 10; -pub const RLIMIT_SIGPENDING: ::c_int = 11; -pub const RLIMIT_MSGQUEUE: ::c_int = 12; -pub const RLIMIT_NICE: ::c_int = 13; -pub const RLIMIT_RTPRIO: ::c_int = 14; - -pub const RUSAGE_SELF: ::c_int = 0; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; - -pub const S_IFIFO: ::mode_t = 0o1_0000; -pub const S_IFCHR: ::mode_t = 0o2_0000; -pub const S_IFBLK: ::mode_t = 0o6_0000; -pub const S_IFDIR: ::mode_t = 0o4_0000; -pub const S_IFREG: ::mode_t = 0o10_0000; -pub const S_IFLNK: ::mode_t = 0o12_0000; -pub const S_IFSOCK: ::mode_t = 0o14_0000; -pub const S_IFMT: ::mode_t = 0o17_0000; -pub const S_IRWXU: ::mode_t = 0o0700; -pub const S_IXUSR: ::mode_t = 0o0100; -pub const S_IWUSR: ::mode_t = 0o0200; -pub const S_IRUSR: ::mode_t = 0o0400; -pub const S_IRWXG: ::mode_t = 0o0070; -pub const S_IXGRP: ::mode_t = 0o0010; -pub const S_IWGRP: ::mode_t = 0o0020; -pub const S_IRGRP: ::mode_t = 0o0040; -pub const S_IRWXO: ::mode_t = 0o0007; -pub const S_IXOTH: ::mode_t = 0o0001; -pub const S_IWOTH: ::mode_t = 0o0002; -pub const S_IROTH: ::mode_t = 0o0004; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const LC_CTYPE: ::c_int = 0; -pub const LC_NUMERIC: ::c_int = 1; -pub const LC_TIME: ::c_int = 2; -pub const LC_COLLATE: ::c_int = 3; -pub const LC_MONETARY: ::c_int = 4; -pub const LC_MESSAGES: ::c_int = 5; -pub const LC_ALL: ::c_int = 6; -pub const LC_CTYPE_MASK: ::c_int = 1 << LC_CTYPE; -pub const LC_NUMERIC_MASK: ::c_int = 1 << LC_NUMERIC; -pub const LC_TIME_MASK: ::c_int = 1 << LC_TIME; -pub const LC_COLLATE_MASK: ::c_int = 1 << LC_COLLATE; -pub const LC_MONETARY_MASK: ::c_int = 1 << LC_MONETARY; -pub const LC_MESSAGES_MASK: ::c_int = 1 << LC_MESSAGES; +pub const SIGTRAP: c_int = 5; + +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 1; + +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_MONOTONIC: crate::clockid_t = 1; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 3; +pub const CLOCK_MONOTONIC_RAW: crate::clockid_t = 4; +pub const CLOCK_REALTIME_COARSE: crate::clockid_t = 5; +pub const CLOCK_MONOTONIC_COARSE: crate::clockid_t = 6; +pub const CLOCK_BOOTTIME: crate::clockid_t = 7; +pub const CLOCK_REALTIME_ALARM: crate::clockid_t = 8; +pub const CLOCK_BOOTTIME_ALARM: crate::clockid_t = 9; +pub const CLOCK_SGI_CYCLE: crate::clockid_t = 10; +pub const CLOCK_TAI: crate::clockid_t = 11; +pub const TIMER_ABSTIME: c_int = 1; + +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_LOCKS: c_int = 10; +pub const RLIMIT_SIGPENDING: c_int = 11; +pub const RLIMIT_MSGQUEUE: c_int = 12; +pub const RLIMIT_NICE: c_int = 13; +pub const RLIMIT_RTPRIO: c_int = 14; + +pub const RUSAGE_SELF: c_int = 0; + +pub const O_RDONLY: c_int = 0; +pub const O_WRONLY: c_int = 1; +pub const O_RDWR: c_int = 2; + +pub const S_IFIFO: crate::mode_t = 0o1_0000; +pub const S_IFCHR: crate::mode_t = 0o2_0000; +pub const S_IFBLK: crate::mode_t = 0o6_0000; +pub const S_IFDIR: crate::mode_t = 0o4_0000; +pub const S_IFREG: crate::mode_t = 0o10_0000; +pub const S_IFLNK: crate::mode_t = 0o12_0000; +pub const S_IFSOCK: crate::mode_t = 0o14_0000; +pub const S_IFMT: crate::mode_t = 0o17_0000; +pub const S_IRWXU: crate::mode_t = 0o0700; +pub const S_IXUSR: crate::mode_t = 0o0100; +pub const S_IWUSR: crate::mode_t = 0o0200; +pub const S_IRUSR: crate::mode_t = 0o0400; +pub const S_IRWXG: crate::mode_t = 0o0070; +pub const S_IXGRP: crate::mode_t = 0o0010; +pub const S_IWGRP: crate::mode_t = 0o0020; +pub const S_IRGRP: crate::mode_t = 0o0040; +pub const S_IRWXO: crate::mode_t = 0o0007; +pub const S_IXOTH: crate::mode_t = 0o0001; +pub const S_IWOTH: crate::mode_t = 0o0002; +pub const S_IROTH: crate::mode_t = 0o0004; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; + +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; + +pub const LC_CTYPE: c_int = 0; +pub const LC_NUMERIC: c_int = 1; +pub const LC_TIME: c_int = 2; +pub const LC_COLLATE: c_int = 3; +pub const LC_MONETARY: c_int = 4; +pub const LC_MESSAGES: c_int = 5; +pub const LC_ALL: c_int = 6; +pub const LC_CTYPE_MASK: c_int = 1 << LC_CTYPE; +pub const LC_NUMERIC_MASK: c_int = 1 << LC_NUMERIC; +pub const LC_TIME_MASK: c_int = 1 << LC_TIME; +pub const LC_COLLATE_MASK: c_int = 1 << LC_COLLATE; +pub const LC_MONETARY_MASK: c_int = 1 << LC_MONETARY; +pub const LC_MESSAGES_MASK: c_int = 1 << LC_MESSAGES; // LC_ALL_MASK defined per platform -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; +pub const MAP_FILE: c_int = 0x0000; +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_FIXED: c_int = 0x0010; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; // MS_ flags for msync(2) -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; -pub const MS_SYNC: ::c_int = 0x0004; +pub const MS_ASYNC: c_int = 0x0001; +pub const MS_INVALIDATE: c_int = 0x0002; +pub const MS_SYNC: c_int = 0x0004; // MS_ flags for mount(2) -pub const MS_RDONLY: ::c_ulong = 0x01; -pub const MS_NOSUID: ::c_ulong = 0x02; -pub const MS_NODEV: ::c_ulong = 0x04; -pub const MS_NOEXEC: ::c_ulong = 0x08; -pub const MS_SYNCHRONOUS: ::c_ulong = 0x10; -pub const MS_REMOUNT: ::c_ulong = 0x20; -pub const MS_MANDLOCK: ::c_ulong = 0x40; -pub const MS_DIRSYNC: ::c_ulong = 0x80; -pub const MS_NOATIME: ::c_ulong = 0x0400; -pub const MS_NODIRATIME: ::c_ulong = 0x0800; -pub const MS_BIND: ::c_ulong = 0x1000; -pub const MS_MOVE: ::c_ulong = 0x2000; -pub const MS_REC: ::c_ulong = 0x4000; -pub const MS_SILENT: ::c_ulong = 0x8000; -pub const MS_POSIXACL: ::c_ulong = 0x010000; -pub const MS_UNBINDABLE: ::c_ulong = 0x020000; -pub const MS_PRIVATE: ::c_ulong = 0x040000; -pub const MS_SLAVE: ::c_ulong = 0x080000; -pub const MS_SHARED: ::c_ulong = 0x100000; -pub const MS_RELATIME: ::c_ulong = 0x200000; -pub const MS_KERNMOUNT: ::c_ulong = 0x400000; -pub const MS_I_VERSION: ::c_ulong = 0x800000; -pub const MS_STRICTATIME: ::c_ulong = 0x1000000; -pub const MS_ACTIVE: ::c_ulong = 0x40000000; -pub const MS_NOUSER: ::c_ulong = 0x80000000; -pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000; -pub const MS_MGC_MSK: ::c_ulong = 0xffff0000; -pub const MS_RMT_MASK: ::c_ulong = 0x800051; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EWOULDBLOCK: ::c_int = EAGAIN; - -pub const SCM_RIGHTS: ::c_int = 0x01; -pub const SCM_CREDENTIALS: ::c_int = 0x02; - -pub const PROT_GROWSDOWN: ::c_int = 0x1000000; -pub const PROT_GROWSUP: ::c_int = 0x2000000; - -pub const MAP_TYPE: ::c_int = 0x000f; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 8; -pub const MADV_REMOVE: ::c_int = 9; -pub const MADV_DONTFORK: ::c_int = 10; -pub const MADV_DOFORK: ::c_int = 11; -pub const MADV_MERGEABLE: ::c_int = 12; -pub const MADV_UNMERGEABLE: ::c_int = 13; -pub const MADV_HUGEPAGE: ::c_int = 14; -pub const MADV_NOHUGEPAGE: ::c_int = 15; -pub const MADV_DONTDUMP: ::c_int = 16; -pub const MADV_DODUMP: ::c_int = 17; -pub const MADV_HWPOISON: ::c_int = 100; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; - -pub const IFF_UP: ::c_int = 0x1; -pub const IFF_BROADCAST: ::c_int = 0x2; -pub const IFF_DEBUG: ::c_int = 0x4; -pub const IFF_LOOPBACK: ::c_int = 0x8; -pub const IFF_POINTOPOINT: ::c_int = 0x10; -pub const IFF_NOTRAILERS: ::c_int = 0x20; -pub const IFF_RUNNING: ::c_int = 0x40; -pub const IFF_NOARP: ::c_int = 0x80; -pub const IFF_PROMISC: ::c_int = 0x100; -pub const IFF_ALLMULTI: ::c_int = 0x200; -pub const IFF_MASTER: ::c_int = 0x400; -pub const IFF_SLAVE: ::c_int = 0x800; -pub const IFF_MULTICAST: ::c_int = 0x1000; -pub const IFF_PORTSEL: ::c_int = 0x2000; -pub const IFF_AUTOMEDIA: ::c_int = 0x4000; -pub const IFF_DYNAMIC: ::c_int = 0x8000; -pub const IFF_TUN: ::c_int = 0x0001; -pub const IFF_TAP: ::c_int = 0x0002; -pub const IFF_NO_PI: ::c_int = 0x1000; - -pub const SOL_IP: ::c_int = 0; -pub const SOL_TCP: ::c_int = 6; -pub const SOL_UDP: ::c_int = 17; -pub const SOL_IPV6: ::c_int = 41; -pub const SOL_ICMPV6: ::c_int = 58; -pub const SOL_RAW: ::c_int = 255; -pub const SOL_DECNET: ::c_int = 261; -pub const SOL_X25: ::c_int = 262; -pub const SOL_PACKET: ::c_int = 263; -pub const SOL_ATM: ::c_int = 264; -pub const SOL_AAL: ::c_int = 265; -pub const SOL_IRDA: ::c_int = 266; -pub const SOL_NETBEUI: ::c_int = 267; -pub const SOL_LLC: ::c_int = 268; -pub const SOL_DCCP: ::c_int = 269; -pub const SOL_NETLINK: ::c_int = 270; -pub const SOL_TIPC: ::c_int = 271; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = 1; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_AX25: ::c_int = 3; -pub const AF_IPX: ::c_int = 4; -pub const AF_APPLETALK: ::c_int = 5; -pub const AF_NETROM: ::c_int = 6; -pub const AF_BRIDGE: ::c_int = 7; -pub const AF_ATMPVC: ::c_int = 8; -pub const AF_X25: ::c_int = 9; -pub const AF_INET6: ::c_int = 10; -pub const AF_ROSE: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_NETBEUI: ::c_int = 13; -pub const AF_SECURITY: ::c_int = 14; -pub const AF_KEY: ::c_int = 15; -pub const AF_NETLINK: ::c_int = 16; -pub const AF_ROUTE: ::c_int = AF_NETLINK; -pub const AF_PACKET: ::c_int = 17; -pub const AF_ASH: ::c_int = 18; -pub const AF_ECONET: ::c_int = 19; -pub const AF_ATMSVC: ::c_int = 20; -pub const AF_RDS: ::c_int = 21; -pub const AF_SNA: ::c_int = 22; -pub const AF_IRDA: ::c_int = 23; -pub const AF_PPPOX: ::c_int = 24; -pub const AF_WANPIPE: ::c_int = 25; -pub const AF_LLC: ::c_int = 26; -pub const AF_CAN: ::c_int = 29; -pub const AF_TIPC: ::c_int = 30; -pub const AF_BLUETOOTH: ::c_int = 31; -pub const AF_IUCV: ::c_int = 32; -pub const AF_RXRPC: ::c_int = 33; -pub const AF_ISDN: ::c_int = 34; -pub const AF_PHONET: ::c_int = 35; -pub const AF_IEEE802154: ::c_int = 36; -pub const AF_CAIF: ::c_int = 37; -pub const AF_ALG: ::c_int = 38; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_UNIX: ::c_int = AF_UNIX; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_AX25: ::c_int = AF_AX25; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_NETROM: ::c_int = AF_NETROM; -pub const PF_BRIDGE: ::c_int = AF_BRIDGE; -pub const PF_ATMPVC: ::c_int = AF_ATMPVC; -pub const PF_X25: ::c_int = AF_X25; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_ROSE: ::c_int = AF_ROSE; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_NETBEUI: ::c_int = AF_NETBEUI; -pub const PF_SECURITY: ::c_int = AF_SECURITY; -pub const PF_KEY: ::c_int = AF_KEY; -pub const PF_NETLINK: ::c_int = AF_NETLINK; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_PACKET: ::c_int = AF_PACKET; -pub const PF_ASH: ::c_int = AF_ASH; -pub const PF_ECONET: ::c_int = AF_ECONET; -pub const PF_ATMSVC: ::c_int = AF_ATMSVC; -pub const PF_RDS: ::c_int = AF_RDS; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_IRDA: ::c_int = AF_IRDA; -pub const PF_PPPOX: ::c_int = AF_PPPOX; -pub const PF_WANPIPE: ::c_int = AF_WANPIPE; -pub const PF_LLC: ::c_int = AF_LLC; -pub const PF_CAN: ::c_int = AF_CAN; -pub const PF_TIPC: ::c_int = AF_TIPC; -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; -pub const PF_IUCV: ::c_int = AF_IUCV; -pub const PF_RXRPC: ::c_int = AF_RXRPC; -pub const PF_ISDN: ::c_int = AF_ISDN; -pub const PF_PHONET: ::c_int = AF_PHONET; -pub const PF_IEEE802154: ::c_int = AF_IEEE802154; -pub const PF_CAIF: ::c_int = AF_CAIF; -pub const PF_ALG: ::c_int = AF_ALG; - -pub const SOMAXCONN: ::c_int = 128; - -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTROUTE: ::c_int = 4; -pub const MSG_CTRUNC: ::c_int = 8; -pub const MSG_TRUNC: ::c_int = 0x20; -pub const MSG_DONTWAIT: ::c_int = 0x40; -pub const MSG_EOR: ::c_int = 0x80; -pub const MSG_WAITALL: ::c_int = 0x100; -pub const MSG_FIN: ::c_int = 0x200; -pub const MSG_SYN: ::c_int = 0x400; -pub const MSG_CONFIRM: ::c_int = 0x800; -pub const MSG_RST: ::c_int = 0x1000; -pub const MSG_ERRQUEUE: ::c_int = 0x2000; -pub const MSG_NOSIGNAL: ::c_int = 0x4000; -pub const MSG_MORE: ::c_int = 0x8000; -pub const MSG_WAITFORONE: ::c_int = 0x10000; -pub const MSG_FASTOPEN: ::c_int = 0x20000000; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; - -pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; - -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; - -pub const IP_TOS: ::c_int = 1; -pub const IP_TTL: ::c_int = 2; -pub const IP_HDRINCL: ::c_int = 3; -pub const IP_RECVTOS: ::c_int = 13; -pub const IP_FREEBIND: ::c_int = 15; -pub const IP_TRANSPARENT: ::c_int = 19; -pub const IP_MULTICAST_IF: ::c_int = 32; -pub const IP_MULTICAST_TTL: ::c_int = 33; -pub const IP_MULTICAST_LOOP: ::c_int = 34; -pub const IP_ADD_MEMBERSHIP: ::c_int = 35; -pub const IP_DROP_MEMBERSHIP: ::c_int = 36; - -pub const IPV6_UNICAST_HOPS: ::c_int = 16; -pub const IPV6_MULTICAST_IF: ::c_int = 17; -pub const IPV6_MULTICAST_HOPS: ::c_int = 18; -pub const IPV6_MULTICAST_LOOP: ::c_int = 19; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; -pub const IPV6_V6ONLY: ::c_int = 26; -pub const IPV6_RECVPKTINFO: ::c_int = 49; -pub const IPV6_RECVTCLASS: ::c_int = 66; -pub const IPV6_TCLASS: ::c_int = 67; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_MAXSEG: ::c_int = 2; -pub const TCP_CORK: ::c_int = 3; -pub const TCP_KEEPIDLE: ::c_int = 4; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; -pub const TCP_SYNCNT: ::c_int = 7; -pub const TCP_LINGER2: ::c_int = 8; -pub const TCP_DEFER_ACCEPT: ::c_int = 9; -pub const TCP_WINDOW_CLAMP: ::c_int = 10; -pub const TCP_INFO: ::c_int = 11; -pub const TCP_QUICKACK: ::c_int = 12; -pub const TCP_CONGESTION: ::c_int = 13; - -pub const SO_DEBUG: ::c_int = 1; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 2; - -pub const PATH_MAX: ::c_int = 4096; - -pub const FD_SETSIZE: ::c_int = 1024; - -pub const EPOLLIN: ::c_int = 0x1; -pub const EPOLLPRI: ::c_int = 0x2; -pub const EPOLLOUT: ::c_int = 0x4; -pub const EPOLLRDNORM: ::c_int = 0x40; -pub const EPOLLRDBAND: ::c_int = 0x80; -pub const EPOLLWRNORM: ::c_int = 0x100; -pub const EPOLLWRBAND: ::c_int = 0x200; -pub const EPOLLMSG: ::c_int = 0x400; -pub const EPOLLERR: ::c_int = 0x8; -pub const EPOLLHUP: ::c_int = 0x10; -pub const EPOLLET: ::c_int = 0x80000000; - -pub const EPOLL_CTL_ADD: ::c_int = 1; -pub const EPOLL_CTL_MOD: ::c_int = 3; -pub const EPOLL_CTL_DEL: ::c_int = 2; - -pub const MNT_DETACH: ::c_int = 0x2; -pub const MNT_EXPIRE: ::c_int = 0x4; - -pub const Q_GETFMT: ::c_int = 0x800004; -pub const Q_GETINFO: ::c_int = 0x800005; -pub const Q_SETINFO: ::c_int = 0x800006; +pub const MS_RDONLY: c_ulong = 0x01; +pub const MS_NOSUID: c_ulong = 0x02; +pub const MS_NODEV: c_ulong = 0x04; +pub const MS_NOEXEC: c_ulong = 0x08; +pub const MS_SYNCHRONOUS: c_ulong = 0x10; +pub const MS_REMOUNT: c_ulong = 0x20; +pub const MS_MANDLOCK: c_ulong = 0x40; +pub const MS_DIRSYNC: c_ulong = 0x80; +pub const MS_NOATIME: c_ulong = 0x0400; +pub const MS_NODIRATIME: c_ulong = 0x0800; +pub const MS_BIND: c_ulong = 0x1000; +pub const MS_MOVE: c_ulong = 0x2000; +pub const MS_REC: c_ulong = 0x4000; +pub const MS_SILENT: c_ulong = 0x8000; +pub const MS_POSIXACL: c_ulong = 0x010000; +pub const MS_UNBINDABLE: c_ulong = 0x020000; +pub const MS_PRIVATE: c_ulong = 0x040000; +pub const MS_SLAVE: c_ulong = 0x080000; +pub const MS_SHARED: c_ulong = 0x100000; +pub const MS_RELATIME: c_ulong = 0x200000; +pub const MS_KERNMOUNT: c_ulong = 0x400000; +pub const MS_I_VERSION: c_ulong = 0x800000; +pub const MS_STRICTATIME: c_ulong = 0x1000000; +pub const MS_ACTIVE: c_ulong = 0x40000000; +pub const MS_NOUSER: c_ulong = 0x80000000; +pub const MS_MGC_VAL: c_ulong = 0xc0ed0000; +pub const MS_MGC_MSK: c_ulong = 0xffff0000; +pub const MS_RMT_MASK: c_ulong = 0x800051; + +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EWOULDBLOCK: c_int = EAGAIN; + +pub const SCM_RIGHTS: c_int = 0x01; +pub const SCM_CREDENTIALS: c_int = 0x02; + +pub const PROT_GROWSDOWN: c_int = 0x1000000; +pub const PROT_GROWSUP: c_int = 0x2000000; + +pub const MAP_TYPE: c_int = 0x000f; + +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const MADV_FREE: c_int = 8; +pub const MADV_REMOVE: c_int = 9; +pub const MADV_DONTFORK: c_int = 10; +pub const MADV_DOFORK: c_int = 11; +pub const MADV_MERGEABLE: c_int = 12; +pub const MADV_UNMERGEABLE: c_int = 13; +pub const MADV_HUGEPAGE: c_int = 14; +pub const MADV_NOHUGEPAGE: c_int = 15; +pub const MADV_DONTDUMP: c_int = 16; +pub const MADV_DODUMP: c_int = 17; +pub const MADV_HWPOISON: c_int = 100; +pub const MADV_SOFT_OFFLINE: c_int = 101; + +pub const IFF_UP: c_int = 0x1; +pub const IFF_BROADCAST: c_int = 0x2; +pub const IFF_DEBUG: c_int = 0x4; +pub const IFF_LOOPBACK: c_int = 0x8; +pub const IFF_POINTOPOINT: c_int = 0x10; +pub const IFF_NOTRAILERS: c_int = 0x20; +pub const IFF_RUNNING: c_int = 0x40; +pub const IFF_NOARP: c_int = 0x80; +pub const IFF_PROMISC: c_int = 0x100; +pub const IFF_ALLMULTI: c_int = 0x200; +pub const IFF_MASTER: c_int = 0x400; +pub const IFF_SLAVE: c_int = 0x800; +pub const IFF_MULTICAST: c_int = 0x1000; +pub const IFF_PORTSEL: c_int = 0x2000; +pub const IFF_AUTOMEDIA: c_int = 0x4000; +pub const IFF_DYNAMIC: c_int = 0x8000; +pub const IFF_TUN: c_int = 0x0001; +pub const IFF_TAP: c_int = 0x0002; +pub const IFF_NO_PI: c_int = 0x1000; + +pub const SOL_IP: c_int = 0; +pub const SOL_TCP: c_int = 6; +pub const SOL_UDP: c_int = 17; +pub const SOL_IPV6: c_int = 41; +pub const SOL_ICMPV6: c_int = 58; +pub const SOL_RAW: c_int = 255; +pub const SOL_DECNET: c_int = 261; +pub const SOL_X25: c_int = 262; +pub const SOL_PACKET: c_int = 263; +pub const SOL_ATM: c_int = 264; +pub const SOL_AAL: c_int = 265; +pub const SOL_IRDA: c_int = 266; +pub const SOL_NETBEUI: c_int = 267; +pub const SOL_LLC: c_int = 268; +pub const SOL_DCCP: c_int = 269; +pub const SOL_NETLINK: c_int = 270; +pub const SOL_TIPC: c_int = 271; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_UNIX: c_int = 1; +pub const AF_LOCAL: c_int = 1; +pub const AF_INET: c_int = 2; +pub const AF_AX25: c_int = 3; +pub const AF_IPX: c_int = 4; +pub const AF_APPLETALK: c_int = 5; +pub const AF_NETROM: c_int = 6; +pub const AF_BRIDGE: c_int = 7; +pub const AF_ATMPVC: c_int = 8; +pub const AF_X25: c_int = 9; +pub const AF_INET6: c_int = 10; +pub const AF_ROSE: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_NETBEUI: c_int = 13; +pub const AF_SECURITY: c_int = 14; +pub const AF_KEY: c_int = 15; +pub const AF_NETLINK: c_int = 16; +pub const AF_ROUTE: c_int = AF_NETLINK; +pub const AF_PACKET: c_int = 17; +pub const AF_ASH: c_int = 18; +pub const AF_ECONET: c_int = 19; +pub const AF_ATMSVC: c_int = 20; +pub const AF_RDS: c_int = 21; +pub const AF_SNA: c_int = 22; +pub const AF_IRDA: c_int = 23; +pub const AF_PPPOX: c_int = 24; +pub const AF_WANPIPE: c_int = 25; +pub const AF_LLC: c_int = 26; +pub const AF_CAN: c_int = 29; +pub const AF_TIPC: c_int = 30; +pub const AF_BLUETOOTH: c_int = 31; +pub const AF_IUCV: c_int = 32; +pub const AF_RXRPC: c_int = 33; +pub const AF_ISDN: c_int = 34; +pub const AF_PHONET: c_int = 35; +pub const AF_IEEE802154: c_int = 36; +pub const AF_CAIF: c_int = 37; +pub const AF_ALG: c_int = 38; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_UNIX: c_int = AF_UNIX; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_AX25: c_int = AF_AX25; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_NETROM: c_int = AF_NETROM; +pub const PF_BRIDGE: c_int = AF_BRIDGE; +pub const PF_ATMPVC: c_int = AF_ATMPVC; +pub const PF_X25: c_int = AF_X25; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_ROSE: c_int = AF_ROSE; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_NETBEUI: c_int = AF_NETBEUI; +pub const PF_SECURITY: c_int = AF_SECURITY; +pub const PF_KEY: c_int = AF_KEY; +pub const PF_NETLINK: c_int = AF_NETLINK; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_PACKET: c_int = AF_PACKET; +pub const PF_ASH: c_int = AF_ASH; +pub const PF_ECONET: c_int = AF_ECONET; +pub const PF_ATMSVC: c_int = AF_ATMSVC; +pub const PF_RDS: c_int = AF_RDS; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_IRDA: c_int = AF_IRDA; +pub const PF_PPPOX: c_int = AF_PPPOX; +pub const PF_WANPIPE: c_int = AF_WANPIPE; +pub const PF_LLC: c_int = AF_LLC; +pub const PF_CAN: c_int = AF_CAN; +pub const PF_TIPC: c_int = AF_TIPC; +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; +pub const PF_IUCV: c_int = AF_IUCV; +pub const PF_RXRPC: c_int = AF_RXRPC; +pub const PF_ISDN: c_int = AF_ISDN; +pub const PF_PHONET: c_int = AF_PHONET; +pub const PF_IEEE802154: c_int = AF_IEEE802154; +pub const PF_CAIF: c_int = AF_CAIF; +pub const PF_ALG: c_int = AF_ALG; + +pub const SOMAXCONN: c_int = 128; + +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_DONTROUTE: c_int = 4; +pub const MSG_CTRUNC: c_int = 8; +pub const MSG_TRUNC: c_int = 0x20; +pub const MSG_DONTWAIT: c_int = 0x40; +pub const MSG_EOR: c_int = 0x80; +pub const MSG_WAITALL: c_int = 0x100; +pub const MSG_FIN: c_int = 0x200; +pub const MSG_SYN: c_int = 0x400; +pub const MSG_CONFIRM: c_int = 0x800; +pub const MSG_RST: c_int = 0x1000; +pub const MSG_ERRQUEUE: c_int = 0x2000; +pub const MSG_NOSIGNAL: c_int = 0x4000; +pub const MSG_MORE: c_int = 0x8000; +pub const MSG_WAITFORONE: c_int = 0x10000; +pub const MSG_FASTOPEN: c_int = 0x20000000; +pub const MSG_CMSG_CLOEXEC: c_int = 0x40000000; + +pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; + +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; + +pub const IP_TOS: c_int = 1; +pub const IP_TTL: c_int = 2; +pub const IP_HDRINCL: c_int = 3; +pub const IP_RECVTOS: c_int = 13; +pub const IP_FREEBIND: c_int = 15; +pub const IP_TRANSPARENT: c_int = 19; +pub const IP_MULTICAST_IF: c_int = 32; +pub const IP_MULTICAST_TTL: c_int = 33; +pub const IP_MULTICAST_LOOP: c_int = 34; +pub const IP_ADD_MEMBERSHIP: c_int = 35; +pub const IP_DROP_MEMBERSHIP: c_int = 36; + +pub const IPV6_UNICAST_HOPS: c_int = 16; +pub const IPV6_MULTICAST_IF: c_int = 17; +pub const IPV6_MULTICAST_HOPS: c_int = 18; +pub const IPV6_MULTICAST_LOOP: c_int = 19; +pub const IPV6_ADD_MEMBERSHIP: c_int = 20; +pub const IPV6_DROP_MEMBERSHIP: c_int = 21; +pub const IPV6_V6ONLY: c_int = 26; +pub const IPV6_RECVPKTINFO: c_int = 49; +pub const IPV6_RECVTCLASS: c_int = 66; +pub const IPV6_TCLASS: c_int = 67; + +pub const TCP_NODELAY: c_int = 1; +pub const TCP_MAXSEG: c_int = 2; +pub const TCP_CORK: c_int = 3; +pub const TCP_KEEPIDLE: c_int = 4; +pub const TCP_KEEPINTVL: c_int = 5; +pub const TCP_KEEPCNT: c_int = 6; +pub const TCP_SYNCNT: c_int = 7; +pub const TCP_LINGER2: c_int = 8; +pub const TCP_DEFER_ACCEPT: c_int = 9; +pub const TCP_WINDOW_CLAMP: c_int = 10; +pub const TCP_INFO: c_int = 11; +pub const TCP_QUICKACK: c_int = 12; +pub const TCP_CONGESTION: c_int = 13; + +pub const SO_DEBUG: c_int = 1; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; + +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 2; + +pub const PATH_MAX: c_int = 4096; + +pub const FD_SETSIZE: c_int = 1024; + +pub const EPOLLIN: c_int = 0x1; +pub const EPOLLPRI: c_int = 0x2; +pub const EPOLLOUT: c_int = 0x4; +pub const EPOLLRDNORM: c_int = 0x40; +pub const EPOLLRDBAND: c_int = 0x80; +pub const EPOLLWRNORM: c_int = 0x100; +pub const EPOLLWRBAND: c_int = 0x200; +pub const EPOLLMSG: c_int = 0x400; +pub const EPOLLERR: c_int = 0x8; +pub const EPOLLHUP: c_int = 0x10; +pub const EPOLLET: c_int = 0x80000000; + +pub const EPOLL_CTL_ADD: c_int = 1; +pub const EPOLL_CTL_MOD: c_int = 3; +pub const EPOLL_CTL_DEL: c_int = 2; + +pub const MNT_DETACH: c_int = 0x2; +pub const MNT_EXPIRE: c_int = 0x4; + +pub const Q_GETFMT: c_int = 0x800004; +pub const Q_GETINFO: c_int = 0x800005; +pub const Q_SETINFO: c_int = 0x800006; pub const QIF_BLIMITS: u32 = 1; pub const QIF_SPACE: u32 = 2; pub const QIF_ILIMITS: u32 = 4; @@ -1983,153 +1983,153 @@ pub const QIF_USAGE: u32 = 10; pub const QIF_TIMES: u32 = 48; pub const QIF_ALL: u32 = 63; -pub const MNT_FORCE: ::c_int = 0x1; - -pub const Q_SYNC: ::c_int = 0x800001; -pub const Q_QUOTAON: ::c_int = 0x800002; -pub const Q_QUOTAOFF: ::c_int = 0x800003; -pub const Q_GETQUOTA: ::c_int = 0x800007; -pub const Q_SETQUOTA: ::c_int = 0x800008; - -pub const TCIOFF: ::c_int = 2; -pub const TCION: ::c_int = 3; -pub const TCOOFF: ::c_int = 0; -pub const TCOON: ::c_int = 1; -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; -pub const NL0: ::c_int = 0x00000000; -pub const NL1: ::c_int = 0x00000100; -pub const TAB0: ::c_int = 0x00000000; -pub const CR0: ::c_int = 0x00000000; -pub const FF0: ::c_int = 0x00000000; -pub const BS0: ::c_int = 0x00000000; -pub const VT0: ::c_int = 0x00000000; +pub const MNT_FORCE: c_int = 0x1; + +pub const Q_SYNC: c_int = 0x800001; +pub const Q_QUOTAON: c_int = 0x800002; +pub const Q_QUOTAOFF: c_int = 0x800003; +pub const Q_GETQUOTA: c_int = 0x800007; +pub const Q_SETQUOTA: c_int = 0x800008; + +pub const TCIOFF: c_int = 2; +pub const TCION: c_int = 3; +pub const TCOOFF: c_int = 0; +pub const TCOON: c_int = 1; +pub const TCIFLUSH: c_int = 0; +pub const TCOFLUSH: c_int = 1; +pub const TCIOFLUSH: c_int = 2; +pub const NL0: c_int = 0x00000000; +pub const NL1: c_int = 0x00000100; +pub const TAB0: c_int = 0x00000000; +pub const CR0: c_int = 0x00000000; +pub const FF0: c_int = 0x00000000; +pub const BS0: c_int = 0x00000000; +pub const VT0: c_int = 0x00000000; pub const VERASE: usize = 2; pub const VKILL: usize = 3; pub const VINTR: usize = 0; pub const VQUIT: usize = 1; pub const VLNEXT: usize = 15; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXANY: ::tcflag_t = 0x00000800; -pub const IMAXBEL: ::tcflag_t = 0x00002000; -pub const OPOST: ::tcflag_t = 0x1; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CRTSCTS: ::tcflag_t = 0x80000000; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const OCRNL: ::tcflag_t = 0o000010; -pub const ONOCR: ::tcflag_t = 0o000020; -pub const ONLRET: ::tcflag_t = 0o000040; -pub const OFILL: ::tcflag_t = 0o000100; -pub const OFDEL: ::tcflag_t = 0o000200; - -pub const CLONE_VM: ::c_int = 0x100; -pub const CLONE_FS: ::c_int = 0x200; -pub const CLONE_FILES: ::c_int = 0x400; -pub const CLONE_SIGHAND: ::c_int = 0x800; -pub const CLONE_PTRACE: ::c_int = 0x2000; -pub const CLONE_VFORK: ::c_int = 0x4000; -pub const CLONE_PARENT: ::c_int = 0x8000; -pub const CLONE_THREAD: ::c_int = 0x10000; -pub const CLONE_NEWNS: ::c_int = 0x20000; -pub const CLONE_SYSVSEM: ::c_int = 0x40000; -pub const CLONE_SETTLS: ::c_int = 0x80000; -pub const CLONE_PARENT_SETTID: ::c_int = 0x100000; -pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000; -pub const CLONE_DETACHED: ::c_int = 0x400000; -pub const CLONE_UNTRACED: ::c_int = 0x800000; -pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000; -pub const CLONE_NEWUTS: ::c_int = 0x04000000; -pub const CLONE_NEWIPC: ::c_int = 0x08000000; -pub const CLONE_NEWUSER: ::c_int = 0x10000000; -pub const CLONE_NEWPID: ::c_int = 0x20000000; -pub const CLONE_NEWNET: ::c_int = 0x40000000; -pub const CLONE_IO: ::c_int = 0x80000000; -pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; - -pub const WNOHANG: ::c_int = 0x00000001; -pub const WUNTRACED: ::c_int = 0x00000002; -pub const WSTOPPED: ::c_int = WUNTRACED; -pub const WEXITED: ::c_int = 0x00000004; -pub const WCONTINUED: ::c_int = 0x00000008; -pub const WNOWAIT: ::c_int = 0x01000000; +pub const IGNBRK: crate::tcflag_t = 0x00000001; +pub const BRKINT: crate::tcflag_t = 0x00000002; +pub const IGNPAR: crate::tcflag_t = 0x00000004; +pub const PARMRK: crate::tcflag_t = 0x00000008; +pub const INPCK: crate::tcflag_t = 0x00000010; +pub const ISTRIP: crate::tcflag_t = 0x00000020; +pub const INLCR: crate::tcflag_t = 0x00000040; +pub const IGNCR: crate::tcflag_t = 0x00000080; +pub const ICRNL: crate::tcflag_t = 0x00000100; +pub const IXANY: crate::tcflag_t = 0x00000800; +pub const IMAXBEL: crate::tcflag_t = 0x00002000; +pub const OPOST: crate::tcflag_t = 0x1; +pub const CS5: crate::tcflag_t = 0x00000000; +pub const CRTSCTS: crate::tcflag_t = 0x80000000; +pub const ECHO: crate::tcflag_t = 0x00000008; +pub const OCRNL: crate::tcflag_t = 0o000010; +pub const ONOCR: crate::tcflag_t = 0o000020; +pub const ONLRET: crate::tcflag_t = 0o000040; +pub const OFILL: crate::tcflag_t = 0o000100; +pub const OFDEL: crate::tcflag_t = 0o000200; + +pub const CLONE_VM: c_int = 0x100; +pub const CLONE_FS: c_int = 0x200; +pub const CLONE_FILES: c_int = 0x400; +pub const CLONE_SIGHAND: c_int = 0x800; +pub const CLONE_PTRACE: c_int = 0x2000; +pub const CLONE_VFORK: c_int = 0x4000; +pub const CLONE_PARENT: c_int = 0x8000; +pub const CLONE_THREAD: c_int = 0x10000; +pub const CLONE_NEWNS: c_int = 0x20000; +pub const CLONE_SYSVSEM: c_int = 0x40000; +pub const CLONE_SETTLS: c_int = 0x80000; +pub const CLONE_PARENT_SETTID: c_int = 0x100000; +pub const CLONE_CHILD_CLEARTID: c_int = 0x200000; +pub const CLONE_DETACHED: c_int = 0x400000; +pub const CLONE_UNTRACED: c_int = 0x800000; +pub const CLONE_CHILD_SETTID: c_int = 0x01000000; +pub const CLONE_NEWUTS: c_int = 0x04000000; +pub const CLONE_NEWIPC: c_int = 0x08000000; +pub const CLONE_NEWUSER: c_int = 0x10000000; +pub const CLONE_NEWPID: c_int = 0x20000000; +pub const CLONE_NEWNET: c_int = 0x40000000; +pub const CLONE_IO: c_int = 0x80000000; +pub const CLONE_NEWCGROUP: c_int = 0x02000000; + +pub const WNOHANG: c_int = 0x00000001; +pub const WUNTRACED: c_int = 0x00000002; +pub const WSTOPPED: c_int = WUNTRACED; +pub const WEXITED: c_int = 0x00000004; +pub const WCONTINUED: c_int = 0x00000008; +pub const WNOWAIT: c_int = 0x01000000; // ::Options set using PTRACE_SETOPTIONS. -pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001; -pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002; -pub const PTRACE_O_TRACEVFORK: ::c_int = 0x00000004; -pub const PTRACE_O_TRACECLONE: ::c_int = 0x00000008; -pub const PTRACE_O_TRACEEXEC: ::c_int = 0x00000010; -pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 0x00000020; -pub const PTRACE_O_TRACEEXIT: ::c_int = 0x00000040; -pub const PTRACE_O_TRACESECCOMP: ::c_int = 0x00000080; -pub const PTRACE_O_EXITKILL: ::c_int = 0x00100000; -pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 0x00200000; -pub const PTRACE_O_MASK: ::c_int = 0x003000ff; +pub const PTRACE_O_TRACESYSGOOD: c_int = 0x00000001; +pub const PTRACE_O_TRACEFORK: c_int = 0x00000002; +pub const PTRACE_O_TRACEVFORK: c_int = 0x00000004; +pub const PTRACE_O_TRACECLONE: c_int = 0x00000008; +pub const PTRACE_O_TRACEEXEC: c_int = 0x00000010; +pub const PTRACE_O_TRACEVFORKDONE: c_int = 0x00000020; +pub const PTRACE_O_TRACEEXIT: c_int = 0x00000040; +pub const PTRACE_O_TRACESECCOMP: c_int = 0x00000080; +pub const PTRACE_O_EXITKILL: c_int = 0x00100000; +pub const PTRACE_O_SUSPEND_SECCOMP: c_int = 0x00200000; +pub const PTRACE_O_MASK: c_int = 0x003000ff; // Wait extended result codes for the above trace options. -pub const PTRACE_EVENT_FORK: ::c_int = 1; -pub const PTRACE_EVENT_VFORK: ::c_int = 2; -pub const PTRACE_EVENT_CLONE: ::c_int = 3; -pub const PTRACE_EVENT_EXEC: ::c_int = 4; -pub const PTRACE_EVENT_VFORK_DONE: ::c_int = 5; -pub const PTRACE_EVENT_EXIT: ::c_int = 6; -pub const PTRACE_EVENT_SECCOMP: ::c_int = 7; +pub const PTRACE_EVENT_FORK: c_int = 1; +pub const PTRACE_EVENT_VFORK: c_int = 2; +pub const PTRACE_EVENT_CLONE: c_int = 3; +pub const PTRACE_EVENT_EXEC: c_int = 4; +pub const PTRACE_EVENT_VFORK_DONE: c_int = 5; +pub const PTRACE_EVENT_EXIT: c_int = 6; +pub const PTRACE_EVENT_SECCOMP: c_int = 7; // PTRACE_EVENT_STOP was added to glibc in 2.26 -// pub const PTRACE_EVENT_STOP: ::c_int = 128; - -pub const __WNOTHREAD: ::c_int = 0x20000000; -pub const __WALL: ::c_int = 0x40000000; -pub const __WCLONE: ::c_int = 0x80000000; - -pub const SPLICE_F_MOVE: ::c_uint = 0x01; -pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02; -pub const SPLICE_F_MORE: ::c_uint = 0x04; -pub const SPLICE_F_GIFT: ::c_uint = 0x08; - -pub const RTLD_LOCAL: ::c_int = 0; -pub const RTLD_LAZY: ::c_int = 1; - -pub const POSIX_FADV_NORMAL: ::c_int = 0; -pub const POSIX_FADV_RANDOM: ::c_int = 1; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_FADV_WILLNEED: ::c_int = 3; - -pub const AT_FDCWD: ::c_int = -100; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100; -pub const AT_REMOVEDIR: ::c_int = 0x200; -pub const AT_EACCESS: ::c_int = 0x200; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400; -pub const AT_NO_AUTOMOUNT: ::c_int = 0x800; -pub const AT_EMPTY_PATH: ::c_int = 0x1000; - -pub const LOG_CRON: ::c_int = 9 << 3; -pub const LOG_AUTHPRIV: ::c_int = 10 << 3; -pub const LOG_FTP: ::c_int = 11 << 3; -pub const LOG_PERROR: ::c_int = 0x20; +// pub const PTRACE_EVENT_STOP: c_int = 128; + +pub const __WNOTHREAD: c_int = 0x20000000; +pub const __WALL: c_int = 0x40000000; +pub const __WCLONE: c_int = 0x80000000; + +pub const SPLICE_F_MOVE: c_uint = 0x01; +pub const SPLICE_F_NONBLOCK: c_uint = 0x02; +pub const SPLICE_F_MORE: c_uint = 0x04; +pub const SPLICE_F_GIFT: c_uint = 0x08; + +pub const RTLD_LOCAL: c_int = 0; +pub const RTLD_LAZY: c_int = 1; + +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_RANDOM: c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: c_int = 2; +pub const POSIX_FADV_WILLNEED: c_int = 3; + +pub const AT_FDCWD: c_int = -100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x100; +pub const AT_REMOVEDIR: c_int = 0x200; +pub const AT_EACCESS: c_int = 0x200; +pub const AT_SYMLINK_FOLLOW: c_int = 0x400; +pub const AT_NO_AUTOMOUNT: c_int = 0x800; +pub const AT_EMPTY_PATH: c_int = 0x1000; + +pub const LOG_CRON: c_int = 9 << 3; +pub const LOG_AUTHPRIV: c_int = 10 << 3; +pub const LOG_FTP: c_int = 11 << 3; +pub const LOG_PERROR: c_int = 0x20; pub const PIPE_BUF: usize = 4096; -pub const SI_LOAD_SHIFT: ::c_uint = 16; +pub const SI_LOAD_SHIFT: c_uint = 16; -pub const CLD_EXITED: ::c_int = 1; -pub const CLD_KILLED: ::c_int = 2; -pub const CLD_DUMPED: ::c_int = 3; -pub const CLD_TRAPPED: ::c_int = 4; -pub const CLD_STOPPED: ::c_int = 5; -pub const CLD_CONTINUED: ::c_int = 6; +pub const CLD_EXITED: c_int = 1; +pub const CLD_KILLED: c_int = 2; +pub const CLD_DUMPED: c_int = 3; +pub const CLD_TRAPPED: c_int = 4; +pub const CLD_STOPPED: c_int = 5; +pub const CLD_CONTINUED: c_int = 6; -pub const SIGEV_SIGNAL: ::c_int = 0; -pub const SIGEV_NONE: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 2; +pub const SIGEV_SIGNAL: c_int = 0; +pub const SIGEV_NONE: c_int = 1; +pub const SIGEV_THREAD: c_int = 2; pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; @@ -2138,303 +2138,303 @@ pub const P_PGID: idtype_t = 2; pub const UTIME_OMIT: c_long = 1073741822; pub const UTIME_NOW: c_long = 1073741823; -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLOUT: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLHUP: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; -pub const POLLRDNORM: ::c_short = 0x040; -pub const POLLRDBAND: ::c_short = 0x080; - -pub const ABDAY_1: ::nl_item = 0x20000; -pub const ABDAY_2: ::nl_item = 0x20001; -pub const ABDAY_3: ::nl_item = 0x20002; -pub const ABDAY_4: ::nl_item = 0x20003; -pub const ABDAY_5: ::nl_item = 0x20004; -pub const ABDAY_6: ::nl_item = 0x20005; -pub const ABDAY_7: ::nl_item = 0x20006; - -pub const DAY_1: ::nl_item = 0x20007; -pub const DAY_2: ::nl_item = 0x20008; -pub const DAY_3: ::nl_item = 0x20009; -pub const DAY_4: ::nl_item = 0x2000A; -pub const DAY_5: ::nl_item = 0x2000B; -pub const DAY_6: ::nl_item = 0x2000C; -pub const DAY_7: ::nl_item = 0x2000D; - -pub const ABMON_1: ::nl_item = 0x2000E; -pub const ABMON_2: ::nl_item = 0x2000F; -pub const ABMON_3: ::nl_item = 0x20010; -pub const ABMON_4: ::nl_item = 0x20011; -pub const ABMON_5: ::nl_item = 0x20012; -pub const ABMON_6: ::nl_item = 0x20013; -pub const ABMON_7: ::nl_item = 0x20014; -pub const ABMON_8: ::nl_item = 0x20015; -pub const ABMON_9: ::nl_item = 0x20016; -pub const ABMON_10: ::nl_item = 0x20017; -pub const ABMON_11: ::nl_item = 0x20018; -pub const ABMON_12: ::nl_item = 0x20019; - -pub const MON_1: ::nl_item = 0x2001A; -pub const MON_2: ::nl_item = 0x2001B; -pub const MON_3: ::nl_item = 0x2001C; -pub const MON_4: ::nl_item = 0x2001D; -pub const MON_5: ::nl_item = 0x2001E; -pub const MON_6: ::nl_item = 0x2001F; -pub const MON_7: ::nl_item = 0x20020; -pub const MON_8: ::nl_item = 0x20021; -pub const MON_9: ::nl_item = 0x20022; -pub const MON_10: ::nl_item = 0x20023; -pub const MON_11: ::nl_item = 0x20024; -pub const MON_12: ::nl_item = 0x20025; - -pub const AM_STR: ::nl_item = 0x20026; -pub const PM_STR: ::nl_item = 0x20027; - -pub const D_T_FMT: ::nl_item = 0x20028; -pub const D_FMT: ::nl_item = 0x20029; -pub const T_FMT: ::nl_item = 0x2002A; -pub const T_FMT_AMPM: ::nl_item = 0x2002B; - -pub const ERA: ::nl_item = 0x2002C; -pub const ERA_D_FMT: ::nl_item = 0x2002E; -pub const ALT_DIGITS: ::nl_item = 0x2002F; -pub const ERA_D_T_FMT: ::nl_item = 0x20030; -pub const ERA_T_FMT: ::nl_item = 0x20031; - -pub const CODESET: ::nl_item = 14; - -pub const CRNCYSTR: ::nl_item = 0x4000F; - -pub const RUSAGE_THREAD: ::c_int = 1; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const RADIXCHAR: ::nl_item = 0x10000; -pub const THOUSEP: ::nl_item = 0x10001; - -pub const YESEXPR: ::nl_item = 0x50000; -pub const NOEXPR: ::nl_item = 0x50001; -pub const YESSTR: ::nl_item = 0x50002; -pub const NOSTR: ::nl_item = 0x50003; - -pub const FILENAME_MAX: ::c_uint = 4096; -pub const L_tmpnam: ::c_uint = 20; -pub const _PC_LINK_MAX: ::c_int = 0; -pub const _PC_MAX_CANON: ::c_int = 1; -pub const _PC_MAX_INPUT: ::c_int = 2; -pub const _PC_NAME_MAX: ::c_int = 3; -pub const _PC_PATH_MAX: ::c_int = 4; -pub const _PC_PIPE_BUF: ::c_int = 5; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 6; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_SYNC_IO: ::c_int = 9; -pub const _PC_ASYNC_IO: ::c_int = 10; -pub const _PC_PRIO_IO: ::c_int = 11; -pub const _PC_SOCK_MAXBUF: ::c_int = 12; -pub const _PC_FILESIZEBITS: ::c_int = 13; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18; -pub const _PC_SYMLINK_MAX: ::c_int = 19; -pub const _PC_2_SYMLINKS: ::c_int = 20; - -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; -pub const _SC_JOB_CONTROL: ::c_int = 7; -pub const _SC_SAVED_IDS: ::c_int = 8; -pub const _SC_REALTIME_SIGNALS: ::c_int = 9; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; -pub const _SC_TIMERS: ::c_int = 11; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; -pub const _SC_PRIORITIZED_IO: ::c_int = 13; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; -pub const _SC_FSYNC: ::c_int = 15; -pub const _SC_MAPPED_FILES: ::c_int = 16; -pub const _SC_MEMLOCK: ::c_int = 17; -pub const _SC_MEMLOCK_RANGE: ::c_int = 18; -pub const _SC_MEMORY_PROTECTION: ::c_int = 19; -pub const _SC_MESSAGE_PASSING: ::c_int = 20; -pub const _SC_SEMAPHORES: ::c_int = 21; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; -pub const _SC_AIO_MAX: ::c_int = 24; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; -pub const _SC_DELAYTIMER_MAX: ::c_int = 26; -pub const _SC_MQ_OPEN_MAX: ::c_int = 27; -pub const _SC_MQ_PRIO_MAX: ::c_int = 28; -pub const _SC_VERSION: ::c_int = 29; -pub const _SC_PAGESIZE: ::c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_RTSIG_MAX: ::c_int = 31; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; -pub const _SC_SEM_VALUE_MAX: ::c_int = 33; -pub const _SC_SIGQUEUE_MAX: ::c_int = 34; -pub const _SC_TIMER_MAX: ::c_int = 35; -pub const _SC_BC_BASE_MAX: ::c_int = 36; -pub const _SC_BC_DIM_MAX: ::c_int = 37; -pub const _SC_BC_SCALE_MAX: ::c_int = 38; -pub const _SC_BC_STRING_MAX: ::c_int = 39; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; -pub const _SC_EXPR_NEST_MAX: ::c_int = 42; -pub const _SC_LINE_MAX: ::c_int = 43; -pub const _SC_RE_DUP_MAX: ::c_int = 44; -pub const _SC_2_VERSION: ::c_int = 46; -pub const _SC_2_C_BIND: ::c_int = 47; -pub const _SC_2_C_DEV: ::c_int = 48; -pub const _SC_2_FORT_DEV: ::c_int = 49; -pub const _SC_2_FORT_RUN: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_LOCALEDEF: ::c_int = 52; -pub const _SC_UIO_MAXIOV: ::c_int = 60; -pub const _SC_IOV_MAX: ::c_int = 60; -pub const _SC_THREADS: ::c_int = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; -pub const _SC_TTY_NAME_MAX: ::c_int = 72; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; -pub const _SC_THREAD_STACK_MIN: ::c_int = 75; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82; -pub const _SC_NPROCESSORS_CONF: ::c_int = 83; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; -pub const _SC_PHYS_PAGES: ::c_int = 85; -pub const _SC_AVPHYS_PAGES: ::c_int = 86; -pub const _SC_ATEXIT_MAX: ::c_int = 87; -pub const _SC_PASS_MAX: ::c_int = 88; -pub const _SC_XOPEN_VERSION: ::c_int = 89; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; -pub const _SC_XOPEN_UNIX: ::c_int = 91; -pub const _SC_XOPEN_CRYPT: ::c_int = 92; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; -pub const _SC_XOPEN_SHM: ::c_int = 94; -pub const _SC_2_CHAR_TERM: ::c_int = 95; -pub const _SC_2_UPE: ::c_int = 97; -pub const _SC_XOPEN_XPG2: ::c_int = 98; -pub const _SC_XOPEN_XPG3: ::c_int = 99; -pub const _SC_XOPEN_XPG4: ::c_int = 100; -pub const _SC_NZERO: ::c_int = 109; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 127; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; -pub const _SC_XOPEN_LEGACY: ::c_int = 129; -pub const _SC_XOPEN_REALTIME: ::c_int = 130; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; -pub const _SC_ADVISORY_INFO: ::c_int = 132; -pub const _SC_BARRIERS: ::c_int = 133; -pub const _SC_CLOCK_SELECTION: ::c_int = 137; -pub const _SC_CPUTIME: ::c_int = 138; -pub const _SC_THREAD_CPUTIME: ::c_int = 139; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 149; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 153; -pub const _SC_SPIN_LOCKS: ::c_int = 154; -pub const _SC_REGEXP: ::c_int = 155; -pub const _SC_SHELL: ::c_int = 157; -pub const _SC_SPAWN: ::c_int = 159; -pub const _SC_SPORADIC_SERVER: ::c_int = 160; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161; -pub const _SC_TIMEOUTS: ::c_int = 164; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165; -pub const _SC_2_PBS: ::c_int = 168; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169; -pub const _SC_2_PBS_LOCATE: ::c_int = 170; -pub const _SC_2_PBS_MESSAGE: ::c_int = 171; -pub const _SC_2_PBS_TRACK: ::c_int = 172; -pub const _SC_SYMLOOP_MAX: ::c_int = 173; -pub const _SC_STREAMS: ::c_int = 174; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175; -pub const _SC_V6_ILP32_OFF32: ::c_int = 176; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177; -pub const _SC_V6_LP64_OFF64: ::c_int = 178; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179; -pub const _SC_HOST_NAME_MAX: ::c_int = 180; -pub const _SC_TRACE: ::c_int = 181; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182; -pub const _SC_TRACE_INHERIT: ::c_int = 183; -pub const _SC_TRACE_LOG: ::c_int = 184; -pub const _SC_IPV6: ::c_int = 235; -pub const _SC_RAW_SOCKETS: ::c_int = 236; -pub const _SC_V7_ILP32_OFF32: ::c_int = 237; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238; -pub const _SC_V7_LP64_OFF64: ::c_int = 239; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240; -pub const _SC_SS_REPL_MAX: ::c_int = 241; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242; -pub const _SC_TRACE_NAME_MAX: ::c_int = 243; -pub const _SC_TRACE_SYS_MAX: ::c_int = 244; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245; -pub const _SC_XOPEN_STREAMS: ::c_int = 246; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248; - -pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; -pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; - -pub const GLOB_ERR: ::c_int = 1 << 0; -pub const GLOB_MARK: ::c_int = 1 << 1; -pub const GLOB_NOSORT: ::c_int = 1 << 2; -pub const GLOB_DOOFFS: ::c_int = 1 << 3; -pub const GLOB_NOCHECK: ::c_int = 1 << 4; -pub const GLOB_APPEND: ::c_int = 1 << 5; -pub const GLOB_NOESCAPE: ::c_int = 1 << 6; - -pub const GLOB_NOSPACE: ::c_int = 1; -pub const GLOB_ABORTED: ::c_int = 2; -pub const GLOB_NOMATCH: ::c_int = 3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; +pub const POLLIN: c_short = 0x1; +pub const POLLPRI: c_short = 0x2; +pub const POLLOUT: c_short = 0x4; +pub const POLLERR: c_short = 0x8; +pub const POLLHUP: c_short = 0x10; +pub const POLLNVAL: c_short = 0x20; +pub const POLLRDNORM: c_short = 0x040; +pub const POLLRDBAND: c_short = 0x080; + +pub const ABDAY_1: crate::nl_item = 0x20000; +pub const ABDAY_2: crate::nl_item = 0x20001; +pub const ABDAY_3: crate::nl_item = 0x20002; +pub const ABDAY_4: crate::nl_item = 0x20003; +pub const ABDAY_5: crate::nl_item = 0x20004; +pub const ABDAY_6: crate::nl_item = 0x20005; +pub const ABDAY_7: crate::nl_item = 0x20006; + +pub const DAY_1: crate::nl_item = 0x20007; +pub const DAY_2: crate::nl_item = 0x20008; +pub const DAY_3: crate::nl_item = 0x20009; +pub const DAY_4: crate::nl_item = 0x2000A; +pub const DAY_5: crate::nl_item = 0x2000B; +pub const DAY_6: crate::nl_item = 0x2000C; +pub const DAY_7: crate::nl_item = 0x2000D; + +pub const ABMON_1: crate::nl_item = 0x2000E; +pub const ABMON_2: crate::nl_item = 0x2000F; +pub const ABMON_3: crate::nl_item = 0x20010; +pub const ABMON_4: crate::nl_item = 0x20011; +pub const ABMON_5: crate::nl_item = 0x20012; +pub const ABMON_6: crate::nl_item = 0x20013; +pub const ABMON_7: crate::nl_item = 0x20014; +pub const ABMON_8: crate::nl_item = 0x20015; +pub const ABMON_9: crate::nl_item = 0x20016; +pub const ABMON_10: crate::nl_item = 0x20017; +pub const ABMON_11: crate::nl_item = 0x20018; +pub const ABMON_12: crate::nl_item = 0x20019; + +pub const MON_1: crate::nl_item = 0x2001A; +pub const MON_2: crate::nl_item = 0x2001B; +pub const MON_3: crate::nl_item = 0x2001C; +pub const MON_4: crate::nl_item = 0x2001D; +pub const MON_5: crate::nl_item = 0x2001E; +pub const MON_6: crate::nl_item = 0x2001F; +pub const MON_7: crate::nl_item = 0x20020; +pub const MON_8: crate::nl_item = 0x20021; +pub const MON_9: crate::nl_item = 0x20022; +pub const MON_10: crate::nl_item = 0x20023; +pub const MON_11: crate::nl_item = 0x20024; +pub const MON_12: crate::nl_item = 0x20025; + +pub const AM_STR: crate::nl_item = 0x20026; +pub const PM_STR: crate::nl_item = 0x20027; + +pub const D_T_FMT: crate::nl_item = 0x20028; +pub const D_FMT: crate::nl_item = 0x20029; +pub const T_FMT: crate::nl_item = 0x2002A; +pub const T_FMT_AMPM: crate::nl_item = 0x2002B; + +pub const ERA: crate::nl_item = 0x2002C; +pub const ERA_D_FMT: crate::nl_item = 0x2002E; +pub const ALT_DIGITS: crate::nl_item = 0x2002F; +pub const ERA_D_T_FMT: crate::nl_item = 0x20030; +pub const ERA_T_FMT: crate::nl_item = 0x20031; + +pub const CODESET: crate::nl_item = 14; + +pub const CRNCYSTR: crate::nl_item = 0x4000F; + +pub const RUSAGE_THREAD: c_int = 1; +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const RADIXCHAR: crate::nl_item = 0x10000; +pub const THOUSEP: crate::nl_item = 0x10001; + +pub const YESEXPR: crate::nl_item = 0x50000; +pub const NOEXPR: crate::nl_item = 0x50001; +pub const YESSTR: crate::nl_item = 0x50002; +pub const NOSTR: crate::nl_item = 0x50003; + +pub const FILENAME_MAX: c_uint = 4096; +pub const L_tmpnam: c_uint = 20; +pub const _PC_LINK_MAX: c_int = 0; +pub const _PC_MAX_CANON: c_int = 1; +pub const _PC_MAX_INPUT: c_int = 2; +pub const _PC_NAME_MAX: c_int = 3; +pub const _PC_PATH_MAX: c_int = 4; +pub const _PC_PIPE_BUF: c_int = 5; +pub const _PC_CHOWN_RESTRICTED: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SOCK_MAXBUF: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_ALLOC_SIZE_MIN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_2_SYMLINKS: c_int = 20; + +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; +pub const _SC_JOB_CONTROL: c_int = 7; +pub const _SC_SAVED_IDS: c_int = 8; +pub const _SC_REALTIME_SIGNALS: c_int = 9; +pub const _SC_PRIORITY_SCHEDULING: c_int = 10; +pub const _SC_TIMERS: c_int = 11; +pub const _SC_ASYNCHRONOUS_IO: c_int = 12; +pub const _SC_PRIORITIZED_IO: c_int = 13; +pub const _SC_SYNCHRONIZED_IO: c_int = 14; +pub const _SC_FSYNC: c_int = 15; +pub const _SC_MAPPED_FILES: c_int = 16; +pub const _SC_MEMLOCK: c_int = 17; +pub const _SC_MEMLOCK_RANGE: c_int = 18; +pub const _SC_MEMORY_PROTECTION: c_int = 19; +pub const _SC_MESSAGE_PASSING: c_int = 20; +pub const _SC_SEMAPHORES: c_int = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22; +pub const _SC_AIO_LISTIO_MAX: c_int = 23; +pub const _SC_AIO_MAX: c_int = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 25; +pub const _SC_DELAYTIMER_MAX: c_int = 26; +pub const _SC_MQ_OPEN_MAX: c_int = 27; +pub const _SC_MQ_PRIO_MAX: c_int = 28; +pub const _SC_VERSION: c_int = 29; +pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_RTSIG_MAX: c_int = 31; +pub const _SC_SEM_NSEMS_MAX: c_int = 32; +pub const _SC_SEM_VALUE_MAX: c_int = 33; +pub const _SC_SIGQUEUE_MAX: c_int = 34; +pub const _SC_TIMER_MAX: c_int = 35; +pub const _SC_BC_BASE_MAX: c_int = 36; +pub const _SC_BC_DIM_MAX: c_int = 37; +pub const _SC_BC_SCALE_MAX: c_int = 38; +pub const _SC_BC_STRING_MAX: c_int = 39; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 40; +pub const _SC_EXPR_NEST_MAX: c_int = 42; +pub const _SC_LINE_MAX: c_int = 43; +pub const _SC_RE_DUP_MAX: c_int = 44; +pub const _SC_2_VERSION: c_int = 46; +pub const _SC_2_C_BIND: c_int = 47; +pub const _SC_2_C_DEV: c_int = 48; +pub const _SC_2_FORT_DEV: c_int = 49; +pub const _SC_2_FORT_RUN: c_int = 50; +pub const _SC_2_SW_DEV: c_int = 51; +pub const _SC_2_LOCALEDEF: c_int = 52; +pub const _SC_UIO_MAXIOV: c_int = 60; +pub const _SC_IOV_MAX: c_int = 60; +pub const _SC_THREADS: c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 68; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 69; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 70; +pub const _SC_LOGIN_NAME_MAX: c_int = 71; +pub const _SC_TTY_NAME_MAX: c_int = 72; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 73; +pub const _SC_THREAD_KEYS_MAX: c_int = 74; +pub const _SC_THREAD_STACK_MIN: c_int = 75; +pub const _SC_THREAD_THREADS_MAX: c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 80; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 81; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 82; +pub const _SC_NPROCESSORS_CONF: c_int = 83; +pub const _SC_NPROCESSORS_ONLN: c_int = 84; +pub const _SC_PHYS_PAGES: c_int = 85; +pub const _SC_AVPHYS_PAGES: c_int = 86; +pub const _SC_ATEXIT_MAX: c_int = 87; +pub const _SC_PASS_MAX: c_int = 88; +pub const _SC_XOPEN_VERSION: c_int = 89; +pub const _SC_XOPEN_XCU_VERSION: c_int = 90; +pub const _SC_XOPEN_UNIX: c_int = 91; +pub const _SC_XOPEN_CRYPT: c_int = 92; +pub const _SC_XOPEN_ENH_I18N: c_int = 93; +pub const _SC_XOPEN_SHM: c_int = 94; +pub const _SC_2_CHAR_TERM: c_int = 95; +pub const _SC_2_UPE: c_int = 97; +pub const _SC_XOPEN_XPG2: c_int = 98; +pub const _SC_XOPEN_XPG3: c_int = 99; +pub const _SC_XOPEN_XPG4: c_int = 100; +pub const _SC_NZERO: c_int = 109; +pub const _SC_XBS5_ILP32_OFF32: c_int = 125; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 126; +pub const _SC_XBS5_LP64_OFF64: c_int = 127; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 128; +pub const _SC_XOPEN_LEGACY: c_int = 129; +pub const _SC_XOPEN_REALTIME: c_int = 130; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 131; +pub const _SC_ADVISORY_INFO: c_int = 132; +pub const _SC_BARRIERS: c_int = 133; +pub const _SC_CLOCK_SELECTION: c_int = 137; +pub const _SC_CPUTIME: c_int = 138; +pub const _SC_THREAD_CPUTIME: c_int = 139; +pub const _SC_MONOTONIC_CLOCK: c_int = 149; +pub const _SC_READER_WRITER_LOCKS: c_int = 153; +pub const _SC_SPIN_LOCKS: c_int = 154; +pub const _SC_REGEXP: c_int = 155; +pub const _SC_SHELL: c_int = 157; +pub const _SC_SPAWN: c_int = 159; +pub const _SC_SPORADIC_SERVER: c_int = 160; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 161; +pub const _SC_TIMEOUTS: c_int = 164; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 165; +pub const _SC_2_PBS: c_int = 168; +pub const _SC_2_PBS_ACCOUNTING: c_int = 169; +pub const _SC_2_PBS_LOCATE: c_int = 170; +pub const _SC_2_PBS_MESSAGE: c_int = 171; +pub const _SC_2_PBS_TRACK: c_int = 172; +pub const _SC_SYMLOOP_MAX: c_int = 173; +pub const _SC_STREAMS: c_int = 174; +pub const _SC_2_PBS_CHECKPOINT: c_int = 175; +pub const _SC_V6_ILP32_OFF32: c_int = 176; +pub const _SC_V6_ILP32_OFFBIG: c_int = 177; +pub const _SC_V6_LP64_OFF64: c_int = 178; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 179; +pub const _SC_HOST_NAME_MAX: c_int = 180; +pub const _SC_TRACE: c_int = 181; +pub const _SC_TRACE_EVENT_FILTER: c_int = 182; +pub const _SC_TRACE_INHERIT: c_int = 183; +pub const _SC_TRACE_LOG: c_int = 184; +pub const _SC_IPV6: c_int = 235; +pub const _SC_RAW_SOCKETS: c_int = 236; +pub const _SC_V7_ILP32_OFF32: c_int = 237; +pub const _SC_V7_ILP32_OFFBIG: c_int = 238; +pub const _SC_V7_LP64_OFF64: c_int = 239; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 240; +pub const _SC_SS_REPL_MAX: c_int = 241; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 242; +pub const _SC_TRACE_NAME_MAX: c_int = 243; +pub const _SC_TRACE_SYS_MAX: c_int = 244; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 245; +pub const _SC_XOPEN_STREAMS: c_int = 246; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248; + +pub const RLIM_SAVED_MAX: crate::rlim_t = RLIM_INFINITY; +pub const RLIM_SAVED_CUR: crate::rlim_t = RLIM_INFINITY; + +pub const GLOB_ERR: c_int = 1 << 0; +pub const GLOB_MARK: c_int = 1 << 1; +pub const GLOB_NOSORT: c_int = 1 << 2; +pub const GLOB_DOOFFS: c_int = 1 << 3; +pub const GLOB_NOCHECK: c_int = 1 << 4; +pub const GLOB_APPEND: c_int = 1 << 5; +pub const GLOB_NOESCAPE: c_int = 1 << 6; + +pub const GLOB_NOSPACE: c_int = 1; +pub const GLOB_ABORTED: c_int = 2; +pub const GLOB_NOMATCH: c_int = 3; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; pub const S_IEXEC: mode_t = 0o0100; pub const S_IWRITE: mode_t = 0o0200; pub const S_IREAD: mode_t = 0o0400; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; - -pub const IFF_LOWER_UP: ::c_int = 0x10000; -pub const IFF_DORMANT: ::c_int = 0x20000; -pub const IFF_ECHO: ::c_int = 0x40000; - -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; -pub const ST_NODEV: ::c_ulong = 4; -pub const ST_NOEXEC: ::c_ulong = 8; -pub const ST_SYNCHRONOUS: ::c_ulong = 16; -pub const ST_MANDLOCK: ::c_ulong = 64; -pub const ST_WRITE: ::c_ulong = 128; -pub const ST_APPEND: ::c_ulong = 256; -pub const ST_IMMUTABLE: ::c_ulong = 512; -pub const ST_NOATIME: ::c_ulong = 1024; -pub const ST_NODIRATIME: ::c_ulong = 2048; - -pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOW: ::c_int = 0x2; - -pub const TCP_MD5SIG: ::c_int = 14; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; + +pub const IFF_LOWER_UP: c_int = 0x10000; +pub const IFF_DORMANT: c_int = 0x20000; +pub const IFF_ECHO: c_int = 0x40000; + +pub const ST_RDONLY: c_ulong = 1; +pub const ST_NOSUID: c_ulong = 2; +pub const ST_NODEV: c_ulong = 4; +pub const ST_NOEXEC: c_ulong = 8; +pub const ST_SYNCHRONOUS: c_ulong = 16; +pub const ST_MANDLOCK: c_ulong = 64; +pub const ST_WRITE: c_ulong = 128; +pub const ST_APPEND: c_ulong = 256; +pub const ST_IMMUTABLE: c_ulong = 512; +pub const ST_NOATIME: c_ulong = 1024; +pub const ST_NODIRATIME: c_ulong = 2048; + +pub const RTLD_NEXT: *mut c_void = -1i64 as *mut c_void; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; +pub const RTLD_NODELETE: c_int = 0x1000; +pub const RTLD_NOW: c_int = 0x2; + +pub const TCP_MD5SIG: c_int = 14; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { size: [0; __SIZEOF_PTHREAD_MUTEX_T], @@ -2445,340 +2445,340 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { size: [0; __SIZEOF_PTHREAD_RWLOCK_T], }; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; -pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; +pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; pub const __SIZEOF_PTHREAD_COND_T: usize = 48; -pub const RENAME_NOREPLACE: ::c_int = 1; -pub const RENAME_EXCHANGE: ::c_int = 2; -pub const RENAME_WHITEOUT: ::c_int = 4; +pub const RENAME_NOREPLACE: c_int = 1; +pub const RENAME_EXCHANGE: c_int = 2; +pub const RENAME_WHITEOUT: c_int = 4; -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_BATCH: ::c_int = 3; -pub const SCHED_IDLE: ::c_int = 5; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; +pub const SCHED_BATCH: c_int = 3; +pub const SCHED_IDLE: c_int = 5; // netinet/in.h // NOTE: These are in addition to the constants defined in src/unix/mod.rs // IPPROTO_IP defined in src/unix/mod.rs /// Hop-by-hop option header -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; // IPPROTO_UDP defined in src/unix/mod.rs /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; /// DCCP -pub const IPPROTO_DCCP: ::c_int = 33; +pub const IPPROTO_DCCP: c_int = 33; // IPPROTO_IPV6 defined in src/unix/mod.rs /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; -pub const IPPROTO_MTP: ::c_int = 92; -pub const IPPROTO_BEETPH: ::c_int = 94; +pub const IPPROTO_DSTOPTS: c_int = 60; +pub const IPPROTO_MTP: c_int = 92; +pub const IPPROTO_BEETPH: c_int = 94; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// Protocol indep. multicast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// IP Payload Comp. Protocol -pub const IPPROTO_COMP: ::c_int = 108; +pub const IPPROTO_COMP: c_int = 108; /// SCTP -pub const IPPROTO_SCTP: ::c_int = 132; -pub const IPPROTO_MH: ::c_int = 135; -pub const IPPROTO_UDPLITE: ::c_int = 136; -pub const IPPROTO_MPLS: ::c_int = 137; +pub const IPPROTO_SCTP: c_int = 132; +pub const IPPROTO_MH: c_int = 135; +pub const IPPROTO_UDPLITE: c_int = 136; +pub const IPPROTO_MPLS: c_int = 137; /// raw IP packet -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_MAX: ::c_int = 256; - -pub const AF_IB: ::c_int = 27; -pub const AF_MPLS: ::c_int = 28; -pub const AF_NFC: ::c_int = 39; -pub const AF_VSOCK: ::c_int = 40; -pub const PF_IB: ::c_int = AF_IB; -pub const PF_MPLS: ::c_int = AF_MPLS; -pub const PF_NFC: ::c_int = AF_NFC; -pub const PF_VSOCK: ::c_int = AF_VSOCK; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_MAX: c_int = 256; + +pub const AF_IB: c_int = 27; +pub const AF_MPLS: c_int = 28; +pub const AF_NFC: c_int = 39; +pub const AF_VSOCK: c_int = 40; +pub const PF_IB: c_int = AF_IB; +pub const PF_MPLS: c_int = AF_MPLS; +pub const PF_NFC: c_int = AF_NFC; +pub const PF_VSOCK: c_int = AF_VSOCK; // System V IPC -pub const IPC_PRIVATE: ::key_t = 0; - -pub const IPC_CREAT: ::c_int = 0o1000; -pub const IPC_EXCL: ::c_int = 0o2000; -pub const IPC_NOWAIT: ::c_int = 0o4000; - -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; -pub const IPC_INFO: ::c_int = 3; -pub const MSG_STAT: ::c_int = 11; -pub const MSG_INFO: ::c_int = 12; - -pub const MSG_NOERROR: ::c_int = 0o10000; -pub const MSG_EXCEPT: ::c_int = 0o20000; -pub const MSG_COPY: ::c_int = 0o40000; - -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; - -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_REMAP: ::c_int = 0o40000; -pub const SHM_EXEC: ::c_int = 0o100000; - -pub const SHM_LOCK: ::c_int = 11; -pub const SHM_UNLOCK: ::c_int = 12; - -pub const SHM_HUGETLB: ::c_int = 0o4000; -pub const SHM_NORESERVE: ::c_int = 0o10000; - -pub const EPOLLRDHUP: ::c_int = 0x2000; -pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000; -pub const EPOLLONESHOT: ::c_int = 0x40000000; - -pub const QFMT_VFS_OLD: ::c_int = 1; -pub const QFMT_VFS_V0: ::c_int = 2; -pub const QFMT_VFS_V1: ::c_int = 4; - -pub const EFD_SEMAPHORE: ::c_int = 0x1; - -pub const LOG_NFACILITIES: ::c_int = 24; - -pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; - -pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32; -pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32; -pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32; -pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32; -pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32; -pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32; -pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32; - -pub const AI_PASSIVE: ::c_int = 0x0001; -pub const AI_CANONNAME: ::c_int = 0x0002; -pub const AI_NUMERICHOST: ::c_int = 0x0004; -pub const AI_V4MAPPED: ::c_int = 0x0008; -pub const AI_ALL: ::c_int = 0x0010; -pub const AI_ADDRCONFIG: ::c_int = 0x0020; - -pub const AI_NUMERICSERV: ::c_int = 0x0400; - -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_OVERFLOW: ::c_int = -12; - -pub const NI_NUMERICHOST: ::c_int = 1; -pub const NI_NUMERICSERV: ::c_int = 2; -pub const NI_NOFQDN: ::c_int = 4; -pub const NI_NAMEREQD: ::c_int = 8; -pub const NI_DGRAM: ::c_int = 16; - -pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1; -pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2; -pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4; - -pub const EAI_SYSTEM: ::c_int = -11; - -pub const AIO_CANCELED: ::c_int = 0; -pub const AIO_NOTCANCELED: ::c_int = 1; -pub const AIO_ALLDONE: ::c_int = 2; -pub const LIO_READ: ::c_int = 0; -pub const LIO_WRITE: ::c_int = 1; -pub const LIO_NOP: ::c_int = 2; -pub const LIO_WAIT: ::c_int = 0; -pub const LIO_NOWAIT: ::c_int = 1; - -pub const MREMAP_MAYMOVE: ::c_int = 1; -pub const MREMAP_FIXED: ::c_int = 2; - -pub const PR_SET_PDEATHSIG: ::c_int = 1; -pub const PR_GET_PDEATHSIG: ::c_int = 2; - -pub const PR_GET_DUMPABLE: ::c_int = 3; -pub const PR_SET_DUMPABLE: ::c_int = 4; - -pub const PR_GET_UNALIGN: ::c_int = 5; -pub const PR_SET_UNALIGN: ::c_int = 6; -pub const PR_UNALIGN_NOPRINT: ::c_int = 1; -pub const PR_UNALIGN_SIGBUS: ::c_int = 2; - -pub const PR_GET_KEEPCAPS: ::c_int = 7; -pub const PR_SET_KEEPCAPS: ::c_int = 8; - -pub const PR_GET_FPEMU: ::c_int = 9; -pub const PR_SET_FPEMU: ::c_int = 10; -pub const PR_FPEMU_NOPRINT: ::c_int = 1; -pub const PR_FPEMU_SIGFPE: ::c_int = 2; - -pub const PR_GET_FPEXC: ::c_int = 11; -pub const PR_SET_FPEXC: ::c_int = 12; -pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80; -pub const PR_FP_EXC_DIV: ::c_int = 0x010000; -pub const PR_FP_EXC_OVF: ::c_int = 0x020000; -pub const PR_FP_EXC_UND: ::c_int = 0x040000; -pub const PR_FP_EXC_RES: ::c_int = 0x080000; -pub const PR_FP_EXC_INV: ::c_int = 0x100000; -pub const PR_FP_EXC_DISABLED: ::c_int = 0; -pub const PR_FP_EXC_NONRECOV: ::c_int = 1; -pub const PR_FP_EXC_ASYNC: ::c_int = 2; -pub const PR_FP_EXC_PRECISE: ::c_int = 3; - -pub const PR_GET_TIMING: ::c_int = 13; -pub const PR_SET_TIMING: ::c_int = 14; -pub const PR_TIMING_STATISTICAL: ::c_int = 0; -pub const PR_TIMING_TIMESTAMP: ::c_int = 1; - -pub const PR_SET_NAME: ::c_int = 15; -pub const PR_GET_NAME: ::c_int = 16; - -pub const PR_GET_ENDIAN: ::c_int = 19; -pub const PR_SET_ENDIAN: ::c_int = 20; -pub const PR_ENDIAN_BIG: ::c_int = 0; -pub const PR_ENDIAN_LITTLE: ::c_int = 1; -pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2; - -pub const PR_GET_SECCOMP: ::c_int = 21; -pub const PR_SET_SECCOMP: ::c_int = 22; - -pub const PR_CAPBSET_READ: ::c_int = 23; -pub const PR_CAPBSET_DROP: ::c_int = 24; - -pub const PR_GET_TSC: ::c_int = 25; -pub const PR_SET_TSC: ::c_int = 26; -pub const PR_TSC_ENABLE: ::c_int = 1; -pub const PR_TSC_SIGSEGV: ::c_int = 2; - -pub const PR_GET_SECUREBITS: ::c_int = 27; -pub const PR_SET_SECUREBITS: ::c_int = 28; - -pub const PR_SET_TIMERSLACK: ::c_int = 29; -pub const PR_GET_TIMERSLACK: ::c_int = 30; - -pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31; -pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32; - -pub const PR_MCE_KILL: ::c_int = 33; -pub const PR_MCE_KILL_CLEAR: ::c_int = 0; -pub const PR_MCE_KILL_SET: ::c_int = 1; - -pub const PR_MCE_KILL_LATE: ::c_int = 0; -pub const PR_MCE_KILL_EARLY: ::c_int = 1; -pub const PR_MCE_KILL_DEFAULT: ::c_int = 2; - -pub const PR_MCE_KILL_GET: ::c_int = 34; - -pub const PR_SET_MM: ::c_int = 35; -pub const PR_SET_MM_START_CODE: ::c_int = 1; -pub const PR_SET_MM_END_CODE: ::c_int = 2; -pub const PR_SET_MM_START_DATA: ::c_int = 3; -pub const PR_SET_MM_END_DATA: ::c_int = 4; -pub const PR_SET_MM_START_STACK: ::c_int = 5; -pub const PR_SET_MM_START_BRK: ::c_int = 6; -pub const PR_SET_MM_BRK: ::c_int = 7; -pub const PR_SET_MM_ARG_START: ::c_int = 8; -pub const PR_SET_MM_ARG_END: ::c_int = 9; -pub const PR_SET_MM_ENV_START: ::c_int = 10; -pub const PR_SET_MM_ENV_END: ::c_int = 11; -pub const PR_SET_MM_AUXV: ::c_int = 12; -pub const PR_SET_MM_EXE_FILE: ::c_int = 13; -pub const PR_SET_MM_MAP: ::c_int = 14; -pub const PR_SET_MM_MAP_SIZE: ::c_int = 15; - -pub const PR_SET_PTRACER: ::c_int = 0x59616d61; -pub const PR_SET_PTRACER_ANY: ::c_ulong = 0xffffffffffffffff; - -pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36; -pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37; - -pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38; -pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39; - -pub const PR_GET_TID_ADDRESS: ::c_int = 40; - -pub const PR_SET_THP_DISABLE: ::c_int = 41; -pub const PR_GET_THP_DISABLE: ::c_int = 42; - -pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43; -pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44; - -pub const PR_SET_FP_MODE: ::c_int = 45; -pub const PR_GET_FP_MODE: ::c_int = 46; -pub const PR_FP_MODE_FR: ::c_int = 1 << 0; -pub const PR_FP_MODE_FRE: ::c_int = 1 << 1; - -pub const PR_CAP_AMBIENT: ::c_int = 47; -pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1; -pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2; -pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3; -pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4; - -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; - -pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC; -pub const TFD_NONBLOCK: ::c_int = O_NONBLOCK; -pub const TFD_TIMER_ABSTIME: ::c_int = 1; - -pub const XATTR_CREATE: ::c_int = 0x1; -pub const XATTR_REPLACE: ::c_int = 0x2; +pub const IPC_PRIVATE: crate::key_t = 0; + +pub const IPC_CREAT: c_int = 0o1000; +pub const IPC_EXCL: c_int = 0o2000; +pub const IPC_NOWAIT: c_int = 0o4000; + +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; +pub const IPC_INFO: c_int = 3; +pub const MSG_STAT: c_int = 11; +pub const MSG_INFO: c_int = 12; + +pub const MSG_NOERROR: c_int = 0o10000; +pub const MSG_EXCEPT: c_int = 0o20000; +pub const MSG_COPY: c_int = 0o40000; + +pub const SHM_R: c_int = 0o400; +pub const SHM_W: c_int = 0o200; + +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_REMAP: c_int = 0o40000; +pub const SHM_EXEC: c_int = 0o100000; + +pub const SHM_LOCK: c_int = 11; +pub const SHM_UNLOCK: c_int = 12; + +pub const SHM_HUGETLB: c_int = 0o4000; +pub const SHM_NORESERVE: c_int = 0o10000; + +pub const EPOLLRDHUP: c_int = 0x2000; +pub const EPOLLEXCLUSIVE: c_int = 0x10000000; +pub const EPOLLONESHOT: c_int = 0x40000000; + +pub const QFMT_VFS_OLD: c_int = 1; +pub const QFMT_VFS_V0: c_int = 2; +pub const QFMT_VFS_V1: c_int = 4; + +pub const EFD_SEMAPHORE: c_int = 0x1; + +pub const LOG_NFACILITIES: c_int = 24; + +pub const SEM_FAILED: *mut crate::sem_t = 0 as *mut sem_t; + +pub const RB_AUTOBOOT: c_int = 0x01234567u32 as i32; +pub const RB_HALT_SYSTEM: c_int = 0xcdef0123u32 as i32; +pub const RB_ENABLE_CAD: c_int = 0x89abcdefu32 as i32; +pub const RB_DISABLE_CAD: c_int = 0x00000000u32 as i32; +pub const RB_POWER_OFF: c_int = 0x4321fedcu32 as i32; +pub const RB_SW_SUSPEND: c_int = 0xd000fce2u32 as i32; +pub const RB_KEXEC: c_int = 0x45584543u32 as i32; + +pub const AI_PASSIVE: c_int = 0x0001; +pub const AI_CANONNAME: c_int = 0x0002; +pub const AI_NUMERICHOST: c_int = 0x0004; +pub const AI_V4MAPPED: c_int = 0x0008; +pub const AI_ALL: c_int = 0x0010; +pub const AI_ADDRCONFIG: c_int = 0x0020; + +pub const AI_NUMERICSERV: c_int = 0x0400; + +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_OVERFLOW: c_int = -12; + +pub const NI_NUMERICHOST: c_int = 1; +pub const NI_NUMERICSERV: c_int = 2; +pub const NI_NOFQDN: c_int = 4; +pub const NI_NAMEREQD: c_int = 8; +pub const NI_DGRAM: c_int = 16; + +pub const SYNC_FILE_RANGE_WAIT_BEFORE: c_uint = 1; +pub const SYNC_FILE_RANGE_WRITE: c_uint = 2; +pub const SYNC_FILE_RANGE_WAIT_AFTER: c_uint = 4; + +pub const EAI_SYSTEM: c_int = -11; + +pub const AIO_CANCELED: c_int = 0; +pub const AIO_NOTCANCELED: c_int = 1; +pub const AIO_ALLDONE: c_int = 2; +pub const LIO_READ: c_int = 0; +pub const LIO_WRITE: c_int = 1; +pub const LIO_NOP: c_int = 2; +pub const LIO_WAIT: c_int = 0; +pub const LIO_NOWAIT: c_int = 1; + +pub const MREMAP_MAYMOVE: c_int = 1; +pub const MREMAP_FIXED: c_int = 2; + +pub const PR_SET_PDEATHSIG: c_int = 1; +pub const PR_GET_PDEATHSIG: c_int = 2; + +pub const PR_GET_DUMPABLE: c_int = 3; +pub const PR_SET_DUMPABLE: c_int = 4; + +pub const PR_GET_UNALIGN: c_int = 5; +pub const PR_SET_UNALIGN: c_int = 6; +pub const PR_UNALIGN_NOPRINT: c_int = 1; +pub const PR_UNALIGN_SIGBUS: c_int = 2; + +pub const PR_GET_KEEPCAPS: c_int = 7; +pub const PR_SET_KEEPCAPS: c_int = 8; + +pub const PR_GET_FPEMU: c_int = 9; +pub const PR_SET_FPEMU: c_int = 10; +pub const PR_FPEMU_NOPRINT: c_int = 1; +pub const PR_FPEMU_SIGFPE: c_int = 2; + +pub const PR_GET_FPEXC: c_int = 11; +pub const PR_SET_FPEXC: c_int = 12; +pub const PR_FP_EXC_SW_ENABLE: c_int = 0x80; +pub const PR_FP_EXC_DIV: c_int = 0x010000; +pub const PR_FP_EXC_OVF: c_int = 0x020000; +pub const PR_FP_EXC_UND: c_int = 0x040000; +pub const PR_FP_EXC_RES: c_int = 0x080000; +pub const PR_FP_EXC_INV: c_int = 0x100000; +pub const PR_FP_EXC_DISABLED: c_int = 0; +pub const PR_FP_EXC_NONRECOV: c_int = 1; +pub const PR_FP_EXC_ASYNC: c_int = 2; +pub const PR_FP_EXC_PRECISE: c_int = 3; + +pub const PR_GET_TIMING: c_int = 13; +pub const PR_SET_TIMING: c_int = 14; +pub const PR_TIMING_STATISTICAL: c_int = 0; +pub const PR_TIMING_TIMESTAMP: c_int = 1; + +pub const PR_SET_NAME: c_int = 15; +pub const PR_GET_NAME: c_int = 16; + +pub const PR_GET_ENDIAN: c_int = 19; +pub const PR_SET_ENDIAN: c_int = 20; +pub const PR_ENDIAN_BIG: c_int = 0; +pub const PR_ENDIAN_LITTLE: c_int = 1; +pub const PR_ENDIAN_PPC_LITTLE: c_int = 2; + +pub const PR_GET_SECCOMP: c_int = 21; +pub const PR_SET_SECCOMP: c_int = 22; + +pub const PR_CAPBSET_READ: c_int = 23; +pub const PR_CAPBSET_DROP: c_int = 24; + +pub const PR_GET_TSC: c_int = 25; +pub const PR_SET_TSC: c_int = 26; +pub const PR_TSC_ENABLE: c_int = 1; +pub const PR_TSC_SIGSEGV: c_int = 2; + +pub const PR_GET_SECUREBITS: c_int = 27; +pub const PR_SET_SECUREBITS: c_int = 28; + +pub const PR_SET_TIMERSLACK: c_int = 29; +pub const PR_GET_TIMERSLACK: c_int = 30; + +pub const PR_TASK_PERF_EVENTS_DISABLE: c_int = 31; +pub const PR_TASK_PERF_EVENTS_ENABLE: c_int = 32; + +pub const PR_MCE_KILL: c_int = 33; +pub const PR_MCE_KILL_CLEAR: c_int = 0; +pub const PR_MCE_KILL_SET: c_int = 1; + +pub const PR_MCE_KILL_LATE: c_int = 0; +pub const PR_MCE_KILL_EARLY: c_int = 1; +pub const PR_MCE_KILL_DEFAULT: c_int = 2; + +pub const PR_MCE_KILL_GET: c_int = 34; + +pub const PR_SET_MM: c_int = 35; +pub const PR_SET_MM_START_CODE: c_int = 1; +pub const PR_SET_MM_END_CODE: c_int = 2; +pub const PR_SET_MM_START_DATA: c_int = 3; +pub const PR_SET_MM_END_DATA: c_int = 4; +pub const PR_SET_MM_START_STACK: c_int = 5; +pub const PR_SET_MM_START_BRK: c_int = 6; +pub const PR_SET_MM_BRK: c_int = 7; +pub const PR_SET_MM_ARG_START: c_int = 8; +pub const PR_SET_MM_ARG_END: c_int = 9; +pub const PR_SET_MM_ENV_START: c_int = 10; +pub const PR_SET_MM_ENV_END: c_int = 11; +pub const PR_SET_MM_AUXV: c_int = 12; +pub const PR_SET_MM_EXE_FILE: c_int = 13; +pub const PR_SET_MM_MAP: c_int = 14; +pub const PR_SET_MM_MAP_SIZE: c_int = 15; + +pub const PR_SET_PTRACER: c_int = 0x59616d61; +pub const PR_SET_PTRACER_ANY: c_ulong = 0xffffffffffffffff; + +pub const PR_SET_CHILD_SUBREAPER: c_int = 36; +pub const PR_GET_CHILD_SUBREAPER: c_int = 37; + +pub const PR_SET_NO_NEW_PRIVS: c_int = 38; +pub const PR_GET_NO_NEW_PRIVS: c_int = 39; + +pub const PR_GET_TID_ADDRESS: c_int = 40; + +pub const PR_SET_THP_DISABLE: c_int = 41; +pub const PR_GET_THP_DISABLE: c_int = 42; + +pub const PR_MPX_ENABLE_MANAGEMENT: c_int = 43; +pub const PR_MPX_DISABLE_MANAGEMENT: c_int = 44; + +pub const PR_SET_FP_MODE: c_int = 45; +pub const PR_GET_FP_MODE: c_int = 46; +pub const PR_FP_MODE_FR: c_int = 1 << 0; +pub const PR_FP_MODE_FRE: c_int = 1 << 1; + +pub const PR_CAP_AMBIENT: c_int = 47; +pub const PR_CAP_AMBIENT_IS_SET: c_int = 1; +pub const PR_CAP_AMBIENT_RAISE: c_int = 2; +pub const PR_CAP_AMBIENT_LOWER: c_int = 3; +pub const PR_CAP_AMBIENT_CLEAR_ALL: c_int = 4; + +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; + +pub const TFD_CLOEXEC: c_int = O_CLOEXEC; +pub const TFD_NONBLOCK: c_int = O_NONBLOCK; +pub const TFD_TIMER_ABSTIME: c_int = 1; + +pub const XATTR_CREATE: c_int = 0x1; +pub const XATTR_REPLACE: c_int = 0x2; -pub const _POSIX_VDISABLE: ::cc_t = 0; - -pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; -pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; -pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08; -pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10; -pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20; -pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40; +pub const _POSIX_VDISABLE: crate::cc_t = 0; + +pub const FALLOC_FL_KEEP_SIZE: c_int = 0x01; +pub const FALLOC_FL_PUNCH_HOLE: c_int = 0x02; +pub const FALLOC_FL_COLLAPSE_RANGE: c_int = 0x08; +pub const FALLOC_FL_ZERO_RANGE: c_int = 0x10; +pub const FALLOC_FL_INSERT_RANGE: c_int = 0x20; +pub const FALLOC_FL_UNSHARE_RANGE: c_int = 0x40; // On Linux, libc doesn't define this constant, libattr does instead. // We still define it for Linux as it's defined by libc on other platforms, // and it's mentioned in the man pages for getxattr and setxattr. -pub const ENOATTR: ::c_int = ::ENODATA; +pub const ENOATTR: c_int = crate::ENODATA; -pub const SO_ORIGINAL_DST: ::c_int = 80; -pub const IUTF8: ::tcflag_t = 0x00004000; -pub const CMSPAR: ::tcflag_t = 0o10000000000; +pub const SO_ORIGINAL_DST: c_int = 80; +pub const IUTF8: crate::tcflag_t = 0x00004000; +pub const CMSPAR: crate::tcflag_t = 0o10000000000; -pub const MFD_CLOEXEC: ::c_uint = 0x0001; -pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002; +pub const MFD_CLOEXEC: c_uint = 0x0001; +pub const MFD_ALLOW_SEALING: c_uint = 0x0002; // these are used in the p_type field of Elf32_Phdr and Elf64_Phdr, which has // the type Elf32Word and Elf64Word respectively. Luckily, both of those are u32 @@ -2798,226 +2798,226 @@ pub const PT_GNU_STACK: u32 = 0x6474e551; pub const PT_GNU_RELRO: u32 = 0x6474e552; // Ethernet protocol IDs. -pub const ETH_P_LOOP: ::c_int = 0x0060; -pub const ETH_P_PUP: ::c_int = 0x0200; -pub const ETH_P_PUPAT: ::c_int = 0x0201; -pub const ETH_P_IP: ::c_int = 0x0800; -pub const ETH_P_X25: ::c_int = 0x0805; -pub const ETH_P_ARP: ::c_int = 0x0806; -pub const ETH_P_BPQ: ::c_int = 0x08FF; -pub const ETH_P_IEEEPUP: ::c_int = 0x0a00; -pub const ETH_P_IEEEPUPAT: ::c_int = 0x0a01; -pub const ETH_P_BATMAN: ::c_int = 0x4305; -pub const ETH_P_DEC: ::c_int = 0x6000; -pub const ETH_P_DNA_DL: ::c_int = 0x6001; -pub const ETH_P_DNA_RC: ::c_int = 0x6002; -pub const ETH_P_DNA_RT: ::c_int = 0x6003; -pub const ETH_P_LAT: ::c_int = 0x6004; -pub const ETH_P_DIAG: ::c_int = 0x6005; -pub const ETH_P_CUST: ::c_int = 0x6006; -pub const ETH_P_SCA: ::c_int = 0x6007; -pub const ETH_P_TEB: ::c_int = 0x6558; -pub const ETH_P_RARP: ::c_int = 0x8035; -pub const ETH_P_ATALK: ::c_int = 0x809B; -pub const ETH_P_AARP: ::c_int = 0x80F3; -pub const ETH_P_8021Q: ::c_int = 0x8100; -pub const ETH_P_IPX: ::c_int = 0x8137; -pub const ETH_P_IPV6: ::c_int = 0x86DD; -pub const ETH_P_PAUSE: ::c_int = 0x8808; -pub const ETH_P_SLOW: ::c_int = 0x8809; -pub const ETH_P_WCCP: ::c_int = 0x883E; -pub const ETH_P_MPLS_UC: ::c_int = 0x8847; -pub const ETH_P_MPLS_MC: ::c_int = 0x8848; -pub const ETH_P_ATMMPOA: ::c_int = 0x884c; -pub const ETH_P_PPP_DISC: ::c_int = 0x8863; -pub const ETH_P_PPP_SES: ::c_int = 0x8864; -pub const ETH_P_LINK_CTL: ::c_int = 0x886c; -pub const ETH_P_ATMFATE: ::c_int = 0x8884; -pub const ETH_P_PAE: ::c_int = 0x888E; -pub const ETH_P_AOE: ::c_int = 0x88A2; -pub const ETH_P_8021AD: ::c_int = 0x88A8; -pub const ETH_P_802_EX1: ::c_int = 0x88B5; -pub const ETH_P_TIPC: ::c_int = 0x88CA; -pub const ETH_P_8021AH: ::c_int = 0x88E7; -pub const ETH_P_MVRP: ::c_int = 0x88F5; -pub const ETH_P_1588: ::c_int = 0x88F7; -pub const ETH_P_PRP: ::c_int = 0x88FB; -pub const ETH_P_FCOE: ::c_int = 0x8906; -pub const ETH_P_TDLS: ::c_int = 0x890D; -pub const ETH_P_FIP: ::c_int = 0x8914; -pub const ETH_P_80221: ::c_int = 0x8917; -pub const ETH_P_LOOPBACK: ::c_int = 0x9000; -pub const ETH_P_QINQ1: ::c_int = 0x9100; -pub const ETH_P_QINQ2: ::c_int = 0x9200; -pub const ETH_P_QINQ3: ::c_int = 0x9300; -pub const ETH_P_EDSA: ::c_int = 0xDADA; -pub const ETH_P_AF_IUCV: ::c_int = 0xFBFB; - -pub const ETH_P_802_3_MIN: ::c_int = 0x0600; - -pub const ETH_P_802_3: ::c_int = 0x0001; -pub const ETH_P_AX25: ::c_int = 0x0002; -pub const ETH_P_ALL: ::c_int = 0x0003; -pub const ETH_P_802_2: ::c_int = 0x0004; -pub const ETH_P_SNAP: ::c_int = 0x0005; -pub const ETH_P_DDCMP: ::c_int = 0x0006; -pub const ETH_P_WAN_PPP: ::c_int = 0x0007; -pub const ETH_P_PPP_MP: ::c_int = 0x0008; -pub const ETH_P_LOCALTALK: ::c_int = 0x0009; -pub const ETH_P_CAN: ::c_int = 0x000C; -pub const ETH_P_CANFD: ::c_int = 0x000D; -pub const ETH_P_PPPTALK: ::c_int = 0x0010; -pub const ETH_P_TR_802_2: ::c_int = 0x0011; -pub const ETH_P_MOBITEX: ::c_int = 0x0015; -pub const ETH_P_CONTROL: ::c_int = 0x0016; -pub const ETH_P_IRDA: ::c_int = 0x0017; -pub const ETH_P_ECONET: ::c_int = 0x0018; -pub const ETH_P_HDLC: ::c_int = 0x0019; -pub const ETH_P_ARCNET: ::c_int = 0x001A; -pub const ETH_P_DSA: ::c_int = 0x001B; -pub const ETH_P_TRAILER: ::c_int = 0x001C; -pub const ETH_P_PHONET: ::c_int = 0x00F5; -pub const ETH_P_IEEE802154: ::c_int = 0x00F6; -pub const ETH_P_CAIF: ::c_int = 0x00F7; - -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const ETH_P_LOOP: c_int = 0x0060; +pub const ETH_P_PUP: c_int = 0x0200; +pub const ETH_P_PUPAT: c_int = 0x0201; +pub const ETH_P_IP: c_int = 0x0800; +pub const ETH_P_X25: c_int = 0x0805; +pub const ETH_P_ARP: c_int = 0x0806; +pub const ETH_P_BPQ: c_int = 0x08FF; +pub const ETH_P_IEEEPUP: c_int = 0x0a00; +pub const ETH_P_IEEEPUPAT: c_int = 0x0a01; +pub const ETH_P_BATMAN: c_int = 0x4305; +pub const ETH_P_DEC: c_int = 0x6000; +pub const ETH_P_DNA_DL: c_int = 0x6001; +pub const ETH_P_DNA_RC: c_int = 0x6002; +pub const ETH_P_DNA_RT: c_int = 0x6003; +pub const ETH_P_LAT: c_int = 0x6004; +pub const ETH_P_DIAG: c_int = 0x6005; +pub const ETH_P_CUST: c_int = 0x6006; +pub const ETH_P_SCA: c_int = 0x6007; +pub const ETH_P_TEB: c_int = 0x6558; +pub const ETH_P_RARP: c_int = 0x8035; +pub const ETH_P_ATALK: c_int = 0x809B; +pub const ETH_P_AARP: c_int = 0x80F3; +pub const ETH_P_8021Q: c_int = 0x8100; +pub const ETH_P_IPX: c_int = 0x8137; +pub const ETH_P_IPV6: c_int = 0x86DD; +pub const ETH_P_PAUSE: c_int = 0x8808; +pub const ETH_P_SLOW: c_int = 0x8809; +pub const ETH_P_WCCP: c_int = 0x883E; +pub const ETH_P_MPLS_UC: c_int = 0x8847; +pub const ETH_P_MPLS_MC: c_int = 0x8848; +pub const ETH_P_ATMMPOA: c_int = 0x884c; +pub const ETH_P_PPP_DISC: c_int = 0x8863; +pub const ETH_P_PPP_SES: c_int = 0x8864; +pub const ETH_P_LINK_CTL: c_int = 0x886c; +pub const ETH_P_ATMFATE: c_int = 0x8884; +pub const ETH_P_PAE: c_int = 0x888E; +pub const ETH_P_AOE: c_int = 0x88A2; +pub const ETH_P_8021AD: c_int = 0x88A8; +pub const ETH_P_802_EX1: c_int = 0x88B5; +pub const ETH_P_TIPC: c_int = 0x88CA; +pub const ETH_P_8021AH: c_int = 0x88E7; +pub const ETH_P_MVRP: c_int = 0x88F5; +pub const ETH_P_1588: c_int = 0x88F7; +pub const ETH_P_PRP: c_int = 0x88FB; +pub const ETH_P_FCOE: c_int = 0x8906; +pub const ETH_P_TDLS: c_int = 0x890D; +pub const ETH_P_FIP: c_int = 0x8914; +pub const ETH_P_80221: c_int = 0x8917; +pub const ETH_P_LOOPBACK: c_int = 0x9000; +pub const ETH_P_QINQ1: c_int = 0x9100; +pub const ETH_P_QINQ2: c_int = 0x9200; +pub const ETH_P_QINQ3: c_int = 0x9300; +pub const ETH_P_EDSA: c_int = 0xDADA; +pub const ETH_P_AF_IUCV: c_int = 0xFBFB; + +pub const ETH_P_802_3_MIN: c_int = 0x0600; + +pub const ETH_P_802_3: c_int = 0x0001; +pub const ETH_P_AX25: c_int = 0x0002; +pub const ETH_P_ALL: c_int = 0x0003; +pub const ETH_P_802_2: c_int = 0x0004; +pub const ETH_P_SNAP: c_int = 0x0005; +pub const ETH_P_DDCMP: c_int = 0x0006; +pub const ETH_P_WAN_PPP: c_int = 0x0007; +pub const ETH_P_PPP_MP: c_int = 0x0008; +pub const ETH_P_LOCALTALK: c_int = 0x0009; +pub const ETH_P_CAN: c_int = 0x000C; +pub const ETH_P_CANFD: c_int = 0x000D; +pub const ETH_P_PPPTALK: c_int = 0x0010; +pub const ETH_P_TR_802_2: c_int = 0x0011; +pub const ETH_P_MOBITEX: c_int = 0x0015; +pub const ETH_P_CONTROL: c_int = 0x0016; +pub const ETH_P_IRDA: c_int = 0x0017; +pub const ETH_P_ECONET: c_int = 0x0018; +pub const ETH_P_HDLC: c_int = 0x0019; +pub const ETH_P_ARCNET: c_int = 0x001A; +pub const ETH_P_DSA: c_int = 0x001B; +pub const ETH_P_TRAILER: c_int = 0x001C; +pub const ETH_P_PHONET: c_int = 0x00F5; +pub const ETH_P_IEEE802154: c_int = 0x00F6; +pub const ETH_P_CAIF: c_int = 0x00F7; + +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 0x00040000; -pub const O_NOATIME: ::c_int = 0x00002000; -pub const O_CLOEXEC: ::c_int = 0x00000100; -pub const O_TMPFILE: ::c_int = 0x00004000; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; - -pub const BUFSIZ: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 10000; -pub const FOPEN_MAX: ::c_uint = 1000; -pub const O_PATH: ::c_int = 0x00400000; -pub const O_EXEC: ::c_int = O_PATH; -pub const O_SEARCH: ::c_int = O_PATH; -pub const O_ACCMODE: ::c_int = 03 | O_SEARCH; -pub const O_NDELAY: ::c_int = O_NONBLOCK; -pub const NI_MAXHOST: ::socklen_t = 255; -pub const PTHREAD_STACK_MIN: ::size_t = 2048; -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; - -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const RLIM_INFINITY: ::rlim_t = !0; -pub const RLIMIT_RTTIME: ::c_int = 15; +pub const O_TRUNC: c_int = 0x00040000; +pub const O_NOATIME: c_int = 0x00002000; +pub const O_CLOEXEC: c_int = 0x00000100; +pub const O_TMPFILE: c_int = 0x00004000; + +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; + +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: c_int = 0x80000; + +pub const EFD_CLOEXEC: c_int = 0x80000; + +pub const BUFSIZ: c_uint = 1024; +pub const TMP_MAX: c_uint = 10000; +pub const FOPEN_MAX: c_uint = 1000; +pub const O_PATH: c_int = 0x00400000; +pub const O_EXEC: c_int = O_PATH; +pub const O_SEARCH: c_int = O_PATH; +pub const O_ACCMODE: c_int = 03 | O_SEARCH; +pub const O_NDELAY: c_int = O_NONBLOCK; +pub const NI_MAXHOST: crate::socklen_t = 255; +pub const PTHREAD_STACK_MIN: size_t = 2048; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; + +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const RLIM_INFINITY: crate::rlim_t = !0; +pub const RLIMIT_RTTIME: c_int = 15; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIMIT_NLIMITS: ::c_int = 16; +pub const RLIMIT_NLIMITS: c_int = 16; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = RLIMIT_NLIMITS; +pub const RLIM_NLIMITS: c_int = RLIMIT_NLIMITS; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; -pub const SOCK_DCCP: ::c_int = 6; -pub const SOCK_PACKET: ::c_int = 10; +pub const SOCK_DCCP: c_int = 6; +pub const SOCK_PACKET: c_int = 10; -pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; -pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; -pub const TCP_THIN_DUPACK: ::c_int = 17; -pub const TCP_USER_TIMEOUT: ::c_int = 18; -pub const TCP_REPAIR: ::c_int = 19; -pub const TCP_REPAIR_QUEUE: ::c_int = 20; -pub const TCP_QUEUE_SEQ: ::c_int = 21; -pub const TCP_REPAIR_OPTIONS: ::c_int = 22; -pub const TCP_FASTOPEN: ::c_int = 23; -pub const TCP_TIMESTAMP: ::c_int = 24; +pub const TCP_COOKIE_TRANSACTIONS: c_int = 15; +pub const TCP_THIN_LINEAR_TIMEOUTS: c_int = 16; +pub const TCP_THIN_DUPACK: c_int = 17; +pub const TCP_USER_TIMEOUT: c_int = 18; +pub const TCP_REPAIR: c_int = 19; +pub const TCP_REPAIR_QUEUE: c_int = 20; +pub const TCP_QUEUE_SEQ: c_int = 21; +pub const TCP_REPAIR_OPTIONS: c_int = 22; +pub const TCP_FASTOPEN: c_int = 23; +pub const TCP_TIMESTAMP: c_int = 24; -pub const SIGUNUSED: ::c_int = ::SIGSYS; +pub const SIGUNUSED: c_int = crate::SIGSYS; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; -pub const CPU_SETSIZE: ::c_int = 128; - -pub const PTRACE_TRACEME: ::c_int = 0; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_GETREGS: ::c_int = 12; -pub const PTRACE_SETREGS: ::c_int = 13; -pub const PTRACE_GETFPREGS: ::c_int = 14; -pub const PTRACE_SETFPREGS: ::c_int = 15; -pub const PTRACE_ATTACH: ::c_int = 16; -pub const PTRACE_DETACH: ::c_int = 17; -pub const PTRACE_GETFPXREGS: ::c_int = 18; -pub const PTRACE_SETFPXREGS: ::c_int = 19; -pub const PTRACE_SYSCALL: ::c_int = 24; -pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; -pub const PTRACE_GETREGSET: ::c_int = 0x4204; -pub const PTRACE_SETREGSET: ::c_int = 0x4205; -pub const PTRACE_SEIZE: ::c_int = 0x4206; -pub const PTRACE_INTERRUPT: ::c_int = 0x4207; -pub const PTRACE_LISTEN: ::c_int = 0x4208; -pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209; - -pub const EPOLLWAKEUP: ::c_int = 0x20000000; - -pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK; - -pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK; - -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; - -pub const TIOCINQ: ::c_int = ::FIONREAD; - -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const CPU_SETSIZE: c_int = 128; + +pub const PTRACE_TRACEME: c_int = 0; +pub const PTRACE_PEEKTEXT: c_int = 1; +pub const PTRACE_PEEKDATA: c_int = 2; +pub const PTRACE_PEEKUSER: c_int = 3; +pub const PTRACE_POKETEXT: c_int = 4; +pub const PTRACE_POKEDATA: c_int = 5; +pub const PTRACE_POKEUSER: c_int = 6; +pub const PTRACE_CONT: c_int = 7; +pub const PTRACE_KILL: c_int = 8; +pub const PTRACE_SINGLESTEP: c_int = 9; +pub const PTRACE_GETREGS: c_int = 12; +pub const PTRACE_SETREGS: c_int = 13; +pub const PTRACE_GETFPREGS: c_int = 14; +pub const PTRACE_SETFPREGS: c_int = 15; +pub const PTRACE_ATTACH: c_int = 16; +pub const PTRACE_DETACH: c_int = 17; +pub const PTRACE_GETFPXREGS: c_int = 18; +pub const PTRACE_SETFPXREGS: c_int = 19; +pub const PTRACE_SYSCALL: c_int = 24; +pub const PTRACE_SETOPTIONS: c_int = 0x4200; +pub const PTRACE_GETEVENTMSG: c_int = 0x4201; +pub const PTRACE_GETSIGINFO: c_int = 0x4202; +pub const PTRACE_SETSIGINFO: c_int = 0x4203; +pub const PTRACE_GETREGSET: c_int = 0x4204; +pub const PTRACE_SETREGSET: c_int = 0x4205; +pub const PTRACE_SEIZE: c_int = 0x4206; +pub const PTRACE_INTERRUPT: c_int = 0x4207; +pub const PTRACE_LISTEN: c_int = 0x4208; +pub const PTRACE_PEEKSIGINFO: c_int = 0x4209; + +pub const EPOLLWAKEUP: c_int = 0x20000000; + +pub const EFD_NONBLOCK: c_int = crate::O_NONBLOCK; + +pub const SFD_NONBLOCK: c_int = crate::O_NONBLOCK; + +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; + +pub const TIOCINQ: c_int = crate::FIONREAD; + +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; + +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -3025,333 +3025,333 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; - -pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_TIMESTAMP: ::c_int = 29; -pub const SO_MARK: ::c_int = 36; -pub const SO_RXQ_OVFL: ::c_int = 40; -pub const SO_PEEK_OFF: ::c_int = 42; -pub const SO_BUSY_POLL: ::c_int = 46; -pub const SO_BINDTOIFINDEX: ::c_int = 62; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; + +pub const SO_BINDTODEVICE: c_int = 25; +pub const SO_TIMESTAMP: c_int = 29; +pub const SO_MARK: c_int = 36; +pub const SO_RXQ_OVFL: c_int = 40; +pub const SO_PEEK_OFF: c_int = 42; +pub const SO_BUSY_POLL: c_int = 46; +pub const SO_BINDTOIFINDEX: c_int = 62; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; -pub const O_ASYNC: ::c_int = 0x00000400; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONBIO: ::c_int = 0x5421; - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; - -pub const O_APPEND: ::c_int = 0x00100000; -pub const O_CREAT: ::c_int = 0x00010000; -pub const O_EXCL: ::c_int = 0x00020000; -pub const O_NOCTTY: ::c_int = 0x00000200; -pub const O_NONBLOCK: ::c_int = 0x00000010; -pub const O_SYNC: ::c_int = 0x00000040 | O_DSYNC; -pub const O_RSYNC: ::c_int = O_SYNC; -pub const O_DSYNC: ::c_int = 0x00000020; - -pub const SOCK_CLOEXEC: ::c_int = 0o2000000; -pub const SOCK_NONBLOCK: ::c_int = 0o4000; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_SEQPACKET: ::c_int = 5; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_NO_CHECK: ::c_int = 11; -pub const SO_PRIORITY: ::c_int = 12; -pub const SO_LINGER: ::c_int = 13; -pub const SO_BSDCOMPAT: ::c_int = 14; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_PASSCRED: ::c_int = 16; -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; -pub const SO_SNDBUFFORCE: ::c_int = 32; -pub const SO_RCVBUFFORCE: ::c_int = 33; -pub const SO_PROTOCOL: ::c_int = 38; -pub const SO_DOMAIN: ::c_int = 39; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; +pub const O_ASYNC: c_int = 0x00000400; + +pub const FIOCLEX: c_int = 0x5451; +pub const FIONBIO: c_int = 0x5421; + +pub const RLIMIT_RSS: c_int = 5; +pub const RLIMIT_NOFILE: c_int = 7; +pub const RLIMIT_AS: c_int = 9; +pub const RLIMIT_NPROC: c_int = 6; +pub const RLIMIT_MEMLOCK: c_int = 8; + +pub const O_APPEND: c_int = 0x00100000; +pub const O_CREAT: c_int = 0x00010000; +pub const O_EXCL: c_int = 0x00020000; +pub const O_NOCTTY: c_int = 0x00000200; +pub const O_NONBLOCK: c_int = 0x00000010; +pub const O_SYNC: c_int = 0x00000040 | O_DSYNC; +pub const O_RSYNC: c_int = O_SYNC; +pub const O_DSYNC: c_int = 0x00000020; + +pub const SOCK_CLOEXEC: c_int = 0o2000000; +pub const SOCK_NONBLOCK: c_int = 0o4000; + +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_SEQPACKET: c_int = 5; + +pub const SOL_SOCKET: c_int = 1; + +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EDEADLOCK: c_int = EDEADLK; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; + +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_DONTROUTE: c_int = 5; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_OOBINLINE: c_int = 10; +pub const SO_NO_CHECK: c_int = 11; +pub const SO_PRIORITY: c_int = 12; +pub const SO_LINGER: c_int = 13; +pub const SO_BSDCOMPAT: c_int = 14; +pub const SO_REUSEPORT: c_int = 15; +pub const SO_PASSCRED: c_int = 16; +pub const SO_PEERCRED: c_int = 17; +pub const SO_RCVLOWAT: c_int = 18; +pub const SO_SNDLOWAT: c_int = 19; +pub const SO_RCVTIMEO: c_int = 20; +pub const SO_SNDTIMEO: c_int = 21; +pub const SO_ACCEPTCONN: c_int = 30; +pub const SO_SNDBUFFORCE: c_int = 32; +pub const SO_RCVBUFFORCE: c_int = 33; +pub const SO_PROTOCOL: c_int = 38; +pub const SO_DOMAIN: c_int = 39; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; + +pub const EXTPROC: crate::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: c_int = 0x040000; + +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const TCGETS: ::c_int = 0x5401; -pub const TCSETS: ::c_int = 0x5402; -pub const TCSETSW: ::c_int = 0x5403; -pub const TCSETSF: ::c_int = 0x5404; -pub const TCGETA: ::c_int = 0x5405; -pub const TCSETA: ::c_int = 0x5406; -pub const TCSETAW: ::c_int = 0x5407; -pub const TCSETAF: ::c_int = 0x5408; -pub const TCSBRK: ::c_int = 0x5409; -pub const TCXONC: ::c_int = 0x540A; -pub const TCFLSH: ::c_int = 0x540B; -pub const TIOCGSOFTCAR: ::c_int = 0x5419; -pub const TIOCSSOFTCAR: ::c_int = 0x541A; -pub const TIOCLINUX: ::c_int = 0x541C; -pub const TIOCGSERIAL: ::c_int = 0x541E; -pub const TIOCEXCL: ::c_int = 0x540C; -pub const TIOCNXCL: ::c_int = 0x540D; -pub const TIOCSCTTY: ::c_int = 0x540E; -pub const TIOCGPGRP: ::c_int = 0x540F; -pub const TIOCSPGRP: ::c_int = 0x5410; -pub const TIOCOUTQ: ::c_int = 0x5411; -pub const TIOCSTI: ::c_int = 0x5412; -pub const TIOCGWINSZ: ::c_int = 0x5413; -pub const TIOCSWINSZ: ::c_int = 0x5414; -pub const TIOCMGET: ::c_int = 0x5415; -pub const TIOCMBIS: ::c_int = 0x5416; -pub const TIOCMBIC: ::c_int = 0x5417; -pub const TIOCMSET: ::c_int = 0x5418; -pub const FIONREAD: ::c_int = 0x541B; -pub const TIOCCONS: ::c_int = 0x541D; - -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x008; -pub const TIOCM_SR: ::c_int = 0x010; -pub const TIOCM_CTS: ::c_int = 0x020; -pub const TIOCM_CAR: ::c_int = 0x040; -pub const TIOCM_RNG: ::c_int = 0x080; -pub const TIOCM_DSR: ::c_int = 0x100; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; - -pub const O_DIRECTORY: ::c_int = 0x00080000; -pub const O_DIRECT: ::c_int = 0x00000800; -pub const O_LARGEFILE: ::c_int = 0x00001000; -pub const O_NOFOLLOW: ::c_int = 0x00000080; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; + +pub const TCGETS: c_int = 0x5401; +pub const TCSETS: c_int = 0x5402; +pub const TCSETSW: c_int = 0x5403; +pub const TCSETSF: c_int = 0x5404; +pub const TCGETA: c_int = 0x5405; +pub const TCSETA: c_int = 0x5406; +pub const TCSETAW: c_int = 0x5407; +pub const TCSETAF: c_int = 0x5408; +pub const TCSBRK: c_int = 0x5409; +pub const TCXONC: c_int = 0x540A; +pub const TCFLSH: c_int = 0x540B; +pub const TIOCGSOFTCAR: c_int = 0x5419; +pub const TIOCSSOFTCAR: c_int = 0x541A; +pub const TIOCLINUX: c_int = 0x541C; +pub const TIOCGSERIAL: c_int = 0x541E; +pub const TIOCEXCL: c_int = 0x540C; +pub const TIOCNXCL: c_int = 0x540D; +pub const TIOCSCTTY: c_int = 0x540E; +pub const TIOCGPGRP: c_int = 0x540F; +pub const TIOCSPGRP: c_int = 0x5410; +pub const TIOCOUTQ: c_int = 0x5411; +pub const TIOCSTI: c_int = 0x5412; +pub const TIOCGWINSZ: c_int = 0x5413; +pub const TIOCSWINSZ: c_int = 0x5414; +pub const TIOCMGET: c_int = 0x5415; +pub const TIOCMBIS: c_int = 0x5416; +pub const TIOCMBIC: c_int = 0x5417; +pub const TIOCMSET: c_int = 0x5418; +pub const FIONREAD: c_int = 0x541B; +pub const TIOCCONS: c_int = 0x541D; + +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x008; +pub const TIOCM_SR: c_int = 0x010; +pub const TIOCM_CTS: c_int = 0x020; +pub const TIOCM_CAR: c_int = 0x040; +pub const TIOCM_RNG: c_int = 0x080; +pub const TIOCM_DSR: c_int = 0x100; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RI: c_int = TIOCM_RNG; + +pub const O_DIRECTORY: c_int = 0x00080000; +pub const O_DIRECT: c_int = 0x00000800; +pub const O_LARGEFILE: c_int = 0x00001000; +pub const O_NOFOLLOW: c_int = 0x00000080; pub const HUGETLB_FLAG_ENCODE_SHIFT: u32 = 26; pub const MAP_HUGE_SHIFT: u32 = 26; @@ -3370,22 +3370,22 @@ cfg_if! { // END_PUB_CONST f! { - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } @@ -3403,21 +3403,21 @@ f! { } pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; () } pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); () } pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } @@ -3426,18 +3426,18 @@ f! { set1.bits == set2.bits } - pub fn major(dev: ::dev_t) -> ::c_uint { + pub fn major(dev: crate::dev_t) -> c_uint { let mut major = 0; major |= (dev & 0x00000000000fff00) >> 8; major |= (dev & 0xfffff00000000000) >> 32; - major as ::c_uint + major as c_uint } - pub fn minor(dev: ::dev_t) -> ::c_uint { + pub fn minor(dev: crate::dev_t) -> c_uint { let mut minor = 0; minor |= (dev & 0x00000000000000ff) >> 0; minor |= (dev & 0x00000ffffff00000) >> 12; - minor as ::c_uint + minor as c_uint } pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { @@ -3445,9 +3445,9 @@ f! { } pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { - if ((*cmsg).cmsg_len as ::size_t) < ::mem::size_of::() { + if ((*cmsg).cmsg_len as size_t) < crate::mem::size_of::() { 0 as *mut cmsghdr - } else if __CMSG_NEXT(cmsg).add(::mem::size_of::()) >= __MHDR_END(mhdr) { + } else if __CMSG_NEXT(cmsg).add(crate::mem::size_of::()) >= __MHDR_END(mhdr) { 0 as *mut cmsghdr } else { __CMSG_NEXT(cmsg).cast() @@ -3455,66 +3455,66 @@ f! { } pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { - if (*mhdr).msg_controllen as ::size_t >= ::mem::size_of::() { + if (*mhdr).msg_controllen as size_t >= crate::mem::size_of::() { (*mhdr).msg_control.cast() } else { 0 as *mut cmsghdr } } - pub {const} fn CMSG_ALIGN(len: ::size_t) -> ::size_t { - (len + ::mem::size_of::<::size_t>() - 1) & !(::mem::size_of::<::size_t>() - 1) + pub {const} fn CMSG_ALIGN(len: size_t) -> size_t { + (len + crate::mem::size_of::() - 1) & !(crate::mem::size_of::() - 1) } - pub {const} fn CMSG_SPACE(len: ::c_uint) -> ::c_uint { - (CMSG_ALIGN(len as ::size_t) + CMSG_ALIGN(::mem::size_of::())) as ::c_uint + pub {const} fn CMSG_SPACE(len: c_uint) -> c_uint { + (CMSG_ALIGN(len as size_t) + CMSG_ALIGN(crate::mem::size_of::())) as c_uint } - pub {const} fn CMSG_LEN(len: ::c_uint) -> ::c_uint { - (CMSG_ALIGN(::mem::size_of::()) + len as ::size_t) as ::c_uint + pub {const} fn CMSG_LEN(len: c_uint) -> c_uint { + (CMSG_ALIGN(crate::mem::size_of::()) + len as size_t) as c_uint } } safe_f! { - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub {const} fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int { + pub {const} fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= (major & 0x00000fff) << 8; dev |= (major & 0xfffff000) << 32; @@ -3524,9 +3524,9 @@ safe_f! { } } -fn __CMSG_LEN(cmsg: *const cmsghdr) -> ::ssize_t { - ((unsafe { (*cmsg).cmsg_len as ::size_t } + ::mem::size_of::<::c_long>() - 1) - & !(::mem::size_of::<::c_long>() - 1)) as ::ssize_t +fn __CMSG_LEN(cmsg: *const cmsghdr) -> ssize_t { + ((unsafe { (*cmsg).cmsg_len as size_t } + crate::mem::size_of::() - 1) + & !(crate::mem::size_of::() - 1)) as ssize_t } fn __CMSG_NEXT(cmsg: *const cmsghdr) -> *mut c_uchar { @@ -3545,16 +3545,16 @@ extern "C" {} #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} -impl ::Copy for FILE {} -impl ::Clone for FILE { +impl Copy for FILE {} +impl Clone for FILE { fn clone(&self) -> FILE { *self } } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos_t {} // FIXME: fill this out with a struct -impl ::Copy for fpos_t {} -impl ::Clone for fpos_t { +impl Copy for fpos_t {} +impl Clone for fpos_t { fn clone(&self) -> fpos_t { *self } @@ -3643,7 +3643,7 @@ extern "C" { pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; pub fn wcslen(buf: *const wchar_t) -> size_t; - pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t; + pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> size_t; pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn wmemchr(cx: *const wchar_t, c: wchar_t, n: size_t) -> *mut wchar_t; @@ -3657,318 +3657,303 @@ extern "C" { pub fn rand() -> c_int; pub fn srand(seed: c_uint); - pub fn getpwnam(name: *const ::c_char) -> *mut passwd; - pub fn getpwuid(uid: ::uid_t) -> *mut passwd; - - pub fn fprintf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn printf(format: *const ::c_char, ...) -> ::c_int; - pub fn snprintf(s: *mut ::c_char, n: ::size_t, format: *const ::c_char, ...) -> ::c_int; - pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn scanf(format: *const ::c_char, ...) -> ::c_int; - pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn getchar_unlocked() -> ::c_int; - pub fn putchar_unlocked(c: ::c_int) -> ::c_int; - - pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int; - pub fn connect(socket: ::c_int, address: *const sockaddr, len: socklen_t) -> ::c_int; - pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; - pub fn accept(socket: ::c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> ::c_int; - pub fn getpeername( - socket: ::c_int, - address: *mut sockaddr, - address_len: *mut socklen_t, - ) -> ::c_int; - pub fn getsockname( - socket: ::c_int, - address: *mut sockaddr, - address_len: *mut socklen_t, - ) -> ::c_int; + pub fn getpwnam(name: *const c_char) -> *mut passwd; + pub fn getpwuid(uid: crate::uid_t) -> *mut passwd; + + pub fn fprintf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn printf(format: *const c_char, ...) -> c_int; + pub fn snprintf(s: *mut c_char, n: size_t, format: *const c_char, ...) -> c_int; + pub fn sprintf(s: *mut c_char, format: *const c_char, ...) -> c_int; + pub fn fscanf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn scanf(format: *const c_char, ...) -> c_int; + pub fn sscanf(s: *const c_char, format: *const c_char, ...) -> c_int; + pub fn getchar_unlocked() -> c_int; + pub fn putchar_unlocked(c: c_int) -> c_int; + + pub fn socket(domain: c_int, ty: c_int, protocol: c_int) -> c_int; + pub fn connect(socket: c_int, address: *const sockaddr, len: socklen_t) -> c_int; + pub fn listen(socket: c_int, backlog: c_int) -> c_int; + pub fn accept(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> c_int; + pub fn getpeername(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) + -> c_int; + pub fn getsockname(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) + -> c_int; pub fn setsockopt( - socket: ::c_int, - level: ::c_int, - name: ::c_int, - value: *const ::c_void, + socket: c_int, + level: c_int, + name: c_int, + value: *const c_void, option_len: socklen_t, - ) -> ::c_int; + ) -> c_int; pub fn socketpair( - domain: ::c_int, - type_: ::c_int, - protocol: ::c_int, - socket_vector: *mut ::c_int, - ) -> ::c_int; + domain: c_int, + type_: c_int, + protocol: c_int, + socket_vector: *mut c_int, + ) -> c_int; pub fn sendto( - socket: ::c_int, - buf: *const ::c_void, - len: ::size_t, - flags: ::c_int, + socket: c_int, + buf: *const c_void, + len: size_t, + flags: c_int, addr: *const sockaddr, addrlen: socklen_t, - ) -> ::ssize_t; - pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; + ) -> ssize_t; + pub fn shutdown(socket: c_int, how: c_int) -> c_int; - pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int; + pub fn chmod(path: *const c_char, mode: mode_t) -> c_int; + pub fn fchmod(fd: c_int, mode: mode_t) -> c_int; - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int; - pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int; - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> c_int; - pub fn pclose(stream: *mut ::FILE) -> ::c_int; - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; - pub fn fileno(stream: *mut ::FILE) -> ::c_int; + pub fn pclose(stream: *mut crate::FILE) -> c_int; + pub fn fdopen(fd: c_int, mode: *const c_char) -> *mut crate::FILE; + pub fn fileno(stream: *mut crate::FILE) -> c_int; - pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; + pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int; + pub fn creat(path: *const c_char, mode: mode_t) -> c_int; + pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int; - pub fn opendir(dirname: *const c_char) -> *mut ::DIR; - pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; - pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) - -> ::c_int; - pub fn closedir(dirp: *mut ::DIR) -> ::c_int; - pub fn rewinddir(dirp: *mut ::DIR); + pub fn opendir(dirname: *const c_char) -> *mut crate::DIR; + pub fn readdir(dirp: *mut crate::DIR) -> *mut crate::dirent; + pub fn readdir_r( + dirp: *mut crate::DIR, + entry: *mut crate::dirent, + result: *mut *mut crate::dirent, + ) -> c_int; + pub fn closedir(dirp: *mut crate::DIR) -> c_int; + pub fn rewinddir(dirp: *mut crate::DIR); - pub fn openat(dirfd: ::c_int, pathname: *const ::c_char, flags: ::c_int, ...) -> ::c_int; + pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; pub fn fchmodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - flags: ::c_int, - ) -> ::c_int; - pub fn fchown(fd: ::c_int, owner: ::uid_t, group: ::gid_t) -> ::c_int; + dirfd: c_int, + pathname: *const c_char, + mode: crate::mode_t, + flags: c_int, + ) -> c_int; + pub fn fchown(fd: c_int, owner: crate::uid_t, group: crate::gid_t) -> c_int; pub fn fchownat( - dirfd: ::c_int, - pathname: *const ::c_char, - owner: ::uid_t, - group: ::gid_t, - flags: ::c_int, - ) -> ::c_int; - pub fn fstatat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut stat, - flags: ::c_int, - ) -> ::c_int; + dirfd: c_int, + pathname: *const c_char, + owner: crate::uid_t, + group: crate::gid_t, + flags: c_int, + ) -> c_int; + pub fn fstatat(dirfd: c_int, pathname: *const c_char, buf: *mut stat, flags: c_int) -> c_int; pub fn linkat( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - flags: ::c_int, - ) -> ::c_int; - pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + flags: c_int, + ) -> c_int; + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; pub fn readlinkat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut ::c_char, - bufsiz: ::size_t, - ) -> ::ssize_t; + dirfd: c_int, + pathname: *const c_char, + buf: *mut c_char, + bufsiz: size_t, + ) -> ssize_t; pub fn renameat( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - ) -> ::c_int; - pub fn symlinkat( - target: *const ::c_char, - newdirfd: ::c_int, - linkpath: *const ::c_char, - ) -> ::c_int; - pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char, flags: ::c_int) -> ::c_int; - - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; - pub fn alarm(seconds: ::c_uint) -> ::c_uint; - pub fn chdir(dir: *const c_char) -> ::c_int; - pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int; - pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int; - pub fn close(fd: ::c_int) -> ::c_int; - pub fn dup(fd: ::c_int) -> ::c_int; - pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; - pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> ::c_int; - pub fn execle(path: *const ::c_char, arg0: *const ::c_char, ...) -> ::c_int; - pub fn execlp(file: *const ::c_char, arg0: *const ::c_char, ...) -> ::c_int; - pub fn execv(prog: *const c_char, argv: *const *mut c_char) -> ::c_int; - pub fn execve( - prog: *const c_char, - argv: *const *mut c_char, - envp: *const *mut c_char, - ) -> ::c_int; - pub fn execvp(c: *const c_char, argv: *const *mut c_char) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + ) -> c_int; + pub fn symlinkat(target: *const c_char, newdirfd: c_int, linkpath: *const c_char) -> c_int; + pub fn unlinkat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int; + + pub fn access(path: *const c_char, amode: c_int) -> c_int; + pub fn alarm(seconds: c_uint) -> c_uint; + pub fn chdir(dir: *const c_char) -> c_int; + pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int; + pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int; + pub fn close(fd: c_int) -> c_int; + pub fn dup(fd: c_int) -> c_int; + pub fn dup2(src: c_int, dst: c_int) -> c_int; + pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> c_int; + pub fn execle(path: *const c_char, arg0: *const c_char, ...) -> c_int; + pub fn execlp(file: *const c_char, arg0: *const c_char, ...) -> c_int; + pub fn execv(prog: *const c_char, argv: *const *mut c_char) -> c_int; + pub fn execve(prog: *const c_char, argv: *const *mut c_char, envp: *const *mut c_char) + -> c_int; + pub fn execvp(c: *const c_char, argv: *const *mut c_char) -> c_int; pub fn fork() -> pid_t; - pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; - pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char; + pub fn fpathconf(filedes: c_int, name: c_int) -> c_long; + pub fn getcwd(buf: *mut c_char, size: size_t) -> *mut c_char; pub fn getegid() -> gid_t; pub fn geteuid() -> uid_t; pub fn getgid() -> gid_t; - pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t) -> ::c_int; + pub fn getgroups(ngroups_max: c_int, groups: *mut gid_t) -> c_int; pub fn getlogin() -> *mut c_char; - pub fn getopt(argc: ::c_int, argv: *const *mut c_char, optstr: *const c_char) -> ::c_int; + pub fn getopt(argc: c_int, argv: *const *mut c_char, optstr: *const c_char) -> c_int; pub fn getpgid(pid: pid_t) -> pid_t; pub fn getpgrp() -> pid_t; pub fn getpid() -> pid_t; pub fn getppid() -> pid_t; pub fn getuid() -> uid_t; - pub fn isatty(fd: ::c_int) -> ::c_int; - pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; - pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; - pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; - pub fn pause() -> ::c_int; - pub fn pipe(fds: *mut ::c_int) -> ::c_int; - pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int; - pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) -> ::ssize_t; - pub fn rmdir(path: *const c_char) -> ::c_int; - pub fn seteuid(uid: uid_t) -> ::c_int; - pub fn setegid(gid: gid_t) -> ::c_int; - pub fn setgid(gid: gid_t) -> ::c_int; - pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int; + pub fn isatty(fd: c_int) -> c_int; + pub fn link(src: *const c_char, dst: *const c_char) -> c_int; + pub fn lseek(fd: c_int, offset: off_t, whence: c_int) -> off_t; + pub fn pathconf(path: *const c_char, name: c_int) -> c_long; + pub fn pause() -> c_int; + pub fn pipe(fds: *mut c_int) -> c_int; + pub fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int; + pub fn read(fd: c_int, buf: *mut c_void, count: size_t) -> ssize_t; + pub fn rmdir(path: *const c_char) -> c_int; + pub fn seteuid(uid: uid_t) -> c_int; + pub fn setegid(gid: gid_t) -> c_int; + pub fn setgid(gid: gid_t) -> c_int; + pub fn setpgid(pid: pid_t, pgid: pid_t) -> c_int; pub fn setsid() -> pid_t; - pub fn setuid(uid: uid_t) -> ::c_int; - pub fn sleep(secs: ::c_uint) -> ::c_uint; - pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> ::c_int; - pub fn tcgetpgrp(fd: ::c_int) -> pid_t; - pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int; - pub fn ttyname(fd: ::c_int) -> *mut c_char; - pub fn unlink(c: *const c_char) -> ::c_int; - pub fn wait(status: *mut ::c_int) -> pid_t; - pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int) -> pid_t; - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t; - pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off_t) -> ::ssize_t; - pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t, offset: off_t) -> ::ssize_t; + pub fn setuid(uid: uid_t) -> c_int; + pub fn sleep(secs: c_uint) -> c_uint; + pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> c_int; + pub fn tcgetpgrp(fd: c_int) -> pid_t; + pub fn tcsetpgrp(fd: c_int, pgrp: crate::pid_t) -> c_int; + pub fn ttyname(fd: c_int) -> *mut c_char; + pub fn unlink(c: *const c_char) -> c_int; + pub fn wait(status: *mut c_int) -> pid_t; + pub fn waitpid(pid: pid_t, status: *mut c_int, options: c_int) -> pid_t; + pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t; + pub fn pread(fd: c_int, buf: *mut c_void, count: size_t, offset: off_t) -> ssize_t; + pub fn pwrite(fd: c_int, buf: *const c_void, count: size_t, offset: off_t) -> ssize_t; pub fn umask(mask: mode_t) -> mode_t; - pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int; + pub fn utime(file: *const c_char, buf: *const utimbuf) -> c_int; - pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int; + pub fn kill(pid: pid_t, sig: c_int) -> c_int; - pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn mlockall(flags: ::c_int) -> ::c_int; - pub fn munlockall() -> ::c_int; + pub fn mlock(addr: *const c_void, len: size_t) -> c_int; + pub fn munlock(addr: *const c_void, len: size_t) -> c_int; + pub fn mlockall(flags: c_int) -> c_int; + pub fn munlockall() -> c_int; pub fn mmap( - addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, + addr: *mut c_void, + len: size_t, + prot: c_int, + flags: c_int, + fd: c_int, offset: off_t, - ) -> *mut ::c_void; - pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int; + ) -> *mut c_void; + pub fn munmap(addr: *mut c_void, len: size_t) -> c_int; - pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint; - pub fn if_indextoname(ifindex: ::c_uint, ifname: *mut ::c_char) -> *mut ::c_char; + pub fn if_nametoindex(ifname: *const c_char) -> c_uint; + pub fn if_indextoname(ifindex: c_uint, ifname: *mut c_char) -> *mut c_char; - pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int; - pub fn fsync(fd: ::c_int) -> ::c_int; + pub fn fsync(fd: c_int) -> c_int; - pub fn setenv(name: *const c_char, val: *const c_char, overwrite: ::c_int) -> ::c_int; - pub fn unsetenv(name: *const c_char) -> ::c_int; + pub fn setenv(name: *const c_char, val: *const c_char, overwrite: c_int) -> c_int; + pub fn unsetenv(name: *const c_char) -> c_int; - pub fn symlink(path1: *const c_char, path2: *const c_char) -> ::c_int; + pub fn symlink(path1: *const c_char, path2: *const c_char) -> c_int; - pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; + pub fn ftruncate(fd: c_int, length: off_t) -> c_int; - pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t; + pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t; - pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) -> *mut ::c_char; + pub fn realpath(pathname: *const c_char, resolved: *mut c_char) -> *mut c_char; - pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int; + pub fn flock(fd: c_int, operation: c_int) -> c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn times(buf: *mut ::tms) -> ::clock_t; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn times(buf: *mut crate::tms) -> crate::clock_t; - pub fn pthread_self() -> ::pthread_t; - pub fn pthread_join(native: ::pthread_t, value: *mut *mut ::c_void) -> ::c_int; - pub fn pthread_exit(value: *mut ::c_void) -> !; - pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_self() -> crate::pthread_t; + pub fn pthread_join(native: crate::pthread_t, value: *mut *mut c_void) -> c_int; + pub fn pthread_exit(value: *mut c_void) -> !; + pub fn pthread_attr_init(attr: *mut crate::pthread_attr_t) -> c_int; + pub fn pthread_attr_destroy(attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_attr_getstacksize( - attr: *const ::pthread_attr_t, - stacksize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t, stack_size: ::size_t) -> ::c_int; - pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t, state: ::c_int) -> ::c_int; - pub fn pthread_detach(thread: ::pthread_t) -> ::c_int; - pub fn sched_yield() -> ::c_int; + attr: *const crate::pthread_attr_t, + stacksize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setstacksize(attr: *mut crate::pthread_attr_t, stack_size: size_t) + -> c_int; + pub fn pthread_attr_setdetachstate(attr: *mut crate::pthread_attr_t, state: c_int) -> c_int; + pub fn pthread_detach(thread: crate::pthread_t) -> c_int; + pub fn sched_yield() -> c_int; pub fn pthread_key_create( key: *mut pthread_key_t, - dtor: ::Option, - ) -> ::c_int; - pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int; - pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void; - pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void) -> ::c_int; + dtor: Option, + ) -> c_int; + pub fn pthread_key_delete(key: pthread_key_t) -> c_int; + pub fn pthread_getspecific(key: pthread_key_t) -> *mut c_void; + pub fn pthread_setspecific(key: pthread_key_t, value: *const c_void) -> c_int; pub fn pthread_mutex_init( lock: *mut pthread_mutex_t, attr: *const pthread_mutexattr_t, - ) -> ::c_int; - pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int; - - pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int; - pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int; - pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, _type: ::c_int) -> ::c_int; - - pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) - -> ::c_int; - pub fn pthread_cond_wait(cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t) -> ::c_int; + ) -> c_int; + pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> c_int; + + pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> c_int; + pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> c_int; + pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, _type: c_int) -> c_int; + + pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) -> c_int; + pub fn pthread_cond_wait(cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t) -> c_int; pub fn pthread_cond_timedwait( cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int; - pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> c_int; + pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> c_int; pub fn pthread_rwlock_init( lock: *mut pthread_rwlock_t, attr: *const pthread_rwlockattr_t, - ) -> ::c_int; - pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> ::c_int; - pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t) -> ::c_int; - pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + ) -> c_int; + pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> c_int; + pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t) -> c_int; + pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; pub fn getsockopt( - sockfd: ::c_int, - level: ::c_int, - optname: ::c_int, - optval: *mut ::c_void, - optlen: *mut ::socklen_t, - ) -> ::c_int; - pub fn raise(signum: ::c_int) -> ::c_int; - pub fn sigaction(signum: ::c_int, act: *const sigaction, oldact: *mut sigaction) -> ::c_int; - - pub fn utimes(filename: *const ::c_char, times: *const ::timeval) -> ::c_int; - pub fn dlopen(filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; - pub fn dlerror() -> *mut ::c_char; - pub fn dlsym(handle: *mut ::c_void, symbol: *const ::c_char) -> *mut ::c_void; - pub fn dlclose(handle: *mut ::c_void) -> ::c_int; - pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int; + sockfd: c_int, + level: c_int, + optname: c_int, + optval: *mut c_void, + optlen: *mut crate::socklen_t, + ) -> c_int; + pub fn raise(signum: c_int) -> c_int; + pub fn sigaction(signum: c_int, act: *const sigaction, oldact: *mut sigaction) -> c_int; + + pub fn utimes(filename: *const c_char, times: *const crate::timeval) -> c_int; + pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void; + pub fn dlerror() -> *mut c_char; + pub fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void; + pub fn dlclose(handle: *mut c_void) -> c_int; + pub fn dladdr(addr: *const c_void, info: *mut Dl_info) -> c_int; pub fn getaddrinfo( node: *const c_char, service: *const c_char, hints: *const addrinfo, res: *mut *mut addrinfo, - ) -> ::c_int; + ) -> c_int; pub fn freeaddrinfo(res: *mut addrinfo); - pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char; - pub fn res_init() -> ::c_int; + pub fn gai_strerror(errcode: c_int) -> *const c_char; + pub fn res_init() -> c_int; pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; pub fn localtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; @@ -3977,482 +3962,467 @@ extern "C" { pub fn gmtime(time_p: *const time_t) -> *mut tm; pub fn localtime(time_p: *const time_t) -> *mut tm; - pub fn mknod(pathname: *const ::c_char, mode: ::mode_t, dev: ::dev_t) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; - pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn getservbyname(name: *const ::c_char, proto: *const ::c_char) -> *mut servent; - pub fn getprotobyname(name: *const ::c_char) -> *mut protoent; - pub fn getprotobynumber(proto: ::c_int) -> *mut protoent; - pub fn usleep(secs: ::c_uint) -> ::c_int; - pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; - pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; - pub fn putenv(string: *mut c_char) -> ::c_int; - pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; + pub fn mknod(pathname: *const c_char, mode: crate::mode_t, dev: crate::dev_t) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; + pub fn gethostname(name: *mut c_char, len: size_t) -> c_int; + pub fn getservbyname(name: *const c_char, proto: *const c_char) -> *mut servent; + pub fn getprotobyname(name: *const c_char) -> *mut protoent; + pub fn getprotobynumber(proto: c_int) -> *mut protoent; + pub fn usleep(secs: c_uint) -> c_int; + pub fn send(socket: c_int, buf: *const c_void, len: size_t, flags: c_int) -> ssize_t; + pub fn recv(socket: c_int, buf: *mut c_void, len: size_t, flags: c_int) -> ssize_t; + pub fn putenv(string: *mut c_char) -> c_int; + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: c_int) -> c_int; pub fn select( - nfds: ::c_int, + nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *mut timeval, - ) -> ::c_int; - pub fn setlocale(category: ::c_int, locale: *const ::c_char) -> *mut ::c_char; + ) -> c_int; + pub fn setlocale(category: c_int, locale: *const c_char) -> *mut c_char; pub fn localeconv() -> *mut lconv; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_wait(sem: *mut sem_t) -> ::c_int; - pub fn sem_trywait(sem: *mut sem_t) -> ::c_int; - pub fn sem_post(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int; - pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_wait(sem: *mut sem_t) -> c_int; + pub fn sem_trywait(sem: *mut sem_t) -> c_int; + pub fn sem_post(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> c_int; + pub fn fstatvfs(fd: c_int, buf: *mut statvfs) -> c_int; - pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: ::size_t) -> ::ssize_t; + pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: size_t) -> ssize_t; - pub fn sigemptyset(set: *mut sigset_t) -> ::c_int; - pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; - pub fn sigfillset(set: *mut sigset_t) -> ::c_int; - pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; - pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int; + pub fn sigemptyset(set: *mut sigset_t) -> c_int; + pub fn sigaddset(set: *mut sigset_t, signum: c_int) -> c_int; + pub fn sigfillset(set: *mut sigset_t) -> c_int; + pub fn sigdelset(set: *mut sigset_t, signum: c_int) -> c_int; + pub fn sigismember(set: *const sigset_t, signum: c_int) -> c_int; - pub fn sigprocmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sigpending(set: *mut sigset_t) -> ::c_int; + pub fn sigprocmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sigpending(set: *mut sigset_t) -> c_int; - pub fn timegm(tm: *mut ::tm) -> time_t; + pub fn timegm(tm: *mut crate::tm) -> time_t; pub fn getsid(pid: pid_t) -> pid_t; - pub fn sysconf(name: ::c_int) -> ::c_long; + pub fn sysconf(name: c_int) -> c_long; - pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn mkfifo(path: *const c_char, mode: mode_t) -> c_int; pub fn pselect( - nfds: ::c_int, + nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *const timespec, sigmask: *const sigset_t, - ) -> ::c_int; - pub fn fseeko(stream: *mut ::FILE, offset: ::off_t, whence: ::c_int) -> ::c_int; - pub fn ftello(stream: *mut ::FILE) -> ::off_t; - pub fn tcdrain(fd: ::c_int) -> ::c_int; - pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t; - pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t; - pub fn cfmakeraw(termios: *mut ::termios); - pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int; - pub fn tcsetattr(fd: ::c_int, optional_actions: ::c_int, termios: *const ::termios) -> ::c_int; - pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int; - pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int; - pub fn tcgetsid(fd: ::c_int) -> ::pid_t; - pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int; - pub fn mkstemp(template: *mut ::c_char) -> ::c_int; - pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char; - - pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char; - - pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int); + ) -> c_int; + pub fn fseeko(stream: *mut crate::FILE, offset: off_t, whence: c_int) -> c_int; + pub fn ftello(stream: *mut crate::FILE) -> off_t; + pub fn tcdrain(fd: c_int) -> c_int; + pub fn cfgetispeed(termios: *const crate::termios) -> crate::speed_t; + pub fn cfgetospeed(termios: *const crate::termios) -> crate::speed_t; + pub fn cfmakeraw(termios: *mut crate::termios); + pub fn cfsetispeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; + pub fn cfsetospeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; + pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; + pub fn tcgetattr(fd: c_int, termios: *mut crate::termios) -> c_int; + pub fn tcsetattr(fd: c_int, optional_actions: c_int, termios: *const crate::termios) -> c_int; + pub fn tcflow(fd: c_int, action: c_int) -> c_int; + pub fn tcflush(fd: c_int, action: c_int) -> c_int; + pub fn tcgetsid(fd: c_int) -> crate::pid_t; + pub fn tcsendbreak(fd: c_int, duration: c_int) -> c_int; + pub fn mkstemp(template: *mut c_char) -> c_int; + pub fn mkdtemp(template: *mut c_char) -> *mut c_char; + + pub fn tmpnam(ptr: *mut c_char) -> *mut c_char; + + pub fn openlog(ident: *const c_char, logopt: c_int, facility: c_int); pub fn closelog(); - pub fn setlogmask(maskpri: ::c_int) -> ::c_int; - pub fn syslog(priority: ::c_int, message: *const ::c_char, ...); + pub fn setlogmask(maskpri: c_int) -> c_int; + pub fn syslog(priority: c_int, message: *const c_char, ...); - pub fn grantpt(fd: ::c_int) -> ::c_int; - pub fn posix_openpt(flags: ::c_int) -> ::c_int; - pub fn ptsname(fd: ::c_int) -> *mut ::c_char; - pub fn unlockpt(fd: ::c_int) -> ::c_int; + pub fn grantpt(fd: c_int) -> c_int; + pub fn posix_openpt(flags: c_int) -> c_int; + pub fn ptsname(fd: c_int) -> *mut c_char; + pub fn unlockpt(fd: c_int) -> c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + pub fn fdatasync(fd: c_int) -> c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; - pub fn pthread_getattr_np(native: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_getattr_np(native: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; - - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn setgroups(ngroups: size_t, ptr: *const crate::gid_t) -> c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - - pub fn fdopendir(fd: ::c_int) -> *mut ::DIR; - - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + + pub fn fdopendir(fd: c_int) -> *mut crate::DIR; + + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int; - pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; - pub fn clearenv() -> ::c_int; - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; - pub fn setreuid(ruid: ::uid_t, euid: ::uid_t) -> ::c_int; - pub fn setregid(rgid: ::gid_t, egid: ::gid_t) -> ::c_int; - pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; - pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; - pub fn acct(filename: *const ::c_char) -> ::c_int; - pub fn brk(addr: *mut ::c_void) -> ::c_int; - pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; - pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int; + pub fn ptsname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + pub fn clearenv() -> c_int; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; + pub fn setreuid(ruid: crate::uid_t, euid: crate::uid_t) -> c_int; + pub fn setregid(rgid: crate::gid_t, egid: crate::gid_t) -> c_int; + pub fn getresuid( + ruid: *mut crate::uid_t, + euid: *mut crate::uid_t, + suid: *mut crate::uid_t, + ) -> c_int; + pub fn getresgid( + rgid: *mut crate::gid_t, + egid: *mut crate::gid_t, + sgid: *mut crate::gid_t, + ) -> c_int; + pub fn acct(filename: *const c_char) -> c_int; + pub fn brk(addr: *mut c_void) -> c_int; + pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int; + pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *const termios, - winp: *const ::winsize, - ) -> ::c_int; + winp: *const crate::winsize, + ) -> c_int; pub fn execvpe( - file: *const ::c_char, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; + file: *const c_char, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; pub fn setpwent(); pub fn endpwent(); pub fn getpwent() -> *mut passwd; - pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; // System V IPC - pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t; - pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int; - pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int; - pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int; - pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int; + pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; + pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t; + pub fn semget(key: crate::key_t, nsems: c_int, semflag: c_int) -> c_int; + pub fn semop(semid: c_int, sops: *mut crate::sembuf, nsops: size_t) -> c_int; + pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int; + pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int; + pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int; pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; - pub fn msgsnd( - msqid: ::c_int, - msgp: *const ::c_void, - msgsz: ::size_t, - msgflg: ::c_int, - ) -> ::c_int; - - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn __errno_location() -> *mut ::c_int; - - pub fn fallocate(fd: ::c_int, mode: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn readahead(fd: ::c_int, offset: ::off64_t, count: ::size_t) -> ::ssize_t; - pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int) -> ::c_int; - pub fn timerfd_create(clockid: ::c_int, flags: ::c_int) -> ::c_int; - pub fn timerfd_gettime(fd: ::c_int, curr_value: *mut itimerspec) -> ::c_int; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; + pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int; + + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn __errno_location() -> *mut c_int; + + pub fn fallocate(fd: c_int, mode: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn readahead(fd: c_int, offset: off64_t, count: size_t) -> ssize_t; + pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int; + pub fn timerfd_create(clockid: c_int, flags: c_int) -> c_int; + pub fn timerfd_gettime(fd: c_int, curr_value: *mut itimerspec) -> c_int; pub fn timerfd_settime( - fd: ::c_int, - flags: ::c_int, + fd: c_int, + flags: c_int, new_value: *const itimerspec, old_value: *mut itimerspec, - ) -> ::c_int; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn quotactl( - cmd: ::c_int, - special: *const ::c_char, - id: ::c_int, - data: *mut ::c_char, - ) -> ::c_int; - pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; + ) -> c_int; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn quotactl(cmd: c_int, special: *const c_char, id: c_int, data: *mut c_char) -> c_int; + pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; + pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn reboot(how_to: ::c_int) -> ::c_int; - pub fn setfsgid(gid: ::gid_t) -> ::c_int; - pub fn setfsuid(uid: ::uid_t) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; + pub fn reboot(how_to: c_int) -> c_int; + pub fn setfsgid(gid: crate::gid_t) -> c_int; + pub fn setfsuid(uid: crate::uid_t) -> c_int; // Not available now on Android - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); - pub fn sync_file_range( - fd: ::c_int, - offset: ::off64_t, - nbytes: ::off64_t, - flags: ::c_uint, - ) -> ::c_int; - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); + pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int; + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); pub fn glob( pattern: *const c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; - - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - - pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn vhangup() -> ::c_int; - pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - ) -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + pub fn futimes(fd: c_int, times: *const crate::timeval) -> c_int; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; + + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + + pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; + pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; + pub fn vhangup() -> c_int; + pub fn sendmmsg(sockfd: c_int, msgvec: *mut mmsghdr, vlen: c_uint, flags: c_int) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, + sockfd: c_int, msgvec: *mut mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - timeout: *mut ::timespec, - ) -> ::c_int; + vlen: c_uint, + flags: c_int, + timeout: *mut crate::timespec, + ) -> c_int; pub fn sync(); - pub fn syscall(num: ::c_long, ...) -> ::c_long; - pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, cpuset: *mut cpu_set_t) - -> ::c_int; + pub fn syscall(num: c_long, ...) -> c_long; + pub fn sched_getaffinity( + pid: crate::pid_t, + cpusetsize: size_t, + cpuset: *mut cpu_set_t, + ) -> c_int; pub fn sched_setaffinity( - pid: ::pid_t, - cpusetsize: ::size_t, + pid: crate::pid_t, + cpusetsize: size_t, cpuset: *const cpu_set_t, - ) -> ::c_int; - pub fn umount(target: *const ::c_char) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn tee(fd_in: ::c_int, fd_out: ::c_int, len: ::size_t, flags: ::c_uint) -> ::ssize_t; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + ) -> c_int; + pub fn umount(target: *const c_char) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn tee(fd_in: c_int, fd_out: c_int, len: size_t, flags: c_uint) -> ssize_t; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn splice( - fd_in: ::c_int, - off_in: *mut ::loff_t, - fd_out: ::c_int, - off_out: *mut ::loff_t, - len: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; - pub fn swapoff(puath: *const ::c_char) -> ::c_int; - pub fn vmsplice( - fd: ::c_int, - iov: *const ::iovec, - nr_segs: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; + fd_in: c_int, + off_in: *mut crate::loff_t, + fd_out: c_int, + off_out: *mut crate::loff_t, + len: size_t, + flags: c_uint, + ) -> ssize_t; + pub fn eventfd(init: c_uint, flags: c_int) -> c_int; + pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; + pub fn swapoff(puath: *const c_char) -> c_int; + pub fn vmsplice(fd: c_int, iov: *const crate::iovec, nr_segs: size_t, flags: c_uint) + -> ssize_t; pub fn mount( - src: *const ::c_char, - target: *const ::c_char, - fstype: *const ::c_char, - flags: ::c_ulong, - data: *const ::c_void, - ) -> ::c_int; - pub fn personality(persona: ::c_ulong) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; + src: *const c_char, + target: *const c_char, + fstype: *const c_char, + flags: c_ulong, + data: *const c_void, + ) -> c_int; + pub fn personality(persona: c_ulong) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; pub fn ppoll( - fds: *mut ::pollfd, + fds: *mut crate::pollfd, nfds: nfds_t, - timeout: *const ::timespec, + timeout: *const crate::timespec, sigmask: *const sigset_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; pub fn clone( - cb: extern "C" fn(*mut ::c_void) -> ::c_int, - child_stack: *mut ::c_void, - flags: ::c_int, - arg: *mut ::c_void, + cb: extern "C" fn(*mut c_void) -> c_int, + child_stack: *mut c_void, + flags: c_int, + arg: *mut c_void, ... - ) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + ) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; - pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int; - pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; + pub fn umount2(target: *const c_char, flags: c_int) -> c_int; + pub fn swapon(path: *const c_char, swapflags: c_int) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn setgrent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; pub fn getgrouplist( - user: *const ::c_char, - group: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; + user: *const c_char, + group: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn dl_iterate_phdr( - callback: ::Option< + callback: Option< unsafe extern "C" fn( - info: *mut ::dl_phdr_info, - size: ::size_t, - data: *mut ::c_void, - ) -> ::c_int, + info: *mut crate::dl_phdr_info, + size: size_t, + data: *mut c_void, + ) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; } cfg_if! { diff --git a/src/fuchsia/riscv64.rs b/src/fuchsia/riscv64.rs index de2b7197d75cc..fcbd63673c9df 100644 --- a/src/fuchsia/riscv64.rs +++ b/src/fuchsia/riscv64.rs @@ -1,44 +1,46 @@ +use crate::{c_int, c_long, c_ulong, c_ulonglong, c_ushort, off_t}; + // From psABI Calling Convention for RV64 pub type c_char = u8; -pub type __u64 = ::c_ulonglong; +pub type __u64 = c_ulonglong; pub type wchar_t = i32; -pub type nlink_t = ::c_ulong; -pub type blksize_t = ::c_long; +pub type nlink_t = c_ulong; +pub type blksize_t = c_long; pub type stat64 = stat; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } // Not actually used, IPC calls just return ENOSYS pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } } diff --git a/src/fuchsia/x86_64.rs b/src/fuchsia/x86_64.rs index ac2b976c051cc..632bace2d1d64 100644 --- a/src/fuchsia/x86_64.rs +++ b/src/fuchsia/x86_64.rs @@ -1,50 +1,52 @@ +use crate::{c_int, c_long, c_ulong, c_ulonglong, off_t, size_t}; + pub type c_char = i8; pub type wchar_t = i32; pub type nlink_t = u64; -pub type blksize_t = ::c_long; -pub type __u64 = ::c_ulonglong; +pub type blksize_t = c_long; +pub type __u64 = c_ulonglong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __reserved: [c_long; 3], } pub struct mcontext_t { @@ -52,25 +54,25 @@ s! { } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } } s_no_extra_traits! { pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, __private: [u8; 512], } } @@ -92,8 +94,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -104,8 +106,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -118,35 +120,35 @@ cfg_if! { } // offsets in user_regs_structs, from sys/reg.h -pub const R15: ::c_int = 0; -pub const R14: ::c_int = 1; -pub const R13: ::c_int = 2; -pub const R12: ::c_int = 3; -pub const RBP: ::c_int = 4; -pub const RBX: ::c_int = 5; -pub const R11: ::c_int = 6; -pub const R10: ::c_int = 7; -pub const R9: ::c_int = 8; -pub const R8: ::c_int = 9; -pub const RAX: ::c_int = 10; -pub const RCX: ::c_int = 11; -pub const RDX: ::c_int = 12; -pub const RSI: ::c_int = 13; -pub const RDI: ::c_int = 14; -pub const ORIG_RAX: ::c_int = 15; -pub const RIP: ::c_int = 16; -pub const CS: ::c_int = 17; -pub const EFLAGS: ::c_int = 18; -pub const RSP: ::c_int = 19; -pub const SS: ::c_int = 20; -pub const FS_BASE: ::c_int = 21; -pub const GS_BASE: ::c_int = 22; -pub const DS: ::c_int = 23; -pub const ES: ::c_int = 24; -pub const FS: ::c_int = 25; -pub const GS: ::c_int = 26; +pub const R15: c_int = 0; +pub const R14: c_int = 1; +pub const R13: c_int = 2; +pub const R12: c_int = 3; +pub const RBP: c_int = 4; +pub const RBX: c_int = 5; +pub const R11: c_int = 6; +pub const R10: c_int = 7; +pub const R9: c_int = 8; +pub const R8: c_int = 9; +pub const RAX: c_int = 10; +pub const RCX: c_int = 11; +pub const RDX: c_int = 12; +pub const RSI: c_int = 13; +pub const RDI: c_int = 14; +pub const ORIG_RAX: c_int = 15; +pub const RIP: c_int = 16; +pub const CS: c_int = 17; +pub const EFLAGS: c_int = 18; +pub const RSP: c_int = 19; +pub const SS: c_int = 20; +pub const FS_BASE: c_int = 21; +pub const GS_BASE: c_int = 22; +pub const DS: c_int = 23; +pub const ES: c_int = 24; +pub const FS: c_int = 25; +pub const GS: c_int = 26; -pub const MAP_32BIT: ::c_int = 0x0040; +pub const MAP_32BIT: c_int = 0x0040; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; diff --git a/src/hermit.rs b/src/hermit.rs index 8e630c38f6b65..18429de548672 100644 --- a/src/hermit.rs +++ b/src/hermit.rs @@ -1,6 +1,6 @@ //! Hermit C type definitions -use c_void; +use crate::c_void; cfg_if! { if #[cfg(any(target_arch = "aarch64", target_arch = "riscv64"))] { diff --git a/src/lib.rs b/src/lib.rs index 4b7b77f46d346..44c8217cc61c1 100644 --- a/src/lib.rs +++ b/src/lib.rs @@ -65,16 +65,16 @@ use core::option::Option; cfg_if! { if #[cfg(windows)] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod windows; - pub use windows::*; + pub use crate::windows::*; } else if #[cfg(target_os = "fuchsia")] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod fuchsia; - pub use fuchsia::*; + pub use crate::fuchsia::*; } else if #[cfg(target_os = "switch")] { mod fixed_width_ints; pub use fixed_width_ints::*; @@ -83,28 +83,28 @@ cfg_if! { pub use switch::*; } else if #[cfg(target_os = "vxworks")] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod vxworks; - pub use vxworks::*; + pub use crate::vxworks::*; } else if #[cfg(target_os = "solid_asp3")] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod solid; - pub use solid::*; + pub use crate::solid::*; } else if #[cfg(unix)] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod unix; - pub use unix::*; + pub use crate::unix::*; } else if #[cfg(target_os = "hermit")] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod hermit; - pub use hermit::*; + pub use crate::hermit::*; } else if #[cfg(target_os = "teeos")] { mod fixed_width_ints; pub use fixed_width_ints::*; @@ -113,28 +113,28 @@ cfg_if! { pub use teeos::*; } else if #[cfg(target_os = "trusty")] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod trusty; - pub use trusty::*; + pub use crate::trusty::*; } else if #[cfg(all(target_env = "sgx", target_vendor = "fortanix"))] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod sgx; - pub use sgx::*; + pub use crate::sgx::*; } else if #[cfg(any(target_env = "wasi", target_os = "wasi"))] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod wasi; - pub use wasi::*; + pub use crate::wasi::*; } else if #[cfg(target_os = "xous")] { mod fixed_width_ints; - pub use fixed_width_ints::*; + pub use crate::fixed_width_ints::*; mod xous; - pub use xous::*; + pub use crate::xous::*; } else { // non-supported targets: empty... } diff --git a/src/solid/mod.rs b/src/solid/mod.rs index da1ce150b0330..c52085c440f27 100644 --- a/src/solid/mod.rs +++ b/src/solid/mod.rs @@ -2,7 +2,7 @@ //! //! [SOLID]: https://solid.kmckk.com/ -use c_void; +use crate::c_void; pub type c_schar = i8; pub type c_uchar = u8; @@ -20,8 +20,8 @@ pub type uintmax_t = u64; pub type uintptr_t = usize; pub type intptr_t = isize; pub type ptrdiff_t = isize; -pub type size_t = ::uintptr_t; -pub type ssize_t = ::intptr_t; +pub type size_t = crate::uintptr_t; +pub type ssize_t = intptr_t; pub type clock_t = c_uint; pub type time_t = i64; @@ -407,16 +407,16 @@ pub const SIGPWR: c_int = 32; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} -impl ::Copy for FILE {} -impl ::Clone for FILE { +impl Copy for FILE {} +impl Clone for FILE { fn clone(&self) -> FILE { *self } } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos_t {} -impl ::Copy for fpos_t {} -impl ::Clone for fpos_t { +impl Copy for fpos_t {} +impl Clone for fpos_t { fn clone(&self) -> fpos_t { *self } @@ -540,7 +540,7 @@ extern "C" { pub fn _Exit(arg1: c_int) -> !; pub fn abort() -> !; pub fn abs(arg1: c_int) -> c_int; - pub fn atexit(arg1: ::Option) -> c_int; + pub fn atexit(arg1: Option) -> c_int; pub fn atoi(arg1: *const c_char) -> c_int; pub fn atol(arg1: *const c_char) -> c_long; pub fn itoa(arg1: c_int, arg2: *mut c_char, arg3: c_int) -> *mut c_char; @@ -551,7 +551,7 @@ extern "C" { arg2: *const c_void, arg3: size_t, arg4: size_t, - arg5: ::Option c_int>, + arg5: Option c_int>, ) -> *mut c_void; pub fn calloc(arg1: size_t, arg2: size_t) -> *mut c_void; pub fn div(arg1: c_int, arg2: c_int) -> div_t; @@ -565,7 +565,7 @@ extern "C" { arg1: *mut c_void, arg2: size_t, arg3: size_t, - arg4: ::Option c_int>, + arg4: Option c_int>, ); pub fn rand() -> c_int; pub fn realloc(arg1: *mut c_void, arg2: size_t) -> *mut c_void; @@ -603,7 +603,7 @@ extern "C" { pub fn strtoll(arg1: *const c_char, arg2: *mut *mut c_char, arg3: c_int) -> c_longlong; pub fn strtoull(arg1: *const c_char, arg2: *mut *mut c_char, arg3: c_int) -> c_ulonglong; pub fn aligned_alloc(arg1: size_t, arg2: size_t) -> *mut c_void; - pub fn at_quick_exit(arg1: ::Option) -> c_int; + pub fn at_quick_exit(arg1: Option) -> c_int; pub fn quick_exit(arg1: c_int); pub fn setenv(arg1: *const c_char, arg2: *const c_char, arg3: c_int) -> c_int; pub fn unsetenv(arg1: *const c_char) -> c_int; @@ -621,13 +621,13 @@ extern "C" { arg1: *mut c_void, arg2: size_t, arg3: size_t, - arg4: ::Option c_int>, + arg4: Option c_int>, ) -> c_int; pub fn mergesort( arg1: *mut c_void, arg2: size_t, arg3: size_t, - arg4: ::Option c_int>, + arg4: Option c_int>, ) -> c_int; pub fn radixsort( arg1: *mut *const c_uchar, @@ -863,11 +863,11 @@ extern "C" { pub fn newlocale(arg1: c_int, arg2: *const c_char, arg3: locale_t) -> locale_t; // langinfo.h - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - pub fn nl_langinfo_l(item: ::nl_item, locale: locale_t) -> *mut ::c_char; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + pub fn nl_langinfo_l(item: crate::nl_item, locale: locale_t) -> *mut c_char; // malloc.h - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; // sys/types.h pub fn lseek(arg1: c_int, arg2: __off_t, arg3: c_int) -> __off_t; diff --git a/src/teeos/mod.rs b/src/teeos/mod.rs index 35232d63b9778..b04f69b09c0ac 100644 --- a/src/teeos/mod.rs +++ b/src/teeos/mod.rs @@ -1110,7 +1110,7 @@ extern "C" { cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t, abstime: *const ::timespec, - ) -> ::c_int; + ) -> c_int; pub fn pthread_mutexattr_setrobust(attr: *mut pthread_mutexattr_t, robustness: c_int) -> c_int; diff --git a/src/trusty.rs b/src/trusty.rs index 68b13f70b5b3f..3155fd23e6a3a 100644 --- a/src/trusty.rs +++ b/src/trusty.rs @@ -52,8 +52,8 @@ pub type clockid_t = c_int; s! { pub struct iovec { - pub iov_base: *mut ::c_void, - pub iov_len: ::size_t, + pub iov_base: *mut c_void, + pub iov_len: size_t, } pub struct timespec { @@ -68,34 +68,34 @@ pub const PROT_WRITE: i32 = 2; // Trusty only supports `CLOCK_BOOTTIME`. pub const CLOCK_BOOTTIME: clockid_t = 7; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; -pub const AT_PAGESZ: ::c_ulong = 6; +pub const AT_PAGESZ: c_ulong = 6; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; extern "C" { pub fn calloc(nobj: size_t, size: size_t) -> *mut c_void; pub fn malloc(size: size_t) -> *mut c_void; pub fn realloc(p: *mut c_void, size: size_t) -> *mut c_void; pub fn free(p: *mut c_void); - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int; - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn close(fd: ::c_int) -> ::c_int; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int; + pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn close(fd: c_int) -> c_int; pub fn strlen(cs: *const c_char) -> size_t; pub fn getauxval(type_: c_ulong) -> c_ulong; pub fn mmap( - addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, + addr: *mut c_void, + len: size_t, + prot: c_int, + flags: c_int, + fd: c_int, offset: off_t, - ) -> *mut ::c_void; - pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn nanosleep(rqtp: *const ::timespec, rmtp: *mut ::timespec) -> ::c_int; + ) -> *mut c_void; + pub fn munmap(addr: *mut c_void, len: size_t) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn nanosleep(rqtp: *const crate::timespec, rmtp: *mut crate::timespec) -> c_int; } diff --git a/src/unix/aix/mod.rs b/src/unix/aix/mod.rs index 1f4c3a6064fff..8b8f34dfff038 100644 --- a/src/unix/aix/mod.rs +++ b/src/unix/aix/mod.rs @@ -1,63 +1,68 @@ +use crate::{ + c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, intptr_t, + size_t, ssize_t, +}; + pub type c_char = u8; -pub type caddr_t = *mut ::c_char; -pub type clockid_t = ::c_longlong; -pub type blkcnt_t = ::c_long; -pub type clock_t = ::c_int; -pub type daddr_t = ::c_long; -pub type dev_t = ::c_ulong; -pub type fpos64_t = ::c_longlong; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type idtype_t = ::c_int; -pub type ino_t = ::c_ulong; -pub type key_t = ::c_int; -pub type mode_t = ::c_uint; -pub type nlink_t = ::c_short; -pub type rlim_t = ::c_ulong; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; -pub type time_t = ::c_long; +pub type caddr_t = *mut c_char; +pub type clockid_t = c_longlong; +pub type blkcnt_t = c_long; +pub type clock_t = c_int; +pub type daddr_t = c_long; +pub type dev_t = c_ulong; +pub type fpos64_t = c_longlong; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; +pub type idtype_t = c_int; +pub type ino_t = c_ulong; +pub type key_t = c_int; +pub type mode_t = c_uint; +pub type nlink_t = c_short; +pub type rlim_t = c_ulong; +pub type speed_t = c_uint; +pub type tcflag_t = c_uint; +pub type time_t = c_long; pub type time64_t = u64; -pub type timer_t = ::c_long; -pub type wchar_t = ::c_uint; -pub type nfds_t = ::c_int; -pub type projid_t = ::c_int; -pub type id_t = ::c_uint; -pub type blksize64_t = ::c_ulonglong; -pub type blkcnt64_t = ::c_ulonglong; +pub type timer_t = c_long; +pub type wchar_t = c_uint; +pub type nfds_t = c_int; +pub type projid_t = c_int; +pub type id_t = c_uint; +pub type blksize64_t = c_ulonglong; +pub type blkcnt64_t = c_ulonglong; pub type sctp_assoc_t = u32; -pub type suseconds_t = ::c_int; -pub type useconds_t = ::c_uint; -pub type off_t = ::c_long; -pub type off64_t = ::c_longlong; +pub type suseconds_t = c_int; +pub type useconds_t = c_uint; +pub type off_t = c_long; +pub type off64_t = c_longlong; -pub type socklen_t = ::c_uint; -pub type sa_family_t = ::c_uchar; -pub type in_port_t = ::c_ushort; -pub type in_addr_t = ::c_uint; +pub type socklen_t = c_uint; +pub type sa_family_t = c_uchar; +pub type in_port_t = c_ushort; +pub type in_addr_t = c_uint; -pub type signal_t = ::c_int; -pub type pthread_t = ::c_uint; -pub type pthread_key_t = ::c_uint; +pub type signal_t = c_int; +pub type pthread_t = c_uint; +pub type pthread_key_t = c_uint; pub type thread_t = pthread_t; -pub type blksize_t = ::c_long; -pub type nl_item = ::c_int; -pub type mqd_t = ::c_int; -pub type shmatt_t = ::c_ulong; -pub type regoff_t = ::c_long; -pub type rlim64_t = ::c_ulonglong; - -pub type sem_t = ::c_int; -pub type pollset_t = ::c_int; - -pub type pthread_rwlockattr_t = *mut ::c_void; -pub type pthread_condattr_t = *mut ::c_void; -pub type pthread_mutexattr_t = *mut ::c_void; -pub type pthread_attr_t = *mut ::c_void; -pub type pthread_barrierattr_t = *mut ::c_void; -pub type posix_spawn_file_actions_t = *mut ::c_char; -pub type iconv_t = *mut ::c_void; +pub type blksize_t = c_long; +pub type nl_item = c_int; +pub type mqd_t = c_int; +pub type shmatt_t = c_ulong; +pub type regoff_t = c_long; +pub type rlim64_t = c_ulonglong; + +pub type sem_t = c_int; +pub type pollset_t = c_int; + +pub type pthread_rwlockattr_t = *mut c_void; +pub type pthread_condattr_t = *mut c_void; +pub type pthread_mutexattr_t = *mut c_void; +pub type pthread_attr_t = *mut c_void; +pub type pthread_barrierattr_t = *mut c_void; +pub type posix_spawn_file_actions_t = *mut c_char; +pub type iconv_t = *mut c_void; e! { #[repr(u32)] @@ -72,16 +77,16 @@ e! { s! { pub struct fsid_t { - pub val: [::c_uint; 2], + pub val: [c_uint; 2], } pub struct fsid64_t { - pub val: [::uint64_t; 2], + pub val: [crate::uint64_t; 2], } pub struct timezone { - pub tz_minuteswest: ::c_int, - pub tz_dsttime: ::c_int, + pub tz_minuteswest: c_int, + pub tz_dsttime: c_int, } pub struct ip_mreq { @@ -90,109 +95,109 @@ s! { } pub struct dirent { - pub d_offset: ::c_ulong, - pub d_ino: ::ino_t, - pub d_reclen: ::c_ushort, - pub d_namlen: ::c_ushort, - pub d_name: [::c_char; 256], + pub d_offset: c_ulong, + pub d_ino: crate::ino_t, + pub d_reclen: c_ushort, + pub d_namlen: c_ushort, + pub d_name: [c_char; 256], } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_sysid: ::c_uint, - pub l_pid: ::pid_t, - pub l_vfs: ::c_int, - pub l_start: ::off64_t, - pub l_len: ::off64_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_sysid: c_uint, + pub l_pid: crate::pid_t, + pub l_vfs: c_int, + pub l_start: off64_t, + pub l_len: off64_t, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, pub msg_controllen: socklen_t, - pub msg_flags: ::c_int, + pub msg_flags: c_int, } pub struct statvfs64 { - pub f_bsize: ::blksize64_t, - pub f_frsize: ::blksize64_t, - pub f_blocks: ::blkcnt64_t, - pub f_bfree: ::blkcnt64_t, - pub f_bavail: ::blkcnt64_t, - pub f_files: ::blkcnt64_t, - pub f_ffree: ::blkcnt64_t, - pub f_favail: ::blkcnt64_t, + pub f_bsize: crate::blksize64_t, + pub f_frsize: crate::blksize64_t, + pub f_blocks: crate::blkcnt64_t, + pub f_bfree: crate::blkcnt64_t, + pub f_bavail: crate::blkcnt64_t, + pub f_files: crate::blkcnt64_t, + pub f_ffree: crate::blkcnt64_t, + pub f_favail: crate::blkcnt64_t, pub f_fsid: fsid64_t, - pub f_basetype: [::c_char; 16], - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub f_fstr: [::c_char; 32], - pub f_filler: [::c_ulong; 16], + pub f_basetype: [c_char; 16], + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub f_fstr: [c_char; 32], + pub f_filler: [c_ulong; 16], } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub left_parenthesis: *mut ::c_char, - pub right_parenthesis: *mut ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub left_parenthesis: *mut c_char, + pub right_parenthesis: *mut c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::c_ulong, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: c_ulong, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, - pub ai_eflags: ::c_int, + pub ai_eflags: c_int, } pub struct in_addr { @@ -206,218 +211,218 @@ s! { } pub struct sockaddr { - pub sa_len: ::c_uchar, + pub sa_len: c_uchar, pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::c_uchar, - pub sdl_index: ::c_ushort, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 120], + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 120], } pub struct sockaddr_in { - pub sin_len: ::c_uchar, + pub sin_len: c_uchar, pub sin_family: sa_family_t, pub sin_port: in_port_t, pub sin_addr: in_addr, - pub sin_zero: [::c_char; 8], + pub sin_zero: [c_char; 8], } pub struct sockaddr_in6 { - pub sin6_len: ::c_uchar, - pub sin6_family: ::c_uchar, - pub sin6_port: ::uint16_t, - pub sin6_flowinfo: ::uint32_t, - pub sin6_addr: ::in6_addr, - pub sin6_scope_id: ::uint32_t, + pub sin6_len: c_uchar, + pub sin6_family: c_uchar, + pub sin6_port: crate::uint16_t, + pub sin6_flowinfo: crate::uint32_t, + pub sin6_addr: crate::in6_addr, + pub sin6_scope_id: crate::uint32_t, } pub struct sockaddr_storage { - pub __ss_len: ::c_uchar, + pub __ss_len: c_uchar, pub ss_family: sa_family_t, - __ss_pad1: [::c_char; 6], - __ss_align: ::int64_t, - __ss_pad2: [::c_char; 1265], + __ss_pad1: [c_char; 6], + __ss_align: crate::int64_t, + __ss_pad2: [c_char; 1265], } pub struct sockaddr_un { - pub sun_len: ::c_uchar, + pub sun_len: c_uchar, pub sun_family: sa_family_t, - pub sun_path: [::c_char; 1023], + pub sun_path: [c_char; 1023], } pub struct st_timespec { - pub tv_sec: ::time_t, - pub tv_nsec: ::c_int, + pub tv_sec: crate::time_t, + pub tv_nsec: c_int, } pub struct statfs64 { - pub f_version: ::c_int, - pub f_type: ::c_int, + pub f_version: c_int, + pub f_type: c_int, pub f_bsize: blksize64_t, pub f_blocks: blkcnt64_t, pub f_bfree: blkcnt64_t, pub f_bavail: blkcnt64_t, - pub f_files: ::uint64_t, - pub f_ffree: ::uint64_t, + pub f_files: crate::uint64_t, + pub f_ffree: crate::uint64_t, pub f_fsid: fsid64_t, - pub f_vfstype: ::c_int, + pub f_vfstype: c_int, pub f_fsize: blksize64_t, - pub f_vfsnumber: ::c_int, - pub f_vfsoff: ::c_int, - pub f_vfslen: ::c_int, - pub f_vfsvers: ::c_int, - pub f_fname: [::c_char; 32], - pub f_fpack: [::c_char; 32], - pub f_name_max: ::c_int, + pub f_vfsnumber: c_int, + pub f_vfsoff: c_int, + pub f_vfslen: c_int, + pub f_vfsvers: c_int, + pub f_fname: [c_char; 32], + pub f_fpack: [c_char; 32], + pub f_name_max: c_int, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct utsname { - pub sysname: [::c_char; 32], - pub nodename: [::c_char; 32], - pub release: [::c_char; 32], - pub version: [::c_char; 32], - pub machine: [::c_char; 32], + pub sysname: [c_char; 32], + pub nodename: [c_char; 32], + pub release: [c_char; 32], + pub version: [c_char; 32], + pub machine: [c_char; 32], } pub struct xutsname { - pub nid: ::c_uint, - pub reserved: ::c_int, - pub longnid: ::c_ulonglong, + pub nid: c_uint, + pub reserved: c_int, + pub longnid: c_ulonglong, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct sigevent { - pub sigev_value: ::sigval, - pub sigev_signo: ::c_int, - pub sigev_notify: ::c_int, - pub sigev_notify_function: extern "C" fn(val: ::sigval), + pub sigev_value: crate::sigval, + pub sigev_signo: c_int, + pub sigev_notify: c_int, + pub sigev_notify_function: extern "C" fn(val: crate::sigval), pub sigev_notify_attributes: *mut pthread_attr_t, } // Should be union with another 'sival_int' pub struct sigval64 { - pub sival_ptr: ::c_ulonglong, + pub sival_ptr: c_ulonglong, } pub struct sigevent64 { pub sigev_value: sigval64, - pub sigev_signo: ::c_int, - pub sigev_notify: ::c_int, - pub sigev_notify_function: ::c_ulonglong, - pub sigev_notify_attributes: ::c_ulonglong, + pub sigev_signo: c_int, + pub sigev_notify: c_int, + pub sigev_notify_function: c_ulonglong, + pub sigev_notify_attributes: c_ulonglong, } pub struct osigevent { - pub sevt_value: *mut ::c_void, + pub sevt_value: *mut c_void, pub sevt_signo: signal_t, } pub struct poll_ctl { - pub cmd: ::c_short, - pub events: ::c_short, - pub fd: ::c_int, + pub cmd: c_short, + pub events: c_short, + pub fd: c_int, } pub struct sf_parms { - pub header_data: *mut ::c_void, - pub header_length: ::c_uint, - pub file_descriptor: ::c_int, - pub file_size: ::uint64_t, - pub file_offset: ::uint64_t, - pub file_bytes: ::int64_t, - pub trailer_data: *mut ::c_void, - pub trailer_length: ::c_uint, - pub bytes_sent: ::uint64_t, + pub header_data: *mut c_void, + pub header_length: c_uint, + pub file_descriptor: c_int, + pub file_size: crate::uint64_t, + pub file_offset: crate::uint64_t, + pub file_bytes: crate::int64_t, + pub trailer_data: *mut c_void, + pub trailer_length: c_uint, + pub bytes_sent: crate::uint64_t, } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::c_uint, + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, } pub struct sched_param { - pub sched_priority: ::c_int, - pub sched_policy: ::c_int, - pub sched_reserved: [::c_int; 6], + pub sched_priority: c_int, + pub sched_policy: c_int, + pub sched_reserved: [c_int; 6], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, - pub __pad: [::c_int; 4], + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, + pub __pad: [c_int; 4], } pub struct posix_spawnattr_t { - pub posix_attr_flags: ::c_short, - pub posix_attr_pgroup: ::pid_t, - pub posix_attr_sigmask: ::sigset_t, - pub posix_attr_sigdefault: ::sigset_t, - pub posix_attr_schedpolicy: ::c_int, + pub posix_attr_flags: c_short, + pub posix_attr_pgroup: crate::pid_t, + pub posix_attr_sigmask: crate::sigset_t, + pub posix_attr_sigdefault: crate::sigset_t, + pub posix_attr_schedpolicy: c_int, pub posix_attr_schedparam: sched_param, } pub struct glob_t { - pub gl_pathc: ::size_t, + pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_padr: *mut ::c_void, - pub gl_ptx: *mut ::c_void, + pub gl_offs: size_t, + pub gl_padr: *mut c_void, + pub gl_ptx: *mut c_void, } pub struct mallinfo { - pub arena: ::c_ulong, - pub ordblks: ::c_int, - pub smblks: ::c_int, - pub hblks: ::c_int, - pub hblkhd: ::c_int, - pub usmblks: ::c_ulong, - pub fsmblks: ::c_ulong, - pub uordblks: ::c_ulong, - pub fordblks: ::c_ulong, - pub keepcost: ::c_int, + pub arena: c_ulong, + pub ordblks: c_int, + pub smblks: c_int, + pub hblks: c_int, + pub hblkhd: c_int, + pub usmblks: c_ulong, + pub fsmblks: c_ulong, + pub uordblks: c_ulong, + pub fordblks: c_ulong, + pub keepcost: c_int, } pub struct utmp_exit_status { - pub e_termination: ::c_short, - pub e_exit: ::c_short, + pub e_termination: c_short, + pub e_exit: c_short, } pub struct utmp { - pub ut_user: [::c_char; 256], - pub ut_id: [::c_char; 14], - pub ut_line: [::c_char; 64], - pub ut_pid: ::pid_t, - pub ut_type: ::c_short, + pub ut_user: [c_char; 256], + pub ut_id: [c_char; 14], + pub ut_line: [c_char; 64], + pub ut_pid: crate::pid_t, + pub ut_type: c_short, pub ut_time: time64_t, pub ut_exit: utmp_exit_status, - pub ut_host: [::c_char; 256], - pub __dbl_word_pad: ::c_int, - pub __reservedA: [::c_int; 2], - pub __reservedV: [::c_int; 6], + pub ut_host: [c_char; 256], + pub __dbl_word_pad: c_int, + pub __reservedA: [c_int; 2], + pub __reservedV: [c_int; 6], } pub struct regmatch_t { @@ -426,17 +431,17 @@ s! { } pub struct regex_t { - pub re_nsub: ::size_t, - pub re_comp: *mut ::c_void, - pub re_cflags: ::c_int, - pub re_erroff: ::size_t, - pub re_len: ::size_t, - pub re_ucoll: [::wchar_t; 2], - pub re_lsub: [*mut ::c_void; 24], - pub re_esub: [*mut ::c_void; 24], - pub re_map: *mut ::c_uchar, - pub __maxsub: ::c_int, - pub __unused: [*mut ::c_void; 34], + pub re_nsub: size_t, + pub re_comp: *mut c_void, + pub re_cflags: c_int, + pub re_erroff: size_t, + pub re_len: size_t, + pub re_ucoll: [crate::wchar_t; 2], + pub re_lsub: [*mut c_void; 24], + pub re_esub: [*mut c_void; 24], + pub re_map: *mut c_uchar, + pub __maxsub: c_int, + pub __unused: [*mut c_void; 34], } pub struct rlimit64 { @@ -446,20 +451,20 @@ s! { pub struct shmid_ds { pub shm_perm: ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, pub shm_nattch: shmatt_t, pub shm_cnattch: shmatt_t, pub shm_atime: time_t, pub shm_dtime: time_t, pub shm_ctime: time_t, - pub shm_handle: ::uint32_t, - pub shm_extshm: ::c_int, - pub shm_pagesize: ::int64_t, - pub shm_lba: ::uint64_t, - pub shm_reserved: ::int64_t, - pub shm_reserved1: ::int64_t, + pub shm_handle: crate::uint32_t, + pub shm_extshm: c_int, + pub shm_pagesize: crate::int64_t, + pub shm_lba: crate::uint64_t, + pub shm_reserved: crate::int64_t, + pub shm_reserved1: crate::int64_t, } pub struct stat64 { @@ -467,87 +472,87 @@ s! { pub st_ino: ino_t, pub st_mode: mode_t, pub st_nlink: nlink_t, - pub st_flag: ::c_ushort, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_flag: c_ushort, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, pub st_rdev: dev_t, - pub st_ssize: ::c_int, + pub st_ssize: c_int, pub st_atim: st_timespec, pub st_mtim: st_timespec, pub st_ctim: st_timespec, pub st_blksize: blksize_t, pub st_blocks: blkcnt_t, - pub st_vfstype: ::c_int, - pub st_vfs: ::c_uint, - pub st_type: ::c_uint, - pub st_gen: ::c_uint, - pub st_reserved: [::c_uint; 10], + pub st_vfstype: c_int, + pub st_vfs: c_uint, + pub st_type: c_uint, + pub st_gen: c_uint, + pub st_reserved: [c_uint; 10], pub st_size: off64_t, } pub struct mntent { - pub mnt_fsname: *mut ::c_char, - pub mnt_dir: *mut ::c_char, - pub mnt_type: *mut ::c_char, - pub mnt_opts: *mut ::c_char, - pub mnt_freq: ::c_int, - pub mnt_passno: ::c_int, + pub mnt_fsname: *mut c_char, + pub mnt_dir: *mut c_char, + pub mnt_type: *mut c_char, + pub mnt_opts: *mut c_char, + pub mnt_freq: c_int, + pub mnt_passno: c_int, } pub struct ipc_perm { - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, pub mode: mode_t, - pub seq: ::c_ushort, - pub __reserved: ::c_ushort, + pub seq: c_ushort, + pub __reserved: c_ushort, pub key: key_t, } pub struct entry { - pub key: *mut ::c_char, - pub data: *mut ::c_void, + pub key: *mut c_char, + pub data: *mut c_void, } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } } s_no_extra_traits! { pub union __sigaction_sa_union { - pub __su_handler: extern "C" fn(c: ::c_int), - pub __su_sigaction: extern "C" fn(c: ::c_int, info: *mut siginfo_t, ptr: *mut ::c_void), + pub __su_handler: extern "C" fn(c: c_int), + pub __su_sigaction: extern "C" fn(c: c_int, info: *mut siginfo_t, ptr: *mut c_void), } pub struct sigaction { pub sa_union: __sigaction_sa_union, pub sa_mask: sigset_t, - pub sa_flags: ::c_int, + pub sa_flags: c_int, } pub union __poll_ctl_ext_u { - pub addr: *mut ::c_void, + pub addr: *mut c_void, pub data32: u32, pub data: u64, } @@ -555,8 +560,8 @@ s_no_extra_traits! { pub struct poll_ctl_ext { pub version: u8, pub command: u8, - pub events: ::c_short, - pub fd: ::c_int, + pub events: c_short, + pub fd: c_int, pub u: __poll_ctl_ext_u, pub reversed64: [u64; 6], } @@ -573,16 +578,16 @@ cfg_if! { } } impl Eq for __sigaction_sa_union {} - impl ::fmt::Debug for __sigaction_sa_union { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for __sigaction_sa_union { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("__sigaction_sa_union") .field("__su_handler", unsafe { &self.__su_handler }) .field("__su_sigaction", unsafe { &self.__su_sigaction }) .finish() } } - impl ::hash::Hash for __sigaction_sa_union { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __sigaction_sa_union { + fn hash(&self, state: &mut H) { unsafe { self.__su_handler.hash(state); self.__su_sigaction.hash(state); @@ -598,8 +603,8 @@ cfg_if! { } } impl Eq for sigaction {} - impl ::fmt::Debug for sigaction { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for sigaction { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("sigaction") .field("sa_union", &self.sa_union) .field("sa_mask", &self.sa_mask) @@ -607,8 +612,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigaction { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigaction { + fn hash(&self, state: &mut H) { self.sa_union.hash(state); self.sa_mask.hash(state); self.sa_flags.hash(state); @@ -625,8 +630,8 @@ cfg_if! { } } impl Eq for __poll_ctl_ext_u {} - impl ::fmt::Debug for __poll_ctl_ext_u { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for __poll_ctl_ext_u { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("__poll_ctl_ext_u") .field("addr", unsafe { &self.addr }) .field("data32", unsafe { &self.data32 }) @@ -634,8 +639,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for __poll_ctl_ext_u { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __poll_ctl_ext_u { + fn hash(&self, state: &mut H) { unsafe { self.addr.hash(state); self.data32.hash(state); @@ -655,8 +660,8 @@ cfg_if! { } } impl Eq for poll_ctl_ext {} - impl ::fmt::Debug for poll_ctl_ext { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for poll_ctl_ext { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("poll_ctl_ext") .field("version", &self.version) .field("command", &self.command) @@ -667,8 +672,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for poll_ctl_ext { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for poll_ctl_ext { + fn hash(&self, state: &mut H) { self.version.hash(state); self.command.hash(state); self.events.hash(state); @@ -681,157 +686,157 @@ cfg_if! { } // dlfcn.h -pub const RTLD_LAZY: ::c_int = 0x4; -pub const RTLD_NOW: ::c_int = 0x2; -pub const RTLD_GLOBAL: ::c_int = 0x10000; -pub const RTLD_LOCAL: ::c_int = 0x80000; -pub const RTLD_MEMBER: ::c_int = 0x40000; -pub const RTLD_NOAUTODEFER: ::c_int = 0x20000; -pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void; -pub const RTLD_MYSELF: *mut ::c_void = -2isize as *mut ::c_void; -pub const RTLD_NEXT: *mut ::c_void = -3isize as *mut ::c_void; +pub const RTLD_LAZY: c_int = 0x4; +pub const RTLD_NOW: c_int = 0x2; +pub const RTLD_GLOBAL: c_int = 0x10000; +pub const RTLD_LOCAL: c_int = 0x80000; +pub const RTLD_MEMBER: c_int = 0x40000; +pub const RTLD_NOAUTODEFER: c_int = 0x20000; +pub const RTLD_DEFAULT: *mut c_void = -1isize as *mut c_void; +pub const RTLD_MYSELF: *mut c_void = -2isize as *mut c_void; +pub const RTLD_NEXT: *mut c_void = -3isize as *mut c_void; // fcntl.h -pub const O_RDONLY: ::c_int = 0x0; -pub const O_WRONLY: ::c_int = 0x1; -pub const O_RDWR: ::c_int = 0x2; -pub const O_NDELAY: ::c_int = 0x8000; -pub const O_APPEND: ::c_int = 0x8; -pub const O_DSYNC: ::c_int = 0x400000; -pub const O_CREAT: ::c_int = 0x100; -pub const O_EXCL: ::c_int = 0x400; -pub const O_NOCTTY: ::c_int = 0x800; -pub const O_TRUNC: ::c_int = 0x200; -pub const O_NOFOLLOW: ::c_int = 0x1000000; -pub const O_DIRECTORY: ::c_int = 0x80000; -pub const O_SEARCH: ::c_int = 0x20; -pub const O_EXEC: ::c_int = 0x20; -pub const O_CLOEXEC: ::c_int = 0x800000; -pub const O_ACCMODE: ::c_int = O_RDONLY | O_WRONLY | O_RDWR; -pub const O_DIRECT: ::c_int = 0x8000000; -pub const O_TTY_INIT: ::c_int = 0; -pub const O_RSYNC: ::c_int = 0x200000; -pub const O_LARGEFILE: ::c_int = 0x4000000; -pub const F_CLOSEM: ::c_int = 10; -pub const F_DUPFD_CLOEXEC: ::c_int = 16; -pub const F_GETLK64: ::c_int = 11; -pub const F_SETLK64: ::c_int = 12; -pub const F_SETLKW64: ::c_int = 13; -pub const F_DUP2FD: ::c_int = 14; -pub const F_TSTLK: ::c_int = 15; -pub const F_GETLK: ::c_int = F_GETLK64; -pub const F_SETLK: ::c_int = F_SETLK64; -pub const F_SETLKW: ::c_int = F_SETLKW64; -pub const F_GETOWN: ::c_int = 8; -pub const F_SETOWN: ::c_int = 9; -pub const AT_FDCWD: ::c_int = -2; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1; -pub const AT_SYMLINK_FOLLOW: ::c_int = 2; -pub const AT_REMOVEDIR: ::c_int = 1; -pub const AT_EACCESS: ::c_int = 1; -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; -pub const O_SYNC: ::c_int = 16; -pub const O_NONBLOCK: ::c_int = 4; -pub const FASYNC: ::c_int = 0x20000; -pub const POSIX_FADV_NORMAL: ::c_int = 1; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_FADV_RANDOM: ::c_int = 3; -pub const POSIX_FADV_WILLNEED: ::c_int = 4; -pub const POSIX_FADV_DONTNEED: ::c_int = 5; -pub const POSIX_FADV_NOREUSE: ::c_int = 6; +pub const O_RDONLY: c_int = 0x0; +pub const O_WRONLY: c_int = 0x1; +pub const O_RDWR: c_int = 0x2; +pub const O_NDELAY: c_int = 0x8000; +pub const O_APPEND: c_int = 0x8; +pub const O_DSYNC: c_int = 0x400000; +pub const O_CREAT: c_int = 0x100; +pub const O_EXCL: c_int = 0x400; +pub const O_NOCTTY: c_int = 0x800; +pub const O_TRUNC: c_int = 0x200; +pub const O_NOFOLLOW: c_int = 0x1000000; +pub const O_DIRECTORY: c_int = 0x80000; +pub const O_SEARCH: c_int = 0x20; +pub const O_EXEC: c_int = 0x20; +pub const O_CLOEXEC: c_int = 0x800000; +pub const O_ACCMODE: c_int = O_RDONLY | O_WRONLY | O_RDWR; +pub const O_DIRECT: c_int = 0x8000000; +pub const O_TTY_INIT: c_int = 0; +pub const O_RSYNC: c_int = 0x200000; +pub const O_LARGEFILE: c_int = 0x4000000; +pub const F_CLOSEM: c_int = 10; +pub const F_DUPFD_CLOEXEC: c_int = 16; +pub const F_GETLK64: c_int = 11; +pub const F_SETLK64: c_int = 12; +pub const F_SETLKW64: c_int = 13; +pub const F_DUP2FD: c_int = 14; +pub const F_TSTLK: c_int = 15; +pub const F_GETLK: c_int = F_GETLK64; +pub const F_SETLK: c_int = F_SETLK64; +pub const F_SETLKW: c_int = F_SETLKW64; +pub const F_GETOWN: c_int = 8; +pub const F_SETOWN: c_int = 9; +pub const AT_FDCWD: c_int = -2; +pub const AT_SYMLINK_NOFOLLOW: c_int = 1; +pub const AT_SYMLINK_FOLLOW: c_int = 2; +pub const AT_REMOVEDIR: c_int = 1; +pub const AT_EACCESS: c_int = 1; +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; +pub const O_SYNC: c_int = 16; +pub const O_NONBLOCK: c_int = 4; +pub const FASYNC: c_int = 0x20000; +pub const POSIX_FADV_NORMAL: c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: c_int = 2; +pub const POSIX_FADV_RANDOM: c_int = 3; +pub const POSIX_FADV_WILLNEED: c_int = 4; +pub const POSIX_FADV_DONTNEED: c_int = 5; +pub const POSIX_FADV_NOREUSE: c_int = 6; // glob.h -pub const GLOB_APPEND: ::c_int = 0x1; -pub const GLOB_DOOFFS: ::c_int = 0x2; -pub const GLOB_ERR: ::c_int = 0x4; -pub const GLOB_MARK: ::c_int = 0x8; -pub const GLOB_NOCHECK: ::c_int = 0x10; -pub const GLOB_NOSORT: ::c_int = 0x20; -pub const GLOB_NOESCAPE: ::c_int = 0x80; -pub const GLOB_NOSPACE: ::c_int = 0x2000; -pub const GLOB_ABORTED: ::c_int = 0x1000; -pub const GLOB_NOMATCH: ::c_int = 0x4000; -pub const GLOB_NOSYS: ::c_int = 0x8000; +pub const GLOB_APPEND: c_int = 0x1; +pub const GLOB_DOOFFS: c_int = 0x2; +pub const GLOB_ERR: c_int = 0x4; +pub const GLOB_MARK: c_int = 0x8; +pub const GLOB_NOCHECK: c_int = 0x10; +pub const GLOB_NOSORT: c_int = 0x20; +pub const GLOB_NOESCAPE: c_int = 0x80; +pub const GLOB_NOSPACE: c_int = 0x2000; +pub const GLOB_ABORTED: c_int = 0x1000; +pub const GLOB_NOMATCH: c_int = 0x4000; +pub const GLOB_NOSYS: c_int = 0x8000; // langinfo.h -pub const DAY_1: ::nl_item = 13; -pub const DAY_2: ::nl_item = 14; -pub const DAY_3: ::nl_item = 15; -pub const DAY_4: ::nl_item = 16; -pub const DAY_5: ::nl_item = 17; -pub const DAY_6: ::nl_item = 18; -pub const DAY_7: ::nl_item = 19; -pub const ABDAY_1: ::nl_item = 6; -pub const ABDAY_2: ::nl_item = 7; -pub const ABDAY_3: ::nl_item = 8; -pub const ABDAY_4: ::nl_item = 9; -pub const ABDAY_5: ::nl_item = 10; -pub const ABDAY_6: ::nl_item = 11; -pub const ABDAY_7: ::nl_item = 12; -pub const MON_1: ::nl_item = 32; -pub const MON_2: ::nl_item = 33; -pub const MON_3: ::nl_item = 34; -pub const MON_4: ::nl_item = 35; -pub const MON_5: ::nl_item = 36; -pub const MON_6: ::nl_item = 37; -pub const MON_7: ::nl_item = 38; -pub const MON_8: ::nl_item = 39; -pub const MON_9: ::nl_item = 40; -pub const MON_10: ::nl_item = 41; -pub const MON_11: ::nl_item = 42; -pub const MON_12: ::nl_item = 43; -pub const ABMON_1: ::nl_item = 20; -pub const ABMON_2: ::nl_item = 21; -pub const ABMON_3: ::nl_item = 22; -pub const ABMON_4: ::nl_item = 23; -pub const ABMON_5: ::nl_item = 24; -pub const ABMON_6: ::nl_item = 25; -pub const ABMON_7: ::nl_item = 26; -pub const ABMON_8: ::nl_item = 27; -pub const ABMON_9: ::nl_item = 28; -pub const ABMON_10: ::nl_item = 29; -pub const ABMON_11: ::nl_item = 30; -pub const ABMON_12: ::nl_item = 31; -pub const RADIXCHAR: ::nl_item = 44; -pub const THOUSEP: ::nl_item = 45; -pub const YESSTR: ::nl_item = 46; -pub const NOSTR: ::nl_item = 47; -pub const CRNCYSTR: ::nl_item = 48; -pub const D_T_FMT: ::nl_item = 1; -pub const D_FMT: ::nl_item = 2; -pub const T_FMT: ::nl_item = 3; -pub const AM_STR: ::nl_item = 4; -pub const PM_STR: ::nl_item = 5; -pub const CODESET: ::nl_item = 49; -pub const T_FMT_AMPM: ::nl_item = 55; -pub const ERA: ::nl_item = 56; -pub const ERA_D_FMT: ::nl_item = 57; -pub const ERA_D_T_FMT: ::nl_item = 58; -pub const ERA_T_FMT: ::nl_item = 59; -pub const ALT_DIGITS: ::nl_item = 60; -pub const YESEXPR: ::nl_item = 61; -pub const NOEXPR: ::nl_item = 62; +pub const DAY_1: crate::nl_item = 13; +pub const DAY_2: crate::nl_item = 14; +pub const DAY_3: crate::nl_item = 15; +pub const DAY_4: crate::nl_item = 16; +pub const DAY_5: crate::nl_item = 17; +pub const DAY_6: crate::nl_item = 18; +pub const DAY_7: crate::nl_item = 19; +pub const ABDAY_1: crate::nl_item = 6; +pub const ABDAY_2: crate::nl_item = 7; +pub const ABDAY_3: crate::nl_item = 8; +pub const ABDAY_4: crate::nl_item = 9; +pub const ABDAY_5: crate::nl_item = 10; +pub const ABDAY_6: crate::nl_item = 11; +pub const ABDAY_7: crate::nl_item = 12; +pub const MON_1: crate::nl_item = 32; +pub const MON_2: crate::nl_item = 33; +pub const MON_3: crate::nl_item = 34; +pub const MON_4: crate::nl_item = 35; +pub const MON_5: crate::nl_item = 36; +pub const MON_6: crate::nl_item = 37; +pub const MON_7: crate::nl_item = 38; +pub const MON_8: crate::nl_item = 39; +pub const MON_9: crate::nl_item = 40; +pub const MON_10: crate::nl_item = 41; +pub const MON_11: crate::nl_item = 42; +pub const MON_12: crate::nl_item = 43; +pub const ABMON_1: crate::nl_item = 20; +pub const ABMON_2: crate::nl_item = 21; +pub const ABMON_3: crate::nl_item = 22; +pub const ABMON_4: crate::nl_item = 23; +pub const ABMON_5: crate::nl_item = 24; +pub const ABMON_6: crate::nl_item = 25; +pub const ABMON_7: crate::nl_item = 26; +pub const ABMON_8: crate::nl_item = 27; +pub const ABMON_9: crate::nl_item = 28; +pub const ABMON_10: crate::nl_item = 29; +pub const ABMON_11: crate::nl_item = 30; +pub const ABMON_12: crate::nl_item = 31; +pub const RADIXCHAR: crate::nl_item = 44; +pub const THOUSEP: crate::nl_item = 45; +pub const YESSTR: crate::nl_item = 46; +pub const NOSTR: crate::nl_item = 47; +pub const CRNCYSTR: crate::nl_item = 48; +pub const D_T_FMT: crate::nl_item = 1; +pub const D_FMT: crate::nl_item = 2; +pub const T_FMT: crate::nl_item = 3; +pub const AM_STR: crate::nl_item = 4; +pub const PM_STR: crate::nl_item = 5; +pub const CODESET: crate::nl_item = 49; +pub const T_FMT_AMPM: crate::nl_item = 55; +pub const ERA: crate::nl_item = 56; +pub const ERA_D_FMT: crate::nl_item = 57; +pub const ERA_D_T_FMT: crate::nl_item = 58; +pub const ERA_T_FMT: crate::nl_item = 59; +pub const ALT_DIGITS: crate::nl_item = 60; +pub const YESEXPR: crate::nl_item = 61; +pub const NOEXPR: crate::nl_item = 62; // locale.h -pub const LC_GLOBAL_LOCALE: ::locale_t = -1isize as ::locale_t; -pub const LC_CTYPE: ::c_int = 1; -pub const LC_NUMERIC: ::c_int = 3; -pub const LC_TIME: ::c_int = 4; -pub const LC_COLLATE: ::c_int = 0; -pub const LC_MONETARY: ::c_int = 2; -pub const LC_MESSAGES: ::c_int = 4; -pub const LC_ALL: ::c_int = -1; -pub const LC_CTYPE_MASK: ::c_int = 2; -pub const LC_NUMERIC_MASK: ::c_int = 16; -pub const LC_TIME_MASK: ::c_int = 32; -pub const LC_COLLATE_MASK: ::c_int = 1; -pub const LC_MONETARY_MASK: ::c_int = 8; -pub const LC_MESSAGES_MASK: ::c_int = 4; -pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK +pub const LC_GLOBAL_LOCALE: crate::locale_t = -1isize as crate::locale_t; +pub const LC_CTYPE: c_int = 1; +pub const LC_NUMERIC: c_int = 3; +pub const LC_TIME: c_int = 4; +pub const LC_COLLATE: c_int = 0; +pub const LC_MONETARY: c_int = 2; +pub const LC_MESSAGES: c_int = 4; +pub const LC_ALL: c_int = -1; +pub const LC_CTYPE_MASK: c_int = 2; +pub const LC_NUMERIC_MASK: c_int = 16; +pub const LC_TIME_MASK: c_int = 32; +pub const LC_COLLATE_MASK: c_int = 1; +pub const LC_MONETARY_MASK: c_int = 8; +pub const LC_MESSAGES_MASK: c_int = 4; +pub const LC_ALL_MASK: c_int = LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK @@ -839,757 +844,757 @@ pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK | LC_MESSAGES_MASK; // netdb.h -pub const NI_MAXHOST: ::socklen_t = 1025; -pub const NI_MAXSERV: ::socklen_t = 32; -pub const NI_NOFQDN: ::socklen_t = 0x1; -pub const NI_NUMERICHOST: ::socklen_t = 0x2; -pub const NI_NAMEREQD: ::socklen_t = 0x4; -pub const NI_NUMERICSERV: ::socklen_t = 0x8; -pub const NI_DGRAM: ::socklen_t = 0x10; -pub const NI_NUMERICSCOPE: ::socklen_t = 0x40; -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 13; -pub const AI_CANONNAME: ::c_int = 0x01; -pub const AI_PASSIVE: ::c_int = 0x02; -pub const AI_NUMERICHOST: ::c_int = 0x04; -pub const AI_ADDRCONFIG: ::c_int = 0x08; -pub const AI_V4MAPPED: ::c_int = 0x10; -pub const AI_ALL: ::c_int = 0x20; -pub const AI_NUMERICSERV: ::c_int = 0x40; -pub const AI_EXTFLAGS: ::c_int = 0x80; -pub const AI_DEFAULT: ::c_int = AI_V4MAPPED | AI_ADDRCONFIG; -pub const IPV6_ADDRFORM: ::c_int = 22; -pub const IPV6_ADDR_PREFERENCES: ::c_int = 74; -pub const IPV6_CHECKSUM: ::c_int = 39; -pub const IPV6_DONTFRAG: ::c_int = 45; -pub const IPV6_DSTOPTS: ::c_int = 54; -pub const IPV6_FLOWINFO_FLOWLABEL: ::c_int = 16777215; -pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 251658240; -pub const IPV6_HOPLIMIT: ::c_int = 40; -pub const IPV6_HOPOPTS: ::c_int = 52; -pub const IPV6_NEXTHOP: ::c_int = 48; -pub const IPV6_PATHMTU: ::c_int = 46; -pub const IPV6_PKTINFO: ::c_int = 33; -pub const IPV6_PREFER_SRC_CGA: ::c_int = 16; -pub const IPV6_PREFER_SRC_COA: ::c_int = 2; -pub const IPV6_PREFER_SRC_HOME: ::c_int = 1; -pub const IPV6_PREFER_SRC_NONCGA: ::c_int = 32; -pub const IPV6_PREFER_SRC_PUBLIC: ::c_int = 4; -pub const IPV6_PREFER_SRC_TMP: ::c_int = 8; -pub const IPV6_RECVDSTOPTS: ::c_int = 56; -pub const IPV6_RECVHOPLIMIT: ::c_int = 41; -pub const IPV6_RECVHOPOPTS: ::c_int = 53; -pub const IPV6_RECVPATHMTU: ::c_int = 47; -pub const IPV6_RECVRTHDR: ::c_int = 51; -pub const IPV6_RECVTCLASS: ::c_int = 42; -pub const IPV6_RTHDR: ::c_int = 50; -pub const IPV6_RTHDRDSTOPTS: ::c_int = 55; -pub const IPV6_TCLASS: ::c_int = 43; +pub const NI_MAXHOST: crate::socklen_t = 1025; +pub const NI_MAXSERV: crate::socklen_t = 32; +pub const NI_NOFQDN: crate::socklen_t = 0x1; +pub const NI_NUMERICHOST: crate::socklen_t = 0x2; +pub const NI_NAMEREQD: crate::socklen_t = 0x4; +pub const NI_NUMERICSERV: crate::socklen_t = 0x8; +pub const NI_DGRAM: crate::socklen_t = 0x10; +pub const NI_NUMERICSCOPE: crate::socklen_t = 0x40; +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NODATA: c_int = 7; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 13; +pub const AI_CANONNAME: c_int = 0x01; +pub const AI_PASSIVE: c_int = 0x02; +pub const AI_NUMERICHOST: c_int = 0x04; +pub const AI_ADDRCONFIG: c_int = 0x08; +pub const AI_V4MAPPED: c_int = 0x10; +pub const AI_ALL: c_int = 0x20; +pub const AI_NUMERICSERV: c_int = 0x40; +pub const AI_EXTFLAGS: c_int = 0x80; +pub const AI_DEFAULT: c_int = AI_V4MAPPED | AI_ADDRCONFIG; +pub const IPV6_ADDRFORM: c_int = 22; +pub const IPV6_ADDR_PREFERENCES: c_int = 74; +pub const IPV6_CHECKSUM: c_int = 39; +pub const IPV6_DONTFRAG: c_int = 45; +pub const IPV6_DSTOPTS: c_int = 54; +pub const IPV6_FLOWINFO_FLOWLABEL: c_int = 16777215; +pub const IPV6_FLOWINFO_PRIORITY: c_int = 251658240; +pub const IPV6_HOPLIMIT: c_int = 40; +pub const IPV6_HOPOPTS: c_int = 52; +pub const IPV6_NEXTHOP: c_int = 48; +pub const IPV6_PATHMTU: c_int = 46; +pub const IPV6_PKTINFO: c_int = 33; +pub const IPV6_PREFER_SRC_CGA: c_int = 16; +pub const IPV6_PREFER_SRC_COA: c_int = 2; +pub const IPV6_PREFER_SRC_HOME: c_int = 1; +pub const IPV6_PREFER_SRC_NONCGA: c_int = 32; +pub const IPV6_PREFER_SRC_PUBLIC: c_int = 4; +pub const IPV6_PREFER_SRC_TMP: c_int = 8; +pub const IPV6_RECVDSTOPTS: c_int = 56; +pub const IPV6_RECVHOPLIMIT: c_int = 41; +pub const IPV6_RECVHOPOPTS: c_int = 53; +pub const IPV6_RECVPATHMTU: c_int = 47; +pub const IPV6_RECVRTHDR: c_int = 51; +pub const IPV6_RECVTCLASS: c_int = 42; +pub const IPV6_RTHDR: c_int = 50; +pub const IPV6_RTHDRDSTOPTS: c_int = 55; +pub const IPV6_TCLASS: c_int = 43; // net/bpf.h -pub const DLT_NULL: ::c_int = 0x18; -pub const DLT_EN10MB: ::c_int = 0x6; -pub const DLT_EN3MB: ::c_int = 0x1a; -pub const DLT_AX25: ::c_int = 0x5; -pub const DLT_PRONET: ::c_int = 0xd; -pub const DLT_IEEE802: ::c_int = 0x7; -pub const DLT_ARCNET: ::c_int = 0x23; -pub const DLT_SLIP: ::c_int = 0x1c; -pub const DLT_PPP: ::c_int = 0x17; -pub const DLT_FDDI: ::c_int = 0xf; -pub const DLT_ATM: ::c_int = 0x25; -pub const DLT_IPOIB: ::c_int = 0xc7; -pub const BIOCSETF: ::c_ulong = 0x80104267; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; -pub const BIOCGBLEN: ::c_int = 0x40044266; -pub const BIOCSBLEN: ::c_int = 0xc0044266; -pub const BIOCFLUSH: ::c_int = 0x20004268; -pub const BIOCPROMISC: ::c_int = 0x20004269; -pub const BIOCGDLT: ::c_int = 0x4004426a; -pub const BIOCSRTIMEOUT: ::c_int = 0x8010426d; -pub const BIOCGSTATS: ::c_int = 0x4008426f; -pub const BIOCIMMEDIATE: ::c_int = 0x80044270; -pub const BIOCVERSION: ::c_int = 0x40044271; -pub const BIOCSDEVNO: ::c_int = 0x20004272; -pub const BIOCGETIF: ::c_ulong = 0x4020426b; -pub const BIOCSETIF: ::c_ulong = 0xffffffff8020426c; -pub const BPF_ABS: ::c_int = 32; -pub const BPF_ADD: ::c_int = 0; -pub const BPF_ALIGNMENT: ::c_ulong = 4; -pub const BPF_ALU: ::c_int = 4; -pub const BPF_AND: ::c_int = 80; -pub const BPF_B: ::c_int = 16; -pub const BPF_DIV: ::c_int = 48; -pub const BPF_H: ::c_int = 8; -pub const BPF_IMM: ::c_int = 0; -pub const BPF_IND: ::c_int = 64; -pub const BPF_JA: ::c_int = 0; -pub const BPF_JEQ: ::c_int = 16; -pub const BPF_JGE: ::c_int = 48; -pub const BPF_JGT: ::c_int = 32; -pub const BPF_JMP: ::c_int = 5; -pub const BPF_JSET: ::c_int = 64; -pub const BPF_K: ::c_int = 0; -pub const BPF_LD: ::c_int = 0; -pub const BPF_LDX: ::c_int = 1; -pub const BPF_LEN: ::c_int = 128; -pub const BPF_LSH: ::c_int = 96; -pub const BPF_MAXINSNS: ::c_int = 512; -pub const BPF_MEM: ::c_int = 96; -pub const BPF_MEMWORDS: ::c_int = 16; -pub const BPF_MISC: ::c_int = 7; -pub const BPF_MSH: ::c_int = 160; -pub const BPF_MUL: ::c_int = 32; -pub const BPF_NEG: ::c_int = 128; -pub const BPF_OR: ::c_int = 64; -pub const BPF_RET: ::c_int = 6; -pub const BPF_RSH: ::c_int = 112; -pub const BPF_ST: ::c_int = 2; -pub const BPF_STX: ::c_int = 3; -pub const BPF_SUB: ::c_int = 16; -pub const BPF_W: ::c_int = 0; -pub const BPF_X: ::c_int = 8; +pub const DLT_NULL: c_int = 0x18; +pub const DLT_EN10MB: c_int = 0x6; +pub const DLT_EN3MB: c_int = 0x1a; +pub const DLT_AX25: c_int = 0x5; +pub const DLT_PRONET: c_int = 0xd; +pub const DLT_IEEE802: c_int = 0x7; +pub const DLT_ARCNET: c_int = 0x23; +pub const DLT_SLIP: c_int = 0x1c; +pub const DLT_PPP: c_int = 0x17; +pub const DLT_FDDI: c_int = 0xf; +pub const DLT_ATM: c_int = 0x25; +pub const DLT_IPOIB: c_int = 0xc7; +pub const BIOCSETF: c_ulong = 0x80104267; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; +pub const BIOCGBLEN: c_int = 0x40044266; +pub const BIOCSBLEN: c_int = 0xc0044266; +pub const BIOCFLUSH: c_int = 0x20004268; +pub const BIOCPROMISC: c_int = 0x20004269; +pub const BIOCGDLT: c_int = 0x4004426a; +pub const BIOCSRTIMEOUT: c_int = 0x8010426d; +pub const BIOCGSTATS: c_int = 0x4008426f; +pub const BIOCIMMEDIATE: c_int = 0x80044270; +pub const BIOCVERSION: c_int = 0x40044271; +pub const BIOCSDEVNO: c_int = 0x20004272; +pub const BIOCGETIF: c_ulong = 0x4020426b; +pub const BIOCSETIF: c_ulong = 0xffffffff8020426c; +pub const BPF_ABS: c_int = 32; +pub const BPF_ADD: c_int = 0; +pub const BPF_ALIGNMENT: c_ulong = 4; +pub const BPF_ALU: c_int = 4; +pub const BPF_AND: c_int = 80; +pub const BPF_B: c_int = 16; +pub const BPF_DIV: c_int = 48; +pub const BPF_H: c_int = 8; +pub const BPF_IMM: c_int = 0; +pub const BPF_IND: c_int = 64; +pub const BPF_JA: c_int = 0; +pub const BPF_JEQ: c_int = 16; +pub const BPF_JGE: c_int = 48; +pub const BPF_JGT: c_int = 32; +pub const BPF_JMP: c_int = 5; +pub const BPF_JSET: c_int = 64; +pub const BPF_K: c_int = 0; +pub const BPF_LD: c_int = 0; +pub const BPF_LDX: c_int = 1; +pub const BPF_LEN: c_int = 128; +pub const BPF_LSH: c_int = 96; +pub const BPF_MAXINSNS: c_int = 512; +pub const BPF_MEM: c_int = 96; +pub const BPF_MEMWORDS: c_int = 16; +pub const BPF_MISC: c_int = 7; +pub const BPF_MSH: c_int = 160; +pub const BPF_MUL: c_int = 32; +pub const BPF_NEG: c_int = 128; +pub const BPF_OR: c_int = 64; +pub const BPF_RET: c_int = 6; +pub const BPF_RSH: c_int = 112; +pub const BPF_ST: c_int = 2; +pub const BPF_STX: c_int = 3; +pub const BPF_SUB: c_int = 16; +pub const BPF_W: c_int = 0; +pub const BPF_X: c_int = 8; // net/if.h -pub const IFNET_SLOWHZ: ::c_int = 1; -pub const IFQ_MAXLEN: ::c_int = 50; -pub const IFF_UP: ::c_int = 0x1; -pub const IFF_BROADCAST: ::c_int = 0x2; -pub const IFF_DEBUG: ::c_int = 0x4; -pub const IFF_LOOPBACK: ::c_int = 0x8; -pub const IFF_POINTOPOINT: ::c_int = 0x10; -pub const IFF_NOTRAILERS: ::c_int = 0x20; -pub const IFF_RUNNING: ::c_int = 0x40; -pub const IFF_NOARP: ::c_int = 0x80; -pub const IFF_PROMISC: ::c_int = 0x100; -pub const IFF_ALLMULTI: ::c_int = 0x200; -pub const IFF_MULTICAST: ::c_int = 0x80000; -pub const IFF_LINK0: ::c_int = 0x100000; -pub const IFF_LINK1: ::c_int = 0x200000; -pub const IFF_LINK2: ::c_int = 0x400000; -pub const IFF_OACTIVE: ::c_int = 0x400; -pub const IFF_SIMPLEX: ::c_int = 0x800; +pub const IFNET_SLOWHZ: c_int = 1; +pub const IFQ_MAXLEN: c_int = 50; +pub const IFF_UP: c_int = 0x1; +pub const IFF_BROADCAST: c_int = 0x2; +pub const IFF_DEBUG: c_int = 0x4; +pub const IFF_LOOPBACK: c_int = 0x8; +pub const IFF_POINTOPOINT: c_int = 0x10; +pub const IFF_NOTRAILERS: c_int = 0x20; +pub const IFF_RUNNING: c_int = 0x40; +pub const IFF_NOARP: c_int = 0x80; +pub const IFF_PROMISC: c_int = 0x100; +pub const IFF_ALLMULTI: c_int = 0x200; +pub const IFF_MULTICAST: c_int = 0x80000; +pub const IFF_LINK0: c_int = 0x100000; +pub const IFF_LINK1: c_int = 0x200000; +pub const IFF_LINK2: c_int = 0x400000; +pub const IFF_OACTIVE: c_int = 0x400; +pub const IFF_SIMPLEX: c_int = 0x800; // net/if_arp.h -pub const ARPHRD_ETHER: ::c_int = 1; -pub const ARPHRD_802_5: ::c_int = 6; -pub const ARPHRD_802_3: ::c_int = 6; -pub const ARPHRD_FDDI: ::c_int = 1; +pub const ARPHRD_ETHER: c_int = 1; +pub const ARPHRD_802_5: c_int = 6; +pub const ARPHRD_802_3: c_int = 6; +pub const ARPHRD_FDDI: c_int = 1; // net/route.h -pub const RTM_ADD: ::c_int = 0x1; -pub const RTM_DELETE: ::c_int = 0x2; -pub const RTM_CHANGE: ::c_int = 0x3; -pub const RTM_GET: ::c_int = 0x4; -pub const RTM_LOSING: ::c_int = 0x5; -pub const RTM_REDIRECT: ::c_int = 0x6; -pub const RTM_MISS: ::c_int = 0x7; -pub const RTM_LOCK: ::c_int = 0x8; -pub const RTM_OLDADD: ::c_int = 0x9; -pub const RTM_OLDDEL: ::c_int = 0xa; -pub const RTM_RESOLVE: ::c_int = 0xb; -pub const RTM_NEWADDR: ::c_int = 0xc; -pub const RTM_DELADDR: ::c_int = 0xd; -pub const RTM_IFINFO: ::c_int = 0xe; -pub const RTM_EXPIRE: ::c_int = 0xf; -pub const RTM_RTLOST: ::c_int = 0x10; -pub const RTM_GETNEXT: ::c_int = 0x11; -pub const RTM_SAMEADDR: ::c_int = 0x12; -pub const RTM_SET: ::c_int = 0x13; -pub const RTV_MTU: ::c_int = 0x1; -pub const RTV_HOPCOUNT: ::c_int = 0x2; -pub const RTV_EXPIRE: ::c_int = 0x4; -pub const RTV_RPIPE: ::c_int = 0x8; -pub const RTV_SPIPE: ::c_int = 0x10; -pub const RTV_SSTHRESH: ::c_int = 0x20; -pub const RTV_RTT: ::c_int = 0x40; -pub const RTV_RTTVAR: ::c_int = 0x80; -pub const RTA_DST: ::c_int = 0x1; -pub const RTA_GATEWAY: ::c_int = 0x2; -pub const RTA_NETMASK: ::c_int = 0x4; -pub const RTA_GENMASK: ::c_int = 0x8; -pub const RTA_IFP: ::c_int = 0x10; -pub const RTA_IFA: ::c_int = 0x20; -pub const RTA_AUTHOR: ::c_int = 0x40; -pub const RTA_BRD: ::c_int = 0x80; -pub const RTA_DOWNSTREAM: ::c_int = 0x100; -pub const RTAX_DST: ::c_int = 0; -pub const RTAX_GATEWAY: ::c_int = 1; -pub const RTAX_NETMASK: ::c_int = 2; -pub const RTAX_GENMASK: ::c_int = 3; -pub const RTAX_IFP: ::c_int = 4; -pub const RTAX_IFA: ::c_int = 5; -pub const RTAX_AUTHOR: ::c_int = 6; -pub const RTAX_BRD: ::c_int = 7; -pub const RTAX_MAX: ::c_int = 8; -pub const RTF_UP: ::c_int = 0x1; -pub const RTF_GATEWAY: ::c_int = 0x2; -pub const RTF_HOST: ::c_int = 0x4; -pub const RTF_REJECT: ::c_int = 0x8; -pub const RTF_DYNAMIC: ::c_int = 0x10; -pub const RTF_MODIFIED: ::c_int = 0x20; -pub const RTF_DONE: ::c_int = 0x40; -pub const RTF_MASK: ::c_int = 0x80; -pub const RTF_CLONING: ::c_int = 0x100; -pub const RTF_XRESOLVE: ::c_int = 0x200; -pub const RTF_LLINFO: ::c_int = 0x400; -pub const RTF_STATIC: ::c_int = 0x800; -pub const RTF_BLACKHOLE: ::c_int = 0x1000; -pub const RTF_BUL: ::c_int = 0x2000; -pub const RTF_PROTO2: ::c_int = 0x4000; -pub const RTF_PROTO1: ::c_int = 0x8000; -pub const RTF_CLONE: ::c_int = 0x10000; -pub const RTF_CLONED: ::c_int = 0x20000; -pub const RTF_PROTO3: ::c_int = 0x40000; -pub const RTF_BCE: ::c_int = 0x80000; -pub const RTF_PINNED: ::c_int = 0x100000; -pub const RTF_LOCAL: ::c_int = 0x200000; -pub const RTF_BROADCAST: ::c_int = 0x400000; -pub const RTF_MULTICAST: ::c_int = 0x800000; -pub const RTF_ACTIVE_DGD: ::c_int = 0x1000000; -pub const RTF_STOPSRCH: ::c_int = 0x2000000; -pub const RTF_FREE_IN_PROG: ::c_int = 0x4000000; -pub const RTF_PERMANENT6: ::c_int = 0x8000000; -pub const RTF_UNREACHABLE: ::c_int = 0x10000000; -pub const RTF_CACHED: ::c_int = 0x20000000; -pub const RTF_SMALLMTU: ::c_int = 0x40000; +pub const RTM_ADD: c_int = 0x1; +pub const RTM_DELETE: c_int = 0x2; +pub const RTM_CHANGE: c_int = 0x3; +pub const RTM_GET: c_int = 0x4; +pub const RTM_LOSING: c_int = 0x5; +pub const RTM_REDIRECT: c_int = 0x6; +pub const RTM_MISS: c_int = 0x7; +pub const RTM_LOCK: c_int = 0x8; +pub const RTM_OLDADD: c_int = 0x9; +pub const RTM_OLDDEL: c_int = 0xa; +pub const RTM_RESOLVE: c_int = 0xb; +pub const RTM_NEWADDR: c_int = 0xc; +pub const RTM_DELADDR: c_int = 0xd; +pub const RTM_IFINFO: c_int = 0xe; +pub const RTM_EXPIRE: c_int = 0xf; +pub const RTM_RTLOST: c_int = 0x10; +pub const RTM_GETNEXT: c_int = 0x11; +pub const RTM_SAMEADDR: c_int = 0x12; +pub const RTM_SET: c_int = 0x13; +pub const RTV_MTU: c_int = 0x1; +pub const RTV_HOPCOUNT: c_int = 0x2; +pub const RTV_EXPIRE: c_int = 0x4; +pub const RTV_RPIPE: c_int = 0x8; +pub const RTV_SPIPE: c_int = 0x10; +pub const RTV_SSTHRESH: c_int = 0x20; +pub const RTV_RTT: c_int = 0x40; +pub const RTV_RTTVAR: c_int = 0x80; +pub const RTA_DST: c_int = 0x1; +pub const RTA_GATEWAY: c_int = 0x2; +pub const RTA_NETMASK: c_int = 0x4; +pub const RTA_GENMASK: c_int = 0x8; +pub const RTA_IFP: c_int = 0x10; +pub const RTA_IFA: c_int = 0x20; +pub const RTA_AUTHOR: c_int = 0x40; +pub const RTA_BRD: c_int = 0x80; +pub const RTA_DOWNSTREAM: c_int = 0x100; +pub const RTAX_DST: c_int = 0; +pub const RTAX_GATEWAY: c_int = 1; +pub const RTAX_NETMASK: c_int = 2; +pub const RTAX_GENMASK: c_int = 3; +pub const RTAX_IFP: c_int = 4; +pub const RTAX_IFA: c_int = 5; +pub const RTAX_AUTHOR: c_int = 6; +pub const RTAX_BRD: c_int = 7; +pub const RTAX_MAX: c_int = 8; +pub const RTF_UP: c_int = 0x1; +pub const RTF_GATEWAY: c_int = 0x2; +pub const RTF_HOST: c_int = 0x4; +pub const RTF_REJECT: c_int = 0x8; +pub const RTF_DYNAMIC: c_int = 0x10; +pub const RTF_MODIFIED: c_int = 0x20; +pub const RTF_DONE: c_int = 0x40; +pub const RTF_MASK: c_int = 0x80; +pub const RTF_CLONING: c_int = 0x100; +pub const RTF_XRESOLVE: c_int = 0x200; +pub const RTF_LLINFO: c_int = 0x400; +pub const RTF_STATIC: c_int = 0x800; +pub const RTF_BLACKHOLE: c_int = 0x1000; +pub const RTF_BUL: c_int = 0x2000; +pub const RTF_PROTO2: c_int = 0x4000; +pub const RTF_PROTO1: c_int = 0x8000; +pub const RTF_CLONE: c_int = 0x10000; +pub const RTF_CLONED: c_int = 0x20000; +pub const RTF_PROTO3: c_int = 0x40000; +pub const RTF_BCE: c_int = 0x80000; +pub const RTF_PINNED: c_int = 0x100000; +pub const RTF_LOCAL: c_int = 0x200000; +pub const RTF_BROADCAST: c_int = 0x400000; +pub const RTF_MULTICAST: c_int = 0x800000; +pub const RTF_ACTIVE_DGD: c_int = 0x1000000; +pub const RTF_STOPSRCH: c_int = 0x2000000; +pub const RTF_FREE_IN_PROG: c_int = 0x4000000; +pub const RTF_PERMANENT6: c_int = 0x8000000; +pub const RTF_UNREACHABLE: c_int = 0x10000000; +pub const RTF_CACHED: c_int = 0x20000000; +pub const RTF_SMALLMTU: c_int = 0x40000; // netinet/in.h -pub const IPPROTO_HOPOPTS: ::c_int = 0; -pub const IPPROTO_IGMP: ::c_int = 2; -pub const IPPROTO_GGP: ::c_int = 3; -pub const IPPROTO_IPIP: ::c_int = 4; -pub const IPPROTO_EGP: ::c_int = 8; -pub const IPPROTO_PUP: ::c_int = 12; -pub const IPPROTO_IDP: ::c_int = 22; -pub const IPPROTO_TP: ::c_int = 29; -pub const IPPROTO_ROUTING: ::c_int = 43; -pub const IPPROTO_FRAGMENT: ::c_int = 44; -pub const IPPROTO_QOS: ::c_int = 45; -pub const IPPROTO_RSVP: ::c_int = 46; -pub const IPPROTO_GRE: ::c_int = 47; -pub const IPPROTO_ESP: ::c_int = 50; -pub const IPPROTO_AH: ::c_int = 51; -pub const IPPROTO_NONE: ::c_int = 59; -pub const IPPROTO_DSTOPTS: ::c_int = 60; -pub const IPPROTO_LOCAL: ::c_int = 63; -pub const IPPROTO_EON: ::c_int = 80; -pub const IPPROTO_BIP: ::c_int = 0x53; -pub const IPPROTO_SCTP: ::c_int = 132; -pub const IPPROTO_MH: ::c_int = 135; -pub const IPPROTO_GIF: ::c_int = 140; -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_MAX: ::c_int = 256; -pub const IP_OPTIONS: ::c_int = 1; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_TOS: ::c_int = 3; -pub const IP_TTL: ::c_int = 4; -pub const IP_UNICAST_HOPS: ::c_int = 4; -pub const IP_RECVOPTS: ::c_int = 5; -pub const IP_RECVRETOPTS: ::c_int = 6; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_RETOPTS: ::c_int = 8; -pub const IP_MULTICAST_IF: ::c_int = 9; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_HOPS: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IP_RECVMACHDR: ::c_int = 14; -pub const IP_RECVIFINFO: ::c_int = 15; -pub const IP_BROADCAST_IF: ::c_int = 16; -pub const IP_DHCPMODE: ::c_int = 17; -pub const IP_RECVIF: ::c_int = 20; -pub const IP_ADDRFORM: ::c_int = 22; -pub const IP_DONTFRAG: ::c_int = 25; -pub const IP_FINDPMTU: ::c_int = 26; -pub const IP_PMTUAGE: ::c_int = 27; -pub const IP_RECVINTERFACE: ::c_int = 32; -pub const IP_RECVTTL: ::c_int = 34; -pub const IP_BLOCK_SOURCE: ::c_int = 58; -pub const IP_UNBLOCK_SOURCE: ::c_int = 59; -pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 60; -pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 61; -pub const IP_DEFAULT_MULTICAST_TTL: ::c_int = 1; -pub const IP_DEFAULT_MULTICAST_LOOP: ::c_int = 1; -pub const IP_INC_MEMBERSHIPS: ::c_int = 20; -pub const IP_INIT_MEMBERSHIP: ::c_int = 20; -pub const IPV6_UNICAST_HOPS: ::c_int = IP_TTL; -pub const IPV6_MULTICAST_IF: ::c_int = IP_MULTICAST_IF; -pub const IPV6_MULTICAST_HOPS: ::c_int = IP_MULTICAST_TTL; -pub const IPV6_MULTICAST_LOOP: ::c_int = IP_MULTICAST_LOOP; -pub const IPV6_RECVPKTINFO: ::c_int = 35; -pub const IPV6_V6ONLY: ::c_int = 37; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = IP_ADD_MEMBERSHIP; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = IP_DROP_MEMBERSHIP; -pub const IPV6_JOIN_GROUP: ::c_int = IP_ADD_MEMBERSHIP; -pub const IPV6_LEAVE_GROUP: ::c_int = IP_DROP_MEMBERSHIP; -pub const MCAST_BLOCK_SOURCE: ::c_int = 64; -pub const MCAST_EXCLUDE: ::c_int = 2; -pub const MCAST_INCLUDE: ::c_int = 1; -pub const MCAST_JOIN_GROUP: ::c_int = 62; -pub const MCAST_JOIN_SOURCE_GROUP: ::c_int = 66; -pub const MCAST_LEAVE_GROUP: ::c_int = 63; -pub const MCAST_LEAVE_SOURCE_GROUP: ::c_int = 67; -pub const MCAST_UNBLOCK_SOURCE: ::c_int = 65; +pub const IPPROTO_HOPOPTS: c_int = 0; +pub const IPPROTO_IGMP: c_int = 2; +pub const IPPROTO_GGP: c_int = 3; +pub const IPPROTO_IPIP: c_int = 4; +pub const IPPROTO_EGP: c_int = 8; +pub const IPPROTO_PUP: c_int = 12; +pub const IPPROTO_IDP: c_int = 22; +pub const IPPROTO_TP: c_int = 29; +pub const IPPROTO_ROUTING: c_int = 43; +pub const IPPROTO_FRAGMENT: c_int = 44; +pub const IPPROTO_QOS: c_int = 45; +pub const IPPROTO_RSVP: c_int = 46; +pub const IPPROTO_GRE: c_int = 47; +pub const IPPROTO_ESP: c_int = 50; +pub const IPPROTO_AH: c_int = 51; +pub const IPPROTO_NONE: c_int = 59; +pub const IPPROTO_DSTOPTS: c_int = 60; +pub const IPPROTO_LOCAL: c_int = 63; +pub const IPPROTO_EON: c_int = 80; +pub const IPPROTO_BIP: c_int = 0x53; +pub const IPPROTO_SCTP: c_int = 132; +pub const IPPROTO_MH: c_int = 135; +pub const IPPROTO_GIF: c_int = 140; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_MAX: c_int = 256; +pub const IP_OPTIONS: c_int = 1; +pub const IP_HDRINCL: c_int = 2; +pub const IP_TOS: c_int = 3; +pub const IP_TTL: c_int = 4; +pub const IP_UNICAST_HOPS: c_int = 4; +pub const IP_RECVOPTS: c_int = 5; +pub const IP_RECVRETOPTS: c_int = 6; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_RETOPTS: c_int = 8; +pub const IP_MULTICAST_IF: c_int = 9; +pub const IP_MULTICAST_TTL: c_int = 10; +pub const IP_MULTICAST_HOPS: c_int = 10; +pub const IP_MULTICAST_LOOP: c_int = 11; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IP_RECVMACHDR: c_int = 14; +pub const IP_RECVIFINFO: c_int = 15; +pub const IP_BROADCAST_IF: c_int = 16; +pub const IP_DHCPMODE: c_int = 17; +pub const IP_RECVIF: c_int = 20; +pub const IP_ADDRFORM: c_int = 22; +pub const IP_DONTFRAG: c_int = 25; +pub const IP_FINDPMTU: c_int = 26; +pub const IP_PMTUAGE: c_int = 27; +pub const IP_RECVINTERFACE: c_int = 32; +pub const IP_RECVTTL: c_int = 34; +pub const IP_BLOCK_SOURCE: c_int = 58; +pub const IP_UNBLOCK_SOURCE: c_int = 59; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 60; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 61; +pub const IP_DEFAULT_MULTICAST_TTL: c_int = 1; +pub const IP_DEFAULT_MULTICAST_LOOP: c_int = 1; +pub const IP_INC_MEMBERSHIPS: c_int = 20; +pub const IP_INIT_MEMBERSHIP: c_int = 20; +pub const IPV6_UNICAST_HOPS: c_int = IP_TTL; +pub const IPV6_MULTICAST_IF: c_int = IP_MULTICAST_IF; +pub const IPV6_MULTICAST_HOPS: c_int = IP_MULTICAST_TTL; +pub const IPV6_MULTICAST_LOOP: c_int = IP_MULTICAST_LOOP; +pub const IPV6_RECVPKTINFO: c_int = 35; +pub const IPV6_V6ONLY: c_int = 37; +pub const IPV6_ADD_MEMBERSHIP: c_int = IP_ADD_MEMBERSHIP; +pub const IPV6_DROP_MEMBERSHIP: c_int = IP_DROP_MEMBERSHIP; +pub const IPV6_JOIN_GROUP: c_int = IP_ADD_MEMBERSHIP; +pub const IPV6_LEAVE_GROUP: c_int = IP_DROP_MEMBERSHIP; +pub const MCAST_BLOCK_SOURCE: c_int = 64; +pub const MCAST_EXCLUDE: c_int = 2; +pub const MCAST_INCLUDE: c_int = 1; +pub const MCAST_JOIN_GROUP: c_int = 62; +pub const MCAST_JOIN_SOURCE_GROUP: c_int = 66; +pub const MCAST_LEAVE_GROUP: c_int = 63; +pub const MCAST_LEAVE_SOURCE_GROUP: c_int = 67; +pub const MCAST_UNBLOCK_SOURCE: c_int = 65; // netinet/ip.h -pub const MAXTTL: ::c_int = 255; -pub const IPDEFTTL: ::c_int = 64; -pub const IPOPT_CONTROL: ::c_int = 0; -pub const IPOPT_EOL: ::c_int = 0; -pub const IPOPT_LSRR: ::c_int = 131; -pub const IPOPT_MINOFF: ::c_int = 4; -pub const IPOPT_NOP: ::c_int = 1; -pub const IPOPT_OFFSET: ::c_int = 2; -pub const IPOPT_OLEN: ::c_int = 1; -pub const IPOPT_OPTVAL: ::c_int = 0; -pub const IPOPT_RESERVED1: ::c_int = 0x20; -pub const IPOPT_RESERVED2: ::c_int = 0x60; -pub const IPOPT_RR: ::c_int = 7; -pub const IPOPT_SSRR: ::c_int = 137; -pub const IPOPT_TS: ::c_int = 68; -pub const IPOPT_TS_PRESPEC: ::c_int = 3; -pub const IPOPT_TS_TSANDADDR: ::c_int = 1; -pub const IPOPT_TS_TSONLY: ::c_int = 0; -pub const IPTOS_LOWDELAY: ::c_int = 16; -pub const IPTOS_PREC_CRITIC_ECP: ::c_int = 160; -pub const IPTOS_PREC_FLASH: ::c_int = 96; -pub const IPTOS_PREC_FLASHOVERRIDE: ::c_int = 128; -pub const IPTOS_PREC_IMMEDIATE: ::c_int = 64; -pub const IPTOS_PREC_INTERNETCONTROL: ::c_int = 192; -pub const IPTOS_PREC_NETCONTROL: ::c_int = 224; -pub const IPTOS_PREC_PRIORITY: ::c_int = 32; -pub const IPTOS_PREC_ROUTINE: ::c_int = 16; -pub const IPTOS_RELIABILITY: ::c_int = 4; -pub const IPTOS_THROUGHPUT: ::c_int = 8; -pub const IPVERSION: ::c_int = 4; +pub const MAXTTL: c_int = 255; +pub const IPDEFTTL: c_int = 64; +pub const IPOPT_CONTROL: c_int = 0; +pub const IPOPT_EOL: c_int = 0; +pub const IPOPT_LSRR: c_int = 131; +pub const IPOPT_MINOFF: c_int = 4; +pub const IPOPT_NOP: c_int = 1; +pub const IPOPT_OFFSET: c_int = 2; +pub const IPOPT_OLEN: c_int = 1; +pub const IPOPT_OPTVAL: c_int = 0; +pub const IPOPT_RESERVED1: c_int = 0x20; +pub const IPOPT_RESERVED2: c_int = 0x60; +pub const IPOPT_RR: c_int = 7; +pub const IPOPT_SSRR: c_int = 137; +pub const IPOPT_TS: c_int = 68; +pub const IPOPT_TS_PRESPEC: c_int = 3; +pub const IPOPT_TS_TSANDADDR: c_int = 1; +pub const IPOPT_TS_TSONLY: c_int = 0; +pub const IPTOS_LOWDELAY: c_int = 16; +pub const IPTOS_PREC_CRITIC_ECP: c_int = 160; +pub const IPTOS_PREC_FLASH: c_int = 96; +pub const IPTOS_PREC_FLASHOVERRIDE: c_int = 128; +pub const IPTOS_PREC_IMMEDIATE: c_int = 64; +pub const IPTOS_PREC_INTERNETCONTROL: c_int = 192; +pub const IPTOS_PREC_NETCONTROL: c_int = 224; +pub const IPTOS_PREC_PRIORITY: c_int = 32; +pub const IPTOS_PREC_ROUTINE: c_int = 16; +pub const IPTOS_RELIABILITY: c_int = 4; +pub const IPTOS_THROUGHPUT: c_int = 8; +pub const IPVERSION: c_int = 4; // netinet/tcp.h -pub const TCP_NODELAY: ::c_int = 0x1; -pub const TCP_MAXSEG: ::c_int = 0x2; -pub const TCP_RFC1323: ::c_int = 0x4; -pub const TCP_KEEPALIVE: ::c_int = 0x8; -pub const TCP_KEEPIDLE: ::c_int = 0x11; -pub const TCP_KEEPINTVL: ::c_int = 0x12; -pub const TCP_KEEPCNT: ::c_int = 0x13; -pub const TCP_NODELAYACK: ::c_int = 0x14; +pub const TCP_NODELAY: c_int = 0x1; +pub const TCP_MAXSEG: c_int = 0x2; +pub const TCP_RFC1323: c_int = 0x4; +pub const TCP_KEEPALIVE: c_int = 0x8; +pub const TCP_KEEPIDLE: c_int = 0x11; +pub const TCP_KEEPINTVL: c_int = 0x12; +pub const TCP_KEEPCNT: c_int = 0x13; +pub const TCP_NODELAYACK: c_int = 0x14; // pthread.h -pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 0; -pub const PTHREAD_PROCESS_PRIVATE: ::c_ushort = 1; -pub const PTHREAD_STACK_MIN: ::size_t = PAGESIZE as ::size_t * 4; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 5; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 3; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; -pub const PTHREAD_MUTEX_ROBUST: ::c_int = 1; -pub const PTHREAD_MUTEX_STALLED: ::c_int = 0; -pub const PTHREAD_PRIO_INHERIT: ::c_int = 3; -pub const PTHREAD_PRIO_NONE: ::c_int = 1; -pub const PTHREAD_PRIO_PROTECT: ::c_int = 2; +pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1; +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 1; +pub const PTHREAD_PROCESS_SHARED: c_int = 0; +pub const PTHREAD_PROCESS_PRIVATE: c_ushort = 1; +pub const PTHREAD_STACK_MIN: size_t = PAGESIZE as size_t * 4; +pub const PTHREAD_MUTEX_NORMAL: c_int = 5; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 3; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 4; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; +pub const PTHREAD_MUTEX_ROBUST: c_int = 1; +pub const PTHREAD_MUTEX_STALLED: c_int = 0; +pub const PTHREAD_PRIO_INHERIT: c_int = 3; +pub const PTHREAD_PRIO_NONE: c_int = 1; +pub const PTHREAD_PRIO_PROTECT: c_int = 2; // regex.h -pub const REG_EXTENDED: ::c_int = 1; -pub const REG_ICASE: ::c_int = 2; -pub const REG_NEWLINE: ::c_int = 4; -pub const REG_NOSUB: ::c_int = 8; -pub const REG_NOTBOL: ::c_int = 0x100; -pub const REG_NOTEOL: ::c_int = 0x200; -pub const REG_NOMATCH: ::c_int = 1; -pub const REG_BADPAT: ::c_int = 2; -pub const REG_ECOLLATE: ::c_int = 3; -pub const REG_ECTYPE: ::c_int = 4; -pub const REG_EESCAPE: ::c_int = 5; -pub const REG_ESUBREG: ::c_int = 6; -pub const REG_EBRACK: ::c_int = 7; -pub const REG_EPAREN: ::c_int = 8; -pub const REG_EBRACE: ::c_int = 9; -pub const REG_BADBR: ::c_int = 10; -pub const REG_ERANGE: ::c_int = 11; -pub const REG_ESPACE: ::c_int = 12; -pub const REG_BADRPT: ::c_int = 13; -pub const REG_ECHAR: ::c_int = 14; -pub const REG_EBOL: ::c_int = 15; -pub const REG_EEOL: ::c_int = 16; -pub const REG_ENOSYS: ::c_int = 17; +pub const REG_EXTENDED: c_int = 1; +pub const REG_ICASE: c_int = 2; +pub const REG_NEWLINE: c_int = 4; +pub const REG_NOSUB: c_int = 8; +pub const REG_NOTBOL: c_int = 0x100; +pub const REG_NOTEOL: c_int = 0x200; +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_ECHAR: c_int = 14; +pub const REG_EBOL: c_int = 15; +pub const REG_EEOL: c_int = 16; +pub const REG_ENOSYS: c_int = 17; // rpcsvc/mount.h -pub const NFSMNT_ACDIRMAX: ::c_int = 2048; -pub const NFSMNT_ACDIRMIN: ::c_int = 1024; -pub const NFSMNT_ACREGMAX: ::c_int = 512; -pub const NFSMNT_ACREGMIN: ::c_int = 256; -pub const NFSMNT_INT: ::c_int = 64; -pub const NFSMNT_NOAC: ::c_int = 128; -pub const NFSMNT_RETRANS: ::c_int = 16; -pub const NFSMNT_RSIZE: ::c_int = 4; -pub const NFSMNT_SOFT: ::c_int = 1; -pub const NFSMNT_TIMEO: ::c_int = 8; -pub const NFSMNT_WSIZE: ::c_int = 2; +pub const NFSMNT_ACDIRMAX: c_int = 2048; +pub const NFSMNT_ACDIRMIN: c_int = 1024; +pub const NFSMNT_ACREGMAX: c_int = 512; +pub const NFSMNT_ACREGMIN: c_int = 256; +pub const NFSMNT_INT: c_int = 64; +pub const NFSMNT_NOAC: c_int = 128; +pub const NFSMNT_RETRANS: c_int = 16; +pub const NFSMNT_RSIZE: c_int = 4; +pub const NFSMNT_SOFT: c_int = 1; +pub const NFSMNT_TIMEO: c_int = 8; +pub const NFSMNT_WSIZE: c_int = 2; // rpcsvc/rstat.h -pub const CPUSTATES: ::c_int = 4; +pub const CPUSTATES: c_int = 4; // search.h -pub const FIND: ::c_int = 0; -pub const ENTER: ::c_int = 1; +pub const FIND: c_int = 0; +pub const ENTER: c_int = 1; // semaphore.h -pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t; +pub const SEM_FAILED: *mut sem_t = -1isize as *mut crate::sem_t; // spawn.h -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x1; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x2; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x4; -pub const POSIX_SPAWN_SETSCHEDULER: ::c_short = 0x8; -pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_short = 0x10; -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x20; -pub const POSIX_SPAWN_FORK_HANDLERS: ::c_short = 0x1000; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x1; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x2; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x4; +pub const POSIX_SPAWN_SETSCHEDULER: c_short = 0x8; +pub const POSIX_SPAWN_SETSCHEDPARAM: c_short = 0x10; +pub const POSIX_SPAWN_RESETIDS: c_short = 0x20; +pub const POSIX_SPAWN_FORK_HANDLERS: c_short = 0x1000; // stdio.h -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0o000; -pub const _IONBF: ::c_int = 0o004; -pub const _IOLBF: ::c_int = 0o100; -pub const BUFSIZ: ::c_uint = 4096; -pub const FOPEN_MAX: ::c_uint = 32767; -pub const FILENAME_MAX: ::c_uint = 255; -pub const L_tmpnam: ::c_uint = 21; -pub const TMP_MAX: ::c_uint = 16384; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const _IOFBF: c_int = 0o000; +pub const _IONBF: c_int = 0o004; +pub const _IOLBF: c_int = 0o100; +pub const BUFSIZ: c_uint = 4096; +pub const FOPEN_MAX: c_uint = 32767; +pub const FILENAME_MAX: c_uint = 255; +pub const L_tmpnam: c_uint = 21; +pub const TMP_MAX: c_uint = 16384; // stdlib.h -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 32767; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 32767; // sys/access.h -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; // sys/aio.h -pub const LIO_NOP: ::c_int = 0; -pub const LIO_READ: ::c_int = 1; -pub const LIO_WRITE: ::c_int = 2; -pub const LIO_NOWAIT: ::c_int = 0; -pub const LIO_WAIT: ::c_int = 1; -pub const AIO_ALLDONE: ::c_int = 2; -pub const AIO_CANCELED: ::c_int = 0; -pub const AIO_NOTCANCELED: ::c_int = 1; +pub const LIO_NOP: c_int = 0; +pub const LIO_READ: c_int = 1; +pub const LIO_WRITE: c_int = 2; +pub const LIO_NOWAIT: c_int = 0; +pub const LIO_WAIT: c_int = 1; +pub const AIO_ALLDONE: c_int = 2; +pub const AIO_CANCELED: c_int = 0; +pub const AIO_NOTCANCELED: c_int = 1; // sys/errno.h -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EDEADLK: ::c_int = 45; -pub const ENOLCK: ::c_int = 49; -pub const ECANCELED: ::c_int = 117; -pub const ENOTSUP: ::c_int = 124; -pub const EPROCLIM: ::c_int = 83; -pub const EDQUOT: ::c_int = 88; -pub const EOWNERDEAD: ::c_int = 95; -pub const ENOTRECOVERABLE: ::c_int = 94; -pub const ENOSTR: ::c_int = 123; -pub const ENODATA: ::c_int = 122; -pub const ETIME: ::c_int = 119; -pub const ENOSR: ::c_int = 118; -pub const EREMOTE: ::c_int = 93; -pub const ENOATTR: ::c_int = 112; -pub const ESAD: ::c_int = 113; -pub const ENOTRUST: ::c_int = 114; -pub const ENOLINK: ::c_int = 126; -pub const EPROTO: ::c_int = 121; -pub const EMULTIHOP: ::c_int = 125; -pub const EBADMSG: ::c_int = 120; -pub const ENAMETOOLONG: ::c_int = 86; -pub const EOVERFLOW: ::c_int = 127; -pub const EILSEQ: ::c_int = 116; -pub const ENOSYS: ::c_int = 109; -pub const ELOOP: ::c_int = 85; -pub const ERESTART: ::c_int = 82; -pub const ENOTEMPTY: ::c_int = 87; -pub const EUSERS: ::c_int = 84; -pub const ENOTSOCK: ::c_int = 57; -pub const EDESTADDRREQ: ::c_int = 58; -pub const EMSGSIZE: ::c_int = 59; -pub const EPROTOTYPE: ::c_int = 60; -pub const ENOPROTOOPT: ::c_int = 61; -pub const EPROTONOSUPPORT: ::c_int = 62; -pub const ESOCKTNOSUPPORT: ::c_int = 63; -pub const EOPNOTSUPP: ::c_int = 64; -pub const EPFNOSUPPORT: ::c_int = 65; -pub const EAFNOSUPPORT: ::c_int = 66; -pub const EADDRINUSE: ::c_int = 67; -pub const EADDRNOTAVAIL: ::c_int = 68; -pub const ENETDOWN: ::c_int = 69; -pub const ENETUNREACH: ::c_int = 70; -pub const ENETRESET: ::c_int = 71; -pub const ECONNABORTED: ::c_int = 72; -pub const ECONNRESET: ::c_int = 73; -pub const ENOBUFS: ::c_int = 74; -pub const EISCONN: ::c_int = 75; -pub const ENOTCONN: ::c_int = 76; -pub const ESHUTDOWN: ::c_int = 77; -pub const ETOOMANYREFS: ::c_int = 115; -pub const ETIMEDOUT: ::c_int = 78; -pub const ECONNREFUSED: ::c_int = 79; -pub const EHOSTDOWN: ::c_int = 80; -pub const EHOSTUNREACH: ::c_int = 81; -pub const EWOULDBLOCK: ::c_int = EAGAIN; -pub const EALREADY: ::c_int = 56; -pub const EINPROGRESS: ::c_int = 55; -pub const ESTALE: ::c_int = 52; +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EDEADLK: c_int = 45; +pub const ENOLCK: c_int = 49; +pub const ECANCELED: c_int = 117; +pub const ENOTSUP: c_int = 124; +pub const EPROCLIM: c_int = 83; +pub const EDQUOT: c_int = 88; +pub const EOWNERDEAD: c_int = 95; +pub const ENOTRECOVERABLE: c_int = 94; +pub const ENOSTR: c_int = 123; +pub const ENODATA: c_int = 122; +pub const ETIME: c_int = 119; +pub const ENOSR: c_int = 118; +pub const EREMOTE: c_int = 93; +pub const ENOATTR: c_int = 112; +pub const ESAD: c_int = 113; +pub const ENOTRUST: c_int = 114; +pub const ENOLINK: c_int = 126; +pub const EPROTO: c_int = 121; +pub const EMULTIHOP: c_int = 125; +pub const EBADMSG: c_int = 120; +pub const ENAMETOOLONG: c_int = 86; +pub const EOVERFLOW: c_int = 127; +pub const EILSEQ: c_int = 116; +pub const ENOSYS: c_int = 109; +pub const ELOOP: c_int = 85; +pub const ERESTART: c_int = 82; +pub const ENOTEMPTY: c_int = 87; +pub const EUSERS: c_int = 84; +pub const ENOTSOCK: c_int = 57; +pub const EDESTADDRREQ: c_int = 58; +pub const EMSGSIZE: c_int = 59; +pub const EPROTOTYPE: c_int = 60; +pub const ENOPROTOOPT: c_int = 61; +pub const EPROTONOSUPPORT: c_int = 62; +pub const ESOCKTNOSUPPORT: c_int = 63; +pub const EOPNOTSUPP: c_int = 64; +pub const EPFNOSUPPORT: c_int = 65; +pub const EAFNOSUPPORT: c_int = 66; +pub const EADDRINUSE: c_int = 67; +pub const EADDRNOTAVAIL: c_int = 68; +pub const ENETDOWN: c_int = 69; +pub const ENETUNREACH: c_int = 70; +pub const ENETRESET: c_int = 71; +pub const ECONNABORTED: c_int = 72; +pub const ECONNRESET: c_int = 73; +pub const ENOBUFS: c_int = 74; +pub const EISCONN: c_int = 75; +pub const ENOTCONN: c_int = 76; +pub const ESHUTDOWN: c_int = 77; +pub const ETOOMANYREFS: c_int = 115; +pub const ETIMEDOUT: c_int = 78; +pub const ECONNREFUSED: c_int = 79; +pub const EHOSTDOWN: c_int = 80; +pub const EHOSTUNREACH: c_int = 81; +pub const EWOULDBLOCK: c_int = EAGAIN; +pub const EALREADY: c_int = 56; +pub const EINPROGRESS: c_int = 55; +pub const ESTALE: c_int = 52; // sys/dr.h -pub const LPAR_INFO_FORMAT1: ::c_int = 1; -pub const LPAR_INFO_FORMAT2: ::c_int = 2; -pub const WPAR_INFO_FORMAT: ::c_int = 3; -pub const PROC_MODULE_INFO: ::c_int = 4; -pub const NUM_PROC_MODULE_TYPES: ::c_int = 5; -pub const LPAR_INFO_VRME_NUM_POOLS: ::c_int = 6; -pub const LPAR_INFO_VRME_POOLS: ::c_int = 7; -pub const LPAR_INFO_VRME_LPAR: ::c_int = 8; -pub const LPAR_INFO_VRME_RESET_HWMARKS: ::c_int = 9; -pub const LPAR_INFO_VRME_ALLOW_DESIRED: ::c_int = 10; -pub const EMTP_INFO_FORMAT: ::c_int = 11; -pub const LPAR_INFO_LPM_CAPABILITY: ::c_int = 12; -pub const ENERGYSCALE_INFO: ::c_int = 13; +pub const LPAR_INFO_FORMAT1: c_int = 1; +pub const LPAR_INFO_FORMAT2: c_int = 2; +pub const WPAR_INFO_FORMAT: c_int = 3; +pub const PROC_MODULE_INFO: c_int = 4; +pub const NUM_PROC_MODULE_TYPES: c_int = 5; +pub const LPAR_INFO_VRME_NUM_POOLS: c_int = 6; +pub const LPAR_INFO_VRME_POOLS: c_int = 7; +pub const LPAR_INFO_VRME_LPAR: c_int = 8; +pub const LPAR_INFO_VRME_RESET_HWMARKS: c_int = 9; +pub const LPAR_INFO_VRME_ALLOW_DESIRED: c_int = 10; +pub const EMTP_INFO_FORMAT: c_int = 11; +pub const LPAR_INFO_LPM_CAPABILITY: c_int = 12; +pub const ENERGYSCALE_INFO: c_int = 13; // sys/file.h -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; // sys/flock.h -pub const F_RDLCK: ::c_short = 0o01; -pub const F_WRLCK: ::c_short = 0o02; -pub const F_UNLCK: ::c_short = 0o03; +pub const F_RDLCK: c_short = 0o01; +pub const F_WRLCK: c_short = 0o02; +pub const F_UNLCK: c_short = 0o03; // sys/fs/quota_common.h -pub const Q_QUOTAON: ::c_int = 0x100; -pub const Q_QUOTAOFF: ::c_int = 0x200; -pub const Q_SETUSE: ::c_int = 0x500; -pub const Q_SYNC: ::c_int = 0x600; -pub const Q_GETQUOTA: ::c_int = 0x300; -pub const Q_SETQLIM: ::c_int = 0x400; -pub const Q_SETQUOTA: ::c_int = 0x400; +pub const Q_QUOTAON: c_int = 0x100; +pub const Q_QUOTAOFF: c_int = 0x200; +pub const Q_SETUSE: c_int = 0x500; +pub const Q_SYNC: c_int = 0x600; +pub const Q_GETQUOTA: c_int = 0x300; +pub const Q_SETQLIM: c_int = 0x400; +pub const Q_SETQUOTA: c_int = 0x400; // sys/ioctl.h -pub const IOCPARM_MASK: ::c_int = 0x7f; -pub const IOC_VOID: ::c_int = 0x20000000; -pub const IOC_OUT: ::c_int = 0x40000000; -pub const IOC_IN: ::c_int = 0x40000000 << 1; -pub const IOC_INOUT: ::c_int = IOC_IN | IOC_OUT; -pub const FIOCLEX: ::c_int = 536897025; -pub const FIONCLEX: ::c_int = 536897026; -pub const FIONREAD: ::c_int = 1074030207; -pub const FIONBIO: ::c_int = -2147195266; -pub const FIOASYNC: ::c_int = -2147195267; -pub const FIOSETOWN: ::c_int = -2147195268; -pub const FIOGETOWN: ::c_int = 1074030203; -pub const TIOCGETD: ::c_int = 0x40047400; -pub const TIOCSETD: ::c_int = 0x80047401; -pub const TIOCHPCL: ::c_int = 0x20007402; -pub const TIOCMODG: ::c_int = 0x40047403; -pub const TIOCMODS: ::c_int = 0x80047404; -pub const TIOCM_LE: ::c_int = 0x1; -pub const TIOCM_DTR: ::c_int = 0x2; -pub const TIOCM_RTS: ::c_int = 0x4; -pub const TIOCM_ST: ::c_int = 0x8; -pub const TIOCM_SR: ::c_int = 0x10; -pub const TIOCM_CTS: ::c_int = 0x20; -pub const TIOCM_CAR: ::c_int = 0x40; -pub const TIOCM_CD: ::c_int = 0x40; -pub const TIOCM_RNG: ::c_int = 0x80; -pub const TIOCM_RI: ::c_int = 0x80; -pub const TIOCM_DSR: ::c_int = 0x100; -pub const TIOCGETP: ::c_int = 0x40067408; -pub const TIOCSETP: ::c_int = 0x80067409; -pub const TIOCSETN: ::c_int = 0x8006740a; -pub const TIOCEXCL: ::c_int = 0x2000740d; -pub const TIOCNXCL: ::c_int = 0x2000740e; -pub const TIOCFLUSH: ::c_int = 0x80047410; -pub const TIOCSETC: ::c_int = 0x80067411; -pub const TIOCGETC: ::c_int = 0x40067412; -pub const TANDEM: ::c_int = 0x1; -pub const CBREAK: ::c_int = 0x2; -pub const LCASE: ::c_int = 0x4; -pub const MDMBUF: ::c_int = 0x800000; -pub const XTABS: ::c_int = 0xc00; -pub const SIOCADDMULTI: ::c_int = -2145359567; -pub const SIOCADDRT: ::c_int = -2143784438; -pub const SIOCDARP: ::c_int = -2142476000; -pub const SIOCDELMULTI: ::c_int = -2145359566; -pub const SIOCDELRT: ::c_int = -2143784437; -pub const SIOCDIFADDR: ::c_int = -2144835303; -pub const SIOCGARP: ::c_int = -1068734170; -pub const SIOCGIFADDR: ::c_int = -1071093471; -pub const SIOCGIFBRDADDR: ::c_int = -1071093469; -pub const SIOCGIFCONF: ::c_int = -1072666299; -pub const SIOCGIFDSTADDR: ::c_int = -1071093470; -pub const SIOCGIFFLAGS: ::c_int = -1071093487; -pub const SIOCGIFHWADDR: ::c_int = -1068209771; -pub const SIOCGIFMETRIC: ::c_int = -1071093481; -pub const SIOCGIFMTU: ::c_int = -1071093418; -pub const SIOCGIFNETMASK: ::c_int = -1071093467; -pub const SIOCSARP: ::c_int = -2142476002; -pub const SIOCSIFADDR: ::c_int = -2144835316; -pub const SIOCSIFBRDADDR: ::c_int = -2144835309; -pub const SIOCSIFDSTADDR: ::c_int = -2144835314; -pub const SIOCSIFFLAGS: ::c_int = -2144835312; -pub const SIOCSIFMETRIC: ::c_int = -2144835304; -pub const SIOCSIFMTU: ::c_int = -2144835240; -pub const SIOCSIFNETMASK: ::c_int = -2144835306; -pub const TIOCUCNTL: ::c_int = -2147191706; -pub const TIOCCONS: ::c_int = -2147191710; -pub const TIOCPKT: ::c_int = -2147191696; -pub const TIOCPKT_DATA: ::c_int = 0; -pub const TIOCPKT_FLUSHREAD: ::c_int = 1; -pub const TIOCPKT_FLUSHWRITE: ::c_int = 2; -pub const TIOCPKT_NOSTOP: ::c_int = 0x10; -pub const TIOCPKT_DOSTOP: ::c_int = 0x20; -pub const TIOCPKT_START: ::c_int = 8; -pub const TIOCPKT_STOP: ::c_int = 4; +pub const IOCPARM_MASK: c_int = 0x7f; +pub const IOC_VOID: c_int = 0x20000000; +pub const IOC_OUT: c_int = 0x40000000; +pub const IOC_IN: c_int = 0x40000000 << 1; +pub const IOC_INOUT: c_int = IOC_IN | IOC_OUT; +pub const FIOCLEX: c_int = 536897025; +pub const FIONCLEX: c_int = 536897026; +pub const FIONREAD: c_int = 1074030207; +pub const FIONBIO: c_int = -2147195266; +pub const FIOASYNC: c_int = -2147195267; +pub const FIOSETOWN: c_int = -2147195268; +pub const FIOGETOWN: c_int = 1074030203; +pub const TIOCGETD: c_int = 0x40047400; +pub const TIOCSETD: c_int = 0x80047401; +pub const TIOCHPCL: c_int = 0x20007402; +pub const TIOCMODG: c_int = 0x40047403; +pub const TIOCMODS: c_int = 0x80047404; +pub const TIOCM_LE: c_int = 0x1; +pub const TIOCM_DTR: c_int = 0x2; +pub const TIOCM_RTS: c_int = 0x4; +pub const TIOCM_ST: c_int = 0x8; +pub const TIOCM_SR: c_int = 0x10; +pub const TIOCM_CTS: c_int = 0x20; +pub const TIOCM_CAR: c_int = 0x40; +pub const TIOCM_CD: c_int = 0x40; +pub const TIOCM_RNG: c_int = 0x80; +pub const TIOCM_RI: c_int = 0x80; +pub const TIOCM_DSR: c_int = 0x100; +pub const TIOCGETP: c_int = 0x40067408; +pub const TIOCSETP: c_int = 0x80067409; +pub const TIOCSETN: c_int = 0x8006740a; +pub const TIOCEXCL: c_int = 0x2000740d; +pub const TIOCNXCL: c_int = 0x2000740e; +pub const TIOCFLUSH: c_int = 0x80047410; +pub const TIOCSETC: c_int = 0x80067411; +pub const TIOCGETC: c_int = 0x40067412; +pub const TANDEM: c_int = 0x1; +pub const CBREAK: c_int = 0x2; +pub const LCASE: c_int = 0x4; +pub const MDMBUF: c_int = 0x800000; +pub const XTABS: c_int = 0xc00; +pub const SIOCADDMULTI: c_int = -2145359567; +pub const SIOCADDRT: c_int = -2143784438; +pub const SIOCDARP: c_int = -2142476000; +pub const SIOCDELMULTI: c_int = -2145359566; +pub const SIOCDELRT: c_int = -2143784437; +pub const SIOCDIFADDR: c_int = -2144835303; +pub const SIOCGARP: c_int = -1068734170; +pub const SIOCGIFADDR: c_int = -1071093471; +pub const SIOCGIFBRDADDR: c_int = -1071093469; +pub const SIOCGIFCONF: c_int = -1072666299; +pub const SIOCGIFDSTADDR: c_int = -1071093470; +pub const SIOCGIFFLAGS: c_int = -1071093487; +pub const SIOCGIFHWADDR: c_int = -1068209771; +pub const SIOCGIFMETRIC: c_int = -1071093481; +pub const SIOCGIFMTU: c_int = -1071093418; +pub const SIOCGIFNETMASK: c_int = -1071093467; +pub const SIOCSARP: c_int = -2142476002; +pub const SIOCSIFADDR: c_int = -2144835316; +pub const SIOCSIFBRDADDR: c_int = -2144835309; +pub const SIOCSIFDSTADDR: c_int = -2144835314; +pub const SIOCSIFFLAGS: c_int = -2144835312; +pub const SIOCSIFMETRIC: c_int = -2144835304; +pub const SIOCSIFMTU: c_int = -2144835240; +pub const SIOCSIFNETMASK: c_int = -2144835306; +pub const TIOCUCNTL: c_int = -2147191706; +pub const TIOCCONS: c_int = -2147191710; +pub const TIOCPKT: c_int = -2147191696; +pub const TIOCPKT_DATA: c_int = 0; +pub const TIOCPKT_FLUSHREAD: c_int = 1; +pub const TIOCPKT_FLUSHWRITE: c_int = 2; +pub const TIOCPKT_NOSTOP: c_int = 0x10; +pub const TIOCPKT_DOSTOP: c_int = 0x20; +pub const TIOCPKT_START: c_int = 8; +pub const TIOCPKT_STOP: c_int = 4; // sys/ipc.h -pub const IPC_ALLOC: ::c_int = 0o100000; -pub const IPC_CREAT: ::c_int = 0o020000; -pub const IPC_EXCL: ::c_int = 0o002000; -pub const IPC_NOWAIT: ::c_int = 0o004000; -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 101; -pub const IPC_R: ::c_int = 0o0400; -pub const IPC_W: ::c_int = 0o0200; -pub const IPC_O: ::c_int = 0o1000; -pub const IPC_NOERROR: ::c_int = 0o10000; -pub const IPC_STAT: ::c_int = 102; -pub const IPC_PRIVATE: ::key_t = -1; -pub const SHM_LOCK: ::c_int = 201; -pub const SHM_UNLOCK: ::c_int = 202; +pub const IPC_ALLOC: c_int = 0o100000; +pub const IPC_CREAT: c_int = 0o020000; +pub const IPC_EXCL: c_int = 0o002000; +pub const IPC_NOWAIT: c_int = 0o004000; +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 101; +pub const IPC_R: c_int = 0o0400; +pub const IPC_W: c_int = 0o0200; +pub const IPC_O: c_int = 0o1000; +pub const IPC_NOERROR: c_int = 0o10000; +pub const IPC_STAT: c_int = 102; +pub const IPC_PRIVATE: crate::key_t = -1; +pub const SHM_LOCK: c_int = 201; +pub const SHM_UNLOCK: c_int = 202; // sys/ldr.h -pub const L_GETINFO: ::c_int = 2; -pub const L_GETMESSAGE: ::c_int = 1; -pub const L_GETLIBPATH: ::c_int = 3; -pub const L_GETXINFO: ::c_int = 8; +pub const L_GETINFO: c_int = 2; +pub const L_GETMESSAGE: c_int = 1; +pub const L_GETLIBPATH: c_int = 3; +pub const L_GETXINFO: c_int = 8; // sys/limits.h -pub const PATH_MAX: ::c_int = 1023; -pub const PAGESIZE: ::c_int = 4096; -pub const IOV_MAX: ::c_int = 16; -pub const AIO_LISTIO_MAX: ::c_int = 4096; +pub const PATH_MAX: c_int = 1023; +pub const PAGESIZE: c_int = 4096; +pub const IOV_MAX: c_int = 16; +pub const AIO_LISTIO_MAX: c_int = 4096; pub const PIPE_BUF: usize = 32768; -pub const OPEN_MAX: ::c_int = 65534; -pub const MAX_INPUT: ::c_int = 512; -pub const MAX_CANON: ::c_int = 256; -pub const ARG_MAX: ::c_int = 1048576; -pub const BC_BASE_MAX: ::c_int = 99; -pub const BC_DIM_MAX: ::c_int = 0x800; -pub const BC_SCALE_MAX: ::c_int = 99; -pub const BC_STRING_MAX: ::c_int = 0x800; -pub const CHARCLASS_NAME_MAX: ::c_int = 14; -pub const CHILD_MAX: ::c_int = 128; -pub const COLL_WEIGHTS_MAX: ::c_int = 4; -pub const EXPR_NEST_MAX: ::c_int = 32; -pub const NZERO: ::c_int = 20; +pub const OPEN_MAX: c_int = 65534; +pub const MAX_INPUT: c_int = 512; +pub const MAX_CANON: c_int = 256; +pub const ARG_MAX: c_int = 1048576; +pub const BC_BASE_MAX: c_int = 99; +pub const BC_DIM_MAX: c_int = 0x800; +pub const BC_SCALE_MAX: c_int = 99; +pub const BC_STRING_MAX: c_int = 0x800; +pub const CHARCLASS_NAME_MAX: c_int = 14; +pub const CHILD_MAX: c_int = 128; +pub const COLL_WEIGHTS_MAX: c_int = 4; +pub const EXPR_NEST_MAX: c_int = 32; +pub const NZERO: c_int = 20; // sys/lockf.h -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; // sys/machine.h -pub const BIG_ENDIAN: ::c_int = 4321; -pub const LITTLE_ENDIAN: ::c_int = 1234; -pub const PDP_ENDIAN: ::c_int = 3412; +pub const BIG_ENDIAN: c_int = 4321; +pub const LITTLE_ENDIAN: c_int = 1234; +pub const PDP_ENDIAN: c_int = 3412; // sys/mman.h -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; -pub const MAP_FILE: ::c_int = 0; -pub const MAP_SHARED: ::c_int = 1; -pub const MAP_PRIVATE: ::c_int = 2; -pub const MAP_FIXED: ::c_int = 0x100; -pub const MAP_ANON: ::c_int = 0x10; -pub const MAP_ANONYMOUS: ::c_int = 0x10; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; -pub const MAP_TYPE: ::c_int = 0xf0; -pub const MCL_CURRENT: ::c_int = 0x100; -pub const MCL_FUTURE: ::c_int = 0x200; -pub const MS_SYNC: ::c_int = 0x20; -pub const MS_ASYNC: ::c_int = 0x10; -pub const MS_INVALIDATE: ::c_int = 0x40; -pub const POSIX_MADV_NORMAL: ::c_int = 1; -pub const POSIX_MADV_RANDOM: ::c_int = 3; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 4; -pub const POSIX_MADV_DONTNEED: ::c_int = 5; -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; +pub const MAP_FILE: c_int = 0; +pub const MAP_SHARED: c_int = 1; +pub const MAP_PRIVATE: c_int = 2; +pub const MAP_FIXED: c_int = 0x100; +pub const MAP_ANON: c_int = 0x10; +pub const MAP_ANONYMOUS: c_int = 0x10; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; +pub const MAP_TYPE: c_int = 0xf0; +pub const MCL_CURRENT: c_int = 0x100; +pub const MCL_FUTURE: c_int = 0x200; +pub const MS_SYNC: c_int = 0x20; +pub const MS_ASYNC: c_int = 0x10; +pub const MS_INVALIDATE: c_int = 0x40; +pub const POSIX_MADV_NORMAL: c_int = 1; +pub const POSIX_MADV_RANDOM: c_int = 3; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 4; +pub const POSIX_MADV_DONTNEED: c_int = 5; +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; // sys/mode.h pub const S_IFMT: mode_t = 0o17_0000; @@ -1617,640 +1622,640 @@ pub const S_IWRITE: mode_t = 0o0200; pub const S_IREAD: mode_t = 0o0400; // sys/msg.h -pub const MSG_NOERROR: ::c_int = 0o10000; +pub const MSG_NOERROR: c_int = 0o10000; // sys/m_signal.h -pub const SIGSTKSZ: ::size_t = 4096; -pub const MINSIGSTKSZ: ::size_t = 1200; +pub const SIGSTKSZ: size_t = 4096; +pub const MINSIGSTKSZ: size_t = 1200; // sys/params.h -pub const MAXPATHLEN: ::c_int = PATH_MAX + 1; -pub const MAXSYMLINKS: ::c_int = 20; -pub const MAXHOSTNAMELEN: ::c_int = 256; -pub const MAXUPRC: ::c_int = 128; -pub const NGROUPS_MAX: ::c_ulong = 2048; -pub const NGROUPS: ::c_ulong = NGROUPS_MAX; -pub const NOFILE: ::c_int = OPEN_MAX; +pub const MAXPATHLEN: c_int = PATH_MAX + 1; +pub const MAXSYMLINKS: c_int = 20; +pub const MAXHOSTNAMELEN: c_int = 256; +pub const MAXUPRC: c_int = 128; +pub const NGROUPS_MAX: c_ulong = 2048; +pub const NGROUPS: c_ulong = NGROUPS_MAX; +pub const NOFILE: c_int = OPEN_MAX; // sys/poll.h -pub const POLLIN: ::c_short = 0x0001; -pub const POLLPRI: ::c_short = 0x0004; -pub const POLLOUT: ::c_short = 0x0002; -pub const POLLERR: ::c_short = 0x4000; -pub const POLLHUP: ::c_short = 0x2000; -pub const POLLMSG: ::c_short = 0x0080; -pub const POLLSYNC: ::c_short = 0x8000; -pub const POLLNVAL: ::c_short = POLLSYNC; -pub const POLLNORM: ::c_short = POLLIN; -pub const POLLRDNORM: ::c_short = 0x0010; -pub const POLLWRNORM: ::c_short = POLLOUT; -pub const POLLRDBAND: ::c_short = 0x0020; -pub const POLLWRBAND: ::c_short = 0x0040; +pub const POLLIN: c_short = 0x0001; +pub const POLLPRI: c_short = 0x0004; +pub const POLLOUT: c_short = 0x0002; +pub const POLLERR: c_short = 0x4000; +pub const POLLHUP: c_short = 0x2000; +pub const POLLMSG: c_short = 0x0080; +pub const POLLSYNC: c_short = 0x8000; +pub const POLLNVAL: c_short = POLLSYNC; +pub const POLLNORM: c_short = POLLIN; +pub const POLLRDNORM: c_short = 0x0010; +pub const POLLWRNORM: c_short = POLLOUT; +pub const POLLRDBAND: c_short = 0x0020; +pub const POLLWRBAND: c_short = 0x0040; // sys/pollset.h -pub const PS_ADD: ::c_uchar = 0; -pub const PS_MOD: ::c_uchar = 1; -pub const PS_DELETE: ::c_uchar = 2; -pub const PS_REPLACE: ::c_uchar = 3; +pub const PS_ADD: c_uchar = 0; +pub const PS_MOD: c_uchar = 1; +pub const PS_DELETE: c_uchar = 2; +pub const PS_REPLACE: c_uchar = 3; // sys/ptrace.h -pub const PT_TRACE_ME: ::c_int = 0; -pub const PT_READ_I: ::c_int = 1; -pub const PT_READ_D: ::c_int = 2; -pub const PT_WRITE_I: ::c_int = 4; -pub const PT_WRITE_D: ::c_int = 5; -pub const PT_CONTINUE: ::c_int = 7; -pub const PT_KILL: ::c_int = 8; -pub const PT_STEP: ::c_int = 9; -pub const PT_READ_GPR: ::c_int = 11; -pub const PT_READ_FPR: ::c_int = 12; -pub const PT_WRITE_GPR: ::c_int = 14; -pub const PT_WRITE_FPR: ::c_int = 15; -pub const PT_READ_BLOCK: ::c_int = 17; -pub const PT_WRITE_BLOCK: ::c_int = 19; -pub const PT_ATTACH: ::c_int = 30; -pub const PT_DETACH: ::c_int = 31; -pub const PT_REGSET: ::c_int = 32; -pub const PT_REATT: ::c_int = 33; -pub const PT_LDINFO: ::c_int = 34; -pub const PT_MULTI: ::c_int = 35; -pub const PT_NEXT: ::c_int = 36; -pub const PT_SET: ::c_int = 37; -pub const PT_CLEAR: ::c_int = 38; -pub const PT_LDXINFO: ::c_int = 39; -pub const PT_QUERY: ::c_int = 40; -pub const PT_WATCH: ::c_int = 41; -pub const PTT_CONTINUE: ::c_int = 50; -pub const PTT_STEP: ::c_int = 51; -pub const PTT_READ_SPRS: ::c_int = 52; -pub const PTT_WRITE_SPRS: ::c_int = 53; -pub const PTT_READ_GPRS: ::c_int = 54; -pub const PTT_WRITE_GPRS: ::c_int = 55; -pub const PTT_READ_FPRS: ::c_int = 56; -pub const PTT_WRITE_FPRS: ::c_int = 57; -pub const PTT_READ_VEC: ::c_int = 58; -pub const PTT_WRITE_VEC: ::c_int = 59; -pub const PTT_WATCH: ::c_int = 60; -pub const PTT_SET_TRAP: ::c_int = 61; -pub const PTT_CLEAR_TRAP: ::c_int = 62; -pub const PTT_READ_UKEYSET: ::c_int = 63; -pub const PT_GET_UKEY: ::c_int = 64; -pub const PTT_READ_FPSCR_HI: ::c_int = 65; -pub const PTT_WRITE_FPSCR_HI: ::c_int = 66; -pub const PTT_READ_VSX: ::c_int = 67; -pub const PTT_WRITE_VSX: ::c_int = 68; -pub const PTT_READ_TM: ::c_int = 69; -pub const PTRACE_ATTACH: ::c_int = 14; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_DETACH: ::c_int = 15; -pub const PTRACE_GETFPREGS: ::c_int = 12; -pub const PTRACE_GETREGS: ::c_int = 10; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_SETFPREGS: ::c_int = 13; -pub const PTRACE_SETREGS: ::c_int = 11; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_SYSCALL: ::c_int = 16; -pub const PTRACE_TRACEME: ::c_int = 0; +pub const PT_TRACE_ME: c_int = 0; +pub const PT_READ_I: c_int = 1; +pub const PT_READ_D: c_int = 2; +pub const PT_WRITE_I: c_int = 4; +pub const PT_WRITE_D: c_int = 5; +pub const PT_CONTINUE: c_int = 7; +pub const PT_KILL: c_int = 8; +pub const PT_STEP: c_int = 9; +pub const PT_READ_GPR: c_int = 11; +pub const PT_READ_FPR: c_int = 12; +pub const PT_WRITE_GPR: c_int = 14; +pub const PT_WRITE_FPR: c_int = 15; +pub const PT_READ_BLOCK: c_int = 17; +pub const PT_WRITE_BLOCK: c_int = 19; +pub const PT_ATTACH: c_int = 30; +pub const PT_DETACH: c_int = 31; +pub const PT_REGSET: c_int = 32; +pub const PT_REATT: c_int = 33; +pub const PT_LDINFO: c_int = 34; +pub const PT_MULTI: c_int = 35; +pub const PT_NEXT: c_int = 36; +pub const PT_SET: c_int = 37; +pub const PT_CLEAR: c_int = 38; +pub const PT_LDXINFO: c_int = 39; +pub const PT_QUERY: c_int = 40; +pub const PT_WATCH: c_int = 41; +pub const PTT_CONTINUE: c_int = 50; +pub const PTT_STEP: c_int = 51; +pub const PTT_READ_SPRS: c_int = 52; +pub const PTT_WRITE_SPRS: c_int = 53; +pub const PTT_READ_GPRS: c_int = 54; +pub const PTT_WRITE_GPRS: c_int = 55; +pub const PTT_READ_FPRS: c_int = 56; +pub const PTT_WRITE_FPRS: c_int = 57; +pub const PTT_READ_VEC: c_int = 58; +pub const PTT_WRITE_VEC: c_int = 59; +pub const PTT_WATCH: c_int = 60; +pub const PTT_SET_TRAP: c_int = 61; +pub const PTT_CLEAR_TRAP: c_int = 62; +pub const PTT_READ_UKEYSET: c_int = 63; +pub const PT_GET_UKEY: c_int = 64; +pub const PTT_READ_FPSCR_HI: c_int = 65; +pub const PTT_WRITE_FPSCR_HI: c_int = 66; +pub const PTT_READ_VSX: c_int = 67; +pub const PTT_WRITE_VSX: c_int = 68; +pub const PTT_READ_TM: c_int = 69; +pub const PTRACE_ATTACH: c_int = 14; +pub const PTRACE_CONT: c_int = 7; +pub const PTRACE_DETACH: c_int = 15; +pub const PTRACE_GETFPREGS: c_int = 12; +pub const PTRACE_GETREGS: c_int = 10; +pub const PTRACE_KILL: c_int = 8; +pub const PTRACE_PEEKDATA: c_int = 2; +pub const PTRACE_PEEKTEXT: c_int = 1; +pub const PTRACE_PEEKUSER: c_int = 3; +pub const PTRACE_POKEDATA: c_int = 5; +pub const PTRACE_POKETEXT: c_int = 4; +pub const PTRACE_POKEUSER: c_int = 6; +pub const PTRACE_SETFPREGS: c_int = 13; +pub const PTRACE_SETREGS: c_int = 11; +pub const PTRACE_SINGLESTEP: c_int = 9; +pub const PTRACE_SYSCALL: c_int = 16; +pub const PTRACE_TRACEME: c_int = 0; // sys/resource.h -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_AS: ::c_int = 6; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_THREADS: ::c_int = 8; -pub const RLIMIT_NPROC: ::c_int = 9; -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; -pub const RUSAGE_THREAD: ::c_int = 1; -pub const RLIM_SAVED_MAX: ::c_ulong = RLIM_INFINITY - 1; -pub const RLIM_SAVED_CUR: ::c_ulong = RLIM_INFINITY - 2; +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_RSS: c_int = 5; +pub const RLIMIT_AS: c_int = 6; +pub const RLIMIT_NOFILE: c_int = 7; +pub const RLIMIT_THREADS: c_int = 8; +pub const RLIMIT_NPROC: c_int = 9; +pub const RUSAGE_SELF: c_int = 0; +pub const RUSAGE_CHILDREN: c_int = -1; +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; +pub const RUSAGE_THREAD: c_int = 1; +pub const RLIM_SAVED_MAX: c_ulong = RLIM_INFINITY - 1; +pub const RLIM_SAVED_CUR: c_ulong = RLIM_INFINITY - 2; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 10; +pub const RLIM_NLIMITS: c_int = 10; // sys/sched.h -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_LOCAL: ::c_int = 3; -pub const SCHED_GLOBAL: ::c_int = 4; -pub const SCHED_FIFO2: ::c_int = 5; -pub const SCHED_FIFO3: ::c_int = 6; -pub const SCHED_FIFO4: ::c_int = 7; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; +pub const SCHED_LOCAL: c_int = 3; +pub const SCHED_GLOBAL: c_int = 4; +pub const SCHED_FIFO2: c_int = 5; +pub const SCHED_FIFO3: c_int = 6; +pub const SCHED_FIFO4: c_int = 7; // sys/sem.h -pub const SEM_UNDO: ::c_int = 0o10000; -pub const GETNCNT: ::c_int = 3; -pub const GETPID: ::c_int = 4; -pub const GETVAL: ::c_int = 5; -pub const GETALL: ::c_int = 6; -pub const GETZCNT: ::c_int = 7; -pub const SETVAL: ::c_int = 8; -pub const SETALL: ::c_int = 9; +pub const SEM_UNDO: c_int = 0o10000; +pub const GETNCNT: c_int = 3; +pub const GETPID: c_int = 4; +pub const GETVAL: c_int = 5; +pub const GETALL: c_int = 6; +pub const GETZCNT: c_int = 7; +pub const SETVAL: c_int = 8; +pub const SETALL: c_int = 9; // sys/shm.h -pub const SHMLBA: ::c_int = 0x10000000; -pub const SHMLBA_EXTSHM: ::c_int = 0x1000; -pub const SHM_SHMAT: ::c_int = 0x80000000; -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_PIN: ::c_int = 0o4000; -pub const SHM_LGPAGE: ::c_int = 0o20000000000; -pub const SHM_MAP: ::c_int = 0o4000; -pub const SHM_FMAP: ::c_int = 0o2000; -pub const SHM_COPY: ::c_int = 0o40000; -pub const SHM_CLEAR: ::c_int = 0; -pub const SHM_HGSEG: ::c_int = 0o10000000000; -pub const SHM_R: ::c_int = IPC_R; -pub const SHM_W: ::c_int = IPC_W; -pub const SHM_DEST: ::c_int = 0o2000; +pub const SHMLBA: c_int = 0x10000000; +pub const SHMLBA_EXTSHM: c_int = 0x1000; +pub const SHM_SHMAT: c_int = 0x80000000; +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_PIN: c_int = 0o4000; +pub const SHM_LGPAGE: c_int = 0o20000000000; +pub const SHM_MAP: c_int = 0o4000; +pub const SHM_FMAP: c_int = 0o2000; +pub const SHM_COPY: c_int = 0o40000; +pub const SHM_CLEAR: c_int = 0; +pub const SHM_HGSEG: c_int = 0o10000000000; +pub const SHM_R: c_int = IPC_R; +pub const SHM_W: c_int = IPC_W; +pub const SHM_DEST: c_int = 0o2000; // sys/signal.h -pub const SA_ONSTACK: ::c_int = 0x00000001; -pub const SA_RESETHAND: ::c_int = 0x00000002; -pub const SA_RESTART: ::c_int = 0x00000008; -pub const SA_SIGINFO: ::c_int = 0x00000100; -pub const SA_NODEFER: ::c_int = 0x00000200; -pub const SA_NOCLDWAIT: ::c_int = 0x00000400; -pub const SA_NOCLDSTOP: ::c_int = 0x00000004; -pub const SS_ONSTACK: ::c_int = 0x00000001; -pub const SS_DISABLE: ::c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 20; -pub const SIGBUS: ::c_int = 10; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIGEV_NONE: ::c_int = 1; -pub const SIGEV_SIGNAL: ::c_int = 2; -pub const SIGEV_THREAD: ::c_int = 3; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGSYS: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const SIGPWR: ::c_int = 29; -pub const SIGWINCH: ::c_int = 28; -pub const SIGURG: ::c_int = 16; -pub const SIGPOLL: ::c_int = SIGIO; -pub const SIGIO: ::c_int = 23; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGCONT: ::c_int = 19; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGVTALRM: ::c_int = 34; -pub const SIGPROF: ::c_int = 32; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGTRAP: ::c_int = 5; -pub const SIGCLD: ::c_int = 20; -pub const SIGRTMAX: ::c_int = 57; -pub const SIGRTMIN: ::c_int = 50; -pub const SI_USER: ::c_int = 0; -pub const SI_UNDEFINED: ::c_int = 8; -pub const SI_EMPTY: ::c_int = 9; -pub const BUS_ADRALN: ::c_int = 1; -pub const BUS_ADRERR: ::c_int = 2; -pub const BUS_OBJERR: ::c_int = 3; -pub const BUS_UEGARD: ::c_int = 4; -pub const CLD_EXITED: ::c_int = 10; -pub const CLD_KILLED: ::c_int = 11; -pub const CLD_DUMPED: ::c_int = 12; -pub const CLD_TRAPPED: ::c_int = 13; -pub const CLD_STOPPED: ::c_int = 14; -pub const CLD_CONTINUED: ::c_int = 15; -pub const FPE_INTDIV: ::c_int = 20; -pub const FPE_INTOVF: ::c_int = 21; -pub const FPE_FLTDIV: ::c_int = 22; -pub const FPE_FLTOVF: ::c_int = 23; -pub const FPE_FLTUND: ::c_int = 24; -pub const FPE_FLTRES: ::c_int = 25; -pub const FPE_FLTINV: ::c_int = 26; -pub const FPE_FLTSUB: ::c_int = 27; -pub const ILL_ILLOPC: ::c_int = 30; -pub const ILL_ILLOPN: ::c_int = 31; -pub const ILL_ILLADR: ::c_int = 32; -pub const ILL_ILLTRP: ::c_int = 33; -pub const ILL_PRVOPC: ::c_int = 34; -pub const ILL_PRVREG: ::c_int = 35; -pub const ILL_COPROC: ::c_int = 36; -pub const ILL_BADSTK: ::c_int = 37; -pub const ILL_TMBADTHING: ::c_int = 38; -pub const POLL_IN: ::c_int = 40; -pub const POLL_OUT: ::c_int = 41; -pub const POLL_MSG: ::c_int = -3; -pub const POLL_ERR: ::c_int = 43; -pub const POLL_PRI: ::c_int = 44; -pub const POLL_HUP: ::c_int = 45; -pub const SEGV_MAPERR: ::c_int = 50; -pub const SEGV_ACCERR: ::c_int = 51; -pub const SEGV_KEYERR: ::c_int = 52; -pub const TRAP_BRKPT: ::c_int = 60; -pub const TRAP_TRACE: ::c_int = 61; -pub const SI_QUEUE: ::c_int = 71; -pub const SI_TIMER: ::c_int = 72; -pub const SI_ASYNCIO: ::c_int = 73; -pub const SI_MESGQ: ::c_int = 74; +pub const SA_ONSTACK: c_int = 0x00000001; +pub const SA_RESETHAND: c_int = 0x00000002; +pub const SA_RESTART: c_int = 0x00000008; +pub const SA_SIGINFO: c_int = 0x00000100; +pub const SA_NODEFER: c_int = 0x00000200; +pub const SA_NOCLDWAIT: c_int = 0x00000400; +pub const SA_NOCLDSTOP: c_int = 0x00000004; +pub const SS_ONSTACK: c_int = 0x00000001; +pub const SS_DISABLE: c_int = 0x00000002; +pub const SIGCHLD: c_int = 20; +pub const SIGBUS: c_int = 10; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; +pub const SIG_SETMASK: c_int = 2; +pub const SIGEV_NONE: c_int = 1; +pub const SIGEV_SIGNAL: c_int = 2; +pub const SIGEV_THREAD: c_int = 3; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGSYS: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGUSR1: c_int = 30; +pub const SIGUSR2: c_int = 31; +pub const SIGPWR: c_int = 29; +pub const SIGWINCH: c_int = 28; +pub const SIGURG: c_int = 16; +pub const SIGPOLL: c_int = SIGIO; +pub const SIGIO: c_int = 23; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGCONT: c_int = 19; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGVTALRM: c_int = 34; +pub const SIGPROF: c_int = 32; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGTRAP: c_int = 5; +pub const SIGCLD: c_int = 20; +pub const SIGRTMAX: c_int = 57; +pub const SIGRTMIN: c_int = 50; +pub const SI_USER: c_int = 0; +pub const SI_UNDEFINED: c_int = 8; +pub const SI_EMPTY: c_int = 9; +pub const BUS_ADRALN: c_int = 1; +pub const BUS_ADRERR: c_int = 2; +pub const BUS_OBJERR: c_int = 3; +pub const BUS_UEGARD: c_int = 4; +pub const CLD_EXITED: c_int = 10; +pub const CLD_KILLED: c_int = 11; +pub const CLD_DUMPED: c_int = 12; +pub const CLD_TRAPPED: c_int = 13; +pub const CLD_STOPPED: c_int = 14; +pub const CLD_CONTINUED: c_int = 15; +pub const FPE_INTDIV: c_int = 20; +pub const FPE_INTOVF: c_int = 21; +pub const FPE_FLTDIV: c_int = 22; +pub const FPE_FLTOVF: c_int = 23; +pub const FPE_FLTUND: c_int = 24; +pub const FPE_FLTRES: c_int = 25; +pub const FPE_FLTINV: c_int = 26; +pub const FPE_FLTSUB: c_int = 27; +pub const ILL_ILLOPC: c_int = 30; +pub const ILL_ILLOPN: c_int = 31; +pub const ILL_ILLADR: c_int = 32; +pub const ILL_ILLTRP: c_int = 33; +pub const ILL_PRVOPC: c_int = 34; +pub const ILL_PRVREG: c_int = 35; +pub const ILL_COPROC: c_int = 36; +pub const ILL_BADSTK: c_int = 37; +pub const ILL_TMBADTHING: c_int = 38; +pub const POLL_IN: c_int = 40; +pub const POLL_OUT: c_int = 41; +pub const POLL_MSG: c_int = -3; +pub const POLL_ERR: c_int = 43; +pub const POLL_PRI: c_int = 44; +pub const POLL_HUP: c_int = 45; +pub const SEGV_MAPERR: c_int = 50; +pub const SEGV_ACCERR: c_int = 51; +pub const SEGV_KEYERR: c_int = 52; +pub const TRAP_BRKPT: c_int = 60; +pub const TRAP_TRACE: c_int = 61; +pub const SI_QUEUE: c_int = 71; +pub const SI_TIMER: c_int = 72; +pub const SI_ASYNCIO: c_int = 73; +pub const SI_MESGQ: c_int = 74; // sys/socket.h -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NS: ::c_int = 6; -pub const AF_ECMA: ::c_int = 8; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const SO_TIMESTAMPNS: ::c_int = 0x100a; -pub const SOMAXCONN: ::c_int = 1024; -pub const AF_LOCAL: ::c_int = AF_UNIX; -pub const UIO_MAXIOV: ::c_int = 1024; -pub const pseudo_AF_XTP: ::c_int = 19; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_ISO: ::c_int = 7; -pub const AF_OSI: ::c_int = AF_ISO; -pub const AF_ROUTE: ::c_int = 17; -pub const AF_LINK: ::c_int = 18; -pub const AF_INET6: ::c_int = 24; -pub const AF_INTF: ::c_int = 20; -pub const AF_RIF: ::c_int = 21; -pub const AF_NDD: ::c_int = 23; -pub const AF_MAX: ::c_int = 30; -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_UNIX: ::c_int = AF_UNIX; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_IMPLINK: ::c_int = AF_IMPLINK; -pub const PF_PUP: ::c_int = AF_PUP; -pub const PF_CHAOS: ::c_int = AF_CHAOS; -pub const PF_NS: ::c_int = AF_NS; -pub const PF_ISO: ::c_int = AF_ISO; -pub const PF_OSI: ::c_int = AF_ISO; -pub const PF_ECMA: ::c_int = AF_ECMA; -pub const PF_DATAKIT: ::c_int = AF_DATAKIT; -pub const PF_CCITT: ::c_int = AF_CCITT; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_DLI: ::c_int = AF_DLI; -pub const PF_LAT: ::c_int = AF_LAT; -pub const PF_HYLINK: ::c_int = AF_HYLINK; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_LINK: ::c_int = AF_LINK; -pub const PF_XTP: ::c_int = 19; -pub const PF_RIF: ::c_int = AF_RIF; -pub const PF_INTF: ::c_int = AF_INTF; -pub const PF_NDD: ::c_int = AF_NDD; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_MAX: ::c_int = AF_MAX; -pub const SF_CLOSE: ::c_int = 1; -pub const SF_REUSE: ::c_int = 2; -pub const SF_DONT_CACHE: ::c_int = 4; -pub const SF_SYNC_CACHE: ::c_int = 8; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x0001; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_USE_IFBUFS: ::c_int = 0x0400; -pub const SO_CKSUMRECV: ::c_int = 0x0800; -pub const SO_NOREUSEADDR: ::c_int = 0x1000; -pub const SO_KERNACCEPT: ::c_int = 0x2000; -pub const SO_NOMULTIPATH: ::c_int = 0x4000; -pub const SO_AUDIT: ::c_int = 0x8000; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SCM_RIGHTS: ::c_int = 0x01; -pub const MSG_OOB: ::c_int = 0x1; -pub const MSG_PEEK: ::c_int = 0x2; -pub const MSG_DONTROUTE: ::c_int = 0x4; -pub const MSG_EOR: ::c_int = 0x8; -pub const MSG_TRUNC: ::c_int = 0x10; -pub const MSG_CTRUNC: ::c_int = 0x20; -pub const MSG_WAITALL: ::c_int = 0x40; -pub const MSG_MPEG2: ::c_int = 0x80; -pub const MSG_NOSIGNAL: ::c_int = 0x100; -pub const MSG_WAITFORONE: ::c_int = 0x200; -pub const MSG_ARGEXT: ::c_int = 0x400; -pub const MSG_NONBLOCK: ::c_int = 0x4000; -pub const MSG_COMPAT: ::c_int = 0x8000; -pub const MSG_MAXIOVLEN: ::c_int = 16; -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; +pub const AF_UNSPEC: c_int = 0; +pub const AF_UNIX: c_int = 1; +pub const AF_INET: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NS: c_int = 6; +pub const AF_ECMA: c_int = 8; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const SO_TIMESTAMPNS: c_int = 0x100a; +pub const SOMAXCONN: c_int = 1024; +pub const AF_LOCAL: c_int = AF_UNIX; +pub const UIO_MAXIOV: c_int = 1024; +pub const pseudo_AF_XTP: c_int = 19; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_ISO: c_int = 7; +pub const AF_OSI: c_int = AF_ISO; +pub const AF_ROUTE: c_int = 17; +pub const AF_LINK: c_int = 18; +pub const AF_INET6: c_int = 24; +pub const AF_INTF: c_int = 20; +pub const AF_RIF: c_int = 21; +pub const AF_NDD: c_int = 23; +pub const AF_MAX: c_int = 30; +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_UNIX: c_int = AF_UNIX; +pub const PF_INET: c_int = AF_INET; +pub const PF_IMPLINK: c_int = AF_IMPLINK; +pub const PF_PUP: c_int = AF_PUP; +pub const PF_CHAOS: c_int = AF_CHAOS; +pub const PF_NS: c_int = AF_NS; +pub const PF_ISO: c_int = AF_ISO; +pub const PF_OSI: c_int = AF_ISO; +pub const PF_ECMA: c_int = AF_ECMA; +pub const PF_DATAKIT: c_int = AF_DATAKIT; +pub const PF_CCITT: c_int = AF_CCITT; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_DLI: c_int = AF_DLI; +pub const PF_LAT: c_int = AF_LAT; +pub const PF_HYLINK: c_int = AF_HYLINK; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_XTP: c_int = 19; +pub const PF_RIF: c_int = AF_RIF; +pub const PF_INTF: c_int = AF_INTF; +pub const PF_NDD: c_int = AF_NDD; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_MAX: c_int = AF_MAX; +pub const SF_CLOSE: c_int = 1; +pub const SF_REUSE: c_int = 2; +pub const SF_DONT_CACHE: c_int = 4; +pub const SF_SYNC_CACHE: c_int = 8; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOL_SOCKET: c_int = 0xffff; +pub const SO_DEBUG: c_int = 0x0001; +pub const SO_ACCEPTCONN: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_USE_IFBUFS: c_int = 0x0400; +pub const SO_CKSUMRECV: c_int = 0x0800; +pub const SO_NOREUSEADDR: c_int = 0x1000; +pub const SO_KERNACCEPT: c_int = 0x2000; +pub const SO_NOMULTIPATH: c_int = 0x4000; +pub const SO_AUDIT: c_int = 0x8000; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; +pub const SCM_RIGHTS: c_int = 0x01; +pub const MSG_OOB: c_int = 0x1; +pub const MSG_PEEK: c_int = 0x2; +pub const MSG_DONTROUTE: c_int = 0x4; +pub const MSG_EOR: c_int = 0x8; +pub const MSG_TRUNC: c_int = 0x10; +pub const MSG_CTRUNC: c_int = 0x20; +pub const MSG_WAITALL: c_int = 0x40; +pub const MSG_MPEG2: c_int = 0x80; +pub const MSG_NOSIGNAL: c_int = 0x100; +pub const MSG_WAITFORONE: c_int = 0x200; +pub const MSG_ARGEXT: c_int = 0x400; +pub const MSG_NONBLOCK: c_int = 0x4000; +pub const MSG_COMPAT: c_int = 0x8000; +pub const MSG_MAXIOVLEN: c_int = 16; +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; // sys/stat.h -pub const UTIME_NOW: ::c_int = -2; -pub const UTIME_OMIT: ::c_int = -3; +pub const UTIME_NOW: c_int = -2; +pub const UTIME_OMIT: c_int = -3; // sys/statvfs.h -pub const ST_RDONLY: ::c_ulong = 0x0001; -pub const ST_NOSUID: ::c_ulong = 0x0040; -pub const ST_NODEV: ::c_ulong = 0x0080; +pub const ST_RDONLY: c_ulong = 0x0001; +pub const ST_NOSUID: c_ulong = 0x0040; +pub const ST_NODEV: c_ulong = 0x0080; // sys/stropts.h -pub const I_NREAD: ::c_int = 0x20005301; -pub const I_PUSH: ::c_int = 0x20005302; -pub const I_POP: ::c_int = 0x20005303; -pub const I_LOOK: ::c_int = 0x20005304; -pub const I_FLUSH: ::c_int = 0x20005305; -pub const I_SRDOPT: ::c_int = 0x20005306; -pub const I_GRDOPT: ::c_int = 0x20005307; -pub const I_STR: ::c_int = 0x20005308; -pub const I_SETSIG: ::c_int = 0x20005309; -pub const I_GETSIG: ::c_int = 0x2000530a; -pub const I_FIND: ::c_int = 0x2000530b; -pub const I_LINK: ::c_int = 0x2000530c; -pub const I_UNLINK: ::c_int = 0x2000530d; -pub const I_PEEK: ::c_int = 0x2000530f; -pub const I_FDINSERT: ::c_int = 0x20005310; -pub const I_SENDFD: ::c_int = 0x20005311; -pub const I_RECVFD: ::c_int = 0x20005312; -pub const I_SWROPT: ::c_int = 0x20005314; -pub const I_GWROPT: ::c_int = 0x20005315; -pub const I_LIST: ::c_int = 0x20005316; -pub const I_PLINK: ::c_int = 0x2000531d; -pub const I_PUNLINK: ::c_int = 0x2000531e; -pub const I_FLUSHBAND: ::c_int = 0x20005313; -pub const I_CKBAND: ::c_int = 0x20005318; -pub const I_GETBAND: ::c_int = 0x20005319; -pub const I_ATMARK: ::c_int = 0x20005317; -pub const I_SETCLTIME: ::c_int = 0x2000531b; -pub const I_GETCLTIME: ::c_int = 0x2000531c; -pub const I_CANPUT: ::c_int = 0x2000531a; +pub const I_NREAD: c_int = 0x20005301; +pub const I_PUSH: c_int = 0x20005302; +pub const I_POP: c_int = 0x20005303; +pub const I_LOOK: c_int = 0x20005304; +pub const I_FLUSH: c_int = 0x20005305; +pub const I_SRDOPT: c_int = 0x20005306; +pub const I_GRDOPT: c_int = 0x20005307; +pub const I_STR: c_int = 0x20005308; +pub const I_SETSIG: c_int = 0x20005309; +pub const I_GETSIG: c_int = 0x2000530a; +pub const I_FIND: c_int = 0x2000530b; +pub const I_LINK: c_int = 0x2000530c; +pub const I_UNLINK: c_int = 0x2000530d; +pub const I_PEEK: c_int = 0x2000530f; +pub const I_FDINSERT: c_int = 0x20005310; +pub const I_SENDFD: c_int = 0x20005311; +pub const I_RECVFD: c_int = 0x20005312; +pub const I_SWROPT: c_int = 0x20005314; +pub const I_GWROPT: c_int = 0x20005315; +pub const I_LIST: c_int = 0x20005316; +pub const I_PLINK: c_int = 0x2000531d; +pub const I_PUNLINK: c_int = 0x2000531e; +pub const I_FLUSHBAND: c_int = 0x20005313; +pub const I_CKBAND: c_int = 0x20005318; +pub const I_GETBAND: c_int = 0x20005319; +pub const I_ATMARK: c_int = 0x20005317; +pub const I_SETCLTIME: c_int = 0x2000531b; +pub const I_GETCLTIME: c_int = 0x2000531c; +pub const I_CANPUT: c_int = 0x2000531a; // sys/syslog.h -pub const LOG_CRON: ::c_int = 9 << 3; -pub const LOG_AUTHPRIV: ::c_int = 10 << 3; -pub const LOG_NFACILITIES: ::c_int = 24; -pub const LOG_PERROR: ::c_int = 0x20; +pub const LOG_CRON: c_int = 9 << 3; +pub const LOG_AUTHPRIV: c_int = 10 << 3; +pub const LOG_NFACILITIES: c_int = 24; +pub const LOG_PERROR: c_int = 0x20; // sys/systemcfg.h -pub const SC_ARCH: ::c_int = 1; -pub const SC_IMPL: ::c_int = 2; -pub const SC_VERS: ::c_int = 3; -pub const SC_WIDTH: ::c_int = 4; -pub const SC_NCPUS: ::c_int = 5; -pub const SC_L1C_ATTR: ::c_int = 6; -pub const SC_L1C_ISZ: ::c_int = 7; -pub const SC_L1C_DSZ: ::c_int = 8; -pub const SC_L1C_ICA: ::c_int = 9; -pub const SC_L1C_DCA: ::c_int = 10; -pub const SC_L1C_IBS: ::c_int = 11; -pub const SC_L1C_DBS: ::c_int = 12; -pub const SC_L1C_ILS: ::c_int = 13; -pub const SC_L1C_DLS: ::c_int = 14; -pub const SC_L2C_SZ: ::c_int = 15; -pub const SC_L2C_AS: ::c_int = 16; -pub const SC_TLB_ATTR: ::c_int = 17; -pub const SC_ITLB_SZ: ::c_int = 18; -pub const SC_DTLB_SZ: ::c_int = 19; -pub const SC_ITLB_ATT: ::c_int = 20; -pub const SC_DTLB_ATT: ::c_int = 21; -pub const SC_RESRV_SZ: ::c_int = 22; -pub const SC_PRI_LC: ::c_int = 23; -pub const SC_PRO_LC: ::c_int = 24; -pub const SC_RTC_TYPE: ::c_int = 25; -pub const SC_VIRT_AL: ::c_int = 26; -pub const SC_CAC_CONG: ::c_int = 27; -pub const SC_MOD_ARCH: ::c_int = 28; -pub const SC_MOD_IMPL: ::c_int = 29; -pub const SC_XINT: ::c_int = 30; -pub const SC_XFRAC: ::c_int = 31; -pub const SC_KRN_ATTR: ::c_int = 32; -pub const SC_PHYSMEM: ::c_int = 33; -pub const SC_SLB_ATTR: ::c_int = 34; -pub const SC_SLB_SZ: ::c_int = 35; -pub const SC_MAX_NCPUS: ::c_int = 37; -pub const SC_MAX_REALADDR: ::c_int = 38; -pub const SC_ORIG_ENT_CAP: ::c_int = 39; -pub const SC_ENT_CAP: ::c_int = 40; -pub const SC_DISP_WHE: ::c_int = 41; -pub const SC_CAPINC: ::c_int = 42; -pub const SC_VCAPW: ::c_int = 43; -pub const SC_SPLP_STAT: ::c_int = 44; -pub const SC_SMT_STAT: ::c_int = 45; -pub const SC_SMT_TC: ::c_int = 46; -pub const SC_VMX_VER: ::c_int = 47; -pub const SC_LMB_SZ: ::c_int = 48; -pub const SC_MAX_XCPU: ::c_int = 49; -pub const SC_EC_LVL: ::c_int = 50; -pub const SC_AME_STAT: ::c_int = 51; -pub const SC_ECO_STAT: ::c_int = 52; -pub const SC_DFP_VER: ::c_int = 53; -pub const SC_VRM_STAT: ::c_int = 54; -pub const SC_PHYS_IMP: ::c_int = 55; -pub const SC_PHYS_VER: ::c_int = 56; -pub const SC_SPCM_STATUS: ::c_int = 57; -pub const SC_SPCM_MAX: ::c_int = 58; -pub const SC_TM_VER: ::c_int = 59; -pub const SC_NX_CAP: ::c_int = 60; -pub const SC_PKS_STATE: ::c_int = 61; -pub const SC_MMA_VER: ::c_int = 62; -pub const POWER_RS: ::c_int = 1; -pub const POWER_PC: ::c_int = 2; -pub const IA64: ::c_int = 3; -pub const POWER_RS1: ::c_int = 0x1; -pub const POWER_RSC: ::c_int = 0x2; -pub const POWER_RS2: ::c_int = 0x4; -pub const POWER_601: ::c_int = 0x8; -pub const POWER_604: ::c_int = 0x10; -pub const POWER_603: ::c_int = 0x20; -pub const POWER_620: ::c_int = 0x40; -pub const POWER_630: ::c_int = 0x80; -pub const POWER_A35: ::c_int = 0x100; -pub const POWER_RS64II: ::c_int = 0x200; -pub const POWER_RS64III: ::c_int = 0x400; -pub const POWER_4: ::c_int = 0x800; -pub const POWER_RS64IV: ::c_int = POWER_4; -pub const POWER_MPC7450: ::c_int = 0x1000; -pub const POWER_5: ::c_int = 0x2000; -pub const POWER_6: ::c_int = 0x4000; -pub const POWER_7: ::c_int = 0x8000; -pub const POWER_8: ::c_int = 0x10000; -pub const POWER_9: ::c_int = 0x20000; +pub const SC_ARCH: c_int = 1; +pub const SC_IMPL: c_int = 2; +pub const SC_VERS: c_int = 3; +pub const SC_WIDTH: c_int = 4; +pub const SC_NCPUS: c_int = 5; +pub const SC_L1C_ATTR: c_int = 6; +pub const SC_L1C_ISZ: c_int = 7; +pub const SC_L1C_DSZ: c_int = 8; +pub const SC_L1C_ICA: c_int = 9; +pub const SC_L1C_DCA: c_int = 10; +pub const SC_L1C_IBS: c_int = 11; +pub const SC_L1C_DBS: c_int = 12; +pub const SC_L1C_ILS: c_int = 13; +pub const SC_L1C_DLS: c_int = 14; +pub const SC_L2C_SZ: c_int = 15; +pub const SC_L2C_AS: c_int = 16; +pub const SC_TLB_ATTR: c_int = 17; +pub const SC_ITLB_SZ: c_int = 18; +pub const SC_DTLB_SZ: c_int = 19; +pub const SC_ITLB_ATT: c_int = 20; +pub const SC_DTLB_ATT: c_int = 21; +pub const SC_RESRV_SZ: c_int = 22; +pub const SC_PRI_LC: c_int = 23; +pub const SC_PRO_LC: c_int = 24; +pub const SC_RTC_TYPE: c_int = 25; +pub const SC_VIRT_AL: c_int = 26; +pub const SC_CAC_CONG: c_int = 27; +pub const SC_MOD_ARCH: c_int = 28; +pub const SC_MOD_IMPL: c_int = 29; +pub const SC_XINT: c_int = 30; +pub const SC_XFRAC: c_int = 31; +pub const SC_KRN_ATTR: c_int = 32; +pub const SC_PHYSMEM: c_int = 33; +pub const SC_SLB_ATTR: c_int = 34; +pub const SC_SLB_SZ: c_int = 35; +pub const SC_MAX_NCPUS: c_int = 37; +pub const SC_MAX_REALADDR: c_int = 38; +pub const SC_ORIG_ENT_CAP: c_int = 39; +pub const SC_ENT_CAP: c_int = 40; +pub const SC_DISP_WHE: c_int = 41; +pub const SC_CAPINC: c_int = 42; +pub const SC_VCAPW: c_int = 43; +pub const SC_SPLP_STAT: c_int = 44; +pub const SC_SMT_STAT: c_int = 45; +pub const SC_SMT_TC: c_int = 46; +pub const SC_VMX_VER: c_int = 47; +pub const SC_LMB_SZ: c_int = 48; +pub const SC_MAX_XCPU: c_int = 49; +pub const SC_EC_LVL: c_int = 50; +pub const SC_AME_STAT: c_int = 51; +pub const SC_ECO_STAT: c_int = 52; +pub const SC_DFP_VER: c_int = 53; +pub const SC_VRM_STAT: c_int = 54; +pub const SC_PHYS_IMP: c_int = 55; +pub const SC_PHYS_VER: c_int = 56; +pub const SC_SPCM_STATUS: c_int = 57; +pub const SC_SPCM_MAX: c_int = 58; +pub const SC_TM_VER: c_int = 59; +pub const SC_NX_CAP: c_int = 60; +pub const SC_PKS_STATE: c_int = 61; +pub const SC_MMA_VER: c_int = 62; +pub const POWER_RS: c_int = 1; +pub const POWER_PC: c_int = 2; +pub const IA64: c_int = 3; +pub const POWER_RS1: c_int = 0x1; +pub const POWER_RSC: c_int = 0x2; +pub const POWER_RS2: c_int = 0x4; +pub const POWER_601: c_int = 0x8; +pub const POWER_604: c_int = 0x10; +pub const POWER_603: c_int = 0x20; +pub const POWER_620: c_int = 0x40; +pub const POWER_630: c_int = 0x80; +pub const POWER_A35: c_int = 0x100; +pub const POWER_RS64II: c_int = 0x200; +pub const POWER_RS64III: c_int = 0x400; +pub const POWER_4: c_int = 0x800; +pub const POWER_RS64IV: c_int = POWER_4; +pub const POWER_MPC7450: c_int = 0x1000; +pub const POWER_5: c_int = 0x2000; +pub const POWER_6: c_int = 0x4000; +pub const POWER_7: c_int = 0x8000; +pub const POWER_8: c_int = 0x10000; +pub const POWER_9: c_int = 0x20000; // sys/time.h -pub const FD_SETSIZE: ::c_int = 65534; -pub const TIMEOFDAY: ::c_int = 9; -pub const CLOCK_REALTIME: ::clockid_t = TIMEOFDAY as clockid_t; -pub const CLOCK_MONOTONIC: ::clockid_t = 10; -pub const TIMER_ABSTIME: ::c_int = 999; -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; -pub const ITIMER_VIRT: ::c_int = 3; -pub const ITIMER_REAL1: ::c_int = 20; -pub const ITIMER_REAL_TH: ::c_int = ITIMER_REAL1; -pub const DST_AUST: ::c_int = 2; -pub const DST_CAN: ::c_int = 6; -pub const DST_EET: ::c_int = 5; -pub const DST_MET: ::c_int = 4; -pub const DST_NONE: ::c_int = 0; -pub const DST_USA: ::c_int = 1; -pub const DST_WET: ::c_int = 3; +pub const FD_SETSIZE: c_int = 65534; +pub const TIMEOFDAY: c_int = 9; +pub const CLOCK_REALTIME: crate::clockid_t = TIMEOFDAY as clockid_t; +pub const CLOCK_MONOTONIC: crate::clockid_t = 10; +pub const TIMER_ABSTIME: c_int = 999; +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; +pub const ITIMER_VIRT: c_int = 3; +pub const ITIMER_REAL1: c_int = 20; +pub const ITIMER_REAL_TH: c_int = ITIMER_REAL1; +pub const DST_AUST: c_int = 2; +pub const DST_CAN: c_int = 6; +pub const DST_EET: c_int = 5; +pub const DST_MET: c_int = 4; +pub const DST_NONE: c_int = 0; +pub const DST_USA: c_int = 1; +pub const DST_WET: c_int = 3; // sys/termio.h -pub const CSTART: ::tcflag_t = 0o21; -pub const CSTOP: ::tcflag_t = 0o23; -pub const TCGETA: ::c_int = TIOC | 5; -pub const TCSETA: ::c_int = TIOC | 6; -pub const TCSETAW: ::c_int = TIOC | 7; -pub const TCSETAF: ::c_int = TIOC | 8; -pub const TCSBRK: ::c_int = TIOC | 9; -pub const TCXONC: ::c_int = TIOC | 11; -pub const TCFLSH: ::c_int = TIOC | 12; -pub const TCGETS: ::c_int = TIOC | 1; -pub const TCSETS: ::c_int = TIOC | 2; -pub const TCSANOW: ::c_int = 0; -pub const TCSETSW: ::c_int = TIOC | 3; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSETSF: ::c_int = TIOC | 4; -pub const TCSAFLUSH: ::c_int = 2; -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; -pub const TCOOFF: ::c_int = 0; -pub const TCOON: ::c_int = 1; -pub const TCIOFF: ::c_int = 2; -pub const TCION: ::c_int = 3; -pub const TIOC: ::c_int = 0x5400; -pub const TIOCGWINSZ: ::c_int = 0x40087468; -pub const TIOCSWINSZ: ::c_int = 0x80087467; -pub const TIOCLBIS: ::c_int = 0x8004747f; -pub const TIOCLBIC: ::c_int = 0x8004747e; -pub const TIOCLSET: ::c_int = 0x8004747d; -pub const TIOCLGET: ::c_int = 0x4004747c; -pub const TIOCSBRK: ::c_int = 0x2000747b; -pub const TIOCCBRK: ::c_int = 0x2000747a; -pub const TIOCSDTR: ::c_int = 0x20007479; -pub const TIOCCDTR: ::c_int = 0x20007478; -pub const TIOCSLTC: ::c_int = 0x80067475; -pub const TIOCGLTC: ::c_int = 0x40067474; -pub const TIOCOUTQ: ::c_int = 0x40047473; -pub const TIOCNOTTY: ::c_int = 0x20007471; -pub const TIOCSTOP: ::c_int = 0x2000746f; -pub const TIOCSTART: ::c_int = 0x2000746e; -pub const TIOCGPGRP: ::c_int = 0x40047477; -pub const TIOCSPGRP: ::c_int = 0x80047476; -pub const TIOCGSID: ::c_int = 0x40047448; -pub const TIOCSTI: ::c_int = 0x80017472; -pub const TIOCMSET: ::c_int = 0x8004746d; -pub const TIOCMBIS: ::c_int = 0x8004746c; -pub const TIOCMBIC: ::c_int = 0x8004746b; -pub const TIOCMGET: ::c_int = 0x4004746a; -pub const TIOCREMOTE: ::c_int = 0x80047469; +pub const CSTART: crate::tcflag_t = 0o21; +pub const CSTOP: crate::tcflag_t = 0o23; +pub const TCGETA: c_int = TIOC | 5; +pub const TCSETA: c_int = TIOC | 6; +pub const TCSETAW: c_int = TIOC | 7; +pub const TCSETAF: c_int = TIOC | 8; +pub const TCSBRK: c_int = TIOC | 9; +pub const TCXONC: c_int = TIOC | 11; +pub const TCFLSH: c_int = TIOC | 12; +pub const TCGETS: c_int = TIOC | 1; +pub const TCSETS: c_int = TIOC | 2; +pub const TCSANOW: c_int = 0; +pub const TCSETSW: c_int = TIOC | 3; +pub const TCSADRAIN: c_int = 1; +pub const TCSETSF: c_int = TIOC | 4; +pub const TCSAFLUSH: c_int = 2; +pub const TCIFLUSH: c_int = 0; +pub const TCOFLUSH: c_int = 1; +pub const TCIOFLUSH: c_int = 2; +pub const TCOOFF: c_int = 0; +pub const TCOON: c_int = 1; +pub const TCIOFF: c_int = 2; +pub const TCION: c_int = 3; +pub const TIOC: c_int = 0x5400; +pub const TIOCGWINSZ: c_int = 0x40087468; +pub const TIOCSWINSZ: c_int = 0x80087467; +pub const TIOCLBIS: c_int = 0x8004747f; +pub const TIOCLBIC: c_int = 0x8004747e; +pub const TIOCLSET: c_int = 0x8004747d; +pub const TIOCLGET: c_int = 0x4004747c; +pub const TIOCSBRK: c_int = 0x2000747b; +pub const TIOCCBRK: c_int = 0x2000747a; +pub const TIOCSDTR: c_int = 0x20007479; +pub const TIOCCDTR: c_int = 0x20007478; +pub const TIOCSLTC: c_int = 0x80067475; +pub const TIOCGLTC: c_int = 0x40067474; +pub const TIOCOUTQ: c_int = 0x40047473; +pub const TIOCNOTTY: c_int = 0x20007471; +pub const TIOCSTOP: c_int = 0x2000746f; +pub const TIOCSTART: c_int = 0x2000746e; +pub const TIOCGPGRP: c_int = 0x40047477; +pub const TIOCSPGRP: c_int = 0x80047476; +pub const TIOCGSID: c_int = 0x40047448; +pub const TIOCSTI: c_int = 0x80017472; +pub const TIOCMSET: c_int = 0x8004746d; +pub const TIOCMBIS: c_int = 0x8004746c; +pub const TIOCMBIC: c_int = 0x8004746b; +pub const TIOCMGET: c_int = 0x4004746a; +pub const TIOCREMOTE: c_int = 0x80047469; // sys/user.h -pub const MAXCOMLEN: ::c_int = 32; -pub const UF_SYSTEM: ::c_int = 0x1000; +pub const MAXCOMLEN: c_int = 32; +pub const UF_SYSTEM: c_int = 0x1000; // sys/vattr.h -pub const AT_FLAGS: ::c_int = 0x80; -pub const AT_GID: ::c_int = 8; -pub const AT_UID: ::c_int = 4; +pub const AT_FLAGS: c_int = 0x80; +pub const AT_GID: c_int = 8; +pub const AT_UID: c_int = 4; // sys/wait.h -pub const P_ALL: ::c_int = 0; -pub const P_PID: ::c_int = 1; -pub const P_PGID: ::c_int = 2; -pub const WNOHANG: ::c_int = 0x1; -pub const WUNTRACED: ::c_int = 0x2; -pub const WEXITED: ::c_int = 0x04; -pub const WCONTINUED: ::c_int = 0x01000000; -pub const WNOWAIT: ::c_int = 0x10; -pub const WSTOPPED: ::c_int = _W_STOPPED; -pub const _W_STOPPED: ::c_int = 0x00000040; -pub const _W_SLWTED: ::c_int = 0x0000007c; -pub const _W_SEWTED: ::c_int = 0x0000007d; -pub const _W_SFWTED: ::c_int = 0x0000007e; -pub const _W_STRC: ::c_int = 0x0000007f; +pub const P_ALL: c_int = 0; +pub const P_PID: c_int = 1; +pub const P_PGID: c_int = 2; +pub const WNOHANG: c_int = 0x1; +pub const WUNTRACED: c_int = 0x2; +pub const WEXITED: c_int = 0x04; +pub const WCONTINUED: c_int = 0x01000000; +pub const WNOWAIT: c_int = 0x10; +pub const WSTOPPED: c_int = _W_STOPPED; +pub const _W_STOPPED: c_int = 0x00000040; +pub const _W_SLWTED: c_int = 0x0000007c; +pub const _W_SEWTED: c_int = 0x0000007d; +pub const _W_SFWTED: c_int = 0x0000007e; +pub const _W_STRC: c_int = 0x0000007f; // termios.h pub const NCCS: usize = 16; -pub const OLCUC: ::tcflag_t = 2; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const ECHO: ::tcflag_t = 0x20000; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOCTL: ::tcflag_t = 0x00020000; -pub const ECHOPRT: ::tcflag_t = 0x00040000; -pub const ECHOKE: ::tcflag_t = 0x00080000; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXON: ::tcflag_t = 0x0001; -pub const IXOFF: ::tcflag_t = 0x00000400; -pub const IXANY: ::tcflag_t = 0x00001000; -pub const IMAXBEL: ::tcflag_t = 0x00010000; -pub const OPOST: ::tcflag_t = 0x00000001; -pub const ONLCR: ::tcflag_t = 0x00000004; -pub const OCRNL: ::tcflag_t = 0x00000008; -pub const ONOCR: ::tcflag_t = 0x00000010; -pub const ONLRET: ::tcflag_t = 0x00000020; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const IEXTEN: ::tcflag_t = 0x00200000; -pub const TOSTOP: ::tcflag_t = 0x00010000; -pub const FLUSHO: ::tcflag_t = 0x00100000; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const OLCUC: crate::tcflag_t = 2; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS5: crate::tcflag_t = 0x00000000; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const ECHO: crate::tcflag_t = 0x20000; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOCTL: crate::tcflag_t = 0x00020000; +pub const ECHOPRT: crate::tcflag_t = 0x00040000; +pub const ECHOKE: crate::tcflag_t = 0x00080000; +pub const IGNBRK: crate::tcflag_t = 0x00000001; +pub const BRKINT: crate::tcflag_t = 0x00000002; +pub const IGNPAR: crate::tcflag_t = 0x00000004; +pub const PARMRK: crate::tcflag_t = 0x00000008; +pub const INPCK: crate::tcflag_t = 0x00000010; +pub const ISTRIP: crate::tcflag_t = 0x00000020; +pub const INLCR: crate::tcflag_t = 0x00000040; +pub const IGNCR: crate::tcflag_t = 0x00000080; +pub const ICRNL: crate::tcflag_t = 0x00000100; +pub const IXON: crate::tcflag_t = 0x0001; +pub const IXOFF: crate::tcflag_t = 0x00000400; +pub const IXANY: crate::tcflag_t = 0x00001000; +pub const IMAXBEL: crate::tcflag_t = 0x00010000; +pub const OPOST: crate::tcflag_t = 0x00000001; +pub const ONLCR: crate::tcflag_t = 0x00000004; +pub const OCRNL: crate::tcflag_t = 0x00000008; +pub const ONOCR: crate::tcflag_t = 0x00000010; +pub const ONLRET: crate::tcflag_t = 0x00000020; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const IEXTEN: crate::tcflag_t = 0x00200000; +pub const TOSTOP: crate::tcflag_t = 0x00010000; +pub const FLUSHO: crate::tcflag_t = 0x00100000; +pub const PENDIN: crate::tcflag_t = 0x20000000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; pub const VINTR: usize = 0; pub const VQUIT: usize = 1; pub const VERASE: usize = 2; @@ -2268,241 +2273,241 @@ pub const VREPRINT: usize = 11; pub const VDISCRD: usize = 12; pub const VWERSE: usize = 13; pub const VLNEXT: usize = 14; -pub const B0: ::speed_t = 0x0; -pub const B50: ::speed_t = 0x1; -pub const B75: ::speed_t = 0x2; -pub const B110: ::speed_t = 0x3; -pub const B134: ::speed_t = 0x4; -pub const B150: ::speed_t = 0x5; -pub const B200: ::speed_t = 0x6; -pub const B300: ::speed_t = 0x7; -pub const B600: ::speed_t = 0x8; -pub const B1200: ::speed_t = 0x9; -pub const B1800: ::speed_t = 0xa; -pub const B2400: ::speed_t = 0xb; -pub const B4800: ::speed_t = 0xc; -pub const B9600: ::speed_t = 0xd; -pub const B19200: ::speed_t = 0xe; -pub const B38400: ::speed_t = 0xf; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const IUCLC: ::tcflag_t = 0x00000800; -pub const OFILL: ::tcflag_t = 0x00000040; -pub const OFDEL: ::tcflag_t = 0x00000080; -pub const CRDLY: ::tcflag_t = 0x00000300; -pub const CR0: ::tcflag_t = 0x00000000; -pub const CR1: ::tcflag_t = 0x00000100; -pub const CR2: ::tcflag_t = 0x00000200; -pub const CR3: ::tcflag_t = 0x00000300; -pub const TABDLY: ::tcflag_t = 0x00000c00; -pub const TAB0: ::tcflag_t = 0x00000000; -pub const TAB1: ::tcflag_t = 0x00000400; -pub const TAB2: ::tcflag_t = 0x00000800; -pub const TAB3: ::tcflag_t = 0x00000c00; -pub const BSDLY: ::tcflag_t = 0x00001000; -pub const BS0: ::tcflag_t = 0x00000000; -pub const BS1: ::tcflag_t = 0x00001000; -pub const FFDLY: ::tcflag_t = 0x00002000; -pub const FF0: ::tcflag_t = 0x00000000; -pub const FF1: ::tcflag_t = 0x00002000; -pub const NLDLY: ::tcflag_t = 0x00004000; -pub const NL0: ::tcflag_t = 0x00000000; -pub const NL1: ::tcflag_t = 0x00004000; -pub const VTDLY: ::tcflag_t = 0x00008000; -pub const VT0: ::tcflag_t = 0x00000000; -pub const VT1: ::tcflag_t = 0x00008000; -pub const OXTABS: ::tcflag_t = 0x00040000; -pub const ONOEOT: ::tcflag_t = 0x00080000; -pub const CBAUD: ::tcflag_t = 0x0000000f; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const CIBAUD: ::tcflag_t = 0x000f0000; -pub const IBSHIFT: ::tcflag_t = 16; -pub const PAREXT: ::tcflag_t = 0x00100000; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const XCASE: ::tcflag_t = 0x00000004; -pub const ALTWERASE: ::tcflag_t = 0x00400000; +pub const B0: crate::speed_t = 0x0; +pub const B50: crate::speed_t = 0x1; +pub const B75: crate::speed_t = 0x2; +pub const B110: crate::speed_t = 0x3; +pub const B134: crate::speed_t = 0x4; +pub const B150: crate::speed_t = 0x5; +pub const B200: crate::speed_t = 0x6; +pub const B300: crate::speed_t = 0x7; +pub const B600: crate::speed_t = 0x8; +pub const B1200: crate::speed_t = 0x9; +pub const B1800: crate::speed_t = 0xa; +pub const B2400: crate::speed_t = 0xb; +pub const B4800: crate::speed_t = 0xc; +pub const B9600: crate::speed_t = 0xd; +pub const B19200: crate::speed_t = 0xe; +pub const B38400: crate::speed_t = 0xf; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const IUCLC: crate::tcflag_t = 0x00000800; +pub const OFILL: crate::tcflag_t = 0x00000040; +pub const OFDEL: crate::tcflag_t = 0x00000080; +pub const CRDLY: crate::tcflag_t = 0x00000300; +pub const CR0: crate::tcflag_t = 0x00000000; +pub const CR1: crate::tcflag_t = 0x00000100; +pub const CR2: crate::tcflag_t = 0x00000200; +pub const CR3: crate::tcflag_t = 0x00000300; +pub const TABDLY: crate::tcflag_t = 0x00000c00; +pub const TAB0: crate::tcflag_t = 0x00000000; +pub const TAB1: crate::tcflag_t = 0x00000400; +pub const TAB2: crate::tcflag_t = 0x00000800; +pub const TAB3: crate::tcflag_t = 0x00000c00; +pub const BSDLY: crate::tcflag_t = 0x00001000; +pub const BS0: crate::tcflag_t = 0x00000000; +pub const BS1: crate::tcflag_t = 0x00001000; +pub const FFDLY: crate::tcflag_t = 0x00002000; +pub const FF0: crate::tcflag_t = 0x00000000; +pub const FF1: crate::tcflag_t = 0x00002000; +pub const NLDLY: crate::tcflag_t = 0x00004000; +pub const NL0: crate::tcflag_t = 0x00000000; +pub const NL1: crate::tcflag_t = 0x00004000; +pub const VTDLY: crate::tcflag_t = 0x00008000; +pub const VT0: crate::tcflag_t = 0x00000000; +pub const VT1: crate::tcflag_t = 0x00008000; +pub const OXTABS: crate::tcflag_t = 0x00040000; +pub const ONOEOT: crate::tcflag_t = 0x00080000; +pub const CBAUD: crate::tcflag_t = 0x0000000f; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const CIBAUD: crate::tcflag_t = 0x000f0000; +pub const IBSHIFT: crate::tcflag_t = 16; +pub const PAREXT: crate::tcflag_t = 0x00100000; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const XCASE: crate::tcflag_t = 0x00000004; +pub const ALTWERASE: crate::tcflag_t = 0x00400000; // time.h -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 11; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 12; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 11; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 12; // unistd.h -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const _POSIX_VDISABLE: ::c_int = 0xff; -pub const _PC_LINK_MAX: ::c_int = 11; -pub const _PC_MAX_CANON: ::c_int = 12; -pub const _PC_MAX_INPUT: ::c_int = 13; -pub const _PC_NAME_MAX: ::c_int = 14; -pub const _PC_PATH_MAX: ::c_int = 16; -pub const _PC_PIPE_BUF: ::c_int = 17; -pub const _PC_NO_TRUNC: ::c_int = 15; -pub const _PC_VDISABLE: ::c_int = 18; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 10; -pub const _PC_ASYNC_IO: ::c_int = 19; -pub const _PC_PRIO_IO: ::c_int = 21; -pub const _PC_SYNC_IO: ::c_int = 20; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 26; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 27; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 28; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 29; -pub const _PC_REC_XFER_ALIGN: ::c_int = 30; -pub const _PC_SYMLINK_MAX: ::c_int = 25; -pub const _PC_2_SYMLINKS: ::c_int = 31; -pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 32; -pub const _PC_FILESIZEBITS: ::c_int = 22; -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_JOB_CONTROL: ::c_int = 7; -pub const _SC_SAVED_IDS: ::c_int = 8; -pub const _SC_VERSION: ::c_int = 9; -pub const _SC_PASS_MAX: ::c_int = 45; -pub const _SC_PAGESIZE: ::c_int = _SC_PAGE_SIZE; -pub const _SC_PAGE_SIZE: ::c_int = 48; -pub const _SC_XOPEN_VERSION: ::c_int = 46; -pub const _SC_NPROCESSORS_CONF: ::c_int = 71; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 72; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 75; -pub const _SC_AIO_MAX: ::c_int = 76; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 77; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 78; -pub const _SC_DELAYTIMER_MAX: ::c_int = 79; -pub const _SC_FSYNC: ::c_int = 80; -pub const _SC_MAPPED_FILES: ::c_int = 84; -pub const _SC_MEMLOCK: ::c_int = 85; -pub const _SC_MEMLOCK_RANGE: ::c_int = 86; -pub const _SC_MEMORY_PROTECTION: ::c_int = 87; -pub const _SC_MESSAGE_PASSING: ::c_int = 88; -pub const _SC_MQ_OPEN_MAX: ::c_int = 89; -pub const _SC_MQ_PRIO_MAX: ::c_int = 90; -pub const _SC_PRIORITIZED_IO: ::c_int = 91; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 92; -pub const _SC_REALTIME_SIGNALS: ::c_int = 93; -pub const _SC_RTSIG_MAX: ::c_int = 94; -pub const _SC_SEMAPHORES: ::c_int = 95; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 96; -pub const _SC_SEM_VALUE_MAX: ::c_int = 97; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 98; -pub const _SC_SIGQUEUE_MAX: ::c_int = 99; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 100; -pub const _SC_TIMERS: ::c_int = 102; -pub const _SC_TIMER_MAX: ::c_int = 103; -pub const _SC_2_C_BIND: ::c_int = 51; -pub const _SC_2_C_DEV: ::c_int = 32; -pub const _SC_2_C_VERSION: ::c_int = 52; -pub const _SC_2_FORT_DEV: ::c_int = 33; -pub const _SC_2_FORT_RUN: ::c_int = 34; -pub const _SC_2_LOCALEDEF: ::c_int = 35; -pub const _SC_2_SW_DEV: ::c_int = 36; -pub const _SC_2_UPE: ::c_int = 53; -pub const _SC_2_VERSION: ::c_int = 31; -pub const _SC_BC_BASE_MAX: ::c_int = 23; -pub const _SC_BC_DIM_MAX: ::c_int = 24; -pub const _SC_BC_SCALE_MAX: ::c_int = 25; -pub const _SC_BC_STRING_MAX: ::c_int = 26; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 50; -pub const _SC_EXPR_NEST_MAX: ::c_int = 28; -pub const _SC_LINE_MAX: ::c_int = 29; -pub const _SC_RE_DUP_MAX: ::c_int = 30; -pub const _SC_XOPEN_CRYPT: ::c_int = 56; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 57; -pub const _SC_XOPEN_SHM: ::c_int = 55; -pub const _SC_2_CHAR_TERM: ::c_int = 54; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 109; -pub const _SC_ATEXIT_MAX: ::c_int = 47; -pub const _SC_IOV_MAX: ::c_int = 58; -pub const _SC_XOPEN_UNIX: ::c_int = 73; -pub const _SC_T_IOV_MAX: ::c_int = 0; -pub const _SC_PHYS_PAGES: ::c_int = 113; -pub const _SC_AVPHYS_PAGES: ::c_int = 114; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 101; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 81; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 82; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 83; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 68; -pub const _SC_THREAD_STACK_MIN: ::c_int = 69; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 70; -pub const _SC_TTY_NAME_MAX: ::c_int = 104; -pub const _SC_THREADS: ::c_int = 60; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 61; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 62; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 64; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 65; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 66; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 59; -pub const _SC_XOPEN_LEGACY: ::c_int = 112; -pub const _SC_XOPEN_REALTIME: ::c_int = 110; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 111; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 105; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 106; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 107; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 108; -pub const _SC_2_PBS: ::c_int = 132; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 133; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 134; -pub const _SC_2_PBS_LOCATE: ::c_int = 135; -pub const _SC_2_PBS_MESSAGE: ::c_int = 136; -pub const _SC_2_PBS_TRACK: ::c_int = 137; -pub const _SC_ADVISORY_INFO: ::c_int = 130; -pub const _SC_BARRIERS: ::c_int = 138; -pub const _SC_CLOCK_SELECTION: ::c_int = 139; -pub const _SC_CPUTIME: ::c_int = 140; -pub const _SC_HOST_NAME_MAX: ::c_int = 126; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 141; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 142; -pub const _SC_REGEXP: ::c_int = 127; -pub const _SC_SHELL: ::c_int = 128; -pub const _SC_SPAWN: ::c_int = 143; -pub const _SC_SPIN_LOCKS: ::c_int = 144; -pub const _SC_SPORADIC_SERVER: ::c_int = 145; -pub const _SC_SS_REPL_MAX: ::c_int = 156; -pub const _SC_SYMLOOP_MAX: ::c_int = 129; -pub const _SC_THREAD_CPUTIME: ::c_int = 146; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 147; -pub const _SC_TIMEOUTS: ::c_int = 148; -pub const _SC_TRACE: ::c_int = 149; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 150; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 157; -pub const _SC_TRACE_INHERIT: ::c_int = 151; -pub const _SC_TRACE_LOG: ::c_int = 152; -pub const _SC_TRACE_NAME_MAX: ::c_int = 158; -pub const _SC_TRACE_SYS_MAX: ::c_int = 159; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 160; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 153; -pub const _SC_V6_ILP32_OFF32: ::c_int = 121; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 122; -pub const _SC_V6_LP64_OFF64: ::c_int = 123; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 124; -pub const _SC_XOPEN_STREAMS: ::c_int = 125; -pub const _SC_IPV6: ::c_int = 154; -pub const _SC_RAW_SOCKETS: ::c_int = 155; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const _POSIX_VDISABLE: c_int = 0xff; +pub const _PC_LINK_MAX: c_int = 11; +pub const _PC_MAX_CANON: c_int = 12; +pub const _PC_MAX_INPUT: c_int = 13; +pub const _PC_NAME_MAX: c_int = 14; +pub const _PC_PATH_MAX: c_int = 16; +pub const _PC_PIPE_BUF: c_int = 17; +pub const _PC_NO_TRUNC: c_int = 15; +pub const _PC_VDISABLE: c_int = 18; +pub const _PC_CHOWN_RESTRICTED: c_int = 10; +pub const _PC_ASYNC_IO: c_int = 19; +pub const _PC_PRIO_IO: c_int = 21; +pub const _PC_SYNC_IO: c_int = 20; +pub const _PC_ALLOC_SIZE_MIN: c_int = 26; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 27; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 28; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 29; +pub const _PC_REC_XFER_ALIGN: c_int = 30; +pub const _PC_SYMLINK_MAX: c_int = 25; +pub const _PC_2_SYMLINKS: c_int = 31; +pub const _PC_TIMESTAMP_RESOLUTION: c_int = 32; +pub const _PC_FILESIZEBITS: c_int = 22; +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_JOB_CONTROL: c_int = 7; +pub const _SC_SAVED_IDS: c_int = 8; +pub const _SC_VERSION: c_int = 9; +pub const _SC_PASS_MAX: c_int = 45; +pub const _SC_PAGESIZE: c_int = _SC_PAGE_SIZE; +pub const _SC_PAGE_SIZE: c_int = 48; +pub const _SC_XOPEN_VERSION: c_int = 46; +pub const _SC_NPROCESSORS_CONF: c_int = 71; +pub const _SC_NPROCESSORS_ONLN: c_int = 72; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; +pub const _SC_AIO_LISTIO_MAX: c_int = 75; +pub const _SC_AIO_MAX: c_int = 76; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 77; +pub const _SC_ASYNCHRONOUS_IO: c_int = 78; +pub const _SC_DELAYTIMER_MAX: c_int = 79; +pub const _SC_FSYNC: c_int = 80; +pub const _SC_MAPPED_FILES: c_int = 84; +pub const _SC_MEMLOCK: c_int = 85; +pub const _SC_MEMLOCK_RANGE: c_int = 86; +pub const _SC_MEMORY_PROTECTION: c_int = 87; +pub const _SC_MESSAGE_PASSING: c_int = 88; +pub const _SC_MQ_OPEN_MAX: c_int = 89; +pub const _SC_MQ_PRIO_MAX: c_int = 90; +pub const _SC_PRIORITIZED_IO: c_int = 91; +pub const _SC_PRIORITY_SCHEDULING: c_int = 92; +pub const _SC_REALTIME_SIGNALS: c_int = 93; +pub const _SC_RTSIG_MAX: c_int = 94; +pub const _SC_SEMAPHORES: c_int = 95; +pub const _SC_SEM_NSEMS_MAX: c_int = 96; +pub const _SC_SEM_VALUE_MAX: c_int = 97; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 98; +pub const _SC_SIGQUEUE_MAX: c_int = 99; +pub const _SC_SYNCHRONIZED_IO: c_int = 100; +pub const _SC_TIMERS: c_int = 102; +pub const _SC_TIMER_MAX: c_int = 103; +pub const _SC_2_C_BIND: c_int = 51; +pub const _SC_2_C_DEV: c_int = 32; +pub const _SC_2_C_VERSION: c_int = 52; +pub const _SC_2_FORT_DEV: c_int = 33; +pub const _SC_2_FORT_RUN: c_int = 34; +pub const _SC_2_LOCALEDEF: c_int = 35; +pub const _SC_2_SW_DEV: c_int = 36; +pub const _SC_2_UPE: c_int = 53; +pub const _SC_2_VERSION: c_int = 31; +pub const _SC_BC_BASE_MAX: c_int = 23; +pub const _SC_BC_DIM_MAX: c_int = 24; +pub const _SC_BC_SCALE_MAX: c_int = 25; +pub const _SC_BC_STRING_MAX: c_int = 26; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 50; +pub const _SC_EXPR_NEST_MAX: c_int = 28; +pub const _SC_LINE_MAX: c_int = 29; +pub const _SC_RE_DUP_MAX: c_int = 30; +pub const _SC_XOPEN_CRYPT: c_int = 56; +pub const _SC_XOPEN_ENH_I18N: c_int = 57; +pub const _SC_XOPEN_SHM: c_int = 55; +pub const _SC_2_CHAR_TERM: c_int = 54; +pub const _SC_XOPEN_XCU_VERSION: c_int = 109; +pub const _SC_ATEXIT_MAX: c_int = 47; +pub const _SC_IOV_MAX: c_int = 58; +pub const _SC_XOPEN_UNIX: c_int = 73; +pub const _SC_T_IOV_MAX: c_int = 0; +pub const _SC_PHYS_PAGES: c_int = 113; +pub const _SC_AVPHYS_PAGES: c_int = 114; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 101; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 81; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 82; +pub const _SC_LOGIN_NAME_MAX: c_int = 83; +pub const _SC_THREAD_KEYS_MAX: c_int = 68; +pub const _SC_THREAD_STACK_MIN: c_int = 69; +pub const _SC_THREAD_THREADS_MAX: c_int = 70; +pub const _SC_TTY_NAME_MAX: c_int = 104; +pub const _SC_THREADS: c_int = 60; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 61; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 62; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 64; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 65; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 66; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 59; +pub const _SC_XOPEN_LEGACY: c_int = 112; +pub const _SC_XOPEN_REALTIME: c_int = 110; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 111; +pub const _SC_XBS5_ILP32_OFF32: c_int = 105; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 106; +pub const _SC_XBS5_LP64_OFF64: c_int = 107; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 108; +pub const _SC_2_PBS: c_int = 132; +pub const _SC_2_PBS_ACCOUNTING: c_int = 133; +pub const _SC_2_PBS_CHECKPOINT: c_int = 134; +pub const _SC_2_PBS_LOCATE: c_int = 135; +pub const _SC_2_PBS_MESSAGE: c_int = 136; +pub const _SC_2_PBS_TRACK: c_int = 137; +pub const _SC_ADVISORY_INFO: c_int = 130; +pub const _SC_BARRIERS: c_int = 138; +pub const _SC_CLOCK_SELECTION: c_int = 139; +pub const _SC_CPUTIME: c_int = 140; +pub const _SC_HOST_NAME_MAX: c_int = 126; +pub const _SC_MONOTONIC_CLOCK: c_int = 141; +pub const _SC_READER_WRITER_LOCKS: c_int = 142; +pub const _SC_REGEXP: c_int = 127; +pub const _SC_SHELL: c_int = 128; +pub const _SC_SPAWN: c_int = 143; +pub const _SC_SPIN_LOCKS: c_int = 144; +pub const _SC_SPORADIC_SERVER: c_int = 145; +pub const _SC_SS_REPL_MAX: c_int = 156; +pub const _SC_SYMLOOP_MAX: c_int = 129; +pub const _SC_THREAD_CPUTIME: c_int = 146; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 147; +pub const _SC_TIMEOUTS: c_int = 148; +pub const _SC_TRACE: c_int = 149; +pub const _SC_TRACE_EVENT_FILTER: c_int = 150; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 157; +pub const _SC_TRACE_INHERIT: c_int = 151; +pub const _SC_TRACE_LOG: c_int = 152; +pub const _SC_TRACE_NAME_MAX: c_int = 158; +pub const _SC_TRACE_SYS_MAX: c_int = 159; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 160; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 153; +pub const _SC_V6_ILP32_OFF32: c_int = 121; +pub const _SC_V6_ILP32_OFFBIG: c_int = 122; +pub const _SC_V6_LP64_OFF64: c_int = 123; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 124; +pub const _SC_XOPEN_STREAMS: c_int = 125; +pub const _SC_IPV6: c_int = 154; +pub const _SC_RAW_SOCKETS: c_int = 155; // utmp.h -pub const EMPTY: ::c_short = -1; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const OLD_TIME: ::c_short = 3; -pub const NEW_TIME: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; -pub const ACCOUNTING: ::c_short = 9; +pub const EMPTY: c_short = -1; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const OLD_TIME: c_short = 3; +pub const NEW_TIME: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; +pub const ACCOUNTING: c_short = 9; f! { pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { - if (*mhdr).msg_controllen as usize >= ::mem::size_of::() { + if (*mhdr).msg_controllen as usize >= crate::mem::size_of::() { (*mhdr).msg_control as *mut cmsghdr } else { 0 as *mut cmsghdr @@ -2513,10 +2518,10 @@ f! { if cmsg.is_null() { CMSG_FIRSTHDR(mhdr) } else { - if (cmsg as usize + (*cmsg).cmsg_len as usize + ::mem::size_of::<::cmsghdr>()) + if (cmsg as usize + (*cmsg).cmsg_len as usize + crate::mem::size_of::()) > ((*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize) { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { // AIX does not have any alignment/padding for ancillary data, so we don't need _CMSG_ALIGN here. (cmsg as usize + (*cmsg).cmsg_len as usize) as *mut cmsghdr @@ -2524,16 +2529,16 @@ f! { } } - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(::mem::size_of::<::cmsghdr>() as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(crate::mem::size_of::() as isize) } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - ::mem::size_of::<::cmsghdr>() as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + crate::mem::size_of::() as c_uint + length } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - ::mem::size_of::<::cmsghdr>() as ::c_uint + length + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + crate::mem::size_of::() as c_uint + length } pub fn FD_ZERO(set: *mut fd_set) -> () { @@ -2542,39 +2547,39 @@ f! { } } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of::<::c_long>() * 8; + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of::() * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of::<::c_long>() * 8; + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of::() * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { - let bits = ::mem::size_of::<::c_long>() * 8; + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + let bits = crate::mem::size_of::() * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn major(dev: ::dev_t) -> ::c_uint { + pub fn major(dev: crate::dev_t) -> c_uint { let x = dev >> 16; - x as ::c_uint + x as c_uint } - pub fn minor(dev: ::dev_t) -> ::c_uint { + pub fn minor(dev: crate::dev_t) -> c_uint { let y = dev & 0xFFFF; - y as ::c_uint + y as c_uint } - pub fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= major << 16; dev |= minor; @@ -2583,310 +2588,303 @@ f! { } safe_f! { - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & _W_STOPPED) != 0 } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { if WIFSTOPPED(status) { - (((status as ::c_uint) >> 8) & 0xff) as ::c_int + (((status as c_uint) >> 8) & 0xff) as c_int } else { -1 } } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0xFF) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { if WIFEXITED(status) { - (((status as ::c_uint) >> 8) & 0xff) as ::c_int + (((status as c_uint) >> 8) & 0xff) as c_int } else { -1 } } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { !WIFEXITED(status) && !WIFSTOPPED(status) } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { if WIFSIGNALED(status) { - (((status as ::c_uint) >> 16) & 0xff) as ::c_int + (((status as c_uint) >> 16) & 0xff) as c_int } else { -1 } } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { (status & WCONTINUED) != 0 } // AIX doesn't have native WCOREDUMP. - pub {const} fn WCOREDUMP(_status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(_status: c_int) -> bool { false } } #[link(name = "thread")] extern "C" { - pub fn thr_kill(id: thread_t, sig: ::c_int) -> ::c_int; + pub fn thr_kill(id: thread_t, sig: c_int) -> c_int; pub fn thr_self() -> thread_t; } #[link(name = "pthread")] extern "C" { pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getschedparam( - attr: *const ::pthread_attr_t, + attr: *const crate::pthread_attr_t, param: *mut sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; pub fn pthread_attr_setschedparam( - attr: *mut ::pthread_attr_t, + attr: *mut crate::pthread_attr_t, param: *const sched_param, - ) -> ::c_int; - pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; + ) -> c_int; + pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; pub fn pthread_barrier_init( barrier: *mut pthread_barrier_t, - attr: *const ::pthread_barrierattr_t, - count: ::c_uint, - ) -> ::c_int; - pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_getpshared( - attr: *const ::pthread_barrierattr_t, - shared: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + shared: *mut c_int, + ) -> c_int; + pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_setpshared( - attr: *mut ::pthread_barrierattr_t, - shared: ::c_int, - ) -> ::c_int; - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; + attr: *mut crate::pthread_barrierattr_t, + shared: c_int, + ) -> c_int; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; - pub fn pthread_getattr_np(native: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; + pub fn pthread_getattr_np(native: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn pthread_getschedparam( - thread: ::pthread_t, - policy: *mut ::c_int, + thread: crate::pthread_t, + policy: *mut c_int, param: *mut sched_param, - ) -> ::c_int; - pub fn pthread_kill(thread: ::pthread_t, signal: ::c_int) -> ::c_int; - pub fn pthread_mutex_consistent(mutex: *mut ::pthread_mutex_t) -> ::c_int; + ) -> c_int; + pub fn pthread_kill(thread: crate::pthread_t, signal: c_int) -> c_int; + pub fn pthread_mutex_consistent(mutex: *mut crate::pthread_mutex_t) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; pub fn pthread_mutexattr_getprotocol( attr: *const pthread_mutexattr_t, - protocol: *mut ::c_int, - ) -> ::c_int; + protocol: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_getrobust( - attr: *mut ::pthread_mutexattr_t, - robust: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_mutexattr_setprotocol( - attr: *mut pthread_mutexattr_t, - protocol: ::c_int, - ) -> ::c_int; - pub fn pthread_mutexattr_setpshared( - attr: *mut pthread_mutexattr_t, - pshared: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_mutexattr_t, + robust: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setprotocol(attr: *mut pthread_mutexattr_t, protocol: c_int) -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; pub fn pthread_mutexattr_setrobust( - attr: *mut ::pthread_mutexattr_t, - robust: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_mutexattr_t, + robust: c_int, + ) -> c_int; pub fn pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; + val: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: c_int) -> c_int; pub fn pthread_setschedparam( - thread: ::pthread_t, - policy: ::c_int, + thread: crate::pthread_t, + policy: c_int, param: *const sched_param, - ) -> ::c_int; - pub fn pthread_setschedprio(native: ::pthread_t, priority: ::c_int) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> ::c_int; + ) -> c_int; + pub fn pthread_setschedprio(native: crate::pthread_t, priority: c_int) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; } #[link(name = "iconv")] extern "C" { pub fn iconv( cd: iconv_t, - inbuf: *mut *mut ::c_char, - inbytesleft: *mut ::size_t, - outbuf: *mut *mut ::c_char, - outbytesleft: *mut ::size_t, - ) -> ::size_t; - pub fn iconv_close(cd: iconv_t) -> ::c_int; - pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; + inbuf: *mut *mut c_char, + inbytesleft: *mut size_t, + outbuf: *mut *mut c_char, + outbytesleft: *mut size_t, + ) -> size_t; + pub fn iconv_close(cd: iconv_t) -> c_int; + pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t; } extern "C" { - pub fn acct(filename: *const ::c_char) -> ::c_int; - pub fn aio_cancel(fildes: ::c_int, aiocbp: *mut ::aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *mut ::aiocb) -> ::c_int; + pub fn acct(filename: *const c_char) -> c_int; + pub fn aio_cancel(fildes: c_int, aiocbp: *mut crate::aiocb) -> c_int; + pub fn aio_error(aiocbp: *mut crate::aiocb) -> c_int; #[link_name = "_posix_aio_fsync"] - pub fn aio_fsync(op: ::c_int, aiocbp: *mut ::aiocb) -> ::c_int; - pub fn aio_read(aiocbp: *mut ::aiocb) -> ::c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut crate::aiocb) -> c_int; + pub fn aio_read(aiocbp: *mut crate::aiocb) -> c_int; // pub fn aio_suspend // pub fn aio_write - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; - pub fn brk(addr: *mut ::c_void) -> ::c_int; - pub fn clearenv() -> ::c_int; - pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + pub fn basename(path: *mut c_char) -> *mut c_char; + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; + pub fn brk(addr: *mut c_void) -> c_int; + pub fn clearenv() -> c_int; + pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; - pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn drand48() -> ::c_double; - pub fn duplocale(arg1: ::locale_t) -> ::locale_t; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; + pub fn clock_settime(clock_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn creat64(path: *const c_char, mode: mode_t) -> c_int; + pub fn ctermid(s: *mut c_char) -> *mut c_char; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn drand48() -> c_double; + pub fn duplocale(arg1: crate::locale_t) -> crate::locale_t; pub fn endgrent(); - pub fn endmntent(streamp: *mut ::FILE) -> ::c_int; + pub fn endmntent(streamp: *mut crate::FILE) -> c_int; pub fn endpwent(); pub fn endutent(); pub fn endutxent(); - pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; - pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; - pub fn ffs(value: ::c_int) -> ::c_int; - pub fn ffsl(value: ::c_long) -> ::c_int; - pub fn ffsll(value: ::c_longlong) -> ::c_int; - pub fn fgetgrent(file: *mut ::FILE) -> *mut ::group; - pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; - pub fn fgetpwent(file: *mut ::FILE) -> *mut ::passwd; - pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn freelocale(loc: ::locale_t); + pub fn erand48(xseed: *mut c_ushort) -> c_double; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; + pub fn fattach(fildes: c_int, path: *const c_char) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; + pub fn ffs(value: c_int) -> c_int; + pub fn ffsl(value: c_long) -> c_int; + pub fn ffsll(value: c_longlong) -> c_int; + pub fn fgetgrent(file: *mut crate::FILE) -> *mut crate::group; + pub fn fgetpos64(stream: *mut crate::FILE, ptr: *mut fpos64_t) -> c_int; + pub fn fgetpwent(file: *mut crate::FILE) -> *mut crate::passwd; + pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn freelocale(loc: crate::locale_t); pub fn freopen64( filename: *const c_char, mode: *const c_char, - file: *mut ::FILE, - ) -> *mut ::FILE; - pub fn fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int; - pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; - pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int; - pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int; - pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; - pub fn ftok(path: *const ::c_char, id: ::c_int) -> ::key_t; - pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; - pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; - pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; - pub fn getdtablesize() -> ::c_int; - pub fn getgrent() -> *mut ::group; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + file: *mut crate::FILE, + ) -> *mut crate::FILE; + pub fn fseeko64(stream: *mut crate::FILE, offset: off64_t, whence: c_int) -> c_int; + pub fn fsetpos64(stream: *mut crate::FILE, ptr: *const fpos64_t) -> c_int; + pub fn fstat64(fildes: c_int, buf: *mut stat64) -> c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn fstatfs64(fd: c_int, buf: *mut statfs64) -> c_int; + pub fn fstatvfs64(fd: c_int, buf: *mut statvfs64) -> c_int; + pub fn ftello64(stream: *mut crate::FILE) -> off64_t; + pub fn ftok(path: *const c_char, id: c_int) -> crate::key_t; + pub fn ftruncate64(fd: c_int, length: off64_t) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn getcontext(ucp: *mut ucontext_t) -> c_int; + pub fn getdomainname(name: *mut c_char, len: c_int) -> c_int; + pub fn getdtablesize() -> c_int; + pub fn getgrent() -> *mut crate::group; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn getgrset(user: *mut ::c_char) -> *mut ::c_char; - pub fn gethostid() -> ::c_long; - pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn getgrset(user: *mut c_char) -> *mut c_char; + pub fn gethostid() -> c_long; + pub fn getmntent(stream: *mut crate::FILE) -> *mut crate::mntent; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::size_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn getpagesize() -> ::c_int; - pub fn getpeereid(socket: ::c_int, euid: *mut ::uid_t, egid: *mut ::gid_t) -> ::c_int; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn getpwent() -> *mut ::passwd; + sa: *const crate::sockaddr, + salen: size_t, + host: *mut c_char, + hostlen: size_t, + serv: *mut c_char, + servlen: size_t, + flags: c_int, + ) -> c_int; + pub fn getpagesize() -> c_int; + pub fn getpeereid(socket: c_int, euid: *mut crate::uid_t, egid: *mut crate::gid_t) -> c_int; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn getpwent() -> *mut crate::passwd; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int; + ) -> c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn getrlimit64(resource: c_int, rlim: *mut rlimit64) -> c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn getitimer(which: c_int, curr_value: *mut crate::itimerval) -> c_int; pub fn getutent() -> *mut utmp; pub fn getutid(u: *const utmp) -> *mut utmp; pub fn getutline(u: *const utmp) -> *mut utmp; @@ -2894,437 +2892,398 @@ extern "C" { pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; pub fn glob( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); - pub fn hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char; - pub fn hcreate(nelt: ::size_t) -> ::c_int; + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); + pub fn hasmntopt(mnt: *const crate::mntent, opt: *const c_char) -> *mut c_char; + pub fn hcreate(nelt: size_t) -> c_int; pub fn hdestroy(); - pub fn hsearch(entry: entry, action: ::c_int) -> *mut entry; + pub fn hsearch(entry: entry, action: c_int) -> *mut entry; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn if_nameindex() -> *mut if_nameindex; - pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; - pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int; - pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn lcong48(p: *mut ::c_ushort); + pub fn initgroups(name: *const c_char, basegid: crate::gid_t) -> c_int; + pub fn ioctl(fildes: c_int, request: c_int, ...) -> c_int; + pub fn jrand48(xseed: *mut c_ushort) -> c_long; + pub fn lcong48(p: *mut c_ushort); pub fn lfind( - key: *const ::c_void, - base: *const ::c_void, - nelp: *mut ::size_t, - width: ::size_t, - compar: ::Option ::c_int>, - ) -> *mut ::c_void; + key: *const c_void, + base: *const c_void, + nelp: *mut size_t, + width: size_t, + compar: Option c_int>, + ) -> *mut c_void; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, + nitems: c_int, sevp: *mut sigevent, - ) -> ::c_int; - pub fn loadquery(flags: ::c_int, buf: *mut ::c_char, buflen: ::c_uint) -> ::c_int; - pub fn lpar_get_info(command: ::c_int, buf: *mut ::c_void, bufsize: ::size_t) -> ::c_int; - pub fn lpar_set_resources(id: ::c_int, resource: *mut ::c_void) -> ::c_int; + ) -> c_int; + pub fn loadquery(flags: c_int, buf: *mut c_char, buflen: c_uint) -> c_int; + pub fn lpar_get_info(command: c_int, buf: *mut c_void, bufsize: size_t) -> c_int; + pub fn lpar_set_resources(id: c_int, resource: *mut c_void) -> c_int; pub fn lrand48() -> c_long; pub fn lsearch( - key: *const ::c_void, - base: *mut ::c_void, - nelp: *mut ::size_t, - width: ::size_t, - compar: ::Option ::c_int>, - ) -> *mut ::c_void; - pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t; - pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; - pub fn makecontext(ucp: *mut ::ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); - pub fn mallinfo() -> ::mallinfo; - pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int; + key: *const c_void, + base: *mut c_void, + nelp: *mut size_t, + width: size_t, + compar: Option c_int>, + ) -> *mut c_void; + pub fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> off64_t; + pub fn lstat64(path: *const c_char, buf: *mut stat64) -> c_int; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; + pub fn makecontext(ucp: *mut crate::ucontext_t, func: extern "C" fn(), argc: c_int, ...); + pub fn mallinfo() -> crate::mallinfo; + pub fn mallopt(param: c_int, value: c_int) -> c_int; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; - pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int; - pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; - pub fn mount(device: *const ::c_char, path: *const ::c_char, flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; + pub fn memset_s(s: *mut c_void, smax: size_t, c: c_int, n: size_t) -> c_int; + pub fn mincore(addr: *const c_void, len: size_t, vec: *mut c_char) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; + pub fn mount(device: *const c_char, path: *const c_char, flags: c_int) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; + pub fn mq_notify(mqd: crate::mqd_t, notification: *const crate::sigevent) -> c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; + pub fn mq_setattr( + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; pub fn mrand48() -> c_long; - pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int; - pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int; + pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int; + pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int; pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; - pub fn msgsnd( - msqid: ::c_int, - msgp: *const ::c_void, - msgsz: ::size_t, - msgflg: ::c_int, - ) -> ::c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - pub fn nl_langinfo_l(item: ::nl_item, loc: ::locale_t) -> *mut ::c_char; - pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - pub fn pollset_create(maxfd: ::c_int) -> pollset_t; - pub fn pollset_ctl( - ps: pollset_t, - pollctl_array: *mut poll_ctl, - array_length: ::c_int, - ) -> ::c_int; - pub fn pollset_destroy(ps: pollset_t) -> ::c_int; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; + pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + pub fn nl_langinfo_l(item: crate::nl_item, loc: crate::locale_t) -> *mut c_char; + pub fn nrand48(xseed: *mut c_ushort) -> c_long; + pub fn open64(path: *const c_char, oflag: c_int, ...) -> c_int; + pub fn pollset_create(maxfd: c_int) -> pollset_t; + pub fn pollset_ctl(ps: pollset_t, pollctl_array: *mut poll_ctl, array_length: c_int) -> c_int; + pub fn pollset_destroy(ps: pollset_t) -> c_int; pub fn pollset_poll( ps: pollset_t, - polldata_array: *mut ::pollfd, - array_length: ::c_int, - timeout: ::c_int, - ) -> ::c_int; - pub fn pollset_query(ps: pollset_t, pollfd_query: *mut ::pollfd) -> ::c_int; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; - pub fn posix_fadvise64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, - advise: ::c_int, - ) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + polldata_array: *mut crate::pollfd, + array_length: c_int, + timeout: c_int, + ) -> c_int; + pub fn pollset_query(ps: pollset_t, pollfd_query: *mut crate::pollfd) -> c_int; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; + pub fn posix_fadvise64(fd: c_int, offset: off64_t, len: off64_t, advise: c_int) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; pub fn posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, - param: *mut ::sched_param, - ) -> ::c_int; + param: *mut crate::sched_param, + ) -> c_int; pub fn posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, - flags: *mut ::c_int, - ) -> ::c_int; + flags: *mut c_int, + ) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, default: *mut sigset_t, - ) -> ::c_int; + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, default: *mut sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, - param: *const ::sched_param, - ) -> ::c_int; - pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; + param: *const crate::sched_param, + ) -> c_int; + pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off64_t) -> ::ssize_t; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn pread64(fd: c_int, buf: *mut c_void, count: size_t, offset: off64_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; pub fn ptrace64( - request: ::c_int, - id: ::c_longlong, - addr: ::c_longlong, - data: ::c_int, - buff: *mut ::c_int, - ) -> ::c_int; + request: c_int, + id: c_longlong, + addr: c_longlong, + data: c_int, + buff: *mut c_int, + ) -> c_int; pub fn pututline(u: *const utmp) -> *mut utmp; pub fn pututxline(ut: *const utmpx) -> *mut utmpx; - pub fn pwrite64( - fd: ::c_int, - buf: *const ::c_void, - count: ::size_t, - offset: off64_t, - ) -> ::ssize_t; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; + pub fn pwrite64(fd: c_int, buf: *const c_void, count: size_t, offset: off64_t) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; #[link_name = "__linux_quotactl"] - pub fn quotactl( - cmd: ::c_int, - special: *const ::c_char, - id: ::c_int, - data: *mut ::c_char, - ) -> ::c_int; - pub fn rand() -> ::c_int; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn quotactl(cmd: c_int, special: *const c_char, id: c_int, data: *mut c_char) -> c_int; + pub fn rand() -> c_int; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - timeout: *mut ::timespec, - ) -> ::c_int; - pub fn recvmsg(sockfd: ::c_int, msg: *mut msghdr, flags: ::c_int) -> ::ssize_t; - pub fn regcomp(preg: *mut regex_t, pattern: *const ::c_char, cflags: ::c_int) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + timeout: *mut crate::timespec, + ) -> c_int; + pub fn recvmsg(sockfd: c_int, msg: *mut msghdr, flags: c_int) -> ssize_t; + pub fn regcomp(preg: *mut regex_t, pattern: *const c_char, cflags: c_int) -> c_int; pub fn regerror( - errcode: ::c_int, - preg: *const ::regex_t, - errbuf: *mut ::c_char, - errbuf_size: ::size_t, - ) -> ::size_t; + errcode: c_int, + preg: *const crate::regex_t, + errbuf: *mut c_char, + errbuf_size: size_t, + ) -> size_t; pub fn regexec( preg: *const regex_t, - input: *const ::c_char, - nmatch: ::size_t, + input: *const c_char, + nmatch: size_t, pmatch: *mut regmatch_t, - eflags: ::c_int, - ) -> ::c_int; + eflags: c_int, + ) -> c_int; pub fn regfree(preg: *mut regex_t); - pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; - pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; - pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; + pub fn sbrk(increment: intptr_t) -> *mut c_void; + pub fn sched_getparam(pid: crate::pid_t, param: *mut sched_param) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; + pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; pub fn sctp_opt_info( - sd: ::c_int, - id: ::sctp_assoc_t, - opt: ::c_int, - arg_size: *mut ::c_void, - size: *mut ::size_t, - ) -> ::c_int; - pub fn sctp_peeloff(s: ::c_int, id: ::sctp_assoc_t) -> ::c_int; - pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int; - pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; - pub fn send_file(socket: *mut ::c_int, iobuf: *mut sf_parms, flags: ::c_uint) -> ::ssize_t; - pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - ) -> ::c_int; - pub fn sendmsg(sockfd: ::c_int, msg: *const msghdr, flags: ::c_int) -> ::ssize_t; - pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; - pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int; + sd: c_int, + id: crate::sctp_assoc_t, + opt: c_int, + arg_size: *mut c_void, + size: *mut size_t, + ) -> c_int; + pub fn sctp_peeloff(s: c_int, id: crate::sctp_assoc_t) -> c_int; + pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort; + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int; + pub fn semget(key: crate::key_t, nsems: c_int, semflag: c_int) -> c_int; + pub fn semop(semid: c_int, sops: *mut sembuf, nsops: size_t) -> c_int; + pub fn send_file(socket: *mut c_int, iobuf: *mut sf_parms, flags: c_uint) -> ssize_t; + pub fn sendmmsg(sockfd: c_int, msgvec: *mut mmsghdr, vlen: c_uint, flags: c_int) -> c_int; + pub fn sendmsg(sockfd: c_int, msg: *const msghdr, flags: c_int) -> ssize_t; + pub fn setcontext(ucp: *const ucontext_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: c_int) -> c_int; + pub fn setgroups(ngroups: c_int, ptr: *const crate::gid_t) -> c_int; pub fn setgrent(); - pub fn sethostid(hostid: ::c_int) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; - pub fn setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE; - pub fn setpriority(which: ::c_int, who: id_t, priority: ::c_int) -> ::c_int; + pub fn sethostid(hostid: c_int) -> c_int; + pub fn sethostname(name: *const c_char, len: c_int) -> c_int; + pub fn setmntent(filename: *const c_char, ty: *const c_char) -> *mut crate::FILE; + pub fn setpriority(which: c_int, who: id_t, priority: c_int) -> c_int; pub fn setpwent(); - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; - pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; + pub fn setrlimit64(resource: c_int, rlim: *const rlimit64) -> c_int; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn setitimer( - which: ::c_int, - new_value: *const ::itimerval, - old_value: *mut ::itimerval, - ) -> ::c_int; + which: c_int, + new_value: *const crate::itimerval, + old_value: *mut crate::itimerval, + ) -> c_int; pub fn setutent(); pub fn setutxent(); - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; - pub fn splice(socket1: ::c_int, socket2: ::c_int, flags: ::c_int) -> ::c_int; - pub fn srand(seed: ::c_uint); - pub fn srand48(seed: ::c_long); - pub fn stat64(path: *const ::c_char, buf: *mut stat64) -> ::c_int; - pub fn stat64at( - dirfd: ::c_int, - path: *const ::c_char, - buf: *mut stat64, - flags: ::c_int, - ) -> ::c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int; - pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int; - pub fn statx( - path: *const ::c_char, - buf: *mut stat, - length: ::c_int, - command: ::c_int, - ) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; + pub fn shmget(key: key_t, size: size_t, shmflg: c_int) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; + pub fn splice(socket1: c_int, socket2: c_int, flags: c_int) -> c_int; + pub fn srand(seed: c_uint); + pub fn srand48(seed: c_long); + pub fn stat64(path: *const c_char, buf: *mut stat64) -> c_int; + pub fn stat64at(dirfd: c_int, path: *const c_char, buf: *mut stat64, flags: c_int) -> c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; + pub fn statfs64(path: *const c_char, buf: *mut statfs64) -> c_int; + pub fn statvfs64(path: *const c_char, buf: *mut statvfs64) -> c_int; + pub fn statx(path: *const c_char, buf: *mut stat, length: c_int, command: c_int) -> c_int; pub fn strcasecmp_l( - string1: *const ::c_char, - string2: *const ::c_char, - locale: ::locale_t, - ) -> ::c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + string1: *const c_char, + string2: *const c_char, + locale: crate::locale_t, + ) -> c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; pub fn strftime( arg1: *mut c_char, - arg2: ::size_t, + arg2: size_t, arg3: *const c_char, arg4: *const tm, - ) -> ::size_t; + ) -> size_t; pub fn strncasecmp_l( - string1: *const ::c_char, - string2: *const ::c_char, - length: ::size_t, - locale: ::locale_t, - ) -> ::c_int; - pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char; - pub fn strsep(string: *mut *mut ::c_char, delim: *const ::c_char) -> *mut ::c_char; - pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; - pub fn swapoff(puath: *const ::c_char) -> ::c_int; - pub fn swapon(path: *const ::c_char) -> ::c_int; + string1: *const c_char, + string2: *const c_char, + length: size_t, + locale: crate::locale_t, + ) -> c_int; + pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char; + pub fn strsep(string: *mut *mut c_char, delim: *const c_char) -> *mut c_char; + pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> c_int; + pub fn swapoff(puath: *const c_char) -> c_int; + pub fn swapon(path: *const c_char) -> c_int; pub fn sync(); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; pub fn timer_create( - clockid: ::clockid_t, - sevp: *mut ::sigevent, - timerid: *mut ::timer_t, - ) -> ::c_int; - pub fn timer_delete(timerid: timer_t) -> ::c_int; - pub fn timer_getoverrun(timerid: timer_t) -> ::c_int; - pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> ::c_int; + clockid: crate::clockid_t, + sevp: *mut crate::sigevent, + timerid: *mut crate::timer_t, + ) -> c_int; + pub fn timer_delete(timerid: timer_t) -> c_int; + pub fn timer_getoverrun(timerid: timer_t) -> c_int; + pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> c_int; pub fn timer_settime( - timerid: ::timer_t, - flags: ::c_int, - new_value: *const ::itimerspec, - old_value: *mut ::itimerspec, - ) -> ::c_int; - pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; - pub fn updwtmp(file: *const ::c_char, u: *mut utmp); - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn utmpname(file: *const ::c_char) -> ::c_int; + timerid: crate::timer_t, + flags: c_int, + new_value: *const crate::itimerspec, + old_value: *mut crate::itimerspec, + ) -> c_int; + pub fn truncate64(path: *const c_char, length: off64_t) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; + pub fn updwtmp(file: *const c_char, u: *mut utmp); + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn utmpname(file: *const c_char) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; pub fn wait4( - pid: ::pid_t, - status: *mut ::c_int, - options: ::c_int, - rusage: *mut ::rusage, - ) -> ::pid_t; - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pid: crate::pid_t, + status: *mut c_int, + options: c_int, + rusage: *mut crate::rusage, + ) -> crate::pid_t; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; // Use AIX thread-safe version errno. - pub fn _Errno() -> *mut ::c_int; + pub fn _Errno() -> *mut c_int; } cfg_if! { diff --git a/src/unix/aix/powerpc64.rs b/src/unix/aix/powerpc64.rs index c9b86c5f0eb90..a54b014d8bf16 100644 --- a/src/unix/aix/powerpc64.rs +++ b/src/unix/aix/powerpc64.rs @@ -1,3 +1,8 @@ +use crate::{ + c_char, c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off_t, size_t, + ssize_t, +}; + pub type c_long = i64; pub type c_ulong = u64; @@ -11,294 +16,290 @@ s! { } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_sysid: ::c_uint, - pub l_pid: ::pid_t, - pub l_vfs: ::c_int, - pub l_start: ::off_t, - pub l_len: ::off_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_sysid: c_uint, + pub l_pid: crate::pid_t, + pub l_vfs: c_int, + pub l_start: off_t, + pub l_len: off_t, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_basetype: [::c_char; 16], - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub f_fstr: [::c_char; 32], - pub f_filler: [::c_ulong; 16], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_basetype: [c_char; 16], + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub f_fstr: [c_char; 32], + pub f_filler: [c_ulong; 16], } pub struct pthread_rwlock_t { - __rw_word: [::c_long; 10], + __rw_word: [c_long; 10], } pub struct pthread_cond_t { - __cv_word: [::c_long; 6], + __cv_word: [c_long; 6], } pub struct pthread_mutex_t { - __mt_word: [::c_long; 8], + __mt_word: [c_long; 8], } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_flag: ::c_ushort, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_ssize: ::c_int, - pub st_atime: ::st_timespec, - pub st_mtime: ::st_timespec, - pub st_ctime: ::st_timespec, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_vfstype: ::c_int, - pub st_vfs: ::c_uint, - pub st_type: ::c_uint, - pub st_gen: ::c_uint, - pub st_reserved: [::c_uint; 9], - pub st_padto_ll: ::c_uint, - pub st_size: ::off_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_flag: c_ushort, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_ssize: c_int, + pub st_atime: crate::st_timespec, + pub st_mtime: crate::st_timespec, + pub st_ctime: crate::st_timespec, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_vfstype: c_int, + pub st_vfs: c_uint, + pub st_type: c_uint, + pub st_gen: c_uint, + pub st_reserved: [c_uint; 9], + pub st_padto_ll: c_uint, + pub st_size: off_t, } pub struct statfs { - pub f_version: ::c_int, - pub f_type: ::c_int, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsblkcnt_t, - pub f_ffree: ::fsblkcnt_t, - pub f_fsid: ::fsid64_t, - pub f_vfstype: ::c_int, - pub f_fsize: ::c_ulong, - pub f_vfsnumber: ::c_int, - pub f_vfsoff: ::c_int, - pub f_vfslen: ::c_int, - pub f_vfsvers: ::c_int, - pub f_fname: [::c_char; 32], - pub f_fpack: [::c_char; 32], - pub f_name_max: ::c_int, + pub f_version: c_int, + pub f_type: c_int, + pub f_bsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsblkcnt_t, + pub f_ffree: crate::fsblkcnt_t, + pub f_fsid: crate::fsid64_t, + pub f_vfstype: c_int, + pub f_fsize: c_ulong, + pub f_vfsnumber: c_int, + pub f_vfsoff: c_int, + pub f_vfslen: c_int, + pub f_vfsvers: c_int, + pub f_fname: [c_char; 32], + pub f_fpack: [c_char; 32], + pub f_name_max: c_int, } pub struct aiocb { - pub aio_lio_opcode: ::c_int, - pub aio_fildes: ::c_int, - pub aio_word1: ::c_int, - pub aio_offset: ::off_t, - pub aio_buf: *mut ::c_void, - pub aio_return: ::ssize_t, - pub aio_errno: ::c_int, - pub aio_nbytes: ::size_t, - pub aio_reqprio: ::c_int, - pub aio_sigevent: ::sigevent, - pub aio_word2: ::c_int, - pub aio_fp: ::c_int, + pub aio_lio_opcode: c_int, + pub aio_fildes: c_int, + pub aio_word1: c_int, + pub aio_offset: off_t, + pub aio_buf: *mut c_void, + pub aio_return: ssize_t, + pub aio_errno: c_int, + pub aio_nbytes: size_t, + pub aio_reqprio: c_int, + pub aio_sigevent: crate::sigevent, + pub aio_word2: c_int, + pub aio_fp: c_int, pub aio_handle: *mut aiocb, - pub aio_reserved: [::c_uint; 2], + pub aio_reserved: [c_uint; 2], pub aio_sigev_tid: c_long, } pub struct ucontext_t { - pub __sc_onstack: ::c_int, - pub uc_sigmask: ::sigset_t, - pub __sc_uerror: ::c_int, - pub uc_mcontext: ::mcontext_t, + pub __sc_onstack: c_int, + pub uc_sigmask: crate::sigset_t, + pub __sc_uerror: c_int, + pub uc_mcontext: crate::mcontext_t, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, // Should be pointer to __extctx_t - pub __extctx: *mut ::c_void, - pub __extctx_magic: ::c_int, - pub __pad: [::c_int; 1], + pub __extctx: *mut c_void, + pub __extctx_magic: c_int, + pub __pad: [c_int; 1], } pub struct mcontext_t { - pub gpr: [::c_ulonglong; 32], - pub msr: ::c_ulonglong, - pub iar: ::c_ulonglong, - pub lr: ::c_ulonglong, - pub ctr: ::c_ulonglong, - pub cr: ::c_uint, - pub xer: ::c_uint, - pub fpscr: ::c_uint, - pub fpscrx: ::c_uint, - pub except: [::c_ulonglong; 1], + pub gpr: [c_ulonglong; 32], + pub msr: c_ulonglong, + pub iar: c_ulonglong, + pub lr: c_ulonglong, + pub ctr: c_ulonglong, + pub cr: c_uint, + pub xer: c_uint, + pub fpscr: c_uint, + pub fpscrx: c_uint, + pub except: [c_ulonglong; 1], // Should be array of double type - pub fpr: [::uint64_t; 32], - pub fpeu: ::c_char, - pub fpinfo: ::c_char, - pub fpscr24_31: ::c_char, - pub pad: [::c_char; 1], - pub excp_type: ::c_int, + pub fpr: [crate::uint64_t; 32], + pub fpeu: c_char, + pub fpinfo: c_char, + pub fpscr24_31: c_char, + pub pad: [c_char; 1], + pub excp_type: c_int, } pub struct utmpx { - pub ut_user: [::c_char; 256], - pub ut_id: [::c_char; 14], - pub ut_line: [::c_char; 64], - pub ut_pid: ::pid_t, - pub ut_type: ::c_short, - pub ut_tv: ::timeval, - pub ut_host: [::c_char; 256], - pub __dbl_word_pad: ::c_int, - pub __reservedA: [::c_int; 2], - pub __reservedV: [::c_int; 6], + pub ut_user: [c_char; 256], + pub ut_id: [c_char; 14], + pub ut_line: [c_char; 64], + pub ut_pid: crate::pid_t, + pub ut_type: c_short, + pub ut_tv: crate::timeval, + pub ut_host: [c_char; 256], + pub __dbl_word_pad: c_int, + pub __reservedA: [c_int; 2], + pub __reservedV: [c_int; 6], } pub struct pthread_spinlock_t { - pub __sp_word: [::c_long; 3], + pub __sp_word: [c_long; 3], } pub struct pthread_barrier_t { - pub __br_word: [::c_long; 5], + pub __br_word: [c_long; 5], } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_first: ::c_uint, - pub msg_last: ::c_uint, - pub msg_cbytes: ::c_uint, - pub msg_qnum: ::c_uint, - pub msg_qbytes: ::c_ulong, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, - pub msg_rwait: ::c_int, - pub msg_wwait: ::c_int, - pub msg_reqevents: ::c_ushort, + pub msg_perm: crate::ipc_perm, + pub msg_first: c_uint, + pub msg_last: c_uint, + pub msg_cbytes: c_uint, + pub msg_qnum: c_uint, + pub msg_qbytes: c_ulong, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, + pub msg_rwait: c_int, + pub msg_wwait: c_int, + pub msg_reqevents: c_ushort, } } s_no_extra_traits! { pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub si_pid: ::pid_t, - pub si_uid: ::uid_t, - pub si_status: ::c_int, - pub si_addr: *mut ::c_void, - pub si_band: ::c_long, - pub si_value: ::sigval, - pub __si_flags: ::c_int, - pub __pad: [::c_int; 3], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub si_pid: crate::pid_t, + pub si_uid: crate::uid_t, + pub si_status: c_int, + pub si_addr: *mut c_void, + pub si_band: c_long, + pub si_value: crate::sigval, + pub __si_flags: c_int, + pub __pad: [c_int; 3], } pub union _kernel_simple_lock { - pub _slock: ::c_long, + pub _slock: c_long, // Should be pointer to 'lock_data_instrumented' - pub _slockp: *mut ::c_void, + pub _slockp: *mut c_void, } pub struct fileops_t { pub fo_rw: extern "C" fn( file: *mut file, - rw: ::uio_rw, - io: *mut ::c_void, - ext: ::c_long, - secattr: *mut ::c_void, - ) -> ::c_int, + rw: crate::uio_rw, + io: *mut c_void, + ext: c_long, + secattr: *mut c_void, + ) -> c_int, pub fo_ioctl: extern "C" fn( file: *mut file, - a: ::c_long, - b: ::caddr_t, - c: ::c_long, - d: ::c_long, - ) -> ::c_int, - pub fo_select: extern "C" fn( - file: *mut file, - a: ::c_int, - b: *mut ::c_ushort, - c: extern "C" fn(), - ) -> ::c_int, - pub fo_close: extern "C" fn(file: *mut file) -> ::c_int, - pub fo_fstat: extern "C" fn(file: *mut file, sstat: *mut ::stat) -> ::c_int, + a: c_long, + b: crate::caddr_t, + c: c_long, + d: c_long, + ) -> c_int, + pub fo_select: + extern "C" fn(file: *mut file, a: c_int, b: *mut c_ushort, c: extern "C" fn()) -> c_int, + pub fo_close: extern "C" fn(file: *mut file) -> c_int, + pub fo_fstat: extern "C" fn(file: *mut file, sstat: *mut crate::stat) -> c_int, } pub struct file { - pub f_flag: ::c_long, - pub f_count: ::c_int, - pub f_options: ::c_short, - pub f_type: ::c_short, + pub f_flag: c_long, + pub f_count: c_int, + pub f_options: c_short, + pub f_type: c_short, // Should be pointer to 'vnode' - pub f_data: *mut ::c_void, - pub f_offset: ::c_longlong, - pub f_dir_off: ::c_long, + pub f_data: *mut c_void, + pub f_offset: c_longlong, + pub f_dir_off: c_long, // Should be pointer to 'cred' - pub f_cred: *mut ::c_void, + pub f_cred: *mut c_void, pub f_lock: _kernel_simple_lock, pub f_offset_lock: _kernel_simple_lock, - pub f_vinfo: ::caddr_t, + pub f_vinfo: crate::caddr_t, pub f_ops: *mut fileops_t, - pub f_parentp: ::caddr_t, - pub f_fnamep: ::caddr_t, - pub f_fdata: [::c_char; 160], + pub f_parentp: crate::caddr_t, + pub f_fnamep: crate::caddr_t, + pub f_fdata: [c_char; 160], } pub union __ld_info_file { - pub _ldinfo_fd: ::c_int, + pub _ldinfo_fd: c_int, pub _ldinfo_fp: *mut file, - pub _core_offset: ::c_long, + pub _core_offset: c_long, } pub struct ld_info { - pub ldinfo_next: ::c_uint, - pub ldinfo_flags: ::c_uint, + pub ldinfo_next: c_uint, + pub ldinfo_flags: c_uint, pub _file: __ld_info_file, - pub ldinfo_textorg: *mut ::c_void, - pub ldinfo_textsize: ::c_ulong, - pub ldinfo_dataorg: *mut ::c_void, - pub ldinfo_datasize: ::c_ulong, - pub ldinfo_filename: [::c_char; 2], + pub ldinfo_textorg: *mut c_void, + pub ldinfo_textsize: c_ulong, + pub ldinfo_dataorg: *mut c_void, + pub ldinfo_datasize: c_ulong, + pub ldinfo_filename: [c_char; 2], } pub union __pollfd_ext_u { - pub addr: *mut ::c_void, + pub addr: *mut c_void, pub data32: u32, pub data: u64, } pub struct pollfd_ext { - pub fd: ::c_int, - pub events: ::c_ushort, - pub revents: ::c_ushort, + pub fd: c_int, + pub events: c_ushort, + pub revents: c_ushort, pub data: __pollfd_ext_u, } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { self.si_value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.si_status } } @@ -320,8 +321,8 @@ cfg_if! { } } impl Eq for siginfo_t {} - impl ::fmt::Debug for siginfo_t { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for siginfo_t { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("siginfo_t") .field("si_signo", &self.si_signo) .field("si_errno", &self.si_errno) @@ -336,8 +337,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for siginfo_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for siginfo_t { + fn hash(&self, state: &mut H) { self.si_signo.hash(state); self.si_errno.hash(state); self.si_code.hash(state); @@ -357,16 +358,16 @@ cfg_if! { } } impl Eq for _kernel_simple_lock {} - impl ::fmt::Debug for _kernel_simple_lock { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for _kernel_simple_lock { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("_kernel_simple_lock") .field("_slock", unsafe { &self._slock }) .field("_slockp", unsafe { &self._slockp }) .finish() } } - impl ::hash::Hash for _kernel_simple_lock { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for _kernel_simple_lock { + fn hash(&self, state: &mut H) { unsafe { self._slock.hash(state); self._slockp.hash(state); @@ -384,8 +385,8 @@ cfg_if! { } } impl Eq for fileops_t {} - impl ::fmt::Debug for fileops_t { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for fileops_t { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("fileops_t") .field("fo_rw", &self.fo_rw) .field("fo_ioctl", &self.fo_ioctl) @@ -395,8 +396,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fileops_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fileops_t { + fn hash(&self, state: &mut H) { self.fo_rw.hash(state); self.fo_ioctl.hash(state); self.fo_select.hash(state); @@ -425,8 +426,8 @@ cfg_if! { } } impl Eq for file {} - impl ::fmt::Debug for file { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for file { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("file") .field("f_flag", &self.f_flag) .field("f_count", &self.f_count) @@ -446,8 +447,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for file { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for file { + fn hash(&self, state: &mut H) { self.f_flag.hash(state); self.f_count.hash(state); self.f_options.hash(state); @@ -476,8 +477,8 @@ cfg_if! { } } impl Eq for __ld_info_file {} - impl ::fmt::Debug for __ld_info_file { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for __ld_info_file { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("__ld_info_file") .field("_ldinfo_fd", unsafe { &self._ldinfo_fd }) .field("_ldinfo_fp", unsafe { &self._ldinfo_fp }) @@ -485,8 +486,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for __ld_info_file { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __ld_info_file { + fn hash(&self, state: &mut H) { unsafe { self._ldinfo_fd.hash(state); self._ldinfo_fp.hash(state); @@ -508,8 +509,8 @@ cfg_if! { } } impl Eq for ld_info {} - impl ::fmt::Debug for ld_info { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for ld_info { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("ld_info") .field("ldinfo_next", &self.ldinfo_next) .field("ldinfo_flags", &self.ldinfo_flags) @@ -522,8 +523,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ld_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ld_info { + fn hash(&self, state: &mut H) { self.ldinfo_next.hash(state); self.ldinfo_flags.hash(state); self.ldinfo_textorg.hash(state); @@ -545,8 +546,8 @@ cfg_if! { } } impl Eq for __pollfd_ext_u {} - impl ::fmt::Debug for __pollfd_ext_u { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for __pollfd_ext_u { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("__pollfd_ext_u") .field("addr", unsafe { &self.addr }) .field("data32", unsafe { &self.data32 }) @@ -554,8 +555,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for __pollfd_ext_u { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __pollfd_ext_u { + fn hash(&self, state: &mut H) { unsafe { self.addr.hash(state); self.data.hash(state); @@ -573,8 +574,8 @@ cfg_if! { } } impl Eq for pollfd_ext {} - impl ::fmt::Debug for pollfd_ext { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for pollfd_ext { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("pollfd_ext") .field("fd", &self.fd) .field("events", &self.events) @@ -583,8 +584,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for pollfd_ext { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pollfd_ext { + fn hash(&self, state: &mut H) { self.fd.hash(state); self.events.hash(state); self.revents.hash(state); @@ -603,8 +604,8 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __rw_word: [2, 0, 0, 0, 0, 0, 0, 0, 0, 0], }; -pub const RLIM_INFINITY: ::c_ulong = 0x7fffffffffffffff; +pub const RLIM_INFINITY: c_ulong = 0x7fffffffffffffff; extern "C" { - pub fn getsystemcfg(label: ::c_int) -> ::c_ulong; + pub fn getsystemcfg(label: c_int) -> c_ulong; } diff --git a/src/unix/bsd/apple/b32/mod.rs b/src/unix/bsd/apple/b32/mod.rs index 01de2c3a0f39a..9088be7d1ed94 100644 --- a/src/unix/bsd/apple/b32/mod.rs +++ b/src/unix/bsd/apple/b32/mod.rs @@ -1,19 +1,21 @@ //! 32-bit specific Apple (ios/darwin) definitions +use crate::{c_char, c_int, c_uchar, c_ushort}; + pub type c_long = i32; pub type c_ulong = u32; -pub type boolean_t = ::c_int; +pub type boolean_t = c_int; s! { pub struct if_data { - pub ifi_type: ::c_uchar, - pub ifi_typelen: ::c_uchar, - pub ifi_physical: ::c_uchar, - pub ifi_addrlen: ::c_uchar, - pub ifi_hdrlen: ::c_uchar, - pub ifi_recvquota: ::c_uchar, - pub ifi_xmitquota: ::c_uchar, - pub ifi_unused1: ::c_uchar, + pub ifi_type: c_uchar, + pub ifi_typelen: c_uchar, + pub ifi_physical: c_uchar, + pub ifi_addrlen: c_uchar, + pub ifi_hdrlen: c_uchar, + pub ifi_recvquota: c_uchar, + pub ifi_xmitquota: c_uchar, + pub ifi_unused1: c_uchar, pub ifi_mtu: u32, pub ifi_metric: u32, pub ifi_baudrate: u32, @@ -30,7 +32,7 @@ s! { pub ifi_noproto: u32, pub ifi_recvtiming: u32, pub ifi_xmittiming: u32, - pub ifi_lastchange: ::timeval, + pub ifi_lastchange: crate::timeval, pub ifi_unused2: u32, pub ifi_hwassist: u32, pub ifi_reserved1: u32, @@ -38,26 +40,26 @@ s! { } pub struct bpf_hdr { - pub bh_tstamp: ::timeval, + pub bh_tstamp: crate::timeval, pub bh_caplen: u32, pub bh_datalen: u32, - pub bh_hdrlen: ::c_ushort, + pub bh_hdrlen: c_ushort, } pub struct malloc_zone_t { - __private: [::uintptr_t; 18], // FIXME: keeping private for now + __private: [crate::uintptr_t; 18], // FIXME: keeping private for now } } s_no_extra_traits! { pub struct pthread_attr_t { __sig: c_long, - __opaque: [::c_char; 36], + __opaque: [c_char; 36], } pub struct pthread_once_t { __sig: c_long, - __opaque: [::c_char; ::__PTHREAD_ONCE_SIZE__], + __opaque: [c_char; crate::__PTHREAD_ONCE_SIZE__], } #[allow(missing_debug_implementations)] @@ -80,16 +82,16 @@ cfg_if! { } } impl Eq for pthread_attr_t {} - impl ::fmt::Debug for pthread_attr_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_attr_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_attr_t") .field("__sig", &self.__sig) // FIXME: .field("__opaque", &self.__opaque) .finish() } } - impl ::hash::Hash for pthread_attr_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_attr_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -105,15 +107,15 @@ cfg_if! { } } impl Eq for pthread_once_t {} - impl ::fmt::Debug for pthread_once_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_once_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_once_t") .field("__sig", &self.__sig) .finish() } } - impl ::hash::Hash for pthread_once_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_once_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -123,7 +125,7 @@ cfg_if! { #[doc(hidden)] #[deprecated(since = "0.2.55")] -pub const NET_RT_MAXID: ::c_int = 10; +pub const NET_RT_MAXID: c_int = 10; pub const __PTHREAD_MUTEX_SIZE__: usize = 40; pub const __PTHREAD_COND_SIZE__: usize = 24; @@ -132,24 +134,20 @@ pub const __PTHREAD_ONCE_SIZE__: usize = 4; pub const __PTHREAD_RWLOCK_SIZE__: usize = 124; pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 12; -pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459; -pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40087458; +pub const TIOCTIMESTAMP: c_ulong = 0x40087459; +pub const TIOCDCDTIMESTAMP: c_ulong = 0x40087458; -pub const BIOCSETF: ::c_ulong = 0x80084267; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8008426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4008426e; -pub const BIOCSETFNR: ::c_ulong = 0x8008427e; +pub const BIOCSETF: c_ulong = 0x80084267; +pub const BIOCSRTIMEOUT: c_ulong = 0x8008426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4008426e; +pub const BIOCSETFNR: c_ulong = 0x8008427e; const _PTHREAD_ONCE_SIG_INIT: c_long = 0x30B1BCBA; -pub const PTHREAD_ONCE_INIT: ::pthread_once_t = ::pthread_once_t { +pub const PTHREAD_ONCE_INIT: crate::pthread_once_t = crate::pthread_once_t { __sig: _PTHREAD_ONCE_SIG_INIT, __opaque: [0; 4], }; extern "C" { - pub fn exchangedata( - path1: *const ::c_char, - path2: *const ::c_char, - options: ::c_ulong, - ) -> ::c_int; + pub fn exchangedata(path1: *const c_char, path2: *const c_char, options: c_ulong) -> c_int; } diff --git a/src/unix/bsd/apple/b64/aarch64/mod.rs b/src/unix/bsd/apple/b64/aarch64/mod.rs index 27b66cb816e56..6a9ea9c65f719 100644 --- a/src/unix/bsd/apple/b64/aarch64/mod.rs +++ b/src/unix/bsd/apple/b64/aarch64/mod.rs @@ -1,16 +1,18 @@ -pub type boolean_t = ::c_int; +use crate::c_int; + +pub type boolean_t = c_int; pub type mcontext_t = *mut __darwin_mcontext64; s! { pub struct malloc_zone_t { - __private: [::uintptr_t; 18], // FIXME: needs arm64 auth pointers support + __private: [crate::uintptr_t; 18], // FIXME: needs arm64 auth pointers support } pub struct ucontext_t { - pub uc_onstack: ::c_int, - pub uc_sigmask: ::sigset_t, - pub uc_stack: ::stack_t, - pub uc_link: *mut ::ucontext_t, + pub uc_onstack: c_int, + pub uc_sigmask: crate::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_link: *mut crate::ucontext_t, pub uc_mcsize: usize, pub uc_mcontext: mcontext_t, } @@ -38,7 +40,7 @@ s! { } pub struct __darwin_arm_neon_state64 { - pub __v: [::__uint128_t; 32], + pub __v: [crate::__uint128_t; 32], pub __fpsr: u32, pub __fpcr: u32, } diff --git a/src/unix/bsd/apple/b64/mod.rs b/src/unix/bsd/apple/b64/mod.rs index d1e11d171fd2d..c75608cdeeadc 100644 --- a/src/unix/bsd/apple/b64/mod.rs +++ b/src/unix/bsd/apple/b64/mod.rs @@ -1,5 +1,7 @@ //! 64-bit specific Apple (ios/darwin) definitions +use crate::{c_char, c_int, c_uchar, c_uint, c_ushort}; + pub type c_long = i64; pub type c_ulong = u64; @@ -10,14 +12,14 @@ s! { } pub struct if_data { - pub ifi_type: ::c_uchar, - pub ifi_typelen: ::c_uchar, - pub ifi_physical: ::c_uchar, - pub ifi_addrlen: ::c_uchar, - pub ifi_hdrlen: ::c_uchar, - pub ifi_recvquota: ::c_uchar, - pub ifi_xmitquota: ::c_uchar, - pub ifi_unused1: ::c_uchar, + pub ifi_type: c_uchar, + pub ifi_typelen: c_uchar, + pub ifi_physical: c_uchar, + pub ifi_addrlen: c_uchar, + pub ifi_hdrlen: c_uchar, + pub ifi_recvquota: c_uchar, + pub ifi_xmitquota: c_uchar, + pub ifi_unused1: c_uchar, pub ifi_mtu: u32, pub ifi_metric: u32, pub ifi_baudrate: u32, @@ -42,22 +44,22 @@ s! { } pub struct bpf_hdr { - pub bh_tstamp: ::timeval32, + pub bh_tstamp: crate::timeval32, pub bh_caplen: u32, pub bh_datalen: u32, - pub bh_hdrlen: ::c_ushort, + pub bh_hdrlen: c_ushort, } } s_no_extra_traits! { pub struct pthread_attr_t { __sig: c_long, - __opaque: [::c_char; 56], + __opaque: [c_char; 56], } pub struct pthread_once_t { __sig: c_long, - __opaque: [::c_char; __PTHREAD_ONCE_SIZE__], + __opaque: [c_char; __PTHREAD_ONCE_SIZE__], } } @@ -74,16 +76,16 @@ cfg_if! { } } impl Eq for pthread_attr_t {} - impl ::fmt::Debug for pthread_attr_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_attr_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_attr_t") .field("__sig", &self.__sig) // FIXME: .field("__opaque", &self.__opaque) .finish() } } - impl ::hash::Hash for pthread_attr_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_attr_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -99,15 +101,15 @@ cfg_if! { } } impl Eq for pthread_once_t {} - impl ::fmt::Debug for pthread_once_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_once_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_once_t") .field("__sig", &self.__sig) .finish() } } - impl ::hash::Hash for pthread_once_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_once_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -117,7 +119,7 @@ cfg_if! { #[doc(hidden)] #[deprecated(since = "0.2.55")] -pub const NET_RT_MAXID: ::c_int = 11; +pub const NET_RT_MAXID: c_int = 11; pub const __PTHREAD_MUTEX_SIZE__: usize = 56; pub const __PTHREAD_COND_SIZE__: usize = 40; @@ -126,26 +128,22 @@ pub const __PTHREAD_ONCE_SIZE__: usize = 8; pub const __PTHREAD_RWLOCK_SIZE__: usize = 192; pub const __PTHREAD_RWLOCKATTR_SIZE__: usize = 16; -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; -pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458; +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; +pub const TIOCDCDTIMESTAMP: c_ulong = 0x40107458; -pub const BIOCSETF: ::c_ulong = 0x80104267; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; -pub const BIOCSETFNR: ::c_ulong = 0x8010427e; +pub const BIOCSETF: c_ulong = 0x80104267; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; +pub const BIOCSETFNR: c_ulong = 0x8010427e; const _PTHREAD_ONCE_SIG_INIT: c_long = 0x30B1BCBA; -pub const PTHREAD_ONCE_INIT: ::pthread_once_t = ::pthread_once_t { +pub const PTHREAD_ONCE_INIT: crate::pthread_once_t = crate::pthread_once_t { __sig: _PTHREAD_ONCE_SIG_INIT, __opaque: [0; 8], }; extern "C" { - pub fn exchangedata( - path1: *const ::c_char, - path2: *const ::c_char, - options: ::c_uint, - ) -> ::c_int; + pub fn exchangedata(path1: *const c_char, path2: *const c_char, options: c_uint) -> c_int; } cfg_if! { diff --git a/src/unix/bsd/apple/b64/x86_64/mod.rs b/src/unix/bsd/apple/b64/x86_64/mod.rs index 581bcf87fef78..c6a9261ed33e0 100644 --- a/src/unix/bsd/apple/b64/x86_64/mod.rs +++ b/src/unix/bsd/apple/b64/x86_64/mod.rs @@ -1,12 +1,14 @@ -pub type boolean_t = ::c_uint; +use crate::{c_char, c_int, c_short, c_uint, c_void, size_t}; + +pub type boolean_t = c_uint; pub type mcontext_t = *mut __darwin_mcontext64; s! { pub struct ucontext_t { - pub uc_onstack: ::c_int, - pub uc_sigmask: ::sigset_t, - pub uc_stack: ::stack_t, - pub uc_link: *mut ::ucontext_t, + pub uc_onstack: c_int, + pub uc_sigmask: crate::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_link: *mut crate::ucontext_t, pub uc_mcsize: usize, pub uc_mcontext: mcontext_t, } @@ -49,9 +51,9 @@ s! { } pub struct __darwin_x86_float_state64 { - pub __fpu_reserved: [::c_int; 2], - __fpu_fcw: ::c_short, - __fpu_fsw: ::c_short, + pub __fpu_reserved: [c_int; 2], + __fpu_fcw: c_short, + __fpu_fsw: c_short, pub __fpu_ftw: u8, pub __fpu_rsrv1: u8, pub __fpu_fop: u16, @@ -91,82 +93,78 @@ s! { // allows us to auto-implement traits for it since the length of the // array is less than 32 __fpu_rsrv4: [u32; 24], - pub __fpu_reserved1: ::c_int, + pub __fpu_reserved1: c_int, } pub struct __darwin_mmst_reg { - pub __mmst_reg: [::c_char; 10], - pub __mmst_rsrv: [::c_char; 6], + pub __mmst_reg: [c_char; 10], + pub __mmst_rsrv: [c_char; 6], } pub struct __darwin_xmm_reg { - pub __xmm_reg: [::c_char; 16], + pub __xmm_reg: [c_char; 16], } pub struct malloc_introspection_t { - _private: [::uintptr_t; 16], // FIXME: keeping private for now + _private: [crate::uintptr_t; 16], // FIXME: keeping private for now } pub struct malloc_zone_t { - _reserved1: *mut ::c_void, - _reserved2: *mut ::c_void, - pub size: ::Option< - unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *const ::c_void) -> ::size_t, - >, - pub malloc: ::Option< - unsafe extern "C" fn(zone: *mut malloc_zone_t, size: ::size_t) -> *mut ::c_void, - >, - pub calloc: ::Option< + _reserved1: *mut c_void, + _reserved2: *mut c_void, + pub size: + Option size_t>, + pub malloc: + Option *mut c_void>, + pub calloc: Option< unsafe extern "C" fn( zone: *mut malloc_zone_t, - num_items: ::size_t, - size: ::size_t, - ) -> *mut ::c_void, + num_items: size_t, + size: size_t, + ) -> *mut c_void, >, - pub valloc: ::Option< - unsafe extern "C" fn(zone: *mut malloc_zone_t, size: ::size_t) -> *mut ::c_void, - >, - pub free: ::Option, - pub realloc: ::Option< + pub valloc: + Option *mut c_void>, + pub free: Option, + pub realloc: Option< unsafe extern "C" fn( zone: *mut malloc_zone_t, - ptr: *mut ::c_void, - size: ::size_t, - ) -> *mut ::c_void, + ptr: *mut c_void, + size: size_t, + ) -> *mut c_void, >, - pub destroy: ::Option, - pub zone_name: *const ::c_char, - pub batch_malloc: ::Option< + pub destroy: Option, + pub zone_name: *const c_char, + pub batch_malloc: Option< unsafe extern "C" fn( zone: *mut malloc_zone_t, - size: ::size_t, - results: *mut *mut ::c_void, - num_requested: ::c_uint, - ) -> ::c_uint, + size: size_t, + results: *mut *mut c_void, + num_requested: c_uint, + ) -> c_uint, >, - pub batch_free: ::Option< + pub batch_free: Option< unsafe extern "C" fn( zone: *mut malloc_zone_t, - to_be_freed: *mut *mut ::c_void, - num_to_be_freed: ::c_uint, + to_be_freed: *mut *mut c_void, + num_to_be_freed: c_uint, ), >, pub introspect: *mut malloc_introspection_t, - pub version: ::c_uint, - pub memalign: ::Option< + pub version: c_uint, + pub memalign: Option< unsafe extern "C" fn( zone: *mut malloc_zone_t, - alignment: ::size_t, - size: ::size_t, - ) -> *mut ::c_void, - >, - pub free_definite_size: ::Option< - unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *mut ::c_void, size: ::size_t), + alignment: size_t, + size: size_t, + ) -> *mut c_void, >, + pub free_definite_size: + Option, pub pressure_relief: - ::Option ::size_t>, - pub claimed_address: ::Option< - unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *mut ::c_void) -> ::boolean_t, + Option size_t>, + pub claimed_address: Option< + unsafe extern "C" fn(zone: *mut malloc_zone_t, ptr: *mut c_void) -> crate::boolean_t, >, } } diff --git a/src/unix/bsd/apple/mod.rs b/src/unix/bsd/apple/mod.rs index 54f35d3bc4661..36c2957459a0a 100644 --- a/src/unix/bsd/apple/mod.rs +++ b/src/unix/bsd/apple/mod.rs @@ -1,6 +1,12 @@ //! Apple (ios/darwin)-specific definitions //! //! This covers *-apple-* triples currently + +use crate::{ + c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, cmsghdr, intptr_t, + off_t, size_t, ssize_t, +}; + pub type c_char = i8; pub type wchar_t = i32; pub type clock_t = c_ulong; @@ -14,65 +20,65 @@ pub type blksize_t = i32; pub type rlim_t = u64; pub type pthread_key_t = c_ulong; pub type sigset_t = u32; -pub type clockid_t = ::c_uint; -pub type fsblkcnt_t = ::c_uint; -pub type fsfilcnt_t = ::c_uint; -pub type speed_t = ::c_ulong; -pub type tcflag_t = ::c_ulong; -pub type nl_item = ::c_int; -pub type id_t = ::c_uint; -pub type sem_t = ::c_int; -pub type idtype_t = ::c_uint; -pub type integer_t = ::c_int; +pub type clockid_t = c_uint; +pub type fsblkcnt_t = c_uint; +pub type fsfilcnt_t = c_uint; +pub type speed_t = c_ulong; +pub type tcflag_t = c_ulong; +pub type nl_item = c_int; +pub type id_t = c_uint; +pub type sem_t = c_int; +pub type idtype_t = c_uint; +pub type integer_t = c_int; pub type cpu_type_t = integer_t; pub type cpu_subtype_t = integer_t; pub type natural_t = u32; pub type mach_msg_type_number_t = natural_t; -pub type kern_return_t = ::c_int; +pub type kern_return_t = c_int; pub type uuid_t = [u8; 16]; pub type task_info_t = *mut integer_t; pub type host_info_t = *mut integer_t; pub type task_flavor_t = natural_t; -pub type rusage_info_t = *mut ::c_void; -pub type vm_offset_t = ::uintptr_t; -pub type vm_size_t = ::uintptr_t; +pub type rusage_info_t = *mut c_void; +pub type vm_offset_t = crate::uintptr_t; +pub type vm_size_t = crate::uintptr_t; pub type vm_address_t = vm_offset_t; pub type quad_t = i64; pub type u_quad_t = u64; -pub type posix_spawnattr_t = *mut ::c_void; -pub type posix_spawn_file_actions_t = *mut ::c_void; -pub type key_t = ::c_int; -pub type shmatt_t = ::c_ushort; +pub type posix_spawnattr_t = *mut c_void; +pub type posix_spawn_file_actions_t = *mut c_void; +pub type key_t = c_int; +pub type shmatt_t = c_ushort; pub type sae_associd_t = u32; pub type sae_connid_t = u32; -pub type mach_port_t = ::c_uint; -pub type host_t = ::c_uint; +pub type mach_port_t = c_uint; +pub type host_t = c_uint; pub type host_flavor_t = integer_t; pub type host_info64_t = *mut integer_t; -pub type processor_flavor_t = ::c_int; +pub type processor_flavor_t = c_int; pub type thread_flavor_t = natural_t; -pub type thread_inspect_t = ::mach_port_t; -pub type thread_act_t = ::mach_port_t; -pub type thread_act_array_t = *mut ::thread_act_t; -pub type policy_t = ::c_int; -pub type mach_error_t = ::kern_return_t; +pub type thread_inspect_t = crate::mach_port_t; +pub type thread_act_t = crate::mach_port_t; +pub type thread_act_array_t = *mut crate::thread_act_t; +pub type policy_t = c_int; +pub type mach_error_t = crate::kern_return_t; pub type mach_vm_address_t = u64; pub type mach_vm_offset_t = u64; pub type mach_vm_size_t = u64; -pub type vm_map_t = ::mach_port_t; -pub type mem_entry_name_port_t = ::mach_port_t; -pub type memory_object_t = ::mach_port_t; -pub type memory_object_offset_t = ::c_ulonglong; -pub type vm_inherit_t = ::c_uint; -pub type vm_prot_t = ::c_int; +pub type vm_map_t = crate::mach_port_t; +pub type mem_entry_name_port_t = crate::mach_port_t; +pub type memory_object_t = crate::mach_port_t; +pub type memory_object_offset_t = c_ulonglong; +pub type vm_inherit_t = c_uint; +pub type vm_prot_t = c_int; -pub type ledger_t = ::mach_port_t; -pub type ledger_array_t = *mut ::ledger_t; +pub type ledger_t = crate::mach_port_t; +pub type ledger_array_t = *mut crate::ledger_t; -pub type iconv_t = *mut ::c_void; +pub type iconv_t = *mut c_void; // mach/host_info.h pub type host_cpu_load_info_t = *mut host_cpu_load_info; @@ -103,7 +109,7 @@ pub type thread_identifier_info_data_t = thread_identifier_info; pub type thread_extended_info_t = *mut thread_extended_info; pub type thread_extended_info_data_t = thread_extended_info; -pub type thread_t = ::mach_port_t; +pub type thread_t = crate::mach_port_t; pub type thread_policy_flavor_t = natural_t; pub type thread_policy_t = *mut integer_t; pub type thread_latency_qos_t = integer_t; @@ -126,8 +132,8 @@ pub type thread_throughput_qos_policy_data_t = thread_throughput_qos_policy; pub type thread_throughput_qos_policy_t = *mut thread_throughput_qos_policy; pub type pthread_introspection_hook_t = - extern "C" fn(event: ::c_uint, thread: ::pthread_t, addr: *mut ::c_void, size: ::size_t); -pub type pthread_jit_write_callback_t = ::Option ::c_int>; + extern "C" fn(event: c_uint, thread: crate::pthread_t, addr: *mut c_void, size: size_t); +pub type pthread_jit_write_callback_t = Option c_int>; pub type os_clockid_t = u32; @@ -137,7 +143,7 @@ pub type os_sync_wake_by_address_flags_t = u32; pub type os_unfair_lock = os_unfair_lock_s; pub type os_unfair_lock_t = *mut os_unfair_lock; -pub type os_log_t = *mut ::c_void; +pub type os_log_t = *mut c_void; pub type os_log_type_t = u8; pub type os_signpost_id_t = u64; pub type os_signpost_type_t = u8; @@ -147,26 +153,26 @@ pub type vm_statistics_data_t = vm_statistics; pub type vm_statistics64_t = *mut vm_statistics64; pub type vm_statistics64_data_t = vm_statistics64; -pub type task_t = ::mach_port_t; -pub type task_inspect_t = ::mach_port_t; +pub type task_t = crate::mach_port_t; +pub type task_inspect_t = crate::mach_port_t; -pub type sysdir_search_path_enumeration_state = ::c_uint; +pub type sysdir_search_path_enumeration_state = c_uint; pub type CCStatus = i32; pub type CCCryptorStatus = i32; -pub type CCRNGStatus = ::CCCryptorStatus; +pub type CCRNGStatus = crate::CCCryptorStatus; -pub type copyfile_state_t = *mut ::c_void; +pub type copyfile_state_t = *mut c_void; pub type copyfile_flags_t = u32; -pub type copyfile_callback_t = ::Option< +pub type copyfile_callback_t = Option< extern "C" fn( - ::c_int, - ::c_int, + c_int, + c_int, copyfile_state_t, - *const ::c_char, - *const ::c_char, - *mut ::c_void, - ) -> ::c_int, + *const c_char, + *const c_char, + *mut c_void, + ) -> c_int, >; pub type attrgroup_t = u32; @@ -174,8 +180,8 @@ pub type vol_capabilities_set_t = [u32; 4]; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } @@ -191,8 +197,8 @@ pub enum qos_class_t { QOS_CLASS_BACKGROUND = 0x09, QOS_CLASS_UNSPECIFIED = 0x00, } -impl ::Copy for qos_class_t {} -impl ::Clone for qos_class_t { +impl Copy for qos_class_t {} +impl Clone for qos_class_t { fn clone(&self) -> qos_class_t { *self } @@ -226,8 +232,8 @@ pub enum sysdir_search_path_directory_t { SYSDIR_DIRECTORY_ALL_APPLICATIONS = 100, SYSDIR_DIRECTORY_ALL_LIBRARIES = 101, } -impl ::Copy for sysdir_search_path_directory_t {} -impl ::Clone for sysdir_search_path_directory_t { +impl Copy for sysdir_search_path_directory_t {} +impl Clone for sysdir_search_path_directory_t { fn clone(&self) -> sysdir_search_path_directory_t { *self } @@ -242,8 +248,8 @@ pub enum sysdir_search_path_domain_mask_t { SYSDIR_DOMAIN_MASK_SYSTEM = (1 << 3), SYSDIR_DOMAIN_MASK_ALL = 0x0ffff, } -impl ::Copy for sysdir_search_path_domain_mask_t {} -impl ::Clone for sysdir_search_path_domain_mask_t { +impl Copy for sysdir_search_path_domain_mask_t {} +impl Clone for sysdir_search_path_domain_mask_t { fn clone(&self) -> sysdir_search_path_domain_mask_t { *self } @@ -258,7 +264,7 @@ s! { pub struct ip_mreqn { pub imr_multiaddr: in_addr, pub imr_address: in_addr, - pub imr_ifindex: ::c_int, + pub imr_ifindex: c_int, } pub struct ip_mreq_source { @@ -268,39 +274,39 @@ s! { } pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_offset: ::off_t, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_reqprio: ::c_int, + pub aio_fildes: c_int, + pub aio_offset: off_t, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_reqprio: c_int, pub aio_sigevent: sigevent, - pub aio_lio_opcode: ::c_int, + pub aio_lio_opcode: c_int, } pub struct glob_t { - pub gl_pathc: ::size_t, - __unused1: ::c_int, - pub gl_offs: ::size_t, - __unused2: ::c_int, - pub gl_pathv: *mut *mut ::c_char, + pub gl_pathc: size_t, + __unused1: c_int, + pub gl_offs: size_t, + __unused2: c_int, + pub gl_pathv: *mut *mut c_char, - __unused3: *mut ::c_void, + __unused3: *mut c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, + __unused6: *mut c_void, + __unused7: *mut c_void, + __unused8: *mut c_void, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: crate::socklen_t, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, } @@ -309,8 +315,8 @@ s! { pub st_mode: mode_t, pub st_nlink: nlink_t, pub st_ino: ino_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, pub st_rdev: dev_t, pub st_atime: time_t, pub st_atime_nsec: c_long, @@ -320,8 +326,8 @@ s! { pub st_ctime_nsec: c_long, pub st_birthtime: time_t, pub st_birthtime_nsec: c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, pub st_blksize: blksize_t, pub st_flags: u32, pub st_gen: u32, @@ -330,28 +336,28 @@ s! { } pub struct pthread_mutexattr_t { - __sig: ::c_long, + __sig: c_long, __opaque: [u8; 8], } pub struct pthread_condattr_t { - __sig: ::c_long, + __sig: c_long, __opaque: [u8; __PTHREAD_CONDATTR_SIZE__], } pub struct pthread_rwlockattr_t { - __sig: ::c_long, + __sig: c_long, __opaque: [u8; __PTHREAD_RWLOCKATTR_SIZE__], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub si_pid: ::pid_t, - pub si_uid: ::uid_t, - pub si_status: ::c_int, - pub si_addr: *mut ::c_void, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub si_pid: crate::pid_t, + pub si_uid: crate::uid_t, + pub si_status: c_int, + pub si_addr: *mut c_void, //Requires it to be union for tests //pub si_value: ::sigval, _pad: [usize; 9], @@ -359,76 +365,76 @@ s! { pub struct sigaction { // FIXME: this field is actually a union - pub sa_sigaction: ::sighandler_t, + pub sa_sigaction: crate::sighandler_t, pub sa_mask: sigset_t, - pub sa_flags: ::c_int, + pub sa_flags: c_int, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct fstore_t { - pub fst_flags: ::c_uint, - pub fst_posmode: ::c_int, - pub fst_offset: ::off_t, - pub fst_length: ::off_t, - pub fst_bytesalloc: ::off_t, + pub fst_flags: c_uint, + pub fst_posmode: c_int, + pub fst_offset: off_t, + pub fst_length: off_t, + pub fst_bytesalloc: off_t, } pub struct fpunchhole_t { - pub fp_flags: ::c_uint, /* unused */ - pub reserved: ::c_uint, /* (to maintain 8-byte alignment) */ - pub fp_offset: ::off_t, /* IN: start of the region */ - pub fp_length: ::off_t, /* IN: size of the region */ + pub fp_flags: c_uint, /* unused */ + pub reserved: c_uint, /* (to maintain 8-byte alignment) */ + pub fp_offset: off_t, /* IN: start of the region */ + pub fp_length: off_t, /* IN: size of the region */ } pub struct ftrimactivefile_t { - pub fta_offset: ::off_t, - pub fta_length: ::off_t, + pub fta_offset: off_t, + pub fta_length: off_t, } pub struct fspecread_t { - pub fsr_flags: ::c_uint, - pub reserved: ::c_uint, - pub fsr_offset: ::off_t, - pub fsr_length: ::off_t, + pub fsr_flags: c_uint, + pub reserved: c_uint, + pub fsr_offset: off_t, + pub fsr_length: off_t, } pub struct radvisory { - pub ra_offset: ::off_t, - pub ra_count: ::c_int, + pub ra_offset: off_t, + pub ra_count: c_int, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } pub struct kevent64_s { @@ -455,41 +461,41 @@ s! { } pub struct if_msghdr { - pub ifm_msglen: ::c_ushort, - pub ifm_version: ::c_uchar, - pub ifm_type: ::c_uchar, - pub ifm_addrs: ::c_int, - pub ifm_flags: ::c_int, - pub ifm_index: ::c_ushort, + pub ifm_msglen: c_ushort, + pub ifm_version: c_uchar, + pub ifm_type: c_uchar, + pub ifm_addrs: c_int, + pub ifm_flags: c_int, + pub ifm_index: c_ushort, pub ifm_data: if_data, } pub struct ifa_msghdr { - pub ifam_msglen: ::c_ushort, - pub ifam_version: ::c_uchar, - pub ifam_type: ::c_uchar, - pub ifam_addrs: ::c_int, - pub ifam_flags: ::c_int, - pub ifam_index: ::c_ushort, - pub ifam_metric: ::c_int, + pub ifam_msglen: c_ushort, + pub ifam_version: c_uchar, + pub ifam_type: c_uchar, + pub ifam_addrs: c_int, + pub ifam_flags: c_int, + pub ifam_index: c_ushort, + pub ifam_metric: c_int, } pub struct ifma_msghdr { - pub ifmam_msglen: ::c_ushort, - pub ifmam_version: ::c_uchar, - pub ifmam_type: ::c_uchar, - pub ifmam_addrs: ::c_int, - pub ifmam_flags: ::c_int, - pub ifmam_index: ::c_ushort, + pub ifmam_msglen: c_ushort, + pub ifmam_version: c_uchar, + pub ifmam_type: c_uchar, + pub ifmam_addrs: c_int, + pub ifmam_flags: c_int, + pub ifmam_index: c_ushort, } pub struct ifma_msghdr2 { - pub ifmam_msglen: ::c_ushort, - pub ifmam_version: ::c_uchar, - pub ifmam_type: ::c_uchar, - pub ifmam_addrs: ::c_int, - pub ifmam_flags: ::c_int, - pub ifmam_index: ::c_ushort, + pub ifmam_msglen: c_ushort, + pub ifmam_version: c_uchar, + pub ifmam_type: c_uchar, + pub ifmam_addrs: c_int, + pub ifmam_flags: c_int, + pub ifmam_index: c_ushort, pub ifmam_refcount: i32, } @@ -508,85 +514,85 @@ s! { } pub struct rt_msghdr { - pub rtm_msglen: ::c_ushort, - pub rtm_version: ::c_uchar, - pub rtm_type: ::c_uchar, - pub rtm_index: ::c_ushort, - pub rtm_flags: ::c_int, - pub rtm_addrs: ::c_int, - pub rtm_pid: ::pid_t, - pub rtm_seq: ::c_int, - pub rtm_errno: ::c_int, - pub rtm_use: ::c_int, + pub rtm_msglen: c_ushort, + pub rtm_version: c_uchar, + pub rtm_type: c_uchar, + pub rtm_index: c_ushort, + pub rtm_flags: c_int, + pub rtm_addrs: c_int, + pub rtm_pid: crate::pid_t, + pub rtm_seq: c_int, + pub rtm_errno: c_int, + pub rtm_use: c_int, pub rtm_inits: u32, pub rtm_rmx: rt_metrics, } pub struct rt_msghdr2 { - pub rtm_msglen: ::c_ushort, - pub rtm_version: ::c_uchar, - pub rtm_type: ::c_uchar, - pub rtm_index: ::c_ushort, - pub rtm_flags: ::c_int, - pub rtm_addrs: ::c_int, + pub rtm_msglen: c_ushort, + pub rtm_version: c_uchar, + pub rtm_type: c_uchar, + pub rtm_index: c_ushort, + pub rtm_flags: c_int, + pub rtm_addrs: c_int, pub rtm_refcnt: i32, - pub rtm_parentflags: ::c_int, - pub rtm_reserved: ::c_int, - pub rtm_use: ::c_int, + pub rtm_parentflags: c_int, + pub rtm_reserved: c_int, + pub rtm_use: c_int, pub rtm_inits: u32, pub rtm_rmx: rt_metrics, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct flock { - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - pub l_type: ::c_short, - pub l_whence: ::c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, + pub l_type: c_short, + pub l_whence: c_short, } pub struct sf_hdtr { - pub headers: *mut ::iovec, - pub hdr_cnt: ::c_int, - pub trailers: *mut ::iovec, - pub trl_cnt: ::c_int, + pub headers: *mut crate::iovec, + pub hdr_cnt: c_int, + pub trailers: *mut crate::iovec, + pub trl_cnt: c_int, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_n_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct proc_taskinfo { @@ -616,15 +622,15 @@ s! { pub pbi_xstatus: u32, pub pbi_pid: u32, pub pbi_ppid: u32, - pub pbi_uid: ::uid_t, - pub pbi_gid: ::gid_t, - pub pbi_ruid: ::uid_t, - pub pbi_rgid: ::gid_t, - pub pbi_svuid: ::uid_t, - pub pbi_svgid: ::gid_t, + pub pbi_uid: crate::uid_t, + pub pbi_gid: crate::gid_t, + pub pbi_ruid: crate::uid_t, + pub pbi_rgid: crate::gid_t, + pub pbi_svuid: crate::uid_t, + pub pbi_svgid: crate::gid_t, pub rfu_1: u32, - pub pbi_comm: [::c_char; MAXCOMLEN], - pub pbi_name: [::c_char; 32], // MAXCOMLEN * 2, but macro isn't happy... + pub pbi_comm: [c_char; MAXCOMLEN], + pub pbi_name: [c_char; 32], // MAXCOMLEN * 2, but macro isn't happy... pub pbi_nfiles: u32, pub pbi_pgid: u32, pub pbi_pjobc: u32, @@ -645,20 +651,20 @@ s! { pub xsu_avail: u64, pub xsu_used: u64, pub xsu_pagesize: u32, - pub xsu_encrypted: ::boolean_t, + pub xsu_encrypted: crate::boolean_t, } pub struct xucred { - pub cr_version: ::c_uint, - pub cr_uid: ::uid_t, - pub cr_ngroups: ::c_short, - pub cr_groups: [::gid_t; 16], + pub cr_version: c_uint, + pub cr_uid: crate::uid_t, + pub cr_ngroups: c_short, + pub cr_groups: [crate::gid_t; 16], } pub struct segment_command { pub cmd: u32, pub cmdsize: u32, - pub segname: [::c_char; 16], + pub segname: [c_char; 16], pub vmaddr: u32, pub vmsize: u32, pub fileoff: u32, @@ -672,7 +678,7 @@ s! { pub struct segment_command_64 { pub cmd: u32, pub cmdsize: u32, - pub segname: [::c_char; 16], + pub segname: [c_char; 16], pub vmaddr: u64, pub vmsize: u64, pub fileoff: u64, @@ -689,29 +695,29 @@ s! { } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::c_uchar, - pub sdl_index: ::c_ushort, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 12], + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 12], } pub struct sockaddr_inarp { - pub sin_len: ::c_uchar, - pub sin_family: ::c_uchar, - pub sin_port: ::c_ushort, - pub sin_addr: ::in_addr, - pub sin_srcaddr: ::in_addr, - pub sin_tos: ::c_ushort, - pub sin_other: ::c_ushort, + pub sin_len: c_uchar, + pub sin_family: c_uchar, + pub sin_port: c_ushort, + pub sin_addr: crate::in_addr, + pub sin_srcaddr: crate::in_addr, + pub sin_tos: c_ushort, + pub sin_other: c_ushort, } pub struct sockaddr_ctl { - pub sc_len: ::c_uchar, - pub sc_family: ::c_uchar, + pub sc_len: c_uchar, + pub sc_family: c_uchar, pub ss_sysaddr: u16, pub sc_id: u32, pub sc_unit: u32, @@ -719,34 +725,34 @@ s! { } pub struct in_pktinfo { - pub ipi_ifindex: ::c_uint, - pub ipi_spec_dst: ::in_addr, - pub ipi_addr: ::in_addr, + pub ipi_ifindex: c_uint, + pub ipi_spec_dst: crate::in_addr, + pub ipi_addr: crate::in_addr, } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } // sys/ipc.h: pub struct ipc_perm { - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub _seq: ::c_ushort, - pub _key: ::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub _seq: c_ushort, + pub _key: crate::key_t, } // sys/sem.h pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } // sys/shm.h @@ -760,52 +766,52 @@ s! { } pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } // net/ndrv.h pub struct sockaddr_ndrv { - pub snd_len: ::c_uchar, - pub snd_family: ::c_uchar, - pub snd_name: [::c_uchar; ::IFNAMSIZ], + pub snd_len: c_uchar, + pub snd_family: c_uchar, + pub snd_name: [c_uchar; crate::IFNAMSIZ], } // sys/socket.h pub struct sa_endpoints_t { - pub sae_srcif: ::c_uint, // optional source interface - pub sae_srcaddr: *const ::sockaddr, // optional source address - pub sae_srcaddrlen: ::socklen_t, // size of source address - pub sae_dstaddr: *const ::sockaddr, // destination address - pub sae_dstaddrlen: ::socklen_t, // size of destination address + pub sae_srcif: c_uint, // optional source interface + pub sae_srcaddr: *const crate::sockaddr, // optional source address + pub sae_srcaddrlen: crate::socklen_t, // size of source address + pub sae_dstaddr: *const crate::sockaddr, // destination address + pub sae_dstaddrlen: crate::socklen_t, // size of destination address } pub struct timex { - pub modes: ::c_uint, - pub offset: ::c_long, - pub freq: ::c_long, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub status: ::c_int, - pub constant: ::c_long, - pub precision: ::c_long, - pub tolerance: ::c_long, - pub ppsfreq: ::c_long, - pub jitter: ::c_long, - pub shift: ::c_int, - pub stabil: ::c_long, - pub jitcnt: ::c_long, - pub calcnt: ::c_long, - pub errcnt: ::c_long, - pub stbcnt: ::c_long, + pub modes: c_uint, + pub offset: c_long, + pub freq: c_long, + pub maxerror: c_long, + pub esterror: c_long, + pub status: c_int, + pub constant: c_long, + pub precision: c_long, + pub tolerance: c_long, + pub ppsfreq: c_long, + pub jitter: c_long, + pub shift: c_int, + pub stabil: c_long, + pub jitcnt: c_long, + pub calcnt: c_long, + pub errcnt: c_long, + pub stbcnt: c_long, } pub struct ntptimeval { - pub time: ::timespec, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub tai: ::c_long, - pub time_state: ::c_int, + pub time: crate::timespec, + pub maxerror: c_long, + pub esterror: c_long, + pub tai: c_long, + pub time_state: c_int, } pub struct thread_standard_policy { @@ -845,29 +851,29 @@ s! { // malloc/malloc.h pub struct malloc_statistics_t { - pub blocks_in_use: ::c_uint, - pub size_in_use: ::size_t, - pub max_size_in_use: ::size_t, - pub size_allocated: ::size_t, + pub blocks_in_use: c_uint, + pub size_in_use: size_t, + pub max_size_in_use: size_t, + pub size_allocated: size_t, } pub struct mstats { - pub bytes_total: ::size_t, - pub chunks_used: ::size_t, - pub bytes_used: ::size_t, - pub chunks_free: ::size_t, - pub bytes_free: ::size_t, + pub bytes_total: size_t, + pub chunks_used: size_t, + pub bytes_used: size_t, + pub chunks_free: size_t, + pub bytes_free: size_t, } pub struct vm_range_t { - pub address: ::vm_address_t, - pub size: ::vm_size_t, + pub address: crate::vm_address_t, + pub size: crate::vm_size_t, } // sched.h pub struct sched_param { - pub sched_priority: ::c_int, - __opaque: [::c_char; 4], + pub sched_priority: c_int, + __opaque: [c_char; 4], } pub struct vinfo_stat { @@ -875,8 +881,8 @@ s! { pub vst_mode: u16, pub vst_nlink: u16, pub vst_ino: u64, - pub vst_uid: ::uid_t, - pub vst_gid: ::gid_t, + pub vst_uid: crate::uid_t, + pub vst_gid: crate::gid_t, pub vst_atime: i64, pub vst_atimensec: i64, pub vst_mtime: i64, @@ -885,7 +891,7 @@ s! { pub vst_ctimensec: i64, pub vst_birthtime: i64, pub vst_birthtimensec: i64, - pub vst_size: ::off_t, + pub vst_size: off_t, pub vst_blocks: i64, pub vst_blksize: i32, pub vst_flags: u32, @@ -896,14 +902,14 @@ s! { pub struct vnode_info { pub vi_stat: vinfo_stat, - pub vi_type: ::c_int, - pub vi_pad: ::c_int, - pub vi_fsid: ::fsid_t, + pub vi_type: c_int, + pub vi_pad: c_int, + pub vi_fsid: crate::fsid_t, } pub struct vnode_info_path { pub vip_vi: vnode_info, - pub vip_path: [::c_char; ::MAXPATHLEN as usize], + pub vip_path: [c_char; crate::MAXPATHLEN as usize], } pub struct proc_vnodepathinfo { @@ -1061,12 +1067,12 @@ s! { } pub struct image_offset { - pub uuid: ::uuid_t, + pub uuid: crate::uuid_t, pub offset: u32, } pub struct attrlist { - pub bitmapcount: ::c_ushort, + pub bitmapcount: c_ushort, pub reserved: u16, pub commonattr: attrgroup_t, pub volattr: attrgroup_t, @@ -1149,91 +1155,91 @@ s! { } pub struct in6_ifstat { - pub ifs6_in_receive: ::u_quad_t, - pub ifs6_in_hdrerr: ::u_quad_t, - pub ifs6_in_toobig: ::u_quad_t, - pub ifs6_in_noroute: ::u_quad_t, - pub ifs6_in_addrerr: ::u_quad_t, - pub ifs6_in_protounknown: ::u_quad_t, - pub ifs6_in_truncated: ::u_quad_t, - pub ifs6_in_discard: ::u_quad_t, - pub ifs6_in_deliver: ::u_quad_t, - pub ifs6_out_forward: ::u_quad_t, - pub ifs6_out_request: ::u_quad_t, - pub ifs6_out_discard: ::u_quad_t, - pub ifs6_out_fragok: ::u_quad_t, - pub ifs6_out_fragfail: ::u_quad_t, - pub ifs6_out_fragcreat: ::u_quad_t, - pub ifs6_reass_reqd: ::u_quad_t, - pub ifs6_reass_ok: ::u_quad_t, - pub ifs6_atmfrag_rcvd: ::u_quad_t, - pub ifs6_reass_fail: ::u_quad_t, - pub ifs6_in_mcast: ::u_quad_t, - pub ifs6_out_mcast: ::u_quad_t, - pub ifs6_cantfoward_icmp6: ::u_quad_t, - pub ifs6_addr_expiry_cnt: ::u_quad_t, - pub ifs6_pfx_expiry_cnt: ::u_quad_t, - pub ifs6_defrtr_expiry_cnt: ::u_quad_t, + pub ifs6_in_receive: crate::u_quad_t, + pub ifs6_in_hdrerr: crate::u_quad_t, + pub ifs6_in_toobig: crate::u_quad_t, + pub ifs6_in_noroute: crate::u_quad_t, + pub ifs6_in_addrerr: crate::u_quad_t, + pub ifs6_in_protounknown: crate::u_quad_t, + pub ifs6_in_truncated: crate::u_quad_t, + pub ifs6_in_discard: crate::u_quad_t, + pub ifs6_in_deliver: crate::u_quad_t, + pub ifs6_out_forward: crate::u_quad_t, + pub ifs6_out_request: crate::u_quad_t, + pub ifs6_out_discard: crate::u_quad_t, + pub ifs6_out_fragok: crate::u_quad_t, + pub ifs6_out_fragfail: crate::u_quad_t, + pub ifs6_out_fragcreat: crate::u_quad_t, + pub ifs6_reass_reqd: crate::u_quad_t, + pub ifs6_reass_ok: crate::u_quad_t, + pub ifs6_atmfrag_rcvd: crate::u_quad_t, + pub ifs6_reass_fail: crate::u_quad_t, + pub ifs6_in_mcast: crate::u_quad_t, + pub ifs6_out_mcast: crate::u_quad_t, + pub ifs6_cantfoward_icmp6: crate::u_quad_t, + pub ifs6_addr_expiry_cnt: crate::u_quad_t, + pub ifs6_pfx_expiry_cnt: crate::u_quad_t, + pub ifs6_defrtr_expiry_cnt: crate::u_quad_t, } pub struct icmp6_ifstat { - pub ifs6_in_msg: ::u_quad_t, - pub ifs6_in_error: ::u_quad_t, - pub ifs6_in_dstunreach: ::u_quad_t, - pub ifs6_in_adminprohib: ::u_quad_t, - pub ifs6_in_timeexceed: ::u_quad_t, - pub ifs6_in_paramprob: ::u_quad_t, - pub ifs6_in_pkttoobig: ::u_quad_t, - pub ifs6_in_echo: ::u_quad_t, - pub ifs6_in_echoreply: ::u_quad_t, - pub ifs6_in_routersolicit: ::u_quad_t, - pub ifs6_in_routeradvert: ::u_quad_t, - pub ifs6_in_neighborsolicit: ::u_quad_t, - pub ifs6_in_neighboradvert: ::u_quad_t, - pub ifs6_in_redirect: ::u_quad_t, - pub ifs6_in_mldquery: ::u_quad_t, - pub ifs6_in_mldreport: ::u_quad_t, - pub ifs6_in_mlddone: ::u_quad_t, - pub ifs6_out_msg: ::u_quad_t, - pub ifs6_out_error: ::u_quad_t, - pub ifs6_out_dstunreach: ::u_quad_t, - pub ifs6_out_adminprohib: ::u_quad_t, - pub ifs6_out_timeexceed: ::u_quad_t, - pub ifs6_out_paramprob: ::u_quad_t, - pub ifs6_out_pkttoobig: ::u_quad_t, - pub ifs6_out_echo: ::u_quad_t, - pub ifs6_out_echoreply: ::u_quad_t, - pub ifs6_out_routersolicit: ::u_quad_t, - pub ifs6_out_routeradvert: ::u_quad_t, - pub ifs6_out_neighborsolicit: ::u_quad_t, - pub ifs6_out_neighboradvert: ::u_quad_t, - pub ifs6_out_redirect: ::u_quad_t, - pub ifs6_out_mldquery: ::u_quad_t, - pub ifs6_out_mldreport: ::u_quad_t, - pub ifs6_out_mlddone: ::u_quad_t, + pub ifs6_in_msg: crate::u_quad_t, + pub ifs6_in_error: crate::u_quad_t, + pub ifs6_in_dstunreach: crate::u_quad_t, + pub ifs6_in_adminprohib: crate::u_quad_t, + pub ifs6_in_timeexceed: crate::u_quad_t, + pub ifs6_in_paramprob: crate::u_quad_t, + pub ifs6_in_pkttoobig: crate::u_quad_t, + pub ifs6_in_echo: crate::u_quad_t, + pub ifs6_in_echoreply: crate::u_quad_t, + pub ifs6_in_routersolicit: crate::u_quad_t, + pub ifs6_in_routeradvert: crate::u_quad_t, + pub ifs6_in_neighborsolicit: crate::u_quad_t, + pub ifs6_in_neighboradvert: crate::u_quad_t, + pub ifs6_in_redirect: crate::u_quad_t, + pub ifs6_in_mldquery: crate::u_quad_t, + pub ifs6_in_mldreport: crate::u_quad_t, + pub ifs6_in_mlddone: crate::u_quad_t, + pub ifs6_out_msg: crate::u_quad_t, + pub ifs6_out_error: crate::u_quad_t, + pub ifs6_out_dstunreach: crate::u_quad_t, + pub ifs6_out_adminprohib: crate::u_quad_t, + pub ifs6_out_timeexceed: crate::u_quad_t, + pub ifs6_out_paramprob: crate::u_quad_t, + pub ifs6_out_pkttoobig: crate::u_quad_t, + pub ifs6_out_echo: crate::u_quad_t, + pub ifs6_out_echoreply: crate::u_quad_t, + pub ifs6_out_routersolicit: crate::u_quad_t, + pub ifs6_out_routeradvert: crate::u_quad_t, + pub ifs6_out_neighborsolicit: crate::u_quad_t, + pub ifs6_out_neighboradvert: crate::u_quad_t, + pub ifs6_out_redirect: crate::u_quad_t, + pub ifs6_out_mldquery: crate::u_quad_t, + pub ifs6_out_mldreport: crate::u_quad_t, + pub ifs6_out_mlddone: crate::u_quad_t, } // mach/host_info.h pub struct host_cpu_load_info { - pub cpu_ticks: [::natural_t; CPU_STATE_MAX as usize], + pub cpu_ticks: [crate::natural_t; CPU_STATE_MAX as usize], } // net/if_mib.h pub struct ifmibdata { /// Name of interface - pub ifmd_name: [::c_char; ::IFNAMSIZ], + pub ifmd_name: [c_char; crate::IFNAMSIZ], /// Number of promiscuous listeners - pub ifmd_pcount: ::c_uint, + pub ifmd_pcount: c_uint, /// Interface flags - pub ifmd_flags: ::c_uint, + pub ifmd_flags: c_uint, /// Instantaneous length of send queue - pub ifmd_snd_len: ::c_uint, + pub ifmd_snd_len: c_uint, /// Maximum length of send queue - pub ifmd_snd_maxlen: ::c_uint, + pub ifmd_snd_maxlen: c_uint, /// Number of drops in send queue - pub ifmd_snd_drops: ::c_uint, + pub ifmd_snd_drops: c_uint, /// For future expansion - pub ifmd_filler: [::c_uint; 4], + pub ifmd_filler: [c_uint; 4], /// Generic information and statistics pub ifmd_data: if_data64, } @@ -1260,25 +1266,25 @@ s! { // kern_control.h pub struct ctl_info { pub ctl_id: u32, - pub ctl_name: [::c_char; MAX_KCTL_NAME], + pub ctl_name: [c_char; MAX_KCTL_NAME], } } s_no_extra_traits! { #[repr(packed(4))] pub struct ifconf { - pub ifc_len: ::c_int, + pub ifc_len: c_int, pub ifc_ifcu: __c_anonymous_ifc_ifcu, } #[repr(packed(4))] pub struct kevent { - pub ident: ::uintptr_t, + pub ident: crate::uintptr_t, pub filter: i16, pub flags: u16, pub fflags: u32, - pub data: ::intptr_t, - pub udata: *mut ::c_void, + pub data: intptr_t, + pub udata: *mut c_void, } #[repr(packed(4))] @@ -1286,10 +1292,10 @@ s_no_extra_traits! { // Note the manpage shows different types than the system header. pub sem_perm: ipc_perm, pub sem_base: i32, - pub sem_nsems: ::c_ushort, - pub sem_otime: ::time_t, + pub sem_nsems: c_ushort, + pub sem_otime: crate::time_t, pub sem_pad1: i32, - pub sem_ctime: ::time_t, + pub sem_ctime: crate::time_t, pub sem_pad2: i32, pub sem_pad3: [i32; 4], } @@ -1297,15 +1303,15 @@ s_no_extra_traits! { #[repr(packed(4))] pub struct shmid_ds { pub shm_perm: ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, // FIXME: 64-bit wrong align => wrong offset - pub shm_dtime: ::time_t, // FIXME: 64-bit wrong align => wrong offset - pub shm_ctime: ::time_t, // FIXME: 64-bit wrong align => wrong offset + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, // FIXME: 64-bit wrong align => wrong offset + pub shm_dtime: crate::time_t, // FIXME: 64-bit wrong align => wrong offset + pub shm_ctime: crate::time_t, // FIXME: 64-bit wrong align => wrong offset // FIXME: 64-bit wrong align => wrong offset: - pub shm_internal: *mut ::c_void, + pub shm_internal: *mut c_void, } pub struct proc_threadinfo { @@ -1319,7 +1325,7 @@ s_no_extra_traits! { pub pth_curpri: i32, pub pth_priority: i32, pub pth_maxpriority: i32, - pub pth_name: [::c_char; MAXTHREADNAMESIZE], + pub pth_name: [c_char; MAXTHREADNAMESIZE], } pub struct statfs { @@ -1330,14 +1336,14 @@ s_no_extra_traits! { pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_owner: ::uid_t, + pub f_fsid: crate::fsid_t, + pub f_owner: crate::uid_t, pub f_type: u32, pub f_flags: u32, pub f_fssubtype: u32, - pub f_fstypename: [::c_char; 16], - pub f_mntonname: [::c_char; 1024], - pub f_mntfromname: [::c_char; 1024], + pub f_fstypename: [c_char; 16], + pub f_mntonname: [c_char; 1024], + pub f_mntfromname: [c_char; 1024], pub f_flags_ext: u32, pub f_reserved: [u32; 7], } @@ -1348,71 +1354,71 @@ s_no_extra_traits! { pub d_reclen: u16, pub d_namlen: u16, pub d_type: u8, - pub d_name: [::c_char; 1024], + pub d_name: [c_char; 1024], } pub struct pthread_rwlock_t { - __sig: ::c_long, + __sig: c_long, __opaque: [u8; __PTHREAD_RWLOCK_SIZE__], } pub struct pthread_mutex_t { - __sig: ::c_long, + __sig: c_long, __opaque: [u8; __PTHREAD_MUTEX_SIZE__], } pub struct pthread_cond_t { - __sig: ::c_long, + __sig: c_long, __opaque: [u8; __PTHREAD_COND_SIZE__], } pub struct sockaddr_storage { pub ss_len: u8, - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, __ss_pad1: [u8; 6], __ss_align: i64, __ss_pad2: [u8; 112], } pub struct utmpx { - pub ut_user: [::c_char; _UTX_USERSIZE], - pub ut_id: [::c_char; _UTX_IDSIZE], - pub ut_line: [::c_char; _UTX_LINESIZE], - pub ut_pid: ::pid_t, - pub ut_type: ::c_short, - pub ut_tv: ::timeval, - pub ut_host: [::c_char; _UTX_HOSTSIZE], + pub ut_user: [c_char; _UTX_USERSIZE], + pub ut_id: [c_char; _UTX_IDSIZE], + pub ut_line: [c_char; _UTX_LINESIZE], + pub ut_pid: crate::pid_t, + pub ut_type: c_short, + pub ut_tv: crate::timeval, + pub ut_host: [c_char; _UTX_HOSTSIZE], ut_pad: [u32; 16], } pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, - __unused1: *mut ::c_void, //actually a function pointer - pub sigev_notify_attributes: *mut ::pthread_attr_t, + pub sigev_notify: c_int, + pub sigev_signo: c_int, + pub sigev_value: crate::sigval, + __unused1: *mut c_void, //actually a function pointer + pub sigev_notify_attributes: *mut crate::pthread_attr_t, } pub struct processor_cpu_load_info { - pub cpu_ticks: [::c_uint; CPU_STATE_MAX as usize], + pub cpu_ticks: [c_uint; CPU_STATE_MAX as usize], } pub struct processor_basic_info { pub cpu_type: cpu_type_t, pub cpu_subtype: cpu_subtype_t, - pub running: ::boolean_t, - pub slot_num: ::c_int, - pub is_master: ::boolean_t, + pub running: crate::boolean_t, + pub slot_num: c_int, + pub is_master: crate::boolean_t, } pub struct processor_set_basic_info { - pub processor_count: ::c_int, - pub default_policy: ::c_int, + pub processor_count: c_int, + pub default_policy: c_int, } pub struct processor_set_load_info { - pub task_count: ::c_int, - pub thread_count: ::c_int, + pub task_count: c_int, + pub thread_count: c_int, pub load_average: integer_t, pub mach_factor: integer_t, } @@ -1425,12 +1431,12 @@ s_no_extra_traits! { pub struct thread_basic_info { pub user_time: time_value_t, pub system_time: time_value_t, - pub cpu_usage: ::integer_t, - pub policy: ::policy_t, - pub run_state: ::integer_t, - pub flags: ::integer_t, - pub suspend_count: ::integer_t, - pub sleep_time: ::integer_t, + pub cpu_usage: crate::integer_t, + pub policy: crate::policy_t, + pub run_state: crate::integer_t, + pub flags: crate::integer_t, + pub suspend_count: crate::integer_t, + pub sleep_time: crate::integer_t, } pub struct thread_identifier_info { @@ -1450,19 +1456,19 @@ s_no_extra_traits! { pub pth_curpri: i32, pub pth_priority: i32, pub pth_maxpriority: i32, - pub pth_name: [::c_char; MAXTHREADNAMESIZE], + pub pth_name: [c_char; MAXTHREADNAMESIZE], } #[repr(packed(4))] pub struct if_data64 { - pub ifi_type: ::c_uchar, - pub ifi_typelen: ::c_uchar, - pub ifi_physical: ::c_uchar, - pub ifi_addrlen: ::c_uchar, - pub ifi_hdrlen: ::c_uchar, - pub ifi_recvquota: ::c_uchar, - pub ifi_xmitquota: ::c_uchar, - pub ifi_unused1: ::c_uchar, + pub ifi_type: c_uchar, + pub ifi_typelen: c_uchar, + pub ifi_physical: c_uchar, + pub ifi_addrlen: c_uchar, + pub ifi_hdrlen: c_uchar, + pub ifi_recvquota: c_uchar, + pub ifi_xmitquota: c_uchar, + pub ifi_unused1: c_uchar, pub ifi_mtu: u32, pub ifi_metric: u32, pub ifi_baudrate: u64, @@ -1480,23 +1486,23 @@ s_no_extra_traits! { pub ifi_recvtiming: u32, pub ifi_xmittiming: u32, #[cfg(target_pointer_width = "32")] - pub ifi_lastchange: ::timeval, + pub ifi_lastchange: crate::timeval, #[cfg(not(target_pointer_width = "32"))] pub ifi_lastchange: timeval32, } #[repr(packed(4))] pub struct if_msghdr2 { - pub ifm_msglen: ::c_ushort, - pub ifm_version: ::c_uchar, - pub ifm_type: ::c_uchar, - pub ifm_addrs: ::c_int, - pub ifm_flags: ::c_int, - pub ifm_index: ::c_ushort, - pub ifm_snd_len: ::c_int, - pub ifm_snd_maxlen: ::c_int, - pub ifm_snd_drops: ::c_int, - pub ifm_timer: ::c_int, + pub ifm_msglen: c_ushort, + pub ifm_version: c_uchar, + pub ifm_type: c_uchar, + pub ifm_addrs: c_int, + pub ifm_flags: c_int, + pub ifm_index: c_ushort, + pub ifm_snd_len: c_int, + pub ifm_snd_maxlen: c_int, + pub ifm_snd_drops: c_int, + pub ifm_timer: c_int, pub ifm_data: if_data64, } @@ -1535,15 +1541,15 @@ s_no_extra_traits! { pub resident_size_max: mach_vm_size_t, pub user_time: time_value_t, pub system_time: time_value_t, - pub policy: ::policy_t, + pub policy: crate::policy_t, pub suspend_count: integer_t, } #[repr(packed(4))] pub struct log2phys { - pub l2p_flags: ::c_uint, - pub l2p_contigbytes: ::off_t, - pub l2p_devoffset: ::off_t, + pub l2p_flags: c_uint, + pub l2p_contigbytes: off_t, + pub l2p_devoffset: off_t, } pub struct os_unfair_lock_s { @@ -1552,68 +1558,68 @@ s_no_extra_traits! { #[repr(packed(1))] pub struct sockaddr_vm { - pub svm_len: ::c_uchar, - pub svm_family: ::sa_family_t, - pub svm_reserved1: ::c_ushort, - pub svm_port: ::c_uint, - pub svm_cid: ::c_uint, + pub svm_len: c_uchar, + pub svm_family: crate::sa_family_t, + pub svm_reserved1: c_ushort, + pub svm_port: c_uint, + pub svm_cid: c_uint, } pub struct ifdevmtu { - pub ifdm_current: ::c_int, - pub ifdm_min: ::c_int, - pub ifdm_max: ::c_int, + pub ifdm_current: c_int, + pub ifdm_min: c_int, + pub ifdm_max: c_int, } pub union __c_anonymous_ifk_data { - pub ifk_ptr: *mut ::c_void, - pub ifk_value: ::c_int, + pub ifk_ptr: *mut c_void, + pub ifk_value: c_int, } #[repr(packed(4))] pub struct ifkpi { - pub ifk_module_id: ::c_uint, - pub ifk_type: ::c_uint, + pub ifk_module_id: c_uint, + pub ifk_type: c_uint, pub ifk_data: __c_anonymous_ifk_data, } pub union __c_anonymous_ifr_ifru { - pub ifru_addr: ::sockaddr, - pub ifru_dstaddr: ::sockaddr, - pub ifru_broadaddr: ::sockaddr, - pub ifru_flags: ::c_short, - pub ifru_metrics: ::c_int, - pub ifru_mtu: ::c_int, - pub ifru_phys: ::c_int, - pub ifru_media: ::c_int, - pub ifru_intval: ::c_int, - pub ifru_data: *mut ::c_char, + pub ifru_addr: crate::sockaddr, + pub ifru_dstaddr: crate::sockaddr, + pub ifru_broadaddr: crate::sockaddr, + pub ifru_flags: c_short, + pub ifru_metrics: c_int, + pub ifru_mtu: c_int, + pub ifru_phys: c_int, + pub ifru_media: c_int, + pub ifru_intval: c_int, + pub ifru_data: *mut c_char, pub ifru_devmtu: ifdevmtu, pub ifru_kpi: ifkpi, pub ifru_wake_flags: u32, pub ifru_route_refcnt: u32, - pub ifru_cap: [::c_int; 2], + pub ifru_cap: [c_int; 2], pub ifru_functional_type: u32, } pub struct ifreq { - pub ifr_name: [::c_char; ::IFNAMSIZ], + pub ifr_name: [c_char; crate::IFNAMSIZ], pub ifr_ifru: __c_anonymous_ifr_ifru, } pub union __c_anonymous_ifc_ifcu { - pub ifcu_buf: *mut ::c_char, + pub ifcu_buf: *mut c_char, pub ifcu_req: *mut ifreq, } pub union __c_anonymous_ifr_ifru6 { - pub ifru_addr: ::sockaddr_in6, - pub ifru_dstaddr: ::sockaddr_in6, - pub ifru_flags: ::c_int, - pub ifru_flags6: ::c_int, - pub ifru_metrics: ::c_int, - pub ifru_intval: ::c_int, - pub ifru_data: *mut ::c_char, + pub ifru_addr: crate::sockaddr_in6, + pub ifru_dstaddr: crate::sockaddr_in6, + pub ifru_flags: c_int, + pub ifru_flags6: c_int, + pub ifru_metrics: c_int, + pub ifru_intval: c_int, + pub ifru_data: *mut c_char, pub ifru_lifetime: in6_addrlifetime, pub ifru_stat: in6_ifstat, pub ifru_icmp6stat: icmp6_ifstat, @@ -1621,50 +1627,50 @@ s_no_extra_traits! { } pub struct in6_ifreq { - pub ifr_name: [::c_char; ::IFNAMSIZ], + pub ifr_name: [c_char; crate::IFNAMSIZ], pub ifr_ifru: __c_anonymous_ifr_ifru6, } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - _si_pid: ::pid_t, - _si_uid: ::uid_t, - _si_status: ::c_int, - _si_addr: *mut ::c_void, - si_value: ::sigval, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + _si_pid: crate::pid_t, + _si_uid: crate::uid_t, + _si_status: c_int, + _si_addr: *mut c_void, + si_value: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_timer)).si_value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.si_status } } s_no_extra_traits! { pub union semun { - pub val: ::c_int, + pub val: c_int, pub buf: *mut semid_ds, - pub array: *mut ::c_ushort, + pub array: *mut c_ushort, } } @@ -1676,15 +1682,15 @@ cfg_if! { } } impl Eq for semun {} - impl ::fmt::Debug for semun { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for semun { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("semun") .field("val", unsafe { &self.val }) .finish() } } - impl ::hash::Hash for semun { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for semun { + fn hash(&self, state: &mut H) { unsafe { self.val.hash(state) }; } } @@ -1704,8 +1710,8 @@ cfg_if! { } } impl Eq for kevent {} - impl ::fmt::Debug for kevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for kevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let ident = self.ident; let filter = self.filter; let flags = self.flags; @@ -1722,8 +1728,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for kevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for kevent { + fn hash(&self, state: &mut H) { let ident = self.ident; let filter = self.filter; let flags = self.flags; @@ -1756,8 +1762,8 @@ cfg_if! { } } impl Eq for semid_ds {} - impl ::fmt::Debug for semid_ds { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for semid_ds { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let sem_perm = self.sem_perm; let sem_base = self.sem_base; let sem_nsems = self.sem_nsems; @@ -1778,8 +1784,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for semid_ds { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for semid_ds { + fn hash(&self, state: &mut H) { let sem_perm = self.sem_perm; let sem_base = self.sem_base; let sem_nsems = self.sem_nsems; @@ -1815,8 +1821,8 @@ cfg_if! { } } impl Eq for shmid_ds {} - impl ::fmt::Debug for shmid_ds { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for shmid_ds { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let shm_perm = self.shm_perm; let shm_segsz = self.shm_segsz; let shm_lpid = self.shm_lpid; @@ -1839,8 +1845,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for shmid_ds { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for shmid_ds { + fn hash(&self, state: &mut H) { let shm_perm = self.shm_perm; let shm_segsz = self.shm_segsz; let shm_lpid = self.shm_lpid; @@ -1882,8 +1888,8 @@ cfg_if! { } } impl Eq for proc_threadinfo {} - impl ::fmt::Debug for proc_threadinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for proc_threadinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("proc_threadinfo") .field("pth_user_time", &self.pth_user_time) .field("pth_system_time", &self.pth_system_time) @@ -1899,8 +1905,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for proc_threadinfo { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for proc_threadinfo { + fn hash(&self, state: &mut H) { self.pth_user_time.hash(state); self.pth_system_time.hash(state); self.pth_cpu_usage.hash(state); @@ -1945,8 +1951,8 @@ cfg_if! { } impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_bsize", &self.f_bsize) .field("f_iosize", &self.f_iosize) @@ -1968,8 +1974,8 @@ cfg_if! { } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_bsize.hash(state); self.f_iosize.hash(state); self.f_blocks.hash(state); @@ -2004,8 +2010,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_seekoff", &self.d_seekoff) @@ -2016,8 +2022,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_seekoff.hash(state); self.d_reclen.hash(state); @@ -2037,16 +2043,16 @@ cfg_if! { } } impl Eq for pthread_rwlock_t {} - impl ::fmt::Debug for pthread_rwlock_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_rwlock_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_rwlock_t") .field("__sig", &self.__sig) // FIXME: .field("__opaque", &self.__opaque) .finish() } } - impl ::hash::Hash for pthread_rwlock_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_rwlock_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -2065,8 +2071,8 @@ cfg_if! { impl Eq for pthread_mutex_t {} - impl ::fmt::Debug for pthread_mutex_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_mutex_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_mutex_t") .field("__sig", &self.__sig) // FIXME: .field("__opaque", &self.__opaque) @@ -2074,8 +2080,8 @@ cfg_if! { } } - impl ::hash::Hash for pthread_mutex_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_mutex_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -2094,8 +2100,8 @@ cfg_if! { impl Eq for pthread_cond_t {} - impl ::fmt::Debug for pthread_cond_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_cond_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_cond_t") .field("__sig", &self.__sig) // FIXME: .field("__opaque", &self.__opaque) @@ -2103,8 +2109,8 @@ cfg_if! { } } - impl ::hash::Hash for pthread_cond_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_cond_t { + fn hash(&self, state: &mut H) { self.__sig.hash(state); self.__opaque.hash(state); } @@ -2130,8 +2136,8 @@ cfg_if! { impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -2142,8 +2148,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_len.hash(state); self.ss_family.hash(state); self.__ss_pad1.hash(state); @@ -2174,8 +2180,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") // FIXME: .field("ut_user", &self.ut_user) .field("ut_id", &self.ut_id) @@ -2189,8 +2195,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_user.hash(state); self.ut_id.hash(state); self.ut_line.hash(state); @@ -2213,8 +2219,8 @@ cfg_if! { impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -2224,8 +2230,8 @@ cfg_if! { } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_notify.hash(state); self.sigev_signo.hash(state); self.sigev_value.hash(state); @@ -2239,15 +2245,15 @@ cfg_if! { } } impl Eq for processor_cpu_load_info {} - impl ::fmt::Debug for processor_cpu_load_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for processor_cpu_load_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("processor_cpu_load_info") .field("cpu_ticks", &self.cpu_ticks) .finish() } } - impl ::hash::Hash for processor_cpu_load_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for processor_cpu_load_info { + fn hash(&self, state: &mut H) { self.cpu_ticks.hash(state); } } @@ -2262,8 +2268,8 @@ cfg_if! { } } impl Eq for processor_basic_info {} - impl ::fmt::Debug for processor_basic_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for processor_basic_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("processor_basic_info") .field("cpu_type", &self.cpu_type) .field("cpu_subtype", &self.cpu_subtype) @@ -2273,8 +2279,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for processor_basic_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for processor_basic_info { + fn hash(&self, state: &mut H) { self.cpu_type.hash(state); self.cpu_subtype.hash(state); self.running.hash(state); @@ -2290,16 +2296,16 @@ cfg_if! { } } impl Eq for processor_set_basic_info {} - impl ::fmt::Debug for processor_set_basic_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for processor_set_basic_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("processor_set_basic_info") .field("processor_count", &self.processor_count) .field("default_policy", &self.default_policy) .finish() } } - impl ::hash::Hash for processor_set_basic_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for processor_set_basic_info { + fn hash(&self, state: &mut H) { self.processor_count.hash(state); self.default_policy.hash(state); } @@ -2314,8 +2320,8 @@ cfg_if! { } } impl Eq for processor_set_load_info {} - impl ::fmt::Debug for processor_set_load_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for processor_set_load_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("processor_set_load_info") .field("task_count", &self.task_count) .field("thread_count", &self.thread_count) @@ -2324,8 +2330,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for processor_set_load_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for processor_set_load_info { + fn hash(&self, state: &mut H) { self.task_count.hash(state); self.thread_count.hash(state); self.load_average.hash(state); @@ -2339,16 +2345,16 @@ cfg_if! { } } impl Eq for time_value_t {} - impl ::fmt::Debug for time_value_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for time_value_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("time_value_t") .field("seconds", &self.seconds) .field("microseconds", &self.microseconds) .finish() } } - impl ::hash::Hash for time_value_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for time_value_t { + fn hash(&self, state: &mut H) { self.seconds.hash(state); self.microseconds.hash(state); } @@ -2366,8 +2372,8 @@ cfg_if! { } } impl Eq for thread_basic_info {} - impl ::fmt::Debug for thread_basic_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for thread_basic_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("thread_basic_info") .field("user_time", &self.user_time) .field("system_time", &self.system_time) @@ -2380,8 +2386,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for thread_basic_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for thread_basic_info { + fn hash(&self, state: &mut H) { self.user_time.hash(state); self.system_time.hash(state); self.cpu_usage.hash(state); @@ -2412,8 +2418,8 @@ cfg_if! { } } impl Eq for thread_extended_info {} - impl ::fmt::Debug for thread_extended_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for thread_extended_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("proc_threadinfo") .field("pth_user_time", &self.pth_user_time) .field("pth_system_time", &self.pth_system_time) @@ -2429,8 +2435,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for thread_extended_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for thread_extended_info { + fn hash(&self, state: &mut H) { self.pth_user_time.hash(state); self.pth_system_time.hash(state); self.pth_cpu_usage.hash(state); @@ -2452,8 +2458,8 @@ cfg_if! { } } impl Eq for thread_identifier_info {} - impl ::fmt::Debug for thread_identifier_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for thread_identifier_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("thread_identifier_info") .field("thread_id", &self.thread_id) .field("thread_handle", &self.thread_handle) @@ -2461,8 +2467,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for thread_identifier_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for thread_identifier_info { + fn hash(&self, state: &mut H) { self.thread_id.hash(state); self.thread_handle.hash(state); self.dispatch_qaddr.hash(state); @@ -2498,8 +2504,8 @@ cfg_if! { } } impl Eq for if_data64 {} - impl ::fmt::Debug for if_data64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for if_data64 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let ifi_type = self.ifi_type; let ifi_typelen = self.ifi_typelen; let ifi_physical = self.ifi_physical; @@ -2554,8 +2560,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for if_data64 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for if_data64 { + fn hash(&self, state: &mut H) { let ifi_type = self.ifi_type; let ifi_typelen = self.ifi_typelen; let ifi_physical = self.ifi_physical; @@ -2624,8 +2630,8 @@ cfg_if! { } } impl Eq for if_msghdr2 {} - impl ::fmt::Debug for if_msghdr2 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for if_msghdr2 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let ifm_msglen = self.ifm_msglen; let ifm_version = self.ifm_version; let ifm_type = self.ifm_type; @@ -2652,8 +2658,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for if_msghdr2 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for if_msghdr2 { + fn hash(&self, state: &mut H) { let ifm_msglen = self.ifm_msglen; let ifm_version = self.ifm_version; let ifm_type = self.ifm_type; @@ -2709,8 +2715,8 @@ cfg_if! { } } impl Eq for vm_statistics64 {} - impl ::fmt::Debug for vm_statistics64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for vm_statistics64 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let free_count = self.free_count; let active_count = self.active_count; let inactive_count = self.inactive_count; @@ -2767,8 +2773,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for vm_statistics64 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for vm_statistics64 { + fn hash(&self, state: &mut H) { let free_count = self.free_count; let active_count = self.active_count; let inactive_count = self.inactive_count; @@ -2833,8 +2839,8 @@ cfg_if! { } } impl Eq for mach_task_basic_info {} - impl ::fmt::Debug for mach_task_basic_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mach_task_basic_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let virtual_size = self.virtual_size; let resident_size = self.resident_size; let resident_size_max = self.resident_size_max; @@ -2853,8 +2859,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mach_task_basic_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mach_task_basic_info { + fn hash(&self, state: &mut H) { let virtual_size = self.virtual_size; let resident_size = self.resident_size; let resident_size_max = self.resident_size_max; @@ -2880,8 +2886,8 @@ cfg_if! { } } impl Eq for log2phys {} - impl ::fmt::Debug for log2phys { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for log2phys { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let l2p_flags = self.l2p_flags; let l2p_contigbytes = self.l2p_contigbytes; let l2p_devoffset = self.l2p_devoffset; @@ -2892,8 +2898,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for log2phys { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for log2phys { + fn hash(&self, state: &mut H) { let l2p_flags = self.l2p_flags; let l2p_contigbytes = self.l2p_contigbytes; let l2p_devoffset = self.l2p_devoffset; @@ -2910,16 +2916,16 @@ cfg_if! { impl Eq for os_unfair_lock {} - impl ::fmt::Debug for os_unfair_lock { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for os_unfair_lock { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("os_unfair_lock") .field("_os_unfair_lock_opaque", &self._os_unfair_lock_opaque) .finish() } } - impl ::hash::Hash for os_unfair_lock { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for os_unfair_lock { + fn hash(&self, state: &mut H) { self._os_unfair_lock_opaque.hash(state); } } @@ -2936,8 +2942,8 @@ cfg_if! { impl Eq for sockaddr_vm {} - impl ::fmt::Debug for sockaddr_vm { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_vm { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let svm_len = self.svm_len; let svm_family = self.svm_family; let svm_reserved1 = self.svm_reserved1; @@ -2954,8 +2960,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_vm { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_vm { + fn hash(&self, state: &mut H) { let svm_len = self.svm_len; let svm_family = self.svm_family; let svm_reserved1 = self.svm_reserved1; @@ -2980,8 +2986,8 @@ cfg_if! { impl Eq for ifdevmtu {} - impl ::fmt::Debug for ifdevmtu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifdevmtu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifdevmtu") .field("ifdm_current", &self.ifdm_current) .field("ifdm_min", &self.ifdm_min) @@ -2990,8 +2996,8 @@ cfg_if! { } } - impl ::hash::Hash for ifdevmtu { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifdevmtu { + fn hash(&self, state: &mut H) { self.ifdm_current.hash(state); self.ifdm_min.hash(state); self.ifdm_max.hash(state); @@ -3006,16 +3012,16 @@ cfg_if! { impl Eq for __c_anonymous_ifk_data {} - impl ::fmt::Debug for __c_anonymous_ifk_data { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifk_data { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_ifk_data") .field("ifk_ptr", unsafe { &self.ifk_ptr }) .field("ifk_value", unsafe { &self.ifk_value }) .finish() } } - impl ::hash::Hash for __c_anonymous_ifk_data { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifk_data { + fn hash(&self, state: &mut H) { unsafe { self.ifk_ptr.hash(state); self.ifk_value.hash(state); @@ -3031,8 +3037,8 @@ cfg_if! { impl Eq for ifkpi {} - impl ::fmt::Debug for ifkpi { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifkpi { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifkpi") .field("ifk_module_id", &self.ifk_module_id) .field("ifk_type", &self.ifk_type) @@ -3040,8 +3046,8 @@ cfg_if! { } } - impl ::hash::Hash for ifkpi { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifkpi { + fn hash(&self, state: &mut H) { self.ifk_module_id.hash(state); self.ifk_type.hash(state); } @@ -3076,8 +3082,8 @@ cfg_if! { impl Eq for __c_anonymous_ifr_ifru {} - impl ::fmt::Debug for __c_anonymous_ifr_ifru { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifr_ifru { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_ifr_ifru") .field("ifru_addr", unsafe { &self.ifru_addr }) .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) @@ -3101,8 +3107,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_ifr_ifru { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifr_ifru { + fn hash(&self, state: &mut H) { unsafe { self.ifru_addr.hash(state); self.ifru_dstaddr.hash(state); @@ -3132,8 +3138,8 @@ cfg_if! { impl Eq for ifreq {} - impl ::fmt::Debug for ifreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifreq") .field("ifr_name", &self.ifr_name) .field("ifr_ifru", &self.ifr_ifru) @@ -3141,21 +3147,21 @@ cfg_if! { } } - impl ::hash::Hash for ifreq { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifreq { + fn hash(&self, state: &mut H) { self.ifr_name.hash(state); self.ifr_ifru.hash(state); } } - impl ::fmt::Debug for ifconf { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifconf { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifconf").finish_non_exhaustive() } } - impl ::fmt::Debug for __c_anonymous_ifc_ifcu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifc_ifcu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifc_ifcu").finish_non_exhaustive() } } @@ -3181,8 +3187,8 @@ cfg_if! { impl Eq for __c_anonymous_ifr_ifru6 {} - impl ::fmt::Debug for __c_anonymous_ifr_ifru6 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifr_ifru6 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_ifr_ifru6") .field("ifru_addr", unsafe { &self.ifru_addr }) .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) @@ -3196,8 +3202,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_ifr_ifru6 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifr_ifru6 { + fn hash(&self, state: &mut H) { unsafe { self.ifru_addr.hash(state); self.ifru_dstaddr.hash(state); @@ -3219,8 +3225,8 @@ cfg_if! { impl Eq for in6_ifreq {} - impl ::fmt::Debug for in6_ifreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for in6_ifreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("in6_ifreq") .field("ifr_name", &self.ifr_name) .field("ifr_ifru", &self.ifr_ifru) @@ -3235,163 +3241,163 @@ pub const _UTX_LINESIZE: usize = 32; pub const _UTX_IDSIZE: usize = 4; pub const _UTX_HOSTSIZE: usize = 256; -pub const EMPTY: ::c_short = 0; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const OLD_TIME: ::c_short = 3; -pub const NEW_TIME: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; -pub const ACCOUNTING: ::c_short = 9; -pub const SIGNATURE: ::c_short = 10; -pub const SHUTDOWN_TIME: ::c_short = 11; - -pub const LC_COLLATE_MASK: ::c_int = 1 << 0; -pub const LC_CTYPE_MASK: ::c_int = 1 << 1; -pub const LC_MESSAGES_MASK: ::c_int = 1 << 2; -pub const LC_MONETARY_MASK: ::c_int = 1 << 3; -pub const LC_NUMERIC_MASK: ::c_int = 1 << 4; -pub const LC_TIME_MASK: ::c_int = 1 << 5; -pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK +pub const EMPTY: c_short = 0; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const OLD_TIME: c_short = 3; +pub const NEW_TIME: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; +pub const ACCOUNTING: c_short = 9; +pub const SIGNATURE: c_short = 10; +pub const SHUTDOWN_TIME: c_short = 11; + +pub const LC_COLLATE_MASK: c_int = 1 << 0; +pub const LC_CTYPE_MASK: c_int = 1 << 1; +pub const LC_MESSAGES_MASK: c_int = 1 << 2; +pub const LC_MONETARY_MASK: c_int = 1 << 3; +pub const LC_NUMERIC_MASK: c_int = 1 << 4; +pub const LC_TIME_MASK: c_int = 1 << 5; +pub const LC_ALL_MASK: c_int = LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK; -pub const CODESET: ::nl_item = 0; -pub const D_T_FMT: ::nl_item = 1; -pub const D_FMT: ::nl_item = 2; -pub const T_FMT: ::nl_item = 3; -pub const T_FMT_AMPM: ::nl_item = 4; -pub const AM_STR: ::nl_item = 5; -pub const PM_STR: ::nl_item = 6; - -pub const DAY_1: ::nl_item = 7; -pub const DAY_2: ::nl_item = 8; -pub const DAY_3: ::nl_item = 9; -pub const DAY_4: ::nl_item = 10; -pub const DAY_5: ::nl_item = 11; -pub const DAY_6: ::nl_item = 12; -pub const DAY_7: ::nl_item = 13; - -pub const ABDAY_1: ::nl_item = 14; -pub const ABDAY_2: ::nl_item = 15; -pub const ABDAY_3: ::nl_item = 16; -pub const ABDAY_4: ::nl_item = 17; -pub const ABDAY_5: ::nl_item = 18; -pub const ABDAY_6: ::nl_item = 19; -pub const ABDAY_7: ::nl_item = 20; - -pub const MON_1: ::nl_item = 21; -pub const MON_2: ::nl_item = 22; -pub const MON_3: ::nl_item = 23; -pub const MON_4: ::nl_item = 24; -pub const MON_5: ::nl_item = 25; -pub const MON_6: ::nl_item = 26; -pub const MON_7: ::nl_item = 27; -pub const MON_8: ::nl_item = 28; -pub const MON_9: ::nl_item = 29; -pub const MON_10: ::nl_item = 30; -pub const MON_11: ::nl_item = 31; -pub const MON_12: ::nl_item = 32; - -pub const ABMON_1: ::nl_item = 33; -pub const ABMON_2: ::nl_item = 34; -pub const ABMON_3: ::nl_item = 35; -pub const ABMON_4: ::nl_item = 36; -pub const ABMON_5: ::nl_item = 37; -pub const ABMON_6: ::nl_item = 38; -pub const ABMON_7: ::nl_item = 39; -pub const ABMON_8: ::nl_item = 40; -pub const ABMON_9: ::nl_item = 41; -pub const ABMON_10: ::nl_item = 42; -pub const ABMON_11: ::nl_item = 43; -pub const ABMON_12: ::nl_item = 44; - -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; -pub const CLOCK_MONOTONIC_RAW_APPROX: ::clockid_t = 5; -pub const CLOCK_MONOTONIC: ::clockid_t = 6; -pub const CLOCK_UPTIME_RAW: ::clockid_t = 8; -pub const CLOCK_UPTIME_RAW_APPROX: ::clockid_t = 9; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 12; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 16; - -pub const ERA: ::nl_item = 45; -pub const ERA_D_FMT: ::nl_item = 46; -pub const ERA_D_T_FMT: ::nl_item = 47; -pub const ERA_T_FMT: ::nl_item = 48; -pub const ALT_DIGITS: ::nl_item = 49; - -pub const RADIXCHAR: ::nl_item = 50; -pub const THOUSEP: ::nl_item = 51; - -pub const YESEXPR: ::nl_item = 52; -pub const NOEXPR: ::nl_item = 53; - -pub const YESSTR: ::nl_item = 54; -pub const NOSTR: ::nl_item = 55; - -pub const CRNCYSTR: ::nl_item = 56; - -pub const D_MD_ORDER: ::nl_item = 57; - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const SEEK_HOLE: ::c_int = 3; -pub const SEEK_DATA: ::c_int = 4; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; -pub const BUFSIZ: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const L_tmpnam: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 308915776; -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; -pub const _PC_NO_TRUNC: ::c_int = 8; -pub const _PC_VDISABLE: ::c_int = 9; -pub const _PC_NAME_CHARS_MAX: ::c_int = 10; -pub const _PC_CASE_SENSITIVE: ::c_int = 11; -pub const _PC_CASE_PRESERVING: ::c_int = 12; -pub const _PC_EXTENDED_SECURITY_NP: ::c_int = 13; -pub const _PC_AUTH_OPAQUE_NP: ::c_int = 14; -pub const _PC_2_SYMLINKS: ::c_int = 15; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 16; -pub const _PC_ASYNC_IO: ::c_int = 17; -pub const _PC_FILESIZEBITS: ::c_int = 18; -pub const _PC_PRIO_IO: ::c_int = 19; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 20; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 21; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 22; -pub const _PC_REC_XFER_ALIGN: ::c_int = 23; -pub const _PC_SYMLINK_MAX: ::c_int = 24; -pub const _PC_SYNC_IO: ::c_int = 25; -pub const _PC_XATTR_SIZE_BITS: ::c_int = 26; -pub const _PC_MIN_HOLE_SIZE: ::c_int = 27; -pub const O_EVTONLY: ::c_int = 0x00008000; -pub const O_NOCTTY: ::c_int = 0x00020000; -pub const O_DIRECTORY: ::c_int = 0x00100000; -pub const O_SYMLINK: ::c_int = 0x00200000; -pub const O_DSYNC: ::c_int = 0x00400000; -pub const O_CLOEXEC: ::c_int = 0x01000000; -pub const O_NOFOLLOW_ANY: ::c_int = 0x20000000; -pub const O_EXEC: ::c_int = 0x40000000; -pub const O_SEARCH: ::c_int = O_EXEC | O_DIRECTORY; +pub const CODESET: crate::nl_item = 0; +pub const D_T_FMT: crate::nl_item = 1; +pub const D_FMT: crate::nl_item = 2; +pub const T_FMT: crate::nl_item = 3; +pub const T_FMT_AMPM: crate::nl_item = 4; +pub const AM_STR: crate::nl_item = 5; +pub const PM_STR: crate::nl_item = 6; + +pub const DAY_1: crate::nl_item = 7; +pub const DAY_2: crate::nl_item = 8; +pub const DAY_3: crate::nl_item = 9; +pub const DAY_4: crate::nl_item = 10; +pub const DAY_5: crate::nl_item = 11; +pub const DAY_6: crate::nl_item = 12; +pub const DAY_7: crate::nl_item = 13; + +pub const ABDAY_1: crate::nl_item = 14; +pub const ABDAY_2: crate::nl_item = 15; +pub const ABDAY_3: crate::nl_item = 16; +pub const ABDAY_4: crate::nl_item = 17; +pub const ABDAY_5: crate::nl_item = 18; +pub const ABDAY_6: crate::nl_item = 19; +pub const ABDAY_7: crate::nl_item = 20; + +pub const MON_1: crate::nl_item = 21; +pub const MON_2: crate::nl_item = 22; +pub const MON_3: crate::nl_item = 23; +pub const MON_4: crate::nl_item = 24; +pub const MON_5: crate::nl_item = 25; +pub const MON_6: crate::nl_item = 26; +pub const MON_7: crate::nl_item = 27; +pub const MON_8: crate::nl_item = 28; +pub const MON_9: crate::nl_item = 29; +pub const MON_10: crate::nl_item = 30; +pub const MON_11: crate::nl_item = 31; +pub const MON_12: crate::nl_item = 32; + +pub const ABMON_1: crate::nl_item = 33; +pub const ABMON_2: crate::nl_item = 34; +pub const ABMON_3: crate::nl_item = 35; +pub const ABMON_4: crate::nl_item = 36; +pub const ABMON_5: crate::nl_item = 37; +pub const ABMON_6: crate::nl_item = 38; +pub const ABMON_7: crate::nl_item = 39; +pub const ABMON_8: crate::nl_item = 40; +pub const ABMON_9: crate::nl_item = 41; +pub const ABMON_10: crate::nl_item = 42; +pub const ABMON_11: crate::nl_item = 43; +pub const ABMON_12: crate::nl_item = 44; + +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_MONOTONIC_RAW: crate::clockid_t = 4; +pub const CLOCK_MONOTONIC_RAW_APPROX: crate::clockid_t = 5; +pub const CLOCK_MONOTONIC: crate::clockid_t = 6; +pub const CLOCK_UPTIME_RAW: crate::clockid_t = 8; +pub const CLOCK_UPTIME_RAW_APPROX: crate::clockid_t = 9; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 12; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 16; + +pub const ERA: crate::nl_item = 45; +pub const ERA_D_FMT: crate::nl_item = 46; +pub const ERA_D_T_FMT: crate::nl_item = 47; +pub const ERA_T_FMT: crate::nl_item = 48; +pub const ALT_DIGITS: crate::nl_item = 49; + +pub const RADIXCHAR: crate::nl_item = 50; +pub const THOUSEP: crate::nl_item = 51; + +pub const YESEXPR: crate::nl_item = 52; +pub const NOEXPR: crate::nl_item = 53; + +pub const YESSTR: crate::nl_item = 54; +pub const NOSTR: crate::nl_item = 55; + +pub const CRNCYSTR: crate::nl_item = 56; + +pub const D_MD_ORDER: crate::nl_item = 57; + +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 2147483647; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const SEEK_HOLE: c_int = 3; +pub const SEEK_DATA: c_int = 4; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; +pub const BUFSIZ: c_uint = 1024; +pub const FOPEN_MAX: c_uint = 20; +pub const FILENAME_MAX: c_uint = 1024; +pub const L_tmpnam: c_uint = 1024; +pub const TMP_MAX: c_uint = 308915776; +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_CHOWN_RESTRICTED: c_int = 7; +pub const _PC_NO_TRUNC: c_int = 8; +pub const _PC_VDISABLE: c_int = 9; +pub const _PC_NAME_CHARS_MAX: c_int = 10; +pub const _PC_CASE_SENSITIVE: c_int = 11; +pub const _PC_CASE_PRESERVING: c_int = 12; +pub const _PC_EXTENDED_SECURITY_NP: c_int = 13; +pub const _PC_AUTH_OPAQUE_NP: c_int = 14; +pub const _PC_2_SYMLINKS: c_int = 15; +pub const _PC_ALLOC_SIZE_MIN: c_int = 16; +pub const _PC_ASYNC_IO: c_int = 17; +pub const _PC_FILESIZEBITS: c_int = 18; +pub const _PC_PRIO_IO: c_int = 19; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 20; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 21; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 22; +pub const _PC_REC_XFER_ALIGN: c_int = 23; +pub const _PC_SYMLINK_MAX: c_int = 24; +pub const _PC_SYNC_IO: c_int = 25; +pub const _PC_XATTR_SIZE_BITS: c_int = 26; +pub const _PC_MIN_HOLE_SIZE: c_int = 27; +pub const O_EVTONLY: c_int = 0x00008000; +pub const O_NOCTTY: c_int = 0x00020000; +pub const O_DIRECTORY: c_int = 0x00100000; +pub const O_SYMLINK: c_int = 0x00200000; +pub const O_DSYNC: c_int = 0x00400000; +pub const O_CLOEXEC: c_int = 0x01000000; +pub const O_NOFOLLOW_ANY: c_int = 0x20000000; +pub const O_EXEC: c_int = 0x40000000; +pub const O_SEARCH: c_int = O_EXEC | O_DIRECTORY; pub const S_IFIFO: mode_t = 0o1_0000; pub const S_IFCHR: mode_t = 0o2_0000; pub const S_IFBLK: mode_t = 0o6_0000; @@ -3415,328 +3421,328 @@ pub const S_IRWXO: mode_t = 0o0007; pub const S_IXOTH: mode_t = 0o0001; pub const S_IWOTH: mode_t = 0o0002; pub const S_IROTH: mode_t = 0o0004; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const PT_TRACE_ME: ::c_int = 0; -pub const PT_READ_I: ::c_int = 1; -pub const PT_READ_D: ::c_int = 2; -pub const PT_READ_U: ::c_int = 3; -pub const PT_WRITE_I: ::c_int = 4; -pub const PT_WRITE_D: ::c_int = 5; -pub const PT_WRITE_U: ::c_int = 6; -pub const PT_CONTINUE: ::c_int = 7; -pub const PT_KILL: ::c_int = 8; -pub const PT_STEP: ::c_int = 9; -pub const PT_ATTACH: ::c_int = 10; -pub const PT_DETACH: ::c_int = 11; -pub const PT_SIGEXC: ::c_int = 12; -pub const PT_THUPDATE: ::c_int = 13; -pub const PT_ATTACHEXC: ::c_int = 14; - -pub const PT_FORCEQUOTA: ::c_int = 30; -pub const PT_DENY_ATTACH: ::c_int = 31; -pub const PT_FIRSTMACH: ::c_int = 32; - -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_ANON: ::c_int = 0x1000; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; - -pub const CPU_STATE_USER: ::c_int = 0; -pub const CPU_STATE_SYSTEM: ::c_int = 1; -pub const CPU_STATE_IDLE: ::c_int = 2; -pub const CPU_STATE_NICE: ::c_int = 3; -pub const CPU_STATE_MAX: ::c_int = 4; - -pub const PROCESSOR_BASIC_INFO: ::c_int = 1; -pub const PROCESSOR_CPU_LOAD_INFO: ::c_int = 2; -pub const PROCESSOR_PM_REGS_INFO: ::c_int = 0x10000001; -pub const PROCESSOR_TEMPERATURE: ::c_int = 0x10000002; -pub const PROCESSOR_SET_LOAD_INFO: ::c_int = 4; -pub const PROCESSOR_SET_BASIC_INFO: ::c_int = 5; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; -pub const MS_SYNC: ::c_int = 0x0010; - -pub const MS_KILLPAGES: ::c_int = 0x0004; -pub const MS_DEACTIVATE: ::c_int = 0x0008; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EDEADLK: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EAGAIN: ::c_int = 35; -pub const EWOULDBLOCK: ::c_int = EAGAIN; -pub const EINPROGRESS: ::c_int = 36; -pub const EALREADY: ::c_int = 37; -pub const ENOTSOCK: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 39; -pub const EMSGSIZE: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const ENOTSUP: ::c_int = 45; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENETDOWN: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const ELOOP: ::c_int = 62; -pub const ENAMETOOLONG: ::c_int = 63; -pub const EHOSTDOWN: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const ENOTEMPTY: ::c_int = 66; -pub const EPROCLIM: ::c_int = 67; -pub const EUSERS: ::c_int = 68; -pub const EDQUOT: ::c_int = 69; -pub const ESTALE: ::c_int = 70; -pub const EREMOTE: ::c_int = 71; -pub const EBADRPC: ::c_int = 72; -pub const ERPCMISMATCH: ::c_int = 73; -pub const EPROGUNAVAIL: ::c_int = 74; -pub const EPROGMISMATCH: ::c_int = 75; -pub const EPROCUNAVAIL: ::c_int = 76; -pub const ENOLCK: ::c_int = 77; -pub const ENOSYS: ::c_int = 78; -pub const EFTYPE: ::c_int = 79; -pub const EAUTH: ::c_int = 80; -pub const ENEEDAUTH: ::c_int = 81; -pub const EPWROFF: ::c_int = 82; -pub const EDEVERR: ::c_int = 83; -pub const EOVERFLOW: ::c_int = 84; -pub const EBADEXEC: ::c_int = 85; -pub const EBADARCH: ::c_int = 86; -pub const ESHLIBVERS: ::c_int = 87; -pub const EBADMACHO: ::c_int = 88; -pub const ECANCELED: ::c_int = 89; -pub const EIDRM: ::c_int = 90; -pub const ENOMSG: ::c_int = 91; -pub const EILSEQ: ::c_int = 92; -pub const ENOATTR: ::c_int = 93; -pub const EBADMSG: ::c_int = 94; -pub const EMULTIHOP: ::c_int = 95; -pub const ENODATA: ::c_int = 96; -pub const ENOLINK: ::c_int = 97; -pub const ENOSR: ::c_int = 98; -pub const ENOSTR: ::c_int = 99; -pub const EPROTO: ::c_int = 100; -pub const ETIME: ::c_int = 101; -pub const EOPNOTSUPP: ::c_int = 102; -pub const ENOPOLICY: ::c_int = 103; -pub const ENOTRECOVERABLE: ::c_int = 104; -pub const EOWNERDEAD: ::c_int = 105; -pub const EQFULL: ::c_int = 106; -pub const ELAST: ::c_int = 106; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const F_DUPFD: ::c_int = 0; -pub const F_DUPFD_CLOEXEC: ::c_int = 67; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; -pub const F_PREALLOCATE: ::c_int = 42; -pub const F_RDADVISE: ::c_int = 44; -pub const F_RDAHEAD: ::c_int = 45; -pub const F_NOCACHE: ::c_int = 48; -pub const F_LOG2PHYS: ::c_int = 49; -pub const F_GETPATH: ::c_int = 50; -pub const F_FULLFSYNC: ::c_int = 51; -pub const F_FREEZE_FS: ::c_int = 53; -pub const F_THAW_FS: ::c_int = 54; -pub const F_GLOBAL_NOCACHE: ::c_int = 55; -pub const F_NODIRECT: ::c_int = 62; -pub const F_LOG2PHYS_EXT: ::c_int = 65; -pub const F_BARRIERFSYNC: ::c_int = 85; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; +pub const F_GETLK: c_int = 7; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; + +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; + +pub const PT_TRACE_ME: c_int = 0; +pub const PT_READ_I: c_int = 1; +pub const PT_READ_D: c_int = 2; +pub const PT_READ_U: c_int = 3; +pub const PT_WRITE_I: c_int = 4; +pub const PT_WRITE_D: c_int = 5; +pub const PT_WRITE_U: c_int = 6; +pub const PT_CONTINUE: c_int = 7; +pub const PT_KILL: c_int = 8; +pub const PT_STEP: c_int = 9; +pub const PT_ATTACH: c_int = 10; +pub const PT_DETACH: c_int = 11; +pub const PT_SIGEXC: c_int = 12; +pub const PT_THUPDATE: c_int = 13; +pub const PT_ATTACHEXC: c_int = 14; + +pub const PT_FORCEQUOTA: c_int = 30; +pub const PT_DENY_ATTACH: c_int = 31; +pub const PT_FIRSTMACH: c_int = 32; + +pub const MAP_FILE: c_int = 0x0000; +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_FIXED: c_int = 0x0010; +pub const MAP_ANON: c_int = 0x1000; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; + +pub const CPU_STATE_USER: c_int = 0; +pub const CPU_STATE_SYSTEM: c_int = 1; +pub const CPU_STATE_IDLE: c_int = 2; +pub const CPU_STATE_NICE: c_int = 3; +pub const CPU_STATE_MAX: c_int = 4; + +pub const PROCESSOR_BASIC_INFO: c_int = 1; +pub const PROCESSOR_CPU_LOAD_INFO: c_int = 2; +pub const PROCESSOR_PM_REGS_INFO: c_int = 0x10000001; +pub const PROCESSOR_TEMPERATURE: c_int = 0x10000002; +pub const PROCESSOR_SET_LOAD_INFO: c_int = 4; +pub const PROCESSOR_SET_BASIC_INFO: c_int = 5; + +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; + +pub const MS_ASYNC: c_int = 0x0001; +pub const MS_INVALIDATE: c_int = 0x0002; +pub const MS_SYNC: c_int = 0x0010; + +pub const MS_KILLPAGES: c_int = 0x0004; +pub const MS_DEACTIVATE: c_int = 0x0008; + +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EDEADLK: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EAGAIN: c_int = 35; +pub const EWOULDBLOCK: c_int = EAGAIN; +pub const EINPROGRESS: c_int = 36; +pub const EALREADY: c_int = 37; +pub const ENOTSOCK: c_int = 38; +pub const EDESTADDRREQ: c_int = 39; +pub const EMSGSIZE: c_int = 40; +pub const EPROTOTYPE: c_int = 41; +pub const ENOPROTOOPT: c_int = 42; +pub const EPROTONOSUPPORT: c_int = 43; +pub const ESOCKTNOSUPPORT: c_int = 44; +pub const ENOTSUP: c_int = 45; +pub const EPFNOSUPPORT: c_int = 46; +pub const EAFNOSUPPORT: c_int = 47; +pub const EADDRINUSE: c_int = 48; +pub const EADDRNOTAVAIL: c_int = 49; +pub const ENETDOWN: c_int = 50; +pub const ENETUNREACH: c_int = 51; +pub const ENETRESET: c_int = 52; +pub const ECONNABORTED: c_int = 53; +pub const ECONNRESET: c_int = 54; +pub const ENOBUFS: c_int = 55; +pub const EISCONN: c_int = 56; +pub const ENOTCONN: c_int = 57; +pub const ESHUTDOWN: c_int = 58; +pub const ETOOMANYREFS: c_int = 59; +pub const ETIMEDOUT: c_int = 60; +pub const ECONNREFUSED: c_int = 61; +pub const ELOOP: c_int = 62; +pub const ENAMETOOLONG: c_int = 63; +pub const EHOSTDOWN: c_int = 64; +pub const EHOSTUNREACH: c_int = 65; +pub const ENOTEMPTY: c_int = 66; +pub const EPROCLIM: c_int = 67; +pub const EUSERS: c_int = 68; +pub const EDQUOT: c_int = 69; +pub const ESTALE: c_int = 70; +pub const EREMOTE: c_int = 71; +pub const EBADRPC: c_int = 72; +pub const ERPCMISMATCH: c_int = 73; +pub const EPROGUNAVAIL: c_int = 74; +pub const EPROGMISMATCH: c_int = 75; +pub const EPROCUNAVAIL: c_int = 76; +pub const ENOLCK: c_int = 77; +pub const ENOSYS: c_int = 78; +pub const EFTYPE: c_int = 79; +pub const EAUTH: c_int = 80; +pub const ENEEDAUTH: c_int = 81; +pub const EPWROFF: c_int = 82; +pub const EDEVERR: c_int = 83; +pub const EOVERFLOW: c_int = 84; +pub const EBADEXEC: c_int = 85; +pub const EBADARCH: c_int = 86; +pub const ESHLIBVERS: c_int = 87; +pub const EBADMACHO: c_int = 88; +pub const ECANCELED: c_int = 89; +pub const EIDRM: c_int = 90; +pub const ENOMSG: c_int = 91; +pub const EILSEQ: c_int = 92; +pub const ENOATTR: c_int = 93; +pub const EBADMSG: c_int = 94; +pub const EMULTIHOP: c_int = 95; +pub const ENODATA: c_int = 96; +pub const ENOLINK: c_int = 97; +pub const ENOSR: c_int = 98; +pub const ENOSTR: c_int = 99; +pub const EPROTO: c_int = 100; +pub const ETIME: c_int = 101; +pub const EOPNOTSUPP: c_int = 102; +pub const ENOPOLICY: c_int = 103; +pub const ENOTRECOVERABLE: c_int = 104; +pub const EOWNERDEAD: c_int = 105; +pub const EQFULL: c_int = 106; +pub const ELAST: c_int = 106; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NODATA: c_int = 7; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const F_DUPFD: c_int = 0; +pub const F_DUPFD_CLOEXEC: c_int = 67; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; +pub const F_PREALLOCATE: c_int = 42; +pub const F_RDADVISE: c_int = 44; +pub const F_RDAHEAD: c_int = 45; +pub const F_NOCACHE: c_int = 48; +pub const F_LOG2PHYS: c_int = 49; +pub const F_GETPATH: c_int = 50; +pub const F_FULLFSYNC: c_int = 51; +pub const F_FREEZE_FS: c_int = 53; +pub const F_THAW_FS: c_int = 54; +pub const F_GLOBAL_NOCACHE: c_int = 55; +pub const F_NODIRECT: c_int = 62; +pub const F_LOG2PHYS_EXT: c_int = 65; +pub const F_BARRIERFSYNC: c_int = 85; // See https://github.com/apple/darwin-xnu/blob/main/bsd/sys/fcntl.h -pub const F_OFD_SETLK: ::c_int = 90; /* Acquire or release open file description lock */ -pub const F_OFD_SETLKW: ::c_int = 91; /* (as F_OFD_SETLK but blocking if conflicting lock) */ -pub const F_OFD_GETLK: ::c_int = 92; /* Examine OFD lock */ -pub const F_PUNCHHOLE: ::c_int = 99; -pub const F_TRIM_ACTIVE_FILE: ::c_int = 100; -pub const F_SPECULATIVE_READ: ::c_int = 101; -pub const F_GETPATH_NOFIRMLINK: ::c_int = 102; -pub const F_TRANSFEREXTENTS: ::c_int = 110; - -pub const F_ALLOCATECONTIG: ::c_uint = 0x02; -pub const F_ALLOCATEALL: ::c_uint = 0x04; -pub const F_ALLOCATEPERSIST: ::c_uint = 0x08; - -pub const F_PEOFPOSMODE: ::c_int = 3; -pub const F_VOLPOSMODE: ::c_int = 4; - -pub const AT_FDCWD: ::c_int = -2; -pub const AT_EACCESS: ::c_int = 0x0010; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0020; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0040; -pub const AT_REMOVEDIR: ::c_int = 0x0080; - -pub const PTHREAD_INTROSPECTION_THREAD_CREATE: ::c_uint = 1; -pub const PTHREAD_INTROSPECTION_THREAD_START: ::c_uint = 2; -pub const PTHREAD_INTROSPECTION_THREAD_TERMINATE: ::c_uint = 3; -pub const PTHREAD_INTROSPECTION_THREAD_DESTROY: ::c_uint = 4; - -pub const TIOCMODG: ::c_ulong = 0x40047403; -pub const TIOCMODS: ::c_ulong = 0x80047404; -pub const TIOCM_LE: ::c_int = 0x1; -pub const TIOCM_DTR: ::c_int = 0x2; -pub const TIOCM_RTS: ::c_int = 0x4; -pub const TIOCM_ST: ::c_int = 0x8; -pub const TIOCM_SR: ::c_int = 0x10; -pub const TIOCM_CTS: ::c_int = 0x20; -pub const TIOCM_CAR: ::c_int = 0x40; -pub const TIOCM_CD: ::c_int = 0x40; -pub const TIOCM_RNG: ::c_int = 0x80; -pub const TIOCM_RI: ::c_int = 0x80; -pub const TIOCM_DSR: ::c_int = 0x100; -pub const TIOCEXCL: ::c_int = 0x2000740d; -pub const TIOCNXCL: ::c_int = 0x2000740e; -pub const TIOCFLUSH: ::c_ulong = 0x80047410; -pub const TIOCGETD: ::c_ulong = 0x4004741a; -pub const TIOCSETD: ::c_ulong = 0x8004741b; -pub const TIOCIXON: ::c_uint = 0x20007481; -pub const TIOCIXOFF: ::c_uint = 0x20007480; -pub const TIOCSDTR: ::c_uint = 0x20007479; -pub const TIOCCDTR: ::c_uint = 0x20007478; -pub const TIOCGPGRP: ::c_ulong = 0x40047477; -pub const TIOCSPGRP: ::c_ulong = 0x80047476; -pub const TIOCOUTQ: ::c_ulong = 0x40047473; -pub const TIOCSTI: ::c_ulong = 0x80017472; -pub const TIOCNOTTY: ::c_uint = 0x20007471; -pub const TIOCPKT: ::c_ulong = 0x80047470; -pub const TIOCPKT_DATA: ::c_int = 0x0; -pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1; -pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2; -pub const TIOCPKT_STOP: ::c_int = 0x4; -pub const TIOCPKT_START: ::c_int = 0x8; -pub const TIOCPKT_NOSTOP: ::c_int = 0x10; -pub const TIOCPKT_DOSTOP: ::c_int = 0x20; -pub const TIOCPKT_IOCTL: ::c_int = 0x40; -pub const TIOCSTOP: ::c_uint = 0x2000746f; -pub const TIOCSTART: ::c_uint = 0x2000746e; -pub const TIOCMSET: ::c_ulong = 0x8004746d; -pub const TIOCMBIS: ::c_ulong = 0x8004746c; -pub const TIOCMBIC: ::c_ulong = 0x8004746b; -pub const TIOCMGET: ::c_ulong = 0x4004746a; -pub const TIOCREMOTE: ::c_ulong = 0x80047469; -pub const TIOCGWINSZ: ::c_ulong = 0x40087468; -pub const TIOCSWINSZ: ::c_ulong = 0x80087467; -pub const TIOCUCNTL: ::c_ulong = 0x80047466; -pub const TIOCSTAT: ::c_uint = 0x20007465; -pub const TIOCSCONS: ::c_uint = 0x20007463; -pub const TIOCCONS: ::c_ulong = 0x80047462; -pub const TIOCSCTTY: ::c_uint = 0x20007461; -pub const TIOCEXT: ::c_ulong = 0x80047460; -pub const TIOCSIG: ::c_uint = 0x2000745f; -pub const TIOCDRAIN: ::c_uint = 0x2000745e; -pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b; -pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a; -pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457; -pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456; -pub const TIOCDSIMICROCODE: ::c_uint = 0x20007455; -pub const TIOCPTYGRANT: ::c_uint = 0x20007454; -pub const TIOCPTYGNAME: ::c_uint = 0x40807453; -pub const TIOCPTYUNLK: ::c_uint = 0x20007452; - -pub const BIOCGRSIG: ::c_ulong = 0x40044272; -pub const BIOCSRSIG: ::c_ulong = 0x80044273; -pub const BIOCSDLT: ::c_ulong = 0x80044278; -pub const BIOCGSEESENT: ::c_ulong = 0x40044276; -pub const BIOCSSEESENT: ::c_ulong = 0x80044277; -pub const BIOCGDLTLIST: ::c_ulong = 0xc00c4279; - -pub const FIODTYPE: ::c_ulong = 0x4004667a; +pub const F_OFD_SETLK: c_int = 90; /* Acquire or release open file description lock */ +pub const F_OFD_SETLKW: c_int = 91; /* (as F_OFD_SETLK but blocking if conflicting lock) */ +pub const F_OFD_GETLK: c_int = 92; /* Examine OFD lock */ +pub const F_PUNCHHOLE: c_int = 99; +pub const F_TRIM_ACTIVE_FILE: c_int = 100; +pub const F_SPECULATIVE_READ: c_int = 101; +pub const F_GETPATH_NOFIRMLINK: c_int = 102; +pub const F_TRANSFEREXTENTS: c_int = 110; + +pub const F_ALLOCATECONTIG: c_uint = 0x02; +pub const F_ALLOCATEALL: c_uint = 0x04; +pub const F_ALLOCATEPERSIST: c_uint = 0x08; + +pub const F_PEOFPOSMODE: c_int = 3; +pub const F_VOLPOSMODE: c_int = 4; + +pub const AT_FDCWD: c_int = -2; +pub const AT_EACCESS: c_int = 0x0010; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x0020; +pub const AT_SYMLINK_FOLLOW: c_int = 0x0040; +pub const AT_REMOVEDIR: c_int = 0x0080; + +pub const PTHREAD_INTROSPECTION_THREAD_CREATE: c_uint = 1; +pub const PTHREAD_INTROSPECTION_THREAD_START: c_uint = 2; +pub const PTHREAD_INTROSPECTION_THREAD_TERMINATE: c_uint = 3; +pub const PTHREAD_INTROSPECTION_THREAD_DESTROY: c_uint = 4; + +pub const TIOCMODG: c_ulong = 0x40047403; +pub const TIOCMODS: c_ulong = 0x80047404; +pub const TIOCM_LE: c_int = 0x1; +pub const TIOCM_DTR: c_int = 0x2; +pub const TIOCM_RTS: c_int = 0x4; +pub const TIOCM_ST: c_int = 0x8; +pub const TIOCM_SR: c_int = 0x10; +pub const TIOCM_CTS: c_int = 0x20; +pub const TIOCM_CAR: c_int = 0x40; +pub const TIOCM_CD: c_int = 0x40; +pub const TIOCM_RNG: c_int = 0x80; +pub const TIOCM_RI: c_int = 0x80; +pub const TIOCM_DSR: c_int = 0x100; +pub const TIOCEXCL: c_int = 0x2000740d; +pub const TIOCNXCL: c_int = 0x2000740e; +pub const TIOCFLUSH: c_ulong = 0x80047410; +pub const TIOCGETD: c_ulong = 0x4004741a; +pub const TIOCSETD: c_ulong = 0x8004741b; +pub const TIOCIXON: c_uint = 0x20007481; +pub const TIOCIXOFF: c_uint = 0x20007480; +pub const TIOCSDTR: c_uint = 0x20007479; +pub const TIOCCDTR: c_uint = 0x20007478; +pub const TIOCGPGRP: c_ulong = 0x40047477; +pub const TIOCSPGRP: c_ulong = 0x80047476; +pub const TIOCOUTQ: c_ulong = 0x40047473; +pub const TIOCSTI: c_ulong = 0x80017472; +pub const TIOCNOTTY: c_uint = 0x20007471; +pub const TIOCPKT: c_ulong = 0x80047470; +pub const TIOCPKT_DATA: c_int = 0x0; +pub const TIOCPKT_FLUSHREAD: c_int = 0x1; +pub const TIOCPKT_FLUSHWRITE: c_int = 0x2; +pub const TIOCPKT_STOP: c_int = 0x4; +pub const TIOCPKT_START: c_int = 0x8; +pub const TIOCPKT_NOSTOP: c_int = 0x10; +pub const TIOCPKT_DOSTOP: c_int = 0x20; +pub const TIOCPKT_IOCTL: c_int = 0x40; +pub const TIOCSTOP: c_uint = 0x2000746f; +pub const TIOCSTART: c_uint = 0x2000746e; +pub const TIOCMSET: c_ulong = 0x8004746d; +pub const TIOCMBIS: c_ulong = 0x8004746c; +pub const TIOCMBIC: c_ulong = 0x8004746b; +pub const TIOCMGET: c_ulong = 0x4004746a; +pub const TIOCREMOTE: c_ulong = 0x80047469; +pub const TIOCGWINSZ: c_ulong = 0x40087468; +pub const TIOCSWINSZ: c_ulong = 0x80087467; +pub const TIOCUCNTL: c_ulong = 0x80047466; +pub const TIOCSTAT: c_uint = 0x20007465; +pub const TIOCSCONS: c_uint = 0x20007463; +pub const TIOCCONS: c_ulong = 0x80047462; +pub const TIOCSCTTY: c_uint = 0x20007461; +pub const TIOCEXT: c_ulong = 0x80047460; +pub const TIOCSIG: c_uint = 0x2000745f; +pub const TIOCDRAIN: c_uint = 0x2000745e; +pub const TIOCMSDTRWAIT: c_ulong = 0x8004745b; +pub const TIOCMGDTRWAIT: c_ulong = 0x4004745a; +pub const TIOCSDRAINWAIT: c_ulong = 0x80047457; +pub const TIOCGDRAINWAIT: c_ulong = 0x40047456; +pub const TIOCDSIMICROCODE: c_uint = 0x20007455; +pub const TIOCPTYGRANT: c_uint = 0x20007454; +pub const TIOCPTYGNAME: c_uint = 0x40807453; +pub const TIOCPTYUNLK: c_uint = 0x20007452; + +pub const BIOCGRSIG: c_ulong = 0x40044272; +pub const BIOCSRSIG: c_ulong = 0x80044273; +pub const BIOCSDLT: c_ulong = 0x80044278; +pub const BIOCGSEESENT: c_ulong = 0x40044276; +pub const BIOCSSEESENT: c_ulong = 0x80044277; +pub const BIOCGDLTLIST: c_ulong = 0xc00c4279; + +pub const FIODTYPE: c_ulong = 0x4004667a; pub const B0: speed_t = 0; pub const B50: speed_t = 50; @@ -3764,113 +3770,113 @@ pub const B230400: speed_t = 230400; pub const EXTA: speed_t = 19200; pub const EXTB: speed_t = 38400; -pub const SIGTRAP: ::c_int = 5; - -pub const GLOB_APPEND: ::c_int = 0x0001; -pub const GLOB_DOOFFS: ::c_int = 0x0002; -pub const GLOB_ERR: ::c_int = 0x0004; -pub const GLOB_MARK: ::c_int = 0x0008; -pub const GLOB_NOCHECK: ::c_int = 0x0010; -pub const GLOB_NOSORT: ::c_int = 0x0020; -pub const GLOB_NOESCAPE: ::c_int = 0x2000; - -pub const GLOB_NOSPACE: ::c_int = -1; -pub const GLOB_ABORTED: ::c_int = -2; -pub const GLOB_NOMATCH: ::c_int = -3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const _SC_IOV_MAX: ::c_int = 56; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; -pub const _SC_MQ_PRIO_MAX: ::c_int = 75; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; -pub const _SC_THREAD_STACK_MIN: ::c_int = 93; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; -pub const _SC_THREADS: ::c_int = 96; -pub const _SC_TTY_NAME_MAX: ::c_int = 101; -pub const _SC_ATEXIT_MAX: ::c_int = 107; -pub const _SC_XOPEN_CRYPT: ::c_int = 108; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; -pub const _SC_XOPEN_LEGACY: ::c_int = 110; -pub const _SC_XOPEN_REALTIME: ::c_int = 111; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; -pub const _SC_XOPEN_SHM: ::c_int = 113; -pub const _SC_XOPEN_UNIX: ::c_int = 115; -pub const _SC_XOPEN_VERSION: ::c_int = 116; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 121; -pub const _SC_PHYS_PAGES: ::c_int = 200; - -pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 2; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 1; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 2; -pub const PTHREAD_INHERIT_SCHED: ::c_int = 1; -pub const PTHREAD_EXPLICIT_SCHED: ::c_int = 2; -pub const PTHREAD_CANCEL_ENABLE: ::c_int = 0x01; -pub const PTHREAD_CANCEL_DISABLE: ::c_int = 0x00; -pub const PTHREAD_CANCEL_DEFERRED: ::c_int = 0x02; -pub const PTHREAD_CANCEL_ASYNCHRONOUS: ::c_int = 0x00; -pub const PTHREAD_CANCELED: *mut ::c_void = 1 as *mut ::c_void; -pub const PTHREAD_SCOPE_SYSTEM: ::c_int = 1; -pub const PTHREAD_SCOPE_PROCESS: ::c_int = 2; -pub const PTHREAD_PRIO_NONE: ::c_int = 0; -pub const PTHREAD_PRIO_INHERIT: ::c_int = 1; -pub const PTHREAD_PRIO_PROTECT: ::c_int = 2; +pub const SIGTRAP: c_int = 5; + +pub const GLOB_APPEND: c_int = 0x0001; +pub const GLOB_DOOFFS: c_int = 0x0002; +pub const GLOB_ERR: c_int = 0x0004; +pub const GLOB_MARK: c_int = 0x0008; +pub const GLOB_NOCHECK: c_int = 0x0010; +pub const GLOB_NOSORT: c_int = 0x0020; +pub const GLOB_NOESCAPE: c_int = 0x2000; + +pub const GLOB_NOSPACE: c_int = -1; +pub const GLOB_ABORTED: c_int = -2; +pub const GLOB_NOMATCH: c_int = -3; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const _SC_IOV_MAX: c_int = 56; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 70; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 71; +pub const _SC_LOGIN_NAME_MAX: c_int = 73; +pub const _SC_MQ_PRIO_MAX: c_int = 75; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 82; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 83; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 85; +pub const _SC_THREAD_KEYS_MAX: c_int = 86; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 87; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 88; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 89; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 90; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 91; +pub const _SC_THREAD_STACK_MIN: c_int = 93; +pub const _SC_THREAD_THREADS_MAX: c_int = 94; +pub const _SC_THREADS: c_int = 96; +pub const _SC_TTY_NAME_MAX: c_int = 101; +pub const _SC_ATEXIT_MAX: c_int = 107; +pub const _SC_XOPEN_CRYPT: c_int = 108; +pub const _SC_XOPEN_ENH_I18N: c_int = 109; +pub const _SC_XOPEN_LEGACY: c_int = 110; +pub const _SC_XOPEN_REALTIME: c_int = 111; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 112; +pub const _SC_XOPEN_SHM: c_int = 113; +pub const _SC_XOPEN_UNIX: c_int = 115; +pub const _SC_XOPEN_VERSION: c_int = 116; +pub const _SC_XOPEN_XCU_VERSION: c_int = 121; +pub const _SC_PHYS_PAGES: c_int = 200; + +pub const PTHREAD_PROCESS_PRIVATE: c_int = 2; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; +pub const PTHREAD_CREATE_JOINABLE: c_int = 1; +pub const PTHREAD_CREATE_DETACHED: c_int = 2; +pub const PTHREAD_INHERIT_SCHED: c_int = 1; +pub const PTHREAD_EXPLICIT_SCHED: c_int = 2; +pub const PTHREAD_CANCEL_ENABLE: c_int = 0x01; +pub const PTHREAD_CANCEL_DISABLE: c_int = 0x00; +pub const PTHREAD_CANCEL_DEFERRED: c_int = 0x02; +pub const PTHREAD_CANCEL_ASYNCHRONOUS: c_int = 0x00; +pub const PTHREAD_CANCELED: *mut c_void = 1 as *mut c_void; +pub const PTHREAD_SCOPE_SYSTEM: c_int = 1; +pub const PTHREAD_SCOPE_PROCESS: c_int = 2; +pub const PTHREAD_PRIO_NONE: c_int = 0; +pub const PTHREAD_PRIO_INHERIT: c_int = 1; +pub const PTHREAD_PRIO_PROTECT: c_int = 2; #[cfg(target_arch = "aarch64")] -pub const PTHREAD_STACK_MIN: ::size_t = 16384; +pub const PTHREAD_STACK_MIN: size_t = 16384; #[cfg(not(target_arch = "aarch64"))] -pub const PTHREAD_STACK_MIN: ::size_t = 8192; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_AS: ::c_int = 5; -pub const RLIMIT_RSS: ::c_int = RLIMIT_AS; -pub const RLIMIT_MEMLOCK: ::c_int = 6; -pub const RLIMIT_NPROC: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 8; +pub const PTHREAD_STACK_MIN: size_t = 8192; + +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_AS: c_int = 5; +pub const RLIMIT_RSS: c_int = RLIMIT_AS; +pub const RLIMIT_MEMLOCK: c_int = 6; +pub const RLIMIT_NPROC: c_int = 7; +pub const RLIMIT_NOFILE: c_int = 8; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 9; -pub const _RLIMIT_POSIX_FLAG: ::c_int = 0x1000; +pub const RLIM_NLIMITS: c_int = 9; +pub const _RLIMIT_POSIX_FLAG: c_int = 0x1000; pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 5; -pub const MADV_ZERO_WIRED_PAGES: ::c_int = 6; -pub const MADV_FREE_REUSABLE: ::c_int = 7; -pub const MADV_FREE_REUSE: ::c_int = 8; -pub const MADV_CAN_REUSE: ::c_int = 9; - -pub const MINCORE_INCORE: ::c_int = 0x1; -pub const MINCORE_REFERENCED: ::c_int = 0x2; -pub const MINCORE_MODIFIED: ::c_int = 0x4; -pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; -pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; +pub const RUSAGE_SELF: c_int = 0; +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const MADV_FREE: c_int = 5; +pub const MADV_ZERO_WIRED_PAGES: c_int = 6; +pub const MADV_FREE_REUSABLE: c_int = 7; +pub const MADV_FREE_REUSE: c_int = 8; +pub const MADV_CAN_REUSE: c_int = 9; + +pub const MINCORE_INCORE: c_int = 0x1; +pub const MINCORE_REFERENCED: c_int = 0x2; +pub const MINCORE_MODIFIED: c_int = 0x4; +pub const MINCORE_REFERENCED_OTHER: c_int = 0x8; +pub const MINCORE_MODIFIED_OTHER: c_int = 0x10; pub const CTLIOCGINFO: c_ulong = 0xc0644e03; @@ -3881,589 +3887,589 @@ pub const CTLIOCGINFO: c_ulong = 0xc0644e03; // IPPROTO_IP defined in src/unix/mod.rs /// IP6 hop-by-hop options -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// gateway2 (deprecated) -pub const IPPROTO_GGP: ::c_int = 3; +pub const IPPROTO_GGP: c_int = 3; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// Stream protocol II. -pub const IPPROTO_ST: ::c_int = 7; +pub const IPPROTO_ST: c_int = 7; /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// private interior gateway -pub const IPPROTO_PIGP: ::c_int = 9; +pub const IPPROTO_PIGP: c_int = 9; /// BBN RCC Monitoring -pub const IPPROTO_RCCMON: ::c_int = 10; +pub const IPPROTO_RCCMON: c_int = 10; /// network voice protocol -pub const IPPROTO_NVPII: ::c_int = 11; +pub const IPPROTO_NVPII: c_int = 11; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; /// Argus -pub const IPPROTO_ARGUS: ::c_int = 13; +pub const IPPROTO_ARGUS: c_int = 13; /// EMCON -pub const IPPROTO_EMCON: ::c_int = 14; +pub const IPPROTO_EMCON: c_int = 14; /// Cross Net Debugger -pub const IPPROTO_XNET: ::c_int = 15; +pub const IPPROTO_XNET: c_int = 15; /// Chaos -pub const IPPROTO_CHAOS: ::c_int = 16; +pub const IPPROTO_CHAOS: c_int = 16; // IPPROTO_UDP defined in src/unix/mod.rs /// Multiplexing -pub const IPPROTO_MUX: ::c_int = 18; +pub const IPPROTO_MUX: c_int = 18; /// DCN Measurement Subsystems -pub const IPPROTO_MEAS: ::c_int = 19; +pub const IPPROTO_MEAS: c_int = 19; /// Host Monitoring -pub const IPPROTO_HMP: ::c_int = 20; +pub const IPPROTO_HMP: c_int = 20; /// Packet Radio Measurement -pub const IPPROTO_PRM: ::c_int = 21; +pub const IPPROTO_PRM: c_int = 21; /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// Trunk-1 -pub const IPPROTO_TRUNK1: ::c_int = 23; +pub const IPPROTO_TRUNK1: c_int = 23; /// Trunk-2 -pub const IPPROTO_TRUNK2: ::c_int = 24; +pub const IPPROTO_TRUNK2: c_int = 24; /// Leaf-1 -pub const IPPROTO_LEAF1: ::c_int = 25; +pub const IPPROTO_LEAF1: c_int = 25; /// Leaf-2 -pub const IPPROTO_LEAF2: ::c_int = 26; +pub const IPPROTO_LEAF2: c_int = 26; /// Reliable Data -pub const IPPROTO_RDP: ::c_int = 27; +pub const IPPROTO_RDP: c_int = 27; /// Reliable Transaction -pub const IPPROTO_IRTP: ::c_int = 28; +pub const IPPROTO_IRTP: c_int = 28; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; /// Bulk Data Transfer -pub const IPPROTO_BLT: ::c_int = 30; +pub const IPPROTO_BLT: c_int = 30; /// Network Services -pub const IPPROTO_NSP: ::c_int = 31; +pub const IPPROTO_NSP: c_int = 31; /// Merit Internodal -pub const IPPROTO_INP: ::c_int = 32; +pub const IPPROTO_INP: c_int = 32; /// Sequential Exchange -pub const IPPROTO_SEP: ::c_int = 33; +pub const IPPROTO_SEP: c_int = 33; /// Third Party Connect -pub const IPPROTO_3PC: ::c_int = 34; +pub const IPPROTO_3PC: c_int = 34; /// InterDomain Policy Routing -pub const IPPROTO_IDPR: ::c_int = 35; +pub const IPPROTO_IDPR: c_int = 35; /// XTP -pub const IPPROTO_XTP: ::c_int = 36; +pub const IPPROTO_XTP: c_int = 36; /// Datagram Delivery -pub const IPPROTO_DDP: ::c_int = 37; +pub const IPPROTO_DDP: c_int = 37; /// Control Message Transport -pub const IPPROTO_CMTP: ::c_int = 38; +pub const IPPROTO_CMTP: c_int = 38; /// TP++ Transport -pub const IPPROTO_TPXX: ::c_int = 39; +pub const IPPROTO_TPXX: c_int = 39; /// IL transport protocol -pub const IPPROTO_IL: ::c_int = 40; +pub const IPPROTO_IL: c_int = 40; // IPPROTO_IPV6 defined in src/unix/mod.rs /// Source Demand Routing -pub const IPPROTO_SDRP: ::c_int = 42; +pub const IPPROTO_SDRP: c_int = 42; /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// InterDomain Routing -pub const IPPROTO_IDRP: ::c_int = 45; +pub const IPPROTO_IDRP: c_int = 45; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// Mobile Host Routing -pub const IPPROTO_MHRP: ::c_int = 48; +pub const IPPROTO_MHRP: c_int = 48; /// BHA -pub const IPPROTO_BHA: ::c_int = 49; +pub const IPPROTO_BHA: c_int = 49; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; /// Integ. Net Layer Security -pub const IPPROTO_INLSP: ::c_int = 52; +pub const IPPROTO_INLSP: c_int = 52; /// IP with encryption -pub const IPPROTO_SWIPE: ::c_int = 53; +pub const IPPROTO_SWIPE: c_int = 53; /// Next Hop Resolution -pub const IPPROTO_NHRP: ::c_int = 54; +pub const IPPROTO_NHRP: c_int = 54; /* 55-57: Unassigned */ // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; +pub const IPPROTO_DSTOPTS: c_int = 60; /// any host internal protocol -pub const IPPROTO_AHIP: ::c_int = 61; +pub const IPPROTO_AHIP: c_int = 61; /// CFTP -pub const IPPROTO_CFTP: ::c_int = 62; +pub const IPPROTO_CFTP: c_int = 62; /// "hello" routing protocol -pub const IPPROTO_HELLO: ::c_int = 63; +pub const IPPROTO_HELLO: c_int = 63; /// SATNET/Backroom EXPAK -pub const IPPROTO_SATEXPAK: ::c_int = 64; +pub const IPPROTO_SATEXPAK: c_int = 64; /// Kryptolan -pub const IPPROTO_KRYPTOLAN: ::c_int = 65; +pub const IPPROTO_KRYPTOLAN: c_int = 65; /// Remote Virtual Disk -pub const IPPROTO_RVD: ::c_int = 66; +pub const IPPROTO_RVD: c_int = 66; /// Pluribus Packet Core -pub const IPPROTO_IPPC: ::c_int = 67; +pub const IPPROTO_IPPC: c_int = 67; /// Any distributed FS -pub const IPPROTO_ADFS: ::c_int = 68; +pub const IPPROTO_ADFS: c_int = 68; /// Satnet Monitoring -pub const IPPROTO_SATMON: ::c_int = 69; +pub const IPPROTO_SATMON: c_int = 69; /// VISA Protocol -pub const IPPROTO_VISA: ::c_int = 70; +pub const IPPROTO_VISA: c_int = 70; /// Packet Core Utility -pub const IPPROTO_IPCV: ::c_int = 71; +pub const IPPROTO_IPCV: c_int = 71; /// Comp. Prot. Net. Executive -pub const IPPROTO_CPNX: ::c_int = 72; +pub const IPPROTO_CPNX: c_int = 72; /// Comp. Prot. HeartBeat -pub const IPPROTO_CPHB: ::c_int = 73; +pub const IPPROTO_CPHB: c_int = 73; /// Wang Span Network -pub const IPPROTO_WSN: ::c_int = 74; +pub const IPPROTO_WSN: c_int = 74; /// Packet Video Protocol -pub const IPPROTO_PVP: ::c_int = 75; +pub const IPPROTO_PVP: c_int = 75; /// BackRoom SATNET Monitoring -pub const IPPROTO_BRSATMON: ::c_int = 76; +pub const IPPROTO_BRSATMON: c_int = 76; /// Sun net disk proto (temp.) -pub const IPPROTO_ND: ::c_int = 77; +pub const IPPROTO_ND: c_int = 77; /// WIDEBAND Monitoring -pub const IPPROTO_WBMON: ::c_int = 78; +pub const IPPROTO_WBMON: c_int = 78; /// WIDEBAND EXPAK -pub const IPPROTO_WBEXPAK: ::c_int = 79; +pub const IPPROTO_WBEXPAK: c_int = 79; /// ISO cnlp -pub const IPPROTO_EON: ::c_int = 80; +pub const IPPROTO_EON: c_int = 80; /// VMTP -pub const IPPROTO_VMTP: ::c_int = 81; +pub const IPPROTO_VMTP: c_int = 81; /// Secure VMTP -pub const IPPROTO_SVMTP: ::c_int = 82; +pub const IPPROTO_SVMTP: c_int = 82; /// Banyon VINES -pub const IPPROTO_VINES: ::c_int = 83; +pub const IPPROTO_VINES: c_int = 83; /// TTP -pub const IPPROTO_TTP: ::c_int = 84; +pub const IPPROTO_TTP: c_int = 84; /// NSFNET-IGP -pub const IPPROTO_IGP: ::c_int = 85; +pub const IPPROTO_IGP: c_int = 85; /// dissimilar gateway prot. -pub const IPPROTO_DGP: ::c_int = 86; +pub const IPPROTO_DGP: c_int = 86; /// TCF -pub const IPPROTO_TCF: ::c_int = 87; +pub const IPPROTO_TCF: c_int = 87; /// Cisco/GXS IGRP -pub const IPPROTO_IGRP: ::c_int = 88; +pub const IPPROTO_IGRP: c_int = 88; /// OSPFIGP -pub const IPPROTO_OSPFIGP: ::c_int = 89; +pub const IPPROTO_OSPFIGP: c_int = 89; /// Strite RPC protocol -pub const IPPROTO_SRPC: ::c_int = 90; +pub const IPPROTO_SRPC: c_int = 90; /// Locus Address Resoloution -pub const IPPROTO_LARP: ::c_int = 91; +pub const IPPROTO_LARP: c_int = 91; /// Multicast Transport -pub const IPPROTO_MTP: ::c_int = 92; +pub const IPPROTO_MTP: c_int = 92; /// AX.25 Frames -pub const IPPROTO_AX25: ::c_int = 93; +pub const IPPROTO_AX25: c_int = 93; /// IP encapsulated in IP -pub const IPPROTO_IPEIP: ::c_int = 94; +pub const IPPROTO_IPEIP: c_int = 94; /// Mobile Int.ing control -pub const IPPROTO_MICP: ::c_int = 95; +pub const IPPROTO_MICP: c_int = 95; /// Semaphore Comm. security -pub const IPPROTO_SCCSP: ::c_int = 96; +pub const IPPROTO_SCCSP: c_int = 96; /// Ethernet IP encapsulation -pub const IPPROTO_ETHERIP: ::c_int = 97; +pub const IPPROTO_ETHERIP: c_int = 97; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// any private encr. scheme -pub const IPPROTO_APES: ::c_int = 99; +pub const IPPROTO_APES: c_int = 99; /// GMTP -pub const IPPROTO_GMTP: ::c_int = 100; +pub const IPPROTO_GMTP: c_int = 100; /* 101-254: Partly Unassigned */ /// Protocol Independent Mcast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// payload compression (IPComp) -pub const IPPROTO_IPCOMP: ::c_int = 108; +pub const IPPROTO_IPCOMP: c_int = 108; /// PGM -pub const IPPROTO_PGM: ::c_int = 113; +pub const IPPROTO_PGM: c_int = 113; /// SCTP -pub const IPPROTO_SCTP: ::c_int = 132; +pub const IPPROTO_SCTP: c_int = 132; /* 255: Reserved */ /* BSD Private, local use, namespace incursion */ /// divert pseudo-protocol -pub const IPPROTO_DIVERT: ::c_int = 254; +pub const IPPROTO_DIVERT: c_int = 254; /// raw IP packet -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_MAX: c_int = 256; /// last return value of *_input(), meaning "all job for this pkt is done". -pub const IPPROTO_DONE: ::c_int = 257; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_UNIX: ::c_int = AF_LOCAL; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NS: ::c_int = 6; -pub const AF_ISO: ::c_int = 7; -pub const AF_OSI: ::c_int = AF_ISO; -pub const AF_ECMA: ::c_int = 8; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_ROUTE: ::c_int = 17; -pub const AF_LINK: ::c_int = 18; -pub const pseudo_AF_XTP: ::c_int = 19; -pub const AF_COIP: ::c_int = 20; -pub const AF_CNT: ::c_int = 21; -pub const pseudo_AF_RTIP: ::c_int = 22; -pub const AF_IPX: ::c_int = 23; -pub const AF_SIP: ::c_int = 24; -pub const pseudo_AF_PIP: ::c_int = 25; -pub const AF_NDRV: ::c_int = 27; -pub const AF_ISDN: ::c_int = 28; -pub const AF_E164: ::c_int = AF_ISDN; -pub const pseudo_AF_KEY: ::c_int = 29; -pub const AF_INET6: ::c_int = 30; -pub const AF_NATM: ::c_int = 31; -pub const AF_SYSTEM: ::c_int = 32; -pub const AF_NETBIOS: ::c_int = 33; -pub const AF_PPP: ::c_int = 34; -pub const pseudo_AF_HDRCMPLT: ::c_int = 35; -pub const AF_IEEE80211: ::c_int = 37; -pub const AF_UTUN: ::c_int = 38; -pub const AF_VSOCK: ::c_int = 40; -pub const AF_SYS_CONTROL: ::c_int = 2; - -pub const SYSPROTO_EVENT: ::c_int = 1; -pub const SYSPROTO_CONTROL: ::c_int = 2; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_UNIX: ::c_int = PF_LOCAL; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_IMPLINK: ::c_int = AF_IMPLINK; -pub const PF_PUP: ::c_int = AF_PUP; -pub const PF_CHAOS: ::c_int = AF_CHAOS; -pub const PF_NS: ::c_int = AF_NS; -pub const PF_ISO: ::c_int = AF_ISO; -pub const PF_OSI: ::c_int = AF_ISO; -pub const PF_ECMA: ::c_int = AF_ECMA; -pub const PF_DATAKIT: ::c_int = AF_DATAKIT; -pub const PF_CCITT: ::c_int = AF_CCITT; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_DLI: ::c_int = AF_DLI; -pub const PF_LAT: ::c_int = AF_LAT; -pub const PF_HYLINK: ::c_int = AF_HYLINK; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_LINK: ::c_int = AF_LINK; -pub const PF_XTP: ::c_int = pseudo_AF_XTP; -pub const PF_COIP: ::c_int = AF_COIP; -pub const PF_CNT: ::c_int = AF_CNT; -pub const PF_SIP: ::c_int = AF_SIP; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; -pub const PF_PIP: ::c_int = pseudo_AF_PIP; -pub const PF_NDRV: ::c_int = AF_NDRV; -pub const PF_ISDN: ::c_int = AF_ISDN; -pub const PF_KEY: ::c_int = pseudo_AF_KEY; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_NATM: ::c_int = AF_NATM; -pub const PF_SYSTEM: ::c_int = AF_SYSTEM; -pub const PF_NETBIOS: ::c_int = AF_NETBIOS; -pub const PF_PPP: ::c_int = AF_PPP; -pub const PF_VSOCK: ::c_int = AF_VSOCK; - -pub const NET_RT_DUMP: ::c_int = 1; -pub const NET_RT_FLAGS: ::c_int = 2; -pub const NET_RT_IFLIST: ::c_int = 3; - -pub const SOMAXCONN: ::c_int = 128; - -pub const SOCK_MAXADDRLEN: ::c_int = 255; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IP_RECVIF: ::c_int = 20; -pub const IP_RECVTTL: ::c_int = 24; -pub const IP_BOUND_IF: ::c_int = 25; -pub const IP_PKTINFO: ::c_int = 26; -pub const IP_RECVTOS: ::c_int = 27; -pub const IP_DONTFRAG: ::c_int = 28; -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; -pub const IPV6_CHECKSUM: ::c_int = 26; -pub const IPV6_RECVTCLASS: ::c_int = 35; -pub const IPV6_TCLASS: ::c_int = 36; -pub const IPV6_RECVHOPLIMIT: ::c_int = 37; -pub const IPV6_PKTINFO: ::c_int = 46; -pub const IPV6_HOPLIMIT: ::c_int = 47; -pub const IPV6_RECVPKTINFO: ::c_int = 61; -pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 70; -pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 71; -pub const IP_BLOCK_SOURCE: ::c_int = 72; -pub const IP_UNBLOCK_SOURCE: ::c_int = 73; -pub const IPV6_BOUND_IF: ::c_int = 125; - -pub const TCP_NOPUSH: ::c_int = 4; -pub const TCP_NOOPT: ::c_int = 8; -pub const TCP_KEEPALIVE: ::c_int = 0x10; -pub const TCP_KEEPINTVL: ::c_int = 0x101; -pub const TCP_KEEPCNT: ::c_int = 0x102; +pub const IPPROTO_DONE: c_int = 257; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_LOCAL: c_int = 1; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_INET: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NS: c_int = 6; +pub const AF_ISO: c_int = 7; +pub const AF_OSI: c_int = AF_ISO; +pub const AF_ECMA: c_int = 8; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_ROUTE: c_int = 17; +pub const AF_LINK: c_int = 18; +pub const pseudo_AF_XTP: c_int = 19; +pub const AF_COIP: c_int = 20; +pub const AF_CNT: c_int = 21; +pub const pseudo_AF_RTIP: c_int = 22; +pub const AF_IPX: c_int = 23; +pub const AF_SIP: c_int = 24; +pub const pseudo_AF_PIP: c_int = 25; +pub const AF_NDRV: c_int = 27; +pub const AF_ISDN: c_int = 28; +pub const AF_E164: c_int = AF_ISDN; +pub const pseudo_AF_KEY: c_int = 29; +pub const AF_INET6: c_int = 30; +pub const AF_NATM: c_int = 31; +pub const AF_SYSTEM: c_int = 32; +pub const AF_NETBIOS: c_int = 33; +pub const AF_PPP: c_int = 34; +pub const pseudo_AF_HDRCMPLT: c_int = 35; +pub const AF_IEEE80211: c_int = 37; +pub const AF_UTUN: c_int = 38; +pub const AF_VSOCK: c_int = 40; +pub const AF_SYS_CONTROL: c_int = 2; + +pub const SYSPROTO_EVENT: c_int = 1; +pub const SYSPROTO_CONTROL: c_int = 2; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_UNIX: c_int = PF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_IMPLINK: c_int = AF_IMPLINK; +pub const PF_PUP: c_int = AF_PUP; +pub const PF_CHAOS: c_int = AF_CHAOS; +pub const PF_NS: c_int = AF_NS; +pub const PF_ISO: c_int = AF_ISO; +pub const PF_OSI: c_int = AF_ISO; +pub const PF_ECMA: c_int = AF_ECMA; +pub const PF_DATAKIT: c_int = AF_DATAKIT; +pub const PF_CCITT: c_int = AF_CCITT; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_DLI: c_int = AF_DLI; +pub const PF_LAT: c_int = AF_LAT; +pub const PF_HYLINK: c_int = AF_HYLINK; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_XTP: c_int = pseudo_AF_XTP; +pub const PF_COIP: c_int = AF_COIP; +pub const PF_CNT: c_int = AF_CNT; +pub const PF_SIP: c_int = AF_SIP; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_RTIP: c_int = pseudo_AF_RTIP; +pub const PF_PIP: c_int = pseudo_AF_PIP; +pub const PF_NDRV: c_int = AF_NDRV; +pub const PF_ISDN: c_int = AF_ISDN; +pub const PF_KEY: c_int = pseudo_AF_KEY; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_NATM: c_int = AF_NATM; +pub const PF_SYSTEM: c_int = AF_SYSTEM; +pub const PF_NETBIOS: c_int = AF_NETBIOS; +pub const PF_PPP: c_int = AF_PPP; +pub const PF_VSOCK: c_int = AF_VSOCK; + +pub const NET_RT_DUMP: c_int = 1; +pub const NET_RT_FLAGS: c_int = 2; +pub const NET_RT_IFLIST: c_int = 3; + +pub const SOMAXCONN: c_int = 128; + +pub const SOCK_MAXADDRLEN: c_int = 255; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const IP_TTL: c_int = 4; +pub const IP_HDRINCL: c_int = 2; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IP_RECVIF: c_int = 20; +pub const IP_RECVTTL: c_int = 24; +pub const IP_BOUND_IF: c_int = 25; +pub const IP_PKTINFO: c_int = 26; +pub const IP_RECVTOS: c_int = 27; +pub const IP_DONTFRAG: c_int = 28; +pub const IPV6_JOIN_GROUP: c_int = 12; +pub const IPV6_LEAVE_GROUP: c_int = 13; +pub const IPV6_CHECKSUM: c_int = 26; +pub const IPV6_RECVTCLASS: c_int = 35; +pub const IPV6_TCLASS: c_int = 36; +pub const IPV6_RECVHOPLIMIT: c_int = 37; +pub const IPV6_PKTINFO: c_int = 46; +pub const IPV6_HOPLIMIT: c_int = 47; +pub const IPV6_RECVPKTINFO: c_int = 61; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 70; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 71; +pub const IP_BLOCK_SOURCE: c_int = 72; +pub const IP_UNBLOCK_SOURCE: c_int = 73; +pub const IPV6_BOUND_IF: c_int = 125; + +pub const TCP_NOPUSH: c_int = 4; +pub const TCP_NOOPT: c_int = 8; +pub const TCP_KEEPALIVE: c_int = 0x10; +pub const TCP_KEEPINTVL: c_int = 0x101; +pub const TCP_KEEPCNT: c_int = 0x102; /// Enable/Disable TCP Fastopen on this socket -pub const TCP_FASTOPEN: ::c_int = 0x105; -pub const TCP_CONNECTION_INFO: ::c_int = 0x106; +pub const TCP_FASTOPEN: c_int = 0x105; +pub const TCP_CONNECTION_INFO: c_int = 0x106; -pub const SOL_LOCAL: ::c_int = 0; +pub const SOL_LOCAL: c_int = 0; /// Retrieve peer credentials. -pub const LOCAL_PEERCRED: ::c_int = 0x001; +pub const LOCAL_PEERCRED: c_int = 0x001; /// Retrieve peer PID. -pub const LOCAL_PEERPID: ::c_int = 0x002; +pub const LOCAL_PEERPID: c_int = 0x002; /// Retrieve effective peer PID. -pub const LOCAL_PEEREPID: ::c_int = 0x003; +pub const LOCAL_PEEREPID: c_int = 0x003; /// Retrieve peer UUID. -pub const LOCAL_PEERUUID: ::c_int = 0x004; +pub const LOCAL_PEERUUID: c_int = 0x004; /// Retrieve effective peer UUID. -pub const LOCAL_PEEREUUID: ::c_int = 0x005; +pub const LOCAL_PEEREUUID: c_int = 0x005; /// Retrieve peer audit token. -pub const LOCAL_PEERTOKEN: ::c_int = 0x006; - -pub const SOL_SOCKET: ::c_int = 0xffff; - -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_TIMESTAMP: ::c_int = 0x0400; -pub const SO_TIMESTAMP_MONOTONIC: ::c_int = 0x0800; -pub const SO_DONTTRUNC: ::c_int = 0x2000; -pub const SO_WANTMORE: ::c_int = 0x4000; -pub const SO_WANTOOBFLAG: ::c_int = 0x8000; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_LABEL: ::c_int = 0x1010; -pub const SO_PEERLABEL: ::c_int = 0x1011; -pub const SO_NREAD: ::c_int = 0x1020; -pub const SO_NKE: ::c_int = 0x1021; -pub const SO_NOSIGPIPE: ::c_int = 0x1022; -pub const SO_NOADDRERR: ::c_int = 0x1023; -pub const SO_NWRITE: ::c_int = 0x1024; -pub const SO_REUSESHAREUID: ::c_int = 0x1025; -pub const SO_NOTIFYCONFLICT: ::c_int = 0x1026; -pub const SO_LINGER_SEC: ::c_int = 0x1080; -pub const SO_RANDOMPORT: ::c_int = 0x1082; -pub const SO_NP_EXTENSIONS: ::c_int = 0x1083; - -pub const MSG_OOB: ::c_int = 0x1; -pub const MSG_PEEK: ::c_int = 0x2; -pub const MSG_DONTROUTE: ::c_int = 0x4; -pub const MSG_EOR: ::c_int = 0x8; -pub const MSG_TRUNC: ::c_int = 0x10; -pub const MSG_CTRUNC: ::c_int = 0x20; -pub const MSG_WAITALL: ::c_int = 0x40; -pub const MSG_DONTWAIT: ::c_int = 0x80; -pub const MSG_EOF: ::c_int = 0x100; -pub const MSG_FLUSH: ::c_int = 0x400; -pub const MSG_HOLD: ::c_int = 0x800; -pub const MSG_SEND: ::c_int = 0x1000; -pub const MSG_HAVEMORE: ::c_int = 0x2000; -pub const MSG_RCVMORE: ::c_int = 0x4000; -pub const MSG_NEEDSA: ::c_int = 0x10000; -pub const MSG_NOSIGNAL: ::c_int = 0x80000; - -pub const SCM_TIMESTAMP: ::c_int = 0x02; -pub const SCM_CREDS: ::c_int = 0x03; +pub const LOCAL_PEERTOKEN: c_int = 0x006; + +pub const SOL_SOCKET: c_int = 0xffff; + +pub const SO_DEBUG: c_int = 0x01; +pub const SO_ACCEPTCONN: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_TIMESTAMP: c_int = 0x0400; +pub const SO_TIMESTAMP_MONOTONIC: c_int = 0x0800; +pub const SO_DONTTRUNC: c_int = 0x2000; +pub const SO_WANTMORE: c_int = 0x4000; +pub const SO_WANTOOBFLAG: c_int = 0x8000; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; +pub const SO_LABEL: c_int = 0x1010; +pub const SO_PEERLABEL: c_int = 0x1011; +pub const SO_NREAD: c_int = 0x1020; +pub const SO_NKE: c_int = 0x1021; +pub const SO_NOSIGPIPE: c_int = 0x1022; +pub const SO_NOADDRERR: c_int = 0x1023; +pub const SO_NWRITE: c_int = 0x1024; +pub const SO_REUSESHAREUID: c_int = 0x1025; +pub const SO_NOTIFYCONFLICT: c_int = 0x1026; +pub const SO_LINGER_SEC: c_int = 0x1080; +pub const SO_RANDOMPORT: c_int = 0x1082; +pub const SO_NP_EXTENSIONS: c_int = 0x1083; + +pub const MSG_OOB: c_int = 0x1; +pub const MSG_PEEK: c_int = 0x2; +pub const MSG_DONTROUTE: c_int = 0x4; +pub const MSG_EOR: c_int = 0x8; +pub const MSG_TRUNC: c_int = 0x10; +pub const MSG_CTRUNC: c_int = 0x20; +pub const MSG_WAITALL: c_int = 0x40; +pub const MSG_DONTWAIT: c_int = 0x80; +pub const MSG_EOF: c_int = 0x100; +pub const MSG_FLUSH: c_int = 0x400; +pub const MSG_HOLD: c_int = 0x800; +pub const MSG_SEND: c_int = 0x1000; +pub const MSG_HAVEMORE: c_int = 0x2000; +pub const MSG_RCVMORE: c_int = 0x4000; +pub const MSG_NEEDSA: c_int = 0x10000; +pub const MSG_NOSIGNAL: c_int = 0x80000; + +pub const SCM_TIMESTAMP: c_int = 0x02; +pub const SCM_CREDS: c_int = 0x03; // https://github.com/aosm/xnu/blob/HEAD/bsd/net/if.h#L140-L156 -pub const IFF_UP: ::c_int = 0x1; // interface is up -pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link -pub const IFF_NOTRAILERS: ::c_int = 0x20; // obsolete: avoid use of trailers -pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated -pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol -pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets -pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress -pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions -pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit -pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast - -pub const SCOPE6_ID_MAX: ::size_t = 16; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const SAE_ASSOCID_ANY: ::sae_associd_t = 0; +pub const IFF_UP: c_int = 0x1; // interface is up +pub const IFF_BROADCAST: c_int = 0x2; // broadcast address valid +pub const IFF_DEBUG: c_int = 0x4; // turn on debugging +pub const IFF_LOOPBACK: c_int = 0x8; // is a loopback net +pub const IFF_POINTOPOINT: c_int = 0x10; // interface is point-to-point link +pub const IFF_NOTRAILERS: c_int = 0x20; // obsolete: avoid use of trailers +pub const IFF_RUNNING: c_int = 0x40; // resources allocated +pub const IFF_NOARP: c_int = 0x80; // no address resolution protocol +pub const IFF_PROMISC: c_int = 0x100; // receive all packets +pub const IFF_ALLMULTI: c_int = 0x200; // receive all multicast packets +pub const IFF_OACTIVE: c_int = 0x400; // transmission in progress +pub const IFF_SIMPLEX: c_int = 0x800; // can't hear own transmissions +pub const IFF_LINK0: c_int = 0x1000; // per link layer defined bit +pub const IFF_LINK1: c_int = 0x2000; // per link layer defined bit +pub const IFF_LINK2: c_int = 0x4000; // per link layer defined bit +pub const IFF_ALTPHYS: c_int = IFF_LINK2; // use alternate physical connection +pub const IFF_MULTICAST: c_int = 0x8000; // supports multicast + +pub const SCOPE6_ID_MAX: size_t = 16; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const SAE_ASSOCID_ANY: crate::sae_associd_t = 0; /// ((sae_associd_t)(-1ULL)) -pub const SAE_ASSOCID_ALL: ::sae_associd_t = 0xffffffff; +pub const SAE_ASSOCID_ALL: crate::sae_associd_t = 0xffffffff; -pub const SAE_CONNID_ANY: ::sae_connid_t = 0; +pub const SAE_CONNID_ANY: crate::sae_connid_t = 0; /// ((sae_connid_t)(-1ULL)) -pub const SAE_CONNID_ALL: ::sae_connid_t = 0xffffffff; +pub const SAE_CONNID_ALL: crate::sae_connid_t = 0xffffffff; // connectx() flag parameters /// resume connect() on read/write -pub const CONNECT_RESUME_ON_READ_WRITE: ::c_uint = 0x1; +pub const CONNECT_RESUME_ON_READ_WRITE: c_uint = 0x1; /// data is idempotent -pub const CONNECT_DATA_IDEMPOTENT: ::c_uint = 0x2; +pub const CONNECT_DATA_IDEMPOTENT: c_uint = 0x2; /// data includes security that replaces the TFO-cookie -pub const CONNECT_DATA_AUTHENTICATED: ::c_uint = 0x4; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const MAP_COPY: ::c_int = 0x0002; -pub const MAP_RENAME: ::c_int = 0x0020; -pub const MAP_NORESERVE: ::c_int = 0x0040; -pub const MAP_NOEXTEND: ::c_int = 0x0100; -pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; -pub const MAP_NOCACHE: ::c_int = 0x0400; -pub const MAP_JIT: ::c_int = 0x0800; - -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_BC_BASE_MAX: ::c_int = 9; -pub const _SC_BC_DIM_MAX: ::c_int = 10; -pub const _SC_BC_SCALE_MAX: ::c_int = 11; -pub const _SC_BC_STRING_MAX: ::c_int = 12; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; -pub const _SC_EXPR_NEST_MAX: ::c_int = 14; -pub const _SC_LINE_MAX: ::c_int = 15; -pub const _SC_RE_DUP_MAX: ::c_int = 16; -pub const _SC_2_VERSION: ::c_int = 17; -pub const _SC_2_C_BIND: ::c_int = 18; -pub const _SC_2_C_DEV: ::c_int = 19; -pub const _SC_2_CHAR_TERM: ::c_int = 20; -pub const _SC_2_FORT_DEV: ::c_int = 21; -pub const _SC_2_FORT_RUN: ::c_int = 22; -pub const _SC_2_LOCALEDEF: ::c_int = 23; -pub const _SC_2_SW_DEV: ::c_int = 24; -pub const _SC_2_UPE: ::c_int = 25; -pub const _SC_STREAM_MAX: ::c_int = 26; -pub const _SC_TZNAME_MAX: ::c_int = 27; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; -pub const _SC_PAGESIZE: ::c_int = 29; -pub const _SC_MEMLOCK: ::c_int = 30; -pub const _SC_MEMLOCK_RANGE: ::c_int = 31; -pub const _SC_MEMORY_PROTECTION: ::c_int = 32; -pub const _SC_MESSAGE_PASSING: ::c_int = 33; -pub const _SC_PRIORITIZED_IO: ::c_int = 34; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; -pub const _SC_REALTIME_SIGNALS: ::c_int = 36; -pub const _SC_SEMAPHORES: ::c_int = 37; -pub const _SC_FSYNC: ::c_int = 38; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; -pub const _SC_TIMERS: ::c_int = 41; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; -pub const _SC_AIO_MAX: ::c_int = 43; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; -pub const _SC_DELAYTIMER_MAX: ::c_int = 45; -pub const _SC_MQ_OPEN_MAX: ::c_int = 46; -pub const _SC_MAPPED_FILES: ::c_int = 47; -pub const _SC_RTSIG_MAX: ::c_int = 48; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; -pub const _SC_SEM_VALUE_MAX: ::c_int = 50; -pub const _SC_SIGQUEUE_MAX: ::c_int = 51; -pub const _SC_TIMER_MAX: ::c_int = 52; -pub const _SC_NPROCESSORS_CONF: ::c_int = 57; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; -pub const _SC_2_PBS: ::c_int = 59; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61; -pub const _SC_2_PBS_LOCATE: ::c_int = 62; -pub const _SC_2_PBS_MESSAGE: ::c_int = 63; -pub const _SC_2_PBS_TRACK: ::c_int = 64; -pub const _SC_ADVISORY_INFO: ::c_int = 65; -pub const _SC_BARRIERS: ::c_int = 66; -pub const _SC_CLOCK_SELECTION: ::c_int = 67; -pub const _SC_CPUTIME: ::c_int = 68; -pub const _SC_FILE_LOCKING: ::c_int = 69; -pub const _SC_HOST_NAME_MAX: ::c_int = 72; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 74; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; -pub const _SC_REGEXP: ::c_int = 77; -pub const _SC_SHELL: ::c_int = 78; -pub const _SC_SPAWN: ::c_int = 79; -pub const _SC_SPIN_LOCKS: ::c_int = 80; -pub const _SC_SPORADIC_SERVER: ::c_int = 81; -pub const _SC_THREAD_CPUTIME: ::c_int = 84; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92; -pub const _SC_TIMEOUTS: ::c_int = 95; -pub const _SC_TRACE: ::c_int = 97; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98; -pub const _SC_TRACE_INHERIT: ::c_int = 99; -pub const _SC_TRACE_LOG: ::c_int = 100; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102; -pub const _SC_V6_ILP32_OFF32: ::c_int = 103; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104; -pub const _SC_V6_LP64_OFF64: ::c_int = 105; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106; -pub const _SC_IPV6: ::c_int = 118; -pub const _SC_RAW_SOCKETS: ::c_int = 119; -pub const _SC_SYMLOOP_MAX: ::c_int = 120; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_XOPEN_STREAMS: ::c_int = 114; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 122; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 123; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 124; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 125; -pub const _SC_SS_REPL_MAX: ::c_int = 126; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 127; -pub const _SC_TRACE_NAME_MAX: ::c_int = 128; -pub const _SC_TRACE_SYS_MAX: ::c_int = 129; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 130; -pub const _SC_PASS_MAX: ::c_int = 131; +pub const CONNECT_DATA_AUTHENTICATED: c_uint = 0x4; + +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; + +pub const MAP_COPY: c_int = 0x0002; +pub const MAP_RENAME: c_int = 0x0020; +pub const MAP_NORESERVE: c_int = 0x0040; +pub const MAP_NOEXTEND: c_int = 0x0100; +pub const MAP_HASSEMAPHORE: c_int = 0x0200; +pub const MAP_NOCACHE: c_int = 0x0400; +pub const MAP_JIT: c_int = 0x0800; + +pub const _SC_ARG_MAX: c_int = 1; +pub const _SC_CHILD_MAX: c_int = 2; +pub const _SC_CLK_TCK: c_int = 3; +pub const _SC_NGROUPS_MAX: c_int = 4; +pub const _SC_OPEN_MAX: c_int = 5; +pub const _SC_JOB_CONTROL: c_int = 6; +pub const _SC_SAVED_IDS: c_int = 7; +pub const _SC_VERSION: c_int = 8; +pub const _SC_BC_BASE_MAX: c_int = 9; +pub const _SC_BC_DIM_MAX: c_int = 10; +pub const _SC_BC_SCALE_MAX: c_int = 11; +pub const _SC_BC_STRING_MAX: c_int = 12; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 13; +pub const _SC_EXPR_NEST_MAX: c_int = 14; +pub const _SC_LINE_MAX: c_int = 15; +pub const _SC_RE_DUP_MAX: c_int = 16; +pub const _SC_2_VERSION: c_int = 17; +pub const _SC_2_C_BIND: c_int = 18; +pub const _SC_2_C_DEV: c_int = 19; +pub const _SC_2_CHAR_TERM: c_int = 20; +pub const _SC_2_FORT_DEV: c_int = 21; +pub const _SC_2_FORT_RUN: c_int = 22; +pub const _SC_2_LOCALEDEF: c_int = 23; +pub const _SC_2_SW_DEV: c_int = 24; +pub const _SC_2_UPE: c_int = 25; +pub const _SC_STREAM_MAX: c_int = 26; +pub const _SC_TZNAME_MAX: c_int = 27; +pub const _SC_ASYNCHRONOUS_IO: c_int = 28; +pub const _SC_PAGESIZE: c_int = 29; +pub const _SC_MEMLOCK: c_int = 30; +pub const _SC_MEMLOCK_RANGE: c_int = 31; +pub const _SC_MEMORY_PROTECTION: c_int = 32; +pub const _SC_MESSAGE_PASSING: c_int = 33; +pub const _SC_PRIORITIZED_IO: c_int = 34; +pub const _SC_PRIORITY_SCHEDULING: c_int = 35; +pub const _SC_REALTIME_SIGNALS: c_int = 36; +pub const _SC_SEMAPHORES: c_int = 37; +pub const _SC_FSYNC: c_int = 38; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 39; +pub const _SC_SYNCHRONIZED_IO: c_int = 40; +pub const _SC_TIMERS: c_int = 41; +pub const _SC_AIO_LISTIO_MAX: c_int = 42; +pub const _SC_AIO_MAX: c_int = 43; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 44; +pub const _SC_DELAYTIMER_MAX: c_int = 45; +pub const _SC_MQ_OPEN_MAX: c_int = 46; +pub const _SC_MAPPED_FILES: c_int = 47; +pub const _SC_RTSIG_MAX: c_int = 48; +pub const _SC_SEM_NSEMS_MAX: c_int = 49; +pub const _SC_SEM_VALUE_MAX: c_int = 50; +pub const _SC_SIGQUEUE_MAX: c_int = 51; +pub const _SC_TIMER_MAX: c_int = 52; +pub const _SC_NPROCESSORS_CONF: c_int = 57; +pub const _SC_NPROCESSORS_ONLN: c_int = 58; +pub const _SC_2_PBS: c_int = 59; +pub const _SC_2_PBS_ACCOUNTING: c_int = 60; +pub const _SC_2_PBS_CHECKPOINT: c_int = 61; +pub const _SC_2_PBS_LOCATE: c_int = 62; +pub const _SC_2_PBS_MESSAGE: c_int = 63; +pub const _SC_2_PBS_TRACK: c_int = 64; +pub const _SC_ADVISORY_INFO: c_int = 65; +pub const _SC_BARRIERS: c_int = 66; +pub const _SC_CLOCK_SELECTION: c_int = 67; +pub const _SC_CPUTIME: c_int = 68; +pub const _SC_FILE_LOCKING: c_int = 69; +pub const _SC_HOST_NAME_MAX: c_int = 72; +pub const _SC_MONOTONIC_CLOCK: c_int = 74; +pub const _SC_READER_WRITER_LOCKS: c_int = 76; +pub const _SC_REGEXP: c_int = 77; +pub const _SC_SHELL: c_int = 78; +pub const _SC_SPAWN: c_int = 79; +pub const _SC_SPIN_LOCKS: c_int = 80; +pub const _SC_SPORADIC_SERVER: c_int = 81; +pub const _SC_THREAD_CPUTIME: c_int = 84; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 92; +pub const _SC_TIMEOUTS: c_int = 95; +pub const _SC_TRACE: c_int = 97; +pub const _SC_TRACE_EVENT_FILTER: c_int = 98; +pub const _SC_TRACE_INHERIT: c_int = 99; +pub const _SC_TRACE_LOG: c_int = 100; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 102; +pub const _SC_V6_ILP32_OFF32: c_int = 103; +pub const _SC_V6_ILP32_OFFBIG: c_int = 104; +pub const _SC_V6_LP64_OFF64: c_int = 105; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 106; +pub const _SC_IPV6: c_int = 118; +pub const _SC_RAW_SOCKETS: c_int = 119; +pub const _SC_SYMLOOP_MAX: c_int = 120; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_XOPEN_STREAMS: c_int = 114; +pub const _SC_XBS5_ILP32_OFF32: c_int = 122; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 123; +pub const _SC_XBS5_LP64_OFF64: c_int = 124; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 125; +pub const _SC_SS_REPL_MAX: c_int = 126; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 127; +pub const _SC_TRACE_NAME_MAX: c_int = 128; +pub const _SC_TRACE_SYS_MAX: c_int = 129; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 130; +pub const _SC_PASS_MAX: c_int = 131; // `confstr` keys (only the values guaranteed by `man confstr`). -pub const _CS_PATH: ::c_int = 1; -pub const _CS_DARWIN_USER_DIR: ::c_int = 65536; -pub const _CS_DARWIN_USER_TEMP_DIR: ::c_int = 65537; -pub const _CS_DARWIN_USER_CACHE_DIR: ::c_int = 65538; - -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -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 _PTHREAD_MUTEX_SIG_init: ::c_long = 0x32AAABA7; -pub const _PTHREAD_COND_SIG_init: ::c_long = 0x3CB0B1BB; -pub const _PTHREAD_RWLOCK_SIG_init: ::c_long = 0x2DA8B3B4; +pub const _CS_PATH: c_int = 1; +pub const _CS_DARWIN_USER_DIR: c_int = 65536; +pub const _CS_DARWIN_USER_TEMP_DIR: c_int = 65537; +pub const _CS_DARWIN_USER_CACHE_DIR: c_int = 65538; + +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +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 _PTHREAD_MUTEX_SIG_init: c_long = 0x32AAABA7; +pub const _PTHREAD_COND_SIG_init: c_long = 0x3CB0B1BB; +pub const _PTHREAD_RWLOCK_SIG_init: c_long = 0x2DA8B3B4; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { __sig: _PTHREAD_MUTEX_SIG_init, __opaque: [0; __PTHREAD_MUTEX_SIZE__], @@ -4481,26 +4487,26 @@ pub const OS_UNFAIR_LOCK_INIT: os_unfair_lock = os_unfair_lock { _os_unfair_lock_opaque: 0, }; -pub const OS_LOG_TYPE_DEFAULT: ::os_log_type_t = 0x00; -pub const OS_LOG_TYPE_INFO: ::os_log_type_t = 0x01; -pub const OS_LOG_TYPE_DEBUG: ::os_log_type_t = 0x02; -pub const OS_LOG_TYPE_ERROR: ::os_log_type_t = 0x10; -pub const OS_LOG_TYPE_FAULT: ::os_log_type_t = 0x11; +pub const OS_LOG_TYPE_DEFAULT: crate::os_log_type_t = 0x00; +pub const OS_LOG_TYPE_INFO: crate::os_log_type_t = 0x01; +pub const OS_LOG_TYPE_DEBUG: crate::os_log_type_t = 0x02; +pub const OS_LOG_TYPE_ERROR: crate::os_log_type_t = 0x10; +pub const OS_LOG_TYPE_FAULT: crate::os_log_type_t = 0x11; -pub const OS_SIGNPOST_EVENT: ::os_signpost_type_t = 0x00; -pub const OS_SIGNPOST_INTERVAL_BEGIN: ::os_signpost_type_t = 0x01; -pub const OS_SIGNPOST_INTERVAL_END: ::os_signpost_type_t = 0x02; +pub const OS_SIGNPOST_EVENT: crate::os_signpost_type_t = 0x00; +pub const OS_SIGNPOST_INTERVAL_BEGIN: crate::os_signpost_type_t = 0x01; +pub const OS_SIGNPOST_INTERVAL_END: crate::os_signpost_type_t = 0x02; -pub const MINSIGSTKSZ: ::size_t = 32768; -pub const SIGSTKSZ: ::size_t = 131072; +pub const MINSIGSTKSZ: size_t = 32768; +pub const SIGSTKSZ: size_t = 131072; -pub const FD_SETSIZE: ::c_int = 1024; +pub const FD_SETSIZE: c_int = 1024; -pub const ST_NOSUID: ::c_ulong = 2; +pub const ST_NOSUID: c_ulong = 2; -pub const SCHED_OTHER: ::c_int = 1; -pub const SCHED_FIFO: ::c_int = 4; -pub const SCHED_RR: ::c_int = 2; +pub const SCHED_OTHER: c_int = 1; +pub const SCHED_FIFO: c_int = 4; +pub const SCHED_RR: c_int = 2; pub const EVFILT_READ: i16 = -1; pub const EVFILT_WRITE: i16 = -2; @@ -4581,378 +4587,378 @@ pub const NOTE_TRACK: u32 = 0x00000001; pub const NOTE_TRACKERR: u32 = 0x00000002; pub const NOTE_CHILD: u32 = 0x00000004; -pub const OCRNL: ::tcflag_t = 0x00000010; -pub const ONOCR: ::tcflag_t = 0x00000020; -pub const ONLRET: ::tcflag_t = 0x00000040; -pub const OFILL: ::tcflag_t = 0x00000080; -pub const NLDLY: ::tcflag_t = 0x00000300; -pub const TABDLY: ::tcflag_t = 0x00000c04; -pub const CRDLY: ::tcflag_t = 0x00003000; -pub const FFDLY: ::tcflag_t = 0x00004000; -pub const BSDLY: ::tcflag_t = 0x00008000; -pub const VTDLY: ::tcflag_t = 0x00010000; -pub const OFDEL: ::tcflag_t = 0x00020000; - -pub const NL0: ::tcflag_t = 0x00000000; -pub const NL1: ::tcflag_t = 0x00000100; -pub const TAB0: ::tcflag_t = 0x00000000; -pub const TAB1: ::tcflag_t = 0x00000400; -pub const TAB2: ::tcflag_t = 0x00000800; -pub const CR0: ::tcflag_t = 0x00000000; -pub const CR1: ::tcflag_t = 0x00001000; -pub const CR2: ::tcflag_t = 0x00002000; -pub const CR3: ::tcflag_t = 0x00003000; -pub const FF0: ::tcflag_t = 0x00000000; -pub const FF1: ::tcflag_t = 0x00004000; -pub const BS0: ::tcflag_t = 0x00000000; -pub const BS1: ::tcflag_t = 0x00008000; -pub const TAB3: ::tcflag_t = 0x00000004; -pub const VT0: ::tcflag_t = 0x00000000; -pub const VT1: ::tcflag_t = 0x00010000; -pub const IUTF8: ::tcflag_t = 0x00004000; -pub const CRTSCTS: ::tcflag_t = 0x00030000; - -pub const NI_MAXHOST: ::socklen_t = 1025; -pub const NI_MAXSERV: ::socklen_t = 32; -pub const NI_NOFQDN: ::c_int = 0x00000001; -pub const NI_NUMERICHOST: ::c_int = 0x00000002; -pub const NI_NAMEREQD: ::c_int = 0x00000004; -pub const NI_NUMERICSERV: ::c_int = 0x00000008; -pub const NI_NUMERICSCOPE: ::c_int = 0x00000100; -pub const NI_DGRAM: ::c_int = 0x00000010; - -pub const Q_GETQUOTA: ::c_int = 0x300; -pub const Q_SETQUOTA: ::c_int = 0x400; - -pub const RENAME_SWAP: ::c_uint = 0x00000002; -pub const RENAME_EXCL: ::c_uint = 0x00000004; - -pub const RTLD_LOCAL: ::c_int = 0x4; -pub const RTLD_FIRST: ::c_int = 0x100; -pub const RTLD_NODELETE: ::c_int = 0x80; -pub const RTLD_NOLOAD: ::c_int = 0x10; -pub const RTLD_GLOBAL: ::c_int = 0x8; -pub const RTLD_MAIN_ONLY: *mut ::c_void = -5isize as *mut ::c_void; - -pub const _WSTOPPED: ::c_int = 0o177; - -pub const LOG_NETINFO: ::c_int = 12 << 3; -pub const LOG_REMOTEAUTH: ::c_int = 13 << 3; -pub const LOG_INSTALL: ::c_int = 14 << 3; -pub const LOG_RAS: ::c_int = 15 << 3; -pub const LOG_LAUNCHD: ::c_int = 24 << 3; -pub const LOG_NFACILITIES: ::c_int = 25; - -pub const CTLTYPE: ::c_int = 0xf; -pub const CTLTYPE_NODE: ::c_int = 1; -pub const CTLTYPE_INT: ::c_int = 2; -pub const CTLTYPE_STRING: ::c_int = 3; -pub const CTLTYPE_QUAD: ::c_int = 4; -pub const CTLTYPE_OPAQUE: ::c_int = 5; -pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE; -pub const CTLFLAG_RD: ::c_int = 0x80000000; -pub const CTLFLAG_WR: ::c_int = 0x40000000; -pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR; -pub const CTLFLAG_NOLOCK: ::c_int = 0x20000000; -pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000; -pub const CTLFLAG_SECURE: ::c_int = 0x08000000; -pub const CTLFLAG_MASKED: ::c_int = 0x04000000; -pub const CTLFLAG_NOAUTO: ::c_int = 0x02000000; -pub const CTLFLAG_KERN: ::c_int = 0x01000000; -pub const CTLFLAG_LOCKED: ::c_int = 0x00800000; -pub const CTLFLAG_OID2: ::c_int = 0x00400000; -pub const CTL_UNSPEC: ::c_int = 0; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_VFS: ::c_int = 3; -pub const CTL_NET: ::c_int = 4; -pub const CTL_DEBUG: ::c_int = 5; -pub const CTL_HW: ::c_int = 6; -pub const CTL_MACHDEP: ::c_int = 7; -pub const CTL_USER: ::c_int = 8; -pub const CTL_MAXID: ::c_int = 9; -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_MAXVNODES: ::c_int = 5; -pub const KERN_MAXPROC: ::c_int = 6; -pub const KERN_MAXFILES: ::c_int = 7; -pub const KERN_ARGMAX: ::c_int = 8; -pub const KERN_SECURELVL: ::c_int = 9; -pub const KERN_HOSTNAME: ::c_int = 10; -pub const KERN_HOSTID: ::c_int = 11; -pub const KERN_CLOCKRATE: ::c_int = 12; -pub const KERN_VNODE: ::c_int = 13; -pub const KERN_PROC: ::c_int = 14; -pub const KERN_FILE: ::c_int = 15; -pub const KERN_PROF: ::c_int = 16; -pub const KERN_POSIX1: ::c_int = 17; -pub const KERN_NGROUPS: ::c_int = 18; -pub const KERN_JOB_CONTROL: ::c_int = 19; -pub const KERN_SAVED_IDS: ::c_int = 20; -pub const KERN_BOOTTIME: ::c_int = 21; -pub const KERN_NISDOMAINNAME: ::c_int = 22; -pub const KERN_DOMAINNAME: ::c_int = KERN_NISDOMAINNAME; -pub const KERN_MAXPARTITIONS: ::c_int = 23; -pub const KERN_KDEBUG: ::c_int = 24; -pub const KERN_UPDATEINTERVAL: ::c_int = 25; -pub const KERN_OSRELDATE: ::c_int = 26; -pub const KERN_NTP_PLL: ::c_int = 27; -pub const KERN_BOOTFILE: ::c_int = 28; -pub const KERN_MAXFILESPERPROC: ::c_int = 29; -pub const KERN_MAXPROCPERUID: ::c_int = 30; -pub const KERN_DUMPDEV: ::c_int = 31; -pub const KERN_IPC: ::c_int = 32; -pub const KERN_DUMMY: ::c_int = 33; -pub const KERN_PS_STRINGS: ::c_int = 34; -pub const KERN_USRSTACK32: ::c_int = 35; -pub const KERN_LOGSIGEXIT: ::c_int = 36; -pub const KERN_SYMFILE: ::c_int = 37; -pub const KERN_PROCARGS: ::c_int = 38; -pub const KERN_NETBOOT: ::c_int = 40; -pub const KERN_SYSV: ::c_int = 42; -pub const KERN_AFFINITY: ::c_int = 43; -pub const KERN_TRANSLATE: ::c_int = 44; -pub const KERN_CLASSIC: ::c_int = KERN_TRANSLATE; -pub const KERN_EXEC: ::c_int = 45; -pub const KERN_CLASSICHANDLER: ::c_int = KERN_EXEC; -pub const KERN_AIOMAX: ::c_int = 46; -pub const KERN_AIOPROCMAX: ::c_int = 47; -pub const KERN_AIOTHREADS: ::c_int = 48; -pub const KERN_COREFILE: ::c_int = 50; -pub const KERN_COREDUMP: ::c_int = 51; -pub const KERN_SUGID_COREDUMP: ::c_int = 52; -pub const KERN_PROCDELAYTERM: ::c_int = 53; -pub const KERN_SHREG_PRIVATIZABLE: ::c_int = 54; -pub const KERN_LOW_PRI_WINDOW: ::c_int = 56; -pub const KERN_LOW_PRI_DELAY: ::c_int = 57; -pub const KERN_POSIX: ::c_int = 58; -pub const KERN_USRSTACK64: ::c_int = 59; -pub const KERN_NX_PROTECTION: ::c_int = 60; -pub const KERN_TFP: ::c_int = 61; -pub const KERN_PROCNAME: ::c_int = 62; -pub const KERN_THALTSTACK: ::c_int = 63; -pub const KERN_SPECULATIVE_READS: ::c_int = 64; -pub const KERN_OSVERSION: ::c_int = 65; -pub const KERN_SAFEBOOT: ::c_int = 66; -pub const KERN_RAGEVNODE: ::c_int = 68; -pub const KERN_TTY: ::c_int = 69; -pub const KERN_CHECKOPENEVT: ::c_int = 70; -pub const KERN_THREADNAME: ::c_int = 71; -pub const KERN_MAXID: ::c_int = 72; -pub const KERN_RAGE_PROC: ::c_int = 1; -pub const KERN_RAGE_THREAD: ::c_int = 2; -pub const KERN_UNRAGE_PROC: ::c_int = 3; -pub const KERN_UNRAGE_THREAD: ::c_int = 4; -pub const KERN_OPENEVT_PROC: ::c_int = 1; -pub const KERN_UNOPENEVT_PROC: ::c_int = 2; -pub const KERN_TFP_POLICY: ::c_int = 1; -pub const KERN_TFP_POLICY_DENY: ::c_int = 0; -pub const KERN_TFP_POLICY_DEFAULT: ::c_int = 2; -pub const KERN_KDEFLAGS: ::c_int = 1; -pub const KERN_KDDFLAGS: ::c_int = 2; -pub const KERN_KDENABLE: ::c_int = 3; -pub const KERN_KDSETBUF: ::c_int = 4; -pub const KERN_KDGETBUF: ::c_int = 5; -pub const KERN_KDSETUP: ::c_int = 6; -pub const KERN_KDREMOVE: ::c_int = 7; -pub const KERN_KDSETREG: ::c_int = 8; -pub const KERN_KDGETREG: ::c_int = 9; -pub const KERN_KDREADTR: ::c_int = 10; -pub const KERN_KDPIDTR: ::c_int = 11; -pub const KERN_KDTHRMAP: ::c_int = 12; -pub const KERN_KDPIDEX: ::c_int = 14; -pub const KERN_KDSETRTCDEC: ::c_int = 15; -pub const KERN_KDGETENTROPY: ::c_int = 16; -pub const KERN_KDWRITETR: ::c_int = 17; -pub const KERN_KDWRITEMAP: ::c_int = 18; +pub const OCRNL: crate::tcflag_t = 0x00000010; +pub const ONOCR: crate::tcflag_t = 0x00000020; +pub const ONLRET: crate::tcflag_t = 0x00000040; +pub const OFILL: crate::tcflag_t = 0x00000080; +pub const NLDLY: crate::tcflag_t = 0x00000300; +pub const TABDLY: crate::tcflag_t = 0x00000c04; +pub const CRDLY: crate::tcflag_t = 0x00003000; +pub const FFDLY: crate::tcflag_t = 0x00004000; +pub const BSDLY: crate::tcflag_t = 0x00008000; +pub const VTDLY: crate::tcflag_t = 0x00010000; +pub const OFDEL: crate::tcflag_t = 0x00020000; + +pub const NL0: crate::tcflag_t = 0x00000000; +pub const NL1: crate::tcflag_t = 0x00000100; +pub const TAB0: crate::tcflag_t = 0x00000000; +pub const TAB1: crate::tcflag_t = 0x00000400; +pub const TAB2: crate::tcflag_t = 0x00000800; +pub const CR0: crate::tcflag_t = 0x00000000; +pub const CR1: crate::tcflag_t = 0x00001000; +pub const CR2: crate::tcflag_t = 0x00002000; +pub const CR3: crate::tcflag_t = 0x00003000; +pub const FF0: crate::tcflag_t = 0x00000000; +pub const FF1: crate::tcflag_t = 0x00004000; +pub const BS0: crate::tcflag_t = 0x00000000; +pub const BS1: crate::tcflag_t = 0x00008000; +pub const TAB3: crate::tcflag_t = 0x00000004; +pub const VT0: crate::tcflag_t = 0x00000000; +pub const VT1: crate::tcflag_t = 0x00010000; +pub const IUTF8: crate::tcflag_t = 0x00004000; +pub const CRTSCTS: crate::tcflag_t = 0x00030000; + +pub const NI_MAXHOST: crate::socklen_t = 1025; +pub const NI_MAXSERV: crate::socklen_t = 32; +pub const NI_NOFQDN: c_int = 0x00000001; +pub const NI_NUMERICHOST: c_int = 0x00000002; +pub const NI_NAMEREQD: c_int = 0x00000004; +pub const NI_NUMERICSERV: c_int = 0x00000008; +pub const NI_NUMERICSCOPE: c_int = 0x00000100; +pub const NI_DGRAM: c_int = 0x00000010; + +pub const Q_GETQUOTA: c_int = 0x300; +pub const Q_SETQUOTA: c_int = 0x400; + +pub const RENAME_SWAP: c_uint = 0x00000002; +pub const RENAME_EXCL: c_uint = 0x00000004; + +pub const RTLD_LOCAL: c_int = 0x4; +pub const RTLD_FIRST: c_int = 0x100; +pub const RTLD_NODELETE: c_int = 0x80; +pub const RTLD_NOLOAD: c_int = 0x10; +pub const RTLD_GLOBAL: c_int = 0x8; +pub const RTLD_MAIN_ONLY: *mut c_void = -5isize as *mut c_void; + +pub const _WSTOPPED: c_int = 0o177; + +pub const LOG_NETINFO: c_int = 12 << 3; +pub const LOG_REMOTEAUTH: c_int = 13 << 3; +pub const LOG_INSTALL: c_int = 14 << 3; +pub const LOG_RAS: c_int = 15 << 3; +pub const LOG_LAUNCHD: c_int = 24 << 3; +pub const LOG_NFACILITIES: c_int = 25; + +pub const CTLTYPE: c_int = 0xf; +pub const CTLTYPE_NODE: c_int = 1; +pub const CTLTYPE_INT: c_int = 2; +pub const CTLTYPE_STRING: c_int = 3; +pub const CTLTYPE_QUAD: c_int = 4; +pub const CTLTYPE_OPAQUE: c_int = 5; +pub const CTLTYPE_STRUCT: c_int = CTLTYPE_OPAQUE; +pub const CTLFLAG_RD: c_int = 0x80000000; +pub const CTLFLAG_WR: c_int = 0x40000000; +pub const CTLFLAG_RW: c_int = CTLFLAG_RD | CTLFLAG_WR; +pub const CTLFLAG_NOLOCK: c_int = 0x20000000; +pub const CTLFLAG_ANYBODY: c_int = 0x10000000; +pub const CTLFLAG_SECURE: c_int = 0x08000000; +pub const CTLFLAG_MASKED: c_int = 0x04000000; +pub const CTLFLAG_NOAUTO: c_int = 0x02000000; +pub const CTLFLAG_KERN: c_int = 0x01000000; +pub const CTLFLAG_LOCKED: c_int = 0x00800000; +pub const CTLFLAG_OID2: c_int = 0x00400000; +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_VFS: c_int = 3; +pub const CTL_NET: c_int = 4; +pub const CTL_DEBUG: c_int = 5; +pub const CTL_HW: c_int = 6; +pub const CTL_MACHDEP: c_int = 7; +pub const CTL_USER: c_int = 8; +pub const CTL_MAXID: c_int = 9; +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_MAXVNODES: c_int = 5; +pub const KERN_MAXPROC: c_int = 6; +pub const KERN_MAXFILES: c_int = 7; +pub const KERN_ARGMAX: c_int = 8; +pub const KERN_SECURELVL: c_int = 9; +pub const KERN_HOSTNAME: c_int = 10; +pub const KERN_HOSTID: c_int = 11; +pub const KERN_CLOCKRATE: c_int = 12; +pub const KERN_VNODE: c_int = 13; +pub const KERN_PROC: c_int = 14; +pub const KERN_FILE: c_int = 15; +pub const KERN_PROF: c_int = 16; +pub const KERN_POSIX1: c_int = 17; +pub const KERN_NGROUPS: c_int = 18; +pub const KERN_JOB_CONTROL: c_int = 19; +pub const KERN_SAVED_IDS: c_int = 20; +pub const KERN_BOOTTIME: c_int = 21; +pub const KERN_NISDOMAINNAME: c_int = 22; +pub const KERN_DOMAINNAME: c_int = KERN_NISDOMAINNAME; +pub const KERN_MAXPARTITIONS: c_int = 23; +pub const KERN_KDEBUG: c_int = 24; +pub const KERN_UPDATEINTERVAL: c_int = 25; +pub const KERN_OSRELDATE: c_int = 26; +pub const KERN_NTP_PLL: c_int = 27; +pub const KERN_BOOTFILE: c_int = 28; +pub const KERN_MAXFILESPERPROC: c_int = 29; +pub const KERN_MAXPROCPERUID: c_int = 30; +pub const KERN_DUMPDEV: c_int = 31; +pub const KERN_IPC: c_int = 32; +pub const KERN_DUMMY: c_int = 33; +pub const KERN_PS_STRINGS: c_int = 34; +pub const KERN_USRSTACK32: c_int = 35; +pub const KERN_LOGSIGEXIT: c_int = 36; +pub const KERN_SYMFILE: c_int = 37; +pub const KERN_PROCARGS: c_int = 38; +pub const KERN_NETBOOT: c_int = 40; +pub const KERN_SYSV: c_int = 42; +pub const KERN_AFFINITY: c_int = 43; +pub const KERN_TRANSLATE: c_int = 44; +pub const KERN_CLASSIC: c_int = KERN_TRANSLATE; +pub const KERN_EXEC: c_int = 45; +pub const KERN_CLASSICHANDLER: c_int = KERN_EXEC; +pub const KERN_AIOMAX: c_int = 46; +pub const KERN_AIOPROCMAX: c_int = 47; +pub const KERN_AIOTHREADS: c_int = 48; +pub const KERN_COREFILE: c_int = 50; +pub const KERN_COREDUMP: c_int = 51; +pub const KERN_SUGID_COREDUMP: c_int = 52; +pub const KERN_PROCDELAYTERM: c_int = 53; +pub const KERN_SHREG_PRIVATIZABLE: c_int = 54; +pub const KERN_LOW_PRI_WINDOW: c_int = 56; +pub const KERN_LOW_PRI_DELAY: c_int = 57; +pub const KERN_POSIX: c_int = 58; +pub const KERN_USRSTACK64: c_int = 59; +pub const KERN_NX_PROTECTION: c_int = 60; +pub const KERN_TFP: c_int = 61; +pub const KERN_PROCNAME: c_int = 62; +pub const KERN_THALTSTACK: c_int = 63; +pub const KERN_SPECULATIVE_READS: c_int = 64; +pub const KERN_OSVERSION: c_int = 65; +pub const KERN_SAFEBOOT: c_int = 66; +pub const KERN_RAGEVNODE: c_int = 68; +pub const KERN_TTY: c_int = 69; +pub const KERN_CHECKOPENEVT: c_int = 70; +pub const KERN_THREADNAME: c_int = 71; +pub const KERN_MAXID: c_int = 72; +pub const KERN_RAGE_PROC: c_int = 1; +pub const KERN_RAGE_THREAD: c_int = 2; +pub const KERN_UNRAGE_PROC: c_int = 3; +pub const KERN_UNRAGE_THREAD: c_int = 4; +pub const KERN_OPENEVT_PROC: c_int = 1; +pub const KERN_UNOPENEVT_PROC: c_int = 2; +pub const KERN_TFP_POLICY: c_int = 1; +pub const KERN_TFP_POLICY_DENY: c_int = 0; +pub const KERN_TFP_POLICY_DEFAULT: c_int = 2; +pub const KERN_KDEFLAGS: c_int = 1; +pub const KERN_KDDFLAGS: c_int = 2; +pub const KERN_KDENABLE: c_int = 3; +pub const KERN_KDSETBUF: c_int = 4; +pub const KERN_KDGETBUF: c_int = 5; +pub const KERN_KDSETUP: c_int = 6; +pub const KERN_KDREMOVE: c_int = 7; +pub const KERN_KDSETREG: c_int = 8; +pub const KERN_KDGETREG: c_int = 9; +pub const KERN_KDREADTR: c_int = 10; +pub const KERN_KDPIDTR: c_int = 11; +pub const KERN_KDTHRMAP: c_int = 12; +pub const KERN_KDPIDEX: c_int = 14; +pub const KERN_KDSETRTCDEC: c_int = 15; +pub const KERN_KDGETENTROPY: c_int = 16; +pub const KERN_KDWRITETR: c_int = 17; +pub const KERN_KDWRITEMAP: c_int = 18; #[doc(hidden)] #[deprecated(since = "0.2.49", note = "Removed in MacOSX 10.12")] -pub const KERN_KDENABLE_BG_TRACE: ::c_int = 19; +pub const KERN_KDENABLE_BG_TRACE: c_int = 19; #[doc(hidden)] #[deprecated(since = "0.2.49", note = "Removed in MacOSX 10.12")] -pub const KERN_KDDISABLE_BG_TRACE: ::c_int = 20; -pub const KERN_KDREADCURTHRMAP: ::c_int = 21; -pub const KERN_KDSET_TYPEFILTER: ::c_int = 22; -pub const KERN_KDBUFWAIT: ::c_int = 23; -pub const KERN_KDCPUMAP: ::c_int = 24; -pub const KERN_PROC_ALL: ::c_int = 0; -pub const KERN_PROC_PID: ::c_int = 1; -pub const KERN_PROC_PGRP: ::c_int = 2; -pub const KERN_PROC_SESSION: ::c_int = 3; -pub const KERN_PROC_TTY: ::c_int = 4; -pub const KERN_PROC_UID: ::c_int = 5; -pub const KERN_PROC_RUID: ::c_int = 6; -pub const KERN_PROC_LCID: ::c_int = 7; -pub const KERN_SUCCESS: ::c_int = 0; -pub const KERN_INVALID_ADDRESS: ::c_int = 1; -pub const KERN_PROTECTION_FAILURE: ::c_int = 2; -pub const KERN_NO_SPACE: ::c_int = 3; -pub const KERN_INVALID_ARGUMENT: ::c_int = 4; -pub const KERN_FAILURE: ::c_int = 5; -pub const KERN_RESOURCE_SHORTAGE: ::c_int = 6; -pub const KERN_NOT_RECEIVER: ::c_int = 7; -pub const KERN_NO_ACCESS: ::c_int = 8; -pub const KERN_MEMORY_FAILURE: ::c_int = 9; -pub const KERN_MEMORY_ERROR: ::c_int = 10; -pub const KERN_ALREADY_IN_SET: ::c_int = 11; -pub const KERN_NOT_IN_SET: ::c_int = 12; -pub const KERN_NAME_EXISTS: ::c_int = 13; -pub const KERN_ABORTED: ::c_int = 14; -pub const KERN_INVALID_NAME: ::c_int = 15; -pub const KERN_INVALID_TASK: ::c_int = 16; -pub const KERN_INVALID_RIGHT: ::c_int = 17; -pub const KERN_INVALID_VALUE: ::c_int = 18; -pub const KERN_UREFS_OVERFLOW: ::c_int = 19; -pub const KERN_INVALID_CAPABILITY: ::c_int = 20; -pub const KERN_RIGHT_EXISTS: ::c_int = 21; -pub const KERN_INVALID_HOST: ::c_int = 22; -pub const KERN_MEMORY_PRESENT: ::c_int = 23; -pub const KERN_MEMORY_DATA_MOVED: ::c_int = 24; -pub const KERN_MEMORY_RESTART_COPY: ::c_int = 25; -pub const KERN_INVALID_PROCESSOR_SET: ::c_int = 26; -pub const KERN_POLICY_LIMIT: ::c_int = 27; -pub const KERN_INVALID_POLICY: ::c_int = 28; -pub const KERN_INVALID_OBJECT: ::c_int = 29; -pub const KERN_ALREADY_WAITING: ::c_int = 30; -pub const KERN_DEFAULT_SET: ::c_int = 31; -pub const KERN_EXCEPTION_PROTECTED: ::c_int = 32; -pub const KERN_INVALID_LEDGER: ::c_int = 33; -pub const KERN_INVALID_MEMORY_CONTROL: ::c_int = 34; -pub const KERN_INVALID_SECURITY: ::c_int = 35; -pub const KERN_NOT_DEPRESSED: ::c_int = 36; -pub const KERN_TERMINATED: ::c_int = 37; -pub const KERN_LOCK_SET_DESTROYED: ::c_int = 38; -pub const KERN_LOCK_UNSTABLE: ::c_int = 39; -pub const KERN_LOCK_OWNED: ::c_int = 40; -pub const KERN_LOCK_OWNED_SELF: ::c_int = 41; -pub const KERN_SEMAPHORE_DESTROYED: ::c_int = 42; -pub const KERN_RPC_SERVER_TERMINATED: ::c_int = 43; -pub const KERN_RPC_TERMINATE_ORPHAN: ::c_int = 44; -pub const KERN_RPC_CONTINUE_ORPHAN: ::c_int = 45; -pub const KERN_NOT_SUPPORTED: ::c_int = 46; -pub const KERN_NODE_DOWN: ::c_int = 47; -pub const KERN_NOT_WAITING: ::c_int = 48; -pub const KERN_OPERATION_TIMED_OUT: ::c_int = 49; -pub const KERN_CODESIGN_ERROR: ::c_int = 50; -pub const KERN_POLICY_STATIC: ::c_int = 51; -pub const KERN_INSUFFICIENT_BUFFER_SIZE: ::c_int = 52; -pub const KIPC_MAXSOCKBUF: ::c_int = 1; -pub const KIPC_SOCKBUF_WASTE: ::c_int = 2; -pub const KIPC_SOMAXCONN: ::c_int = 3; -pub const KIPC_MAX_LINKHDR: ::c_int = 4; -pub const KIPC_MAX_PROTOHDR: ::c_int = 5; -pub const KIPC_MAX_HDR: ::c_int = 6; -pub const KIPC_MAX_DATALEN: ::c_int = 7; -pub const KIPC_MBSTAT: ::c_int = 8; -pub const KIPC_NMBCLUSTERS: ::c_int = 9; -pub const KIPC_SOQLIMITCOMPAT: ::c_int = 10; -pub const VM_METER: ::c_int = 1; -pub const VM_LOADAVG: ::c_int = 2; -pub const VM_MACHFACTOR: ::c_int = 4; -pub const VM_SWAPUSAGE: ::c_int = 5; -pub const VM_MAXID: ::c_int = 6; -pub const VM_PROT_NONE: ::vm_prot_t = 0x00; -pub const VM_PROT_READ: ::vm_prot_t = 0x01; -pub const VM_PROT_WRITE: ::vm_prot_t = 0x02; -pub const VM_PROT_EXECUTE: ::vm_prot_t = 0x04; -pub const MEMORY_OBJECT_NULL: ::memory_object_t = 0; -pub const HW_MACHINE: ::c_int = 1; -pub const HW_MODEL: ::c_int = 2; -pub const HW_NCPU: ::c_int = 3; -pub const HW_BYTEORDER: ::c_int = 4; -pub const HW_PHYSMEM: ::c_int = 5; -pub const HW_USERMEM: ::c_int = 6; -pub const HW_PAGESIZE: ::c_int = 7; -pub const HW_DISKNAMES: ::c_int = 8; -pub const HW_DISKSTATS: ::c_int = 9; -pub const HW_EPOCH: ::c_int = 10; -pub const HW_FLOATINGPT: ::c_int = 11; -pub const HW_MACHINE_ARCH: ::c_int = 12; -pub const HW_VECTORUNIT: ::c_int = 13; -pub const HW_BUS_FREQ: ::c_int = 14; -pub const HW_CPU_FREQ: ::c_int = 15; -pub const HW_CACHELINE: ::c_int = 16; -pub const HW_L1ICACHESIZE: ::c_int = 17; -pub const HW_L1DCACHESIZE: ::c_int = 18; -pub const HW_L2SETTINGS: ::c_int = 19; -pub const HW_L2CACHESIZE: ::c_int = 20; -pub const HW_L3SETTINGS: ::c_int = 21; -pub const HW_L3CACHESIZE: ::c_int = 22; -pub const HW_TB_FREQ: ::c_int = 23; -pub const HW_MEMSIZE: ::c_int = 24; -pub const HW_AVAILCPU: ::c_int = 25; -pub const HW_TARGET: ::c_int = 26; -pub const HW_PRODUCT: ::c_int = 27; -pub const HW_MAXID: ::c_int = 28; -pub const USER_CS_PATH: ::c_int = 1; -pub const USER_BC_BASE_MAX: ::c_int = 2; -pub const USER_BC_DIM_MAX: ::c_int = 3; -pub const USER_BC_SCALE_MAX: ::c_int = 4; -pub const USER_BC_STRING_MAX: ::c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6; -pub const USER_EXPR_NEST_MAX: ::c_int = 7; -pub const USER_LINE_MAX: ::c_int = 8; -pub const USER_RE_DUP_MAX: ::c_int = 9; -pub const USER_POSIX2_VERSION: ::c_int = 10; -pub const USER_POSIX2_C_BIND: ::c_int = 11; -pub const USER_POSIX2_C_DEV: ::c_int = 12; -pub const USER_POSIX2_CHAR_TERM: ::c_int = 13; -pub const USER_POSIX2_FORT_DEV: ::c_int = 14; -pub const USER_POSIX2_FORT_RUN: ::c_int = 15; -pub const USER_POSIX2_LOCALEDEF: ::c_int = 16; -pub const USER_POSIX2_SW_DEV: ::c_int = 17; -pub const USER_POSIX2_UPE: ::c_int = 18; -pub const USER_STREAM_MAX: ::c_int = 19; -pub const USER_TZNAME_MAX: ::c_int = 20; -pub const USER_MAXID: ::c_int = 21; -pub const CTL_DEBUG_NAME: ::c_int = 0; -pub const CTL_DEBUG_VALUE: ::c_int = 1; -pub const CTL_DEBUG_MAXID: ::c_int = 20; - -pub const PRIO_DARWIN_THREAD: ::c_int = 3; -pub const PRIO_DARWIN_PROCESS: ::c_int = 4; -pub const PRIO_DARWIN_BG: ::c_int = 0x1000; -pub const PRIO_DARWIN_NONUI: ::c_int = 0x1001; - -pub const SEM_FAILED: *mut sem_t = -1isize as *mut ::sem_t; - -pub const AI_PASSIVE: ::c_int = 0x00000001; -pub const AI_CANONNAME: ::c_int = 0x00000002; -pub const AI_NUMERICHOST: ::c_int = 0x00000004; -pub const AI_NUMERICSERV: ::c_int = 0x00001000; -pub const AI_MASK: ::c_int = +pub const KERN_KDDISABLE_BG_TRACE: c_int = 20; +pub const KERN_KDREADCURTHRMAP: c_int = 21; +pub const KERN_KDSET_TYPEFILTER: c_int = 22; +pub const KERN_KDBUFWAIT: c_int = 23; +pub const KERN_KDCPUMAP: c_int = 24; +pub const KERN_PROC_ALL: c_int = 0; +pub const KERN_PROC_PID: c_int = 1; +pub const KERN_PROC_PGRP: c_int = 2; +pub const KERN_PROC_SESSION: c_int = 3; +pub const KERN_PROC_TTY: c_int = 4; +pub const KERN_PROC_UID: c_int = 5; +pub const KERN_PROC_RUID: c_int = 6; +pub const KERN_PROC_LCID: c_int = 7; +pub const KERN_SUCCESS: c_int = 0; +pub const KERN_INVALID_ADDRESS: c_int = 1; +pub const KERN_PROTECTION_FAILURE: c_int = 2; +pub const KERN_NO_SPACE: c_int = 3; +pub const KERN_INVALID_ARGUMENT: c_int = 4; +pub const KERN_FAILURE: c_int = 5; +pub const KERN_RESOURCE_SHORTAGE: c_int = 6; +pub const KERN_NOT_RECEIVER: c_int = 7; +pub const KERN_NO_ACCESS: c_int = 8; +pub const KERN_MEMORY_FAILURE: c_int = 9; +pub const KERN_MEMORY_ERROR: c_int = 10; +pub const KERN_ALREADY_IN_SET: c_int = 11; +pub const KERN_NOT_IN_SET: c_int = 12; +pub const KERN_NAME_EXISTS: c_int = 13; +pub const KERN_ABORTED: c_int = 14; +pub const KERN_INVALID_NAME: c_int = 15; +pub const KERN_INVALID_TASK: c_int = 16; +pub const KERN_INVALID_RIGHT: c_int = 17; +pub const KERN_INVALID_VALUE: c_int = 18; +pub const KERN_UREFS_OVERFLOW: c_int = 19; +pub const KERN_INVALID_CAPABILITY: c_int = 20; +pub const KERN_RIGHT_EXISTS: c_int = 21; +pub const KERN_INVALID_HOST: c_int = 22; +pub const KERN_MEMORY_PRESENT: c_int = 23; +pub const KERN_MEMORY_DATA_MOVED: c_int = 24; +pub const KERN_MEMORY_RESTART_COPY: c_int = 25; +pub const KERN_INVALID_PROCESSOR_SET: c_int = 26; +pub const KERN_POLICY_LIMIT: c_int = 27; +pub const KERN_INVALID_POLICY: c_int = 28; +pub const KERN_INVALID_OBJECT: c_int = 29; +pub const KERN_ALREADY_WAITING: c_int = 30; +pub const KERN_DEFAULT_SET: c_int = 31; +pub const KERN_EXCEPTION_PROTECTED: c_int = 32; +pub const KERN_INVALID_LEDGER: c_int = 33; +pub const KERN_INVALID_MEMORY_CONTROL: c_int = 34; +pub const KERN_INVALID_SECURITY: c_int = 35; +pub const KERN_NOT_DEPRESSED: c_int = 36; +pub const KERN_TERMINATED: c_int = 37; +pub const KERN_LOCK_SET_DESTROYED: c_int = 38; +pub const KERN_LOCK_UNSTABLE: c_int = 39; +pub const KERN_LOCK_OWNED: c_int = 40; +pub const KERN_LOCK_OWNED_SELF: c_int = 41; +pub const KERN_SEMAPHORE_DESTROYED: c_int = 42; +pub const KERN_RPC_SERVER_TERMINATED: c_int = 43; +pub const KERN_RPC_TERMINATE_ORPHAN: c_int = 44; +pub const KERN_RPC_CONTINUE_ORPHAN: c_int = 45; +pub const KERN_NOT_SUPPORTED: c_int = 46; +pub const KERN_NODE_DOWN: c_int = 47; +pub const KERN_NOT_WAITING: c_int = 48; +pub const KERN_OPERATION_TIMED_OUT: c_int = 49; +pub const KERN_CODESIGN_ERROR: c_int = 50; +pub const KERN_POLICY_STATIC: c_int = 51; +pub const KERN_INSUFFICIENT_BUFFER_SIZE: c_int = 52; +pub const KIPC_MAXSOCKBUF: c_int = 1; +pub const KIPC_SOCKBUF_WASTE: c_int = 2; +pub const KIPC_SOMAXCONN: c_int = 3; +pub const KIPC_MAX_LINKHDR: c_int = 4; +pub const KIPC_MAX_PROTOHDR: c_int = 5; +pub const KIPC_MAX_HDR: c_int = 6; +pub const KIPC_MAX_DATALEN: c_int = 7; +pub const KIPC_MBSTAT: c_int = 8; +pub const KIPC_NMBCLUSTERS: c_int = 9; +pub const KIPC_SOQLIMITCOMPAT: c_int = 10; +pub const VM_METER: c_int = 1; +pub const VM_LOADAVG: c_int = 2; +pub const VM_MACHFACTOR: c_int = 4; +pub const VM_SWAPUSAGE: c_int = 5; +pub const VM_MAXID: c_int = 6; +pub const VM_PROT_NONE: crate::vm_prot_t = 0x00; +pub const VM_PROT_READ: crate::vm_prot_t = 0x01; +pub const VM_PROT_WRITE: crate::vm_prot_t = 0x02; +pub const VM_PROT_EXECUTE: crate::vm_prot_t = 0x04; +pub const MEMORY_OBJECT_NULL: crate::memory_object_t = 0; +pub const HW_MACHINE: c_int = 1; +pub const HW_MODEL: c_int = 2; +pub const HW_NCPU: c_int = 3; +pub const HW_BYTEORDER: c_int = 4; +pub const HW_PHYSMEM: c_int = 5; +pub const HW_USERMEM: c_int = 6; +pub const HW_PAGESIZE: c_int = 7; +pub const HW_DISKNAMES: c_int = 8; +pub const HW_DISKSTATS: c_int = 9; +pub const HW_EPOCH: c_int = 10; +pub const HW_FLOATINGPT: c_int = 11; +pub const HW_MACHINE_ARCH: c_int = 12; +pub const HW_VECTORUNIT: c_int = 13; +pub const HW_BUS_FREQ: c_int = 14; +pub const HW_CPU_FREQ: c_int = 15; +pub const HW_CACHELINE: c_int = 16; +pub const HW_L1ICACHESIZE: c_int = 17; +pub const HW_L1DCACHESIZE: c_int = 18; +pub const HW_L2SETTINGS: c_int = 19; +pub const HW_L2CACHESIZE: c_int = 20; +pub const HW_L3SETTINGS: c_int = 21; +pub const HW_L3CACHESIZE: c_int = 22; +pub const HW_TB_FREQ: c_int = 23; +pub const HW_MEMSIZE: c_int = 24; +pub const HW_AVAILCPU: c_int = 25; +pub const HW_TARGET: c_int = 26; +pub const HW_PRODUCT: c_int = 27; +pub const HW_MAXID: c_int = 28; +pub const USER_CS_PATH: c_int = 1; +pub const USER_BC_BASE_MAX: c_int = 2; +pub const USER_BC_DIM_MAX: c_int = 3; +pub const USER_BC_SCALE_MAX: c_int = 4; +pub const USER_BC_STRING_MAX: c_int = 5; +pub const USER_COLL_WEIGHTS_MAX: c_int = 6; +pub const USER_EXPR_NEST_MAX: c_int = 7; +pub const USER_LINE_MAX: c_int = 8; +pub const USER_RE_DUP_MAX: c_int = 9; +pub const USER_POSIX2_VERSION: c_int = 10; +pub const USER_POSIX2_C_BIND: c_int = 11; +pub const USER_POSIX2_C_DEV: c_int = 12; +pub const USER_POSIX2_CHAR_TERM: c_int = 13; +pub const USER_POSIX2_FORT_DEV: c_int = 14; +pub const USER_POSIX2_FORT_RUN: c_int = 15; +pub const USER_POSIX2_LOCALEDEF: c_int = 16; +pub const USER_POSIX2_SW_DEV: c_int = 17; +pub const USER_POSIX2_UPE: c_int = 18; +pub const USER_STREAM_MAX: c_int = 19; +pub const USER_TZNAME_MAX: c_int = 20; +pub const USER_MAXID: c_int = 21; +pub const CTL_DEBUG_NAME: c_int = 0; +pub const CTL_DEBUG_VALUE: c_int = 1; +pub const CTL_DEBUG_MAXID: c_int = 20; + +pub const PRIO_DARWIN_THREAD: c_int = 3; +pub const PRIO_DARWIN_PROCESS: c_int = 4; +pub const PRIO_DARWIN_BG: c_int = 0x1000; +pub const PRIO_DARWIN_NONUI: c_int = 0x1001; + +pub const SEM_FAILED: *mut sem_t = -1isize as *mut crate::sem_t; + +pub const AI_PASSIVE: c_int = 0x00000001; +pub const AI_CANONNAME: c_int = 0x00000002; +pub const AI_NUMERICHOST: c_int = 0x00000004; +pub const AI_NUMERICSERV: c_int = 0x00001000; +pub const AI_MASK: c_int = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | AI_ADDRCONFIG; -pub const AI_ALL: ::c_int = 0x00000100; -pub const AI_V4MAPPED_CFG: ::c_int = 0x00000200; -pub const AI_ADDRCONFIG: ::c_int = 0x00000400; -pub const AI_V4MAPPED: ::c_int = 0x00000800; -pub const AI_DEFAULT: ::c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; -pub const AI_UNUSABLE: ::c_int = 0x10000000; - -pub const SIGEV_NONE: ::c_int = 0; -pub const SIGEV_SIGNAL: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 3; - -pub const AIO_CANCELED: ::c_int = 2; -pub const AIO_NOTCANCELED: ::c_int = 4; -pub const AIO_ALLDONE: ::c_int = 1; +pub const AI_ALL: c_int = 0x00000100; +pub const AI_V4MAPPED_CFG: c_int = 0x00000200; +pub const AI_ADDRCONFIG: c_int = 0x00000400; +pub const AI_V4MAPPED: c_int = 0x00000800; +pub const AI_DEFAULT: c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; +pub const AI_UNUSABLE: c_int = 0x10000000; + +pub const SIGEV_NONE: c_int = 0; +pub const SIGEV_SIGNAL: c_int = 1; +pub const SIGEV_THREAD: c_int = 3; + +pub const AIO_CANCELED: c_int = 2; +pub const AIO_NOTCANCELED: c_int = 4; +pub const AIO_ALLDONE: c_int = 1; #[deprecated( since = "0.2.64", note = "Can vary at runtime. Use sysconf(3) instead" )] -pub const AIO_LISTIO_MAX: ::c_int = 16; -pub const LIO_NOP: ::c_int = 0; -pub const LIO_WRITE: ::c_int = 2; -pub const LIO_READ: ::c_int = 1; -pub const LIO_WAIT: ::c_int = 2; -pub const LIO_NOWAIT: ::c_int = 1; - -pub const WEXITED: ::c_int = 0x00000004; -pub const WSTOPPED: ::c_int = 0x00000008; -pub const WCONTINUED: ::c_int = 0x00000010; -pub const WNOWAIT: ::c_int = 0x00000020; +pub const AIO_LISTIO_MAX: c_int = 16; +pub const LIO_NOP: c_int = 0; +pub const LIO_WRITE: c_int = 2; +pub const LIO_READ: c_int = 1; +pub const LIO_WAIT: c_int = 2; +pub const LIO_NOWAIT: c_int = 1; + +pub const WEXITED: c_int = 0x00000004; +pub const WSTOPPED: c_int = 0x00000008; +pub const WCONTINUED: c_int = 0x00000010; +pub const WNOWAIT: c_int = 0x00000020; pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; @@ -4961,79 +4967,79 @@ pub const P_PGID: idtype_t = 2; pub const UTIME_OMIT: c_long = -2; pub const UTIME_NOW: c_long = -1; -pub const XATTR_NOFOLLOW: ::c_int = 0x0001; -pub const XATTR_CREATE: ::c_int = 0x0002; -pub const XATTR_REPLACE: ::c_int = 0x0004; -pub const XATTR_NOSECURITY: ::c_int = 0x0008; -pub const XATTR_NODEFAULT: ::c_int = 0x0010; -pub const XATTR_SHOWCOMPRESSION: ::c_int = 0x0020; +pub const XATTR_NOFOLLOW: c_int = 0x0001; +pub const XATTR_CREATE: c_int = 0x0002; +pub const XATTR_REPLACE: c_int = 0x0004; +pub const XATTR_NOSECURITY: c_int = 0x0008; +pub const XATTR_NODEFAULT: c_int = 0x0010; +pub const XATTR_SHOWCOMPRESSION: c_int = 0x0020; -pub const NET_RT_IFLIST2: ::c_int = 0x0006; +pub const NET_RT_IFLIST2: c_int = 0x0006; // net/route.h -pub const RTF_DELCLONE: ::c_int = 0x80; -pub const RTF_CLONING: ::c_int = 0x100; -pub const RTF_XRESOLVE: ::c_int = 0x200; -pub const RTF_LLINFO: ::c_int = 0x400; -pub const RTF_NOIFREF: ::c_int = 0x2000; -pub const RTF_PRCLONING: ::c_int = 0x10000; -pub const RTF_WASCLONED: ::c_int = 0x20000; -pub const RTF_PROTO3: ::c_int = 0x40000; -pub const RTF_PINNED: ::c_int = 0x100000; -pub const RTF_LOCAL: ::c_int = 0x200000; -pub const RTF_BROADCAST: ::c_int = 0x400000; -pub const RTF_MULTICAST: ::c_int = 0x800000; -pub const RTF_IFSCOPE: ::c_int = 0x1000000; -pub const RTF_CONDEMNED: ::c_int = 0x2000000; -pub const RTF_IFREF: ::c_int = 0x4000000; -pub const RTF_PROXY: ::c_int = 0x8000000; -pub const RTF_ROUTER: ::c_int = 0x10000000; -pub const RTF_DEAD: ::c_int = 0x20000000; -pub const RTF_GLOBAL: ::c_int = 0x40000000; - -pub const RTM_VERSION: ::c_int = 5; +pub const RTF_DELCLONE: c_int = 0x80; +pub const RTF_CLONING: c_int = 0x100; +pub const RTF_XRESOLVE: c_int = 0x200; +pub const RTF_LLINFO: c_int = 0x400; +pub const RTF_NOIFREF: c_int = 0x2000; +pub const RTF_PRCLONING: c_int = 0x10000; +pub const RTF_WASCLONED: c_int = 0x20000; +pub const RTF_PROTO3: c_int = 0x40000; +pub const RTF_PINNED: c_int = 0x100000; +pub const RTF_LOCAL: c_int = 0x200000; +pub const RTF_BROADCAST: c_int = 0x400000; +pub const RTF_MULTICAST: c_int = 0x800000; +pub const RTF_IFSCOPE: c_int = 0x1000000; +pub const RTF_CONDEMNED: c_int = 0x2000000; +pub const RTF_IFREF: c_int = 0x4000000; +pub const RTF_PROXY: c_int = 0x8000000; +pub const RTF_ROUTER: c_int = 0x10000000; +pub const RTF_DEAD: c_int = 0x20000000; +pub const RTF_GLOBAL: c_int = 0x40000000; + +pub const RTM_VERSION: c_int = 5; // Message types -pub const RTM_LOCK: ::c_int = 0x8; -pub const RTM_OLDADD: ::c_int = 0x9; -pub const RTM_OLDDEL: ::c_int = 0xa; -pub const RTM_RESOLVE: ::c_int = 0xb; -pub const RTM_NEWADDR: ::c_int = 0xc; -pub const RTM_DELADDR: ::c_int = 0xd; -pub const RTM_IFINFO: ::c_int = 0xe; -pub const RTM_NEWMADDR: ::c_int = 0xf; -pub const RTM_DELMADDR: ::c_int = 0x10; -pub const RTM_IFINFO2: ::c_int = 0x12; -pub const RTM_NEWMADDR2: ::c_int = 0x13; -pub const RTM_GET2: ::c_int = 0x14; +pub const RTM_LOCK: c_int = 0x8; +pub const RTM_OLDADD: c_int = 0x9; +pub const RTM_OLDDEL: c_int = 0xa; +pub const RTM_RESOLVE: c_int = 0xb; +pub const RTM_NEWADDR: c_int = 0xc; +pub const RTM_DELADDR: c_int = 0xd; +pub const RTM_IFINFO: c_int = 0xe; +pub const RTM_NEWMADDR: c_int = 0xf; +pub const RTM_DELMADDR: c_int = 0x10; +pub const RTM_IFINFO2: c_int = 0x12; +pub const RTM_NEWMADDR2: c_int = 0x13; +pub const RTM_GET2: c_int = 0x14; // Bitmask values for rtm_inits and rmx_locks. -pub const RTV_MTU: ::c_int = 0x1; -pub const RTV_HOPCOUNT: ::c_int = 0x2; -pub const RTV_EXPIRE: ::c_int = 0x4; -pub const RTV_RPIPE: ::c_int = 0x8; -pub const RTV_SPIPE: ::c_int = 0x10; -pub const RTV_SSTHRESH: ::c_int = 0x20; -pub const RTV_RTT: ::c_int = 0x40; -pub const RTV_RTTVAR: ::c_int = 0x80; - -pub const RTAX_MAX: ::c_int = 8; - -pub const KERN_PROCARGS2: ::c_int = 49; - -pub const PROC_PIDTASKALLINFO: ::c_int = 2; -pub const PROC_PIDTBSDINFO: ::c_int = 3; -pub const PROC_PIDTASKINFO: ::c_int = 4; -pub const PROC_PIDTHREADINFO: ::c_int = 5; -pub const PROC_PIDVNODEPATHINFO: ::c_int = 9; -pub const PROC_PIDPATHINFO_MAXSIZE: ::c_int = 4096; -pub const PROC_CSM_ALL: ::c_uint = 0x0001; -pub const PROC_CSM_NOSMT: ::c_uint = 0x0002; -pub const PROC_CSM_TECS: ::c_uint = 0x0004; +pub const RTV_MTU: c_int = 0x1; +pub const RTV_HOPCOUNT: c_int = 0x2; +pub const RTV_EXPIRE: c_int = 0x4; +pub const RTV_RPIPE: c_int = 0x8; +pub const RTV_SPIPE: c_int = 0x10; +pub const RTV_SSTHRESH: c_int = 0x20; +pub const RTV_RTT: c_int = 0x40; +pub const RTV_RTTVAR: c_int = 0x80; + +pub const RTAX_MAX: c_int = 8; + +pub const KERN_PROCARGS2: c_int = 49; + +pub const PROC_PIDTASKALLINFO: c_int = 2; +pub const PROC_PIDTBSDINFO: c_int = 3; +pub const PROC_PIDTASKINFO: c_int = 4; +pub const PROC_PIDTHREADINFO: c_int = 5; +pub const PROC_PIDVNODEPATHINFO: c_int = 9; +pub const PROC_PIDPATHINFO_MAXSIZE: c_int = 4096; +pub const PROC_CSM_ALL: c_uint = 0x0001; +pub const PROC_CSM_NOSMT: c_uint = 0x0002; +pub const PROC_CSM_TECS: c_uint = 0x0004; pub const MAXCOMLEN: usize = 16; pub const MAXTHREADNAMESIZE: usize = 64; -pub const XUCRED_VERSION: ::c_uint = 0; +pub const XUCRED_VERSION: c_uint = 0; pub const LC_SEGMENT: u32 = 0x1; pub const LC_SEGMENT_64: u32 = 0x19; @@ -5042,152 +5048,152 @@ pub const MH_MAGIC: u32 = 0xfeedface; pub const MH_MAGIC_64: u32 = 0xfeedfacf; // net/if_utun.h -pub const UTUN_OPT_FLAGS: ::c_int = 1; -pub const UTUN_OPT_IFNAME: ::c_int = 2; +pub const UTUN_OPT_FLAGS: c_int = 1; +pub const UTUN_OPT_IFNAME: c_int = 2; // net/bpf.h -pub const DLT_NULL: ::c_uint = 0; // no link-layer encapsulation -pub const DLT_EN10MB: ::c_uint = 1; // Ethernet (10Mb) -pub const DLT_EN3MB: ::c_uint = 2; // Experimental Ethernet (3Mb) -pub const DLT_AX25: ::c_uint = 3; // Amateur Radio AX.25 -pub const DLT_PRONET: ::c_uint = 4; // Proteon ProNET Token Ring -pub const DLT_CHAOS: ::c_uint = 5; // Chaos -pub const DLT_IEEE802: ::c_uint = 6; // IEEE 802 Networks -pub const DLT_ARCNET: ::c_uint = 7; // ARCNET -pub const DLT_SLIP: ::c_uint = 8; // Serial Line IP -pub const DLT_PPP: ::c_uint = 9; // Point-to-point Protocol -pub const DLT_FDDI: ::c_uint = 10; // FDDI -pub const DLT_ATM_RFC1483: ::c_uint = 11; // LLC/SNAP encapsulated atm -pub const DLT_RAW: ::c_uint = 12; // raw IP -pub const DLT_LOOP: ::c_uint = 108; +pub const DLT_NULL: c_uint = 0; // no link-layer encapsulation +pub const DLT_EN10MB: c_uint = 1; // Ethernet (10Mb) +pub const DLT_EN3MB: c_uint = 2; // Experimental Ethernet (3Mb) +pub const DLT_AX25: c_uint = 3; // Amateur Radio AX.25 +pub const DLT_PRONET: c_uint = 4; // Proteon ProNET Token Ring +pub const DLT_CHAOS: c_uint = 5; // Chaos +pub const DLT_IEEE802: c_uint = 6; // IEEE 802 Networks +pub const DLT_ARCNET: c_uint = 7; // ARCNET +pub const DLT_SLIP: c_uint = 8; // Serial Line IP +pub const DLT_PPP: c_uint = 9; // Point-to-point Protocol +pub const DLT_FDDI: c_uint = 10; // FDDI +pub const DLT_ATM_RFC1483: c_uint = 11; // LLC/SNAP encapsulated atm +pub const DLT_RAW: c_uint = 12; // raw IP +pub const DLT_LOOP: c_uint = 108; // https://github.com/apple/darwin-xnu/blob/HEAD/bsd/net/bpf.h#L100 // sizeof(i32) -pub const BPF_ALIGNMENT: ::c_int = 4; +pub const BPF_ALIGNMENT: c_int = 4; // sys/mount.h -pub const MNT_NODEV: ::c_int = 0x00000010; -pub const MNT_UNION: ::c_int = 0x00000020; -pub const MNT_CPROTECT: ::c_int = 0x00000080; +pub const MNT_NODEV: c_int = 0x00000010; +pub const MNT_UNION: c_int = 0x00000020; +pub const MNT_CPROTECT: c_int = 0x00000080; // MAC labeled / "quarantined" flag -pub const MNT_QUARANTINE: ::c_int = 0x00000400; +pub const MNT_QUARANTINE: c_int = 0x00000400; // Flags set by internal operations. -pub const MNT_LOCAL: ::c_int = 0x00001000; -pub const MNT_QUOTA: ::c_int = 0x00002000; -pub const MNT_ROOTFS: ::c_int = 0x00004000; -pub const MNT_DOVOLFS: ::c_int = 0x00008000; - -pub const MNT_DONTBROWSE: ::c_int = 0x00100000; -pub const MNT_IGNORE_OWNERSHIP: ::c_int = 0x00200000; -pub const MNT_AUTOMOUNTED: ::c_int = 0x00400000; -pub const MNT_JOURNALED: ::c_int = 0x00800000; -pub const MNT_NOUSERXATTR: ::c_int = 0x01000000; -pub const MNT_DEFWRITE: ::c_int = 0x02000000; -pub const MNT_MULTILABEL: ::c_int = 0x04000000; -pub const MNT_NOATIME: ::c_int = 0x10000000; -pub const MNT_SNAPSHOT: ::c_int = 0x40000000; +pub const MNT_LOCAL: c_int = 0x00001000; +pub const MNT_QUOTA: c_int = 0x00002000; +pub const MNT_ROOTFS: c_int = 0x00004000; +pub const MNT_DOVOLFS: c_int = 0x00008000; + +pub const MNT_DONTBROWSE: c_int = 0x00100000; +pub const MNT_IGNORE_OWNERSHIP: c_int = 0x00200000; +pub const MNT_AUTOMOUNTED: c_int = 0x00400000; +pub const MNT_JOURNALED: c_int = 0x00800000; +pub const MNT_NOUSERXATTR: c_int = 0x01000000; +pub const MNT_DEFWRITE: c_int = 0x02000000; +pub const MNT_MULTILABEL: c_int = 0x04000000; +pub const MNT_NOATIME: c_int = 0x10000000; +pub const MNT_SNAPSHOT: c_int = 0x40000000; // External filesystem command modifier flags. -pub const MNT_NOBLOCK: ::c_int = 0x00020000; +pub const MNT_NOBLOCK: c_int = 0x00020000; // sys/spawn.h: -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x0001; -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x0002; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x0004; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x0008; -pub const POSIX_SPAWN_SETEXEC: ::c_short = 0x0040; -pub const POSIX_SPAWN_START_SUSPENDED: ::c_short = 0x0080; -pub const POSIX_SPAWN_CLOEXEC_DEFAULT: ::c_short = 0x4000; +pub const POSIX_SPAWN_RESETIDS: c_short = 0x0001; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x0002; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x0004; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x0008; +pub const POSIX_SPAWN_SETEXEC: c_short = 0x0040; +pub const POSIX_SPAWN_START_SUSPENDED: c_short = 0x0080; +pub const POSIX_SPAWN_CLOEXEC_DEFAULT: c_short = 0x4000; // sys/ipc.h: -pub const IPC_CREAT: ::c_int = 0x200; -pub const IPC_EXCL: ::c_int = 0x400; -pub const IPC_NOWAIT: ::c_int = 0x800; +pub const IPC_CREAT: c_int = 0x200; +pub const IPC_EXCL: c_int = 0x400; +pub const IPC_NOWAIT: c_int = 0x800; pub const IPC_PRIVATE: key_t = 0; -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; -pub const IPC_R: ::c_int = 0x100; -pub const IPC_W: ::c_int = 0x80; -pub const IPC_M: ::c_int = 0x1000; +pub const IPC_R: c_int = 0x100; +pub const IPC_W: c_int = 0x80; +pub const IPC_M: c_int = 0x1000; // sys/sem.h -pub const SEM_UNDO: ::c_int = 0o10000; +pub const SEM_UNDO: c_int = 0o10000; -pub const GETNCNT: ::c_int = 3; -pub const GETPID: ::c_int = 4; -pub const GETVAL: ::c_int = 5; -pub const GETALL: ::c_int = 6; -pub const GETZCNT: ::c_int = 7; -pub const SETVAL: ::c_int = 8; -pub const SETALL: ::c_int = 9; +pub const GETNCNT: c_int = 3; +pub const GETPID: c_int = 4; +pub const GETVAL: c_int = 5; +pub const GETALL: c_int = 6; +pub const GETZCNT: c_int = 7; +pub const SETVAL: c_int = 8; +pub const SETALL: c_int = 9; // sys/shm.h -pub const SHM_RDONLY: ::c_int = 0x1000; -pub const SHM_RND: ::c_int = 0x2000; +pub const SHM_RDONLY: c_int = 0x1000; +pub const SHM_RND: c_int = 0x2000; #[cfg(target_arch = "aarch64")] -pub const SHMLBA: ::c_int = 16 * 1024; +pub const SHMLBA: c_int = 16 * 1024; #[cfg(not(target_arch = "aarch64"))] -pub const SHMLBA: ::c_int = 4096; -pub const SHM_R: ::c_int = IPC_R; -pub const SHM_W: ::c_int = IPC_W; +pub const SHMLBA: c_int = 4096; +pub const SHM_R: c_int = IPC_R; +pub const SHM_W: c_int = IPC_W; // Flags for chflags(2) -pub const UF_SETTABLE: ::c_uint = 0x0000ffff; -pub const UF_NODUMP: ::c_uint = 0x00000001; -pub const UF_IMMUTABLE: ::c_uint = 0x00000002; -pub const UF_APPEND: ::c_uint = 0x00000004; -pub const UF_OPAQUE: ::c_uint = 0x00000008; -pub const UF_COMPRESSED: ::c_uint = 0x00000020; -pub const UF_TRACKED: ::c_uint = 0x00000040; -pub const SF_SETTABLE: ::c_uint = 0xffff0000; -pub const SF_ARCHIVED: ::c_uint = 0x00010000; -pub const SF_IMMUTABLE: ::c_uint = 0x00020000; -pub const SF_APPEND: ::c_uint = 0x00040000; -pub const UF_HIDDEN: ::c_uint = 0x00008000; +pub const UF_SETTABLE: c_uint = 0x0000ffff; +pub const UF_NODUMP: c_uint = 0x00000001; +pub const UF_IMMUTABLE: c_uint = 0x00000002; +pub const UF_APPEND: c_uint = 0x00000004; +pub const UF_OPAQUE: c_uint = 0x00000008; +pub const UF_COMPRESSED: c_uint = 0x00000020; +pub const UF_TRACKED: c_uint = 0x00000040; +pub const SF_SETTABLE: c_uint = 0xffff0000; +pub const SF_ARCHIVED: c_uint = 0x00010000; +pub const SF_IMMUTABLE: c_uint = 0x00020000; +pub const SF_APPEND: c_uint = 0x00040000; +pub const UF_HIDDEN: c_uint = 0x00008000; // -pub const NTP_API: ::c_int = 4; -pub const MAXPHASE: ::c_long = 500000000; -pub const MAXFREQ: ::c_long = 500000; -pub const MINSEC: ::c_int = 256; -pub const MAXSEC: ::c_int = 2048; -pub const NANOSECOND: ::c_long = 1000000000; -pub const SCALE_PPM: ::c_int = 65; -pub const MAXTC: ::c_int = 10; -pub const MOD_OFFSET: ::c_uint = 0x0001; -pub const MOD_FREQUENCY: ::c_uint = 0x0002; -pub const MOD_MAXERROR: ::c_uint = 0x0004; -pub const MOD_ESTERROR: ::c_uint = 0x0008; -pub const MOD_STATUS: ::c_uint = 0x0010; -pub const MOD_TIMECONST: ::c_uint = 0x0020; -pub const MOD_PPSMAX: ::c_uint = 0x0040; -pub const MOD_TAI: ::c_uint = 0x0080; -pub const MOD_MICRO: ::c_uint = 0x1000; -pub const MOD_NANO: ::c_uint = 0x2000; -pub const MOD_CLKB: ::c_uint = 0x4000; -pub const MOD_CLKA: ::c_uint = 0x8000; -pub const STA_PLL: ::c_int = 0x0001; -pub const STA_PPSFREQ: ::c_int = 0x0002; -pub const STA_PPSTIME: ::c_int = 0x0004; -pub const STA_FLL: ::c_int = 0x0008; -pub const STA_INS: ::c_int = 0x0010; -pub const STA_DEL: ::c_int = 0x0020; -pub const STA_UNSYNC: ::c_int = 0x0040; -pub const STA_FREQHOLD: ::c_int = 0x0080; -pub const STA_PPSSIGNAL: ::c_int = 0x0100; -pub const STA_PPSJITTER: ::c_int = 0x0200; -pub const STA_PPSWANDER: ::c_int = 0x0400; -pub const STA_PPSERROR: ::c_int = 0x0800; -pub const STA_CLOCKERR: ::c_int = 0x1000; -pub const STA_NANO: ::c_int = 0x2000; -pub const STA_MODE: ::c_int = 0x4000; -pub const STA_CLK: ::c_int = 0x8000; -pub const STA_RONLY: ::c_int = STA_PPSSIGNAL +pub const NTP_API: c_int = 4; +pub const MAXPHASE: c_long = 500000000; +pub const MAXFREQ: c_long = 500000; +pub const MINSEC: c_int = 256; +pub const MAXSEC: c_int = 2048; +pub const NANOSECOND: c_long = 1000000000; +pub const SCALE_PPM: c_int = 65; +pub const MAXTC: c_int = 10; +pub const MOD_OFFSET: c_uint = 0x0001; +pub const MOD_FREQUENCY: c_uint = 0x0002; +pub const MOD_MAXERROR: c_uint = 0x0004; +pub const MOD_ESTERROR: c_uint = 0x0008; +pub const MOD_STATUS: c_uint = 0x0010; +pub const MOD_TIMECONST: c_uint = 0x0020; +pub const MOD_PPSMAX: c_uint = 0x0040; +pub const MOD_TAI: c_uint = 0x0080; +pub const MOD_MICRO: c_uint = 0x1000; +pub const MOD_NANO: c_uint = 0x2000; +pub const MOD_CLKB: c_uint = 0x4000; +pub const MOD_CLKA: c_uint = 0x8000; +pub const STA_PLL: c_int = 0x0001; +pub const STA_PPSFREQ: c_int = 0x0002; +pub const STA_PPSTIME: c_int = 0x0004; +pub const STA_FLL: c_int = 0x0008; +pub const STA_INS: c_int = 0x0010; +pub const STA_DEL: c_int = 0x0020; +pub const STA_UNSYNC: c_int = 0x0040; +pub const STA_FREQHOLD: c_int = 0x0080; +pub const STA_PPSSIGNAL: c_int = 0x0100; +pub const STA_PPSJITTER: c_int = 0x0200; +pub const STA_PPSWANDER: c_int = 0x0400; +pub const STA_PPSERROR: c_int = 0x0800; +pub const STA_CLOCKERR: c_int = 0x1000; +pub const STA_NANO: c_int = 0x2000; +pub const STA_MODE: c_int = 0x4000; +pub const STA_CLK: c_int = 0x8000; +pub const STA_RONLY: c_int = STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR @@ -5195,42 +5201,42 @@ pub const STA_RONLY: ::c_int = STA_PPSSIGNAL | STA_NANO | STA_MODE | STA_CLK; -pub const TIME_OK: ::c_int = 0; -pub const TIME_INS: ::c_int = 1; -pub const TIME_DEL: ::c_int = 2; -pub const TIME_OOP: ::c_int = 3; -pub const TIME_WAIT: ::c_int = 4; -pub const TIME_ERROR: ::c_int = 5; +pub const TIME_OK: c_int = 0; +pub const TIME_INS: c_int = 1; +pub const TIME_DEL: c_int = 2; +pub const TIME_OOP: c_int = 3; +pub const TIME_WAIT: c_int = 4; +pub const TIME_ERROR: c_int = 5; // -pub const MNT_WAIT: ::c_int = 1; -pub const MNT_NOWAIT: ::c_int = 2; +pub const MNT_WAIT: c_int = 1; +pub const MNT_NOWAIT: c_int = 2; // -pub const THREAD_STANDARD_POLICY: ::c_int = 1; -pub const THREAD_STANDARD_POLICY_COUNT: ::c_int = 0; -pub const THREAD_EXTENDED_POLICY: ::c_int = 1; -pub const THREAD_TIME_CONSTRAINT_POLICY: ::c_int = 2; -pub const THREAD_PRECEDENCE_POLICY: ::c_int = 3; -pub const THREAD_AFFINITY_POLICY: ::c_int = 4; -pub const THREAD_AFFINITY_TAG_NULL: ::c_int = 0; -pub const THREAD_BACKGROUND_POLICY: ::c_int = 5; -pub const THREAD_BACKGROUND_POLICY_DARWIN_BG: ::c_int = 0x1000; -pub const THREAD_LATENCY_QOS_POLICY: ::c_int = 7; -pub const THREAD_THROUGHPUT_QOS_POLICY: ::c_int = 8; +pub const THREAD_STANDARD_POLICY: c_int = 1; +pub const THREAD_STANDARD_POLICY_COUNT: c_int = 0; +pub const THREAD_EXTENDED_POLICY: c_int = 1; +pub const THREAD_TIME_CONSTRAINT_POLICY: c_int = 2; +pub const THREAD_PRECEDENCE_POLICY: c_int = 3; +pub const THREAD_AFFINITY_POLICY: c_int = 4; +pub const THREAD_AFFINITY_TAG_NULL: c_int = 0; +pub const THREAD_BACKGROUND_POLICY: c_int = 5; +pub const THREAD_BACKGROUND_POLICY_DARWIN_BG: c_int = 0x1000; +pub const THREAD_LATENCY_QOS_POLICY: c_int = 7; +pub const THREAD_THROUGHPUT_QOS_POLICY: c_int = 8; // -pub const TH_STATE_RUNNING: ::c_int = 1; -pub const TH_STATE_STOPPED: ::c_int = 2; -pub const TH_STATE_WAITING: ::c_int = 3; -pub const TH_STATE_UNINTERRUPTIBLE: ::c_int = 4; -pub const TH_STATE_HALTED: ::c_int = 5; -pub const TH_FLAGS_SWAPPED: ::c_int = 0x1; -pub const TH_FLAGS_IDLE: ::c_int = 0x2; -pub const TH_FLAGS_GLOBAL_FORCED_IDLE: ::c_int = 0x4; -pub const THREAD_BASIC_INFO: ::c_int = 3; -pub const THREAD_IDENTIFIER_INFO: ::c_int = 4; -pub const THREAD_EXTENDED_INFO: ::c_int = 5; +pub const TH_STATE_RUNNING: c_int = 1; +pub const TH_STATE_STOPPED: c_int = 2; +pub const TH_STATE_WAITING: c_int = 3; +pub const TH_STATE_UNINTERRUPTIBLE: c_int = 4; +pub const TH_STATE_HALTED: c_int = 5; +pub const TH_FLAGS_SWAPPED: c_int = 0x1; +pub const TH_FLAGS_IDLE: c_int = 0x2; +pub const TH_FLAGS_GLOBAL_FORCED_IDLE: c_int = 0x4; +pub const THREAD_BASIC_INFO: c_int = 3; +pub const THREAD_IDENTIFIER_INFO: c_int = 4; +pub const THREAD_EXTENDED_INFO: c_int = 5; // CommonCrypto/CommonCryptoError.h pub const kCCSuccess: i32 = 0; @@ -5275,64 +5281,65 @@ pub const MACH_TASK_BASIC_INFO: u32 = 20; pub const MACH_PORT_NULL: i32 = 0; -pub const RUSAGE_INFO_V0: ::c_int = 0; -pub const RUSAGE_INFO_V1: ::c_int = 1; -pub const RUSAGE_INFO_V2: ::c_int = 2; -pub const RUSAGE_INFO_V3: ::c_int = 3; -pub const RUSAGE_INFO_V4: ::c_int = 4; +pub const RUSAGE_INFO_V0: c_int = 0; +pub const RUSAGE_INFO_V1: c_int = 1; +pub const RUSAGE_INFO_V2: c_int = 2; +pub const RUSAGE_INFO_V3: c_int = 3; +pub const RUSAGE_INFO_V4: c_int = 4; // copyfile.h -pub const COPYFILE_ACL: ::copyfile_flags_t = 1 << 0; -pub const COPYFILE_STAT: ::copyfile_flags_t = 1 << 1; -pub const COPYFILE_XATTR: ::copyfile_flags_t = 1 << 2; -pub const COPYFILE_DATA: ::copyfile_flags_t = 1 << 3; -pub const COPYFILE_SECURITY: ::copyfile_flags_t = COPYFILE_STAT | COPYFILE_ACL; -pub const COPYFILE_METADATA: ::copyfile_flags_t = COPYFILE_SECURITY | COPYFILE_XATTR; -pub const COPYFILE_RECURSIVE: ::copyfile_flags_t = 1 << 15; -pub const COPYFILE_CHECK: ::copyfile_flags_t = 1 << 16; -pub const COPYFILE_EXCL: ::copyfile_flags_t = 1 << 17; -pub const COPYFILE_NOFOLLOW_SRC: ::copyfile_flags_t = 1 << 18; -pub const COPYFILE_NOFOLLOW_DST: ::copyfile_flags_t = 1 << 19; -pub const COPYFILE_MOVE: ::copyfile_flags_t = 1 << 20; -pub const COPYFILE_UNLINK: ::copyfile_flags_t = 1 << 21; -pub const COPYFILE_NOFOLLOW: ::copyfile_flags_t = COPYFILE_NOFOLLOW_SRC | COPYFILE_NOFOLLOW_DST; -pub const COPYFILE_PACK: ::copyfile_flags_t = 1 << 22; -pub const COPYFILE_UNPACK: ::copyfile_flags_t = 1 << 23; -pub const COPYFILE_CLONE: ::copyfile_flags_t = 1 << 24; -pub const COPYFILE_CLONE_FORCE: ::copyfile_flags_t = 1 << 25; -pub const COPYFILE_RUN_IN_PLACE: ::copyfile_flags_t = 1 << 26; -pub const COPYFILE_DATA_SPARSE: ::copyfile_flags_t = 1 << 27; -pub const COPYFILE_PRESERVE_DST_TRACKED: ::copyfile_flags_t = 1 << 28; -pub const COPYFILE_VERBOSE: ::copyfile_flags_t = 1 << 30; -pub const COPYFILE_RECURSE_ERROR: ::c_int = 0; -pub const COPYFILE_RECURSE_FILE: ::c_int = 1; -pub const COPYFILE_RECURSE_DIR: ::c_int = 2; -pub const COPYFILE_RECURSE_DIR_CLEANUP: ::c_int = 3; -pub const COPYFILE_COPY_DATA: ::c_int = 4; -pub const COPYFILE_COPY_XATTR: ::c_int = 5; -pub const COPYFILE_START: ::c_int = 1; -pub const COPYFILE_FINISH: ::c_int = 2; -pub const COPYFILE_ERR: ::c_int = 3; -pub const COPYFILE_PROGRESS: ::c_int = 4; -pub const COPYFILE_CONTINUE: ::c_int = 0; -pub const COPYFILE_SKIP: ::c_int = 1; -pub const COPYFILE_QUIT: ::c_int = 2; -pub const COPYFILE_STATE_SRC_FD: ::c_int = 1; -pub const COPYFILE_STATE_SRC_FILENAME: ::c_int = 2; -pub const COPYFILE_STATE_DST_FD: ::c_int = 3; -pub const COPYFILE_STATE_DST_FILENAME: ::c_int = 4; -pub const COPYFILE_STATE_QUARANTINE: ::c_int = 5; -pub const COPYFILE_STATE_STATUS_CB: ::c_int = 6; -pub const COPYFILE_STATE_STATUS_CTX: ::c_int = 7; -pub const COPYFILE_STATE_COPIED: ::c_int = 8; -pub const COPYFILE_STATE_XATTRNAME: ::c_int = 9; -pub const COPYFILE_STATE_WAS_CLONED: ::c_int = 10; -pub const COPYFILE_STATE_SRC_BSIZE: ::c_int = 11; -pub const COPYFILE_STATE_DST_BSIZE: ::c_int = 12; -pub const COPYFILE_STATE_BSIZE: ::c_int = 13; +pub const COPYFILE_ACL: crate::copyfile_flags_t = 1 << 0; +pub const COPYFILE_STAT: crate::copyfile_flags_t = 1 << 1; +pub const COPYFILE_XATTR: crate::copyfile_flags_t = 1 << 2; +pub const COPYFILE_DATA: crate::copyfile_flags_t = 1 << 3; +pub const COPYFILE_SECURITY: crate::copyfile_flags_t = COPYFILE_STAT | COPYFILE_ACL; +pub const COPYFILE_METADATA: crate::copyfile_flags_t = COPYFILE_SECURITY | COPYFILE_XATTR; +pub const COPYFILE_RECURSIVE: crate::copyfile_flags_t = 1 << 15; +pub const COPYFILE_CHECK: crate::copyfile_flags_t = 1 << 16; +pub const COPYFILE_EXCL: crate::copyfile_flags_t = 1 << 17; +pub const COPYFILE_NOFOLLOW_SRC: crate::copyfile_flags_t = 1 << 18; +pub const COPYFILE_NOFOLLOW_DST: crate::copyfile_flags_t = 1 << 19; +pub const COPYFILE_MOVE: crate::copyfile_flags_t = 1 << 20; +pub const COPYFILE_UNLINK: crate::copyfile_flags_t = 1 << 21; +pub const COPYFILE_NOFOLLOW: crate::copyfile_flags_t = + COPYFILE_NOFOLLOW_SRC | COPYFILE_NOFOLLOW_DST; +pub const COPYFILE_PACK: crate::copyfile_flags_t = 1 << 22; +pub const COPYFILE_UNPACK: crate::copyfile_flags_t = 1 << 23; +pub const COPYFILE_CLONE: crate::copyfile_flags_t = 1 << 24; +pub const COPYFILE_CLONE_FORCE: crate::copyfile_flags_t = 1 << 25; +pub const COPYFILE_RUN_IN_PLACE: crate::copyfile_flags_t = 1 << 26; +pub const COPYFILE_DATA_SPARSE: crate::copyfile_flags_t = 1 << 27; +pub const COPYFILE_PRESERVE_DST_TRACKED: crate::copyfile_flags_t = 1 << 28; +pub const COPYFILE_VERBOSE: crate::copyfile_flags_t = 1 << 30; +pub const COPYFILE_RECURSE_ERROR: c_int = 0; +pub const COPYFILE_RECURSE_FILE: c_int = 1; +pub const COPYFILE_RECURSE_DIR: c_int = 2; +pub const COPYFILE_RECURSE_DIR_CLEANUP: c_int = 3; +pub const COPYFILE_COPY_DATA: c_int = 4; +pub const COPYFILE_COPY_XATTR: c_int = 5; +pub const COPYFILE_START: c_int = 1; +pub const COPYFILE_FINISH: c_int = 2; +pub const COPYFILE_ERR: c_int = 3; +pub const COPYFILE_PROGRESS: c_int = 4; +pub const COPYFILE_CONTINUE: c_int = 0; +pub const COPYFILE_SKIP: c_int = 1; +pub const COPYFILE_QUIT: c_int = 2; +pub const COPYFILE_STATE_SRC_FD: c_int = 1; +pub const COPYFILE_STATE_SRC_FILENAME: c_int = 2; +pub const COPYFILE_STATE_DST_FD: c_int = 3; +pub const COPYFILE_STATE_DST_FILENAME: c_int = 4; +pub const COPYFILE_STATE_QUARANTINE: c_int = 5; +pub const COPYFILE_STATE_STATUS_CB: c_int = 6; +pub const COPYFILE_STATE_STATUS_CTX: c_int = 7; +pub const COPYFILE_STATE_COPIED: c_int = 8; +pub const COPYFILE_STATE_XATTRNAME: c_int = 9; +pub const COPYFILE_STATE_WAS_CLONED: c_int = 10; +pub const COPYFILE_STATE_SRC_BSIZE: c_int = 11; +pub const COPYFILE_STATE_DST_BSIZE: c_int = 12; +pub const COPYFILE_STATE_BSIZE: c_int = 13; // -pub const ATTR_BIT_MAP_COUNT: ::c_ushort = 5; +pub const ATTR_BIT_MAP_COUNT: c_ushort = 5; pub const FSOPT_NOFOLLOW: u32 = 0x1; pub const FSOPT_NOFOLLOW_ANY: u32 = 0x800; pub const FSOPT_REPORT_FULLSIZE: u32 = 0x4; @@ -5492,111 +5499,114 @@ pub const SSTOP: u32 = 4; pub const SZOMB: u32 = 5; // sys/vsock.h -pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF; -pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0; -pub const VMADDR_CID_RESERVED: ::c_uint = 1; -pub const VMADDR_CID_HOST: ::c_uint = 2; -pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_ANY: c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_HYPERVISOR: c_uint = 0; +pub const VMADDR_CID_RESERVED: c_uint = 1; +pub const VMADDR_CID_HOST: c_uint = 2; +pub const VMADDR_PORT_ANY: c_uint = 0xFFFFFFFF; const fn __DARWIN_ALIGN32(p: usize) -> usize { - const __DARWIN_ALIGNBYTES32: usize = ::mem::size_of::() - 1; + const __DARWIN_ALIGNBYTES32: usize = crate::mem::size_of::() - 1; p + __DARWIN_ALIGNBYTES32 & !__DARWIN_ALIGNBYTES32 } pub const THREAD_EXTENDED_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_TIME_CONSTRAINT_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) - as mach_msg_type_number_t; + (crate::mem::size_of::() + / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_PRECEDENCE_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_AFFINITY_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_BACKGROUND_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) - as mach_msg_type_number_t; -pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; +pub const THREAD_LATENCY_QOS_POLICY_COUNT: mach_msg_type_number_t = (crate::mem::size_of::< + thread_latency_qos_policy_data_t, +>() / crate::mem::size_of::< + integer_t, +>()) as mach_msg_type_number_t; pub const THREAD_THROUGHPUT_QOS_POLICY_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) - as mach_msg_type_number_t; + (crate::mem::size_of::() + / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_BASIC_INFO_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_IDENTIFIER_INFO_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; pub const THREAD_EXTENDED_INFO_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; pub const TASK_THREAD_TIMES_INFO_COUNT: u32 = - (::mem::size_of::() / ::mem::size_of::()) as u32; -pub const MACH_TASK_BASIC_INFO_COUNT: u32 = - (::mem::size_of::() / ::mem::size_of::()) as u32; + (crate::mem::size_of::() / crate::mem::size_of::()) + as u32; +pub const MACH_TASK_BASIC_INFO_COUNT: u32 = (crate::mem::size_of::() + / crate::mem::size_of::()) as u32; pub const HOST_VM_INFO64_COUNT: mach_msg_type_number_t = - (::mem::size_of::() / ::mem::size_of::()) + (crate::mem::size_of::() / crate::mem::size_of::()) as mach_msg_type_number_t; // bsd/net/if_mib.h /// Non-interface-specific -pub const IFMIB_SYSTEM: ::c_int = 1; +pub const IFMIB_SYSTEM: c_int = 1; /// Per-interface data table -pub const IFMIB_IFDATA: ::c_int = 2; +pub const IFMIB_IFDATA: c_int = 2; /// All interfaces data at once -pub const IFMIB_IFALLDATA: ::c_int = 3; +pub const IFMIB_IFALLDATA: c_int = 3; /// Generic stats for all kinds of ifaces -pub const IFDATA_GENERAL: ::c_int = 1; +pub const IFDATA_GENERAL: c_int = 1; /// Specific to the type of interface -pub const IFDATA_LINKSPECIFIC: ::c_int = 2; +pub const IFDATA_LINKSPECIFIC: c_int = 2; /// Addresses assigned to interface -pub const IFDATA_ADDRS: ::c_int = 3; +pub const IFDATA_ADDRS: c_int = 3; /// Multicast addresses assigned to interface -pub const IFDATA_MULTIADDRS: ::c_int = 4; +pub const IFDATA_MULTIADDRS: c_int = 4; /// Number of interfaces configured -pub const IFMIB_IFCOUNT: ::c_int = 1; +pub const IFMIB_IFCOUNT: c_int = 1; /// Functions not specific to a type of iface -pub const NETLINK_GENERIC: ::c_int = 0; +pub const NETLINK_GENERIC: c_int = 0; -pub const DOT3COMPLIANCE_STATS: ::c_int = 1; -pub const DOT3COMPLIANCE_COLLS: ::c_int = 2; +pub const DOT3COMPLIANCE_STATS: c_int = 1; +pub const DOT3COMPLIANCE_COLLS: c_int = 2; // kern_control.h pub const MAX_KCTL_NAME: usize = 96; f! { - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { - return ::CMSG_FIRSTHDR(mhdr); + return crate::CMSG_FIRSTHDR(mhdr); }; let cmsg_len = (*cmsg).cmsg_len as usize; let next = cmsg as usize + __DARWIN_ALIGN32(cmsg_len); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; - if next + __DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) > max { + if next + __DARWIN_ALIGN32(crate::mem::size_of::()) > max { core::ptr::null_mut() } else { - next as *mut ::cmsghdr + next as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).add(__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>())) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).add(__DARWIN_ALIGN32(crate::mem::size_of::())) } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) + __DARWIN_ALIGN32(length as usize)) - as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (__DARWIN_ALIGN32(crate::mem::size_of::()) + __DARWIN_ALIGN32(length as usize)) + as c_uint } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - (__DARWIN_ALIGN32(::mem::size_of::<::cmsghdr>()) + length as usize) as ::c_uint + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + (__DARWIN_ALIGN32(crate::mem::size_of::()) + length as usize) as c_uint } pub {const} fn VM_MAKE_TAG(id: u8) -> u32 { @@ -5617,23 +5627,23 @@ f! { } safe_f! { - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub {const} fn _WSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn _WSTATUS(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) == 0x13 } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { _WSTATUS(status) != _WSTOPPED && _WSTATUS(status) != 0 } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { _WSTATUS(status) == _WSTOPPED && WSTOPSIG(status) != 0x13 } } @@ -5643,235 +5653,229 @@ extern "C" { #[doc(hidden)] #[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.5")] #[cfg_attr(not(target_arch = "aarch64"), link_name = "daemon$1050")] - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; #[doc(hidden)] #[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")] - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; #[doc(hidden)] #[deprecated(since = "0.2.49", note = "Deprecated in MacOSX 10.10")] - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "aio_suspend$UNIX2003" )] pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int; - pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn chflags(path: *const c_char, flags: c_uint) -> c_int; + pub fn fchflags(fd: c_int, flags: c_uint) -> c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, + nitems: c_int, sevp: *mut sigevent, - ) -> ::c_int; + ) -> c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; pub fn pututxline(ut: *const utmpx) -> *mut utmpx; pub fn setutxent(); pub fn endutxent(); - pub fn utmpxname(file: *const ::c_char) -> ::c_int; + pub fn utmpxname(file: *const c_char) -> c_int; - pub fn asctime(tm: *const ::tm) -> *mut ::c_char; - pub fn ctime(clock: *const time_t) -> *mut ::c_char; - pub fn getdate(datestr: *const ::c_char) -> *mut ::tm; + pub fn asctime(tm: *const crate::tm) -> *mut c_char; + pub fn ctime(clock: *const time_t) -> *mut c_char; + pub fn getdate(datestr: *const c_char) -> *mut crate::tm; pub fn strptime( - buf: *const ::c_char, - format: *const ::c_char, - timeptr: *mut ::tm, - ) -> *mut ::c_char; - pub fn asctime_r(tm: *const ::tm, result: *mut ::c_char) -> *mut ::c_char; - pub fn ctime_r(clock: *const time_t, result: *mut ::c_char) -> *mut ::c_char; + buf: *const c_char, + format: *const c_char, + timeptr: *mut crate::tm, + ) -> *mut c_char; + pub fn asctime_r(tm: *const crate::tm, result: *mut c_char) -> *mut c_char; + pub fn ctime_r(clock: *const time_t, result: *mut c_char) -> *mut c_char; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; - pub fn sysctlnametomib( - name: *const ::c_char, - mibp: *mut ::c_int, - sizep: *mut ::size_t, - ) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; + pub fn mincore(addr: *const c_void, len: size_t, vec: *mut c_char) -> c_int; + pub fn sysctlnametomib(name: *const c_char, mibp: *mut c_int, sizep: *mut size_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "mprotect$UNIX2003" )] - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn semget(key: key_t, nsems: ::c_int, semflg: ::c_int) -> ::c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn semget(key: key_t, nsems: c_int, semflg: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "semctl$UNIX2003" )] - pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::c_int; - pub fn ftok(pathname: *const c_char, proj_id: ::c_int) -> key_t; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; + pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int; + pub fn semop(semid: c_int, sops: *mut sembuf, nsops: size_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, ...) -> c_int; + pub fn ftok(pathname: *const c_char, proj_id: c_int) -> key_t; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "shmctl$UNIX2003" )] - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; + pub fn shmget(key: key_t, size: size_t, shmflg: c_int) -> c_int; pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_uint, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; pub fn sysctlbyname( - name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *const c_char, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; pub fn pthread_once( - once_control: *mut ::pthread_once_t, - init_routine: ::Option, - ) -> ::c_int; + once_control: *mut crate::pthread_once_t, + init_routine: Option, + ) -> c_int; pub fn pthread_attr_getinheritsched( - attr: *const ::pthread_attr_t, - inheritsched: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + inheritsched: *mut c_int, + ) -> c_int; pub fn pthread_attr_getschedpolicy( - attr: *const ::pthread_attr_t, - policy: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + policy: *mut c_int, + ) -> c_int; pub fn pthread_attr_getscope( - attr: *const ::pthread_attr_t, - contentionscope: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + contentionscope: *mut c_int, + ) -> c_int; pub fn pthread_attr_getstackaddr( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + ) -> c_int; pub fn pthread_attr_getdetachstate( - attr: *const ::pthread_attr_t, - detachstate: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + detachstate: *mut c_int, + ) -> c_int; pub fn pthread_attr_setinheritsched( - attr: *mut ::pthread_attr_t, - inheritsched: ::c_int, - ) -> ::c_int; - pub fn pthread_attr_setschedpolicy(attr: *mut ::pthread_attr_t, policy: ::c_int) -> ::c_int; - pub fn pthread_attr_setscope(attr: *mut ::pthread_attr_t, contentionscope: ::c_int) -> ::c_int; + attr: *mut crate::pthread_attr_t, + inheritsched: c_int, + ) -> c_int; + pub fn pthread_attr_setschedpolicy(attr: *mut crate::pthread_attr_t, policy: c_int) -> c_int; + pub fn pthread_attr_setscope(attr: *mut crate::pthread_attr_t, contentionscope: c_int) + -> c_int; pub fn pthread_attr_setstackaddr( - attr: *mut ::pthread_attr_t, - stackaddr: *mut ::c_void, - ) -> ::c_int; - pub fn pthread_setname_np(name: *const ::c_char) -> ::c_int; - pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn pthread_mach_thread_np(thread: ::pthread_t) -> ::mach_port_t; - pub fn pthread_from_mach_thread_np(port: ::mach_port_t) -> ::pthread_t; + attr: *mut crate::pthread_attr_t, + stackaddr: *mut c_void, + ) -> c_int; + pub fn pthread_setname_np(name: *const c_char) -> c_int; + pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; + pub fn pthread_mach_thread_np(thread: crate::pthread_t) -> crate::mach_port_t; + pub fn pthread_from_mach_thread_np(port: crate::mach_port_t) -> crate::pthread_t; pub fn pthread_create_from_mach_thread( - thread: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + thread: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn pthread_stack_frame_decode_np( - frame_addr: ::uintptr_t, - return_addr: *mut ::uintptr_t, - ) -> ::uintptr_t; - pub fn pthread_get_stackaddr_np(thread: ::pthread_t) -> *mut ::c_void; - pub fn pthread_get_stacksize_np(thread: ::pthread_t) -> ::size_t; - pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; + frame_addr: crate::uintptr_t, + return_addr: *mut crate::uintptr_t, + ) -> crate::uintptr_t; + pub fn pthread_get_stackaddr_np(thread: crate::pthread_t) -> *mut c_void; + pub fn pthread_get_stacksize_np(thread: crate::pthread_t) -> size_t; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_main_np() -> ::c_int; - pub fn pthread_mutexattr_setpshared( - attr: *mut pthread_mutexattr_t, - pshared: ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_main_np() -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; pub fn pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; - pub fn pthread_threadid_np(thread: ::pthread_t, thread_id: *mut u64) -> ::c_int; + val: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: c_int) -> c_int; + pub fn pthread_threadid_np(thread: crate::pthread_t, thread_id: *mut u64) -> c_int; pub fn pthread_attr_set_qos_class_np( attr: *mut pthread_attr_t, class: qos_class_t, - priority: ::c_int, - ) -> ::c_int; + priority: c_int, + ) -> c_int; pub fn pthread_attr_get_qos_class_np( attr: *mut pthread_attr_t, class: *mut qos_class_t, - priority: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_set_qos_class_self_np(class: qos_class_t, priority: ::c_int) -> ::c_int; + priority: *mut c_int, + ) -> c_int; + pub fn pthread_set_qos_class_self_np(class: qos_class_t, priority: c_int) -> c_int; pub fn pthread_get_qos_class_np( - thread: ::pthread_t, + thread: crate::pthread_t, class: *mut qos_class_t, - priority: *mut ::c_int, - ) -> ::c_int; + priority: *mut c_int, + ) -> c_int; pub fn pthread_attr_getschedparam( - attr: *const ::pthread_attr_t, + attr: *const crate::pthread_attr_t, param: *mut sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_attr_setschedparam( - attr: *mut ::pthread_attr_t, + attr: *mut crate::pthread_attr_t, param: *const sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_getschedparam( - thread: ::pthread_t, - policy: *mut ::c_int, + thread: crate::pthread_t, + policy: *mut c_int, param: *mut sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_setschedparam( - thread: ::pthread_t, - policy: ::c_int, + thread: crate::pthread_t, + policy: c_int, param: *const sched_param, - ) -> ::c_int; + ) -> c_int; // Available from Big Sur pub fn pthread_introspection_hook_install( - hook: ::pthread_introspection_hook_t, - ) -> ::pthread_introspection_hook_t; + hook: crate::pthread_introspection_hook_t, + ) -> crate::pthread_introspection_hook_t; pub fn pthread_introspection_setspecific_np( - thread: ::pthread_t, - key: ::pthread_key_t, - value: *const ::c_void, - ) -> ::c_int; + thread: crate::pthread_t, + key: crate::pthread_key_t, + value: *const c_void, + ) -> c_int; pub fn pthread_introspection_getspecific_np( - thread: ::pthread_t, - key: ::pthread_key_t, - ) -> *mut ::c_void; - pub fn pthread_jit_write_protect_np(enabled: ::c_int); - pub fn pthread_jit_write_protect_supported_np() -> ::c_int; + thread: crate::pthread_t, + key: crate::pthread_key_t, + ) -> *mut c_void; + pub fn pthread_jit_write_protect_np(enabled: c_int); + pub fn pthread_jit_write_protect_supported_np() -> c_int; // An array of pthread_jit_write_with_callback_np must declare // the list of callbacks e.g. // #[link_section = "__DATA_CONST,__pth_jit_func"] @@ -5879,45 +5883,45 @@ extern "C" { // std::mem::transmute::(std::ptr::null())]; // (a handy PTHREAD_JIT_WRITE_CALLBACK_NP macro for other languages). pub fn pthread_jit_write_with_callback_np( - callback: ::pthread_jit_write_callback_t, - ctx: *mut ::c_void, - ) -> ::c_int; + callback: crate::pthread_jit_write_callback_t, + ctx: *mut c_void, + ) -> c_int; pub fn pthread_jit_write_freeze_callbacks_np(); - pub fn pthread_cpu_number_np(cpu_number_out: *mut ::size_t) -> ::c_int; + pub fn pthread_cpu_number_np(cpu_number_out: *mut size_t) -> c_int; // Available starting with macOS 14.4. pub fn os_sync_wait_on_address( - addr: *mut ::c_void, + addr: *mut c_void, value: u64, - size: ::size_t, + size: size_t, flags: os_sync_wait_on_address_flags_t, - ) -> ::c_int; + ) -> c_int; pub fn os_sync_wait_on_address_with_deadline( - addr: *mut ::c_void, + addr: *mut c_void, value: u64, - size: ::size_t, + size: size_t, flags: os_sync_wait_on_address_flags_t, clockid: os_clockid_t, deadline: u64, - ) -> ::c_int; + ) -> c_int; pub fn os_sync_wait_on_address_with_timeout( - addr: *mut ::c_void, + addr: *mut c_void, value: u64, - size: ::size_t, + size: size_t, flags: os_sync_wait_on_address_flags_t, clockid: os_clockid_t, timeout_ns: u64, - ) -> ::c_int; + ) -> c_int; pub fn os_sync_wake_by_address_any( - addr: *mut ::c_void, - size: ::size_t, + addr: *mut c_void, + size: size_t, flags: os_sync_wake_by_address_flags_t, - ) -> ::c_int; + ) -> c_int; pub fn os_sync_wake_by_address_all( - addr: *mut ::c_void, - size: ::size_t, + addr: *mut c_void, + size: size_t, flags: os_sync_wake_by_address_flags_t, - ) -> ::c_int; + ) -> c_int; pub fn os_unfair_lock_lock(lock: os_unfair_lock_t); pub fn os_unfair_lock_trylock(lock: os_unfair_lock_t) -> bool; @@ -5925,14 +5929,14 @@ extern "C" { pub fn os_unfair_lock_assert_owner(lock: os_unfair_lock_t); pub fn os_unfair_lock_assert_not_owner(lock: os_unfair_lock_t); - pub fn os_log_create(subsystem: *const ::c_char, category: *const ::c_char) -> ::os_log_t; - pub fn os_log_type_enabled(oslog: ::os_log_t, tpe: ::os_log_type_t) -> bool; + pub fn os_log_create(subsystem: *const c_char, category: *const c_char) -> crate::os_log_t; + pub fn os_log_type_enabled(oslog: crate::os_log_t, tpe: crate::os_log_type_t) -> bool; pub fn os_signpost_id_make_with_pointer( - log: ::os_log_t, - ptr: *const ::c_void, - ) -> ::os_signpost_id_t; - pub fn os_signpost_id_generate(log: ::os_log_t) -> ::os_signpost_id_t; - pub fn os_signpost_enabled(log: ::os_log_t) -> bool; + log: crate::os_log_t, + ptr: *const c_void, + ) -> crate::os_signpost_id_t; + pub fn os_signpost_id_generate(log: crate::os_log_t) -> crate::os_signpost_id_t; + pub fn os_signpost_enabled(log: crate::os_log_t) -> bool; pub fn thread_policy_set( thread: thread_t, @@ -5955,604 +5959,559 @@ extern "C" { ) -> kern_return_t; #[cfg_attr(doc, doc(alias = "__errno_location"))] #[cfg_attr(doc, doc(alias = "errno"))] - pub fn __error() -> *mut ::c_int; - pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; - pub fn backtrace_symbols(addrs: *const *mut ::c_void, sz: ::c_int) -> *mut *mut ::c_char; - pub fn backtrace_symbols_fd(addrs: *const *mut ::c_void, sz: ::c_int, fd: ::c_int); - pub fn backtrace_from_fp( - startfp: *mut ::c_void, - array: *mut *mut ::c_void, - size: ::c_int, - ) -> ::c_int; + pub fn __error() -> *mut c_int; + pub fn backtrace(buf: *mut *mut c_void, sz: c_int) -> c_int; + pub fn backtrace_symbols(addrs: *const *mut c_void, sz: c_int) -> *mut *mut c_char; + pub fn backtrace_symbols_fd(addrs: *const *mut c_void, sz: c_int, fd: c_int); + pub fn backtrace_from_fp(startfp: *mut c_void, array: *mut *mut c_void, size: c_int) -> c_int; pub fn backtrace_image_offsets( - array: *const *mut ::c_void, + array: *const *mut c_void, image_offsets: *mut image_offset, - size: ::c_int, + size: c_int, ); - pub fn backtrace_async( - array: *mut *mut ::c_void, - length: ::size_t, - task_id: *mut u32, - ) -> ::size_t; + pub fn backtrace_async(array: *mut *mut c_void, length: size_t, task_id: *mut u32) -> size_t; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "statfs$INODE64" )] - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "fstatfs$INODE64" )] - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; pub fn kevent( - kq: ::c_int, - changelist: *const ::kevent, - nchanges: ::c_int, - eventlist: *mut ::kevent, - nevents: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; + kq: c_int, + changelist: *const crate::kevent, + nchanges: c_int, + eventlist: *mut crate::kevent, + nevents: c_int, + timeout: *const crate::timespec, + ) -> c_int; pub fn kevent64( - kq: ::c_int, - changelist: *const ::kevent64_s, - nchanges: ::c_int, - eventlist: *mut ::kevent64_s, - nevents: ::c_int, - flags: ::c_uint, - timeout: *const ::timespec, - ) -> ::c_int; + kq: c_int, + changelist: *const crate::kevent64_s, + nchanges: c_int, + eventlist: *mut crate::kevent64_s, + nevents: c_int, + flags: c_uint, + timeout: *const crate::timespec, + ) -> c_int; pub fn mount( - src: *const ::c_char, - target: *const ::c_char, - flags: ::c_int, - data: *mut ::c_void, - ) -> ::c_int; - pub fn fmount( - src: *const ::c_char, - fd: ::c_int, - flags: ::c_int, - data: *mut ::c_void, - ) -> ::c_int; - pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int; - pub fn quotactl( - special: *const ::c_char, - cmd: ::c_int, - id: ::c_int, - data: *mut ::c_char, - ) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; + src: *const c_char, + target: *const c_char, + flags: c_int, + data: *mut c_void, + ) -> c_int; + pub fn fmount(src: *const c_char, fd: c_int, flags: c_int, data: *mut c_void) -> c_int; + pub fn ptrace(request: c_int, pid: crate::pid_t, addr: *mut c_char, data: c_int) -> c_int; + pub fn quotactl(special: *const c_char, cmd: c_int, id: c_int, data: *mut c_char) -> c_int; + pub fn sethostname(name: *const c_char, len: c_int) -> c_int; pub fn sendfile( - fd: ::c_int, - s: ::c_int, - offset: ::off_t, - len: *mut ::off_t, - hdtr: *mut ::sf_hdtr, - flags: ::c_int, - ) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + fd: c_int, + s: c_int, + offset: off_t, + len: *mut off_t, + hdtr: *mut crate::sf_hdtr, + flags: c_int, + ) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::c_int; + winp: *mut crate::winsize, + ) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::pid_t; - pub fn login_tty(fd: ::c_int) -> ::c_int; - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t) -> ::c_int; - pub fn localeconv_l(loc: ::locale_t) -> *mut lconv; - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; - pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; + winp: *mut crate::winsize, + ) -> crate::pid_t; + pub fn login_tty(fd: c_int) -> c_int; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t) -> c_int; + pub fn localeconv_l(loc: crate::locale_t) -> *mut lconv; + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn querylocale(mask: c_int, loc: crate::locale_t) -> *const c_char; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; + pub fn getdomainname(name: *mut c_char, len: c_int) -> c_int; + pub fn setdomainname(name: *const c_char, len: c_int) -> c_int; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; pub fn getxattr( - path: *const ::c_char, - name: *const ::c_char, - value: *mut ::c_void, - size: ::size_t, + path: *const c_char, + name: *const c_char, + value: *mut c_void, + size: size_t, position: u32, - flags: ::c_int, - ) -> ::ssize_t; + flags: c_int, + ) -> ssize_t; pub fn fgetxattr( - filedes: ::c_int, - name: *const ::c_char, - value: *mut ::c_void, - size: ::size_t, + filedes: c_int, + name: *const c_char, + value: *mut c_void, + size: size_t, position: u32, - flags: ::c_int, - ) -> ::ssize_t; + flags: c_int, + ) -> ssize_t; pub fn setxattr( - path: *const ::c_char, - name: *const ::c_char, - value: *const ::c_void, - size: ::size_t, + path: *const c_char, + name: *const c_char, + value: *const c_void, + size: size_t, position: u32, - flags: ::c_int, - ) -> ::c_int; + flags: c_int, + ) -> c_int; pub fn fsetxattr( - filedes: ::c_int, - name: *const ::c_char, - value: *const ::c_void, - size: ::size_t, + filedes: c_int, + name: *const c_char, + value: *const c_void, + size: size_t, position: u32, - flags: ::c_int, - ) -> ::c_int; - pub fn listxattr( - path: *const ::c_char, - list: *mut ::c_char, - size: ::size_t, - flags: ::c_int, - ) -> ::ssize_t; - pub fn flistxattr( - filedes: ::c_int, - list: *mut ::c_char, - size: ::size_t, - flags: ::c_int, - ) -> ::ssize_t; - pub fn removexattr(path: *const ::c_char, name: *const ::c_char, flags: ::c_int) -> ::c_int; - pub fn renamex_np(from: *const ::c_char, to: *const ::c_char, flags: ::c_uint) -> ::c_int; + flags: c_int, + ) -> c_int; + pub fn listxattr(path: *const c_char, list: *mut c_char, size: size_t, flags: c_int) + -> ssize_t; + pub fn flistxattr(filedes: c_int, list: *mut c_char, size: size_t, flags: c_int) -> ssize_t; + pub fn removexattr(path: *const c_char, name: *const c_char, flags: c_int) -> c_int; + pub fn renamex_np(from: *const c_char, to: *const c_char, flags: c_uint) -> c_int; pub fn renameatx_np( - fromfd: ::c_int, - from: *const ::c_char, - tofd: ::c_int, - to: *const ::c_char, - flags: ::c_uint, - ) -> ::c_int; - pub fn fremovexattr(filedes: ::c_int, name: *const ::c_char, flags: ::c_int) -> ::c_int; + fromfd: c_int, + from: *const c_char, + tofd: c_int, + to: *const c_char, + flags: c_uint, + ) -> c_int; + pub fn fremovexattr(filedes: c_int, name: *const c_char, flags: c_int) -> c_int; pub fn getgrouplist( - name: *const ::c_char, - basegid: ::c_int, - groups: *mut ::c_int, - ngroups: *mut ::c_int, - ) -> ::c_int; - pub fn initgroups(user: *const ::c_char, basegroup: ::c_int) -> ::c_int; + name: *const c_char, + basegid: c_int, + groups: *mut c_int, + ngroups: *mut c_int, + ) -> c_int; + pub fn initgroups(user: *const c_char, basegroup: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "waitid$UNIX2003" )] - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; - pub fn brk(addr: *const ::c_void) -> *mut ::c_void; - pub fn sbrk(increment: ::c_int) -> *mut ::c_void; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; + pub fn brk(addr: *const c_void) -> *mut c_void; + pub fn sbrk(increment: c_int) -> *mut c_void; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_setarchpref_np( attr: *mut posix_spawnattr_t, - count: ::size_t, - pref: *mut ::cpu_type_t, - subpref: *mut ::cpu_subtype_t, - ocount: *mut ::size_t, - ) -> ::c_int; + count: size_t, + pref: *mut crate::cpu_type_t, + subpref: *mut crate::cpu_subtype_t, + ocount: *mut size_t, + ) -> c_int; pub fn posix_spawnattr_getarchpref_np( attr: *const posix_spawnattr_t, - count: ::size_t, - pref: *mut ::cpu_type_t, - subpref: *mut ::cpu_subtype_t, - ocount: *mut ::size_t, - ) -> ::c_int; + count: size_t, + pref: *mut crate::cpu_type_t, + subpref: *mut crate::cpu_subtype_t, + ocount: *mut size_t, + ) -> c_int; pub fn posix_spawnattr_getbinpref_np( attr: *const posix_spawnattr_t, - count: ::size_t, - pref: *mut ::cpu_type_t, - ocount: *mut ::size_t, - ) -> ::c_int; + count: size_t, + pref: *mut crate::cpu_type_t, + ocount: *mut size_t, + ) -> c_int; pub fn posix_spawnattr_setbinpref_np( attr: *mut posix_spawnattr_t, - count: ::size_t, - pref: *mut ::cpu_type_t, - ocount: *mut ::size_t, - ) -> ::c_int; + count: size_t, + pref: *mut crate::cpu_type_t, + ocount: *mut size_t, + ) -> c_int; pub fn posix_spawnattr_set_qos_class_np( attr: *mut posix_spawnattr_t, - qos_class: ::qos_class_t, - ) -> ::c_int; + qos_class: crate::qos_class_t, + ) -> c_int; pub fn posix_spawnattr_get_qos_class_np( attr: *const posix_spawnattr_t, - qos_class: *mut ::qos_class_t, - ) -> ::c_int; + qos_class: *mut crate::qos_class_t, + ) -> c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; pub fn connectx( - socket: ::c_int, + socket: c_int, endpoints: *const sa_endpoints_t, associd: sae_associd_t, - flags: ::c_uint, - iov: *const ::iovec, - iovcnt: ::c_uint, - len: *mut ::size_t, + flags: c_uint, + iov: *const crate::iovec, + iovcnt: c_uint, + len: *mut size_t, connid: *mut sae_connid_t, - ) -> ::c_int; - pub fn disconnectx(socket: ::c_int, associd: sae_associd_t, connid: sae_connid_t) -> ::c_int; + ) -> c_int; + pub fn disconnectx(socket: c_int, associd: sae_associd_t, connid: sae_connid_t) -> c_int; - pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; - pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; + pub fn ntp_adjtime(buf: *mut timex) -> c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "getmntinfo$INODE64" )] - pub fn getmntinfo(mntbufp: *mut *mut statfs, flags: ::c_int) -> ::c_int; + pub fn getmntinfo(mntbufp: *mut *mut statfs, flags: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "getfsstat$INODE64" )] - pub fn getfsstat(mntbufp: *mut statfs, bufsize: ::c_int, flags: ::c_int) -> ::c_int; + pub fn getfsstat(mntbufp: *mut statfs, bufsize: c_int, flags: c_int) -> c_int; // Copy-on-write functions. // According to the man page `flags` is an `int` but in the header // this is a `uint32_t`. - pub fn clonefile(src: *const ::c_char, dst: *const ::c_char, flags: u32) -> ::c_int; + pub fn clonefile(src: *const c_char, dst: *const c_char, flags: u32) -> c_int; pub fn clonefileat( - src_dirfd: ::c_int, - src: *const ::c_char, - dst_dirfd: ::c_int, - dst: *const ::c_char, - flags: u32, - ) -> ::c_int; - pub fn fclonefileat( - srcfd: ::c_int, - dst_dirfd: ::c_int, - dst: *const ::c_char, + src_dirfd: c_int, + src: *const c_char, + dst_dirfd: c_int, + dst: *const c_char, flags: u32, - ) -> ::c_int; + ) -> c_int; + pub fn fclonefileat(srcfd: c_int, dst_dirfd: c_int, dst: *const c_char, flags: u32) -> c_int; pub fn copyfile( - from: *const ::c_char, - to: *const ::c_char, + from: *const c_char, + to: *const c_char, state: copyfile_state_t, flags: copyfile_flags_t, - ) -> ::c_int; + ) -> c_int; pub fn fcopyfile( - from: ::c_int, - to: ::c_int, + from: c_int, + to: c_int, state: copyfile_state_t, flags: copyfile_flags_t, - ) -> ::c_int; - pub fn copyfile_state_free(s: copyfile_state_t) -> ::c_int; + ) -> c_int; + pub fn copyfile_state_free(s: copyfile_state_t) -> c_int; pub fn copyfile_state_alloc() -> copyfile_state_t; - pub fn copyfile_state_get(s: copyfile_state_t, flags: u32, dst: *mut ::c_void) -> ::c_int; - pub fn copyfile_state_set(s: copyfile_state_t, flags: u32, src: *const ::c_void) -> ::c_int; + pub fn copyfile_state_get(s: copyfile_state_t, flags: u32, dst: *mut c_void) -> c_int; + pub fn copyfile_state_set(s: copyfile_state_t, flags: u32, src: *const c_void) -> c_int; - pub fn mach_error_string(error_value: ::mach_error_t) -> *mut ::c_char; + pub fn mach_error_string(error_value: crate::mach_error_t) -> *mut c_char; // Added in macOS 10.13 // ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1 - pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int; + pub fn memset_s(s: *mut c_void, smax: size_t, c: c_int, n: size_t) -> c_int; // Added in macOS 10.5 - pub fn memset_pattern4(b: *mut ::c_void, pattern4: *const ::c_void, len: ::size_t); - pub fn memset_pattern8(b: *mut ::c_void, pattern8: *const ::c_void, len: ::size_t); - pub fn memset_pattern16(b: *mut ::c_void, pattern16: *const ::c_void, len: ::size_t); + pub fn memset_pattern4(b: *mut c_void, pattern4: *const c_void, len: size_t); + pub fn memset_pattern8(b: *mut c_void, pattern8: *const c_void, len: size_t); + pub fn memset_pattern16(b: *mut c_void, pattern16: *const c_void, len: size_t); // Inherited from BSD but available from Big Sur only pub fn strtonum( - __numstr: *const ::c_char, - __minval: ::c_longlong, - __maxval: ::c_longlong, - errstrp: *mut *const ::c_char, - ) -> ::c_longlong; + __numstr: *const c_char, + __minval: c_longlong, + __maxval: c_longlong, + errstrp: *mut *const c_char, + ) -> c_longlong; pub fn mstats() -> mstats; - pub fn malloc_printf(format: *const ::c_char, ...); - pub fn malloc_zone_check(zone: *mut ::malloc_zone_t) -> ::boolean_t; - pub fn malloc_zone_print(zone: *mut ::malloc_zone_t, verbose: ::boolean_t); - pub fn malloc_zone_statistics(zone: *mut ::malloc_zone_t, stats: *mut malloc_statistics_t); - pub fn malloc_zone_log(zone: *mut ::malloc_zone_t, address: *mut ::c_void); - pub fn malloc_zone_print_ptr_info(ptr: *mut ::c_void); - pub fn malloc_default_zone() -> *mut ::malloc_zone_t; - pub fn malloc_zone_from_ptr(ptr: *const ::c_void) -> *mut ::malloc_zone_t; - pub fn malloc_zone_malloc(zone: *mut ::malloc_zone_t, size: ::size_t) -> *mut ::c_void; - pub fn malloc_zone_valloc(zone: *mut ::malloc_zone_t, size: ::size_t) -> *mut ::c_void; + pub fn malloc_printf(format: *const c_char, ...); + pub fn malloc_zone_check(zone: *mut crate::malloc_zone_t) -> crate::boolean_t; + pub fn malloc_zone_print(zone: *mut crate::malloc_zone_t, verbose: crate::boolean_t); + pub fn malloc_zone_statistics(zone: *mut crate::malloc_zone_t, stats: *mut malloc_statistics_t); + pub fn malloc_zone_log(zone: *mut crate::malloc_zone_t, address: *mut c_void); + pub fn malloc_zone_print_ptr_info(ptr: *mut c_void); + pub fn malloc_default_zone() -> *mut crate::malloc_zone_t; + pub fn malloc_zone_from_ptr(ptr: *const c_void) -> *mut crate::malloc_zone_t; + pub fn malloc_zone_malloc(zone: *mut crate::malloc_zone_t, size: size_t) -> *mut c_void; + pub fn malloc_zone_valloc(zone: *mut crate::malloc_zone_t, size: size_t) -> *mut c_void; pub fn malloc_zone_calloc( - zone: *mut ::malloc_zone_t, - num_items: ::size_t, - size: ::size_t, - ) -> *mut ::c_void; + zone: *mut crate::malloc_zone_t, + num_items: size_t, + size: size_t, + ) -> *mut c_void; pub fn malloc_zone_realloc( - zone: *mut ::malloc_zone_t, - ptr: *mut ::c_void, - size: ::size_t, - ) -> *mut ::c_void; - pub fn malloc_zone_free(zone: *mut ::malloc_zone_t, ptr: *mut ::c_void); - - pub fn proc_listpids( - t: u32, - typeinfo: u32, - buffer: *mut ::c_void, - buffersize: ::c_int, - ) -> ::c_int; - pub fn proc_listallpids(buffer: *mut ::c_void, buffersize: ::c_int) -> ::c_int; - pub fn proc_listpgrppids( - pgrpid: ::pid_t, - buffer: *mut ::c_void, - buffersize: ::c_int, - ) -> ::c_int; - pub fn proc_listchildpids(ppid: ::pid_t, buffer: *mut ::c_void, buffersize: ::c_int) - -> ::c_int; + zone: *mut crate::malloc_zone_t, + ptr: *mut c_void, + size: size_t, + ) -> *mut c_void; + pub fn malloc_zone_free(zone: *mut crate::malloc_zone_t, ptr: *mut c_void); + + pub fn proc_listpids(t: u32, typeinfo: u32, buffer: *mut c_void, buffersize: c_int) -> c_int; + pub fn proc_listallpids(buffer: *mut c_void, buffersize: c_int) -> c_int; + pub fn proc_listpgrppids(pgrpid: crate::pid_t, buffer: *mut c_void, buffersize: c_int) + -> c_int; + pub fn proc_listchildpids(ppid: crate::pid_t, buffer: *mut c_void, buffersize: c_int) -> c_int; pub fn proc_pidinfo( - pid: ::c_int, - flavor: ::c_int, + pid: c_int, + flavor: c_int, arg: u64, - buffer: *mut ::c_void, - buffersize: ::c_int, - ) -> ::c_int; + buffer: *mut c_void, + buffersize: c_int, + ) -> c_int; pub fn proc_pidfdinfo( - pid: ::c_int, - fd: ::c_int, - flavor: ::c_int, - buffer: *mut ::c_void, - buffersize: ::c_int, - ) -> ::c_int; + pid: c_int, + fd: c_int, + flavor: c_int, + buffer: *mut c_void, + buffersize: c_int, + ) -> c_int; pub fn proc_pidfileportinfo( - pid: ::c_int, + pid: c_int, fileport: u32, - flavor: ::c_int, - buffer: *mut ::c_void, - buffersize: ::c_int, - ) -> ::c_int; - pub fn proc_pidpath(pid: ::c_int, buffer: *mut ::c_void, buffersize: u32) -> ::c_int; - pub fn proc_name(pid: ::c_int, buffer: *mut ::c_void, buffersize: u32) -> ::c_int; + flavor: c_int, + buffer: *mut c_void, + buffersize: c_int, + ) -> c_int; + pub fn proc_pidpath(pid: c_int, buffer: *mut c_void, buffersize: u32) -> c_int; + pub fn proc_name(pid: c_int, buffer: *mut c_void, buffersize: u32) -> c_int; pub fn proc_regionfilename( - pid: ::c_int, + pid: c_int, address: u64, - buffer: *mut ::c_void, + buffer: *mut c_void, buffersize: u32, - ) -> ::c_int; - pub fn proc_kmsgbuf(buffer: *mut ::c_void, buffersize: u32) -> ::c_int; - pub fn proc_libversion(major: *mut ::c_int, minor: *mut ::c_int) -> ::c_int; - pub fn proc_pid_rusage(pid: ::c_int, flavor: ::c_int, buffer: *mut rusage_info_t) -> ::c_int; + ) -> c_int; + pub fn proc_kmsgbuf(buffer: *mut c_void, buffersize: u32) -> c_int; + pub fn proc_libversion(major: *mut c_int, minor: *mut c_int) -> c_int; + pub fn proc_pid_rusage(pid: c_int, flavor: c_int, buffer: *mut rusage_info_t) -> c_int; // Available from Big Sur - pub fn proc_set_no_smt() -> ::c_int; - pub fn proc_setthread_no_smt() -> ::c_int; - pub fn proc_set_csm(flags: u32) -> ::c_int; - pub fn proc_setthread_csm(flags: u32) -> ::c_int; + pub fn proc_set_no_smt() -> c_int; + pub fn proc_setthread_no_smt() -> c_int; + pub fn proc_set_csm(flags: u32) -> c_int; + pub fn proc_setthread_csm(flags: u32) -> c_int; /// # Notes /// /// `id` is of type [`uuid_t`]. - pub fn gethostuuid(id: *mut u8, timeout: *const ::timespec) -> ::c_int; + pub fn gethostuuid(id: *mut u8, timeout: *const crate::timespec) -> c_int; - pub fn gethostid() -> ::c_long; - pub fn sethostid(hostid: ::c_long); + pub fn gethostid() -> c_long; + pub fn sethostid(hostid: c_long); - pub fn CCRandomGenerateBytes(bytes: *mut ::c_void, size: ::size_t) -> ::CCRNGStatus; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn CCRandomGenerateBytes(bytes: *mut c_void, size: size_t) -> crate::CCRNGStatus; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; // crt_externs.h - pub fn _NSGetArgv() -> *mut *mut *mut ::c_char; - pub fn _NSGetArgc() -> *mut ::c_int; - pub fn _NSGetEnviron() -> *mut *mut *mut ::c_char; - pub fn _NSGetProgname() -> *mut *mut ::c_char; + pub fn _NSGetArgv() -> *mut *mut *mut c_char; + pub fn _NSGetArgc() -> *mut c_int; + pub fn _NSGetEnviron() -> *mut *mut *mut c_char; + pub fn _NSGetProgname() -> *mut *mut c_char; pub fn vm_allocate( target_task: vm_map_t, address: *mut vm_address_t, size: vm_size_t, - flags: ::c_int, - ) -> ::kern_return_t; + flags: c_int, + ) -> crate::kern_return_t; pub fn vm_deallocate( target_task: vm_map_t, address: vm_address_t, size: vm_size_t, - ) -> ::kern_return_t; + ) -> crate::kern_return_t; pub fn host_statistics64( host_priv: host_t, flavor: host_flavor_t, host_info64_out: host_info64_t, host_info64_outCnt: *mut mach_msg_type_number_t, - ) -> ::kern_return_t; + ) -> crate::kern_return_t; pub fn host_processor_info( host: host_t, flavor: processor_flavor_t, out_processor_count: *mut natural_t, out_processor_info: *mut processor_info_array_t, out_processor_infoCnt: *mut mach_msg_type_number_t, - ) -> ::kern_return_t; + ) -> crate::kern_return_t; pub fn task_for_pid( - host: ::mach_port_t, - pid: ::pid_t, - task: *mut ::mach_port_t, - ) -> ::kern_return_t; + host: crate::mach_port_t, + pid: crate::pid_t, + task: *mut crate::mach_port_t, + ) -> crate::kern_return_t; pub fn task_info( - host: ::mach_port_t, + host: crate::mach_port_t, flavor: task_flavor_t, task_info_out: task_info_t, task_info_count: *mut mach_msg_type_number_t, - ) -> ::kern_return_t; + ) -> crate::kern_return_t; pub fn task_create( - target_task: ::task_t, - ledgers: ::ledger_array_t, - ledgersCnt: ::mach_msg_type_number_t, - inherit_memory: ::boolean_t, - child_task: *mut ::task_t, - ) -> ::kern_return_t; - pub fn task_terminate(target_task: ::task_t) -> ::kern_return_t; + target_task: crate::task_t, + ledgers: crate::ledger_array_t, + ledgersCnt: crate::mach_msg_type_number_t, + inherit_memory: crate::boolean_t, + child_task: *mut crate::task_t, + ) -> crate::kern_return_t; + pub fn task_terminate(target_task: crate::task_t) -> crate::kern_return_t; pub fn task_threads( - target_task: ::task_inspect_t, - act_list: *mut ::thread_act_array_t, - act_listCnt: *mut ::mach_msg_type_number_t, - ) -> ::kern_return_t; + target_task: crate::task_inspect_t, + act_list: *mut crate::thread_act_array_t, + act_listCnt: *mut crate::mach_msg_type_number_t, + ) -> crate::kern_return_t; pub fn host_statistics( host_priv: host_t, flavor: host_flavor_t, host_info_out: host_info_t, host_info_outCnt: *mut mach_msg_type_number_t, - ) -> ::kern_return_t; + ) -> crate::kern_return_t; // sysdir.h pub fn sysdir_start_search_path_enumeration( dir: sysdir_search_path_directory_t, domainMask: sysdir_search_path_domain_mask_t, - ) -> ::sysdir_search_path_enumeration_state; + ) -> crate::sysdir_search_path_enumeration_state; pub fn sysdir_get_next_search_path_enumeration( - state: ::sysdir_search_path_enumeration_state, - path: *mut ::c_char, - ) -> ::sysdir_search_path_enumeration_state; + state: crate::sysdir_search_path_enumeration_state, + path: *mut c_char, + ) -> crate::sysdir_search_path_enumeration_state; pub static vm_page_size: vm_size_t; pub fn getattrlist( - path: *const ::c_char, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, + path: *const c_char, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, options: u32, - ) -> ::c_int; + ) -> c_int; pub fn fgetattrlist( - fd: ::c_int, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, + fd: c_int, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, options: u32, - ) -> ::c_int; + ) -> c_int; pub fn getattrlistat( - fd: ::c_int, - path: *const ::c_char, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, - options: ::c_ulong, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, + options: c_ulong, + ) -> c_int; pub fn setattrlist( - path: *const ::c_char, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, + path: *const c_char, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, options: u32, - ) -> ::c_int; + ) -> c_int; pub fn fsetattrlist( - fd: ::c_int, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, + fd: c_int, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, options: u32, - ) -> ::c_int; + ) -> c_int; pub fn setattrlistat( - dir_fd: ::c_int, - path: *const ::c_char, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, + dir_fd: c_int, + path: *const c_char, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, options: u32, - ) -> ::c_int; + ) -> c_int; pub fn getattrlistbulk( - dirfd: ::c_int, - attrList: *mut ::c_void, - attrBuf: *mut ::c_void, - attrBufSize: ::size_t, + dirfd: c_int, + attrList: *mut c_void, + attrBuf: *mut c_void, + attrBufSize: size_t, options: u64, - ) -> ::c_int; - - pub fn malloc_size(ptr: *const ::c_void) -> ::size_t; - pub fn malloc_good_size(size: ::size_t) -> ::size_t; - - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; - - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; - pub fn freadlink(fd: ::c_int, buf: *mut ::c_char, size: ::size_t) -> ::c_int; + ) -> c_int; + + pub fn malloc_size(ptr: *const c_void) -> size_t; + pub fn malloc_good_size(size: size_t) -> size_t; + + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; + + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; + pub fn freadlink(fd: c_int, buf: *mut c_char, size: size_t) -> c_int; pub fn execvP( - file: *const ::c_char, - search_path: *const ::c_char, - argv: *const *mut ::c_char, - ) -> ::c_int; + file: *const c_char, + search_path: *const c_char, + argv: *const *mut c_char, + ) -> c_int; } cfg_if! { if #[cfg(target_os = "macos")] { extern "C" { - pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; + pub fn clock_settime(clock_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; } } } @@ -6565,17 +6524,17 @@ cfg_if! { ))] { extern "C" { pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; pub fn task_set_info( - target_task: ::task_t, - flavor: ::task_flavor_t, - task_info_in: ::task_info_t, - task_info_inCnt: ::mach_msg_type_number_t, - ) -> ::kern_return_t; + target_task: crate::task_t, + flavor: crate::task_flavor_t, + task_info_in: crate::task_info_t, + task_info_inCnt: crate::mach_msg_type_number_t, + ) -> crate::kern_return_t; } } } diff --git a/src/unix/bsd/freebsdlike/dragonfly/mod.rs b/src/unix/bsd/freebsdlike/dragonfly/mod.rs index 9ef336042367d..3d6f18471f7ef 100644 --- a/src/unix/bsd/freebsdlike/dragonfly/mod.rs +++ b/src/unix/bsd/freebsdlike/dragonfly/mod.rs @@ -1,3 +1,7 @@ +use crate::{ + c_int, c_short, c_uchar, c_uint, c_ushort, c_void, cmsghdr, intptr_t, off_t, size_t, ssize_t, +}; + pub type dev_t = u32; pub type c_char = i8; pub type wchar_t = i32; @@ -6,39 +10,39 @@ pub type ino_t = u64; pub type lwpid_t = i32; pub type nlink_t = u32; pub type blksize_t = i64; -pub type clockid_t = ::c_ulong; +pub type clockid_t = c_ulong; pub type c_long = i64; pub type c_ulong = u64; pub type time_t = i64; pub type suseconds_t = i64; -pub type uuid_t = ::uuid; +pub type uuid_t = crate::uuid; pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; -pub type idtype_t = ::c_uint; -pub type shmatt_t = ::c_uint; +pub type idtype_t = c_uint; +pub type shmatt_t = c_uint; -pub type mqd_t = ::c_int; +pub type mqd_t = c_int; pub type sem_t = *mut sem; pub type cpuset_t = cpumask_t; pub type cpu_set_t = cpumask_t; -pub type register_t = ::c_long; -pub type umtx_t = ::c_int; -pub type pthread_barrierattr_t = ::c_int; -pub type pthread_barrier_t = ::uintptr_t; -pub type pthread_spinlock_t = ::uintptr_t; +pub type register_t = c_long; +pub type umtx_t = c_int; +pub type pthread_barrierattr_t = c_int; +pub type pthread_barrier_t = crate::uintptr_t; +pub type pthread_spinlock_t = crate::uintptr_t; pub type segsz_t = usize; pub type vm_prot_t = u8; pub type vm_maptype_t = u8; pub type vm_inherit_t = i8; -pub type vm_subsys_t = ::c_int; -pub type vm_eflags_t = ::c_uint; +pub type vm_subsys_t = c_int; +pub type vm_eflags_t = c_uint; pub type vm_map_t = *mut __c_anonymous_vm_map; pub type vm_map_entry_t = *mut vm_map_entry; @@ -47,8 +51,8 @@ pub type pmap = __c_anonymous_pmap; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum sem {} -impl ::Copy for sem {} -impl ::Clone for sem { +impl Copy for sem {} +impl Clone for sem { fn clone(&self) -> sem { *self } @@ -74,12 +78,12 @@ e! { s! { pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, - pub data: ::intptr_t, - pub udata: *mut ::c_void, + pub ident: crate::uintptr_t, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, + pub data: intptr_t, + pub udata: *mut c_void, } pub struct exit_status { @@ -88,15 +92,15 @@ s! { } pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_offset: ::off_t, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, + pub aio_fildes: c_int, + pub aio_offset: off_t, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, pub aio_sigevent: sigevent, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - _aio_val: ::c_int, - _aio_err: ::c_int, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, + _aio_val: c_int, + _aio_err: c_int, } pub struct uuid { @@ -109,50 +113,50 @@ s! { } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub f_owner: ::uid_t, - pub f_type: ::c_uint, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub f_owner: crate::uid_t, + pub f_type: c_uint, pub f_syncreads: u64, pub f_syncwrites: u64, pub f_asyncreads: u64, pub f_asyncwrites: u64, - pub f_fsid_uuid: ::uuid_t, - pub f_uid_uuid: ::uuid_t, + pub f_fsid_uuid: crate::uuid_t, + pub f_uid_uuid: crate::uuid_t, } pub struct stat { - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_dev: ::dev_t, - pub st_mode: ::mode_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_dev: crate::dev_t, + pub st_mode: crate::mode_t, pub st_padding1: u16, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_size: ::off_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_size: off_t, pub st_blocks: i64, pub __old_st_blksize: u32, pub st_flags: u32, @@ -163,67 +167,67 @@ s! { } pub struct if_data { - pub ifi_type: ::c_uchar, - pub ifi_physical: ::c_uchar, - pub ifi_addrlen: ::c_uchar, - pub ifi_hdrlen: ::c_uchar, - pub ifi_recvquota: ::c_uchar, - pub ifi_xmitquota: ::c_uchar, - pub ifi_mtu: ::c_ulong, - pub ifi_metric: ::c_ulong, - pub ifi_link_state: ::c_ulong, + pub ifi_type: c_uchar, + pub ifi_physical: c_uchar, + pub ifi_addrlen: c_uchar, + pub ifi_hdrlen: c_uchar, + pub ifi_recvquota: c_uchar, + pub ifi_xmitquota: c_uchar, + pub ifi_mtu: c_ulong, + pub ifi_metric: c_ulong, + pub ifi_link_state: c_ulong, pub ifi_baudrate: u64, - pub ifi_ipackets: ::c_ulong, - pub ifi_ierrors: ::c_ulong, - pub ifi_opackets: ::c_ulong, - pub ifi_oerrors: ::c_ulong, - pub ifi_collisions: ::c_ulong, - pub ifi_ibytes: ::c_ulong, - pub ifi_obytes: ::c_ulong, - pub ifi_imcasts: ::c_ulong, - pub ifi_omcasts: ::c_ulong, - pub ifi_iqdrops: ::c_ulong, - pub ifi_noproto: ::c_ulong, - pub ifi_hwassist: ::c_ulong, - pub ifi_oqdrops: ::c_ulong, - pub ifi_lastchange: ::timeval, + pub ifi_ipackets: c_ulong, + pub ifi_ierrors: c_ulong, + pub ifi_opackets: c_ulong, + pub ifi_oerrors: c_ulong, + pub ifi_collisions: c_ulong, + pub ifi_ibytes: c_ulong, + pub ifi_obytes: c_ulong, + pub ifi_imcasts: c_ulong, + pub ifi_omcasts: c_ulong, + pub ifi_iqdrops: c_ulong, + pub ifi_noproto: c_ulong, + pub ifi_hwassist: c_ulong, + pub ifi_oqdrops: c_ulong, + pub ifi_lastchange: crate::timeval, } pub struct if_msghdr { - pub ifm_msglen: ::c_ushort, - pub ifm_version: ::c_uchar, - pub ifm_type: ::c_uchar, - pub ifm_addrs: ::c_int, - pub ifm_flags: ::c_int, - pub ifm_index: ::c_ushort, + pub ifm_msglen: c_ushort, + pub ifm_version: c_uchar, + pub ifm_type: c_uchar, + pub ifm_addrs: c_int, + pub ifm_flags: c_int, + pub ifm_index: c_ushort, pub ifm_data: if_data, } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::c_uchar, - pub sdl_index: ::c_ushort, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 12], - pub sdl_rcf: ::c_ushort, - pub sdl_route: [::c_ushort; 16], + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 12], + pub sdl_rcf: c_ushort, + pub sdl_route: [c_ushort; 16], } pub struct xucred { - pub cr_version: ::c_uint, - pub cr_uid: ::uid_t, - pub cr_ngroups: ::c_short, - pub cr_groups: [::gid_t; 16], - __cr_unused1: *mut ::c_void, + pub cr_version: c_uint, + pub cr_uid: crate::uid_t, + pub cr_ngroups: c_short, + pub cr_groups: [crate::gid_t; 16], + __cr_unused1: *mut c_void, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct cpumask_t { @@ -231,29 +235,29 @@ s! { } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - shm_internal: *mut ::c_void, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + shm_internal: *mut c_void, } pub struct kinfo_file { - pub f_size: ::size_t, - pub f_pid: ::pid_t, - pub f_uid: ::uid_t, - pub f_fd: ::c_int, - pub f_file: *mut ::c_void, - pub f_type: ::c_short, - pub f_count: ::c_int, - pub f_msgcount: ::c_int, - pub f_offset: ::off_t, - pub f_data: *mut ::c_void, - pub f_flag: ::c_uint, + pub f_size: size_t, + pub f_pid: crate::pid_t, + pub f_uid: crate::uid_t, + pub f_fd: c_int, + pub f_file: *mut c_void, + pub f_type: c_short, + pub f_count: c_int, + pub f_msgcount: c_int, + pub f_offset: off_t, + pub f_data: *mut c_void, + pub f_flag: c_uint, } pub struct kinfo_cputime { @@ -266,223 +270,223 @@ s! { cp_unused02: u64, pub cp_sample_pc: u64, pub cp_sample_sp: u64, - pub cp_msg: [::c_char; 32], + pub cp_msg: [c_char; 32], } pub struct kinfo_lwp { - pub kl_pid: ::pid_t, - pub kl_tid: ::lwpid_t, - pub kl_flags: ::c_int, - pub kl_stat: ::lwpstat, - pub kl_lock: ::c_int, - pub kl_tdflags: ::c_int, - pub kl_mpcount: ::c_int, - pub kl_prio: ::c_int, - pub kl_tdprio: ::c_int, - pub kl_rtprio: ::rtprio, + pub kl_pid: crate::pid_t, + pub kl_tid: crate::lwpid_t, + pub kl_flags: c_int, + pub kl_stat: crate::lwpstat, + pub kl_lock: c_int, + pub kl_tdflags: c_int, + pub kl_mpcount: c_int, + pub kl_prio: c_int, + pub kl_tdprio: c_int, + pub kl_rtprio: crate::rtprio, pub kl_uticks: u64, pub kl_sticks: u64, pub kl_iticks: u64, pub kl_cpticks: u64, - pub kl_pctcpu: ::c_uint, - pub kl_slptime: ::c_uint, - pub kl_origcpu: ::c_int, - pub kl_estcpu: ::c_int, - pub kl_cpuid: ::c_int, - pub kl_ru: ::rusage, - pub kl_siglist: ::sigset_t, - pub kl_sigmask: ::sigset_t, - pub kl_wchan: ::uintptr_t, - pub kl_wmesg: [::c_char; 9], - pub kl_comm: [::c_char; MAXCOMLEN + 1], + pub kl_pctcpu: c_uint, + pub kl_slptime: c_uint, + pub kl_origcpu: c_int, + pub kl_estcpu: c_int, + pub kl_cpuid: c_int, + pub kl_ru: crate::rusage, + pub kl_siglist: crate::sigset_t, + pub kl_sigmask: crate::sigset_t, + pub kl_wchan: crate::uintptr_t, + pub kl_wmesg: [c_char; 9], + pub kl_comm: [c_char; MAXCOMLEN + 1], } pub struct kinfo_proc { - pub kp_paddr: ::uintptr_t, - pub kp_flags: ::c_int, - pub kp_stat: ::procstat, - pub kp_lock: ::c_int, - pub kp_acflag: ::c_int, - pub kp_traceflag: ::c_int, - pub kp_fd: ::uintptr_t, - pub kp_siglist: ::sigset_t, - pub kp_sigignore: ::sigset_t, - pub kp_sigcatch: ::sigset_t, - pub kp_sigflag: ::c_int, - pub kp_start: ::timeval, - pub kp_comm: [::c_char; MAXCOMLEN + 1], - pub kp_uid: ::uid_t, - pub kp_ngroups: ::c_short, - pub kp_groups: [::gid_t; NGROUPS], - pub kp_ruid: ::uid_t, - pub kp_svuid: ::uid_t, - pub kp_rgid: ::gid_t, - pub kp_svgid: ::gid_t, - pub kp_pid: ::pid_t, - pub kp_ppid: ::pid_t, - pub kp_pgid: ::pid_t, - pub kp_jobc: ::c_int, - pub kp_sid: ::pid_t, - pub kp_login: [::c_char; 40], // MAXNAMELEN rounded up to the nearest sizeof(long) - pub kp_tdev: ::dev_t, - pub kp_tpgid: ::pid_t, - pub kp_tsid: ::pid_t, - pub kp_exitstat: ::c_ushort, - pub kp_nthreads: ::c_int, - pub kp_nice: ::c_int, - pub kp_swtime: ::c_uint, - pub kp_vm_map_size: ::size_t, - pub kp_vm_rssize: ::segsz_t, - pub kp_vm_swrss: ::segsz_t, - pub kp_vm_tsize: ::segsz_t, - pub kp_vm_dsize: ::segsz_t, - pub kp_vm_ssize: ::segsz_t, - pub kp_vm_prssize: ::c_uint, - pub kp_jailid: ::c_int, - pub kp_ru: ::rusage, - pub kp_cru: ::rusage, - pub kp_auxflags: ::c_int, - pub kp_lwp: ::kinfo_lwp, - pub kp_ktaddr: ::uintptr_t, - kp_spare: [::c_int; 2], + pub kp_paddr: crate::uintptr_t, + pub kp_flags: c_int, + pub kp_stat: crate::procstat, + pub kp_lock: c_int, + pub kp_acflag: c_int, + pub kp_traceflag: c_int, + pub kp_fd: crate::uintptr_t, + pub kp_siglist: crate::sigset_t, + pub kp_sigignore: crate::sigset_t, + pub kp_sigcatch: crate::sigset_t, + pub kp_sigflag: c_int, + pub kp_start: crate::timeval, + pub kp_comm: [c_char; MAXCOMLEN + 1], + pub kp_uid: crate::uid_t, + pub kp_ngroups: c_short, + pub kp_groups: [crate::gid_t; NGROUPS], + pub kp_ruid: crate::uid_t, + pub kp_svuid: crate::uid_t, + pub kp_rgid: crate::gid_t, + pub kp_svgid: crate::gid_t, + pub kp_pid: crate::pid_t, + pub kp_ppid: crate::pid_t, + pub kp_pgid: crate::pid_t, + pub kp_jobc: c_int, + pub kp_sid: crate::pid_t, + pub kp_login: [c_char; 40], // MAXNAMELEN rounded up to the nearest sizeof(long) + pub kp_tdev: crate::dev_t, + pub kp_tpgid: crate::pid_t, + pub kp_tsid: crate::pid_t, + pub kp_exitstat: c_ushort, + pub kp_nthreads: c_int, + pub kp_nice: c_int, + pub kp_swtime: c_uint, + pub kp_vm_map_size: size_t, + pub kp_vm_rssize: crate::segsz_t, + pub kp_vm_swrss: crate::segsz_t, + pub kp_vm_tsize: crate::segsz_t, + pub kp_vm_dsize: crate::segsz_t, + pub kp_vm_ssize: crate::segsz_t, + pub kp_vm_prssize: c_uint, + pub kp_jailid: c_int, + pub kp_ru: crate::rusage, + pub kp_cru: crate::rusage, + pub kp_auxflags: c_int, + pub kp_lwp: crate::kinfo_lwp, + pub kp_ktaddr: crate::uintptr_t, + kp_spare: [c_int; 2], } pub struct __c_anonymous_vm_map { - _priv: [::uintptr_t; 36], + _priv: [crate::uintptr_t; 36], } pub struct vm_map_entry { - _priv: [::uintptr_t; 15], - pub eflags: ::vm_eflags_t, - pub maptype: ::vm_maptype_t, - pub protection: ::vm_prot_t, - pub max_protection: ::vm_prot_t, - pub inheritance: ::vm_inherit_t, - pub wired_count: ::c_int, - pub id: ::vm_subsys_t, + _priv: [crate::uintptr_t; 15], + pub eflags: crate::vm_eflags_t, + pub maptype: crate::vm_maptype_t, + pub protection: crate::vm_prot_t, + pub max_protection: crate::vm_prot_t, + pub inheritance: crate::vm_inherit_t, + pub wired_count: c_int, + pub id: crate::vm_subsys_t, } pub struct __c_anonymous_pmap { - _priv1: [::uintptr_t; 32], - _priv2: [::uintptr_t; 32], - _priv3: [::uintptr_t; 32], - _priv4: [::uintptr_t; 32], - _priv5: [::uintptr_t; 8], + _priv1: [crate::uintptr_t; 32], + _priv2: [crate::uintptr_t; 32], + _priv3: [crate::uintptr_t; 32], + _priv4: [crate::uintptr_t; 32], + _priv5: [crate::uintptr_t; 8], } pub struct vmspace { vm_map: __c_anonymous_vm_map, vm_pmap: __c_anonymous_pmap, - pub vm_flags: ::c_int, - pub vm_shm: *mut ::c_char, - pub vm_rssize: ::segsz_t, - pub vm_swrss: ::segsz_t, - pub vm_tsize: ::segsz_t, - pub vm_dsize: ::segsz_t, - pub vm_ssize: ::segsz_t, - pub vm_taddr: *mut ::c_char, - pub vm_daddr: *mut ::c_char, - pub vm_maxsaddr: *mut ::c_char, - pub vm_minsaddr: *mut ::c_char, - _unused1: ::c_int, - _unused2: ::c_int, - pub vm_pagesupply: ::c_int, - pub vm_holdcnt: ::c_uint, - pub vm_refcnt: ::c_uint, + pub vm_flags: c_int, + pub vm_shm: *mut c_char, + pub vm_rssize: crate::segsz_t, + pub vm_swrss: crate::segsz_t, + pub vm_tsize: crate::segsz_t, + pub vm_dsize: crate::segsz_t, + pub vm_ssize: crate::segsz_t, + pub vm_taddr: *mut c_char, + pub vm_daddr: *mut c_char, + pub vm_maxsaddr: *mut c_char, + pub vm_minsaddr: *mut c_char, + _unused1: c_int, + _unused2: c_int, + pub vm_pagesupply: c_int, + pub vm_holdcnt: c_uint, + pub vm_refcnt: c_uint, } pub struct cpuctl_msr_args_t { - pub msr: ::c_int, + pub msr: c_int, pub data: u64, } pub struct cpuctl_cpuid_args_t { - pub level: ::c_int, + pub level: c_int, pub data: [u32; 4], } pub struct cpuctl_cpuid_count_args_t { - pub level: ::c_int, - pub level_type: ::c_int, + pub level: c_int, + pub level_type: c_int, pub data: [u32; 4], } pub struct cpuctl_update_args_t { - pub data: *mut ::c_void, - pub size: ::size_t, + pub data: *mut c_void, + pub size: size_t, } } s_no_extra_traits! { pub struct utmpx { - pub ut_name: [::c_char; 32], - pub ut_id: [::c_char; 4], + pub ut_name: [c_char; 32], + pub ut_id: [c_char; 4], - pub ut_line: [::c_char; 32], - pub ut_host: [::c_char; 256], + pub ut_line: [c_char; 32], + pub ut_host: [c_char; 256], pub ut_unused: [u8; 16], pub ut_session: u16, pub ut_type: u16, - pub ut_pid: ::pid_t, + pub ut_pid: crate::pid_t, ut_exit: exit_status, - ut_ss: ::sockaddr_storage, - pub ut_tv: ::timeval, + ut_ss: crate::sockaddr_storage, + pub ut_tv: crate::timeval, pub ut_unused2: [u8; 16], } pub struct lastlogx { - pub ll_tv: ::timeval, - pub ll_line: [::c_char; _UTX_LINESIZE], - pub ll_host: [::c_char; _UTX_HOSTSIZE], - pub ll_ss: ::sockaddr_storage, + pub ll_tv: crate::timeval, + pub ll_line: [c_char; _UTX_LINESIZE], + pub ll_host: [c_char; _UTX_HOSTSIZE], + pub ll_ss: crate::sockaddr_storage, } pub struct dirent { - pub d_fileno: ::ino_t, + pub d_fileno: crate::ino_t, pub d_namlen: u16, pub d_type: u8, __unused1: u8, __unused2: u32, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct statfs { - __spare2: ::c_long, - pub f_bsize: ::c_long, - pub f_iosize: ::c_long, - pub f_blocks: ::c_long, - pub f_bfree: ::c_long, - pub f_bavail: ::c_long, - pub f_files: ::c_long, - pub f_ffree: ::c_long, - pub f_fsid: ::fsid_t, - pub f_owner: ::uid_t, - pub f_type: ::c_int, - pub f_flags: ::c_int, - pub f_syncwrites: ::c_long, - pub f_asyncwrites: ::c_long, - pub f_fstypename: [::c_char; 16], - pub f_mntonname: [::c_char; 80], - pub f_syncreads: ::c_long, - pub f_asyncreads: ::c_long, - __spares1: ::c_short, - pub f_mntfromname: [::c_char; 80], - __spares2: ::c_short, - __spare: [::c_long; 2], + __spare2: c_long, + pub f_bsize: c_long, + pub f_iosize: c_long, + pub f_blocks: c_long, + pub f_bfree: c_long, + pub f_bavail: c_long, + pub f_files: c_long, + pub f_ffree: c_long, + pub f_fsid: crate::fsid_t, + pub f_owner: crate::uid_t, + pub f_type: c_int, + pub f_flags: c_int, + pub f_syncwrites: c_long, + pub f_asyncwrites: c_long, + pub f_fstypename: [c_char; 16], + pub f_mntonname: [c_char; 80], + pub f_syncreads: c_long, + pub f_asyncreads: c_long, + __spares1: c_short, + pub f_mntfromname: [c_char; 80], + __spares2: c_short, + __spare: [c_long; 2], } pub struct sigevent { - pub sigev_notify: ::c_int, + pub sigev_notify: c_int, // The union is 8-byte in size, so it is aligned at a 8-byte offset. #[cfg(target_pointer_width = "64")] - __unused1: ::c_int, - pub sigev_signo: ::c_int, //actually a union + __unused1: c_int, + pub sigev_signo: c_int, //actually a union // pad the union #[cfg(target_pointer_width = "64")] - __unused2: ::c_int, - pub sigev_value: ::sigval, - __unused3: *mut ::c_void, //actually a function pointer + __unused2: c_int, + pub sigev_value: crate::sigval, + __unused3: *mut c_void, //actually a function pointer } pub struct mcontext_t { @@ -512,22 +516,22 @@ s_no_extra_traits! { pub mc_rflags: register_t, pub mc_rsp: register_t, pub mc_ss: register_t, - pub mc_len: ::c_uint, - pub mc_fpformat: ::c_uint, - pub mc_ownedfp: ::c_uint, - __reserved: ::c_uint, - __unused: [::c_uint; 8], - pub mc_fpregs: [::c_uint; 256], + pub mc_len: c_uint, + pub mc_fpformat: c_uint, + pub mc_ownedfp: c_uint, + __reserved: c_uint, + __unused: [c_uint; 8], + pub mc_fpregs: [c_uint; 256], } pub struct ucontext_t { - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, pub uc_link: *mut ucontext_t, pub uc_stack: stack_t, - pub uc_cofunc: ::Option, - pub uc_arg: *mut ::c_void, - __pad: [::c_int; 4], + pub uc_cofunc: Option, + pub uc_arg: *mut c_void, + __pad: [c_int; 4], } } @@ -554,8 +558,8 @@ cfg_if! { } } impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_name", &self.ut_name) .field("ut_id", &self.ut_id) @@ -572,8 +576,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_name.hash(state); self.ut_id.hash(state); self.ut_line.hash(state); @@ -597,8 +601,8 @@ cfg_if! { } } impl Eq for lastlogx {} - impl ::fmt::Debug for lastlogx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for lastlogx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("lastlogx") .field("ll_tv", &self.ll_tv) .field("ll_line", &self.ll_line) @@ -607,8 +611,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for lastlogx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for lastlogx { + fn hash(&self, state: &mut H) { self.ll_tv.hash(state); self.ll_line.hash(state); self.ll_host.hash(state); @@ -631,8 +635,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_namlen", &self.d_namlen) @@ -643,8 +647,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_namlen.hash(state); self.d_type.hash(state); @@ -685,8 +689,8 @@ cfg_if! { } } impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_bsize", &self.f_bsize) .field("f_iosize", &self.f_iosize) @@ -708,8 +712,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_bsize.hash(state); self.f_iosize.hash(state); self.f_blocks.hash(state); @@ -739,8 +743,8 @@ cfg_if! { } } impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -748,8 +752,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_notify.hash(state); self.sigev_signo.hash(state); self.sigev_value.hash(state); @@ -790,8 +794,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_onstack", &self.mc_onstack) .field("mc_rdi", &self.mc_rdi) @@ -826,8 +830,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_onstack.hash(state); self.mc_rdi.hash(state); self.mc_rsi.hash(state); @@ -873,8 +877,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_sigmask", &self.uc_sigmask) .field("uc_mcontext", &self.uc_mcontext) @@ -885,8 +889,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_sigmask.hash(state); self.uc_mcontext.hash(state); self.uc_link.hash(state); @@ -898,174 +902,174 @@ cfg_if! { } } -pub const RAND_MAX: ::c_int = 0x7fff_ffff; -pub const PTHREAD_STACK_MIN: ::size_t = 16384; -pub const SIGSTKSZ: ::size_t = 40960; -pub const SIGCKPT: ::c_int = 33; -pub const SIGCKPTEXIT: ::c_int = 34; -pub const CKPT_FREEZE: ::c_int = 0x1; -pub const CKPT_THAW: ::c_int = 0x2; -pub const MADV_INVAL: ::c_int = 10; -pub const MADV_SETMAP: ::c_int = 11; -pub const O_CLOEXEC: ::c_int = 0x00020000; -pub const O_DIRECTORY: ::c_int = 0x08000000; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const F_GETPATH: ::c_int = 19; -pub const ENOMEDIUM: ::c_int = 93; -pub const ENOTRECOVERABLE: ::c_int = 94; -pub const EOWNERDEAD: ::c_int = 95; -pub const EASYNC: ::c_int = 99; -pub const ELAST: ::c_int = 99; -pub const RLIMIT_POSIXLOCKS: ::c_int = 11; +pub const RAND_MAX: c_int = 0x7fff_ffff; +pub const PTHREAD_STACK_MIN: size_t = 16384; +pub const SIGSTKSZ: size_t = 40960; +pub const SIGCKPT: c_int = 33; +pub const SIGCKPTEXIT: c_int = 34; +pub const CKPT_FREEZE: c_int = 0x1; +pub const CKPT_THAW: c_int = 0x2; +pub const MADV_INVAL: c_int = 10; +pub const MADV_SETMAP: c_int = 11; +pub const O_CLOEXEC: c_int = 0x00020000; +pub const O_DIRECTORY: c_int = 0x08000000; +pub const F_GETLK: c_int = 7; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const F_GETPATH: c_int = 19; +pub const ENOMEDIUM: c_int = 93; +pub const ENOTRECOVERABLE: c_int = 94; +pub const EOWNERDEAD: c_int = 95; +pub const EASYNC: c_int = 99; +pub const ELAST: c_int = 99; +pub const RLIMIT_POSIXLOCKS: c_int = 11; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::rlim_t = 12; - -pub const Q_GETQUOTA: ::c_int = 0x300; -pub const Q_SETQUOTA: ::c_int = 0x400; - -pub const CTL_UNSPEC: ::c_int = 0; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_VFS: ::c_int = 3; -pub const CTL_NET: ::c_int = 4; -pub const CTL_DEBUG: ::c_int = 5; -pub const CTL_HW: ::c_int = 6; -pub const CTL_MACHDEP: ::c_int = 7; -pub const CTL_USER: ::c_int = 8; -pub const CTL_P1003_1B: ::c_int = 9; -pub const CTL_LWKT: ::c_int = 10; -pub const CTL_MAXID: ::c_int = 11; -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_MAXVNODES: ::c_int = 5; -pub const KERN_MAXPROC: ::c_int = 6; -pub const KERN_MAXFILES: ::c_int = 7; -pub const KERN_ARGMAX: ::c_int = 8; -pub const KERN_SECURELVL: ::c_int = 9; -pub const KERN_HOSTNAME: ::c_int = 10; -pub const KERN_HOSTID: ::c_int = 11; -pub const KERN_CLOCKRATE: ::c_int = 12; -pub const KERN_VNODE: ::c_int = 13; -pub const KERN_PROC: ::c_int = 14; -pub const KERN_FILE: ::c_int = 15; -pub const KERN_PROF: ::c_int = 16; -pub const KERN_POSIX1: ::c_int = 17; -pub const KERN_NGROUPS: ::c_int = 18; -pub const KERN_JOB_CONTROL: ::c_int = 19; -pub const KERN_SAVED_IDS: ::c_int = 20; -pub const KERN_BOOTTIME: ::c_int = 21; -pub const KERN_NISDOMAINNAME: ::c_int = 22; -pub const KERN_UPDATEINTERVAL: ::c_int = 23; -pub const KERN_OSRELDATE: ::c_int = 24; -pub const KERN_NTP_PLL: ::c_int = 25; -pub const KERN_BOOTFILE: ::c_int = 26; -pub const KERN_MAXFILESPERPROC: ::c_int = 27; -pub const KERN_MAXPROCPERUID: ::c_int = 28; -pub const KERN_DUMPDEV: ::c_int = 29; -pub const KERN_IPC: ::c_int = 30; -pub const KERN_DUMMY: ::c_int = 31; -pub const KERN_PS_STRINGS: ::c_int = 32; -pub const KERN_USRSTACK: ::c_int = 33; -pub const KERN_LOGSIGEXIT: ::c_int = 34; -pub const KERN_IOV_MAX: ::c_int = 35; -pub const KERN_MAXPOSIXLOCKSPERUID: ::c_int = 36; -pub const KERN_MAXID: ::c_int = 37; -pub const KERN_PROC_ALL: ::c_int = 0; -pub const KERN_PROC_PID: ::c_int = 1; -pub const KERN_PROC_PGRP: ::c_int = 2; -pub const KERN_PROC_SESSION: ::c_int = 3; -pub const KERN_PROC_TTY: ::c_int = 4; -pub const KERN_PROC_UID: ::c_int = 5; -pub const KERN_PROC_RUID: ::c_int = 6; -pub const KERN_PROC_ARGS: ::c_int = 7; -pub const KERN_PROC_CWD: ::c_int = 8; -pub const KERN_PROC_PATHNAME: ::c_int = 9; -pub const KERN_PROC_FLAGMASK: ::c_int = 0x10; -pub const KERN_PROC_FLAG_LWP: ::c_int = 0x10; -pub const KIPC_MAXSOCKBUF: ::c_int = 1; -pub const KIPC_SOCKBUF_WASTE: ::c_int = 2; -pub const KIPC_SOMAXCONN: ::c_int = 3; -pub const KIPC_MAX_LINKHDR: ::c_int = 4; -pub const KIPC_MAX_PROTOHDR: ::c_int = 5; -pub const KIPC_MAX_HDR: ::c_int = 6; -pub const KIPC_MAX_DATALEN: ::c_int = 7; -pub const KIPC_MBSTAT: ::c_int = 8; -pub const KIPC_NMBCLUSTERS: ::c_int = 9; -pub const HW_MACHINE: ::c_int = 1; -pub const HW_MODEL: ::c_int = 2; -pub const HW_NCPU: ::c_int = 3; -pub const HW_BYTEORDER: ::c_int = 4; -pub const HW_PHYSMEM: ::c_int = 5; -pub const HW_USERMEM: ::c_int = 6; -pub const HW_PAGESIZE: ::c_int = 7; -pub const HW_DISKNAMES: ::c_int = 8; -pub const HW_DISKSTATS: ::c_int = 9; -pub const HW_FLOATINGPT: ::c_int = 10; -pub const HW_MACHINE_ARCH: ::c_int = 11; -pub const HW_MACHINE_PLATFORM: ::c_int = 12; -pub const HW_SENSORS: ::c_int = 13; -pub const HW_MAXID: ::c_int = 14; -pub const USER_CS_PATH: ::c_int = 1; -pub const USER_BC_BASE_MAX: ::c_int = 2; -pub const USER_BC_DIM_MAX: ::c_int = 3; -pub const USER_BC_SCALE_MAX: ::c_int = 4; -pub const USER_BC_STRING_MAX: ::c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6; -pub const USER_EXPR_NEST_MAX: ::c_int = 7; -pub const USER_LINE_MAX: ::c_int = 8; -pub const USER_RE_DUP_MAX: ::c_int = 9; -pub const USER_POSIX2_VERSION: ::c_int = 10; -pub const USER_POSIX2_C_BIND: ::c_int = 11; -pub const USER_POSIX2_C_DEV: ::c_int = 12; -pub const USER_POSIX2_CHAR_TERM: ::c_int = 13; -pub const USER_POSIX2_FORT_DEV: ::c_int = 14; -pub const USER_POSIX2_FORT_RUN: ::c_int = 15; -pub const USER_POSIX2_LOCALEDEF: ::c_int = 16; -pub const USER_POSIX2_SW_DEV: ::c_int = 17; -pub const USER_POSIX2_UPE: ::c_int = 18; -pub const USER_STREAM_MAX: ::c_int = 19; -pub const USER_TZNAME_MAX: ::c_int = 20; -pub const USER_MAXID: ::c_int = 21; -pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1; -pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2; -pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3; -pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4; -pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5; -pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6; -pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7; -pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8; -pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9; -pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10; -pub const CTL_P1003_1B_FSYNC: ::c_int = 11; -pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12; -pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13; -pub const CTL_P1003_1B_TIMERS: ::c_int = 14; -pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15; -pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16; -pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17; -pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18; -pub const CTL_P1003_1B_UNUSED1: ::c_int = 19; -pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20; -pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21; -pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22; -pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23; -pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24; -pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25; -pub const CTL_P1003_1B_MAXID: ::c_int = 26; - -pub const CPUCTL_RSMSR: ::c_int = 0xc0106301; -pub const CPUCTL_WRMSR: ::c_int = 0xc0106302; -pub const CPUCTL_CPUID: ::c_int = 0xc0106303; -pub const CPUCTL_UPDATE: ::c_int = 0xc0106304; -pub const CPUCTL_MSRSBIT: ::c_int = 0xc0106305; -pub const CPUCTL_MSRCBIT: ::c_int = 0xc0106306; -pub const CPUCTL_CPUID_COUNT: ::c_int = 0xc0106307; - -pub const CPU_SETSIZE: ::size_t = ::mem::size_of::<::cpumask_t>() * 8; +pub const RLIM_NLIMITS: crate::rlim_t = 12; + +pub const Q_GETQUOTA: c_int = 0x300; +pub const Q_SETQUOTA: c_int = 0x400; + +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_VFS: c_int = 3; +pub const CTL_NET: c_int = 4; +pub const CTL_DEBUG: c_int = 5; +pub const CTL_HW: c_int = 6; +pub const CTL_MACHDEP: c_int = 7; +pub const CTL_USER: c_int = 8; +pub const CTL_P1003_1B: c_int = 9; +pub const CTL_LWKT: c_int = 10; +pub const CTL_MAXID: c_int = 11; +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_MAXVNODES: c_int = 5; +pub const KERN_MAXPROC: c_int = 6; +pub const KERN_MAXFILES: c_int = 7; +pub const KERN_ARGMAX: c_int = 8; +pub const KERN_SECURELVL: c_int = 9; +pub const KERN_HOSTNAME: c_int = 10; +pub const KERN_HOSTID: c_int = 11; +pub const KERN_CLOCKRATE: c_int = 12; +pub const KERN_VNODE: c_int = 13; +pub const KERN_PROC: c_int = 14; +pub const KERN_FILE: c_int = 15; +pub const KERN_PROF: c_int = 16; +pub const KERN_POSIX1: c_int = 17; +pub const KERN_NGROUPS: c_int = 18; +pub const KERN_JOB_CONTROL: c_int = 19; +pub const KERN_SAVED_IDS: c_int = 20; +pub const KERN_BOOTTIME: c_int = 21; +pub const KERN_NISDOMAINNAME: c_int = 22; +pub const KERN_UPDATEINTERVAL: c_int = 23; +pub const KERN_OSRELDATE: c_int = 24; +pub const KERN_NTP_PLL: c_int = 25; +pub const KERN_BOOTFILE: c_int = 26; +pub const KERN_MAXFILESPERPROC: c_int = 27; +pub const KERN_MAXPROCPERUID: c_int = 28; +pub const KERN_DUMPDEV: c_int = 29; +pub const KERN_IPC: c_int = 30; +pub const KERN_DUMMY: c_int = 31; +pub const KERN_PS_STRINGS: c_int = 32; +pub const KERN_USRSTACK: c_int = 33; +pub const KERN_LOGSIGEXIT: c_int = 34; +pub const KERN_IOV_MAX: c_int = 35; +pub const KERN_MAXPOSIXLOCKSPERUID: c_int = 36; +pub const KERN_MAXID: c_int = 37; +pub const KERN_PROC_ALL: c_int = 0; +pub const KERN_PROC_PID: c_int = 1; +pub const KERN_PROC_PGRP: c_int = 2; +pub const KERN_PROC_SESSION: c_int = 3; +pub const KERN_PROC_TTY: c_int = 4; +pub const KERN_PROC_UID: c_int = 5; +pub const KERN_PROC_RUID: c_int = 6; +pub const KERN_PROC_ARGS: c_int = 7; +pub const KERN_PROC_CWD: c_int = 8; +pub const KERN_PROC_PATHNAME: c_int = 9; +pub const KERN_PROC_FLAGMASK: c_int = 0x10; +pub const KERN_PROC_FLAG_LWP: c_int = 0x10; +pub const KIPC_MAXSOCKBUF: c_int = 1; +pub const KIPC_SOCKBUF_WASTE: c_int = 2; +pub const KIPC_SOMAXCONN: c_int = 3; +pub const KIPC_MAX_LINKHDR: c_int = 4; +pub const KIPC_MAX_PROTOHDR: c_int = 5; +pub const KIPC_MAX_HDR: c_int = 6; +pub const KIPC_MAX_DATALEN: c_int = 7; +pub const KIPC_MBSTAT: c_int = 8; +pub const KIPC_NMBCLUSTERS: c_int = 9; +pub const HW_MACHINE: c_int = 1; +pub const HW_MODEL: c_int = 2; +pub const HW_NCPU: c_int = 3; +pub const HW_BYTEORDER: c_int = 4; +pub const HW_PHYSMEM: c_int = 5; +pub const HW_USERMEM: c_int = 6; +pub const HW_PAGESIZE: c_int = 7; +pub const HW_DISKNAMES: c_int = 8; +pub const HW_DISKSTATS: c_int = 9; +pub const HW_FLOATINGPT: c_int = 10; +pub const HW_MACHINE_ARCH: c_int = 11; +pub const HW_MACHINE_PLATFORM: c_int = 12; +pub const HW_SENSORS: c_int = 13; +pub const HW_MAXID: c_int = 14; +pub const USER_CS_PATH: c_int = 1; +pub const USER_BC_BASE_MAX: c_int = 2; +pub const USER_BC_DIM_MAX: c_int = 3; +pub const USER_BC_SCALE_MAX: c_int = 4; +pub const USER_BC_STRING_MAX: c_int = 5; +pub const USER_COLL_WEIGHTS_MAX: c_int = 6; +pub const USER_EXPR_NEST_MAX: c_int = 7; +pub const USER_LINE_MAX: c_int = 8; +pub const USER_RE_DUP_MAX: c_int = 9; +pub const USER_POSIX2_VERSION: c_int = 10; +pub const USER_POSIX2_C_BIND: c_int = 11; +pub const USER_POSIX2_C_DEV: c_int = 12; +pub const USER_POSIX2_CHAR_TERM: c_int = 13; +pub const USER_POSIX2_FORT_DEV: c_int = 14; +pub const USER_POSIX2_FORT_RUN: c_int = 15; +pub const USER_POSIX2_LOCALEDEF: c_int = 16; +pub const USER_POSIX2_SW_DEV: c_int = 17; +pub const USER_POSIX2_UPE: c_int = 18; +pub const USER_STREAM_MAX: c_int = 19; +pub const USER_TZNAME_MAX: c_int = 20; +pub const USER_MAXID: c_int = 21; +pub const CTL_P1003_1B_ASYNCHRONOUS_IO: c_int = 1; +pub const CTL_P1003_1B_MAPPED_FILES: c_int = 2; +pub const CTL_P1003_1B_MEMLOCK: c_int = 3; +pub const CTL_P1003_1B_MEMLOCK_RANGE: c_int = 4; +pub const CTL_P1003_1B_MEMORY_PROTECTION: c_int = 5; +pub const CTL_P1003_1B_MESSAGE_PASSING: c_int = 6; +pub const CTL_P1003_1B_PRIORITIZED_IO: c_int = 7; +pub const CTL_P1003_1B_PRIORITY_SCHEDULING: c_int = 8; +pub const CTL_P1003_1B_REALTIME_SIGNALS: c_int = 9; +pub const CTL_P1003_1B_SEMAPHORES: c_int = 10; +pub const CTL_P1003_1B_FSYNC: c_int = 11; +pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: c_int = 12; +pub const CTL_P1003_1B_SYNCHRONIZED_IO: c_int = 13; +pub const CTL_P1003_1B_TIMERS: c_int = 14; +pub const CTL_P1003_1B_AIO_LISTIO_MAX: c_int = 15; +pub const CTL_P1003_1B_AIO_MAX: c_int = 16; +pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: c_int = 17; +pub const CTL_P1003_1B_DELAYTIMER_MAX: c_int = 18; +pub const CTL_P1003_1B_UNUSED1: c_int = 19; +pub const CTL_P1003_1B_PAGESIZE: c_int = 20; +pub const CTL_P1003_1B_RTSIG_MAX: c_int = 21; +pub const CTL_P1003_1B_SEM_NSEMS_MAX: c_int = 22; +pub const CTL_P1003_1B_SEM_VALUE_MAX: c_int = 23; +pub const CTL_P1003_1B_SIGQUEUE_MAX: c_int = 24; +pub const CTL_P1003_1B_TIMER_MAX: c_int = 25; +pub const CTL_P1003_1B_MAXID: c_int = 26; + +pub const CPUCTL_RSMSR: c_int = 0xc0106301; +pub const CPUCTL_WRMSR: c_int = 0xc0106302; +pub const CPUCTL_CPUID: c_int = 0xc0106303; +pub const CPUCTL_UPDATE: c_int = 0xc0106304; +pub const CPUCTL_MSRSBIT: c_int = 0xc0106305; +pub const CPUCTL_MSRCBIT: c_int = 0xc0106306; +pub const CPUCTL_CPUID_COUNT: c_int = 0xc0106307; + +pub const CPU_SETSIZE: size_t = crate::mem::size_of::() * 8; pub const EVFILT_READ: i16 = -1; pub const EVFILT_WRITE: i16 = -2; @@ -1093,7 +1097,7 @@ pub const EV_EOF: u16 = 0x8000; pub const EV_HUP: u16 = 0x8000; pub const EV_SYSFLAGS: u16 = 0xf000; -pub const FIODNAME: ::c_ulong = 0x80106678; +pub const FIODNAME: c_ulong = 0x80106678; pub const NOTE_TRIGGER: u32 = 0x01000000; pub const NOTE_FFNOP: u32 = 0x00000000; @@ -1120,43 +1124,43 @@ pub const NOTE_TRACK: u32 = 0x00000001; pub const NOTE_TRACKERR: u32 = 0x00000002; pub const NOTE_CHILD: u32 = 0x00000004; -pub const SO_SNDSPACE: ::c_int = 0x100a; -pub const SO_CPUHINT: ::c_int = 0x1030; -pub const SO_PASSCRED: ::c_int = 0x4000; +pub const SO_SNDSPACE: c_int = 0x100a; +pub const SO_CPUHINT: c_int = 0x1030; +pub const SO_PASSCRED: c_int = 0x4000; -pub const PT_FIRSTMACH: ::c_int = 32; +pub const PT_FIRSTMACH: c_int = 32; -pub const PROC_REAP_ACQUIRE: ::c_int = 0x0001; -pub const PROC_REAP_RELEASE: ::c_int = 0x0002; -pub const PROC_REAP_STATUS: ::c_int = 0x0003; -pub const PROC_PDEATHSIG_CTL: ::c_int = 0x0004; -pub const PROC_PDEATHSIG_STATUS: ::c_int = 0x0005; +pub const PROC_REAP_ACQUIRE: c_int = 0x0001; +pub const PROC_REAP_RELEASE: c_int = 0x0002; +pub const PROC_REAP_STATUS: c_int = 0x0003; +pub const PROC_PDEATHSIG_CTL: c_int = 0x0004; +pub const PROC_PDEATHSIG_STATUS: c_int = 0x0005; // https://github.com/DragonFlyBSD/DragonFlyBSD/blob/HEAD/sys/net/if.h#L101 -pub const IFF_UP: ::c_int = 0x1; // interface is up -pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link -pub const IFF_SMART: ::c_int = 0x20; // interface manages own routes -pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated -pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol -pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets -pub const IFF_OACTIVE_COMPAT: ::c_int = 0x400; // was transmission in progress -pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions -pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit -pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast - // was interface is in polling mode -pub const IFF_POLLING_COMPAT: ::c_int = 0x10000; -pub const IFF_PPROMISC: ::c_int = 0x20000; // user-requested promisc mode -pub const IFF_MONITOR: ::c_int = 0x40000; // user-requested monitor mode -pub const IFF_STATICARP: ::c_int = 0x80000; // static ARP -pub const IFF_NPOLLING: ::c_int = 0x100000; // interface is in polling mode -pub const IFF_IDIRECT: ::c_int = 0x200000; // direct input +pub const IFF_UP: c_int = 0x1; // interface is up +pub const IFF_BROADCAST: c_int = 0x2; // broadcast address valid +pub const IFF_DEBUG: c_int = 0x4; // turn on debugging +pub const IFF_LOOPBACK: c_int = 0x8; // is a loopback net +pub const IFF_POINTOPOINT: c_int = 0x10; // interface is point-to-point link +pub const IFF_SMART: c_int = 0x20; // interface manages own routes +pub const IFF_RUNNING: c_int = 0x40; // resources allocated +pub const IFF_NOARP: c_int = 0x80; // no address resolution protocol +pub const IFF_PROMISC: c_int = 0x100; // receive all packets +pub const IFF_ALLMULTI: c_int = 0x200; // receive all multicast packets +pub const IFF_OACTIVE_COMPAT: c_int = 0x400; // was transmission in progress +pub const IFF_SIMPLEX: c_int = 0x800; // can't hear own transmissions +pub const IFF_LINK0: c_int = 0x1000; // per link layer defined bit +pub const IFF_LINK1: c_int = 0x2000; // per link layer defined bit +pub const IFF_LINK2: c_int = 0x4000; // per link layer defined bit +pub const IFF_ALTPHYS: c_int = IFF_LINK2; // use alternate physical connection +pub const IFF_MULTICAST: c_int = 0x8000; // supports multicast + // was interface is in polling mode +pub const IFF_POLLING_COMPAT: c_int = 0x10000; +pub const IFF_PPROMISC: c_int = 0x20000; // user-requested promisc mode +pub const IFF_MONITOR: c_int = 0x40000; // user-requested monitor mode +pub const IFF_STATICARP: c_int = 0x80000; // static ARP +pub const IFF_NPOLLING: c_int = 0x100000; // interface is in polling mode +pub const IFF_IDIRECT: c_int = 0x200000; // direct input // // sys/netinet/in.h @@ -1165,328 +1169,328 @@ pub const IFF_IDIRECT: ::c_int = 0x200000; // direct input // IPPROTO_IP defined in src/unix/mod.rs /// IP6 hop-by-hop options -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// gateway^2 (deprecated) -pub const IPPROTO_GGP: ::c_int = 3; +pub const IPPROTO_GGP: c_int = 3; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// Stream protocol II. -pub const IPPROTO_ST: ::c_int = 7; +pub const IPPROTO_ST: c_int = 7; /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// private interior gateway -pub const IPPROTO_PIGP: ::c_int = 9; +pub const IPPROTO_PIGP: c_int = 9; /// BBN RCC Monitoring -pub const IPPROTO_RCCMON: ::c_int = 10; +pub const IPPROTO_RCCMON: c_int = 10; /// network voice protocol -pub const IPPROTO_NVPII: ::c_int = 11; +pub const IPPROTO_NVPII: c_int = 11; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; /// Argus -pub const IPPROTO_ARGUS: ::c_int = 13; +pub const IPPROTO_ARGUS: c_int = 13; /// EMCON -pub const IPPROTO_EMCON: ::c_int = 14; +pub const IPPROTO_EMCON: c_int = 14; /// Cross Net Debugger -pub const IPPROTO_XNET: ::c_int = 15; +pub const IPPROTO_XNET: c_int = 15; /// Chaos -pub const IPPROTO_CHAOS: ::c_int = 16; +pub const IPPROTO_CHAOS: c_int = 16; // IPPROTO_UDP defined in src/unix/mod.rs /// Multiplexing -pub const IPPROTO_MUX: ::c_int = 18; +pub const IPPROTO_MUX: c_int = 18; /// DCN Measurement Subsystems -pub const IPPROTO_MEAS: ::c_int = 19; +pub const IPPROTO_MEAS: c_int = 19; /// Host Monitoring -pub const IPPROTO_HMP: ::c_int = 20; +pub const IPPROTO_HMP: c_int = 20; /// Packet Radio Measurement -pub const IPPROTO_PRM: ::c_int = 21; +pub const IPPROTO_PRM: c_int = 21; /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// Trunk-1 -pub const IPPROTO_TRUNK1: ::c_int = 23; +pub const IPPROTO_TRUNK1: c_int = 23; /// Trunk-2 -pub const IPPROTO_TRUNK2: ::c_int = 24; +pub const IPPROTO_TRUNK2: c_int = 24; /// Leaf-1 -pub const IPPROTO_LEAF1: ::c_int = 25; +pub const IPPROTO_LEAF1: c_int = 25; /// Leaf-2 -pub const IPPROTO_LEAF2: ::c_int = 26; +pub const IPPROTO_LEAF2: c_int = 26; /// Reliable Data -pub const IPPROTO_RDP: ::c_int = 27; +pub const IPPROTO_RDP: c_int = 27; /// Reliable Transaction -pub const IPPROTO_IRTP: ::c_int = 28; +pub const IPPROTO_IRTP: c_int = 28; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; /// Bulk Data Transfer -pub const IPPROTO_BLT: ::c_int = 30; +pub const IPPROTO_BLT: c_int = 30; /// Network Services -pub const IPPROTO_NSP: ::c_int = 31; +pub const IPPROTO_NSP: c_int = 31; /// Merit Internodal -pub const IPPROTO_INP: ::c_int = 32; +pub const IPPROTO_INP: c_int = 32; /// Sequential Exchange -pub const IPPROTO_SEP: ::c_int = 33; +pub const IPPROTO_SEP: c_int = 33; /// Third Party Connect -pub const IPPROTO_3PC: ::c_int = 34; +pub const IPPROTO_3PC: c_int = 34; /// InterDomain Policy Routing -pub const IPPROTO_IDPR: ::c_int = 35; +pub const IPPROTO_IDPR: c_int = 35; /// XTP -pub const IPPROTO_XTP: ::c_int = 36; +pub const IPPROTO_XTP: c_int = 36; /// Datagram Delivery -pub const IPPROTO_DDP: ::c_int = 37; +pub const IPPROTO_DDP: c_int = 37; /// Control Message Transport -pub const IPPROTO_CMTP: ::c_int = 38; +pub const IPPROTO_CMTP: c_int = 38; /// TP++ Transport -pub const IPPROTO_TPXX: ::c_int = 39; +pub const IPPROTO_TPXX: c_int = 39; /// IL transport protocol -pub const IPPROTO_IL: ::c_int = 40; +pub const IPPROTO_IL: c_int = 40; // IPPROTO_IPV6 defined in src/unix/mod.rs /// Source Demand Routing -pub const IPPROTO_SDRP: ::c_int = 42; +pub const IPPROTO_SDRP: c_int = 42; /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// InterDomain Routing -pub const IPPROTO_IDRP: ::c_int = 45; +pub const IPPROTO_IDRP: c_int = 45; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// Mobile Host Routing -pub const IPPROTO_MHRP: ::c_int = 48; +pub const IPPROTO_MHRP: c_int = 48; /// BHA -pub const IPPROTO_BHA: ::c_int = 49; +pub const IPPROTO_BHA: c_int = 49; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; /// Integ. Net Layer Security -pub const IPPROTO_INLSP: ::c_int = 52; +pub const IPPROTO_INLSP: c_int = 52; /// IP with encryption -pub const IPPROTO_SWIPE: ::c_int = 53; +pub const IPPROTO_SWIPE: c_int = 53; /// Next Hop Resolution -pub const IPPROTO_NHRP: ::c_int = 54; +pub const IPPROTO_NHRP: c_int = 54; /// IP Mobility -pub const IPPROTO_MOBILE: ::c_int = 55; +pub const IPPROTO_MOBILE: c_int = 55; /// Transport Layer Security -pub const IPPROTO_TLSP: ::c_int = 56; +pub const IPPROTO_TLSP: c_int = 56; /// SKIP -pub const IPPROTO_SKIP: ::c_int = 57; +pub const IPPROTO_SKIP: c_int = 57; // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; +pub const IPPROTO_DSTOPTS: c_int = 60; /// any host internal protocol -pub const IPPROTO_AHIP: ::c_int = 61; +pub const IPPROTO_AHIP: c_int = 61; /// CFTP -pub const IPPROTO_CFTP: ::c_int = 62; +pub const IPPROTO_CFTP: c_int = 62; /// "hello" routing protocol -pub const IPPROTO_HELLO: ::c_int = 63; +pub const IPPROTO_HELLO: c_int = 63; /// SATNET/Backroom EXPAK -pub const IPPROTO_SATEXPAK: ::c_int = 64; +pub const IPPROTO_SATEXPAK: c_int = 64; /// Kryptolan -pub const IPPROTO_KRYPTOLAN: ::c_int = 65; +pub const IPPROTO_KRYPTOLAN: c_int = 65; /// Remote Virtual Disk -pub const IPPROTO_RVD: ::c_int = 66; +pub const IPPROTO_RVD: c_int = 66; /// Pluribus Packet Core -pub const IPPROTO_IPPC: ::c_int = 67; +pub const IPPROTO_IPPC: c_int = 67; /// Any distributed FS -pub const IPPROTO_ADFS: ::c_int = 68; +pub const IPPROTO_ADFS: c_int = 68; /// Satnet Monitoring -pub const IPPROTO_SATMON: ::c_int = 69; +pub const IPPROTO_SATMON: c_int = 69; /// VISA Protocol -pub const IPPROTO_VISA: ::c_int = 70; +pub const IPPROTO_VISA: c_int = 70; /// Packet Core Utility -pub const IPPROTO_IPCV: ::c_int = 71; +pub const IPPROTO_IPCV: c_int = 71; /// Comp. Prot. Net. Executive -pub const IPPROTO_CPNX: ::c_int = 72; +pub const IPPROTO_CPNX: c_int = 72; /// Comp. Prot. HeartBeat -pub const IPPROTO_CPHB: ::c_int = 73; +pub const IPPROTO_CPHB: c_int = 73; /// Wang Span Network -pub const IPPROTO_WSN: ::c_int = 74; +pub const IPPROTO_WSN: c_int = 74; /// Packet Video Protocol -pub const IPPROTO_PVP: ::c_int = 75; +pub const IPPROTO_PVP: c_int = 75; /// BackRoom SATNET Monitoring -pub const IPPROTO_BRSATMON: ::c_int = 76; +pub const IPPROTO_BRSATMON: c_int = 76; /// Sun net disk proto (temp.) -pub const IPPROTO_ND: ::c_int = 77; +pub const IPPROTO_ND: c_int = 77; /// WIDEBAND Monitoring -pub const IPPROTO_WBMON: ::c_int = 78; +pub const IPPROTO_WBMON: c_int = 78; /// WIDEBAND EXPAK -pub const IPPROTO_WBEXPAK: ::c_int = 79; +pub const IPPROTO_WBEXPAK: c_int = 79; /// ISO cnlp -pub const IPPROTO_EON: ::c_int = 80; +pub const IPPROTO_EON: c_int = 80; /// VMTP -pub const IPPROTO_VMTP: ::c_int = 81; +pub const IPPROTO_VMTP: c_int = 81; /// Secure VMTP -pub const IPPROTO_SVMTP: ::c_int = 82; +pub const IPPROTO_SVMTP: c_int = 82; /// Banyon VINES -pub const IPPROTO_VINES: ::c_int = 83; +pub const IPPROTO_VINES: c_int = 83; /// TTP -pub const IPPROTO_TTP: ::c_int = 84; +pub const IPPROTO_TTP: c_int = 84; /// NSFNET-IGP -pub const IPPROTO_IGP: ::c_int = 85; +pub const IPPROTO_IGP: c_int = 85; /// dissimilar gateway prot. -pub const IPPROTO_DGP: ::c_int = 86; +pub const IPPROTO_DGP: c_int = 86; /// TCF -pub const IPPROTO_TCF: ::c_int = 87; +pub const IPPROTO_TCF: c_int = 87; /// Cisco/GXS IGRP -pub const IPPROTO_IGRP: ::c_int = 88; +pub const IPPROTO_IGRP: c_int = 88; /// OSPFIGP -pub const IPPROTO_OSPFIGP: ::c_int = 89; +pub const IPPROTO_OSPFIGP: c_int = 89; /// Strite RPC protocol -pub const IPPROTO_SRPC: ::c_int = 90; +pub const IPPROTO_SRPC: c_int = 90; /// Locus Address Resoloution -pub const IPPROTO_LARP: ::c_int = 91; +pub const IPPROTO_LARP: c_int = 91; /// Multicast Transport -pub const IPPROTO_MTP: ::c_int = 92; +pub const IPPROTO_MTP: c_int = 92; /// AX.25 Frames -pub const IPPROTO_AX25: ::c_int = 93; +pub const IPPROTO_AX25: c_int = 93; /// IP encapsulated in IP -pub const IPPROTO_IPEIP: ::c_int = 94; +pub const IPPROTO_IPEIP: c_int = 94; /// Mobile Int.ing control -pub const IPPROTO_MICP: ::c_int = 95; +pub const IPPROTO_MICP: c_int = 95; /// Semaphore Comm. security -pub const IPPROTO_SCCSP: ::c_int = 96; +pub const IPPROTO_SCCSP: c_int = 96; /// Ethernet IP encapsulation -pub const IPPROTO_ETHERIP: ::c_int = 97; +pub const IPPROTO_ETHERIP: c_int = 97; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// any private encr. scheme -pub const IPPROTO_APES: ::c_int = 99; +pub const IPPROTO_APES: c_int = 99; /// GMTP -pub const IPPROTO_GMTP: ::c_int = 100; +pub const IPPROTO_GMTP: c_int = 100; /// payload compression (IPComp) -pub const IPPROTO_IPCOMP: ::c_int = 108; +pub const IPPROTO_IPCOMP: c_int = 108; /* 101-254: Partly Unassigned */ /// Protocol Independent Mcast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// CARP -pub const IPPROTO_CARP: ::c_int = 112; +pub const IPPROTO_CARP: c_int = 112; /// PGM -pub const IPPROTO_PGM: ::c_int = 113; +pub const IPPROTO_PGM: c_int = 113; /// PFSYNC -pub const IPPROTO_PFSYNC: ::c_int = 240; +pub const IPPROTO_PFSYNC: c_int = 240; /* 255: Reserved */ /* BSD Private, local use, namespace incursion, no longer used */ /// divert pseudo-protocol -pub const IPPROTO_DIVERT: ::c_int = 254; -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_DIVERT: c_int = 254; +pub const IPPROTO_MAX: c_int = 256; /// last return value of *_input(), meaning "all job for this pkt is done". -pub const IPPROTO_DONE: ::c_int = 257; +pub const IPPROTO_DONE: c_int = 257; /// Used by RSS: the layer3 protocol is unknown -pub const IPPROTO_UNKNOWN: ::c_int = 258; +pub const IPPROTO_UNKNOWN: c_int = 258; // sys/netinet/tcp.h -pub const TCP_SIGNATURE_ENABLE: ::c_int = 16; -pub const TCP_KEEPINIT: ::c_int = 32; -pub const TCP_FASTKEEP: ::c_int = 128; +pub const TCP_SIGNATURE_ENABLE: c_int = 16; +pub const TCP_KEEPINIT: c_int = 32; +pub const TCP_FASTKEEP: c_int = 128; -pub const AF_BLUETOOTH: ::c_int = 33; -pub const AF_MPLS: ::c_int = 34; -pub const AF_IEEE80211: ::c_int = 35; +pub const AF_BLUETOOTH: c_int = 33; +pub const AF_MPLS: c_int = 34; +pub const AF_IEEE80211: c_int = 35; -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; -pub const NET_RT_DUMP: ::c_int = 1; -pub const NET_RT_FLAGS: ::c_int = 2; -pub const NET_RT_IFLIST: ::c_int = 3; -pub const NET_RT_MAXID: ::c_int = 4; +pub const NET_RT_DUMP: c_int = 1; +pub const NET_RT_FLAGS: c_int = 2; +pub const NET_RT_IFLIST: c_int = 3; +pub const NET_RT_MAXID: c_int = 4; -pub const SOMAXOPT_SIZE: ::c_int = 65536; +pub const SOMAXOPT_SIZE: c_int = 65536; -pub const MSG_UNUSED09: ::c_int = 0x00000200; -pub const MSG_NOSIGNAL: ::c_int = 0x00000400; -pub const MSG_SYNC: ::c_int = 0x00000800; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00001000; -pub const MSG_FBLOCKING: ::c_int = 0x00010000; -pub const MSG_FNONBLOCKING: ::c_int = 0x00020000; -pub const MSG_FMASK: ::c_int = 0xFFFF0000; +pub const MSG_UNUSED09: c_int = 0x00000200; +pub const MSG_NOSIGNAL: c_int = 0x00000400; +pub const MSG_SYNC: c_int = 0x00000800; +pub const MSG_CMSG_CLOEXEC: c_int = 0x00001000; +pub const MSG_FBLOCKING: c_int = 0x00010000; +pub const MSG_FNONBLOCKING: c_int = 0x00020000; +pub const MSG_FMASK: c_int = 0xFFFF0000; // sys/mount.h -pub const MNT_NODEV: ::c_int = 0x00000010; -pub const MNT_AUTOMOUNTED: ::c_int = 0x00000020; -pub const MNT_TRIM: ::c_int = 0x01000000; -pub const MNT_LOCAL: ::c_int = 0x00001000; -pub const MNT_QUOTA: ::c_int = 0x00002000; -pub const MNT_ROOTFS: ::c_int = 0x00004000; -pub const MNT_USER: ::c_int = 0x00008000; -pub const MNT_IGNORE: ::c_int = 0x00800000; +pub const MNT_NODEV: c_int = 0x00000010; +pub const MNT_AUTOMOUNTED: c_int = 0x00000020; +pub const MNT_TRIM: c_int = 0x01000000; +pub const MNT_LOCAL: c_int = 0x00001000; +pub const MNT_QUOTA: c_int = 0x00002000; +pub const MNT_ROOTFS: c_int = 0x00004000; +pub const MNT_USER: c_int = 0x00008000; +pub const MNT_IGNORE: c_int = 0x00800000; // utmpx entry types -pub const EMPTY: ::c_short = 0; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const OLD_TIME: ::c_short = 3; -pub const NEW_TIME: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; -pub const ACCOUNTING: ::c_short = 9; -pub const SIGNATURE: ::c_short = 10; -pub const DOWNTIME: ::c_short = 11; +pub const EMPTY: c_short = 0; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const OLD_TIME: c_short = 3; +pub const NEW_TIME: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; +pub const ACCOUNTING: c_short = 9; +pub const SIGNATURE: c_short = 10; +pub const DOWNTIME: c_short = 11; // utmpx database types -pub const UTX_DB_UTMPX: ::c_uint = 0; -pub const UTX_DB_WTMPX: ::c_uint = 1; -pub const UTX_DB_LASTLOG: ::c_uint = 2; +pub const UTX_DB_UTMPX: c_uint = 0; +pub const UTX_DB_WTMPX: c_uint = 1; +pub const UTX_DB_LASTLOG: c_uint = 2; pub const _UTX_LINESIZE: usize = 32; pub const _UTX_USERSIZE: usize = 32; pub const _UTX_IDSIZE: usize = 4; pub const _UTX_HOSTSIZE: usize = 256; -pub const LC_COLLATE_MASK: ::c_int = 1 << 0; -pub const LC_CTYPE_MASK: ::c_int = 1 << 1; -pub const LC_MONETARY_MASK: ::c_int = 1 << 2; -pub const LC_NUMERIC_MASK: ::c_int = 1 << 3; -pub const LC_TIME_MASK: ::c_int = 1 << 4; -pub const LC_MESSAGES_MASK: ::c_int = 1 << 5; -pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK +pub const LC_COLLATE_MASK: c_int = 1 << 0; +pub const LC_CTYPE_MASK: c_int = 1 << 1; +pub const LC_MONETARY_MASK: c_int = 1 << 2; +pub const LC_NUMERIC_MASK: c_int = 1 << 3; +pub const LC_TIME_MASK: c_int = 1 << 4; +pub const LC_MESSAGES_MASK: c_int = 1 << 5; +pub const LC_ALL_MASK: c_int = LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK; -pub const TIOCSIG: ::c_ulong = 0x2000745f; -pub const BTUARTDISC: ::c_int = 0x7; -pub const TIOCDCDTIMESTAMP: ::c_ulong = 0x40107458; -pub const TIOCISPTMASTER: ::c_ulong = 0x20007455; -pub const TIOCMODG: ::c_ulong = 0x40047403; -pub const TIOCMODS: ::c_ulong = 0x80047404; -pub const TIOCREMOTE: ::c_ulong = 0x80047469; -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const TIOCSIG: c_ulong = 0x2000745f; +pub const BTUARTDISC: c_int = 0x7; +pub const TIOCDCDTIMESTAMP: c_ulong = 0x40107458; +pub const TIOCISPTMASTER: c_ulong = 0x20007455; +pub const TIOCMODG: c_ulong = 0x40047403; +pub const TIOCMODS: c_ulong = 0x80047404; +pub const TIOCREMOTE: c_ulong = 0x80047469; +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; // Constants used by "at" family of system calls. -pub const AT_FDCWD: ::c_int = 0xFFFAFDCD; // invalid file descriptor -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 1; -pub const AT_REMOVEDIR: ::c_int = 2; -pub const AT_EACCESS: ::c_int = 4; -pub const AT_SYMLINK_FOLLOW: ::c_int = 8; +pub const AT_FDCWD: c_int = 0xFFFAFDCD; // invalid file descriptor +pub const AT_SYMLINK_NOFOLLOW: c_int = 1; +pub const AT_REMOVEDIR: c_int = 2; +pub const AT_EACCESS: c_int = 4; +pub const AT_SYMLINK_FOLLOW: c_int = 8; pub const VCHECKPT: usize = 19; -pub const _PC_2_SYMLINKS: ::c_int = 22; -pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 23; +pub const _PC_2_SYMLINKS: c_int = 22; +pub const _PC_TIMESTAMP_RESOLUTION: c_int = 23; -pub const _SC_V7_ILP32_OFF32: ::c_int = 122; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 123; -pub const _SC_V7_LP64_OFF64: ::c_int = 124; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 125; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 126; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 127; +pub const _SC_V7_ILP32_OFF32: c_int = 122; +pub const _SC_V7_ILP32_OFFBIG: c_int = 123; +pub const _SC_V7_LP64_OFF64: c_int = 124; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 125; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 126; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 127; -pub const WCONTINUED: ::c_int = 0x4; -pub const WSTOPPED: ::c_int = 0x2; -pub const WNOWAIT: ::c_int = 0x8; -pub const WEXITED: ::c_int = 0x10; -pub const WTRAPPED: ::c_int = 0x20; +pub const WCONTINUED: c_int = 0x4; +pub const WSTOPPED: c_int = 0x2; +pub const WNOWAIT: c_int = 0x8; +pub const WEXITED: c_int = 0x10; +pub const WTRAPPED: c_int = 0x20; // Similar to FreeBSD, only the standardized ones are exposed. // There are more. @@ -1495,75 +1499,75 @@ pub const P_PGID: idtype_t = 2; pub const P_ALL: idtype_t = 7; // Values for struct rtprio (type_ field) -pub const RTP_PRIO_REALTIME: ::c_ushort = 0; -pub const RTP_PRIO_NORMAL: ::c_ushort = 1; -pub const RTP_PRIO_IDLE: ::c_ushort = 2; -pub const RTP_PRIO_THREAD: ::c_ushort = 3; +pub const RTP_PRIO_REALTIME: c_ushort = 0; +pub const RTP_PRIO_NORMAL: c_ushort = 1; +pub const RTP_PRIO_IDLE: c_ushort = 2; +pub const RTP_PRIO_THREAD: c_ushort = 3; // Flags for chflags(2) -pub const UF_NOHISTORY: ::c_ulong = 0x00000040; -pub const UF_CACHE: ::c_ulong = 0x00000080; -pub const UF_XLINK: ::c_ulong = 0x00000100; -pub const SF_NOHISTORY: ::c_ulong = 0x00400000; -pub const SF_CACHE: ::c_ulong = 0x00800000; -pub const SF_XLINK: ::c_ulong = 0x01000000; +pub const UF_NOHISTORY: c_ulong = 0x00000040; +pub const UF_CACHE: c_ulong = 0x00000080; +pub const UF_XLINK: c_ulong = 0x00000100; +pub const SF_NOHISTORY: c_ulong = 0x00400000; +pub const SF_CACHE: c_ulong = 0x00800000; +pub const SF_XLINK: c_ulong = 0x01000000; // timespec constants pub const UTIME_OMIT: c_long = -2; pub const UTIME_NOW: c_long = -1; -pub const MINCORE_SUPER: ::c_int = 0x20; +pub const MINCORE_SUPER: c_int = 0x20; // kinfo_proc constants pub const MAXCOMLEN: usize = 16; pub const MAXLOGNAME: usize = 33; pub const NGROUPS: usize = 16; -pub const RB_PAUSE: ::c_int = 0x40000; -pub const RB_VIDEO: ::c_int = 0x20000000; +pub const RB_PAUSE: c_int = 0x40000; +pub const RB_VIDEO: c_int = 0x20000000; // net/route.h -pub const RTF_CLONING: ::c_int = 0x100; -pub const RTF_PRCLONING: ::c_int = 0x10000; -pub const RTF_WASCLONED: ::c_int = 0x20000; -pub const RTF_MPLSOPS: ::c_int = 0x1000000; +pub const RTF_CLONING: c_int = 0x100; +pub const RTF_PRCLONING: c_int = 0x10000; +pub const RTF_WASCLONED: c_int = 0x20000; +pub const RTF_MPLSOPS: c_int = 0x1000000; -pub const RTM_VERSION: ::c_int = 7; +pub const RTM_VERSION: c_int = 7; -pub const RTAX_MPLS1: ::c_int = 8; -pub const RTAX_MPLS2: ::c_int = 9; -pub const RTAX_MPLS3: ::c_int = 10; -pub const RTAX_MAX: ::c_int = 11; +pub const RTAX_MPLS1: c_int = 8; +pub const RTAX_MPLS2: c_int = 9; +pub const RTAX_MPLS3: c_int = 10; +pub const RTAX_MAX: c_int = 11; const_fn! { {const} fn _CMSG_ALIGN(n: usize) -> usize { - (n + (::mem::size_of::<::c_long>() - 1)) & !(::mem::size_of::<::c_long>() - 1) + (n + (crate::mem::size_of::() - 1)) & !(crate::mem::size_of::() - 1) } } f! { - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(_CMSG_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + length as usize) as ::c_uint + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + (_CMSG_ALIGN(crate::mem::size_of::()) + length as usize) as c_uint } - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let next = cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize) - + _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()); + + _CMSG_ALIGN(crate::mem::size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next <= max { - (cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr + (cmsg as usize + _CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } else { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) + _CMSG_ALIGN(length as usize)) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (_CMSG_ALIGN(crate::mem::size_of::()) + _CMSG_ALIGN(length as usize)) as c_uint } pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { @@ -1589,23 +1593,23 @@ f! { 0 != cpuset.ary[idx] & (1 << offset) } - pub fn major(dev: ::dev_t) -> ::c_int { - ((dev >> 8) & 0xff) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + ((dev >> 8) & 0xff) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - (dev & 0xffff00ff) as ::c_int + pub fn minor(dev: crate::dev_t) -> c_int { + (dev & 0xffff00ff) as c_int } } safe_f! { - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= major << 8; dev |= minor; @@ -1614,118 +1618,127 @@ safe_f! { } extern "C" { - pub fn __errno_location() -> *mut ::c_int; + pub fn __errno_location() -> *mut c_int; pub fn setgrent(); - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; - pub fn setutxdb(_type: ::c_uint, file: *mut ::c_char) -> ::c_int; + pub fn setutxdb(_type: c_uint, file: *mut c_char) -> c_int; - pub fn aio_waitcomplete(iocbp: *mut *mut aiocb, timeout: *mut ::timespec) -> ::c_int; + pub fn aio_waitcomplete(iocbp: *mut *mut aiocb, timeout: *mut crate::timespec) -> c_int; pub fn devname_r( - dev: ::dev_t, - mode: ::mode_t, - buf: *mut ::c_char, - len: ::size_t, - ) -> *mut ::c_char; + dev: crate::dev_t, + mode: crate::mode_t, + buf: *mut c_char, + len: size_t, + ) -> *mut c_char; pub fn waitid( idtype: idtype_t, - id: ::id_t, - infop: *mut ::siginfo_t, - options: ::c_int, - ) -> ::c_int; + id: crate::id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; - pub fn freelocale(loc: ::locale_t); + pub fn freelocale(loc: crate::locale_t); pub fn lwp_rtprio( - function: ::c_int, - pid: ::pid_t, + function: c_int, + pid: crate::pid_t, lwpid: lwpid_t, rtp: *mut super::rtprio, - ) -> ::c_int; + ) -> c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; - pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> ::c_int; - - pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *mut cpu_set_t) -> ::c_int; - pub fn sched_setaffinity(pid: ::pid_t, cpusetsize: ::size_t, mask: *const cpu_set_t) - -> ::c_int; - pub fn sched_getcpu() -> ::c_int; - pub fn setproctitle(fmt: *const ::c_char, ...); - - pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn procctl(idtype: ::idtype_t, id: ::id_t, cmd: ::c_int, data: *mut ::c_void) -> ::c_int; - - pub fn updwtmpx(file: *const ::c_char, ut: *const utmpx) -> ::c_int; - pub fn getlastlogx(fname: *const ::c_char, uid: ::uid_t, ll: *mut lastlogx) -> *mut lastlogx; - pub fn updlastlogx(fname: *const ::c_char, uid: ::uid_t, ll: *mut lastlogx) -> ::c_int; - pub fn getutxuser(name: *const ::c_char) -> utmpx; - pub fn utmpxname(file: *const ::c_char) -> ::c_int; - - pub fn sys_checkpoint(tpe: ::c_int, fd: ::c_int, pid: ::pid_t, retval: ::c_int) -> ::c_int; - - pub fn umtx_sleep(ptr: *const ::c_int, value: ::c_int, timeout: ::c_int) -> ::c_int; - pub fn umtx_wakeup(ptr: *const ::c_int, count: ::c_int) -> ::c_int; - - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; - pub fn getmntinfo(mntbufp: *mut *mut ::statfs, flags: ::c_int) -> ::c_int; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; + pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; + + pub fn sched_getaffinity(pid: crate::pid_t, cpusetsize: size_t, mask: *mut cpu_set_t) -> c_int; + pub fn sched_setaffinity( + pid: crate::pid_t, + cpusetsize: size_t, + mask: *const cpu_set_t, + ) -> c_int; + pub fn sched_getcpu() -> c_int; + pub fn setproctitle(fmt: *const c_char, ...); + + pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; + pub fn procctl( + idtype: crate::idtype_t, + id: crate::id_t, + cmd: c_int, + data: *mut c_void, + ) -> c_int; + + pub fn updwtmpx(file: *const c_char, ut: *const utmpx) -> c_int; + pub fn getlastlogx(fname: *const c_char, uid: crate::uid_t, ll: *mut lastlogx) + -> *mut lastlogx; + pub fn updlastlogx(fname: *const c_char, uid: crate::uid_t, ll: *mut lastlogx) -> c_int; + pub fn getutxuser(name: *const c_char) -> utmpx; + pub fn utmpxname(file: *const c_char) -> c_int; + + pub fn sys_checkpoint(tpe: c_int, fd: c_int, pid: crate::pid_t, retval: c_int) -> c_int; + + pub fn umtx_sleep(ptr: *const c_int, value: c_int, timeout: c_int) -> c_int; + pub fn umtx_wakeup(ptr: *const c_int, count: c_int) -> c_int; + + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; + pub fn getmntinfo(mntbufp: *mut *mut crate::statfs, flags: c_int) -> c_int; pub fn getmntvinfo( - mntbufp: *mut *mut ::statfs, - mntvbufp: *mut *mut ::statvfs, - flags: ::c_int, - ) -> ::c_int; + mntbufp: *mut *mut crate::statfs, + mntvbufp: *mut *mut crate::statvfs, + flags: c_int, + ) -> c_int; } #[link(name = "rt")] extern "C" { - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, + nitems: c_int, sevp: *mut sigevent, - ) -> ::c_int; + ) -> c_int; - pub fn reallocf(ptr: *mut ::c_void, size: ::size_t) -> *mut ::c_void; - pub fn freezero(ptr: *mut ::c_void, size: ::size_t); + pub fn reallocf(ptr: *mut c_void, size: size_t) -> *mut c_void; + pub fn freezero(ptr: *mut c_void, size: size_t); } #[link(name = "kvm")] extern "C" { pub fn kvm_vm_map_entry_first( - kvm: *mut ::kvm_t, + kvm: *mut crate::kvm_t, map: vm_map_t, entry: vm_map_entry_t, ) -> vm_map_entry_t; pub fn kvm_vm_map_entry_next( - kvm: *mut ::kvm_t, + kvm: *mut crate::kvm_t, map: vm_map_entry_t, entry: vm_map_entry_t, ) -> vm_map_entry_t; diff --git a/src/unix/bsd/freebsdlike/freebsd/aarch64.rs b/src/unix/bsd/freebsdlike/freebsd/aarch64.rs index abda2c3dcd598..2e9dcdf15151e 100644 --- a/src/unix/bsd/freebsdlike/freebsd/aarch64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/aarch64.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_longlong, size_t}; + pub type c_char = u8; pub type c_long = i64; pub type c_ulong = u64; @@ -9,32 +11,32 @@ pub type register_t = i64; s_no_extra_traits! { pub struct gpregs { - pub gp_x: [::register_t; 30], - pub gp_lr: ::register_t, - pub gp_sp: ::register_t, - pub gp_elr: ::register_t, + pub gp_x: [crate::register_t; 30], + pub gp_lr: crate::register_t, + pub gp_sp: crate::register_t, + pub gp_elr: crate::register_t, pub gp_spsr: u32, - pub gp_pad: ::c_int, + pub gp_pad: c_int, } pub struct fpregs { pub fp_q: u128, pub fp_sr: u32, pub fp_cr: u32, - pub fp_flags: ::c_int, - pub fp_pad: ::c_int, + pub fp_flags: c_int, + pub fp_pad: c_int, } pub struct mcontext_t { pub mc_gpregs: gpregs, pub mc_fpregs: fpregs, - pub mc_flags: ::c_int, - pub mc_pad: ::c_int, + pub mc_flags: c_int, + pub mc_pad: c_int, pub mc_spare: [u64; 8], } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; cfg_if! { if #[cfg(feature = "extra_traits")] { @@ -49,8 +51,8 @@ cfg_if! { } } impl Eq for gpregs {} - impl ::fmt::Debug for gpregs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for gpregs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("gpregs") .field("gp_x", &self.gp_x) .field("gp_lr", &self.gp_lr) @@ -61,8 +63,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for gpregs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for gpregs { + fn hash(&self, state: &mut H) { self.gp_x.hash(state); self.gp_lr.hash(state); self.gp_sp.hash(state); @@ -81,8 +83,8 @@ cfg_if! { } } impl Eq for fpregs {} - impl ::fmt::Debug for fpregs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpregs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpregs") .field("fp_q", &self.fp_q) .field("fp_sr", &self.fp_sr) @@ -92,8 +94,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fpregs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fpregs { + fn hash(&self, state: &mut H) { self.fp_q.hash(state); self.fp_sr.hash(state); self.fp_cr.hash(state); @@ -115,8 +117,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_gpregs", &self.mc_gpregs) .field("mc_fpregs", &self.mc_fpregs) @@ -126,8 +128,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_gpregs.hash(state); self.mc_fpregs.hash(state); self.mc_flags.hash(state); @@ -138,8 +140,8 @@ cfg_if! { } } -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; -pub const MAP_32BIT: ::c_int = 0x00080000; -pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; +pub const MAP_32BIT: c_int = 0x00080000; +pub const MINSIGSTKSZ: size_t = 4096; // 1024 * 4 +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; diff --git a/src/unix/bsd/freebsdlike/freebsd/arm.rs b/src/unix/bsd/freebsdlike/freebsd/arm.rs index 37068ca35216f..c9eb88be6ebb3 100644 --- a/src/unix/bsd/freebsdlike/freebsd/arm.rs +++ b/src/unix/bsd/freebsdlike/freebsd/arm.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_uint, c_void, size_t}; + pub type c_char = u8; pub type c_long = i32; pub type c_ulong = u32; @@ -6,15 +8,15 @@ pub type wchar_t = u32; pub type time_t = i64; pub type suseconds_t = i32; pub type register_t = i32; -pub type __greg_t = ::c_uint; -pub type __gregset_t = [::__greg_t; 17]; +pub type __greg_t = c_uint; +pub type __gregset_t = [crate::__greg_t; 17]; s_no_extra_traits! { pub struct mcontext_t { - pub __gregs: ::__gregset_t, + pub __gregs: crate::__gregset_t, pub mc_vfp_size: usize, - pub mc_vfp_ptr: *mut ::c_void, - pub mc_spare: [::c_uint; 33], + pub mc_vfp_ptr: *mut c_void, + pub mc_spare: [c_uint; 33], } } @@ -33,8 +35,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("__gregs", &self.__gregs) .field("mc_vfp_size", &self.mc_vfp_size) @@ -43,8 +45,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.__gregs.hash(state); self.mc_vfp_size.hash(state); self.mc_vfp_ptr.hash(state); @@ -54,11 +56,11 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; -pub const MAP_32BIT: ::c_int = 0x00080000; -pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const MAP_32BIT: c_int = 0x00080000; +pub const MINSIGSTKSZ: size_t = 4096; // 1024 * 4 +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs index 5c1156581fd61..7e2c3058a46c6 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b32.rs @@ -1,3 +1,5 @@ +use crate::{c_long, off_t}; + #[repr(C)] #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] pub struct stat { @@ -9,24 +11,24 @@ pub struct stat { pub st_gid: ::gid_t, pub st_rdev: ::dev_t, pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime_nsec: c_long, pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime_nsec: c_long, pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_size: ::off_t, + pub st_ctime_nsec: c_long, + pub st_size: off_t, pub st_blocks: ::blkcnt_t, pub st_blksize: ::blksize_t, pub st_flags: ::fflags_t, pub st_gen: u32, pub st_lspare: i32, pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, + pub st_birthtime_nsec: c_long, __unused: [u8; 8], } -impl ::Copy for ::stat {} -impl ::Clone for ::stat { +impl Copy for ::stat {} +impl Clone for ::stat { fn clone(&self) -> ::stat { *self } diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs index f32128f775574..e4c4c064e6065 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd11/b64.rs @@ -1,3 +1,5 @@ +use crate::{c_long, off_t}; + #[repr(C)] #[cfg_attr(feature = "extra_traits", derive(Debug, Eq, Hash, PartialEq))] pub struct stat { @@ -9,23 +11,23 @@ pub struct stat { pub st_gid: ::gid_t, pub st_rdev: ::dev_t, pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime_nsec: c_long, pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime_nsec: c_long, pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_size: ::off_t, + pub st_ctime_nsec: c_long, + pub st_size: off_t, pub st_blocks: ::blkcnt_t, pub st_blksize: ::blksize_t, pub st_flags: ::fflags_t, pub st_gen: u32, pub st_lspare: i32, pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, + pub st_birthtime_nsec: c_long, } -impl ::Copy for ::stat {} -impl ::Clone for ::stat { +impl Copy for ::stat {} +impl Clone for ::stat { fn clone(&self) -> ::stat { *self } diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs index cb62ee608a8b4..d38d7584030db 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd11/mod.rs @@ -1,3 +1,7 @@ +use crate::{ + c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ushort, c_void, intptr_t, size_t, ssize_t, +}; + // APIs that were changed after FreeBSD 11 // The type of `nlink_t` changed from `u16` to `u64` in FreeBSD 12: @@ -10,21 +14,21 @@ pub type ino_t = u32; s! { pub struct kevent { pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, - pub data: ::intptr_t, - pub udata: *mut ::c_void, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, + pub data: intptr_t, + pub udata: *mut c_void, } pub struct shmid_ds { pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, + pub shm_segsz: size_t, pub shm_lpid: ::pid_t, pub shm_cpid: ::pid_t, // Type of shm_nattc changed from `int` to `shmatt_t` (aka `unsigned // int`) in FreeBSD 12: - pub shm_nattch: ::c_int, + pub shm_nattch: c_int, pub shm_atime: ::time_t, pub shm_dtime: ::time_t, pub shm_ctime: ::time_t, @@ -32,31 +36,31 @@ s! { pub struct kinfo_proc { /// Size of this structure. - pub ki_structsize: ::c_int, + pub ki_structsize: c_int, /// Reserved: layout identifier. - pub ki_layout: ::c_int, + pub ki_layout: c_int, /// Address of command arguments. pub ki_args: *mut ::pargs, // This is normally "struct proc". /// Address of proc. - pub ki_paddr: *mut ::c_void, + pub ki_paddr: *mut c_void, // This is normally "struct user". /// Kernel virtual address of u-area. - pub ki_addr: *mut ::c_void, + pub ki_addr: *mut c_void, // This is normally "struct vnode". /// Pointer to trace file. - pub ki_tracep: *mut ::c_void, + pub ki_tracep: *mut c_void, // This is normally "struct vnode". /// Pointer to executable file. - pub ki_textvp: *mut ::c_void, + pub ki_textvp: *mut c_void, // This is normally "struct filedesc". /// Pointer to open file info. - pub ki_fd: *mut ::c_void, + pub ki_fd: *mut c_void, // This is normally "struct vmspace". /// Pointer to kernel vmspace struct. - pub ki_vmspace: *mut ::c_void, + pub ki_vmspace: *mut c_void, /// Sleep address. - pub ki_wchan: *mut ::c_void, + pub ki_wchan: *mut c_void, /// Process identifier. pub ki_pid: ::pid_t, /// Parent process ID. @@ -70,9 +74,9 @@ s! { /// Terminal session ID. pub ki_tsid: ::pid_t, /// Job control counter. - pub ki_jobc: ::c_short, + pub ki_jobc: c_short, /// Unused (just here for alignment). - pub ki_spare_short1: ::c_short, + pub ki_spare_short1: c_short, /// Controlling tty dev. pub ki_tdev: ::dev_t, /// Signals arrived but not delivered. @@ -94,9 +98,9 @@ s! { /// Saved effective group ID. pub ki_svgid: ::gid_t, /// Number of groups. - pub ki_ngroups: ::c_short, + pub ki_ngroups: c_short, /// Unused (just here for alignment). - pub ki_spare_short2: ::c_short, + pub ki_spare_short2: c_short, /// Groups. pub ki_groups: [::gid_t; ::KI_NGROUPS], /// Virtual size. @@ -132,59 +136,59 @@ s! { /// Time used by process children. pub ki_childtime: ::timeval, /// P_* flags. - pub ki_flag: ::c_long, + pub ki_flag: c_long, /// KI_* flags (below). - pub ki_kiflag: ::c_long, + pub ki_kiflag: c_long, /// Kernel trace points. - pub ki_traceflag: ::c_int, + pub ki_traceflag: c_int, /// S* process status. - pub ki_stat: ::c_char, + pub ki_stat: c_char, /// Process "nice" value. pub ki_nice: i8, // signed char /// Process lock (prevent swap) count. - pub ki_lock: ::c_char, + pub ki_lock: c_char, /// Run queue index. - pub ki_rqindex: ::c_char, + pub ki_rqindex: c_char, /// Which cpu we are on. - pub ki_oncpu_old: ::c_uchar, + pub ki_oncpu_old: c_uchar, /// Last cpu we were on. - pub ki_lastcpu_old: ::c_uchar, + pub ki_lastcpu_old: c_uchar, /// Thread name. - pub ki_tdname: [::c_char; ::TDNAMLEN + 1], + pub ki_tdname: [c_char; ::TDNAMLEN + 1], /// Wchan message. - pub ki_wmesg: [::c_char; ::WMESGLEN + 1], + pub ki_wmesg: [c_char; ::WMESGLEN + 1], /// Setlogin name. - pub ki_login: [::c_char; ::LOGNAMELEN + 1], + pub ki_login: [c_char; ::LOGNAMELEN + 1], /// Lock name. - pub ki_lockname: [::c_char; ::LOCKNAMELEN + 1], + pub ki_lockname: [c_char; ::LOCKNAMELEN + 1], /// Command name. - pub ki_comm: [::c_char; ::COMMLEN + 1], + pub ki_comm: [c_char; ::COMMLEN + 1], /// Emulation name. - pub ki_emul: [::c_char; ::KI_EMULNAMELEN + 1], + pub ki_emul: [c_char; ::KI_EMULNAMELEN + 1], /// Login class. - pub ki_loginclass: [::c_char; ::LOGINCLASSLEN + 1], + pub ki_loginclass: [c_char; ::LOGINCLASSLEN + 1], /// More thread name. - pub ki_moretdname: [::c_char; ::MAXCOMLEN - ::TDNAMLEN + 1], + pub ki_moretdname: [c_char; ::MAXCOMLEN - ::TDNAMLEN + 1], /// Spare string space. - pub ki_sparestrings: [::c_char; 46], + pub ki_sparestrings: [c_char; 46], /// Spare room for growth. - pub ki_spareints: [::c_int; ::KI_NSPARE_INT], + pub ki_spareints: [c_int; ::KI_NSPARE_INT], /// Which cpu we are on. - pub ki_oncpu: ::c_int, + pub ki_oncpu: c_int, /// Last cpu we were on. - pub ki_lastcpu: ::c_int, + pub ki_lastcpu: c_int, /// PID of tracing process. - pub ki_tracer: ::c_int, + pub ki_tracer: c_int, /// P2_* flags. - pub ki_flag2: ::c_int, + pub ki_flag2: c_int, /// Default FIB number. - pub ki_fibnum: ::c_int, + pub ki_fibnum: c_int, /// Credential flags. pub ki_cr_flags: ::u_int, /// Process jail ID. - pub ki_jid: ::c_int, + pub ki_jid: c_int, /// Number of threads in total. - pub ki_numthreads: ::c_int, + pub ki_numthreads: c_int, /// Thread ID. pub ki_tid: ::lwpid_t, /// Process priority. @@ -195,19 +199,19 @@ s! { pub ki_rusage_ch: ::rusage, // This is normally "struct pcb". /// Kernel virtual addr of pcb. - pub ki_pcb: *mut ::c_void, + pub ki_pcb: *mut c_void, /// Kernel virtual addr of stack. - pub ki_kstack: *mut ::c_void, + pub ki_kstack: *mut c_void, /// User convenience pointer. - pub ki_udata: *mut ::c_void, + pub ki_udata: *mut c_void, // This is normally "struct thread". - pub ki_tdaddr: *mut ::c_void, - pub ki_spareptrs: [*mut ::c_void; ::KI_NSPARE_PTR], - pub ki_sparelongs: [::c_long; ::KI_NSPARE_LONG], + pub ki_tdaddr: *mut c_void, + pub ki_spareptrs: [*mut c_void; ::KI_NSPARE_PTR], + pub ki_sparelongs: [c_long; ::KI_NSPARE_LONG], /// PS_* flags. - pub ki_sflag: ::c_long, + pub ki_sflag: c_long, /// kthread flag. - pub ki_tdflags: ::c_long, + pub ki_tdflags: c_long, } } @@ -218,7 +222,7 @@ s_no_extra_traits! { pub d_type: u8, // Type of `d_namlen` changed from `char` to `u16` in FreeBSD 12: pub d_namlen: u8, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct statfs { @@ -240,23 +244,23 @@ s_no_extra_traits! { pub f_namemax: u32, pub f_owner: ::uid_t, pub f_fsid: ::fsid_t, - f_charspare: [::c_char; 80], - pub f_fstypename: [::c_char; 16], + f_charspare: [c_char; 80], + pub f_fstypename: [c_char; 16], // Array length changed from 88 to 1024 in FreeBSD 12: - pub f_mntfromname: [::c_char; 88], + pub f_mntfromname: [c_char; 88], // Array length changed from 88 to 1024 in FreeBSD 12: - pub f_mntonname: [::c_char; 88], + pub f_mntonname: [c_char; 88], } pub struct vnstat { pub vn_fileid: u64, pub vn_size: u64, - pub vn_mntdir: *mut ::c_char, + pub vn_mntdir: *mut c_char, pub vn_dev: u32, pub vn_fsid: u32, - pub vn_type: ::c_int, + pub vn_type: c_int, pub vn_mode: u16, - pub vn_devname: [::c_char; ::SPECNAMELEN as usize + 1], + pub vn_devname: [c_char; ::SPECNAMELEN as usize + 1], } } @@ -379,8 +383,8 @@ cfg_if! { impl PartialEq for vnstat { fn eq(&self, other: &vnstat) -> bool { - let self_vn_devname: &[::c_char] = &self.vn_devname; - let other_vn_devname: &[::c_char] = &other.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; + let other_vn_devname: &[c_char] = &other.vn_devname; self.vn_fileid == other.vn_fileid && self.vn_size == other.vn_size @@ -395,7 +399,7 @@ cfg_if! { impl Eq for vnstat {} impl ::fmt::Debug for vnstat { fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let self_vn_devname: &[::c_char] = &self.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; f.debug_struct("vnstat") .field("vn_fileid", &self.vn_fileid) @@ -411,7 +415,7 @@ cfg_if! { } impl ::hash::Hash for vnstat { fn hash(&self, state: &mut H) { - let self_vn_devname: &[::c_char] = &self.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; self.vn_fileid.hash(state); self.vn_size.hash(state); @@ -426,15 +430,15 @@ cfg_if! { } } -pub const ELAST: ::c_int = 96; -pub const RAND_MAX: ::c_int = 0x7fff_fffd; +pub const ELAST: c_int = 96; +pub const RAND_MAX: c_int = 0x7fff_fffd; pub const KI_NSPARE_PTR: usize = 6; -pub const MINCORE_SUPER: ::c_int = 0x20; +pub const MINCORE_SUPER: c_int = 0x20; /// max length of devicename -pub const SPECNAMELEN: ::c_int = 63; +pub const SPECNAMELEN: c_int = 63; safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { + pub {const} fn makedev(major: c_uint, minor: c_uint) -> ::dev_t { let major = major as ::dev_t; let minor = minor as ::dev_t; (major << 8) | minor @@ -442,39 +446,39 @@ safe_f! { } f! { - pub fn major(dev: ::dev_t) -> ::c_int { - ((dev >> 8) & 0xff) as ::c_int + pub fn major(dev: ::dev_t) -> c_int { + ((dev >> 8) & 0xff) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - (dev & 0xffff00ff) as ::c_int + pub fn minor(dev: ::dev_t) -> c_int { + (dev & 0xffff00ff) as c_int } } extern "C" { - // Return type ::c_int was removed in FreeBSD 12 - pub fn setgrent() -> ::c_int; + // Return type c_int was removed in FreeBSD 12 + pub fn setgrent() -> c_int; // Type of `addr` argument changed from `const void*` to `void*` // in FreeBSD 12 - pub fn mprotect(addr: *const ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; + pub fn mprotect(addr: *const c_void, len: size_t, prot: c_int) -> c_int; - // Return type ::c_int was removed in FreeBSD 12 - pub fn freelocale(loc: ::locale_t) -> ::c_int; + // Return type c_int was removed in FreeBSD 12 + pub fn freelocale(loc: ::locale_t) -> c_int; - // Return type ::c_int changed to ::ssize_t in FreeBSD 12: + // Return type c_int changed to ssize_t in FreeBSD 12: pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::c_int; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> c_int; // Type of `path` argument changed from `const void*` to `void*` // in FreeBSD 12 - pub fn dirname(path: *const ::c_char) -> *mut ::c_char; - pub fn basename(path: *const ::c_char) -> *mut ::c_char; + pub fn dirname(path: *const c_char) -> *mut c_char; + pub fn basename(path: *const c_char) -> *mut c_char; } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs index c2a168a501e58..19809e5a134c3 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd12/mod.rs @@ -1,254 +1,259 @@ +use crate::{ + c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, + ssize_t, +}; + // APIs in FreeBSD 12 that have changed since 11. pub type nlink_t = u64; pub type dev_t = u64; pub type ino_t = u64; -pub type shmatt_t = ::c_uint; +pub type shmatt_t = c_uint; s! { pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, } pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, + pub ident: crate::uintptr_t, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, pub data: i64, - pub udata: *mut ::c_void, + pub udata: *mut c_void, pub ext: [u64; 4], } pub struct kvm_page { - pub version: ::c_uint, - pub paddr: ::c_ulong, - pub kmap_vaddr: ::c_ulong, - pub dmap_vaddr: ::c_ulong, - pub prot: ::vm_prot_t, - pub offset: ::u_long, - pub len: ::size_t, + pub version: c_uint, + pub paddr: c_ulong, + pub kmap_vaddr: c_ulong, + pub dmap_vaddr: c_ulong, + pub prot: crate::vm_prot_t, + pub offset: crate::u_long, + pub len: size_t, } pub struct kinfo_proc { /// Size of this structure. - pub ki_structsize: ::c_int, + pub ki_structsize: c_int, /// Reserved: layout identifier. - pub ki_layout: ::c_int, + pub ki_layout: c_int, /// Address of command arguments. - pub ki_args: *mut ::pargs, + pub ki_args: *mut crate::pargs, // This is normally "struct proc". /// Address of proc. - pub ki_paddr: *mut ::c_void, + pub ki_paddr: *mut c_void, // This is normally "struct user". /// Kernel virtual address of u-area. - pub ki_addr: *mut ::c_void, + pub ki_addr: *mut c_void, // This is normally "struct vnode". /// Pointer to trace file. - pub ki_tracep: *mut ::c_void, + pub ki_tracep: *mut c_void, // This is normally "struct vnode". /// Pointer to executable file. - pub ki_textvp: *mut ::c_void, + pub ki_textvp: *mut c_void, // This is normally "struct filedesc". /// Pointer to open file info. - pub ki_fd: *mut ::c_void, + pub ki_fd: *mut c_void, // This is normally "struct vmspace". /// Pointer to kernel vmspace struct. - pub ki_vmspace: *mut ::c_void, + pub ki_vmspace: *mut c_void, /// Sleep address. - pub ki_wchan: *mut ::c_void, + pub ki_wchan: *mut c_void, /// Process identifier. - pub ki_pid: ::pid_t, + pub ki_pid: crate::pid_t, /// Parent process ID. - pub ki_ppid: ::pid_t, + pub ki_ppid: crate::pid_t, /// Process group ID. - pub ki_pgid: ::pid_t, + pub ki_pgid: crate::pid_t, /// tty process group ID. - pub ki_tpgid: ::pid_t, + pub ki_tpgid: crate::pid_t, /// Process session ID. - pub ki_sid: ::pid_t, + pub ki_sid: crate::pid_t, /// Terminal session ID. - pub ki_tsid: ::pid_t, + pub ki_tsid: crate::pid_t, /// Job control counter. - pub ki_jobc: ::c_short, + pub ki_jobc: c_short, /// Unused (just here for alignment). - pub ki_spare_short1: ::c_short, + pub ki_spare_short1: c_short, /// Controlling tty dev. pub ki_tdev_freebsd11: u32, /// Signals arrived but not delivered. - pub ki_siglist: ::sigset_t, + pub ki_siglist: crate::sigset_t, /// Current signal mask. - pub ki_sigmask: ::sigset_t, + pub ki_sigmask: crate::sigset_t, /// Signals being ignored. - pub ki_sigignore: ::sigset_t, + pub ki_sigignore: crate::sigset_t, /// Signals being caught by user. - pub ki_sigcatch: ::sigset_t, + pub ki_sigcatch: crate::sigset_t, /// Effective user ID. - pub ki_uid: ::uid_t, + pub ki_uid: crate::uid_t, /// Real user ID. - pub ki_ruid: ::uid_t, + pub ki_ruid: crate::uid_t, /// Saved effective user ID. - pub ki_svuid: ::uid_t, + pub ki_svuid: crate::uid_t, /// Real group ID. - pub ki_rgid: ::gid_t, + pub ki_rgid: crate::gid_t, /// Saved effective group ID. - pub ki_svgid: ::gid_t, + pub ki_svgid: crate::gid_t, /// Number of groups. - pub ki_ngroups: ::c_short, + pub ki_ngroups: c_short, /// Unused (just here for alignment). - pub ki_spare_short2: ::c_short, + pub ki_spare_short2: c_short, /// Groups. - pub ki_groups: [::gid_t; ::KI_NGROUPS], + pub ki_groups: [crate::gid_t; crate::KI_NGROUPS], /// Virtual size. - pub ki_size: ::vm_size_t, + pub ki_size: crate::vm_size_t, /// Current resident set size in pages. - pub ki_rssize: ::segsz_t, + pub ki_rssize: crate::segsz_t, /// Resident set size before last swap. - pub ki_swrss: ::segsz_t, + pub ki_swrss: crate::segsz_t, /// Text size (pages) XXX. - pub ki_tsize: ::segsz_t, + pub ki_tsize: crate::segsz_t, /// Data size (pages) XXX. - pub ki_dsize: ::segsz_t, + pub ki_dsize: crate::segsz_t, /// Stack size (pages). - pub ki_ssize: ::segsz_t, + pub ki_ssize: crate::segsz_t, /// Exit status for wait & stop signal. - pub ki_xstat: ::u_short, + pub ki_xstat: crate::u_short, /// Accounting flags. - pub ki_acflag: ::u_short, + pub ki_acflag: crate::u_short, /// %cpu for process during `ki_swtime`. - pub ki_pctcpu: ::fixpt_t, + pub ki_pctcpu: crate::fixpt_t, /// Time averaged value of `ki_cpticks`. - pub ki_estcpu: ::u_int, + pub ki_estcpu: crate::u_int, /// Time since last blocked. - pub ki_slptime: ::u_int, + pub ki_slptime: crate::u_int, /// Time swapped in or out. - pub ki_swtime: ::u_int, + pub ki_swtime: crate::u_int, /// Number of copy-on-write faults. - pub ki_cow: ::u_int, + pub ki_cow: crate::u_int, /// Real time in microsec. pub ki_runtime: u64, /// Starting time. - pub ki_start: ::timeval, + pub ki_start: crate::timeval, /// Time used by process children. - pub ki_childtime: ::timeval, + pub ki_childtime: crate::timeval, /// P_* flags. - pub ki_flag: ::c_long, + pub ki_flag: c_long, /// KI_* flags (below). - pub ki_kiflag: ::c_long, + pub ki_kiflag: c_long, /// Kernel trace points. - pub ki_traceflag: ::c_int, + pub ki_traceflag: c_int, /// S* process status. - pub ki_stat: ::c_char, + pub ki_stat: c_char, /// Process "nice" value. pub ki_nice: i8, // signed char /// Process lock (prevent swap) count. - pub ki_lock: ::c_char, + pub ki_lock: c_char, /// Run queue index. - pub ki_rqindex: ::c_char, + pub ki_rqindex: c_char, /// Which cpu we are on. - pub ki_oncpu_old: ::c_uchar, + pub ki_oncpu_old: c_uchar, /// Last cpu we were on. - pub ki_lastcpu_old: ::c_uchar, + pub ki_lastcpu_old: c_uchar, /// Thread name. - pub ki_tdname: [::c_char; ::TDNAMLEN + 1], + pub ki_tdname: [c_char; crate::TDNAMLEN + 1], /// Wchan message. - pub ki_wmesg: [::c_char; ::WMESGLEN + 1], + pub ki_wmesg: [c_char; crate::WMESGLEN + 1], /// Setlogin name. - pub ki_login: [::c_char; ::LOGNAMELEN + 1], + pub ki_login: [c_char; crate::LOGNAMELEN + 1], /// Lock name. - pub ki_lockname: [::c_char; ::LOCKNAMELEN + 1], + pub ki_lockname: [c_char; crate::LOCKNAMELEN + 1], /// Command name. - pub ki_comm: [::c_char; ::COMMLEN + 1], + pub ki_comm: [c_char; crate::COMMLEN + 1], /// Emulation name. - pub ki_emul: [::c_char; ::KI_EMULNAMELEN + 1], + pub ki_emul: [c_char; crate::KI_EMULNAMELEN + 1], /// Login class. - pub ki_loginclass: [::c_char; ::LOGINCLASSLEN + 1], + pub ki_loginclass: [c_char; crate::LOGINCLASSLEN + 1], /// More thread name. - pub ki_moretdname: [::c_char; ::MAXCOMLEN - ::TDNAMLEN + 1], + pub ki_moretdname: [c_char; crate::MAXCOMLEN - crate::TDNAMLEN + 1], /// Spare string space. - pub ki_sparestrings: [::c_char; 46], + pub ki_sparestrings: [c_char; 46], /// Spare room for growth. - pub ki_spareints: [::c_int; ::KI_NSPARE_INT], + pub ki_spareints: [c_int; crate::KI_NSPARE_INT], /// Controlling tty dev. - pub ki_tdev: ::dev_t, + pub ki_tdev: crate::dev_t, /// Which cpu we are on. - pub ki_oncpu: ::c_int, + pub ki_oncpu: c_int, /// Last cpu we were on. - pub ki_lastcpu: ::c_int, + pub ki_lastcpu: c_int, /// PID of tracing process. - pub ki_tracer: ::c_int, + pub ki_tracer: c_int, /// P2_* flags. - pub ki_flag2: ::c_int, + pub ki_flag2: c_int, /// Default FIB number. - pub ki_fibnum: ::c_int, + pub ki_fibnum: c_int, /// Credential flags. - pub ki_cr_flags: ::u_int, + pub ki_cr_flags: crate::u_int, /// Process jail ID. - pub ki_jid: ::c_int, + pub ki_jid: c_int, /// Number of threads in total. - pub ki_numthreads: ::c_int, + pub ki_numthreads: c_int, /// Thread ID. - pub ki_tid: ::lwpid_t, + pub ki_tid: crate::lwpid_t, /// Process priority. - pub ki_pri: ::priority, + pub ki_pri: crate::priority, /// Process rusage statistics. - pub ki_rusage: ::rusage, + pub ki_rusage: crate::rusage, /// rusage of children processes. - pub ki_rusage_ch: ::rusage, + pub ki_rusage_ch: crate::rusage, // This is normally "struct pcb". /// Kernel virtual addr of pcb. - pub ki_pcb: *mut ::c_void, + pub ki_pcb: *mut c_void, /// Kernel virtual addr of stack. - pub ki_kstack: *mut ::c_void, + pub ki_kstack: *mut c_void, /// User convenience pointer. - pub ki_udata: *mut ::c_void, + pub ki_udata: *mut c_void, // This is normally "struct thread". - pub ki_tdaddr: *mut ::c_void, - pub ki_spareptrs: [*mut ::c_void; ::KI_NSPARE_PTR], - pub ki_sparelongs: [::c_long; ::KI_NSPARE_LONG], + pub ki_tdaddr: *mut c_void, + pub ki_spareptrs: [*mut c_void; crate::KI_NSPARE_PTR], + pub ki_sparelongs: [c_long; crate::KI_NSPARE_LONG], /// PS_* flags. - pub ki_sflag: ::c_long, + pub ki_sflag: c_long, /// kthread flag. - pub ki_tdflags: ::c_long, + pub ki_tdflags: c_long, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, st_padding0: i16, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, st_padding1: i32, - pub st_rdev: ::dev_t, + pub st_rdev: crate::dev_t, #[cfg(target_arch = "x86")] st_atim_ext: i32, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, #[cfg(target_arch = "x86")] st_mtim_ext: i32, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, #[cfg(target_arch = "x86")] st_ctim_ext: i32, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, #[cfg(target_arch = "x86")] st_btim_ext: i32, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::fflags_t, + pub st_birthtime: crate::time_t, + pub st_birthtime_nsec: c_long, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, + pub st_blksize: crate::blksize_t, + pub st_flags: crate::fflags_t, pub st_gen: u64, pub st_spare: [u64; 10], } @@ -256,14 +261,14 @@ s! { s_no_extra_traits! { pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, + pub d_fileno: crate::ino_t, + pub d_off: off_t, pub d_reclen: u16, pub d_type: u8, d_pad0: u8, pub d_namlen: u16, d_pad1: u16, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct statfs { @@ -283,12 +288,12 @@ s_no_extra_traits! { pub f_asyncreads: u64, f_spare: [u64; 10], pub f_namemax: u32, - pub f_owner: ::uid_t, - pub f_fsid: ::fsid_t, - f_charspare: [::c_char; 80], - pub f_fstypename: [::c_char; 16], - pub f_mntfromname: [::c_char; 1024], - pub f_mntonname: [::c_char; 1024], + pub f_owner: crate::uid_t, + pub f_fsid: crate::fsid_t, + f_charspare: [c_char; 80], + pub f_fstypename: [c_char; 16], + pub f_mntfromname: [c_char; 1024], + pub f_mntonname: [c_char; 1024], } pub struct vnstat { @@ -296,10 +301,10 @@ s_no_extra_traits! { pub vn_size: u64, pub vn_dev: u64, pub vn_fsid: u64, - pub vn_mntdir: *mut ::c_char, - pub vn_type: ::c_int, + pub vn_mntdir: *mut c_char, + pub vn_type: c_int, pub vn_mode: u16, - pub vn_devname: [::c_char; ::SPECNAMELEN as usize + 1], + pub vn_devname: [c_char; crate::SPECNAMELEN as usize + 1], } } @@ -338,8 +343,8 @@ cfg_if! { } } impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_bsize", &self.f_bsize) .field("f_iosize", &self.f_iosize) @@ -361,8 +366,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_version.hash(state); self.f_type.hash(state); self.f_flags.hash(state); @@ -401,8 +406,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_off", &self.d_off) @@ -413,8 +418,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -426,8 +431,8 @@ cfg_if! { impl PartialEq for vnstat { fn eq(&self, other: &vnstat) -> bool { - let self_vn_devname: &[::c_char] = &self.vn_devname; - let other_vn_devname: &[::c_char] = &other.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; + let other_vn_devname: &[c_char] = &other.vn_devname; self.vn_fileid == other.vn_fileid && self.vn_size == other.vn_size @@ -440,9 +445,9 @@ cfg_if! { } } impl Eq for vnstat {} - impl ::fmt::Debug for vnstat { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::fmt::Debug for vnstat { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let self_vn_devname: &[c_char] = &self.vn_devname; f.debug_struct("vnstat") .field("vn_fileid", &self.vn_fileid) @@ -456,9 +461,9 @@ cfg_if! { .finish() } } - impl ::hash::Hash for vnstat { - fn hash(&self, state: &mut H) { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::hash::Hash for vnstat { + fn hash(&self, state: &mut H) { + let self_vn_devname: &[c_char] = &self.vn_devname; self.vn_fileid.hash(state); self.vn_size.hash(state); @@ -473,19 +478,19 @@ cfg_if! { } } -pub const RAND_MAX: ::c_int = 0x7fff_fffd; -pub const ELAST: ::c_int = 97; +pub const RAND_MAX: c_int = 0x7fff_fffd; +pub const ELAST: c_int = 97; /// max length of devicename -pub const SPECNAMELEN: ::c_int = 63; +pub const SPECNAMELEN: c_int = 63; pub const KI_NSPARE_PTR: usize = 6; -pub const MINCORE_SUPER: ::c_int = 0x20; +pub const MINCORE_SUPER: c_int = 0x20; safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= ((major & 0xffffff00) as dev_t) << 32; dev |= ((major & 0x000000ff) as dev_t) << 8; @@ -496,29 +501,29 @@ safe_f! { } f! { - pub fn major(dev: ::dev_t) -> ::c_int { - (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as ::c_int + pub fn minor(dev: crate::dev_t) -> c_int { + (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } extern "C" { pub fn setgrent(); - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn freelocale(loc: ::locale_t); + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn freelocale(loc: crate::locale_t); pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs index 7bf2534455bf9..24713993f90a7 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd12/x86_64.rs @@ -1,5 +1,7 @@ -pub const PROC_KPTI_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN; -pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1; -pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2; -pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000; +use crate::c_int; + +pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; +pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; +pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; +pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs index a663a3b5db1a7..16bb3ceb97668 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd13/mod.rs @@ -1,267 +1,272 @@ +use crate::{ + c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, + ssize_t, +}; + // APIs in FreeBSD 13 that have changed since 11. pub type nlink_t = u64; pub type dev_t = u64; pub type ino_t = u64; -pub type shmatt_t = ::c_uint; +pub type shmatt_t = c_uint; pub type kpaddr_t = u64; pub type kssize_t = i64; pub type domainset_t = __c_anonymous_domainset; s! { pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, } pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, + pub ident: crate::uintptr_t, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, pub data: i64, - pub udata: *mut ::c_void, + pub udata: *mut c_void, pub ext: [u64; 4], } pub struct kvm_page { - pub kp_version: ::u_int, - pub kp_paddr: ::kpaddr_t, - pub kp_kmap_vaddr: ::kvaddr_t, - pub kp_dmap_vaddr: ::kvaddr_t, - pub kp_prot: ::vm_prot_t, - pub kp_offset: ::off_t, - pub kp_len: ::size_t, + pub kp_version: crate::u_int, + pub kp_paddr: crate::kpaddr_t, + pub kp_kmap_vaddr: crate::kvaddr_t, + pub kp_dmap_vaddr: crate::kvaddr_t, + pub kp_prot: crate::vm_prot_t, + pub kp_offset: off_t, + pub kp_len: size_t, } pub struct __c_anonymous_domainset { #[cfg(target_pointer_width = "64")] - _priv: [::c_ulong; 4], + _priv: [c_ulong; 4], #[cfg(target_pointer_width = "32")] - _priv: [::c_ulong; 8], + _priv: [c_ulong; 8], } pub struct kinfo_proc { /// Size of this structure. - pub ki_structsize: ::c_int, + pub ki_structsize: c_int, /// Reserved: layout identifier. - pub ki_layout: ::c_int, + pub ki_layout: c_int, /// Address of command arguments. - pub ki_args: *mut ::pargs, + pub ki_args: *mut crate::pargs, // This is normally "struct proc". /// Address of proc. - pub ki_paddr: *mut ::c_void, + pub ki_paddr: *mut c_void, // This is normally "struct user". /// Kernel virtual address of u-area. - pub ki_addr: *mut ::c_void, + pub ki_addr: *mut c_void, // This is normally "struct vnode". /// Pointer to trace file. - pub ki_tracep: *mut ::c_void, + pub ki_tracep: *mut c_void, // This is normally "struct vnode". /// Pointer to executable file. - pub ki_textvp: *mut ::c_void, + pub ki_textvp: *mut c_void, // This is normally "struct filedesc". /// Pointer to open file info. - pub ki_fd: *mut ::c_void, + pub ki_fd: *mut c_void, // This is normally "struct vmspace". /// Pointer to kernel vmspace struct. - pub ki_vmspace: *mut ::c_void, + pub ki_vmspace: *mut c_void, /// Sleep address. - pub ki_wchan: *const ::c_void, + pub ki_wchan: *const c_void, /// Process identifier. - pub ki_pid: ::pid_t, + pub ki_pid: crate::pid_t, /// Parent process ID. - pub ki_ppid: ::pid_t, + pub ki_ppid: crate::pid_t, /// Process group ID. - pub ki_pgid: ::pid_t, + pub ki_pgid: crate::pid_t, /// tty process group ID. - pub ki_tpgid: ::pid_t, + pub ki_tpgid: crate::pid_t, /// Process session ID. - pub ki_sid: ::pid_t, + pub ki_sid: crate::pid_t, /// Terminal session ID. - pub ki_tsid: ::pid_t, + pub ki_tsid: crate::pid_t, /// Job control counter. - pub ki_jobc: ::c_short, + pub ki_jobc: c_short, /// Unused (just here for alignment). - pub ki_spare_short1: ::c_short, + pub ki_spare_short1: c_short, /// Controlling tty dev. pub ki_tdev_freebsd11: u32, /// Signals arrived but not delivered. - pub ki_siglist: ::sigset_t, + pub ki_siglist: crate::sigset_t, /// Current signal mask. - pub ki_sigmask: ::sigset_t, + pub ki_sigmask: crate::sigset_t, /// Signals being ignored. - pub ki_sigignore: ::sigset_t, + pub ki_sigignore: crate::sigset_t, /// Signals being caught by user. - pub ki_sigcatch: ::sigset_t, + pub ki_sigcatch: crate::sigset_t, /// Effective user ID. - pub ki_uid: ::uid_t, + pub ki_uid: crate::uid_t, /// Real user ID. - pub ki_ruid: ::uid_t, + pub ki_ruid: crate::uid_t, /// Saved effective user ID. - pub ki_svuid: ::uid_t, + pub ki_svuid: crate::uid_t, /// Real group ID. - pub ki_rgid: ::gid_t, + pub ki_rgid: crate::gid_t, /// Saved effective group ID. - pub ki_svgid: ::gid_t, + pub ki_svgid: crate::gid_t, /// Number of groups. - pub ki_ngroups: ::c_short, + pub ki_ngroups: c_short, /// Unused (just here for alignment). - pub ki_spare_short2: ::c_short, + pub ki_spare_short2: c_short, /// Groups. - pub ki_groups: [::gid_t; ::KI_NGROUPS], + pub ki_groups: [crate::gid_t; crate::KI_NGROUPS], /// Virtual size. - pub ki_size: ::vm_size_t, + pub ki_size: crate::vm_size_t, /// Current resident set size in pages. - pub ki_rssize: ::segsz_t, + pub ki_rssize: crate::segsz_t, /// Resident set size before last swap. - pub ki_swrss: ::segsz_t, + pub ki_swrss: crate::segsz_t, /// Text size (pages) XXX. - pub ki_tsize: ::segsz_t, + pub ki_tsize: crate::segsz_t, /// Data size (pages) XXX. - pub ki_dsize: ::segsz_t, + pub ki_dsize: crate::segsz_t, /// Stack size (pages). - pub ki_ssize: ::segsz_t, + pub ki_ssize: crate::segsz_t, /// Exit status for wait & stop signal. - pub ki_xstat: ::u_short, + pub ki_xstat: crate::u_short, /// Accounting flags. - pub ki_acflag: ::u_short, + pub ki_acflag: crate::u_short, /// %cpu for process during `ki_swtime`. - pub ki_pctcpu: ::fixpt_t, + pub ki_pctcpu: crate::fixpt_t, /// Time averaged value of `ki_cpticks`. - pub ki_estcpu: ::u_int, + pub ki_estcpu: crate::u_int, /// Time since last blocked. - pub ki_slptime: ::u_int, + pub ki_slptime: crate::u_int, /// Time swapped in or out. - pub ki_swtime: ::u_int, + pub ki_swtime: crate::u_int, /// Number of copy-on-write faults. - pub ki_cow: ::u_int, + pub ki_cow: crate::u_int, /// Real time in microsec. pub ki_runtime: u64, /// Starting time. - pub ki_start: ::timeval, + pub ki_start: crate::timeval, /// Time used by process children. - pub ki_childtime: ::timeval, + pub ki_childtime: crate::timeval, /// P_* flags. - pub ki_flag: ::c_long, + pub ki_flag: c_long, /// KI_* flags (below). - pub ki_kiflag: ::c_long, + pub ki_kiflag: c_long, /// Kernel trace points. - pub ki_traceflag: ::c_int, + pub ki_traceflag: c_int, /// S* process status. - pub ki_stat: ::c_char, + pub ki_stat: c_char, /// Process "nice" value. pub ki_nice: i8, // signed char /// Process lock (prevent swap) count. - pub ki_lock: ::c_char, + pub ki_lock: c_char, /// Run queue index. - pub ki_rqindex: ::c_char, + pub ki_rqindex: c_char, /// Which cpu we are on. - pub ki_oncpu_old: ::c_uchar, + pub ki_oncpu_old: c_uchar, /// Last cpu we were on. - pub ki_lastcpu_old: ::c_uchar, + pub ki_lastcpu_old: c_uchar, /// Thread name. - pub ki_tdname: [::c_char; ::TDNAMLEN + 1], + pub ki_tdname: [c_char; crate::TDNAMLEN + 1], /// Wchan message. - pub ki_wmesg: [::c_char; ::WMESGLEN + 1], + pub ki_wmesg: [c_char; crate::WMESGLEN + 1], /// Setlogin name. - pub ki_login: [::c_char; ::LOGNAMELEN + 1], + pub ki_login: [c_char; crate::LOGNAMELEN + 1], /// Lock name. - pub ki_lockname: [::c_char; ::LOCKNAMELEN + 1], + pub ki_lockname: [c_char; crate::LOCKNAMELEN + 1], /// Command name. - pub ki_comm: [::c_char; ::COMMLEN + 1], + pub ki_comm: [c_char; crate::COMMLEN + 1], /// Emulation name. - pub ki_emul: [::c_char; ::KI_EMULNAMELEN + 1], + pub ki_emul: [c_char; crate::KI_EMULNAMELEN + 1], /// Login class. - pub ki_loginclass: [::c_char; ::LOGINCLASSLEN + 1], + pub ki_loginclass: [c_char; crate::LOGINCLASSLEN + 1], /// More thread name. - pub ki_moretdname: [::c_char; ::MAXCOMLEN - ::TDNAMLEN + 1], + pub ki_moretdname: [c_char; crate::MAXCOMLEN - crate::TDNAMLEN + 1], /// Spare string space. - pub ki_sparestrings: [::c_char; 46], + pub ki_sparestrings: [c_char; 46], /// Spare room for growth. - pub ki_spareints: [::c_int; ::KI_NSPARE_INT], + pub ki_spareints: [c_int; crate::KI_NSPARE_INT], /// Controlling tty dev. pub ki_tdev: u64, /// Which cpu we are on. - pub ki_oncpu: ::c_int, + pub ki_oncpu: c_int, /// Last cpu we were on. - pub ki_lastcpu: ::c_int, + pub ki_lastcpu: c_int, /// PID of tracing process. - pub ki_tracer: ::c_int, + pub ki_tracer: c_int, /// P2_* flags. - pub ki_flag2: ::c_int, + pub ki_flag2: c_int, /// Default FIB number. - pub ki_fibnum: ::c_int, + pub ki_fibnum: c_int, /// Credential flags. - pub ki_cr_flags: ::u_int, + pub ki_cr_flags: crate::u_int, /// Process jail ID. - pub ki_jid: ::c_int, + pub ki_jid: c_int, /// Number of threads in total. - pub ki_numthreads: ::c_int, + pub ki_numthreads: c_int, /// Thread ID. - pub ki_tid: ::lwpid_t, + pub ki_tid: crate::lwpid_t, /// Process priority. - pub ki_pri: ::priority, + pub ki_pri: crate::priority, /// Process rusage statistics. - pub ki_rusage: ::rusage, + pub ki_rusage: crate::rusage, /// rusage of children processes. - pub ki_rusage_ch: ::rusage, + pub ki_rusage_ch: crate::rusage, // This is normally "struct pcb". /// Kernel virtual addr of pcb. - pub ki_pcb: *mut ::c_void, + pub ki_pcb: *mut c_void, /// Kernel virtual addr of stack. - pub ki_kstack: *mut ::c_void, + pub ki_kstack: *mut c_void, /// User convenience pointer. - pub ki_udata: *mut ::c_void, + pub ki_udata: *mut c_void, // This is normally "struct thread". - pub ki_tdaddr: *mut ::c_void, + pub ki_tdaddr: *mut c_void, // This is normally "struct pwddesc". /// Pointer to process paths info. - pub ki_pd: *mut ::c_void, - pub ki_spareptrs: [*mut ::c_void; ::KI_NSPARE_PTR], - pub ki_sparelongs: [::c_long; ::KI_NSPARE_LONG], + pub ki_pd: *mut c_void, + pub ki_spareptrs: [*mut c_void; crate::KI_NSPARE_PTR], + pub ki_sparelongs: [c_long; crate::KI_NSPARE_LONG], /// PS_* flags. - pub ki_sflag: ::c_long, + pub ki_sflag: c_long, /// kthread flag. - pub ki_tdflags: ::c_long, + pub ki_tdflags: c_long, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, st_padding0: i16, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, st_padding1: i32, - pub st_rdev: ::dev_t, + pub st_rdev: crate::dev_t, #[cfg(target_arch = "x86")] st_atim_ext: i32, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, #[cfg(target_arch = "x86")] st_mtim_ext: i32, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, #[cfg(target_arch = "x86")] st_ctim_ext: i32, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, #[cfg(target_arch = "x86")] st_btim_ext: i32, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::fflags_t, + pub st_birthtime: crate::time_t, + pub st_birthtime_nsec: c_long, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, + pub st_blksize: crate::blksize_t, + pub st_flags: crate::fflags_t, pub st_gen: u64, pub st_spare: [u64; 10], } @@ -269,14 +274,14 @@ s! { s_no_extra_traits! { pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, + pub d_fileno: crate::ino_t, + pub d_off: off_t, pub d_reclen: u16, pub d_type: u8, d_pad0: u8, pub d_namlen: u16, d_pad1: u16, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct statfs { @@ -296,12 +301,12 @@ s_no_extra_traits! { pub f_asyncreads: u64, f_spare: [u64; 10], pub f_namemax: u32, - pub f_owner: ::uid_t, - pub f_fsid: ::fsid_t, - f_charspare: [::c_char; 80], - pub f_fstypename: [::c_char; 16], - pub f_mntfromname: [::c_char; 1024], - pub f_mntonname: [::c_char; 1024], + pub f_owner: crate::uid_t, + pub f_fsid: crate::fsid_t, + f_charspare: [c_char; 80], + pub f_fstypename: [c_char; 16], + pub f_mntfromname: [c_char; 1024], + pub f_mntonname: [c_char; 1024], } pub struct vnstat { @@ -309,10 +314,10 @@ s_no_extra_traits! { pub vn_size: u64, pub vn_dev: u64, pub vn_fsid: u64, - pub vn_mntdir: *mut ::c_char, - pub vn_type: ::c_int, + pub vn_mntdir: *mut c_char, + pub vn_type: c_int, pub vn_mode: u16, - pub vn_devname: [::c_char; ::SPECNAMELEN as usize + 1], + pub vn_devname: [c_char; crate::SPECNAMELEN as usize + 1], } } @@ -351,8 +356,8 @@ cfg_if! { } } impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_bsize", &self.f_bsize) .field("f_iosize", &self.f_iosize) @@ -374,8 +379,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_version.hash(state); self.f_type.hash(state); self.f_flags.hash(state); @@ -414,8 +419,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_off", &self.d_off) @@ -426,8 +431,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -439,8 +444,8 @@ cfg_if! { impl PartialEq for vnstat { fn eq(&self, other: &vnstat) -> bool { - let self_vn_devname: &[::c_char] = &self.vn_devname; - let other_vn_devname: &[::c_char] = &other.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; + let other_vn_devname: &[c_char] = &other.vn_devname; self.vn_fileid == other.vn_fileid && self.vn_size == other.vn_size @@ -453,9 +458,9 @@ cfg_if! { } } impl Eq for vnstat {} - impl ::fmt::Debug for vnstat { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::fmt::Debug for vnstat { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let self_vn_devname: &[c_char] = &self.vn_devname; f.debug_struct("vnstat") .field("vn_fileid", &self.vn_fileid) @@ -469,9 +474,9 @@ cfg_if! { .finish() } } - impl ::hash::Hash for vnstat { - fn hash(&self, state: &mut H) { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::hash::Hash for vnstat { + fn hash(&self, state: &mut H) { + let self_vn_devname: &[c_char] = &self.vn_devname; self.vn_fileid.hash(state); self.vn_size.hash(state); @@ -486,28 +491,28 @@ cfg_if! { } } -pub const RAND_MAX: ::c_int = 0x7fff_ffff; -pub const ELAST: ::c_int = 97; +pub const RAND_MAX: c_int = 0x7fff_ffff; +pub const ELAST: c_int = 97; -pub const KF_TYPE_EVENTFD: ::c_int = 13; +pub const KF_TYPE_EVENTFD: c_int = 13; /// max length of devicename -pub const SPECNAMELEN: ::c_int = 255; +pub const SPECNAMELEN: c_int = 255; pub const KI_NSPARE_PTR: usize = 5; /// domainset policies -pub const DOMAINSET_POLICY_INVALID: ::c_int = 0; -pub const DOMAINSET_POLICY_ROUNDROBIN: ::c_int = 1; -pub const DOMAINSET_POLICY_FIRSTTOUCH: ::c_int = 2; -pub const DOMAINSET_POLICY_PREFER: ::c_int = 3; -pub const DOMAINSET_POLICY_INTERLEAVE: ::c_int = 4; +pub const DOMAINSET_POLICY_INVALID: c_int = 0; +pub const DOMAINSET_POLICY_ROUNDROBIN: c_int = 1; +pub const DOMAINSET_POLICY_FIRSTTOUCH: c_int = 2; +pub const DOMAINSET_POLICY_PREFER: c_int = 3; +pub const DOMAINSET_POLICY_INTERLEAVE: c_int = 4; -pub const MINCORE_SUPER: ::c_int = 0x20; +pub const MINCORE_SUPER: c_int = 0x20; safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= ((major & 0xffffff00) as dev_t) << 32; dev |= ((major & 0x000000ff) as dev_t) << 8; @@ -518,51 +523,51 @@ safe_f! { } f! { - pub fn major(dev: ::dev_t) -> ::c_int { - (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as ::c_int + pub fn minor(dev: crate::dev_t) -> c_int { + (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } extern "C" { pub fn setgrent(); - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn freelocale(loc: ::locale_t); + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn freelocale(loc: crate::locale_t); pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; pub fn cpuset_getdomain( - level: ::cpulevel_t, - which: ::cpuwhich_t, - id: ::id_t, - setsize: ::size_t, - mask: *mut ::domainset_t, - policy: *mut ::c_int, - ) -> ::c_int; + level: crate::cpulevel_t, + which: crate::cpuwhich_t, + id: crate::id_t, + setsize: size_t, + mask: *mut crate::domainset_t, + policy: *mut c_int, + ) -> c_int; pub fn cpuset_setdomain( - level: ::cpulevel_t, - which: ::cpuwhich_t, - id: ::id_t, - setsize: ::size_t, - mask: *const ::domainset_t, - policy: ::c_int, - ) -> ::c_int; + level: crate::cpulevel_t, + which: crate::cpuwhich_t, + id: crate::id_t, + setsize: size_t, + mask: *const crate::domainset_t, + policy: c_int, + ) -> c_int; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; } #[link(name = "kvm")] extern "C" { - pub fn kvm_kerndisp(kd: *mut ::kvm_t) -> ::kssize_t; + pub fn kvm_kerndisp(kd: *mut crate::kvm_t) -> crate::kssize_t; } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs index 7bf2534455bf9..24713993f90a7 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd13/x86_64.rs @@ -1,5 +1,7 @@ -pub const PROC_KPTI_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN; -pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1; -pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2; -pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000; +use crate::c_int; + +pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; +pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; +pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; +pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs index afca6890711ae..a5a41b5c0e072 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd14/mod.rs @@ -1,267 +1,272 @@ +use crate::{ + c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, + ssize_t, +}; + // APIs in FreeBSD 14 that have changed since 11. pub type nlink_t = u64; pub type dev_t = u64; pub type ino_t = u64; -pub type shmatt_t = ::c_uint; +pub type shmatt_t = c_uint; pub type kpaddr_t = u64; pub type kssize_t = i64; pub type domainset_t = __c_anonymous_domainset; s! { pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, } pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, + pub ident: crate::uintptr_t, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, pub data: i64, - pub udata: *mut ::c_void, + pub udata: *mut c_void, pub ext: [u64; 4], } pub struct kvm_page { - pub kp_version: ::u_int, - pub kp_paddr: ::kpaddr_t, - pub kp_kmap_vaddr: ::kvaddr_t, - pub kp_dmap_vaddr: ::kvaddr_t, - pub kp_prot: ::vm_prot_t, - pub kp_offset: ::off_t, - pub kp_len: ::size_t, + pub kp_version: crate::u_int, + pub kp_paddr: crate::kpaddr_t, + pub kp_kmap_vaddr: crate::kvaddr_t, + pub kp_dmap_vaddr: crate::kvaddr_t, + pub kp_prot: crate::vm_prot_t, + pub kp_offset: off_t, + pub kp_len: size_t, } pub struct __c_anonymous_domainset { #[cfg(target_pointer_width = "64")] - _priv: [::c_ulong; 4], + _priv: [c_ulong; 4], #[cfg(target_pointer_width = "32")] - _priv: [::c_ulong; 8], + _priv: [c_ulong; 8], } pub struct kinfo_proc { /// Size of this structure. - pub ki_structsize: ::c_int, + pub ki_structsize: c_int, /// Reserved: layout identifier. - pub ki_layout: ::c_int, + pub ki_layout: c_int, /// Address of command arguments. - pub ki_args: *mut ::pargs, + pub ki_args: *mut crate::pargs, // This is normally "struct proc". /// Address of proc. - pub ki_paddr: *mut ::c_void, + pub ki_paddr: *mut c_void, // This is normally "struct user". /// Kernel virtual address of u-area. - pub ki_addr: *mut ::c_void, + pub ki_addr: *mut c_void, // This is normally "struct vnode". /// Pointer to trace file. - pub ki_tracep: *mut ::c_void, + pub ki_tracep: *mut c_void, // This is normally "struct vnode". /// Pointer to executable file. - pub ki_textvp: *mut ::c_void, + pub ki_textvp: *mut c_void, // This is normally "struct filedesc". /// Pointer to open file info. - pub ki_fd: *mut ::c_void, + pub ki_fd: *mut c_void, // This is normally "struct vmspace". /// Pointer to kernel vmspace struct. - pub ki_vmspace: *mut ::c_void, + pub ki_vmspace: *mut c_void, /// Sleep address. - pub ki_wchan: *const ::c_void, + pub ki_wchan: *const c_void, /// Process identifier. - pub ki_pid: ::pid_t, + pub ki_pid: crate::pid_t, /// Parent process ID. - pub ki_ppid: ::pid_t, + pub ki_ppid: crate::pid_t, /// Process group ID. - pub ki_pgid: ::pid_t, + pub ki_pgid: crate::pid_t, /// tty process group ID. - pub ki_tpgid: ::pid_t, + pub ki_tpgid: crate::pid_t, /// Process session ID. - pub ki_sid: ::pid_t, + pub ki_sid: crate::pid_t, /// Terminal session ID. - pub ki_tsid: ::pid_t, + pub ki_tsid: crate::pid_t, /// Job control counter. - pub ki_jobc: ::c_short, + pub ki_jobc: c_short, /// Unused (just here for alignment). - pub ki_spare_short1: ::c_short, + pub ki_spare_short1: c_short, /// Controlling tty dev. pub ki_tdev_freebsd11: u32, /// Signals arrived but not delivered. - pub ki_siglist: ::sigset_t, + pub ki_siglist: crate::sigset_t, /// Current signal mask. - pub ki_sigmask: ::sigset_t, + pub ki_sigmask: crate::sigset_t, /// Signals being ignored. - pub ki_sigignore: ::sigset_t, + pub ki_sigignore: crate::sigset_t, /// Signals being caught by user. - pub ki_sigcatch: ::sigset_t, + pub ki_sigcatch: crate::sigset_t, /// Effective user ID. - pub ki_uid: ::uid_t, + pub ki_uid: crate::uid_t, /// Real user ID. - pub ki_ruid: ::uid_t, + pub ki_ruid: crate::uid_t, /// Saved effective user ID. - pub ki_svuid: ::uid_t, + pub ki_svuid: crate::uid_t, /// Real group ID. - pub ki_rgid: ::gid_t, + pub ki_rgid: crate::gid_t, /// Saved effective group ID. - pub ki_svgid: ::gid_t, + pub ki_svgid: crate::gid_t, /// Number of groups. - pub ki_ngroups: ::c_short, + pub ki_ngroups: c_short, /// Unused (just here for alignment). - pub ki_spare_short2: ::c_short, + pub ki_spare_short2: c_short, /// Groups. - pub ki_groups: [::gid_t; ::KI_NGROUPS], + pub ki_groups: [crate::gid_t; crate::KI_NGROUPS], /// Virtual size. - pub ki_size: ::vm_size_t, + pub ki_size: crate::vm_size_t, /// Current resident set size in pages. - pub ki_rssize: ::segsz_t, + pub ki_rssize: crate::segsz_t, /// Resident set size before last swap. - pub ki_swrss: ::segsz_t, + pub ki_swrss: crate::segsz_t, /// Text size (pages) XXX. - pub ki_tsize: ::segsz_t, + pub ki_tsize: crate::segsz_t, /// Data size (pages) XXX. - pub ki_dsize: ::segsz_t, + pub ki_dsize: crate::segsz_t, /// Stack size (pages). - pub ki_ssize: ::segsz_t, + pub ki_ssize: crate::segsz_t, /// Exit status for wait & stop signal. - pub ki_xstat: ::u_short, + pub ki_xstat: crate::u_short, /// Accounting flags. - pub ki_acflag: ::u_short, + pub ki_acflag: crate::u_short, /// %cpu for process during `ki_swtime`. - pub ki_pctcpu: ::fixpt_t, + pub ki_pctcpu: crate::fixpt_t, /// Time averaged value of `ki_cpticks`. - pub ki_estcpu: ::u_int, + pub ki_estcpu: crate::u_int, /// Time since last blocked. - pub ki_slptime: ::u_int, + pub ki_slptime: crate::u_int, /// Time swapped in or out. - pub ki_swtime: ::u_int, + pub ki_swtime: crate::u_int, /// Number of copy-on-write faults. - pub ki_cow: ::u_int, + pub ki_cow: crate::u_int, /// Real time in microsec. pub ki_runtime: u64, /// Starting time. - pub ki_start: ::timeval, + pub ki_start: crate::timeval, /// Time used by process children. - pub ki_childtime: ::timeval, + pub ki_childtime: crate::timeval, /// P_* flags. - pub ki_flag: ::c_long, + pub ki_flag: c_long, /// KI_* flags (below). - pub ki_kiflag: ::c_long, + pub ki_kiflag: c_long, /// Kernel trace points. - pub ki_traceflag: ::c_int, + pub ki_traceflag: c_int, /// S* process status. - pub ki_stat: ::c_char, + pub ki_stat: c_char, /// Process "nice" value. pub ki_nice: i8, // signed char /// Process lock (prevent swap) count. - pub ki_lock: ::c_char, + pub ki_lock: c_char, /// Run queue index. - pub ki_rqindex: ::c_char, + pub ki_rqindex: c_char, /// Which cpu we are on. - pub ki_oncpu_old: ::c_uchar, + pub ki_oncpu_old: c_uchar, /// Last cpu we were on. - pub ki_lastcpu_old: ::c_uchar, + pub ki_lastcpu_old: c_uchar, /// Thread name. - pub ki_tdname: [::c_char; ::TDNAMLEN + 1], + pub ki_tdname: [c_char; crate::TDNAMLEN + 1], /// Wchan message. - pub ki_wmesg: [::c_char; ::WMESGLEN + 1], + pub ki_wmesg: [c_char; crate::WMESGLEN + 1], /// Setlogin name. - pub ki_login: [::c_char; ::LOGNAMELEN + 1], + pub ki_login: [c_char; crate::LOGNAMELEN + 1], /// Lock name. - pub ki_lockname: [::c_char; ::LOCKNAMELEN + 1], + pub ki_lockname: [c_char; crate::LOCKNAMELEN + 1], /// Command name. - pub ki_comm: [::c_char; ::COMMLEN + 1], + pub ki_comm: [c_char; crate::COMMLEN + 1], /// Emulation name. - pub ki_emul: [::c_char; ::KI_EMULNAMELEN + 1], + pub ki_emul: [c_char; crate::KI_EMULNAMELEN + 1], /// Login class. - pub ki_loginclass: [::c_char; ::LOGINCLASSLEN + 1], + pub ki_loginclass: [c_char; crate::LOGINCLASSLEN + 1], /// More thread name. - pub ki_moretdname: [::c_char; ::MAXCOMLEN - ::TDNAMLEN + 1], + pub ki_moretdname: [c_char; crate::MAXCOMLEN - crate::TDNAMLEN + 1], /// Spare string space. - pub ki_sparestrings: [::c_char; 46], + pub ki_sparestrings: [c_char; 46], /// Spare room for growth. - pub ki_spareints: [::c_int; ::KI_NSPARE_INT], + pub ki_spareints: [c_int; crate::KI_NSPARE_INT], /// Controlling tty dev. pub ki_tdev: u64, /// Which cpu we are on. - pub ki_oncpu: ::c_int, + pub ki_oncpu: c_int, /// Last cpu we were on. - pub ki_lastcpu: ::c_int, + pub ki_lastcpu: c_int, /// PID of tracing process. - pub ki_tracer: ::c_int, + pub ki_tracer: c_int, /// P2_* flags. - pub ki_flag2: ::c_int, + pub ki_flag2: c_int, /// Default FIB number. - pub ki_fibnum: ::c_int, + pub ki_fibnum: c_int, /// Credential flags. - pub ki_cr_flags: ::u_int, + pub ki_cr_flags: crate::u_int, /// Process jail ID. - pub ki_jid: ::c_int, + pub ki_jid: c_int, /// Number of threads in total. - pub ki_numthreads: ::c_int, + pub ki_numthreads: c_int, /// Thread ID. - pub ki_tid: ::lwpid_t, + pub ki_tid: crate::lwpid_t, /// Process priority. - pub ki_pri: ::priority, + pub ki_pri: crate::priority, /// Process rusage statistics. - pub ki_rusage: ::rusage, + pub ki_rusage: crate::rusage, /// rusage of children processes. - pub ki_rusage_ch: ::rusage, + pub ki_rusage_ch: crate::rusage, // This is normally "struct pcb". /// Kernel virtual addr of pcb. - pub ki_pcb: *mut ::c_void, + pub ki_pcb: *mut c_void, /// Kernel virtual addr of stack. - pub ki_kstack: *mut ::c_void, + pub ki_kstack: *mut c_void, /// User convenience pointer. - pub ki_udata: *mut ::c_void, + pub ki_udata: *mut c_void, // This is normally "struct thread". - pub ki_tdaddr: *mut ::c_void, + pub ki_tdaddr: *mut c_void, // This is normally "struct pwddesc". /// Pointer to process paths info. - pub ki_pd: *mut ::c_void, - pub ki_spareptrs: [*mut ::c_void; ::KI_NSPARE_PTR], - pub ki_sparelongs: [::c_long; ::KI_NSPARE_LONG], + pub ki_pd: *mut c_void, + pub ki_spareptrs: [*mut c_void; crate::KI_NSPARE_PTR], + pub ki_sparelongs: [c_long; crate::KI_NSPARE_LONG], /// PS_* flags. - pub ki_sflag: ::c_long, + pub ki_sflag: c_long, /// kthread flag. - pub ki_tdflags: ::c_long, + pub ki_tdflags: c_long, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, st_padding0: i16, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, st_padding1: i32, - pub st_rdev: ::dev_t, + pub st_rdev: crate::dev_t, #[cfg(target_arch = "x86")] st_atim_ext: i32, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, #[cfg(target_arch = "x86")] st_mtim_ext: i32, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, #[cfg(target_arch = "x86")] st_ctim_ext: i32, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, #[cfg(target_arch = "x86")] st_btim_ext: i32, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::fflags_t, + pub st_birthtime: crate::time_t, + pub st_birthtime_nsec: c_long, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, + pub st_blksize: crate::blksize_t, + pub st_flags: crate::fflags_t, pub st_gen: u64, pub st_spare: [u64; 10], } @@ -269,14 +274,14 @@ s! { s_no_extra_traits! { pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, + pub d_fileno: crate::ino_t, + pub d_off: off_t, pub d_reclen: u16, pub d_type: u8, d_pad0: u8, pub d_namlen: u16, d_pad1: u16, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct statfs { @@ -296,12 +301,12 @@ s_no_extra_traits! { pub f_asyncreads: u64, f_spare: [u64; 10], pub f_namemax: u32, - pub f_owner: ::uid_t, - pub f_fsid: ::fsid_t, - f_charspare: [::c_char; 80], - pub f_fstypename: [::c_char; 16], - pub f_mntfromname: [::c_char; 1024], - pub f_mntonname: [::c_char; 1024], + pub f_owner: crate::uid_t, + pub f_fsid: crate::fsid_t, + f_charspare: [c_char; 80], + pub f_fstypename: [c_char; 16], + pub f_mntfromname: [c_char; 1024], + pub f_mntonname: [c_char; 1024], } pub struct vnstat { @@ -309,10 +314,10 @@ s_no_extra_traits! { pub vn_size: u64, pub vn_dev: u64, pub vn_fsid: u64, - pub vn_mntdir: *mut ::c_char, - pub vn_type: ::c_int, + pub vn_mntdir: *mut c_char, + pub vn_type: c_int, pub vn_mode: u16, - pub vn_devname: [::c_char; ::SPECNAMELEN as usize + 1], + pub vn_devname: [c_char; crate::SPECNAMELEN as usize + 1], } } @@ -351,8 +356,8 @@ cfg_if! { } } impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_bsize", &self.f_bsize) .field("f_iosize", &self.f_iosize) @@ -374,8 +379,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_version.hash(state); self.f_type.hash(state); self.f_flags.hash(state); @@ -414,8 +419,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_off", &self.d_off) @@ -426,8 +431,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -439,8 +444,8 @@ cfg_if! { impl PartialEq for vnstat { fn eq(&self, other: &vnstat) -> bool { - let self_vn_devname: &[::c_char] = &self.vn_devname; - let other_vn_devname: &[::c_char] = &other.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; + let other_vn_devname: &[c_char] = &other.vn_devname; self.vn_fileid == other.vn_fileid && self.vn_size == other.vn_size @@ -453,9 +458,9 @@ cfg_if! { } } impl Eq for vnstat {} - impl ::fmt::Debug for vnstat { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::fmt::Debug for vnstat { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let self_vn_devname: &[c_char] = &self.vn_devname; f.debug_struct("vnstat") .field("vn_fileid", &self.vn_fileid) @@ -469,9 +474,9 @@ cfg_if! { .finish() } } - impl ::hash::Hash for vnstat { - fn hash(&self, state: &mut H) { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::hash::Hash for vnstat { + fn hash(&self, state: &mut H) { + let self_vn_devname: &[c_char] = &self.vn_devname; self.vn_fileid.hash(state); self.vn_size.hash(state); @@ -486,28 +491,28 @@ cfg_if! { } } -pub const RAND_MAX: ::c_int = 0x7fff_ffff; -pub const ELAST: ::c_int = 97; +pub const RAND_MAX: c_int = 0x7fff_ffff; +pub const ELAST: c_int = 97; -pub const KF_TYPE_EVENTFD: ::c_int = 13; +pub const KF_TYPE_EVENTFD: c_int = 13; /// max length of devicename -pub const SPECNAMELEN: ::c_int = 255; +pub const SPECNAMELEN: c_int = 255; pub const KI_NSPARE_PTR: usize = 5; /// domainset policies -pub const DOMAINSET_POLICY_INVALID: ::c_int = 0; -pub const DOMAINSET_POLICY_ROUNDROBIN: ::c_int = 1; -pub const DOMAINSET_POLICY_FIRSTTOUCH: ::c_int = 2; -pub const DOMAINSET_POLICY_PREFER: ::c_int = 3; -pub const DOMAINSET_POLICY_INTERLEAVE: ::c_int = 4; +pub const DOMAINSET_POLICY_INVALID: c_int = 0; +pub const DOMAINSET_POLICY_ROUNDROBIN: c_int = 1; +pub const DOMAINSET_POLICY_FIRSTTOUCH: c_int = 2; +pub const DOMAINSET_POLICY_PREFER: c_int = 3; +pub const DOMAINSET_POLICY_INTERLEAVE: c_int = 4; -pub const MINCORE_SUPER: ::c_int = 0x60; +pub const MINCORE_SUPER: c_int = 0x60; safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= ((major & 0xffffff00) as dev_t) << 32; dev |= ((major & 0x000000ff) as dev_t) << 8; @@ -518,51 +523,51 @@ safe_f! { } f! { - pub fn major(dev: ::dev_t) -> ::c_int { - (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as ::c_int + pub fn minor(dev: crate::dev_t) -> c_int { + (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } extern "C" { pub fn setgrent(); - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn freelocale(loc: ::locale_t); + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn freelocale(loc: crate::locale_t); pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; pub fn cpuset_getdomain( - level: ::cpulevel_t, - which: ::cpuwhich_t, - id: ::id_t, - setsize: ::size_t, - mask: *mut ::domainset_t, - policy: *mut ::c_int, - ) -> ::c_int; + level: crate::cpulevel_t, + which: crate::cpuwhich_t, + id: crate::id_t, + setsize: size_t, + mask: *mut crate::domainset_t, + policy: *mut c_int, + ) -> c_int; pub fn cpuset_setdomain( - level: ::cpulevel_t, - which: ::cpuwhich_t, - id: ::id_t, - setsize: ::size_t, - mask: *const ::domainset_t, - policy: ::c_int, - ) -> ::c_int; + level: crate::cpulevel_t, + which: crate::cpuwhich_t, + id: crate::id_t, + setsize: size_t, + mask: *const crate::domainset_t, + policy: c_int, + ) -> c_int; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; } #[link(name = "kvm")] extern "C" { - pub fn kvm_kerndisp(kd: *mut ::kvm_t) -> ::kssize_t; + pub fn kvm_kerndisp(kd: *mut crate::kvm_t) -> crate::kssize_t; } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs index 01d0b4328da81..2c403114c0305 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd14/x86_64.rs @@ -1,12 +1,14 @@ -pub const PROC_KPTI_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN; -pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1; -pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2; -pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000; -pub const PROC_LA_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN + 2; -pub const PROC_LA_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 3; -pub const PROC_LA_CTL_LA48_ON_EXEC: ::c_int = 1; -pub const PROC_LA_CTL_LA57_ON_EXEC: ::c_int = 2; -pub const PROC_LA_CTL_DEFAULT_ON_EXEC: ::c_int = 3; -pub const PROC_LA_STATUS_LA48: ::c_int = 0x01000000; -pub const PROC_LA_STATUS_LA57: ::c_int = 0x02000000; +use crate::c_int; + +pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; +pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; +pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; +pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; +pub const PROC_LA_CTL: c_int = crate::PROC_PROCCTL_MD_MIN + 2; +pub const PROC_LA_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 3; +pub const PROC_LA_CTL_LA48_ON_EXEC: c_int = 1; +pub const PROC_LA_CTL_LA57_ON_EXEC: c_int = 2; +pub const PROC_LA_CTL_DEFAULT_ON_EXEC: c_int = 3; +pub const PROC_LA_STATUS_LA48: c_int = 0x01000000; +pub const PROC_LA_STATUS_LA57: c_int = 0x02000000; diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs index 031f41364804d..238d3e60d1037 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd15/mod.rs @@ -1,267 +1,272 @@ +use crate::{ + c_char, c_int, c_long, c_short, c_uchar, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, + ssize_t, +}; + // APIs in FreeBSD 15 that have changed since 11. pub type nlink_t = u64; pub type dev_t = u64; pub type ino_t = u64; -pub type shmatt_t = ::c_uint; +pub type shmatt_t = c_uint; pub type kpaddr_t = u64; pub type kssize_t = i64; pub type domainset_t = __c_anonymous_domainset; s! { pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, } pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, + pub ident: crate::uintptr_t, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, pub data: i64, - pub udata: *mut ::c_void, + pub udata: *mut c_void, pub ext: [u64; 4], } pub struct kvm_page { - pub kp_version: ::u_int, - pub kp_paddr: ::kpaddr_t, - pub kp_kmap_vaddr: ::kvaddr_t, - pub kp_dmap_vaddr: ::kvaddr_t, - pub kp_prot: ::vm_prot_t, - pub kp_offset: ::off_t, - pub kp_len: ::size_t, + pub kp_version: crate::u_int, + pub kp_paddr: crate::kpaddr_t, + pub kp_kmap_vaddr: crate::kvaddr_t, + pub kp_dmap_vaddr: crate::kvaddr_t, + pub kp_prot: crate::vm_prot_t, + pub kp_offset: off_t, + pub kp_len: size_t, } pub struct __c_anonymous_domainset { #[cfg(target_pointer_width = "64")] - _priv: [::c_ulong; 4], + _priv: [c_ulong; 4], #[cfg(target_pointer_width = "32")] - _priv: [::c_ulong; 8], + _priv: [c_ulong; 8], } pub struct kinfo_proc { /// Size of this structure. - pub ki_structsize: ::c_int, + pub ki_structsize: c_int, /// Reserved: layout identifier. - pub ki_layout: ::c_int, + pub ki_layout: c_int, /// Address of command arguments. - pub ki_args: *mut ::pargs, + pub ki_args: *mut crate::pargs, // This is normally "struct proc". /// Address of proc. - pub ki_paddr: *mut ::c_void, + pub ki_paddr: *mut c_void, // This is normally "struct user". /// Kernel virtual address of u-area. - pub ki_addr: *mut ::c_void, + pub ki_addr: *mut c_void, // This is normally "struct vnode". /// Pointer to trace file. - pub ki_tracep: *mut ::c_void, + pub ki_tracep: *mut c_void, // This is normally "struct vnode". /// Pointer to executable file. - pub ki_textvp: *mut ::c_void, + pub ki_textvp: *mut c_void, // This is normally "struct filedesc". /// Pointer to open file info. - pub ki_fd: *mut ::c_void, + pub ki_fd: *mut c_void, // This is normally "struct vmspace". /// Pointer to kernel vmspace struct. - pub ki_vmspace: *mut ::c_void, + pub ki_vmspace: *mut c_void, /// Sleep address. - pub ki_wchan: *const ::c_void, + pub ki_wchan: *const c_void, /// Process identifier. - pub ki_pid: ::pid_t, + pub ki_pid: crate::pid_t, /// Parent process ID. - pub ki_ppid: ::pid_t, + pub ki_ppid: crate::pid_t, /// Process group ID. - pub ki_pgid: ::pid_t, + pub ki_pgid: crate::pid_t, /// tty process group ID. - pub ki_tpgid: ::pid_t, + pub ki_tpgid: crate::pid_t, /// Process session ID. - pub ki_sid: ::pid_t, + pub ki_sid: crate::pid_t, /// Terminal session ID. - pub ki_tsid: ::pid_t, + pub ki_tsid: crate::pid_t, /// Job control counter. - pub ki_jobc: ::c_short, + pub ki_jobc: c_short, /// Unused (just here for alignment). - pub ki_spare_short1: ::c_short, + pub ki_spare_short1: c_short, /// Controlling tty dev. pub ki_tdev_freebsd11: u32, /// Signals arrived but not delivered. - pub ki_siglist: ::sigset_t, + pub ki_siglist: crate::sigset_t, /// Current signal mask. - pub ki_sigmask: ::sigset_t, + pub ki_sigmask: crate::sigset_t, /// Signals being ignored. - pub ki_sigignore: ::sigset_t, + pub ki_sigignore: crate::sigset_t, /// Signals being caught by user. - pub ki_sigcatch: ::sigset_t, + pub ki_sigcatch: crate::sigset_t, /// Effective user ID. - pub ki_uid: ::uid_t, + pub ki_uid: crate::uid_t, /// Real user ID. - pub ki_ruid: ::uid_t, + pub ki_ruid: crate::uid_t, /// Saved effective user ID. - pub ki_svuid: ::uid_t, + pub ki_svuid: crate::uid_t, /// Real group ID. - pub ki_rgid: ::gid_t, + pub ki_rgid: crate::gid_t, /// Saved effective group ID. - pub ki_svgid: ::gid_t, + pub ki_svgid: crate::gid_t, /// Number of groups. - pub ki_ngroups: ::c_short, + pub ki_ngroups: c_short, /// Unused (just here for alignment). - pub ki_spare_short2: ::c_short, + pub ki_spare_short2: c_short, /// Groups. - pub ki_groups: [::gid_t; ::KI_NGROUPS], + pub ki_groups: [crate::gid_t; crate::KI_NGROUPS], /// Virtual size. - pub ki_size: ::vm_size_t, + pub ki_size: crate::vm_size_t, /// Current resident set size in pages. - pub ki_rssize: ::segsz_t, + pub ki_rssize: crate::segsz_t, /// Resident set size before last swap. - pub ki_swrss: ::segsz_t, + pub ki_swrss: crate::segsz_t, /// Text size (pages) XXX. - pub ki_tsize: ::segsz_t, + pub ki_tsize: crate::segsz_t, /// Data size (pages) XXX. - pub ki_dsize: ::segsz_t, + pub ki_dsize: crate::segsz_t, /// Stack size (pages). - pub ki_ssize: ::segsz_t, + pub ki_ssize: crate::segsz_t, /// Exit status for wait & stop signal. - pub ki_xstat: ::u_short, + pub ki_xstat: crate::u_short, /// Accounting flags. - pub ki_acflag: ::u_short, + pub ki_acflag: crate::u_short, /// %cpu for process during `ki_swtime`. - pub ki_pctcpu: ::fixpt_t, + pub ki_pctcpu: crate::fixpt_t, /// Time averaged value of `ki_cpticks`. - pub ki_estcpu: ::u_int, + pub ki_estcpu: crate::u_int, /// Time since last blocked. - pub ki_slptime: ::u_int, + pub ki_slptime: crate::u_int, /// Time swapped in or out. - pub ki_swtime: ::u_int, + pub ki_swtime: crate::u_int, /// Number of copy-on-write faults. - pub ki_cow: ::u_int, + pub ki_cow: crate::u_int, /// Real time in microsec. pub ki_runtime: u64, /// Starting time. - pub ki_start: ::timeval, + pub ki_start: crate::timeval, /// Time used by process children. - pub ki_childtime: ::timeval, + pub ki_childtime: crate::timeval, /// P_* flags. - pub ki_flag: ::c_long, + pub ki_flag: c_long, /// KI_* flags (below). - pub ki_kiflag: ::c_long, + pub ki_kiflag: c_long, /// Kernel trace points. - pub ki_traceflag: ::c_int, + pub ki_traceflag: c_int, /// S* process status. - pub ki_stat: ::c_char, + pub ki_stat: c_char, /// Process "nice" value. pub ki_nice: i8, // signed char /// Process lock (prevent swap) count. - pub ki_lock: ::c_char, + pub ki_lock: c_char, /// Run queue index. - pub ki_rqindex: ::c_char, + pub ki_rqindex: c_char, /// Which cpu we are on. - pub ki_oncpu_old: ::c_uchar, + pub ki_oncpu_old: c_uchar, /// Last cpu we were on. - pub ki_lastcpu_old: ::c_uchar, + pub ki_lastcpu_old: c_uchar, /// Thread name. - pub ki_tdname: [::c_char; ::TDNAMLEN + 1], + pub ki_tdname: [c_char; crate::TDNAMLEN + 1], /// Wchan message. - pub ki_wmesg: [::c_char; ::WMESGLEN + 1], + pub ki_wmesg: [c_char; crate::WMESGLEN + 1], /// Setlogin name. - pub ki_login: [::c_char; ::LOGNAMELEN + 1], + pub ki_login: [c_char; crate::LOGNAMELEN + 1], /// Lock name. - pub ki_lockname: [::c_char; ::LOCKNAMELEN + 1], + pub ki_lockname: [c_char; crate::LOCKNAMELEN + 1], /// Command name. - pub ki_comm: [::c_char; ::COMMLEN + 1], + pub ki_comm: [c_char; crate::COMMLEN + 1], /// Emulation name. - pub ki_emul: [::c_char; ::KI_EMULNAMELEN + 1], + pub ki_emul: [c_char; crate::KI_EMULNAMELEN + 1], /// Login class. - pub ki_loginclass: [::c_char; ::LOGINCLASSLEN + 1], + pub ki_loginclass: [c_char; crate::LOGINCLASSLEN + 1], /// More thread name. - pub ki_moretdname: [::c_char; ::MAXCOMLEN - ::TDNAMLEN + 1], + pub ki_moretdname: [c_char; crate::MAXCOMLEN - crate::TDNAMLEN + 1], /// Spare string space. - pub ki_sparestrings: [::c_char; 46], + pub ki_sparestrings: [c_char; 46], /// Spare room for growth. - pub ki_spareints: [::c_int; ::KI_NSPARE_INT], + pub ki_spareints: [c_int; crate::KI_NSPARE_INT], /// Controlling tty dev. pub ki_tdev: u64, /// Which cpu we are on. - pub ki_oncpu: ::c_int, + pub ki_oncpu: c_int, /// Last cpu we were on. - pub ki_lastcpu: ::c_int, + pub ki_lastcpu: c_int, /// PID of tracing process. - pub ki_tracer: ::c_int, + pub ki_tracer: c_int, /// P2_* flags. - pub ki_flag2: ::c_int, + pub ki_flag2: c_int, /// Default FIB number. - pub ki_fibnum: ::c_int, + pub ki_fibnum: c_int, /// Credential flags. - pub ki_cr_flags: ::u_int, + pub ki_cr_flags: crate::u_int, /// Process jail ID. - pub ki_jid: ::c_int, + pub ki_jid: c_int, /// Number of threads in total. - pub ki_numthreads: ::c_int, + pub ki_numthreads: c_int, /// Thread ID. - pub ki_tid: ::lwpid_t, + pub ki_tid: crate::lwpid_t, /// Process priority. - pub ki_pri: ::priority, + pub ki_pri: crate::priority, /// Process rusage statistics. - pub ki_rusage: ::rusage, + pub ki_rusage: crate::rusage, /// rusage of children processes. - pub ki_rusage_ch: ::rusage, + pub ki_rusage_ch: crate::rusage, // This is normally "struct pcb". /// Kernel virtual addr of pcb. - pub ki_pcb: *mut ::c_void, + pub ki_pcb: *mut c_void, /// Kernel virtual addr of stack. - pub ki_kstack: *mut ::c_void, + pub ki_kstack: *mut c_void, /// User convenience pointer. - pub ki_udata: *mut ::c_void, + pub ki_udata: *mut c_void, // This is normally "struct thread". - pub ki_tdaddr: *mut ::c_void, + pub ki_tdaddr: *mut c_void, // This is normally "struct pwddesc". /// Pointer to process paths info. - pub ki_pd: *mut ::c_void, - pub ki_spareptrs: [*mut ::c_void; ::KI_NSPARE_PTR], - pub ki_sparelongs: [::c_long; ::KI_NSPARE_LONG], + pub ki_pd: *mut c_void, + pub ki_spareptrs: [*mut c_void; crate::KI_NSPARE_PTR], + pub ki_sparelongs: [c_long; crate::KI_NSPARE_LONG], /// PS_* flags. - pub ki_sflag: ::c_long, + pub ki_sflag: c_long, /// kthread flag. - pub ki_tdflags: ::c_long, + pub ki_tdflags: c_long, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, st_padding0: i16, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, st_padding1: i32, - pub st_rdev: ::dev_t, + pub st_rdev: crate::dev_t, #[cfg(target_arch = "x86")] st_atim_ext: i32, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, #[cfg(target_arch = "x86")] st_mtim_ext: i32, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, #[cfg(target_arch = "x86")] st_ctim_ext: i32, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, #[cfg(target_arch = "x86")] st_btim_ext: i32, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, - pub st_flags: ::fflags_t, + pub st_birthtime: crate::time_t, + pub st_birthtime_nsec: c_long, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, + pub st_blksize: crate::blksize_t, + pub st_flags: crate::fflags_t, pub st_gen: u64, pub st_spare: [u64; 10], } @@ -269,14 +274,14 @@ s! { s_no_extra_traits! { pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, + pub d_fileno: crate::ino_t, + pub d_off: off_t, pub d_reclen: u16, pub d_type: u8, d_pad0: u8, pub d_namlen: u16, d_pad1: u16, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct statfs { @@ -296,12 +301,12 @@ s_no_extra_traits! { pub f_asyncreads: u64, f_spare: [u64; 10], pub f_namemax: u32, - pub f_owner: ::uid_t, - pub f_fsid: ::fsid_t, - f_charspare: [::c_char; 80], - pub f_fstypename: [::c_char; 16], - pub f_mntfromname: [::c_char; 1024], - pub f_mntonname: [::c_char; 1024], + pub f_owner: crate::uid_t, + pub f_fsid: crate::fsid_t, + f_charspare: [c_char; 80], + pub f_fstypename: [c_char; 16], + pub f_mntfromname: [c_char; 1024], + pub f_mntonname: [c_char; 1024], } pub struct vnstat { @@ -309,10 +314,10 @@ s_no_extra_traits! { pub vn_size: u64, pub vn_dev: u64, pub vn_fsid: u64, - pub vn_mntdir: *mut ::c_char, - pub vn_type: ::c_int, + pub vn_mntdir: *mut c_char, + pub vn_type: c_int, pub vn_mode: u16, - pub vn_devname: [::c_char; ::SPECNAMELEN as usize + 1], + pub vn_devname: [c_char; crate::SPECNAMELEN as usize + 1], } } @@ -351,8 +356,8 @@ cfg_if! { } } impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_bsize", &self.f_bsize) .field("f_iosize", &self.f_iosize) @@ -374,8 +379,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_version.hash(state); self.f_type.hash(state); self.f_flags.hash(state); @@ -414,8 +419,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_off", &self.d_off) @@ -426,8 +431,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -439,8 +444,8 @@ cfg_if! { impl PartialEq for vnstat { fn eq(&self, other: &vnstat) -> bool { - let self_vn_devname: &[::c_char] = &self.vn_devname; - let other_vn_devname: &[::c_char] = &other.vn_devname; + let self_vn_devname: &[c_char] = &self.vn_devname; + let other_vn_devname: &[c_char] = &other.vn_devname; self.vn_fileid == other.vn_fileid && self.vn_size == other.vn_size @@ -453,9 +458,9 @@ cfg_if! { } } impl Eq for vnstat {} - impl ::fmt::Debug for vnstat { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::fmt::Debug for vnstat { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let self_vn_devname: &[c_char] = &self.vn_devname; f.debug_struct("vnstat") .field("vn_fileid", &self.vn_fileid) @@ -469,9 +474,9 @@ cfg_if! { .finish() } } - impl ::hash::Hash for vnstat { - fn hash(&self, state: &mut H) { - let self_vn_devname: &[::c_char] = &self.vn_devname; + impl crate::hash::Hash for vnstat { + fn hash(&self, state: &mut H) { + let self_vn_devname: &[c_char] = &self.vn_devname; self.vn_fileid.hash(state); self.vn_size.hash(state); @@ -486,28 +491,28 @@ cfg_if! { } } -pub const RAND_MAX: ::c_int = 0x7fff_ffff; -pub const ELAST: ::c_int = 97; +pub const RAND_MAX: c_int = 0x7fff_ffff; +pub const ELAST: c_int = 97; -pub const KF_TYPE_EVENTFD: ::c_int = 13; +pub const KF_TYPE_EVENTFD: c_int = 13; /// max length of devicename -pub const SPECNAMELEN: ::c_int = 255; +pub const SPECNAMELEN: c_int = 255; pub const KI_NSPARE_PTR: usize = 5; /// domainset policies -pub const DOMAINSET_POLICY_INVALID: ::c_int = 0; -pub const DOMAINSET_POLICY_ROUNDROBIN: ::c_int = 1; -pub const DOMAINSET_POLICY_FIRSTTOUCH: ::c_int = 2; -pub const DOMAINSET_POLICY_PREFER: ::c_int = 3; -pub const DOMAINSET_POLICY_INTERLEAVE: ::c_int = 4; +pub const DOMAINSET_POLICY_INVALID: c_int = 0; +pub const DOMAINSET_POLICY_ROUNDROBIN: c_int = 1; +pub const DOMAINSET_POLICY_FIRSTTOUCH: c_int = 2; +pub const DOMAINSET_POLICY_PREFER: c_int = 3; +pub const DOMAINSET_POLICY_INTERLEAVE: c_int = 4; -pub const MINCORE_SUPER: ::c_int = 0x60; +pub const MINCORE_SUPER: c_int = 0x60; safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= ((major & 0xffffff00) as dev_t) << 32; dev |= ((major & 0x000000ff) as dev_t) << 8; @@ -518,51 +523,51 @@ safe_f! { } f! { - pub fn major(dev: ::dev_t) -> ::c_int { - (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + (((dev >> 32) & 0xffffff00) | ((dev >> 8) & 0xff)) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as ::c_int + pub fn minor(dev: crate::dev_t) -> c_int { + (((dev >> 24) & 0xff00) | (dev & 0xffff00ff)) as c_int } } extern "C" { pub fn setgrent(); - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn freelocale(loc: ::locale_t); + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn freelocale(loc: crate::locale_t); pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; pub fn cpuset_getdomain( - level: ::cpulevel_t, - which: ::cpuwhich_t, - id: ::id_t, - setsize: ::size_t, - mask: *mut ::domainset_t, - policy: *mut ::c_int, - ) -> ::c_int; + level: crate::cpulevel_t, + which: crate::cpuwhich_t, + id: crate::id_t, + setsize: size_t, + mask: *mut crate::domainset_t, + policy: *mut c_int, + ) -> c_int; pub fn cpuset_setdomain( - level: ::cpulevel_t, - which: ::cpuwhich_t, - id: ::id_t, - setsize: ::size_t, - mask: *const ::domainset_t, - policy: ::c_int, - ) -> ::c_int; + level: crate::cpulevel_t, + which: crate::cpuwhich_t, + id: crate::id_t, + setsize: size_t, + mask: *const crate::domainset_t, + policy: c_int, + ) -> c_int; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; } #[link(name = "kvm")] extern "C" { - pub fn kvm_kerndisp(kd: *mut ::kvm_t) -> ::kssize_t; + pub fn kvm_kerndisp(kd: *mut crate::kvm_t) -> crate::kssize_t; } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs b/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs index 01d0b4328da81..2c403114c0305 100644 --- a/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/freebsd15/x86_64.rs @@ -1,12 +1,14 @@ -pub const PROC_KPTI_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN; -pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: ::c_int = 1; -pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: ::c_int = 2; -pub const PROC_KPTI_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 1; -pub const PROC_KPTI_STATUS_ACTIVE: ::c_int = 0x80000000; -pub const PROC_LA_CTL: ::c_int = ::PROC_PROCCTL_MD_MIN + 2; -pub const PROC_LA_STATUS: ::c_int = ::PROC_PROCCTL_MD_MIN + 3; -pub const PROC_LA_CTL_LA48_ON_EXEC: ::c_int = 1; -pub const PROC_LA_CTL_LA57_ON_EXEC: ::c_int = 2; -pub const PROC_LA_CTL_DEFAULT_ON_EXEC: ::c_int = 3; -pub const PROC_LA_STATUS_LA48: ::c_int = 0x01000000; -pub const PROC_LA_STATUS_LA57: ::c_int = 0x02000000; +use crate::c_int; + +pub const PROC_KPTI_CTL: c_int = crate::PROC_PROCCTL_MD_MIN; +pub const PROC_KPTI_CTL_ENABLE_ON_EXEC: c_int = 1; +pub const PROC_KPTI_CTL_DISABLE_ON_EXEC: c_int = 2; +pub const PROC_KPTI_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 1; +pub const PROC_KPTI_STATUS_ACTIVE: c_int = 0x80000000; +pub const PROC_LA_CTL: c_int = crate::PROC_PROCCTL_MD_MIN + 2; +pub const PROC_LA_STATUS: c_int = crate::PROC_PROCCTL_MD_MIN + 3; +pub const PROC_LA_CTL_LA48_ON_EXEC: c_int = 1; +pub const PROC_LA_CTL_LA57_ON_EXEC: c_int = 2; +pub const PROC_LA_CTL_DEFAULT_ON_EXEC: c_int = 3; +pub const PROC_LA_STATUS_LA48: c_int = 0x01000000; +pub const PROC_LA_STATUS_LA57: c_int = 0x02000000; diff --git a/src/unix/bsd/freebsdlike/freebsd/mod.rs b/src/unix/bsd/freebsdlike/freebsd/mod.rs index 302688063b617..c7ad90ae176b2 100644 --- a/src/unix/bsd/freebsdlike/freebsd/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/mod.rs @@ -1,3 +1,7 @@ +use crate::{ + c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, cmsghdr, off_t, size_t, ssize_t, +}; + pub type fflags_t = u32; pub type vm_prot_t = u_char; @@ -8,42 +12,42 @@ pub type fixpt_t = __fixpt_t; pub type __lwpid_t = i32; pub type lwpid_t = __lwpid_t; pub type blksize_t = i32; -pub type clockid_t = ::c_int; +pub type clockid_t = c_int; pub type sem_t = _sem; pub type timer_t = *mut __c_anonymous__timer; pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; -pub type idtype_t = ::c_uint; +pub type idtype_t = c_uint; -pub type msglen_t = ::c_ulong; -pub type msgqnum_t = ::c_ulong; +pub type msglen_t = c_ulong; +pub type msgqnum_t = c_ulong; -pub type cpulevel_t = ::c_int; -pub type cpuwhich_t = ::c_int; +pub type cpulevel_t = c_int; +pub type cpuwhich_t = c_int; -pub type mqd_t = *mut ::c_void; -pub type posix_spawnattr_t = *mut ::c_void; -pub type posix_spawn_file_actions_t = *mut ::c_void; +pub type mqd_t = *mut c_void; +pub type posix_spawnattr_t = *mut c_void; +pub type posix_spawn_file_actions_t = *mut c_void; pub type pthread_spinlock_t = *mut __c_anonymous_pthread_spinlock; pub type pthread_barrierattr_t = *mut __c_anonymous_pthread_barrierattr; pub type pthread_barrier_t = *mut __c_anonymous_pthread_barrier; -pub type uuid_t = ::uuid; -pub type u_int = ::c_uint; -pub type u_char = ::c_uchar; -pub type u_long = ::c_ulong; -pub type u_short = ::c_ushort; +pub type uuid_t = crate::uuid; +pub type u_int = c_uint; +pub type u_char = c_uchar; +pub type u_long = c_ulong; +pub type u_short = c_ushort; -pub type caddr_t = *mut ::c_char; +pub type caddr_t = *mut c_char; pub type fhandle_t = fhandle; -pub type au_id_t = ::uid_t; -pub type au_asid_t = ::pid_t; +pub type au_id_t = crate::uid_t; +pub type au_asid_t = crate::pid_t; -pub type cpusetid_t = ::c_int; +pub type cpusetid_t = c_int; pub type sctp_assoc_t = u32; @@ -57,8 +61,8 @@ pub enum devstat_support_flags { DEVSTAT_NO_ORDERED_TAGS = 0x02, DEVSTAT_BS_UNAVAILABLE = 0x04, } -impl ::Copy for devstat_support_flags {} -impl ::Clone for devstat_support_flags { +impl Copy for devstat_support_flags {} +impl Clone for devstat_support_flags { fn clone(&self) -> devstat_support_flags { *self } @@ -73,8 +77,8 @@ pub enum devstat_trans_flags { DEVSTAT_FREE = 0x03, } -impl ::Copy for devstat_trans_flags {} -impl ::Clone for devstat_trans_flags { +impl Copy for devstat_trans_flags {} +impl Clone for devstat_trans_flags { fn clone(&self) -> devstat_trans_flags { *self } @@ -88,8 +92,8 @@ pub enum devstat_tag_type { DEVSTAT_TAG_ORDERED = 0x02, DEVSTAT_TAG_NONE = 0x03, } -impl ::Copy for devstat_tag_type {} -impl ::Clone for devstat_tag_type { +impl Copy for devstat_tag_type {} +impl Clone for devstat_tag_type { fn clone(&self) -> devstat_tag_type { *self } @@ -103,8 +107,8 @@ pub enum devstat_match_flags { DEVSTAT_MATCH_IF = 0x02, DEVSTAT_MATCH_PASS = 0x04, } -impl ::Copy for devstat_match_flags {} -impl ::Clone for devstat_match_flags { +impl Copy for devstat_match_flags {} +impl Clone for devstat_match_flags { fn clone(&self) -> devstat_match_flags { *self } @@ -124,8 +128,8 @@ pub enum devstat_priority { DEVSTAT_PRIORITY_ARRAY = 0x120, DEVSTAT_PRIORITY_MAX = 0xfff, } -impl ::Copy for devstat_priority {} -impl ::Clone for devstat_priority { +impl Copy for devstat_priority {} +impl Clone for devstat_priority { fn clone(&self) -> devstat_priority { *self } @@ -156,8 +160,8 @@ pub enum devstat_type_flags { DEVSTAT_TYPE_IF_MASK = 0x0f0, DEVSTAT_TYPE_PASS = 0x100, } -impl ::Copy for devstat_type_flags {} -impl ::Clone for devstat_type_flags { +impl Copy for devstat_type_flags {} +impl Clone for devstat_type_flags { fn clone(&self) -> devstat_type_flags { *self } @@ -213,8 +217,8 @@ pub enum devstat_metric { DSM_TOTAL_BUSY_TIME, DSM_MAX, } -impl ::Copy for devstat_metric {} -impl ::Clone for devstat_metric { +impl Copy for devstat_metric {} +impl Clone for devstat_metric { fn clone(&self) -> devstat_metric { *self } @@ -228,8 +232,8 @@ pub enum devstat_select_mode { DS_SELECT_REMOVE, DS_SELECT_ADDONLY, } -impl ::Copy for devstat_select_mode {} -impl ::Clone for devstat_select_mode { +impl Copy for devstat_select_mode {} +impl Clone for devstat_select_mode { fn clone(&self) -> devstat_select_mode { *self } @@ -237,34 +241,34 @@ impl ::Clone for devstat_select_mode { s! { pub struct __c_anonymous_sigev_thread { - pub _function: Option *mut ::c_void>, - //pub _function: *mut ::c_void, // Actually a function pointer - pub _attribute: *mut ::pthread_attr_t, + pub _function: Option *mut c_void>, + //pub _function: *mut c_void, // Actually a function pointer + pub _attribute: *mut crate::pthread_attr_t, } pub struct jail { pub version: u32, - pub path: *mut ::c_char, - pub hostname: *mut ::c_char, - pub jailname: *mut ::c_char, - pub ip4s: ::c_uint, - pub ip6s: ::c_uint, - pub ip4: *mut ::in_addr, - pub ip6: *mut ::in6_addr, + pub path: *mut c_char, + pub hostname: *mut c_char, + pub jailname: *mut c_char, + pub ip4s: c_uint, + pub ip6s: c_uint, + pub ip4: *mut crate::in_addr, + pub ip6: *mut crate::in6_addr, } pub struct statvfs { - pub f_bavail: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_blocks: ::fsblkcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_bsize: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_fsid: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bavail: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_bsize: c_ulong, + pub f_flag: c_ulong, + pub f_frsize: c_ulong, + pub f_fsid: c_ulong, + pub f_namemax: c_ulong, } // internal structure has changed over time @@ -272,98 +276,98 @@ s! { data: [u32; 4], } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - pub msg_cbytes: ::msglen_t, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, + pub msg_perm: crate::ipc_perm, + __unused1: *mut c_void, + __unused2: *mut c_void, + pub msg_cbytes: crate::msglen_t, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::ssize_t, + pub msg_hdr: crate::msghdr, + pub msg_len: ssize_t, } pub struct sockcred { - pub sc_uid: ::uid_t, - pub sc_euid: ::uid_t, - pub sc_gid: ::gid_t, - pub sc_egid: ::gid_t, - pub sc_ngroups: ::c_int, - pub sc_groups: [::gid_t; 1], + pub sc_uid: crate::uid_t, + pub sc_euid: crate::uid_t, + pub sc_gid: crate::gid_t, + pub sc_egid: crate::gid_t, + pub sc_ngroups: c_int, + pub sc_groups: [crate::gid_t; 1], } pub struct ptrace_vm_entry { - pub pve_entry: ::c_int, - pub pve_timestamp: ::c_int, - pub pve_start: ::c_ulong, - pub pve_end: ::c_ulong, - pub pve_offset: ::c_ulong, - pub pve_prot: ::c_uint, - pub pve_pathlen: ::c_uint, - pub pve_fileid: ::c_long, + pub pve_entry: c_int, + pub pve_timestamp: c_int, + pub pve_start: c_ulong, + pub pve_end: c_ulong, + pub pve_offset: c_ulong, + pub pve_prot: c_uint, + pub pve_pathlen: c_uint, + pub pve_fileid: c_long, pub pve_fsid: u32, - pub pve_path: *mut ::c_char, + pub pve_path: *mut c_char, } pub struct ptrace_lwpinfo { pub pl_lwpid: lwpid_t, - pub pl_event: ::c_int, - pub pl_flags: ::c_int, - pub pl_sigmask: ::sigset_t, - pub pl_siglist: ::sigset_t, - pub pl_siginfo: ::siginfo_t, - pub pl_tdname: [::c_char; ::MAXCOMLEN as usize + 1], - pub pl_child_pid: ::pid_t, - pub pl_syscall_code: ::c_uint, - pub pl_syscall_narg: ::c_uint, + pub pl_event: c_int, + pub pl_flags: c_int, + pub pl_sigmask: crate::sigset_t, + pub pl_siglist: crate::sigset_t, + pub pl_siginfo: crate::siginfo_t, + pub pl_tdname: [c_char; crate::MAXCOMLEN as usize + 1], + pub pl_child_pid: crate::pid_t, + pub pl_syscall_code: c_uint, + pub pl_syscall_narg: c_uint, } pub struct ptrace_sc_ret { - pub sr_retval: [::register_t; 2], - pub sr_error: ::c_int, + pub sr_retval: [crate::register_t; 2], + pub sr_error: c_int, } pub struct ptrace_coredump { - pub pc_fd: ::c_int, + pub pc_fd: c_int, pub pc_flags: u32, - pub pc_limit: ::off_t, + pub pc_limit: off_t, } pub struct ptrace_sc_remote { pub pscr_ret: ptrace_sc_ret, - pub pscr_syscall: ::c_uint, - pub pscr_nargs: ::c_uint, - pub pscr_args: *mut ::register_t, + pub pscr_syscall: c_uint, + pub pscr_nargs: c_uint, + pub pscr_args: *mut crate::register_t, } pub struct cpuset_t { #[cfg(all(any(freebsd15, freebsd14), target_pointer_width = "64"))] - __bits: [::c_long; 16], + __bits: [c_long; 16], #[cfg(all(any(freebsd15, freebsd14), target_pointer_width = "32"))] - __bits: [::c_long; 32], + __bits: [c_long; 32], #[cfg(all(not(any(freebsd15, freebsd14)), target_pointer_width = "64"))] - __bits: [::c_long; 4], + __bits: [c_long; 4], #[cfg(all(not(any(freebsd15, freebsd14)), target_pointer_width = "32"))] - __bits: [::c_long; 8], + __bits: [c_long; 8], } pub struct cap_rights_t { @@ -371,10 +375,10 @@ s! { } pub struct umutex { - m_owner: ::lwpid_t, + m_owner: crate::lwpid_t, m_flags: u32, m_ceilings: [u32; 2], - m_rb_link: ::uintptr_t, + m_rb_link: crate::uintptr_t, #[cfg(target_pointer_width = "32")] m_pad: u32, m_spare: [u32; 2], @@ -401,22 +405,22 @@ s! { } pub struct __c_anonymous_pthread_barrierattr { - pshared: ::c_int, + pshared: c_int, } pub struct __c_anonymous_pthread_barrier { b_lock: umutex, b_cv: ucond, b_cycle: i64, - b_count: ::c_int, - b_waiters: ::c_int, - b_refcount: ::c_int, - b_destroying: ::c_int, + b_count: c_int, + b_waiters: c_int, + b_refcount: c_int, + b_destroying: c_int, } pub struct kinfo_vmentry { - pub kve_structsize: ::c_int, - pub kve_type: ::c_int, + pub kve_structsize: c_int, + pub kve_type: c_int, pub kve_start: u64, pub kve_end: u64, pub kve_offset: u64, @@ -425,13 +429,13 @@ s! { pub kve_vn_fsid_freebsd11: u32, #[cfg(freebsd11)] pub kve_vn_fsid: u32, - pub kve_flags: ::c_int, - pub kve_resident: ::c_int, - pub kve_private_resident: ::c_int, - pub kve_protection: ::c_int, - pub kve_ref_count: ::c_int, - pub kve_shadow_count: ::c_int, - pub kve_vn_type: ::c_int, + pub kve_flags: c_int, + pub kve_resident: c_int, + pub kve_private_resident: c_int, + pub kve_protection: c_int, + pub kve_ref_count: c_int, + pub kve_shadow_count: c_int, + pub kve_vn_type: c_int, pub kve_vn_size: u64, #[cfg(not(freebsd11))] pub kve_vn_rdev_freebsd11: u32, @@ -444,10 +448,10 @@ s! { #[cfg(not(freebsd11))] pub kve_vn_rdev: u64, #[cfg(not(freebsd11))] - _kve_is_spare: [::c_int; 8], + _kve_is_spare: [c_int; 8], #[cfg(freebsd11)] - _kve_is_spare: [::c_int; 12], - pub kve_path: [::c_char; ::PATH_MAX as usize], + _kve_is_spare: [c_int; 12], + pub kve_path: [c_char; crate::PATH_MAX as usize], } pub struct __c_anonymous_filestat { @@ -455,15 +459,15 @@ s! { } pub struct filestat { - pub fs_type: ::c_int, - pub fs_flags: ::c_int, - pub fs_fflags: ::c_int, - pub fs_uflags: ::c_int, - pub fs_fd: ::c_int, - pub fs_ref_count: ::c_int, - pub fs_offset: ::off_t, - pub fs_typedep: *mut ::c_void, - pub fs_path: *mut ::c_char, + pub fs_type: c_int, + pub fs_flags: c_int, + pub fs_fflags: c_int, + pub fs_uflags: c_int, + pub fs_fd: c_int, + pub fs_ref_count: c_int, + pub fs_offset: off_t, + pub fs_typedep: *mut c_void, + pub fs_path: *mut c_char, pub next: __c_anonymous_filestat, pub fs_cap_rights: cap_rights_t, } @@ -474,22 +478,22 @@ s! { } pub struct procstat { - pub tpe: ::c_int, - pub kd: ::uintptr_t, - pub vmentries: *mut ::c_void, - pub files: *mut ::c_void, - pub argv: *mut ::c_void, - pub envv: *mut ::c_void, - pub core: ::uintptr_t, + pub tpe: c_int, + pub kd: crate::uintptr_t, + pub vmentries: *mut c_void, + pub files: *mut c_void, + pub argv: *mut c_void, + pub envv: *mut c_void, + pub core: crate::uintptr_t, } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct __c_anonymous__timer { - _priv: [::c_int; 3], + _priv: [c_int; 3], } /// Used to hold a copy of the command line, if it had a sane length. @@ -499,7 +503,7 @@ s! { /// Length. pub ar_length: u_int, /// Arguments. - pub ar_args: [::c_uchar; 1], + pub ar_args: [c_uchar; 1], } pub struct priority { @@ -514,42 +518,42 @@ s! { } pub struct kvm_swap { - pub ksw_devname: [::c_char; 32], + pub ksw_devname: [c_char; 32], pub ksw_used: u_int, pub ksw_total: u_int, - pub ksw_flags: ::c_int, + pub ksw_flags: c_int, pub ksw_reserved1: u_int, pub ksw_reserved2: u_int, } pub struct nlist { /// symbol name (in memory) - pub n_name: *const ::c_char, + pub n_name: *const c_char, /// type defines - pub n_type: ::c_uchar, + pub n_type: c_uchar, /// "type" and binding information - pub n_other: ::c_char, + pub n_other: c_char, /// used by stab entries - pub n_desc: ::c_short, - pub n_value: ::c_ulong, + pub n_desc: c_short, + pub n_value: c_ulong, } pub struct kvm_nlist { - pub n_name: *const ::c_char, - pub n_type: ::c_uchar, - pub n_value: ::kvaddr_t, + pub n_name: *const c_char, + pub n_type: c_uchar, + pub n_value: crate::kvaddr_t, } pub struct __c_anonymous_sem { - _priv: ::uintptr_t, + _priv: crate::uintptr_t, } pub struct semid_ds { - pub sem_perm: ::ipc_perm, + pub sem_perm: crate::ipc_perm, pub __sem_base: *mut __c_anonymous_sem, - pub sem_nsems: ::c_ushort, - pub sem_otime: ::time_t, - pub sem_ctime: ::time_t, + pub sem_nsems: c_ushort, + pub sem_otime: crate::time_t, + pub sem_ctime: crate::time_t, } pub struct vmtotal { @@ -575,20 +579,20 @@ s! { pub so_addr: u64, pub so_pcb: u64, pub unp_conn: u64, - pub dom_family: ::c_int, - pub proto: ::c_int, - pub so_rcv_sb_state: ::c_int, - pub so_snd_sb_state: ::c_int, + pub dom_family: c_int, + pub proto: c_int, + pub so_rcv_sb_state: c_int, + pub so_snd_sb_state: c_int, /// Socket address. - pub sa_local: ::sockaddr_storage, + pub sa_local: crate::sockaddr_storage, /// Peer address. - pub sa_peer: ::sockaddr_storage, - pub type_: ::c_int, - pub dname: [::c_char; 32], + pub sa_peer: crate::sockaddr_storage, + pub type_: c_int, + pub dname: [c_char; 32], #[cfg(any(freebsd12, freebsd13, freebsd14, freebsd15))] - pub sendq: ::c_uint, + pub sendq: c_uint, #[cfg(any(freebsd12, freebsd13, freebsd14, freebsd15))] - pub recvq: ::c_uint, + pub recvq: c_uint, } pub struct shmstat { @@ -597,8 +601,8 @@ s! { } pub struct spacectl_range { - pub r_offset: ::off_t, - pub r_len: ::off_t, + pub r_offset: off_t, + pub r_len: off_t, } pub struct rusage_ext { @@ -612,173 +616,173 @@ s! { } pub struct if_clonereq { - pub ifcr_total: ::c_int, - pub ifcr_count: ::c_int, - pub ifcr_buffer: *mut ::c_char, + pub ifcr_total: c_int, + pub ifcr_count: c_int, + pub ifcr_buffer: *mut c_char, } pub struct if_msghdr { /// to skip over non-understood messages - pub ifm_msglen: ::c_ushort, + pub ifm_msglen: c_ushort, /// future binary compatibility - pub ifm_version: ::c_uchar, + pub ifm_version: c_uchar, /// message type - pub ifm_type: ::c_uchar, + pub ifm_type: c_uchar, /// like rtm_addrs - pub ifm_addrs: ::c_int, + pub ifm_addrs: c_int, /// value of if_flags - pub ifm_flags: ::c_int, + pub ifm_flags: c_int, /// index for associated ifp - pub ifm_index: ::c_ushort, - pub _ifm_spare1: ::c_ushort, + pub ifm_index: c_ushort, + pub _ifm_spare1: c_ushort, /// statistics and other data about if pub ifm_data: if_data, } pub struct if_msghdrl { /// to skip over non-understood messages - pub ifm_msglen: ::c_ushort, + pub ifm_msglen: c_ushort, /// future binary compatibility - pub ifm_version: ::c_uchar, + pub ifm_version: c_uchar, /// message type - pub ifm_type: ::c_uchar, + pub ifm_type: c_uchar, /// like rtm_addrs - pub ifm_addrs: ::c_int, + pub ifm_addrs: c_int, /// value of if_flags - pub ifm_flags: ::c_int, + pub ifm_flags: c_int, /// index for associated ifp - pub ifm_index: ::c_ushort, + pub ifm_index: c_ushort, /// spare space to grow if_index, see if_var.h - pub _ifm_spare1: ::c_ushort, + pub _ifm_spare1: c_ushort, /// length of if_msghdrl incl. if_data - pub ifm_len: ::c_ushort, + pub ifm_len: c_ushort, /// offset of if_data from beginning - pub ifm_data_off: ::c_ushort, - pub _ifm_spare2: ::c_int, + pub ifm_data_off: c_ushort, + pub _ifm_spare2: c_int, /// statistics and other data about if pub ifm_data: if_data, } pub struct ifa_msghdr { /// to skip over non-understood messages - pub ifam_msglen: ::c_ushort, + pub ifam_msglen: c_ushort, /// future binary compatibility - pub ifam_version: ::c_uchar, + pub ifam_version: c_uchar, /// message type - pub ifam_type: ::c_uchar, + pub ifam_type: c_uchar, /// like rtm_addrs - pub ifam_addrs: ::c_int, + pub ifam_addrs: c_int, /// value of ifa_flags - pub ifam_flags: ::c_int, + pub ifam_flags: c_int, /// index for associated ifp - pub ifam_index: ::c_ushort, - pub _ifam_spare1: ::c_ushort, + pub ifam_index: c_ushort, + pub _ifam_spare1: c_ushort, /// value of ifa_ifp->if_metric - pub ifam_metric: ::c_int, + pub ifam_metric: c_int, } pub struct ifa_msghdrl { /// to skip over non-understood messages - pub ifam_msglen: ::c_ushort, + pub ifam_msglen: c_ushort, /// future binary compatibility - pub ifam_version: ::c_uchar, + pub ifam_version: c_uchar, /// message type - pub ifam_type: ::c_uchar, + pub ifam_type: c_uchar, /// like rtm_addrs - pub ifam_addrs: ::c_int, + pub ifam_addrs: c_int, /// value of ifa_flags - pub ifam_flags: ::c_int, + pub ifam_flags: c_int, /// index for associated ifp - pub ifam_index: ::c_ushort, + pub ifam_index: c_ushort, /// spare space to grow if_index, see if_var.h - pub _ifam_spare1: ::c_ushort, + pub _ifam_spare1: c_ushort, /// length of ifa_msghdrl incl. if_data - pub ifam_len: ::c_ushort, + pub ifam_len: c_ushort, /// offset of if_data from beginning - pub ifam_data_off: ::c_ushort, + pub ifam_data_off: c_ushort, /// value of ifa_ifp->if_metric - pub ifam_metric: ::c_int, + pub ifam_metric: c_int, /// statistics and other data about if or address pub ifam_data: if_data, } pub struct ifma_msghdr { /// to skip over non-understood messages - pub ifmam_msglen: ::c_ushort, + pub ifmam_msglen: c_ushort, /// future binary compatibility - pub ifmam_version: ::c_uchar, + pub ifmam_version: c_uchar, /// message type - pub ifmam_type: ::c_uchar, + pub ifmam_type: c_uchar, /// like rtm_addrs - pub ifmam_addrs: ::c_int, + pub ifmam_addrs: c_int, /// value of ifa_flags - pub ifmam_flags: ::c_int, + pub ifmam_flags: c_int, /// index for associated ifp - pub ifmam_index: ::c_ushort, - pub _ifmam_spare1: ::c_ushort, + pub ifmam_index: c_ushort, + pub _ifmam_spare1: c_ushort, } pub struct if_announcemsghdr { /// to skip over non-understood messages - pub ifan_msglen: ::c_ushort, + pub ifan_msglen: c_ushort, /// future binary compatibility - pub ifan_version: ::c_uchar, + pub ifan_version: c_uchar, /// message type - pub ifan_type: ::c_uchar, + pub ifan_type: c_uchar, /// index for associated ifp - pub ifan_index: ::c_ushort, + pub ifan_index: c_ushort, /// if name, e.g. "en0" - pub ifan_name: [::c_char; ::IFNAMSIZ as usize], + pub ifan_name: [c_char; crate::IFNAMSIZ as usize], /// what type of announcement - pub ifan_what: ::c_ushort, + pub ifan_what: c_ushort, } pub struct ifreq_buffer { - pub length: ::size_t, - pub buffer: *mut ::c_void, + pub length: size_t, + pub buffer: *mut c_void, } pub struct ifaliasreq { /// if name, e.g. "en0" - pub ifra_name: [::c_char; ::IFNAMSIZ as usize], - pub ifra_addr: ::sockaddr, - pub ifra_broadaddr: ::sockaddr, - pub ifra_mask: ::sockaddr, - pub ifra_vhid: ::c_int, + pub ifra_name: [c_char; crate::IFNAMSIZ as usize], + pub ifra_addr: crate::sockaddr, + pub ifra_broadaddr: crate::sockaddr, + pub ifra_mask: crate::sockaddr, + pub ifra_vhid: c_int, } /// 9.x compat pub struct oifaliasreq { /// if name, e.g. "en0" - pub ifra_name: [::c_char; ::IFNAMSIZ as usize], - pub ifra_addr: ::sockaddr, - pub ifra_broadaddr: ::sockaddr, - pub ifra_mask: ::sockaddr, + pub ifra_name: [c_char; crate::IFNAMSIZ as usize], + pub ifra_addr: crate::sockaddr, + pub ifra_broadaddr: crate::sockaddr, + pub ifra_mask: crate::sockaddr, } pub struct ifmediareq { /// if name, e.g. "en0" - pub ifm_name: [::c_char; ::IFNAMSIZ as usize], + pub ifm_name: [c_char; crate::IFNAMSIZ as usize], /// current media options - pub ifm_current: ::c_int, + pub ifm_current: c_int, /// don't care mask - pub ifm_mask: ::c_int, + pub ifm_mask: c_int, /// media status - pub ifm_status: ::c_int, + pub ifm_status: c_int, /// active options - pub ifm_active: ::c_int, + pub ifm_active: c_int, /// # entries in ifm_ulist array - pub ifm_count: ::c_int, + pub ifm_count: c_int, /// media words - pub ifm_ulist: *mut ::c_int, + pub ifm_ulist: *mut c_int, } pub struct ifdrv { /// if name, e.g. "en0" - pub ifd_name: [::c_char; ::IFNAMSIZ as usize], - pub ifd_cmd: ::c_ulong, - pub ifd_len: ::size_t, - pub ifd_data: *mut ::c_void, + pub ifd_name: [c_char; crate::IFNAMSIZ as usize], + pub ifd_cmd: c_ulong, + pub ifd_len: size_t, + pub ifd_data: *mut c_void, } pub struct ifi2creq { @@ -796,7 +800,7 @@ s! { pub struct ifrsshash { /// if name, e.g. "en0" - pub ifrh_name: [::c_char; ::IFNAMSIZ as usize], + pub ifrh_name: [c_char; crate::IFNAMSIZ as usize], /// RSS_FUNC_ pub ifrh_func: u8, pub ifrh_spare0: u8, @@ -807,19 +811,19 @@ s! { pub struct ifmibdata { /// name of interface - pub ifmd_name: [::c_char; ::IFNAMSIZ as usize], + pub ifmd_name: [c_char; crate::IFNAMSIZ as usize], /// number of promiscuous listeners - pub ifmd_pcount: ::c_int, + pub ifmd_pcount: c_int, /// interface flags - pub ifmd_flags: ::c_int, + pub ifmd_flags: c_int, /// instantaneous length of send queue - pub ifmd_snd_len: ::c_int, + pub ifmd_snd_len: c_int, /// maximum length of send queue - pub ifmd_snd_maxlen: ::c_int, + pub ifmd_snd_maxlen: c_int, /// number of drops in send queue - pub ifmd_snd_drops: ::c_int, + pub ifmd_snd_drops: c_int, /// for future expansion - pub ifmd_filler: [::c_int; 4], + pub ifmd_filler: [c_int; 4], /// generic information and statistics pub ifmd_data: if_data, } @@ -849,31 +853,31 @@ s! { } pub struct fid { - pub fid_len: ::c_ushort, - pub fid_data0: ::c_ushort, - pub fid_data: [::c_char; ::MAXFIDSZ as usize], + pub fid_len: c_ushort, + pub fid_data0: c_ushort, + pub fid_data: [c_char; crate::MAXFIDSZ as usize], } pub struct fhandle { - pub fh_fsid: ::fsid_t, + pub fh_fsid: crate::fsid_t, pub fh_fid: fid, } pub struct bintime { - pub sec: ::time_t, + pub sec: crate::time_t, pub frac: u64, } pub struct clockinfo { /// clock frequency - pub hz: ::c_int, + pub hz: c_int, /// micro-seconds per hz tick - pub tick: ::c_int, - pub spare: ::c_int, + pub tick: c_int, + pub spare: c_int, /// statistics clock frequency - pub stathz: ::c_int, + pub stathz: c_int, /// profiling clock frequency - pub profhz: ::c_int, + pub profhz: c_int, } pub struct __c_anonymous_stailq_entry_devstat { @@ -882,20 +886,20 @@ s! { pub struct devstat { /// Update sequence - pub sequence0: ::u_int, + pub sequence0: crate::u_int, /// Allocated entry - pub allocated: ::c_int, + pub allocated: c_int, /// started ops - pub start_count: ::u_int, + pub start_count: crate::u_int, /// completed ops - pub end_count: ::u_int, + pub end_count: crate::u_int, /// busy time unaccounted for since this time pub busy_from: bintime, pub dev_links: __c_anonymous_stailq_entry_devstat, /// Devstat device number. pub device_number: u32, - pub device_name: [::c_char; DEVSTAT_NAME_LEN as usize], - pub unit_number: ::c_int, + pub device_name: [c_char; DEVSTAT_NAME_LEN as usize], + pub unit_number: c_int, pub bytes: [u64; DEVSTAT_N_TRANS_FLAGS as usize], pub operations: [u64; DEVSTAT_N_TRANS_FLAGS as usize], pub duration: [bintime; DEVSTAT_N_TRANS_FLAGS as usize], @@ -913,58 +917,58 @@ s! { /// Controls list pos. pub priority: devstat_priority, /// Identification for GEOM nodes - pub id: *const ::c_void, + pub id: *const c_void, /// Update sequence - pub sequence1: ::u_int, + pub sequence1: crate::u_int, } pub struct devstat_match { pub match_fields: devstat_match_flags, pub device_type: devstat_type_flags, - pub num_match_categories: ::c_int, + pub num_match_categories: c_int, } pub struct devstat_match_table { - pub match_str: *const ::c_char, + pub match_str: *const c_char, pub type_: devstat_type_flags, pub match_field: devstat_match_flags, } pub struct device_selection { pub device_number: u32, - pub device_name: [::c_char; DEVSTAT_NAME_LEN as usize], - pub unit_number: ::c_int, - pub selected: ::c_int, + pub device_name: [c_char; DEVSTAT_NAME_LEN as usize], + pub unit_number: c_int, + pub selected: c_int, pub bytes: u64, - pub position: ::c_int, + pub position: c_int, } pub struct devinfo { pub devices: *mut devstat, pub mem_ptr: *mut u8, - pub generation: ::c_long, - pub numdevs: ::c_int, + pub generation: c_long, + pub numdevs: c_int, } pub struct sockcred2 { - pub sc_version: ::c_int, - pub sc_pid: ::pid_t, - pub sc_uid: ::uid_t, - pub sc_euid: ::uid_t, - pub sc_gid: ::gid_t, - pub sc_egid: ::gid_t, - pub sc_ngroups: ::c_int, - pub sc_groups: [::gid_t; 1], + pub sc_version: c_int, + pub sc_pid: crate::pid_t, + pub sc_uid: crate::uid_t, + pub sc_euid: crate::uid_t, + pub sc_gid: crate::gid_t, + pub sc_egid: crate::gid_t, + pub sc_ngroups: c_int, + pub sc_groups: [crate::gid_t; 1], } pub struct ifconf { - pub ifc_len: ::c_int, + pub ifc_len: c_int, pub ifc_ifcu: __c_anonymous_ifc_ifcu, } pub struct au_mask_t { - pub am_success: ::c_uint, - pub am_failure: ::c_uint, + pub am_success: c_uint, + pub am_failure: c_uint, } pub struct au_tid_t { @@ -973,19 +977,19 @@ s! { } pub struct auditinfo_t { - pub ai_auid: ::au_id_t, - pub ai_mask: ::au_mask_t, + pub ai_auid: crate::au_id_t, + pub ai_mask: crate::au_mask_t, pub ai_termid: au_tid_t, - pub ai_asid: ::au_asid_t, + pub ai_asid: crate::au_asid_t, } pub struct tcp_fastopen { - pub enable: ::c_int, - pub psk: [u8; ::TCP_FASTOPEN_PSK_LEN as usize], + pub enable: c_int, + pub psk: [u8; crate::TCP_FASTOPEN_PSK_LEN as usize], } pub struct tcp_function_set { - pub function_set_name: [::c_char; ::TCP_FUNCTION_NAME_LEN_MAX as usize], + pub function_set_name: [c_char; crate::TCP_FUNCTION_NAME_LEN_MAX as usize], pub pcbcnt: u32, } @@ -1078,33 +1082,33 @@ s! { } pub struct _umtx_time { - pub _timeout: ::timespec, + pub _timeout: crate::timespec, pub _flags: u32, pub _clockid: u32, } pub struct shm_largepage_conf { - pub psind: ::c_int, - pub alloc_policy: ::c_int, - __pad: [::c_int; 10], + pub psind: c_int, + pub alloc_policy: c_int, + __pad: [c_int; 10], } pub struct memory_type { - __priva: [::uintptr_t; 32], - __privb: [::uintptr_t; 26], + __priva: [crate::uintptr_t; 32], + __privb: [crate::uintptr_t; 26], } pub struct memory_type_list { - __priv: [::uintptr_t; 2], + __priv: [crate::uintptr_t; 2], } pub struct pidfh { - __priva: [[::uintptr_t; 32]; 8], - __privb: [::uintptr_t; 2], + __priva: [[crate::uintptr_t; 32]; 8], + __privb: [crate::uintptr_t; 2], } pub struct sctp_event { - pub se_assoc_id: ::sctp_assoc_t, + pub se_assoc_id: crate::sctp_assoc_t, pub se_type: u16, pub se_on: u8, } @@ -1139,7 +1143,7 @@ s! { pub sinfo_timetolive: u32, pub sinfo_tsn: u32, pub sinfo_cumtsn: u32, - pub sinfo_assoc_id: ::sctp_assoc_t, + pub sinfo_assoc_id: crate::sctp_assoc_t, pub sinfo_keynumber: u16, pub sinfo_keynumber_valid: u16, pub __reserve_pad: [u8; SCTP_ALIGN_RESV_PAD], @@ -1154,7 +1158,7 @@ s! { pub sinfo_timetolive: u32, pub sinfo_tsn: u32, pub sinfo_cumtsn: u32, - pub sinfo_assoc_id: ::sctp_assoc_t, + pub sinfo_assoc_id: crate::sctp_assoc_t, pub serinfo_next_flags: u16, pub serinfo_next_stream: u16, pub serinfo_next_aid: u32, @@ -1170,7 +1174,7 @@ s! { pub snd_flags: u16, pub snd_ppid: u32, pub snd_context: u32, - pub snd_assoc_id: ::sctp_assoc_t, + pub snd_assoc_id: crate::sctp_assoc_t, } pub struct sctp_prinfo { @@ -1181,7 +1185,7 @@ s! { pub struct sctp_default_prinfo { pub pr_policy: u16, pub pr_value: u32, - pub pr_assoc_id: ::sctp_assoc_t, + pub pr_assoc_id: crate::sctp_assoc_t, } pub struct sctp_authinfo { @@ -1196,7 +1200,7 @@ s! { pub rcv_tsn: u32, pub rcv_cumtsn: u32, pub rcv_context: u32, - pub rcv_assoc_id: ::sctp_assoc_t, + pub rcv_assoc_id: crate::sctp_assoc_t, } pub struct sctp_nxtinfo { @@ -1204,7 +1208,7 @@ s! { pub nxt_flags: u16, pub nxt_ppid: u32, pub nxt_length: u32, - pub nxt_assoc_id: ::sctp_assoc_t, + pub nxt_assoc_id: crate::sctp_assoc_t, } pub struct sctp_recvv_rn { @@ -1240,7 +1244,7 @@ s! { } pub struct sctp_sockstat { - pub ss_assoc_id: ::sctp_assoc_t, + pub ss_assoc_id: crate::sctp_assoc_t, pub ss_total_sndbuf: u32, pub ss_total_recv_buf: u32, } @@ -1253,7 +1257,7 @@ s! { pub sac_error: u16, pub sac_outbound_streams: u16, pub sac_inbound_streams: u16, - pub sac_assoc_id: ::sctp_assoc_t, + pub sac_assoc_id: crate::sctp_assoc_t, pub sac_info: [u8; 0], } @@ -1261,10 +1265,10 @@ s! { pub spc_type: u16, pub spc_flags: u16, pub spc_length: u32, - pub spc_aaddr: ::sockaddr_storage, + pub spc_aaddr: crate::sockaddr_storage, pub spc_state: u32, pub spc_error: u32, - pub spc_assoc_id: ::sctp_assoc_t, + pub spc_assoc_id: crate::sctp_assoc_t, } pub struct sctp_remote_error { @@ -1272,7 +1276,7 @@ s! { pub sre_flags: u16, pub sre_length: u32, pub sre_error: u16, - pub sre_assoc_id: ::sctp_assoc_t, + pub sre_assoc_id: crate::sctp_assoc_t, pub sre_data: [u8; 0], } @@ -1282,7 +1286,7 @@ s! { pub ssfe_length: u32, pub ssfe_error: u32, pub ssfe_info: sctp_sndinfo, - pub ssfe_assoc_id: ::sctp_assoc_t, + pub ssfe_assoc_id: crate::sctp_assoc_t, pub ssfe_data: [u8; 0], } @@ -1290,7 +1294,7 @@ s! { pub sse_type: u16, pub sse_flags: u16, pub sse_length: u32, - pub sse_assoc_id: ::sctp_assoc_t, + pub sse_assoc_id: crate::sctp_assoc_t, } pub struct sctp_adaptation_event { @@ -1298,7 +1302,7 @@ s! { pub sai_flags: u16, pub sai_length: u32, pub sai_adaptation_ind: u32, - pub sai_assoc_id: ::sctp_assoc_t, + pub sai_assoc_id: crate::sctp_assoc_t, } pub struct sctp_setadaptation { @@ -1312,21 +1316,21 @@ s! { pub pdapi_indication: u32, pub pdapi_stream: u16, pub pdapi_seq: u16, - pub pdapi_assoc_id: ::sctp_assoc_t, + pub pdapi_assoc_id: crate::sctp_assoc_t, } pub struct sctp_sender_dry_event { pub sender_dry_type: u16, pub sender_dry_flags: u16, pub sender_dry_length: u32, - pub sender_dry_assoc_id: ::sctp_assoc_t, + pub sender_dry_assoc_id: crate::sctp_assoc_t, } pub struct sctp_stream_reset_event { pub strreset_type: u16, pub strreset_flags: u16, pub strreset_length: u32, - pub strreset_assoc_id: ::sctp_assoc_t, + pub strreset_assoc_id: crate::sctp_assoc_t, pub strreset_stream_list: [u16; 0], } @@ -1334,7 +1338,7 @@ s! { pub strchange_type: u16, pub strchange_flags: u16, pub strchange_length: u32, - pub strchange_assoc_id: ::sctp_assoc_t, + pub strchange_assoc_id: crate::sctp_assoc_t, pub strchange_instrms: u16, pub strchange_outstrms: u16, } @@ -1343,21 +1347,21 @@ s! { s_no_extra_traits! { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub struct __aiocb_private { - status: ::c_long, - error: ::c_long, - spare: *mut ::c_void, + status: c_long, + error: c_long, + spare: *mut c_void, } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_offset: ::off_t, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - __spare__: [::c_int; 2], - __spare2__: *mut ::c_void, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, + pub aio_fildes: c_int, + pub aio_offset: off_t, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + __spare__: [c_int; 2], + __spare2__: *mut c_void, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, _aiocb_private: __aiocb_private, pub aio_sigevent: sigevent, } @@ -1365,59 +1369,59 @@ s_no_extra_traits! { // Can't correctly impl Debug for unions #[allow(missing_debug_implementations)] pub union __c_anonymous_sigev_un { - pub _threadid: ::__lwpid_t, + pub _threadid: crate::__lwpid_t, pub _sigev_thread: __c_anonymous_sigev_thread, - pub _kevent_flags: ::c_ushort, - __spare__: [::c_long; 8], + pub _kevent_flags: c_ushort, + __spare__: [c_long; 8], } pub struct utmpx { - pub ut_type: ::c_short, - pub ut_tv: ::timeval, - pub ut_id: [::c_char; 8], - pub ut_pid: ::pid_t, - pub ut_user: [::c_char; 32], - pub ut_line: [::c_char; 16], - pub ut_host: [::c_char; 128], - pub __ut_spare: [::c_char; 64], + pub ut_type: c_short, + pub ut_tv: crate::timeval, + pub ut_id: [c_char; 8], + pub ut_pid: crate::pid_t, + pub ut_user: [c_char; 32], + pub ut_line: [c_char; 16], + pub ut_host: [c_char; 128], + pub __ut_spare: [c_char; 64], } pub union __c_anonymous_cr_pid { - __cr_unused: *mut ::c_void, - pub cr_pid: ::pid_t, + __cr_unused: *mut c_void, + pub cr_pid: crate::pid_t, } pub struct xucred { - pub cr_version: ::c_uint, - pub cr_uid: ::uid_t, - pub cr_ngroups: ::c_short, - pub cr_groups: [::gid_t; 16], + pub cr_version: c_uint, + pub cr_uid: crate::uid_t, + pub cr_ngroups: c_short, + pub cr_groups: [crate::gid_t; 16], pub cr_pid__c_anonymous_union: __c_anonymous_cr_pid, } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::c_uchar, - pub sdl_index: ::c_ushort, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 46], + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 46], } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, - __reserved: [::c_long; 4], + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, + __reserved: [c_long; 4], } pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, + pub sigev_notify: c_int, + pub sigev_signo: c_int, + pub sigev_value: crate::sigval, pub _sigev_un: __c_anonymous_sigev_un, } @@ -1426,25 +1430,25 @@ s_no_extra_traits! { pub dev: u64, #[cfg(not(any(freebsd12, freebsd13, freebsd14, freebsd15)))] pub dev: u32, - pub devname: [::c_char; SPECNAMELEN as usize + 1], + pub devname: [c_char; SPECNAMELEN as usize + 1], } pub union __c_anonymous_elf32_auxv_union { - pub a_val: ::c_int, + pub a_val: c_int, } pub struct Elf32_Auxinfo { - pub a_type: ::c_int, + pub a_type: c_int, pub a_un: __c_anonymous_elf32_auxv_union, } pub union __c_anonymous_ifi_epoch { - pub tt: ::time_t, + pub tt: crate::time_t, pub ph: u64, } pub union __c_anonymous_ifi_lastchange { - pub tv: ::timeval, + pub tv: crate::timeval, pub ph: __c_anonymous_ph, } @@ -1502,55 +1506,55 @@ s_no_extra_traits! { } pub union __c_anonymous_ifr_ifru { - pub ifru_addr: ::sockaddr, - pub ifru_dstaddr: ::sockaddr, - pub ifru_broadaddr: ::sockaddr, + pub ifru_addr: crate::sockaddr, + pub ifru_dstaddr: crate::sockaddr, + pub ifru_broadaddr: crate::sockaddr, pub ifru_buffer: ifreq_buffer, - pub ifru_flags: [::c_short; 2], - pub ifru_index: ::c_short, - pub ifru_jid: ::c_int, - pub ifru_metric: ::c_int, - pub ifru_mtu: ::c_int, - pub ifru_phys: ::c_int, - pub ifru_media: ::c_int, - pub ifru_data: ::caddr_t, - pub ifru_cap: [::c_int; 2], - pub ifru_fib: ::c_uint, - pub ifru_vlan_pcp: ::c_uchar, + pub ifru_flags: [c_short; 2], + pub ifru_index: c_short, + pub ifru_jid: c_int, + pub ifru_metric: c_int, + pub ifru_mtu: c_int, + pub ifru_phys: c_int, + pub ifru_media: c_int, + pub ifru_data: crate::caddr_t, + pub ifru_cap: [c_int; 2], + pub ifru_fib: c_uint, + pub ifru_vlan_pcp: c_uchar, } pub struct ifreq { /// if name, e.g. "en0" - pub ifr_name: [::c_char; ::IFNAMSIZ], + pub ifr_name: [c_char; crate::IFNAMSIZ], pub ifr_ifru: __c_anonymous_ifr_ifru, } pub union __c_anonymous_ifc_ifcu { - pub ifcu_buf: ::caddr_t, + pub ifcu_buf: crate::caddr_t, pub ifcu_req: *mut ifreq, } pub struct ifstat { /// if name, e.g. "en0" - pub ifs_name: [::c_char; ::IFNAMSIZ as usize], - pub ascii: [::c_char; ::IFSTATMAX as usize + 1], + pub ifs_name: [c_char; crate::IFNAMSIZ as usize], + pub ascii: [c_char; crate::IFSTATMAX as usize + 1], } pub struct ifrsskey { /// if name, e.g. "en0" - pub ifrk_name: [::c_char; ::IFNAMSIZ as usize], + pub ifrk_name: [c_char; crate::IFNAMSIZ as usize], /// RSS_FUNC_ pub ifrk_func: u8, pub ifrk_spare0: u8, pub ifrk_keylen: u16, - pub ifrk_key: [u8; ::RSS_KEYLEN as usize], + pub ifrk_key: [u8; crate::RSS_KEYLEN as usize], } pub struct ifdownreason { - pub ifdr_name: [::c_char; ::IFNAMSIZ as usize], + pub ifdr_name: [c_char; crate::IFNAMSIZ as usize], pub ifdr_reason: u32, pub ifdr_vendor: u32, - pub ifdr_msg: [::c_char; ::IFDR_MSG_SIZE as usize], + pub ifdr_msg: [c_char; crate::IFDR_MSG_SIZE as usize], } #[repr(packed)] @@ -1636,29 +1640,29 @@ s_no_extra_traits! { } pub struct kinfo_file { - pub kf_structsize: ::c_int, - pub kf_type: ::c_int, - pub kf_fd: ::c_int, - pub kf_ref_count: ::c_int, - pub kf_flags: ::c_int, - _kf_pad0: ::c_int, + pub kf_structsize: c_int, + pub kf_type: c_int, + pub kf_fd: c_int, + pub kf_ref_count: c_int, + pub kf_flags: c_int, + _kf_pad0: c_int, pub kf_offset: i64, _priv: [u8; 304], // FIXME: this is really a giant union pub kf_status: u16, _kf_pad1: u16, - _kf_ispare0: ::c_int, - pub kf_cap_rights: ::cap_rights_t, + _kf_ispare0: c_int, + pub kf_cap_rights: crate::cap_rights_t, _kf_cap_spare: u64, - pub kf_path: [::c_char; ::PATH_MAX as usize], + pub kf_path: [c_char; crate::PATH_MAX as usize], } pub struct ucontext_t { - pub uc_sigmask: ::sigset_t, - pub uc_mcontext: ::mcontext_t, - pub uc_link: *mut ::ucontext_t, - pub uc_stack: ::stack_t, - pub uc_flags: ::c_int, - __spare__: [::c_int; 4], + pub uc_sigmask: crate::sigset_t, + pub uc_mcontext: crate::mcontext_t, + pub uc_link: *mut crate::ucontext_t, + pub uc_stack: crate::stack_t, + pub uc_flags: c_int, + __spare__: [c_int; 4], } } @@ -1685,8 +1689,8 @@ cfg_if! { } } impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_type", &self.ut_type) .field("ut_tv", &self.ut_tv) @@ -1699,8 +1703,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_type.hash(state); self.ut_tv.hash(state); self.ut_id.hash(state); @@ -1718,15 +1722,15 @@ cfg_if! { } } impl Eq for __c_anonymous_cr_pid {} - impl ::fmt::Debug for __c_anonymous_cr_pid { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_cr_pid { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("cr_pid") .field("cr_pid", unsafe { &self.cr_pid }) .finish() } } - impl ::hash::Hash for __c_anonymous_cr_pid { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_cr_pid { + fn hash(&self, state: &mut H) { unsafe { self.cr_pid.hash(state) }; } } @@ -1741,8 +1745,8 @@ cfg_if! { } } impl Eq for xucred {} - impl ::fmt::Debug for xucred { - fn fmt(&self, f: &mut ::fmt::Formatter<'_>) -> ::fmt::Result { + impl crate::fmt::Debug for xucred { + fn fmt(&self, f: &mut crate::fmt::Formatter<'_>) -> crate::fmt::Result { f.debug_struct("xucred") .field("cr_version", &self.cr_version) .field("cr_uid", &self.cr_uid) @@ -1752,8 +1756,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for xucred { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for xucred { + fn hash(&self, state: &mut H) { self.cr_version.hash(state); self.cr_uid.hash(state); self.cr_ngroups.hash(state); @@ -1779,8 +1783,8 @@ cfg_if! { } } impl Eq for sockaddr_dl {} - impl ::fmt::Debug for sockaddr_dl { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_dl { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_dl") .field("sdl_len", &self.sdl_len) .field("sdl_family", &self.sdl_family) @@ -1793,8 +1797,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_dl { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_dl { + fn hash(&self, state: &mut H) { self.sdl_len.hash(state); self.sdl_family.hash(state); self.sdl_index.hash(state); @@ -1815,8 +1819,8 @@ cfg_if! { } } impl Eq for mq_attr {} - impl ::fmt::Debug for mq_attr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mq_attr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mq_attr") .field("mq_flags", &self.mq_flags) .field("mq_maxmsg", &self.mq_maxmsg) @@ -1825,8 +1829,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mq_attr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mq_attr { + fn hash(&self, state: &mut H) { self.mq_flags.hash(state); self.mq_maxmsg.hash(state); self.mq_msgsize.hash(state); @@ -1834,8 +1838,8 @@ cfg_if! { } } - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -1848,16 +1852,16 @@ cfg_if! { impl PartialEq for ptsstat { fn eq(&self, other: &ptsstat) -> bool { - let self_devname: &[::c_char] = &self.devname; - let other_devname: &[::c_char] = &other.devname; + let self_devname: &[c_char] = &self.devname; + let other_devname: &[c_char] = &other.devname; self.dev == other.dev && self_devname == other_devname } } impl Eq for ptsstat {} - impl ::fmt::Debug for ptsstat { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let self_devname: &[::c_char] = &self.devname; + impl crate::fmt::Debug for ptsstat { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let self_devname: &[c_char] = &self.devname; f.debug_struct("ptsstat") .field("dev", &self.dev) @@ -1865,9 +1869,9 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ptsstat { - fn hash(&self, state: &mut H) { - let self_devname: &[::c_char] = &self.devname; + impl crate::hash::Hash for ptsstat { + fn hash(&self, state: &mut H) { + let self_devname: &[c_char] = &self.devname; self.dev.hash(state); self_devname.hash(state); @@ -1880,8 +1884,8 @@ cfg_if! { } } impl Eq for __c_anonymous_elf32_auxv_union {} - impl ::fmt::Debug for __c_anonymous_elf32_auxv_union { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_elf32_auxv_union { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("a_val") .field("a_val", unsafe { &self.a_val }) .finish() @@ -1893,8 +1897,8 @@ cfg_if! { } } impl Eq for Elf32_Auxinfo {} - impl ::fmt::Debug for Elf32_Auxinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for Elf32_Auxinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("Elf32_Auxinfo") .field("a_type", &self.a_type) .field("a_un", &self.a_un) @@ -1924,8 +1928,8 @@ cfg_if! { } } impl Eq for __c_anonymous_ifr_ifru {} - impl ::fmt::Debug for __c_anonymous_ifr_ifru { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifr_ifru { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifr_ifru") .field("ifru_addr", unsafe { &self.ifru_addr }) .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) @@ -1945,8 +1949,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for __c_anonymous_ifr_ifru { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifr_ifru { + fn hash(&self, state: &mut H) { unsafe { self.ifru_addr.hash(state) }; unsafe { self.ifru_dstaddr.hash(state) }; unsafe { self.ifru_broadaddr.hash(state) }; @@ -1971,16 +1975,16 @@ cfg_if! { } } impl Eq for ifreq {} - impl ::fmt::Debug for ifreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifreq") .field("ifr_name", &self.ifr_name) .field("ifr_ifru", &self.ifr_ifru) .finish() } } - impl ::hash::Hash for ifreq { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifreq { + fn hash(&self, state: &mut H) { self.ifr_name.hash(state); self.ifr_ifru.hash(state); } @@ -1994,8 +1998,8 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_ifc_ifcu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifc_ifcu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifc_ifcu") .field("ifcu_buf", unsafe { &self.ifcu_buf }) .field("ifcu_req", unsafe { &self.ifcu_req }) @@ -2003,8 +2007,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_ifc_ifcu { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifc_ifcu { + fn hash(&self, state: &mut H) { unsafe { self.ifcu_buf.hash(state) }; unsafe { self.ifcu_req.hash(state) }; } @@ -2012,16 +2016,16 @@ cfg_if! { impl PartialEq for ifstat { fn eq(&self, other: &ifstat) -> bool { - let self_ascii: &[::c_char] = &self.ascii; - let other_ascii: &[::c_char] = &other.ascii; + let self_ascii: &[c_char] = &self.ascii; + let other_ascii: &[c_char] = &other.ascii; self.ifs_name == other.ifs_name && self_ascii == other_ascii } } impl Eq for ifstat {} - impl ::fmt::Debug for ifstat { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let ascii: &[::c_char] = &self.ascii; + impl crate::fmt::Debug for ifstat { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let ascii: &[c_char] = &self.ascii; f.debug_struct("ifstat") .field("ifs_name", &self.ifs_name) @@ -2029,8 +2033,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ifstat { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifstat { + fn hash(&self, state: &mut H) { self.ifs_name.hash(state); self.ascii.hash(state); } @@ -2049,8 +2053,8 @@ cfg_if! { } } impl Eq for ifrsskey {} - impl ::fmt::Debug for ifrsskey { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifrsskey { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let ifrk_key: &[u8] = &self.ifrk_key; f.debug_struct("ifrsskey") @@ -2062,8 +2066,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ifrsskey { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifrsskey { + fn hash(&self, state: &mut H) { self.ifrk_name.hash(state); self.ifrk_func.hash(state); self.ifrk_spare0.hash(state); @@ -2074,8 +2078,8 @@ cfg_if! { impl PartialEq for ifdownreason { fn eq(&self, other: &ifdownreason) -> bool { - let self_ifdr_msg: &[::c_char] = &self.ifdr_msg; - let other_ifdr_msg: &[::c_char] = &other.ifdr_msg; + let self_ifdr_msg: &[c_char] = &self.ifdr_msg; + let other_ifdr_msg: &[c_char] = &other.ifdr_msg; self.ifdr_name == other.ifdr_name && self.ifdr_reason == other.ifdr_reason @@ -2084,9 +2088,9 @@ cfg_if! { } } impl Eq for ifdownreason {} - impl ::fmt::Debug for ifdownreason { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { - let ifdr_msg: &[::c_char] = &self.ifdr_msg; + impl crate::fmt::Debug for ifdownreason { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { + let ifdr_msg: &[c_char] = &self.ifdr_msg; f.debug_struct("ifdownreason") .field("ifdr_name", &self.ifdr_name) @@ -2096,8 +2100,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ifdownreason { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ifdownreason { + fn hash(&self, state: &mut H) { self.ifdr_name.hash(state); self.ifdr_reason.hash(state); self.ifdr_vendor.hash(state); @@ -2111,16 +2115,16 @@ cfg_if! { } } impl Eq for __c_anonymous_ifi_epoch {} - impl ::fmt::Debug for __c_anonymous_ifi_epoch { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifi_epoch { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_ifi_epoch") .field("tt", unsafe { &self.tt }) .field("ph", unsafe { &self.ph }) .finish() } } - impl ::hash::Hash for __c_anonymous_ifi_epoch { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifi_epoch { + fn hash(&self, state: &mut H) { unsafe { self.tt.hash(state); self.ph.hash(state); @@ -2134,16 +2138,16 @@ cfg_if! { } } impl Eq for __c_anonymous_ifi_lastchange {} - impl ::fmt::Debug for __c_anonymous_ifi_lastchange { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifi_lastchange { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_ifi_lastchange") .field("tv", unsafe { &self.tv }) .field("ph", unsafe { &self.ph }) .finish() } } - impl ::hash::Hash for __c_anonymous_ifi_lastchange { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifi_lastchange { + fn hash(&self, state: &mut H) { unsafe { self.tv.hash(state); self.ph.hash(state); @@ -2181,8 +2185,8 @@ cfg_if! { } } impl Eq for if_data {} - impl ::fmt::Debug for if_data { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for if_data { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("if_data") .field("ifi_type", &self.ifi_type) .field("ifi_physical", &self.ifi_physical) @@ -2212,8 +2216,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for if_data { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for if_data { + fn hash(&self, state: &mut H) { self.ifi_type.hash(state); self.ifi_physical.hash(state); self.ifi_addrlen.hash(state); @@ -2251,8 +2255,8 @@ cfg_if! { } } impl Eq for sctphdr {} - impl ::fmt::Debug for sctphdr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctphdr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctphdr") .field("src_port", &{ self.src_port }) .field("dest_port", &{ self.dest_port }) @@ -2261,8 +2265,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sctphdr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctphdr { + fn hash(&self, state: &mut H) { { self.src_port }.hash(state); { self.dest_port }.hash(state); { self.v_tag }.hash(state); @@ -2278,8 +2282,8 @@ cfg_if! { } } impl Eq for sctp_chunkhdr {} - impl ::fmt::Debug for sctp_chunkhdr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_chunkhdr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_chunkhdr") .field("chunk_type", &{ self.chunk_type }) .field("chunk_flags", &{ self.chunk_flags }) @@ -2287,8 +2291,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sctp_chunkhdr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_chunkhdr { + fn hash(&self, state: &mut H) { { self.chunk_type }.hash(state); { self.chunk_flags }.hash(state); { self.chunk_length }.hash(state); @@ -2303,16 +2307,16 @@ cfg_if! { } } impl Eq for sctp_paramhdr {} - impl ::fmt::Debug for sctp_paramhdr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_paramhdr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_paramhdr") .field("param_type", &{ self.param_type }) .field("param_length", &{ self.param_length }) .finish() } } - impl ::hash::Hash for sctp_paramhdr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_paramhdr { + fn hash(&self, state: &mut H) { { self.param_type }.hash(state); { self.param_length }.hash(state); } @@ -2329,8 +2333,8 @@ cfg_if! { } } impl Eq for sctp_gen_error_cause {} - impl ::fmt::Debug for sctp_gen_error_cause { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_gen_error_cause { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_gen_error_cause") .field("code", &{ self.code }) .field("length", &{ self.length }) @@ -2338,8 +2342,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sctp_gen_error_cause { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_gen_error_cause { + fn hash(&self, state: &mut H) { { self.code }.hash(state); { self.length }.hash(state); { self.info }.hash(state); @@ -2352,16 +2356,16 @@ cfg_if! { } } impl Eq for sctp_error_cause {} - impl ::fmt::Debug for sctp_error_cause { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_cause { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_cause") .field("code", &{ self.code }) .field("length", &{ self.length }) .finish() } } - impl ::hash::Hash for sctp_error_cause { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_cause { + fn hash(&self, state: &mut H) { { self.code }.hash(state); { self.length }.hash(state); } @@ -2375,16 +2379,16 @@ cfg_if! { } } impl Eq for sctp_error_invalid_stream {} - impl ::fmt::Debug for sctp_error_invalid_stream { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_invalid_stream { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_invalid_stream") .field("cause", &{ self.cause }) .field("stream_id", &{ self.stream_id }) .finish() } } - impl ::hash::Hash for sctp_error_invalid_stream { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_invalid_stream { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); { self.stream_id }.hash(state); } @@ -2401,8 +2405,8 @@ cfg_if! { } } impl Eq for sctp_error_missing_param {} - impl ::fmt::Debug for sctp_error_missing_param { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_missing_param { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_missing_param") .field("cause", &{ self.cause }) .field("num_missing_params", &{ self.num_missing_params }) @@ -2410,8 +2414,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sctp_error_missing_param { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_missing_param { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); { self.num_missing_params }.hash(state); { self.tpe }.hash(state); @@ -2426,16 +2430,16 @@ cfg_if! { } } impl Eq for sctp_error_stale_cookie {} - impl ::fmt::Debug for sctp_error_stale_cookie { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_stale_cookie { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_stale_cookie") .field("cause", &{ self.cause }) .field("stale_time", &{ self.stale_time }) .finish() } } - impl ::hash::Hash for sctp_error_stale_cookie { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_stale_cookie { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); { self.stale_time }.hash(state); } @@ -2447,15 +2451,15 @@ cfg_if! { } } impl Eq for sctp_error_out_of_resource {} - impl ::fmt::Debug for sctp_error_out_of_resource { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_out_of_resource { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_out_of_resource") .field("cause", &{ self.cause }) .finish() } } - impl ::hash::Hash for sctp_error_out_of_resource { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_out_of_resource { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); } } @@ -2466,15 +2470,15 @@ cfg_if! { } } impl Eq for sctp_error_unresolv_addr {} - impl ::fmt::Debug for sctp_error_unresolv_addr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_unresolv_addr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_unresolv_addr") .field("cause", &{ self.cause }) .finish() } } - impl ::hash::Hash for sctp_error_unresolv_addr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_unresolv_addr { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); } } @@ -2485,16 +2489,16 @@ cfg_if! { } } impl Eq for sctp_error_unrecognized_chunk {} - impl ::fmt::Debug for sctp_error_unrecognized_chunk { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_unrecognized_chunk { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_unrecognized_chunk") .field("cause", &{ self.cause }) .field("ch", &{ self.ch }) .finish() } } - impl ::hash::Hash for sctp_error_unrecognized_chunk { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_unrecognized_chunk { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); { self.ch }.hash(state); } @@ -2506,16 +2510,16 @@ cfg_if! { } } impl Eq for sctp_error_no_user_data {} - impl ::fmt::Debug for sctp_error_no_user_data { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_no_user_data { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_no_user_data") .field("cause", &{ self.cause }) .field("tsn", &{ self.tsn }) .finish() } } - impl ::hash::Hash for sctp_error_no_user_data { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_no_user_data { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); { self.tsn }.hash(state); } @@ -2527,16 +2531,16 @@ cfg_if! { } } impl Eq for sctp_error_auth_invalid_hmac {} - impl ::fmt::Debug for sctp_error_auth_invalid_hmac { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sctp_error_auth_invalid_hmac { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sctp_error_invalid_hmac") .field("cause", &{ self.cause }) .field("hmac_id", &{ self.hmac_id }) .finish() } } - impl ::hash::Hash for sctp_error_auth_invalid_hmac { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sctp_error_auth_invalid_hmac { + fn hash(&self, state: &mut H) { { self.cause }.hash(state); { self.hmac_id }.hash(state); } @@ -2560,8 +2564,8 @@ cfg_if! { } } impl Eq for kinfo_file {} - impl ::fmt::Debug for kinfo_file { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for kinfo_file { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("kinfo_file") .field("kf_structsize", &self.kf_structsize) .field("kf_type", &self.kf_type) @@ -2575,8 +2579,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for kinfo_file { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for kinfo_file { + fn hash(&self, state: &mut H) { self.kf_structsize.hash(state); self.kf_type.hash(state); self.kf_fd.hash(state); @@ -2589,8 +2593,8 @@ cfg_if! { } } - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_sigmask", &self.uc_sigmask) .field("uc_mcontext", &self.uc_mcontext) @@ -2613,17 +2617,17 @@ pub enum dot3Vendors { dot3VendorDigital = 6, dot3VendorWesternDigital = 7, } -impl ::Copy for dot3Vendors {} -impl ::Clone for dot3Vendors { +impl Copy for dot3Vendors {} +impl Clone for dot3Vendors { fn clone(&self) -> dot3Vendors { *self } } // aio.h -pub const LIO_VECTORED: ::c_int = 4; -pub const LIO_WRITEV: ::c_int = 5; -pub const LIO_READV: ::c_int = 6; +pub const LIO_VECTORED: c_int = 4; +pub const LIO_WRITEV: c_int = 5; +pub const LIO_READV: c_int = 6; // sys/caprights.h pub const CAP_RIGHTS_VERSION_00: i32 = 0; @@ -2749,96 +2753,96 @@ pub const CAP_FCNTL_GETOWN: u32 = 1 << 5; pub const CAP_FCNTL_SETOWN: u32 = 1 << 6; // sys/devicestat.h -pub const DEVSTAT_N_TRANS_FLAGS: ::c_int = 4; -pub const DEVSTAT_NAME_LEN: ::c_int = 16; +pub const DEVSTAT_N_TRANS_FLAGS: c_int = 4; +pub const DEVSTAT_NAME_LEN: c_int = 16; // sys/cpuset.h cfg_if! { if #[cfg(any(freebsd15, freebsd14))] { - pub const CPU_SETSIZE: ::c_int = 1024; + pub const CPU_SETSIZE: c_int = 1024; } else { - pub const CPU_SETSIZE: ::c_int = 256; + pub const CPU_SETSIZE: c_int = 256; } } -pub const SIGEV_THREAD_ID: ::c_int = 4; - -pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0; -pub const EXTATTR_NAMESPACE_USER: ::c_int = 1; -pub const EXTATTR_NAMESPACE_SYSTEM: ::c_int = 2; - -pub const PTHREAD_STACK_MIN: ::size_t = MINSIGSTKSZ; -pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 4; -pub const PTHREAD_MUTEX_STALLED: ::c_int = 0; -pub const PTHREAD_MUTEX_ROBUST: ::c_int = 1; -pub const SIGSTKSZ: ::size_t = MINSIGSTKSZ + 32768; -pub const SF_NODISKIO: ::c_int = 0x00000001; -pub const SF_MNOWAIT: ::c_int = 0x00000002; -pub const SF_SYNC: ::c_int = 0x00000004; -pub const SF_USER_READAHEAD: ::c_int = 0x00000008; -pub const SF_NOCACHE: ::c_int = 0x00000010; -pub const O_CLOEXEC: ::c_int = 0x00100000; -pub const O_DIRECTORY: ::c_int = 0x00020000; -pub const O_DSYNC: ::c_int = 0x01000000; -pub const O_EMPTY_PATH: ::c_int = 0x02000000; -pub const O_EXEC: ::c_int = 0x00040000; -pub const O_PATH: ::c_int = 0x00400000; -pub const O_RESOLVE_BENEATH: ::c_int = 0x00800000; -pub const O_SEARCH: ::c_int = O_EXEC; -pub const O_TTY_INIT: ::c_int = 0x00080000; -pub const O_VERIFY: ::c_int = 0x00200000; -pub const F_GETLK: ::c_int = 11; -pub const F_SETLK: ::c_int = 12; -pub const F_SETLKW: ::c_int = 13; -pub const ENOTCAPABLE: ::c_int = 93; -pub const ECAPMODE: ::c_int = 94; -pub const ENOTRECOVERABLE: ::c_int = 95; -pub const EOWNERDEAD: ::c_int = 96; -pub const EINTEGRITY: ::c_int = 97; -pub const RLIMIT_NPTS: ::c_int = 11; -pub const RLIMIT_SWAP: ::c_int = 12; -pub const RLIMIT_KQUEUES: ::c_int = 13; -pub const RLIMIT_UMTXP: ::c_int = 14; +pub const SIGEV_THREAD_ID: c_int = 4; + +pub const EXTATTR_NAMESPACE_EMPTY: c_int = 0; +pub const EXTATTR_NAMESPACE_USER: c_int = 1; +pub const EXTATTR_NAMESPACE_SYSTEM: c_int = 2; + +pub const PTHREAD_STACK_MIN: size_t = MINSIGSTKSZ; +pub const PTHREAD_MUTEX_ADAPTIVE_NP: c_int = 4; +pub const PTHREAD_MUTEX_STALLED: c_int = 0; +pub const PTHREAD_MUTEX_ROBUST: c_int = 1; +pub const SIGSTKSZ: size_t = MINSIGSTKSZ + 32768; +pub const SF_NODISKIO: c_int = 0x00000001; +pub const SF_MNOWAIT: c_int = 0x00000002; +pub const SF_SYNC: c_int = 0x00000004; +pub const SF_USER_READAHEAD: c_int = 0x00000008; +pub const SF_NOCACHE: c_int = 0x00000010; +pub const O_CLOEXEC: c_int = 0x00100000; +pub const O_DIRECTORY: c_int = 0x00020000; +pub const O_DSYNC: c_int = 0x01000000; +pub const O_EMPTY_PATH: c_int = 0x02000000; +pub const O_EXEC: c_int = 0x00040000; +pub const O_PATH: c_int = 0x00400000; +pub const O_RESOLVE_BENEATH: c_int = 0x00800000; +pub const O_SEARCH: c_int = O_EXEC; +pub const O_TTY_INIT: c_int = 0x00080000; +pub const O_VERIFY: c_int = 0x00200000; +pub const F_GETLK: c_int = 11; +pub const F_SETLK: c_int = 12; +pub const F_SETLKW: c_int = 13; +pub const ENOTCAPABLE: c_int = 93; +pub const ECAPMODE: c_int = 94; +pub const ENOTRECOVERABLE: c_int = 95; +pub const EOWNERDEAD: c_int = 96; +pub const EINTEGRITY: c_int = 97; +pub const RLIMIT_NPTS: c_int = 11; +pub const RLIMIT_SWAP: c_int = 12; +pub const RLIMIT_KQUEUES: c_int = 13; +pub const RLIMIT_UMTXP: c_int = 14; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::rlim_t = 15; -pub const RLIM_SAVED_MAX: ::rlim_t = ::RLIM_INFINITY; -pub const RLIM_SAVED_CUR: ::rlim_t = ::RLIM_INFINITY; - -pub const CP_USER: ::c_int = 0; -pub const CP_NICE: ::c_int = 1; -pub const CP_SYS: ::c_int = 2; -pub const CP_INTR: ::c_int = 3; -pub const CP_IDLE: ::c_int = 4; -pub const CPUSTATES: ::c_int = 5; - -pub const NI_NOFQDN: ::c_int = 0x00000001; -pub const NI_NUMERICHOST: ::c_int = 0x00000002; -pub const NI_NAMEREQD: ::c_int = 0x00000004; -pub const NI_NUMERICSERV: ::c_int = 0x00000008; -pub const NI_DGRAM: ::c_int = 0x00000010; -pub const NI_NUMERICSCOPE: ::c_int = 0x00000020; - -pub const XU_NGROUPS: ::c_int = 16; - -pub const Q_GETQUOTA: ::c_int = 0x700; -pub const Q_SETQUOTA: ::c_int = 0x800; - -pub const MAP_GUARD: ::c_int = 0x00002000; -pub const MAP_EXCL: ::c_int = 0x00004000; -pub const MAP_PREFAULT_READ: ::c_int = 0x00040000; -pub const MAP_ALIGNMENT_SHIFT: ::c_int = 24; -pub const MAP_ALIGNMENT_MASK: ::c_int = 0xff << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNED_SUPER: ::c_int = 1 << MAP_ALIGNMENT_SHIFT; - -pub const POSIX_FADV_NORMAL: ::c_int = 0; -pub const POSIX_FADV_RANDOM: ::c_int = 1; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_FADV_WILLNEED: ::c_int = 3; -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; - -pub const POLLINIGNEOF: ::c_short = 0x2000; -pub const POLLRDHUP: ::c_short = 0x4000; +pub const RLIM_NLIMITS: crate::rlim_t = 15; +pub const RLIM_SAVED_MAX: crate::rlim_t = crate::RLIM_INFINITY; +pub const RLIM_SAVED_CUR: crate::rlim_t = crate::RLIM_INFINITY; + +pub const CP_USER: c_int = 0; +pub const CP_NICE: c_int = 1; +pub const CP_SYS: c_int = 2; +pub const CP_INTR: c_int = 3; +pub const CP_IDLE: c_int = 4; +pub const CPUSTATES: c_int = 5; + +pub const NI_NOFQDN: c_int = 0x00000001; +pub const NI_NUMERICHOST: c_int = 0x00000002; +pub const NI_NAMEREQD: c_int = 0x00000004; +pub const NI_NUMERICSERV: c_int = 0x00000008; +pub const NI_DGRAM: c_int = 0x00000010; +pub const NI_NUMERICSCOPE: c_int = 0x00000020; + +pub const XU_NGROUPS: c_int = 16; + +pub const Q_GETQUOTA: c_int = 0x700; +pub const Q_SETQUOTA: c_int = 0x800; + +pub const MAP_GUARD: c_int = 0x00002000; +pub const MAP_EXCL: c_int = 0x00004000; +pub const MAP_PREFAULT_READ: c_int = 0x00040000; +pub const MAP_ALIGNMENT_SHIFT: c_int = 24; +pub const MAP_ALIGNMENT_MASK: c_int = 0xff << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNED_SUPER: c_int = 1 << MAP_ALIGNMENT_SHIFT; + +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_RANDOM: c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: c_int = 2; +pub const POSIX_FADV_WILLNEED: c_int = 3; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; + +pub const POLLINIGNEOF: c_short = 0x2000; +pub const POLLRDHUP: c_short = 0x4000; pub const EVFILT_READ: i16 = -1; pub const EVFILT_WRITE: i16 = -2; @@ -2907,648 +2911,648 @@ pub const NOTE_USECONDS: u32 = 0x00000004; pub const NOTE_NSECONDS: u32 = 0x00000008; pub const NOTE_ABSTIME: u32 = 0x00000010; -pub const MADV_PROTECT: ::c_int = 10; +pub const MADV_PROTECT: c_int = 10; #[doc(hidden)] #[deprecated( since = "0.2.72", note = "CTL_UNSPEC is deprecated. Use CTL_SYSCTL instead" )] -pub const CTL_UNSPEC: ::c_int = 0; -pub const CTL_SYSCTL: ::c_int = 0; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_VFS: ::c_int = 3; -pub const CTL_NET: ::c_int = 4; -pub const CTL_DEBUG: ::c_int = 5; -pub const CTL_HW: ::c_int = 6; -pub const CTL_MACHDEP: ::c_int = 7; -pub const CTL_USER: ::c_int = 8; -pub const CTL_P1003_1B: ::c_int = 9; +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_SYSCTL: c_int = 0; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_VFS: c_int = 3; +pub const CTL_NET: c_int = 4; +pub const CTL_DEBUG: c_int = 5; +pub const CTL_HW: c_int = 6; +pub const CTL_MACHDEP: c_int = 7; +pub const CTL_USER: c_int = 8; +pub const CTL_P1003_1B: c_int = 9; // sys/sysctl.h -pub const CTL_MAXNAME: ::c_int = 24; - -pub const CTLTYPE: ::c_int = 0xf; -pub const CTLTYPE_NODE: ::c_int = 1; -pub const CTLTYPE_INT: ::c_int = 2; -pub const CTLTYPE_STRING: ::c_int = 3; -pub const CTLTYPE_S64: ::c_int = 4; -pub const CTLTYPE_OPAQUE: ::c_int = 5; -pub const CTLTYPE_STRUCT: ::c_int = CTLTYPE_OPAQUE; -pub const CTLTYPE_UINT: ::c_int = 6; -pub const CTLTYPE_LONG: ::c_int = 7; -pub const CTLTYPE_ULONG: ::c_int = 8; -pub const CTLTYPE_U64: ::c_int = 9; -pub const CTLTYPE_U8: ::c_int = 0xa; -pub const CTLTYPE_U16: ::c_int = 0xb; -pub const CTLTYPE_S8: ::c_int = 0xc; -pub const CTLTYPE_S16: ::c_int = 0xd; -pub const CTLTYPE_S32: ::c_int = 0xe; -pub const CTLTYPE_U32: ::c_int = 0xf; - -pub const CTLFLAG_RD: ::c_int = 0x80000000; -pub const CTLFLAG_WR: ::c_int = 0x40000000; -pub const CTLFLAG_RW: ::c_int = CTLFLAG_RD | CTLFLAG_WR; -pub const CTLFLAG_DORMANT: ::c_int = 0x20000000; -pub const CTLFLAG_ANYBODY: ::c_int = 0x10000000; -pub const CTLFLAG_SECURE: ::c_int = 0x08000000; -pub const CTLFLAG_PRISON: ::c_int = 0x04000000; -pub const CTLFLAG_DYN: ::c_int = 0x02000000; -pub const CTLFLAG_SKIP: ::c_int = 0x01000000; -pub const CTLMASK_SECURE: ::c_int = 0x00F00000; -pub const CTLFLAG_TUN: ::c_int = 0x00080000; -pub const CTLFLAG_RDTUN: ::c_int = CTLFLAG_RD | CTLFLAG_TUN; -pub const CTLFLAG_RWTUN: ::c_int = CTLFLAG_RW | CTLFLAG_TUN; -pub const CTLFLAG_MPSAFE: ::c_int = 0x00040000; -pub const CTLFLAG_VNET: ::c_int = 0x00020000; -pub const CTLFLAG_DYING: ::c_int = 0x00010000; -pub const CTLFLAG_CAPRD: ::c_int = 0x00008000; -pub const CTLFLAG_CAPWR: ::c_int = 0x00004000; -pub const CTLFLAG_STATS: ::c_int = 0x00002000; -pub const CTLFLAG_NOFETCH: ::c_int = 0x00001000; -pub const CTLFLAG_CAPRW: ::c_int = CTLFLAG_CAPRD | CTLFLAG_CAPWR; -pub const CTLFLAG_NEEDGIANT: ::c_int = 0x00000800; - -pub const CTLSHIFT_SECURE: ::c_int = 20; -pub const CTLFLAG_SECURE1: ::c_int = CTLFLAG_SECURE | (0 << CTLSHIFT_SECURE); -pub const CTLFLAG_SECURE2: ::c_int = CTLFLAG_SECURE | (1 << CTLSHIFT_SECURE); -pub const CTLFLAG_SECURE3: ::c_int = CTLFLAG_SECURE | (2 << CTLSHIFT_SECURE); - -pub const OID_AUTO: ::c_int = -1; - -pub const CTL_SYSCTL_DEBUG: ::c_int = 0; -pub const CTL_SYSCTL_NAME: ::c_int = 1; -pub const CTL_SYSCTL_NEXT: ::c_int = 2; -pub const CTL_SYSCTL_NAME2OID: ::c_int = 3; -pub const CTL_SYSCTL_OIDFMT: ::c_int = 4; -pub const CTL_SYSCTL_OIDDESCR: ::c_int = 5; -pub const CTL_SYSCTL_OIDLABEL: ::c_int = 6; -pub const CTL_SYSCTL_NEXTNOSKIP: ::c_int = 7; - -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_MAXVNODES: ::c_int = 5; -pub const KERN_MAXPROC: ::c_int = 6; -pub const KERN_MAXFILES: ::c_int = 7; -pub const KERN_ARGMAX: ::c_int = 8; -pub const KERN_SECURELVL: ::c_int = 9; -pub const KERN_HOSTNAME: ::c_int = 10; -pub const KERN_HOSTID: ::c_int = 11; -pub const KERN_CLOCKRATE: ::c_int = 12; -pub const KERN_VNODE: ::c_int = 13; -pub const KERN_PROC: ::c_int = 14; -pub const KERN_FILE: ::c_int = 15; -pub const KERN_PROF: ::c_int = 16; -pub const KERN_POSIX1: ::c_int = 17; -pub const KERN_NGROUPS: ::c_int = 18; -pub const KERN_JOB_CONTROL: ::c_int = 19; -pub const KERN_SAVED_IDS: ::c_int = 20; -pub const KERN_BOOTTIME: ::c_int = 21; -pub const KERN_NISDOMAINNAME: ::c_int = 22; -pub const KERN_UPDATEINTERVAL: ::c_int = 23; -pub const KERN_OSRELDATE: ::c_int = 24; -pub const KERN_NTP_PLL: ::c_int = 25; -pub const KERN_BOOTFILE: ::c_int = 26; -pub const KERN_MAXFILESPERPROC: ::c_int = 27; -pub const KERN_MAXPROCPERUID: ::c_int = 28; -pub const KERN_DUMPDEV: ::c_int = 29; -pub const KERN_IPC: ::c_int = 30; -pub const KERN_DUMMY: ::c_int = 31; -pub const KERN_PS_STRINGS: ::c_int = 32; -pub const KERN_USRSTACK: ::c_int = 33; -pub const KERN_LOGSIGEXIT: ::c_int = 34; -pub const KERN_IOV_MAX: ::c_int = 35; -pub const KERN_HOSTUUID: ::c_int = 36; -pub const KERN_ARND: ::c_int = 37; -pub const KERN_MAXPHYS: ::c_int = 38; - -pub const KERN_PROC_ALL: ::c_int = 0; -pub const KERN_PROC_PID: ::c_int = 1; -pub const KERN_PROC_PGRP: ::c_int = 2; -pub const KERN_PROC_SESSION: ::c_int = 3; -pub const KERN_PROC_TTY: ::c_int = 4; -pub const KERN_PROC_UID: ::c_int = 5; -pub const KERN_PROC_RUID: ::c_int = 6; -pub const KERN_PROC_ARGS: ::c_int = 7; -pub const KERN_PROC_PROC: ::c_int = 8; -pub const KERN_PROC_SV_NAME: ::c_int = 9; -pub const KERN_PROC_RGID: ::c_int = 10; -pub const KERN_PROC_GID: ::c_int = 11; -pub const KERN_PROC_PATHNAME: ::c_int = 12; -pub const KERN_PROC_OVMMAP: ::c_int = 13; -pub const KERN_PROC_OFILEDESC: ::c_int = 14; -pub const KERN_PROC_KSTACK: ::c_int = 15; -pub const KERN_PROC_INC_THREAD: ::c_int = 0x10; -pub const KERN_PROC_VMMAP: ::c_int = 32; -pub const KERN_PROC_FILEDESC: ::c_int = 33; -pub const KERN_PROC_GROUPS: ::c_int = 34; -pub const KERN_PROC_ENV: ::c_int = 35; -pub const KERN_PROC_AUXV: ::c_int = 36; -pub const KERN_PROC_RLIMIT: ::c_int = 37; -pub const KERN_PROC_PS_STRINGS: ::c_int = 38; -pub const KERN_PROC_UMASK: ::c_int = 39; -pub const KERN_PROC_OSREL: ::c_int = 40; -pub const KERN_PROC_SIGTRAMP: ::c_int = 41; -pub const KERN_PROC_CWD: ::c_int = 42; -pub const KERN_PROC_NFDS: ::c_int = 43; -pub const KERN_PROC_SIGFASTBLK: ::c_int = 44; - -pub const KIPC_MAXSOCKBUF: ::c_int = 1; -pub const KIPC_SOCKBUF_WASTE: ::c_int = 2; -pub const KIPC_SOMAXCONN: ::c_int = 3; -pub const KIPC_MAX_LINKHDR: ::c_int = 4; -pub const KIPC_MAX_PROTOHDR: ::c_int = 5; -pub const KIPC_MAX_HDR: ::c_int = 6; -pub const KIPC_MAX_DATALEN: ::c_int = 7; - -pub const HW_MACHINE: ::c_int = 1; -pub const HW_MODEL: ::c_int = 2; -pub const HW_NCPU: ::c_int = 3; -pub const HW_BYTEORDER: ::c_int = 4; -pub const HW_PHYSMEM: ::c_int = 5; -pub const HW_USERMEM: ::c_int = 6; -pub const HW_PAGESIZE: ::c_int = 7; -pub const HW_DISKNAMES: ::c_int = 8; -pub const HW_DISKSTATS: ::c_int = 9; -pub const HW_FLOATINGPT: ::c_int = 10; -pub const HW_MACHINE_ARCH: ::c_int = 11; -pub const HW_REALMEM: ::c_int = 12; - -pub const USER_CS_PATH: ::c_int = 1; -pub const USER_BC_BASE_MAX: ::c_int = 2; -pub const USER_BC_DIM_MAX: ::c_int = 3; -pub const USER_BC_SCALE_MAX: ::c_int = 4; -pub const USER_BC_STRING_MAX: ::c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6; -pub const USER_EXPR_NEST_MAX: ::c_int = 7; -pub const USER_LINE_MAX: ::c_int = 8; -pub const USER_RE_DUP_MAX: ::c_int = 9; -pub const USER_POSIX2_VERSION: ::c_int = 10; -pub const USER_POSIX2_C_BIND: ::c_int = 11; -pub const USER_POSIX2_C_DEV: ::c_int = 12; -pub const USER_POSIX2_CHAR_TERM: ::c_int = 13; -pub const USER_POSIX2_FORT_DEV: ::c_int = 14; -pub const USER_POSIX2_FORT_RUN: ::c_int = 15; -pub const USER_POSIX2_LOCALEDEF: ::c_int = 16; -pub const USER_POSIX2_SW_DEV: ::c_int = 17; -pub const USER_POSIX2_UPE: ::c_int = 18; -pub const USER_STREAM_MAX: ::c_int = 19; -pub const USER_TZNAME_MAX: ::c_int = 20; -pub const USER_LOCALBASE: ::c_int = 21; - -pub const CTL_P1003_1B_ASYNCHRONOUS_IO: ::c_int = 1; -pub const CTL_P1003_1B_MAPPED_FILES: ::c_int = 2; -pub const CTL_P1003_1B_MEMLOCK: ::c_int = 3; -pub const CTL_P1003_1B_MEMLOCK_RANGE: ::c_int = 4; -pub const CTL_P1003_1B_MEMORY_PROTECTION: ::c_int = 5; -pub const CTL_P1003_1B_MESSAGE_PASSING: ::c_int = 6; -pub const CTL_P1003_1B_PRIORITIZED_IO: ::c_int = 7; -pub const CTL_P1003_1B_PRIORITY_SCHEDULING: ::c_int = 8; -pub const CTL_P1003_1B_REALTIME_SIGNALS: ::c_int = 9; -pub const CTL_P1003_1B_SEMAPHORES: ::c_int = 10; -pub const CTL_P1003_1B_FSYNC: ::c_int = 11; -pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: ::c_int = 12; -pub const CTL_P1003_1B_SYNCHRONIZED_IO: ::c_int = 13; -pub const CTL_P1003_1B_TIMERS: ::c_int = 14; -pub const CTL_P1003_1B_AIO_LISTIO_MAX: ::c_int = 15; -pub const CTL_P1003_1B_AIO_MAX: ::c_int = 16; -pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: ::c_int = 17; -pub const CTL_P1003_1B_DELAYTIMER_MAX: ::c_int = 18; -pub const CTL_P1003_1B_MQ_OPEN_MAX: ::c_int = 19; -pub const CTL_P1003_1B_PAGESIZE: ::c_int = 20; -pub const CTL_P1003_1B_RTSIG_MAX: ::c_int = 21; -pub const CTL_P1003_1B_SEM_NSEMS_MAX: ::c_int = 22; -pub const CTL_P1003_1B_SEM_VALUE_MAX: ::c_int = 23; -pub const CTL_P1003_1B_SIGQUEUE_MAX: ::c_int = 24; -pub const CTL_P1003_1B_TIMER_MAX: ::c_int = 25; - -pub const TIOCGPTN: ::c_ulong = 0x4004740f; -pub const TIOCPTMASTER: ::c_ulong = 0x2000741c; -pub const TIOCSIG: ::c_ulong = 0x2004745f; -pub const TIOCM_DCD: ::c_int = 0x40; -pub const H4DISC: ::c_int = 0x7; - -pub const VM_TOTAL: ::c_int = 1; +pub const CTL_MAXNAME: c_int = 24; + +pub const CTLTYPE: c_int = 0xf; +pub const CTLTYPE_NODE: c_int = 1; +pub const CTLTYPE_INT: c_int = 2; +pub const CTLTYPE_STRING: c_int = 3; +pub const CTLTYPE_S64: c_int = 4; +pub const CTLTYPE_OPAQUE: c_int = 5; +pub const CTLTYPE_STRUCT: c_int = CTLTYPE_OPAQUE; +pub const CTLTYPE_UINT: c_int = 6; +pub const CTLTYPE_LONG: c_int = 7; +pub const CTLTYPE_ULONG: c_int = 8; +pub const CTLTYPE_U64: c_int = 9; +pub const CTLTYPE_U8: c_int = 0xa; +pub const CTLTYPE_U16: c_int = 0xb; +pub const CTLTYPE_S8: c_int = 0xc; +pub const CTLTYPE_S16: c_int = 0xd; +pub const CTLTYPE_S32: c_int = 0xe; +pub const CTLTYPE_U32: c_int = 0xf; + +pub const CTLFLAG_RD: c_int = 0x80000000; +pub const CTLFLAG_WR: c_int = 0x40000000; +pub const CTLFLAG_RW: c_int = CTLFLAG_RD | CTLFLAG_WR; +pub const CTLFLAG_DORMANT: c_int = 0x20000000; +pub const CTLFLAG_ANYBODY: c_int = 0x10000000; +pub const CTLFLAG_SECURE: c_int = 0x08000000; +pub const CTLFLAG_PRISON: c_int = 0x04000000; +pub const CTLFLAG_DYN: c_int = 0x02000000; +pub const CTLFLAG_SKIP: c_int = 0x01000000; +pub const CTLMASK_SECURE: c_int = 0x00F00000; +pub const CTLFLAG_TUN: c_int = 0x00080000; +pub const CTLFLAG_RDTUN: c_int = CTLFLAG_RD | CTLFLAG_TUN; +pub const CTLFLAG_RWTUN: c_int = CTLFLAG_RW | CTLFLAG_TUN; +pub const CTLFLAG_MPSAFE: c_int = 0x00040000; +pub const CTLFLAG_VNET: c_int = 0x00020000; +pub const CTLFLAG_DYING: c_int = 0x00010000; +pub const CTLFLAG_CAPRD: c_int = 0x00008000; +pub const CTLFLAG_CAPWR: c_int = 0x00004000; +pub const CTLFLAG_STATS: c_int = 0x00002000; +pub const CTLFLAG_NOFETCH: c_int = 0x00001000; +pub const CTLFLAG_CAPRW: c_int = CTLFLAG_CAPRD | CTLFLAG_CAPWR; +pub const CTLFLAG_NEEDGIANT: c_int = 0x00000800; + +pub const CTLSHIFT_SECURE: c_int = 20; +pub const CTLFLAG_SECURE1: c_int = CTLFLAG_SECURE | (0 << CTLSHIFT_SECURE); +pub const CTLFLAG_SECURE2: c_int = CTLFLAG_SECURE | (1 << CTLSHIFT_SECURE); +pub const CTLFLAG_SECURE3: c_int = CTLFLAG_SECURE | (2 << CTLSHIFT_SECURE); + +pub const OID_AUTO: c_int = -1; + +pub const CTL_SYSCTL_DEBUG: c_int = 0; +pub const CTL_SYSCTL_NAME: c_int = 1; +pub const CTL_SYSCTL_NEXT: c_int = 2; +pub const CTL_SYSCTL_NAME2OID: c_int = 3; +pub const CTL_SYSCTL_OIDFMT: c_int = 4; +pub const CTL_SYSCTL_OIDDESCR: c_int = 5; +pub const CTL_SYSCTL_OIDLABEL: c_int = 6; +pub const CTL_SYSCTL_NEXTNOSKIP: c_int = 7; + +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_MAXVNODES: c_int = 5; +pub const KERN_MAXPROC: c_int = 6; +pub const KERN_MAXFILES: c_int = 7; +pub const KERN_ARGMAX: c_int = 8; +pub const KERN_SECURELVL: c_int = 9; +pub const KERN_HOSTNAME: c_int = 10; +pub const KERN_HOSTID: c_int = 11; +pub const KERN_CLOCKRATE: c_int = 12; +pub const KERN_VNODE: c_int = 13; +pub const KERN_PROC: c_int = 14; +pub const KERN_FILE: c_int = 15; +pub const KERN_PROF: c_int = 16; +pub const KERN_POSIX1: c_int = 17; +pub const KERN_NGROUPS: c_int = 18; +pub const KERN_JOB_CONTROL: c_int = 19; +pub const KERN_SAVED_IDS: c_int = 20; +pub const KERN_BOOTTIME: c_int = 21; +pub const KERN_NISDOMAINNAME: c_int = 22; +pub const KERN_UPDATEINTERVAL: c_int = 23; +pub const KERN_OSRELDATE: c_int = 24; +pub const KERN_NTP_PLL: c_int = 25; +pub const KERN_BOOTFILE: c_int = 26; +pub const KERN_MAXFILESPERPROC: c_int = 27; +pub const KERN_MAXPROCPERUID: c_int = 28; +pub const KERN_DUMPDEV: c_int = 29; +pub const KERN_IPC: c_int = 30; +pub const KERN_DUMMY: c_int = 31; +pub const KERN_PS_STRINGS: c_int = 32; +pub const KERN_USRSTACK: c_int = 33; +pub const KERN_LOGSIGEXIT: c_int = 34; +pub const KERN_IOV_MAX: c_int = 35; +pub const KERN_HOSTUUID: c_int = 36; +pub const KERN_ARND: c_int = 37; +pub const KERN_MAXPHYS: c_int = 38; + +pub const KERN_PROC_ALL: c_int = 0; +pub const KERN_PROC_PID: c_int = 1; +pub const KERN_PROC_PGRP: c_int = 2; +pub const KERN_PROC_SESSION: c_int = 3; +pub const KERN_PROC_TTY: c_int = 4; +pub const KERN_PROC_UID: c_int = 5; +pub const KERN_PROC_RUID: c_int = 6; +pub const KERN_PROC_ARGS: c_int = 7; +pub const KERN_PROC_PROC: c_int = 8; +pub const KERN_PROC_SV_NAME: c_int = 9; +pub const KERN_PROC_RGID: c_int = 10; +pub const KERN_PROC_GID: c_int = 11; +pub const KERN_PROC_PATHNAME: c_int = 12; +pub const KERN_PROC_OVMMAP: c_int = 13; +pub const KERN_PROC_OFILEDESC: c_int = 14; +pub const KERN_PROC_KSTACK: c_int = 15; +pub const KERN_PROC_INC_THREAD: c_int = 0x10; +pub const KERN_PROC_VMMAP: c_int = 32; +pub const KERN_PROC_FILEDESC: c_int = 33; +pub const KERN_PROC_GROUPS: c_int = 34; +pub const KERN_PROC_ENV: c_int = 35; +pub const KERN_PROC_AUXV: c_int = 36; +pub const KERN_PROC_RLIMIT: c_int = 37; +pub const KERN_PROC_PS_STRINGS: c_int = 38; +pub const KERN_PROC_UMASK: c_int = 39; +pub const KERN_PROC_OSREL: c_int = 40; +pub const KERN_PROC_SIGTRAMP: c_int = 41; +pub const KERN_PROC_CWD: c_int = 42; +pub const KERN_PROC_NFDS: c_int = 43; +pub const KERN_PROC_SIGFASTBLK: c_int = 44; + +pub const KIPC_MAXSOCKBUF: c_int = 1; +pub const KIPC_SOCKBUF_WASTE: c_int = 2; +pub const KIPC_SOMAXCONN: c_int = 3; +pub const KIPC_MAX_LINKHDR: c_int = 4; +pub const KIPC_MAX_PROTOHDR: c_int = 5; +pub const KIPC_MAX_HDR: c_int = 6; +pub const KIPC_MAX_DATALEN: c_int = 7; + +pub const HW_MACHINE: c_int = 1; +pub const HW_MODEL: c_int = 2; +pub const HW_NCPU: c_int = 3; +pub const HW_BYTEORDER: c_int = 4; +pub const HW_PHYSMEM: c_int = 5; +pub const HW_USERMEM: c_int = 6; +pub const HW_PAGESIZE: c_int = 7; +pub const HW_DISKNAMES: c_int = 8; +pub const HW_DISKSTATS: c_int = 9; +pub const HW_FLOATINGPT: c_int = 10; +pub const HW_MACHINE_ARCH: c_int = 11; +pub const HW_REALMEM: c_int = 12; + +pub const USER_CS_PATH: c_int = 1; +pub const USER_BC_BASE_MAX: c_int = 2; +pub const USER_BC_DIM_MAX: c_int = 3; +pub const USER_BC_SCALE_MAX: c_int = 4; +pub const USER_BC_STRING_MAX: c_int = 5; +pub const USER_COLL_WEIGHTS_MAX: c_int = 6; +pub const USER_EXPR_NEST_MAX: c_int = 7; +pub const USER_LINE_MAX: c_int = 8; +pub const USER_RE_DUP_MAX: c_int = 9; +pub const USER_POSIX2_VERSION: c_int = 10; +pub const USER_POSIX2_C_BIND: c_int = 11; +pub const USER_POSIX2_C_DEV: c_int = 12; +pub const USER_POSIX2_CHAR_TERM: c_int = 13; +pub const USER_POSIX2_FORT_DEV: c_int = 14; +pub const USER_POSIX2_FORT_RUN: c_int = 15; +pub const USER_POSIX2_LOCALEDEF: c_int = 16; +pub const USER_POSIX2_SW_DEV: c_int = 17; +pub const USER_POSIX2_UPE: c_int = 18; +pub const USER_STREAM_MAX: c_int = 19; +pub const USER_TZNAME_MAX: c_int = 20; +pub const USER_LOCALBASE: c_int = 21; + +pub const CTL_P1003_1B_ASYNCHRONOUS_IO: c_int = 1; +pub const CTL_P1003_1B_MAPPED_FILES: c_int = 2; +pub const CTL_P1003_1B_MEMLOCK: c_int = 3; +pub const CTL_P1003_1B_MEMLOCK_RANGE: c_int = 4; +pub const CTL_P1003_1B_MEMORY_PROTECTION: c_int = 5; +pub const CTL_P1003_1B_MESSAGE_PASSING: c_int = 6; +pub const CTL_P1003_1B_PRIORITIZED_IO: c_int = 7; +pub const CTL_P1003_1B_PRIORITY_SCHEDULING: c_int = 8; +pub const CTL_P1003_1B_REALTIME_SIGNALS: c_int = 9; +pub const CTL_P1003_1B_SEMAPHORES: c_int = 10; +pub const CTL_P1003_1B_FSYNC: c_int = 11; +pub const CTL_P1003_1B_SHARED_MEMORY_OBJECTS: c_int = 12; +pub const CTL_P1003_1B_SYNCHRONIZED_IO: c_int = 13; +pub const CTL_P1003_1B_TIMERS: c_int = 14; +pub const CTL_P1003_1B_AIO_LISTIO_MAX: c_int = 15; +pub const CTL_P1003_1B_AIO_MAX: c_int = 16; +pub const CTL_P1003_1B_AIO_PRIO_DELTA_MAX: c_int = 17; +pub const CTL_P1003_1B_DELAYTIMER_MAX: c_int = 18; +pub const CTL_P1003_1B_MQ_OPEN_MAX: c_int = 19; +pub const CTL_P1003_1B_PAGESIZE: c_int = 20; +pub const CTL_P1003_1B_RTSIG_MAX: c_int = 21; +pub const CTL_P1003_1B_SEM_NSEMS_MAX: c_int = 22; +pub const CTL_P1003_1B_SEM_VALUE_MAX: c_int = 23; +pub const CTL_P1003_1B_SIGQUEUE_MAX: c_int = 24; +pub const CTL_P1003_1B_TIMER_MAX: c_int = 25; + +pub const TIOCGPTN: c_ulong = 0x4004740f; +pub const TIOCPTMASTER: c_ulong = 0x2000741c; +pub const TIOCSIG: c_ulong = 0x2004745f; +pub const TIOCM_DCD: c_int = 0x40; +pub const H4DISC: c_int = 0x7; + +pub const VM_TOTAL: c_int = 1; cfg_if! { if #[cfg(target_pointer_width = "64")] { - pub const BIOCSETFNR: ::c_ulong = 0x80104282; + pub const BIOCSETFNR: c_ulong = 0x80104282; } else { - pub const BIOCSETFNR: ::c_ulong = 0x80084282; + pub const BIOCSETFNR: c_ulong = 0x80084282; } } cfg_if! { if #[cfg(target_pointer_width = "64")] { - pub const FIODGNAME: ::c_ulong = 0x80106678; + pub const FIODGNAME: c_ulong = 0x80106678; } else { - pub const FIODGNAME: ::c_ulong = 0x80086678; + pub const FIODGNAME: c_ulong = 0x80086678; } } -pub const FIONWRITE: ::c_ulong = 0x40046677; -pub const FIONSPACE: ::c_ulong = 0x40046676; -pub const FIOSEEKDATA: ::c_ulong = 0xc0086661; -pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662; -pub const FIOSSHMLPGCNF: ::c_ulong = 0x80306664; +pub const FIONWRITE: c_ulong = 0x40046677; +pub const FIONSPACE: c_ulong = 0x40046676; +pub const FIOSEEKDATA: c_ulong = 0xc0086661; +pub const FIOSEEKHOLE: c_ulong = 0xc0086662; +pub const FIOSSHMLPGCNF: c_ulong = 0x80306664; pub const JAIL_API_VERSION: u32 = 2; -pub const JAIL_CREATE: ::c_int = 0x01; -pub const JAIL_UPDATE: ::c_int = 0x02; -pub const JAIL_ATTACH: ::c_int = 0x04; -pub const JAIL_DYING: ::c_int = 0x08; -pub const JAIL_SET_MASK: ::c_int = 0x0f; -pub const JAIL_GET_MASK: ::c_int = 0x08; -pub const JAIL_SYS_DISABLE: ::c_int = 0; -pub const JAIL_SYS_NEW: ::c_int = 1; -pub const JAIL_SYS_INHERIT: ::c_int = 2; - -pub const MNT_ACLS: ::c_int = 0x08000000; -pub const MNT_BYFSID: ::c_int = 0x08000000; -pub const MNT_GJOURNAL: ::c_int = 0x02000000; -pub const MNT_MULTILABEL: ::c_int = 0x04000000; -pub const MNT_NFS4ACLS: ::c_int = 0x00000010; -pub const MNT_SNAPSHOT: ::c_int = 0x01000000; -pub const MNT_UNION: ::c_int = 0x00000020; -pub const MNT_NONBUSY: ::c_int = 0x04000000; - -pub const SCM_BINTIME: ::c_int = 0x04; -pub const SCM_REALTIME: ::c_int = 0x05; -pub const SCM_MONOTONIC: ::c_int = 0x06; -pub const SCM_TIME_INFO: ::c_int = 0x07; -pub const SCM_CREDS2: ::c_int = 0x08; - -pub const SO_BINTIME: ::c_int = 0x2000; -pub const SO_NO_OFFLOAD: ::c_int = 0x4000; -pub const SO_NO_DDP: ::c_int = 0x8000; -pub const SO_REUSEPORT_LB: ::c_int = 0x10000; -pub const SO_LABEL: ::c_int = 0x1009; -pub const SO_PEERLABEL: ::c_int = 0x1010; -pub const SO_LISTENQLIMIT: ::c_int = 0x1011; -pub const SO_LISTENQLEN: ::c_int = 0x1012; -pub const SO_LISTENINCQLEN: ::c_int = 0x1013; -pub const SO_SETFIB: ::c_int = 0x1014; -pub const SO_USER_COOKIE: ::c_int = 0x1015; -pub const SO_PROTOCOL: ::c_int = 0x1016; -pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL; -pub const SO_TS_CLOCK: ::c_int = 0x1017; -pub const SO_DOMAIN: ::c_int = 0x1019; -pub const SO_VENDOR: ::c_int = 0x80000000; - -pub const SO_TS_REALTIME_MICRO: ::c_int = 0; -pub const SO_TS_BINTIME: ::c_int = 1; -pub const SO_TS_REALTIME: ::c_int = 2; -pub const SO_TS_MONOTONIC: ::c_int = 3; -pub const SO_TS_DEFAULT: ::c_int = SO_TS_REALTIME_MICRO; -pub const SO_TS_CLOCK_MAX: ::c_int = SO_TS_MONOTONIC; - -pub const LOCAL_CREDS: ::c_int = 2; -pub const LOCAL_CREDS_PERSISTENT: ::c_int = 3; -pub const LOCAL_CONNWAIT: ::c_int = 4; -pub const LOCAL_VENDOR: ::c_int = SO_VENDOR; - -pub const PL_EVENT_NONE: ::c_int = 0; -pub const PL_EVENT_SIGNAL: ::c_int = 1; -pub const PL_FLAG_SA: ::c_int = 0x01; -pub const PL_FLAG_BOUND: ::c_int = 0x02; -pub const PL_FLAG_SCE: ::c_int = 0x04; -pub const PL_FLAG_SCX: ::c_int = 0x08; -pub const PL_FLAG_EXEC: ::c_int = 0x10; -pub const PL_FLAG_SI: ::c_int = 0x20; -pub const PL_FLAG_FORKED: ::c_int = 0x40; -pub const PL_FLAG_CHILD: ::c_int = 0x80; -pub const PL_FLAG_BORN: ::c_int = 0x100; -pub const PL_FLAG_EXITED: ::c_int = 0x200; -pub const PL_FLAG_VFORKED: ::c_int = 0x400; -pub const PL_FLAG_VFORK_DONE: ::c_int = 0x800; - -pub const PT_LWPINFO: ::c_int = 13; -pub const PT_GETNUMLWPS: ::c_int = 14; -pub const PT_GETLWPLIST: ::c_int = 15; -pub const PT_CLEARSTEP: ::c_int = 16; -pub const PT_SETSTEP: ::c_int = 17; -pub const PT_SUSPEND: ::c_int = 18; -pub const PT_RESUME: ::c_int = 19; -pub const PT_TO_SCE: ::c_int = 20; -pub const PT_TO_SCX: ::c_int = 21; -pub const PT_SYSCALL: ::c_int = 22; -pub const PT_FOLLOW_FORK: ::c_int = 23; -pub const PT_LWP_EVENTS: ::c_int = 24; -pub const PT_GET_EVENT_MASK: ::c_int = 25; -pub const PT_SET_EVENT_MASK: ::c_int = 26; -pub const PT_GET_SC_ARGS: ::c_int = 27; -pub const PT_GET_SC_RET: ::c_int = 28; -pub const PT_COREDUMP: ::c_int = 29; -pub const PT_GETREGS: ::c_int = 33; -pub const PT_SETREGS: ::c_int = 34; -pub const PT_GETFPREGS: ::c_int = 35; -pub const PT_SETFPREGS: ::c_int = 36; -pub const PT_GETDBREGS: ::c_int = 37; -pub const PT_SETDBREGS: ::c_int = 38; -pub const PT_VM_TIMESTAMP: ::c_int = 40; -pub const PT_VM_ENTRY: ::c_int = 41; -pub const PT_GETREGSET: ::c_int = 42; -pub const PT_SETREGSET: ::c_int = 43; -pub const PT_SC_REMOTE: ::c_int = 44; -pub const PT_FIRSTMACH: ::c_int = 64; - -pub const PTRACE_EXEC: ::c_int = 0x0001; -pub const PTRACE_SCE: ::c_int = 0x0002; -pub const PTRACE_SCX: ::c_int = 0x0004; -pub const PTRACE_SYSCALL: ::c_int = PTRACE_SCE | PTRACE_SCX; -pub const PTRACE_FORK: ::c_int = 0x0008; -pub const PTRACE_LWP: ::c_int = 0x0010; -pub const PTRACE_VFORK: ::c_int = 0x0020; -pub const PTRACE_DEFAULT: ::c_int = PTRACE_EXEC; +pub const JAIL_CREATE: c_int = 0x01; +pub const JAIL_UPDATE: c_int = 0x02; +pub const JAIL_ATTACH: c_int = 0x04; +pub const JAIL_DYING: c_int = 0x08; +pub const JAIL_SET_MASK: c_int = 0x0f; +pub const JAIL_GET_MASK: c_int = 0x08; +pub const JAIL_SYS_DISABLE: c_int = 0; +pub const JAIL_SYS_NEW: c_int = 1; +pub const JAIL_SYS_INHERIT: c_int = 2; + +pub const MNT_ACLS: c_int = 0x08000000; +pub const MNT_BYFSID: c_int = 0x08000000; +pub const MNT_GJOURNAL: c_int = 0x02000000; +pub const MNT_MULTILABEL: c_int = 0x04000000; +pub const MNT_NFS4ACLS: c_int = 0x00000010; +pub const MNT_SNAPSHOT: c_int = 0x01000000; +pub const MNT_UNION: c_int = 0x00000020; +pub const MNT_NONBUSY: c_int = 0x04000000; + +pub const SCM_BINTIME: c_int = 0x04; +pub const SCM_REALTIME: c_int = 0x05; +pub const SCM_MONOTONIC: c_int = 0x06; +pub const SCM_TIME_INFO: c_int = 0x07; +pub const SCM_CREDS2: c_int = 0x08; + +pub const SO_BINTIME: c_int = 0x2000; +pub const SO_NO_OFFLOAD: c_int = 0x4000; +pub const SO_NO_DDP: c_int = 0x8000; +pub const SO_REUSEPORT_LB: c_int = 0x10000; +pub const SO_LABEL: c_int = 0x1009; +pub const SO_PEERLABEL: c_int = 0x1010; +pub const SO_LISTENQLIMIT: c_int = 0x1011; +pub const SO_LISTENQLEN: c_int = 0x1012; +pub const SO_LISTENINCQLEN: c_int = 0x1013; +pub const SO_SETFIB: c_int = 0x1014; +pub const SO_USER_COOKIE: c_int = 0x1015; +pub const SO_PROTOCOL: c_int = 0x1016; +pub const SO_PROTOTYPE: c_int = SO_PROTOCOL; +pub const SO_TS_CLOCK: c_int = 0x1017; +pub const SO_DOMAIN: c_int = 0x1019; +pub const SO_VENDOR: c_int = 0x80000000; + +pub const SO_TS_REALTIME_MICRO: c_int = 0; +pub const SO_TS_BINTIME: c_int = 1; +pub const SO_TS_REALTIME: c_int = 2; +pub const SO_TS_MONOTONIC: c_int = 3; +pub const SO_TS_DEFAULT: c_int = SO_TS_REALTIME_MICRO; +pub const SO_TS_CLOCK_MAX: c_int = SO_TS_MONOTONIC; + +pub const LOCAL_CREDS: c_int = 2; +pub const LOCAL_CREDS_PERSISTENT: c_int = 3; +pub const LOCAL_CONNWAIT: c_int = 4; +pub const LOCAL_VENDOR: c_int = SO_VENDOR; + +pub const PL_EVENT_NONE: c_int = 0; +pub const PL_EVENT_SIGNAL: c_int = 1; +pub const PL_FLAG_SA: c_int = 0x01; +pub const PL_FLAG_BOUND: c_int = 0x02; +pub const PL_FLAG_SCE: c_int = 0x04; +pub const PL_FLAG_SCX: c_int = 0x08; +pub const PL_FLAG_EXEC: c_int = 0x10; +pub const PL_FLAG_SI: c_int = 0x20; +pub const PL_FLAG_FORKED: c_int = 0x40; +pub const PL_FLAG_CHILD: c_int = 0x80; +pub const PL_FLAG_BORN: c_int = 0x100; +pub const PL_FLAG_EXITED: c_int = 0x200; +pub const PL_FLAG_VFORKED: c_int = 0x400; +pub const PL_FLAG_VFORK_DONE: c_int = 0x800; + +pub const PT_LWPINFO: c_int = 13; +pub const PT_GETNUMLWPS: c_int = 14; +pub const PT_GETLWPLIST: c_int = 15; +pub const PT_CLEARSTEP: c_int = 16; +pub const PT_SETSTEP: c_int = 17; +pub const PT_SUSPEND: c_int = 18; +pub const PT_RESUME: c_int = 19; +pub const PT_TO_SCE: c_int = 20; +pub const PT_TO_SCX: c_int = 21; +pub const PT_SYSCALL: c_int = 22; +pub const PT_FOLLOW_FORK: c_int = 23; +pub const PT_LWP_EVENTS: c_int = 24; +pub const PT_GET_EVENT_MASK: c_int = 25; +pub const PT_SET_EVENT_MASK: c_int = 26; +pub const PT_GET_SC_ARGS: c_int = 27; +pub const PT_GET_SC_RET: c_int = 28; +pub const PT_COREDUMP: c_int = 29; +pub const PT_GETREGS: c_int = 33; +pub const PT_SETREGS: c_int = 34; +pub const PT_GETFPREGS: c_int = 35; +pub const PT_SETFPREGS: c_int = 36; +pub const PT_GETDBREGS: c_int = 37; +pub const PT_SETDBREGS: c_int = 38; +pub const PT_VM_TIMESTAMP: c_int = 40; +pub const PT_VM_ENTRY: c_int = 41; +pub const PT_GETREGSET: c_int = 42; +pub const PT_SETREGSET: c_int = 43; +pub const PT_SC_REMOTE: c_int = 44; +pub const PT_FIRSTMACH: c_int = 64; + +pub const PTRACE_EXEC: c_int = 0x0001; +pub const PTRACE_SCE: c_int = 0x0002; +pub const PTRACE_SCX: c_int = 0x0004; +pub const PTRACE_SYSCALL: c_int = PTRACE_SCE | PTRACE_SCX; +pub const PTRACE_FORK: c_int = 0x0008; +pub const PTRACE_LWP: c_int = 0x0010; +pub const PTRACE_VFORK: c_int = 0x0020; +pub const PTRACE_DEFAULT: c_int = PTRACE_EXEC; pub const PC_COMPRESS: u32 = 0x00000001; pub const PC_ALL: u32 = 0x00000002; -pub const PROC_SPROTECT: ::c_int = 1; -pub const PROC_REAP_ACQUIRE: ::c_int = 2; -pub const PROC_REAP_RELEASE: ::c_int = 3; -pub const PROC_REAP_STATUS: ::c_int = 4; -pub const PROC_REAP_GETPIDS: ::c_int = 5; -pub const PROC_REAP_KILL: ::c_int = 6; -pub const PROC_TRACE_CTL: ::c_int = 7; -pub const PROC_TRACE_STATUS: ::c_int = 8; -pub const PROC_TRAPCAP_CTL: ::c_int = 9; -pub const PROC_TRAPCAP_STATUS: ::c_int = 10; -pub const PROC_PDEATHSIG_CTL: ::c_int = 11; -pub const PROC_PDEATHSIG_STATUS: ::c_int = 12; -pub const PROC_ASLR_CTL: ::c_int = 13; -pub const PROC_ASLR_STATUS: ::c_int = 14; -pub const PROC_PROTMAX_CTL: ::c_int = 15; -pub const PROC_PROTMAX_STATUS: ::c_int = 16; -pub const PROC_STACKGAP_CTL: ::c_int = 17; -pub const PROC_STACKGAP_STATUS: ::c_int = 18; -pub const PROC_NO_NEW_PRIVS_CTL: ::c_int = 19; -pub const PROC_NO_NEW_PRIVS_STATUS: ::c_int = 20; -pub const PROC_WXMAP_CTL: ::c_int = 21; -pub const PROC_WXMAP_STATUS: ::c_int = 22; -pub const PROC_PROCCTL_MD_MIN: ::c_int = 0x10000000; - -pub const PPROT_SET: ::c_int = 1; -pub const PPROT_CLEAR: ::c_int = 2; -pub const PPROT_DESCEND: ::c_int = 0x10; -pub const PPROT_INHERIT: ::c_int = 0x20; - -pub const PROC_TRACE_CTL_ENABLE: ::c_int = 1; -pub const PROC_TRACE_CTL_DISABLE: ::c_int = 2; -pub const PROC_TRACE_CTL_DISABLE_EXEC: ::c_int = 3; - -pub const PROC_TRAPCAP_CTL_ENABLE: ::c_int = 1; -pub const PROC_TRAPCAP_CTL_DISABLE: ::c_int = 2; - -pub const PROC_ASLR_FORCE_ENABLE: ::c_int = 1; -pub const PROC_ASLR_FORCE_DISABLE: ::c_int = 2; -pub const PROC_ASLR_NOFORCE: ::c_int = 3; -pub const PROC_ASLR_ACTIVE: ::c_int = 0x80000000; - -pub const PROC_PROTMAX_FORCE_ENABLE: ::c_int = 1; -pub const PROC_PROTMAX_FORCE_DISABLE: ::c_int = 2; -pub const PROC_PROTMAX_NOFORCE: ::c_int = 3; -pub const PROC_PROTMAX_ACTIVE: ::c_int = 0x80000000; - -pub const PROC_STACKGAP_ENABLE: ::c_int = 0x0001; -pub const PROC_STACKGAP_DISABLE: ::c_int = 0x0002; -pub const PROC_STACKGAP_ENABLE_EXEC: ::c_int = 0x0004; -pub const PROC_STACKGAP_DISABLE_EXEC: ::c_int = 0x0008; - -pub const PROC_NO_NEW_PRIVS_ENABLE: ::c_int = 1; -pub const PROC_NO_NEW_PRIVS_DISABLE: ::c_int = 2; - -pub const PROC_WX_MAPPINGS_PERMIT: ::c_int = 0x0001; -pub const PROC_WX_MAPPINGS_DISALLOW_EXEC: ::c_int = 0x0002; -pub const PROC_WXORX_ENFORCE: ::c_int = 0x80000000; - -pub const AF_SLOW: ::c_int = 33; -pub const AF_SCLUSTER: ::c_int = 34; -pub const AF_ARP: ::c_int = 35; -pub const AF_BLUETOOTH: ::c_int = 36; -pub const AF_IEEE80211: ::c_int = 37; -pub const AF_INET_SDP: ::c_int = 40; -pub const AF_INET6_SDP: ::c_int = 42; +pub const PROC_SPROTECT: c_int = 1; +pub const PROC_REAP_ACQUIRE: c_int = 2; +pub const PROC_REAP_RELEASE: c_int = 3; +pub const PROC_REAP_STATUS: c_int = 4; +pub const PROC_REAP_GETPIDS: c_int = 5; +pub const PROC_REAP_KILL: c_int = 6; +pub const PROC_TRACE_CTL: c_int = 7; +pub const PROC_TRACE_STATUS: c_int = 8; +pub const PROC_TRAPCAP_CTL: c_int = 9; +pub const PROC_TRAPCAP_STATUS: c_int = 10; +pub const PROC_PDEATHSIG_CTL: c_int = 11; +pub const PROC_PDEATHSIG_STATUS: c_int = 12; +pub const PROC_ASLR_CTL: c_int = 13; +pub const PROC_ASLR_STATUS: c_int = 14; +pub const PROC_PROTMAX_CTL: c_int = 15; +pub const PROC_PROTMAX_STATUS: c_int = 16; +pub const PROC_STACKGAP_CTL: c_int = 17; +pub const PROC_STACKGAP_STATUS: c_int = 18; +pub const PROC_NO_NEW_PRIVS_CTL: c_int = 19; +pub const PROC_NO_NEW_PRIVS_STATUS: c_int = 20; +pub const PROC_WXMAP_CTL: c_int = 21; +pub const PROC_WXMAP_STATUS: c_int = 22; +pub const PROC_PROCCTL_MD_MIN: c_int = 0x10000000; + +pub const PPROT_SET: c_int = 1; +pub const PPROT_CLEAR: c_int = 2; +pub const PPROT_DESCEND: c_int = 0x10; +pub const PPROT_INHERIT: c_int = 0x20; + +pub const PROC_TRACE_CTL_ENABLE: c_int = 1; +pub const PROC_TRACE_CTL_DISABLE: c_int = 2; +pub const PROC_TRACE_CTL_DISABLE_EXEC: c_int = 3; + +pub const PROC_TRAPCAP_CTL_ENABLE: c_int = 1; +pub const PROC_TRAPCAP_CTL_DISABLE: c_int = 2; + +pub const PROC_ASLR_FORCE_ENABLE: c_int = 1; +pub const PROC_ASLR_FORCE_DISABLE: c_int = 2; +pub const PROC_ASLR_NOFORCE: c_int = 3; +pub const PROC_ASLR_ACTIVE: c_int = 0x80000000; + +pub const PROC_PROTMAX_FORCE_ENABLE: c_int = 1; +pub const PROC_PROTMAX_FORCE_DISABLE: c_int = 2; +pub const PROC_PROTMAX_NOFORCE: c_int = 3; +pub const PROC_PROTMAX_ACTIVE: c_int = 0x80000000; + +pub const PROC_STACKGAP_ENABLE: c_int = 0x0001; +pub const PROC_STACKGAP_DISABLE: c_int = 0x0002; +pub const PROC_STACKGAP_ENABLE_EXEC: c_int = 0x0004; +pub const PROC_STACKGAP_DISABLE_EXEC: c_int = 0x0008; + +pub const PROC_NO_NEW_PRIVS_ENABLE: c_int = 1; +pub const PROC_NO_NEW_PRIVS_DISABLE: c_int = 2; + +pub const PROC_WX_MAPPINGS_PERMIT: c_int = 0x0001; +pub const PROC_WX_MAPPINGS_DISALLOW_EXEC: c_int = 0x0002; +pub const PROC_WXORX_ENFORCE: c_int = 0x80000000; + +pub const AF_SLOW: c_int = 33; +pub const AF_SCLUSTER: c_int = 34; +pub const AF_ARP: c_int = 35; +pub const AF_BLUETOOTH: c_int = 36; +pub const AF_IEEE80211: c_int = 37; +pub const AF_INET_SDP: c_int = 40; +pub const AF_INET6_SDP: c_int = 42; // sys/net/if.h -pub const IF_MAXUNIT: ::c_int = 0x7fff; +pub const IF_MAXUNIT: c_int = 0x7fff; /// (n) interface is up -pub const IFF_UP: ::c_int = 0x1; +pub const IFF_UP: c_int = 0x1; /// (i) broadcast address valid -pub const IFF_BROADCAST: ::c_int = 0x2; +pub const IFF_BROADCAST: c_int = 0x2; /// (n) turn on debugging -pub const IFF_DEBUG: ::c_int = 0x4; +pub const IFF_DEBUG: c_int = 0x4; /// (i) is a loopback net -pub const IFF_LOOPBACK: ::c_int = 0x8; +pub const IFF_LOOPBACK: c_int = 0x8; /// (i) is a point-to-point link -pub const IFF_POINTOPOINT: ::c_int = 0x10; +pub const IFF_POINTOPOINT: c_int = 0x10; /// (i) calls if_input in net epoch #[deprecated(since = "0.2.149", note = "Removed in FreeBSD 14")] -pub const IFF_KNOWSEPOCH: ::c_int = 0x20; +pub const IFF_KNOWSEPOCH: c_int = 0x20; /// (d) resources allocated -pub const IFF_RUNNING: ::c_int = 0x40; +pub const IFF_RUNNING: c_int = 0x40; #[doc(hidden)] #[deprecated( since = "0.2.54", note = "IFF_DRV_RUNNING is deprecated. Use the portable IFF_RUNNING instead" )] /// (d) resources allocate -pub const IFF_DRV_RUNNING: ::c_int = 0x40; +pub const IFF_DRV_RUNNING: c_int = 0x40; /// (n) no address resolution protocol -pub const IFF_NOARP: ::c_int = 0x80; +pub const IFF_NOARP: c_int = 0x80; /// (n) receive all packets -pub const IFF_PROMISC: ::c_int = 0x100; +pub const IFF_PROMISC: c_int = 0x100; /// (n) receive all multicast packets -pub const IFF_ALLMULTI: ::c_int = 0x200; +pub const IFF_ALLMULTI: c_int = 0x200; /// (d) tx hardware queue is full -pub const IFF_OACTIVE: ::c_int = 0x400; +pub const IFF_OACTIVE: c_int = 0x400; #[doc(hidden)] #[deprecated(since = "0.2.54", note = "Use the portable `IFF_OACTIVE` instead")] /// (d) tx hardware queue is full -pub const IFF_DRV_OACTIVE: ::c_int = 0x400; +pub const IFF_DRV_OACTIVE: c_int = 0x400; /// (i) can't hear own transmissions -pub const IFF_SIMPLEX: ::c_int = 0x800; +pub const IFF_SIMPLEX: c_int = 0x800; /// per link layer defined bit -pub const IFF_LINK0: ::c_int = 0x1000; +pub const IFF_LINK0: c_int = 0x1000; /// per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; +pub const IFF_LINK1: c_int = 0x2000; /// per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; +pub const IFF_LINK2: c_int = 0x4000; /// use alternate physical connection -pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; +pub const IFF_ALTPHYS: c_int = IFF_LINK2; /// (i) supports multicast -pub const IFF_MULTICAST: ::c_int = 0x8000; +pub const IFF_MULTICAST: c_int = 0x8000; /// (i) unconfigurable using ioctl(2) -pub const IFF_CANTCONFIG: ::c_int = 0x10000; +pub const IFF_CANTCONFIG: c_int = 0x10000; /// (n) user-requested promisc mode -pub const IFF_PPROMISC: ::c_int = 0x20000; +pub const IFF_PPROMISC: c_int = 0x20000; /// (n) user-requested monitor mode -pub const IFF_MONITOR: ::c_int = 0x40000; +pub const IFF_MONITOR: c_int = 0x40000; /// (n) static ARP -pub const IFF_STATICARP: ::c_int = 0x80000; +pub const IFF_STATICARP: c_int = 0x80000; /// (n) interface is winding down -pub const IFF_DYING: ::c_int = 0x200000; +pub const IFF_DYING: c_int = 0x200000; /// (n) interface is being renamed -pub const IFF_RENAMING: ::c_int = 0x400000; +pub const IFF_RENAMING: c_int = 0x400000; /// interface is not part of any groups #[deprecated(since = "0.2.149", note = "Removed in FreeBSD 14")] -pub const IFF_NOGROUP: ::c_int = 0x800000; +pub const IFF_NOGROUP: c_int = 0x800000; /// link invalid/unknown -pub const LINK_STATE_UNKNOWN: ::c_int = 0; +pub const LINK_STATE_UNKNOWN: c_int = 0; /// link is down -pub const LINK_STATE_DOWN: ::c_int = 1; +pub const LINK_STATE_DOWN: c_int = 1; /// link is up -pub const LINK_STATE_UP: ::c_int = 2; +pub const LINK_STATE_UP: c_int = 2; /// can offload checksum on RX -pub const IFCAP_RXCSUM: ::c_int = 0x00001; +pub const IFCAP_RXCSUM: c_int = 0x00001; /// can offload checksum on TX -pub const IFCAP_TXCSUM: ::c_int = 0x00002; +pub const IFCAP_TXCSUM: c_int = 0x00002; /// can be a network console -pub const IFCAP_NETCONS: ::c_int = 0x00004; +pub const IFCAP_NETCONS: c_int = 0x00004; /// VLAN-compatible MTU -pub const IFCAP_VLAN_MTU: ::c_int = 0x00008; +pub const IFCAP_VLAN_MTU: c_int = 0x00008; /// hardware VLAN tag support -pub const IFCAP_VLAN_HWTAGGING: ::c_int = 0x00010; +pub const IFCAP_VLAN_HWTAGGING: c_int = 0x00010; /// 9000 byte MTU supported -pub const IFCAP_JUMBO_MTU: ::c_int = 0x00020; +pub const IFCAP_JUMBO_MTU: c_int = 0x00020; /// driver supports polling -pub const IFCAP_POLLING: ::c_int = 0x00040; +pub const IFCAP_POLLING: c_int = 0x00040; /// can do IFCAP_HWCSUM on VLANs -pub const IFCAP_VLAN_HWCSUM: ::c_int = 0x00080; +pub const IFCAP_VLAN_HWCSUM: c_int = 0x00080; /// can do TCP Segmentation Offload -pub const IFCAP_TSO4: ::c_int = 0x00100; +pub const IFCAP_TSO4: c_int = 0x00100; /// can do TCP6 Segmentation Offload -pub const IFCAP_TSO6: ::c_int = 0x00200; +pub const IFCAP_TSO6: c_int = 0x00200; /// can do Large Receive Offload -pub const IFCAP_LRO: ::c_int = 0x00400; +pub const IFCAP_LRO: c_int = 0x00400; /// wake on any unicast frame -pub const IFCAP_WOL_UCAST: ::c_int = 0x00800; +pub const IFCAP_WOL_UCAST: c_int = 0x00800; /// wake on any multicast frame -pub const IFCAP_WOL_MCAST: ::c_int = 0x01000; +pub const IFCAP_WOL_MCAST: c_int = 0x01000; /// wake on any Magic Packet -pub const IFCAP_WOL_MAGIC: ::c_int = 0x02000; +pub const IFCAP_WOL_MAGIC: c_int = 0x02000; /// interface can offload TCP -pub const IFCAP_TOE4: ::c_int = 0x04000; +pub const IFCAP_TOE4: c_int = 0x04000; /// interface can offload TCP6 -pub const IFCAP_TOE6: ::c_int = 0x08000; +pub const IFCAP_TOE6: c_int = 0x08000; /// interface hw can filter vlan tag -pub const IFCAP_VLAN_HWFILTER: ::c_int = 0x10000; +pub const IFCAP_VLAN_HWFILTER: c_int = 0x10000; /// can do SIOCGIFCAPNV/SIOCSIFCAPNV -pub const IFCAP_NV: ::c_int = 0x20000; +pub const IFCAP_NV: c_int = 0x20000; /// can do IFCAP_TSO on VLANs -pub const IFCAP_VLAN_HWTSO: ::c_int = 0x40000; +pub const IFCAP_VLAN_HWTSO: c_int = 0x40000; /// the runtime link state is dynamic -pub const IFCAP_LINKSTATE: ::c_int = 0x80000; +pub const IFCAP_LINKSTATE: c_int = 0x80000; /// netmap mode supported/enabled -pub const IFCAP_NETMAP: ::c_int = 0x100000; +pub const IFCAP_NETMAP: c_int = 0x100000; /// can offload checksum on IPv6 RX -pub const IFCAP_RXCSUM_IPV6: ::c_int = 0x200000; +pub const IFCAP_RXCSUM_IPV6: c_int = 0x200000; /// can offload checksum on IPv6 TX -pub const IFCAP_TXCSUM_IPV6: ::c_int = 0x400000; +pub const IFCAP_TXCSUM_IPV6: c_int = 0x400000; /// manages counters internally -pub const IFCAP_HWSTATS: ::c_int = 0x800000; +pub const IFCAP_HWSTATS: c_int = 0x800000; /// hardware supports TX rate limiting -pub const IFCAP_TXRTLMT: ::c_int = 0x1000000; +pub const IFCAP_TXRTLMT: c_int = 0x1000000; /// hardware rx timestamping -pub const IFCAP_HWRXTSTMP: ::c_int = 0x2000000; +pub const IFCAP_HWRXTSTMP: c_int = 0x2000000; /// understands M_EXTPG mbufs -pub const IFCAP_MEXTPG: ::c_int = 0x4000000; +pub const IFCAP_MEXTPG: c_int = 0x4000000; /// can do TLS encryption and segmentation for TCP -pub const IFCAP_TXTLS4: ::c_int = 0x8000000; +pub const IFCAP_TXTLS4: c_int = 0x8000000; /// can do TLS encryption and segmentation for TCP6 -pub const IFCAP_TXTLS6: ::c_int = 0x10000000; +pub const IFCAP_TXTLS6: c_int = 0x10000000; /// can do IFCAN_HWCSUM on VXLANs -pub const IFCAP_VXLAN_HWCSUM: ::c_int = 0x20000000; +pub const IFCAP_VXLAN_HWCSUM: c_int = 0x20000000; /// can do IFCAP_TSO on VXLANs -pub const IFCAP_VXLAN_HWTSO: ::c_int = 0x40000000; +pub const IFCAP_VXLAN_HWTSO: c_int = 0x40000000; /// can do TLS with rate limiting -pub const IFCAP_TXTLS_RTLMT: ::c_int = 0x80000000; - -pub const IFCAP_HWCSUM_IPV6: ::c_int = IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6; -pub const IFCAP_HWCSUM: ::c_int = IFCAP_RXCSUM | IFCAP_TXCSUM; -pub const IFCAP_TSO: ::c_int = IFCAP_TSO4 | IFCAP_TSO6; -pub const IFCAP_WOL: ::c_int = IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC; -pub const IFCAP_TOE: ::c_int = IFCAP_TOE4 | IFCAP_TOE6; -pub const IFCAP_TXTLS: ::c_int = IFCAP_TXTLS4 | IFCAP_TXTLS6; -pub const IFCAP_CANTCHANGE: ::c_int = IFCAP_NETMAP | IFCAP_NV; - -pub const IFQ_MAXLEN: ::c_int = 50; -pub const IFNET_SLOWHZ: ::c_int = 1; - -pub const IFAN_ARRIVAL: ::c_int = 0; -pub const IFAN_DEPARTURE: ::c_int = 1; - -pub const IFSTATMAX: ::c_int = 800; - -pub const RSS_FUNC_NONE: ::c_int = 0; -pub const RSS_FUNC_PRIVATE: ::c_int = 1; -pub const RSS_FUNC_TOEPLITZ: ::c_int = 2; - -pub const RSS_TYPE_IPV4: ::c_int = 0x00000001; -pub const RSS_TYPE_TCP_IPV4: ::c_int = 0x00000002; -pub const RSS_TYPE_IPV6: ::c_int = 0x00000004; -pub const RSS_TYPE_IPV6_EX: ::c_int = 0x00000008; -pub const RSS_TYPE_TCP_IPV6: ::c_int = 0x00000010; -pub const RSS_TYPE_TCP_IPV6_EX: ::c_int = 0x00000020; -pub const RSS_TYPE_UDP_IPV4: ::c_int = 0x00000040; -pub const RSS_TYPE_UDP_IPV6: ::c_int = 0x00000080; -pub const RSS_TYPE_UDP_IPV6_EX: ::c_int = 0x00000100; -pub const RSS_KEYLEN: ::c_int = 128; - -pub const IFNET_PCP_NONE: ::c_int = 0xff; -pub const IFDR_MSG_SIZE: ::c_int = 64; -pub const IFDR_REASON_MSG: ::c_int = 1; -pub const IFDR_REASON_VENDOR: ::c_int = 2; +pub const IFCAP_TXTLS_RTLMT: c_int = 0x80000000; + +pub const IFCAP_HWCSUM_IPV6: c_int = IFCAP_RXCSUM_IPV6 | IFCAP_TXCSUM_IPV6; +pub const IFCAP_HWCSUM: c_int = IFCAP_RXCSUM | IFCAP_TXCSUM; +pub const IFCAP_TSO: c_int = IFCAP_TSO4 | IFCAP_TSO6; +pub const IFCAP_WOL: c_int = IFCAP_WOL_UCAST | IFCAP_WOL_MCAST | IFCAP_WOL_MAGIC; +pub const IFCAP_TOE: c_int = IFCAP_TOE4 | IFCAP_TOE6; +pub const IFCAP_TXTLS: c_int = IFCAP_TXTLS4 | IFCAP_TXTLS6; +pub const IFCAP_CANTCHANGE: c_int = IFCAP_NETMAP | IFCAP_NV; + +pub const IFQ_MAXLEN: c_int = 50; +pub const IFNET_SLOWHZ: c_int = 1; + +pub const IFAN_ARRIVAL: c_int = 0; +pub const IFAN_DEPARTURE: c_int = 1; + +pub const IFSTATMAX: c_int = 800; + +pub const RSS_FUNC_NONE: c_int = 0; +pub const RSS_FUNC_PRIVATE: c_int = 1; +pub const RSS_FUNC_TOEPLITZ: c_int = 2; + +pub const RSS_TYPE_IPV4: c_int = 0x00000001; +pub const RSS_TYPE_TCP_IPV4: c_int = 0x00000002; +pub const RSS_TYPE_IPV6: c_int = 0x00000004; +pub const RSS_TYPE_IPV6_EX: c_int = 0x00000008; +pub const RSS_TYPE_TCP_IPV6: c_int = 0x00000010; +pub const RSS_TYPE_TCP_IPV6_EX: c_int = 0x00000020; +pub const RSS_TYPE_UDP_IPV4: c_int = 0x00000040; +pub const RSS_TYPE_UDP_IPV6: c_int = 0x00000080; +pub const RSS_TYPE_UDP_IPV6_EX: c_int = 0x00000100; +pub const RSS_KEYLEN: c_int = 128; + +pub const IFNET_PCP_NONE: c_int = 0xff; +pub const IFDR_MSG_SIZE: c_int = 64; +pub const IFDR_REASON_MSG: c_int = 1; +pub const IFDR_REASON_VENDOR: c_int = 2; // sys/net/if_mib.h /// non-interface-specific -pub const IFMIB_SYSTEM: ::c_int = 1; +pub const IFMIB_SYSTEM: c_int = 1; /// per-interface data table -pub const IFMIB_IFDATA: ::c_int = 2; +pub const IFMIB_IFDATA: c_int = 2; /// generic stats for all kinds of ifaces -pub const IFDATA_GENERAL: ::c_int = 1; +pub const IFDATA_GENERAL: c_int = 1; /// specific to the type of interface -pub const IFDATA_LINKSPECIFIC: ::c_int = 2; +pub const IFDATA_LINKSPECIFIC: c_int = 2; /// driver name and unit -pub const IFDATA_DRIVERNAME: ::c_int = 3; +pub const IFDATA_DRIVERNAME: c_int = 3; /// number of interfaces configured -pub const IFMIB_IFCOUNT: ::c_int = 1; +pub const IFMIB_IFCOUNT: c_int = 1; /// functions not specific to a type of iface -pub const NETLINK_GENERIC: ::c_int = 0; +pub const NETLINK_GENERIC: c_int = 0; -pub const DOT3COMPLIANCE_STATS: ::c_int = 1; -pub const DOT3COMPLIANCE_COLLS: ::c_int = 2; +pub const DOT3COMPLIANCE_STATS: c_int = 1; +pub const DOT3COMPLIANCE_COLLS: c_int = 2; -pub const dot3ChipSetAMD7990: ::c_int = 1; -pub const dot3ChipSetAMD79900: ::c_int = 2; -pub const dot3ChipSetAMD79C940: ::c_int = 3; +pub const dot3ChipSetAMD7990: c_int = 1; +pub const dot3ChipSetAMD79900: c_int = 2; +pub const dot3ChipSetAMD79C940: c_int = 3; -pub const dot3ChipSetIntel82586: ::c_int = 1; -pub const dot3ChipSetIntel82596: ::c_int = 2; -pub const dot3ChipSetIntel82557: ::c_int = 3; +pub const dot3ChipSetIntel82586: c_int = 1; +pub const dot3ChipSetIntel82596: c_int = 2; +pub const dot3ChipSetIntel82557: c_int = 3; -pub const dot3ChipSetNational8390: ::c_int = 1; -pub const dot3ChipSetNationalSonic: ::c_int = 2; +pub const dot3ChipSetNational8390: c_int = 1; +pub const dot3ChipSetNationalSonic: c_int = 2; -pub const dot3ChipSetFujitsu86950: ::c_int = 1; +pub const dot3ChipSetFujitsu86950: c_int = 1; -pub const dot3ChipSetDigitalDC21040: ::c_int = 1; -pub const dot3ChipSetDigitalDC21140: ::c_int = 2; -pub const dot3ChipSetDigitalDC21041: ::c_int = 3; -pub const dot3ChipSetDigitalDC21140A: ::c_int = 4; -pub const dot3ChipSetDigitalDC21142: ::c_int = 5; +pub const dot3ChipSetDigitalDC21040: c_int = 1; +pub const dot3ChipSetDigitalDC21140: c_int = 2; +pub const dot3ChipSetDigitalDC21041: c_int = 3; +pub const dot3ChipSetDigitalDC21140A: c_int = 4; +pub const dot3ChipSetDigitalDC21142: c_int = 5; -pub const dot3ChipSetWesternDigital83C690: ::c_int = 1; -pub const dot3ChipSetWesternDigital83C790: ::c_int = 2; +pub const dot3ChipSetWesternDigital83C690: c_int = 1; +pub const dot3ChipSetWesternDigital83C790: c_int = 2; // sys/netinet/in.h // Protocols (RFC 1700) @@ -3556,346 +3560,346 @@ pub const dot3ChipSetWesternDigital83C790: ::c_int = 2; // IPPROTO_IP defined in src/unix/mod.rs /// IP6 hop-by-hop options -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// gateway^2 (deprecated) -pub const IPPROTO_GGP: ::c_int = 3; +pub const IPPROTO_GGP: c_int = 3; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// Stream protocol II. -pub const IPPROTO_ST: ::c_int = 7; +pub const IPPROTO_ST: c_int = 7; /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// private interior gateway -pub const IPPROTO_PIGP: ::c_int = 9; +pub const IPPROTO_PIGP: c_int = 9; /// BBN RCC Monitoring -pub const IPPROTO_RCCMON: ::c_int = 10; +pub const IPPROTO_RCCMON: c_int = 10; /// network voice protocol -pub const IPPROTO_NVPII: ::c_int = 11; +pub const IPPROTO_NVPII: c_int = 11; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; /// Argus -pub const IPPROTO_ARGUS: ::c_int = 13; +pub const IPPROTO_ARGUS: c_int = 13; /// EMCON -pub const IPPROTO_EMCON: ::c_int = 14; +pub const IPPROTO_EMCON: c_int = 14; /// Cross Net Debugger -pub const IPPROTO_XNET: ::c_int = 15; +pub const IPPROTO_XNET: c_int = 15; /// Chaos -pub const IPPROTO_CHAOS: ::c_int = 16; +pub const IPPROTO_CHAOS: c_int = 16; // IPPROTO_UDP defined in src/unix/mod.rs /// Multiplexing -pub const IPPROTO_MUX: ::c_int = 18; +pub const IPPROTO_MUX: c_int = 18; /// DCN Measurement Subsystems -pub const IPPROTO_MEAS: ::c_int = 19; +pub const IPPROTO_MEAS: c_int = 19; /// Host Monitoring -pub const IPPROTO_HMP: ::c_int = 20; +pub const IPPROTO_HMP: c_int = 20; /// Packet Radio Measurement -pub const IPPROTO_PRM: ::c_int = 21; +pub const IPPROTO_PRM: c_int = 21; /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// Trunk-1 -pub const IPPROTO_TRUNK1: ::c_int = 23; +pub const IPPROTO_TRUNK1: c_int = 23; /// Trunk-2 -pub const IPPROTO_TRUNK2: ::c_int = 24; +pub const IPPROTO_TRUNK2: c_int = 24; /// Leaf-1 -pub const IPPROTO_LEAF1: ::c_int = 25; +pub const IPPROTO_LEAF1: c_int = 25; /// Leaf-2 -pub const IPPROTO_LEAF2: ::c_int = 26; +pub const IPPROTO_LEAF2: c_int = 26; /// Reliable Data -pub const IPPROTO_RDP: ::c_int = 27; +pub const IPPROTO_RDP: c_int = 27; /// Reliable Transaction -pub const IPPROTO_IRTP: ::c_int = 28; +pub const IPPROTO_IRTP: c_int = 28; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; /// Bulk Data Transfer -pub const IPPROTO_BLT: ::c_int = 30; +pub const IPPROTO_BLT: c_int = 30; /// Network Services -pub const IPPROTO_NSP: ::c_int = 31; +pub const IPPROTO_NSP: c_int = 31; /// Merit Internodal -pub const IPPROTO_INP: ::c_int = 32; +pub const IPPROTO_INP: c_int = 32; #[doc(hidden)] #[deprecated( since = "0.2.72", note = "IPPROTO_SEP is deprecated. Use IPPROTO_DCCP instead" )] -pub const IPPROTO_SEP: ::c_int = 33; +pub const IPPROTO_SEP: c_int = 33; /// Datagram Congestion Control Protocol -pub const IPPROTO_DCCP: ::c_int = 33; +pub const IPPROTO_DCCP: c_int = 33; /// Third Party Connect -pub const IPPROTO_3PC: ::c_int = 34; +pub const IPPROTO_3PC: c_int = 34; /// InterDomain Policy Routing -pub const IPPROTO_IDPR: ::c_int = 35; +pub const IPPROTO_IDPR: c_int = 35; /// XTP -pub const IPPROTO_XTP: ::c_int = 36; +pub const IPPROTO_XTP: c_int = 36; /// Datagram Delivery -pub const IPPROTO_DDP: ::c_int = 37; +pub const IPPROTO_DDP: c_int = 37; /// Control Message Transport -pub const IPPROTO_CMTP: ::c_int = 38; +pub const IPPROTO_CMTP: c_int = 38; /// TP++ Transport -pub const IPPROTO_TPXX: ::c_int = 39; +pub const IPPROTO_TPXX: c_int = 39; /// IL transport protocol -pub const IPPROTO_IL: ::c_int = 40; +pub const IPPROTO_IL: c_int = 40; // IPPROTO_IPV6 defined in src/unix/mod.rs /// Source Demand Routing -pub const IPPROTO_SDRP: ::c_int = 42; +pub const IPPROTO_SDRP: c_int = 42; /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// InterDomain Routing -pub const IPPROTO_IDRP: ::c_int = 45; +pub const IPPROTO_IDRP: c_int = 45; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// Mobile Host Routing -pub const IPPROTO_MHRP: ::c_int = 48; +pub const IPPROTO_MHRP: c_int = 48; /// BHA -pub const IPPROTO_BHA: ::c_int = 49; +pub const IPPROTO_BHA: c_int = 49; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; /// Integ. Net Layer Security -pub const IPPROTO_INLSP: ::c_int = 52; +pub const IPPROTO_INLSP: c_int = 52; /// IP with encryption -pub const IPPROTO_SWIPE: ::c_int = 53; +pub const IPPROTO_SWIPE: c_int = 53; /// Next Hop Resolution -pub const IPPROTO_NHRP: ::c_int = 54; +pub const IPPROTO_NHRP: c_int = 54; /// IP Mobility -pub const IPPROTO_MOBILE: ::c_int = 55; +pub const IPPROTO_MOBILE: c_int = 55; /// Transport Layer Security -pub const IPPROTO_TLSP: ::c_int = 56; +pub const IPPROTO_TLSP: c_int = 56; /// SKIP -pub const IPPROTO_SKIP: ::c_int = 57; +pub const IPPROTO_SKIP: c_int = 57; // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; +pub const IPPROTO_DSTOPTS: c_int = 60; /// any host internal protocol -pub const IPPROTO_AHIP: ::c_int = 61; +pub const IPPROTO_AHIP: c_int = 61; /// CFTP -pub const IPPROTO_CFTP: ::c_int = 62; +pub const IPPROTO_CFTP: c_int = 62; /// "hello" routing protocol -pub const IPPROTO_HELLO: ::c_int = 63; +pub const IPPROTO_HELLO: c_int = 63; /// SATNET/Backroom EXPAK -pub const IPPROTO_SATEXPAK: ::c_int = 64; +pub const IPPROTO_SATEXPAK: c_int = 64; /// Kryptolan -pub const IPPROTO_KRYPTOLAN: ::c_int = 65; +pub const IPPROTO_KRYPTOLAN: c_int = 65; /// Remote Virtual Disk -pub const IPPROTO_RVD: ::c_int = 66; +pub const IPPROTO_RVD: c_int = 66; /// Pluribus Packet Core -pub const IPPROTO_IPPC: ::c_int = 67; +pub const IPPROTO_IPPC: c_int = 67; /// Any distributed FS -pub const IPPROTO_ADFS: ::c_int = 68; +pub const IPPROTO_ADFS: c_int = 68; /// Satnet Monitoring -pub const IPPROTO_SATMON: ::c_int = 69; +pub const IPPROTO_SATMON: c_int = 69; /// VISA Protocol -pub const IPPROTO_VISA: ::c_int = 70; +pub const IPPROTO_VISA: c_int = 70; /// Packet Core Utility -pub const IPPROTO_IPCV: ::c_int = 71; +pub const IPPROTO_IPCV: c_int = 71; /// Comp. Prot. Net. Executive -pub const IPPROTO_CPNX: ::c_int = 72; +pub const IPPROTO_CPNX: c_int = 72; /// Comp. Prot. HeartBeat -pub const IPPROTO_CPHB: ::c_int = 73; +pub const IPPROTO_CPHB: c_int = 73; /// Wang Span Network -pub const IPPROTO_WSN: ::c_int = 74; +pub const IPPROTO_WSN: c_int = 74; /// Packet Video Protocol -pub const IPPROTO_PVP: ::c_int = 75; +pub const IPPROTO_PVP: c_int = 75; /// BackRoom SATNET Monitoring -pub const IPPROTO_BRSATMON: ::c_int = 76; +pub const IPPROTO_BRSATMON: c_int = 76; /// Sun net disk proto (temp.) -pub const IPPROTO_ND: ::c_int = 77; +pub const IPPROTO_ND: c_int = 77; /// WIDEBAND Monitoring -pub const IPPROTO_WBMON: ::c_int = 78; +pub const IPPROTO_WBMON: c_int = 78; /// WIDEBAND EXPAK -pub const IPPROTO_WBEXPAK: ::c_int = 79; +pub const IPPROTO_WBEXPAK: c_int = 79; /// ISO cnlp -pub const IPPROTO_EON: ::c_int = 80; +pub const IPPROTO_EON: c_int = 80; /// VMTP -pub const IPPROTO_VMTP: ::c_int = 81; +pub const IPPROTO_VMTP: c_int = 81; /// Secure VMTP -pub const IPPROTO_SVMTP: ::c_int = 82; +pub const IPPROTO_SVMTP: c_int = 82; /// Banyon VINES -pub const IPPROTO_VINES: ::c_int = 83; +pub const IPPROTO_VINES: c_int = 83; /// TTP -pub const IPPROTO_TTP: ::c_int = 84; +pub const IPPROTO_TTP: c_int = 84; /// NSFNET-IGP -pub const IPPROTO_IGP: ::c_int = 85; +pub const IPPROTO_IGP: c_int = 85; /// dissimilar gateway prot. -pub const IPPROTO_DGP: ::c_int = 86; +pub const IPPROTO_DGP: c_int = 86; /// TCF -pub const IPPROTO_TCF: ::c_int = 87; +pub const IPPROTO_TCF: c_int = 87; /// Cisco/GXS IGRP -pub const IPPROTO_IGRP: ::c_int = 88; +pub const IPPROTO_IGRP: c_int = 88; /// OSPFIGP -pub const IPPROTO_OSPFIGP: ::c_int = 89; +pub const IPPROTO_OSPFIGP: c_int = 89; /// Strite RPC protocol -pub const IPPROTO_SRPC: ::c_int = 90; +pub const IPPROTO_SRPC: c_int = 90; /// Locus Address Resoloution -pub const IPPROTO_LARP: ::c_int = 91; +pub const IPPROTO_LARP: c_int = 91; /// Multicast Transport -pub const IPPROTO_MTP: ::c_int = 92; +pub const IPPROTO_MTP: c_int = 92; /// AX.25 Frames -pub const IPPROTO_AX25: ::c_int = 93; +pub const IPPROTO_AX25: c_int = 93; /// IP encapsulated in IP -pub const IPPROTO_IPEIP: ::c_int = 94; +pub const IPPROTO_IPEIP: c_int = 94; /// Mobile Int.ing control -pub const IPPROTO_MICP: ::c_int = 95; +pub const IPPROTO_MICP: c_int = 95; /// Semaphore Comm. security -pub const IPPROTO_SCCSP: ::c_int = 96; +pub const IPPROTO_SCCSP: c_int = 96; /// Ethernet IP encapsulation -pub const IPPROTO_ETHERIP: ::c_int = 97; +pub const IPPROTO_ETHERIP: c_int = 97; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// any private encr. scheme -pub const IPPROTO_APES: ::c_int = 99; +pub const IPPROTO_APES: c_int = 99; /// GMTP -pub const IPPROTO_GMTP: ::c_int = 100; +pub const IPPROTO_GMTP: c_int = 100; /// payload compression (IPComp) -pub const IPPROTO_IPCOMP: ::c_int = 108; +pub const IPPROTO_IPCOMP: c_int = 108; /// SCTP -pub const IPPROTO_SCTP: ::c_int = 132; +pub const IPPROTO_SCTP: c_int = 132; /// IPv6 Mobility Header -pub const IPPROTO_MH: ::c_int = 135; +pub const IPPROTO_MH: c_int = 135; /// UDP-Lite -pub const IPPROTO_UDPLITE: ::c_int = 136; +pub const IPPROTO_UDPLITE: c_int = 136; /// IP6 Host Identity Protocol -pub const IPPROTO_HIP: ::c_int = 139; +pub const IPPROTO_HIP: c_int = 139; /// IP6 Shim6 Protocol -pub const IPPROTO_SHIM6: ::c_int = 140; +pub const IPPROTO_SHIM6: c_int = 140; /* 101-254: Partly Unassigned */ /// Protocol Independent Mcast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// CARP -pub const IPPROTO_CARP: ::c_int = 112; +pub const IPPROTO_CARP: c_int = 112; /// PGM -pub const IPPROTO_PGM: ::c_int = 113; +pub const IPPROTO_PGM: c_int = 113; /// MPLS-in-IP -pub const IPPROTO_MPLS: ::c_int = 137; +pub const IPPROTO_MPLS: c_int = 137; /// PFSYNC -pub const IPPROTO_PFSYNC: ::c_int = 240; +pub const IPPROTO_PFSYNC: c_int = 240; /* 255: Reserved */ /* BSD Private, local use, namespace incursion, no longer used */ /// OLD divert pseudo-proto -pub const IPPROTO_OLD_DIVERT: ::c_int = 254; -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_OLD_DIVERT: c_int = 254; +pub const IPPROTO_MAX: c_int = 256; /// last return value of *_input(), meaning "all job for this pkt is done". -pub const IPPROTO_DONE: ::c_int = 257; +pub const IPPROTO_DONE: c_int = 257; /* Only used internally, so can be outside the range of valid IP protocols. */ /// divert pseudo-protocol -pub const IPPROTO_DIVERT: ::c_int = 258; +pub const IPPROTO_DIVERT: c_int = 258; /// SeND pseudo-protocol -pub const IPPROTO_SEND: ::c_int = 259; +pub const IPPROTO_SEND: c_int = 259; // sys/netinet/TCP.h -pub const TCP_MD5SIG: ::c_int = 16; -pub const TCP_INFO: ::c_int = 32; -pub const TCP_CONGESTION: ::c_int = 64; -pub const TCP_CCALGOOPT: ::c_int = 65; -pub const TCP_MAXUNACKTIME: ::c_int = 68; -pub const TCP_IDLE_REDUCE: ::c_int = 70; -pub const TCP_REMOTE_UDP_ENCAPS_PORT: ::c_int = 71; -pub const TCP_DELACK: ::c_int = 72; -pub const TCP_FIN_IS_RST: ::c_int = 73; -pub const TCP_LOG_LIMIT: ::c_int = 74; -pub const TCP_SHARED_CWND_ALLOWED: ::c_int = 75; -pub const TCP_PROC_ACCOUNTING: ::c_int = 76; -pub const TCP_USE_CMP_ACKS: ::c_int = 77; -pub const TCP_PERF_INFO: ::c_int = 78; -pub const TCP_LRD: ::c_int = 79; -pub const TCP_KEEPINIT: ::c_int = 128; -pub const TCP_FASTOPEN: ::c_int = 1025; -pub const TCP_PCAP_OUT: ::c_int = 2048; -pub const TCP_PCAP_IN: ::c_int = 4096; -pub const TCP_FUNCTION_BLK: ::c_int = 8192; -pub const TCP_FUNCTION_ALIAS: ::c_int = 8193; -pub const TCP_FASTOPEN_PSK_LEN: ::c_int = 16; -pub const TCP_FUNCTION_NAME_LEN_MAX: ::c_int = 32; - -pub const IP_BINDANY: ::c_int = 24; -pub const IP_BINDMULTI: ::c_int = 25; -pub const IP_RSS_LISTEN_BUCKET: ::c_int = 26; -pub const IP_ORIGDSTADDR: ::c_int = 27; -pub const IP_RECVORIGDSTADDR: ::c_int = IP_ORIGDSTADDR; - -pub const IP_DONTFRAG: ::c_int = 67; -pub const IP_RECVTOS: ::c_int = 68; - -pub const IPV6_BINDANY: ::c_int = 64; -pub const IPV6_ORIGDSTADDR: ::c_int = 72; -pub const IPV6_RECVORIGDSTADDR: ::c_int = IPV6_ORIGDSTADDR; - -pub const PF_SLOW: ::c_int = AF_SLOW; -pub const PF_SCLUSTER: ::c_int = AF_SCLUSTER; -pub const PF_ARP: ::c_int = AF_ARP; -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; -pub const PF_IEEE80211: ::c_int = AF_IEEE80211; -pub const PF_INET_SDP: ::c_int = AF_INET_SDP; -pub const PF_INET6_SDP: ::c_int = AF_INET6_SDP; - -pub const NET_RT_DUMP: ::c_int = 1; -pub const NET_RT_FLAGS: ::c_int = 2; -pub const NET_RT_IFLIST: ::c_int = 3; -pub const NET_RT_IFMALIST: ::c_int = 4; -pub const NET_RT_IFLISTL: ::c_int = 5; +pub const TCP_MD5SIG: c_int = 16; +pub const TCP_INFO: c_int = 32; +pub const TCP_CONGESTION: c_int = 64; +pub const TCP_CCALGOOPT: c_int = 65; +pub const TCP_MAXUNACKTIME: c_int = 68; +pub const TCP_IDLE_REDUCE: c_int = 70; +pub const TCP_REMOTE_UDP_ENCAPS_PORT: c_int = 71; +pub const TCP_DELACK: c_int = 72; +pub const TCP_FIN_IS_RST: c_int = 73; +pub const TCP_LOG_LIMIT: c_int = 74; +pub const TCP_SHARED_CWND_ALLOWED: c_int = 75; +pub const TCP_PROC_ACCOUNTING: c_int = 76; +pub const TCP_USE_CMP_ACKS: c_int = 77; +pub const TCP_PERF_INFO: c_int = 78; +pub const TCP_LRD: c_int = 79; +pub const TCP_KEEPINIT: c_int = 128; +pub const TCP_FASTOPEN: c_int = 1025; +pub const TCP_PCAP_OUT: c_int = 2048; +pub const TCP_PCAP_IN: c_int = 4096; +pub const TCP_FUNCTION_BLK: c_int = 8192; +pub const TCP_FUNCTION_ALIAS: c_int = 8193; +pub const TCP_FASTOPEN_PSK_LEN: c_int = 16; +pub const TCP_FUNCTION_NAME_LEN_MAX: c_int = 32; + +pub const IP_BINDANY: c_int = 24; +pub const IP_BINDMULTI: c_int = 25; +pub const IP_RSS_LISTEN_BUCKET: c_int = 26; +pub const IP_ORIGDSTADDR: c_int = 27; +pub const IP_RECVORIGDSTADDR: c_int = IP_ORIGDSTADDR; + +pub const IP_DONTFRAG: c_int = 67; +pub const IP_RECVTOS: c_int = 68; + +pub const IPV6_BINDANY: c_int = 64; +pub const IPV6_ORIGDSTADDR: c_int = 72; +pub const IPV6_RECVORIGDSTADDR: c_int = IPV6_ORIGDSTADDR; + +pub const PF_SLOW: c_int = AF_SLOW; +pub const PF_SCLUSTER: c_int = AF_SCLUSTER; +pub const PF_ARP: c_int = AF_ARP; +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; +pub const PF_IEEE80211: c_int = AF_IEEE80211; +pub const PF_INET_SDP: c_int = AF_INET_SDP; +pub const PF_INET6_SDP: c_int = AF_INET6_SDP; + +pub const NET_RT_DUMP: c_int = 1; +pub const NET_RT_FLAGS: c_int = 2; +pub const NET_RT_IFLIST: c_int = 3; +pub const NET_RT_IFMALIST: c_int = 4; +pub const NET_RT_IFLISTL: c_int = 5; // System V IPC -pub const IPC_INFO: ::c_int = 3; -pub const MSG_NOERROR: ::c_int = 0o10000; -pub const SHM_LOCK: ::c_int = 11; -pub const SHM_UNLOCK: ::c_int = 12; -pub const SHM_STAT: ::c_int = 13; -pub const SHM_INFO: ::c_int = 14; -pub const SHM_ANON: *mut ::c_char = 1 as *mut ::c_char; - -pub const MSG_NOTIFICATION: ::c_int = 0x00002000; -pub const MSG_NBIO: ::c_int = 0x00004000; -pub const MSG_COMPAT: ::c_int = 0x00008000; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x00040000; -pub const MSG_NOSIGNAL: ::c_int = 0x20000; -pub const MSG_WAITFORONE: ::c_int = 0x00080000; +pub const IPC_INFO: c_int = 3; +pub const MSG_NOERROR: c_int = 0o10000; +pub const SHM_LOCK: c_int = 11; +pub const SHM_UNLOCK: c_int = 12; +pub const SHM_STAT: c_int = 13; +pub const SHM_INFO: c_int = 14; +pub const SHM_ANON: *mut c_char = 1 as *mut c_char; + +pub const MSG_NOTIFICATION: c_int = 0x00002000; +pub const MSG_NBIO: c_int = 0x00004000; +pub const MSG_COMPAT: c_int = 0x00008000; +pub const MSG_CMSG_CLOEXEC: c_int = 0x00040000; +pub const MSG_NOSIGNAL: c_int = 0x20000; +pub const MSG_WAITFORONE: c_int = 0x00080000; // utmpx entry types -pub const EMPTY: ::c_short = 0; -pub const BOOT_TIME: ::c_short = 1; -pub const OLD_TIME: ::c_short = 2; -pub const NEW_TIME: ::c_short = 3; -pub const USER_PROCESS: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const DEAD_PROCESS: ::c_short = 7; -pub const SHUTDOWN_TIME: ::c_short = 8; +pub const EMPTY: c_short = 0; +pub const BOOT_TIME: c_short = 1; +pub const OLD_TIME: c_short = 2; +pub const NEW_TIME: c_short = 3; +pub const USER_PROCESS: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const DEAD_PROCESS: c_short = 7; +pub const SHUTDOWN_TIME: c_short = 8; // utmp database types -pub const UTXDB_ACTIVE: ::c_int = 0; -pub const UTXDB_LASTLOGIN: ::c_int = 1; -pub const UTXDB_LOG: ::c_int = 2; - -pub const LC_COLLATE_MASK: ::c_int = 1 << 0; -pub const LC_CTYPE_MASK: ::c_int = 1 << 1; -pub const LC_MONETARY_MASK: ::c_int = 1 << 2; -pub const LC_NUMERIC_MASK: ::c_int = 1 << 3; -pub const LC_TIME_MASK: ::c_int = 1 << 4; -pub const LC_MESSAGES_MASK: ::c_int = 1 << 5; -pub const LC_ALL_MASK: ::c_int = LC_COLLATE_MASK +pub const UTXDB_ACTIVE: c_int = 0; +pub const UTXDB_LASTLOGIN: c_int = 1; +pub const UTXDB_LOG: c_int = 2; + +pub const LC_COLLATE_MASK: c_int = 1 << 0; +pub const LC_CTYPE_MASK: c_int = 1 << 1; +pub const LC_MONETARY_MASK: c_int = 1 << 2; +pub const LC_NUMERIC_MASK: c_int = 1 << 3; +pub const LC_TIME_MASK: c_int = 1 << 4; +pub const LC_MESSAGES_MASK: c_int = 1 << 5; +pub const LC_ALL_MASK: c_int = LC_COLLATE_MASK | LC_CTYPE_MASK | LC_MESSAGES_MASK | LC_MONETARY_MASK | LC_NUMERIC_MASK | LC_TIME_MASK; -pub const WSTOPPED: ::c_int = 2; // same as WUNTRACED -pub const WCONTINUED: ::c_int = 4; -pub const WNOWAIT: ::c_int = 8; -pub const WEXITED: ::c_int = 16; -pub const WTRAPPED: ::c_int = 32; +pub const WSTOPPED: c_int = 2; // same as WUNTRACED +pub const WCONTINUED: c_int = 4; +pub const WNOWAIT: c_int = 8; +pub const WEXITED: c_int = 16; +pub const WTRAPPED: c_int = 32; // FreeBSD defines a great many more of these, we only expose the // standardized ones. @@ -3906,124 +3910,124 @@ pub const P_ALL: idtype_t = 7; pub const UTIME_OMIT: c_long = -2; pub const UTIME_NOW: c_long = -1; -pub const B460800: ::speed_t = 460800; -pub const B921600: ::speed_t = 921600; - -pub const AT_FDCWD: ::c_int = -100; -pub const AT_EACCESS: ::c_int = 0x100; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400; -pub const AT_REMOVEDIR: ::c_int = 0x800; -pub const AT_RESOLVE_BENEATH: ::c_int = 0x2000; -pub const AT_EMPTY_PATH: ::c_int = 0x4000; - -pub const AT_NULL: ::c_int = 0; -pub const AT_IGNORE: ::c_int = 1; -pub const AT_EXECFD: ::c_int = 2; -pub const AT_PHDR: ::c_int = 3; -pub const AT_PHENT: ::c_int = 4; -pub const AT_PHNUM: ::c_int = 5; -pub const AT_PAGESZ: ::c_int = 6; -pub const AT_BASE: ::c_int = 7; -pub const AT_FLAGS: ::c_int = 8; -pub const AT_ENTRY: ::c_int = 9; -pub const AT_NOTELF: ::c_int = 10; -pub const AT_UID: ::c_int = 11; -pub const AT_EUID: ::c_int = 12; -pub const AT_GID: ::c_int = 13; -pub const AT_EGID: ::c_int = 14; -pub const AT_EXECPATH: ::c_int = 15; -pub const AT_CANARY: ::c_int = 16; -pub const AT_OSRELDATE: ::c_int = 18; -pub const AT_NCPUS: ::c_int = 19; -pub const AT_PAGESIZES: ::c_int = 20; -pub const AT_TIMEKEEP: ::c_int = 22; -pub const AT_HWCAP: ::c_int = 25; -pub const AT_HWCAP2: ::c_int = 26; -pub const AT_USRSTACKBASE: ::c_int = 35; -pub const AT_USRSTACKLIM: ::c_int = 36; - -pub const TABDLY: ::tcflag_t = 0x00000004; -pub const TAB0: ::tcflag_t = 0x00000000; -pub const TAB3: ::tcflag_t = 0x00000004; - -pub const _PC_ACL_NFS4: ::c_int = 64; - -pub const _SC_CPUSET_SIZE: ::c_int = 122; +pub const B460800: crate::speed_t = 460800; +pub const B921600: crate::speed_t = 921600; + +pub const AT_FDCWD: c_int = -100; +pub const AT_EACCESS: c_int = 0x100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x200; +pub const AT_SYMLINK_FOLLOW: c_int = 0x400; +pub const AT_REMOVEDIR: c_int = 0x800; +pub const AT_RESOLVE_BENEATH: c_int = 0x2000; +pub const AT_EMPTY_PATH: c_int = 0x4000; + +pub const AT_NULL: c_int = 0; +pub const AT_IGNORE: c_int = 1; +pub const AT_EXECFD: c_int = 2; +pub const AT_PHDR: c_int = 3; +pub const AT_PHENT: c_int = 4; +pub const AT_PHNUM: c_int = 5; +pub const AT_PAGESZ: c_int = 6; +pub const AT_BASE: c_int = 7; +pub const AT_FLAGS: c_int = 8; +pub const AT_ENTRY: c_int = 9; +pub const AT_NOTELF: c_int = 10; +pub const AT_UID: c_int = 11; +pub const AT_EUID: c_int = 12; +pub const AT_GID: c_int = 13; +pub const AT_EGID: c_int = 14; +pub const AT_EXECPATH: c_int = 15; +pub const AT_CANARY: c_int = 16; +pub const AT_OSRELDATE: c_int = 18; +pub const AT_NCPUS: c_int = 19; +pub const AT_PAGESIZES: c_int = 20; +pub const AT_TIMEKEEP: c_int = 22; +pub const AT_HWCAP: c_int = 25; +pub const AT_HWCAP2: c_int = 26; +pub const AT_USRSTACKBASE: c_int = 35; +pub const AT_USRSTACKLIM: c_int = 36; + +pub const TABDLY: crate::tcflag_t = 0x00000004; +pub const TAB0: crate::tcflag_t = 0x00000000; +pub const TAB3: crate::tcflag_t = 0x00000004; + +pub const _PC_ACL_NFS4: c_int = 64; + +pub const _SC_CPUSET_SIZE: c_int = 122; pub const _UUID_NODE_LEN: usize = 6; // Flags which can be passed to pdfork(2) -pub const PD_DAEMON: ::c_int = 0x00000001; -pub const PD_CLOEXEC: ::c_int = 0x00000002; -pub const PD_ALLOWED_AT_FORK: ::c_int = PD_DAEMON | PD_CLOEXEC; +pub const PD_DAEMON: c_int = 0x00000001; +pub const PD_CLOEXEC: c_int = 0x00000002; +pub const PD_ALLOWED_AT_FORK: c_int = PD_DAEMON | PD_CLOEXEC; // Values for struct rtprio (type_ field) -pub const RTP_PRIO_REALTIME: ::c_ushort = 2; -pub const RTP_PRIO_NORMAL: ::c_ushort = 3; -pub const RTP_PRIO_IDLE: ::c_ushort = 4; +pub const RTP_PRIO_REALTIME: c_ushort = 2; +pub const RTP_PRIO_NORMAL: c_ushort = 3; +pub const RTP_PRIO_IDLE: c_ushort = 4; -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x01; -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x02; -pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_short = 0x04; -pub const POSIX_SPAWN_SETSCHEDULER: ::c_short = 0x08; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x10; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x20; +pub const POSIX_SPAWN_RESETIDS: c_short = 0x01; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x02; +pub const POSIX_SPAWN_SETSCHEDPARAM: c_short = 0x04; +pub const POSIX_SPAWN_SETSCHEDULER: c_short = 0x08; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x10; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x20; // Flags for chflags(2) -pub const UF_SYSTEM: ::c_ulong = 0x00000080; -pub const UF_SPARSE: ::c_ulong = 0x00000100; -pub const UF_OFFLINE: ::c_ulong = 0x00000200; -pub const UF_REPARSE: ::c_ulong = 0x00000400; -pub const UF_ARCHIVE: ::c_ulong = 0x00000800; -pub const UF_READONLY: ::c_ulong = 0x00001000; -pub const UF_HIDDEN: ::c_ulong = 0x00008000; -pub const SF_SNAPSHOT: ::c_ulong = 0x00200000; +pub const UF_SYSTEM: c_ulong = 0x00000080; +pub const UF_SPARSE: c_ulong = 0x00000100; +pub const UF_OFFLINE: c_ulong = 0x00000200; +pub const UF_REPARSE: c_ulong = 0x00000400; +pub const UF_ARCHIVE: c_ulong = 0x00000800; +pub const UF_READONLY: c_ulong = 0x00001000; +pub const UF_HIDDEN: c_ulong = 0x00008000; +pub const SF_SNAPSHOT: c_ulong = 0x00200000; // fcntl commands -pub const F_ADD_SEALS: ::c_int = 19; -pub const F_GET_SEALS: ::c_int = 20; -pub const F_OGETLK: ::c_int = 7; -pub const F_OSETLK: ::c_int = 8; -pub const F_OSETLKW: ::c_int = 9; -pub const F_RDAHEAD: ::c_int = 16; -pub const F_READAHEAD: ::c_int = 15; -pub const F_SETLK_REMOTE: ::c_int = 14; -pub const F_KINFO: ::c_int = 22; +pub const F_ADD_SEALS: c_int = 19; +pub const F_GET_SEALS: c_int = 20; +pub const F_OGETLK: c_int = 7; +pub const F_OSETLK: c_int = 8; +pub const F_OSETLKW: c_int = 9; +pub const F_RDAHEAD: c_int = 16; +pub const F_READAHEAD: c_int = 15; +pub const F_SETLK_REMOTE: c_int = 14; +pub const F_KINFO: c_int = 22; // for use with F_ADD_SEALS -pub const F_SEAL_GROW: ::c_int = 4; -pub const F_SEAL_SEAL: ::c_int = 1; -pub const F_SEAL_SHRINK: ::c_int = 2; -pub const F_SEAL_WRITE: ::c_int = 8; +pub const F_SEAL_GROW: c_int = 4; +pub const F_SEAL_SEAL: c_int = 1; +pub const F_SEAL_SHRINK: c_int = 2; +pub const F_SEAL_WRITE: c_int = 8; // for use with fspacectl -pub const SPACECTL_DEALLOC: ::c_int = 1; +pub const SPACECTL_DEALLOC: c_int = 1; // For realhostname* api -pub const HOSTNAME_FOUND: ::c_int = 0; -pub const HOSTNAME_INCORRECTNAME: ::c_int = 1; -pub const HOSTNAME_INVALIDADDR: ::c_int = 2; -pub const HOSTNAME_INVALIDNAME: ::c_int = 3; +pub const HOSTNAME_FOUND: c_int = 0; +pub const HOSTNAME_INCORRECTNAME: c_int = 1; +pub const HOSTNAME_INVALIDADDR: c_int = 2; +pub const HOSTNAME_INVALIDNAME: c_int = 3; // For rfork -pub const RFFDG: ::c_int = 4; -pub const RFPROC: ::c_int = 16; -pub const RFMEM: ::c_int = 32; -pub const RFNOWAIT: ::c_int = 64; -pub const RFCFDG: ::c_int = 4096; -pub const RFTHREAD: ::c_int = 8192; -pub const RFSIGSHARE: ::c_int = 16384; -pub const RFLINUXTHPN: ::c_int = 65536; -pub const RFTSIGZMB: ::c_int = 524288; -pub const RFSPAWN: ::c_int = 2147483648; +pub const RFFDG: c_int = 4; +pub const RFPROC: c_int = 16; +pub const RFMEM: c_int = 32; +pub const RFNOWAIT: c_int = 64; +pub const RFCFDG: c_int = 4096; +pub const RFTHREAD: c_int = 8192; +pub const RFSIGSHARE: c_int = 16384; +pub const RFLINUXTHPN: c_int = 65536; +pub const RFTSIGZMB: c_int = 524288; +pub const RFSPAWN: c_int = 2147483648; // For eventfd -pub const EFD_SEMAPHORE: ::c_int = 0x1; -pub const EFD_NONBLOCK: ::c_int = 0x4; -pub const EFD_CLOEXEC: ::c_int = 0x100000; +pub const EFD_SEMAPHORE: c_int = 0x1; +pub const EFD_NONBLOCK: c_int = 0x4; +pub const EFD_CLOEXEC: c_int = 0x100000; -pub const MALLOCX_ZERO: ::c_int = 0x40; +pub const MALLOCX_ZERO: c_int = 0x40; /// size of returned wchan message pub const WMESGLEN: usize = 8; @@ -4061,448 +4065,448 @@ pub const LOGNAMELEN: usize = 17; /// size of returned ki_loginclass pub const LOGINCLASSLEN: usize = 17; -pub const KF_ATTR_VALID: ::c_int = 0x0001; -pub const KF_TYPE_NONE: ::c_int = 0; -pub const KF_TYPE_VNODE: ::c_int = 1; -pub const KF_TYPE_SOCKET: ::c_int = 2; -pub const KF_TYPE_PIPE: ::c_int = 3; -pub const KF_TYPE_FIFO: ::c_int = 4; -pub const KF_TYPE_KQUEUE: ::c_int = 5; -pub const KF_TYPE_MQUEUE: ::c_int = 7; -pub const KF_TYPE_SHM: ::c_int = 8; -pub const KF_TYPE_SEM: ::c_int = 9; -pub const KF_TYPE_PTS: ::c_int = 10; -pub const KF_TYPE_PROCDESC: ::c_int = 11; -pub const KF_TYPE_DEV: ::c_int = 12; -pub const KF_TYPE_UNKNOWN: ::c_int = 255; - -pub const KF_VTYPE_VNON: ::c_int = 0; -pub const KF_VTYPE_VREG: ::c_int = 1; -pub const KF_VTYPE_VDIR: ::c_int = 2; -pub const KF_VTYPE_VBLK: ::c_int = 3; -pub const KF_VTYPE_VCHR: ::c_int = 4; -pub const KF_VTYPE_VLNK: ::c_int = 5; -pub const KF_VTYPE_VSOCK: ::c_int = 6; -pub const KF_VTYPE_VFIFO: ::c_int = 7; -pub const KF_VTYPE_VBAD: ::c_int = 8; -pub const KF_VTYPE_UNKNOWN: ::c_int = 255; +pub const KF_ATTR_VALID: c_int = 0x0001; +pub const KF_TYPE_NONE: c_int = 0; +pub const KF_TYPE_VNODE: c_int = 1; +pub const KF_TYPE_SOCKET: c_int = 2; +pub const KF_TYPE_PIPE: c_int = 3; +pub const KF_TYPE_FIFO: c_int = 4; +pub const KF_TYPE_KQUEUE: c_int = 5; +pub const KF_TYPE_MQUEUE: c_int = 7; +pub const KF_TYPE_SHM: c_int = 8; +pub const KF_TYPE_SEM: c_int = 9; +pub const KF_TYPE_PTS: c_int = 10; +pub const KF_TYPE_PROCDESC: c_int = 11; +pub const KF_TYPE_DEV: c_int = 12; +pub const KF_TYPE_UNKNOWN: c_int = 255; + +pub const KF_VTYPE_VNON: c_int = 0; +pub const KF_VTYPE_VREG: c_int = 1; +pub const KF_VTYPE_VDIR: c_int = 2; +pub const KF_VTYPE_VBLK: c_int = 3; +pub const KF_VTYPE_VCHR: c_int = 4; +pub const KF_VTYPE_VLNK: c_int = 5; +pub const KF_VTYPE_VSOCK: c_int = 6; +pub const KF_VTYPE_VFIFO: c_int = 7; +pub const KF_VTYPE_VBAD: c_int = 8; +pub const KF_VTYPE_UNKNOWN: c_int = 255; /// Current working directory -pub const KF_FD_TYPE_CWD: ::c_int = -1; +pub const KF_FD_TYPE_CWD: c_int = -1; /// Root directory -pub const KF_FD_TYPE_ROOT: ::c_int = -2; +pub const KF_FD_TYPE_ROOT: c_int = -2; /// Jail directory -pub const KF_FD_TYPE_JAIL: ::c_int = -3; +pub const KF_FD_TYPE_JAIL: c_int = -3; /// Ktrace vnode -pub const KF_FD_TYPE_TRACE: ::c_int = -4; -pub const KF_FD_TYPE_TEXT: ::c_int = -5; +pub const KF_FD_TYPE_TRACE: c_int = -4; +pub const KF_FD_TYPE_TEXT: c_int = -5; /// Controlling terminal -pub const KF_FD_TYPE_CTTY: ::c_int = -6; -pub const KF_FLAG_READ: ::c_int = 0x00000001; -pub const KF_FLAG_WRITE: ::c_int = 0x00000002; -pub const KF_FLAG_APPEND: ::c_int = 0x00000004; -pub const KF_FLAG_ASYNC: ::c_int = 0x00000008; -pub const KF_FLAG_FSYNC: ::c_int = 0x00000010; -pub const KF_FLAG_NONBLOCK: ::c_int = 0x00000020; -pub const KF_FLAG_DIRECT: ::c_int = 0x00000040; -pub const KF_FLAG_HASLOCK: ::c_int = 0x00000080; -pub const KF_FLAG_SHLOCK: ::c_int = 0x00000100; -pub const KF_FLAG_EXLOCK: ::c_int = 0x00000200; -pub const KF_FLAG_NOFOLLOW: ::c_int = 0x00000400; -pub const KF_FLAG_CREAT: ::c_int = 0x00000800; -pub const KF_FLAG_TRUNC: ::c_int = 0x00001000; -pub const KF_FLAG_EXCL: ::c_int = 0x00002000; -pub const KF_FLAG_EXEC: ::c_int = 0x00004000; - -pub const KVME_TYPE_NONE: ::c_int = 0; -pub const KVME_TYPE_DEFAULT: ::c_int = 1; -pub const KVME_TYPE_VNODE: ::c_int = 2; -pub const KVME_TYPE_SWAP: ::c_int = 3; -pub const KVME_TYPE_DEVICE: ::c_int = 4; -pub const KVME_TYPE_PHYS: ::c_int = 5; -pub const KVME_TYPE_DEAD: ::c_int = 6; -pub const KVME_TYPE_SG: ::c_int = 7; -pub const KVME_TYPE_MGTDEVICE: ::c_int = 8; +pub const KF_FD_TYPE_CTTY: c_int = -6; +pub const KF_FLAG_READ: c_int = 0x00000001; +pub const KF_FLAG_WRITE: c_int = 0x00000002; +pub const KF_FLAG_APPEND: c_int = 0x00000004; +pub const KF_FLAG_ASYNC: c_int = 0x00000008; +pub const KF_FLAG_FSYNC: c_int = 0x00000010; +pub const KF_FLAG_NONBLOCK: c_int = 0x00000020; +pub const KF_FLAG_DIRECT: c_int = 0x00000040; +pub const KF_FLAG_HASLOCK: c_int = 0x00000080; +pub const KF_FLAG_SHLOCK: c_int = 0x00000100; +pub const KF_FLAG_EXLOCK: c_int = 0x00000200; +pub const KF_FLAG_NOFOLLOW: c_int = 0x00000400; +pub const KF_FLAG_CREAT: c_int = 0x00000800; +pub const KF_FLAG_TRUNC: c_int = 0x00001000; +pub const KF_FLAG_EXCL: c_int = 0x00002000; +pub const KF_FLAG_EXEC: c_int = 0x00004000; + +pub const KVME_TYPE_NONE: c_int = 0; +pub const KVME_TYPE_DEFAULT: c_int = 1; +pub const KVME_TYPE_VNODE: c_int = 2; +pub const KVME_TYPE_SWAP: c_int = 3; +pub const KVME_TYPE_DEVICE: c_int = 4; +pub const KVME_TYPE_PHYS: c_int = 5; +pub const KVME_TYPE_DEAD: c_int = 6; +pub const KVME_TYPE_SG: c_int = 7; +pub const KVME_TYPE_MGTDEVICE: c_int = 8; // Present in `sys/user.h` but is undefined for whatever reason... -// pub const KVME_TYPE_GUARD: ::c_int = 9; -pub const KVME_TYPE_UNKNOWN: ::c_int = 255; -pub const KVME_PROT_READ: ::c_int = 0x00000001; -pub const KVME_PROT_WRITE: ::c_int = 0x00000002; -pub const KVME_PROT_EXEC: ::c_int = 0x00000004; -pub const KVME_FLAG_COW: ::c_int = 0x00000001; -pub const KVME_FLAG_NEEDS_COPY: ::c_int = 0x00000002; -pub const KVME_FLAG_NOCOREDUMP: ::c_int = 0x00000004; -pub const KVME_FLAG_SUPER: ::c_int = 0x00000008; -pub const KVME_FLAG_GROWS_UP: ::c_int = 0x00000010; -pub const KVME_FLAG_GROWS_DOWN: ::c_int = 0x00000020; -pub const KVME_FLAG_USER_WIRED: ::c_int = 0x00000040; - -pub const KKST_MAXLEN: ::c_int = 1024; +// pub const KVME_TYPE_GUARD: c_int = 9; +pub const KVME_TYPE_UNKNOWN: c_int = 255; +pub const KVME_PROT_READ: c_int = 0x00000001; +pub const KVME_PROT_WRITE: c_int = 0x00000002; +pub const KVME_PROT_EXEC: c_int = 0x00000004; +pub const KVME_FLAG_COW: c_int = 0x00000001; +pub const KVME_FLAG_NEEDS_COPY: c_int = 0x00000002; +pub const KVME_FLAG_NOCOREDUMP: c_int = 0x00000004; +pub const KVME_FLAG_SUPER: c_int = 0x00000008; +pub const KVME_FLAG_GROWS_UP: c_int = 0x00000010; +pub const KVME_FLAG_GROWS_DOWN: c_int = 0x00000020; +pub const KVME_FLAG_USER_WIRED: c_int = 0x00000040; + +pub const KKST_MAXLEN: c_int = 1024; /// Stack is valid. -pub const KKST_STATE_STACKOK: ::c_int = 0; +pub const KKST_STATE_STACKOK: c_int = 0; /// Stack swapped out. -pub const KKST_STATE_SWAPPED: ::c_int = 1; -pub const KKST_STATE_RUNNING: ::c_int = 2; +pub const KKST_STATE_SWAPPED: c_int = 1; +pub const KKST_STATE_RUNNING: c_int = 2; // Constants about priority. -pub const PRI_MIN: ::c_int = 0; -pub const PRI_MAX: ::c_int = 255; -pub const PRI_MIN_ITHD: ::c_int = PRI_MIN; +pub const PRI_MIN: c_int = 0; +pub const PRI_MAX: c_int = 255; +pub const PRI_MIN_ITHD: c_int = PRI_MIN; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PRI_MAX_ITHD: ::c_int = PRI_MIN_REALTIME - 1; -pub const PI_REALTIME: ::c_int = PRI_MIN_ITHD + 0; +pub const PRI_MAX_ITHD: c_int = PRI_MIN_REALTIME - 1; +pub const PI_REALTIME: c_int = PRI_MIN_ITHD + 0; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PI_AV: ::c_int = PRI_MIN_ITHD + 4; +pub const PI_AV: c_int = PRI_MIN_ITHD + 4; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PI_NET: ::c_int = PRI_MIN_ITHD + 8; +pub const PI_NET: c_int = PRI_MIN_ITHD + 8; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PI_DISK: ::c_int = PRI_MIN_ITHD + 12; +pub const PI_DISK: c_int = PRI_MIN_ITHD + 12; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PI_TTY: ::c_int = PRI_MIN_ITHD + 16; +pub const PI_TTY: c_int = PRI_MIN_ITHD + 16; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PI_DULL: ::c_int = PRI_MIN_ITHD + 20; +pub const PI_DULL: c_int = PRI_MIN_ITHD + 20; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PI_SOFT: ::c_int = PRI_MIN_ITHD + 24; +pub const PI_SOFT: c_int = PRI_MIN_ITHD + 24; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PRI_MIN_REALTIME: ::c_int = 48; +pub const PRI_MIN_REALTIME: c_int = 48; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PRI_MAX_REALTIME: ::c_int = PRI_MIN_KERN - 1; +pub const PRI_MAX_REALTIME: c_int = PRI_MIN_KERN - 1; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PRI_MIN_KERN: ::c_int = 80; +pub const PRI_MIN_KERN: c_int = 80; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PRI_MAX_KERN: ::c_int = PRI_MIN_TIMESHARE - 1; +pub const PRI_MAX_KERN: c_int = PRI_MIN_TIMESHARE - 1; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PSWP: ::c_int = PRI_MIN_KERN + 0; +pub const PSWP: c_int = PRI_MIN_KERN + 0; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PVM: ::c_int = PRI_MIN_KERN + 4; +pub const PVM: c_int = PRI_MIN_KERN + 4; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PINOD: ::c_int = PRI_MIN_KERN + 8; +pub const PINOD: c_int = PRI_MIN_KERN + 8; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PRIBIO: ::c_int = PRI_MIN_KERN + 12; +pub const PRIBIO: c_int = PRI_MIN_KERN + 12; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PVFS: ::c_int = PRI_MIN_KERN + 16; +pub const PVFS: c_int = PRI_MIN_KERN + 16; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PZERO: ::c_int = PRI_MIN_KERN + 20; +pub const PZERO: c_int = PRI_MIN_KERN + 20; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PSOCK: ::c_int = PRI_MIN_KERN + 24; +pub const PSOCK: c_int = PRI_MIN_KERN + 24; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PWAIT: ::c_int = PRI_MIN_KERN + 28; +pub const PWAIT: c_int = PRI_MIN_KERN + 28; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PLOCK: ::c_int = PRI_MIN_KERN + 32; +pub const PLOCK: c_int = PRI_MIN_KERN + 32; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PPAUSE: ::c_int = PRI_MIN_KERN + 36; +pub const PPAUSE: c_int = PRI_MIN_KERN + 36; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const PRI_MIN_TIMESHARE: ::c_int = 120; -pub const PRI_MAX_TIMESHARE: ::c_int = PRI_MIN_IDLE - 1; +pub const PRI_MIN_TIMESHARE: c_int = 120; +pub const PRI_MAX_TIMESHARE: c_int = PRI_MIN_IDLE - 1; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] #[allow(deprecated)] -pub const PUSER: ::c_int = PRI_MIN_TIMESHARE; -pub const PRI_MIN_IDLE: ::c_int = 224; -pub const PRI_MAX_IDLE: ::c_int = PRI_MAX; +pub const PUSER: c_int = PRI_MIN_TIMESHARE; +pub const PRI_MIN_IDLE: c_int = 224; +pub const PRI_MAX_IDLE: c_int = PRI_MAX; -pub const NZERO: ::c_int = 0; +pub const NZERO: c_int = 0; // Resource utilization information. -pub const RUSAGE_THREAD: ::c_int = 1; +pub const RUSAGE_THREAD: c_int = 1; cfg_if! { if #[cfg(any(freebsd11, target_pointer_width = "32"))] { - pub const ARG_MAX: ::c_int = 256 * 1024; + pub const ARG_MAX: c_int = 256 * 1024; } else { - pub const ARG_MAX: ::c_int = 2 * 256 * 1024; + pub const ARG_MAX: c_int = 2 * 256 * 1024; } } -pub const CHILD_MAX: ::c_int = 40; +pub const CHILD_MAX: c_int = 40; /// max command name remembered pub const MAXCOMLEN: usize = 19; /// max interpreter file name length -pub const MAXINTERP: ::c_int = ::PATH_MAX; +pub const MAXINTERP: c_int = crate::PATH_MAX; /// max login name length (incl. NUL) -pub const MAXLOGNAME: ::c_int = 33; +pub const MAXLOGNAME: c_int = 33; /// max simultaneous processes -pub const MAXUPRC: ::c_int = CHILD_MAX; +pub const MAXUPRC: c_int = CHILD_MAX; /// max bytes for an exec function -pub const NCARGS: ::c_int = ARG_MAX; +pub const NCARGS: c_int = ARG_MAX; /// /* max number groups -pub const NGROUPS: ::c_int = NGROUPS_MAX + 1; +pub const NGROUPS: c_int = NGROUPS_MAX + 1; /// max open files per process -pub const NOFILE: ::c_int = OPEN_MAX; +pub const NOFILE: c_int = OPEN_MAX; /// marker for empty group set member -pub const NOGROUP: ::c_int = 65535; +pub const NOGROUP: c_int = 65535; /// max hostname size -pub const MAXHOSTNAMELEN: ::c_int = 256; +pub const MAXHOSTNAMELEN: c_int = 256; /// max bytes in term canon input line -pub const MAX_CANON: ::c_int = 255; +pub const MAX_CANON: c_int = 255; /// max bytes in terminal input -pub const MAX_INPUT: ::c_int = 255; +pub const MAX_INPUT: c_int = 255; /// max bytes in a file name -pub const NAME_MAX: ::c_int = 255; -pub const MAXSYMLINKS: ::c_int = 32; +pub const NAME_MAX: c_int = 255; +pub const MAXSYMLINKS: c_int = 32; /// max supplemental group id's -pub const NGROUPS_MAX: ::c_int = 1023; +pub const NGROUPS_MAX: c_int = 1023; /// max open files per process -pub const OPEN_MAX: ::c_int = 64; +pub const OPEN_MAX: c_int = 64; -pub const _POSIX_ARG_MAX: ::c_int = 4096; -pub const _POSIX_LINK_MAX: ::c_int = 8; -pub const _POSIX_MAX_CANON: ::c_int = 255; -pub const _POSIX_MAX_INPUT: ::c_int = 255; -pub const _POSIX_NAME_MAX: ::c_int = 14; -pub const _POSIX_PIPE_BUF: ::c_int = 512; -pub const _POSIX_SSIZE_MAX: ::c_int = 32767; -pub const _POSIX_STREAM_MAX: ::c_int = 8; +pub const _POSIX_ARG_MAX: c_int = 4096; +pub const _POSIX_LINK_MAX: c_int = 8; +pub const _POSIX_MAX_CANON: c_int = 255; +pub const _POSIX_MAX_INPUT: c_int = 255; +pub const _POSIX_NAME_MAX: c_int = 14; +pub const _POSIX_PIPE_BUF: c_int = 512; +pub const _POSIX_SSIZE_MAX: c_int = 32767; +pub const _POSIX_STREAM_MAX: c_int = 8; /// max ibase/obase values in bc(1) -pub const BC_BASE_MAX: ::c_int = 99; +pub const BC_BASE_MAX: c_int = 99; /// max array elements in bc(1) -pub const BC_DIM_MAX: ::c_int = 2048; +pub const BC_DIM_MAX: c_int = 2048; /// max scale value in bc(1) -pub const BC_SCALE_MAX: ::c_int = 99; +pub const BC_SCALE_MAX: c_int = 99; /// max const string length in bc(1) -pub const BC_STRING_MAX: ::c_int = 1000; +pub const BC_STRING_MAX: c_int = 1000; /// max character class name size -pub const CHARCLASS_NAME_MAX: ::c_int = 14; +pub const CHARCLASS_NAME_MAX: c_int = 14; /// max weights for order keyword -pub const COLL_WEIGHTS_MAX: ::c_int = 10; +pub const COLL_WEIGHTS_MAX: c_int = 10; /// max expressions nested in expr(1) -pub const EXPR_NEST_MAX: ::c_int = 32; +pub const EXPR_NEST_MAX: c_int = 32; /// max bytes in an input line -pub const LINE_MAX: ::c_int = 2048; +pub const LINE_MAX: c_int = 2048; /// max RE's in interval notation -pub const RE_DUP_MAX: ::c_int = 255; - -pub const _POSIX2_BC_BASE_MAX: ::c_int = 99; -pub const _POSIX2_BC_DIM_MAX: ::c_int = 2048; -pub const _POSIX2_BC_SCALE_MAX: ::c_int = 99; -pub const _POSIX2_BC_STRING_MAX: ::c_int = 1000; -pub const _POSIX2_CHARCLASS_NAME_MAX: ::c_int = 14; -pub const _POSIX2_COLL_WEIGHTS_MAX: ::c_int = 2; -pub const _POSIX2_EQUIV_CLASS_MAX: ::c_int = 2; -pub const _POSIX2_EXPR_NEST_MAX: ::c_int = 32; -pub const _POSIX2_LINE_MAX: ::c_int = 2048; -pub const _POSIX2_RE_DUP_MAX: ::c_int = 255; +pub const RE_DUP_MAX: c_int = 255; + +pub const _POSIX2_BC_BASE_MAX: c_int = 99; +pub const _POSIX2_BC_DIM_MAX: c_int = 2048; +pub const _POSIX2_BC_SCALE_MAX: c_int = 99; +pub const _POSIX2_BC_STRING_MAX: c_int = 1000; +pub const _POSIX2_CHARCLASS_NAME_MAX: c_int = 14; +pub const _POSIX2_COLL_WEIGHTS_MAX: c_int = 2; +pub const _POSIX2_EQUIV_CLASS_MAX: c_int = 2; +pub const _POSIX2_EXPR_NEST_MAX: c_int = 32; +pub const _POSIX2_LINE_MAX: c_int = 2048; +pub const _POSIX2_RE_DUP_MAX: c_int = 255; // sys/proc.h -pub const TDF_BORROWING: ::c_int = 0x00000001; -pub const TDF_INPANIC: ::c_int = 0x00000002; -pub const TDF_INMEM: ::c_int = 0x00000004; -pub const TDF_SINTR: ::c_int = 0x00000008; -pub const TDF_TIMEOUT: ::c_int = 0x00000010; -pub const TDF_IDLETD: ::c_int = 0x00000020; -pub const TDF_CANSWAP: ::c_int = 0x00000040; -pub const TDF_KTH_SUSP: ::c_int = 0x00000100; -pub const TDF_ALLPROCSUSP: ::c_int = 0x00000200; -pub const TDF_BOUNDARY: ::c_int = 0x00000400; +pub const TDF_BORROWING: c_int = 0x00000001; +pub const TDF_INPANIC: c_int = 0x00000002; +pub const TDF_INMEM: c_int = 0x00000004; +pub const TDF_SINTR: c_int = 0x00000008; +pub const TDF_TIMEOUT: c_int = 0x00000010; +pub const TDF_IDLETD: c_int = 0x00000020; +pub const TDF_CANSWAP: c_int = 0x00000040; +pub const TDF_KTH_SUSP: c_int = 0x00000100; +pub const TDF_ALLPROCSUSP: c_int = 0x00000200; +pub const TDF_BOUNDARY: c_int = 0x00000400; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_ASTPENDING: ::c_int = 0x00000800; -pub const TDF_SBDRY: ::c_int = 0x00002000; -pub const TDF_UPIBLOCKED: ::c_int = 0x00004000; +pub const TDF_ASTPENDING: c_int = 0x00000800; +pub const TDF_SBDRY: c_int = 0x00002000; +pub const TDF_UPIBLOCKED: c_int = 0x00004000; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_NEEDSUSPCHK: ::c_int = 0x00008000; +pub const TDF_NEEDSUSPCHK: c_int = 0x00008000; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_NEEDRESCHED: ::c_int = 0x00010000; +pub const TDF_NEEDRESCHED: c_int = 0x00010000; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_NEEDSIGCHK: ::c_int = 0x00020000; -pub const TDF_NOLOAD: ::c_int = 0x00040000; -pub const TDF_SERESTART: ::c_int = 0x00080000; -pub const TDF_THRWAKEUP: ::c_int = 0x00100000; -pub const TDF_SEINTR: ::c_int = 0x00200000; -pub const TDF_SWAPINREQ: ::c_int = 0x00400000; +pub const TDF_NEEDSIGCHK: c_int = 0x00020000; +pub const TDF_NOLOAD: c_int = 0x00040000; +pub const TDF_SERESTART: c_int = 0x00080000; +pub const TDF_THRWAKEUP: c_int = 0x00100000; +pub const TDF_SEINTR: c_int = 0x00200000; +pub const TDF_SWAPINREQ: c_int = 0x00400000; #[deprecated(since = "0.2.133", note = "Removed in FreeBSD 14")] -pub const TDF_UNUSED23: ::c_int = 0x00800000; -pub const TDF_SCHED0: ::c_int = 0x01000000; -pub const TDF_SCHED1: ::c_int = 0x02000000; -pub const TDF_SCHED2: ::c_int = 0x04000000; -pub const TDF_SCHED3: ::c_int = 0x08000000; +pub const TDF_UNUSED23: c_int = 0x00800000; +pub const TDF_SCHED0: c_int = 0x01000000; +pub const TDF_SCHED1: c_int = 0x02000000; +pub const TDF_SCHED2: c_int = 0x04000000; +pub const TDF_SCHED3: c_int = 0x08000000; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_ALRMPEND: ::c_int = 0x10000000; +pub const TDF_ALRMPEND: c_int = 0x10000000; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_PROFPEND: ::c_int = 0x20000000; +pub const TDF_PROFPEND: c_int = 0x20000000; #[deprecated(since = "0.2.133", note = "Not stable across OS versions")] -pub const TDF_MACPEND: ::c_int = 0x40000000; - -pub const TDB_SUSPEND: ::c_int = 0x00000001; -pub const TDB_XSIG: ::c_int = 0x00000002; -pub const TDB_USERWR: ::c_int = 0x00000004; -pub const TDB_SCE: ::c_int = 0x00000008; -pub const TDB_SCX: ::c_int = 0x00000010; -pub const TDB_EXEC: ::c_int = 0x00000020; -pub const TDB_FORK: ::c_int = 0x00000040; -pub const TDB_STOPATFORK: ::c_int = 0x00000080; -pub const TDB_CHILD: ::c_int = 0x00000100; -pub const TDB_BORN: ::c_int = 0x00000200; -pub const TDB_EXIT: ::c_int = 0x00000400; -pub const TDB_VFORK: ::c_int = 0x00000800; -pub const TDB_FSTP: ::c_int = 0x00001000; -pub const TDB_STEP: ::c_int = 0x00002000; - -pub const TDP_OLDMASK: ::c_int = 0x00000001; -pub const TDP_INKTR: ::c_int = 0x00000002; -pub const TDP_INKTRACE: ::c_int = 0x00000004; -pub const TDP_BUFNEED: ::c_int = 0x00000008; -pub const TDP_COWINPROGRESS: ::c_int = 0x00000010; -pub const TDP_ALTSTACK: ::c_int = 0x00000020; -pub const TDP_DEADLKTREAT: ::c_int = 0x00000040; -pub const TDP_NOFAULTING: ::c_int = 0x00000080; -pub const TDP_OWEUPC: ::c_int = 0x00000200; -pub const TDP_ITHREAD: ::c_int = 0x00000400; -pub const TDP_SYNCIO: ::c_int = 0x00000800; -pub const TDP_SCHED1: ::c_int = 0x00001000; -pub const TDP_SCHED2: ::c_int = 0x00002000; -pub const TDP_SCHED3: ::c_int = 0x00004000; -pub const TDP_SCHED4: ::c_int = 0x00008000; -pub const TDP_GEOM: ::c_int = 0x00010000; -pub const TDP_SOFTDEP: ::c_int = 0x00020000; -pub const TDP_NORUNNINGBUF: ::c_int = 0x00040000; -pub const TDP_WAKEUP: ::c_int = 0x00080000; -pub const TDP_INBDFLUSH: ::c_int = 0x00100000; -pub const TDP_KTHREAD: ::c_int = 0x00200000; -pub const TDP_CALLCHAIN: ::c_int = 0x00400000; -pub const TDP_IGNSUSP: ::c_int = 0x00800000; -pub const TDP_AUDITREC: ::c_int = 0x01000000; -pub const TDP_RFPPWAIT: ::c_int = 0x02000000; -pub const TDP_RESETSPUR: ::c_int = 0x04000000; -pub const TDP_NERRNO: ::c_int = 0x08000000; -pub const TDP_EXECVMSPC: ::c_int = 0x40000000; - -pub const TDI_SUSPENDED: ::c_int = 0x0001; -pub const TDI_SLEEPING: ::c_int = 0x0002; -pub const TDI_SWAPPED: ::c_int = 0x0004; -pub const TDI_LOCK: ::c_int = 0x0008; -pub const TDI_IWAIT: ::c_int = 0x0010; - -pub const P_ADVLOCK: ::c_int = 0x00000001; -pub const P_CONTROLT: ::c_int = 0x00000002; -pub const P_KPROC: ::c_int = 0x00000004; -pub const P_UNUSED3: ::c_int = 0x00000008; -pub const P_PPWAIT: ::c_int = 0x00000010; -pub const P_PROFIL: ::c_int = 0x00000020; -pub const P_STOPPROF: ::c_int = 0x00000040; -pub const P_HADTHREADS: ::c_int = 0x00000080; -pub const P_SUGID: ::c_int = 0x00000100; -pub const P_SYSTEM: ::c_int = 0x00000200; -pub const P_SINGLE_EXIT: ::c_int = 0x00000400; -pub const P_TRACED: ::c_int = 0x00000800; -pub const P_WAITED: ::c_int = 0x00001000; -pub const P_WEXIT: ::c_int = 0x00002000; -pub const P_EXEC: ::c_int = 0x00004000; -pub const P_WKILLED: ::c_int = 0x00008000; -pub const P_CONTINUED: ::c_int = 0x00010000; -pub const P_STOPPED_SIG: ::c_int = 0x00020000; -pub const P_STOPPED_TRACE: ::c_int = 0x00040000; -pub const P_STOPPED_SINGLE: ::c_int = 0x00080000; -pub const P_PROTECTED: ::c_int = 0x00100000; -pub const P_SIGEVENT: ::c_int = 0x00200000; -pub const P_SINGLE_BOUNDARY: ::c_int = 0x00400000; -pub const P_HWPMC: ::c_int = 0x00800000; -pub const P_JAILED: ::c_int = 0x01000000; -pub const P_TOTAL_STOP: ::c_int = 0x02000000; -pub const P_INEXEC: ::c_int = 0x04000000; -pub const P_STATCHILD: ::c_int = 0x08000000; -pub const P_INMEM: ::c_int = 0x10000000; -pub const P_SWAPPINGOUT: ::c_int = 0x20000000; -pub const P_SWAPPINGIN: ::c_int = 0x40000000; -pub const P_PPTRACE: ::c_int = 0x80000000; -pub const P_STOPPED: ::c_int = P_STOPPED_SIG | P_STOPPED_SINGLE | P_STOPPED_TRACE; - -pub const P2_INHERIT_PROTECTED: ::c_int = 0x00000001; -pub const P2_NOTRACE: ::c_int = 0x00000002; -pub const P2_NOTRACE_EXEC: ::c_int = 0x00000004; -pub const P2_AST_SU: ::c_int = 0x00000008; -pub const P2_PTRACE_FSTP: ::c_int = 0x00000010; -pub const P2_TRAPCAP: ::c_int = 0x00000020; -pub const P2_STKGAP_DISABLE: ::c_int = 0x00000800; -pub const P2_STKGAP_DISABLE_EXEC: ::c_int = 0x00001000; - -pub const P_TREE_ORPHANED: ::c_int = 0x00000001; -pub const P_TREE_FIRST_ORPHAN: ::c_int = 0x00000002; -pub const P_TREE_REAPER: ::c_int = 0x00000004; - -pub const SIDL: ::c_char = 1; -pub const SRUN: ::c_char = 2; -pub const SSLEEP: ::c_char = 3; -pub const SSTOP: ::c_char = 4; -pub const SZOMB: ::c_char = 5; -pub const SWAIT: ::c_char = 6; -pub const SLOCK: ::c_char = 7; - -pub const P_MAGIC: ::c_int = 0xbeefface; - -pub const TDP_SIGFASTBLOCK: ::c_int = 0x00000100; -pub const TDP_UIOHELD: ::c_int = 0x10000000; -pub const TDP_SIGFASTPENDING: ::c_int = 0x80000000; -pub const TDP2_COMPAT32RB: ::c_int = 0x00000002; -pub const P2_PROTMAX_ENABLE: ::c_int = 0x00000200; -pub const P2_PROTMAX_DISABLE: ::c_int = 0x00000400; -pub const TDP2_SBPAGES: ::c_int = 0x00000001; -pub const P2_ASLR_ENABLE: ::c_int = 0x00000040; -pub const P2_ASLR_DISABLE: ::c_int = 0x00000080; -pub const P2_ASLR_IGNSTART: ::c_int = 0x00000100; -pub const P_TREE_GRPEXITED: ::c_int = 0x00000008; +pub const TDF_MACPEND: c_int = 0x40000000; + +pub const TDB_SUSPEND: c_int = 0x00000001; +pub const TDB_XSIG: c_int = 0x00000002; +pub const TDB_USERWR: c_int = 0x00000004; +pub const TDB_SCE: c_int = 0x00000008; +pub const TDB_SCX: c_int = 0x00000010; +pub const TDB_EXEC: c_int = 0x00000020; +pub const TDB_FORK: c_int = 0x00000040; +pub const TDB_STOPATFORK: c_int = 0x00000080; +pub const TDB_CHILD: c_int = 0x00000100; +pub const TDB_BORN: c_int = 0x00000200; +pub const TDB_EXIT: c_int = 0x00000400; +pub const TDB_VFORK: c_int = 0x00000800; +pub const TDB_FSTP: c_int = 0x00001000; +pub const TDB_STEP: c_int = 0x00002000; + +pub const TDP_OLDMASK: c_int = 0x00000001; +pub const TDP_INKTR: c_int = 0x00000002; +pub const TDP_INKTRACE: c_int = 0x00000004; +pub const TDP_BUFNEED: c_int = 0x00000008; +pub const TDP_COWINPROGRESS: c_int = 0x00000010; +pub const TDP_ALTSTACK: c_int = 0x00000020; +pub const TDP_DEADLKTREAT: c_int = 0x00000040; +pub const TDP_NOFAULTING: c_int = 0x00000080; +pub const TDP_OWEUPC: c_int = 0x00000200; +pub const TDP_ITHREAD: c_int = 0x00000400; +pub const TDP_SYNCIO: c_int = 0x00000800; +pub const TDP_SCHED1: c_int = 0x00001000; +pub const TDP_SCHED2: c_int = 0x00002000; +pub const TDP_SCHED3: c_int = 0x00004000; +pub const TDP_SCHED4: c_int = 0x00008000; +pub const TDP_GEOM: c_int = 0x00010000; +pub const TDP_SOFTDEP: c_int = 0x00020000; +pub const TDP_NORUNNINGBUF: c_int = 0x00040000; +pub const TDP_WAKEUP: c_int = 0x00080000; +pub const TDP_INBDFLUSH: c_int = 0x00100000; +pub const TDP_KTHREAD: c_int = 0x00200000; +pub const TDP_CALLCHAIN: c_int = 0x00400000; +pub const TDP_IGNSUSP: c_int = 0x00800000; +pub const TDP_AUDITREC: c_int = 0x01000000; +pub const TDP_RFPPWAIT: c_int = 0x02000000; +pub const TDP_RESETSPUR: c_int = 0x04000000; +pub const TDP_NERRNO: c_int = 0x08000000; +pub const TDP_EXECVMSPC: c_int = 0x40000000; + +pub const TDI_SUSPENDED: c_int = 0x0001; +pub const TDI_SLEEPING: c_int = 0x0002; +pub const TDI_SWAPPED: c_int = 0x0004; +pub const TDI_LOCK: c_int = 0x0008; +pub const TDI_IWAIT: c_int = 0x0010; + +pub const P_ADVLOCK: c_int = 0x00000001; +pub const P_CONTROLT: c_int = 0x00000002; +pub const P_KPROC: c_int = 0x00000004; +pub const P_UNUSED3: c_int = 0x00000008; +pub const P_PPWAIT: c_int = 0x00000010; +pub const P_PROFIL: c_int = 0x00000020; +pub const P_STOPPROF: c_int = 0x00000040; +pub const P_HADTHREADS: c_int = 0x00000080; +pub const P_SUGID: c_int = 0x00000100; +pub const P_SYSTEM: c_int = 0x00000200; +pub const P_SINGLE_EXIT: c_int = 0x00000400; +pub const P_TRACED: c_int = 0x00000800; +pub const P_WAITED: c_int = 0x00001000; +pub const P_WEXIT: c_int = 0x00002000; +pub const P_EXEC: c_int = 0x00004000; +pub const P_WKILLED: c_int = 0x00008000; +pub const P_CONTINUED: c_int = 0x00010000; +pub const P_STOPPED_SIG: c_int = 0x00020000; +pub const P_STOPPED_TRACE: c_int = 0x00040000; +pub const P_STOPPED_SINGLE: c_int = 0x00080000; +pub const P_PROTECTED: c_int = 0x00100000; +pub const P_SIGEVENT: c_int = 0x00200000; +pub const P_SINGLE_BOUNDARY: c_int = 0x00400000; +pub const P_HWPMC: c_int = 0x00800000; +pub const P_JAILED: c_int = 0x01000000; +pub const P_TOTAL_STOP: c_int = 0x02000000; +pub const P_INEXEC: c_int = 0x04000000; +pub const P_STATCHILD: c_int = 0x08000000; +pub const P_INMEM: c_int = 0x10000000; +pub const P_SWAPPINGOUT: c_int = 0x20000000; +pub const P_SWAPPINGIN: c_int = 0x40000000; +pub const P_PPTRACE: c_int = 0x80000000; +pub const P_STOPPED: c_int = P_STOPPED_SIG | P_STOPPED_SINGLE | P_STOPPED_TRACE; + +pub const P2_INHERIT_PROTECTED: c_int = 0x00000001; +pub const P2_NOTRACE: c_int = 0x00000002; +pub const P2_NOTRACE_EXEC: c_int = 0x00000004; +pub const P2_AST_SU: c_int = 0x00000008; +pub const P2_PTRACE_FSTP: c_int = 0x00000010; +pub const P2_TRAPCAP: c_int = 0x00000020; +pub const P2_STKGAP_DISABLE: c_int = 0x00000800; +pub const P2_STKGAP_DISABLE_EXEC: c_int = 0x00001000; + +pub const P_TREE_ORPHANED: c_int = 0x00000001; +pub const P_TREE_FIRST_ORPHAN: c_int = 0x00000002; +pub const P_TREE_REAPER: c_int = 0x00000004; + +pub const SIDL: c_char = 1; +pub const SRUN: c_char = 2; +pub const SSLEEP: c_char = 3; +pub const SSTOP: c_char = 4; +pub const SZOMB: c_char = 5; +pub const SWAIT: c_char = 6; +pub const SLOCK: c_char = 7; + +pub const P_MAGIC: c_int = 0xbeefface; + +pub const TDP_SIGFASTBLOCK: c_int = 0x00000100; +pub const TDP_UIOHELD: c_int = 0x10000000; +pub const TDP_SIGFASTPENDING: c_int = 0x80000000; +pub const TDP2_COMPAT32RB: c_int = 0x00000002; +pub const P2_PROTMAX_ENABLE: c_int = 0x00000200; +pub const P2_PROTMAX_DISABLE: c_int = 0x00000400; +pub const TDP2_SBPAGES: c_int = 0x00000001; +pub const P2_ASLR_ENABLE: c_int = 0x00000040; +pub const P2_ASLR_DISABLE: c_int = 0x00000080; +pub const P2_ASLR_IGNSTART: c_int = 0x00000100; +pub const P_TREE_GRPEXITED: c_int = 0x00000008; // libprocstat.h -pub const PS_FST_VTYPE_VNON: ::c_int = 1; -pub const PS_FST_VTYPE_VREG: ::c_int = 2; -pub const PS_FST_VTYPE_VDIR: ::c_int = 3; -pub const PS_FST_VTYPE_VBLK: ::c_int = 4; -pub const PS_FST_VTYPE_VCHR: ::c_int = 5; -pub const PS_FST_VTYPE_VLNK: ::c_int = 6; -pub const PS_FST_VTYPE_VSOCK: ::c_int = 7; -pub const PS_FST_VTYPE_VFIFO: ::c_int = 8; -pub const PS_FST_VTYPE_VBAD: ::c_int = 9; -pub const PS_FST_VTYPE_UNKNOWN: ::c_int = 255; - -pub const PS_FST_TYPE_VNODE: ::c_int = 1; -pub const PS_FST_TYPE_FIFO: ::c_int = 2; -pub const PS_FST_TYPE_SOCKET: ::c_int = 3; -pub const PS_FST_TYPE_PIPE: ::c_int = 4; -pub const PS_FST_TYPE_PTS: ::c_int = 5; -pub const PS_FST_TYPE_KQUEUE: ::c_int = 6; -pub const PS_FST_TYPE_MQUEUE: ::c_int = 8; -pub const PS_FST_TYPE_SHM: ::c_int = 9; -pub const PS_FST_TYPE_SEM: ::c_int = 10; -pub const PS_FST_TYPE_UNKNOWN: ::c_int = 11; -pub const PS_FST_TYPE_NONE: ::c_int = 12; -pub const PS_FST_TYPE_PROCDESC: ::c_int = 13; -pub const PS_FST_TYPE_DEV: ::c_int = 14; -pub const PS_FST_TYPE_EVENTFD: ::c_int = 15; - -pub const PS_FST_UFLAG_RDIR: ::c_int = 0x0001; -pub const PS_FST_UFLAG_CDIR: ::c_int = 0x0002; -pub const PS_FST_UFLAG_JAIL: ::c_int = 0x0004; -pub const PS_FST_UFLAG_TRACE: ::c_int = 0x0008; -pub const PS_FST_UFLAG_TEXT: ::c_int = 0x0010; -pub const PS_FST_UFLAG_MMAP: ::c_int = 0x0020; -pub const PS_FST_UFLAG_CTTY: ::c_int = 0x0040; - -pub const PS_FST_FFLAG_READ: ::c_int = 0x0001; -pub const PS_FST_FFLAG_WRITE: ::c_int = 0x0002; -pub const PS_FST_FFLAG_NONBLOCK: ::c_int = 0x0004; -pub const PS_FST_FFLAG_APPEND: ::c_int = 0x0008; -pub const PS_FST_FFLAG_SHLOCK: ::c_int = 0x0010; -pub const PS_FST_FFLAG_EXLOCK: ::c_int = 0x0020; -pub const PS_FST_FFLAG_ASYNC: ::c_int = 0x0040; -pub const PS_FST_FFLAG_SYNC: ::c_int = 0x0080; -pub const PS_FST_FFLAG_NOFOLLOW: ::c_int = 0x0100; -pub const PS_FST_FFLAG_CREAT: ::c_int = 0x0200; -pub const PS_FST_FFLAG_TRUNC: ::c_int = 0x0400; -pub const PS_FST_FFLAG_EXCL: ::c_int = 0x0800; -pub const PS_FST_FFLAG_DIRECT: ::c_int = 0x1000; -pub const PS_FST_FFLAG_EXEC: ::c_int = 0x2000; -pub const PS_FST_FFLAG_HASLOCK: ::c_int = 0x4000; +pub const PS_FST_VTYPE_VNON: c_int = 1; +pub const PS_FST_VTYPE_VREG: c_int = 2; +pub const PS_FST_VTYPE_VDIR: c_int = 3; +pub const PS_FST_VTYPE_VBLK: c_int = 4; +pub const PS_FST_VTYPE_VCHR: c_int = 5; +pub const PS_FST_VTYPE_VLNK: c_int = 6; +pub const PS_FST_VTYPE_VSOCK: c_int = 7; +pub const PS_FST_VTYPE_VFIFO: c_int = 8; +pub const PS_FST_VTYPE_VBAD: c_int = 9; +pub const PS_FST_VTYPE_UNKNOWN: c_int = 255; + +pub const PS_FST_TYPE_VNODE: c_int = 1; +pub const PS_FST_TYPE_FIFO: c_int = 2; +pub const PS_FST_TYPE_SOCKET: c_int = 3; +pub const PS_FST_TYPE_PIPE: c_int = 4; +pub const PS_FST_TYPE_PTS: c_int = 5; +pub const PS_FST_TYPE_KQUEUE: c_int = 6; +pub const PS_FST_TYPE_MQUEUE: c_int = 8; +pub const PS_FST_TYPE_SHM: c_int = 9; +pub const PS_FST_TYPE_SEM: c_int = 10; +pub const PS_FST_TYPE_UNKNOWN: c_int = 11; +pub const PS_FST_TYPE_NONE: c_int = 12; +pub const PS_FST_TYPE_PROCDESC: c_int = 13; +pub const PS_FST_TYPE_DEV: c_int = 14; +pub const PS_FST_TYPE_EVENTFD: c_int = 15; + +pub const PS_FST_UFLAG_RDIR: c_int = 0x0001; +pub const PS_FST_UFLAG_CDIR: c_int = 0x0002; +pub const PS_FST_UFLAG_JAIL: c_int = 0x0004; +pub const PS_FST_UFLAG_TRACE: c_int = 0x0008; +pub const PS_FST_UFLAG_TEXT: c_int = 0x0010; +pub const PS_FST_UFLAG_MMAP: c_int = 0x0020; +pub const PS_FST_UFLAG_CTTY: c_int = 0x0040; + +pub const PS_FST_FFLAG_READ: c_int = 0x0001; +pub const PS_FST_FFLAG_WRITE: c_int = 0x0002; +pub const PS_FST_FFLAG_NONBLOCK: c_int = 0x0004; +pub const PS_FST_FFLAG_APPEND: c_int = 0x0008; +pub const PS_FST_FFLAG_SHLOCK: c_int = 0x0010; +pub const PS_FST_FFLAG_EXLOCK: c_int = 0x0020; +pub const PS_FST_FFLAG_ASYNC: c_int = 0x0040; +pub const PS_FST_FFLAG_SYNC: c_int = 0x0080; +pub const PS_FST_FFLAG_NOFOLLOW: c_int = 0x0100; +pub const PS_FST_FFLAG_CREAT: c_int = 0x0200; +pub const PS_FST_FFLAG_TRUNC: c_int = 0x0400; +pub const PS_FST_FFLAG_EXCL: c_int = 0x0800; +pub const PS_FST_FFLAG_DIRECT: c_int = 0x1000; +pub const PS_FST_FFLAG_EXEC: c_int = 0x2000; +pub const PS_FST_FFLAG_HASLOCK: c_int = 0x4000; // sys/mount.h @@ -4511,16 +4515,16 @@ pub const PS_FST_FFLAG_HASLOCK: ::c_int = 0x4000; /// /// Note that the offset of fid_data is 4 bytes, so care must be taken to avoid /// undefined behavior accessing unaligned fields within an embedded struct. -pub const MAXFIDSZ: ::c_int = 16; +pub const MAXFIDSZ: c_int = 16; /// Length of type name including null. -pub const MFSNAMELEN: ::c_int = 16; +pub const MFSNAMELEN: c_int = 16; cfg_if! { if #[cfg(any(freebsd10, freebsd11))] { /// Size of on/from name bufs. - pub const MNAMELEN: ::c_int = 88; + pub const MNAMELEN: c_int = 88; } else { /// Size of on/from name bufs. - pub const MNAMELEN: ::c_int = 1024; + pub const MNAMELEN: c_int = 1024; } } @@ -4561,331 +4565,331 @@ pub const MNT_RECURSE: u64 = 0x100000000000; pub const MNT_DEFERRED: u64 = 0x200000000000; /// Get configured filesystems. -pub const VFS_VFSCONF: ::c_int = 0; +pub const VFS_VFSCONF: c_int = 0; /// Generic filesystem information. -pub const VFS_GENERIC: ::c_int = 0; +pub const VFS_GENERIC: c_int = 0; /// int: highest defined filesystem type. -pub const VFS_MAXTYPENUM: ::c_int = 1; +pub const VFS_MAXTYPENUM: c_int = 1; /// struct: vfsconf for filesystem given as next argument. -pub const VFS_CONF: ::c_int = 2; +pub const VFS_CONF: c_int = 2; /// Synchronously wait for I/O to complete. -pub const MNT_WAIT: ::c_int = 1; +pub const MNT_WAIT: c_int = 1; /// Start all I/O, but do not wait for it. -pub const MNT_NOWAIT: ::c_int = 2; +pub const MNT_NOWAIT: c_int = 2; /// Push data not written by filesystem syncer. -pub const MNT_LAZY: ::c_int = 3; +pub const MNT_LAZY: c_int = 3; /// Suspend file system after sync. -pub const MNT_SUSPEND: ::c_int = 4; +pub const MNT_SUSPEND: c_int = 4; -pub const MAXSECFLAVORS: ::c_int = 5; +pub const MAXSECFLAVORS: c_int = 5; /// Statically compiled into kernel. -pub const VFCF_STATIC: ::c_int = 0x00010000; +pub const VFCF_STATIC: c_int = 0x00010000; /// May get data over the network. -pub const VFCF_NETWORK: ::c_int = 0x00020000; +pub const VFCF_NETWORK: c_int = 0x00020000; /// Writes are not implemented. -pub const VFCF_READONLY: ::c_int = 0x00040000; +pub const VFCF_READONLY: c_int = 0x00040000; /// Data does not represent real files. -pub const VFCF_SYNTHETIC: ::c_int = 0x00080000; +pub const VFCF_SYNTHETIC: c_int = 0x00080000; /// Aliases some other mounted FS. -pub const VFCF_LOOPBACK: ::c_int = 0x00100000; +pub const VFCF_LOOPBACK: c_int = 0x00100000; /// Stores file names as Unicode. -pub const VFCF_UNICODE: ::c_int = 0x00200000; +pub const VFCF_UNICODE: c_int = 0x00200000; /// Can be mounted from within a jail. -pub const VFCF_JAIL: ::c_int = 0x00400000; +pub const VFCF_JAIL: c_int = 0x00400000; /// Supports delegated administration. -pub const VFCF_DELEGADMIN: ::c_int = 0x00800000; +pub const VFCF_DELEGADMIN: c_int = 0x00800000; /// Stop at Boundary: defer stop requests to kernel->user (AST) transition. -pub const VFCF_SBDRY: ::c_int = 0x01000000; +pub const VFCF_SBDRY: c_int = 0x01000000; // time.h /// not on dst -pub const DST_NONE: ::c_int = 0; +pub const DST_NONE: c_int = 0; /// USA style dst -pub const DST_USA: ::c_int = 1; +pub const DST_USA: c_int = 1; /// Australian style dst -pub const DST_AUST: ::c_int = 2; +pub const DST_AUST: c_int = 2; /// Western European dst -pub const DST_WET: ::c_int = 3; +pub const DST_WET: c_int = 3; /// Middle European dst -pub const DST_MET: ::c_int = 4; +pub const DST_MET: c_int = 4; /// Eastern European dst -pub const DST_EET: ::c_int = 5; +pub const DST_EET: c_int = 5; /// Canada -pub const DST_CAN: ::c_int = 6; - -pub const CPUCLOCK_WHICH_PID: ::c_int = 0; -pub const CPUCLOCK_WHICH_TID: ::c_int = 1; - -pub const MFD_CLOEXEC: ::c_uint = 0x00000001; -pub const MFD_ALLOW_SEALING: ::c_uint = 0x00000002; -pub const MFD_HUGETLB: ::c_uint = 0x00000004; -pub const MFD_HUGE_MASK: ::c_uint = 0xFC000000; -pub const MFD_HUGE_64KB: ::c_uint = 16 << 26; -pub const MFD_HUGE_512KB: ::c_uint = 19 << 26; -pub const MFD_HUGE_1MB: ::c_uint = 20 << 26; -pub const MFD_HUGE_2MB: ::c_uint = 21 << 26; -pub const MFD_HUGE_8MB: ::c_uint = 23 << 26; -pub const MFD_HUGE_16MB: ::c_uint = 24 << 26; -pub const MFD_HUGE_32MB: ::c_uint = 25 << 26; -pub const MFD_HUGE_256MB: ::c_uint = 28 << 26; -pub const MFD_HUGE_512MB: ::c_uint = 29 << 26; -pub const MFD_HUGE_1GB: ::c_uint = 30 << 26; -pub const MFD_HUGE_2GB: ::c_uint = 31 << 26; -pub const MFD_HUGE_16GB: ::c_uint = 34 << 26; - -pub const SHM_LARGEPAGE_ALLOC_DEFAULT: ::c_int = 0; -pub const SHM_LARGEPAGE_ALLOC_NOWAIT: ::c_int = 1; -pub const SHM_LARGEPAGE_ALLOC_HARD: ::c_int = 2; -pub const SHM_RENAME_NOREPLACE: ::c_int = 1 << 0; -pub const SHM_RENAME_EXCHANGE: ::c_int = 1 << 1; +pub const DST_CAN: c_int = 6; + +pub const CPUCLOCK_WHICH_PID: c_int = 0; +pub const CPUCLOCK_WHICH_TID: c_int = 1; + +pub const MFD_CLOEXEC: c_uint = 0x00000001; +pub const MFD_ALLOW_SEALING: c_uint = 0x00000002; +pub const MFD_HUGETLB: c_uint = 0x00000004; +pub const MFD_HUGE_MASK: c_uint = 0xFC000000; +pub const MFD_HUGE_64KB: c_uint = 16 << 26; +pub const MFD_HUGE_512KB: c_uint = 19 << 26; +pub const MFD_HUGE_1MB: c_uint = 20 << 26; +pub const MFD_HUGE_2MB: c_uint = 21 << 26; +pub const MFD_HUGE_8MB: c_uint = 23 << 26; +pub const MFD_HUGE_16MB: c_uint = 24 << 26; +pub const MFD_HUGE_32MB: c_uint = 25 << 26; +pub const MFD_HUGE_256MB: c_uint = 28 << 26; +pub const MFD_HUGE_512MB: c_uint = 29 << 26; +pub const MFD_HUGE_1GB: c_uint = 30 << 26; +pub const MFD_HUGE_2GB: c_uint = 31 << 26; +pub const MFD_HUGE_16GB: c_uint = 34 << 26; + +pub const SHM_LARGEPAGE_ALLOC_DEFAULT: c_int = 0; +pub const SHM_LARGEPAGE_ALLOC_NOWAIT: c_int = 1; +pub const SHM_LARGEPAGE_ALLOC_HARD: c_int = 2; +pub const SHM_RENAME_NOREPLACE: c_int = 1 << 0; +pub const SHM_RENAME_EXCHANGE: c_int = 1 << 1; // sys/umtx.h -pub const UMTX_OP_WAIT: ::c_int = 2; -pub const UMTX_OP_WAKE: ::c_int = 3; -pub const UMTX_OP_MUTEX_TRYLOCK: ::c_int = 4; -pub const UMTX_OP_MUTEX_LOCK: ::c_int = 5; -pub const UMTX_OP_MUTEX_UNLOCK: ::c_int = 6; -pub const UMTX_OP_SET_CEILING: ::c_int = 7; -pub const UMTX_OP_CV_WAIT: ::c_int = 8; -pub const UMTX_OP_CV_SIGNAL: ::c_int = 9; -pub const UMTX_OP_CV_BROADCAST: ::c_int = 10; -pub const UMTX_OP_WAIT_UINT: ::c_int = 11; -pub const UMTX_OP_RW_RDLOCK: ::c_int = 12; -pub const UMTX_OP_RW_WRLOCK: ::c_int = 13; -pub const UMTX_OP_RW_UNLOCK: ::c_int = 14; -pub const UMTX_OP_WAIT_UINT_PRIVATE: ::c_int = 15; -pub const UMTX_OP_WAKE_PRIVATE: ::c_int = 16; -pub const UMTX_OP_MUTEX_WAIT: ::c_int = 17; -pub const UMTX_OP_NWAKE_PRIVATE: ::c_int = 21; -pub const UMTX_OP_MUTEX_WAKE2: ::c_int = 22; -pub const UMTX_OP_SEM2_WAIT: ::c_int = 23; -pub const UMTX_OP_SEM2_WAKE: ::c_int = 24; -pub const UMTX_OP_SHM: ::c_int = 25; -pub const UMTX_OP_ROBUST_LISTS: ::c_int = 26; +pub const UMTX_OP_WAIT: c_int = 2; +pub const UMTX_OP_WAKE: c_int = 3; +pub const UMTX_OP_MUTEX_TRYLOCK: c_int = 4; +pub const UMTX_OP_MUTEX_LOCK: c_int = 5; +pub const UMTX_OP_MUTEX_UNLOCK: c_int = 6; +pub const UMTX_OP_SET_CEILING: c_int = 7; +pub const UMTX_OP_CV_WAIT: c_int = 8; +pub const UMTX_OP_CV_SIGNAL: c_int = 9; +pub const UMTX_OP_CV_BROADCAST: c_int = 10; +pub const UMTX_OP_WAIT_UINT: c_int = 11; +pub const UMTX_OP_RW_RDLOCK: c_int = 12; +pub const UMTX_OP_RW_WRLOCK: c_int = 13; +pub const UMTX_OP_RW_UNLOCK: c_int = 14; +pub const UMTX_OP_WAIT_UINT_PRIVATE: c_int = 15; +pub const UMTX_OP_WAKE_PRIVATE: c_int = 16; +pub const UMTX_OP_MUTEX_WAIT: c_int = 17; +pub const UMTX_OP_NWAKE_PRIVATE: c_int = 21; +pub const UMTX_OP_MUTEX_WAKE2: c_int = 22; +pub const UMTX_OP_SEM2_WAIT: c_int = 23; +pub const UMTX_OP_SEM2_WAKE: c_int = 24; +pub const UMTX_OP_SHM: c_int = 25; +pub const UMTX_OP_ROBUST_LISTS: c_int = 26; pub const UMTX_ABSTIME: u32 = 1; -pub const CPU_LEVEL_ROOT: ::c_int = 1; -pub const CPU_LEVEL_CPUSET: ::c_int = 2; -pub const CPU_LEVEL_WHICH: ::c_int = 3; +pub const CPU_LEVEL_ROOT: c_int = 1; +pub const CPU_LEVEL_CPUSET: c_int = 2; +pub const CPU_LEVEL_WHICH: c_int = 3; -pub const CPU_WHICH_TID: ::c_int = 1; -pub const CPU_WHICH_PID: ::c_int = 2; -pub const CPU_WHICH_CPUSET: ::c_int = 3; -pub const CPU_WHICH_IRQ: ::c_int = 4; -pub const CPU_WHICH_JAIL: ::c_int = 5; +pub const CPU_WHICH_TID: c_int = 1; +pub const CPU_WHICH_PID: c_int = 2; +pub const CPU_WHICH_CPUSET: c_int = 3; +pub const CPU_WHICH_IRQ: c_int = 4; +pub const CPU_WHICH_JAIL: c_int = 5; // net/route.h -pub const RTF_LLDATA: ::c_int = 0x400; -pub const RTF_FIXEDMTU: ::c_int = 0x80000; +pub const RTF_LLDATA: c_int = 0x400; +pub const RTF_FIXEDMTU: c_int = 0x80000; -pub const RTM_VERSION: ::c_int = 5; +pub const RTM_VERSION: c_int = 5; -pub const RTAX_MAX: ::c_int = 8; +pub const RTAX_MAX: c_int = 8; // sys/signal.h -pub const SIGTHR: ::c_int = 32; -pub const SIGLWP: ::c_int = SIGTHR; -pub const SIGLIBRT: ::c_int = 33; +pub const SIGTHR: c_int = 32; +pub const SIGLWP: c_int = SIGTHR; +pub const SIGLIBRT: c_int = 33; // netinet/sctp.h -pub const SCTP_FUTURE_ASSOC: ::c_int = 0; -pub const SCTP_CURRENT_ASSOC: ::c_int = 1; -pub const SCTP_ALL_ASSOC: ::c_int = 2; - -pub const SCTP_NO_NEXT_MSG: ::c_int = 0x0000; -pub const SCTP_NEXT_MSG_AVAIL: ::c_int = 0x0001; -pub const SCTP_NEXT_MSG_ISCOMPLETE: ::c_int = 0x0002; -pub const SCTP_NEXT_MSG_IS_UNORDERED: ::c_int = 0x0004; -pub const SCTP_NEXT_MSG_IS_NOTIFICATION: ::c_int = 0x0008; - -pub const SCTP_RECVV_NOINFO: ::c_int = 0; -pub const SCTP_RECVV_RCVINFO: ::c_int = 1; -pub const SCTP_RECVV_NXTINFO: ::c_int = 2; -pub const SCTP_RECVV_RN: ::c_int = 3; - -pub const SCTP_SENDV_NOINFO: ::c_int = 0; -pub const SCTP_SENDV_SNDINFO: ::c_int = 1; -pub const SCTP_SENDV_PRINFO: ::c_int = 2; -pub const SCTP_SENDV_AUTHINFO: ::c_int = 3; -pub const SCTP_SENDV_SPA: ::c_int = 4; - -pub const SCTP_SEND_SNDINFO_VALID: ::c_int = 0x00000001; -pub const SCTP_SEND_PRINFO_VALID: ::c_int = 0x00000002; -pub const SCTP_SEND_AUTHINFO_VALID: ::c_int = 0x00000004; - -pub const SCTP_NOTIFICATION: ::c_int = 0x0010; -pub const SCTP_COMPLETE: ::c_int = 0x0020; -pub const SCTP_EOF: ::c_int = 0x0100; -pub const SCTP_ABORT: ::c_int = 0x0200; -pub const SCTP_UNORDERED: ::c_int = 0x0400; -pub const SCTP_ADDR_OVER: ::c_int = 0x0800; -pub const SCTP_SENDALL: ::c_int = 0x1000; -pub const SCTP_EOR: ::c_int = 0x2000; -pub const SCTP_SACK_IMMEDIATELY: ::c_int = 0x4000; -pub const SCTP_PR_SCTP_NONE: ::c_int = 0x0000; -pub const SCTP_PR_SCTP_TTL: ::c_int = 0x0001; -pub const SCTP_PR_SCTP_PRIO: ::c_int = 0x0002; -pub const SCTP_PR_SCTP_BUF: ::c_int = SCTP_PR_SCTP_PRIO; -pub const SCTP_PR_SCTP_RTX: ::c_int = 0x0003; -pub const SCTP_PR_SCTP_MAX: ::c_int = SCTP_PR_SCTP_RTX; -pub const SCTP_PR_SCTP_ALL: ::c_int = 0x000f; - -pub const SCTP_INIT: ::c_int = 0x0001; -pub const SCTP_SNDRCV: ::c_int = 0x0002; -pub const SCTP_EXTRCV: ::c_int = 0x0003; -pub const SCTP_SNDINFO: ::c_int = 0x0004; -pub const SCTP_RCVINFO: ::c_int = 0x0005; -pub const SCTP_NXTINFO: ::c_int = 0x0006; -pub const SCTP_PRINFO: ::c_int = 0x0007; -pub const SCTP_AUTHINFO: ::c_int = 0x0008; -pub const SCTP_DSTADDRV4: ::c_int = 0x0009; -pub const SCTP_DSTADDRV6: ::c_int = 0x000a; - -pub const SCTP_RTOINFO: ::c_int = 0x00000001; -pub const SCTP_ASSOCINFO: ::c_int = 0x00000002; -pub const SCTP_INITMSG: ::c_int = 0x00000003; -pub const SCTP_NODELAY: ::c_int = 0x00000004; -pub const SCTP_AUTOCLOSE: ::c_int = 0x00000005; -pub const SCTP_SET_PEER_PRIMARY_ADDR: ::c_int = 0x00000006; -pub const SCTP_PRIMARY_ADDR: ::c_int = 0x00000007; -pub const SCTP_ADAPTATION_LAYER: ::c_int = 0x00000008; -pub const SCTP_ADAPTION_LAYER: ::c_int = 0x00000008; -pub const SCTP_DISABLE_FRAGMENTS: ::c_int = 0x00000009; -pub const SCTP_PEER_ADDR_PARAMS: ::c_int = 0x0000000a; -pub const SCTP_DEFAULT_SEND_PARAM: ::c_int = 0x0000000b; -pub const SCTP_EVENTS: ::c_int = 0x0000000c; -pub const SCTP_I_WANT_MAPPED_V4_ADDR: ::c_int = 0x0000000d; -pub const SCTP_MAXSEG: ::c_int = 0x0000000e; -pub const SCTP_DELAYED_SACK: ::c_int = 0x0000000f; -pub const SCTP_FRAGMENT_INTERLEAVE: ::c_int = 0x00000010; -pub const SCTP_PARTIAL_DELIVERY_POINT: ::c_int = 0x00000011; -pub const SCTP_AUTH_CHUNK: ::c_int = 0x00000012; -pub const SCTP_AUTH_KEY: ::c_int = 0x00000013; -pub const SCTP_HMAC_IDENT: ::c_int = 0x00000014; -pub const SCTP_AUTH_ACTIVE_KEY: ::c_int = 0x00000015; -pub const SCTP_AUTH_DELETE_KEY: ::c_int = 0x00000016; -pub const SCTP_USE_EXT_RCVINFO: ::c_int = 0x00000017; -pub const SCTP_AUTO_ASCONF: ::c_int = 0x00000018; -pub const SCTP_MAXBURST: ::c_int = 0x00000019; -pub const SCTP_MAX_BURST: ::c_int = 0x00000019; -pub const SCTP_CONTEXT: ::c_int = 0x0000001a; -pub const SCTP_EXPLICIT_EOR: ::c_int = 0x00000001b; -pub const SCTP_REUSE_PORT: ::c_int = 0x00000001c; -pub const SCTP_AUTH_DEACTIVATE_KEY: ::c_int = 0x00000001d; -pub const SCTP_EVENT: ::c_int = 0x0000001e; -pub const SCTP_RECVRCVINFO: ::c_int = 0x0000001f; -pub const SCTP_RECVNXTINFO: ::c_int = 0x00000020; -pub const SCTP_DEFAULT_SNDINFO: ::c_int = 0x00000021; -pub const SCTP_DEFAULT_PRINFO: ::c_int = 0x00000022; -pub const SCTP_PEER_ADDR_THLDS: ::c_int = 0x00000023; -pub const SCTP_REMOTE_UDP_ENCAPS_PORT: ::c_int = 0x00000024; -pub const SCTP_ECN_SUPPORTED: ::c_int = 0x00000025; -pub const SCTP_AUTH_SUPPORTED: ::c_int = 0x00000027; -pub const SCTP_ASCONF_SUPPORTED: ::c_int = 0x00000028; -pub const SCTP_RECONFIG_SUPPORTED: ::c_int = 0x00000029; -pub const SCTP_NRSACK_SUPPORTED: ::c_int = 0x00000030; -pub const SCTP_PKTDROP_SUPPORTED: ::c_int = 0x00000031; -pub const SCTP_MAX_CWND: ::c_int = 0x00000032; - -pub const SCTP_STATUS: ::c_int = 0x00000100; -pub const SCTP_GET_PEER_ADDR_INFO: ::c_int = 0x00000101; -pub const SCTP_PEER_AUTH_CHUNKS: ::c_int = 0x00000102; -pub const SCTP_LOCAL_AUTH_CHUNKS: ::c_int = 0x00000103; -pub const SCTP_GET_ASSOC_NUMBER: ::c_int = 0x00000104; -pub const SCTP_GET_ASSOC_ID_LIST: ::c_int = 0x00000105; -pub const SCTP_TIMEOUTS: ::c_int = 0x00000106; -pub const SCTP_PR_STREAM_STATUS: ::c_int = 0x00000107; -pub const SCTP_PR_ASSOC_STATUS: ::c_int = 0x00000108; - -pub const SCTP_COMM_UP: ::c_int = 0x0001; -pub const SCTP_COMM_LOST: ::c_int = 0x0002; -pub const SCTP_RESTART: ::c_int = 0x0003; -pub const SCTP_SHUTDOWN_COMP: ::c_int = 0x0004; -pub const SCTP_CANT_STR_ASSOC: ::c_int = 0x0005; - -pub const SCTP_ASSOC_SUPPORTS_PR: ::c_int = 0x01; -pub const SCTP_ASSOC_SUPPORTS_AUTH: ::c_int = 0x02; -pub const SCTP_ASSOC_SUPPORTS_ASCONF: ::c_int = 0x03; -pub const SCTP_ASSOC_SUPPORTS_MULTIBUF: ::c_int = 0x04; -pub const SCTP_ASSOC_SUPPORTS_RE_CONFIG: ::c_int = 0x05; -pub const SCTP_ASSOC_SUPPORTS_INTERLEAVING: ::c_int = 0x06; -pub const SCTP_ASSOC_SUPPORTS_MAX: ::c_int = 0x06; - -pub const SCTP_ADDR_AVAILABLE: ::c_int = 0x0001; -pub const SCTP_ADDR_UNREACHABLE: ::c_int = 0x0002; -pub const SCTP_ADDR_REMOVED: ::c_int = 0x0003; -pub const SCTP_ADDR_ADDED: ::c_int = 0x0004; -pub const SCTP_ADDR_MADE_PRIM: ::c_int = 0x0005; -pub const SCTP_ADDR_CONFIRMED: ::c_int = 0x0006; - -pub const SCTP_ACTIVE: ::c_int = 0x0001; -pub const SCTP_INACTIVE: ::c_int = 0x0002; -pub const SCTP_UNCONFIRMED: ::c_int = 0x0200; - -pub const SCTP_DATA_UNSENT: ::c_int = 0x0001; -pub const SCTP_DATA_SENT: ::c_int = 0x0002; - -pub const SCTP_PARTIAL_DELIVERY_ABORTED: ::c_int = 0x0001; - -pub const SCTP_AUTH_NEW_KEY: ::c_int = 0x0001; -pub const SCTP_AUTH_NEWKEY: ::c_int = SCTP_AUTH_NEW_KEY; -pub const SCTP_AUTH_NO_AUTH: ::c_int = 0x0002; -pub const SCTP_AUTH_FREE_KEY: ::c_int = 0x0003; - -pub const SCTP_STREAM_RESET_INCOMING_SSN: ::c_int = 0x0001; -pub const SCTP_STREAM_RESET_OUTGOING_SSN: ::c_int = 0x0002; -pub const SCTP_STREAM_RESET_DENIED: ::c_int = 0x0004; -pub const SCTP_STREAM_RESET_FAILED: ::c_int = 0x0008; - -pub const SCTP_ASSOC_RESET_DENIED: ::c_int = 0x0004; -pub const SCTP_ASSOC_RESET_FAILED: ::c_int = 0x0008; - -pub const SCTP_STREAM_CHANGE_DENIED: ::c_int = 0x0004; -pub const SCTP_STREAM_CHANGE_FAILED: ::c_int = 0x0008; +pub const SCTP_FUTURE_ASSOC: c_int = 0; +pub const SCTP_CURRENT_ASSOC: c_int = 1; +pub const SCTP_ALL_ASSOC: c_int = 2; + +pub const SCTP_NO_NEXT_MSG: c_int = 0x0000; +pub const SCTP_NEXT_MSG_AVAIL: c_int = 0x0001; +pub const SCTP_NEXT_MSG_ISCOMPLETE: c_int = 0x0002; +pub const SCTP_NEXT_MSG_IS_UNORDERED: c_int = 0x0004; +pub const SCTP_NEXT_MSG_IS_NOTIFICATION: c_int = 0x0008; + +pub const SCTP_RECVV_NOINFO: c_int = 0; +pub const SCTP_RECVV_RCVINFO: c_int = 1; +pub const SCTP_RECVV_NXTINFO: c_int = 2; +pub const SCTP_RECVV_RN: c_int = 3; + +pub const SCTP_SENDV_NOINFO: c_int = 0; +pub const SCTP_SENDV_SNDINFO: c_int = 1; +pub const SCTP_SENDV_PRINFO: c_int = 2; +pub const SCTP_SENDV_AUTHINFO: c_int = 3; +pub const SCTP_SENDV_SPA: c_int = 4; + +pub const SCTP_SEND_SNDINFO_VALID: c_int = 0x00000001; +pub const SCTP_SEND_PRINFO_VALID: c_int = 0x00000002; +pub const SCTP_SEND_AUTHINFO_VALID: c_int = 0x00000004; + +pub const SCTP_NOTIFICATION: c_int = 0x0010; +pub const SCTP_COMPLETE: c_int = 0x0020; +pub const SCTP_EOF: c_int = 0x0100; +pub const SCTP_ABORT: c_int = 0x0200; +pub const SCTP_UNORDERED: c_int = 0x0400; +pub const SCTP_ADDR_OVER: c_int = 0x0800; +pub const SCTP_SENDALL: c_int = 0x1000; +pub const SCTP_EOR: c_int = 0x2000; +pub const SCTP_SACK_IMMEDIATELY: c_int = 0x4000; +pub const SCTP_PR_SCTP_NONE: c_int = 0x0000; +pub const SCTP_PR_SCTP_TTL: c_int = 0x0001; +pub const SCTP_PR_SCTP_PRIO: c_int = 0x0002; +pub const SCTP_PR_SCTP_BUF: c_int = SCTP_PR_SCTP_PRIO; +pub const SCTP_PR_SCTP_RTX: c_int = 0x0003; +pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_RTX; +pub const SCTP_PR_SCTP_ALL: c_int = 0x000f; + +pub const SCTP_INIT: c_int = 0x0001; +pub const SCTP_SNDRCV: c_int = 0x0002; +pub const SCTP_EXTRCV: c_int = 0x0003; +pub const SCTP_SNDINFO: c_int = 0x0004; +pub const SCTP_RCVINFO: c_int = 0x0005; +pub const SCTP_NXTINFO: c_int = 0x0006; +pub const SCTP_PRINFO: c_int = 0x0007; +pub const SCTP_AUTHINFO: c_int = 0x0008; +pub const SCTP_DSTADDRV4: c_int = 0x0009; +pub const SCTP_DSTADDRV6: c_int = 0x000a; + +pub const SCTP_RTOINFO: c_int = 0x00000001; +pub const SCTP_ASSOCINFO: c_int = 0x00000002; +pub const SCTP_INITMSG: c_int = 0x00000003; +pub const SCTP_NODELAY: c_int = 0x00000004; +pub const SCTP_AUTOCLOSE: c_int = 0x00000005; +pub const SCTP_SET_PEER_PRIMARY_ADDR: c_int = 0x00000006; +pub const SCTP_PRIMARY_ADDR: c_int = 0x00000007; +pub const SCTP_ADAPTATION_LAYER: c_int = 0x00000008; +pub const SCTP_ADAPTION_LAYER: c_int = 0x00000008; +pub const SCTP_DISABLE_FRAGMENTS: c_int = 0x00000009; +pub const SCTP_PEER_ADDR_PARAMS: c_int = 0x0000000a; +pub const SCTP_DEFAULT_SEND_PARAM: c_int = 0x0000000b; +pub const SCTP_EVENTS: c_int = 0x0000000c; +pub const SCTP_I_WANT_MAPPED_V4_ADDR: c_int = 0x0000000d; +pub const SCTP_MAXSEG: c_int = 0x0000000e; +pub const SCTP_DELAYED_SACK: c_int = 0x0000000f; +pub const SCTP_FRAGMENT_INTERLEAVE: c_int = 0x00000010; +pub const SCTP_PARTIAL_DELIVERY_POINT: c_int = 0x00000011; +pub const SCTP_AUTH_CHUNK: c_int = 0x00000012; +pub const SCTP_AUTH_KEY: c_int = 0x00000013; +pub const SCTP_HMAC_IDENT: c_int = 0x00000014; +pub const SCTP_AUTH_ACTIVE_KEY: c_int = 0x00000015; +pub const SCTP_AUTH_DELETE_KEY: c_int = 0x00000016; +pub const SCTP_USE_EXT_RCVINFO: c_int = 0x00000017; +pub const SCTP_AUTO_ASCONF: c_int = 0x00000018; +pub const SCTP_MAXBURST: c_int = 0x00000019; +pub const SCTP_MAX_BURST: c_int = 0x00000019; +pub const SCTP_CONTEXT: c_int = 0x0000001a; +pub const SCTP_EXPLICIT_EOR: c_int = 0x00000001b; +pub const SCTP_REUSE_PORT: c_int = 0x00000001c; +pub const SCTP_AUTH_DEACTIVATE_KEY: c_int = 0x00000001d; +pub const SCTP_EVENT: c_int = 0x0000001e; +pub const SCTP_RECVRCVINFO: c_int = 0x0000001f; +pub const SCTP_RECVNXTINFO: c_int = 0x00000020; +pub const SCTP_DEFAULT_SNDINFO: c_int = 0x00000021; +pub const SCTP_DEFAULT_PRINFO: c_int = 0x00000022; +pub const SCTP_PEER_ADDR_THLDS: c_int = 0x00000023; +pub const SCTP_REMOTE_UDP_ENCAPS_PORT: c_int = 0x00000024; +pub const SCTP_ECN_SUPPORTED: c_int = 0x00000025; +pub const SCTP_AUTH_SUPPORTED: c_int = 0x00000027; +pub const SCTP_ASCONF_SUPPORTED: c_int = 0x00000028; +pub const SCTP_RECONFIG_SUPPORTED: c_int = 0x00000029; +pub const SCTP_NRSACK_SUPPORTED: c_int = 0x00000030; +pub const SCTP_PKTDROP_SUPPORTED: c_int = 0x00000031; +pub const SCTP_MAX_CWND: c_int = 0x00000032; + +pub const SCTP_STATUS: c_int = 0x00000100; +pub const SCTP_GET_PEER_ADDR_INFO: c_int = 0x00000101; +pub const SCTP_PEER_AUTH_CHUNKS: c_int = 0x00000102; +pub const SCTP_LOCAL_AUTH_CHUNKS: c_int = 0x00000103; +pub const SCTP_GET_ASSOC_NUMBER: c_int = 0x00000104; +pub const SCTP_GET_ASSOC_ID_LIST: c_int = 0x00000105; +pub const SCTP_TIMEOUTS: c_int = 0x00000106; +pub const SCTP_PR_STREAM_STATUS: c_int = 0x00000107; +pub const SCTP_PR_ASSOC_STATUS: c_int = 0x00000108; + +pub const SCTP_COMM_UP: c_int = 0x0001; +pub const SCTP_COMM_LOST: c_int = 0x0002; +pub const SCTP_RESTART: c_int = 0x0003; +pub const SCTP_SHUTDOWN_COMP: c_int = 0x0004; +pub const SCTP_CANT_STR_ASSOC: c_int = 0x0005; + +pub const SCTP_ASSOC_SUPPORTS_PR: c_int = 0x01; +pub const SCTP_ASSOC_SUPPORTS_AUTH: c_int = 0x02; +pub const SCTP_ASSOC_SUPPORTS_ASCONF: c_int = 0x03; +pub const SCTP_ASSOC_SUPPORTS_MULTIBUF: c_int = 0x04; +pub const SCTP_ASSOC_SUPPORTS_RE_CONFIG: c_int = 0x05; +pub const SCTP_ASSOC_SUPPORTS_INTERLEAVING: c_int = 0x06; +pub const SCTP_ASSOC_SUPPORTS_MAX: c_int = 0x06; + +pub const SCTP_ADDR_AVAILABLE: c_int = 0x0001; +pub const SCTP_ADDR_UNREACHABLE: c_int = 0x0002; +pub const SCTP_ADDR_REMOVED: c_int = 0x0003; +pub const SCTP_ADDR_ADDED: c_int = 0x0004; +pub const SCTP_ADDR_MADE_PRIM: c_int = 0x0005; +pub const SCTP_ADDR_CONFIRMED: c_int = 0x0006; + +pub const SCTP_ACTIVE: c_int = 0x0001; +pub const SCTP_INACTIVE: c_int = 0x0002; +pub const SCTP_UNCONFIRMED: c_int = 0x0200; + +pub const SCTP_DATA_UNSENT: c_int = 0x0001; +pub const SCTP_DATA_SENT: c_int = 0x0002; + +pub const SCTP_PARTIAL_DELIVERY_ABORTED: c_int = 0x0001; + +pub const SCTP_AUTH_NEW_KEY: c_int = 0x0001; +pub const SCTP_AUTH_NEWKEY: c_int = SCTP_AUTH_NEW_KEY; +pub const SCTP_AUTH_NO_AUTH: c_int = 0x0002; +pub const SCTP_AUTH_FREE_KEY: c_int = 0x0003; + +pub const SCTP_STREAM_RESET_INCOMING_SSN: c_int = 0x0001; +pub const SCTP_STREAM_RESET_OUTGOING_SSN: c_int = 0x0002; +pub const SCTP_STREAM_RESET_DENIED: c_int = 0x0004; +pub const SCTP_STREAM_RESET_FAILED: c_int = 0x0008; + +pub const SCTP_ASSOC_RESET_DENIED: c_int = 0x0004; +pub const SCTP_ASSOC_RESET_FAILED: c_int = 0x0008; + +pub const SCTP_STREAM_CHANGE_DENIED: c_int = 0x0004; +pub const SCTP_STREAM_CHANGE_FAILED: c_int = 0x0008; // sctp_uio.h pub const SCTP_ALIGN_RESV_PAD: usize = 92; pub const SCTP_ALIGN_RESV_PAD_SHORT: usize = 76; -pub const KENV_DUMP_LOADER: ::c_int = 4; -pub const KENV_DUMP_STATIC: ::c_int = 5; +pub const KENV_DUMP_LOADER: c_int = 4; +pub const KENV_DUMP_STATIC: c_int = 5; -pub const RB_PAUSE: ::c_int = 0x100000; -pub const RB_REROOT: ::c_int = 0x200000; -pub const RB_POWERCYCLE: ::c_int = 0x400000; -pub const RB_PROBE: ::c_int = 0x10000000; -pub const RB_MULTIPLE: ::c_int = 0x20000000; +pub const RB_PAUSE: c_int = 0x100000; +pub const RB_REROOT: c_int = 0x200000; +pub const RB_POWERCYCLE: c_int = 0x400000; +pub const RB_PROBE: c_int = 0x10000000; +pub const RB_MULTIPLE: c_int = 0x20000000; // sys/time.h -pub const CLOCK_BOOTTIME: ::clockid_t = ::CLOCK_UPTIME; -pub const CLOCK_REALTIME_COARSE: ::clockid_t = ::CLOCK_REALTIME_FAST; -pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = ::CLOCK_MONOTONIC_FAST; +pub const CLOCK_BOOTTIME: crate::clockid_t = crate::CLOCK_UPTIME; +pub const CLOCK_REALTIME_COARSE: crate::clockid_t = crate::CLOCK_REALTIME_FAST; +pub const CLOCK_MONOTONIC_COARSE: crate::clockid_t = crate::CLOCK_MONOTONIC_FAST; // sys/timerfd.h -pub const TFD_NONBLOCK: ::c_int = ::O_NONBLOCK; -pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC; -pub const TFD_TIMER_ABSTIME: ::c_int = 0x01; -pub const TFD_TIMER_CANCEL_ON_SET: ::c_int = 0x02; +pub const TFD_NONBLOCK: c_int = crate::O_NONBLOCK; +pub const TFD_CLOEXEC: c_int = O_CLOEXEC; +pub const TFD_TIMER_ABSTIME: c_int = 0x01; +pub const TFD_TIMER_CANCEL_ON_SET: c_int = 0x02; // sys/unistd.h -pub const CLOSE_RANGE_CLOEXEC: ::c_uint = 1 << 2; +pub const CLOSE_RANGE_CLOEXEC: c_uint = 1 << 2; -pub const KCMP_FILE: ::c_int = 100; -pub const KCMP_FILEOBJ: ::c_int = 101; -pub const KCMP_FILES: ::c_int = 102; -pub const KCMP_SIGHAND: ::c_int = 103; -pub const KCMP_VM: ::c_int = 104; +pub const KCMP_FILE: c_int = 100; +pub const KCMP_FILEOBJ: c_int = 101; +pub const KCMP_FILES: c_int = 102; +pub const KCMP_SIGHAND: c_int = 103; +pub const KCMP_VM: c_int = 104; -pub const fn MAP_ALIGNED(a: ::c_int) -> ::c_int { +pub const fn MAP_ALIGNED(a: c_int) -> c_int { a << 24 } @@ -4896,52 +4900,52 @@ const_fn! { } f! { - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - _ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + _ALIGN(crate::mem::size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { - return ::CMSG_FIRSTHDR(mhdr); + return crate::CMSG_FIRSTHDR(mhdr); }; let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) - + _ALIGN(::mem::size_of::<::cmsghdr>()); + + _ALIGN(crate::mem::size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { - (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr + (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (_ALIGN(::mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize)) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (_ALIGN(crate::mem::size_of::()) + _ALIGN(length as usize)) as c_uint } - pub fn MALLOCX_ALIGN(lg: ::c_uint) -> ::c_int { - ffsl(lg as ::c_long - 1) + pub fn MALLOCX_ALIGN(lg: c_uint) -> c_int { + ffsl(lg as c_long - 1) } - pub {const} fn MALLOCX_TCACHE(tc: ::c_int) -> ::c_int { - (tc + 2) << 8 as ::c_int + pub {const} fn MALLOCX_TCACHE(tc: c_int) -> c_int { + (tc + 2) << 8 as c_int } - pub {const} fn MALLOCX_ARENA(a: ::c_int) -> ::c_int { - (a + 1) << 20 as ::c_int + pub {const} fn MALLOCX_ARENA(a: c_int) -> c_int { + (a + 1) << 20 as c_int } pub fn SOCKCREDSIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; - ::mem::size_of::() + ::mem::size_of::<::gid_t>() * ngrps + crate::mem::size_of::() + crate::mem::size_of::() * ngrps } - pub fn uname(buf: *mut ::utsname) -> ::c_int { - __xuname(256, buf as *mut ::c_void) + pub fn uname(buf: *mut crate::utsname) -> c_int { + __xuname(256, buf as *mut c_void) } pub fn CPU_ZERO(cpuset: &mut cpuset_t) -> () { @@ -4957,56 +4961,56 @@ f! { } pub fn CPU_SET(cpu: usize, cpuset: &mut cpuset_t) -> () { - let bitset_bits = 8 * ::mem::size_of::<::c_long>(); + let bitset_bits = 8 * crate::mem::size_of::(); let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits); cpuset.__bits[idx] |= 1 << offset; () } pub fn CPU_CLR(cpu: usize, cpuset: &mut cpuset_t) -> () { - let bitset_bits = 8 * ::mem::size_of::<::c_long>(); + let bitset_bits = 8 * crate::mem::size_of::(); let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits); cpuset.__bits[idx] &= !(1 << offset); () } pub fn CPU_ISSET(cpu: usize, cpuset: &cpuset_t) -> bool { - let bitset_bits = 8 * ::mem::size_of::<::c_long>(); + let bitset_bits = 8 * crate::mem::size_of::(); let (idx, offset) = (cpu / bitset_bits, cpu % bitset_bits); 0 != cpuset.__bits[idx] & (1 << offset) } - pub fn CPU_COUNT(cpuset: &cpuset_t) -> ::c_int { + pub fn CPU_COUNT(cpuset: &cpuset_t) -> c_int { let mut s: u32 = 0; - let cpuset_size = ::mem::size_of::(); - let bitset_size = ::mem::size_of::<::c_long>(); + let cpuset_size = crate::mem::size_of::(); + let bitset_size = crate::mem::size_of::(); for i in cpuset.__bits[..(cpuset_size / bitset_size)].iter() { s += i.count_ones(); } - s as ::c_int + s as c_int } pub fn SOCKCRED2SIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; - ::mem::size_of::() + ::mem::size_of::<::gid_t>() * ngrps + crate::mem::size_of::() + crate::mem::size_of::() * ngrps } - pub fn PROT_MAX(x: ::c_int) -> ::c_int { + pub fn PROT_MAX(x: c_int) -> c_int { x << 16 } - pub fn PROT_MAX_EXTRACT(x: ::c_int) -> ::c_int { - (x >> 16) & (::PROT_READ | ::PROT_WRITE | ::PROT_EXEC) + pub fn PROT_MAX_EXTRACT(x: c_int) -> c_int { + (x >> 16) & (crate::PROT_READ | crate::PROT_WRITE | crate::PROT_EXEC) } } safe_f! { - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 && status != 0x13 } - pub {const} fn INVALID_SINFO_FLAG(x: ::c_int) -> bool { + pub {const} fn INVALID_SINFO_FLAG(x: c_int) -> bool { (x) & 0xfffffff0 & !(SCTP_EOF | SCTP_ABORT @@ -5018,31 +5022,31 @@ safe_f! { != 0 } - pub {const} fn PR_SCTP_POLICY(x: ::c_int) -> ::c_int { + pub {const} fn PR_SCTP_POLICY(x: c_int) -> c_int { x & 0x0f } - pub {const} fn PR_SCTP_ENABLED(x: ::c_int) -> bool { + pub {const} fn PR_SCTP_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) != SCTP_PR_SCTP_NONE && PR_SCTP_POLICY(x) != SCTP_PR_SCTP_ALL } - pub {const} fn PR_SCTP_TTL_ENABLED(x: ::c_int) -> bool { + pub {const} fn PR_SCTP_TTL_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_TTL } - pub {const} fn PR_SCTP_BUF_ENABLED(x: ::c_int) -> bool { + pub {const} fn PR_SCTP_BUF_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_BUF } - pub {const} fn PR_SCTP_RTX_ENABLED(x: ::c_int) -> bool { + pub {const} fn PR_SCTP_RTX_ENABLED(x: c_int) -> bool { PR_SCTP_POLICY(x) == SCTP_PR_SCTP_RTX } - pub {const} fn PR_SCTP_INVALID_POLICY(x: ::c_int) -> bool { + pub {const} fn PR_SCTP_INVALID_POLICY(x: c_int) -> bool { PR_SCTP_POLICY(x) > SCTP_PR_SCTP_MAX } - pub {const} fn PR_SCTP_VALID_POLICY(x: ::c_int) -> bool { + pub {const} fn PR_SCTP_VALID_POLICY(x: c_int) -> bool { PR_SCTP_POLICY(x) <= SCTP_PR_SCTP_MAX } } @@ -5050,19 +5054,10 @@ safe_f! { cfg_if! { if #[cfg(not(any(freebsd10, freebsd11)))] { extern "C" { - pub fn fhlink(fhp: *mut fhandle_t, to: *const ::c_char) -> ::c_int; - pub fn fhlinkat(fhp: *mut fhandle_t, tofd: ::c_int, to: *const ::c_char) -> ::c_int; - pub fn fhreadlink( - fhp: *mut fhandle_t, - buf: *mut ::c_char, - bufsize: ::size_t, - ) -> ::c_int; - pub fn getfhat( - fd: ::c_int, - path: *mut ::c_char, - fhp: *mut fhandle, - flag: ::c_int, - ) -> ::c_int; + pub fn fhlink(fhp: *mut fhandle_t, to: *const c_char) -> c_int; + pub fn fhlinkat(fhp: *mut fhandle_t, tofd: c_int, to: *const c_char) -> c_int; + pub fn fhreadlink(fhp: *mut fhandle_t, buf: *mut c_char, bufsize: size_t) -> c_int; + pub fn getfhat(fd: c_int, path: *mut c_char, fhp: *mut fhandle, flag: c_int) -> c_int; } } } @@ -5070,648 +5065,635 @@ cfg_if! { extern "C" { #[cfg_attr(doc, doc(alias = "__errno_location"))] #[cfg_attr(doc, doc(alias = "errno"))] - pub fn __error() -> *mut ::c_int; - - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_readv(aiocbp: *mut ::aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + pub fn __error() -> *mut c_int; + + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_readv(aiocbp: *mut crate::aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_writev(aiocbp: *mut ::aiocb) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; + pub fn aio_writev(aiocbp: *mut crate::aiocb) -> c_int; pub fn copy_file_range( - infd: ::c_int, - inoffp: *mut ::off_t, - outfd: ::c_int, - outoffp: *mut ::off_t, - len: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; + infd: c_int, + inoffp: *mut off_t, + outfd: c_int, + outoffp: *mut off_t, + len: size_t, + flags: c_uint, + ) -> ssize_t; pub fn devname_r( - dev: ::dev_t, - mode: ::mode_t, - buf: *mut ::c_char, - len: ::c_int, - ) -> *mut ::c_char; - - pub fn extattr_delete_fd( - fd: ::c_int, - attrnamespace: ::c_int, - attrname: *const ::c_char, - ) -> ::c_int; + dev: crate::dev_t, + mode: crate::mode_t, + buf: *mut c_char, + len: c_int, + ) -> *mut c_char; + + pub fn extattr_delete_fd(fd: c_int, attrnamespace: c_int, attrname: *const c_char) -> c_int; pub fn extattr_delete_file( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + ) -> c_int; pub fn extattr_delete_link( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + ) -> c_int; pub fn extattr_get_fd( - fd: ::c_int, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + fd: c_int, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_get_file( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_get_link( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_list_fd( - fd: ::c_int, - attrnamespace: ::c_int, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + fd: c_int, + attrnamespace: c_int, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_list_file( - path: *const ::c_char, - attrnamespace: ::c_int, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_list_link( - path: *const ::c_char, - attrnamespace: ::c_int, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_set_fd( - fd: ::c_int, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *const ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + fd: c_int, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_set_file( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *const ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_set_link( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *const ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> ssize_t; pub fn fspacectl( - fd: ::c_int, - cmd: ::c_int, + fd: c_int, + cmd: c_int, rqsr: *const spacectl_range, - flags: ::c_int, + flags: c_int, rmsr: *mut spacectl_range, - ) -> ::c_int; + ) -> c_int; - pub fn jail(jail: *mut ::jail) -> ::c_int; - pub fn jail_attach(jid: ::c_int) -> ::c_int; - pub fn jail_remove(jid: ::c_int) -> ::c_int; - pub fn jail_get(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn jail_set(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn jail(jail: *mut crate::jail) -> c_int; + pub fn jail_attach(jid: c_int) -> c_int; + pub fn jail_remove(jid: c_int) -> c_int; + pub fn jail_get(iov: *mut crate::iovec, niov: c_uint, flags: c_int) -> c_int; + pub fn jail_set(iov: *mut crate::iovec, niov: c_uint, flags: c_int) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, + nitems: c_int, sevp: *mut sigevent, - ) -> ::c_int; + ) -> c_int; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; - pub fn getutxuser(user: *const ::c_char) -> *mut utmpx; - pub fn setutxdb(_type: ::c_int, file: *const ::c_char) -> ::c_int; + pub fn getutxuser(user: *const c_char) -> *mut utmpx; + pub fn setutxdb(_type: c_int, file: *const c_char) -> c_int; - pub fn aio_waitcomplete(iocbp: *mut *mut aiocb, timeout: *mut ::timespec) -> ::ssize_t; - pub fn mq_getfd_np(mqd: ::mqd_t) -> ::c_int; + pub fn aio_waitcomplete(iocbp: *mut *mut aiocb, timeout: *mut crate::timespec) -> ssize_t; + pub fn mq_getfd_np(mqd: crate::mqd_t) -> c_int; pub fn waitid( idtype: idtype_t, - id: ::id_t, - infop: *mut ::siginfo_t, - options: ::c_int, - ) -> ::c_int; - pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; - - pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t; - pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn semget(key: ::key_t, nsems: ::c_int, semflg: ::c_int) -> ::c_int; - pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; - pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut ::msqid_ds) -> ::c_int; - pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int; - pub fn msgsnd( - msqid: ::c_int, - msgp: *const ::c_void, - msgsz: ::size_t, - msgflg: ::c_int, - ) -> ::c_int; - pub fn cfmakesane(termios: *mut ::termios); - - pub fn pdfork(fdp: *mut ::c_int, flags: ::c_int) -> ::pid_t; - pub fn pdgetpid(fd: ::c_int, pidp: *mut ::pid_t) -> ::c_int; - pub fn pdkill(fd: ::c_int, signum: ::c_int) -> ::c_int; - - pub fn rtprio_thread(function: ::c_int, lwpid: ::lwpid_t, rtp: *mut super::rtprio) -> ::c_int; + id: crate::id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; + pub fn ptsname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + + pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t; + pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; + pub fn semget(key: crate::key_t, nsems: c_int, semflg: c_int) -> c_int; + pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int; + pub fn semop(semid: c_int, sops: *mut sembuf, nsops: size_t) -> c_int; + pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut crate::msqid_ds) -> c_int; + pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int; + pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int; + pub fn cfmakesane(termios: *mut crate::termios); + + pub fn pdfork(fdp: *mut c_int, flags: c_int) -> crate::pid_t; + pub fn pdgetpid(fd: c_int, pidp: *mut crate::pid_t) -> c_int; + pub fn pdkill(fd: c_int, signum: c_int) -> c_int; + + pub fn rtprio_thread(function: c_int, lwpid: crate::lwpid_t, rtp: *mut super::rtprio) -> c_int; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, - flags: *mut ::c_int, - ) -> ::c_int; - pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; + flags: *mut c_int, + ) -> c_int; + pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int; pub fn posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, - param: *mut ::sched_param, - ) -> ::c_int; + param: *mut crate::sched_param, + ) -> c_int; pub fn posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, - param: *const ::sched_param, - ) -> ::c_int; + param: *const crate::sched_param, + ) -> c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; - pub fn uuidgen(store: *mut uuid, count: ::c_int) -> ::c_int; + pub fn uuidgen(store: *mut uuid, count: c_int) -> c_int; - pub fn thr_kill(id: ::c_long, sig: ::c_int) -> ::c_int; - pub fn thr_kill2(pid: ::pid_t, id: ::c_long, sig: ::c_int) -> ::c_int; - pub fn thr_self(tid: *mut ::c_long) -> ::c_int; - pub fn pthread_getthreadid_np() -> ::c_int; + pub fn thr_kill(id: c_long, sig: c_int) -> c_int; + pub fn thr_kill2(pid: crate::pid_t, id: c_long, sig: c_int) -> c_int; + pub fn thr_self(tid: *mut c_long) -> c_int; + pub fn pthread_getthreadid_np() -> c_int; pub fn pthread_getaffinity_np( - td: ::pthread_t, - cpusetsize: ::size_t, + td: crate::pthread_t, + cpusetsize: size_t, cpusetp: *mut cpuset_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_setaffinity_np( - td: ::pthread_t, - cpusetsize: ::size_t, + td: crate::pthread_t, + cpusetsize: size_t, cpusetp: *const cpuset_t, - ) -> ::c_int; + ) -> c_int; // sched.h linux compatibility api - pub fn sched_getaffinity(pid: ::pid_t, cpusetsz: ::size_t, cpuset: *mut ::cpuset_t) -> ::c_int; + pub fn sched_getaffinity( + pid: crate::pid_t, + cpusetsz: size_t, + cpuset: *mut crate::cpuset_t, + ) -> c_int; pub fn sched_setaffinity( - pid: ::pid_t, - cpusetsz: ::size_t, - cpuset: *const ::cpuset_t, - ) -> ::c_int; - pub fn sched_getcpu() -> ::c_int; + pid: crate::pid_t, + cpusetsz: size_t, + cpuset: *const crate::cpuset_t, + ) -> c_int; + pub fn sched_getcpu() -> c_int; - pub fn pthread_mutex_consistent(mutex: *mut ::pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_consistent(mutex: *mut crate::pthread_mutex_t) -> c_int; pub fn pthread_mutexattr_getrobust( - attr: *mut ::pthread_mutexattr_t, - robust: *mut ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_mutexattr_t, + robust: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_setrobust( - attr: *mut ::pthread_mutexattr_t, - robust: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_mutexattr_t, + robust: c_int, + ) -> c_int; - pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> ::c_int; + pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; #[cfg_attr(all(target_os = "freebsd", freebsd11), link_name = "statfs@FBSD_1.0")] - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; #[cfg_attr(all(target_os = "freebsd", freebsd11), link_name = "fstatfs@FBSD_1.0")] - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; - pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; - pub fn __xuname(nmln: ::c_int, buf: *mut ::c_void) -> ::c_int; + pub fn dup3(src: c_int, dst: c_int, flags: c_int) -> c_int; + pub fn __xuname(nmln: c_int, buf: *mut c_void) -> c_int; pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::size_t, - flags: ::c_int, - ) -> ::ssize_t; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: size_t, + flags: c_int, + ) -> ssize_t; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::size_t, - flags: ::c_int, - timeout: *const ::timespec, - ) -> ::ssize_t; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: size_t, + flags: c_int, + timeout: *const crate::timespec, + ) -> ssize_t; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; - - pub fn fhopen(fhp: *const fhandle_t, flags: ::c_int) -> ::c_int; - pub fn fhstat(fhp: *const fhandle, buf: *mut ::stat) -> ::c_int; - pub fn fhstatfs(fhp: *const fhandle_t, buf: *mut ::statfs) -> ::c_int; - pub fn getfh(path: *const ::c_char, fhp: *mut fhandle_t) -> ::c_int; - pub fn lgetfh(path: *const ::c_char, fhp: *mut fhandle_t) -> ::c_int; - pub fn getfsstat(buf: *mut ::statfs, bufsize: ::c_long, mode: ::c_int) -> ::c_int; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; + + pub fn fhopen(fhp: *const fhandle_t, flags: c_int) -> c_int; + pub fn fhstat(fhp: *const fhandle, buf: *mut crate::stat) -> c_int; + pub fn fhstatfs(fhp: *const fhandle_t, buf: *mut crate::statfs) -> c_int; + pub fn getfh(path: *const c_char, fhp: *mut fhandle_t) -> c_int; + pub fn lgetfh(path: *const c_char, fhp: *mut fhandle_t) -> c_int; + pub fn getfsstat(buf: *mut crate::statfs, bufsize: c_long, mode: c_int) -> c_int; #[cfg_attr( all(target_os = "freebsd", freebsd11), link_name = "getmntinfo@FBSD_1.0" )] - pub fn getmntinfo(mntbufp: *mut *mut ::statfs, mode: ::c_int) -> ::c_int; + pub fn getmntinfo(mntbufp: *mut *mut crate::statfs, mode: c_int) -> c_int; pub fn mount( - type_: *const ::c_char, - dir: *const ::c_char, - flags: ::c_int, - data: *mut ::c_void, - ) -> ::c_int; - pub fn nmount(iov: *mut ::iovec, niov: ::c_uint, flags: ::c_int) -> ::c_int; - - pub fn setproctitle(fmt: *const ::c_char, ...); - pub fn rfork(flags: ::c_int) -> ::c_int; + type_: *const c_char, + dir: *const c_char, + flags: c_int, + data: *mut c_void, + ) -> c_int; + pub fn nmount(iov: *mut crate::iovec, niov: c_uint, flags: c_int) -> c_int; + + pub fn setproctitle(fmt: *const c_char, ...); + pub fn rfork(flags: c_int) -> c_int; pub fn cpuset_getaffinity( level: cpulevel_t, which: cpuwhich_t, - id: ::id_t, - setsize: ::size_t, + id: crate::id_t, + setsize: size_t, mask: *mut cpuset_t, - ) -> ::c_int; + ) -> c_int; pub fn cpuset_setaffinity( level: cpulevel_t, which: cpuwhich_t, - id: ::id_t, - setsize: ::size_t, + id: crate::id_t, + setsize: size_t, mask: *const cpuset_t, - ) -> ::c_int; - pub fn cpuset(setid: *mut ::cpusetid_t) -> ::c_int; + ) -> c_int; + pub fn cpuset(setid: *mut crate::cpusetid_t) -> c_int; pub fn cpuset_getid( level: cpulevel_t, which: cpuwhich_t, - id: ::id_t, - setid: *mut ::cpusetid_t, - ) -> ::c_int; - pub fn cpuset_setid(which: cpuwhich_t, id: ::id_t, setid: ::cpusetid_t) -> ::c_int; - pub fn cap_enter() -> ::c_int; - pub fn cap_getmode(modep: *mut ::c_uint) -> ::c_int; - pub fn cap_fcntls_get(fd: ::c_int, fcntlrightsp: *mut u32) -> ::c_int; - pub fn cap_fcntls_limit(fd: ::c_int, fcntlrights: u32) -> ::c_int; - pub fn cap_ioctls_get(fd: ::c_int, cmds: *mut u_long, maxcmds: usize) -> isize; - pub fn cap_ioctls_limit(fd: ::c_int, cmds: *const u_long, ncmds: usize) -> ::c_int; - pub fn __cap_rights_init(version: ::c_int, rights: *mut cap_rights_t, ...) - -> *mut cap_rights_t; - pub fn __cap_rights_get(version: ::c_int, fd: ::c_int, rightsp: *mut cap_rights_t) -> ::c_int; + id: crate::id_t, + setid: *mut crate::cpusetid_t, + ) -> c_int; + pub fn cpuset_setid(which: cpuwhich_t, id: crate::id_t, setid: crate::cpusetid_t) -> c_int; + pub fn cap_enter() -> c_int; + pub fn cap_getmode(modep: *mut c_uint) -> c_int; + pub fn cap_fcntls_get(fd: c_int, fcntlrightsp: *mut u32) -> c_int; + pub fn cap_fcntls_limit(fd: c_int, fcntlrights: u32) -> c_int; + pub fn cap_ioctls_get(fd: c_int, cmds: *mut u_long, maxcmds: usize) -> isize; + pub fn cap_ioctls_limit(fd: c_int, cmds: *const u_long, ncmds: usize) -> c_int; + pub fn __cap_rights_init(version: c_int, rights: *mut cap_rights_t, ...) -> *mut cap_rights_t; + pub fn __cap_rights_get(version: c_int, fd: c_int, rightsp: *mut cap_rights_t) -> c_int; pub fn __cap_rights_set(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t; pub fn __cap_rights_clear(rights: *mut cap_rights_t, ...) -> *mut cap_rights_t; pub fn __cap_rights_is_set(rights: *const cap_rights_t, ...) -> bool; pub fn cap_rights_is_valid(rights: *const cap_rights_t) -> bool; - pub fn cap_rights_limit(fd: ::c_int, rights: *const cap_rights_t) -> ::c_int; + pub fn cap_rights_limit(fd: c_int, rights: *const cap_rights_t) -> c_int; pub fn cap_rights_merge(dst: *mut cap_rights_t, src: *const cap_rights_t) -> *mut cap_rights_t; pub fn cap_rights_remove(dst: *mut cap_rights_t, src: *const cap_rights_t) -> *mut cap_rights_t; pub fn cap_rights_contains(big: *const cap_rights_t, little: *const cap_rights_t) -> bool; pub fn cap_sandboxed() -> bool; - pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; - pub fn ffs(value: ::c_int) -> ::c_int; - pub fn ffsl(value: ::c_long) -> ::c_int; - pub fn ffsll(value: ::c_longlong) -> ::c_int; - pub fn fls(value: ::c_int) -> ::c_int; - pub fn flsl(value: ::c_long) -> ::c_int; - pub fn flsll(value: ::c_longlong) -> ::c_int; + pub fn ffs(value: c_int) -> c_int; + pub fn ffsl(value: c_long) -> c_int; + pub fn ffsll(value: c_longlong) -> c_int; + pub fn fls(value: c_int) -> c_int; + pub fn flsl(value: c_long) -> c_int; + pub fn flsll(value: c_longlong) -> c_int; pub fn malloc_stats_print( - write_cb: unsafe extern "C" fn(*mut ::c_void, *const ::c_char), - cbopaque: *mut ::c_void, - opt: *const ::c_char, + write_cb: unsafe extern "C" fn(*mut c_void, *const c_char), + cbopaque: *mut c_void, + opt: *const c_char, ); pub fn mallctl( - name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; - pub fn mallctlnametomib( - name: *const ::c_char, - mibp: *mut ::size_t, - miplen: *mut ::size_t, - ) -> ::c_int; + name: *const c_char, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; + pub fn mallctlnametomib(name: *const c_char, mibp: *mut size_t, miplen: *mut size_t) -> c_int; pub fn mallctlbymib( - mib: *const ::size_t, - mible: ::size_t, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; - pub fn mallocx(size: ::size_t, flags: ::c_int) -> *mut ::c_void; - pub fn rallocx(ptr: *mut ::c_void, size: ::size_t, flags: ::c_int) -> *mut ::c_void; - pub fn xallocx(ptr: *mut ::c_void, size: ::size_t, extra: ::size_t, flags: ::c_int) - -> ::size_t; - pub fn sallocx(ptr: *const ::c_void, flags: ::c_int) -> ::size_t; - pub fn dallocx(ptr: *mut ::c_void, flags: ::c_int); - pub fn sdallocx(ptr: *mut ::c_void, size: ::size_t, flags: ::c_int); - pub fn nallocx(size: ::size_t, flags: ::c_int) -> ::size_t; - - pub fn procctl(idtype: ::idtype_t, id: ::id_t, cmd: ::c_int, data: *mut ::c_void) -> ::c_int; - - pub fn getpagesize() -> ::c_int; - pub fn getpagesizes(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; - - pub fn clock_getcpuclockid2(arg1: ::id_t, arg2: ::c_int, arg3: *mut clockid_t) -> ::c_int; - pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char; + mib: *const size_t, + mible: size_t, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; + pub fn mallocx(size: size_t, flags: c_int) -> *mut c_void; + pub fn rallocx(ptr: *mut c_void, size: size_t, flags: c_int) -> *mut c_void; + pub fn xallocx(ptr: *mut c_void, size: size_t, extra: size_t, flags: c_int) -> size_t; + pub fn sallocx(ptr: *const c_void, flags: c_int) -> size_t; + pub fn dallocx(ptr: *mut c_void, flags: c_int); + pub fn sdallocx(ptr: *mut c_void, size: size_t, flags: c_int); + pub fn nallocx(size: size_t, flags: c_int) -> size_t; + + pub fn procctl( + idtype: crate::idtype_t, + id: crate::id_t, + cmd: c_int, + data: *mut c_void, + ) -> c_int; + + pub fn getpagesize() -> c_int; + pub fn getpagesizes(pagesize: *mut size_t, nelem: c_int) -> c_int; + + pub fn clock_getcpuclockid2(arg1: crate::id_t, arg2: c_int, arg3: *mut clockid_t) -> c_int; + pub fn strchrnul(s: *const c_char, c: c_int) -> *mut c_char; pub fn shm_create_largepage( - path: *const ::c_char, - flags: ::c_int, - psind: ::c_int, - alloc_policy: ::c_int, - mode: ::mode_t, - ) -> ::c_int; - pub fn shm_rename( - path_from: *const ::c_char, - path_to: *const ::c_char, - flags: ::c_int, - ) -> ::c_int; - pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int; - pub fn setaudit(auditinfo: *const auditinfo_t) -> ::c_int; - - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn eventfd_read(fd: ::c_int, value: *mut eventfd_t) -> ::c_int; - pub fn eventfd_write(fd: ::c_int, value: eventfd_t) -> ::c_int; - - pub fn fdatasync(fd: ::c_int) -> ::c_int; - - pub fn elf_aux_info(aux: ::c_int, buf: *mut ::c_void, buflen: ::c_int) -> ::c_int; - pub fn setproctitle_fast(fmt: *const ::c_char, ...); - pub fn timingsafe_bcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn timingsafe_memcmp(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int; + path: *const c_char, + flags: c_int, + psind: c_int, + alloc_policy: c_int, + mode: crate::mode_t, + ) -> c_int; + pub fn shm_rename(path_from: *const c_char, path_to: *const c_char, flags: c_int) -> c_int; + pub fn memfd_create(name: *const c_char, flags: c_uint) -> c_int; + pub fn setaudit(auditinfo: *const auditinfo_t) -> c_int; + + pub fn eventfd(init: c_uint, flags: c_int) -> c_int; + pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int; + pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int; + + pub fn fdatasync(fd: c_int) -> c_int; + + pub fn elf_aux_info(aux: c_int, buf: *mut c_void, buflen: c_int) -> c_int; + pub fn setproctitle_fast(fmt: *const c_char, ...); + pub fn timingsafe_bcmp(a: *const c_void, b: *const c_void, len: size_t) -> c_int; + pub fn timingsafe_memcmp(a: *const c_void, b: *const c_void, len: size_t) -> c_int; pub fn _umtx_op( - obj: *mut ::c_void, - op: ::c_int, - val: ::c_ulong, - uaddr: *mut ::c_void, - uaddr2: *mut ::c_void, - ) -> ::c_int; - - pub fn sctp_peeloff(s: ::c_int, id: ::sctp_assoc_t) -> ::c_int; - pub fn sctp_bindx(s: ::c_int, addrs: *mut ::sockaddr, num: ::c_int, tpe: ::c_int) -> ::c_int; + obj: *mut c_void, + op: c_int, + val: c_ulong, + uaddr: *mut c_void, + uaddr2: *mut c_void, + ) -> c_int; + + pub fn sctp_peeloff(s: c_int, id: crate::sctp_assoc_t) -> c_int; + pub fn sctp_bindx(s: c_int, addrs: *mut crate::sockaddr, num: c_int, tpe: c_int) -> c_int; pub fn sctp_connectx( - s: ::c_int, - addrs: *const ::sockaddr, - addrcnt: ::c_int, - id: *mut ::sctp_assoc_t, - ) -> ::c_int; - pub fn sctp_getaddrlen(family: ::sa_family_t) -> ::c_int; + s: c_int, + addrs: *const crate::sockaddr, + addrcnt: c_int, + id: *mut crate::sctp_assoc_t, + ) -> c_int; + pub fn sctp_getaddrlen(family: crate::sa_family_t) -> c_int; pub fn sctp_getpaddrs( - s: ::c_int, - asocid: ::sctp_assoc_t, - addrs: *mut *mut ::sockaddr, - ) -> ::c_int; - pub fn sctp_freepaddrs(addrs: *mut ::sockaddr); + s: c_int, + asocid: crate::sctp_assoc_t, + addrs: *mut *mut crate::sockaddr, + ) -> c_int; + pub fn sctp_freepaddrs(addrs: *mut crate::sockaddr); pub fn sctp_getladdrs( - s: ::c_int, - asocid: ::sctp_assoc_t, - addrs: *mut *mut ::sockaddr, - ) -> ::c_int; - pub fn sctp_freeladdrs(addrs: *mut ::sockaddr); + s: c_int, + asocid: crate::sctp_assoc_t, + addrs: *mut *mut crate::sockaddr, + ) -> c_int; + pub fn sctp_freeladdrs(addrs: *mut crate::sockaddr); pub fn sctp_opt_info( - s: ::c_int, - id: ::sctp_assoc_t, - opt: ::c_int, - arg: *mut ::c_void, - size: *mut ::socklen_t, - ) -> ::c_int; + s: c_int, + id: crate::sctp_assoc_t, + opt: c_int, + arg: *mut c_void, + size: *mut crate::socklen_t, + ) -> c_int; pub fn sctp_sendv( - sd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - addrs: *mut ::sockaddr, - addrcnt: ::c_int, - info: *mut ::c_void, - infolen: ::socklen_t, - infotype: ::c_uint, - flags: ::c_int, - ) -> ::ssize_t; + sd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + addrs: *mut crate::sockaddr, + addrcnt: c_int, + info: *mut c_void, + infolen: crate::socklen_t, + infotype: c_uint, + flags: c_int, + ) -> ssize_t; pub fn sctp_recvv( - sd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - from: *mut ::sockaddr, - fromlen: *mut ::socklen_t, - info: *mut ::c_void, - infolen: *mut ::socklen_t, - infotype: *mut ::c_uint, - flags: *mut ::c_int, - ) -> ::ssize_t; - - pub fn timerfd_create(clockid: ::c_int, flags: ::c_int) -> ::c_int; - pub fn timerfd_gettime(fd: ::c_int, curr_value: *mut itimerspec) -> ::c_int; + sd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + from: *mut crate::sockaddr, + fromlen: *mut crate::socklen_t, + info: *mut c_void, + infolen: *mut crate::socklen_t, + infotype: *mut c_uint, + flags: *mut c_int, + ) -> ssize_t; + + pub fn timerfd_create(clockid: c_int, flags: c_int) -> c_int; + pub fn timerfd_gettime(fd: c_int, curr_value: *mut itimerspec) -> c_int; pub fn timerfd_settime( - fd: ::c_int, - flags: ::c_int, + fd: c_int, + flags: c_int, new_value: *const itimerspec, old_value: *mut itimerspec, - ) -> ::c_int; - pub fn closefrom(lowfd: ::c_int); - pub fn close_range(lowfd: ::c_uint, highfd: ::c_uint, flags: ::c_int) -> ::c_int; + ) -> c_int; + pub fn closefrom(lowfd: c_int); + pub fn close_range(lowfd: c_uint, highfd: c_uint, flags: c_int) -> c_int; pub fn execvpe( - file: *const ::c_char, - argv: *const *const ::c_char, - envp: *const *const ::c_char, - ) -> ::c_int; + file: *const c_char, + argv: *const *const c_char, + envp: *const *const c_char, + ) -> c_int; pub fn kcmp( - pid1: ::pid_t, - pid2: ::pid_t, - type_: ::c_int, - idx1: ::c_ulong, - idx2: ::c_ulong, - ) -> ::c_int; + pid1: crate::pid_t, + pid2: crate::pid_t, + type_: c_int, + idx1: c_ulong, + idx2: c_ulong, + ) -> c_int; } #[link(name = "memstat")] extern "C" { - pub fn memstat_strerror(error: ::c_int) -> *const ::c_char; + pub fn memstat_strerror(error: c_int) -> *const c_char; pub fn memstat_mtl_alloc() -> *mut memory_type_list; pub fn memstat_mtl_first(list: *mut memory_type_list) -> *mut memory_type; pub fn memstat_mtl_next(mtp: *mut memory_type) -> *mut memory_type; pub fn memstat_mtl_find( list: *mut memory_type_list, - allocator: ::c_int, - name: *const ::c_char, + allocator: c_int, + name: *const c_char, ) -> *mut memory_type; pub fn memstat_mtl_free(list: *mut memory_type_list); - pub fn memstat_mtl_geterror(list: *mut memory_type_list) -> ::c_int; - pub fn memstat_get_name(mtp: *const memory_type) -> *const ::c_char; + pub fn memstat_mtl_geterror(list: *mut memory_type_list) -> c_int; + pub fn memstat_get_name(mtp: *const memory_type) -> *const c_char; } #[link(name = "kvm")] extern "C" { - pub fn kvm_dpcpu_setcpu(kd: *mut ::kvm_t, cpu: ::c_uint) -> ::c_int; - pub fn kvm_getargv(kd: *mut ::kvm_t, p: *const kinfo_proc, nchr: ::c_int) - -> *mut *mut ::c_char; - pub fn kvm_getcptime(kd: *mut ::kvm_t, cp_time: *mut ::c_long) -> ::c_int; - pub fn kvm_getenvv(kd: *mut ::kvm_t, p: *const kinfo_proc, nchr: ::c_int) - -> *mut *mut ::c_char; - pub fn kvm_geterr(kd: *mut ::kvm_t) -> *mut ::c_char; - pub fn kvm_getmaxcpu(kd: *mut ::kvm_t) -> ::c_int; - pub fn kvm_getncpus(kd: *mut ::kvm_t) -> ::c_int; - pub fn kvm_getpcpu(kd: *mut ::kvm_t, cpu: ::c_int) -> *mut ::c_void; - pub fn kvm_counter_u64_fetch(kd: *mut ::kvm_t, base: ::c_ulong) -> u64; + pub fn kvm_dpcpu_setcpu(kd: *mut crate::kvm_t, cpu: c_uint) -> c_int; + pub fn kvm_getargv( + kd: *mut crate::kvm_t, + p: *const kinfo_proc, + nchr: c_int, + ) -> *mut *mut c_char; + pub fn kvm_getcptime(kd: *mut crate::kvm_t, cp_time: *mut c_long) -> c_int; + pub fn kvm_getenvv( + kd: *mut crate::kvm_t, + p: *const kinfo_proc, + nchr: c_int, + ) -> *mut *mut c_char; + pub fn kvm_geterr(kd: *mut crate::kvm_t) -> *mut c_char; + pub fn kvm_getmaxcpu(kd: *mut crate::kvm_t) -> c_int; + pub fn kvm_getncpus(kd: *mut crate::kvm_t) -> c_int; + pub fn kvm_getpcpu(kd: *mut crate::kvm_t, cpu: c_int) -> *mut c_void; + pub fn kvm_counter_u64_fetch(kd: *mut crate::kvm_t, base: c_ulong) -> u64; pub fn kvm_getswapinfo( - kd: *mut ::kvm_t, + kd: *mut crate::kvm_t, info: *mut kvm_swap, - maxswap: ::c_int, - flags: ::c_int, - ) -> ::c_int; - pub fn kvm_native(kd: *mut ::kvm_t) -> ::c_int; - pub fn kvm_nlist(kd: *mut ::kvm_t, nl: *mut nlist) -> ::c_int; - pub fn kvm_nlist2(kd: *mut ::kvm_t, nl: *mut kvm_nlist) -> ::c_int; + maxswap: c_int, + flags: c_int, + ) -> c_int; + pub fn kvm_native(kd: *mut crate::kvm_t) -> c_int; + pub fn kvm_nlist(kd: *mut crate::kvm_t, nl: *mut nlist) -> c_int; + pub fn kvm_nlist2(kd: *mut crate::kvm_t, nl: *mut kvm_nlist) -> c_int; pub fn kvm_read_zpcpu( - kd: *mut ::kvm_t, - base: ::c_ulong, - buf: *mut ::c_void, - size: ::size_t, - cpu: ::c_int, - ) -> ::ssize_t; + kd: *mut crate::kvm_t, + base: c_ulong, + buf: *mut c_void, + size: size_t, + cpu: c_int, + ) -> ssize_t; pub fn kvm_read2( - kd: *mut ::kvm_t, + kd: *mut crate::kvm_t, addr: kvaddr_t, - buf: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + buf: *mut c_void, + nbytes: size_t, + ) -> ssize_t; } #[link(name = "util")] extern "C" { - pub fn extattr_namespace_to_string( - attrnamespace: ::c_int, - string: *mut *mut ::c_char, - ) -> ::c_int; - pub fn extattr_string_to_namespace( - string: *const ::c_char, - attrnamespace: *mut ::c_int, - ) -> ::c_int; - pub fn realhostname(host: *mut ::c_char, hsize: ::size_t, ip: *const ::in_addr) -> ::c_int; + pub fn extattr_namespace_to_string(attrnamespace: c_int, string: *mut *mut c_char) -> c_int; + pub fn extattr_string_to_namespace(string: *const c_char, attrnamespace: *mut c_int) -> c_int; + pub fn realhostname(host: *mut c_char, hsize: size_t, ip: *const crate::in_addr) -> c_int; pub fn realhostname_sa( - host: *mut ::c_char, - hsize: ::size_t, - addr: *mut ::sockaddr, - addrlen: ::c_int, - ) -> ::c_int; + host: *mut c_char, + hsize: size_t, + addr: *mut crate::sockaddr, + addrlen: c_int, + ) -> c_int; - pub fn kld_isloaded(name: *const ::c_char) -> ::c_int; - pub fn kld_load(name: *const ::c_char) -> ::c_int; + pub fn kld_isloaded(name: *const c_char) -> c_int; + pub fn kld_load(name: *const c_char) -> c_int; - pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::c_int) -> *mut kinfo_vmentry; + pub fn kinfo_getvmmap(pid: crate::pid_t, cntp: *mut c_int) -> *mut kinfo_vmentry; - pub fn hexdump(ptr: *const ::c_void, length: ::c_int, hdr: *const ::c_char, flags: ::c_int); + pub fn hexdump(ptr: *const c_void, length: c_int, hdr: *const c_char, flags: c_int); pub fn humanize_number( - buf: *mut ::c_char, - len: ::size_t, + buf: *mut c_char, + len: size_t, number: i64, - suffix: *const ::c_char, - scale: ::c_int, - flags: ::c_int, - ) -> ::c_int; + suffix: *const c_char, + scale: c_int, + flags: c_int, + ) -> c_int; - pub fn flopen(path: *const ::c_char, flags: ::c_int, ...) -> ::c_int; - pub fn flopenat(fd: ::c_int, path: *const ::c_char, flags: ::c_int, ...) -> ::c_int; + pub fn flopen(path: *const c_char, flags: c_int, ...) -> c_int; + pub fn flopenat(fd: c_int, path: *const c_char, flags: c_int, ...) -> c_int; - pub fn getlocalbase() -> *const ::c_char; + pub fn getlocalbase() -> *const c_char; pub fn pidfile_open( - path: *const ::c_char, - mode: ::mode_t, - pidptr: *mut ::pid_t, - ) -> *mut ::pidfh; - pub fn pidfile_write(path: *mut ::pidfh) -> ::c_int; - pub fn pidfile_close(path: *mut ::pidfh) -> ::c_int; - pub fn pidfile_remove(path: *mut ::pidfh) -> ::c_int; - pub fn pidfile_fileno(path: *const ::pidfh) -> ::c_int; + path: *const c_char, + mode: crate::mode_t, + pidptr: *mut crate::pid_t, + ) -> *mut crate::pidfh; + pub fn pidfile_write(path: *mut crate::pidfh) -> c_int; + pub fn pidfile_close(path: *mut crate::pidfh) -> c_int; + pub fn pidfile_remove(path: *mut crate::pidfh) -> c_int; + pub fn pidfile_fileno(path: *const crate::pidfh) -> c_int; // FIXME: pidfile_signal in due time (both manpage present and updated image snapshot) } @@ -5721,133 +5703,133 @@ extern "C" { pub fn procstat_getfiles( procstat: *mut procstat, kp: *mut kinfo_proc, - mmapped: ::c_int, + mmapped: c_int, ) -> *mut filestat_list; pub fn procstat_freefiles(procstat: *mut procstat, head: *mut filestat_list); pub fn procstat_getprocs( procstat: *mut procstat, - what: ::c_int, - arg: ::c_int, - count: *mut ::c_uint, + what: c_int, + arg: c_int, + count: *mut c_uint, ) -> *mut kinfo_proc; pub fn procstat_freeprocs(procstat: *mut procstat, p: *mut kinfo_proc); pub fn procstat_getvmmap( procstat: *mut procstat, kp: *mut kinfo_proc, - count: *mut ::c_uint, + count: *mut c_uint, ) -> *mut kinfo_vmentry; pub fn procstat_freevmmap(procstat: *mut procstat, vmmap: *mut kinfo_vmentry); pub fn procstat_close(procstat: *mut procstat); pub fn procstat_freeargv(procstat: *mut procstat); pub fn procstat_freeenvv(procstat: *mut procstat); - pub fn procstat_freegroups(procstat: *mut procstat, groups: *mut ::gid_t); + pub fn procstat_freegroups(procstat: *mut procstat, groups: *mut crate::gid_t); pub fn procstat_freeptlwpinfo(procstat: *mut procstat, pl: *mut ptrace_lwpinfo); pub fn procstat_getargv( procstat: *mut procstat, kp: *mut kinfo_proc, - nchr: ::size_t, - ) -> *mut *mut ::c_char; + nchr: size_t, + ) -> *mut *mut c_char; pub fn procstat_getenvv( procstat: *mut procstat, kp: *mut kinfo_proc, - nchr: ::size_t, - ) -> *mut *mut ::c_char; + nchr: size_t, + ) -> *mut *mut c_char; pub fn procstat_getgroups( procstat: *mut procstat, kp: *mut kinfo_proc, - count: *mut ::c_uint, - ) -> *mut ::gid_t; + count: *mut c_uint, + ) -> *mut crate::gid_t; pub fn procstat_getosrel( procstat: *mut procstat, kp: *mut kinfo_proc, - osrelp: *mut ::c_int, - ) -> ::c_int; + osrelp: *mut c_int, + ) -> c_int; pub fn procstat_getpathname( procstat: *mut procstat, kp: *mut kinfo_proc, - pathname: *mut ::c_char, - maxlen: ::size_t, - ) -> ::c_int; + pathname: *mut c_char, + maxlen: size_t, + ) -> c_int; pub fn procstat_getrlimit( procstat: *mut procstat, kp: *mut kinfo_proc, - which: ::c_int, - rlimit: *mut ::rlimit, - ) -> ::c_int; + which: c_int, + rlimit: *mut crate::rlimit, + ) -> c_int; pub fn procstat_getumask( procstat: *mut procstat, kp: *mut kinfo_proc, - maskp: *mut ::c_ushort, - ) -> ::c_int; - pub fn procstat_open_core(filename: *const ::c_char) -> *mut procstat; - pub fn procstat_open_kvm(nlistf: *const ::c_char, memf: *const ::c_char) -> *mut procstat; + maskp: *mut c_ushort, + ) -> c_int; + pub fn procstat_open_core(filename: *const c_char) -> *mut procstat; + pub fn procstat_open_kvm(nlistf: *const c_char, memf: *const c_char) -> *mut procstat; pub fn procstat_get_socket_info( proc_: *mut procstat, fst: *mut filestat, sock: *mut sockstat, - errbuf: *mut ::c_char, - ) -> ::c_int; + errbuf: *mut c_char, + ) -> c_int; pub fn procstat_get_vnode_info( proc_: *mut procstat, fst: *mut filestat, vn: *mut vnstat, - errbuf: *mut ::c_char, - ) -> ::c_int; + errbuf: *mut c_char, + ) -> c_int; pub fn procstat_get_pts_info( proc_: *mut procstat, fst: *mut filestat, pts: *mut ptsstat, - errbuf: *mut ::c_char, - ) -> ::c_int; + errbuf: *mut c_char, + ) -> c_int; pub fn procstat_get_shm_info( proc_: *mut procstat, fst: *mut filestat, shm: *mut shmstat, - errbuf: *mut ::c_char, - ) -> ::c_int; + errbuf: *mut c_char, + ) -> c_int; } #[link(name = "rt")] extern "C" { - pub fn timer_create(clock_id: clockid_t, evp: *mut sigevent, timerid: *mut timer_t) -> ::c_int; - pub fn timer_delete(timerid: timer_t) -> ::c_int; - pub fn timer_getoverrun(timerid: timer_t) -> ::c_int; - pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> ::c_int; + pub fn timer_create(clock_id: clockid_t, evp: *mut sigevent, timerid: *mut timer_t) -> c_int; + pub fn timer_delete(timerid: timer_t) -> c_int; + pub fn timer_getoverrun(timerid: timer_t) -> c_int; + pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> c_int; pub fn timer_settime( timerid: timer_t, - flags: ::c_int, + flags: c_int, value: *const itimerspec, ovalue: *mut itimerspec, - ) -> ::c_int; + ) -> c_int; } #[link(name = "devstat")] extern "C" { - pub fn devstat_getnumdevs(kd: *mut ::kvm_t) -> ::c_int; - pub fn devstat_getgeneration(kd: *mut ::kvm_t) -> ::c_long; - pub fn devstat_getversion(kd: *mut ::kvm_t) -> ::c_int; - pub fn devstat_checkversion(kd: *mut ::kvm_t) -> ::c_int; + pub fn devstat_getnumdevs(kd: *mut crate::kvm_t) -> c_int; + pub fn devstat_getgeneration(kd: *mut crate::kvm_t) -> c_long; + pub fn devstat_getversion(kd: *mut crate::kvm_t) -> c_int; + pub fn devstat_checkversion(kd: *mut crate::kvm_t) -> c_int; pub fn devstat_selectdevs( dev_select: *mut *mut device_selection, - num_selected: *mut ::c_int, - num_selections: *mut ::c_int, - select_generation: *mut ::c_long, - current_generation: ::c_long, + num_selected: *mut c_int, + num_selections: *mut c_int, + select_generation: *mut c_long, + current_generation: c_long, devices: *mut devstat, - numdevs: ::c_int, + numdevs: c_int, matches: *mut devstat_match, - num_matches: ::c_int, - dev_selections: *mut *mut ::c_char, - num_dev_selections: ::c_int, + num_matches: c_int, + dev_selections: *mut *mut c_char, + num_dev_selections: c_int, select_mode: devstat_select_mode, - maxshowdevs: ::c_int, - perf_select: ::c_int, - ) -> ::c_int; + maxshowdevs: c_int, + perf_select: c_int, + ) -> c_int; pub fn devstat_buildmatch( - match_str: *mut ::c_char, + match_str: *mut c_char, matches: *mut *mut devstat_match, - num_matches: *mut ::c_int, - ) -> ::c_int; + num_matches: *mut c_int, + ) -> c_int; } cfg_if! { diff --git a/src/unix/bsd/freebsdlike/freebsd/powerpc.rs b/src/unix/bsd/freebsdlike/freebsd/powerpc.rs index 0c2e3a668bf9a..beec2dfae9679 100644 --- a/src/unix/bsd/freebsdlike/freebsd/powerpc.rs +++ b/src/unix/bsd/freebsdlike/freebsd/powerpc.rs @@ -1,3 +1,5 @@ +use crate::{c_int, size_t}; + pub type c_char = u8; pub type c_long = i32; pub type c_ulong = u32; @@ -10,13 +12,13 @@ pub type register_t = i32; s_no_extra_traits! { #[repr(align(16))] pub struct mcontext_t { - pub mc_vers: ::c_int, - pub mc_flags: ::c_int, - pub mc_onstack: ::c_int, - pub mc_len: ::c_int, + pub mc_vers: c_int, + pub mc_flags: c_int, + pub mc_onstack: c_int, + pub mc_len: c_int, pub mc_avec: [u64; 64], pub mc_av: [u32; 2], - pub mc_frame: [::register_t; 42], + pub mc_frame: [crate::register_t; 42], pub mc_fpreg: [u64; 33], pub mc_vsxfpreg: [u64; 32], } @@ -38,8 +40,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_vers", &self.mc_vers) .field("mc_flags", &self.mc_flags) @@ -53,8 +55,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_vers.hash(state); self.mc_flags.hash(state); self.mc_onstack.hash(state); @@ -69,10 +71,10 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; -pub const MAP_32BIT: ::c_int = 0x00080000; -pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; +pub const MAP_32BIT: c_int = 0x00080000; +pub const MINSIGSTKSZ: size_t = 2048; // 512 * 4 +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; diff --git a/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs b/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs index b1e76001370e1..5f9ed7a5c2d95 100644 --- a/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/powerpc64.rs @@ -1,3 +1,5 @@ +use crate::{c_int, size_t}; + pub type c_char = u8; pub type c_long = i64; pub type c_ulong = u64; @@ -10,13 +12,13 @@ pub type register_t = i64; s_no_extra_traits! { #[repr(align(16))] pub struct mcontext_t { - pub mc_vers: ::c_int, - pub mc_flags: ::c_int, - pub mc_onstack: ::c_int, - pub mc_len: ::c_int, + pub mc_vers: c_int, + pub mc_flags: c_int, + pub mc_onstack: c_int, + pub mc_len: c_int, pub mc_avec: [u64; 64], pub mc_av: [u32; 2], - pub mc_frame: [::register_t; 42], + pub mc_frame: [crate::register_t; 42], pub mc_fpreg: [u64; 33], pub mc_vsxfpreg: [u64; 32], } @@ -38,8 +40,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_vers", &self.mc_vers) .field("mc_flags", &self.mc_flags) @@ -53,8 +55,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_vers.hash(state); self.mc_flags.hash(state); self.mc_onstack.hash(state); @@ -69,11 +71,11 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; -pub const MAP_32BIT: ::c_int = 0x00080000; -pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const MAP_32BIT: c_int = 0x00080000; +pub const MINSIGSTKSZ: size_t = 2048; // 512 * 4 +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; diff --git a/src/unix/bsd/freebsdlike/freebsd/riscv64.rs b/src/unix/bsd/freebsdlike/freebsd/riscv64.rs index 85afef02975bf..5864a88d7d616 100644 --- a/src/unix/bsd/freebsdlike/freebsd/riscv64.rs +++ b/src/unix/bsd/freebsdlike/freebsd/riscv64.rs @@ -1,37 +1,39 @@ +use crate::{c_int, c_longlong, size_t}; + pub type c_char = u8; pub type c_long = i64; pub type c_ulong = u64; pub type clock_t = i32; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; pub type time_t = i64; -pub type suseconds_t = ::c_long; +pub type suseconds_t = c_long; pub type register_t = i64; s_no_extra_traits! { pub struct gpregs { - pub gp_ra: ::register_t, - pub gp_sp: ::register_t, - pub gp_gp: ::register_t, - pub gp_tp: ::register_t, - pub gp_t: [::register_t; 7], - pub gp_s: [::register_t; 12], - pub gp_a: [::register_t; 8], - pub gp_sepc: ::register_t, - pub gp_sstatus: ::register_t, + pub gp_ra: crate::register_t, + pub gp_sp: crate::register_t, + pub gp_gp: crate::register_t, + pub gp_tp: crate::register_t, + pub gp_t: [crate::register_t; 7], + pub gp_s: [crate::register_t; 12], + pub gp_a: [crate::register_t; 8], + pub gp_sepc: crate::register_t, + pub gp_sstatus: crate::register_t, } pub struct fpregs { pub fp_x: [[u64; 2]; 32], pub fp_fcsr: u64, - pub fp_flags: ::c_int, - pub pad: ::c_int, + pub fp_flags: c_int, + pub pad: c_int, } pub struct mcontext_t { pub mc_gpregs: gpregs, pub mc_fpregs: fpregs, - pub mc_flags: ::c_int, - pub mc_pad: ::c_int, + pub mc_flags: c_int, + pub mc_pad: c_int, pub mc_spare: [u64; 8], } } @@ -52,8 +54,8 @@ cfg_if! { } } impl Eq for gpregs {} - impl ::fmt::Debug for gpregs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for gpregs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("gpregs") .field("gp_ra", &self.gp_ra) .field("gp_sp", &self.gp_sp) @@ -67,8 +69,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for gpregs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for gpregs { + fn hash(&self, state: &mut H) { self.gp_ra.hash(state); self.gp_sp.hash(state); self.gp_gp.hash(state); @@ -89,8 +91,8 @@ cfg_if! { } } impl Eq for fpregs {} - impl ::fmt::Debug for fpregs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpregs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpregs") .field("fp_x", &self.fp_x) .field("fp_fcsr", &self.fp_fcsr) @@ -99,8 +101,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fpregs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fpregs { + fn hash(&self, state: &mut H) { self.fp_x.hash(state); self.fp_fcsr.hash(state); self.fp_flags.hash(state); @@ -121,8 +123,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_gpregs", &self.mc_gpregs) .field("mc_fpregs", &self.mc_fpregs) @@ -132,8 +134,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_gpregs.hash(state); self.mc_fpregs.hash(state); self.mc_flags.hash(state); @@ -144,10 +146,10 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; -pub const MAP_32BIT: ::c_int = 0x00080000; -pub const MINSIGSTKSZ: ::size_t = 4096; // 1024 * 4 -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; +pub const MAP_32BIT: c_int = 0x00080000; +pub const MINSIGSTKSZ: size_t = 4096; // 1024 * 4 +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; diff --git a/src/unix/bsd/freebsdlike/freebsd/x86.rs b/src/unix/bsd/freebsdlike/freebsd/x86.rs index 2ad1cb61d8ee4..c7d908fd01898 100644 --- a/src/unix/bsd/freebsdlike/freebsd/x86.rs +++ b/src/unix/bsd/freebsdlike/freebsd/x86.rs @@ -1,7 +1,9 @@ +use crate::{c_int, size_t}; + pub type c_char = i8; pub type c_long = i32; pub type c_ulong = u32; -pub type clock_t = ::c_ulong; +pub type clock_t = c_ulong; pub type wchar_t = i32; pub type time_t = i32; pub type suseconds_t = i32; @@ -30,20 +32,20 @@ s_no_extra_traits! { pub mc_eflags: register_t, pub mc_esp: register_t, pub mc_ss: register_t, - pub mc_len: ::c_int, - pub mc_fpformat: ::c_int, - pub mc_ownedfp: ::c_int, + pub mc_len: c_int, + pub mc_fpformat: c_int, + pub mc_ownedfp: c_int, pub mc_flags: register_t, - pub mc_fpstate: [::c_int; 128], + pub mc_fpstate: [c_int; 128], pub mc_fsbase: register_t, pub mc_gsbase: register_t, pub mc_xfpustate: register_t, pub mc_xfpustate_len: register_t, - pub mc_spare2: [::c_int; 4], + pub mc_spare2: [c_int; 4], } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; cfg_if! { if #[cfg(feature = "extra_traits")] { @@ -90,8 +92,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_onstack", &self.mc_onstack) .field("mc_gs", &self.mc_gs) @@ -126,8 +128,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_onstack.hash(state); self.mc_gs.hash(state); self.mc_fs.hash(state); @@ -163,9 +165,9 @@ cfg_if! { } } -pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 +pub const MINSIGSTKSZ: size_t = 2048; // 512 * 4 -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8008426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4008426e; -pub const KINFO_FILE_SIZE: ::c_int = 1392; -pub const TIOCTIMESTAMP: ::c_ulong = 0x40087459; +pub const BIOCSRTIMEOUT: c_ulong = 0x8008426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4008426e; +pub const KINFO_FILE_SIZE: c_int = 1392; +pub const TIOCTIMESTAMP: c_ulong = 0x40087459; diff --git a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs index 093b3e87b6b26..912b5f39b6d80 100644 --- a/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs +++ b/src/unix/bsd/freebsdlike/freebsd/x86_64/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_void, size_t}; + pub type c_char = i8; pub type c_long = i64; pub type c_ulong = u64; @@ -83,13 +85,13 @@ s_no_extra_traits! { } pub union __c_anonymous_elf64_auxv_union { - pub a_val: ::c_long, - pub a_ptr: *mut ::c_void, + pub a_val: c_long, + pub a_ptr: *mut c_void, pub a_fcn: extern "C" fn(), } pub struct Elf64_Auxinfo { - pub a_type: ::c_long, + pub a_type: c_long, pub a_un: __c_anonymous_elf64_auxv_union, } @@ -157,8 +159,8 @@ cfg_if! { } } impl Eq for fpreg32 {} - impl ::fmt::Debug for fpreg32 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpreg32 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpreg32") .field("fpr_env", &&self.fpr_env[..]) .field("fpr_acc", &self.fpr_acc) @@ -167,8 +169,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fpreg32 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fpreg32 { + fn hash(&self, state: &mut H) { self.fpr_env.hash(state); self.fpr_acc.hash(state); self.fpr_ex_sw.hash(state); @@ -185,8 +187,8 @@ cfg_if! { } } impl Eq for fpreg {} - impl ::fmt::Debug for fpreg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpreg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpreg") .field("fpr_env", &self.fpr_env) .field("fpr_acc", &self.fpr_acc) @@ -195,8 +197,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fpreg { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fpreg { + fn hash(&self, state: &mut H) { self.fpr_env.hash(state); self.fpr_acc.hash(state); self.fpr_xacc.hash(state); @@ -217,8 +219,8 @@ cfg_if! { } } impl Eq for xmmreg {} - impl ::fmt::Debug for xmmreg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for xmmreg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("xmmreg") .field("xmm_env", &self.xmm_env) .field("xmm_acc", &self.xmm_acc) @@ -227,8 +229,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for xmmreg { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for xmmreg { + fn hash(&self, state: &mut H) { self.xmm_env.hash(state); self.xmm_acc.hash(state); self.xmm_reg.hash(state); @@ -246,8 +248,8 @@ cfg_if! { } } impl Eq for __c_anonymous_elf64_auxv_union {} - impl ::fmt::Debug for __c_anonymous_elf64_auxv_union { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_elf64_auxv_union { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("a_val") .field("a_val", unsafe { &self.a_val }) .finish() @@ -259,8 +261,8 @@ cfg_if! { } } impl Eq for Elf64_Auxinfo {} - impl ::fmt::Debug for Elf64_Auxinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for Elf64_Auxinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("Elf64_Auxinfo") .field("a_type", &self.a_type) .field("a_un", &self.a_un) @@ -315,8 +317,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("mc_onstack", &self.mc_onstack) .field("mc_rdi", &self.mc_rdi) @@ -359,8 +361,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.mc_onstack.hash(state); self.mc_rdi.hash(state); self.mc_rsi.hash(state); @@ -404,13 +406,13 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; -pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d; -pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e; +pub const BIOCSRTIMEOUT: c_ulong = 0x8010426d; +pub const BIOCGRTIMEOUT: c_ulong = 0x4010426e; -pub const MAP_32BIT: ::c_int = 0x00080000; -pub const MINSIGSTKSZ: ::size_t = 2048; // 512 * 4 +pub const MAP_32BIT: c_int = 0x00080000; +pub const MINSIGSTKSZ: size_t = 2048; // 512 * 4 pub const _MC_HASSEGS: u32 = 0x1; pub const _MC_HASBASES: u32 = 0x2; @@ -423,6 +425,6 @@ pub const _MC_FPOWNED_NONE: c_long = 0x20000; pub const _MC_FPOWNED_FPU: c_long = 0x20001; pub const _MC_FPOWNED_PCB: c_long = 0x20002; -pub const KINFO_FILE_SIZE: ::c_int = 1392; +pub const KINFO_FILE_SIZE: c_int = 1392; -pub const TIOCTIMESTAMP: ::c_ulong = 0x40107459; +pub const TIOCTIMESTAMP: c_ulong = 0x40107459; diff --git a/src/unix/bsd/freebsdlike/mod.rs b/src/unix/bsd/freebsdlike/mod.rs index 0c4bae1d0828a..10290703f5452 100644 --- a/src/unix/bsd/freebsdlike/mod.rs +++ b/src/unix/bsd/freebsdlike/mod.rs @@ -1,19 +1,24 @@ +use crate::{ + c_double, c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, off_t, size_t, + ssize_t, +}; + pub type mode_t = u16; -pub type pthread_attr_t = *mut ::c_void; +pub type pthread_attr_t = *mut c_void; pub type rlim_t = i64; -pub type pthread_mutex_t = *mut ::c_void; -pub type pthread_mutexattr_t = *mut ::c_void; -pub type pthread_cond_t = *mut ::c_void; -pub type pthread_condattr_t = *mut ::c_void; -pub type pthread_rwlock_t = *mut ::c_void; -pub type pthread_rwlockattr_t = *mut ::c_void; -pub type pthread_key_t = ::c_int; -pub type tcflag_t = ::c_uint; -pub type speed_t = ::c_uint; -pub type nl_item = ::c_int; +pub type pthread_mutex_t = *mut c_void; +pub type pthread_mutexattr_t = *mut c_void; +pub type pthread_cond_t = *mut c_void; +pub type pthread_condattr_t = *mut c_void; +pub type pthread_rwlock_t = *mut c_void; +pub type pthread_rwlockattr_t = *mut c_void; +pub type pthread_key_t = c_int; +pub type tcflag_t = c_uint; +pub type speed_t = c_uint; +pub type nl_item = c_int; pub type id_t = i64; -pub type vm_size_t = ::uintptr_t; -pub type key_t = ::c_long; +pub type vm_size_t = crate::uintptr_t; +pub type key_t = c_long; // elf.h @@ -33,11 +38,11 @@ pub type Elf64_Sxword = i64; pub type Elf64_Word = u32; pub type Elf64_Xword = u64; -pub type iconv_t = *mut ::c_void; +pub type iconv_t = *mut c_void; // It's an alias over "struct __kvm_t". However, its fields aren't supposed to be used directly, // making the type definition system dependent. Better not bind it exactly. -pub type kvm_t = ::c_void; +pub type kvm_t = c_void; cfg_if! { if #[cfg(target_pointer_width = "64")] { @@ -55,38 +60,38 @@ cfg_if! { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { self.si_value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.si_status } } s! { pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct ip_mreq { @@ -97,7 +102,7 @@ s! { pub struct ip_mreqn { pub imr_multiaddr: in_addr, pub imr_address: in_addr, - pub imr_ifindex: ::c_int, + pub imr_ifindex: c_int, } pub struct ip_mreq_source { @@ -107,27 +112,27 @@ s! { } pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_matchc: ::size_t, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, + pub gl_pathc: size_t, + pub gl_matchc: size_t, + pub gl_offs: size_t, + pub gl_flags: c_int, + pub gl_pathv: *mut *mut c_char, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, + __unused6: *mut c_void, + __unused7: *mut c_void, + __unused8: *mut c_void, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: crate::socklen_t, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, } @@ -136,114 +141,114 @@ s! { } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub si_pid: ::pid_t, - pub si_uid: ::uid_t, - pub si_status: ::c_int, - pub si_addr: *mut ::c_void, - pub si_value: ::sigval, - _pad1: ::c_long, - _pad2: [::c_int; 7], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub si_pid: crate::pid_t, + pub si_uid: crate::uid_t, + pub si_status: c_int, + pub si_addr: *mut c_void, + pub si_value: crate::sigval, + _pad1: c_long, + _pad2: [c_int; 7], } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_flags: ::c_int, + pub sa_sigaction: crate::sighandler_t, + pub sa_flags: c_int, pub sa_mask: sigset_t, } pub struct sched_param { - pub sched_priority: ::c_int, + pub sched_priority: c_int, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct flock { - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - pub l_type: ::c_short, - pub l_whence: ::c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, + pub l_type: c_short, + pub l_whence: c_short, #[cfg(not(target_os = "dragonfly"))] - pub l_sysid: ::c_int, + pub l_sysid: c_int, } pub struct sf_hdtr { - pub headers: *mut ::iovec, - pub hdr_cnt: ::c_int, - pub trailers: *mut ::iovec, - pub trl_cnt: ::c_int, + pub headers: *mut crate::iovec, + pub hdr_cnt: c_int, + pub trailers: *mut crate::iovec, + pub trl_cnt: c_int, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_n_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct cmsgcred { - pub cmcred_pid: ::pid_t, - pub cmcred_uid: ::uid_t, - pub cmcred_euid: ::uid_t, - pub cmcred_gid: ::gid_t, - pub cmcred_ngroups: ::c_short, - pub cmcred_groups: [::gid_t; CMGROUP_MAX], + pub cmcred_pid: crate::pid_t, + pub cmcred_uid: crate::uid_t, + pub cmcred_euid: crate::uid_t, + pub cmcred_gid: crate::gid_t, + pub cmcred_ngroups: c_short, + pub cmcred_groups: [crate::gid_t; CMGROUP_MAX], } pub struct rtprio { - pub type_: ::c_ushort, - pub prio: ::c_ushort, + pub type_: c_ushort, + pub prio: c_ushort, } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } pub struct arphdr { @@ -255,79 +260,79 @@ s! { } pub struct timex { - pub modes: ::c_uint, - pub offset: ::c_long, - pub freq: ::c_long, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub status: ::c_int, - pub constant: ::c_long, - pub precision: ::c_long, - pub tolerance: ::c_long, - pub ppsfreq: ::c_long, - pub jitter: ::c_long, - pub shift: ::c_int, - pub stabil: ::c_long, - pub jitcnt: ::c_long, - pub calcnt: ::c_long, - pub errcnt: ::c_long, - pub stbcnt: ::c_long, + pub modes: c_uint, + pub offset: c_long, + pub freq: c_long, + pub maxerror: c_long, + pub esterror: c_long, + pub status: c_int, + pub constant: c_long, + pub precision: c_long, + pub tolerance: c_long, + pub ppsfreq: c_long, + pub jitter: c_long, + pub shift: c_int, + pub stabil: c_long, + pub jitcnt: c_long, + pub calcnt: c_long, + pub errcnt: c_long, + pub stbcnt: c_long, } pub struct ntptimeval { - pub time: ::timespec, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub tai: ::c_long, - pub time_state: ::c_int, + pub time: crate::timespec, + pub maxerror: c_long, + pub esterror: c_long, + pub tai: c_long, + pub time_state: c_int, } pub struct accept_filter_arg { - pub af_name: [::c_char; 16], - af_arg: [::c_char; 240], + pub af_name: [c_char; 16], + af_arg: [c_char; 240], } pub struct ptrace_io_desc { - pub piod_op: ::c_int, - pub piod_offs: *mut ::c_void, - pub piod_addr: *mut ::c_void, - pub piod_len: ::size_t, + pub piod_op: c_int, + pub piod_offs: *mut c_void, + pub piod_addr: *mut c_void, + pub piod_len: size_t, } // bpf.h pub struct bpf_program { - pub bf_len: ::c_uint, + pub bf_len: c_uint, pub bf_insns: *mut bpf_insn, } pub struct bpf_stat { - pub bs_recv: ::c_uint, - pub bs_drop: ::c_uint, + pub bs_recv: c_uint, + pub bs_drop: c_uint, } pub struct bpf_version { - pub bv_major: ::c_ushort, - pub bv_minor: ::c_ushort, + pub bv_major: c_ushort, + pub bv_minor: c_ushort, } pub struct bpf_hdr { - pub bh_tstamp: ::timeval, + pub bh_tstamp: crate::timeval, pub bh_caplen: u32, pub bh_datalen: u32, - pub bh_hdrlen: ::c_ushort, + pub bh_hdrlen: c_ushort, } pub struct bpf_insn { - pub code: ::c_ushort, - pub jt: ::c_uchar, - pub jf: ::c_uchar, + pub code: c_ushort, + pub jt: c_uchar, + pub jf: c_uchar, pub k: u32, } pub struct bpf_dltlist { - bfl_len: ::c_uint, - bfl_list: *mut ::c_uint, + bfl_len: c_uint, + bfl_list: *mut c_uint, } // elf.h @@ -358,23 +363,23 @@ s! { pub struct dl_phdr_info { pub dlpi_addr: Elf_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, pub dlpi_phdr: *const Elf_Phdr, pub dlpi_phnum: Elf_Half, - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, pub dlpi_tls_modid: usize, - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_tls_data: *mut c_void, } pub struct ipc_perm { - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub mode: ::mode_t, - pub seq: ::c_ushort, - pub key: ::key_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub mode: crate::mode_t, + pub seq: c_ushort, + pub key: crate::key_t, } pub struct eui64 { @@ -385,7 +390,7 @@ s! { s_no_extra_traits! { pub struct sockaddr_storage { pub ss_len: u8, - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, __ss_pad1: [u8; 6], __ss_align: i64, __ss_pad2: [u8; 112], @@ -408,8 +413,8 @@ cfg_if! { } } impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -419,8 +424,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_len.hash(state); self.ss_family.hash(state); self.__ss_pad1.hash(state); @@ -432,128 +437,128 @@ cfg_if! { } // Non-public helper constant -const SIZEOF_LONG: usize = ::mem::size_of::<::c_long>(); +const SIZEOF_LONG: usize = crate::mem::size_of::(); #[deprecated( since = "0.2.64", note = "Can vary at runtime. Use sysconf(3) instead" )] -pub const AIO_LISTIO_MAX: ::c_int = 16; -pub const AIO_CANCELED: ::c_int = 1; -pub const AIO_NOTCANCELED: ::c_int = 2; -pub const AIO_ALLDONE: ::c_int = 3; -pub const LIO_NOP: ::c_int = 0; -pub const LIO_WRITE: ::c_int = 1; -pub const LIO_READ: ::c_int = 2; -pub const LIO_WAIT: ::c_int = 1; -pub const LIO_NOWAIT: ::c_int = 0; - -pub const SIGEV_NONE: ::c_int = 0; -pub const SIGEV_SIGNAL: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 2; -pub const SIGEV_KEVENT: ::c_int = 3; - -pub const CODESET: ::nl_item = 0; -pub const D_T_FMT: ::nl_item = 1; -pub const D_FMT: ::nl_item = 2; -pub const T_FMT: ::nl_item = 3; -pub const T_FMT_AMPM: ::nl_item = 4; -pub const AM_STR: ::nl_item = 5; -pub const PM_STR: ::nl_item = 6; - -pub const DAY_1: ::nl_item = 7; -pub const DAY_2: ::nl_item = 8; -pub const DAY_3: ::nl_item = 9; -pub const DAY_4: ::nl_item = 10; -pub const DAY_5: ::nl_item = 11; -pub const DAY_6: ::nl_item = 12; -pub const DAY_7: ::nl_item = 13; - -pub const ABDAY_1: ::nl_item = 14; -pub const ABDAY_2: ::nl_item = 15; -pub const ABDAY_3: ::nl_item = 16; -pub const ABDAY_4: ::nl_item = 17; -pub const ABDAY_5: ::nl_item = 18; -pub const ABDAY_6: ::nl_item = 19; -pub const ABDAY_7: ::nl_item = 20; - -pub const MON_1: ::nl_item = 21; -pub const MON_2: ::nl_item = 22; -pub const MON_3: ::nl_item = 23; -pub const MON_4: ::nl_item = 24; -pub const MON_5: ::nl_item = 25; -pub const MON_6: ::nl_item = 26; -pub const MON_7: ::nl_item = 27; -pub const MON_8: ::nl_item = 28; -pub const MON_9: ::nl_item = 29; -pub const MON_10: ::nl_item = 30; -pub const MON_11: ::nl_item = 31; -pub const MON_12: ::nl_item = 32; - -pub const ABMON_1: ::nl_item = 33; -pub const ABMON_2: ::nl_item = 34; -pub const ABMON_3: ::nl_item = 35; -pub const ABMON_4: ::nl_item = 36; -pub const ABMON_5: ::nl_item = 37; -pub const ABMON_6: ::nl_item = 38; -pub const ABMON_7: ::nl_item = 39; -pub const ABMON_8: ::nl_item = 40; -pub const ABMON_9: ::nl_item = 41; -pub const ABMON_10: ::nl_item = 42; -pub const ABMON_11: ::nl_item = 43; -pub const ABMON_12: ::nl_item = 44; - -pub const ERA: ::nl_item = 45; -pub const ERA_D_FMT: ::nl_item = 46; -pub const ERA_D_T_FMT: ::nl_item = 47; -pub const ERA_T_FMT: ::nl_item = 48; -pub const ALT_DIGITS: ::nl_item = 49; - -pub const RADIXCHAR: ::nl_item = 50; -pub const THOUSEP: ::nl_item = 51; - -pub const YESEXPR: ::nl_item = 52; -pub const NOEXPR: ::nl_item = 53; - -pub const YESSTR: ::nl_item = 54; -pub const NOSTR: ::nl_item = 55; - -pub const CRNCYSTR: ::nl_item = 56; - -pub const D_MD_ORDER: ::nl_item = 57; - -pub const ALTMON_1: ::nl_item = 58; -pub const ALTMON_2: ::nl_item = 59; -pub const ALTMON_3: ::nl_item = 60; -pub const ALTMON_4: ::nl_item = 61; -pub const ALTMON_5: ::nl_item = 62; -pub const ALTMON_6: ::nl_item = 63; -pub const ALTMON_7: ::nl_item = 64; -pub const ALTMON_8: ::nl_item = 65; -pub const ALTMON_9: ::nl_item = 66; -pub const ALTMON_10: ::nl_item = 67; -pub const ALTMON_11: ::nl_item = 68; -pub const ALTMON_12: ::nl_item = 69; - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const SEEK_DATA: ::c_int = 3; -pub const SEEK_HOLE: ::c_int = 4; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; -pub const BUFSIZ: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const L_tmpnam: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 308915776; - -pub const O_NOCTTY: ::c_int = 32768; -pub const O_DIRECT: ::c_int = 0x00010000; +pub const AIO_LISTIO_MAX: c_int = 16; +pub const AIO_CANCELED: c_int = 1; +pub const AIO_NOTCANCELED: c_int = 2; +pub const AIO_ALLDONE: c_int = 3; +pub const LIO_NOP: c_int = 0; +pub const LIO_WRITE: c_int = 1; +pub const LIO_READ: c_int = 2; +pub const LIO_WAIT: c_int = 1; +pub const LIO_NOWAIT: c_int = 0; + +pub const SIGEV_NONE: c_int = 0; +pub const SIGEV_SIGNAL: c_int = 1; +pub const SIGEV_THREAD: c_int = 2; +pub const SIGEV_KEVENT: c_int = 3; + +pub const CODESET: crate::nl_item = 0; +pub const D_T_FMT: crate::nl_item = 1; +pub const D_FMT: crate::nl_item = 2; +pub const T_FMT: crate::nl_item = 3; +pub const T_FMT_AMPM: crate::nl_item = 4; +pub const AM_STR: crate::nl_item = 5; +pub const PM_STR: crate::nl_item = 6; + +pub const DAY_1: crate::nl_item = 7; +pub const DAY_2: crate::nl_item = 8; +pub const DAY_3: crate::nl_item = 9; +pub const DAY_4: crate::nl_item = 10; +pub const DAY_5: crate::nl_item = 11; +pub const DAY_6: crate::nl_item = 12; +pub const DAY_7: crate::nl_item = 13; + +pub const ABDAY_1: crate::nl_item = 14; +pub const ABDAY_2: crate::nl_item = 15; +pub const ABDAY_3: crate::nl_item = 16; +pub const ABDAY_4: crate::nl_item = 17; +pub const ABDAY_5: crate::nl_item = 18; +pub const ABDAY_6: crate::nl_item = 19; +pub const ABDAY_7: crate::nl_item = 20; + +pub const MON_1: crate::nl_item = 21; +pub const MON_2: crate::nl_item = 22; +pub const MON_3: crate::nl_item = 23; +pub const MON_4: crate::nl_item = 24; +pub const MON_5: crate::nl_item = 25; +pub const MON_6: crate::nl_item = 26; +pub const MON_7: crate::nl_item = 27; +pub const MON_8: crate::nl_item = 28; +pub const MON_9: crate::nl_item = 29; +pub const MON_10: crate::nl_item = 30; +pub const MON_11: crate::nl_item = 31; +pub const MON_12: crate::nl_item = 32; + +pub const ABMON_1: crate::nl_item = 33; +pub const ABMON_2: crate::nl_item = 34; +pub const ABMON_3: crate::nl_item = 35; +pub const ABMON_4: crate::nl_item = 36; +pub const ABMON_5: crate::nl_item = 37; +pub const ABMON_6: crate::nl_item = 38; +pub const ABMON_7: crate::nl_item = 39; +pub const ABMON_8: crate::nl_item = 40; +pub const ABMON_9: crate::nl_item = 41; +pub const ABMON_10: crate::nl_item = 42; +pub const ABMON_11: crate::nl_item = 43; +pub const ABMON_12: crate::nl_item = 44; + +pub const ERA: crate::nl_item = 45; +pub const ERA_D_FMT: crate::nl_item = 46; +pub const ERA_D_T_FMT: crate::nl_item = 47; +pub const ERA_T_FMT: crate::nl_item = 48; +pub const ALT_DIGITS: crate::nl_item = 49; + +pub const RADIXCHAR: crate::nl_item = 50; +pub const THOUSEP: crate::nl_item = 51; + +pub const YESEXPR: crate::nl_item = 52; +pub const NOEXPR: crate::nl_item = 53; + +pub const YESSTR: crate::nl_item = 54; +pub const NOSTR: crate::nl_item = 55; + +pub const CRNCYSTR: crate::nl_item = 56; + +pub const D_MD_ORDER: crate::nl_item = 57; + +pub const ALTMON_1: crate::nl_item = 58; +pub const ALTMON_2: crate::nl_item = 59; +pub const ALTMON_3: crate::nl_item = 60; +pub const ALTMON_4: crate::nl_item = 61; +pub const ALTMON_5: crate::nl_item = 62; +pub const ALTMON_6: crate::nl_item = 63; +pub const ALTMON_7: crate::nl_item = 64; +pub const ALTMON_8: crate::nl_item = 65; +pub const ALTMON_9: crate::nl_item = 66; +pub const ALTMON_10: crate::nl_item = 67; +pub const ALTMON_11: crate::nl_item = 68; +pub const ALTMON_12: crate::nl_item = 69; + +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const SEEK_DATA: c_int = 3; +pub const SEEK_HOLE: c_int = 4; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; +pub const BUFSIZ: c_uint = 1024; +pub const FOPEN_MAX: c_uint = 20; +pub const FILENAME_MAX: c_uint = 1024; +pub const L_tmpnam: c_uint = 1024; +pub const TMP_MAX: c_uint = 308915776; + +pub const O_NOCTTY: c_int = 32768; +pub const O_DIRECT: c_int = 0x00010000; pub const S_IFIFO: mode_t = 0o1_0000; pub const S_IFCHR: mode_t = 0o2_0000; @@ -578,737 +583,737 @@ pub const S_IRWXO: mode_t = 0o0007; pub const S_IXOTH: mode_t = 0o0001; pub const S_IWOTH: mode_t = 0o0002; pub const S_IROTH: mode_t = 0o0004; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_DUPFD_CLOEXEC: ::c_int = 17; -pub const F_DUP2FD: ::c_int = 10; -pub const F_DUP2FD_CLOEXEC: ::c_int = 18; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_ANON: ::c_int = 0x1000; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MNT_EXPUBLIC: ::c_int = 0x20000000; -pub const MNT_NOATIME: ::c_int = 0x10000000; -pub const MNT_NOCLUSTERR: ::c_int = 0x40000000; -pub const MNT_NOCLUSTERW: ::c_int = 0x80000000; -pub const MNT_NOSYMFOLLOW: ::c_int = 0x00400000; -pub const MNT_SOFTDEP: ::c_int = 0x00200000; -pub const MNT_SUIDDIR: ::c_int = 0x00100000; -pub const MNT_EXRDONLY: ::c_int = 0x00000080; -pub const MNT_DEFEXPORTED: ::c_int = 0x00000200; -pub const MNT_EXPORTANON: ::c_int = 0x00000400; -pub const MNT_EXKERB: ::c_int = 0x00000800; -pub const MNT_DELEXPORT: ::c_int = 0x00020000; - -pub const MS_SYNC: ::c_int = 0x0000; -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EDEADLK: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EAGAIN: ::c_int = 35; -pub const EWOULDBLOCK: ::c_int = 35; -pub const EINPROGRESS: ::c_int = 36; -pub const EALREADY: ::c_int = 37; -pub const ENOTSOCK: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 39; -pub const EMSGSIZE: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const EOPNOTSUPP: ::c_int = 45; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENETDOWN: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const ELOOP: ::c_int = 62; -pub const ENAMETOOLONG: ::c_int = 63; -pub const EHOSTDOWN: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const ENOTEMPTY: ::c_int = 66; -pub const EPROCLIM: ::c_int = 67; -pub const EUSERS: ::c_int = 68; -pub const EDQUOT: ::c_int = 69; -pub const ESTALE: ::c_int = 70; -pub const EREMOTE: ::c_int = 71; -pub const EBADRPC: ::c_int = 72; -pub const ERPCMISMATCH: ::c_int = 73; -pub const EPROGUNAVAIL: ::c_int = 74; -pub const EPROGMISMATCH: ::c_int = 75; -pub const EPROCUNAVAIL: ::c_int = 76; -pub const ENOLCK: ::c_int = 77; -pub const ENOSYS: ::c_int = 78; -pub const EFTYPE: ::c_int = 79; -pub const EAUTH: ::c_int = 80; -pub const ENEEDAUTH: ::c_int = 81; -pub const EIDRM: ::c_int = 82; -pub const ENOMSG: ::c_int = 83; -pub const EOVERFLOW: ::c_int = 84; -pub const ECANCELED: ::c_int = 85; -pub const EILSEQ: ::c_int = 86; -pub const ENOATTR: ::c_int = 87; -pub const EDOOFUS: ::c_int = 88; -pub const EBADMSG: ::c_int = 89; -pub const EMULTIHOP: ::c_int = 90; -pub const ENOLINK: ::c_int = 91; -pub const EPROTO: ::c_int = 92; - -pub const POLLSTANDARD: ::c_short = ::POLLIN - | ::POLLPRI - | ::POLLOUT - | ::POLLRDNORM - | ::POLLRDBAND - | ::POLLWRBAND - | ::POLLERR - | ::POLLHUP - | ::POLLNVAL; - -pub const AI_PASSIVE: ::c_int = 0x00000001; -pub const AI_CANONNAME: ::c_int = 0x00000002; -pub const AI_NUMERICHOST: ::c_int = 0x00000004; -pub const AI_NUMERICSERV: ::c_int = 0x00000008; -pub const AI_ALL: ::c_int = 0x00000100; -pub const AI_ADDRCONFIG: ::c_int = 0x00000400; -pub const AI_V4MAPPED: ::c_int = 0x00000800; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; - -pub const SIGTRAP: ::c_int = 5; - -pub const GLOB_APPEND: ::c_int = 0x0001; -pub const GLOB_DOOFFS: ::c_int = 0x0002; -pub const GLOB_ERR: ::c_int = 0x0004; -pub const GLOB_MARK: ::c_int = 0x0008; -pub const GLOB_NOCHECK: ::c_int = 0x0010; -pub const GLOB_NOSORT: ::c_int = 0x0020; -pub const GLOB_NOESCAPE: ::c_int = 0x2000; - -pub const GLOB_NOSPACE: ::c_int = -1; -pub const GLOB_ABORTED: ::c_int = -2; -pub const GLOB_NOMATCH: ::c_int = -3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; -pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_MEMLOCK: ::c_int = 6; -pub const RLIMIT_NPROC: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 8; -pub const RLIMIT_SBSIZE: ::c_int = 9; -pub const RLIMIT_VMEM: ::c_int = 10; -pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; +pub const F_DUPFD_CLOEXEC: c_int = 17; +pub const F_DUP2FD: c_int = 10; +pub const F_DUP2FD_CLOEXEC: c_int = 18; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; + +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; + +pub const MAP_FILE: c_int = 0x0000; +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_FIXED: c_int = 0x0010; +pub const MAP_ANON: c_int = 0x1000; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; + +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; + +pub const MNT_EXPUBLIC: c_int = 0x20000000; +pub const MNT_NOATIME: c_int = 0x10000000; +pub const MNT_NOCLUSTERR: c_int = 0x40000000; +pub const MNT_NOCLUSTERW: c_int = 0x80000000; +pub const MNT_NOSYMFOLLOW: c_int = 0x00400000; +pub const MNT_SOFTDEP: c_int = 0x00200000; +pub const MNT_SUIDDIR: c_int = 0x00100000; +pub const MNT_EXRDONLY: c_int = 0x00000080; +pub const MNT_DEFEXPORTED: c_int = 0x00000200; +pub const MNT_EXPORTANON: c_int = 0x00000400; +pub const MNT_EXKERB: c_int = 0x00000800; +pub const MNT_DELEXPORT: c_int = 0x00020000; + +pub const MS_SYNC: c_int = 0x0000; +pub const MS_ASYNC: c_int = 0x0001; +pub const MS_INVALIDATE: c_int = 0x0002; + +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EDEADLK: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EAGAIN: c_int = 35; +pub const EWOULDBLOCK: c_int = 35; +pub const EINPROGRESS: c_int = 36; +pub const EALREADY: c_int = 37; +pub const ENOTSOCK: c_int = 38; +pub const EDESTADDRREQ: c_int = 39; +pub const EMSGSIZE: c_int = 40; +pub const EPROTOTYPE: c_int = 41; +pub const ENOPROTOOPT: c_int = 42; +pub const EPROTONOSUPPORT: c_int = 43; +pub const ESOCKTNOSUPPORT: c_int = 44; +pub const EOPNOTSUPP: c_int = 45; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 46; +pub const EAFNOSUPPORT: c_int = 47; +pub const EADDRINUSE: c_int = 48; +pub const EADDRNOTAVAIL: c_int = 49; +pub const ENETDOWN: c_int = 50; +pub const ENETUNREACH: c_int = 51; +pub const ENETRESET: c_int = 52; +pub const ECONNABORTED: c_int = 53; +pub const ECONNRESET: c_int = 54; +pub const ENOBUFS: c_int = 55; +pub const EISCONN: c_int = 56; +pub const ENOTCONN: c_int = 57; +pub const ESHUTDOWN: c_int = 58; +pub const ETOOMANYREFS: c_int = 59; +pub const ETIMEDOUT: c_int = 60; +pub const ECONNREFUSED: c_int = 61; +pub const ELOOP: c_int = 62; +pub const ENAMETOOLONG: c_int = 63; +pub const EHOSTDOWN: c_int = 64; +pub const EHOSTUNREACH: c_int = 65; +pub const ENOTEMPTY: c_int = 66; +pub const EPROCLIM: c_int = 67; +pub const EUSERS: c_int = 68; +pub const EDQUOT: c_int = 69; +pub const ESTALE: c_int = 70; +pub const EREMOTE: c_int = 71; +pub const EBADRPC: c_int = 72; +pub const ERPCMISMATCH: c_int = 73; +pub const EPROGUNAVAIL: c_int = 74; +pub const EPROGMISMATCH: c_int = 75; +pub const EPROCUNAVAIL: c_int = 76; +pub const ENOLCK: c_int = 77; +pub const ENOSYS: c_int = 78; +pub const EFTYPE: c_int = 79; +pub const EAUTH: c_int = 80; +pub const ENEEDAUTH: c_int = 81; +pub const EIDRM: c_int = 82; +pub const ENOMSG: c_int = 83; +pub const EOVERFLOW: c_int = 84; +pub const ECANCELED: c_int = 85; +pub const EILSEQ: c_int = 86; +pub const ENOATTR: c_int = 87; +pub const EDOOFUS: c_int = 88; +pub const EBADMSG: c_int = 89; +pub const EMULTIHOP: c_int = 90; +pub const ENOLINK: c_int = 91; +pub const EPROTO: c_int = 92; + +pub const POLLSTANDARD: c_short = crate::POLLIN + | crate::POLLPRI + | crate::POLLOUT + | crate::POLLRDNORM + | crate::POLLRDBAND + | crate::POLLWRBAND + | crate::POLLERR + | crate::POLLHUP + | crate::POLLNVAL; + +pub const AI_PASSIVE: c_int = 0x00000001; +pub const AI_CANONNAME: c_int = 0x00000002; +pub const AI_NUMERICHOST: c_int = 0x00000004; +pub const AI_NUMERICSERV: c_int = 0x00000008; +pub const AI_ALL: c_int = 0x00000100; +pub const AI_ADDRCONFIG: c_int = 0x00000400; +pub const AI_V4MAPPED: c_int = 0x00000800; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; + +pub const SIGTRAP: c_int = 5; + +pub const GLOB_APPEND: c_int = 0x0001; +pub const GLOB_DOOFFS: c_int = 0x0002; +pub const GLOB_ERR: c_int = 0x0004; +pub const GLOB_MARK: c_int = 0x0008; +pub const GLOB_NOCHECK: c_int = 0x0010; +pub const GLOB_NOSORT: c_int = 0x0020; +pub const GLOB_NOESCAPE: c_int = 0x2000; + +pub const GLOB_NOSPACE: c_int = -1; +pub const GLOB_ABORTED: c_int = -2; +pub const GLOB_NOMATCH: c_int = -3; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1; +pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 1; + +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_RSS: c_int = 5; +pub const RLIMIT_MEMLOCK: c_int = 6; +pub const RLIMIT_NPROC: c_int = 7; +pub const RLIMIT_NOFILE: c_int = 8; +pub const RLIMIT_SBSIZE: c_int = 9; +pub const RLIMIT_VMEM: c_int = 10; +pub const RLIMIT_AS: c_int = RLIMIT_VMEM; pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_VIRTUAL: ::clockid_t = 1; -pub const CLOCK_PROF: ::clockid_t = 2; -pub const CLOCK_MONOTONIC: ::clockid_t = 4; -pub const CLOCK_UPTIME: ::clockid_t = 5; -pub const CLOCK_UPTIME_PRECISE: ::clockid_t = 7; -pub const CLOCK_UPTIME_FAST: ::clockid_t = 8; -pub const CLOCK_REALTIME_PRECISE: ::clockid_t = 9; -pub const CLOCK_REALTIME_FAST: ::clockid_t = 10; -pub const CLOCK_MONOTONIC_PRECISE: ::clockid_t = 11; -pub const CLOCK_MONOTONIC_FAST: ::clockid_t = 12; -pub const CLOCK_SECOND: ::clockid_t = 13; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 14; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 15; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 5; -pub const MADV_NOSYNC: ::c_int = 6; -pub const MADV_AUTOSYNC: ::c_int = 7; -pub const MADV_NOCORE: ::c_int = 8; -pub const MADV_CORE: ::c_int = 9; - -pub const MINCORE_INCORE: ::c_int = 0x1; -pub const MINCORE_REFERENCED: ::c_int = 0x2; -pub const MINCORE_MODIFIED: ::c_int = 0x4; -pub const MINCORE_REFERENCED_OTHER: ::c_int = 0x8; -pub const MINCORE_MODIFIED_OTHER: ::c_int = 0x10; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_UNIX: ::c_int = AF_LOCAL; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NETBIOS: ::c_int = 6; -pub const AF_ISO: ::c_int = 7; -pub const AF_OSI: ::c_int = AF_ISO; -pub const AF_ECMA: ::c_int = 8; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_ROUTE: ::c_int = 17; -pub const AF_LINK: ::c_int = 18; -pub const pseudo_AF_XTP: ::c_int = 19; -pub const AF_COIP: ::c_int = 20; -pub const AF_CNT: ::c_int = 21; -pub const pseudo_AF_RTIP: ::c_int = 22; -pub const AF_IPX: ::c_int = 23; -pub const AF_SIP: ::c_int = 24; -pub const pseudo_AF_PIP: ::c_int = 25; -pub const AF_ISDN: ::c_int = 26; -pub const AF_E164: ::c_int = AF_ISDN; -pub const pseudo_AF_KEY: ::c_int = 27; -pub const AF_INET6: ::c_int = 28; -pub const AF_NATM: ::c_int = 29; -pub const AF_ATM: ::c_int = 30; -pub const pseudo_AF_HDRCMPLT: ::c_int = 31; -pub const AF_NETGRAPH: ::c_int = 32; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_UNIX: ::c_int = PF_LOCAL; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_IMPLINK: ::c_int = AF_IMPLINK; -pub const PF_PUP: ::c_int = AF_PUP; -pub const PF_CHAOS: ::c_int = AF_CHAOS; -pub const PF_NETBIOS: ::c_int = AF_NETBIOS; -pub const PF_ISO: ::c_int = AF_ISO; -pub const PF_OSI: ::c_int = AF_ISO; -pub const PF_ECMA: ::c_int = AF_ECMA; -pub const PF_DATAKIT: ::c_int = AF_DATAKIT; -pub const PF_CCITT: ::c_int = AF_CCITT; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_DLI: ::c_int = AF_DLI; -pub const PF_LAT: ::c_int = AF_LAT; -pub const PF_HYLINK: ::c_int = AF_HYLINK; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_LINK: ::c_int = AF_LINK; -pub const PF_XTP: ::c_int = pseudo_AF_XTP; -pub const PF_COIP: ::c_int = AF_COIP; -pub const PF_CNT: ::c_int = AF_CNT; -pub const PF_SIP: ::c_int = AF_SIP; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; -pub const PF_PIP: ::c_int = pseudo_AF_PIP; -pub const PF_ISDN: ::c_int = AF_ISDN; -pub const PF_KEY: ::c_int = pseudo_AF_KEY; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_NATM: ::c_int = AF_NATM; -pub const PF_ATM: ::c_int = AF_ATM; -pub const PF_NETGRAPH: ::c_int = AF_NETGRAPH; - -pub const PIOD_READ_D: ::c_int = 1; -pub const PIOD_WRITE_D: ::c_int = 2; -pub const PIOD_READ_I: ::c_int = 3; -pub const PIOD_WRITE_I: ::c_int = 4; - -pub const PT_TRACE_ME: ::c_int = 0; -pub const PT_READ_I: ::c_int = 1; -pub const PT_READ_D: ::c_int = 2; -pub const PT_WRITE_I: ::c_int = 4; -pub const PT_WRITE_D: ::c_int = 5; -pub const PT_CONTINUE: ::c_int = 7; -pub const PT_KILL: ::c_int = 8; -pub const PT_STEP: ::c_int = 9; -pub const PT_ATTACH: ::c_int = 10; -pub const PT_DETACH: ::c_int = 11; -pub const PT_IO: ::c_int = 12; - -pub const SOMAXCONN: ::c_int = 128; - -pub const MSG_OOB: ::c_int = 0x00000001; -pub const MSG_PEEK: ::c_int = 0x00000002; -pub const MSG_DONTROUTE: ::c_int = 0x00000004; -pub const MSG_EOR: ::c_int = 0x00000008; -pub const MSG_TRUNC: ::c_int = 0x00000010; -pub const MSG_CTRUNC: ::c_int = 0x00000020; -pub const MSG_WAITALL: ::c_int = 0x00000040; -pub const MSG_DONTWAIT: ::c_int = 0x00000080; -pub const MSG_EOF: ::c_int = 0x00000100; - -pub const SCM_TIMESTAMP: ::c_int = 0x02; -pub const SCM_CREDS: ::c_int = 0x03; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_CLOEXEC: ::c_int = 0x10000000; -pub const SOCK_NONBLOCK: ::c_int = 0x20000000; -pub const SOCK_MAXADDRLEN: ::c_int = 255; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IP_RECVIF: ::c_int = 20; -pub const IP_RECVTTL: ::c_int = 65; -pub const IPV6_RECVHOPLIMIT: ::c_int = 37; -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; -pub const IPV6_CHECKSUM: ::c_int = 26; -pub const IPV6_RECVPKTINFO: ::c_int = 36; -pub const IPV6_PKTINFO: ::c_int = 46; -pub const IPV6_HOPLIMIT: ::c_int = 47; -pub const IPV6_RECVTCLASS: ::c_int = 57; -pub const IPV6_TCLASS: ::c_int = 61; -pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 70; -pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 71; -pub const IP_BLOCK_SOURCE: ::c_int = 72; -pub const IP_UNBLOCK_SOURCE: ::c_int = 73; - -pub const TCP_NOPUSH: ::c_int = 4; -pub const TCP_NOOPT: ::c_int = 8; -pub const TCP_KEEPIDLE: ::c_int = 256; -pub const TCP_KEEPINTVL: ::c_int = 512; -pub const TCP_KEEPCNT: ::c_int = 1024; - -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_TIMESTAMP: ::c_int = 0x0400; -pub const SO_NOSIGPIPE: ::c_int = 0x0800; -pub const SO_ACCEPTFILTER: ::c_int = 0x1000; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; - -pub const LOCAL_PEERCRED: ::c_int = 1; +pub const RUSAGE_SELF: c_int = 0; +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_VIRTUAL: crate::clockid_t = 1; +pub const CLOCK_PROF: crate::clockid_t = 2; +pub const CLOCK_MONOTONIC: crate::clockid_t = 4; +pub const CLOCK_UPTIME: crate::clockid_t = 5; +pub const CLOCK_UPTIME_PRECISE: crate::clockid_t = 7; +pub const CLOCK_UPTIME_FAST: crate::clockid_t = 8; +pub const CLOCK_REALTIME_PRECISE: crate::clockid_t = 9; +pub const CLOCK_REALTIME_FAST: crate::clockid_t = 10; +pub const CLOCK_MONOTONIC_PRECISE: crate::clockid_t = 11; +pub const CLOCK_MONOTONIC_FAST: crate::clockid_t = 12; +pub const CLOCK_SECOND: crate::clockid_t = 13; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 14; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 15; + +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const MADV_FREE: c_int = 5; +pub const MADV_NOSYNC: c_int = 6; +pub const MADV_AUTOSYNC: c_int = 7; +pub const MADV_NOCORE: c_int = 8; +pub const MADV_CORE: c_int = 9; + +pub const MINCORE_INCORE: c_int = 0x1; +pub const MINCORE_REFERENCED: c_int = 0x2; +pub const MINCORE_MODIFIED: c_int = 0x4; +pub const MINCORE_REFERENCED_OTHER: c_int = 0x8; +pub const MINCORE_MODIFIED_OTHER: c_int = 0x10; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_LOCAL: c_int = 1; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_INET: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NETBIOS: c_int = 6; +pub const AF_ISO: c_int = 7; +pub const AF_OSI: c_int = AF_ISO; +pub const AF_ECMA: c_int = 8; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_ROUTE: c_int = 17; +pub const AF_LINK: c_int = 18; +pub const pseudo_AF_XTP: c_int = 19; +pub const AF_COIP: c_int = 20; +pub const AF_CNT: c_int = 21; +pub const pseudo_AF_RTIP: c_int = 22; +pub const AF_IPX: c_int = 23; +pub const AF_SIP: c_int = 24; +pub const pseudo_AF_PIP: c_int = 25; +pub const AF_ISDN: c_int = 26; +pub const AF_E164: c_int = AF_ISDN; +pub const pseudo_AF_KEY: c_int = 27; +pub const AF_INET6: c_int = 28; +pub const AF_NATM: c_int = 29; +pub const AF_ATM: c_int = 30; +pub const pseudo_AF_HDRCMPLT: c_int = 31; +pub const AF_NETGRAPH: c_int = 32; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_UNIX: c_int = PF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_IMPLINK: c_int = AF_IMPLINK; +pub const PF_PUP: c_int = AF_PUP; +pub const PF_CHAOS: c_int = AF_CHAOS; +pub const PF_NETBIOS: c_int = AF_NETBIOS; +pub const PF_ISO: c_int = AF_ISO; +pub const PF_OSI: c_int = AF_ISO; +pub const PF_ECMA: c_int = AF_ECMA; +pub const PF_DATAKIT: c_int = AF_DATAKIT; +pub const PF_CCITT: c_int = AF_CCITT; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_DLI: c_int = AF_DLI; +pub const PF_LAT: c_int = AF_LAT; +pub const PF_HYLINK: c_int = AF_HYLINK; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_XTP: c_int = pseudo_AF_XTP; +pub const PF_COIP: c_int = AF_COIP; +pub const PF_CNT: c_int = AF_CNT; +pub const PF_SIP: c_int = AF_SIP; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_RTIP: c_int = pseudo_AF_RTIP; +pub const PF_PIP: c_int = pseudo_AF_PIP; +pub const PF_ISDN: c_int = AF_ISDN; +pub const PF_KEY: c_int = pseudo_AF_KEY; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_NATM: c_int = AF_NATM; +pub const PF_ATM: c_int = AF_ATM; +pub const PF_NETGRAPH: c_int = AF_NETGRAPH; + +pub const PIOD_READ_D: c_int = 1; +pub const PIOD_WRITE_D: c_int = 2; +pub const PIOD_READ_I: c_int = 3; +pub const PIOD_WRITE_I: c_int = 4; + +pub const PT_TRACE_ME: c_int = 0; +pub const PT_READ_I: c_int = 1; +pub const PT_READ_D: c_int = 2; +pub const PT_WRITE_I: c_int = 4; +pub const PT_WRITE_D: c_int = 5; +pub const PT_CONTINUE: c_int = 7; +pub const PT_KILL: c_int = 8; +pub const PT_STEP: c_int = 9; +pub const PT_ATTACH: c_int = 10; +pub const PT_DETACH: c_int = 11; +pub const PT_IO: c_int = 12; + +pub const SOMAXCONN: c_int = 128; + +pub const MSG_OOB: c_int = 0x00000001; +pub const MSG_PEEK: c_int = 0x00000002; +pub const MSG_DONTROUTE: c_int = 0x00000004; +pub const MSG_EOR: c_int = 0x00000008; +pub const MSG_TRUNC: c_int = 0x00000010; +pub const MSG_CTRUNC: c_int = 0x00000020; +pub const MSG_WAITALL: c_int = 0x00000040; +pub const MSG_DONTWAIT: c_int = 0x00000080; +pub const MSG_EOF: c_int = 0x00000100; + +pub const SCM_TIMESTAMP: c_int = 0x02; +pub const SCM_CREDS: c_int = 0x03; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_CLOEXEC: c_int = 0x10000000; +pub const SOCK_NONBLOCK: c_int = 0x20000000; +pub const SOCK_MAXADDRLEN: c_int = 255; +pub const IP_TTL: c_int = 4; +pub const IP_HDRINCL: c_int = 2; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_SENDSRCADDR: c_int = IP_RECVDSTADDR; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IP_RECVIF: c_int = 20; +pub const IP_RECVTTL: c_int = 65; +pub const IPV6_RECVHOPLIMIT: c_int = 37; +pub const IPV6_JOIN_GROUP: c_int = 12; +pub const IPV6_LEAVE_GROUP: c_int = 13; +pub const IPV6_CHECKSUM: c_int = 26; +pub const IPV6_RECVPKTINFO: c_int = 36; +pub const IPV6_PKTINFO: c_int = 46; +pub const IPV6_HOPLIMIT: c_int = 47; +pub const IPV6_RECVTCLASS: c_int = 57; +pub const IPV6_TCLASS: c_int = 61; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 70; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 71; +pub const IP_BLOCK_SOURCE: c_int = 72; +pub const IP_UNBLOCK_SOURCE: c_int = 73; + +pub const TCP_NOPUSH: c_int = 4; +pub const TCP_NOOPT: c_int = 8; +pub const TCP_KEEPIDLE: c_int = 256; +pub const TCP_KEEPINTVL: c_int = 512; +pub const TCP_KEEPCNT: c_int = 1024; + +pub const SOL_SOCKET: c_int = 0xffff; +pub const SO_DEBUG: c_int = 0x01; +pub const SO_ACCEPTCONN: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_TIMESTAMP: c_int = 0x0400; +pub const SO_NOSIGPIPE: c_int = 0x0800; +pub const SO_ACCEPTFILTER: c_int = 0x1000; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; + +pub const LOCAL_PEERCRED: c_int = 1; // net/route.h -pub const RTF_XRESOLVE: ::c_int = 0x200; -pub const RTF_LLINFO: ::c_int = 0x400; -pub const RTF_PROTO3: ::c_int = 0x40000; -pub const RTF_PINNED: ::c_int = 0x100000; -pub const RTF_LOCAL: ::c_int = 0x200000; -pub const RTF_BROADCAST: ::c_int = 0x400000; -pub const RTF_MULTICAST: ::c_int = 0x800000; - -pub const RTM_LOCK: ::c_int = 0x8; -pub const RTM_RESOLVE: ::c_int = 0xb; -pub const RTM_NEWADDR: ::c_int = 0xc; -pub const RTM_DELADDR: ::c_int = 0xd; -pub const RTM_IFINFO: ::c_int = 0xe; -pub const RTM_NEWMADDR: ::c_int = 0xf; -pub const RTM_DELMADDR: ::c_int = 0x10; -pub const RTM_IFANNOUNCE: ::c_int = 0x11; -pub const RTM_IEEE80211: ::c_int = 0x12; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const MAP_COPY: ::c_int = 0x0002; +pub const RTF_XRESOLVE: c_int = 0x200; +pub const RTF_LLINFO: c_int = 0x400; +pub const RTF_PROTO3: c_int = 0x40000; +pub const RTF_PINNED: c_int = 0x100000; +pub const RTF_LOCAL: c_int = 0x200000; +pub const RTF_BROADCAST: c_int = 0x400000; +pub const RTF_MULTICAST: c_int = 0x800000; + +pub const RTM_LOCK: c_int = 0x8; +pub const RTM_RESOLVE: c_int = 0xb; +pub const RTM_NEWADDR: c_int = 0xc; +pub const RTM_DELADDR: c_int = 0xd; +pub const RTM_IFINFO: c_int = 0xe; +pub const RTM_NEWMADDR: c_int = 0xf; +pub const RTM_DELMADDR: c_int = 0x10; +pub const RTM_IFANNOUNCE: c_int = 0x11; +pub const RTM_IEEE80211: c_int = 0x12; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; + +pub const MAP_COPY: c_int = 0x0002; #[doc(hidden)] #[deprecated( since = "0.2.54", note = "Removed in FreeBSD 11, unused in DragonFlyBSD" )] -pub const MAP_RENAME: ::c_int = 0x0020; +pub const MAP_RENAME: c_int = 0x0020; #[doc(hidden)] #[deprecated( since = "0.2.54", note = "Removed in FreeBSD 11, unused in DragonFlyBSD" )] -pub const MAP_NORESERVE: ::c_int = 0x0040; -pub const MAP_HASSEMAPHORE: ::c_int = 0x0200; -pub const MAP_STACK: ::c_int = 0x0400; -pub const MAP_NOSYNC: ::c_int = 0x0800; -pub const MAP_NOCORE: ::c_int = 0x020000; - -pub const IPPROTO_RAW: ::c_int = 255; - -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; -pub const _PC_NO_TRUNC: ::c_int = 8; -pub const _PC_VDISABLE: ::c_int = 9; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 10; -pub const _PC_FILESIZEBITS: ::c_int = 12; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_SYMLINK_MAX: ::c_int = 18; -pub const _PC_MIN_HOLE_SIZE: ::c_int = 21; -pub const _PC_ASYNC_IO: ::c_int = 53; -pub const _PC_PRIO_IO: ::c_int = 54; -pub const _PC_SYNC_IO: ::c_int = 55; -pub const _PC_ACL_EXTENDED: ::c_int = 59; -pub const _PC_ACL_PATH_MAX: ::c_int = 60; -pub const _PC_CAP_PRESENT: ::c_int = 61; -pub const _PC_INF_PRESENT: ::c_int = 62; -pub const _PC_MAC_PRESENT: ::c_int = 63; - -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_BC_BASE_MAX: ::c_int = 9; -pub const _SC_BC_DIM_MAX: ::c_int = 10; -pub const _SC_BC_SCALE_MAX: ::c_int = 11; -pub const _SC_BC_STRING_MAX: ::c_int = 12; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; -pub const _SC_EXPR_NEST_MAX: ::c_int = 14; -pub const _SC_LINE_MAX: ::c_int = 15; -pub const _SC_RE_DUP_MAX: ::c_int = 16; -pub const _SC_2_VERSION: ::c_int = 17; -pub const _SC_2_C_BIND: ::c_int = 18; -pub const _SC_2_C_DEV: ::c_int = 19; -pub const _SC_2_CHAR_TERM: ::c_int = 20; -pub const _SC_2_FORT_DEV: ::c_int = 21; -pub const _SC_2_FORT_RUN: ::c_int = 22; -pub const _SC_2_LOCALEDEF: ::c_int = 23; -pub const _SC_2_SW_DEV: ::c_int = 24; -pub const _SC_2_UPE: ::c_int = 25; -pub const _SC_STREAM_MAX: ::c_int = 26; -pub const _SC_TZNAME_MAX: ::c_int = 27; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 28; -pub const _SC_MAPPED_FILES: ::c_int = 29; -pub const _SC_MEMLOCK: ::c_int = 30; -pub const _SC_MEMLOCK_RANGE: ::c_int = 31; -pub const _SC_MEMORY_PROTECTION: ::c_int = 32; -pub const _SC_MESSAGE_PASSING: ::c_int = 33; -pub const _SC_PRIORITIZED_IO: ::c_int = 34; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 35; -pub const _SC_REALTIME_SIGNALS: ::c_int = 36; -pub const _SC_SEMAPHORES: ::c_int = 37; -pub const _SC_FSYNC: ::c_int = 38; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 39; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 40; -pub const _SC_TIMERS: ::c_int = 41; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; -pub const _SC_AIO_MAX: ::c_int = 43; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; -pub const _SC_DELAYTIMER_MAX: ::c_int = 45; -pub const _SC_MQ_OPEN_MAX: ::c_int = 46; -pub const _SC_PAGESIZE: ::c_int = 47; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_RTSIG_MAX: ::c_int = 48; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 49; -pub const _SC_SEM_VALUE_MAX: ::c_int = 50; -pub const _SC_SIGQUEUE_MAX: ::c_int = 51; -pub const _SC_TIMER_MAX: ::c_int = 52; -pub const _SC_IOV_MAX: ::c_int = 56; -pub const _SC_NPROCESSORS_CONF: ::c_int = 57; -pub const _SC_2_PBS: ::c_int = 59; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 60; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 61; -pub const _SC_2_PBS_LOCATE: ::c_int = 62; -pub const _SC_2_PBS_MESSAGE: ::c_int = 63; -pub const _SC_2_PBS_TRACK: ::c_int = 64; -pub const _SC_ADVISORY_INFO: ::c_int = 65; -pub const _SC_BARRIERS: ::c_int = 66; -pub const _SC_CLOCK_SELECTION: ::c_int = 67; -pub const _SC_CPUTIME: ::c_int = 68; -pub const _SC_FILE_LOCKING: ::c_int = 69; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 58; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 70; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 71; -pub const _SC_HOST_NAME_MAX: ::c_int = 72; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 73; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 74; -pub const _SC_MQ_PRIO_MAX: ::c_int = 75; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; -pub const _SC_REGEXP: ::c_int = 77; -pub const _SC_SHELL: ::c_int = 78; -pub const _SC_SPAWN: ::c_int = 79; -pub const _SC_SPIN_LOCKS: ::c_int = 80; -pub const _SC_SPORADIC_SERVER: ::c_int = 81; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 82; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 83; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 85; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 86; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 87; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 88; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 89; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 90; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 91; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 92; -pub const _SC_THREAD_STACK_MIN: ::c_int = 93; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 94; -pub const _SC_TIMEOUTS: ::c_int = 95; -pub const _SC_THREADS: ::c_int = 96; -pub const _SC_TRACE: ::c_int = 97; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 98; -pub const _SC_TRACE_INHERIT: ::c_int = 99; -pub const _SC_TRACE_LOG: ::c_int = 100; -pub const _SC_TTY_NAME_MAX: ::c_int = 101; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 102; -pub const _SC_V6_ILP32_OFF32: ::c_int = 103; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 104; -pub const _SC_V6_LP64_OFF64: ::c_int = 105; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 106; -pub const _SC_ATEXIT_MAX: ::c_int = 107; -pub const _SC_XOPEN_CRYPT: ::c_int = 108; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 109; -pub const _SC_XOPEN_LEGACY: ::c_int = 110; -pub const _SC_XOPEN_REALTIME: ::c_int = 111; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 112; -pub const _SC_XOPEN_SHM: ::c_int = 113; -pub const _SC_XOPEN_STREAMS: ::c_int = 114; -pub const _SC_XOPEN_UNIX: ::c_int = 115; -pub const _SC_XOPEN_VERSION: ::c_int = 116; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 117; -pub const _SC_IPV6: ::c_int = 118; -pub const _SC_RAW_SOCKETS: ::c_int = 119; -pub const _SC_SYMLOOP_MAX: ::c_int = 120; -pub const _SC_PHYS_PAGES: ::c_int = 121; +pub const MAP_NORESERVE: c_int = 0x0040; +pub const MAP_HASSEMAPHORE: c_int = 0x0200; +pub const MAP_STACK: c_int = 0x0400; +pub const MAP_NOSYNC: c_int = 0x0800; +pub const MAP_NOCORE: c_int = 0x020000; + +pub const IPPROTO_RAW: c_int = 255; + +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_CHOWN_RESTRICTED: c_int = 7; +pub const _PC_NO_TRUNC: c_int = 8; +pub const _PC_VDISABLE: c_int = 9; +pub const _PC_ALLOC_SIZE_MIN: c_int = 10; +pub const _PC_FILESIZEBITS: c_int = 12; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_SYMLINK_MAX: c_int = 18; +pub const _PC_MIN_HOLE_SIZE: c_int = 21; +pub const _PC_ASYNC_IO: c_int = 53; +pub const _PC_PRIO_IO: c_int = 54; +pub const _PC_SYNC_IO: c_int = 55; +pub const _PC_ACL_EXTENDED: c_int = 59; +pub const _PC_ACL_PATH_MAX: c_int = 60; +pub const _PC_CAP_PRESENT: c_int = 61; +pub const _PC_INF_PRESENT: c_int = 62; +pub const _PC_MAC_PRESENT: c_int = 63; + +pub const _SC_ARG_MAX: c_int = 1; +pub const _SC_CHILD_MAX: c_int = 2; +pub const _SC_CLK_TCK: c_int = 3; +pub const _SC_NGROUPS_MAX: c_int = 4; +pub const _SC_OPEN_MAX: c_int = 5; +pub const _SC_JOB_CONTROL: c_int = 6; +pub const _SC_SAVED_IDS: c_int = 7; +pub const _SC_VERSION: c_int = 8; +pub const _SC_BC_BASE_MAX: c_int = 9; +pub const _SC_BC_DIM_MAX: c_int = 10; +pub const _SC_BC_SCALE_MAX: c_int = 11; +pub const _SC_BC_STRING_MAX: c_int = 12; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 13; +pub const _SC_EXPR_NEST_MAX: c_int = 14; +pub const _SC_LINE_MAX: c_int = 15; +pub const _SC_RE_DUP_MAX: c_int = 16; +pub const _SC_2_VERSION: c_int = 17; +pub const _SC_2_C_BIND: c_int = 18; +pub const _SC_2_C_DEV: c_int = 19; +pub const _SC_2_CHAR_TERM: c_int = 20; +pub const _SC_2_FORT_DEV: c_int = 21; +pub const _SC_2_FORT_RUN: c_int = 22; +pub const _SC_2_LOCALEDEF: c_int = 23; +pub const _SC_2_SW_DEV: c_int = 24; +pub const _SC_2_UPE: c_int = 25; +pub const _SC_STREAM_MAX: c_int = 26; +pub const _SC_TZNAME_MAX: c_int = 27; +pub const _SC_ASYNCHRONOUS_IO: c_int = 28; +pub const _SC_MAPPED_FILES: c_int = 29; +pub const _SC_MEMLOCK: c_int = 30; +pub const _SC_MEMLOCK_RANGE: c_int = 31; +pub const _SC_MEMORY_PROTECTION: c_int = 32; +pub const _SC_MESSAGE_PASSING: c_int = 33; +pub const _SC_PRIORITIZED_IO: c_int = 34; +pub const _SC_PRIORITY_SCHEDULING: c_int = 35; +pub const _SC_REALTIME_SIGNALS: c_int = 36; +pub const _SC_SEMAPHORES: c_int = 37; +pub const _SC_FSYNC: c_int = 38; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 39; +pub const _SC_SYNCHRONIZED_IO: c_int = 40; +pub const _SC_TIMERS: c_int = 41; +pub const _SC_AIO_LISTIO_MAX: c_int = 42; +pub const _SC_AIO_MAX: c_int = 43; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 44; +pub const _SC_DELAYTIMER_MAX: c_int = 45; +pub const _SC_MQ_OPEN_MAX: c_int = 46; +pub const _SC_PAGESIZE: c_int = 47; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_RTSIG_MAX: c_int = 48; +pub const _SC_SEM_NSEMS_MAX: c_int = 49; +pub const _SC_SEM_VALUE_MAX: c_int = 50; +pub const _SC_SIGQUEUE_MAX: c_int = 51; +pub const _SC_TIMER_MAX: c_int = 52; +pub const _SC_IOV_MAX: c_int = 56; +pub const _SC_NPROCESSORS_CONF: c_int = 57; +pub const _SC_2_PBS: c_int = 59; +pub const _SC_2_PBS_ACCOUNTING: c_int = 60; +pub const _SC_2_PBS_CHECKPOINT: c_int = 61; +pub const _SC_2_PBS_LOCATE: c_int = 62; +pub const _SC_2_PBS_MESSAGE: c_int = 63; +pub const _SC_2_PBS_TRACK: c_int = 64; +pub const _SC_ADVISORY_INFO: c_int = 65; +pub const _SC_BARRIERS: c_int = 66; +pub const _SC_CLOCK_SELECTION: c_int = 67; +pub const _SC_CPUTIME: c_int = 68; +pub const _SC_FILE_LOCKING: c_int = 69; +pub const _SC_NPROCESSORS_ONLN: c_int = 58; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 70; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 71; +pub const _SC_HOST_NAME_MAX: c_int = 72; +pub const _SC_LOGIN_NAME_MAX: c_int = 73; +pub const _SC_MONOTONIC_CLOCK: c_int = 74; +pub const _SC_MQ_PRIO_MAX: c_int = 75; +pub const _SC_READER_WRITER_LOCKS: c_int = 76; +pub const _SC_REGEXP: c_int = 77; +pub const _SC_SHELL: c_int = 78; +pub const _SC_SPAWN: c_int = 79; +pub const _SC_SPIN_LOCKS: c_int = 80; +pub const _SC_SPORADIC_SERVER: c_int = 81; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 82; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 83; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 85; +pub const _SC_THREAD_KEYS_MAX: c_int = 86; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 87; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 88; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 89; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 90; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 91; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 92; +pub const _SC_THREAD_STACK_MIN: c_int = 93; +pub const _SC_THREAD_THREADS_MAX: c_int = 94; +pub const _SC_TIMEOUTS: c_int = 95; +pub const _SC_THREADS: c_int = 96; +pub const _SC_TRACE: c_int = 97; +pub const _SC_TRACE_EVENT_FILTER: c_int = 98; +pub const _SC_TRACE_INHERIT: c_int = 99; +pub const _SC_TRACE_LOG: c_int = 100; +pub const _SC_TTY_NAME_MAX: c_int = 101; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 102; +pub const _SC_V6_ILP32_OFF32: c_int = 103; +pub const _SC_V6_ILP32_OFFBIG: c_int = 104; +pub const _SC_V6_LP64_OFF64: c_int = 105; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 106; +pub const _SC_ATEXIT_MAX: c_int = 107; +pub const _SC_XOPEN_CRYPT: c_int = 108; +pub const _SC_XOPEN_ENH_I18N: c_int = 109; +pub const _SC_XOPEN_LEGACY: c_int = 110; +pub const _SC_XOPEN_REALTIME: c_int = 111; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 112; +pub const _SC_XOPEN_SHM: c_int = 113; +pub const _SC_XOPEN_STREAMS: c_int = 114; +pub const _SC_XOPEN_UNIX: c_int = 115; +pub const _SC_XOPEN_VERSION: c_int = 116; +pub const _SC_XOPEN_XCU_VERSION: c_int = 117; +pub const _SC_IPV6: c_int = 118; +pub const _SC_RAW_SOCKETS: c_int = 119; +pub const _SC_SYMLOOP_MAX: c_int = 120; +pub const _SC_PHYS_PAGES: c_int = 121; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_ERRORCHECK; - -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_OTHER: ::c_int = 2; -pub const SCHED_RR: ::c_int = 3; - -pub const FD_SETSIZE: ::c_int = 1024; - -pub const ST_NOSUID: ::c_ulong = 2; - -pub const NI_MAXHOST: ::size_t = 1025; - -pub const XUCRED_VERSION: ::c_uint = 0; - -pub const RTLD_LOCAL: ::c_int = 0; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOLOAD: ::c_int = 0x2000; -pub const RTLD_GLOBAL: ::c_int = 0x100; - -pub const LOG_NTP: ::c_int = 12 << 3; -pub const LOG_SECURITY: ::c_int = 13 << 3; -pub const LOG_CONSOLE: ::c_int = 14 << 3; -pub const LOG_NFACILITIES: ::c_int = 24; - -pub const TIOCEXCL: ::c_ulong = 0x2000740d; -pub const TIOCNXCL: ::c_ulong = 0x2000740e; -pub const TIOCFLUSH: ::c_ulong = 0x80047410; -pub const TIOCGETA: ::c_ulong = 0x402c7413; -pub const TIOCSETA: ::c_ulong = 0x802c7414; -pub const TIOCSETAW: ::c_ulong = 0x802c7415; -pub const TIOCSETAF: ::c_ulong = 0x802c7416; -pub const TIOCGETD: ::c_ulong = 0x4004741a; -pub const TIOCSETD: ::c_ulong = 0x8004741b; -pub const TIOCGDRAINWAIT: ::c_ulong = 0x40047456; -pub const TIOCSDRAINWAIT: ::c_ulong = 0x80047457; -pub const TIOCMGDTRWAIT: ::c_ulong = 0x4004745a; -pub const TIOCMSDTRWAIT: ::c_ulong = 0x8004745b; -pub const TIOCDRAIN: ::c_ulong = 0x2000745e; -pub const TIOCEXT: ::c_ulong = 0x80047460; -pub const TIOCSCTTY: ::c_ulong = 0x20007461; -pub const TIOCCONS: ::c_ulong = 0x80047462; -pub const TIOCGSID: ::c_ulong = 0x40047463; -pub const TIOCSTAT: ::c_ulong = 0x20007465; -pub const TIOCUCNTL: ::c_ulong = 0x80047466; -pub const TIOCSWINSZ: ::c_ulong = 0x80087467; -pub const TIOCGWINSZ: ::c_ulong = 0x40087468; -pub const TIOCMGET: ::c_ulong = 0x4004746a; -pub const TIOCM_LE: ::c_int = 0x1; -pub const TIOCM_DTR: ::c_int = 0x2; -pub const TIOCM_RTS: ::c_int = 0x4; -pub const TIOCM_ST: ::c_int = 0x8; -pub const TIOCM_SR: ::c_int = 0x10; -pub const TIOCM_CTS: ::c_int = 0x20; -pub const TIOCM_RI: ::c_int = 0x80; -pub const TIOCM_DSR: ::c_int = 0x100; -pub const TIOCM_CD: ::c_int = 0x40; -pub const TIOCM_CAR: ::c_int = 0x40; -pub const TIOCM_RNG: ::c_int = 0x80; -pub const TIOCMBIC: ::c_ulong = 0x8004746b; -pub const TIOCMBIS: ::c_ulong = 0x8004746c; -pub const TIOCMSET: ::c_ulong = 0x8004746d; -pub const TIOCSTART: ::c_ulong = 0x2000746e; -pub const TIOCSTOP: ::c_ulong = 0x2000746f; -pub const TIOCPKT: ::c_ulong = 0x80047470; -pub const TIOCPKT_DATA: ::c_int = 0x0; -pub const TIOCPKT_FLUSHREAD: ::c_int = 0x1; -pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x2; -pub const TIOCPKT_STOP: ::c_int = 0x4; -pub const TIOCPKT_START: ::c_int = 0x8; -pub const TIOCPKT_NOSTOP: ::c_int = 0x10; -pub const TIOCPKT_DOSTOP: ::c_int = 0x20; -pub const TIOCPKT_IOCTL: ::c_int = 0x40; -pub const TIOCNOTTY: ::c_ulong = 0x20007471; -pub const TIOCSTI: ::c_ulong = 0x80017472; -pub const TIOCOUTQ: ::c_ulong = 0x40047473; -pub const TIOCSPGRP: ::c_ulong = 0x80047476; -pub const TIOCGPGRP: ::c_ulong = 0x40047477; -pub const TIOCCDTR: ::c_ulong = 0x20007478; -pub const TIOCSDTR: ::c_ulong = 0x20007479; -pub const TTYDISC: ::c_int = 0x0; -pub const SLIPDISC: ::c_int = 0x4; -pub const PPPDISC: ::c_int = 0x5; -pub const NETGRAPHDISC: ::c_int = 0x6; - -pub const BIOCGRSIG: ::c_ulong = 0x40044272; -pub const BIOCSRSIG: ::c_ulong = 0x80044273; -pub const BIOCSDLT: ::c_ulong = 0x80044278; -pub const BIOCGSEESENT: ::c_ulong = 0x40044276; -pub const BIOCSSEESENT: ::c_ulong = 0x80044277; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 1; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 2; +pub const PTHREAD_MUTEX_NORMAL: c_int = 3; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_ERRORCHECK; + +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_OTHER: c_int = 2; +pub const SCHED_RR: c_int = 3; + +pub const FD_SETSIZE: c_int = 1024; + +pub const ST_NOSUID: c_ulong = 2; + +pub const NI_MAXHOST: size_t = 1025; + +pub const XUCRED_VERSION: c_uint = 0; + +pub const RTLD_LOCAL: c_int = 0; +pub const RTLD_NODELETE: c_int = 0x1000; +pub const RTLD_NOLOAD: c_int = 0x2000; +pub const RTLD_GLOBAL: c_int = 0x100; + +pub const LOG_NTP: c_int = 12 << 3; +pub const LOG_SECURITY: c_int = 13 << 3; +pub const LOG_CONSOLE: c_int = 14 << 3; +pub const LOG_NFACILITIES: c_int = 24; + +pub const TIOCEXCL: c_ulong = 0x2000740d; +pub const TIOCNXCL: c_ulong = 0x2000740e; +pub const TIOCFLUSH: c_ulong = 0x80047410; +pub const TIOCGETA: c_ulong = 0x402c7413; +pub const TIOCSETA: c_ulong = 0x802c7414; +pub const TIOCSETAW: c_ulong = 0x802c7415; +pub const TIOCSETAF: c_ulong = 0x802c7416; +pub const TIOCGETD: c_ulong = 0x4004741a; +pub const TIOCSETD: c_ulong = 0x8004741b; +pub const TIOCGDRAINWAIT: c_ulong = 0x40047456; +pub const TIOCSDRAINWAIT: c_ulong = 0x80047457; +pub const TIOCMGDTRWAIT: c_ulong = 0x4004745a; +pub const TIOCMSDTRWAIT: c_ulong = 0x8004745b; +pub const TIOCDRAIN: c_ulong = 0x2000745e; +pub const TIOCEXT: c_ulong = 0x80047460; +pub const TIOCSCTTY: c_ulong = 0x20007461; +pub const TIOCCONS: c_ulong = 0x80047462; +pub const TIOCGSID: c_ulong = 0x40047463; +pub const TIOCSTAT: c_ulong = 0x20007465; +pub const TIOCUCNTL: c_ulong = 0x80047466; +pub const TIOCSWINSZ: c_ulong = 0x80087467; +pub const TIOCGWINSZ: c_ulong = 0x40087468; +pub const TIOCMGET: c_ulong = 0x4004746a; +pub const TIOCM_LE: c_int = 0x1; +pub const TIOCM_DTR: c_int = 0x2; +pub const TIOCM_RTS: c_int = 0x4; +pub const TIOCM_ST: c_int = 0x8; +pub const TIOCM_SR: c_int = 0x10; +pub const TIOCM_CTS: c_int = 0x20; +pub const TIOCM_RI: c_int = 0x80; +pub const TIOCM_DSR: c_int = 0x100; +pub const TIOCM_CD: c_int = 0x40; +pub const TIOCM_CAR: c_int = 0x40; +pub const TIOCM_RNG: c_int = 0x80; +pub const TIOCMBIC: c_ulong = 0x8004746b; +pub const TIOCMBIS: c_ulong = 0x8004746c; +pub const TIOCMSET: c_ulong = 0x8004746d; +pub const TIOCSTART: c_ulong = 0x2000746e; +pub const TIOCSTOP: c_ulong = 0x2000746f; +pub const TIOCPKT: c_ulong = 0x80047470; +pub const TIOCPKT_DATA: c_int = 0x0; +pub const TIOCPKT_FLUSHREAD: c_int = 0x1; +pub const TIOCPKT_FLUSHWRITE: c_int = 0x2; +pub const TIOCPKT_STOP: c_int = 0x4; +pub const TIOCPKT_START: c_int = 0x8; +pub const TIOCPKT_NOSTOP: c_int = 0x10; +pub const TIOCPKT_DOSTOP: c_int = 0x20; +pub const TIOCPKT_IOCTL: c_int = 0x40; +pub const TIOCNOTTY: c_ulong = 0x20007471; +pub const TIOCSTI: c_ulong = 0x80017472; +pub const TIOCOUTQ: c_ulong = 0x40047473; +pub const TIOCSPGRP: c_ulong = 0x80047476; +pub const TIOCGPGRP: c_ulong = 0x40047477; +pub const TIOCCDTR: c_ulong = 0x20007478; +pub const TIOCSDTR: c_ulong = 0x20007479; +pub const TTYDISC: c_int = 0x0; +pub const SLIPDISC: c_int = 0x4; +pub const PPPDISC: c_int = 0x5; +pub const NETGRAPHDISC: c_int = 0x6; + +pub const BIOCGRSIG: c_ulong = 0x40044272; +pub const BIOCSRSIG: c_ulong = 0x80044273; +pub const BIOCSDLT: c_ulong = 0x80044278; +pub const BIOCGSEESENT: c_ulong = 0x40044276; +pub const BIOCSSEESENT: c_ulong = 0x80044277; cfg_if! { if #[cfg(target_pointer_width = "64")] { - pub const BIOCGDLTLIST: ::c_ulong = 0xc0104279; - pub const BIOCSETF: ::c_ulong = 0x80104267; + pub const BIOCGDLTLIST: c_ulong = 0xc0104279; + pub const BIOCSETF: c_ulong = 0x80104267; } else if #[cfg(target_pointer_width = "32")] { - pub const BIOCGDLTLIST: ::c_ulong = 0xc0084279; - pub const BIOCSETF: ::c_ulong = 0x80084267; + pub const BIOCGDLTLIST: c_ulong = 0xc0084279; + pub const BIOCSETF: c_ulong = 0x80084267; } } -pub const FIODTYPE: ::c_ulong = 0x4004667a; -pub const FIOGETLBA: ::c_ulong = 0x40046679; +pub const FIODTYPE: c_ulong = 0x4004667a; +pub const FIOGETLBA: c_ulong = 0x40046679; pub const B0: speed_t = 0; pub const B50: speed_t = 50; @@ -1338,16 +1343,16 @@ pub const EXTB: speed_t = 38400; pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; -pub const CRTSCTS: ::tcflag_t = 0x00030000; -pub const CCTS_OFLOW: ::tcflag_t = 0x00010000; -pub const CRTS_IFLOW: ::tcflag_t = 0x00020000; -pub const CDTR_IFLOW: ::tcflag_t = 0x00040000; -pub const CDSR_OFLOW: ::tcflag_t = 0x00080000; -pub const CCAR_OFLOW: ::tcflag_t = 0x00100000; +pub const CRTSCTS: crate::tcflag_t = 0x00030000; +pub const CCTS_OFLOW: crate::tcflag_t = 0x00010000; +pub const CRTS_IFLOW: crate::tcflag_t = 0x00020000; +pub const CDTR_IFLOW: crate::tcflag_t = 0x00040000; +pub const CDSR_OFLOW: crate::tcflag_t = 0x00080000; +pub const CCAR_OFLOW: crate::tcflag_t = 0x00100000; pub const VERASE2: usize = 7; -pub const OCRNL: ::tcflag_t = 0x10; -pub const ONOCR: ::tcflag_t = 0x20; -pub const ONLRET: ::tcflag_t = 0x40; +pub const OCRNL: crate::tcflag_t = 0x10; +pub const ONOCR: crate::tcflag_t = 0x20; +pub const ONLRET: crate::tcflag_t = 0x40; pub const CMGROUP_MAX: usize = 16; @@ -1357,64 +1362,64 @@ pub const EUI64_LEN: usize = 8; pub const BPF_ALIGNMENT: usize = SIZEOF_LONG; // Values for rtprio struct (prio field) and syscall (function argument) -pub const RTP_PRIO_MIN: ::c_ushort = 0; -pub const RTP_PRIO_MAX: ::c_ushort = 31; -pub const RTP_LOOKUP: ::c_int = 0; -pub const RTP_SET: ::c_int = 1; +pub const RTP_PRIO_MIN: c_ushort = 0; +pub const RTP_PRIO_MAX: c_ushort = 31; +pub const RTP_LOOKUP: c_int = 0; +pub const RTP_SET: c_int = 1; // Flags for chflags(2) -pub const UF_SETTABLE: ::c_ulong = 0x0000ffff; -pub const UF_NODUMP: ::c_ulong = 0x00000001; -pub const UF_IMMUTABLE: ::c_ulong = 0x00000002; -pub const UF_APPEND: ::c_ulong = 0x00000004; -pub const UF_OPAQUE: ::c_ulong = 0x00000008; -pub const UF_NOUNLINK: ::c_ulong = 0x00000010; -pub const SF_SETTABLE: ::c_ulong = 0xffff0000; -pub const SF_ARCHIVED: ::c_ulong = 0x00010000; -pub const SF_IMMUTABLE: ::c_ulong = 0x00020000; -pub const SF_APPEND: ::c_ulong = 0x00040000; -pub const SF_NOUNLINK: ::c_ulong = 0x00100000; - -pub const TIMER_ABSTIME: ::c_int = 1; +pub const UF_SETTABLE: c_ulong = 0x0000ffff; +pub const UF_NODUMP: c_ulong = 0x00000001; +pub const UF_IMMUTABLE: c_ulong = 0x00000002; +pub const UF_APPEND: c_ulong = 0x00000004; +pub const UF_OPAQUE: c_ulong = 0x00000008; +pub const UF_NOUNLINK: c_ulong = 0x00000010; +pub const SF_SETTABLE: c_ulong = 0xffff0000; +pub const SF_ARCHIVED: c_ulong = 0x00010000; +pub const SF_IMMUTABLE: c_ulong = 0x00020000; +pub const SF_APPEND: c_ulong = 0x00040000; +pub const SF_NOUNLINK: c_ulong = 0x00100000; + +pub const TIMER_ABSTIME: c_int = 1; // -pub const NTP_API: ::c_int = 4; -pub const MAXPHASE: ::c_long = 500000000; -pub const MAXFREQ: ::c_long = 500000; -pub const MINSEC: ::c_int = 256; -pub const MAXSEC: ::c_int = 2048; -pub const NANOSECOND: ::c_long = 1000000000; -pub const SCALE_PPM: ::c_int = 65; -pub const MAXTC: ::c_int = 10; -pub const MOD_OFFSET: ::c_uint = 0x0001; -pub const MOD_FREQUENCY: ::c_uint = 0x0002; -pub const MOD_MAXERROR: ::c_uint = 0x0004; -pub const MOD_ESTERROR: ::c_uint = 0x0008; -pub const MOD_STATUS: ::c_uint = 0x0010; -pub const MOD_TIMECONST: ::c_uint = 0x0020; -pub const MOD_PPSMAX: ::c_uint = 0x0040; -pub const MOD_TAI: ::c_uint = 0x0080; -pub const MOD_MICRO: ::c_uint = 0x1000; -pub const MOD_NANO: ::c_uint = 0x2000; -pub const MOD_CLKB: ::c_uint = 0x4000; -pub const MOD_CLKA: ::c_uint = 0x8000; -pub const STA_PLL: ::c_int = 0x0001; -pub const STA_PPSFREQ: ::c_int = 0x0002; -pub const STA_PPSTIME: ::c_int = 0x0004; -pub const STA_FLL: ::c_int = 0x0008; -pub const STA_INS: ::c_int = 0x0010; -pub const STA_DEL: ::c_int = 0x0020; -pub const STA_UNSYNC: ::c_int = 0x0040; -pub const STA_FREQHOLD: ::c_int = 0x0080; -pub const STA_PPSSIGNAL: ::c_int = 0x0100; -pub const STA_PPSJITTER: ::c_int = 0x0200; -pub const STA_PPSWANDER: ::c_int = 0x0400; -pub const STA_PPSERROR: ::c_int = 0x0800; -pub const STA_CLOCKERR: ::c_int = 0x1000; -pub const STA_NANO: ::c_int = 0x2000; -pub const STA_MODE: ::c_int = 0x4000; -pub const STA_CLK: ::c_int = 0x8000; -pub const STA_RONLY: ::c_int = STA_PPSSIGNAL +pub const NTP_API: c_int = 4; +pub const MAXPHASE: c_long = 500000000; +pub const MAXFREQ: c_long = 500000; +pub const MINSEC: c_int = 256; +pub const MAXSEC: c_int = 2048; +pub const NANOSECOND: c_long = 1000000000; +pub const SCALE_PPM: c_int = 65; +pub const MAXTC: c_int = 10; +pub const MOD_OFFSET: c_uint = 0x0001; +pub const MOD_FREQUENCY: c_uint = 0x0002; +pub const MOD_MAXERROR: c_uint = 0x0004; +pub const MOD_ESTERROR: c_uint = 0x0008; +pub const MOD_STATUS: c_uint = 0x0010; +pub const MOD_TIMECONST: c_uint = 0x0020; +pub const MOD_PPSMAX: c_uint = 0x0040; +pub const MOD_TAI: c_uint = 0x0080; +pub const MOD_MICRO: c_uint = 0x1000; +pub const MOD_NANO: c_uint = 0x2000; +pub const MOD_CLKB: c_uint = 0x4000; +pub const MOD_CLKA: c_uint = 0x8000; +pub const STA_PLL: c_int = 0x0001; +pub const STA_PPSFREQ: c_int = 0x0002; +pub const STA_PPSTIME: c_int = 0x0004; +pub const STA_FLL: c_int = 0x0008; +pub const STA_INS: c_int = 0x0010; +pub const STA_DEL: c_int = 0x0020; +pub const STA_UNSYNC: c_int = 0x0040; +pub const STA_FREQHOLD: c_int = 0x0080; +pub const STA_PPSSIGNAL: c_int = 0x0100; +pub const STA_PPSJITTER: c_int = 0x0200; +pub const STA_PPSWANDER: c_int = 0x0400; +pub const STA_PPSERROR: c_int = 0x0800; +pub const STA_CLOCKERR: c_int = 0x1000; +pub const STA_NANO: c_int = 0x2000; +pub const STA_MODE: c_int = 0x4000; +pub const STA_CLK: c_int = 0x8000; +pub const STA_RONLY: c_int = STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR @@ -1422,508 +1427,486 @@ pub const STA_RONLY: ::c_int = STA_PPSSIGNAL | STA_NANO | STA_MODE | STA_CLK; -pub const TIME_OK: ::c_int = 0; -pub const TIME_INS: ::c_int = 1; -pub const TIME_DEL: ::c_int = 2; -pub const TIME_OOP: ::c_int = 3; -pub const TIME_WAIT: ::c_int = 4; -pub const TIME_ERROR: ::c_int = 5; - -pub const REG_ENOSYS: ::c_int = -1; -pub const REG_ILLSEQ: ::c_int = 17; - -pub const IPC_PRIVATE: ::key_t = 0; -pub const IPC_CREAT: ::c_int = 0o1000; -pub const IPC_EXCL: ::c_int = 0o2000; -pub const IPC_NOWAIT: ::c_int = 0o4000; -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; -pub const IPC_R: ::c_int = 0o400; -pub const IPC_W: ::c_int = 0o200; -pub const IPC_M: ::c_int = 0o10000; - -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; - -pub const KENV_GET: ::c_int = 0; -pub const KENV_SET: ::c_int = 1; -pub const KENV_UNSET: ::c_int = 2; -pub const KENV_DUMP: ::c_int = 3; -pub const KENV_MNAMELEN: ::c_int = 128; -pub const KENV_MVALLEN: ::c_int = 128; - -pub const RB_ASKNAME: ::c_int = 0x001; -pub const RB_SINGLE: ::c_int = 0x002; -pub const RB_NOSYNC: ::c_int = 0x004; -pub const RB_HALT: ::c_int = 0x008; -pub const RB_INITNAME: ::c_int = 0x010; -pub const RB_DFLTROOT: ::c_int = 0x020; -pub const RB_KDB: ::c_int = 0x040; -pub const RB_RDONLY: ::c_int = 0x080; -pub const RB_DUMP: ::c_int = 0x100; -pub const RB_MINIROOT: ::c_int = 0x200; -pub const RB_VERBOSE: ::c_int = 0x800; -pub const RB_SERIAL: ::c_int = 0x1000; -pub const RB_CDROM: ::c_int = 0x2000; -pub const RB_POWEROFF: ::c_int = 0x4000; -pub const RB_GDB: ::c_int = 0x8000; -pub const RB_MUTE: ::c_int = 0x10000; -pub const RB_SELFTEST: ::c_int = 0x20000; +pub const TIME_OK: c_int = 0; +pub const TIME_INS: c_int = 1; +pub const TIME_DEL: c_int = 2; +pub const TIME_OOP: c_int = 3; +pub const TIME_WAIT: c_int = 4; +pub const TIME_ERROR: c_int = 5; + +pub const REG_ENOSYS: c_int = -1; +pub const REG_ILLSEQ: c_int = 17; + +pub const IPC_PRIVATE: crate::key_t = 0; +pub const IPC_CREAT: c_int = 0o1000; +pub const IPC_EXCL: c_int = 0o2000; +pub const IPC_NOWAIT: c_int = 0o4000; +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; +pub const IPC_R: c_int = 0o400; +pub const IPC_W: c_int = 0o200; +pub const IPC_M: c_int = 0o10000; + +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_R: c_int = 0o400; +pub const SHM_W: c_int = 0o200; + +pub const KENV_GET: c_int = 0; +pub const KENV_SET: c_int = 1; +pub const KENV_UNSET: c_int = 2; +pub const KENV_DUMP: c_int = 3; +pub const KENV_MNAMELEN: c_int = 128; +pub const KENV_MVALLEN: c_int = 128; + +pub const RB_ASKNAME: c_int = 0x001; +pub const RB_SINGLE: c_int = 0x002; +pub const RB_NOSYNC: c_int = 0x004; +pub const RB_HALT: c_int = 0x008; +pub const RB_INITNAME: c_int = 0x010; +pub const RB_DFLTROOT: c_int = 0x020; +pub const RB_KDB: c_int = 0x040; +pub const RB_RDONLY: c_int = 0x080; +pub const RB_DUMP: c_int = 0x100; +pub const RB_MINIROOT: c_int = 0x200; +pub const RB_VERBOSE: c_int = 0x800; +pub const RB_SERIAL: c_int = 0x1000; +pub const RB_CDROM: c_int = 0x2000; +pub const RB_POWEROFF: c_int = 0x4000; +pub const RB_GDB: c_int = 0x8000; +pub const RB_MUTE: c_int = 0x10000; +pub const RB_SELFTEST: c_int = 0x20000; // For getrandom() -pub const GRND_NONBLOCK: ::c_uint = 0x1; -pub const GRND_RANDOM: ::c_uint = 0x2; -pub const GRND_INSECURE: ::c_uint = 0x4; +pub const GRND_NONBLOCK: c_uint = 0x1; +pub const GRND_RANDOM: c_uint = 0x2; +pub const GRND_INSECURE: c_uint = 0x4; safe_f! { - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0x13 } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0o177) == 0o177 } } extern "C" { - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; pub fn accept4( - s: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn chflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int; - pub fn chflagsat( - fd: ::c_int, - path: *const ::c_char, - flags: ::c_ulong, - atflag: ::c_int, - ) -> ::c_int; + s: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + flags: c_int, + ) -> c_int; + pub fn chflags(path: *const c_char, flags: c_ulong) -> c_int; + pub fn chflagsat(fd: c_int, path: *const c_char, flags: c_ulong, atflag: c_int) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int; - pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; - pub fn duplocale(base: ::locale_t) -> ::locale_t; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; pub fn endutxent(); - pub fn fchflags(fd: ::c_int, flags: ::c_ulong) -> ::c_int; - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; - pub fn getdomainname(name: *mut ::c_char, len: ::c_int) -> ::c_int; + pub fn fchflags(fd: c_int, flags: c_ulong) -> c_int; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn getdomainname(name: *mut c_char, len: c_int) -> c_int; pub fn getgrent_r( - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn getpwent_r( - pwd: *mut ::passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::passwd, - ) -> ::c_int; + pwd: *mut crate::passwd, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::passwd, + ) -> c_int; pub fn getgrouplist( - name: *const ::c_char, - basegid: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; + name: *const c_char, + basegid: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int; - pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; - pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: size_t, + serv: *mut c_char, + servlen: size_t, + flags: c_int, + ) -> c_int; + pub fn getpriority(which: c_int, who: c_int) -> c_int; + pub fn getresgid( + rgid: *mut crate::gid_t, + egid: *mut crate::gid_t, + sgid: *mut crate::gid_t, + ) -> c_int; + pub fn getresuid( + ruid: *mut crate::uid_t, + euid: *mut crate::uid_t, + suid: *mut crate::uid_t, + ) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; - pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; + pub fn initgroups(name: *const c_char, basegid: crate::gid_t) -> c_int; #[cfg_attr( all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "kevent@FBSD_1.0" )] pub fn kevent( - kq: ::c_int, - changelist: *const ::kevent, - nchanges: ::c_int, - eventlist: *mut ::kevent, - nevents: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn lchflags(path: *const ::c_char, flags: ::c_ulong) -> ::c_int; - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + kq: c_int, + changelist: *const crate::kevent, + nchanges: c_int, + eventlist: *mut crate::kevent, + nevents: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn lchflags(path: *const c_char, flags: c_ulong) -> c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; #[cfg_attr( all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "mknodat@FBSD_1.1" )] - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; - pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; - pub fn mincore(addr: *const ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; + pub fn malloc_usable_size(ptr: *const c_void) -> size_t; + pub fn mincore(addr: *const c_void, len: size_t, vec: *mut c_char) -> c_int; + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; pub fn ppoll( - fds: *mut ::pollfd, - nfds: ::nfds_t, - timeout: *const ::timespec, + fds: *mut crate::pollfd, + nfds: crate::nfds_t, + timeout: *const crate::timespec, sigmask: *const sigset_t, - ) -> ::c_int; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn pthread_attr_get_np(tid: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + ) -> c_int; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn pthread_attr_get_np(tid: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_main_np() -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; + pub fn pthread_main_np() -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_mutexattr_setpshared( - attr: *mut pthread_mutexattr_t, - pshared: ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; pub fn pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; - pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; - pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; + val: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: c_int) -> c_int; + pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_getpshared( - attr: *const ::pthread_barrierattr_t, - shared: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + shared: *mut c_int, + ) -> c_int; pub fn pthread_barrierattr_setpshared( - attr: *mut ::pthread_barrierattr_t, - shared: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_barrierattr_t, + shared: c_int, + ) -> c_int; pub fn pthread_barrier_init( barrier: *mut pthread_barrier_t, - attr: *const ::pthread_barrierattr_t, - count: ::c_uint, - ) -> ::c_int; - pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_get_name_np(tid: ::pthread_t, name: *mut ::c_char, len: ::size_t); - pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); + attr: *const crate::pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_get_name_np(tid: crate::pthread_t, name: *mut c_char, len: size_t); + pub fn pthread_set_name_np(tid: crate::pthread_t, name: *const c_char); pub fn pthread_getname_np( - thread: ::pthread_t, - buffer: *mut ::c_char, - length: ::size_t, - ) -> ::c_int; - pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int; + thread: crate::pthread_t, + buffer: *mut c_char, + length: size_t, + ) -> c_int; + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, + native: crate::pthread_t, + policy: c_int, param: *const sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, + native: crate::pthread_t, + policy: *mut c_int, param: *mut sched_param, - ) -> ::c_int; - pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_char, data: ::c_int) -> ::c_int; - pub fn utrace(addr: *const ::c_void, len: ::size_t) -> ::c_int; + ) -> c_int; + pub fn ptrace(request: c_int, pid: crate::pid_t, addr: *mut c_char, data: c_int) -> c_int; + pub fn utrace(addr: *const c_void, len: size_t) -> c_int; pub fn pututxline(ut: *const utmpx) -> *mut utmpx; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; - pub fn querylocale(mask: ::c_int, loc: ::locale_t) -> *const ::c_char; - pub fn rtprio(function: ::c_int, pid: ::pid_t, rtp: *mut rtprio) -> ::c_int; - pub fn sched_rr_get_interval(pid: ::pid_t, t: *mut ::timespec) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn querylocale(mask: c_int, loc: crate::locale_t) -> *const c_char; + pub fn rtprio(function: c_int, pid: crate::pid_t, rtp: *mut rtprio) -> c_int; + pub fn sched_rr_get_interval(pid: crate::pid_t, t: *mut crate::timespec) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut sched_param) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const sched_param) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; pub fn sendfile( - fd: ::c_int, - s: ::c_int, - offset: ::off_t, - nbytes: ::size_t, - hdtr: *mut ::sf_hdtr, - sbytes: *mut ::off_t, - flags: ::c_int, - ) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::c_int) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int; - pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; - pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + fd: c_int, + s: c_int, + offset: off_t, + nbytes: size_t, + hdtr: *mut crate::sf_hdtr, + sbytes: *mut off_t, + flags: c_int, + ) -> c_int; + pub fn setdomainname(name: *const c_char, len: c_int) -> c_int; + pub fn sethostname(name: *const c_char, len: c_int) -> c_int; + pub fn setpriority(which: c_int, who: c_int, prio: c_int) -> c_int; + pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int; + pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn setutxent(); - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; pub fn sysctl( - name: *const ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *const c_int, + namelen: c_uint, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *const c_void, + newlen: size_t, + ) -> c_int; pub fn sysctlbyname( - name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t, - ) -> ::c_int; - pub fn sysctlnametomib( - name: *const ::c_char, - mibp: *mut ::c_int, - sizep: *mut ::size_t, - ) -> ::c_int; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; + name: *const c_char, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *const c_void, + newlen: size_t, + ) -> c_int; + pub fn sysctlnametomib(name: *const c_char, mibp: *mut c_int, sizep: *mut size_t) -> c_int; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; - pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; - pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; + pub fn ntp_adjtime(buf: *mut timex) -> c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int; // #include pub fn dl_iterate_phdr( - callback: ::Option< - unsafe extern "C" fn( - info: *mut dl_phdr_info, - size: usize, - data: *mut ::c_void, - ) -> ::c_int, + callback: Option< + unsafe extern "C" fn(info: *mut dl_phdr_info, size: usize, data: *mut c_void) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; - pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; + pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t; pub fn iconv( cd: iconv_t, - inbuf: *mut *mut ::c_char, - inbytesleft: *mut ::size_t, - outbuf: *mut *mut ::c_char, - outbytesleft: *mut ::size_t, - ) -> ::size_t; - pub fn iconv_close(cd: iconv_t) -> ::c_int; + inbuf: *mut *mut c_char, + inbytesleft: *mut size_t, + outbuf: *mut *mut c_char, + outbytesleft: *mut size_t, + ) -> size_t; + pub fn iconv_close(cd: iconv_t) -> c_int; // Added in `FreeBSD` 11.0 // Added in `DragonFly BSD` 5.4 - pub fn explicit_bzero(s: *mut ::c_void, len: ::size_t); + pub fn explicit_bzero(s: *mut c_void, len: size_t); // ISO/IEC 9899:2011 ("ISO C11") K.3.7.4.1 - pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int; - pub fn gethostid() -> ::c_long; - pub fn sethostid(hostid: ::c_long); - - pub fn eui64_aton(a: *const ::c_char, e: *mut eui64) -> ::c_int; - pub fn eui64_ntoa(id: *const eui64, a: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn eui64_ntohost(hostname: *mut ::c_char, len: ::size_t, id: *const eui64) -> ::c_int; - pub fn eui64_hostton(hostname: *const ::c_char, id: *mut eui64) -> ::c_int; - - pub fn eaccess(path: *const ::c_char, mode: ::c_int) -> ::c_int; - - pub fn kenv( - action: ::c_int, - name: *const ::c_char, - value: *mut ::c_char, - len: ::c_int, - ) -> ::c_int; - pub fn reboot(howto: ::c_int) -> ::c_int; - - pub fn exect( - path: *const ::c_char, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pub fn memset_s(s: *mut c_void, smax: size_t, c: c_int, n: size_t) -> c_int; + pub fn gethostid() -> c_long; + pub fn sethostid(hostid: c_long); + + pub fn eui64_aton(a: *const c_char, e: *mut eui64) -> c_int; + pub fn eui64_ntoa(id: *const eui64, a: *mut c_char, len: size_t) -> c_int; + pub fn eui64_ntohost(hostname: *mut c_char, len: size_t, id: *const eui64) -> c_int; + pub fn eui64_hostton(hostname: *const c_char, id: *mut eui64) -> c_int; + + pub fn eaccess(path: *const c_char, mode: c_int) -> c_int; + + pub fn kenv(action: c_int, name: *const c_char, value: *mut c_char, len: c_int) -> c_int; + pub fn reboot(howto: c_int) -> c_int; + + pub fn exect(path: *const c_char, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; pub fn execvP( - file: *const ::c_char, - search_path: *const ::c_char, - argv: *const *mut ::c_char, - ) -> ::c_int; + file: *const c_char, + search_path: *const c_char, + argv: *const *mut c_char, + ) -> c_int; } #[link(name = "rt")] extern "C" { - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; + pub fn mq_notify(mqd: crate::mqd_t, notification: *const crate::sigevent) -> c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; + pub fn mq_setattr( + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; - - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; + + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; } #[link(name = "util")] extern "C" { pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::c_int; + winp: *mut crate::winsize, + ) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::pid_t; - pub fn login_tty(fd: ::c_int) -> ::c_int; + winp: *mut crate::winsize, + ) -> crate::pid_t; + pub fn login_tty(fd: c_int) -> c_int; pub fn fparseln( - stream: *mut ::FILE, - len: *mut ::size_t, - lineno: *mut ::size_t, - delim: *const ::c_char, - flags: ::c_int, - ) -> *mut ::c_char; + stream: *mut crate::FILE, + len: *mut size_t, + lineno: *mut size_t, + delim: *const c_char, + flags: c_int, + ) -> *mut c_char; } #[link(name = "execinfo")] extern "C" { - pub fn backtrace(addrlist: *mut *mut ::c_void, len: ::size_t) -> ::size_t; - pub fn backtrace_symbols(addrlist: *const *mut ::c_void, len: ::size_t) -> *mut *mut ::c_char; - pub fn backtrace_symbols_fd( - addrlist: *const *mut ::c_void, - len: ::size_t, - fd: ::c_int, - ) -> ::c_int; + pub fn backtrace(addrlist: *mut *mut c_void, len: size_t) -> size_t; + pub fn backtrace_symbols(addrlist: *const *mut c_void, len: size_t) -> *mut *mut c_char; + pub fn backtrace_symbols_fd(addrlist: *const *mut c_void, len: size_t, fd: c_int) -> c_int; } #[link(name = "kvm")] extern "C" { pub fn kvm_open( - execfile: *const ::c_char, - corefile: *const ::c_char, - swapfile: *const ::c_char, - flags: ::c_int, - errstr: *const ::c_char, - ) -> *mut ::kvm_t; - pub fn kvm_close(kd: *mut ::kvm_t) -> ::c_int; + execfile: *const c_char, + corefile: *const c_char, + swapfile: *const c_char, + flags: c_int, + errstr: *const c_char, + ) -> *mut crate::kvm_t; + pub fn kvm_close(kd: *mut crate::kvm_t) -> c_int; pub fn kvm_getprocs( - kd: *mut ::kvm_t, - op: ::c_int, - arg: ::c_int, - cnt: *mut ::c_int, - ) -> *mut ::kinfo_proc; - pub fn kvm_getloadavg(kd: *mut kvm_t, loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; + kd: *mut crate::kvm_t, + op: c_int, + arg: c_int, + cnt: *mut c_int, + ) -> *mut crate::kinfo_proc; + pub fn kvm_getloadavg(kd: *mut kvm_t, loadavg: *mut c_double, nelem: c_int) -> c_int; pub fn kvm_openfiles( - execfile: *const ::c_char, - corefile: *const ::c_char, - swapfile: *const ::c_char, - flags: ::c_int, - errbuf: *mut ::c_char, - ) -> *mut ::kvm_t; + execfile: *const c_char, + corefile: *const c_char, + swapfile: *const c_char, + flags: c_int, + errbuf: *mut c_char, + ) -> *mut crate::kvm_t; pub fn kvm_read( - kd: *mut ::kvm_t, - addr: ::c_ulong, - buf: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + kd: *mut crate::kvm_t, + addr: c_ulong, + buf: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn kvm_write( - kd: *mut ::kvm_t, - addr: ::c_ulong, - buf: *const ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + kd: *mut crate::kvm_t, + addr: c_ulong, + buf: *const c_void, + nbytes: size_t, + ) -> ssize_t; } cfg_if! { diff --git a/src/unix/bsd/mod.rs b/src/unix/bsd/mod.rs index 422a330f64213..445911b174d6f 100644 --- a/src/unix/bsd/mod.rs +++ b/src/unix/bsd/mod.rs @@ -1,39 +1,41 @@ +use crate::{c_double, c_int, c_short, c_uint, c_ushort, c_void, size_t, ssize_t}; + pub type off_t = i64; pub type useconds_t = u32; pub type blkcnt_t = i64; pub type socklen_t = u32; pub type sa_family_t = u8; -pub type pthread_t = ::uintptr_t; -pub type nfds_t = ::c_uint; +pub type pthread_t = crate::uintptr_t; +pub type nfds_t = c_uint; pub type regoff_t = off_t; s! { pub struct sockaddr { pub sa_len: u8, pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_in6 { pub sin6_len: u8, pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_change: ::time_t, - pub pw_class: *mut ::c_char, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, - pub pw_expire: ::time_t, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_change: crate::time_t, + pub pw_class: *mut c_char, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, + pub pw_expire: crate::time_t, #[cfg(not(any( target_os = "macos", @@ -44,19 +46,19 @@ s! { target_os = "netbsd", target_os = "openbsd" )))] - pub pw_fields: ::c_int, + pub pw_fields: c_int, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, - pub ifa_name: *mut ::c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_dstaddr: *mut ::sockaddr, - pub ifa_data: *mut ::c_void, + pub ifa_name: *mut c_char, + pub ifa_flags: c_uint, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_dstaddr: *mut crate::sockaddr, + pub ifa_data: *mut c_void, #[cfg(target_os = "netbsd")] - pub ifa_addrflags: ::c_uint, + pub ifa_addrflags: c_uint, } pub struct fd_set { @@ -73,33 +75,33 @@ s! { } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *mut ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_long, + pub tm_zone: *mut c_char, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct fsid_t { @@ -107,15 +109,15 @@ s! { } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } pub struct regex_t { - __re_magic: ::c_int, - __re_nsub: ::size_t, - __re_endp: *const ::c_char, - __re_g: *mut ::c_void, + __re_magic: c_int, + __re_nsub: size_t, + __re_endp: *const c_char, + __re_g: *mut c_void, } pub struct regmatch_t { @@ -124,10 +126,10 @@ s! { } pub struct option { - pub name: *const ::c_char, - pub has_arg: ::c_int, - pub flag: *mut ::c_int, - pub val: ::c_int, + pub name: *const c_char, + pub has_arg: c_int, + pub flag: *mut c_int, + pub val: c_int, } } @@ -135,30 +137,30 @@ s_no_extra_traits! { pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, - pub sun_path: [::c_char; 104], + pub sun_path: [c_char; 104], } pub struct utsname { #[cfg(not(target_os = "dragonfly"))] - pub sysname: [::c_char; 256], + pub sysname: [c_char; 256], #[cfg(target_os = "dragonfly")] - pub sysname: [::c_char; 32], + pub sysname: [c_char; 32], #[cfg(not(target_os = "dragonfly"))] - pub nodename: [::c_char; 256], + pub nodename: [c_char; 256], #[cfg(target_os = "dragonfly")] - pub nodename: [::c_char; 32], + pub nodename: [c_char; 32], #[cfg(not(target_os = "dragonfly"))] - pub release: [::c_char; 256], + pub release: [c_char; 256], #[cfg(target_os = "dragonfly")] - pub release: [::c_char; 32], + pub release: [c_char; 32], #[cfg(not(target_os = "dragonfly"))] - pub version: [::c_char; 256], + pub version: [c_char; 256], #[cfg(target_os = "dragonfly")] - pub version: [::c_char; 32], + pub version: [c_char; 32], #[cfg(not(target_os = "dragonfly"))] - pub machine: [::c_char; 256], + pub machine: [c_char; 256], #[cfg(target_os = "dragonfly")] - pub machine: [::c_char; 32], + pub machine: [c_char; 32], } } @@ -178,8 +180,8 @@ cfg_if! { impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_len", &self.sun_len) .field("sun_family", &self.sun_family) @@ -188,8 +190,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_len.hash(state); self.sun_family.hash(state); self.sun_path.hash(state); @@ -227,8 +229,8 @@ cfg_if! { impl Eq for utsname {} - impl ::fmt::Debug for utsname { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utsname { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utsname") // FIXME: .field("sysname", &self.sysname) // FIXME: .field("nodename", &self.nodename) @@ -239,8 +241,8 @@ cfg_if! { } } - impl ::hash::Hash for utsname { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utsname { + fn hash(&self, state: &mut H) { self.sysname.hash(state); self.nodename.hash(state); self.release.hash(state); @@ -251,72 +253,72 @@ cfg_if! { } } -pub const LC_ALL: ::c_int = 0; -pub const LC_COLLATE: ::c_int = 1; -pub const LC_CTYPE: ::c_int = 2; -pub const LC_MONETARY: ::c_int = 3; -pub const LC_NUMERIC: ::c_int = 4; -pub const LC_TIME: ::c_int = 5; -pub const LC_MESSAGES: ::c_int = 6; - -pub const FIOCLEX: ::c_ulong = 0x20006601; -pub const FIONCLEX: ::c_ulong = 0x20006602; -pub const FIONREAD: ::c_ulong = 0x4004667f; -pub const FIONBIO: ::c_ulong = 0x8004667e; -pub const FIOASYNC: ::c_ulong = 0x8004667d; -pub const FIOSETOWN: ::c_ulong = 0x8004667c; -pub const FIOGETOWN: ::c_ulong = 0x4004667b; - -pub const PATH_MAX: ::c_int = 1024; -pub const MAXPATHLEN: ::c_int = PATH_MAX; - -pub const IOV_MAX: ::c_int = 1024; - -pub const SA_ONSTACK: ::c_int = 0x0001; -pub const SA_SIGINFO: ::c_int = 0x0040; -pub const SA_RESTART: ::c_int = 0x0002; -pub const SA_RESETHAND: ::c_int = 0x0004; -pub const SA_NOCLDSTOP: ::c_int = 0x0008; -pub const SA_NODEFER: ::c_int = 0x0010; -pub const SA_NOCLDWAIT: ::c_int = 0x0020; - -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 4; - -pub const SIGCHLD: ::c_int = 20; -pub const SIGBUS: ::c_int = 10; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const SIGCONT: ::c_int = 19; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGURG: ::c_int = 16; -pub const SIGIO: ::c_int = 23; -pub const SIGSYS: ::c_int = 12; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGINFO: ::c_int = 29; - -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; - -pub const IP_TOS: ::c_int = 3; -pub const IP_MULTICAST_IF: ::c_int = 9; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; - -pub const IPV6_UNICAST_HOPS: ::c_int = 4; -pub const IPV6_MULTICAST_IF: ::c_int = 9; -pub const IPV6_MULTICAST_HOPS: ::c_int = 10; -pub const IPV6_MULTICAST_LOOP: ::c_int = 11; -pub const IPV6_V6ONLY: ::c_int = 27; -pub const IPV6_DONTFRAG: ::c_int = 62; +pub const LC_ALL: c_int = 0; +pub const LC_COLLATE: c_int = 1; +pub const LC_CTYPE: c_int = 2; +pub const LC_MONETARY: c_int = 3; +pub const LC_NUMERIC: c_int = 4; +pub const LC_TIME: c_int = 5; +pub const LC_MESSAGES: c_int = 6; + +pub const FIOCLEX: c_ulong = 0x20006601; +pub const FIONCLEX: c_ulong = 0x20006602; +pub const FIONREAD: c_ulong = 0x4004667f; +pub const FIONBIO: c_ulong = 0x8004667e; +pub const FIOASYNC: c_ulong = 0x8004667d; +pub const FIOSETOWN: c_ulong = 0x8004667c; +pub const FIOGETOWN: c_ulong = 0x4004667b; + +pub const PATH_MAX: c_int = 1024; +pub const MAXPATHLEN: c_int = PATH_MAX; + +pub const IOV_MAX: c_int = 1024; + +pub const SA_ONSTACK: c_int = 0x0001; +pub const SA_SIGINFO: c_int = 0x0040; +pub const SA_RESTART: c_int = 0x0002; +pub const SA_RESETHAND: c_int = 0x0004; +pub const SA_NOCLDSTOP: c_int = 0x0008; +pub const SA_NODEFER: c_int = 0x0010; +pub const SA_NOCLDWAIT: c_int = 0x0020; + +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 4; + +pub const SIGCHLD: c_int = 20; +pub const SIGBUS: c_int = 10; +pub const SIGUSR1: c_int = 30; +pub const SIGUSR2: c_int = 31; +pub const SIGCONT: c_int = 19; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGURG: c_int = 16; +pub const SIGIO: c_int = 23; +pub const SIGSYS: c_int = 12; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGINFO: c_int = 29; + +pub const SIG_SETMASK: c_int = 3; +pub const SIG_BLOCK: c_int = 0x1; +pub const SIG_UNBLOCK: c_int = 0x2; + +pub const IP_TOS: c_int = 3; +pub const IP_MULTICAST_IF: c_int = 9; +pub const IP_MULTICAST_TTL: c_int = 10; +pub const IP_MULTICAST_LOOP: c_int = 11; + +pub const IPV6_UNICAST_HOPS: c_int = 4; +pub const IPV6_MULTICAST_IF: c_int = 9; +pub const IPV6_MULTICAST_HOPS: c_int = 10; +pub const IPV6_MULTICAST_LOOP: c_int = 11; +pub const IPV6_V6ONLY: c_int = 27; +pub const IPV6_DONTFRAG: c_int = 62; pub const IPTOS_ECN_NOTECT: u8 = 0x00; pub const IPTOS_ECN_MASK: u8 = 0x03; @@ -324,60 +326,60 @@ pub const IPTOS_ECN_ECT1: u8 = 0x01; pub const IPTOS_ECN_ECT0: u8 = 0x02; pub const IPTOS_ECN_CE: u8 = 0x03; -pub const ST_RDONLY: ::c_ulong = 1; +pub const ST_RDONLY: c_ulong = 1; -pub const SCM_RIGHTS: ::c_int = 0x01; +pub const SCM_RIGHTS: c_int = 0x01; pub const NCCS: usize = 20; -pub const O_ACCMODE: ::c_int = 0x3; -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 512; -pub const O_TRUNC: ::c_int = 1024; -pub const O_EXCL: ::c_int = 2048; -pub const O_ASYNC: ::c_int = 0x40; -pub const O_SYNC: ::c_int = 0x80; -pub const O_NONBLOCK: ::c_int = 0x4; -pub const O_NOFOLLOW: ::c_int = 0x100; -pub const O_SHLOCK: ::c_int = 0x10; -pub const O_EXLOCK: ::c_int = 0x20; -pub const O_FSYNC: ::c_int = O_SYNC; -pub const O_NDELAY: ::c_int = O_NONBLOCK; - -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; - -pub const F_RDLCK: ::c_short = 1; -pub const F_UNLCK: ::c_short = 2; -pub const F_WRLCK: ::c_short = 3; - -pub const MNT_RDONLY: ::c_int = 0x00000001; -pub const MNT_SYNCHRONOUS: ::c_int = 0x00000002; -pub const MNT_NOEXEC: ::c_int = 0x00000004; -pub const MNT_NOSUID: ::c_int = 0x00000008; -pub const MNT_ASYNC: ::c_int = 0x00000040; -pub const MNT_EXPORTED: ::c_int = 0x00000100; -pub const MNT_UPDATE: ::c_int = 0x00010000; -pub const MNT_RELOAD: ::c_int = 0x00040000; -pub const MNT_FORCE: ::c_int = 0x00080000; - -pub const Q_SYNC: ::c_int = 0x600; -pub const Q_QUOTAON: ::c_int = 0x100; -pub const Q_QUOTAOFF: ::c_int = 0x200; - -pub const TCIOFF: ::c_int = 3; -pub const TCION: ::c_int = 4; -pub const TCOOFF: ::c_int = 1; -pub const TCOON: ::c_int = 2; -pub const TCIFLUSH: ::c_int = 1; -pub const TCOFLUSH: ::c_int = 2; -pub const TCIOFLUSH: ::c_int = 3; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const O_ACCMODE: c_int = 0x3; +pub const O_RDONLY: c_int = 0; +pub const O_WRONLY: c_int = 1; +pub const O_RDWR: c_int = 2; +pub const O_APPEND: c_int = 8; +pub const O_CREAT: c_int = 512; +pub const O_TRUNC: c_int = 1024; +pub const O_EXCL: c_int = 2048; +pub const O_ASYNC: c_int = 0x40; +pub const O_SYNC: c_int = 0x80; +pub const O_NONBLOCK: c_int = 0x4; +pub const O_NOFOLLOW: c_int = 0x100; +pub const O_SHLOCK: c_int = 0x10; +pub const O_EXLOCK: c_int = 0x20; +pub const O_FSYNC: c_int = O_SYNC; +pub const O_NDELAY: c_int = O_NONBLOCK; + +pub const F_GETOWN: c_int = 5; +pub const F_SETOWN: c_int = 6; + +pub const F_RDLCK: c_short = 1; +pub const F_UNLCK: c_short = 2; +pub const F_WRLCK: c_short = 3; + +pub const MNT_RDONLY: c_int = 0x00000001; +pub const MNT_SYNCHRONOUS: c_int = 0x00000002; +pub const MNT_NOEXEC: c_int = 0x00000004; +pub const MNT_NOSUID: c_int = 0x00000008; +pub const MNT_ASYNC: c_int = 0x00000040; +pub const MNT_EXPORTED: c_int = 0x00000100; +pub const MNT_UPDATE: c_int = 0x00010000; +pub const MNT_RELOAD: c_int = 0x00040000; +pub const MNT_FORCE: c_int = 0x00080000; + +pub const Q_SYNC: c_int = 0x600; +pub const Q_QUOTAON: c_int = 0x100; +pub const Q_QUOTAOFF: c_int = 0x200; + +pub const TCIOFF: c_int = 3; +pub const TCION: c_int = 4; +pub const TCOOFF: c_int = 1; +pub const TCOON: c_int = 2; +pub const TCIFLUSH: c_int = 1; +pub const TCOFLUSH: c_int = 2; +pub const TCIOFLUSH: c_int = 3; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; pub const VEOF: usize = 0; pub const VEOL: usize = 1; pub const VEOL2: usize = 2; @@ -396,225 +398,225 @@ pub const VDISCARD: usize = 15; pub const VMIN: usize = 16; pub const VTIME: usize = 17; pub const VSTATUS: usize = 18; -pub const _POSIX_VDISABLE: ::cc_t = 0xff; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXON: ::tcflag_t = 0x00000200; -pub const IXOFF: ::tcflag_t = 0x00000400; -pub const IXANY: ::tcflag_t = 0x00000800; -pub const IMAXBEL: ::tcflag_t = 0x00002000; -pub const OPOST: ::tcflag_t = 0x1; -pub const ONLCR: ::tcflag_t = 0x2; -pub const OXTABS: ::tcflag_t = 0x4; -pub const ONOEOT: ::tcflag_t = 0x8; -pub const CIGNORE: ::tcflag_t = 0x00000001; -pub const CSIZE: ::tcflag_t = 0x00000300; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CS6: ::tcflag_t = 0x00000100; -pub const CS7: ::tcflag_t = 0x00000200; -pub const CS8: ::tcflag_t = 0x00000300; -pub const CSTOPB: ::tcflag_t = 0x00000400; -pub const CREAD: ::tcflag_t = 0x00000800; -pub const PARENB: ::tcflag_t = 0x00001000; -pub const PARODD: ::tcflag_t = 0x00002000; -pub const HUPCL: ::tcflag_t = 0x00004000; -pub const CLOCAL: ::tcflag_t = 0x00008000; -pub const ECHOKE: ::tcflag_t = 0x00000001; -pub const ECHOE: ::tcflag_t = 0x00000002; -pub const ECHOK: ::tcflag_t = 0x00000004; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const ECHONL: ::tcflag_t = 0x00000010; -pub const ECHOPRT: ::tcflag_t = 0x00000020; -pub const ECHOCTL: ::tcflag_t = 0x00000040; -pub const ISIG: ::tcflag_t = 0x00000080; -pub const ICANON: ::tcflag_t = 0x00000100; -pub const ALTWERASE: ::tcflag_t = 0x00000200; -pub const IEXTEN: ::tcflag_t = 0x00000400; -pub const EXTPROC: ::tcflag_t = 0x00000800; -pub const TOSTOP: ::tcflag_t = 0x00400000; -pub const FLUSHO: ::tcflag_t = 0x00800000; -pub const NOKERNINFO: ::tcflag_t = 0x02000000; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x80000000; -pub const MDMBUF: ::tcflag_t = 0x00100000; - -pub const WNOHANG: ::c_int = 0x00000001; -pub const WUNTRACED: ::c_int = 0x00000002; - -pub const RTLD_LAZY: ::c_int = 0x1; -pub const RTLD_NOW: ::c_int = 0x2; -pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void; -pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void; - -pub const LOG_CRON: ::c_int = 9 << 3; -pub const LOG_AUTHPRIV: ::c_int = 10 << 3; -pub const LOG_FTP: ::c_int = 11 << 3; -pub const LOG_PERROR: ::c_int = 0x20; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_MAXSEG: ::c_int = 2; +pub const _POSIX_VDISABLE: crate::cc_t = 0xff; +pub const IGNBRK: crate::tcflag_t = 0x00000001; +pub const BRKINT: crate::tcflag_t = 0x00000002; +pub const IGNPAR: crate::tcflag_t = 0x00000004; +pub const PARMRK: crate::tcflag_t = 0x00000008; +pub const INPCK: crate::tcflag_t = 0x00000010; +pub const ISTRIP: crate::tcflag_t = 0x00000020; +pub const INLCR: crate::tcflag_t = 0x00000040; +pub const IGNCR: crate::tcflag_t = 0x00000080; +pub const ICRNL: crate::tcflag_t = 0x00000100; +pub const IXON: crate::tcflag_t = 0x00000200; +pub const IXOFF: crate::tcflag_t = 0x00000400; +pub const IXANY: crate::tcflag_t = 0x00000800; +pub const IMAXBEL: crate::tcflag_t = 0x00002000; +pub const OPOST: crate::tcflag_t = 0x1; +pub const ONLCR: crate::tcflag_t = 0x2; +pub const OXTABS: crate::tcflag_t = 0x4; +pub const ONOEOT: crate::tcflag_t = 0x8; +pub const CIGNORE: crate::tcflag_t = 0x00000001; +pub const CSIZE: crate::tcflag_t = 0x00000300; +pub const CS5: crate::tcflag_t = 0x00000000; +pub const CS6: crate::tcflag_t = 0x00000100; +pub const CS7: crate::tcflag_t = 0x00000200; +pub const CS8: crate::tcflag_t = 0x00000300; +pub const CSTOPB: crate::tcflag_t = 0x00000400; +pub const CREAD: crate::tcflag_t = 0x00000800; +pub const PARENB: crate::tcflag_t = 0x00001000; +pub const PARODD: crate::tcflag_t = 0x00002000; +pub const HUPCL: crate::tcflag_t = 0x00004000; +pub const CLOCAL: crate::tcflag_t = 0x00008000; +pub const ECHOKE: crate::tcflag_t = 0x00000001; +pub const ECHOE: crate::tcflag_t = 0x00000002; +pub const ECHOK: crate::tcflag_t = 0x00000004; +pub const ECHO: crate::tcflag_t = 0x00000008; +pub const ECHONL: crate::tcflag_t = 0x00000010; +pub const ECHOPRT: crate::tcflag_t = 0x00000020; +pub const ECHOCTL: crate::tcflag_t = 0x00000040; +pub const ISIG: crate::tcflag_t = 0x00000080; +pub const ICANON: crate::tcflag_t = 0x00000100; +pub const ALTWERASE: crate::tcflag_t = 0x00000200; +pub const IEXTEN: crate::tcflag_t = 0x00000400; +pub const EXTPROC: crate::tcflag_t = 0x00000800; +pub const TOSTOP: crate::tcflag_t = 0x00400000; +pub const FLUSHO: crate::tcflag_t = 0x00800000; +pub const NOKERNINFO: crate::tcflag_t = 0x02000000; +pub const PENDIN: crate::tcflag_t = 0x20000000; +pub const NOFLSH: crate::tcflag_t = 0x80000000; +pub const MDMBUF: crate::tcflag_t = 0x00100000; + +pub const WNOHANG: c_int = 0x00000001; +pub const WUNTRACED: c_int = 0x00000002; + +pub const RTLD_LAZY: c_int = 0x1; +pub const RTLD_NOW: c_int = 0x2; +pub const RTLD_NEXT: *mut c_void = -1isize as *mut c_void; +pub const RTLD_DEFAULT: *mut c_void = -2isize as *mut c_void; +pub const RTLD_SELF: *mut c_void = -3isize as *mut c_void; + +pub const LOG_CRON: c_int = 9 << 3; +pub const LOG_AUTHPRIV: c_int = 10 << 3; +pub const LOG_FTP: c_int = 11 << 3; +pub const LOG_PERROR: c_int = 0x20; + +pub const TCP_NODELAY: c_int = 1; +pub const TCP_MAXSEG: c_int = 2; pub const PIPE_BUF: usize = 512; // si_code values for SIGBUS signal -pub const BUS_ADRALN: ::c_int = 1; -pub const BUS_ADRERR: ::c_int = 2; -pub const BUS_OBJERR: ::c_int = 3; +pub const BUS_ADRALN: c_int = 1; +pub const BUS_ADRERR: c_int = 2; +pub const BUS_OBJERR: c_int = 3; // si_code values for SIGCHLD signal -pub const CLD_EXITED: ::c_int = 1; -pub const CLD_KILLED: ::c_int = 2; -pub const CLD_DUMPED: ::c_int = 3; -pub const CLD_TRAPPED: ::c_int = 4; -pub const CLD_STOPPED: ::c_int = 5; -pub const CLD_CONTINUED: ::c_int = 6; - -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLOUT: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLHUP: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; -pub const POLLRDNORM: ::c_short = 0x040; -pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLRDBAND: ::c_short = 0x080; -pub const POLLWRBAND: ::c_short = 0x100; - -pub const BIOCGBLEN: ::c_ulong = 0x40044266; -pub const BIOCSBLEN: ::c_ulong = 0xc0044266; -pub const BIOCFLUSH: ::c_uint = 0x20004268; -pub const BIOCPROMISC: ::c_uint = 0x20004269; -pub const BIOCGDLT: ::c_ulong = 0x4004426a; -pub const BIOCGETIF: ::c_ulong = 0x4020426b; -pub const BIOCSETIF: ::c_ulong = 0x8020426c; -pub const BIOCGSTATS: ::c_ulong = 0x4008426f; -pub const BIOCIMMEDIATE: ::c_ulong = 0x80044270; -pub const BIOCVERSION: ::c_ulong = 0x40044271; -pub const BIOCGHDRCMPLT: ::c_ulong = 0x40044274; -pub const BIOCSHDRCMPLT: ::c_ulong = 0x80044275; -pub const SIOCGIFADDR: ::c_ulong = 0xc0206921; - -pub const REG_BASIC: ::c_int = 0o0000; -pub const REG_EXTENDED: ::c_int = 0o0001; -pub const REG_ICASE: ::c_int = 0o0002; -pub const REG_NOSUB: ::c_int = 0o0004; -pub const REG_NEWLINE: ::c_int = 0o0010; -pub const REG_NOSPEC: ::c_int = 0o0020; -pub const REG_PEND: ::c_int = 0o0040; -pub const REG_DUMP: ::c_int = 0o0200; - -pub const REG_NOMATCH: ::c_int = 1; -pub const REG_BADPAT: ::c_int = 2; -pub const REG_ECOLLATE: ::c_int = 3; -pub const REG_ECTYPE: ::c_int = 4; -pub const REG_EESCAPE: ::c_int = 5; -pub const REG_ESUBREG: ::c_int = 6; -pub const REG_EBRACK: ::c_int = 7; -pub const REG_EPAREN: ::c_int = 8; -pub const REG_EBRACE: ::c_int = 9; -pub const REG_BADBR: ::c_int = 10; -pub const REG_ERANGE: ::c_int = 11; -pub const REG_ESPACE: ::c_int = 12; -pub const REG_BADRPT: ::c_int = 13; -pub const REG_EMPTY: ::c_int = 14; -pub const REG_ASSERT: ::c_int = 15; -pub const REG_INVARG: ::c_int = 16; -pub const REG_ATOI: ::c_int = 255; -pub const REG_ITOA: ::c_int = 0o0400; - -pub const REG_NOTBOL: ::c_int = 0o00001; -pub const REG_NOTEOL: ::c_int = 0o00002; -pub const REG_STARTEND: ::c_int = 0o00004; -pub const REG_TRACE: ::c_int = 0o00400; -pub const REG_LARGE: ::c_int = 0o01000; -pub const REG_BACKR: ::c_int = 0o02000; - -pub const TIOCCBRK: ::c_uint = 0x2000747a; -pub const TIOCSBRK: ::c_uint = 0x2000747b; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; - -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; +pub const CLD_EXITED: c_int = 1; +pub const CLD_KILLED: c_int = 2; +pub const CLD_DUMPED: c_int = 3; +pub const CLD_TRAPPED: c_int = 4; +pub const CLD_STOPPED: c_int = 5; +pub const CLD_CONTINUED: c_int = 6; + +pub const POLLIN: c_short = 0x1; +pub const POLLPRI: c_short = 0x2; +pub const POLLOUT: c_short = 0x4; +pub const POLLERR: c_short = 0x8; +pub const POLLHUP: c_short = 0x10; +pub const POLLNVAL: c_short = 0x20; +pub const POLLRDNORM: c_short = 0x040; +pub const POLLWRNORM: c_short = 0x004; +pub const POLLRDBAND: c_short = 0x080; +pub const POLLWRBAND: c_short = 0x100; + +pub const BIOCGBLEN: c_ulong = 0x40044266; +pub const BIOCSBLEN: c_ulong = 0xc0044266; +pub const BIOCFLUSH: c_uint = 0x20004268; +pub const BIOCPROMISC: c_uint = 0x20004269; +pub const BIOCGDLT: c_ulong = 0x4004426a; +pub const BIOCGETIF: c_ulong = 0x4020426b; +pub const BIOCSETIF: c_ulong = 0x8020426c; +pub const BIOCGSTATS: c_ulong = 0x4008426f; +pub const BIOCIMMEDIATE: c_ulong = 0x80044270; +pub const BIOCVERSION: c_ulong = 0x40044271; +pub const BIOCGHDRCMPLT: c_ulong = 0x40044274; +pub const BIOCSHDRCMPLT: c_ulong = 0x80044275; +pub const SIOCGIFADDR: c_ulong = 0xc0206921; + +pub const REG_BASIC: c_int = 0o0000; +pub const REG_EXTENDED: c_int = 0o0001; +pub const REG_ICASE: c_int = 0o0002; +pub const REG_NOSUB: c_int = 0o0004; +pub const REG_NEWLINE: c_int = 0o0010; +pub const REG_NOSPEC: c_int = 0o0020; +pub const REG_PEND: c_int = 0o0040; +pub const REG_DUMP: c_int = 0o0200; + +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_EMPTY: c_int = 14; +pub const REG_ASSERT: c_int = 15; +pub const REG_INVARG: c_int = 16; +pub const REG_ATOI: c_int = 255; +pub const REG_ITOA: c_int = 0o0400; + +pub const REG_NOTBOL: c_int = 0o00001; +pub const REG_NOTEOL: c_int = 0o00002; +pub const REG_STARTEND: c_int = 0o00004; +pub const REG_TRACE: c_int = 0o00400; +pub const REG_LARGE: c_int = 0o01000; +pub const REG_BACKR: c_int = 0o02000; + +pub const TIOCCBRK: c_uint = 0x2000747a; +pub const TIOCSBRK: c_uint = 0x2000747b; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; + +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; // net/route.h -pub const RTF_UP: ::c_int = 0x1; -pub const RTF_GATEWAY: ::c_int = 0x2; -pub const RTF_HOST: ::c_int = 0x4; -pub const RTF_REJECT: ::c_int = 0x8; -pub const RTF_DYNAMIC: ::c_int = 0x10; -pub const RTF_MODIFIED: ::c_int = 0x20; -pub const RTF_DONE: ::c_int = 0x40; -pub const RTF_STATIC: ::c_int = 0x800; -pub const RTF_BLACKHOLE: ::c_int = 0x1000; -pub const RTF_PROTO2: ::c_int = 0x4000; -pub const RTF_PROTO1: ::c_int = 0x8000; +pub const RTF_UP: c_int = 0x1; +pub const RTF_GATEWAY: c_int = 0x2; +pub const RTF_HOST: c_int = 0x4; +pub const RTF_REJECT: c_int = 0x8; +pub const RTF_DYNAMIC: c_int = 0x10; +pub const RTF_MODIFIED: c_int = 0x20; +pub const RTF_DONE: c_int = 0x40; +pub const RTF_STATIC: c_int = 0x800; +pub const RTF_BLACKHOLE: c_int = 0x1000; +pub const RTF_PROTO2: c_int = 0x4000; +pub const RTF_PROTO1: c_int = 0x8000; // Message types -pub const RTM_ADD: ::c_int = 0x1; -pub const RTM_DELETE: ::c_int = 0x2; -pub const RTM_CHANGE: ::c_int = 0x3; -pub const RTM_GET: ::c_int = 0x4; -pub const RTM_LOSING: ::c_int = 0x5; -pub const RTM_REDIRECT: ::c_int = 0x6; -pub const RTM_MISS: ::c_int = 0x7; +pub const RTM_ADD: c_int = 0x1; +pub const RTM_DELETE: c_int = 0x2; +pub const RTM_CHANGE: c_int = 0x3; +pub const RTM_GET: c_int = 0x4; +pub const RTM_LOSING: c_int = 0x5; +pub const RTM_REDIRECT: c_int = 0x6; +pub const RTM_MISS: c_int = 0x7; // Bitmask values for rtm_addrs. -pub const RTA_DST: ::c_int = 0x1; -pub const RTA_GATEWAY: ::c_int = 0x2; -pub const RTA_NETMASK: ::c_int = 0x4; -pub const RTA_GENMASK: ::c_int = 0x8; -pub const RTA_IFP: ::c_int = 0x10; -pub const RTA_IFA: ::c_int = 0x20; -pub const RTA_AUTHOR: ::c_int = 0x40; -pub const RTA_BRD: ::c_int = 0x80; +pub const RTA_DST: c_int = 0x1; +pub const RTA_GATEWAY: c_int = 0x2; +pub const RTA_NETMASK: c_int = 0x4; +pub const RTA_GENMASK: c_int = 0x8; +pub const RTA_IFP: c_int = 0x10; +pub const RTA_IFA: c_int = 0x20; +pub const RTA_AUTHOR: c_int = 0x40; +pub const RTA_BRD: c_int = 0x80; // Index offsets for sockaddr array for alternate internal encoding. -pub const RTAX_DST: ::c_int = 0; -pub const RTAX_GATEWAY: ::c_int = 1; -pub const RTAX_NETMASK: ::c_int = 2; -pub const RTAX_GENMASK: ::c_int = 3; -pub const RTAX_IFP: ::c_int = 4; -pub const RTAX_IFA: ::c_int = 5; -pub const RTAX_AUTHOR: ::c_int = 6; -pub const RTAX_BRD: ::c_int = 7; +pub const RTAX_DST: c_int = 0; +pub const RTAX_GATEWAY: c_int = 1; +pub const RTAX_NETMASK: c_int = 2; +pub const RTAX_GENMASK: c_int = 3; +pub const RTAX_IFP: c_int = 4; +pub const RTAX_IFA: c_int = 5; +pub const RTAX_AUTHOR: c_int = 6; +pub const RTAX_BRD: c_int = 7; f! { - pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr { - if (*mhdr).msg_controllen as usize >= ::mem::size_of::<::cmsghdr>() { - (*mhdr).msg_control as *mut ::cmsghdr + pub fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut cmsghdr { + if (*mhdr).msg_controllen as usize >= crate::mem::size_of::() { + (*mhdr).msg_control as *mut cmsghdr } else { core::ptr::null_mut() } } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; @@ -628,23 +630,23 @@ f! { } safe_f! { - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0o177 } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0o177) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { status >> 8 } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0o200) != 0 } - pub {const} fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int { + pub {const} fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } } @@ -654,48 +656,48 @@ extern "C" { all(target_os = "macos", target_arch = "x86"), link_name = "getrlimit$UNIX2003" )] - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "setrlimit$UNIX2003" )] - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; #[cfg_attr( all(target_os = "freebsd", any(freebsd12, freebsd11, freebsd10)), link_name = "rand@FBSD_1.0" )] - pub fn rand() -> ::c_int; + pub fn rand() -> c_int; #[cfg_attr( all(target_os = "freebsd", any(freebsd12, freebsd11, freebsd10)), link_name = "srand@FBSD_1.0" )] - pub fn srand(seed: ::c_uint); - - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); - pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int; - pub fn setlogin(name: *const ::c_char) -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; - pub fn kqueue() -> ::c_int; - pub fn unmount(target: *const ::c_char, arg: ::c_int) -> ::c_int; + pub fn srand(seed: c_uint); + + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); + pub fn setgroups(ngroups: c_int, ptr: *const crate::gid_t) -> c_int; + pub fn setlogin(name: *const c_char) -> c_int; + pub fn ioctl(fd: c_int, request: c_ulong, ...) -> c_int; + pub fn kqueue() -> c_int; + pub fn unmount(target: *const c_char, arg: c_int) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__getpwent50")] pub fn getpwent() -> *mut passwd; pub fn setpwent(); pub fn endpwent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; - pub fn getprogname() -> *const ::c_char; - pub fn setprogname(name: *const ::c_char); - pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; + pub fn getprogname() -> *const c_char; + pub fn setprogname(name: *const c_char); + pub fn getloadavg(loadavg: *mut c_double, nelem: c_int) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); - pub fn getpeereid(socket: ::c_int, euid: *mut ::uid_t, egid: *mut ::gid_t) -> ::c_int; + pub fn getpeereid(socket: c_int, euid: *mut crate::uid_t, egid: *mut crate::gid_t) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -707,21 +709,21 @@ extern "C" { link_name = "glob@FBSD_1.0" )] pub fn glob( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__globfree30")] #[cfg_attr( all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "globfree@FBSD_1.0" )] - pub fn globfree(pglob: *mut ::glob_t); + pub fn globfree(pglob: *mut crate::glob_t); - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), @@ -731,7 +733,7 @@ extern "C" { all(target_os = "macos", target_arch = "x86"), link_name = "seekdir$INODE64$UNIX2003" )] - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), @@ -741,146 +743,145 @@ extern "C" { all(target_os = "macos", target_arch = "x86"), link_name = "telldir$INODE64$UNIX2003" )] - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "msync$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__msync13")] - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "recvfrom$UNIX2003" )] pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__futimes50")] - pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; + pub fn futimes(fd: c_int, times: *const crate::timeval) -> c_int; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "bind$UNIX2003" )] - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "writev$UNIX2003" )] - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "readv$UNIX2003" )] - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "sendmsg$UNIX2003" )] - pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "recvmsg$UNIX2003" )] - pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; pub fn sync(); pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "sigaltstack$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__sigaltstack14")] - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_sigmask$UNIX2003" )] - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_cancel$UNIX2003" )] - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam_r50")] pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid_r50")] pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "sigwait$UNIX2003" )] - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "popen$UNIX2003" )] - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; - pub fn acct(filename: *const ::c_char) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; + pub fn acct(filename: *const c_char) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "wait4$UNIX2003" @@ -890,85 +891,85 @@ extern "C" { link_name = "wait4@FBSD_1.0" )] pub fn wait4( - pid: ::pid_t, - status: *mut ::c_int, - options: ::c_int, - rusage: *mut ::rusage, - ) -> ::pid_t; + pid: crate::pid_t, + status: *mut c_int, + options: c_int, + rusage: *mut crate::rusage, + ) -> crate::pid_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "getitimer$UNIX2003" )] - pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int; + pub fn getitimer(which: c_int, curr_value: *mut crate::itimerval) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "setitimer$UNIX2003" )] pub fn setitimer( - which: ::c_int, - new_value: *const ::itimerval, - old_value: *mut ::itimerval, - ) -> ::c_int; + which: c_int, + new_value: *const crate::itimerval, + old_value: *mut crate::itimerval, + ) -> c_int; - pub fn regcomp(preg: *mut regex_t, pattern: *const ::c_char, cflags: ::c_int) -> ::c_int; + pub fn regcomp(preg: *mut regex_t, pattern: *const c_char, cflags: c_int) -> c_int; pub fn regexec( preg: *const regex_t, - input: *const ::c_char, - nmatch: ::size_t, + input: *const c_char, + nmatch: size_t, pmatch: *mut regmatch_t, - eflags: ::c_int, - ) -> ::c_int; + eflags: c_int, + ) -> c_int; pub fn regerror( - errcode: ::c_int, + errcode: c_int, preg: *const regex_t, - errbuf: *mut ::c_char, - errbuf_size: ::size_t, - ) -> ::size_t; + errbuf: *mut c_char, + errbuf_size: size_t, + ) -> size_t; pub fn regfree(preg: *mut regex_t); pub fn arc4random() -> u32; - pub fn arc4random_buf(buf: *mut ::c_void, size: ::size_t); + pub fn arc4random_buf(buf: *mut c_void, size: size_t); pub fn arc4random_uniform(l: u32) -> u32; - pub fn drand48() -> ::c_double; - pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; - pub fn lrand48() -> ::c_long; - pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn mrand48() -> ::c_long; - pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn srand48(seed: ::c_long); - pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; - pub fn lcong48(p: *mut ::c_ushort); + pub fn drand48() -> c_double; + pub fn erand48(xseed: *mut c_ushort) -> c_double; + pub fn lrand48() -> c_long; + pub fn nrand48(xseed: *mut c_ushort) -> c_long; + pub fn mrand48() -> c_long; + pub fn jrand48(xseed: *mut c_ushort) -> c_long; + pub fn srand48(seed: c_long); + pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort; + pub fn lcong48(p: *mut c_ushort); pub fn getopt_long( - argc: ::c_int, + argc: c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, - longindex: *mut ::c_int, - ) -> ::c_int; + longindex: *mut c_int, + ) -> c_int; pub fn strftime( - buf: *mut ::c_char, - maxsize: ::size_t, - format: *const ::c_char, - timeptr: *const ::tm, - ) -> ::size_t; + buf: *mut c_char, + maxsize: size_t, + format: *const c_char, + timeptr: *const crate::tm, + ) -> size_t; pub fn strftime_l( - buf: *mut ::c_char, - maxsize: ::size_t, - format: *const ::c_char, - timeptr: *const ::tm, - locale: ::locale_t, - ) -> ::size_t; + buf: *mut c_char, + maxsize: size_t, + format: *const c_char, + timeptr: *const crate::tm, + locale: crate::locale_t, + ) -> size_t; } cfg_if! { if #[cfg(not(target_os = "openbsd"))] { extern "C" { - pub fn syscall(num: ::c_int, ...) -> ::c_int; + pub fn syscall(num: c_int, ...) -> c_int; } } } diff --git a/src/unix/bsd/netbsdlike/mod.rs b/src/unix/bsd/netbsdlike/mod.rs index 29f54b92cd48b..446cdab7881d9 100644 --- a/src/unix/bsd/netbsdlike/mod.rs +++ b/src/unix/bsd/netbsdlike/mod.rs @@ -1,30 +1,32 @@ +use crate::{c_int, c_short, c_uint, c_ushort, c_void, off_t, size_t, ssize_t}; + pub type wchar_t = i32; pub type time_t = i64; pub type mode_t = u32; pub type nlink_t = u32; pub type ino_t = u64; -pub type pthread_key_t = ::c_int; +pub type pthread_key_t = c_int; pub type rlim_t = u64; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; +pub type speed_t = c_uint; +pub type tcflag_t = c_uint; pub type nl_item = c_long; -pub type clockid_t = ::c_int; +pub type clockid_t = c_int; pub type id_t = u32; pub type sem_t = *mut sem; pub type key_t = c_long; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum sem {} -impl ::Copy for sem {} -impl ::Clone for sem { +impl Copy for sem {} +impl Clone for sem { fn clone(&self) -> sem { *self } @@ -32,147 +34,147 @@ impl ::Clone for sem { s! { pub struct sched_param { - pub sched_priority: ::c_int, + pub sched_priority: c_int, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::c_int, - pub c_ospeed: ::c_int, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub c_ispeed: c_int, + pub c_ospeed: c_int, } pub struct flock { - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, - pub l_type: ::c_short, - pub l_whence: ::c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, + pub l_type: c_short, + pub l_whence: c_short, } pub struct ipc_perm { - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub mode: ::mode_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub mode: crate::mode_t, #[cfg(target_os = "openbsd")] - pub seq: ::c_ushort, + pub seq: c_ushort, #[cfg(target_os = "netbsd")] - pub _seq: ::c_ushort, + pub _seq: c_ushort, #[cfg(target_os = "openbsd")] - pub key: ::key_t, + pub key: crate::key_t, #[cfg(target_os = "netbsd")] - pub _key: ::key_t, + pub _key: crate::key_t, } pub struct ptrace_io_desc { - pub piod_op: ::c_int, - pub piod_offs: *mut ::c_void, - pub piod_addr: *mut ::c_void, - pub piod_len: ::size_t, + pub piod_op: c_int, + pub piod_offs: *mut c_void, + pub piod_addr: *mut c_void, + pub piod_len: size_t, } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::c_uint, + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, } } -pub const D_T_FMT: ::nl_item = 0; -pub const D_FMT: ::nl_item = 1; -pub const T_FMT: ::nl_item = 2; -pub const T_FMT_AMPM: ::nl_item = 3; -pub const AM_STR: ::nl_item = 4; -pub const PM_STR: ::nl_item = 5; - -pub const DAY_1: ::nl_item = 6; -pub const DAY_2: ::nl_item = 7; -pub const DAY_3: ::nl_item = 8; -pub const DAY_4: ::nl_item = 9; -pub const DAY_5: ::nl_item = 10; -pub const DAY_6: ::nl_item = 11; -pub const DAY_7: ::nl_item = 12; - -pub const ABDAY_1: ::nl_item = 13; -pub const ABDAY_2: ::nl_item = 14; -pub const ABDAY_3: ::nl_item = 15; -pub const ABDAY_4: ::nl_item = 16; -pub const ABDAY_5: ::nl_item = 17; -pub const ABDAY_6: ::nl_item = 18; -pub const ABDAY_7: ::nl_item = 19; - -pub const MON_1: ::nl_item = 20; -pub const MON_2: ::nl_item = 21; -pub const MON_3: ::nl_item = 22; -pub const MON_4: ::nl_item = 23; -pub const MON_5: ::nl_item = 24; -pub const MON_6: ::nl_item = 25; -pub const MON_7: ::nl_item = 26; -pub const MON_8: ::nl_item = 27; -pub const MON_9: ::nl_item = 28; -pub const MON_10: ::nl_item = 29; -pub const MON_11: ::nl_item = 30; -pub const MON_12: ::nl_item = 31; - -pub const ABMON_1: ::nl_item = 32; -pub const ABMON_2: ::nl_item = 33; -pub const ABMON_3: ::nl_item = 34; -pub const ABMON_4: ::nl_item = 35; -pub const ABMON_5: ::nl_item = 36; -pub const ABMON_6: ::nl_item = 37; -pub const ABMON_7: ::nl_item = 38; -pub const ABMON_8: ::nl_item = 39; -pub const ABMON_9: ::nl_item = 40; -pub const ABMON_10: ::nl_item = 41; -pub const ABMON_11: ::nl_item = 42; -pub const ABMON_12: ::nl_item = 43; - -pub const RADIXCHAR: ::nl_item = 44; -pub const THOUSEP: ::nl_item = 45; -pub const YESSTR: ::nl_item = 46; -pub const YESEXPR: ::nl_item = 47; -pub const NOSTR: ::nl_item = 48; -pub const NOEXPR: ::nl_item = 49; -pub const CRNCYSTR: ::nl_item = 50; - -pub const CODESET: ::nl_item = 51; - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; -pub const BUFSIZ: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const L_tmpnam: ::c_uint = 1024; -pub const O_NOCTTY: ::c_int = 32768; +pub const D_T_FMT: crate::nl_item = 0; +pub const D_FMT: crate::nl_item = 1; +pub const T_FMT: crate::nl_item = 2; +pub const T_FMT_AMPM: crate::nl_item = 3; +pub const AM_STR: crate::nl_item = 4; +pub const PM_STR: crate::nl_item = 5; + +pub const DAY_1: crate::nl_item = 6; +pub const DAY_2: crate::nl_item = 7; +pub const DAY_3: crate::nl_item = 8; +pub const DAY_4: crate::nl_item = 9; +pub const DAY_5: crate::nl_item = 10; +pub const DAY_6: crate::nl_item = 11; +pub const DAY_7: crate::nl_item = 12; + +pub const ABDAY_1: crate::nl_item = 13; +pub const ABDAY_2: crate::nl_item = 14; +pub const ABDAY_3: crate::nl_item = 15; +pub const ABDAY_4: crate::nl_item = 16; +pub const ABDAY_5: crate::nl_item = 17; +pub const ABDAY_6: crate::nl_item = 18; +pub const ABDAY_7: crate::nl_item = 19; + +pub const MON_1: crate::nl_item = 20; +pub const MON_2: crate::nl_item = 21; +pub const MON_3: crate::nl_item = 22; +pub const MON_4: crate::nl_item = 23; +pub const MON_5: crate::nl_item = 24; +pub const MON_6: crate::nl_item = 25; +pub const MON_7: crate::nl_item = 26; +pub const MON_8: crate::nl_item = 27; +pub const MON_9: crate::nl_item = 28; +pub const MON_10: crate::nl_item = 29; +pub const MON_11: crate::nl_item = 30; +pub const MON_12: crate::nl_item = 31; + +pub const ABMON_1: crate::nl_item = 32; +pub const ABMON_2: crate::nl_item = 33; +pub const ABMON_3: crate::nl_item = 34; +pub const ABMON_4: crate::nl_item = 35; +pub const ABMON_5: crate::nl_item = 36; +pub const ABMON_6: crate::nl_item = 37; +pub const ABMON_7: crate::nl_item = 38; +pub const ABMON_8: crate::nl_item = 39; +pub const ABMON_9: crate::nl_item = 40; +pub const ABMON_10: crate::nl_item = 41; +pub const ABMON_11: crate::nl_item = 42; +pub const ABMON_12: crate::nl_item = 43; + +pub const RADIXCHAR: crate::nl_item = 44; +pub const THOUSEP: crate::nl_item = 45; +pub const YESSTR: crate::nl_item = 46; +pub const YESEXPR: crate::nl_item = 47; +pub const NOSTR: crate::nl_item = 48; +pub const NOEXPR: crate::nl_item = 49; +pub const CRNCYSTR: crate::nl_item = 50; + +pub const CODESET: crate::nl_item = 51; + +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 2147483647; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; +pub const BUFSIZ: c_uint = 1024; +pub const FOPEN_MAX: c_uint = 20; +pub const FILENAME_MAX: c_uint = 1024; +pub const L_tmpnam: c_uint = 1024; +pub const O_NOCTTY: c_int = 32768; pub const S_IFIFO: mode_t = 0o1_0000; pub const S_IFCHR: mode_t = 0o2_0000; pub const S_IFBLK: mode_t = 0o6_0000; @@ -196,205 +198,205 @@ pub const S_IRWXO: mode_t = 0o0007; pub const S_IXOTH: mode_t = 0o0001; pub const S_IWOTH: mode_t = 0o0002; pub const S_IROTH: mode_t = 0o0004; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_ANON: ::c_int = 0x1000; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const IPC_CREAT: ::c_int = 0o001000; -pub const IPC_EXCL: ::c_int = 0o002000; -pub const IPC_NOWAIT: ::c_int = 0o004000; - -pub const IPC_PRIVATE: ::key_t = 0; - -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; - -pub const IPC_R: ::c_int = 0o000400; -pub const IPC_W: ::c_int = 0o000200; -pub const IPC_M: ::c_int = 0o010000; - -pub const SHM_R: ::c_int = IPC_R; -pub const SHM_W: ::c_int = IPC_W; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MS_ASYNC: ::c_int = 0x0001; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EDEADLK: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EAGAIN: ::c_int = 35; -pub const EWOULDBLOCK: ::c_int = 35; -pub const EINPROGRESS: ::c_int = 36; -pub const EALREADY: ::c_int = 37; -pub const ENOTSOCK: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 39; -pub const EMSGSIZE: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const EOPNOTSUPP: ::c_int = 45; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENETDOWN: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const ELOOP: ::c_int = 62; -pub const ENAMETOOLONG: ::c_int = 63; -pub const EHOSTDOWN: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const ENOTEMPTY: ::c_int = 66; -pub const EPROCLIM: ::c_int = 67; -pub const EUSERS: ::c_int = 68; -pub const EDQUOT: ::c_int = 69; -pub const ESTALE: ::c_int = 70; -pub const EREMOTE: ::c_int = 71; -pub const EBADRPC: ::c_int = 72; -pub const ERPCMISMATCH: ::c_int = 73; -pub const EPROGUNAVAIL: ::c_int = 74; -pub const EPROGMISMATCH: ::c_int = 75; -pub const EPROCUNAVAIL: ::c_int = 76; -pub const ENOLCK: ::c_int = 77; -pub const ENOSYS: ::c_int = 78; -pub const EFTYPE: ::c_int = 79; -pub const EAUTH: ::c_int = 80; -pub const ENEEDAUTH: ::c_int = 81; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; - -pub const SIGTRAP: ::c_int = 5; - -pub const GLOB_APPEND: ::c_int = 0x0001; -pub const GLOB_DOOFFS: ::c_int = 0x0002; -pub const GLOB_ERR: ::c_int = 0x0004; -pub const GLOB_MARK: ::c_int = 0x0008; -pub const GLOB_NOCHECK: ::c_int = 0x0010; -pub const GLOB_NOSORT: ::c_int = 0x0020; -pub const GLOB_NOESCAPE: ::c_int = 0x1000; - -pub const GLOB_NOSPACE: ::c_int = -1; -pub const GLOB_ABORTED: ::c_int = -2; -pub const GLOB_NOMATCH: ::c_int = -3; -pub const GLOB_NOSYS: ::c_int = -4; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x01; -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x02; -pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_short = 0x04; -pub const POSIX_SPAWN_SETSCHEDULER: ::c_short = 0x08; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x10; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x20; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const PIOD_READ_D: ::c_int = 1; -pub const PIOD_WRITE_D: ::c_int = 2; -pub const PIOD_READ_I: ::c_int = 3; -pub const PIOD_WRITE_I: ::c_int = 4; -pub const PIOD_READ_AUXV: ::c_int = 5; - -pub const PT_TRACE_ME: ::c_int = 0; -pub const PT_READ_I: ::c_int = 1; -pub const PT_READ_D: ::c_int = 2; -pub const PT_WRITE_I: ::c_int = 4; -pub const PT_WRITE_D: ::c_int = 5; -pub const PT_CONTINUE: ::c_int = 7; -pub const PT_KILL: ::c_int = 8; -pub const PT_ATTACH: ::c_int = 9; -pub const PT_DETACH: ::c_int = 10; -pub const PT_IO: ::c_int = 11; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; +pub const F_GETLK: c_int = 7; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; + +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; + +pub const MAP_FILE: c_int = 0x0000; +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_FIXED: c_int = 0x0010; +pub const MAP_ANON: c_int = 0x1000; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; + +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; + +pub const IPC_CREAT: c_int = 0o001000; +pub const IPC_EXCL: c_int = 0o002000; +pub const IPC_NOWAIT: c_int = 0o004000; + +pub const IPC_PRIVATE: crate::key_t = 0; + +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; + +pub const IPC_R: c_int = 0o000400; +pub const IPC_W: c_int = 0o000200; +pub const IPC_M: c_int = 0o010000; + +pub const SHM_R: c_int = IPC_R; +pub const SHM_W: c_int = IPC_W; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; + +pub const MS_ASYNC: c_int = 0x0001; + +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EDEADLK: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EAGAIN: c_int = 35; +pub const EWOULDBLOCK: c_int = 35; +pub const EINPROGRESS: c_int = 36; +pub const EALREADY: c_int = 37; +pub const ENOTSOCK: c_int = 38; +pub const EDESTADDRREQ: c_int = 39; +pub const EMSGSIZE: c_int = 40; +pub const EPROTOTYPE: c_int = 41; +pub const ENOPROTOOPT: c_int = 42; +pub const EPROTONOSUPPORT: c_int = 43; +pub const ESOCKTNOSUPPORT: c_int = 44; +pub const EOPNOTSUPP: c_int = 45; +pub const EPFNOSUPPORT: c_int = 46; +pub const EAFNOSUPPORT: c_int = 47; +pub const EADDRINUSE: c_int = 48; +pub const EADDRNOTAVAIL: c_int = 49; +pub const ENETDOWN: c_int = 50; +pub const ENETUNREACH: c_int = 51; +pub const ENETRESET: c_int = 52; +pub const ECONNABORTED: c_int = 53; +pub const ECONNRESET: c_int = 54; +pub const ENOBUFS: c_int = 55; +pub const EISCONN: c_int = 56; +pub const ENOTCONN: c_int = 57; +pub const ESHUTDOWN: c_int = 58; +pub const ETOOMANYREFS: c_int = 59; +pub const ETIMEDOUT: c_int = 60; +pub const ECONNREFUSED: c_int = 61; +pub const ELOOP: c_int = 62; +pub const ENAMETOOLONG: c_int = 63; +pub const EHOSTDOWN: c_int = 64; +pub const EHOSTUNREACH: c_int = 65; +pub const ENOTEMPTY: c_int = 66; +pub const EPROCLIM: c_int = 67; +pub const EUSERS: c_int = 68; +pub const EDQUOT: c_int = 69; +pub const ESTALE: c_int = 70; +pub const EREMOTE: c_int = 71; +pub const EBADRPC: c_int = 72; +pub const ERPCMISMATCH: c_int = 73; +pub const EPROGUNAVAIL: c_int = 74; +pub const EPROGMISMATCH: c_int = 75; +pub const EPROCUNAVAIL: c_int = 76; +pub const ENOLCK: c_int = 77; +pub const ENOSYS: c_int = 78; +pub const EFTYPE: c_int = 79; +pub const EAUTH: c_int = 80; +pub const ENEEDAUTH: c_int = 81; + +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; + +pub const SIGTRAP: c_int = 5; + +pub const GLOB_APPEND: c_int = 0x0001; +pub const GLOB_DOOFFS: c_int = 0x0002; +pub const GLOB_ERR: c_int = 0x0004; +pub const GLOB_MARK: c_int = 0x0008; +pub const GLOB_NOCHECK: c_int = 0x0010; +pub const GLOB_NOSORT: c_int = 0x0020; +pub const GLOB_NOESCAPE: c_int = 0x1000; + +pub const GLOB_NOSPACE: c_int = -1; +pub const GLOB_ABORTED: c_int = -2; +pub const GLOB_NOMATCH: c_int = -3; +pub const GLOB_NOSYS: c_int = -4; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const POSIX_SPAWN_RESETIDS: c_short = 0x01; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x02; +pub const POSIX_SPAWN_SETSCHEDPARAM: c_short = 0x04; +pub const POSIX_SPAWN_SETSCHEDULER: c_short = 0x08; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x10; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x20; + +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 1; + +pub const PIOD_READ_D: c_int = 1; +pub const PIOD_WRITE_D: c_int = 2; +pub const PIOD_READ_I: c_int = 3; +pub const PIOD_WRITE_I: c_int = 4; +pub const PIOD_READ_AUXV: c_int = 5; + +pub const PT_TRACE_ME: c_int = 0; +pub const PT_READ_I: c_int = 1; +pub const PT_READ_D: c_int = 2; +pub const PT_WRITE_I: c_int = 4; +pub const PT_WRITE_D: c_int = 5; +pub const PT_CONTINUE: c_int = 7; +pub const PT_KILL: c_int = 8; +pub const PT_ATTACH: c_int = 9; +pub const PT_DETACH: c_int = 10; +pub const PT_IO: c_int = 11; // http://man.openbsd.org/OpenBSD-current/man2/clock_getres.2 // The man page says clock_gettime(3) can accept various values as clockid_t but @@ -404,194 +406,194 @@ pub const PT_IO: ::c_int = 11; // http://netbsd.gw.com/cgi-bin/man-cgi?clock_gettime // https://github.com/jsonn/src/blob/HEAD/sys/kern/subr_time.c#L222 // Basically the same goes for NetBSD -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_MONOTONIC: ::clockid_t = 3; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_MEMLOCK: ::c_int = 6; -pub const RLIMIT_NPROC: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 8; +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_MONOTONIC: crate::clockid_t = 3; + +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_RSS: c_int = 5; +pub const RLIMIT_MEMLOCK: c_int = 6; +pub const RLIMIT_NPROC: c_int = 7; +pub const RLIMIT_NOFILE: c_int = 8; pub const RLIM_INFINITY: rlim_t = 0x7fff_ffff_ffff_ffff; pub const RLIM_SAVED_MAX: rlim_t = RLIM_INFINITY; pub const RLIM_SAVED_CUR: rlim_t = RLIM_INFINITY; -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; +pub const RUSAGE_SELF: c_int = 0; +pub const RUSAGE_CHILDREN: c_int = -1; -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 6; +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const MADV_FREE: c_int = 6; // sys/fstypes.h in NetBSD, or sys/mount.h in OpenBSD -pub const MNT_NODEV: ::c_int = 0x00000010; -pub const MNT_LOCAL: ::c_int = 0x00001000; -pub const MNT_QUOTA: ::c_int = 0x00002000; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_UNIX: ::c_int = AF_LOCAL; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NS: ::c_int = 6; -pub const AF_ISO: ::c_int = 7; -pub const AF_OSI: ::c_int = AF_ISO; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_LINK: ::c_int = 18; -pub const pseudo_AF_XTP: ::c_int = 19; -pub const AF_COIP: ::c_int = 20; -pub const AF_CNT: ::c_int = 21; -pub const pseudo_AF_RTIP: ::c_int = 22; -pub const AF_IPX: ::c_int = 23; -pub const AF_INET6: ::c_int = 24; -pub const pseudo_AF_PIP: ::c_int = 25; -pub const AF_ISDN: ::c_int = 26; -pub const AF_E164: ::c_int = AF_ISDN; -pub const AF_NATM: ::c_int = 27; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_UNIX: ::c_int = PF_LOCAL; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_IMPLINK: ::c_int = AF_IMPLINK; -pub const PF_PUP: ::c_int = AF_PUP; -pub const PF_CHAOS: ::c_int = AF_CHAOS; -pub const PF_NS: ::c_int = AF_NS; -pub const PF_ISO: ::c_int = AF_ISO; -pub const PF_OSI: ::c_int = AF_ISO; -pub const PF_DATAKIT: ::c_int = AF_DATAKIT; -pub const PF_CCITT: ::c_int = AF_CCITT; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_DLI: ::c_int = AF_DLI; -pub const PF_LAT: ::c_int = AF_LAT; -pub const PF_HYLINK: ::c_int = AF_HYLINK; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_LINK: ::c_int = AF_LINK; -pub const PF_XTP: ::c_int = pseudo_AF_XTP; -pub const PF_COIP: ::c_int = AF_COIP; -pub const PF_CNT: ::c_int = AF_CNT; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_RTIP: ::c_int = pseudo_AF_RTIP; -pub const PF_PIP: ::c_int = pseudo_AF_PIP; -pub const PF_ISDN: ::c_int = AF_ISDN; -pub const PF_NATM: ::c_int = AF_NATM; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IPV6_RECVPKTINFO: ::c_int = 36; -pub const IPV6_PKTINFO: ::c_int = 46; -pub const IPV6_RECVTCLASS: ::c_int = 57; -pub const IPV6_TCLASS: ::c_int = 61; - -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; - -pub const SOMAXCONN: ::c_int = 128; - -pub const MSG_OOB: ::c_int = 0x1; -pub const MSG_PEEK: ::c_int = 0x2; -pub const MSG_DONTROUTE: ::c_int = 0x4; -pub const MSG_EOR: ::c_int = 0x8; -pub const MSG_TRUNC: ::c_int = 0x10; -pub const MSG_CTRUNC: ::c_int = 0x20; -pub const MSG_WAITALL: ::c_int = 0x40; -pub const MSG_DONTWAIT: ::c_int = 0x80; -pub const MSG_BCAST: ::c_int = 0x100; -pub const MSG_MCAST: ::c_int = 0x200; -pub const MSG_NOSIGNAL: ::c_int = 0x400; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x800; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; - -pub const IPPROTO_RAW: ::c_int = 255; - -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_BC_BASE_MAX: ::c_int = 9; -pub const _SC_BC_DIM_MAX: ::c_int = 10; -pub const _SC_BC_SCALE_MAX: ::c_int = 11; -pub const _SC_BC_STRING_MAX: ::c_int = 12; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 13; -pub const _SC_EXPR_NEST_MAX: ::c_int = 14; -pub const _SC_LINE_MAX: ::c_int = 15; -pub const _SC_RE_DUP_MAX: ::c_int = 16; -pub const _SC_2_VERSION: ::c_int = 17; -pub const _SC_2_C_BIND: ::c_int = 18; -pub const _SC_2_C_DEV: ::c_int = 19; -pub const _SC_2_CHAR_TERM: ::c_int = 20; -pub const _SC_2_FORT_DEV: ::c_int = 21; -pub const _SC_2_FORT_RUN: ::c_int = 22; -pub const _SC_2_LOCALEDEF: ::c_int = 23; -pub const _SC_2_SW_DEV: ::c_int = 24; -pub const _SC_2_UPE: ::c_int = 25; -pub const _SC_STREAM_MAX: ::c_int = 26; -pub const _SC_TZNAME_MAX: ::c_int = 27; -pub const _SC_PAGESIZE: ::c_int = 28; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_FSYNC: ::c_int = 29; -pub const _SC_XOPEN_SHM: ::c_int = 30; - -pub const Q_GETQUOTA: ::c_int = 0x300; -pub const Q_SETQUOTA: ::c_int = 0x400; - -pub const RTLD_GLOBAL: ::c_int = 0x100; - -pub const LOG_NFACILITIES: ::c_int = 24; - -pub const HW_NCPU: ::c_int = 3; +pub const MNT_NODEV: c_int = 0x00000010; +pub const MNT_LOCAL: c_int = 0x00001000; +pub const MNT_QUOTA: c_int = 0x00002000; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_LOCAL: c_int = 1; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_INET: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NS: c_int = 6; +pub const AF_ISO: c_int = 7; +pub const AF_OSI: c_int = AF_ISO; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_LINK: c_int = 18; +pub const pseudo_AF_XTP: c_int = 19; +pub const AF_COIP: c_int = 20; +pub const AF_CNT: c_int = 21; +pub const pseudo_AF_RTIP: c_int = 22; +pub const AF_IPX: c_int = 23; +pub const AF_INET6: c_int = 24; +pub const pseudo_AF_PIP: c_int = 25; +pub const AF_ISDN: c_int = 26; +pub const AF_E164: c_int = AF_ISDN; +pub const AF_NATM: c_int = 27; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_UNIX: c_int = PF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_IMPLINK: c_int = AF_IMPLINK; +pub const PF_PUP: c_int = AF_PUP; +pub const PF_CHAOS: c_int = AF_CHAOS; +pub const PF_NS: c_int = AF_NS; +pub const PF_ISO: c_int = AF_ISO; +pub const PF_OSI: c_int = AF_ISO; +pub const PF_DATAKIT: c_int = AF_DATAKIT; +pub const PF_CCITT: c_int = AF_CCITT; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_DLI: c_int = AF_DLI; +pub const PF_LAT: c_int = AF_LAT; +pub const PF_HYLINK: c_int = AF_HYLINK; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_XTP: c_int = pseudo_AF_XTP; +pub const PF_COIP: c_int = AF_COIP; +pub const PF_CNT: c_int = AF_CNT; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_RTIP: c_int = pseudo_AF_RTIP; +pub const PF_PIP: c_int = pseudo_AF_PIP; +pub const PF_ISDN: c_int = AF_ISDN; +pub const PF_NATM: c_int = AF_NATM; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const IP_TTL: c_int = 4; +pub const IP_HDRINCL: c_int = 2; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IPV6_RECVPKTINFO: c_int = 36; +pub const IPV6_PKTINFO: c_int = 46; +pub const IPV6_RECVTCLASS: c_int = 57; +pub const IPV6_TCLASS: c_int = 61; + +pub const SOL_SOCKET: c_int = 0xffff; +pub const SO_DEBUG: c_int = 0x01; +pub const SO_ACCEPTCONN: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; + +pub const SOMAXCONN: c_int = 128; + +pub const MSG_OOB: c_int = 0x1; +pub const MSG_PEEK: c_int = 0x2; +pub const MSG_DONTROUTE: c_int = 0x4; +pub const MSG_EOR: c_int = 0x8; +pub const MSG_TRUNC: c_int = 0x10; +pub const MSG_CTRUNC: c_int = 0x20; +pub const MSG_WAITALL: c_int = 0x40; +pub const MSG_DONTWAIT: c_int = 0x80; +pub const MSG_BCAST: c_int = 0x100; +pub const MSG_MCAST: c_int = 0x200; +pub const MSG_NOSIGNAL: c_int = 0x400; +pub const MSG_CMSG_CLOEXEC: c_int = 0x800; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; + +pub const IPPROTO_RAW: c_int = 255; + +pub const _SC_ARG_MAX: c_int = 1; +pub const _SC_CHILD_MAX: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 4; +pub const _SC_OPEN_MAX: c_int = 5; +pub const _SC_JOB_CONTROL: c_int = 6; +pub const _SC_SAVED_IDS: c_int = 7; +pub const _SC_VERSION: c_int = 8; +pub const _SC_BC_BASE_MAX: c_int = 9; +pub const _SC_BC_DIM_MAX: c_int = 10; +pub const _SC_BC_SCALE_MAX: c_int = 11; +pub const _SC_BC_STRING_MAX: c_int = 12; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 13; +pub const _SC_EXPR_NEST_MAX: c_int = 14; +pub const _SC_LINE_MAX: c_int = 15; +pub const _SC_RE_DUP_MAX: c_int = 16; +pub const _SC_2_VERSION: c_int = 17; +pub const _SC_2_C_BIND: c_int = 18; +pub const _SC_2_C_DEV: c_int = 19; +pub const _SC_2_CHAR_TERM: c_int = 20; +pub const _SC_2_FORT_DEV: c_int = 21; +pub const _SC_2_FORT_RUN: c_int = 22; +pub const _SC_2_LOCALEDEF: c_int = 23; +pub const _SC_2_SW_DEV: c_int = 24; +pub const _SC_2_UPE: c_int = 25; +pub const _SC_STREAM_MAX: c_int = 26; +pub const _SC_TZNAME_MAX: c_int = 27; +pub const _SC_PAGESIZE: c_int = 28; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_FSYNC: c_int = 29; +pub const _SC_XOPEN_SHM: c_int = 30; + +pub const Q_GETQUOTA: c_int = 0x300; +pub const Q_SETQUOTA: c_int = 0x400; + +pub const RTLD_GLOBAL: c_int = 0x100; + +pub const LOG_NFACILITIES: c_int = 24; + +pub const HW_NCPU: c_int = 3; pub const B0: speed_t = 0; pub const B50: speed_t = 50; @@ -621,251 +623,238 @@ pub const EXTB: speed_t = 38400; pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; -pub const CRTSCTS: ::tcflag_t = 0x00010000; -pub const CRTS_IFLOW: ::tcflag_t = CRTSCTS; -pub const CCTS_OFLOW: ::tcflag_t = CRTSCTS; -pub const OCRNL: ::tcflag_t = 0x10; - -pub const TIOCEXCL: ::c_ulong = 0x2000740d; -pub const TIOCNXCL: ::c_ulong = 0x2000740e; -pub const TIOCFLUSH: ::c_ulong = 0x80047410; -pub const TIOCGETA: ::c_ulong = 0x402c7413; -pub const TIOCSETA: ::c_ulong = 0x802c7414; -pub const TIOCSETAW: ::c_ulong = 0x802c7415; -pub const TIOCSETAF: ::c_ulong = 0x802c7416; -pub const TIOCGETD: ::c_ulong = 0x4004741a; -pub const TIOCSETD: ::c_ulong = 0x8004741b; -pub const TIOCMGET: ::c_ulong = 0x4004746a; -pub const TIOCMBIC: ::c_ulong = 0x8004746b; -pub const TIOCMBIS: ::c_ulong = 0x8004746c; -pub const TIOCMSET: ::c_ulong = 0x8004746d; -pub const TIOCSTART: ::c_ulong = 0x2000746e; -pub const TIOCSTOP: ::c_ulong = 0x2000746f; -pub const TIOCSCTTY: ::c_ulong = 0x20007461; -pub const TIOCGWINSZ: ::c_ulong = 0x40087468; -pub const TIOCSWINSZ: ::c_ulong = 0x80087467; -pub const TIOCM_LE: ::c_int = 0o0001; -pub const TIOCM_DTR: ::c_int = 0o0002; -pub const TIOCM_RTS: ::c_int = 0o0004; -pub const TIOCM_ST: ::c_int = 0o0010; -pub const TIOCM_SR: ::c_int = 0o0020; -pub const TIOCM_CTS: ::c_int = 0o0040; -pub const TIOCM_CAR: ::c_int = 0o0100; -pub const TIOCM_RNG: ::c_int = 0o0200; -pub const TIOCM_DSR: ::c_int = 0o0400; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; - -pub const TIMER_ABSTIME: ::c_int = 1; +pub const CRTSCTS: crate::tcflag_t = 0x00010000; +pub const CRTS_IFLOW: crate::tcflag_t = CRTSCTS; +pub const CCTS_OFLOW: crate::tcflag_t = CRTSCTS; +pub const OCRNL: crate::tcflag_t = 0x10; + +pub const TIOCEXCL: c_ulong = 0x2000740d; +pub const TIOCNXCL: c_ulong = 0x2000740e; +pub const TIOCFLUSH: c_ulong = 0x80047410; +pub const TIOCGETA: c_ulong = 0x402c7413; +pub const TIOCSETA: c_ulong = 0x802c7414; +pub const TIOCSETAW: c_ulong = 0x802c7415; +pub const TIOCSETAF: c_ulong = 0x802c7416; +pub const TIOCGETD: c_ulong = 0x4004741a; +pub const TIOCSETD: c_ulong = 0x8004741b; +pub const TIOCMGET: c_ulong = 0x4004746a; +pub const TIOCMBIC: c_ulong = 0x8004746b; +pub const TIOCMBIS: c_ulong = 0x8004746c; +pub const TIOCMSET: c_ulong = 0x8004746d; +pub const TIOCSTART: c_ulong = 0x2000746e; +pub const TIOCSTOP: c_ulong = 0x2000746f; +pub const TIOCSCTTY: c_ulong = 0x20007461; +pub const TIOCGWINSZ: c_ulong = 0x40087468; +pub const TIOCSWINSZ: c_ulong = 0x80087467; +pub const TIOCM_LE: c_int = 0o0001; +pub const TIOCM_DTR: c_int = 0o0002; +pub const TIOCM_RTS: c_int = 0o0004; +pub const TIOCM_ST: c_int = 0o0010; +pub const TIOCM_SR: c_int = 0o0020; +pub const TIOCM_CTS: c_int = 0o0040; +pub const TIOCM_CAR: c_int = 0o0100; +pub const TIOCM_RNG: c_int = 0o0200; +pub const TIOCM_DSR: c_int = 0o0400; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RI: c_int = TIOCM_RNG; + +pub const TIMER_ABSTIME: c_int = 1; // sys/reboot.h -pub const RB_AUTOBOOT: ::c_int = 0; +pub const RB_AUTOBOOT: c_int = 0; -pub const TCP_INFO: ::c_int = 9; +pub const TCP_INFO: c_int = 9; #[link(name = "util")] extern "C" { pub fn setgrent(); - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn accept4( - s: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - flags: ::c_int, - ) -> ::c_int; + s: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + flags: c_int, + ) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__clock_getres50")] - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__clock_gettime50")] - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__clock_settime50")] - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn __errno() -> *mut ::c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn __errno() -> *mut c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn login_tty(fd: ::c_int) -> ::c_int; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; - - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; + pub fn login_tty(fd: c_int) -> c_int; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; + + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_spin_init(lock: *mut pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut pthread_spinlock_t) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, + native: crate::pthread_t, + policy: c_int, param: *const sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, + native: crate::pthread_t, + policy: *mut c_int, param: *mut sched_param, - ) -> ::c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; + ) -> c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; pub fn getgrouplist( - name: *const ::c_char, - basegid: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; - pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; - pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; - - pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; + name: *const c_char, + basegid: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; + pub fn initgroups(name: *const c_char, basegid: crate::gid_t) -> c_int; + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; + + pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; pub fn execvpe( - file: *const ::c_char, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + file: *const c_char, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn waitid( idtype: idtype_t, - id: ::id_t, - infop: *mut ::siginfo_t, - options: ::c_int, - ) -> ::c_int; + id: crate::id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, - flags: *mut ::c_int, - ) -> ::c_int; - pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; + flags: *mut c_int, + ) -> c_int; + pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int; pub fn posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, - param: *mut ::sched_param, - ) -> ::c_int; + param: *mut crate::sched_param, + ) -> c_int; pub fn posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, - param: *const ::sched_param, - ) -> ::c_int; + param: *const crate::sched_param, + ) -> c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; } extern "C" { - pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn gethostid() -> ::c_long; - pub fn sethostid(hostid: ::c_long) -> ::c_int; - pub fn ftok(path: *const ::c_char, id: ::c_int) -> ::key_t; - - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; - - pub fn sendmmsg( - sockfd: ::c_int, - mmsg: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - ) -> ::c_int; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; + pub fn gethostid() -> c_long; + pub fn sethostid(hostid: c_long) -> c_int; + pub fn ftok(path: *const c_char, id: c_int) -> crate::key_t; + + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; + + pub fn sendmmsg(sockfd: c_int, mmsg: *mut crate::mmsghdr, vlen: c_uint, flags: c_int) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - mmsg: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - timeout: *mut ::timespec, - ) -> ::c_int; + sockfd: c_int, + mmsg: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + timeout: *mut crate::timespec, + ) -> c_int; } cfg_if! { diff --git a/src/unix/bsd/netbsdlike/netbsd/aarch64.rs b/src/unix/bsd/netbsdlike/netbsd/aarch64.rs index 4cdcb070095eb..b74f57636ffe8 100644 --- a/src/unix/bsd/netbsdlike/netbsd/aarch64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/aarch64.rs @@ -1,10 +1,10 @@ -use PT_FIRSTMACH; +use crate::{c_int, c_uchar, c_uint, PT_FIRSTMACH}; pub type c_long = i64; pub type c_ulong = u64; pub type c_char = u8; pub type greg_t = u64; -pub type __cpu_simple_lock_nv_t = ::c_uchar; +pub type __cpu_simple_lock_nv_t = c_uchar; s! { pub struct __fregset { @@ -14,16 +14,16 @@ s! { } pub struct mcontext_t { - pub __gregs: [::greg_t; 32], + pub __gregs: [crate::greg_t; 32], pub __fregs: __fregset, - __spare: [::greg_t; 8], + __spare: [crate::greg_t; 8], } pub struct ucontext_t { - pub uc_flags: ::c_uint, + pub uc_flags: c_uint, pub uc_link: *mut ucontext_t, - pub uc_sigmask: ::sigset_t, - pub uc_stack: ::stack_t, + pub uc_sigmask: crate::sigset_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, } } @@ -53,8 +53,8 @@ cfg_if! { } } impl Eq for __c_anonymous__freg {} - impl ::fmt::Debug for __c_anonymous__freg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous__freg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("__c_anonymous__freg") .field("__b8", &self.__b8) @@ -66,8 +66,8 @@ cfg_if! { } } } - impl ::hash::Hash for __c_anonymous__freg { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous__freg { + fn hash(&self, state: &mut H) { unsafe { self.__b8.hash(state); self.__h16.hash(state); @@ -80,68 +80,68 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 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; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 3; +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; +pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 3; -pub const _REG_R0: ::c_int = 0; -pub const _REG_R1: ::c_int = 1; -pub const _REG_R2: ::c_int = 2; -pub const _REG_R3: ::c_int = 3; -pub const _REG_R4: ::c_int = 4; -pub const _REG_R5: ::c_int = 5; -pub const _REG_R6: ::c_int = 6; -pub const _REG_R7: ::c_int = 7; -pub const _REG_R8: ::c_int = 8; -pub const _REG_R9: ::c_int = 9; -pub const _REG_R10: ::c_int = 10; -pub const _REG_R11: ::c_int = 11; -pub const _REG_R12: ::c_int = 12; -pub const _REG_R13: ::c_int = 13; -pub const _REG_R14: ::c_int = 14; -pub const _REG_R15: ::c_int = 15; -pub const _REG_CPSR: ::c_int = 16; -pub const _REG_X0: ::c_int = 0; -pub const _REG_X1: ::c_int = 1; -pub const _REG_X2: ::c_int = 2; -pub const _REG_X3: ::c_int = 3; -pub const _REG_X4: ::c_int = 4; -pub const _REG_X5: ::c_int = 5; -pub const _REG_X6: ::c_int = 6; -pub const _REG_X7: ::c_int = 7; -pub const _REG_X8: ::c_int = 8; -pub const _REG_X9: ::c_int = 9; -pub const _REG_X10: ::c_int = 10; -pub const _REG_X11: ::c_int = 11; -pub const _REG_X12: ::c_int = 12; -pub const _REG_X13: ::c_int = 13; -pub const _REG_X14: ::c_int = 14; -pub const _REG_X15: ::c_int = 15; -pub const _REG_X16: ::c_int = 16; -pub const _REG_X17: ::c_int = 17; -pub const _REG_X18: ::c_int = 18; -pub const _REG_X19: ::c_int = 19; -pub const _REG_X20: ::c_int = 20; -pub const _REG_X21: ::c_int = 21; -pub const _REG_X22: ::c_int = 22; -pub const _REG_X23: ::c_int = 23; -pub const _REG_X24: ::c_int = 24; -pub const _REG_X25: ::c_int = 25; -pub const _REG_X26: ::c_int = 26; -pub const _REG_X27: ::c_int = 27; -pub const _REG_X28: ::c_int = 28; -pub const _REG_X29: ::c_int = 29; -pub const _REG_X30: ::c_int = 30; -pub const _REG_X31: ::c_int = 31; -pub const _REG_ELR: ::c_int = 32; -pub const _REG_SPSR: ::c_int = 33; -pub const _REG_TIPDR: ::c_int = 34; +pub const _REG_R0: c_int = 0; +pub const _REG_R1: c_int = 1; +pub const _REG_R2: c_int = 2; +pub const _REG_R3: c_int = 3; +pub const _REG_R4: c_int = 4; +pub const _REG_R5: c_int = 5; +pub const _REG_R6: c_int = 6; +pub const _REG_R7: c_int = 7; +pub const _REG_R8: c_int = 8; +pub const _REG_R9: c_int = 9; +pub const _REG_R10: c_int = 10; +pub const _REG_R11: c_int = 11; +pub const _REG_R12: c_int = 12; +pub const _REG_R13: c_int = 13; +pub const _REG_R14: c_int = 14; +pub const _REG_R15: c_int = 15; +pub const _REG_CPSR: c_int = 16; +pub const _REG_X0: c_int = 0; +pub const _REG_X1: c_int = 1; +pub const _REG_X2: c_int = 2; +pub const _REG_X3: c_int = 3; +pub const _REG_X4: c_int = 4; +pub const _REG_X5: c_int = 5; +pub const _REG_X6: c_int = 6; +pub const _REG_X7: c_int = 7; +pub const _REG_X8: c_int = 8; +pub const _REG_X9: c_int = 9; +pub const _REG_X10: c_int = 10; +pub const _REG_X11: c_int = 11; +pub const _REG_X12: c_int = 12; +pub const _REG_X13: c_int = 13; +pub const _REG_X14: c_int = 14; +pub const _REG_X15: c_int = 15; +pub const _REG_X16: c_int = 16; +pub const _REG_X17: c_int = 17; +pub const _REG_X18: c_int = 18; +pub const _REG_X19: c_int = 19; +pub const _REG_X20: c_int = 20; +pub const _REG_X21: c_int = 21; +pub const _REG_X22: c_int = 22; +pub const _REG_X23: c_int = 23; +pub const _REG_X24: c_int = 24; +pub const _REG_X25: c_int = 25; +pub const _REG_X26: c_int = 26; +pub const _REG_X27: c_int = 27; +pub const _REG_X28: c_int = 28; +pub const _REG_X29: c_int = 29; +pub const _REG_X30: c_int = 30; +pub const _REG_X31: c_int = 31; +pub const _REG_ELR: c_int = 32; +pub const _REG_SPSR: c_int = 33; +pub const _REG_TIPDR: c_int = 34; -pub const _REG_RV: ::c_int = _REG_X0; -pub const _REG_FP: ::c_int = _REG_X29; -pub const _REG_LR: ::c_int = _REG_X30; -pub const _REG_SP: ::c_int = _REG_X31; -pub const _REG_PC: ::c_int = _REG_ELR; +pub const _REG_RV: c_int = _REG_X0; +pub const _REG_FP: c_int = _REG_X29; +pub const _REG_LR: c_int = _REG_X30; +pub const _REG_SP: c_int = _REG_X31; +pub const _REG_PC: c_int = _REG_ELR; diff --git a/src/unix/bsd/netbsdlike/netbsd/arm.rs b/src/unix/bsd/netbsdlike/netbsd/arm.rs index 2da780ec6ddcb..aff875801e89c 100644 --- a/src/unix/bsd/netbsdlike/netbsd/arm.rs +++ b/src/unix/bsd/netbsdlike/netbsd/arm.rs @@ -1,72 +1,72 @@ -use PT_FIRSTMACH; +use crate::{c_int, c_longlong, 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; +pub type __cpu_simple_lock_nv_t = c_int; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 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; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4; +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; +pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 4; -pub const _REG_R0: ::c_int = 0; -pub const _REG_R1: ::c_int = 1; -pub const _REG_R2: ::c_int = 2; -pub const _REG_R3: ::c_int = 3; -pub const _REG_R4: ::c_int = 4; -pub const _REG_R5: ::c_int = 5; -pub const _REG_R6: ::c_int = 6; -pub const _REG_R7: ::c_int = 7; -pub const _REG_R8: ::c_int = 8; -pub const _REG_R9: ::c_int = 9; -pub const _REG_R10: ::c_int = 10; -pub const _REG_R11: ::c_int = 11; -pub const _REG_R12: ::c_int = 12; -pub const _REG_R13: ::c_int = 13; -pub const _REG_R14: ::c_int = 14; -pub const _REG_R15: ::c_int = 15; -pub const _REG_CPSR: ::c_int = 16; -pub const _REG_X0: ::c_int = 0; -pub const _REG_X1: ::c_int = 1; -pub const _REG_X2: ::c_int = 2; -pub const _REG_X3: ::c_int = 3; -pub const _REG_X4: ::c_int = 4; -pub const _REG_X5: ::c_int = 5; -pub const _REG_X6: ::c_int = 6; -pub const _REG_X7: ::c_int = 7; -pub const _REG_X8: ::c_int = 8; -pub const _REG_X9: ::c_int = 9; -pub const _REG_X10: ::c_int = 10; -pub const _REG_X11: ::c_int = 11; -pub const _REG_X12: ::c_int = 12; -pub const _REG_X13: ::c_int = 13; -pub const _REG_X14: ::c_int = 14; -pub const _REG_X15: ::c_int = 15; -pub const _REG_X16: ::c_int = 16; -pub const _REG_X17: ::c_int = 17; -pub const _REG_X18: ::c_int = 18; -pub const _REG_X19: ::c_int = 19; -pub const _REG_X20: ::c_int = 20; -pub const _REG_X21: ::c_int = 21; -pub const _REG_X22: ::c_int = 22; -pub const _REG_X23: ::c_int = 23; -pub const _REG_X24: ::c_int = 24; -pub const _REG_X25: ::c_int = 25; -pub const _REG_X26: ::c_int = 26; -pub const _REG_X27: ::c_int = 27; -pub const _REG_X28: ::c_int = 28; -pub const _REG_X29: ::c_int = 29; -pub const _REG_X30: ::c_int = 30; -pub const _REG_X31: ::c_int = 31; -pub const _REG_ELR: ::c_int = 32; -pub const _REG_SPSR: ::c_int = 33; -pub const _REG_TIPDR: ::c_int = 34; +pub const _REG_R0: c_int = 0; +pub const _REG_R1: c_int = 1; +pub const _REG_R2: c_int = 2; +pub const _REG_R3: c_int = 3; +pub const _REG_R4: c_int = 4; +pub const _REG_R5: c_int = 5; +pub const _REG_R6: c_int = 6; +pub const _REG_R7: c_int = 7; +pub const _REG_R8: c_int = 8; +pub const _REG_R9: c_int = 9; +pub const _REG_R10: c_int = 10; +pub const _REG_R11: c_int = 11; +pub const _REG_R12: c_int = 12; +pub const _REG_R13: c_int = 13; +pub const _REG_R14: c_int = 14; +pub const _REG_R15: c_int = 15; +pub const _REG_CPSR: c_int = 16; +pub const _REG_X0: c_int = 0; +pub const _REG_X1: c_int = 1; +pub const _REG_X2: c_int = 2; +pub const _REG_X3: c_int = 3; +pub const _REG_X4: c_int = 4; +pub const _REG_X5: c_int = 5; +pub const _REG_X6: c_int = 6; +pub const _REG_X7: c_int = 7; +pub const _REG_X8: c_int = 8; +pub const _REG_X9: c_int = 9; +pub const _REG_X10: c_int = 10; +pub const _REG_X11: c_int = 11; +pub const _REG_X12: c_int = 12; +pub const _REG_X13: c_int = 13; +pub const _REG_X14: c_int = 14; +pub const _REG_X15: c_int = 15; +pub const _REG_X16: c_int = 16; +pub const _REG_X17: c_int = 17; +pub const _REG_X18: c_int = 18; +pub const _REG_X19: c_int = 19; +pub const _REG_X20: c_int = 20; +pub const _REG_X21: c_int = 21; +pub const _REG_X22: c_int = 22; +pub const _REG_X23: c_int = 23; +pub const _REG_X24: c_int = 24; +pub const _REG_X25: c_int = 25; +pub const _REG_X26: c_int = 26; +pub const _REG_X27: c_int = 27; +pub const _REG_X28: c_int = 28; +pub const _REG_X29: c_int = 29; +pub const _REG_X30: c_int = 30; +pub const _REG_X31: c_int = 31; +pub const _REG_ELR: c_int = 32; +pub const _REG_SPSR: c_int = 33; +pub const _REG_TIPDR: c_int = 34; -pub const _REG_RV: ::c_int = _REG_R0; -pub const _REG_FP: ::c_int = _REG_R11; -pub const _REG_LR: ::c_int = _REG_R13; -pub const _REG_SP: ::c_int = _REG_R14; -pub const _REG_PC: ::c_int = _REG_R15; +pub const _REG_RV: c_int = _REG_R0; +pub const _REG_FP: c_int = _REG_R11; +pub const _REG_LR: c_int = _REG_R13; +pub const _REG_SP: c_int = _REG_R14; +pub const _REG_PC: c_int = _REG_R15; diff --git a/src/unix/bsd/netbsdlike/netbsd/mips.rs b/src/unix/bsd/netbsdlike/netbsd/mips.rs index c25407fd97393..089154cd2a40a 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mips.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mips.rs @@ -1,13 +1,13 @@ -use PT_FIRSTMACH; +use crate::{c_int, c_longlong, PT_FIRSTMACH}; pub type c_long = i32; pub type c_ulong = u32; pub type c_char = i8; -pub type __cpu_simple_lock_nv_t = ::c_int; +pub type __cpu_simple_lock_nv_t = c_int; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_longlong>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 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; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4; +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; +pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 4; diff --git a/src/unix/bsd/netbsdlike/netbsd/mod.rs b/src/unix/bsd/netbsdlike/netbsd/mod.rs index 8d67bb54388b0..7b6e09d5d5cba 100644 --- a/src/unix/bsd/netbsdlike/netbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/netbsd/mod.rs @@ -1,19 +1,24 @@ -pub type clock_t = ::c_uint; -pub type suseconds_t = ::c_int; +use crate::{ + c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, cmsghdr, intptr_t, off_t, + size_t, ssize_t, +}; + +pub type clock_t = c_uint; +pub type suseconds_t = c_int; pub type dev_t = u64; 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; +pub type idtype_t = c_int; +pub type mqd_t = c_int; type __pthread_spin_t = __cpu_simple_lock_nv_t; -pub type vm_size_t = ::uintptr_t; // FIXME: deprecated since long time -pub type lwpid_t = ::c_uint; -pub type shmatt_t = ::c_uint; -pub type cpuid_t = ::c_ulong; +pub type vm_size_t = crate::uintptr_t; // FIXME: deprecated since long time +pub type lwpid_t = c_uint; +pub type shmatt_t = c_uint; +pub type cpuid_t = c_ulong; pub type cpuset_t = _cpuset; -pub type pthread_spin_t = ::c_uchar; -pub type timer_t = ::c_int; +pub type pthread_spin_t = c_uchar; +pub type timer_t = c_int; // elf.h @@ -33,7 +38,7 @@ pub type Elf64_Sxword = i64; pub type Elf64_Word = u32; pub type Elf64_Xword = u64; -pub type iconv_t = *mut ::c_void; +pub type iconv_t = *mut c_void; e! { pub enum fae_action { @@ -56,70 +61,70 @@ cfg_if! { } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_code(&self) -> ::c_int { + pub unsafe fn si_code(&self) -> c_int { self.si_code } - pub unsafe fn si_errno(&self) -> ::c_int { + pub unsafe fn si_errno(&self) -> c_int { self.si_errno } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - __pad1: ::c_int, - _pid: ::pid_t, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + __pad1: c_int, + _pid: crate::pid_t, } (*(self as *const siginfo_t as *const siginfo_timer))._pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - __pad1: ::c_int, - _pid: ::pid_t, - _uid: ::uid_t, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + __pad1: c_int, + _pid: crate::pid_t, + _uid: crate::uid_t, } (*(self as *const siginfo_t as *const siginfo_timer))._uid } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - __pad1: ::c_int, - _pid: ::pid_t, - _uid: ::uid_t, - value: ::sigval, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + __pad1: c_int, + _pid: crate::pid_t, + _uid: crate::uid_t, + value: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_timer)).value } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - __pad1: ::c_int, - _pid: ::pid_t, - _uid: ::uid_t, - _value: ::sigval, - _cpid: ::pid_t, - _cuid: ::uid_t, - status: ::c_int, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + __pad1: c_int, + _pid: crate::pid_t, + _uid: crate::uid_t, + _value: crate::sigval, + _cpid: crate::pid_t, + _cuid: crate::uid_t, + status: c_int, } (*(self as *const siginfo_t as *const siginfo_timer)).status } @@ -127,44 +132,44 @@ impl siginfo_t { s! { pub struct aiocb { - pub aio_offset: ::off_t, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_fildes: ::c_int, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - pub aio_sigevent: ::sigevent, - _state: ::c_int, - _errno: ::c_int, - _retval: ::ssize_t, + pub aio_offset: off_t, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_fildes: c_int, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, + pub aio_sigevent: crate::sigevent, + _state: c_int, + _errno: c_int, + _retval: ssize_t, } pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_matchc: ::size_t, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - pub gl_pathv: *mut *mut ::c_char, + pub gl_pathc: size_t, + pub gl_matchc: size_t, + pub gl_offs: size_t, + pub gl_flags: c_int, + pub gl_pathv: *mut *mut c_char, - __unused3: *mut ::c_void, + __unused3: *mut c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, + __unused6: *mut c_void, + __unused7: *mut c_void, + __unused8: *mut c_void, } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct sigset_t { @@ -172,57 +177,57 @@ s! { } pub struct stat { - pub st_dev: ::dev_t, - pub st_mode: ::mode_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_atime: ::time_t, - pub st_atimensec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtimensec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctimensec: ::c_long, - pub st_birthtime: ::time_t, - pub st_birthtimensec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, + pub st_dev: crate::dev_t, + pub st_mode: crate::mode_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_atime: crate::time_t, + pub st_atimensec: c_long, + pub st_mtime: crate::time_t, + pub st_mtimensec: c_long, + pub st_ctime: crate::time_t, + pub st_ctimensec: c_long, + pub st_birthtime: crate::time_t, + pub st_birthtimensec: c_long, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, + pub st_blksize: crate::blksize_t, pub st_flags: u32, pub st_gen: u32, pub st_spare: [u32; 2], } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, - pub ai_next: *mut ::addrinfo, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: crate::socklen_t, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, + pub ai_next: *mut crate::addrinfo, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - __pad1: ::c_int, - pub si_addr: *mut ::c_void, + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + __pad1: c_int, + pub si_addr: *mut c_void, __pad2: [u64; 13], } pub struct pthread_attr_t { - pta_magic: ::c_uint, - pta_flags: ::c_int, - pta_private: *mut ::c_void, + pta_magic: c_uint, + pta_flags: c_int, + pta_private: *mut c_void, } pub struct pthread_mutex_t { - ptm_magic: ::c_uint, + ptm_magic: c_uint, ptm_errorcheck: __pthread_spin_t, #[cfg(any( target_arch = "sparc", @@ -240,61 +245,61 @@ s! { target_arch = "x86_64" ))] ptm_pad2: [u8; 3], - ptm_owner: ::pthread_t, + ptm_owner: crate::pthread_t, ptm_waiters: *mut u8, - ptm_recursed: ::c_uint, - ptm_spare2: *mut ::c_void, + ptm_recursed: c_uint, + ptm_spare2: *mut c_void, } pub struct pthread_mutexattr_t { - ptma_magic: ::c_uint, - ptma_private: *mut ::c_void, + ptma_magic: c_uint, + ptma_private: *mut c_void, } pub struct pthread_rwlockattr_t { - ptra_magic: ::c_uint, - ptra_private: *mut ::c_void, + ptra_magic: c_uint, + ptra_private: *mut c_void, } pub struct pthread_cond_t { - ptc_magic: ::c_uint, + ptc_magic: c_uint, ptc_lock: __pthread_spin_t, ptc_waiters_first: *mut u8, ptc_waiters_last: *mut u8, - ptc_mutex: *mut ::pthread_mutex_t, - ptc_private: *mut ::c_void, + ptc_mutex: *mut crate::pthread_mutex_t, + ptc_private: *mut c_void, } pub struct pthread_condattr_t { - ptca_magic: ::c_uint, - ptca_private: *mut ::c_void, + ptca_magic: c_uint, + ptca_private: *mut c_void, } pub struct pthread_rwlock_t { - ptr_magic: ::c_uint, + ptr_magic: c_uint, ptr_interlock: __pthread_spin_t, ptr_rblocked_first: *mut u8, ptr_rblocked_last: *mut u8, ptr_wblocked_first: *mut u8, ptr_wblocked_last: *mut u8, - ptr_nreaders: ::c_uint, - ptr_owner: ::pthread_t, - ptr_private: *mut ::c_void, + ptr_nreaders: c_uint, + ptr_owner: crate::pthread_t, + ptr_private: *mut c_void, } pub struct pthread_spinlock_t { - pts_magic: ::c_uint, - pts_spin: ::pthread_spin_t, - pts_flags: ::c_int, + pts_magic: c_uint, + pts_spin: crate::pthread_spin_t, + pts_flags: c_int, } pub struct kevent { - pub ident: ::uintptr_t, + pub ident: crate::uintptr_t, pub filter: u32, pub flags: u32, pub fflags: u32, pub data: i64, - pub udata: ::intptr_t, /* FIXME: NetBSD 10.0 will finally have same layout as other BSD */ + pub udata: intptr_t, /* FIXME: NetBSD 10.0 will finally have same layout as other BSD */ } pub struct dqblk { @@ -309,44 +314,44 @@ s! { } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *const ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *const c_void, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_n_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct if_data { - pub ifi_type: ::c_uchar, - pub ifi_addrlen: ::c_uchar, - pub ifi_hdrlen: ::c_uchar, - pub ifi_link_state: ::c_int, + pub ifi_type: c_uchar, + pub ifi_addrlen: c_uchar, + pub ifi_hdrlen: c_uchar, + pub ifi_link_state: c_int, pub ifi_mtu: u64, pub ifi_metric: u64, pub ifi_baudrate: u64, @@ -361,52 +366,52 @@ s! { pub ifi_omcasts: u64, pub ifi_iqdrops: u64, pub ifi_noproto: u64, - pub ifi_lastchange: ::timespec, + pub ifi_lastchange: crate::timespec, } pub struct if_msghdr { - pub ifm_msglen: ::c_ushort, - pub ifm_version: ::c_uchar, - pub ifm_type: ::c_uchar, - pub ifm_addrs: ::c_int, - pub ifm_flags: ::c_int, - pub ifm_index: ::c_ushort, + pub ifm_msglen: c_ushort, + pub ifm_version: c_uchar, + pub ifm_type: c_uchar, + pub ifm_addrs: c_int, + pub ifm_flags: c_int, + pub ifm_index: c_ushort, pub ifm_data: if_data, } pub struct sockcred { - pub sc_pid: ::pid_t, - pub sc_uid: ::uid_t, - pub sc_euid: ::uid_t, - pub sc_gid: ::gid_t, - pub sc_egid: ::gid_t, - pub sc_ngroups: ::c_int, - pub sc_groups: [::gid_t; 1], + pub sc_pid: crate::pid_t, + pub sc_uid: crate::uid_t, + pub sc_euid: crate::uid_t, + pub sc_gid: crate::gid_t, + pub sc_egid: crate::gid_t, + pub sc_ngroups: c_int, + pub sc_groups: [crate::gid_t; 1], } pub struct uucred { - pub cr_unused: ::c_ushort, - pub cr_uid: ::uid_t, - pub cr_gid: ::gid_t, - pub cr_ngroups: ::c_int, - pub cr_groups: [::gid_t; NGROUPS_MAX as usize], + pub cr_unused: c_ushort, + pub cr_uid: crate::uid_t, + pub cr_gid: crate::gid_t, + pub cr_ngroups: c_int, + pub cr_groups: [crate::gid_t; NGROUPS_MAX as usize], } pub struct unpcbid { - pub unp_pid: ::pid_t, - pub unp_euid: ::uid_t, - pub unp_egid: ::gid_t, + pub unp_pid: crate::pid_t, + pub unp_euid: crate::uid_t, + pub unp_egid: crate::gid_t, } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::c_uchar, - pub sdl_index: ::c_ushort, + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, pub sdl_type: u8, pub sdl_nlen: u8, pub sdl_alen: u8, pub sdl_slen: u8, - pub sdl_data: [::c_char; 12], + pub sdl_data: [c_char; 12], } pub struct __exit_status { @@ -415,56 +420,56 @@ s! { } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - _shm_internal: *mut ::c_void, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + _shm_internal: *mut c_void, } pub struct utmp { - pub ut_line: [::c_char; UT_LINESIZE], - pub ut_name: [::c_char; UT_NAMESIZE], - pub ut_host: [::c_char; UT_HOSTSIZE], - pub ut_time: ::time_t, + pub ut_line: [c_char; UT_LINESIZE], + pub ut_name: [c_char; UT_NAMESIZE], + pub ut_host: [c_char; UT_HOSTSIZE], + pub ut_time: crate::time_t, } pub struct lastlog { - pub ll_line: [::c_char; UT_LINESIZE], - pub ll_host: [::c_char; UT_HOSTSIZE], - pub ll_time: ::time_t, + pub ll_line: [c_char; UT_LINESIZE], + pub ll_host: [c_char; UT_HOSTSIZE], + pub ll_time: crate::time_t, } pub struct timex { - pub modes: ::c_uint, - pub offset: ::c_long, - pub freq: ::c_long, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub status: ::c_int, - pub constant: ::c_long, - pub precision: ::c_long, - pub tolerance: ::c_long, - pub ppsfreq: ::c_long, - pub jitter: ::c_long, - pub shift: ::c_int, - pub stabil: ::c_long, - pub jitcnt: ::c_long, - pub calcnt: ::c_long, - pub errcnt: ::c_long, - pub stbcnt: ::c_long, + pub modes: c_uint, + pub offset: c_long, + pub freq: c_long, + pub maxerror: c_long, + pub esterror: c_long, + pub status: c_int, + pub constant: c_long, + pub precision: c_long, + pub tolerance: c_long, + pub ppsfreq: c_long, + pub jitter: c_long, + pub shift: c_int, + pub stabil: c_long, + pub jitcnt: c_long, + pub calcnt: c_long, + pub errcnt: c_long, + pub stbcnt: c_long, } pub struct ntptimeval { - pub time: ::timespec, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub tai: ::c_long, - pub time_state: ::c_int, + pub time: crate::timespec, + pub maxerror: c_long, + pub esterror: c_long, + pub tai: c_long, + pub time_state: c_int, } // elf.h @@ -505,13 +510,13 @@ s! { pub struct dl_phdr_info { pub dlpi_addr: Elf_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, pub dlpi_phdr: *const Elf_Phdr, pub dlpi_phnum: Elf_Half, - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, pub dlpi_tls_modid: usize, - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_tls_data: *mut c_void, } pub struct _cpuset { @@ -519,8 +524,8 @@ s! { } pub struct accept_filter_arg { - pub af_name: [::c_char; 16], - pub af_arg: [::c_char; 256 - 16], + pub af_name: [c_char; 16], + pub af_arg: [c_char; 256 - 16], } pub struct ki_sigset_t { @@ -581,10 +586,10 @@ s! { pub p_nice: u8, pub p_xstat: u16, pub p_acflag: u16, - pub p_comm: [::c_char; KI_MAXCOMLEN as usize], - pub p_wmesg: [::c_char; KI_WMESGLEN as usize], + pub p_comm: [c_char; KI_MAXCOMLEN as usize], + pub p_wmesg: [c_char; KI_WMESGLEN as usize], pub p_wchan: u64, - pub p_login: [::c_char; KI_MAXLOGNAME as usize], + pub p_login: [c_char; KI_MAXLOGNAME as usize], pub p_vm_rssize: i32, pub p_vm_tsize: i32, pub p_vm_dsize: i32, @@ -619,7 +624,7 @@ s! { pub p_realstat: u64, pub p_svuid: u32, pub p_svgid: u32, - pub p_ename: [::c_char; KI_MAXEMULLEN as usize], + pub p_ename: [c_char; KI_MAXEMULLEN as usize], pub p_vm_vsize: i64, pub p_vm_msize: i64, } @@ -640,7 +645,7 @@ s! { pub l_stat: i8, l_pad1: i8, l_pad2: i32, - pub l_wmesg: [::c_char; KI_WMESGLEN as usize], + pub l_wmesg: [c_char; KI_WMESGLEN as usize], pub l_wchan: u64, pub l_cpuid: u64, pub l_rtime_sec: u32, @@ -648,7 +653,7 @@ s! { pub l_cpticks: u32, pub l_pctcpu: u32, pub l_pid: u32, - pub l_name: [::c_char; KI_LNAMELEN as usize], + pub l_name: [c_char; KI_LNAMELEN as usize], } pub struct kinfo_vmentry { @@ -671,51 +676,51 @@ s! { pub kve_vn_rdev: u64, pub kve_vn_type: u32, pub kve_vn_mode: u32, - pub kve_path: [::c_char; ::PATH_MAX as usize], + pub kve_path: [c_char; crate::PATH_MAX as usize], } pub struct __c_anonymous_posix_spawn_fae_open { - pub path: *mut ::c_char, - pub oflag: ::c_int, - pub mode: ::mode_t, + pub path: *mut c_char, + pub oflag: c_int, + pub mode: crate::mode_t, } pub struct __c_anonymous_posix_spawn_fae_dup2 { - pub newfildes: ::c_int, + pub newfildes: c_int, } pub struct posix_spawnattr_t { - pub sa_flags: ::c_short, - pub sa_pgroup: ::pid_t, - pub sa_schedparam: ::sched_param, - pub sa_schedpolicy: ::c_int, + pub sa_flags: c_short, + pub sa_pgroup: crate::pid_t, + pub sa_schedparam: crate::sched_param, + pub sa_schedpolicy: c_int, pub sa_sigdefault: sigset_t, pub sa_sigmask: sigset_t, } pub struct posix_spawn_file_actions_entry_t { pub fae_action: fae_action, - pub fae_fildes: ::c_int, + pub fae_fildes: c_int, pub fae_data: __c_anonymous_posix_spawn_fae, } pub struct posix_spawn_file_actions_t { - pub size: ::c_uint, - pub len: ::c_uint, + pub size: c_uint, + pub len: c_uint, pub fae: *mut posix_spawn_file_actions_entry_t, } pub struct ptrace_lwpinfo { pub pl_lwpid: lwpid_t, - pub pl_event: ::c_int, + pub pl_event: c_int, } pub struct ptrace_lwpstatus { pub pl_lwpid: lwpid_t, pub pl_sigpend: sigset_t, pub pl_sigmask: sigset_t, - pub pl_name: [::c_char; 20], - pub pl_private: *mut ::c_void, + pub pl_name: [c_char; 20], + pub pl_private: *mut c_void, } pub struct ptrace_siginfo { @@ -724,22 +729,22 @@ s! { } pub struct ptrace_event { - pub pe_set_event: ::c_int, + pub pe_set_event: c_int, } pub struct sysctldesc { pub descr_num: i32, pub descr_ver: u32, pub descr_len: u32, - pub descr_str: [::c_char; 1], + pub descr_str: [c_char; 1], } pub struct ifreq { - pub _priv: [[::c_char; 6]; 24], + pub _priv: [[c_char; 6]; 24], } pub struct ifconf { - pub ifc_len: ::c_int, + pub ifc_len: c_int, pub ifc_ifcu: __c_anonymous_ifc_ifcu, } @@ -789,29 +794,29 @@ s! { s_no_extra_traits! { pub struct utmpx { - pub ut_name: [::c_char; _UTX_USERSIZE], - pub ut_id: [::c_char; _UTX_IDSIZE], - pub ut_line: [::c_char; _UTX_LINESIZE], - pub ut_host: [::c_char; _UTX_HOSTSIZE], + pub ut_name: [c_char; _UTX_USERSIZE], + pub ut_id: [c_char; _UTX_IDSIZE], + pub ut_line: [c_char; _UTX_LINESIZE], + pub ut_host: [c_char; _UTX_HOSTSIZE], pub ut_session: u16, pub ut_type: u16, - pub ut_pid: ::pid_t, + pub ut_pid: crate::pid_t, pub ut_exit: __exit_status, // FIXME: when anonymous struct are supported pub ut_ss: sockaddr_storage, - pub ut_tv: ::timeval, + pub ut_tv: crate::timeval, pub ut_pad: [u8; _UTX_PADSIZE], } pub struct lastlogx { - pub ll_tv: ::timeval, - pub ll_line: [::c_char; _UTX_LINESIZE], - pub ll_host: [::c_char; _UTX_HOSTSIZE], + pub ll_tv: crate::timeval, + pub ll_line: [c_char; _UTX_LINESIZE], + pub ll_host: [c_char; _UTX_HOSTSIZE], pub ll_ss: sockaddr_storage, } pub struct in_pktinfo { - pub ipi_addr: ::in_addr, - pub ipi_ifindex: ::c_uint, + pub ipi_addr: crate::in_addr, + pub ipi_ifindex: c_uint, } pub struct arphdr { @@ -823,7 +828,7 @@ s_no_extra_traits! { } pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct ip_mreq { @@ -833,35 +838,35 @@ s_no_extra_traits! { pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [i8; 8], } pub struct dirent { - pub d_fileno: ::ino_t, + pub d_fileno: crate::ino_t, pub d_reclen: u16, pub d_namlen: u16, pub d_type: u8, - pub d_name: [::c_char; 512], + pub d_name: [c_char; 512], } pub struct statvfs { - pub f_flag: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_iosize: ::c_ulong, + pub f_flag: c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_iosize: c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_bresvd: ::fsblkcnt_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_bresvd: crate::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fresvd: ::fsfilcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fresvd: crate::fsfilcnt_t, pub f_syncreads: u64, pub f_syncwrites: u64, @@ -869,32 +874,32 @@ s_no_extra_traits! { 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_fsidx: crate::fsid_t, + pub f_fsid: c_ulong, + pub f_namemax: c_ulong, + pub f_owner: crate::uid_t, pub f_spare: [u32; 4], - pub f_fstypename: [::c_char; 32], - pub f_mntonname: [::c_char; 1024], - pub f_mntfromname: [::c_char; 1024], + pub f_fstypename: [c_char; 32], + pub f_mntonname: [c_char; 1024], + pub f_mntfromname: [c_char; 1024], } pub struct sockaddr_storage { pub ss_len: u8, - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, __ss_pad1: [u8; 6], __ss_pad2: i64, __ss_pad3: [u8; 112], } pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, - __unused1: *mut ::c_void, //actually a function pointer - pub sigev_notify_attributes: *mut ::c_void, + pub sigev_notify: c_int, + pub sigev_signo: c_int, + pub sigev_value: crate::sigval, + __unused1: *mut c_void, //actually a function pointer + pub sigev_notify_attributes: *mut c_void, } pub union __c_anonymous_posix_spawn_fae { @@ -903,7 +908,7 @@ s_no_extra_traits! { } pub union __c_anonymous_ifc_ifcu { - pub ifcu_buf: *mut ::c_void, + pub ifcu_buf: *mut c_void, pub ifcu_req: *mut ifreq, } } @@ -936,8 +941,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_name", &self.ut_name) .field("ut_id", &self.ut_id) @@ -954,8 +959,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_name.hash(state); self.ut_type.hash(state); self.ut_pid.hash(state); @@ -985,8 +990,8 @@ cfg_if! { impl Eq for lastlogx {} - impl ::fmt::Debug for lastlogx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for lastlogx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("lastlogx") .field("ll_tv", &self.ll_tv) .field("ll_line", &self.ll_line) @@ -996,8 +1001,8 @@ cfg_if! { } } - impl ::hash::Hash for lastlogx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for lastlogx { + fn hash(&self, state: &mut H) { self.ll_tv.hash(state); self.ll_line.hash(state); self.ll_host.hash(state); @@ -1011,16 +1016,16 @@ cfg_if! { } } impl Eq for in_pktinfo {} - impl ::fmt::Debug for in_pktinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for in_pktinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("in_pktinfo") .field("ipi_addr", &self.ipi_addr) .field("ipi_ifindex", &self.ipi_ifindex) .finish() } } - impl ::hash::Hash for in_pktinfo { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for in_pktinfo { + fn hash(&self, state: &mut H) { self.ipi_addr.hash(state); self.ipi_ifindex.hash(state); } @@ -1036,8 +1041,8 @@ cfg_if! { } } impl Eq for arphdr {} - impl ::fmt::Debug for arphdr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for arphdr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let ar_hrd = self.ar_hrd; let ar_pro = self.ar_pro; let ar_op = self.ar_op; @@ -1050,8 +1055,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for arphdr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for arphdr { + fn hash(&self, state: &mut H) { let ar_hrd = self.ar_hrd; let ar_pro = self.ar_pro; let ar_op = self.ar_op; @@ -1069,14 +1074,14 @@ cfg_if! { } } impl Eq for in_addr {} - impl ::fmt::Debug for in_addr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for in_addr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let s_addr = self.s_addr; f.debug_struct("in_addr").field("s_addr", &s_addr).finish() } } - impl ::hash::Hash for in_addr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for in_addr { + fn hash(&self, state: &mut H) { let s_addr = self.s_addr; s_addr.hash(state); } @@ -1089,16 +1094,16 @@ cfg_if! { } } impl Eq for ip_mreq {} - impl ::fmt::Debug for ip_mreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ip_mreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ip_mreq") .field("imr_multiaddr", &self.imr_multiaddr) .field("imr_interface", &self.imr_interface) .finish() } } - impl ::hash::Hash for ip_mreq { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ip_mreq { + fn hash(&self, state: &mut H) { self.imr_multiaddr.hash(state); self.imr_interface.hash(state); } @@ -1114,8 +1119,8 @@ cfg_if! { } } impl Eq for sockaddr_in {} - impl ::fmt::Debug for sockaddr_in { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_in { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_in") .field("sin_len", &self.sin_len) .field("sin_family", &self.sin_family) @@ -1125,8 +1130,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_in { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_in { + fn hash(&self, state: &mut H) { self.sin_len.hash(state); self.sin_family.hash(state); self.sin_port.hash(state); @@ -1149,8 +1154,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_reclen", &self.d_reclen) @@ -1160,8 +1165,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_reclen.hash(state); self.d_namlen.hash(state); @@ -1207,8 +1212,8 @@ cfg_if! { } } impl Eq for statvfs {} - impl ::fmt::Debug for statvfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statvfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statvfs") .field("f_flag", &self.f_flag) .field("f_bsize", &self.f_bsize) @@ -1237,8 +1242,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for statvfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statvfs { + fn hash(&self, state: &mut H) { self.f_flag.hash(state); self.f_bsize.hash(state); self.f_frsize.hash(state); @@ -1280,8 +1285,8 @@ cfg_if! { } } impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -1291,8 +1296,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_len.hash(state); self.ss_family.hash(state); self.__ss_pad1.hash(state); @@ -1310,8 +1315,8 @@ cfg_if! { } } impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -1320,8 +1325,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_notify.hash(state); self.sigev_signo.hash(state); self.sigev_value.hash(state); @@ -1337,8 +1342,8 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_posix_spawn_fae { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_posix_spawn_fae { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("__c_anonymous_posix_fae") .field("open", &self.open) @@ -1348,8 +1353,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_posix_spawn_fae { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_posix_spawn_fae { + fn hash(&self, state: &mut H) { unsafe { self.open.hash(state); self.dup2.hash(state); @@ -1365,8 +1370,8 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_ifc_ifcu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifc_ifcu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("__c_anonymous_ifc_ifcu") .field("ifcu_buf", &self.ifcu_buf) @@ -1376,8 +1381,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_ifc_ifcu { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifc_ifcu { + fn hash(&self, state: &mut H) { unsafe { self.ifcu_buf.hash(state); self.ifcu_req.hash(state); @@ -1387,127 +1392,127 @@ cfg_if! { } } -pub const AT_FDCWD: ::c_int = -100; -pub const AT_EACCESS: ::c_int = 0x100; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x200; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400; -pub const AT_REMOVEDIR: ::c_int = 0x800; - -pub const AT_NULL: ::c_int = 0; -pub const AT_IGNORE: ::c_int = 1; -pub const AT_EXECFD: ::c_int = 2; -pub const AT_PHDR: ::c_int = 3; -pub const AT_PHENT: ::c_int = 4; -pub const AT_PHNUM: ::c_int = 5; -pub const AT_PAGESZ: ::c_int = 6; -pub const AT_BASE: ::c_int = 7; -pub const AT_FLAGS: ::c_int = 8; -pub const AT_ENTRY: ::c_int = 9; -pub const AT_DCACHEBSIZE: ::c_int = 10; -pub const AT_ICACHEBSIZE: ::c_int = 11; -pub const AT_UCACHEBSIZE: ::c_int = 12; -pub const AT_STACKBASE: ::c_int = 13; -pub const AT_EUID: ::c_int = 2000; -pub const AT_RUID: ::c_int = 2001; -pub const AT_EGID: ::c_int = 2002; -pub const AT_RGID: ::c_int = 2003; -pub const AT_SUN_LDELF: ::c_int = 2004; -pub const AT_SUN_LDSHDR: ::c_int = 2005; -pub const AT_SUN_LDNAME: ::c_int = 2006; -pub const AT_SUN_LDPGSIZE: ::c_int = 2007; -pub const AT_SUN_PLATFORM: ::c_int = 2008; -pub const AT_SUN_HWCAP: ::c_int = 2009; -pub const AT_SUN_IFLUSH: ::c_int = 2010; -pub const AT_SUN_CPU: ::c_int = 2011; -pub const AT_SUN_EMUL_ENTRY: ::c_int = 2012; -pub const AT_SUN_EMUL_EXECFD: ::c_int = 2013; -pub const AT_SUN_EXECNAME: ::c_int = 2014; - -pub const EXTATTR_NAMESPACE_USER: ::c_int = 1; -pub const EXTATTR_NAMESPACE_SYSTEM: ::c_int = 2; - -pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE; -pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE; -pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY; -pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC; -pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME; -pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES; -pub const LC_ALL_MASK: ::c_int = !0; - -pub const ERA: ::nl_item = 52; -pub const ERA_D_FMT: ::nl_item = 53; -pub const ERA_D_T_FMT: ::nl_item = 54; -pub const ERA_T_FMT: ::nl_item = 55; -pub const ALT_DIGITS: ::nl_item = 56; - -pub const O_CLOEXEC: ::c_int = 0x400000; -pub const O_ALT_IO: ::c_int = 0x40000; -pub const O_NOSIGPIPE: ::c_int = 0x1000000; -pub const O_SEARCH: ::c_int = 0x800000; -pub const O_DIRECTORY: ::c_int = 0x200000; -pub const O_DIRECT: ::c_int = 0x00080000; -pub const O_RSYNC: ::c_int = 0x00020000; - -pub const MS_SYNC: ::c_int = 0x4; -pub const MS_INVALIDATE: ::c_int = 0x2; +pub const AT_FDCWD: c_int = -100; +pub const AT_EACCESS: c_int = 0x100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x200; +pub const AT_SYMLINK_FOLLOW: c_int = 0x400; +pub const AT_REMOVEDIR: c_int = 0x800; + +pub const AT_NULL: c_int = 0; +pub const AT_IGNORE: c_int = 1; +pub const AT_EXECFD: c_int = 2; +pub const AT_PHDR: c_int = 3; +pub const AT_PHENT: c_int = 4; +pub const AT_PHNUM: c_int = 5; +pub const AT_PAGESZ: c_int = 6; +pub const AT_BASE: c_int = 7; +pub const AT_FLAGS: c_int = 8; +pub const AT_ENTRY: c_int = 9; +pub const AT_DCACHEBSIZE: c_int = 10; +pub const AT_ICACHEBSIZE: c_int = 11; +pub const AT_UCACHEBSIZE: c_int = 12; +pub const AT_STACKBASE: c_int = 13; +pub const AT_EUID: c_int = 2000; +pub const AT_RUID: c_int = 2001; +pub const AT_EGID: c_int = 2002; +pub const AT_RGID: c_int = 2003; +pub const AT_SUN_LDELF: c_int = 2004; +pub const AT_SUN_LDSHDR: c_int = 2005; +pub const AT_SUN_LDNAME: c_int = 2006; +pub const AT_SUN_LDPGSIZE: c_int = 2007; +pub const AT_SUN_PLATFORM: c_int = 2008; +pub const AT_SUN_HWCAP: c_int = 2009; +pub const AT_SUN_IFLUSH: c_int = 2010; +pub const AT_SUN_CPU: c_int = 2011; +pub const AT_SUN_EMUL_ENTRY: c_int = 2012; +pub const AT_SUN_EMUL_EXECFD: c_int = 2013; +pub const AT_SUN_EXECNAME: c_int = 2014; + +pub const EXTATTR_NAMESPACE_USER: c_int = 1; +pub const EXTATTR_NAMESPACE_SYSTEM: c_int = 2; + +pub const LC_COLLATE_MASK: c_int = 1 << crate::LC_COLLATE; +pub const LC_CTYPE_MASK: c_int = 1 << crate::LC_CTYPE; +pub const LC_MONETARY_MASK: c_int = 1 << crate::LC_MONETARY; +pub const LC_NUMERIC_MASK: c_int = 1 << crate::LC_NUMERIC; +pub const LC_TIME_MASK: c_int = 1 << crate::LC_TIME; +pub const LC_MESSAGES_MASK: c_int = 1 << crate::LC_MESSAGES; +pub const LC_ALL_MASK: c_int = !0; + +pub const ERA: crate::nl_item = 52; +pub const ERA_D_FMT: crate::nl_item = 53; +pub const ERA_D_T_FMT: crate::nl_item = 54; +pub const ERA_T_FMT: crate::nl_item = 55; +pub const ALT_DIGITS: crate::nl_item = 56; + +pub const O_CLOEXEC: c_int = 0x400000; +pub const O_ALT_IO: c_int = 0x40000; +pub const O_NOSIGPIPE: c_int = 0x1000000; +pub const O_SEARCH: c_int = 0x800000; +pub const O_DIRECTORY: c_int = 0x200000; +pub const O_DIRECT: c_int = 0x00080000; +pub const O_RSYNC: c_int = 0x00020000; + +pub const MS_SYNC: c_int = 0x4; +pub const MS_INVALIDATE: c_int = 0x2; // Here because they are not present on OpenBSD // (https://github.com/openbsd/src/blob/HEAD/sys/sys/resource.h) -pub const RLIMIT_SBSIZE: ::c_int = 9; -pub const RLIMIT_AS: ::c_int = 10; -pub const RLIMIT_NTHR: ::c_int = 11; +pub const RLIMIT_SBSIZE: c_int = 9; +pub const RLIMIT_AS: c_int = 10; +pub const RLIMIT_NTHR: c_int = 11; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 12; - -pub const EIDRM: ::c_int = 82; -pub const ENOMSG: ::c_int = 83; -pub const EOVERFLOW: ::c_int = 84; -pub const EILSEQ: ::c_int = 85; -pub const ENOTSUP: ::c_int = 86; -pub const ECANCELED: ::c_int = 87; -pub const EBADMSG: ::c_int = 88; -pub const ENODATA: ::c_int = 89; -pub const ENOSR: ::c_int = 90; -pub const ENOSTR: ::c_int = 91; -pub const ETIME: ::c_int = 92; -pub const ENOATTR: ::c_int = 93; -pub const EMULTIHOP: ::c_int = 94; -pub const ENOLINK: ::c_int = 95; -pub const EPROTO: ::c_int = 96; -pub const EOWNERDEAD: ::c_int = 97; -pub const ENOTRECOVERABLE: ::c_int = 98; +pub const RLIM_NLIMITS: c_int = 12; + +pub const EIDRM: c_int = 82; +pub const ENOMSG: c_int = 83; +pub const EOVERFLOW: c_int = 84; +pub const EILSEQ: c_int = 85; +pub const ENOTSUP: c_int = 86; +pub const ECANCELED: c_int = 87; +pub const EBADMSG: c_int = 88; +pub const ENODATA: c_int = 89; +pub const ENOSR: c_int = 90; +pub const ENOSTR: c_int = 91; +pub const ETIME: c_int = 92; +pub const ENOATTR: c_int = 93; +pub const EMULTIHOP: c_int = 94; +pub const ENOLINK: c_int = 95; +pub const EPROTO: c_int = 96; +pub const EOWNERDEAD: c_int = 97; +pub const ENOTRECOVERABLE: c_int = 98; #[deprecated( since = "0.2.143", note = "This value will always match the highest defined error number \ and thus is not stable. \ See #3040 for more info." )] -pub const ELAST: ::c_int = 98; - -pub const F_DUPFD_CLOEXEC: ::c_int = 12; -pub const F_CLOSEM: ::c_int = 10; -pub const F_GETNOSIGPIPE: ::c_int = 13; -pub const F_SETNOSIGPIPE: ::c_int = 14; -pub const F_MAXFD: ::c_int = 11; -pub const F_GETPATH: ::c_int = 15; - -pub const FUTEX_WAIT: ::c_int = 0; -pub const FUTEX_WAKE: ::c_int = 1; -pub const FUTEX_FD: ::c_int = 2; -pub const FUTEX_REQUEUE: ::c_int = 3; -pub const FUTEX_CMP_REQUEUE: ::c_int = 4; -pub const FUTEX_WAKE_OP: ::c_int = 5; -pub const FUTEX_LOCK_PI: ::c_int = 6; -pub const FUTEX_UNLOCK_PI: ::c_int = 7; -pub const FUTEX_TRYLOCK_PI: ::c_int = 8; -pub const FUTEX_WAIT_BITSET: ::c_int = 9; -pub const FUTEX_WAKE_BITSET: ::c_int = 10; -pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11; -pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12; -pub const FUTEX_PRIVATE_FLAG: ::c_int = 1 << 7; -pub const FUTEX_CLOCK_REALTIME: ::c_int = 1 << 8; -pub const FUTEX_CMD_MASK: ::c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); +pub const ELAST: c_int = 98; + +pub const F_DUPFD_CLOEXEC: c_int = 12; +pub const F_CLOSEM: c_int = 10; +pub const F_GETNOSIGPIPE: c_int = 13; +pub const F_SETNOSIGPIPE: c_int = 14; +pub const F_MAXFD: c_int = 11; +pub const F_GETPATH: c_int = 15; + +pub const FUTEX_WAIT: c_int = 0; +pub const FUTEX_WAKE: c_int = 1; +pub const FUTEX_FD: c_int = 2; +pub const FUTEX_REQUEUE: c_int = 3; +pub const FUTEX_CMP_REQUEUE: c_int = 4; +pub const FUTEX_WAKE_OP: c_int = 5; +pub const FUTEX_LOCK_PI: c_int = 6; +pub const FUTEX_UNLOCK_PI: c_int = 7; +pub const FUTEX_TRYLOCK_PI: c_int = 8; +pub const FUTEX_WAIT_BITSET: c_int = 9; +pub const FUTEX_WAKE_BITSET: c_int = 10; +pub const FUTEX_WAIT_REQUEUE_PI: c_int = 11; +pub const FUTEX_CMP_REQUEUE_PI: c_int = 12; +pub const FUTEX_PRIVATE_FLAG: c_int = 1 << 7; +pub const FUTEX_CLOCK_REALTIME: c_int = 1 << 8; +pub const FUTEX_CMD_MASK: c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); pub const FUTEX_WAITERS: u32 = 1 << 31; pub const FUTEX_OWNER_DIED: u32 = 1 << 30; pub const FUTEX_SYNCOBJ_1: u32 = 1 << 29; @@ -1515,57 +1520,57 @@ pub const FUTEX_SYNCOBJ_0: u32 = 1 << 28; pub const FUTEX_TID_MASK: u32 = (1 << 28) - 1; pub const FUTEX_BITSET_MATCH_ANY: u32 = !0; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR; -pub const IP_RECVIF: ::c_int = 20; -pub const IP_PKTINFO: ::c_int = 25; -pub const IP_RECVPKTINFO: ::c_int = 26; -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; - -pub const TCP_KEEPIDLE: ::c_int = 3; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; -pub const TCP_KEEPINIT: ::c_int = 7; -pub const TCP_MD5SIG: ::c_int = 0x10; -pub const TCP_CONGCTL: ::c_int = 0x20; - -pub const SOCK_CONN_DGRAM: ::c_int = 6; -pub const SOCK_DCCP: ::c_int = SOCK_CONN_DGRAM; -pub const SOCK_NOSIGPIPE: ::c_int = 0x40000000; -pub const SOCK_FLAGS_MASK: ::c_int = 0xf0000000; - -pub const SO_SNDTIMEO: ::c_int = 0x100b; -pub const SO_RCVTIMEO: ::c_int = 0x100c; -pub const SO_NOSIGPIPE: ::c_int = 0x0800; -pub const SO_ACCEPTFILTER: ::c_int = 0x1000; -pub const SO_TIMESTAMP: ::c_int = 0x2000; -pub const SO_OVERFLOWED: ::c_int = 0x1009; -pub const SO_NOHEADER: ::c_int = 0x100a; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_SENDSRCADDR: c_int = IP_RECVDSTADDR; +pub const IP_RECVIF: c_int = 20; +pub const IP_PKTINFO: c_int = 25; +pub const IP_RECVPKTINFO: c_int = 26; +pub const IPV6_JOIN_GROUP: c_int = 12; +pub const IPV6_LEAVE_GROUP: c_int = 13; + +pub const TCP_KEEPIDLE: c_int = 3; +pub const TCP_KEEPINTVL: c_int = 5; +pub const TCP_KEEPCNT: c_int = 6; +pub const TCP_KEEPINIT: c_int = 7; +pub const TCP_MD5SIG: c_int = 0x10; +pub const TCP_CONGCTL: c_int = 0x20; + +pub const SOCK_CONN_DGRAM: c_int = 6; +pub const SOCK_DCCP: c_int = SOCK_CONN_DGRAM; +pub const SOCK_NOSIGPIPE: c_int = 0x40000000; +pub const SOCK_FLAGS_MASK: c_int = 0xf0000000; + +pub const SO_SNDTIMEO: c_int = 0x100b; +pub const SO_RCVTIMEO: c_int = 0x100c; +pub const SO_NOSIGPIPE: c_int = 0x0800; +pub const SO_ACCEPTFILTER: c_int = 0x1000; +pub const SO_TIMESTAMP: c_int = 0x2000; +pub const SO_OVERFLOWED: c_int = 0x1009; +pub const SO_NOHEADER: c_int = 0x100a; // http://cvsweb.netbsd.org/bsdweb.cgi/src/sys/sys/un.h?annotate -pub const LOCAL_OCREDS: ::c_int = 0x0001; // pass credentials to receiver -pub const LOCAL_CONNWAIT: ::c_int = 0x0002; // connects block until accepted -pub const LOCAL_PEEREID: ::c_int = 0x0003; // get peer identification -pub const LOCAL_CREDS: ::c_int = 0x0004; // pass credentials to receiver +pub const LOCAL_OCREDS: c_int = 0x0001; // pass credentials to receiver +pub const LOCAL_CONNWAIT: c_int = 0x0002; // connects block until accepted +pub const LOCAL_PEEREID: c_int = 0x0003; // get peer identification +pub const LOCAL_CREDS: c_int = 0x0004; // pass credentials to receiver // https://github.com/NetBSD/src/blob/trunk/sys/net/if.h#L373 -pub const IFF_UP: ::c_int = 0x0001; // interface is up -pub const IFF_BROADCAST: ::c_int = 0x0002; // broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x0004; // turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x0008; // is a loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x0010; // interface is point-to-point link -pub const IFF_NOTRAILERS: ::c_int = 0x0020; // avoid use of trailers -pub const IFF_RUNNING: ::c_int = 0x0040; // resources allocated -pub const IFF_NOARP: ::c_int = 0x0080; // no address resolution protocol -pub const IFF_PROMISC: ::c_int = 0x0100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x0200; // receive all multicast packets -pub const IFF_OACTIVE: ::c_int = 0x0400; // transmission in progress -pub const IFF_SIMPLEX: ::c_int = 0x0800; // can't hear own transmissions -pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast +pub const IFF_UP: c_int = 0x0001; // interface is up +pub const IFF_BROADCAST: c_int = 0x0002; // broadcast address valid +pub const IFF_DEBUG: c_int = 0x0004; // turn on debugging +pub const IFF_LOOPBACK: c_int = 0x0008; // is a loopback net +pub const IFF_POINTOPOINT: c_int = 0x0010; // interface is point-to-point link +pub const IFF_NOTRAILERS: c_int = 0x0020; // avoid use of trailers +pub const IFF_RUNNING: c_int = 0x0040; // resources allocated +pub const IFF_NOARP: c_int = 0x0080; // no address resolution protocol +pub const IFF_PROMISC: c_int = 0x0100; // receive all packets +pub const IFF_ALLMULTI: c_int = 0x0200; // receive all multicast packets +pub const IFF_OACTIVE: c_int = 0x0400; // transmission in progress +pub const IFF_SIMPLEX: c_int = 0x0800; // can't hear own transmissions +pub const IFF_LINK0: c_int = 0x1000; // per link layer defined bit +pub const IFF_LINK1: c_int = 0x2000; // per link layer defined bit +pub const IFF_LINK2: c_int = 0x4000; // per link layer defined bit +pub const IFF_MULTICAST: c_int = 0x8000; // supports multicast // sys/netinet/in.h // Protocols (RFC 1700) @@ -1573,341 +1578,341 @@ pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast // IPPROTO_IP defined in src/unix/mod.rs /// Hop-by-hop option header -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// gateway^2 (deprecated) -pub const IPPROTO_GGP: ::c_int = 3; +pub const IPPROTO_GGP: c_int = 3; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; // IPPROTO_UDP defined in src/unix/mod.rs /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; /// DCCP -pub const IPPROTO_DCCP: ::c_int = 33; +pub const IPPROTO_DCCP: c_int = 33; // IPPROTO_IPV6 defined in src/unix/mod.rs /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; /// IP Mobility RFC 2004 -pub const IPPROTO_MOBILE: ::c_int = 55; +pub const IPPROTO_MOBILE: c_int = 55; /// IPv6 ICMP -pub const IPPROTO_IPV6_ICMP: ::c_int = 58; +pub const IPPROTO_IPV6_ICMP: c_int = 58; // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; +pub const IPPROTO_DSTOPTS: c_int = 60; /// ISO cnlp -pub const IPPROTO_EON: ::c_int = 80; +pub const IPPROTO_EON: c_int = 80; /// Ethernet-in-IP -pub const IPPROTO_ETHERIP: ::c_int = 97; +pub const IPPROTO_ETHERIP: c_int = 97; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// Protocol indep. multicast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// IP Payload Comp. Protocol -pub const IPPROTO_IPCOMP: ::c_int = 108; +pub const IPPROTO_IPCOMP: c_int = 108; /// VRRP RFC 2338 -pub const IPPROTO_VRRP: ::c_int = 112; +pub const IPPROTO_VRRP: c_int = 112; /// Common Address Resolution Protocol -pub const IPPROTO_CARP: ::c_int = 112; +pub const IPPROTO_CARP: c_int = 112; /// L2TPv3 -pub const IPPROTO_L2TP: ::c_int = 115; +pub const IPPROTO_L2TP: c_int = 115; /// SCTP -pub const IPPROTO_SCTP: ::c_int = 132; +pub const IPPROTO_SCTP: c_int = 132; /// PFSYNC -pub const IPPROTO_PFSYNC: ::c_int = 240; -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_PFSYNC: c_int = 240; +pub const IPPROTO_MAX: c_int = 256; /// last return value of *_input(), meaning "all job for this pkt is done". -pub const IPPROTO_DONE: ::c_int = 257; +pub const IPPROTO_DONE: c_int = 257; /// sysctl placeholder for (FAST_)IPSEC -pub const CTL_IPPROTO_IPSEC: ::c_int = 258; - -pub const AF_OROUTE: ::c_int = 17; -pub const AF_ARP: ::c_int = 28; -pub const pseudo_AF_KEY: ::c_int = 29; -pub const pseudo_AF_HDRCMPLT: ::c_int = 30; -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 NET_RT_DUMP: ::c_int = 1; -pub const NET_RT_FLAGS: ::c_int = 2; -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; -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; - -pub const MSG_NBIO: ::c_int = 0x1000; -pub const MSG_WAITFORONE: ::c_int = 0x2000; -pub const MSG_NOTIFICATION: ::c_int = 0x4000; - -pub const SCM_TIMESTAMP: ::c_int = 0x08; -pub const SCM_CREDS: ::c_int = 0x10; - -pub const O_DSYNC: ::c_int = 0x10000; - -pub const MAP_RENAME: ::c_int = 0x20; -pub const MAP_NORESERVE: ::c_int = 0x40; -pub const MAP_HASSEMAPHORE: ::c_int = 0x200; -pub const MAP_TRYFIXED: ::c_int = 0x400; -pub const MAP_WIRED: ::c_int = 0x800; -pub const MAP_STACK: ::c_int = 0x2000; +pub const CTL_IPPROTO_IPSEC: c_int = 258; + +pub const AF_OROUTE: c_int = 17; +pub const AF_ARP: c_int = 28; +pub const pseudo_AF_KEY: c_int = 29; +pub const pseudo_AF_HDRCMPLT: c_int = 30; +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 NET_RT_DUMP: c_int = 1; +pub const NET_RT_FLAGS: c_int = 2; +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; +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; + +pub const MSG_NBIO: c_int = 0x1000; +pub const MSG_WAITFORONE: c_int = 0x2000; +pub const MSG_NOTIFICATION: c_int = 0x4000; + +pub const SCM_TIMESTAMP: c_int = 0x08; +pub const SCM_CREDS: c_int = 0x10; + +pub const O_DSYNC: c_int = 0x10000; + +pub const MAP_RENAME: c_int = 0x20; +pub const MAP_NORESERVE: c_int = 0x40; +pub const MAP_HASSEMAPHORE: c_int = 0x200; +pub const MAP_TRYFIXED: c_int = 0x400; +pub const MAP_WIRED: c_int = 0x800; +pub const MAP_STACK: c_int = 0x2000; // map alignment aliases for MAP_ALIGNED -pub const MAP_ALIGNMENT_SHIFT: ::c_int = 24; -pub const MAP_ALIGNMENT_MASK: ::c_int = 0xff << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNMENT_64KB: ::c_int = 16 << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNMENT_16MB: ::c_int = 24 << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNMENT_4GB: ::c_int = 32 << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNMENT_1TB: ::c_int = 40 << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNMENT_256TB: ::c_int = 48 << MAP_ALIGNMENT_SHIFT; -pub const MAP_ALIGNMENT_64PB: ::c_int = 56 << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_SHIFT: c_int = 24; +pub const MAP_ALIGNMENT_MASK: c_int = 0xff << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_64KB: c_int = 16 << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_16MB: c_int = 24 << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_4GB: c_int = 32 << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_1TB: c_int = 40 << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_256TB: c_int = 48 << MAP_ALIGNMENT_SHIFT; +pub const MAP_ALIGNMENT_64PB: c_int = 56 << MAP_ALIGNMENT_SHIFT; // mremap flag -pub const MAP_REMAPDUP: ::c_int = 0x004; - -pub const DCCP_TYPE_REQUEST: ::c_int = 0; -pub const DCCP_TYPE_RESPONSE: ::c_int = 1; -pub const DCCP_TYPE_DATA: ::c_int = 2; -pub const DCCP_TYPE_ACK: ::c_int = 3; -pub const DCCP_TYPE_DATAACK: ::c_int = 4; -pub const DCCP_TYPE_CLOSEREQ: ::c_int = 5; -pub const DCCP_TYPE_CLOSE: ::c_int = 6; -pub const DCCP_TYPE_RESET: ::c_int = 7; -pub const DCCP_TYPE_MOVE: ::c_int = 8; - -pub const DCCP_FEATURE_CC: ::c_int = 1; -pub const DCCP_FEATURE_ECN: ::c_int = 2; -pub const DCCP_FEATURE_ACKRATIO: ::c_int = 3; -pub const DCCP_FEATURE_ACKVECTOR: ::c_int = 4; -pub const DCCP_FEATURE_MOBILITY: ::c_int = 5; -pub const DCCP_FEATURE_LOSSWINDOW: ::c_int = 6; -pub const DCCP_FEATURE_CONN_NONCE: ::c_int = 8; -pub const DCCP_FEATURE_IDENTREG: ::c_int = 7; - -pub const DCCP_OPT_PADDING: ::c_int = 0; -pub const DCCP_OPT_DATA_DISCARD: ::c_int = 1; -pub const DCCP_OPT_SLOW_RECV: ::c_int = 2; -pub const DCCP_OPT_BUF_CLOSED: ::c_int = 3; -pub const DCCP_OPT_CHANGE_L: ::c_int = 32; -pub const DCCP_OPT_CONFIRM_L: ::c_int = 33; -pub const DCCP_OPT_CHANGE_R: ::c_int = 34; -pub const DCCP_OPT_CONFIRM_R: ::c_int = 35; -pub const DCCP_OPT_INIT_COOKIE: ::c_int = 36; -pub const DCCP_OPT_NDP_COUNT: ::c_int = 37; -pub const DCCP_OPT_ACK_VECTOR0: ::c_int = 38; -pub const DCCP_OPT_ACK_VECTOR1: ::c_int = 39; -pub const DCCP_OPT_RECV_BUF_DROPS: ::c_int = 40; -pub const DCCP_OPT_TIMESTAMP: ::c_int = 41; -pub const DCCP_OPT_TIMESTAMP_ECHO: ::c_int = 42; -pub const DCCP_OPT_ELAPSEDTIME: ::c_int = 43; -pub const DCCP_OPT_DATACHECKSUM: ::c_int = 44; - -pub const DCCP_REASON_UNSPEC: ::c_int = 0; -pub const DCCP_REASON_CLOSED: ::c_int = 1; -pub const DCCP_REASON_INVALID: ::c_int = 2; -pub const DCCP_REASON_OPTION_ERR: ::c_int = 3; -pub const DCCP_REASON_FEA_ERR: ::c_int = 4; -pub const DCCP_REASON_CONN_REF: ::c_int = 5; -pub const DCCP_REASON_BAD_SNAME: ::c_int = 6; -pub const DCCP_REASON_BAD_COOKIE: ::c_int = 7; -pub const DCCP_REASON_INV_MOVE: ::c_int = 8; -pub const DCCP_REASON_UNANSW_CH: ::c_int = 10; -pub const DCCP_REASON_FRUITLESS_NEG: ::c_int = 11; - -pub const DCCP_CCID: ::c_int = 1; -pub const DCCP_CSLEN: ::c_int = 2; -pub const DCCP_MAXSEG: ::c_int = 4; -pub const DCCP_SERVICE: ::c_int = 8; - -pub const DCCP_NDP_LIMIT: ::c_int = 16; -pub const DCCP_SEQ_NUM_LIMIT: ::c_int = 16777216; -pub const DCCP_MAX_OPTIONS: ::c_int = 32; -pub const DCCP_MAX_PKTS: ::c_int = 100; - -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; -pub const _PC_NO_TRUNC: ::c_int = 8; -pub const _PC_VDISABLE: ::c_int = 9; -pub const _PC_SYNC_IO: ::c_int = 10; -pub const _PC_FILESIZEBITS: ::c_int = 11; -pub const _PC_SYMLINK_MAX: ::c_int = 12; -pub const _PC_2_SYMLINKS: ::c_int = 13; -pub const _PC_ACL_EXTENDED: ::c_int = 14; -pub const _PC_MIN_HOLE_SIZE: ::c_int = 15; - -pub const _SC_SYNCHRONIZED_IO: ::c_int = 31; -pub const _SC_IOV_MAX: ::c_int = 32; -pub const _SC_MAPPED_FILES: ::c_int = 33; -pub const _SC_MEMLOCK: ::c_int = 34; -pub const _SC_MEMLOCK_RANGE: ::c_int = 35; -pub const _SC_MEMORY_PROTECTION: ::c_int = 36; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 37; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 38; -pub const _SC_CLK_TCK: ::c_int = 39; -pub const _SC_ATEXIT_MAX: ::c_int = 40; -pub const _SC_THREADS: ::c_int = 41; -pub const _SC_SEMAPHORES: ::c_int = 42; -pub const _SC_BARRIERS: ::c_int = 43; -pub const _SC_TIMERS: ::c_int = 44; -pub const _SC_SPIN_LOCKS: ::c_int = 45; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 46; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 47; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 48; -pub const _SC_CLOCK_SELECTION: ::c_int = 49; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 50; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 51; -pub const _SC_AIO_MAX: ::c_int = 52; -pub const _SC_MESSAGE_PASSING: ::c_int = 53; -pub const _SC_MQ_OPEN_MAX: ::c_int = 54; -pub const _SC_MQ_PRIO_MAX: ::c_int = 55; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 56; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 57; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 58; -pub const _SC_THREAD_STACK_MIN: ::c_int = 59; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 60; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 61; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 62; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 63; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 64; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 65; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 66; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 67; -pub const _SC_TTY_NAME_MAX: ::c_int = 68; -pub const _SC_HOST_NAME_MAX: ::c_int = 69; -pub const _SC_PASS_MAX: ::c_int = 70; -pub const _SC_REGEXP: ::c_int = 71; -pub const _SC_SHELL: ::c_int = 72; -pub const _SC_SYMLOOP_MAX: ::c_int = 73; -pub const _SC_V6_ILP32_OFF32: ::c_int = 74; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 75; -pub const _SC_V6_LP64_OFF64: ::c_int = 76; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 77; -pub const _SC_2_PBS: ::c_int = 80; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 81; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 82; -pub const _SC_2_PBS_LOCATE: ::c_int = 83; -pub const _SC_2_PBS_MESSAGE: ::c_int = 84; -pub const _SC_2_PBS_TRACK: ::c_int = 85; -pub const _SC_SPAWN: ::c_int = 86; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 87; -pub const _SC_TIMER_MAX: ::c_int = 88; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 89; -pub const _SC_CPUTIME: ::c_int = 90; -pub const _SC_THREAD_CPUTIME: ::c_int = 91; -pub const _SC_DELAYTIMER_MAX: ::c_int = 92; +pub const MAP_REMAPDUP: c_int = 0x004; + +pub const DCCP_TYPE_REQUEST: c_int = 0; +pub const DCCP_TYPE_RESPONSE: c_int = 1; +pub const DCCP_TYPE_DATA: c_int = 2; +pub const DCCP_TYPE_ACK: c_int = 3; +pub const DCCP_TYPE_DATAACK: c_int = 4; +pub const DCCP_TYPE_CLOSEREQ: c_int = 5; +pub const DCCP_TYPE_CLOSE: c_int = 6; +pub const DCCP_TYPE_RESET: c_int = 7; +pub const DCCP_TYPE_MOVE: c_int = 8; + +pub const DCCP_FEATURE_CC: c_int = 1; +pub const DCCP_FEATURE_ECN: c_int = 2; +pub const DCCP_FEATURE_ACKRATIO: c_int = 3; +pub const DCCP_FEATURE_ACKVECTOR: c_int = 4; +pub const DCCP_FEATURE_MOBILITY: c_int = 5; +pub const DCCP_FEATURE_LOSSWINDOW: c_int = 6; +pub const DCCP_FEATURE_CONN_NONCE: c_int = 8; +pub const DCCP_FEATURE_IDENTREG: c_int = 7; + +pub const DCCP_OPT_PADDING: c_int = 0; +pub const DCCP_OPT_DATA_DISCARD: c_int = 1; +pub const DCCP_OPT_SLOW_RECV: c_int = 2; +pub const DCCP_OPT_BUF_CLOSED: c_int = 3; +pub const DCCP_OPT_CHANGE_L: c_int = 32; +pub const DCCP_OPT_CONFIRM_L: c_int = 33; +pub const DCCP_OPT_CHANGE_R: c_int = 34; +pub const DCCP_OPT_CONFIRM_R: c_int = 35; +pub const DCCP_OPT_INIT_COOKIE: c_int = 36; +pub const DCCP_OPT_NDP_COUNT: c_int = 37; +pub const DCCP_OPT_ACK_VECTOR0: c_int = 38; +pub const DCCP_OPT_ACK_VECTOR1: c_int = 39; +pub const DCCP_OPT_RECV_BUF_DROPS: c_int = 40; +pub const DCCP_OPT_TIMESTAMP: c_int = 41; +pub const DCCP_OPT_TIMESTAMP_ECHO: c_int = 42; +pub const DCCP_OPT_ELAPSEDTIME: c_int = 43; +pub const DCCP_OPT_DATACHECKSUM: c_int = 44; + +pub const DCCP_REASON_UNSPEC: c_int = 0; +pub const DCCP_REASON_CLOSED: c_int = 1; +pub const DCCP_REASON_INVALID: c_int = 2; +pub const DCCP_REASON_OPTION_ERR: c_int = 3; +pub const DCCP_REASON_FEA_ERR: c_int = 4; +pub const DCCP_REASON_CONN_REF: c_int = 5; +pub const DCCP_REASON_BAD_SNAME: c_int = 6; +pub const DCCP_REASON_BAD_COOKIE: c_int = 7; +pub const DCCP_REASON_INV_MOVE: c_int = 8; +pub const DCCP_REASON_UNANSW_CH: c_int = 10; +pub const DCCP_REASON_FRUITLESS_NEG: c_int = 11; + +pub const DCCP_CCID: c_int = 1; +pub const DCCP_CSLEN: c_int = 2; +pub const DCCP_MAXSEG: c_int = 4; +pub const DCCP_SERVICE: c_int = 8; + +pub const DCCP_NDP_LIMIT: c_int = 16; +pub const DCCP_SEQ_NUM_LIMIT: c_int = 16777216; +pub const DCCP_MAX_OPTIONS: c_int = 32; +pub const DCCP_MAX_PKTS: c_int = 100; + +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_CHOWN_RESTRICTED: c_int = 7; +pub const _PC_NO_TRUNC: c_int = 8; +pub const _PC_VDISABLE: c_int = 9; +pub const _PC_SYNC_IO: c_int = 10; +pub const _PC_FILESIZEBITS: c_int = 11; +pub const _PC_SYMLINK_MAX: c_int = 12; +pub const _PC_2_SYMLINKS: c_int = 13; +pub const _PC_ACL_EXTENDED: c_int = 14; +pub const _PC_MIN_HOLE_SIZE: c_int = 15; + +pub const _SC_SYNCHRONIZED_IO: c_int = 31; +pub const _SC_IOV_MAX: c_int = 32; +pub const _SC_MAPPED_FILES: c_int = 33; +pub const _SC_MEMLOCK: c_int = 34; +pub const _SC_MEMLOCK_RANGE: c_int = 35; +pub const _SC_MEMORY_PROTECTION: c_int = 36; +pub const _SC_LOGIN_NAME_MAX: c_int = 37; +pub const _SC_MONOTONIC_CLOCK: c_int = 38; +pub const _SC_CLK_TCK: c_int = 39; +pub const _SC_ATEXIT_MAX: c_int = 40; +pub const _SC_THREADS: c_int = 41; +pub const _SC_SEMAPHORES: c_int = 42; +pub const _SC_BARRIERS: c_int = 43; +pub const _SC_TIMERS: c_int = 44; +pub const _SC_SPIN_LOCKS: c_int = 45; +pub const _SC_READER_WRITER_LOCKS: c_int = 46; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 47; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 48; +pub const _SC_CLOCK_SELECTION: c_int = 49; +pub const _SC_ASYNCHRONOUS_IO: c_int = 50; +pub const _SC_AIO_LISTIO_MAX: c_int = 51; +pub const _SC_AIO_MAX: c_int = 52; +pub const _SC_MESSAGE_PASSING: c_int = 53; +pub const _SC_MQ_OPEN_MAX: c_int = 54; +pub const _SC_MQ_PRIO_MAX: c_int = 55; +pub const _SC_PRIORITY_SCHEDULING: c_int = 56; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 57; +pub const _SC_THREAD_KEYS_MAX: c_int = 58; +pub const _SC_THREAD_STACK_MIN: c_int = 59; +pub const _SC_THREAD_THREADS_MAX: c_int = 60; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 61; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 62; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 63; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 64; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 65; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 66; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 67; +pub const _SC_TTY_NAME_MAX: c_int = 68; +pub const _SC_HOST_NAME_MAX: c_int = 69; +pub const _SC_PASS_MAX: c_int = 70; +pub const _SC_REGEXP: c_int = 71; +pub const _SC_SHELL: c_int = 72; +pub const _SC_SYMLOOP_MAX: c_int = 73; +pub const _SC_V6_ILP32_OFF32: c_int = 74; +pub const _SC_V6_ILP32_OFFBIG: c_int = 75; +pub const _SC_V6_LP64_OFF64: c_int = 76; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 77; +pub const _SC_2_PBS: c_int = 80; +pub const _SC_2_PBS_ACCOUNTING: c_int = 81; +pub const _SC_2_PBS_CHECKPOINT: c_int = 82; +pub const _SC_2_PBS_LOCATE: c_int = 83; +pub const _SC_2_PBS_MESSAGE: c_int = 84; +pub const _SC_2_PBS_TRACK: c_int = 85; +pub const _SC_SPAWN: c_int = 86; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 87; +pub const _SC_TIMER_MAX: c_int = 88; +pub const _SC_SEM_NSEMS_MAX: c_int = 89; +pub const _SC_CPUTIME: c_int = 90; +pub const _SC_THREAD_CPUTIME: c_int = 91; +pub const _SC_DELAYTIMER_MAX: c_int = 92; // These two variables will be supported in NetBSD 8.0 -// pub const _SC_SIGQUEUE_MAX : ::c_int = 93; -// pub const _SC_REALTIME_SIGNALS : ::c_int = 94; -pub const _SC_PHYS_PAGES: ::c_int = 121; -pub const _SC_NPROCESSORS_CONF: ::c_int = 1001; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 1002; -pub const _SC_SCHED_RT_TS: ::c_int = 2001; -pub const _SC_SCHED_PRI_MIN: ::c_int = 2002; -pub const _SC_SCHED_PRI_MAX: ::c_int = 2003; +// pub const _SC_SIGQUEUE_MAX : c_int = 93; +// pub const _SC_REALTIME_SIGNALS : c_int = 94; +pub const _SC_PHYS_PAGES: c_int = 121; +pub const _SC_NPROCESSORS_CONF: c_int = 1001; +pub const _SC_NPROCESSORS_ONLN: c_int = 1002; +pub const _SC_SCHED_RT_TS: c_int = 2001; +pub const _SC_SCHED_PRI_MIN: c_int = 2002; +pub const _SC_SCHED_PRI_MAX: c_int = 2003; -pub const FD_SETSIZE: ::c_int = 0x100; +pub const FD_SETSIZE: c_int = 0x100; -pub const ST_NOSUID: ::c_ulong = 8; +pub const ST_NOSUID: c_ulong = 8; -pub const BIOCGRSIG: ::c_ulong = 0x40044272; -pub const BIOCSRSIG: ::c_ulong = 0x80044273; -pub const BIOCSDLT: ::c_ulong = 0x80044278; -pub const BIOCGSEESENT: ::c_ulong = 0x40044276; -pub const BIOCSSEESENT: ::c_ulong = 0x80044277; +pub const BIOCGRSIG: c_ulong = 0x40044272; +pub const BIOCSRSIG: c_ulong = 0x80044273; +pub const BIOCSDLT: c_ulong = 0x80044278; +pub const BIOCGSEESENT: c_ulong = 0x40044276; +pub const BIOCSSEESENT: c_ulong = 0x80044277; // -pub const MNT_UNION: ::c_int = 0x00000020; -pub const MNT_NOCOREDUMP: ::c_int = 0x00008000; -pub const MNT_RELATIME: ::c_int = 0x00020000; -pub const MNT_IGNORE: ::c_int = 0x00100000; -pub const MNT_NFS4ACLS: ::c_int = 0x00200000; -pub const MNT_DISCARD: ::c_int = 0x00800000; -pub const MNT_EXTATTR: ::c_int = 0x01000000; -pub const MNT_LOG: ::c_int = 0x02000000; -pub const MNT_NOATIME: ::c_int = 0x04000000; -pub const MNT_AUTOMOUNTED: ::c_int = 0x10000000; -pub const MNT_SYMPERM: ::c_int = 0x20000000; -pub const MNT_NODEVMTIME: ::c_int = 0x40000000; -pub const MNT_SOFTDEP: ::c_int = 0x80000000; -pub const MNT_POSIX1EACLS: ::c_int = 0x00000800; -pub const MNT_ACLS: ::c_int = MNT_POSIX1EACLS; -pub const MNT_WAIT: ::c_int = 1; -pub const MNT_NOWAIT: ::c_int = 2; -pub const MNT_LAZY: ::c_int = 3; +pub const MNT_UNION: c_int = 0x00000020; +pub const MNT_NOCOREDUMP: c_int = 0x00008000; +pub const MNT_RELATIME: c_int = 0x00020000; +pub const MNT_IGNORE: c_int = 0x00100000; +pub const MNT_NFS4ACLS: c_int = 0x00200000; +pub const MNT_DISCARD: c_int = 0x00800000; +pub const MNT_EXTATTR: c_int = 0x01000000; +pub const MNT_LOG: c_int = 0x02000000; +pub const MNT_NOATIME: c_int = 0x04000000; +pub const MNT_AUTOMOUNTED: c_int = 0x10000000; +pub const MNT_SYMPERM: c_int = 0x20000000; +pub const MNT_NODEVMTIME: c_int = 0x40000000; +pub const MNT_SOFTDEP: c_int = 0x80000000; +pub const MNT_POSIX1EACLS: c_int = 0x00000800; +pub const MNT_ACLS: c_int = MNT_POSIX1EACLS; +pub const MNT_WAIT: c_int = 1; +pub const MNT_NOWAIT: c_int = 2; +pub const MNT_LAZY: c_int = 3; // -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4; -pub const NTP_API: ::c_int = 4; -pub const MAXPHASE: ::c_long = 500000000; -pub const MAXFREQ: ::c_long = 500000; -pub const MINSEC: ::c_int = 256; -pub const MAXSEC: ::c_int = 2048; -pub const NANOSECOND: ::c_long = 1000000000; -pub const SCALE_PPM: ::c_int = 65; -pub const MAXTC: ::c_int = 10; -pub const MOD_OFFSET: ::c_uint = 0x0001; -pub const MOD_FREQUENCY: ::c_uint = 0x0002; -pub const MOD_MAXERROR: ::c_uint = 0x0004; -pub const MOD_ESTERROR: ::c_uint = 0x0008; -pub const MOD_STATUS: ::c_uint = 0x0010; -pub const MOD_TIMECONST: ::c_uint = 0x0020; -pub const MOD_PPSMAX: ::c_uint = 0x0040; -pub const MOD_TAI: ::c_uint = 0x0080; -pub const MOD_MICRO: ::c_uint = 0x1000; -pub const MOD_NANO: ::c_uint = 0x2000; -pub const MOD_CLKB: ::c_uint = 0x4000; -pub const MOD_CLKA: ::c_uint = 0x8000; -pub const STA_PLL: ::c_int = 0x0001; -pub const STA_PPSFREQ: ::c_int = 0x0002; -pub const STA_PPSTIME: ::c_int = 0x0004; -pub const STA_FLL: ::c_int = 0x0008; -pub const STA_INS: ::c_int = 0x0010; -pub const STA_DEL: ::c_int = 0x0020; -pub const STA_UNSYNC: ::c_int = 0x0040; -pub const STA_FREQHOLD: ::c_int = 0x0080; -pub const STA_PPSSIGNAL: ::c_int = 0x0100; -pub const STA_PPSJITTER: ::c_int = 0x0200; -pub const STA_PPSWANDER: ::c_int = 0x0400; -pub const STA_PPSERROR: ::c_int = 0x0800; -pub const STA_CLOCKERR: ::c_int = 0x1000; -pub const STA_NANO: ::c_int = 0x2000; -pub const STA_MODE: ::c_int = 0x4000; -pub const STA_CLK: ::c_int = 0x8000; -pub const STA_RONLY: ::c_int = STA_PPSSIGNAL +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 4; +pub const NTP_API: c_int = 4; +pub const MAXPHASE: c_long = 500000000; +pub const MAXFREQ: c_long = 500000; +pub const MINSEC: c_int = 256; +pub const MAXSEC: c_int = 2048; +pub const NANOSECOND: c_long = 1000000000; +pub const SCALE_PPM: c_int = 65; +pub const MAXTC: c_int = 10; +pub const MOD_OFFSET: c_uint = 0x0001; +pub const MOD_FREQUENCY: c_uint = 0x0002; +pub const MOD_MAXERROR: c_uint = 0x0004; +pub const MOD_ESTERROR: c_uint = 0x0008; +pub const MOD_STATUS: c_uint = 0x0010; +pub const MOD_TIMECONST: c_uint = 0x0020; +pub const MOD_PPSMAX: c_uint = 0x0040; +pub const MOD_TAI: c_uint = 0x0080; +pub const MOD_MICRO: c_uint = 0x1000; +pub const MOD_NANO: c_uint = 0x2000; +pub const MOD_CLKB: c_uint = 0x4000; +pub const MOD_CLKA: c_uint = 0x8000; +pub const STA_PLL: c_int = 0x0001; +pub const STA_PPSFREQ: c_int = 0x0002; +pub const STA_PPSTIME: c_int = 0x0004; +pub const STA_FLL: c_int = 0x0008; +pub const STA_INS: c_int = 0x0010; +pub const STA_DEL: c_int = 0x0020; +pub const STA_UNSYNC: c_int = 0x0040; +pub const STA_FREQHOLD: c_int = 0x0080; +pub const STA_PPSSIGNAL: c_int = 0x0100; +pub const STA_PPSJITTER: c_int = 0x0200; +pub const STA_PPSWANDER: c_int = 0x0400; +pub const STA_PPSERROR: c_int = 0x0800; +pub const STA_CLOCKERR: c_int = 0x1000; +pub const STA_NANO: c_int = 0x2000; +pub const STA_MODE: c_int = 0x4000; +pub const STA_CLK: c_int = 0x8000; +pub const STA_RONLY: c_int = STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR @@ -1915,19 +1920,19 @@ pub const STA_RONLY: ::c_int = STA_PPSSIGNAL | STA_NANO | STA_MODE | STA_CLK; -pub const TIME_OK: ::c_int = 0; -pub const TIME_INS: ::c_int = 1; -pub const TIME_DEL: ::c_int = 2; -pub const TIME_OOP: ::c_int = 3; -pub const TIME_WAIT: ::c_int = 4; -pub const TIME_ERROR: ::c_int = 5; +pub const TIME_OK: c_int = 0; +pub const TIME_INS: c_int = 1; +pub const TIME_DEL: c_int = 2; +pub const TIME_OOP: c_int = 3; +pub const TIME_WAIT: c_int = 4; +pub const TIME_ERROR: c_int = 5; -pub const LITTLE_ENDIAN: ::c_int = 1234; -pub const BIG_ENDIAN: ::c_int = 4321; +pub const LITTLE_ENDIAN: c_int = 1234; +pub const BIG_ENDIAN: c_int = 4321; -pub const PL_EVENT_NONE: ::c_int = 0; -pub const PL_EVENT_SIGNAL: ::c_int = 1; -pub const PL_EVENT_SUSPENDED: ::c_int = 2; +pub const PL_EVENT_NONE: c_int = 0; +pub const PL_EVENT_SIGNAL: c_int = 1; +pub const PL_EVENT_SUSPENDED: c_int = 2; cfg_if! { if #[cfg(any( @@ -1979,15 +1984,15 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { ptr_owner: 0, ptr_private: 0 as *mut _, }; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -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 PTHREAD_MUTEX_NORMAL: c_int = 0; +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 SCHED_NONE: ::c_int = -1; -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; +pub const SCHED_NONE: c_int = -1; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; pub const EVFILT_AIO: u32 = 2; pub const EVFILT_PROC: u32 = 4; @@ -2042,215 +2047,215 @@ pub const NOTE_USECONDS: u32 = 0x00000002; pub const NOTE_NSECONDS: u32 = 0x00000003; pub const NOTE_ABSTIME: u32 = 0x000000010; -pub const TMP_MAX: ::c_uint = 308915776; - -pub const AI_PASSIVE: ::c_int = 0x00000001; -pub const AI_CANONNAME: ::c_int = 0x00000002; -pub const AI_NUMERICHOST: ::c_int = 0x00000004; -pub const AI_NUMERICSERV: ::c_int = 0x00000008; -pub const AI_ADDRCONFIG: ::c_int = 0x00000400; -pub const AI_SRV: ::c_int = 0x00000800; - -pub const NI_MAXHOST: ::socklen_t = 1025; -pub const NI_MAXSERV: ::socklen_t = 32; - -pub const NI_NOFQDN: ::c_int = 0x00000001; -pub const NI_NUMERICHOST: ::c_int = 0x000000002; -pub const NI_NAMEREQD: ::c_int = 0x000000004; -pub const NI_NUMERICSERV: ::c_int = 0x000000008; -pub const NI_DGRAM: ::c_int = 0x00000010; -pub const NI_WITHSCOPEID: ::c_int = 0x00000020; -pub const NI_NUMERICSCOPE: ::c_int = 0x00000040; - -pub const RTLD_NOLOAD: ::c_int = 0x2000; -pub const RTLD_LOCAL: ::c_int = 0x200; - -pub const CTL_MAXNAME: ::c_int = 12; -pub const SYSCTL_NAMELEN: ::c_int = 32; -pub const SYSCTL_DEFSIZE: ::c_int = 8; -pub const CTLTYPE_NODE: ::c_int = 1; -pub const CTLTYPE_INT: ::c_int = 2; -pub const CTLTYPE_STRING: ::c_int = 3; -pub const CTLTYPE_QUAD: ::c_int = 4; -pub const CTLTYPE_STRUCT: ::c_int = 5; -pub const CTLTYPE_BOOL: ::c_int = 6; -pub const CTLFLAG_READONLY: ::c_int = 0x00000000; -pub const CTLFLAG_READWRITE: ::c_int = 0x00000070; -pub const CTLFLAG_ANYWRITE: ::c_int = 0x00000080; -pub const CTLFLAG_PRIVATE: ::c_int = 0x00000100; -pub const CTLFLAG_PERMANENT: ::c_int = 0x00000200; -pub const CTLFLAG_OWNDATA: ::c_int = 0x00000400; -pub const CTLFLAG_IMMEDIATE: ::c_int = 0x00000800; -pub const CTLFLAG_HEX: ::c_int = 0x00001000; -pub const CTLFLAG_ROOT: ::c_int = 0x00002000; -pub const CTLFLAG_ANYNUMBER: ::c_int = 0x00004000; -pub const CTLFLAG_HIDDEN: ::c_int = 0x00008000; -pub const CTLFLAG_ALIAS: ::c_int = 0x00010000; -pub const CTLFLAG_MMAP: ::c_int = 0x00020000; -pub const CTLFLAG_OWNDESC: ::c_int = 0x00040000; -pub const CTLFLAG_UNSIGNED: ::c_int = 0x00080000; -pub const SYSCTL_VERS_MASK: ::c_int = 0xff000000; -pub const SYSCTL_VERS_0: ::c_int = 0x00000000; -pub const SYSCTL_VERS_1: ::c_int = 0x01000000; -pub const SYSCTL_VERSION: ::c_int = SYSCTL_VERS_1; -pub const CTL_EOL: ::c_int = -1; -pub const CTL_QUERY: ::c_int = -2; -pub const CTL_CREATE: ::c_int = -3; -pub const CTL_CREATESYM: ::c_int = -4; -pub const CTL_DESTROY: ::c_int = -5; -pub const CTL_MMAP: ::c_int = -6; -pub const CTL_DESCRIBE: ::c_int = -7; -pub const CTL_UNSPEC: ::c_int = 0; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_VFS: ::c_int = 3; -pub const CTL_NET: ::c_int = 4; -pub const CTL_DEBUG: ::c_int = 5; -pub const CTL_HW: ::c_int = 6; -pub const CTL_MACHDEP: ::c_int = 7; -pub const CTL_USER: ::c_int = 8; -pub const CTL_DDB: ::c_int = 9; -pub const CTL_PROC: ::c_int = 10; -pub const CTL_VENDOR: ::c_int = 11; -pub const CTL_EMUL: ::c_int = 12; -pub const CTL_SECURITY: ::c_int = 13; -pub const CTL_MAXID: ::c_int = 14; -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_MAXVNODES: ::c_int = 5; -pub const KERN_MAXPROC: ::c_int = 6; -pub const KERN_MAXFILES: ::c_int = 7; -pub const KERN_ARGMAX: ::c_int = 8; -pub const KERN_SECURELVL: ::c_int = 9; -pub const KERN_HOSTNAME: ::c_int = 10; -pub const KERN_HOSTID: ::c_int = 11; -pub const KERN_CLOCKRATE: ::c_int = 12; -pub const KERN_VNODE: ::c_int = 13; -pub const KERN_PROC: ::c_int = 14; -pub const KERN_FILE: ::c_int = 15; -pub const KERN_PROF: ::c_int = 16; -pub const KERN_POSIX1: ::c_int = 17; -pub const KERN_NGROUPS: ::c_int = 18; -pub const KERN_JOB_CONTROL: ::c_int = 19; -pub const KERN_SAVED_IDS: ::c_int = 20; -pub const KERN_OBOOTTIME: ::c_int = 21; -pub const KERN_DOMAINNAME: ::c_int = 22; -pub const KERN_MAXPARTITIONS: ::c_int = 23; -pub const KERN_RAWPARTITION: ::c_int = 24; -pub const KERN_NTPTIME: ::c_int = 25; -pub const KERN_TIMEX: ::c_int = 26; -pub const KERN_AUTONICETIME: ::c_int = 27; -pub const KERN_AUTONICEVAL: ::c_int = 28; -pub const KERN_RTC_OFFSET: ::c_int = 29; -pub const KERN_ROOT_DEVICE: ::c_int = 30; -pub const KERN_MSGBUFSIZE: ::c_int = 31; -pub const KERN_FSYNC: ::c_int = 32; -pub const KERN_OLDSYSVMSG: ::c_int = 33; -pub const KERN_OLDSYSVSEM: ::c_int = 34; -pub const KERN_OLDSYSVSHM: ::c_int = 35; -pub const KERN_OLDSHORTCORENAME: ::c_int = 36; -pub const KERN_SYNCHRONIZED_IO: ::c_int = 37; -pub const KERN_IOV_MAX: ::c_int = 38; -pub const KERN_MBUF: ::c_int = 39; -pub const KERN_MAPPED_FILES: ::c_int = 40; -pub const KERN_MEMLOCK: ::c_int = 41; -pub const KERN_MEMLOCK_RANGE: ::c_int = 42; -pub const KERN_MEMORY_PROTECTION: ::c_int = 43; -pub const KERN_LOGIN_NAME_MAX: ::c_int = 44; -pub const KERN_DEFCORENAME: ::c_int = 45; -pub const KERN_LOGSIGEXIT: ::c_int = 46; -pub const KERN_PROC2: ::c_int = 47; -pub const KERN_PROC_ARGS: ::c_int = 48; -pub const KERN_FSCALE: ::c_int = 49; -pub const KERN_CCPU: ::c_int = 50; -pub const KERN_CP_TIME: ::c_int = 51; -pub const KERN_OLDSYSVIPC_INFO: ::c_int = 52; -pub const KERN_MSGBUF: ::c_int = 53; -pub const KERN_CONSDEV: ::c_int = 54; -pub const KERN_MAXPTYS: ::c_int = 55; -pub const KERN_PIPE: ::c_int = 56; -pub const KERN_MAXPHYS: ::c_int = 57; -pub const KERN_SBMAX: ::c_int = 58; -pub const KERN_TKSTAT: ::c_int = 59; -pub const KERN_MONOTONIC_CLOCK: ::c_int = 60; -pub const KERN_URND: ::c_int = 61; -pub const KERN_LABELSECTOR: ::c_int = 62; -pub const KERN_LABELOFFSET: ::c_int = 63; -pub const KERN_LWP: ::c_int = 64; -pub const KERN_FORKFSLEEP: ::c_int = 65; -pub const KERN_POSIX_THREADS: ::c_int = 66; -pub const KERN_POSIX_SEMAPHORES: ::c_int = 67; -pub const KERN_POSIX_BARRIERS: ::c_int = 68; -pub const KERN_POSIX_TIMERS: ::c_int = 69; -pub const KERN_POSIX_SPIN_LOCKS: ::c_int = 70; -pub const KERN_POSIX_READER_WRITER_LOCKS: ::c_int = 71; -pub const KERN_DUMP_ON_PANIC: ::c_int = 72; -pub const KERN_SOMAXKVA: ::c_int = 73; -pub const KERN_ROOT_PARTITION: ::c_int = 74; -pub const KERN_DRIVERS: ::c_int = 75; -pub const KERN_BUF: ::c_int = 76; -pub const KERN_FILE2: ::c_int = 77; -pub const KERN_VERIEXEC: ::c_int = 78; -pub const KERN_CP_ID: ::c_int = 79; -pub const KERN_HARDCLOCK_TICKS: ::c_int = 80; -pub const KERN_ARND: ::c_int = 81; -pub const KERN_SYSVIPC: ::c_int = 82; -pub const KERN_BOOTTIME: ::c_int = 83; -pub const KERN_EVCNT: ::c_int = 84; -pub const KERN_MAXID: ::c_int = 85; -pub const KERN_PROC_ALL: ::c_int = 0; -pub const KERN_PROC_PID: ::c_int = 1; -pub const KERN_PROC_PGRP: ::c_int = 2; -pub const KERN_PROC_SESSION: ::c_int = 3; -pub const KERN_PROC_TTY: ::c_int = 4; -pub const KERN_PROC_UID: ::c_int = 5; -pub const KERN_PROC_RUID: ::c_int = 6; -pub const KERN_PROC_GID: ::c_int = 7; -pub const KERN_PROC_RGID: ::c_int = 8; -pub const KERN_PROC_ARGV: ::c_int = 1; -pub const KERN_PROC_NARGV: ::c_int = 2; -pub const KERN_PROC_ENV: ::c_int = 3; -pub const KERN_PROC_NENV: ::c_int = 4; -pub const KERN_PROC_PATHNAME: ::c_int = 5; -pub const VM_PROC: ::c_int = 16; -pub const VM_PROC_MAP: ::c_int = 1; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const AIO_CANCELED: ::c_int = 1; -pub const AIO_NOTCANCELED: ::c_int = 2; -pub const AIO_ALLDONE: ::c_int = 3; -pub const LIO_NOP: ::c_int = 0; -pub const LIO_WRITE: ::c_int = 1; -pub const LIO_READ: ::c_int = 2; -pub const LIO_WAIT: ::c_int = 1; -pub const LIO_NOWAIT: ::c_int = 0; - -pub const SIGEV_NONE: ::c_int = 0; -pub const SIGEV_SIGNAL: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 2; - -pub const WSTOPPED: ::c_int = 0x00000002; // same as WUNTRACED -pub const WCONTINUED: ::c_int = 0x00000010; -pub const WEXITED: ::c_int = 0x000000020; -pub const WNOWAIT: ::c_int = 0x00010000; - -pub const WALTSIG: ::c_int = 0x00000004; -pub const WALLSIG: ::c_int = 0x00000008; -pub const WTRAPPED: ::c_int = 0x00000040; -pub const WNOZOMBIE: ::c_int = 0x00020000; +pub const TMP_MAX: c_uint = 308915776; + +pub const AI_PASSIVE: c_int = 0x00000001; +pub const AI_CANONNAME: c_int = 0x00000002; +pub const AI_NUMERICHOST: c_int = 0x00000004; +pub const AI_NUMERICSERV: c_int = 0x00000008; +pub const AI_ADDRCONFIG: c_int = 0x00000400; +pub const AI_SRV: c_int = 0x00000800; + +pub const NI_MAXHOST: crate::socklen_t = 1025; +pub const NI_MAXSERV: crate::socklen_t = 32; + +pub const NI_NOFQDN: c_int = 0x00000001; +pub const NI_NUMERICHOST: c_int = 0x000000002; +pub const NI_NAMEREQD: c_int = 0x000000004; +pub const NI_NUMERICSERV: c_int = 0x000000008; +pub const NI_DGRAM: c_int = 0x00000010; +pub const NI_WITHSCOPEID: c_int = 0x00000020; +pub const NI_NUMERICSCOPE: c_int = 0x00000040; + +pub const RTLD_NOLOAD: c_int = 0x2000; +pub const RTLD_LOCAL: c_int = 0x200; + +pub const CTL_MAXNAME: c_int = 12; +pub const SYSCTL_NAMELEN: c_int = 32; +pub const SYSCTL_DEFSIZE: c_int = 8; +pub const CTLTYPE_NODE: c_int = 1; +pub const CTLTYPE_INT: c_int = 2; +pub const CTLTYPE_STRING: c_int = 3; +pub const CTLTYPE_QUAD: c_int = 4; +pub const CTLTYPE_STRUCT: c_int = 5; +pub const CTLTYPE_BOOL: c_int = 6; +pub const CTLFLAG_READONLY: c_int = 0x00000000; +pub const CTLFLAG_READWRITE: c_int = 0x00000070; +pub const CTLFLAG_ANYWRITE: c_int = 0x00000080; +pub const CTLFLAG_PRIVATE: c_int = 0x00000100; +pub const CTLFLAG_PERMANENT: c_int = 0x00000200; +pub const CTLFLAG_OWNDATA: c_int = 0x00000400; +pub const CTLFLAG_IMMEDIATE: c_int = 0x00000800; +pub const CTLFLAG_HEX: c_int = 0x00001000; +pub const CTLFLAG_ROOT: c_int = 0x00002000; +pub const CTLFLAG_ANYNUMBER: c_int = 0x00004000; +pub const CTLFLAG_HIDDEN: c_int = 0x00008000; +pub const CTLFLAG_ALIAS: c_int = 0x00010000; +pub const CTLFLAG_MMAP: c_int = 0x00020000; +pub const CTLFLAG_OWNDESC: c_int = 0x00040000; +pub const CTLFLAG_UNSIGNED: c_int = 0x00080000; +pub const SYSCTL_VERS_MASK: c_int = 0xff000000; +pub const SYSCTL_VERS_0: c_int = 0x00000000; +pub const SYSCTL_VERS_1: c_int = 0x01000000; +pub const SYSCTL_VERSION: c_int = SYSCTL_VERS_1; +pub const CTL_EOL: c_int = -1; +pub const CTL_QUERY: c_int = -2; +pub const CTL_CREATE: c_int = -3; +pub const CTL_CREATESYM: c_int = -4; +pub const CTL_DESTROY: c_int = -5; +pub const CTL_MMAP: c_int = -6; +pub const CTL_DESCRIBE: c_int = -7; +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_VFS: c_int = 3; +pub const CTL_NET: c_int = 4; +pub const CTL_DEBUG: c_int = 5; +pub const CTL_HW: c_int = 6; +pub const CTL_MACHDEP: c_int = 7; +pub const CTL_USER: c_int = 8; +pub const CTL_DDB: c_int = 9; +pub const CTL_PROC: c_int = 10; +pub const CTL_VENDOR: c_int = 11; +pub const CTL_EMUL: c_int = 12; +pub const CTL_SECURITY: c_int = 13; +pub const CTL_MAXID: c_int = 14; +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_MAXVNODES: c_int = 5; +pub const KERN_MAXPROC: c_int = 6; +pub const KERN_MAXFILES: c_int = 7; +pub const KERN_ARGMAX: c_int = 8; +pub const KERN_SECURELVL: c_int = 9; +pub const KERN_HOSTNAME: c_int = 10; +pub const KERN_HOSTID: c_int = 11; +pub const KERN_CLOCKRATE: c_int = 12; +pub const KERN_VNODE: c_int = 13; +pub const KERN_PROC: c_int = 14; +pub const KERN_FILE: c_int = 15; +pub const KERN_PROF: c_int = 16; +pub const KERN_POSIX1: c_int = 17; +pub const KERN_NGROUPS: c_int = 18; +pub const KERN_JOB_CONTROL: c_int = 19; +pub const KERN_SAVED_IDS: c_int = 20; +pub const KERN_OBOOTTIME: c_int = 21; +pub const KERN_DOMAINNAME: c_int = 22; +pub const KERN_MAXPARTITIONS: c_int = 23; +pub const KERN_RAWPARTITION: c_int = 24; +pub const KERN_NTPTIME: c_int = 25; +pub const KERN_TIMEX: c_int = 26; +pub const KERN_AUTONICETIME: c_int = 27; +pub const KERN_AUTONICEVAL: c_int = 28; +pub const KERN_RTC_OFFSET: c_int = 29; +pub const KERN_ROOT_DEVICE: c_int = 30; +pub const KERN_MSGBUFSIZE: c_int = 31; +pub const KERN_FSYNC: c_int = 32; +pub const KERN_OLDSYSVMSG: c_int = 33; +pub const KERN_OLDSYSVSEM: c_int = 34; +pub const KERN_OLDSYSVSHM: c_int = 35; +pub const KERN_OLDSHORTCORENAME: c_int = 36; +pub const KERN_SYNCHRONIZED_IO: c_int = 37; +pub const KERN_IOV_MAX: c_int = 38; +pub const KERN_MBUF: c_int = 39; +pub const KERN_MAPPED_FILES: c_int = 40; +pub const KERN_MEMLOCK: c_int = 41; +pub const KERN_MEMLOCK_RANGE: c_int = 42; +pub const KERN_MEMORY_PROTECTION: c_int = 43; +pub const KERN_LOGIN_NAME_MAX: c_int = 44; +pub const KERN_DEFCORENAME: c_int = 45; +pub const KERN_LOGSIGEXIT: c_int = 46; +pub const KERN_PROC2: c_int = 47; +pub const KERN_PROC_ARGS: c_int = 48; +pub const KERN_FSCALE: c_int = 49; +pub const KERN_CCPU: c_int = 50; +pub const KERN_CP_TIME: c_int = 51; +pub const KERN_OLDSYSVIPC_INFO: c_int = 52; +pub const KERN_MSGBUF: c_int = 53; +pub const KERN_CONSDEV: c_int = 54; +pub const KERN_MAXPTYS: c_int = 55; +pub const KERN_PIPE: c_int = 56; +pub const KERN_MAXPHYS: c_int = 57; +pub const KERN_SBMAX: c_int = 58; +pub const KERN_TKSTAT: c_int = 59; +pub const KERN_MONOTONIC_CLOCK: c_int = 60; +pub const KERN_URND: c_int = 61; +pub const KERN_LABELSECTOR: c_int = 62; +pub const KERN_LABELOFFSET: c_int = 63; +pub const KERN_LWP: c_int = 64; +pub const KERN_FORKFSLEEP: c_int = 65; +pub const KERN_POSIX_THREADS: c_int = 66; +pub const KERN_POSIX_SEMAPHORES: c_int = 67; +pub const KERN_POSIX_BARRIERS: c_int = 68; +pub const KERN_POSIX_TIMERS: c_int = 69; +pub const KERN_POSIX_SPIN_LOCKS: c_int = 70; +pub const KERN_POSIX_READER_WRITER_LOCKS: c_int = 71; +pub const KERN_DUMP_ON_PANIC: c_int = 72; +pub const KERN_SOMAXKVA: c_int = 73; +pub const KERN_ROOT_PARTITION: c_int = 74; +pub const KERN_DRIVERS: c_int = 75; +pub const KERN_BUF: c_int = 76; +pub const KERN_FILE2: c_int = 77; +pub const KERN_VERIEXEC: c_int = 78; +pub const KERN_CP_ID: c_int = 79; +pub const KERN_HARDCLOCK_TICKS: c_int = 80; +pub const KERN_ARND: c_int = 81; +pub const KERN_SYSVIPC: c_int = 82; +pub const KERN_BOOTTIME: c_int = 83; +pub const KERN_EVCNT: c_int = 84; +pub const KERN_MAXID: c_int = 85; +pub const KERN_PROC_ALL: c_int = 0; +pub const KERN_PROC_PID: c_int = 1; +pub const KERN_PROC_PGRP: c_int = 2; +pub const KERN_PROC_SESSION: c_int = 3; +pub const KERN_PROC_TTY: c_int = 4; +pub const KERN_PROC_UID: c_int = 5; +pub const KERN_PROC_RUID: c_int = 6; +pub const KERN_PROC_GID: c_int = 7; +pub const KERN_PROC_RGID: c_int = 8; +pub const KERN_PROC_ARGV: c_int = 1; +pub const KERN_PROC_NARGV: c_int = 2; +pub const KERN_PROC_ENV: c_int = 3; +pub const KERN_PROC_NENV: c_int = 4; +pub const KERN_PROC_PATHNAME: c_int = 5; +pub const VM_PROC: c_int = 16; +pub const VM_PROC_MAP: c_int = 1; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NODATA: c_int = 7; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const AIO_CANCELED: c_int = 1; +pub const AIO_NOTCANCELED: c_int = 2; +pub const AIO_ALLDONE: c_int = 3; +pub const LIO_NOP: c_int = 0; +pub const LIO_WRITE: c_int = 1; +pub const LIO_READ: c_int = 2; +pub const LIO_WAIT: c_int = 1; +pub const LIO_NOWAIT: c_int = 0; + +pub const SIGEV_NONE: c_int = 0; +pub const SIGEV_SIGNAL: c_int = 1; +pub const SIGEV_THREAD: c_int = 2; + +pub const WSTOPPED: c_int = 0x00000002; // same as WUNTRACED +pub const WCONTINUED: c_int = 0x00000010; +pub const WEXITED: c_int = 0x000000020; +pub const WNOWAIT: c_int = 0x00010000; + +pub const WALTSIG: c_int = 0x00000004; +pub const WALLSIG: c_int = 0x00000008; +pub const WTRAPPED: c_int = 0x00000040; +pub const WNOZOMBIE: c_int = 0x00020000; pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; @@ -2259,18 +2264,18 @@ pub const P_PGID: idtype_t = 4; pub const UTIME_OMIT: c_long = 1073741822; pub const UTIME_NOW: c_long = 1073741823; -pub const B460800: ::speed_t = 460800; -pub const B921600: ::speed_t = 921600; +pub const B460800: crate::speed_t = 460800; +pub const B921600: crate::speed_t = 921600; -pub const ONOCR: ::tcflag_t = 0x20; -pub const ONLRET: ::tcflag_t = 0x40; -pub const CDTRCTS: ::tcflag_t = 0x00020000; -pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS | ::CDTRCTS; +pub const ONOCR: crate::tcflag_t = 0x20; +pub const ONLRET: crate::tcflag_t = 0x40; +pub const CDTRCTS: crate::tcflag_t = 0x00020000; +pub const CHWFLOW: crate::tcflag_t = crate::MDMBUF | crate::CRTSCTS | crate::CDTRCTS; -// pub const _PATH_UTMPX: &[::c_char; 14] = b"/var/run/utmpx"; -// pub const _PATH_WTMPX: &[::c_char; 14] = b"/var/log/wtmpx"; -// pub const _PATH_LASTLOGX: &[::c_char; 17] = b"/var/log/lastlogx"; -// pub const _PATH_UTMP_UPDATE: &[::c_char; 24] = b"/usr/libexec/utmp_update"; +// pub const _PATH_UTMPX: &[c_char; 14] = b"/var/run/utmpx"; +// pub const _PATH_WTMPX: &[c_char; 14] = b"/var/log/wtmpx"; +// pub const _PATH_LASTLOGX: &[c_char; 17] = b"/var/log/lastlogx"; +// pub const _PATH_UTMP_UPDATE: &[c_char; 24] = b"/usr/libexec/utmp_update"; pub const UT_NAMESIZE: usize = 8; pub const UT_LINESIZE: usize = 8; pub const UT_HOSTSIZE: usize = 16; @@ -2292,140 +2297,140 @@ pub const ACCOUNTING: u16 = 9; pub const SIGNATURE: u16 = 10; pub const DOWN_TIME: u16 = 11; -pub const SOCK_CLOEXEC: ::c_int = 0x10000000; -pub const SOCK_NONBLOCK: ::c_int = 0x20000000; +pub const SOCK_CLOEXEC: c_int = 0x10000000; +pub const SOCK_NONBLOCK: c_int = 0x20000000; // Uncomment on next NetBSD release -// pub const FIOSEEKDATA: ::c_ulong = 0xc0086661; -// pub const FIOSEEKHOLE: ::c_ulong = 0xc0086662; -pub const OFIOGETBMAP: ::c_ulong = 0xc004667a; -pub const FIOGETBMAP: ::c_ulong = 0xc008667a; -pub const FIONWRITE: ::c_ulong = 0x40046679; -pub const FIONSPACE: ::c_ulong = 0x40046678; -pub const FIBMAP: ::c_ulong = 0xc008667a; - -pub const SIGSTKSZ: ::size_t = 40960; - -pub const REG_ENOSYS: ::c_int = 17; - -pub const PT_DUMPCORE: ::c_int = 12; -pub const PT_LWPINFO: ::c_int = 13; -pub const PT_SYSCALL: ::c_int = 14; -pub const PT_SYSCALLEMU: ::c_int = 15; -pub const PT_SET_EVENT_MASK: ::c_int = 16; -pub const PT_GET_EVENT_MASK: ::c_int = 17; -pub const PT_GET_PROCESS_STATE: ::c_int = 18; -pub const PT_SET_SIGINFO: ::c_int = 19; -pub const PT_GET_SIGINFO: ::c_int = 20; -pub const PT_RESUME: ::c_int = 21; -pub const PT_SUSPEND: ::c_int = 23; -pub const PT_STOP: ::c_int = 23; -pub const PT_LWPSTATUS: ::c_int = 24; -pub const PT_LWPNEXT: ::c_int = 25; -pub const PT_SET_SIGPASS: ::c_int = 26; -pub const PT_GET_SIGPASS: ::c_int = 27; -pub const PT_FIRSTMACH: ::c_int = 32; -pub const POSIX_SPAWN_RETURNERROR: ::c_short = 0x40; +// pub const FIOSEEKDATA: c_ulong = 0xc0086661; +// pub const FIOSEEKHOLE: c_ulong = 0xc0086662; +pub const OFIOGETBMAP: c_ulong = 0xc004667a; +pub const FIOGETBMAP: c_ulong = 0xc008667a; +pub const FIONWRITE: c_ulong = 0x40046679; +pub const FIONSPACE: c_ulong = 0x40046678; +pub const FIBMAP: c_ulong = 0xc008667a; + +pub const SIGSTKSZ: size_t = 40960; + +pub const REG_ENOSYS: c_int = 17; + +pub const PT_DUMPCORE: c_int = 12; +pub const PT_LWPINFO: c_int = 13; +pub const PT_SYSCALL: c_int = 14; +pub const PT_SYSCALLEMU: c_int = 15; +pub const PT_SET_EVENT_MASK: c_int = 16; +pub const PT_GET_EVENT_MASK: c_int = 17; +pub const PT_GET_PROCESS_STATE: c_int = 18; +pub const PT_SET_SIGINFO: c_int = 19; +pub const PT_GET_SIGINFO: c_int = 20; +pub const PT_RESUME: c_int = 21; +pub const PT_SUSPEND: c_int = 23; +pub const PT_STOP: c_int = 23; +pub const PT_LWPSTATUS: c_int = 24; +pub const PT_LWPNEXT: c_int = 25; +pub const PT_SET_SIGPASS: c_int = 26; +pub const PT_GET_SIGPASS: c_int = 27; +pub const PT_FIRSTMACH: c_int = 32; +pub const POSIX_SPAWN_RETURNERROR: c_short = 0x40; // Flags for chflags(2) -pub const SF_APPEND: ::c_ulong = 0x00040000; -pub const SF_ARCHIVED: ::c_ulong = 0x00010000; -pub const SF_IMMUTABLE: ::c_ulong = 0x00020000; -pub const SF_LOG: ::c_ulong = 0x00400000; -pub const SF_SETTABLE: ::c_ulong = 0xffff0000; -pub const SF_SNAPINVAL: ::c_ulong = 0x00800000; -pub const SF_SNAPSHOT: ::c_ulong = 0x00200000; -pub const UF_APPEND: ::c_ulong = 0x00000004; -pub const UF_IMMUTABLE: ::c_ulong = 0x00000002; -pub const UF_NODUMP: ::c_ulong = 0x00000001; -pub const UF_OPAQUE: ::c_ulong = 0x00000008; -pub const UF_SETTABLE: ::c_ulong = 0x0000ffff; +pub const SF_APPEND: c_ulong = 0x00040000; +pub const SF_ARCHIVED: c_ulong = 0x00010000; +pub const SF_IMMUTABLE: c_ulong = 0x00020000; +pub const SF_LOG: c_ulong = 0x00400000; +pub const SF_SETTABLE: c_ulong = 0xffff0000; +pub const SF_SNAPINVAL: c_ulong = 0x00800000; +pub const SF_SNAPSHOT: c_ulong = 0x00200000; +pub const UF_APPEND: c_ulong = 0x00000004; +pub const UF_IMMUTABLE: c_ulong = 0x00000002; +pub const UF_NODUMP: c_ulong = 0x00000001; +pub const UF_OPAQUE: c_ulong = 0x00000008; +pub const UF_SETTABLE: c_ulong = 0x0000ffff; // sys/sysctl.h -pub const KVME_PROT_READ: ::c_int = 0x00000001; -pub const KVME_PROT_WRITE: ::c_int = 0x00000002; -pub const KVME_PROT_EXEC: ::c_int = 0x00000004; - -pub const KVME_FLAG_COW: ::c_int = 0x00000001; -pub const KVME_FLAG_NEEDS_COPY: ::c_int = 0x00000002; -pub const KVME_FLAG_NOCOREDUMP: ::c_int = 0x000000004; -pub const KVME_FLAG_PAGEABLE: ::c_int = 0x000000008; -pub const KVME_FLAG_GROWS_UP: ::c_int = 0x000000010; -pub const KVME_FLAG_GROWS_DOWN: ::c_int = 0x000000020; - -pub const NGROUPS_MAX: ::c_int = 16; - -pub const KI_NGROUPS: ::c_int = 16; -pub const KI_MAXCOMLEN: ::c_int = 24; -pub const KI_WMESGLEN: ::c_int = 8; -pub const KI_MAXLOGNAME: ::c_int = 24; -pub const KI_MAXEMULLEN: ::c_int = 16; -pub const KI_LNAMELEN: ::c_int = 20; +pub const KVME_PROT_READ: c_int = 0x00000001; +pub const KVME_PROT_WRITE: c_int = 0x00000002; +pub const KVME_PROT_EXEC: c_int = 0x00000004; + +pub const KVME_FLAG_COW: c_int = 0x00000001; +pub const KVME_FLAG_NEEDS_COPY: c_int = 0x00000002; +pub const KVME_FLAG_NOCOREDUMP: c_int = 0x000000004; +pub const KVME_FLAG_PAGEABLE: c_int = 0x000000008; +pub const KVME_FLAG_GROWS_UP: c_int = 0x000000010; +pub const KVME_FLAG_GROWS_DOWN: c_int = 0x000000020; + +pub const NGROUPS_MAX: c_int = 16; + +pub const KI_NGROUPS: c_int = 16; +pub const KI_MAXCOMLEN: c_int = 24; +pub const KI_WMESGLEN: c_int = 8; +pub const KI_MAXLOGNAME: c_int = 24; +pub const KI_MAXEMULLEN: c_int = 16; +pub const KI_LNAMELEN: c_int = 20; // sys/lwp.h -pub const LSIDL: ::c_int = 1; -pub const LSRUN: ::c_int = 2; -pub const LSSLEEP: ::c_int = 3; -pub const LSSTOP: ::c_int = 4; -pub const LSZOMB: ::c_int = 5; -pub const LSONPROC: ::c_int = 7; -pub const LSSUSPENDED: ::c_int = 8; +pub const LSIDL: c_int = 1; +pub const LSRUN: c_int = 2; +pub const LSSLEEP: c_int = 3; +pub const LSSTOP: c_int = 4; +pub const LSZOMB: c_int = 5; +pub const LSONPROC: c_int = 7; +pub const LSSUSPENDED: c_int = 8; // sys/xattr.h -pub const XATTR_CREATE: ::c_int = 0x01; -pub const XATTR_REPLACE: ::c_int = 0x02; +pub const XATTR_CREATE: c_int = 0x01; +pub const XATTR_REPLACE: c_int = 0x02; // sys/extattr.h -pub const EXTATTR_NAMESPACE_EMPTY: ::c_int = 0; +pub const EXTATTR_NAMESPACE_EMPTY: c_int = 0; // For getrandom() -pub const GRND_NONBLOCK: ::c_uint = 0x1; -pub const GRND_RANDOM: ::c_uint = 0x2; -pub const GRND_INSECURE: ::c_uint = 0x4; +pub const GRND_NONBLOCK: c_uint = 0x1; +pub const GRND_RANDOM: c_uint = 0x2; +pub const GRND_INSECURE: c_uint = 0x4; // sys/reboot.h -pub const RB_ASKNAME: ::c_int = 0x000000001; -pub const RB_SINGLE: ::c_int = 0x000000002; -pub const RB_NOSYNC: ::c_int = 0x000000004; -pub const RB_HALT: ::c_int = 0x000000008; -pub const RB_INITNAME: ::c_int = 0x000000010; -pub const RB_KDB: ::c_int = 0x000000040; -pub const RB_RDONLY: ::c_int = 0x000000080; -pub const RB_DUMP: ::c_int = 0x000000100; -pub const RB_MINIROOT: ::c_int = 0x000000200; -pub const RB_STRING: ::c_int = 0x000000400; -pub const RB_POWERDOWN: ::c_int = RB_HALT | 0x000000800; -pub const RB_USERCONF: ::c_int = 0x000001000; - -pub const fn MAP_ALIGNED(alignment: ::c_int) -> ::c_int { +pub const RB_ASKNAME: c_int = 0x000000001; +pub const RB_SINGLE: c_int = 0x000000002; +pub const RB_NOSYNC: c_int = 0x000000004; +pub const RB_HALT: c_int = 0x000000008; +pub const RB_INITNAME: c_int = 0x000000010; +pub const RB_KDB: c_int = 0x000000040; +pub const RB_RDONLY: c_int = 0x000000080; +pub const RB_DUMP: c_int = 0x000000100; +pub const RB_MINIROOT: c_int = 0x000000200; +pub const RB_STRING: c_int = 0x000000400; +pub const RB_POWERDOWN: c_int = RB_HALT | 0x000000800; +pub const RB_USERCONF: c_int = 0x000001000; + +pub const fn MAP_ALIGNED(alignment: c_int) -> c_int { alignment << MAP_ALIGNMENT_SHIFT } // net/route.h -pub const RTF_MASK: ::c_int = 0x80; -pub const RTF_CONNECTED: ::c_int = 0x100; -pub const RTF_ANNOUNCE: ::c_int = 0x20000; -pub const RTF_SRC: ::c_int = 0x10000; -pub const RTF_LOCAL: ::c_int = 0x40000; -pub const RTF_BROADCAST: ::c_int = 0x80000; -pub const RTF_UPDATING: ::c_int = 0x100000; -pub const RTF_DONTCHANGEIFA: ::c_int = 0x200000; - -pub const RTM_VERSION: ::c_int = 4; -pub const RTM_LOCK: ::c_int = 0x8; -pub const RTM_IFANNOUNCE: ::c_int = 0x10; -pub const RTM_IEEE80211: ::c_int = 0x11; -pub const RTM_SETGATE: ::c_int = 0x12; -pub const RTM_LLINFO_UPD: ::c_int = 0x13; -pub const RTM_IFINFO: ::c_int = 0x14; -pub const RTM_OCHGADDR: ::c_int = 0x15; -pub const RTM_NEWADDR: ::c_int = 0x16; -pub const RTM_DELADDR: ::c_int = 0x17; -pub const RTM_CHGADDR: ::c_int = 0x18; - -pub const RTA_TAG: ::c_int = 0x100; - -pub const RTAX_TAG: ::c_int = 8; -pub const RTAX_MAX: ::c_int = 9; +pub const RTF_MASK: c_int = 0x80; +pub const RTF_CONNECTED: c_int = 0x100; +pub const RTF_ANNOUNCE: c_int = 0x20000; +pub const RTF_SRC: c_int = 0x10000; +pub const RTF_LOCAL: c_int = 0x40000; +pub const RTF_BROADCAST: c_int = 0x80000; +pub const RTF_UPDATING: c_int = 0x100000; +pub const RTF_DONTCHANGEIFA: c_int = 0x200000; + +pub const RTM_VERSION: c_int = 4; +pub const RTM_LOCK: c_int = 0x8; +pub const RTM_IFANNOUNCE: c_int = 0x10; +pub const RTM_IEEE80211: c_int = 0x11; +pub const RTM_SETGATE: c_int = 0x12; +pub const RTM_LLINFO_UPD: c_int = 0x13; +pub const RTM_IFINFO: c_int = 0x14; +pub const RTM_OCHGADDR: c_int = 0x15; +pub const RTM_NEWADDR: c_int = 0x16; +pub const RTM_DELADDR: c_int = 0x17; +pub const RTM_CHGADDR: c_int = 0x18; + +pub const RTA_TAG: c_int = 0x100; + +pub const RTAX_TAG: c_int = 8; +pub const RTAX_MAX: c_int = 9; const_fn! { {const} fn _ALIGN(p: usize) -> usize { @@ -2434,85 +2439,85 @@ const_fn! { } f! { - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - _ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + _ALIGN(crate::mem::size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { - return ::CMSG_FIRSTHDR(mhdr); + return crate::CMSG_FIRSTHDR(mhdr); }; let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) - + _ALIGN(::mem::size_of::<::cmsghdr>()); + + _ALIGN(crate::mem::size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { - (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr + (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (_ALIGN(::mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize)) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (_ALIGN(crate::mem::size_of::()) + _ALIGN(length as usize)) as c_uint } // dirfd() is a macro on netbsd to access // the first field of the struct where dirp points to: // http://cvsweb.netbsd.org/bsdweb.cgi/src/include/dirent.h?rev=1.36 - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int { - *(dirp as *const ::c_int) + pub fn dirfd(dirp: *mut crate::DIR) -> c_int { + *(dirp as *const c_int) } pub fn SOCKCREDSIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; - ::mem::size_of::() + ::mem::size_of::<::gid_t>() * ngrps + crate::mem::size_of::() + crate::mem::size_of::() * ngrps } - pub fn PROT_MPROTECT(x: ::c_int) -> ::c_int { + pub fn PROT_MPROTECT(x: c_int) -> c_int { x << 3 } - pub fn PROT_MPROTECT_EXTRACT(x: ::c_int) -> ::c_int { + pub fn PROT_MPROTECT_EXTRACT(x: c_int) -> c_int { (x >> 3) & 0x7 } - pub fn major(dev: ::dev_t) -> ::c_int { - (((dev as u32) & 0x000fff00) >> 8) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + (((dev as u32) & 0x000fff00) >> 8) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { + pub fn minor(dev: crate::dev_t) -> c_int { let mut res = 0; res |= ((dev as u32) & 0xfff00000) >> 12; res |= (dev as u32) & 0x000000ff; - res as ::c_int + res as c_int } } safe_f! { - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0o177) == 0o177 } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= (major << 8) & 0x000ff00; dev |= (minor << 12) & 0xfff00000; @@ -2522,415 +2527,403 @@ safe_f! { } extern "C" { - pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; - pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; + pub fn ntp_adjtime(buf: *mut timex) -> c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; - pub fn reallocarr(ptr: *mut ::c_void, number: ::size_t, size: ::size_t) -> ::c_int; + pub fn reallocarr(ptr: *mut c_void, number: size_t, size: size_t) -> c_int; - 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; + 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; pub fn extattr_list_fd( - fd: ::c_int, - attrnamespace: ::c_int, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + fd: c_int, + attrnamespace: c_int, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_list_file( - path: *const ::c_char, - attrnamespace: ::c_int, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_list_link( - path: *const ::c_char, - attrnamespace: ::c_int, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; - pub fn extattr_delete_fd( - fd: ::c_int, - attrnamespace: ::c_int, - attrname: *const ::c_char, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; + pub fn extattr_delete_fd(fd: c_int, attrnamespace: c_int, attrname: *const c_char) -> c_int; pub fn extattr_delete_file( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + ) -> c_int; pub fn extattr_delete_link( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + ) -> c_int; pub fn extattr_get_fd( - fd: ::c_int, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + fd: c_int, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_get_file( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; pub fn extattr_get_link( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *mut ::c_void, - nbytes: ::size_t, - ) -> ::ssize_t; - pub fn extattr_namespace_to_string( - attrnamespace: ::c_int, - string: *mut *mut ::c_char, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *mut c_void, + nbytes: size_t, + ) -> ssize_t; + pub fn extattr_namespace_to_string(attrnamespace: c_int, string: *mut *mut c_char) -> c_int; pub fn extattr_set_fd( - fd: ::c_int, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *const ::c_void, - nbytes: ::size_t, - ) -> ::c_int; + fd: c_int, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> c_int; pub fn extattr_set_file( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *const ::c_void, - nbytes: ::size_t, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> c_int; pub fn extattr_set_link( - path: *const ::c_char, - attrnamespace: ::c_int, - attrname: *const ::c_char, - data: *const ::c_void, - nbytes: ::size_t, - ) -> ::c_int; - pub fn extattr_string_to_namespace( - string: *const ::c_char, - attrnamespace: *mut ::c_int, - ) -> ::c_int; + path: *const c_char, + attrnamespace: c_int, + attrname: *const c_char, + data: *const c_void, + nbytes: size_t, + ) -> c_int; + pub fn extattr_string_to_namespace(string: *const c_char, attrnamespace: *mut c_int) -> c_int; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, - termp: *mut ::termios, - winp: *mut ::winsize, - ) -> ::c_int; + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, + termp: *mut crate::termios, + winp: *mut crate::winsize, + ) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, - termp: *mut ::termios, - winp: *mut ::winsize, - ) -> ::pid_t; + amaster: *mut c_int, + name: *mut c_char, + termp: *mut crate::termios, + winp: *mut crate::winsize, + ) -> crate::pid_t; #[link_name = "__lutimes50"] - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; #[link_name = "__gettimeofday50"] - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; pub fn sysctl( - name: *const ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *const c_int, + namelen: c_uint, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *const c_void, + newlen: size_t, + ) -> c_int; pub fn sysctlbyname( - name: *const ::c_char, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *const ::c_void, - newlen: ::size_t, - ) -> ::c_int; - pub fn sysctlnametomib( - sname: *const ::c_char, - name: *mut ::c_int, - namelenp: *mut ::size_t, - ) -> ::c_int; + name: *const c_char, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *const c_void, + newlen: size_t, + ) -> c_int; + pub fn sysctlnametomib(sname: *const c_char, name: *mut c_int, namelenp: *mut size_t) -> c_int; #[link_name = "__kevent50"] pub fn kevent( - kq: ::c_int, - changelist: *const ::kevent, - nchanges: ::size_t, - eventlist: *mut ::kevent, - nevents: ::size_t, - timeout: *const ::timespec, - ) -> ::c_int; + kq: c_int, + changelist: *const crate::kevent, + nchanges: size_t, + eventlist: *mut crate::kevent, + nevents: size_t, + timeout: *const crate::timespec, + ) -> c_int; #[link_name = "__mount50"] pub fn mount( - src: *const ::c_char, - target: *const ::c_char, - flags: ::c_int, - data: *mut ::c_void, - size: ::size_t, - ) -> ::c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_notify(mqd: ::mqd_t, notification: *const ::sigevent) -> ::c_int; + src: *const c_char, + target: *const c_char, + flags: c_int, + data: *mut c_void, + size: size_t, + ) -> c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; + pub fn mq_notify(mqd: crate::mqd_t, notification: *const crate::sigevent) -> c_int; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; + pub fn mq_setattr( + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; #[link_name = "__mq_timedreceive50"] pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; #[link_name = "__mq_timedsend50"] pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; - pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: *mut ::c_void, data: ::c_int) -> ::c_int; - pub fn utrace(label: *const ::c_char, addr: *mut ::c_void, len: ::size_t) -> ::c_int; - pub fn pthread_getname_np(t: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; + pub fn ptrace(request: c_int, pid: crate::pid_t, addr: *mut c_void, data: c_int) -> c_int; + pub fn utrace(label: *const c_char, addr: *mut c_void, len: size_t) -> c_int; + pub fn pthread_getname_np(t: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; pub fn pthread_setname_np( - t: ::pthread_t, - name: *const ::c_char, - arg: *const ::c_void, - ) -> ::c_int; - pub fn pthread_attr_get_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_getattr_np(native: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + t: crate::pthread_t, + name: *const c_char, + arg: *const c_void, + ) -> c_int; + pub fn pthread_attr_get_np(thread: crate::pthread_t, attr: *mut crate::pthread_attr_t) + -> c_int; + pub fn pthread_getattr_np(native: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; pub fn pthread_getaffinity_np( - thread: ::pthread_t, - size: ::size_t, + thread: crate::pthread_t, + size: size_t, set: *mut cpuset_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_setaffinity_np( - thread: ::pthread_t, - size: ::size_t, + thread: crate::pthread_t, + size: size_t, set: *mut cpuset_t, - ) -> ::c_int; + ) -> c_int; pub fn _cpuset_create() -> *mut cpuset_t; pub fn _cpuset_destroy(set: *mut cpuset_t); - pub fn _cpuset_clr(cpu: cpuid_t, set: *mut cpuset_t) -> ::c_int; - pub fn _cpuset_set(cpu: cpuid_t, set: *mut cpuset_t) -> ::c_int; - pub fn _cpuset_isset(cpu: cpuid_t, set: *const cpuset_t) -> ::c_int; - pub fn _cpuset_size(set: *const cpuset_t) -> ::size_t; + pub fn _cpuset_clr(cpu: cpuid_t, set: *mut cpuset_t) -> c_int; + pub fn _cpuset_set(cpu: cpuid_t, set: *mut cpuset_t) -> c_int; + pub fn _cpuset_isset(cpu: cpuid_t, set: *const cpuset_t) -> c_int; + pub fn _cpuset_size(set: *const cpuset_t) -> size_t; pub fn _cpuset_zero(set: *mut cpuset_t); #[link_name = "__sigtimedwait50"] pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; - - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn localeconv_l(loc: ::locale_t) -> *mut lconv; - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; + + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn localeconv_l(loc: crate::locale_t) -> *mut lconv; + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; #[link_name = "__settimeofday50"] - pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int; + pub fn settimeofday(tv: *const crate::timeval, tz: *const c_void) -> c_int; - pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; + pub fn dup3(src: c_int, dst: c_int, flags: c_int) -> c_int; - pub fn kqueue1(flags: ::c_int) -> ::c_int; + pub fn kqueue1(flags: c_int) -> c_int; pub fn _lwp_self() -> lwpid_t; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; // link.h pub fn dl_iterate_phdr( - callback: ::Option< - unsafe extern "C" fn( - info: *mut dl_phdr_info, - size: usize, - data: *mut ::c_void, - ) -> ::c_int, + callback: Option< + unsafe extern "C" fn(info: *mut dl_phdr_info, size: usize, data: *mut c_void) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; // dlfcn.h - pub fn _dlauxinfo() -> *mut ::c_void; + pub fn _dlauxinfo() -> *mut c_void; - pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; + pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t; pub fn iconv( cd: iconv_t, - inbuf: *mut *mut ::c_char, - inbytesleft: *mut ::size_t, - outbuf: *mut *mut ::c_char, - outbytesleft: *mut ::size_t, - ) -> ::size_t; - pub fn iconv_close(cd: iconv_t) -> ::c_int; + inbuf: *mut *mut c_char, + inbytesleft: *mut size_t, + outbuf: *mut *mut c_char, + outbytesleft: *mut size_t, + ) -> size_t; + pub fn iconv_close(cd: iconv_t) -> c_int; pub fn timer_create( - clockid: ::clockid_t, - sevp: *mut ::sigevent, - timerid: *mut ::timer_t, - ) -> ::c_int; - pub fn timer_delete(timerid: ::timer_t) -> ::c_int; - pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int; - pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int; + clockid: crate::clockid_t, + sevp: *mut crate::sigevent, + timerid: *mut crate::timer_t, + ) -> c_int; + pub fn timer_delete(timerid: crate::timer_t) -> c_int; + pub fn timer_getoverrun(timerid: crate::timer_t) -> c_int; + pub fn timer_gettime(timerid: crate::timer_t, curr_value: *mut crate::itimerspec) -> c_int; pub fn timer_settime( - timerid: ::timer_t, - flags: ::c_int, - new_value: *const ::itimerspec, - old_value: *mut ::itimerspec, - ) -> ::c_int; + timerid: crate::timer_t, + flags: c_int, + new_value: *const crate::itimerspec, + old_value: *mut crate::itimerspec, + ) -> c_int; // Added in `NetBSD` 7.0 - pub fn explicit_memset(b: *mut ::c_void, c: ::c_int, len: ::size_t); - pub fn consttime_memequal(a: *const ::c_void, b: *const ::c_void, len: ::size_t) -> ::c_int; + pub fn explicit_memset(b: *mut c_void, c: c_int, len: size_t); + pub fn consttime_memequal(a: *const c_void, b: *const c_void, len: size_t) -> c_int; - pub fn setproctitle(fmt: *const ::c_char, ...); + pub fn setproctitle(fmt: *const c_char, ...); pub fn mremap( - oldp: *mut ::c_void, - oldsize: ::size_t, - newp: *mut ::c_void, - newsize: ::size_t, - flags: ::c_int, - ) -> *mut ::c_void; - - pub fn sched_rr_get_interval(pid: ::pid_t, t: *mut ::timespec) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + oldp: *mut c_void, + oldsize: size_t, + newp: *mut c_void, + newsize: size_t, + flags: c_int, + ) -> *mut c_void; + + pub fn sched_rr_get_interval(pid: crate::pid_t, t: *mut crate::timespec) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; #[link_name = "__pollts50"] pub fn pollts( - fds: *mut ::pollfd, - nfds: ::nfds_t, - ts: *const ::timespec, - sigmask: *const ::sigset_t, - ) -> ::c_int; + fds: *mut crate::pollfd, + nfds: crate::nfds_t, + ts: *const crate::timespec, + sigmask: *const crate::sigset_t, + ) -> c_int; pub fn ppoll( - fds: *mut ::pollfd, - nfds: ::nfds_t, - ts: *const ::timespec, - sigmask: *const ::sigset_t, - ) -> ::c_int; - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + fds: *mut crate::pollfd, + nfds: crate::nfds_t, + ts: *const crate::timespec, + sigmask: *const crate::sigset_t, + ) -> c_int; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; - pub fn reboot(mode: ::c_int, bootstr: *mut ::c_char) -> ::c_int; + pub fn reboot(mode: c_int, bootstr: *mut c_char) -> c_int; #[link_name = "___lwp_park60"] pub fn _lwp_park( - clock: ::clockid_t, - flags: ::c_int, - ts: *const ::timespec, - unpark: ::lwpid_t, - hint: *const ::c_void, - unparkhint: *mut ::c_void, - ) -> ::c_int; - pub fn _lwp_unpark(lwp: ::lwpid_t, hint: *const ::c_void) -> ::c_int; + clock: crate::clockid_t, + flags: c_int, + ts: *const crate::timespec, + unpark: crate::lwpid_t, + hint: *const c_void, + unparkhint: *mut c_void, + ) -> c_int; + pub fn _lwp_unpark(lwp: crate::lwpid_t, hint: *const c_void) -> c_int; pub fn _lwp_unpark_all( - targets: *const ::lwpid_t, - ntargets: ::size_t, - hint: *const ::c_void, - ) -> ::c_int; + targets: *const crate::lwpid_t, + ntargets: size_t, + hint: *const c_void, + ) -> c_int; - pub fn getmntinfo(mntbufp: *mut *mut ::statvfs, flags: ::c_int) -> ::c_int; - pub fn getvfsstat(buf: *mut statvfs, bufsize: ::size_t, flags: ::c_int) -> ::c_int; + pub fn getmntinfo(mntbufp: *mut *mut crate::statvfs, flags: c_int) -> c_int; + pub fn getvfsstat(buf: *mut statvfs, bufsize: size_t, flags: c_int) -> c_int; } #[link(name = "rt")] extern "C" { - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; #[link_name = "__aio_suspend50"] pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, + nitems: c_int, sevp: *mut sigevent, - ) -> ::c_int; + ) -> c_int; } #[link(name = "util")] extern "C" { #[cfg_attr(target_os = "netbsd", link_name = "__getpwent_r50")] pub fn getpwent_r( - pwd: *mut ::passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::passwd, - ) -> ::c_int; + pwd: *mut crate::passwd, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::passwd, + ) -> c_int; pub fn getgrent_r( - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - - pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; - - pub fn updwtmpx(file: *const ::c_char, ut: *const utmpx) -> ::c_int; - pub fn getlastlogx(fname: *const ::c_char, uid: ::uid_t, ll: *mut lastlogx) -> *mut lastlogx; - pub fn updlastlogx(fname: *const ::c_char, uid: ::uid_t, ll: *mut lastlogx) -> ::c_int; - pub fn utmpxname(file: *const ::c_char) -> ::c_int; + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + + pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_char) -> c_int; + + pub fn updwtmpx(file: *const c_char, ut: *const utmpx) -> c_int; + pub fn getlastlogx(fname: *const c_char, uid: crate::uid_t, ll: *mut lastlogx) + -> *mut lastlogx; + pub fn updlastlogx(fname: *const c_char, uid: crate::uid_t, ll: *mut lastlogx) -> c_int; + pub fn utmpxname(file: *const c_char) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; @@ -2941,175 +2934,158 @@ extern "C" { pub fn getutmp(ux: *const utmpx, u: *mut utmp); pub fn getutmpx(u: *const utmp, ux: *mut utmpx); - pub fn utpname(file: *const ::c_char) -> ::c_int; + pub fn utpname(file: *const c_char) -> c_int; pub fn setutent(); pub fn endutent(); pub fn getutent() -> *mut utmp; - pub fn efopen(p: *const ::c_char, m: *const ::c_char) -> ::FILE; - pub fn emalloc(n: ::size_t) -> *mut ::c_void; - pub fn ecalloc(n: ::size_t, c: ::size_t) -> *mut ::c_void; - pub fn erealloc(p: *mut ::c_void, n: ::size_t) -> *mut ::c_void; - pub fn ereallocarr(p: *mut ::c_void, n: ::size_t, s: ::size_t); - pub fn estrdup(s: *const ::c_char) -> *mut ::c_char; - pub fn estrndup(s: *const ::c_char, len: ::size_t) -> *mut ::c_char; - pub fn estrlcpy(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t; - pub fn estrlcat(dst: *mut ::c_char, src: *const ::c_char, len: ::size_t) -> ::size_t; + pub fn efopen(p: *const c_char, m: *const c_char) -> crate::FILE; + pub fn emalloc(n: size_t) -> *mut c_void; + pub fn ecalloc(n: size_t, c: size_t) -> *mut c_void; + pub fn erealloc(p: *mut c_void, n: size_t) -> *mut c_void; + pub fn ereallocarr(p: *mut c_void, n: size_t, s: size_t); + pub fn estrdup(s: *const c_char) -> *mut c_char; + pub fn estrndup(s: *const c_char, len: size_t) -> *mut c_char; + pub fn estrlcpy(dst: *mut c_char, src: *const c_char, len: size_t) -> size_t; + pub fn estrlcat(dst: *mut c_char, src: *const c_char, len: size_t) -> size_t; pub fn estrtoi( - nptr: *const ::c_char, - base: ::c_int, - lo: ::intmax_t, - hi: ::intmax_t, - ) -> ::intmax_t; + nptr: *const c_char, + base: c_int, + lo: crate::intmax_t, + hi: crate::intmax_t, + ) -> crate::intmax_t; pub fn estrtou( - nptr: *const ::c_char, - base: ::c_int, - lo: ::uintmax_t, - hi: ::uintmax_t, - ) -> ::uintmax_t; - pub fn easprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int; - pub fn evasprintf(string: *mut *mut ::c_char, fmt: *const ::c_char, ...) -> ::c_int; + nptr: *const c_char, + base: c_int, + lo: crate::uintmax_t, + hi: crate::uintmax_t, + ) -> crate::uintmax_t; + pub fn easprintf(string: *mut *mut c_char, fmt: *const c_char, ...) -> c_int; + pub fn evasprintf(string: *mut *mut c_char, fmt: *const c_char, ...) -> c_int; pub fn esetfunc( - cb: ::Option, - ) -> ::Option; - pub fn secure_path(path: *const ::c_char) -> ::c_int; - pub fn snprintb( - buf: *mut ::c_char, - buflen: ::size_t, - fmt: *const ::c_char, - val: u64, - ) -> ::c_int; + cb: Option, + ) -> Option; + pub fn secure_path(path: *const c_char) -> c_int; + pub fn snprintb(buf: *mut c_char, buflen: size_t, fmt: *const c_char, val: u64) -> c_int; pub fn snprintb_m( - buf: *mut ::c_char, - buflen: ::size_t, - fmt: *const ::c_char, + buf: *mut c_char, + buflen: size_t, + fmt: *const c_char, val: u64, - max: ::size_t, - ) -> ::c_int; - - pub fn getbootfile() -> *const ::c_char; - pub fn getbyteorder() -> ::c_int; - pub fn getdiskrawname( - buf: *mut ::c_char, - buflen: ::size_t, - name: *const ::c_char, - ) -> *const ::c_char; + max: size_t, + ) -> c_int; + + pub fn getbootfile() -> *const c_char; + pub fn getbyteorder() -> c_int; + pub fn getdiskrawname(buf: *mut c_char, buflen: size_t, name: *const c_char) -> *const c_char; pub fn getdiskcookedname( - buf: *mut ::c_char, - buflen: ::size_t, - name: *const ::c_char, - ) -> *const ::c_char; - pub fn getfsspecname( - buf: *mut ::c_char, - buflen: ::size_t, - spec: *const ::c_char, - ) -> *const ::c_char; + buf: *mut c_char, + buflen: size_t, + name: *const c_char, + ) -> *const c_char; + pub fn getfsspecname(buf: *mut c_char, buflen: size_t, spec: *const c_char) -> *const c_char; pub fn strpct( - buf: *mut ::c_char, - bufsiz: ::size_t, - numerator: ::uintmax_t, - denominator: ::uintmax_t, - precision: ::size_t, - ) -> *mut ::c_char; + buf: *mut c_char, + bufsiz: size_t, + numerator: crate::uintmax_t, + denominator: crate::uintmax_t, + precision: size_t, + ) -> *mut c_char; pub fn strspct( - buf: *mut ::c_char, - bufsiz: ::size_t, - numerator: ::intmax_t, - denominator: ::intmax_t, - precision: ::size_t, - ) -> *mut ::c_char; + buf: *mut c_char, + bufsiz: size_t, + numerator: crate::intmax_t, + denominator: crate::intmax_t, + precision: size_t, + ) -> *mut c_char; #[link_name = "__login50"] pub fn login(ut: *const utmp); #[link_name = "__loginx50"] pub fn loginx(ut: *const utmpx); - pub fn logout(line: *const ::c_char); - pub fn logoutx(line: *const ::c_char, status: ::c_int, tpe: ::c_int); - pub fn logwtmp(line: *const ::c_char, name: *const ::c_char, host: *const ::c_char); + pub fn logout(line: *const c_char); + pub fn logoutx(line: *const c_char, status: c_int, tpe: c_int); + pub fn logwtmp(line: *const c_char, name: *const c_char, host: *const c_char); pub fn logwtmpx( - line: *const ::c_char, - name: *const ::c_char, - host: *const ::c_char, - status: ::c_int, - tpe: ::c_int, + line: *const c_char, + name: *const c_char, + host: *const c_char, + status: c_int, + tpe: c_int, ); pub fn getxattr( - path: *const ::c_char, - name: *const ::c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + name: *const c_char, + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn lgetxattr( - path: *const ::c_char, - name: *const ::c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + path: *const c_char, + name: *const c_char, + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn fgetxattr( - filedes: ::c_int, - name: *const ::c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + filedes: c_int, + name: *const c_char, + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn setxattr( - path: *const ::c_char, - name: *const ::c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + path: *const c_char, + name: *const c_char, + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn lsetxattr( - path: *const ::c_char, - name: *const ::c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + path: *const c_char, + name: *const c_char, + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn fsetxattr( - filedes: ::c_int, - name: *const ::c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn listxattr(path: *const ::c_char, list: *mut ::c_char, size: ::size_t) -> ::ssize_t; - pub fn llistxattr(path: *const ::c_char, list: *mut ::c_char, size: ::size_t) -> ::ssize_t; - pub fn flistxattr(filedes: ::c_int, list: *mut ::c_char, size: ::size_t) -> ::ssize_t; - pub fn removexattr(path: *const ::c_char, name: *const ::c_char) -> ::c_int; - pub fn lremovexattr(path: *const ::c_char, name: *const ::c_char) -> ::c_int; - pub fn fremovexattr(fd: ::c_int, name: *const ::c_char) -> ::c_int; + filedes: c_int, + name: *const c_char, + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; + pub fn listxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn llistxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn flistxattr(filedes: c_int, list: *mut c_char, size: size_t) -> ssize_t; + pub fn removexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn lremovexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn fremovexattr(fd: c_int, name: *const c_char) -> c_int; pub fn string_to_flags( - string_p: *mut *mut ::c_char, - setp: *mut ::c_ulong, - clrp: *mut ::c_ulong, - ) -> ::c_int; - pub fn flags_to_string(flags: ::c_ulong, def: *const ::c_char) -> ::c_int; + string_p: *mut *mut c_char, + setp: *mut c_ulong, + clrp: *mut c_ulong, + ) -> c_int; + pub fn flags_to_string(flags: c_ulong, def: *const c_char) -> c_int; - pub fn kinfo_getvmmap(pid: ::pid_t, cntp: *mut ::size_t) -> *mut kinfo_vmentry; + pub fn kinfo_getvmmap(pid: crate::pid_t, cntp: *mut size_t) -> *mut kinfo_vmentry; } #[link(name = "execinfo")] extern "C" { - pub fn backtrace(addrlist: *mut *mut ::c_void, len: ::size_t) -> ::size_t; - pub fn backtrace_symbols(addrlist: *const *mut ::c_void, len: ::size_t) -> *mut *mut ::c_char; - pub fn backtrace_symbols_fd( - addrlist: *const *mut ::c_void, - len: ::size_t, - fd: ::c_int, - ) -> ::c_int; + pub fn backtrace(addrlist: *mut *mut c_void, len: size_t) -> size_t; + pub fn backtrace_symbols(addrlist: *const *mut c_void, len: size_t) -> *mut *mut c_char; + pub fn backtrace_symbols_fd(addrlist: *const *mut c_void, len: size_t, fd: c_int) -> c_int; pub fn backtrace_symbols_fmt( - addrlist: *const *mut ::c_void, - len: ::size_t, - fmt: *const ::c_char, - ) -> *mut *mut ::c_char; + addrlist: *const *mut c_void, + len: size_t, + fmt: *const c_char, + ) -> *mut *mut c_char; pub fn backtrace_symbols_fd_fmt( - addrlist: *const *mut ::c_void, - len: ::size_t, - fd: ::c_int, - fmt: *const ::c_char, - ) -> ::c_int; + addrlist: *const *mut c_void, + len: size_t, + fd: c_int, + fmt: *const c_char, + ) -> c_int; } cfg_if! { diff --git a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs index b4bfacf6a0185..1d74f171aa01c 100644 --- a/src/unix/bsd/netbsdlike/netbsd/powerpc.rs +++ b/src/unix/bsd/netbsdlike/netbsd/powerpc.rs @@ -1,12 +1,12 @@ -use PT_FIRSTMACH; +use crate::{c_double, c_int, 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; +pub type __cpu_simple_lock_nv_t = c_int; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 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; +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/src/unix/bsd/netbsdlike/netbsd/riscv64.rs b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs index 14b1be38041c7..d43269607d29c 100644 --- a/src/unix/bsd/netbsdlike/netbsd/riscv64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/riscv64.rs @@ -1,10 +1,12 @@ use PT_FIRSTMACH; +use crate::{c_double, c_int}; + pub type c_long = i64; pub type c_ulong = u64; pub type c_char = u8; pub type __greg_t = u64; -pub type __cpu_simple_lock_nv_t = ::c_int; +pub type __cpu_simple_lock_nv_t = c_int; pub type __gregset = [__greg_t; _NGREG]; pub type __fregset = [__freg; _NFREG]; @@ -20,60 +22,60 @@ s_no_extra_traits! { #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] pub union __fpreg { pub u_u64: u64, - pub u_d: ::c_double, + pub u_d: c_double, } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::() - 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; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 3; +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; +pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 3; pub const _NGREG: usize = 32; pub const _NFREG: usize = 33; -pub const _REG_X1: ::c_int = 0; -pub const _REG_X2: ::c_int = 1; -pub const _REG_X3: ::c_int = 2; -pub const _REG_X4: ::c_int = 3; -pub const _REG_X5: ::c_int = 4; -pub const _REG_X6: ::c_int = 5; -pub const _REG_X7: ::c_int = 6; -pub const _REG_X8: ::c_int = 7; -pub const _REG_X9: ::c_int = 8; -pub const _REG_X10: ::c_int = 9; -pub const _REG_X11: ::c_int = 10; -pub const _REG_X12: ::c_int = 11; -pub const _REG_X13: ::c_int = 12; -pub const _REG_X14: ::c_int = 13; -pub const _REG_X15: ::c_int = 14; -pub const _REG_X16: ::c_int = 15; -pub const _REG_X17: ::c_int = 16; -pub const _REG_X18: ::c_int = 17; -pub const _REG_X19: ::c_int = 18; -pub const _REG_X20: ::c_int = 19; -pub const _REG_X21: ::c_int = 20; -pub const _REG_X22: ::c_int = 21; -pub const _REG_X23: ::c_int = 22; -pub const _REG_X24: ::c_int = 23; -pub const _REG_X25: ::c_int = 24; -pub const _REG_X26: ::c_int = 25; -pub const _REG_X27: ::c_int = 26; -pub const _REG_X28: ::c_int = 27; -pub const _REG_X29: ::c_int = 28; -pub const _REG_X30: ::c_int = 29; -pub const _REG_X31: ::c_int = 30; -pub const _REG_PC: ::c_int = 31; +pub const _REG_X1: c_int = 0; +pub const _REG_X2: c_int = 1; +pub const _REG_X3: c_int = 2; +pub const _REG_X4: c_int = 3; +pub const _REG_X5: c_int = 4; +pub const _REG_X6: c_int = 5; +pub const _REG_X7: c_int = 6; +pub const _REG_X8: c_int = 7; +pub const _REG_X9: c_int = 8; +pub const _REG_X10: c_int = 9; +pub const _REG_X11: c_int = 10; +pub const _REG_X12: c_int = 11; +pub const _REG_X13: c_int = 12; +pub const _REG_X14: c_int = 13; +pub const _REG_X15: c_int = 14; +pub const _REG_X16: c_int = 15; +pub const _REG_X17: c_int = 16; +pub const _REG_X18: c_int = 17; +pub const _REG_X19: c_int = 18; +pub const _REG_X20: c_int = 19; +pub const _REG_X21: c_int = 20; +pub const _REG_X22: c_int = 21; +pub const _REG_X23: c_int = 22; +pub const _REG_X24: c_int = 23; +pub const _REG_X25: c_int = 24; +pub const _REG_X26: c_int = 25; +pub const _REG_X27: c_int = 26; +pub const _REG_X28: c_int = 27; +pub const _REG_X29: c_int = 28; +pub const _REG_X30: c_int = 29; +pub const _REG_X31: c_int = 30; +pub const _REG_PC: c_int = 31; -pub const _REG_RA: ::c_int = _REG_X1; -pub const _REG_SP: ::c_int = _REG_X2; -pub const _REG_GP: ::c_int = _REG_X3; -pub const _REG_TP: ::c_int = _REG_X4; -pub const _REG_S0: ::c_int = _REG_X8; -pub const _REG_RV: ::c_int = _REG_X10; -pub const _REG_A0: ::c_int = _REG_X10; +pub const _REG_RA: c_int = _REG_X1; +pub const _REG_SP: c_int = _REG_X2; +pub const _REG_GP: c_int = _REG_X3; +pub const _REG_TP: c_int = _REG_X4; +pub const _REG_S0: c_int = _REG_X8; +pub const _REG_RV: c_int = _REG_X10; +pub const _REG_A0: c_int = _REG_X10; -pub const _REG_F0: ::c_int = 0; -pub const _REG_FPCSR: ::c_int = 32; +pub const _REG_F0: c_int = 0; +pub const _REG_FPCSR: c_int = 32; diff --git a/src/unix/bsd/netbsdlike/netbsd/sparc64.rs b/src/unix/bsd/netbsdlike/netbsd/sparc64.rs index 6a86759e07e76..ff0320a9a81da 100644 --- a/src/unix/bsd/netbsdlike/netbsd/sparc64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/sparc64.rs @@ -1,7 +1,9 @@ +use crate::c_uchar; + pub type c_long = i64; pub type c_ulong = u64; pub type c_char = i8; -pub type __cpu_simple_lock_nv_t = ::c_uchar; +pub type __cpu_simple_lock_nv_t = c_uchar; // should be pub(crate), but that requires Rust 1.18.0 #[doc(hidden)] diff --git a/src/unix/bsd/netbsdlike/netbsd/x86.rs b/src/unix/bsd/netbsdlike/netbsd/x86.rs index d3a3967df17ef..db21dc326cc53 100644 --- a/src/unix/bsd/netbsdlike/netbsd/x86.rs +++ b/src/unix/bsd/netbsdlike/netbsd/x86.rs @@ -1,6 +1,8 @@ +use crate::{c_int, c_uchar}; + pub type c_long = i32; pub type c_ulong = u32; pub type c_char = i8; -pub type __cpu_simple_lock_nv_t = ::c_uchar; +pub type __cpu_simple_lock_nv_t = c_uchar; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; diff --git a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs index 792156484902c..28829ee11ea83 100644 --- a/src/unix/bsd/netbsdlike/netbsd/x86_64.rs +++ b/src/unix/bsd/netbsdlike/netbsd/x86_64.rs @@ -1,58 +1,58 @@ -use PT_FIRSTMACH; +use crate::{c_int, c_uchar, c_uint, PT_FIRSTMACH}; pub type c_long = i64; pub type c_ulong = u64; pub type c_char = i8; pub type c___greg_t = u64; -pub type __cpu_simple_lock_nv_t = ::c_uchar; +pub type __cpu_simple_lock_nv_t = c_uchar; s! { pub struct mcontext_t { pub __gregs: [c___greg_t; 26], pub _mc_tlsbase: c___greg_t, - pub __fpregs: [[::c_char; 32]; 16], + pub __fpregs: [[c_char; 32]; 16], } pub struct ucontext_t { - pub uc_flags: ::c_uint, - pub uc_link: *mut ::ucontext_t, - pub uc_sigmask: ::sigset_t, - pub uc_stack: ::stack_t, - pub uc_mcontext: ::mcontext_t, + pub uc_flags: c_uint, + pub uc_link: *mut crate::ucontext_t, + pub uc_sigmask: crate::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_mcontext: crate::mcontext_t, } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 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; -pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4; +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; +pub const PT_GETFPREGS: c_int = PT_FIRSTMACH + 3; +pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 4; -pub const _REG_RDI: ::c_int = 0; -pub const _REG_RSI: ::c_int = 1; -pub const _REG_RDX: ::c_int = 2; -pub const _REG_RCX: ::c_int = 3; -pub const _REG_R8: ::c_int = 4; -pub const _REG_R9: ::c_int = 5; -pub const _REG_R10: ::c_int = 6; -pub const _REG_R11: ::c_int = 7; -pub const _REG_R12: ::c_int = 8; -pub const _REG_R13: ::c_int = 9; -pub const _REG_R14: ::c_int = 10; -pub const _REG_R15: ::c_int = 11; -pub const _REG_RBP: ::c_int = 12; -pub const _REG_RBX: ::c_int = 13; -pub const _REG_RAX: ::c_int = 14; -pub const _REG_GS: ::c_int = 15; -pub const _REG_FS: ::c_int = 16; -pub const _REG_ES: ::c_int = 17; -pub const _REG_DS: ::c_int = 18; -pub const _REG_TRAPNO: ::c_int = 19; -pub const _REG_ERR: ::c_int = 20; -pub const _REG_RIP: ::c_int = 21; -pub const _REG_CS: ::c_int = 22; -pub const _REG_RFLAGS: ::c_int = 23; -pub const _REG_RSP: ::c_int = 24; -pub const _REG_SS: ::c_int = 25; +pub const _REG_RDI: c_int = 0; +pub const _REG_RSI: c_int = 1; +pub const _REG_RDX: c_int = 2; +pub const _REG_RCX: c_int = 3; +pub const _REG_R8: c_int = 4; +pub const _REG_R9: c_int = 5; +pub const _REG_R10: c_int = 6; +pub const _REG_R11: c_int = 7; +pub const _REG_R12: c_int = 8; +pub const _REG_R13: c_int = 9; +pub const _REG_R14: c_int = 10; +pub const _REG_R15: c_int = 11; +pub const _REG_RBP: c_int = 12; +pub const _REG_RBX: c_int = 13; +pub const _REG_RAX: c_int = 14; +pub const _REG_GS: c_int = 15; +pub const _REG_FS: c_int = 16; +pub const _REG_ES: c_int = 17; +pub const _REG_DS: c_int = 18; +pub const _REG_TRAPNO: c_int = 19; +pub const _REG_ERR: c_int = 20; +pub const _REG_RIP: c_int = 21; +pub const _REG_CS: c_int = 22; +pub const _REG_RFLAGS: c_int = 23; +pub const _REG_RSP: c_int = 24; +pub const _REG_SS: c_int = 25; diff --git a/src/unix/bsd/netbsdlike/openbsd/aarch64.rs b/src/unix/bsd/netbsdlike/openbsd/aarch64.rs index f2159c4dc2142..02f3f1bc61577 100644 --- a/src/unix/bsd/netbsdlike/openbsd/aarch64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/aarch64.rs @@ -1,3 +1,5 @@ +use crate::c_int; + pub type c_long = i64; pub type c_ulong = u64; pub type c_char = u8; @@ -5,17 +7,17 @@ pub type ucontext_t = sigcontext; s! { pub struct sigcontext { - __sc_unused: ::c_int, - pub sc_mask: ::c_int, - pub sc_sp: ::c_ulong, - pub sc_lr: ::c_ulong, - pub sc_elr: ::c_ulong, - pub sc_spsr: ::c_ulong, - pub sc_x: [::c_ulong; 30], - pub sc_cookie: ::c_long, + __sc_unused: c_int, + pub sc_mask: c_int, + pub sc_sp: c_ulong, + pub sc_lr: c_ulong, + pub sc_elr: c_ulong, + pub sc_spsr: c_ulong, + pub sc_x: [c_ulong; 30], + pub sc_cookie: c_long, } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/arm.rs b/src/unix/bsd/netbsdlike/openbsd/arm.rs index 6394df9300245..89603fba92853 100644 --- a/src/unix/bsd/netbsdlike/openbsd/arm.rs +++ b/src/unix/bsd/netbsdlike/openbsd/arm.rs @@ -1,7 +1,9 @@ +use crate::c_double; + pub type c_long = i32; pub type c_ulong = u32; pub type c_char = u8; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; +pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/mod.rs b/src/unix/bsd/netbsdlike/openbsd/mod.rs index f1adbc801e176..91cd6aee9524b 100644 --- a/src/unix/bsd/netbsdlike/openbsd/mod.rs +++ b/src/unix/bsd/netbsdlike/openbsd/mod.rs @@ -1,22 +1,25 @@ -use unix::bsd::O_SYNC; +use crate::unix::bsd::O_SYNC; +use crate::{ + c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, cmsghdr, off_t, size_t, +}; pub type clock_t = i64; -pub type suseconds_t = ::c_long; +pub type suseconds_t = c_long; pub type dev_t = i32; -pub type sigset_t = ::c_uint; +pub type sigset_t = c_uint; pub type blksize_t = i32; pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; -pub type idtype_t = ::c_uint; -pub type pthread_attr_t = *mut ::c_void; -pub type pthread_mutex_t = *mut ::c_void; -pub type pthread_mutexattr_t = *mut ::c_void; -pub type pthread_cond_t = *mut ::c_void; -pub type pthread_condattr_t = *mut ::c_void; -pub type pthread_rwlock_t = *mut ::c_void; -pub type pthread_rwlockattr_t = *mut ::c_void; -pub type pthread_spinlock_t = ::uintptr_t; -pub type caddr_t = *mut ::c_char; +pub type idtype_t = c_uint; +pub type pthread_attr_t = *mut c_void; +pub type pthread_mutex_t = *mut c_void; +pub type pthread_mutexattr_t = *mut c_void; +pub type pthread_cond_t = *mut c_void; +pub type pthread_condattr_t = *mut c_void; +pub type pthread_rwlock_t = *mut c_void; +pub type pthread_rwlockattr_t = *mut c_void; +pub type pthread_spinlock_t = crate::uintptr_t; +pub type caddr_t = *mut c_char; // elf.h @@ -39,11 +42,11 @@ pub type Elf64_Xword = u64; // search.h pub type ENTRY = entry; -pub type ACTION = ::c_uint; +pub type ACTION = c_uint; // spawn.h -pub type posix_spawnattr_t = *mut ::c_void; -pub type posix_spawn_file_actions_t = *mut ::c_void; +pub type posix_spawnattr_t = *mut c_void; +pub type posix_spawn_file_actions_t = *mut c_void; cfg_if! { if #[cfg(target_pointer_width = "64")] { @@ -61,151 +64,151 @@ s! { pub struct ip_mreqn { pub imr_multiaddr: in_addr, pub imr_address: in_addr, - pub imr_ifindex: ::c_int, + pub imr_ifindex: c_int, } pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_matchc: ::size_t, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - pub gl_pathv: *mut *mut ::c_char, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, + pub gl_pathc: size_t, + pub gl_matchc: size_t, + pub gl_offs: size_t, + pub gl_flags: c_int, + pub gl_pathv: *mut *mut c_char, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, + __unused6: *mut c_void, + __unused7: *mut c_void, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct ufs_args { - pub fspec: *mut ::c_char, + pub fspec: *mut c_char, pub export_info: export_args, } pub struct mfs_args { - pub fspec: *mut ::c_char, + pub fspec: *mut c_char, pub export_info: export_args, // https://github.com/openbsd/src/blob/HEAD/sys/sys/types.h#L134 - pub base: *mut ::c_char, - pub size: ::c_ulong, + pub base: *mut c_char, + pub size: c_ulong, } pub struct iso_args { - pub fspec: *mut ::c_char, + pub fspec: *mut c_char, pub export_info: export_args, - pub flags: ::c_int, - pub sess: ::c_int, + pub flags: c_int, + pub sess: c_int, } pub struct nfs_args { - pub version: ::c_int, - pub addr: *mut ::sockaddr, - pub addrlen: ::c_int, - pub sotype: ::c_int, - pub proto: ::c_int, - pub fh: *mut ::c_uchar, - pub fhsize: ::c_int, - pub flags: ::c_int, - pub wsize: ::c_int, - pub rsize: ::c_int, - pub readdirsize: ::c_int, - pub timeo: ::c_int, - pub retrans: ::c_int, - pub maxgrouplist: ::c_int, - pub readahead: ::c_int, - pub leaseterm: ::c_int, - pub deadthresh: ::c_int, - pub hostname: *mut ::c_char, - pub acregmin: ::c_int, - pub acregmax: ::c_int, - pub acdirmin: ::c_int, - pub acdirmax: ::c_int, + pub version: c_int, + pub addr: *mut crate::sockaddr, + pub addrlen: c_int, + pub sotype: c_int, + pub proto: c_int, + pub fh: *mut c_uchar, + pub fhsize: c_int, + pub flags: c_int, + pub wsize: c_int, + pub rsize: c_int, + pub readdirsize: c_int, + pub timeo: c_int, + pub retrans: c_int, + pub maxgrouplist: c_int, + pub readahead: c_int, + pub leaseterm: c_int, + pub deadthresh: c_int, + pub hostname: *mut c_char, + pub acregmin: c_int, + pub acregmax: c_int, + pub acdirmin: c_int, + pub acdirmax: c_int, } pub struct msdosfs_args { - pub fspec: *mut ::c_char, + pub fspec: *mut c_char, pub export_info: export_args, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub mask: ::mode_t, - pub flags: ::c_int, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub mask: crate::mode_t, + pub flags: c_int, } pub struct ntfs_args { - pub fspec: *mut ::c_char, + pub fspec: *mut c_char, pub export_info: export_args, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub mode: ::mode_t, - pub flag: ::c_ulong, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub mode: crate::mode_t, + pub flag: c_ulong, } pub struct udf_args { - pub fspec: *mut ::c_char, + pub fspec: *mut c_char, pub lastblock: u32, } pub struct tmpfs_args { - pub ta_version: ::c_int, - pub ta_nodes_max: ::ino_t, - pub ta_size_max: ::off_t, - pub ta_root_uid: ::uid_t, - pub ta_root_gid: ::gid_t, - pub ta_root_mode: ::mode_t, + pub ta_version: c_int, + pub ta_nodes_max: crate::ino_t, + pub ta_size_max: off_t, + pub ta_root_uid: crate::uid_t, + pub ta_root_gid: crate::gid_t, + pub ta_root_mode: crate::mode_t, } pub struct fusefs_args { - pub name: *mut ::c_char, - pub fd: ::c_int, - pub max_read: ::c_int, - pub allow_other: ::c_int, + pub name: *mut c_char, + pub fd: c_int, + pub max_read: c_int, + pub allow_other: c_int, } pub struct xucred { - pub cr_uid: ::uid_t, - pub cr_gid: ::gid_t, - pub cr_ngroups: ::c_short, + pub cr_uid: crate::uid_t, + pub cr_gid: crate::gid_t, + pub cr_ngroups: c_short, //https://github.com/openbsd/src/blob/HEAD/sys/sys/syslimits.h#L44 - pub cr_groups: [::gid_t; 16], + pub cr_groups: [crate::gid_t; 16], } pub struct export_args { - pub ex_flags: ::c_int, - pub ex_root: ::uid_t, + pub ex_flags: c_int, + pub ex_root: crate::uid_t, pub ex_anon: xucred, - pub ex_addr: *mut ::sockaddr, - pub ex_addrlen: ::c_int, - pub ex_mask: *mut ::sockaddr, - pub ex_masklen: ::c_int, + pub ex_addr: *mut crate::sockaddr, + pub ex_addrlen: c_int, + pub ex_mask: *mut crate::sockaddr, + pub ex_masklen: c_int, } pub struct ip_mreq { @@ -214,92 +217,92 @@ s! { } pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [i8; 8], } pub struct splice { - pub sp_fd: ::c_int, - pub sp_max: ::off_t, - pub sp_idle: ::timeval, + pub sp_fd: c_int, + pub sp_max: off_t, + pub sp_idle: crate::timeval, } pub struct kevent { - pub ident: ::uintptr_t, - pub filter: ::c_short, - pub flags: ::c_ushort, - pub fflags: ::c_uint, + pub ident: crate::uintptr_t, + pub filter: c_short, + pub flags: c_ushort, + pub fflags: c_uint, pub data: i64, - pub udata: *mut ::c_void, + pub udata: *mut c_void, } pub struct stat { - pub st_mode: ::mode_t, - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_size: ::off_t, - pub st_blocks: ::blkcnt_t, - pub st_blksize: ::blksize_t, + pub st_mode: crate::mode_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_size: off_t, + pub st_blocks: crate::blkcnt_t, + pub st_blksize: crate::blksize_t, pub st_flags: u32, pub st_gen: u32, - pub st_birthtime: ::time_t, - pub st_birthtime_nsec: ::c_long, + pub st_birthtime: crate::time_t, + pub st_birthtime_nsec: c_long, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_addr: *mut ::sockaddr, - pub ai_canonname: *mut ::c_char, - pub ai_next: *mut ::addrinfo, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: crate::socklen_t, + pub ai_addr: *mut crate::sockaddr, + pub ai_canonname: *mut c_char, + pub ai_next: *mut crate::addrinfo, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct if_data { - pub ifi_type: ::c_uchar, - pub ifi_addrlen: ::c_uchar, - pub ifi_hdrlen: ::c_uchar, - pub ifi_link_state: ::c_uchar, + pub ifi_type: c_uchar, + pub ifi_addrlen: c_uchar, + pub ifi_hdrlen: c_uchar, + pub ifi_link_state: c_uchar, pub ifi_mtu: u32, pub ifi_metric: u32, pub ifi_rdomain: u32, @@ -317,39 +320,39 @@ s! { pub ifi_oqdrops: u64, pub ifi_noproto: u64, pub ifi_capabilities: u32, - pub ifi_lastchange: ::timeval, + pub ifi_lastchange: crate::timeval, } pub struct if_msghdr { - pub ifm_msglen: ::c_ushort, - pub ifm_version: ::c_uchar, - pub ifm_type: ::c_uchar, - pub ifm_hdrlen: ::c_ushort, - pub ifm_index: ::c_ushort, - pub ifm_tableid: ::c_ushort, - pub ifm_pad1: ::c_uchar, - pub ifm_pad2: ::c_uchar, - pub ifm_addrs: ::c_int, - pub ifm_flags: ::c_int, - pub ifm_xflags: ::c_int, + pub ifm_msglen: c_ushort, + pub ifm_version: c_uchar, + pub ifm_type: c_uchar, + pub ifm_hdrlen: c_ushort, + pub ifm_index: c_ushort, + pub ifm_tableid: c_ushort, + pub ifm_pad1: c_uchar, + pub ifm_pad2: c_uchar, + pub ifm_addrs: c_int, + pub ifm_flags: c_int, + pub ifm_xflags: c_int, pub ifm_data: if_data, } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::c_uchar, - pub sdl_index: ::c_ushort, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 24], + pub sdl_len: c_uchar, + pub sdl_family: c_uchar, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 24], } pub struct sockpeercred { - pub uid: ::uid_t, - pub gid: ::gid_t, - pub pid: ::pid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub pid: crate::pid_t, } pub struct arphdr { @@ -361,18 +364,18 @@ s! { } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::c_int, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::c_short, - pub shm_atime: ::time_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: c_int, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: c_short, + pub shm_atime: crate::time_t, __shm_atimensec: c_long, - pub shm_dtime: ::time_t, + pub shm_dtime: crate::time_t, __shm_dtimensec: c_long, - pub shm_ctime: ::time_t, + pub shm_ctime: crate::time_t, __shm_ctimensec: c_long, - pub shm_internal: *mut ::c_void, + pub shm_internal: *mut c_void, } // elf.h @@ -402,7 +405,7 @@ s! { pub struct dl_phdr_info { pub dlpi_addr: Elf_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, pub dlpi_phdr: *const Elf_Phdr, pub dlpi_phnum: Elf_Half, } @@ -461,10 +464,10 @@ s! { pub p_nice: u8, pub p_xstat: u16, pub p_spare: u16, - pub p_comm: [::c_char; KI_MAXCOMLEN as usize], - pub p_wmesg: [::c_char; KI_WMESGLEN as usize], + pub p_comm: [c_char; KI_MAXCOMLEN as usize], + pub p_wmesg: [c_char; KI_WMESGLEN as usize], pub p_wchan: u64, - pub p_login: [::c_char; KI_MAXLOGNAME as usize], + pub p_login: [c_char; KI_MAXLOGNAME as usize], pub p_vm_rssize: i32, pub p_vm_tsize: i32, pub p_vm_dsize: i32, @@ -496,50 +499,50 @@ s! { pub p_acflag: u32, pub p_svuid: u32, pub p_svgid: u32, - pub p_emul: [::c_char; KI_EMULNAMELEN as usize], + pub p_emul: [c_char; KI_EMULNAMELEN as usize], pub p_rlim_rss_cur: u64, pub p_cpuid: u64, pub p_vm_map_size: u64, pub p_tid: i32, pub p_rtableid: u32, pub p_pledge: u64, - pub p_name: [::c_char; KI_MAXCOMLEN as usize], + pub p_name: [c_char; KI_MAXCOMLEN as usize], } pub struct kinfo_vmentry { - pub kve_start: ::c_ulong, - pub kve_end: ::c_ulong, - pub kve_guard: ::c_ulong, - pub kve_fspace: ::c_ulong, - pub kve_fspace_augment: ::c_ulong, + pub kve_start: c_ulong, + pub kve_end: c_ulong, + pub kve_guard: c_ulong, + pub kve_fspace: c_ulong, + pub kve_fspace_augment: c_ulong, pub kve_offset: u64, - pub kve_wired_count: ::c_int, - pub kve_etype: ::c_int, - pub kve_protection: ::c_int, - pub kve_max_protection: ::c_int, - pub kve_advice: ::c_int, - pub kve_inheritance: ::c_int, + pub kve_wired_count: c_int, + pub kve_etype: c_int, + pub kve_protection: c_int, + pub kve_max_protection: c_int, + pub kve_advice: c_int, + pub kve_inheritance: c_int, pub kve_flags: u8, } pub struct ptrace_state { - pub pe_report_event: ::c_int, - pub pe_other_pid: ::pid_t, - pub pe_tid: ::pid_t, + pub pe_report_event: c_int, + pub pe_other_pid: crate::pid_t, + pub pe_tid: crate::pid_t, } pub struct ptrace_thread_state { - pub pts_tid: ::pid_t, + pub pts_tid: crate::pid_t, } // search.h pub struct entry { - pub key: *mut ::c_char, - pub data: *mut ::c_void, + pub key: *mut c_char, + pub data: *mut c_void, } pub struct ifreq { - pub ifr_name: [::c_char; ::IFNAMSIZ], + pub ifr_name: [c_char; crate::IFNAMSIZ], pub ifr_ifru: __c_anonymous_ifr_ifru, } @@ -607,53 +610,53 @@ s! { } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_char { + pub unsafe fn si_addr(&self) -> *mut c_char { self.si_addr } - pub unsafe fn si_code(&self) -> ::c_int { + pub unsafe fn si_code(&self) -> c_int { self.si_code } - pub unsafe fn si_errno(&self) -> ::c_int { + pub unsafe fn si_errno(&self) -> c_int { self.si_errno } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_code: ::c_int, - _si_errno: ::c_int, - _pad: [::c_int; SI_PAD], - _pid: ::pid_t, + _si_signo: c_int, + _si_code: c_int, + _si_errno: c_int, + _pad: [c_int; SI_PAD], + _pid: crate::pid_t, } (*(self as *const siginfo_t as *const siginfo_timer))._pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_code: ::c_int, - _si_errno: ::c_int, - _pad: [::c_int; SI_PAD], - _pid: ::pid_t, - _uid: ::uid_t, + _si_signo: c_int, + _si_code: c_int, + _si_errno: c_int, + _pad: [c_int; SI_PAD], + _pid: crate::pid_t, + _uid: crate::uid_t, } (*(self as *const siginfo_t as *const siginfo_timer))._uid } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_code: ::c_int, - _si_errno: ::c_int, - _pad: [::c_int; SI_PAD], - _pid: ::pid_t, - _uid: ::uid_t, - value: ::sigval, + _si_signo: c_int, + _si_code: c_int, + _si_errno: c_int, + _pad: [c_int; SI_PAD], + _pid: crate::pid_t, + _uid: crate::uid_t, + value: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_timer)).value } @@ -661,28 +664,28 @@ impl siginfo_t { s_no_extra_traits! { pub struct dirent { - pub d_fileno: ::ino_t, - pub d_off: ::off_t, + pub d_fileno: crate::ino_t, + pub d_off: off_t, pub d_reclen: u16, pub d_type: u8, pub d_namlen: u8, __d_padding: [u8; 4], - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } pub struct sockaddr_storage { pub ss_len: u8, - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, __ss_pad1: [u8; 6], __ss_pad2: i64, __ss_pad3: [u8; 240], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub si_addr: *mut ::c_char, + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + pub si_addr: *mut c_char, #[cfg(target_pointer_width = "32")] __pad: [u8; 112], #[cfg(target_pointer_width = "64")] @@ -690,16 +693,16 @@ s_no_extra_traits! { } pub struct lastlog { - ll_time: ::time_t, - ll_line: [::c_char; UT_LINESIZE], - ll_host: [::c_char; UT_HOSTSIZE], + ll_time: crate::time_t, + ll_line: [c_char; UT_LINESIZE], + ll_host: [c_char; UT_HOSTSIZE], } pub struct utmp { - pub ut_line: [::c_char; UT_LINESIZE], - pub ut_name: [::c_char; UT_NAMESIZE], - pub ut_host: [::c_char; UT_HOSTSIZE], - pub ut_time: ::time_t, + pub ut_line: [c_char; UT_LINESIZE], + pub ut_name: [c_char; UT_NAMESIZE], + pub ut_host: [c_char; UT_HOSTSIZE], + pub ut_time: crate::time_t, } pub union mount_info { @@ -710,19 +713,19 @@ s_no_extra_traits! { pub msdosfs_args: msdosfs_args, pub ntfs_args: ntfs_args, pub tmpfs_args: tmpfs_args, - align: [::c_char; 160], + align: [c_char; 160], } pub union __c_anonymous_ifr_ifru { - pub ifru_addr: ::sockaddr, - pub ifru_dstaddr: ::sockaddr, - pub ifru_broadaddr: ::sockaddr, - pub ifru_flags: ::c_short, - pub ifru_metric: ::c_int, + pub ifru_addr: crate::sockaddr, + pub ifru_dstaddr: crate::sockaddr, + pub ifru_broadaddr: crate::sockaddr, + pub ifru_flags: c_short, + pub ifru_metric: c_int, pub ifru_vnetid: i64, pub ifru_media: u64, - pub ifru_data: ::caddr_t, - pub ifru_index: ::c_uint, + pub ifru_data: crate::caddr_t, + pub ifru_index: c_uint, } pub struct statfs { @@ -739,14 +742,14 @@ s_no_extra_traits! { pub f_syncreads: u64, pub f_asyncwrites: u64, pub f_asyncreads: u64, - pub f_fsid: ::fsid_t, + pub f_fsid: crate::fsid_t, pub f_namemax: u32, - pub f_owner: ::uid_t, + pub f_owner: crate::uid_t, pub f_ctime: u64, - pub f_fstypename: [::c_char; 16], - pub f_mntonname: [::c_char; 90], - pub f_mntfromname: [::c_char; 90], - pub f_mntfromspec: [::c_char; 90], + pub f_fstypename: [c_char; 16], + pub f_mntonname: [c_char; 90], + pub f_mntfromname: [c_char; 90], + pub f_mntfromspec: [c_char; 90], pub mount_info: mount_info, } } @@ -770,8 +773,8 @@ cfg_if! { impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_fileno", &self.d_fileno) .field("d_off", &self.d_off) @@ -783,8 +786,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_fileno.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -802,8 +805,8 @@ cfg_if! { impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -811,8 +814,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_len.hash(state); self.ss_family.hash(state); } @@ -829,8 +832,8 @@ cfg_if! { impl Eq for siginfo_t {} - impl ::fmt::Debug for siginfo_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for siginfo_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("siginfo_t") .field("si_signo", &self.si_signo) .field("si_code", &self.si_code) @@ -840,8 +843,8 @@ cfg_if! { } } - impl ::hash::Hash for siginfo_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for siginfo_t { + fn hash(&self, state: &mut H) { self.si_signo.hash(state); self.si_code.hash(state); self.si_errno.hash(state); @@ -867,8 +870,8 @@ cfg_if! { impl Eq for lastlog {} - impl ::fmt::Debug for lastlog { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for lastlog { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("lastlog") .field("ll_time", &self.ll_time) // FIXME: .field("ll_line", &self.ll_line) @@ -877,8 +880,8 @@ cfg_if! { } } - impl ::hash::Hash for lastlog { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for lastlog { + fn hash(&self, state: &mut H) { self.ll_time.hash(state); self.ll_line.hash(state); self.ll_host.hash(state); @@ -908,8 +911,8 @@ cfg_if! { impl Eq for utmp {} - impl ::fmt::Debug for utmp { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmp { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmp") // FIXME: .field("ut_line", &self.ut_line) // FIXME: .field("ut_name", &self.ut_name) @@ -919,8 +922,8 @@ cfg_if! { } } - impl ::hash::Hash for utmp { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmp { + fn hash(&self, state: &mut H) { self.ut_line.hash(state); self.ut_name.hash(state); self.ut_host.hash(state); @@ -941,16 +944,16 @@ cfg_if! { impl Eq for mount_info {} - impl ::fmt::Debug for mount_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mount_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mount_info") // FIXME: .field("align", &self.align) .finish() } } - impl ::hash::Hash for mount_info { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mount_info { + fn hash(&self, state: &mut H) { unsafe { self.align.hash(state) }; } } @@ -973,8 +976,8 @@ cfg_if! { impl Eq for __c_anonymous_ifr_ifru {} - impl ::fmt::Debug for __c_anonymous_ifr_ifru { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifr_ifru { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_ifr_ifru") .field("ifru_addr", unsafe { &self.ifru_addr }) .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) @@ -989,8 +992,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_ifr_ifru { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ifr_ifru { + fn hash(&self, state: &mut H) { unsafe { self.ifru_addr.hash(state); self.ifru_dstaddr.hash(state); @@ -1050,8 +1053,8 @@ cfg_if! { impl Eq for statfs {} - impl ::fmt::Debug for statfs { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for statfs { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("statfs") .field("f_flags", &self.f_flags) .field("f_bsize", &self.f_bsize) @@ -1079,8 +1082,8 @@ cfg_if! { } } - impl ::hash::Hash for statfs { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for statfs { + fn hash(&self, state: &mut H) { self.f_flags.hash(state); self.f_bsize.hash(state); self.f_iosize.hash(state); @@ -1112,52 +1115,52 @@ pub const UT_NAMESIZE: usize = 32; pub const UT_LINESIZE: usize = 8; pub const UT_HOSTSIZE: usize = 256; -pub const O_CLOEXEC: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x20000; -pub const O_RSYNC: ::c_int = O_SYNC; +pub const O_CLOEXEC: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x20000; +pub const O_RSYNC: c_int = O_SYNC; -pub const MS_SYNC: ::c_int = 0x0002; -pub const MS_INVALIDATE: ::c_int = 0x0004; +pub const MS_SYNC: c_int = 0x0002; +pub const MS_INVALIDATE: c_int = 0x0004; -pub const POLLNORM: ::c_short = ::POLLRDNORM; +pub const POLLNORM: c_short = crate::POLLRDNORM; -pub const ENOATTR: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const EOVERFLOW: ::c_int = 87; -pub const ECANCELED: ::c_int = 88; -pub const EIDRM: ::c_int = 89; -pub const ENOMSG: ::c_int = 90; -pub const ENOTSUP: ::c_int = 91; -pub const EBADMSG: ::c_int = 92; -pub const ENOTRECOVERABLE: ::c_int = 93; -pub const EOWNERDEAD: ::c_int = 94; -pub const EPROTO: ::c_int = 95; -pub const ELAST: ::c_int = 95; +pub const ENOATTR: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const EOVERFLOW: c_int = 87; +pub const ECANCELED: c_int = 88; +pub const EIDRM: c_int = 89; +pub const ENOMSG: c_int = 90; +pub const ENOTSUP: c_int = 91; +pub const EBADMSG: c_int = 92; +pub const ENOTRECOVERABLE: c_int = 93; +pub const EOWNERDEAD: c_int = 94; +pub const EPROTO: c_int = 95; +pub const ELAST: c_int = 95; -pub const F_DUPFD_CLOEXEC: ::c_int = 10; +pub const F_DUPFD_CLOEXEC: c_int = 10; pub const UTIME_OMIT: c_long = -1; pub const UTIME_NOW: c_long = -2; -pub const AT_FDCWD: ::c_int = -100; -pub const AT_EACCESS: ::c_int = 0x01; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x02; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x04; -pub const AT_REMOVEDIR: ::c_int = 0x08; +pub const AT_FDCWD: c_int = -100; +pub const AT_EACCESS: c_int = 0x01; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x02; +pub const AT_SYMLINK_FOLLOW: c_int = 0x04; +pub const AT_REMOVEDIR: c_int = 0x08; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 9; - -pub const SO_TIMESTAMP: ::c_int = 0x0800; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_BINDANY: ::c_int = 0x1000; -pub const SO_NETPROC: ::c_int = 0x1020; -pub const SO_RTABLE: ::c_int = 0x1021; -pub const SO_PEERCRED: ::c_int = 0x1022; -pub const SO_SPLICE: ::c_int = 0x1023; -pub const SO_DOMAIN: ::c_int = 0x1024; -pub const SO_PROTOCOL: ::c_int = 0x1025; +pub const RLIM_NLIMITS: c_int = 9; + +pub const SO_TIMESTAMP: c_int = 0x0800; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_BINDANY: c_int = 0x1000; +pub const SO_NETPROC: c_int = 0x1020; +pub const SO_RTABLE: c_int = 0x1021; +pub const SO_PEERCRED: c_int = 0x1022; +pub const SO_SPLICE: c_int = 0x1023; +pub const SO_DOMAIN: c_int = 0x1024; +pub const SO_PROTOCOL: c_int = 0x1025; // sys/netinet/in.h // Protocols (RFC 1700) @@ -1165,276 +1168,276 @@ pub const SO_PROTOCOL: ::c_int = 0x1025; // IPPROTO_IP defined in src/unix/mod.rs /// Hop-by-hop option header -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// gateway^2 (deprecated) -pub const IPPROTO_GGP: ::c_int = 3; +pub const IPPROTO_GGP: c_int = 3; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; // IPPROTO_UDP defined in src/unix/mod.rs /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; // IPPROTO_IPV6 defined in src/unix/mod.rs /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; /// IP Mobility RFC 2004 -pub const IPPROTO_MOBILE: ::c_int = 55; +pub const IPPROTO_MOBILE: c_int = 55; // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; +pub const IPPROTO_DSTOPTS: c_int = 60; /// ISO cnlp -pub const IPPROTO_EON: ::c_int = 80; +pub const IPPROTO_EON: c_int = 80; /// Ethernet-in-IP -pub const IPPROTO_ETHERIP: ::c_int = 97; +pub const IPPROTO_ETHERIP: c_int = 97; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// Protocol indep. multicast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// IP Payload Comp. Protocol -pub const IPPROTO_IPCOMP: ::c_int = 108; +pub const IPPROTO_IPCOMP: c_int = 108; /// CARP -pub const IPPROTO_CARP: ::c_int = 112; +pub const IPPROTO_CARP: c_int = 112; /// unicast MPLS packet -pub const IPPROTO_MPLS: ::c_int = 137; +pub const IPPROTO_MPLS: c_int = 137; /// PFSYNC -pub const IPPROTO_PFSYNC: ::c_int = 240; -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_PFSYNC: c_int = 240; +pub const IPPROTO_MAX: c_int = 256; // Only used internally, so it can be outside the range of valid IP protocols -pub const IPPROTO_DIVERT: ::c_int = 258; +pub const IPPROTO_DIVERT: c_int = 258; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_SENDSRCADDR: ::c_int = IP_RECVDSTADDR; -pub const IP_RECVIF: ::c_int = 30; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_SENDSRCADDR: c_int = IP_RECVDSTADDR; +pub const IP_RECVIF: c_int = 30; // sys/netinet/in.h -pub const TCP_MD5SIG: ::c_int = 0x04; -pub const TCP_NOPUSH: ::c_int = 0x10; - -pub const MSG_WAITFORONE: ::c_int = 0x1000; - -pub const AF_ECMA: ::c_int = 8; -pub const AF_ROUTE: ::c_int = 17; -pub const AF_ENCAP: ::c_int = 28; -pub const AF_SIP: ::c_int = 29; -pub const AF_KEY: ::c_int = 30; -pub const pseudo_AF_HDRCMPLT: ::c_int = 31; -pub const AF_BLUETOOTH: ::c_int = 32; -pub const AF_MPLS: ::c_int = 33; -pub const pseudo_AF_PFLOW: ::c_int = 34; -pub const pseudo_AF_PIPEX: ::c_int = 35; -pub const NET_RT_DUMP: ::c_int = 1; -pub const NET_RT_FLAGS: ::c_int = 2; -pub const NET_RT_IFLIST: ::c_int = 3; -pub const NET_RT_STATS: ::c_int = 4; -pub const NET_RT_TABLE: ::c_int = 5; -pub const NET_RT_IFNAMES: ::c_int = 6; - -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; - -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_ECMA: ::c_int = AF_ECMA; -pub const PF_ENCAP: ::c_int = AF_ENCAP; -pub const PF_SIP: ::c_int = AF_SIP; -pub const PF_KEY: ::c_int = AF_KEY; -pub const PF_BPF: ::c_int = pseudo_AF_HDRCMPLT; -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; -pub const PF_MPLS: ::c_int = AF_MPLS; -pub const PF_PFLOW: ::c_int = pseudo_AF_PFLOW; -pub const PF_PIPEX: ::c_int = pseudo_AF_PIPEX; - -pub const SCM_TIMESTAMP: ::c_int = 0x04; - -pub const O_DSYNC: ::c_int = 128; - -pub const MAP_RENAME: ::c_int = 0x0000; -pub const MAP_NORESERVE: ::c_int = 0x0000; -pub const MAP_HASSEMAPHORE: ::c_int = 0x0000; -pub const MAP_TRYFIXED: ::c_int = 0; - -pub const EIPSEC: ::c_int = 82; -pub const ENOMEDIUM: ::c_int = 85; -pub const EMEDIUMTYPE: ::c_int = 86; - -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_NODATA: ::c_int = -5; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_SYSTEM: ::c_int = -11; -pub const EAI_OVERFLOW: ::c_int = -14; - -pub const RUSAGE_THREAD: ::c_int = 1; - -pub const MAP_COPY: ::c_int = 0x0002; -pub const MAP_NOEXTEND: ::c_int = 0x0000; - -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 7; -pub const _PC_NO_TRUNC: ::c_int = 8; -pub const _PC_VDISABLE: ::c_int = 9; -pub const _PC_2_SYMLINKS: ::c_int = 10; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 11; -pub const _PC_ASYNC_IO: ::c_int = 12; -pub const _PC_FILESIZEBITS: ::c_int = 13; -pub const _PC_PRIO_IO: ::c_int = 14; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 17; -pub const _PC_REC_XFER_ALIGN: ::c_int = 18; -pub const _PC_SYMLINK_MAX: ::c_int = 19; -pub const _PC_SYNC_IO: ::c_int = 20; -pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 21; - -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 31; -pub const _SC_SEM_VALUE_MAX: ::c_int = 32; -pub const _SC_HOST_NAME_MAX: ::c_int = 33; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 34; -pub const _SC_2_PBS: ::c_int = 35; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 36; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 37; -pub const _SC_2_PBS_LOCATE: ::c_int = 38; -pub const _SC_2_PBS_MESSAGE: ::c_int = 39; -pub const _SC_2_PBS_TRACK: ::c_int = 40; -pub const _SC_ADVISORY_INFO: ::c_int = 41; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 42; -pub const _SC_AIO_MAX: ::c_int = 43; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 44; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 45; -pub const _SC_ATEXIT_MAX: ::c_int = 46; -pub const _SC_BARRIERS: ::c_int = 47; -pub const _SC_CLOCK_SELECTION: ::c_int = 48; -pub const _SC_CPUTIME: ::c_int = 49; -pub const _SC_DELAYTIMER_MAX: ::c_int = 50; -pub const _SC_IOV_MAX: ::c_int = 51; -pub const _SC_IPV6: ::c_int = 52; -pub const _SC_MAPPED_FILES: ::c_int = 53; -pub const _SC_MEMLOCK: ::c_int = 54; -pub const _SC_MEMLOCK_RANGE: ::c_int = 55; -pub const _SC_MEMORY_PROTECTION: ::c_int = 56; -pub const _SC_MESSAGE_PASSING: ::c_int = 57; -pub const _SC_MQ_OPEN_MAX: ::c_int = 58; -pub const _SC_MQ_PRIO_MAX: ::c_int = 59; -pub const _SC_PRIORITIZED_IO: ::c_int = 60; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 61; -pub const _SC_RAW_SOCKETS: ::c_int = 62; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 63; -pub const _SC_REALTIME_SIGNALS: ::c_int = 64; -pub const _SC_REGEXP: ::c_int = 65; -pub const _SC_RTSIG_MAX: ::c_int = 66; -pub const _SC_SEMAPHORES: ::c_int = 67; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 68; -pub const _SC_SHELL: ::c_int = 69; -pub const _SC_SIGQUEUE_MAX: ::c_int = 70; -pub const _SC_SPAWN: ::c_int = 71; -pub const _SC_SPIN_LOCKS: ::c_int = 72; -pub const _SC_SPORADIC_SERVER: ::c_int = 73; -pub const _SC_SS_REPL_MAX: ::c_int = 74; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 75; -pub const _SC_SYMLOOP_MAX: ::c_int = 76; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; -pub const _SC_THREAD_CPUTIME: ::c_int = 79; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 80; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 81; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 82; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 83; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 84; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 85; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 86; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 87; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 88; -pub const _SC_THREAD_STACK_MIN: ::c_int = 89; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 90; -pub const _SC_THREADS: ::c_int = 91; -pub const _SC_TIMEOUTS: ::c_int = 92; -pub const _SC_TIMER_MAX: ::c_int = 93; -pub const _SC_TIMERS: ::c_int = 94; -pub const _SC_TRACE: ::c_int = 95; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 96; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 97; -pub const _SC_TRACE_INHERIT: ::c_int = 98; -pub const _SC_TRACE_LOG: ::c_int = 99; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 100; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 101; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 102; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 103; -pub const _SC_TRACE_NAME_MAX: ::c_int = 104; -pub const _SC_TRACE_SYS_MAX: ::c_int = 105; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 106; -pub const _SC_TTY_NAME_MAX: ::c_int = 107; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 108; -pub const _SC_V6_ILP32_OFF32: ::c_int = 109; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 110; -pub const _SC_V6_LP64_OFF64: ::c_int = 111; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 112; -pub const _SC_V7_ILP32_OFF32: ::c_int = 113; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 114; -pub const _SC_V7_LP64_OFF64: ::c_int = 115; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 116; -pub const _SC_XOPEN_CRYPT: ::c_int = 117; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 118; -pub const _SC_XOPEN_LEGACY: ::c_int = 119; -pub const _SC_XOPEN_REALTIME: ::c_int = 120; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 121; -pub const _SC_XOPEN_STREAMS: ::c_int = 122; -pub const _SC_XOPEN_UNIX: ::c_int = 123; -pub const _SC_XOPEN_UUCP: ::c_int = 124; -pub const _SC_XOPEN_VERSION: ::c_int = 125; -pub const _SC_PHYS_PAGES: ::c_int = 500; -pub const _SC_AVPHYS_PAGES: ::c_int = 501; -pub const _SC_NPROCESSORS_CONF: ::c_int = 502; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 503; - -pub const FD_SETSIZE: ::c_int = 1024; - -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_OTHER: ::c_int = 2; -pub const SCHED_RR: ::c_int = 3; - -pub const ST_NOSUID: ::c_ulong = 2; +pub const TCP_MD5SIG: c_int = 0x04; +pub const TCP_NOPUSH: c_int = 0x10; + +pub const MSG_WAITFORONE: c_int = 0x1000; + +pub const AF_ECMA: c_int = 8; +pub const AF_ROUTE: c_int = 17; +pub const AF_ENCAP: c_int = 28; +pub const AF_SIP: c_int = 29; +pub const AF_KEY: c_int = 30; +pub const pseudo_AF_HDRCMPLT: c_int = 31; +pub const AF_BLUETOOTH: c_int = 32; +pub const AF_MPLS: c_int = 33; +pub const pseudo_AF_PFLOW: c_int = 34; +pub const pseudo_AF_PIPEX: c_int = 35; +pub const NET_RT_DUMP: c_int = 1; +pub const NET_RT_FLAGS: c_int = 2; +pub const NET_RT_IFLIST: c_int = 3; +pub const NET_RT_STATS: c_int = 4; +pub const NET_RT_TABLE: c_int = 5; +pub const NET_RT_IFNAMES: c_int = 6; + +pub const IPV6_JOIN_GROUP: c_int = 12; +pub const IPV6_LEAVE_GROUP: c_int = 13; + +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_ECMA: c_int = AF_ECMA; +pub const PF_ENCAP: c_int = AF_ENCAP; +pub const PF_SIP: c_int = AF_SIP; +pub const PF_KEY: c_int = AF_KEY; +pub const PF_BPF: c_int = pseudo_AF_HDRCMPLT; +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; +pub const PF_MPLS: c_int = AF_MPLS; +pub const PF_PFLOW: c_int = pseudo_AF_PFLOW; +pub const PF_PIPEX: c_int = pseudo_AF_PIPEX; + +pub const SCM_TIMESTAMP: c_int = 0x04; + +pub const O_DSYNC: c_int = 128; + +pub const MAP_RENAME: c_int = 0x0000; +pub const MAP_NORESERVE: c_int = 0x0000; +pub const MAP_HASSEMAPHORE: c_int = 0x0000; +pub const MAP_TRYFIXED: c_int = 0; + +pub const EIPSEC: c_int = 82; +pub const ENOMEDIUM: c_int = 85; +pub const EMEDIUMTYPE: c_int = 86; + +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_NODATA: c_int = -5; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_SYSTEM: c_int = -11; +pub const EAI_OVERFLOW: c_int = -14; + +pub const RUSAGE_THREAD: c_int = 1; + +pub const MAP_COPY: c_int = 0x0002; +pub const MAP_NOEXTEND: c_int = 0x0000; + +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_CHOWN_RESTRICTED: c_int = 7; +pub const _PC_NO_TRUNC: c_int = 8; +pub const _PC_VDISABLE: c_int = 9; +pub const _PC_2_SYMLINKS: c_int = 10; +pub const _PC_ALLOC_SIZE_MIN: c_int = 11; +pub const _PC_ASYNC_IO: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_PRIO_IO: c_int = 14; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 15; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 16; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 17; +pub const _PC_REC_XFER_ALIGN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_SYNC_IO: c_int = 20; +pub const _PC_TIMESTAMP_RESOLUTION: c_int = 21; + +pub const _SC_CLK_TCK: c_int = 3; +pub const _SC_SEM_NSEMS_MAX: c_int = 31; +pub const _SC_SEM_VALUE_MAX: c_int = 32; +pub const _SC_HOST_NAME_MAX: c_int = 33; +pub const _SC_MONOTONIC_CLOCK: c_int = 34; +pub const _SC_2_PBS: c_int = 35; +pub const _SC_2_PBS_ACCOUNTING: c_int = 36; +pub const _SC_2_PBS_CHECKPOINT: c_int = 37; +pub const _SC_2_PBS_LOCATE: c_int = 38; +pub const _SC_2_PBS_MESSAGE: c_int = 39; +pub const _SC_2_PBS_TRACK: c_int = 40; +pub const _SC_ADVISORY_INFO: c_int = 41; +pub const _SC_AIO_LISTIO_MAX: c_int = 42; +pub const _SC_AIO_MAX: c_int = 43; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 44; +pub const _SC_ASYNCHRONOUS_IO: c_int = 45; +pub const _SC_ATEXIT_MAX: c_int = 46; +pub const _SC_BARRIERS: c_int = 47; +pub const _SC_CLOCK_SELECTION: c_int = 48; +pub const _SC_CPUTIME: c_int = 49; +pub const _SC_DELAYTIMER_MAX: c_int = 50; +pub const _SC_IOV_MAX: c_int = 51; +pub const _SC_IPV6: c_int = 52; +pub const _SC_MAPPED_FILES: c_int = 53; +pub const _SC_MEMLOCK: c_int = 54; +pub const _SC_MEMLOCK_RANGE: c_int = 55; +pub const _SC_MEMORY_PROTECTION: c_int = 56; +pub const _SC_MESSAGE_PASSING: c_int = 57; +pub const _SC_MQ_OPEN_MAX: c_int = 58; +pub const _SC_MQ_PRIO_MAX: c_int = 59; +pub const _SC_PRIORITIZED_IO: c_int = 60; +pub const _SC_PRIORITY_SCHEDULING: c_int = 61; +pub const _SC_RAW_SOCKETS: c_int = 62; +pub const _SC_READER_WRITER_LOCKS: c_int = 63; +pub const _SC_REALTIME_SIGNALS: c_int = 64; +pub const _SC_REGEXP: c_int = 65; +pub const _SC_RTSIG_MAX: c_int = 66; +pub const _SC_SEMAPHORES: c_int = 67; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 68; +pub const _SC_SHELL: c_int = 69; +pub const _SC_SIGQUEUE_MAX: c_int = 70; +pub const _SC_SPAWN: c_int = 71; +pub const _SC_SPIN_LOCKS: c_int = 72; +pub const _SC_SPORADIC_SERVER: c_int = 73; +pub const _SC_SS_REPL_MAX: c_int = 74; +pub const _SC_SYNCHRONIZED_IO: c_int = 75; +pub const _SC_SYMLOOP_MAX: c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78; +pub const _SC_THREAD_CPUTIME: c_int = 79; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 80; +pub const _SC_THREAD_KEYS_MAX: c_int = 81; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 82; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 83; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 84; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 85; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 86; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 87; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 88; +pub const _SC_THREAD_STACK_MIN: c_int = 89; +pub const _SC_THREAD_THREADS_MAX: c_int = 90; +pub const _SC_THREADS: c_int = 91; +pub const _SC_TIMEOUTS: c_int = 92; +pub const _SC_TIMER_MAX: c_int = 93; +pub const _SC_TIMERS: c_int = 94; +pub const _SC_TRACE: c_int = 95; +pub const _SC_TRACE_EVENT_FILTER: c_int = 96; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 97; +pub const _SC_TRACE_INHERIT: c_int = 98; +pub const _SC_TRACE_LOG: c_int = 99; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 100; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 101; +pub const _SC_LOGIN_NAME_MAX: c_int = 102; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 103; +pub const _SC_TRACE_NAME_MAX: c_int = 104; +pub const _SC_TRACE_SYS_MAX: c_int = 105; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 106; +pub const _SC_TTY_NAME_MAX: c_int = 107; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 108; +pub const _SC_V6_ILP32_OFF32: c_int = 109; +pub const _SC_V6_ILP32_OFFBIG: c_int = 110; +pub const _SC_V6_LP64_OFF64: c_int = 111; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 112; +pub const _SC_V7_ILP32_OFF32: c_int = 113; +pub const _SC_V7_ILP32_OFFBIG: c_int = 114; +pub const _SC_V7_LP64_OFF64: c_int = 115; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 116; +pub const _SC_XOPEN_CRYPT: c_int = 117; +pub const _SC_XOPEN_ENH_I18N: c_int = 118; +pub const _SC_XOPEN_LEGACY: c_int = 119; +pub const _SC_XOPEN_REALTIME: c_int = 120; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 121; +pub const _SC_XOPEN_STREAMS: c_int = 122; +pub const _SC_XOPEN_UNIX: c_int = 123; +pub const _SC_XOPEN_UUCP: c_int = 124; +pub const _SC_XOPEN_VERSION: c_int = 125; +pub const _SC_PHYS_PAGES: c_int = 500; +pub const _SC_AVPHYS_PAGES: c_int = 501; +pub const _SC_NPROCESSORS_CONF: c_int = 502; +pub const _SC_NPROCESSORS_ONLN: c_int = 503; + +pub const FD_SETSIZE: c_int = 1024; + +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_OTHER: c_int = 2; +pub const SCHED_RR: c_int = 3; + +pub const ST_NOSUID: c_ulong = 2; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = 0 as *mut _; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = 0 as *mut _; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = 0 as *mut _; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3; -pub const PTHREAD_MUTEX_STRICT_NP: ::c_int = 4; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_STRICT_NP; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 1; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 2; +pub const PTHREAD_MUTEX_NORMAL: c_int = 3; +pub const PTHREAD_MUTEX_STRICT_NP: c_int = 4; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_STRICT_NP; pub const EVFILT_READ: i16 = -1; pub const EVFILT_WRITE: i16 = -2; @@ -1482,308 +1485,308 @@ pub const NOTE_TRACKERR: u32 = 0x00000002; pub const NOTE_CHILD: u32 = 0x00000004; pub const NOTE_CHANGE: u32 = 0x00000001; -pub const TMP_MAX: ::c_uint = 0x7fffffff; - -pub const AI_PASSIVE: ::c_int = 1; -pub const AI_CANONNAME: ::c_int = 2; -pub const AI_NUMERICHOST: ::c_int = 4; -pub const AI_EXT: ::c_int = 8; -pub const AI_NUMERICSERV: ::c_int = 16; -pub const AI_FQDN: ::c_int = 32; -pub const AI_ADDRCONFIG: ::c_int = 64; - -pub const NI_NUMERICHOST: ::c_int = 1; -pub const NI_NUMERICSERV: ::c_int = 2; -pub const NI_NOFQDN: ::c_int = 4; -pub const NI_NAMEREQD: ::c_int = 8; -pub const NI_DGRAM: ::c_int = 16; - -pub const NI_MAXHOST: ::size_t = 256; - -pub const RTLD_LOCAL: ::c_int = 0; - -pub const CTL_MAXNAME: ::c_int = 12; - -pub const CTLTYPE_NODE: ::c_int = 1; -pub const CTLTYPE_INT: ::c_int = 2; -pub const CTLTYPE_STRING: ::c_int = 3; -pub const CTLTYPE_QUAD: ::c_int = 4; -pub const CTLTYPE_STRUCT: ::c_int = 5; - -pub const CTL_UNSPEC: ::c_int = 0; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_FS: ::c_int = 3; -pub const CTL_NET: ::c_int = 4; -pub const CTL_DEBUG: ::c_int = 5; -pub const CTL_HW: ::c_int = 6; -pub const CTL_MACHDEP: ::c_int = 7; -pub const CTL_DDB: ::c_int = 9; -pub const CTL_VFS: ::c_int = 10; -pub const CTL_MAXID: ::c_int = 11; - -pub const HW_NCPUONLINE: ::c_int = 25; - -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_MAXVNODES: ::c_int = 5; -pub const KERN_MAXPROC: ::c_int = 6; -pub const KERN_MAXFILES: ::c_int = 7; -pub const KERN_ARGMAX: ::c_int = 8; -pub const KERN_SECURELVL: ::c_int = 9; -pub const KERN_HOSTNAME: ::c_int = 10; -pub const KERN_HOSTID: ::c_int = 11; -pub const KERN_CLOCKRATE: ::c_int = 12; -pub const KERN_PROF: ::c_int = 16; -pub const KERN_POSIX1: ::c_int = 17; -pub const KERN_NGROUPS: ::c_int = 18; -pub const KERN_JOB_CONTROL: ::c_int = 19; -pub const KERN_SAVED_IDS: ::c_int = 20; -pub const KERN_BOOTTIME: ::c_int = 21; -pub const KERN_DOMAINNAME: ::c_int = 22; -pub const KERN_MAXPARTITIONS: ::c_int = 23; -pub const KERN_RAWPARTITION: ::c_int = 24; -pub const KERN_MAXTHREAD: ::c_int = 25; -pub const KERN_NTHREADS: ::c_int = 26; -pub const KERN_OSVERSION: ::c_int = 27; -pub const KERN_SOMAXCONN: ::c_int = 28; -pub const KERN_SOMINCONN: ::c_int = 29; -pub const KERN_NOSUIDCOREDUMP: ::c_int = 32; -pub const KERN_FSYNC: ::c_int = 33; -pub const KERN_SYSVMSG: ::c_int = 34; -pub const KERN_SYSVSEM: ::c_int = 35; -pub const KERN_SYSVSHM: ::c_int = 36; -pub const KERN_MSGBUFSIZE: ::c_int = 38; -pub const KERN_MALLOCSTATS: ::c_int = 39; -pub const KERN_CPTIME: ::c_int = 40; -pub const KERN_NCHSTATS: ::c_int = 41; -pub const KERN_FORKSTAT: ::c_int = 42; -pub const KERN_TTY: ::c_int = 44; -pub const KERN_CCPU: ::c_int = 45; -pub const KERN_FSCALE: ::c_int = 46; -pub const KERN_NPROCS: ::c_int = 47; -pub const KERN_MSGBUF: ::c_int = 48; -pub const KERN_POOL: ::c_int = 49; -pub const KERN_STACKGAPRANDOM: ::c_int = 50; -pub const KERN_SYSVIPC_INFO: ::c_int = 51; -pub const KERN_SPLASSERT: ::c_int = 54; -pub const KERN_PROC_ARGS: ::c_int = 55; -pub const KERN_NFILES: ::c_int = 56; -pub const KERN_TTYCOUNT: ::c_int = 57; -pub const KERN_NUMVNODES: ::c_int = 58; -pub const KERN_MBSTAT: ::c_int = 59; -pub const KERN_SEMINFO: ::c_int = 61; -pub const KERN_SHMINFO: ::c_int = 62; -pub const KERN_INTRCNT: ::c_int = 63; -pub const KERN_WATCHDOG: ::c_int = 64; -pub const KERN_PROC: ::c_int = 66; -pub const KERN_MAXCLUSTERS: ::c_int = 67; -pub const KERN_EVCOUNT: ::c_int = 68; -pub const KERN_TIMECOUNTER: ::c_int = 69; -pub const KERN_MAXLOCKSPERUID: ::c_int = 70; -pub const KERN_CPTIME2: ::c_int = 71; -pub const KERN_CACHEPCT: ::c_int = 72; -pub const KERN_FILE: ::c_int = 73; -pub const KERN_CONSDEV: ::c_int = 75; -pub const KERN_NETLIVELOCKS: ::c_int = 76; -pub const KERN_POOL_DEBUG: ::c_int = 77; -pub const KERN_PROC_CWD: ::c_int = 78; -pub const KERN_PROC_NOBROADCASTKILL: ::c_int = 79; -pub const KERN_PROC_VMMAP: ::c_int = 80; -pub const KERN_GLOBAL_PTRACE: ::c_int = 81; -pub const KERN_CONSBUFSIZE: ::c_int = 82; -pub const KERN_CONSBUF: ::c_int = 83; -pub const KERN_AUDIO: ::c_int = 84; -pub const KERN_CPUSTATS: ::c_int = 85; -pub const KERN_PFSTATUS: ::c_int = 86; -pub const KERN_TIMEOUT_STATS: ::c_int = 87; - -pub const KERN_PROC_ALL: ::c_int = 0; -pub const KERN_PROC_PID: ::c_int = 1; -pub const KERN_PROC_PGRP: ::c_int = 2; -pub const KERN_PROC_SESSION: ::c_int = 3; -pub const KERN_PROC_TTY: ::c_int = 4; -pub const KERN_PROC_UID: ::c_int = 5; -pub const KERN_PROC_RUID: ::c_int = 6; -pub const KERN_PROC_KTHREAD: ::c_int = 7; -pub const KERN_PROC_SHOW_THREADS: ::c_int = 0x40000000; - -pub const KERN_SYSVIPC_MSG_INFO: ::c_int = 1; -pub const KERN_SYSVIPC_SEM_INFO: ::c_int = 2; -pub const KERN_SYSVIPC_SHM_INFO: ::c_int = 3; - -pub const KERN_PROC_ARGV: ::c_int = 1; -pub const KERN_PROC_NARGV: ::c_int = 2; -pub const KERN_PROC_ENV: ::c_int = 3; -pub const KERN_PROC_NENV: ::c_int = 4; - -pub const KI_NGROUPS: ::c_int = 16; -pub const KI_MAXCOMLEN: ::c_int = 24; -pub const KI_WMESGLEN: ::c_int = 8; -pub const KI_MAXLOGNAME: ::c_int = 32; -pub const KI_EMULNAMELEN: ::c_int = 8; - -pub const KVE_ET_OBJ: ::c_int = 0x00000001; -pub const KVE_ET_SUBMAP: ::c_int = 0x00000002; -pub const KVE_ET_COPYONWRITE: ::c_int = 0x00000004; -pub const KVE_ET_NEEDSCOPY: ::c_int = 0x00000008; -pub const KVE_ET_HOLE: ::c_int = 0x00000010; -pub const KVE_ET_NOFAULT: ::c_int = 0x00000020; -pub const KVE_ET_STACK: ::c_int = 0x00000040; -pub const KVE_ET_WC: ::c_int = 0x000000080; -pub const KVE_ET_CONCEAL: ::c_int = 0x000000100; -pub const KVE_ET_SYSCALL: ::c_int = 0x000000200; -pub const KVE_ET_FREEMAPPED: ::c_int = 0x000000800; - -pub const KVE_PROT_NONE: ::c_int = 0x00000000; -pub const KVE_PROT_READ: ::c_int = 0x00000001; -pub const KVE_PROT_WRITE: ::c_int = 0x00000002; -pub const KVE_PROT_EXEC: ::c_int = 0x00000004; - -pub const KVE_ADV_NORMAL: ::c_int = 0x00000000; -pub const KVE_ADV_RANDOM: ::c_int = 0x00000001; -pub const KVE_ADV_SEQUENTIAL: ::c_int = 0x00000002; - -pub const KVE_INH_SHARE: ::c_int = 0x00000000; -pub const KVE_INH_COPY: ::c_int = 0x00000010; -pub const KVE_INH_NONE: ::c_int = 0x00000020; -pub const KVE_INH_ZERO: ::c_int = 0x00000030; - -pub const KVE_F_STATIC: ::c_int = 0x1; -pub const KVE_F_KMEM: ::c_int = 0x2; - -pub const CHWFLOW: ::tcflag_t = ::MDMBUF | ::CRTSCTS; -pub const OLCUC: ::tcflag_t = 0x20; -pub const ONOCR: ::tcflag_t = 0x40; -pub const ONLRET: ::tcflag_t = 0x80; +pub const TMP_MAX: c_uint = 0x7fffffff; + +pub const AI_PASSIVE: c_int = 1; +pub const AI_CANONNAME: c_int = 2; +pub const AI_NUMERICHOST: c_int = 4; +pub const AI_EXT: c_int = 8; +pub const AI_NUMERICSERV: c_int = 16; +pub const AI_FQDN: c_int = 32; +pub const AI_ADDRCONFIG: c_int = 64; + +pub const NI_NUMERICHOST: c_int = 1; +pub const NI_NUMERICSERV: c_int = 2; +pub const NI_NOFQDN: c_int = 4; +pub const NI_NAMEREQD: c_int = 8; +pub const NI_DGRAM: c_int = 16; + +pub const NI_MAXHOST: size_t = 256; + +pub const RTLD_LOCAL: c_int = 0; + +pub const CTL_MAXNAME: c_int = 12; + +pub const CTLTYPE_NODE: c_int = 1; +pub const CTLTYPE_INT: c_int = 2; +pub const CTLTYPE_STRING: c_int = 3; +pub const CTLTYPE_QUAD: c_int = 4; +pub const CTLTYPE_STRUCT: c_int = 5; + +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_FS: c_int = 3; +pub const CTL_NET: c_int = 4; +pub const CTL_DEBUG: c_int = 5; +pub const CTL_HW: c_int = 6; +pub const CTL_MACHDEP: c_int = 7; +pub const CTL_DDB: c_int = 9; +pub const CTL_VFS: c_int = 10; +pub const CTL_MAXID: c_int = 11; + +pub const HW_NCPUONLINE: c_int = 25; + +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_MAXVNODES: c_int = 5; +pub const KERN_MAXPROC: c_int = 6; +pub const KERN_MAXFILES: c_int = 7; +pub const KERN_ARGMAX: c_int = 8; +pub const KERN_SECURELVL: c_int = 9; +pub const KERN_HOSTNAME: c_int = 10; +pub const KERN_HOSTID: c_int = 11; +pub const KERN_CLOCKRATE: c_int = 12; +pub const KERN_PROF: c_int = 16; +pub const KERN_POSIX1: c_int = 17; +pub const KERN_NGROUPS: c_int = 18; +pub const KERN_JOB_CONTROL: c_int = 19; +pub const KERN_SAVED_IDS: c_int = 20; +pub const KERN_BOOTTIME: c_int = 21; +pub const KERN_DOMAINNAME: c_int = 22; +pub const KERN_MAXPARTITIONS: c_int = 23; +pub const KERN_RAWPARTITION: c_int = 24; +pub const KERN_MAXTHREAD: c_int = 25; +pub const KERN_NTHREADS: c_int = 26; +pub const KERN_OSVERSION: c_int = 27; +pub const KERN_SOMAXCONN: c_int = 28; +pub const KERN_SOMINCONN: c_int = 29; +pub const KERN_NOSUIDCOREDUMP: c_int = 32; +pub const KERN_FSYNC: c_int = 33; +pub const KERN_SYSVMSG: c_int = 34; +pub const KERN_SYSVSEM: c_int = 35; +pub const KERN_SYSVSHM: c_int = 36; +pub const KERN_MSGBUFSIZE: c_int = 38; +pub const KERN_MALLOCSTATS: c_int = 39; +pub const KERN_CPTIME: c_int = 40; +pub const KERN_NCHSTATS: c_int = 41; +pub const KERN_FORKSTAT: c_int = 42; +pub const KERN_TTY: c_int = 44; +pub const KERN_CCPU: c_int = 45; +pub const KERN_FSCALE: c_int = 46; +pub const KERN_NPROCS: c_int = 47; +pub const KERN_MSGBUF: c_int = 48; +pub const KERN_POOL: c_int = 49; +pub const KERN_STACKGAPRANDOM: c_int = 50; +pub const KERN_SYSVIPC_INFO: c_int = 51; +pub const KERN_SPLASSERT: c_int = 54; +pub const KERN_PROC_ARGS: c_int = 55; +pub const KERN_NFILES: c_int = 56; +pub const KERN_TTYCOUNT: c_int = 57; +pub const KERN_NUMVNODES: c_int = 58; +pub const KERN_MBSTAT: c_int = 59; +pub const KERN_SEMINFO: c_int = 61; +pub const KERN_SHMINFO: c_int = 62; +pub const KERN_INTRCNT: c_int = 63; +pub const KERN_WATCHDOG: c_int = 64; +pub const KERN_PROC: c_int = 66; +pub const KERN_MAXCLUSTERS: c_int = 67; +pub const KERN_EVCOUNT: c_int = 68; +pub const KERN_TIMECOUNTER: c_int = 69; +pub const KERN_MAXLOCKSPERUID: c_int = 70; +pub const KERN_CPTIME2: c_int = 71; +pub const KERN_CACHEPCT: c_int = 72; +pub const KERN_FILE: c_int = 73; +pub const KERN_CONSDEV: c_int = 75; +pub const KERN_NETLIVELOCKS: c_int = 76; +pub const KERN_POOL_DEBUG: c_int = 77; +pub const KERN_PROC_CWD: c_int = 78; +pub const KERN_PROC_NOBROADCASTKILL: c_int = 79; +pub const KERN_PROC_VMMAP: c_int = 80; +pub const KERN_GLOBAL_PTRACE: c_int = 81; +pub const KERN_CONSBUFSIZE: c_int = 82; +pub const KERN_CONSBUF: c_int = 83; +pub const KERN_AUDIO: c_int = 84; +pub const KERN_CPUSTATS: c_int = 85; +pub const KERN_PFSTATUS: c_int = 86; +pub const KERN_TIMEOUT_STATS: c_int = 87; + +pub const KERN_PROC_ALL: c_int = 0; +pub const KERN_PROC_PID: c_int = 1; +pub const KERN_PROC_PGRP: c_int = 2; +pub const KERN_PROC_SESSION: c_int = 3; +pub const KERN_PROC_TTY: c_int = 4; +pub const KERN_PROC_UID: c_int = 5; +pub const KERN_PROC_RUID: c_int = 6; +pub const KERN_PROC_KTHREAD: c_int = 7; +pub const KERN_PROC_SHOW_THREADS: c_int = 0x40000000; + +pub const KERN_SYSVIPC_MSG_INFO: c_int = 1; +pub const KERN_SYSVIPC_SEM_INFO: c_int = 2; +pub const KERN_SYSVIPC_SHM_INFO: c_int = 3; + +pub const KERN_PROC_ARGV: c_int = 1; +pub const KERN_PROC_NARGV: c_int = 2; +pub const KERN_PROC_ENV: c_int = 3; +pub const KERN_PROC_NENV: c_int = 4; + +pub const KI_NGROUPS: c_int = 16; +pub const KI_MAXCOMLEN: c_int = 24; +pub const KI_WMESGLEN: c_int = 8; +pub const KI_MAXLOGNAME: c_int = 32; +pub const KI_EMULNAMELEN: c_int = 8; + +pub const KVE_ET_OBJ: c_int = 0x00000001; +pub const KVE_ET_SUBMAP: c_int = 0x00000002; +pub const KVE_ET_COPYONWRITE: c_int = 0x00000004; +pub const KVE_ET_NEEDSCOPY: c_int = 0x00000008; +pub const KVE_ET_HOLE: c_int = 0x00000010; +pub const KVE_ET_NOFAULT: c_int = 0x00000020; +pub const KVE_ET_STACK: c_int = 0x00000040; +pub const KVE_ET_WC: c_int = 0x000000080; +pub const KVE_ET_CONCEAL: c_int = 0x000000100; +pub const KVE_ET_SYSCALL: c_int = 0x000000200; +pub const KVE_ET_FREEMAPPED: c_int = 0x000000800; + +pub const KVE_PROT_NONE: c_int = 0x00000000; +pub const KVE_PROT_READ: c_int = 0x00000001; +pub const KVE_PROT_WRITE: c_int = 0x00000002; +pub const KVE_PROT_EXEC: c_int = 0x00000004; + +pub const KVE_ADV_NORMAL: c_int = 0x00000000; +pub const KVE_ADV_RANDOM: c_int = 0x00000001; +pub const KVE_ADV_SEQUENTIAL: c_int = 0x00000002; + +pub const KVE_INH_SHARE: c_int = 0x00000000; +pub const KVE_INH_COPY: c_int = 0x00000010; +pub const KVE_INH_NONE: c_int = 0x00000020; +pub const KVE_INH_ZERO: c_int = 0x00000030; + +pub const KVE_F_STATIC: c_int = 0x1; +pub const KVE_F_KMEM: c_int = 0x2; + +pub const CHWFLOW: crate::tcflag_t = crate::MDMBUF | crate::CRTSCTS; +pub const OLCUC: crate::tcflag_t = 0x20; +pub const ONOCR: crate::tcflag_t = 0x40; +pub const ONLRET: crate::tcflag_t = 0x80; //https://github.com/openbsd/src/blob/HEAD/sys/sys/mount.h -pub const ISOFSMNT_NORRIP: ::c_int = 0x1; // disable Rock Ridge Ext -pub const ISOFSMNT_GENS: ::c_int = 0x2; // enable generation numbers -pub const ISOFSMNT_EXTATT: ::c_int = 0x4; // enable extended attr -pub const ISOFSMNT_NOJOLIET: ::c_int = 0x8; // disable Joliet Ext -pub const ISOFSMNT_SESS: ::c_int = 0x10; // use iso_args.sess - -pub const NFS_ARGSVERSION: ::c_int = 4; // change when nfs_args changes - -pub const NFSMNT_RESVPORT: ::c_int = 0; // always use reserved ports -pub const NFSMNT_SOFT: ::c_int = 0x1; // soft mount (hard is default) -pub const NFSMNT_WSIZE: ::c_int = 0x2; // set write size -pub const NFSMNT_RSIZE: ::c_int = 0x4; // set read size -pub const NFSMNT_TIMEO: ::c_int = 0x8; // set initial timeout -pub const NFSMNT_RETRANS: ::c_int = 0x10; // set number of request retries -pub const NFSMNT_MAXGRPS: ::c_int = 0x20; // set maximum grouplist size -pub const NFSMNT_INT: ::c_int = 0x40; // allow interrupts on hard mount -pub const NFSMNT_NOCONN: ::c_int = 0x80; // Don't Connect the socket -pub const NFSMNT_NQNFS: ::c_int = 0x100; // Use Nqnfs protocol -pub const NFSMNT_NFSV3: ::c_int = 0x200; // Use NFS Version 3 protocol -pub const NFSMNT_KERB: ::c_int = 0x400; // Use Kerberos authentication -pub const NFSMNT_DUMBTIMR: ::c_int = 0x800; // Don't estimate rtt dynamically -pub const NFSMNT_LEASETERM: ::c_int = 0x1000; // set lease term (nqnfs) -pub const NFSMNT_READAHEAD: ::c_int = 0x2000; // set read ahead -pub const NFSMNT_DEADTHRESH: ::c_int = 0x4000; // set dead server retry thresh -pub const NFSMNT_NOAC: ::c_int = 0x8000; // disable attribute cache -pub const NFSMNT_RDIRPLUS: ::c_int = 0x10000; // Use Readdirplus for V3 -pub const NFSMNT_READDIRSIZE: ::c_int = 0x20000; // Set readdir size +pub const ISOFSMNT_NORRIP: c_int = 0x1; // disable Rock Ridge Ext +pub const ISOFSMNT_GENS: c_int = 0x2; // enable generation numbers +pub const ISOFSMNT_EXTATT: c_int = 0x4; // enable extended attr +pub const ISOFSMNT_NOJOLIET: c_int = 0x8; // disable Joliet Ext +pub const ISOFSMNT_SESS: c_int = 0x10; // use iso_args.sess + +pub const NFS_ARGSVERSION: c_int = 4; // change when nfs_args changes + +pub const NFSMNT_RESVPORT: c_int = 0; // always use reserved ports +pub const NFSMNT_SOFT: c_int = 0x1; // soft mount (hard is default) +pub const NFSMNT_WSIZE: c_int = 0x2; // set write size +pub const NFSMNT_RSIZE: c_int = 0x4; // set read size +pub const NFSMNT_TIMEO: c_int = 0x8; // set initial timeout +pub const NFSMNT_RETRANS: c_int = 0x10; // set number of request retries +pub const NFSMNT_MAXGRPS: c_int = 0x20; // set maximum grouplist size +pub const NFSMNT_INT: c_int = 0x40; // allow interrupts on hard mount +pub const NFSMNT_NOCONN: c_int = 0x80; // Don't Connect the socket +pub const NFSMNT_NQNFS: c_int = 0x100; // Use Nqnfs protocol +pub const NFSMNT_NFSV3: c_int = 0x200; // Use NFS Version 3 protocol +pub const NFSMNT_KERB: c_int = 0x400; // Use Kerberos authentication +pub const NFSMNT_DUMBTIMR: c_int = 0x800; // Don't estimate rtt dynamically +pub const NFSMNT_LEASETERM: c_int = 0x1000; // set lease term (nqnfs) +pub const NFSMNT_READAHEAD: c_int = 0x2000; // set read ahead +pub const NFSMNT_DEADTHRESH: c_int = 0x4000; // set dead server retry thresh +pub const NFSMNT_NOAC: c_int = 0x8000; // disable attribute cache +pub const NFSMNT_RDIRPLUS: c_int = 0x10000; // Use Readdirplus for V3 +pub const NFSMNT_READDIRSIZE: c_int = 0x20000; // Set readdir size /* Flags valid only in mount syscall arguments */ -pub const NFSMNT_ACREGMIN: ::c_int = 0x40000; // acregmin field valid -pub const NFSMNT_ACREGMAX: ::c_int = 0x80000; // acregmax field valid -pub const NFSMNT_ACDIRMIN: ::c_int = 0x100000; // acdirmin field valid -pub const NFSMNT_ACDIRMAX: ::c_int = 0x200000; // acdirmax field valid +pub const NFSMNT_ACREGMIN: c_int = 0x40000; // acregmin field valid +pub const NFSMNT_ACREGMAX: c_int = 0x80000; // acregmax field valid +pub const NFSMNT_ACDIRMIN: c_int = 0x100000; // acdirmin field valid +pub const NFSMNT_ACDIRMAX: c_int = 0x200000; // acdirmax field valid /* Flags valid only in kernel */ -pub const NFSMNT_INTERNAL: ::c_int = 0xfffc0000; // Bits set internally -pub const NFSMNT_HASWRITEVERF: ::c_int = 0x40000; // Has write verifier for V3 -pub const NFSMNT_GOTPATHCONF: ::c_int = 0x80000; // Got the V3 pathconf info -pub const NFSMNT_GOTFSINFO: ::c_int = 0x100000; // Got the V3 fsinfo -pub const NFSMNT_MNTD: ::c_int = 0x200000; // Mnt server for mnt point -pub const NFSMNT_DISMINPROG: ::c_int = 0x400000; // Dismount in progress -pub const NFSMNT_DISMNT: ::c_int = 0x800000; // Dismounted -pub const NFSMNT_SNDLOCK: ::c_int = 0x1000000; // Send socket lock -pub const NFSMNT_WANTSND: ::c_int = 0x2000000; // Want above -pub const NFSMNT_RCVLOCK: ::c_int = 0x4000000; // Rcv socket lock -pub const NFSMNT_WANTRCV: ::c_int = 0x8000000; // Want above -pub const NFSMNT_WAITAUTH: ::c_int = 0x10000000; // Wait for authentication -pub const NFSMNT_HASAUTH: ::c_int = 0x20000000; // Has authenticator -pub const NFSMNT_WANTAUTH: ::c_int = 0x40000000; // Wants an authenticator -pub const NFSMNT_AUTHERR: ::c_int = 0x80000000; // Authentication error - -pub const MSDOSFSMNT_SHORTNAME: ::c_int = 0x1; // Force old DOS short names only -pub const MSDOSFSMNT_LONGNAME: ::c_int = 0x2; // Force Win'95 long names -pub const MSDOSFSMNT_NOWIN95: ::c_int = 0x4; // Completely ignore Win95 entries - -pub const NTFS_MFLAG_CASEINS: ::c_int = 0x1; -pub const NTFS_MFLAG_ALLNAMES: ::c_int = 0x2; - -pub const TMPFS_ARGS_VERSION: ::c_int = 1; - -const SI_MAXSZ: ::size_t = 128; -const SI_PAD: ::size_t = (SI_MAXSZ / ::mem::size_of::<::c_int>()) - 3; - -pub const MAP_STACK: ::c_int = 0x4000; -pub const MAP_CONCEAL: ::c_int = 0x8000; +pub const NFSMNT_INTERNAL: c_int = 0xfffc0000; // Bits set internally +pub const NFSMNT_HASWRITEVERF: c_int = 0x40000; // Has write verifier for V3 +pub const NFSMNT_GOTPATHCONF: c_int = 0x80000; // Got the V3 pathconf info +pub const NFSMNT_GOTFSINFO: c_int = 0x100000; // Got the V3 fsinfo +pub const NFSMNT_MNTD: c_int = 0x200000; // Mnt server for mnt point +pub const NFSMNT_DISMINPROG: c_int = 0x400000; // Dismount in progress +pub const NFSMNT_DISMNT: c_int = 0x800000; // Dismounted +pub const NFSMNT_SNDLOCK: c_int = 0x1000000; // Send socket lock +pub const NFSMNT_WANTSND: c_int = 0x2000000; // Want above +pub const NFSMNT_RCVLOCK: c_int = 0x4000000; // Rcv socket lock +pub const NFSMNT_WANTRCV: c_int = 0x8000000; // Want above +pub const NFSMNT_WAITAUTH: c_int = 0x10000000; // Wait for authentication +pub const NFSMNT_HASAUTH: c_int = 0x20000000; // Has authenticator +pub const NFSMNT_WANTAUTH: c_int = 0x40000000; // Wants an authenticator +pub const NFSMNT_AUTHERR: c_int = 0x80000000; // Authentication error + +pub const MSDOSFSMNT_SHORTNAME: c_int = 0x1; // Force old DOS short names only +pub const MSDOSFSMNT_LONGNAME: c_int = 0x2; // Force Win'95 long names +pub const MSDOSFSMNT_NOWIN95: c_int = 0x4; // Completely ignore Win95 entries + +pub const NTFS_MFLAG_CASEINS: c_int = 0x1; +pub const NTFS_MFLAG_ALLNAMES: c_int = 0x2; + +pub const TMPFS_ARGS_VERSION: c_int = 1; + +const SI_MAXSZ: size_t = 128; +const SI_PAD: size_t = (SI_MAXSZ / crate::mem::size_of::()) - 3; + +pub const MAP_STACK: c_int = 0x4000; +pub const MAP_CONCEAL: c_int = 0x8000; // https://github.com/openbsd/src/blob/HEAD/sys/net/if.h#L187 -pub const IFF_UP: ::c_int = 0x1; // interface is up -pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link -pub const IFF_STATICARP: ::c_int = 0x20; // only static ARP -pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated -pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol -pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets -pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress -pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions -pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast - -pub const PTHREAD_STACK_MIN: ::size_t = 1_usize << _MAX_PAGE_SHIFT; -pub const MINSIGSTKSZ: ::size_t = 3_usize << _MAX_PAGE_SHIFT; -pub const SIGSTKSZ: ::size_t = MINSIGSTKSZ + (1_usize << _MAX_PAGE_SHIFT) * 4; - -pub const PT_SET_EVENT_MASK: ::c_int = 12; -pub const PT_GET_EVENT_MASK: ::c_int = 13; -pub const PT_GET_PROCESS_STATE: ::c_int = 14; -pub const PT_GET_THREAD_FIRST: ::c_int = 15; -pub const PT_GET_THREAD_NEXT: ::c_int = 16; -pub const PT_FIRSTMACH: ::c_int = 32; - -pub const SOCK_CLOEXEC: ::c_int = 0x8000; -pub const SOCK_NONBLOCK: ::c_int = 0x4000; -pub const SOCK_DNS: ::c_int = 0x1000; - -pub const BIOCGRSIG: ::c_ulong = 0x40044273; -pub const BIOCSRSIG: ::c_ulong = 0x80044272; -pub const BIOCSDLT: ::c_ulong = 0x8004427a; - -pub const PTRACE_FORK: ::c_int = 0x0002; - -pub const WCONTINUED: ::c_int = 0x08; -pub const WEXITED: ::c_int = 0x04; -pub const WSTOPPED: ::c_int = 0x02; // same as WUNTRACED -pub const WNOWAIT: ::c_int = 0x10; -pub const WTRAPPED: ::c_int = 0x20; - -pub const P_ALL: ::idtype_t = 0; -pub const P_PGID: ::idtype_t = 1; -pub const P_PID: ::idtype_t = 2; +pub const IFF_UP: c_int = 0x1; // interface is up +pub const IFF_BROADCAST: c_int = 0x2; // broadcast address valid +pub const IFF_DEBUG: c_int = 0x4; // turn on debugging +pub const IFF_LOOPBACK: c_int = 0x8; // is a loopback net +pub const IFF_POINTOPOINT: c_int = 0x10; // interface is point-to-point link +pub const IFF_STATICARP: c_int = 0x20; // only static ARP +pub const IFF_RUNNING: c_int = 0x40; // resources allocated +pub const IFF_NOARP: c_int = 0x80; // no address resolution protocol +pub const IFF_PROMISC: c_int = 0x100; // receive all packets +pub const IFF_ALLMULTI: c_int = 0x200; // receive all multicast packets +pub const IFF_OACTIVE: c_int = 0x400; // transmission in progress +pub const IFF_SIMPLEX: c_int = 0x800; // can't hear own transmissions +pub const IFF_LINK0: c_int = 0x1000; // per link layer defined bit +pub const IFF_LINK1: c_int = 0x2000; // per link layer defined bit +pub const IFF_LINK2: c_int = 0x4000; // per link layer defined bit +pub const IFF_MULTICAST: c_int = 0x8000; // supports multicast + +pub const PTHREAD_STACK_MIN: size_t = 1_usize << _MAX_PAGE_SHIFT; +pub const MINSIGSTKSZ: size_t = 3_usize << _MAX_PAGE_SHIFT; +pub const SIGSTKSZ: size_t = MINSIGSTKSZ + (1_usize << _MAX_PAGE_SHIFT) * 4; + +pub const PT_SET_EVENT_MASK: c_int = 12; +pub const PT_GET_EVENT_MASK: c_int = 13; +pub const PT_GET_PROCESS_STATE: c_int = 14; +pub const PT_GET_THREAD_FIRST: c_int = 15; +pub const PT_GET_THREAD_NEXT: c_int = 16; +pub const PT_FIRSTMACH: c_int = 32; + +pub const SOCK_CLOEXEC: c_int = 0x8000; +pub const SOCK_NONBLOCK: c_int = 0x4000; +pub const SOCK_DNS: c_int = 0x1000; + +pub const BIOCGRSIG: c_ulong = 0x40044273; +pub const BIOCSRSIG: c_ulong = 0x80044272; +pub const BIOCSDLT: c_ulong = 0x8004427a; + +pub const PTRACE_FORK: c_int = 0x0002; + +pub const WCONTINUED: c_int = 0x08; +pub const WEXITED: c_int = 0x04; +pub const WSTOPPED: c_int = 0x02; // same as WUNTRACED +pub const WNOWAIT: c_int = 0x10; +pub const WTRAPPED: c_int = 0x20; + +pub const P_ALL: crate::idtype_t = 0; +pub const P_PGID: crate::idtype_t = 1; +pub const P_PID: crate::idtype_t = 2; // search.h -pub const FIND: ::ACTION = 0; -pub const ENTER: ::ACTION = 1; +pub const FIND: crate::ACTION = 0; +pub const ENTER: crate::ACTION = 1; // futex.h -pub const FUTEX_WAIT: ::c_int = 1; -pub const FUTEX_WAKE: ::c_int = 2; -pub const FUTEX_REQUEUE: ::c_int = 3; -pub const FUTEX_PRIVATE_FLAG: ::c_int = 128; +pub const FUTEX_WAIT: c_int = 1; +pub const FUTEX_WAKE: c_int = 2; +pub const FUTEX_REQUEUE: c_int = 3; +pub const FUTEX_PRIVATE_FLAG: c_int = 128; // sysctl.h, kinfo_proc p_eflag constants pub const EPROC_CTTY: i32 = 0x01; // controlling tty vnode active @@ -1792,15 +1795,15 @@ pub const EPROC_UNVEIL: i32 = 0x04; // has unveil settings pub const EPROC_LKUNVEIL: i32 = 0x08; // unveil is locked // Flags for chflags(2) -pub const UF_SETTABLE: ::c_uint = 0x0000ffff; -pub const UF_NODUMP: ::c_uint = 0x00000001; -pub const UF_IMMUTABLE: ::c_uint = 0x00000002; -pub const UF_APPEND: ::c_uint = 0x00000004; -pub const UF_OPAQUE: ::c_uint = 0x00000008; -pub const SF_SETTABLE: ::c_uint = 0xffff0000; -pub const SF_ARCHIVED: ::c_uint = 0x00010000; -pub const SF_IMMUTABLE: ::c_uint = 0x00020000; -pub const SF_APPEND: ::c_uint = 0x00040000; +pub const UF_SETTABLE: c_uint = 0x0000ffff; +pub const UF_NODUMP: c_uint = 0x00000001; +pub const UF_IMMUTABLE: c_uint = 0x00000002; +pub const UF_APPEND: c_uint = 0x00000004; +pub const UF_OPAQUE: c_uint = 0x00000008; +pub const SF_SETTABLE: c_uint = 0xffff0000; +pub const SF_ARCHIVED: c_uint = 0x00010000; +pub const SF_IMMUTABLE: c_uint = 0x00020000; +pub const SF_APPEND: c_uint = 0x00040000; // sys/exec_elf.h - Legal values for p_type (segment type). pub const PT_NULL: u32 = 0; @@ -1827,117 +1830,117 @@ pub const PF_MASKOS: u32 = 0x0ff00000; pub const PF_MASKPROC: u32 = 0xf0000000; // sys/mount.h -pub const MNT_NOPERM: ::c_int = 0x00000020; -pub const MNT_WXALLOWED: ::c_int = 0x00000800; -pub const MNT_EXRDONLY: ::c_int = 0x00000080; -pub const MNT_DEFEXPORTED: ::c_int = 0x00000200; -pub const MNT_EXPORTANON: ::c_int = 0x00000400; -pub const MNT_ROOTFS: ::c_int = 0x00004000; -pub const MNT_NOATIME: ::c_int = 0x00008000; -pub const MNT_DELEXPORT: ::c_int = 0x00020000; -pub const MNT_STALLED: ::c_int = 0x00100000; -pub const MNT_SWAPPABLE: ::c_int = 0x00200000; -pub const MNT_WANTRDWR: ::c_int = 0x02000000; -pub const MNT_SOFTDEP: ::c_int = 0x04000000; -pub const MNT_DOOMED: ::c_int = 0x08000000; +pub const MNT_NOPERM: c_int = 0x00000020; +pub const MNT_WXALLOWED: c_int = 0x00000800; +pub const MNT_EXRDONLY: c_int = 0x00000080; +pub const MNT_DEFEXPORTED: c_int = 0x00000200; +pub const MNT_EXPORTANON: c_int = 0x00000400; +pub const MNT_ROOTFS: c_int = 0x00004000; +pub const MNT_NOATIME: c_int = 0x00008000; +pub const MNT_DELEXPORT: c_int = 0x00020000; +pub const MNT_STALLED: c_int = 0x00100000; +pub const MNT_SWAPPABLE: c_int = 0x00200000; +pub const MNT_WANTRDWR: c_int = 0x02000000; +pub const MNT_SOFTDEP: c_int = 0x04000000; +pub const MNT_DOOMED: c_int = 0x08000000; // For use with vfs_fsync and getfsstat -pub const MNT_WAIT: ::c_int = 1; -pub const MNT_NOWAIT: ::c_int = 2; -pub const MNT_LAZY: ::c_int = 3; +pub const MNT_WAIT: c_int = 1; +pub const MNT_NOWAIT: c_int = 2; +pub const MNT_LAZY: c_int = 3; // sys/_time.h -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4; -pub const CLOCK_UPTIME: ::clockid_t = 5; -pub const CLOCK_BOOTTIME: ::clockid_t = 6; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 4; +pub const CLOCK_UPTIME: crate::clockid_t = 5; +pub const CLOCK_BOOTTIME: crate::clockid_t = 6; -pub const LC_COLLATE_MASK: ::c_int = 1 << ::LC_COLLATE; -pub const LC_CTYPE_MASK: ::c_int = 1 << ::LC_CTYPE; -pub const LC_MONETARY_MASK: ::c_int = 1 << ::LC_MONETARY; -pub const LC_NUMERIC_MASK: ::c_int = 1 << ::LC_NUMERIC; -pub const LC_TIME_MASK: ::c_int = 1 << ::LC_TIME; -pub const LC_MESSAGES_MASK: ::c_int = 1 << ::LC_MESSAGES; +pub const LC_COLLATE_MASK: c_int = 1 << crate::LC_COLLATE; +pub const LC_CTYPE_MASK: c_int = 1 << crate::LC_CTYPE; +pub const LC_MONETARY_MASK: c_int = 1 << crate::LC_MONETARY; +pub const LC_NUMERIC_MASK: c_int = 1 << crate::LC_NUMERIC; +pub const LC_TIME_MASK: c_int = 1 << crate::LC_TIME; +pub const LC_MESSAGES_MASK: c_int = 1 << crate::LC_MESSAGES; -const _LC_LAST: ::c_int = 7; -pub const LC_ALL_MASK: ::c_int = (1 << _LC_LAST) - 2; +const _LC_LAST: c_int = 7; +pub const LC_ALL_MASK: c_int = (1 << _LC_LAST) - 2; -pub const LC_GLOBAL_LOCALE: ::locale_t = -1isize as ::locale_t; +pub const LC_GLOBAL_LOCALE: crate::locale_t = -1isize as crate::locale_t; // sys/reboot.h -pub const RB_ASKNAME: ::c_int = 0x00001; -pub const RB_SINGLE: ::c_int = 0x00002; -pub const RB_NOSYNC: ::c_int = 0x00004; -pub const RB_HALT: ::c_int = 0x00008; -pub const RB_INITNAME: ::c_int = 0x00010; -pub const RB_KDB: ::c_int = 0x00040; -pub const RB_RDONLY: ::c_int = 0x00080; -pub const RB_DUMP: ::c_int = 0x00100; -pub const RB_MINIROOT: ::c_int = 0x00200; -pub const RB_CONFIG: ::c_int = 0x00400; -pub const RB_TIMEBAD: ::c_int = 0x00800; -pub const RB_POWERDOWN: ::c_int = 0x01000; -pub const RB_SERCONS: ::c_int = 0x02000; -pub const RB_USERREQ: ::c_int = 0x04000; -pub const RB_RESET: ::c_int = 0x08000; -pub const RB_GOODRANDOM: ::c_int = 0x10000; -pub const RB_UNHIBERNATE: ::c_int = 0x20000; +pub const RB_ASKNAME: c_int = 0x00001; +pub const RB_SINGLE: c_int = 0x00002; +pub const RB_NOSYNC: c_int = 0x00004; +pub const RB_HALT: c_int = 0x00008; +pub const RB_INITNAME: c_int = 0x00010; +pub const RB_KDB: c_int = 0x00040; +pub const RB_RDONLY: c_int = 0x00080; +pub const RB_DUMP: c_int = 0x00100; +pub const RB_MINIROOT: c_int = 0x00200; +pub const RB_CONFIG: c_int = 0x00400; +pub const RB_TIMEBAD: c_int = 0x00800; +pub const RB_POWERDOWN: c_int = 0x01000; +pub const RB_SERCONS: c_int = 0x02000; +pub const RB_USERREQ: c_int = 0x04000; +pub const RB_RESET: c_int = 0x08000; +pub const RB_GOODRANDOM: c_int = 0x10000; +pub const RB_UNHIBERNATE: c_int = 0x20000; // net/route.h -pub const RTF_CLONING: ::c_int = 0x100; -pub const RTF_MULTICAST: ::c_int = 0x200; -pub const RTF_LLINFO: ::c_int = 0x400; -pub const RTF_PROTO3: ::c_int = 0x2000; -pub const RTF_ANNOUNCE: ::c_int = ::RTF_PROTO2; - -pub const RTF_CLONED: ::c_int = 0x10000; -pub const RTF_CACHED: ::c_int = 0x20000; -pub const RTF_MPATH: ::c_int = 0x40000; -pub const RTF_MPLS: ::c_int = 0x100000; -pub const RTF_LOCAL: ::c_int = 0x200000; -pub const RTF_BROADCAST: ::c_int = 0x400000; -pub const RTF_CONNECTED: ::c_int = 0x800000; -pub const RTF_BFD: ::c_int = 0x1000000; -pub const RTF_FMASK: ::c_int = ::RTF_LLINFO - | ::RTF_PROTO1 - | ::RTF_PROTO2 - | ::RTF_PROTO3 - | ::RTF_BLACKHOLE - | ::RTF_REJECT - | ::RTF_STATIC - | ::RTF_MPLS - | ::RTF_BFD; - -pub const RTM_VERSION: ::c_int = 5; -pub const RTM_RESOLVE: ::c_int = 0xb; -pub const RTM_NEWADDR: ::c_int = 0xc; -pub const RTM_DELADDR: ::c_int = 0xd; -pub const RTM_IFINFO: ::c_int = 0xe; -pub const RTM_IFANNOUNCE: ::c_int = 0xf; -pub const RTM_DESYNC: ::c_int = 0x10; -pub const RTM_INVALIDATE: ::c_int = 0x11; -pub const RTM_BFD: ::c_int = 0x12; -pub const RTM_PROPOSAL: ::c_int = 0x13; -pub const RTM_CHGADDRATTR: ::c_int = 0x14; -pub const RTM_80211INFO: ::c_int = 0x15; -pub const RTM_SOURCE: ::c_int = 0x16; - -pub const RTA_SRC: ::c_int = 0x100; -pub const RTA_SRCMASK: ::c_int = 0x200; -pub const RTA_LABEL: ::c_int = 0x400; -pub const RTA_BFD: ::c_int = 0x800; -pub const RTA_DNS: ::c_int = 0x1000; -pub const RTA_STATIC: ::c_int = 0x2000; -pub const RTA_SEARCH: ::c_int = 0x4000; - -pub const RTAX_SRC: ::c_int = 8; -pub const RTAX_SRCMASK: ::c_int = 9; -pub const RTAX_LABEL: ::c_int = 10; -pub const RTAX_BFD: ::c_int = 11; -pub const RTAX_DNS: ::c_int = 12; -pub const RTAX_STATIC: ::c_int = 13; -pub const RTAX_SEARCH: ::c_int = 14; -pub const RTAX_MAX: ::c_int = 15; +pub const RTF_CLONING: c_int = 0x100; +pub const RTF_MULTICAST: c_int = 0x200; +pub const RTF_LLINFO: c_int = 0x400; +pub const RTF_PROTO3: c_int = 0x2000; +pub const RTF_ANNOUNCE: c_int = crate::RTF_PROTO2; + +pub const RTF_CLONED: c_int = 0x10000; +pub const RTF_CACHED: c_int = 0x20000; +pub const RTF_MPATH: c_int = 0x40000; +pub const RTF_MPLS: c_int = 0x100000; +pub const RTF_LOCAL: c_int = 0x200000; +pub const RTF_BROADCAST: c_int = 0x400000; +pub const RTF_CONNECTED: c_int = 0x800000; +pub const RTF_BFD: c_int = 0x1000000; +pub const RTF_FMASK: c_int = crate::RTF_LLINFO + | crate::RTF_PROTO1 + | crate::RTF_PROTO2 + | crate::RTF_PROTO3 + | crate::RTF_BLACKHOLE + | crate::RTF_REJECT + | crate::RTF_STATIC + | crate::RTF_MPLS + | crate::RTF_BFD; + +pub const RTM_VERSION: c_int = 5; +pub const RTM_RESOLVE: c_int = 0xb; +pub const RTM_NEWADDR: c_int = 0xc; +pub const RTM_DELADDR: c_int = 0xd; +pub const RTM_IFINFO: c_int = 0xe; +pub const RTM_IFANNOUNCE: c_int = 0xf; +pub const RTM_DESYNC: c_int = 0x10; +pub const RTM_INVALIDATE: c_int = 0x11; +pub const RTM_BFD: c_int = 0x12; +pub const RTM_PROPOSAL: c_int = 0x13; +pub const RTM_CHGADDRATTR: c_int = 0x14; +pub const RTM_80211INFO: c_int = 0x15; +pub const RTM_SOURCE: c_int = 0x16; + +pub const RTA_SRC: c_int = 0x100; +pub const RTA_SRCMASK: c_int = 0x200; +pub const RTA_LABEL: c_int = 0x400; +pub const RTA_BFD: c_int = 0x800; +pub const RTA_DNS: c_int = 0x1000; +pub const RTA_STATIC: c_int = 0x2000; +pub const RTA_SEARCH: c_int = 0x4000; + +pub const RTAX_SRC: c_int = 8; +pub const RTAX_SRCMASK: c_int = 9; +pub const RTAX_LABEL: c_int = 10; +pub const RTAX_BFD: c_int = 11; +pub const RTAX_DNS: c_int = 12; +pub const RTAX_STATIC: c_int = 13; +pub const RTAX_SEARCH: c_int = 14; +pub const RTAX_MAX: c_int = 15; const_fn! { {const} fn _ALIGN(p: usize) -> usize { @@ -1946,39 +1949,39 @@ const_fn! { } f! { - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - _ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + _ALIGN(crate::mem::size_of::()) as c_uint + length } - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { - return ::CMSG_FIRSTHDR(mhdr); + return crate::CMSG_FIRSTHDR(mhdr); }; let next = cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize) - + _ALIGN(::mem::size_of::<::cmsghdr>()); + + _ALIGN(crate::mem::size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { - (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr + (cmsg as usize + _ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (_ALIGN(::mem::size_of::<::cmsghdr>()) + _ALIGN(length as usize)) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (_ALIGN(crate::mem::size_of::()) + _ALIGN(length as usize)) as c_uint } - pub fn major(dev: ::dev_t) -> ::c_uint { - ((dev as ::c_uint) >> 8) & 0xff + pub fn major(dev: crate::dev_t) -> c_uint { + ((dev as c_uint) >> 8) & 0xff } - pub fn minor(dev: ::dev_t) -> ::c_uint { - let dev = dev as ::c_uint; + pub fn minor(dev: crate::dev_t) -> c_uint { + let dev = dev as c_uint; let mut res = 0; res |= (dev) & 0xff; res |= ((dev) & 0xffff0000) >> 8; @@ -1988,25 +1991,25 @@ f! { } safe_f! { - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { status >> 8 } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { (status & 0o177) != 0o177 && (status & 0o177) != 0 } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0o177 } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { (status & 0o177777) == 0o177777 } - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= (major & 0xff) << 8; dev |= minor & 0xff; @@ -2016,174 +2019,169 @@ safe_f! { } extern "C" { - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; - pub fn settimeofday(tp: *const ::timeval, tz: *const ::timezone) -> ::c_int; - pub fn pledge(promises: *const ::c_char, execpromises: *const ::c_char) -> ::c_int; - pub fn unveil(path: *const ::c_char, permissions: *const ::c_char) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; + pub fn settimeofday(tp: *const crate::timeval, tz: *const crate::timezone) -> c_int; + pub fn pledge(promises: *const c_char, execpromises: *const c_char) -> c_int; + pub fn unveil(path: *const c_char, permissions: *const c_char) -> c_int; pub fn strtonum( - nptr: *const ::c_char, - minval: ::c_longlong, - maxval: ::c_longlong, - errstr: *mut *const ::c_char, - ) -> ::c_longlong; - pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; - pub fn chflags(path: *const ::c_char, flags: ::c_uint) -> ::c_int; - pub fn fchflags(fd: ::c_int, flags: ::c_uint) -> ::c_int; - pub fn chflagsat( - fd: ::c_int, - path: *const ::c_char, - flags: ::c_uint, - atflag: ::c_int, - ) -> ::c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + nptr: *const c_char, + minval: c_longlong, + maxval: c_longlong, + errstr: *mut *const c_char, + ) -> c_longlong; + pub fn dup3(src: c_int, dst: c_int, flags: c_int) -> c_int; + pub fn chflags(path: *const c_char, flags: c_uint) -> c_int; + pub fn fchflags(fd: c_int, flags: c_uint) -> c_int; + pub fn chflagsat(fd: c_int, path: *const c_char, flags: c_uint, atflag: c_int) -> c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; - pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: size_t, + serv: *mut c_char, + servlen: size_t, + flags: c_int, + ) -> c_int; + pub fn getresgid( + rgid: *mut crate::gid_t, + egid: *mut crate::gid_t, + sgid: *mut crate::gid_t, + ) -> c_int; + pub fn getresuid( + ruid: *mut crate::uid_t, + euid: *mut crate::uid_t, + suid: *mut crate::uid_t, + ) -> c_int; pub fn kevent( - kq: ::c_int, - changelist: *const ::kevent, - nchanges: ::c_int, - eventlist: *mut ::kevent, - nevents: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn getthrid() -> ::pid_t; + kq: c_int, + changelist: *const crate::kevent, + nchanges: c_int, + eventlist: *mut crate::kevent, + nevents: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn getthrid() -> crate::pid_t; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_main_np() -> ::c_int; - pub fn pthread_get_name_np(tid: ::pthread_t, name: *mut ::c_char, len: ::size_t); - pub fn pthread_set_name_np(tid: ::pthread_t, name: *const ::c_char); - pub fn pthread_stackseg_np(thread: ::pthread_t, sinfo: *mut ::stack_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; + pub fn pthread_main_np() -> c_int; + pub fn pthread_get_name_np(tid: crate::pthread_t, name: *mut c_char, len: size_t); + pub fn pthread_set_name_np(tid: crate::pthread_t, name: *const c_char); + pub fn pthread_stackseg_np(thread: crate::pthread_t, sinfo: *mut crate::stack_t) -> c_int; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, - termp: *const ::termios, - winp: *const ::winsize, - ) -> ::c_int; + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, + termp: *const crate::termios, + winp: *const crate::winsize, + ) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, - termp: *const ::termios, - winp: *const ::winsize, - ) -> ::pid_t; + amaster: *mut c_int, + name: *mut c_char, + termp: *const crate::termios, + winp: *const crate::winsize, + ) -> crate::pid_t; pub fn sysctl( - name: *const ::c_int, - namelen: ::c_uint, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; - pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; - pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; - pub fn ptrace(request: ::c_int, pid: ::pid_t, addr: caddr_t, data: ::c_int) -> ::c_int; - pub fn utrace(label: *const ::c_char, addr: *const ::c_void, len: ::size_t) -> ::c_int; + name: *const c_int, + namelen: c_uint, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; + pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int; + pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int; + pub fn ptrace(request: c_int, pid: crate::pid_t, addr: caddr_t, data: c_int) -> c_int; + pub fn utrace(label: *const c_char, addr: *const c_void, len: size_t) -> c_int; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; // #include pub fn dl_iterate_phdr( - callback: ::Option< - unsafe extern "C" fn( - info: *mut dl_phdr_info, - size: usize, - data: *mut ::c_void, - ) -> ::c_int, + callback: Option< + unsafe extern "C" fn(info: *mut dl_phdr_info, size: usize, data: *mut c_void) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn duplocale(base: ::locale_t) -> ::locale_t; + data: *mut c_void, + ) -> c_int; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; // Added in `OpenBSD` 5.5 - pub fn explicit_bzero(s: *mut ::c_void, len: ::size_t); + pub fn explicit_bzero(s: *mut c_void, len: size_t); - pub fn setproctitle(fmt: *const ::c_char, ...); + pub fn setproctitle(fmt: *const c_char, ...); - pub fn freezero(ptr: *mut ::c_void, size: ::size_t); - pub fn malloc_conceal(size: ::size_t) -> *mut ::c_void; - pub fn calloc_conceal(nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn freezero(ptr: *mut c_void, size: size_t); + pub fn malloc_conceal(size: size_t) -> *mut c_void; + pub fn calloc_conceal(nmemb: size_t, size: size_t) -> *mut c_void; - pub fn srand48_deterministic(seed: ::c_long); - pub fn seed48_deterministic(xseed: *mut ::c_ushort) -> *mut ::c_ushort; - pub fn lcong48_deterministic(p: *mut ::c_ushort); + pub fn srand48_deterministic(seed: c_long); + pub fn seed48_deterministic(xseed: *mut c_ushort) -> *mut c_ushort; + pub fn lcong48_deterministic(p: *mut c_ushort); pub fn lsearch( - key: *const ::c_void, - base: *mut ::c_void, - nelp: *mut ::size_t, - width: ::size_t, - compar: ::Option ::c_int>, - ) -> *mut ::c_void; + key: *const c_void, + base: *mut c_void, + nelp: *mut size_t, + width: size_t, + compar: Option c_int>, + ) -> *mut c_void; pub fn lfind( - key: *const ::c_void, - base: *const ::c_void, - nelp: *mut ::size_t, - width: ::size_t, - compar: ::Option ::c_int>, - ) -> *mut ::c_void; - pub fn hcreate(nelt: ::size_t) -> ::c_int; + key: *const c_void, + base: *const c_void, + nelp: *mut size_t, + width: size_t, + compar: Option c_int>, + ) -> *mut c_void; + pub fn hcreate(nelt: size_t) -> c_int; pub fn hdestroy(); - pub fn hsearch(entry: ::ENTRY, action: ::ACTION) -> *mut ::ENTRY; + pub fn hsearch(entry: crate::ENTRY, action: crate::ACTION) -> *mut crate::ENTRY; // futex.h pub fn futex( uaddr: *mut u32, - op: ::c_int, - val: ::c_int, - timeout: *const ::timespec, + op: c_int, + val: c_int, + timeout: *const crate::timespec, uaddr2: *mut u32, - ) -> ::c_int; + ) -> c_int; - pub fn mimmutable(addr: *mut ::c_void, len: ::size_t) -> ::c_int; + pub fn mimmutable(addr: *mut c_void, len: size_t) -> c_int; - pub fn reboot(mode: ::c_int) -> ::c_int; + pub fn reboot(mode: c_int) -> c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn getmntinfo(mntbufp: *mut *mut ::statfs, flags: ::c_int) -> ::c_int; - pub fn getfsstat(buf: *mut statfs, bufsize: ::size_t, flags: ::c_int) -> ::c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn getmntinfo(mntbufp: *mut *mut crate::statfs, flags: c_int) -> c_int; + pub fn getfsstat(buf: *mut statfs, bufsize: size_t, flags: c_int) -> c_int; } #[link(name = "execinfo")] extern "C" { - pub fn backtrace(addrlist: *mut *mut ::c_void, len: ::size_t) -> ::size_t; - pub fn backtrace_symbols(addrlist: *const *mut ::c_void, len: ::size_t) -> *mut *mut ::c_char; - pub fn backtrace_symbols_fd( - addrlist: *const *mut ::c_void, - len: ::size_t, - fd: ::c_int, - ) -> ::c_int; + pub fn backtrace(addrlist: *mut *mut c_void, len: size_t) -> size_t; + pub fn backtrace_symbols(addrlist: *const *mut c_void, len: size_t) -> *mut *mut c_char; + pub fn backtrace_symbols_fd(addrlist: *const *mut c_void, len: size_t, fd: c_int) -> c_int; pub fn backtrace_symbols_fmt( - addrlist: *const *mut ::c_void, - len: ::size_t, - fmt: *const ::c_char, - ) -> *mut *mut ::c_char; + addrlist: *const *mut c_void, + len: size_t, + fmt: *const c_char, + ) -> *mut *mut c_char; } cfg_if! { diff --git a/src/unix/bsd/netbsdlike/openbsd/powerpc.rs b/src/unix/bsd/netbsdlike/openbsd/powerpc.rs index 6394df9300245..e781fa7484ac1 100644 --- a/src/unix/bsd/netbsdlike/openbsd/powerpc.rs +++ b/src/unix/bsd/netbsdlike/openbsd/powerpc.rs @@ -1,7 +1,9 @@ +use crate::c_double; + pub type c_long = i32; pub type c_ulong = u32; pub type c_char = u8; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_double>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs b/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs index df0cdd6d1ac53..7aec9eb638772 100644 --- a/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/powerpc64.rs @@ -2,6 +2,6 @@ pub type c_long = i64; pub type c_ulong = u64; pub type c_char = u8; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/riscv64.rs b/src/unix/bsd/netbsdlike/openbsd/riscv64.rs index fbcc5a76bbed3..baaab22337c39 100644 --- a/src/unix/bsd/netbsdlike/openbsd/riscv64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/riscv64.rs @@ -1,3 +1,5 @@ +use crate::c_int; + pub type c_long = i64; pub type c_ulong = u64; pub type c_char = u8; @@ -5,22 +7,22 @@ pub type ucontext_t = sigcontext; s! { pub struct sigcontext { - __sc_unused: ::c_int, - pub sc_mask: ::c_int, - pub sc_ra: ::c_long, - pub sc_sp: ::c_long, - pub sc_gp: ::c_long, - pub sc_tp: ::c_long, - pub sc_t: [::c_long; 7], - pub sc_s: [::c_long; 12], - pub sc_a: [::c_long; 8], - pub sc_sepc: ::c_long, - pub sc_f: [::c_long; 32], - pub sc_fcsr: ::c_long, - pub sc_cookie: ::c_long, + __sc_unused: c_int, + pub sc_mask: c_int, + pub sc_ra: c_long, + pub sc_sp: c_long, + pub sc_gp: c_long, + pub sc_tp: c_long, + pub sc_t: [c_long; 7], + pub sc_s: [c_long; 12], + pub sc_a: [c_long; 8], + pub sc_sepc: c_long, + pub sc_f: [c_long; 32], + pub sc_fcsr: c_long, + pub sc_cookie: c_long, } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/x86.rs b/src/unix/bsd/netbsdlike/openbsd/x86.rs index a12107bc2a482..bad2eddc84b48 100644 --- a/src/unix/bsd/netbsdlike/openbsd/x86.rs +++ b/src/unix/bsd/netbsdlike/openbsd/x86.rs @@ -1,7 +1,9 @@ +use crate::c_int; + pub type c_long = i32; pub type c_ulong = u32; pub type c_char = i8; -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_int>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; diff --git a/src/unix/bsd/netbsdlike/openbsd/x86_64.rs b/src/unix/bsd/netbsdlike/openbsd/x86_64.rs index 6a825176efab8..d75b20f8fcebb 100644 --- a/src/unix/bsd/netbsdlike/openbsd/x86_64.rs +++ b/src/unix/bsd/netbsdlike/openbsd/x86_64.rs @@ -1,4 +1,4 @@ -use PT_FIRSTMACH; +use crate::{c_int, PT_FIRSTMACH}; pub type c_long = i64; pub type c_ulong = u64; @@ -7,36 +7,36 @@ pub type ucontext_t = sigcontext; s! { pub struct sigcontext { - pub sc_rdi: ::c_long, - pub sc_rsi: ::c_long, - pub sc_rdx: ::c_long, - pub sc_rcx: ::c_long, - pub sc_r8: ::c_long, - pub sc_r9: ::c_long, - pub sc_r10: ::c_long, - pub sc_r11: ::c_long, - pub sc_r12: ::c_long, - pub sc_r13: ::c_long, - pub sc_r14: ::c_long, - pub sc_r15: ::c_long, - pub sc_rbp: ::c_long, - pub sc_rbx: ::c_long, - pub sc_rax: ::c_long, - pub sc_gs: ::c_long, - pub sc_fs: ::c_long, - pub sc_es: ::c_long, - pub sc_ds: ::c_long, - pub sc_trapno: ::c_long, - pub sc_err: ::c_long, - pub sc_rip: ::c_long, - pub sc_cs: ::c_long, - pub sc_rflags: ::c_long, - pub sc_rsp: ::c_long, - pub sc_ss: ::c_long, + pub sc_rdi: c_long, + pub sc_rsi: c_long, + pub sc_rdx: c_long, + pub sc_rcx: c_long, + pub sc_r8: c_long, + pub sc_r9: c_long, + pub sc_r10: c_long, + pub sc_r11: c_long, + pub sc_r12: c_long, + pub sc_r13: c_long, + pub sc_r14: c_long, + pub sc_r15: c_long, + pub sc_rbp: c_long, + pub sc_rbx: c_long, + pub sc_rax: c_long, + pub sc_gs: c_long, + pub sc_fs: c_long, + pub sc_es: c_long, + pub sc_ds: c_long, + pub sc_trapno: c_long, + pub sc_err: c_long, + pub sc_rip: c_long, + pub sc_cs: c_long, + pub sc_rflags: c_long, + pub sc_rsp: c_long, + pub sc_ss: c_long, pub sc_fpstate: *mut fxsave64, - __sc_unused: ::c_int, - pub sc_mask: ::c_int, - pub sc_cookie: ::c_long, + __sc_unused: c_int, + pub sc_mask: c_int, + pub sc_cookie: c_long, } } @@ -83,8 +83,8 @@ cfg_if! { } } impl Eq for fxsave64 {} - impl ::fmt::Debug for fxsave64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fxsave64 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fxsave64") .field("fx_fcw", &{ self.fx_fcw }) .field("fx_fsw", &{ self.fx_fsw }) @@ -99,8 +99,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fxsave64 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fxsave64 { + fn hash(&self, state: &mut H) { { self.fx_fcw }.hash(state); { self.fx_fsw }.hash(state); { self.fx_ftw }.hash(state); @@ -116,12 +116,12 @@ cfg_if! { } } -pub(crate) const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; +pub(crate) const _ALIGNBYTES: usize = crate::mem::size_of::() - 1; pub const _MAX_PAGE_SHIFT: u32 = 12; -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; -pub const PT_GETFPREGS: ::c_int = PT_FIRSTMACH + 3; -pub const PT_SETFPREGS: ::c_int = PT_FIRSTMACH + 4; +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; +pub const PT_GETFPREGS: c_int = PT_FIRSTMACH + 3; +pub const PT_SETFPREGS: c_int = PT_FIRSTMACH + 4; diff --git a/src/unix/haiku/b32.rs b/src/unix/haiku/b32.rs index 073ae9d4b58e2..c1135c834ef8b 100644 --- a/src/unix/haiku/b32.rs +++ b/src/unix/haiku/b32.rs @@ -2,19 +2,19 @@ pub type c_long = i32; pub type c_ulong = u32; pub type time_t = i32; -pub type Elf_Addr = ::Elf32_Addr; -pub type Elf_Half = ::Elf32_Half; -pub type Elf_Phdr = ::Elf32_Phdr; +pub type Elf_Addr = crate::Elf32_Addr; +pub type Elf_Half = crate::Elf32_Half; +pub type Elf_Phdr = crate::Elf32_Phdr; s! { pub struct Elf32_Phdr { - pub p_type: ::Elf32_Word, - pub p_offset: ::Elf32_Off, - pub p_vaddr: ::Elf32_Addr, - pub p_paddr: ::Elf32_Addr, - pub p_filesz: ::Elf32_Word, - pub p_memsz: ::Elf32_Word, - pub p_flags: ::Elf32_Word, - pub p_align: ::Elf32_Word, + pub p_type: crate::Elf32_Word, + pub p_offset: crate::Elf32_Off, + pub p_vaddr: crate::Elf32_Addr, + pub p_paddr: crate::Elf32_Addr, + pub p_filesz: crate::Elf32_Word, + pub p_memsz: crate::Elf32_Word, + pub p_flags: crate::Elf32_Word, + pub p_align: crate::Elf32_Word, } } diff --git a/src/unix/haiku/b64.rs b/src/unix/haiku/b64.rs index 456918052d289..96617042cf2ab 100644 --- a/src/unix/haiku/b64.rs +++ b/src/unix/haiku/b64.rs @@ -2,19 +2,19 @@ pub type c_ulong = u64; pub type c_long = i64; pub type time_t = i64; -pub type Elf_Addr = ::Elf64_Addr; -pub type Elf_Half = ::Elf64_Half; -pub type Elf_Phdr = ::Elf64_Phdr; +pub type Elf_Addr = crate::Elf64_Addr; +pub type Elf_Half = crate::Elf64_Half; +pub type Elf_Phdr = crate::Elf64_Phdr; s! { pub struct Elf64_Phdr { - pub p_type: ::Elf64_Word, - pub p_flags: ::Elf64_Word, - pub p_offset: ::Elf64_Off, - pub p_vaddr: ::Elf64_Addr, - pub p_paddr: ::Elf64_Addr, - pub p_filesz: ::Elf64_Xword, - pub p_memsz: ::Elf64_Xword, - pub p_align: ::Elf64_Xword, + pub p_type: crate::Elf64_Word, + pub p_flags: crate::Elf64_Word, + pub p_offset: crate::Elf64_Off, + pub p_vaddr: crate::Elf64_Addr, + pub p_paddr: crate::Elf64_Addr, + pub p_filesz: crate::Elf64_Xword, + pub p_memsz: crate::Elf64_Xword, + pub p_align: crate::Elf64_Xword, } } diff --git a/src/unix/haiku/mod.rs b/src/unix/haiku/mod.rs index fc90201518dc1..0b63a51412093 100644 --- a/src/unix/haiku/mod.rs +++ b/src/unix/haiku/mod.rs @@ -1,9 +1,13 @@ -pub type rlim_t = ::uintptr_t; +use crate::{ + c_double, c_int, c_short, c_uchar, c_uint, c_ushort, c_void, intptr_t, size_t, ssize_t, +}; + +pub type rlim_t = crate::uintptr_t; pub type sa_family_t = u8; -pub type pthread_key_t = ::c_int; -pub type nfds_t = ::c_ulong; -pub type tcflag_t = ::c_uint; -pub type speed_t = ::c_uchar; +pub type pthread_key_t = c_int; +pub type nfds_t = c_ulong; +pub type tcflag_t = c_uint; +pub type speed_t = c_uchar; pub type c_char = i8; pub type clock_t = i32; pub type clockid_t = i32; @@ -18,19 +22,19 @@ pub type mode_t = u32; pub type nlink_t = i32; pub type useconds_t = u32; pub type socklen_t = u32; -pub type pthread_t = ::uintptr_t; -pub type pthread_condattr_t = ::uintptr_t; -pub type pthread_mutexattr_t = ::uintptr_t; -pub type pthread_rwlockattr_t = ::uintptr_t; +pub type pthread_t = crate::uintptr_t; +pub type pthread_condattr_t = crate::uintptr_t; +pub type pthread_mutexattr_t = crate::uintptr_t; +pub type pthread_rwlockattr_t = crate::uintptr_t; pub type sigset_t = u64; pub type fsblkcnt_t = i64; pub type fsfilcnt_t = i64; -pub type pthread_attr_t = *mut ::c_void; -pub type nl_item = ::c_int; +pub type pthread_attr_t = *mut c_void; +pub type nl_item = c_int; pub type id_t = i32; -pub type idtype_t = ::c_int; +pub type idtype_t = c_int; pub type fd_mask = u32; -pub type regoff_t = ::c_int; +pub type regoff_t = c_int; pub type key_t = i32; pub type msgqnum_t = u32; pub type msglen_t = u32; @@ -50,43 +54,43 @@ pub type Elf64_Word = u32; pub type Elf64_Xword = u64; pub type ENTRY = entry; -pub type ACTION = ::c_int; +pub type ACTION = c_int; -pub type posix_spawnattr_t = *mut ::c_void; -pub type posix_spawn_file_actions_t = *mut ::c_void; +pub type posix_spawnattr_t = *mut c_void; +pub type posix_spawn_file_actions_t = *mut c_void; pub type StringList = _stringlist; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.si_status } } s! { pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct ip_mreq { @@ -103,8 +107,8 @@ s! { pub struct sockaddr_in { pub sin_len: u8, pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [i8; 24], } @@ -113,29 +117,29 @@ s! { pub sin6_family: u8, pub sin6_port: u16, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, pub ai_addrlen: socklen_t, pub ai_canonname: *mut c_char, - pub ai_addr: *mut ::sockaddr, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, - pub ifa_name: *const ::c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_dstaddr: *mut ::sockaddr, - pub ifa_data: *mut ::c_void, + pub ifa_name: *const c_char, + pub ifa_flags: c_uint, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_dstaddr: *mut crate::sockaddr, + pub ifa_data: *mut c_void, } pub struct fd_set { @@ -144,94 +148,94 @@ s! { } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_int, - pub tm_zone: *mut ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_int, + pub tm_zone: *mut c_char, } pub struct utsname { - pub sysname: [::c_char; 32], - pub nodename: [::c_char; 32], - pub release: [::c_char; 32], - pub version: [::c_char; 32], - pub machine: [::c_char; 32], + pub sysname: [c_char; 32], + pub nodename: [c_char; 32], + pub release: [c_char; 32], + pub version: [c_char; 32], + pub machine: [c_char; 32], } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct msghdr { - pub msg_name: *mut ::c_void, + pub msg_name: *mut c_void, pub msg_namelen: socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, pub msg_controllen: socklen_t, - pub msg_flags: ::c_int, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::c_char, - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: c_char, + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct stat { @@ -239,8 +243,8 @@ s! { pub st_ino: ino_t, pub st_mode: mode_t, pub st_nlink: nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, pub st_size: off_t, pub st_rdev: dev_t, pub st_blksize: blksize_t, @@ -257,18 +261,18 @@ s! { } pub struct glob_t { - pub gl_pathc: ::size_t, - __unused1: ::size_t, - pub gl_offs: ::size_t, - __unused2: ::size_t, + pub gl_pathc: size_t, + __unused1: size_t, + pub gl_offs: size_t, + __unused2: size_t, pub gl_pathv: *mut *mut c_char, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, - __unused6: *mut ::c_void, - __unused7: *mut ::c_void, - __unused8: *mut ::c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, + __unused6: *mut c_void, + __unused7: *mut c_void, + __unused8: *mut c_void, } pub struct pthread_mutex_t { @@ -282,7 +286,7 @@ s! { pub struct pthread_cond_t { flags: u32, unused: i32, - mutex: *mut ::c_void, + mutex: *mut c_void, waiter_count: i32, lock: i32, } @@ -294,7 +298,7 @@ s! { lock_count: i32, reader_count: i32, writer_count: i32, - waiters: [*mut ::c_void; 2], + waiters: [*mut c_void; 2], } pub struct pthread_spinlock_t { @@ -302,52 +306,52 @@ s! { } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, - pub pw_gecos: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, + pub pw_gecos: *mut c_char, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub si_pid: ::pid_t, - pub si_uid: ::uid_t, - pub si_addr: *mut ::c_void, - pub si_status: ::c_int, + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + pub si_pid: crate::pid_t, + pub si_uid: crate::uid_t, + pub si_addr: *mut c_void, + pub si_status: c_int, pub si_band: c_long, - pub sigval: *mut ::c_void, + pub sigval: *mut c_void, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, //actually a union with sa_handler - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - sa_userdata: *mut ::c_void, + pub sa_sigaction: crate::sighandler_t, //actually a union with sa_handler + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + sa_userdata: *mut c_void, } pub struct sem_t { @@ -357,9 +361,9 @@ s! { } pub struct ucred { - pub pid: ::pid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, + pub pid: crate::pid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, } pub struct sockaddr_dl { @@ -375,25 +379,25 @@ s! { } pub struct spwd { - pub sp_namp: *mut ::c_char, - pub sp_pwdp: *mut ::c_char, - pub sp_lstchg: ::c_int, - pub sp_min: ::c_int, - pub sp_max: ::c_int, - pub sp_warn: ::c_int, - pub sp_inact: ::c_int, - pub sp_expire: ::c_int, - pub sp_flag: ::c_int, + pub sp_namp: *mut c_char, + pub sp_pwdp: *mut c_char, + pub sp_lstchg: c_int, + pub sp_min: c_int, + pub sp_max: c_int, + pub sp_warn: c_int, + pub sp_inact: c_int, + pub sp_expire: c_int, + pub sp_flag: c_int, } pub struct regex_t { - __buffer: *mut ::c_void, - __allocated: ::size_t, - __used: ::size_t, - __syntax: ::c_ulong, - __fastmap: *mut ::c_char, - __translate: *mut ::c_char, - __re_nsub: ::size_t, + __buffer: *mut c_void, + __allocated: size_t, + __used: size_t, + __syntax: c_ulong, + __fastmap: *mut c_char, + __translate: *mut c_char, + __re_nsub: size_t, __bitfield: u8, } @@ -403,54 +407,54 @@ s! { } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, + pub msg_perm: crate::ipc_perm, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, } pub struct ipc_perm { - pub key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, + pub key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct entry { - pub key: *mut ::c_char, - pub data: *mut ::c_void, + pub key: *mut c_char, + pub data: *mut c_void, } pub struct option { - pub name: *const ::c_char, - pub has_arg: ::c_int, - pub flag: *mut ::c_int, - pub val: ::c_int, + pub name: *const c_char, + pub has_arg: c_int, + pub flag: *mut c_int, + pub val: c_int, } pub struct _stringlist { - pub sl_str: *mut *mut ::c_char, - pub sl_max: ::size_t, - pub sl_cur: ::size_t, + pub sl_str: *mut *mut c_char, + pub sl_max: size_t, + pub sl_cur: size_t, } pub struct dl_phdr_info { - pub dlpi_addr: ::Elf_Addr, - pub dlpi_name: *const ::c_char, - pub dlpi_phdr: *const ::Elf_Phdr, - pub dlpi_phnum: ::Elf_Half, + pub dlpi_addr: crate::Elf_Addr, + pub dlpi_name: *const c_char, + pub dlpi_phdr: *const crate::Elf_Phdr, + pub dlpi_phnum: crate::Elf_Half, } } @@ -458,7 +462,7 @@ s_no_extra_traits! { pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, - pub sun_path: [::c_char; 126], + pub sun_path: [c_char; 126], } pub struct sockaddr_storage { pub ss_len: u8, @@ -472,27 +476,27 @@ s_no_extra_traits! { pub d_pdev: dev_t, pub d_ino: ino_t, pub d_pino: i64, - pub d_reclen: ::c_ushort, - pub d_name: [::c_char; 1024], // Max length is _POSIX_PATH_MAX + pub d_reclen: c_ushort, + pub d_name: [c_char; 1024], // Max length is _POSIX_PATH_MAX } pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, - __unused1: *mut ::c_void, // actually a function pointer - pub sigev_notify_attributes: *mut ::pthread_attr_t, + pub sigev_notify: c_int, + pub sigev_signo: c_int, + pub sigev_value: crate::sigval, + __unused1: *mut c_void, // actually a function pointer + pub sigev_notify_attributes: *mut crate::pthread_attr_t, } pub struct utmpx { - pub ut_type: ::c_short, - pub ut_tv: ::timeval, - pub ut_id: [::c_char; 8], - pub ut_pid: ::pid_t, - pub ut_user: [::c_char; 32], - pub ut_line: [::c_char; 16], - pub ut_host: [::c_char; 128], - __ut_reserved: [::c_char; 64], + pub ut_type: c_short, + pub ut_tv: crate::timeval, + pub ut_id: [c_char; 8], + pub ut_pid: crate::pid_t, + pub ut_user: [c_char; 32], + pub ut_line: [c_char; 16], + pub ut_host: [c_char; 128], + __ut_reserved: [c_char; 64], } } @@ -517,8 +521,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_type", &self.ut_type) .field("ut_tv", &self.ut_tv) @@ -532,8 +536,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_type.hash(state); self.ut_tv.hash(state); self.ut_id.hash(state); @@ -556,8 +560,8 @@ cfg_if! { } } impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_len", &self.sun_len) .field("sun_family", &self.sun_family) @@ -565,8 +569,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_len.hash(state); self.sun_family.hash(state); self.sun_path.hash(state); @@ -591,8 +595,8 @@ cfg_if! { } } impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -602,8 +606,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_len.hash(state); self.ss_family.hash(state); self.__ss_pad1.hash(state); @@ -627,8 +631,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_dev", &self.d_dev) .field("d_pdev", &self.d_pdev) @@ -639,8 +643,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_dev.hash(state); self.d_pdev.hash(state); self.d_ino.hash(state); @@ -659,8 +663,8 @@ cfg_if! { } } impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -669,8 +673,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_notify.hash(state); self.sigev_signo.hash(state); self.sigev_value.hash(state); @@ -680,596 +684,596 @@ cfg_if! { } } -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const L_SET: ::c_int = SEEK_SET; -pub const L_INCR: ::c_int = SEEK_CUR; -pub const L_XTND: ::c_int = SEEK_END; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; - -pub const F_DUPFD: ::c_int = 0x0001; -pub const F_GETFD: ::c_int = 0x0002; -pub const F_SETFD: ::c_int = 0x0004; -pub const F_GETFL: ::c_int = 0x0008; -pub const F_SETFL: ::c_int = 0x0010; -pub const F_GETLK: ::c_int = 0x0020; -pub const F_SETLK: ::c_int = 0x0080; -pub const F_SETLKW: ::c_int = 0x0100; -pub const F_DUPFD_CLOEXEC: ::c_int = 0x0200; - -pub const F_RDLCK: ::c_int = 0x0040; -pub const F_UNLCK: ::c_int = 0x0200; -pub const F_WRLCK: ::c_int = 0x0400; - -pub const AT_FDCWD: ::c_int = -100; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x01; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x02; -pub const AT_REMOVEDIR: ::c_int = 0x04; -pub const AT_EACCESS: ::c_int = 0x08; - -pub const POLLIN: ::c_short = 0x0001; -pub const POLLOUT: ::c_short = 0x0002; -pub const POLLRDNORM: ::c_short = POLLIN; -pub const POLLWRNORM: ::c_short = POLLOUT; -pub const POLLRDBAND: ::c_short = 0x0008; -pub const POLLWRBAND: ::c_short = 0x0010; -pub const POLLPRI: ::c_short = 0x0020; -pub const POLLERR: ::c_short = 0x0004; -pub const POLLHUP: ::c_short = 0x0080; -pub const POLLNVAL: ::c_short = 0x1000; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const CLOCK_REALTIME: ::c_int = -1; -pub const CLOCK_MONOTONIC: ::c_int = 0; -pub const CLOCK_PROCESS_CPUTIME_ID: ::c_int = -2; -pub const CLOCK_THREAD_CPUTIME_ID: ::c_int = -3; - -pub const RLIMIT_CORE: ::c_int = 0; -pub const RLIMIT_CPU: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_FSIZE: ::c_int = 3; -pub const RLIMIT_NOFILE: ::c_int = 4; -pub const RLIMIT_STACK: ::c_int = 5; -pub const RLIMIT_AS: ::c_int = 6; -pub const RLIM_INFINITY: ::rlim_t = 0xffffffff; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 2147483647; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const L_SET: c_int = SEEK_SET; +pub const L_INCR: c_int = SEEK_CUR; +pub const L_XTND: c_int = SEEK_END; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; + +pub const F_DUPFD: c_int = 0x0001; +pub const F_GETFD: c_int = 0x0002; +pub const F_SETFD: c_int = 0x0004; +pub const F_GETFL: c_int = 0x0008; +pub const F_SETFL: c_int = 0x0010; +pub const F_GETLK: c_int = 0x0020; +pub const F_SETLK: c_int = 0x0080; +pub const F_SETLKW: c_int = 0x0100; +pub const F_DUPFD_CLOEXEC: c_int = 0x0200; + +pub const F_RDLCK: c_int = 0x0040; +pub const F_UNLCK: c_int = 0x0200; +pub const F_WRLCK: c_int = 0x0400; + +pub const AT_FDCWD: c_int = -100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x01; +pub const AT_SYMLINK_FOLLOW: c_int = 0x02; +pub const AT_REMOVEDIR: c_int = 0x04; +pub const AT_EACCESS: c_int = 0x08; + +pub const POLLIN: c_short = 0x0001; +pub const POLLOUT: c_short = 0x0002; +pub const POLLRDNORM: c_short = POLLIN; +pub const POLLWRNORM: c_short = POLLOUT; +pub const POLLRDBAND: c_short = 0x0008; +pub const POLLWRBAND: c_short = 0x0010; +pub const POLLPRI: c_short = 0x0020; +pub const POLLERR: c_short = 0x0004; +pub const POLLHUP: c_short = 0x0080; +pub const POLLNVAL: c_short = 0x1000; + +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 1; + +pub const CLOCK_REALTIME: c_int = -1; +pub const CLOCK_MONOTONIC: c_int = 0; +pub const CLOCK_PROCESS_CPUTIME_ID: c_int = -2; +pub const CLOCK_THREAD_CPUTIME_ID: c_int = -3; + +pub const RLIMIT_CORE: c_int = 0; +pub const RLIMIT_CPU: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_FSIZE: c_int = 3; +pub const RLIMIT_NOFILE: c_int = 4; +pub const RLIMIT_STACK: c_int = 5; +pub const RLIMIT_AS: c_int = 6; +pub const RLIM_INFINITY: crate::rlim_t = 0xffffffff; // Haiku specific -pub const RLIMIT_NOVMON: ::c_int = 7; +pub const RLIMIT_NOVMON: c_int = 7; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 8; +pub const RLIM_NLIMITS: c_int = 8; -pub const RUSAGE_SELF: ::c_int = 0; +pub const RUSAGE_SELF: c_int = 0; -pub const RTLD_LAZY: ::c_int = 0; +pub const RTLD_LAZY: c_int = 0; pub const NCCS: usize = 11; -pub const O_RDONLY: ::c_int = 0x0000; -pub const O_WRONLY: ::c_int = 0x0001; -pub const O_RDWR: ::c_int = 0x0002; -pub const O_ACCMODE: ::c_int = 0x0003; - -pub const O_EXCL: ::c_int = 0x0100; -pub const O_CREAT: ::c_int = 0x0200; -pub const O_TRUNC: ::c_int = 0x0400; -pub const O_NOCTTY: ::c_int = 0x1000; -pub const O_NOTRAVERSE: ::c_int = 0x2000; - -pub const O_CLOEXEC: ::c_int = 0x00000040; -pub const O_NONBLOCK: ::c_int = 0x00000080; -pub const O_APPEND: ::c_int = 0x00000800; -pub const O_SYNC: ::c_int = 0x00010000; -pub const O_RSYNC: ::c_int = 0x00020000; -pub const O_DSYNC: ::c_int = 0x00040000; -pub const O_NOFOLLOW: ::c_int = 0x00080000; -pub const O_NOCACHE: ::c_int = 0x00100000; -pub const O_DIRECTORY: ::c_int = 0x00200000; - -pub const S_IFIFO: ::mode_t = 0o1_0000; -pub const S_IFCHR: ::mode_t = 0o2_0000; -pub const S_IFBLK: ::mode_t = 0o6_0000; -pub const S_IFDIR: ::mode_t = 0o4_0000; -pub const S_IFREG: ::mode_t = 0o10_0000; -pub const S_IFLNK: ::mode_t = 0o12_0000; -pub const S_IFSOCK: ::mode_t = 0o14_0000; -pub const S_IFMT: ::mode_t = 0o17_0000; - -pub const S_IRWXU: ::mode_t = 0o0700; -pub const S_IRUSR: ::mode_t = 0o0400; -pub const S_IWUSR: ::mode_t = 0o0200; -pub const S_IXUSR: ::mode_t = 0o0100; -pub const S_IRWXG: ::mode_t = 0o0070; -pub const S_IRGRP: ::mode_t = 0o0040; -pub const S_IWGRP: ::mode_t = 0o0020; -pub const S_IXGRP: ::mode_t = 0o0010; -pub const S_IRWXO: ::mode_t = 0o0007; -pub const S_IROTH: ::mode_t = 0o0004; -pub const S_IWOTH: ::mode_t = 0o0002; -pub const S_IXOTH: ::mode_t = 0o0001; - -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; - -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGCHLD: ::c_int = 5; -pub const SIGABRT: ::c_int = 6; -pub const SIGPIPE: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSTOP: ::c_int = 10; -pub const SIGSEGV: ::c_int = 11; -pub const SIGCONT: ::c_int = 12; -pub const SIGTSTP: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGTTIN: ::c_int = 16; -pub const SIGTTOU: ::c_int = 17; -pub const SIGUSR1: ::c_int = 18; -pub const SIGUSR2: ::c_int = 19; -pub const SIGWINCH: ::c_int = 20; -pub const SIGKILLTHR: ::c_int = 21; -pub const SIGTRAP: ::c_int = 22; -pub const SIGPOLL: ::c_int = 23; -pub const SIGPROF: ::c_int = 24; -pub const SIGSYS: ::c_int = 25; -pub const SIGURG: ::c_int = 26; -pub const SIGVTALRM: ::c_int = 27; -pub const SIGXCPU: ::c_int = 28; -pub const SIGXFSZ: ::c_int = 29; -pub const SIGBUS: ::c_int = 30; - -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; -pub const SIG_SETMASK: ::c_int = 3; - -pub const SIGEV_NONE: ::c_int = 0; -pub const SIGEV_SIGNAL: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 2; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const LC_ALL: ::c_int = 0; -pub const LC_COLLATE: ::c_int = 1; -pub const LC_CTYPE: ::c_int = 2; -pub const LC_MONETARY: ::c_int = 3; -pub const LC_NUMERIC: ::c_int = 4; -pub const LC_TIME: ::c_int = 5; -pub const LC_MESSAGES: ::c_int = 6; +pub const O_RDONLY: c_int = 0x0000; +pub const O_WRONLY: c_int = 0x0001; +pub const O_RDWR: c_int = 0x0002; +pub const O_ACCMODE: c_int = 0x0003; + +pub const O_EXCL: c_int = 0x0100; +pub const O_CREAT: c_int = 0x0200; +pub const O_TRUNC: c_int = 0x0400; +pub const O_NOCTTY: c_int = 0x1000; +pub const O_NOTRAVERSE: c_int = 0x2000; + +pub const O_CLOEXEC: c_int = 0x00000040; +pub const O_NONBLOCK: c_int = 0x00000080; +pub const O_APPEND: c_int = 0x00000800; +pub const O_SYNC: c_int = 0x00010000; +pub const O_RSYNC: c_int = 0x00020000; +pub const O_DSYNC: c_int = 0x00040000; +pub const O_NOFOLLOW: c_int = 0x00080000; +pub const O_NOCACHE: c_int = 0x00100000; +pub const O_DIRECTORY: c_int = 0x00200000; + +pub const S_IFIFO: crate::mode_t = 0o1_0000; +pub const S_IFCHR: crate::mode_t = 0o2_0000; +pub const S_IFBLK: crate::mode_t = 0o6_0000; +pub const S_IFDIR: crate::mode_t = 0o4_0000; +pub const S_IFREG: crate::mode_t = 0o10_0000; +pub const S_IFLNK: crate::mode_t = 0o12_0000; +pub const S_IFSOCK: crate::mode_t = 0o14_0000; +pub const S_IFMT: crate::mode_t = 0o17_0000; + +pub const S_IRWXU: crate::mode_t = 0o0700; +pub const S_IRUSR: crate::mode_t = 0o0400; +pub const S_IWUSR: crate::mode_t = 0o0200; +pub const S_IXUSR: crate::mode_t = 0o0100; +pub const S_IRWXG: crate::mode_t = 0o0070; +pub const S_IRGRP: crate::mode_t = 0o0040; +pub const S_IWGRP: crate::mode_t = 0o0020; +pub const S_IXGRP: crate::mode_t = 0o0010; +pub const S_IRWXO: crate::mode_t = 0o0007; +pub const S_IROTH: crate::mode_t = 0o0004; +pub const S_IWOTH: crate::mode_t = 0o0002; +pub const S_IXOTH: crate::mode_t = 0o0001; + +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; + +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGCHLD: c_int = 5; +pub const SIGABRT: c_int = 6; +pub const SIGPIPE: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSTOP: c_int = 10; +pub const SIGSEGV: c_int = 11; +pub const SIGCONT: c_int = 12; +pub const SIGTSTP: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGTTIN: c_int = 16; +pub const SIGTTOU: c_int = 17; +pub const SIGUSR1: c_int = 18; +pub const SIGUSR2: c_int = 19; +pub const SIGWINCH: c_int = 20; +pub const SIGKILLTHR: c_int = 21; +pub const SIGTRAP: c_int = 22; +pub const SIGPOLL: c_int = 23; +pub const SIGPROF: c_int = 24; +pub const SIGSYS: c_int = 25; +pub const SIGURG: c_int = 26; +pub const SIGVTALRM: c_int = 27; +pub const SIGXCPU: c_int = 28; +pub const SIGXFSZ: c_int = 29; +pub const SIGBUS: c_int = 30; + +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; +pub const SIG_SETMASK: c_int = 3; + +pub const SIGEV_NONE: c_int = 0; +pub const SIGEV_SIGNAL: c_int = 1; +pub const SIGEV_THREAD: c_int = 2; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NODATA: c_int = 7; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; + +pub const LC_ALL: c_int = 0; +pub const LC_COLLATE: c_int = 1; +pub const LC_CTYPE: c_int = 2; +pub const LC_MONETARY: c_int = 3; +pub const LC_NUMERIC: c_int = 4; +pub const LC_TIME: c_int = 5; +pub const LC_MESSAGES: c_int = 6; // FIXME: Haiku does not have MAP_FILE, but library/std/os.rs requires it -pub const MAP_FILE: ::c_int = 0x00; -pub const MAP_SHARED: ::c_int = 0x01; -pub const MAP_PRIVATE: ::c_int = 0x02; -pub const MAP_FIXED: ::c_int = 0x04; -pub const MAP_ANONYMOUS: ::c_int = 0x08; -pub const MAP_NORESERVE: ::c_int = 0x10; -pub const MAP_ANON: ::c_int = MAP_ANONYMOUS; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MS_ASYNC: ::c_int = 0x01; -pub const MS_INVALIDATE: ::c_int = 0x04; -pub const MS_SYNC: ::c_int = 0x02; - -pub const E2BIG: ::c_int = -2147454975; -pub const ECHILD: ::c_int = -2147454974; -pub const EDEADLK: ::c_int = -2147454973; -pub const EFBIG: ::c_int = -2147454972; -pub const EMLINK: ::c_int = -2147454971; -pub const ENFILE: ::c_int = -2147454970; -pub const ENODEV: ::c_int = -2147454969; -pub const ENOLCK: ::c_int = -2147454968; -pub const ENOSYS: ::c_int = -2147454967; -pub const ENOTTY: ::c_int = -2147454966; -pub const ENXIO: ::c_int = -2147454965; -pub const ESPIPE: ::c_int = -2147454964; -pub const ESRCH: ::c_int = -2147454963; -pub const EFPOS: ::c_int = -2147454962; -pub const ESIGPARM: ::c_int = -2147454961; -pub const EDOM: ::c_int = -2147454960; -pub const ERANGE: ::c_int = -2147454959; -pub const EPROTOTYPE: ::c_int = -2147454958; -pub const EPROTONOSUPPORT: ::c_int = -2147454957; -pub const EPFNOSUPPORT: ::c_int = -2147454956; -pub const EAFNOSUPPORT: ::c_int = -2147454955; -pub const EADDRINUSE: ::c_int = -2147454954; -pub const EADDRNOTAVAIL: ::c_int = -2147454953; -pub const ENETDOWN: ::c_int = -2147454952; -pub const ENETUNREACH: ::c_int = -2147454951; -pub const ENETRESET: ::c_int = -2147454950; -pub const ECONNABORTED: ::c_int = -2147454949; -pub const ECONNRESET: ::c_int = -2147454948; -pub const EISCONN: ::c_int = -2147454947; -pub const ENOTCONN: ::c_int = -2147454946; -pub const ESHUTDOWN: ::c_int = -2147454945; -pub const ECONNREFUSED: ::c_int = -2147454944; -pub const EHOSTUNREACH: ::c_int = -2147454943; -pub const ENOPROTOOPT: ::c_int = -2147454942; -pub const ENOBUFS: ::c_int = -2147454941; -pub const EINPROGRESS: ::c_int = -2147454940; -pub const EALREADY: ::c_int = -2147454939; -pub const EILSEQ: ::c_int = -2147454938; -pub const ENOMSG: ::c_int = -2147454937; -pub const ESTALE: ::c_int = -2147454936; -pub const EOVERFLOW: ::c_int = -2147454935; -pub const EMSGSIZE: ::c_int = -2147454934; -pub const EOPNOTSUPP: ::c_int = -2147454933; -pub const ENOTSOCK: ::c_int = -2147454932; -pub const EHOSTDOWN: ::c_int = -2147454931; -pub const EBADMSG: ::c_int = -2147454930; -pub const ECANCELED: ::c_int = -2147454929; -pub const EDESTADDRREQ: ::c_int = -2147454928; -pub const EDQUOT: ::c_int = -2147454927; -pub const EIDRM: ::c_int = -2147454926; -pub const EMULTIHOP: ::c_int = -2147454925; -pub const ENODATA: ::c_int = -2147454924; -pub const ENOLINK: ::c_int = -2147454923; -pub const ENOSR: ::c_int = -2147454922; -pub const ENOSTR: ::c_int = -2147454921; -pub const ENOTSUP: ::c_int = -2147454920; -pub const EPROTO: ::c_int = -2147454919; -pub const ETIME: ::c_int = -2147454918; -pub const ETXTBSY: ::c_int = -2147454917; -pub const ENOATTR: ::c_int = -2147454916; +pub const MAP_FILE: c_int = 0x00; +pub const MAP_SHARED: c_int = 0x01; +pub const MAP_PRIVATE: c_int = 0x02; +pub const MAP_FIXED: c_int = 0x04; +pub const MAP_ANONYMOUS: c_int = 0x08; +pub const MAP_NORESERVE: c_int = 0x10; +pub const MAP_ANON: c_int = MAP_ANONYMOUS; + +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; + +pub const MS_ASYNC: c_int = 0x01; +pub const MS_INVALIDATE: c_int = 0x04; +pub const MS_SYNC: c_int = 0x02; + +pub const E2BIG: c_int = -2147454975; +pub const ECHILD: c_int = -2147454974; +pub const EDEADLK: c_int = -2147454973; +pub const EFBIG: c_int = -2147454972; +pub const EMLINK: c_int = -2147454971; +pub const ENFILE: c_int = -2147454970; +pub const ENODEV: c_int = -2147454969; +pub const ENOLCK: c_int = -2147454968; +pub const ENOSYS: c_int = -2147454967; +pub const ENOTTY: c_int = -2147454966; +pub const ENXIO: c_int = -2147454965; +pub const ESPIPE: c_int = -2147454964; +pub const ESRCH: c_int = -2147454963; +pub const EFPOS: c_int = -2147454962; +pub const ESIGPARM: c_int = -2147454961; +pub const EDOM: c_int = -2147454960; +pub const ERANGE: c_int = -2147454959; +pub const EPROTOTYPE: c_int = -2147454958; +pub const EPROTONOSUPPORT: c_int = -2147454957; +pub const EPFNOSUPPORT: c_int = -2147454956; +pub const EAFNOSUPPORT: c_int = -2147454955; +pub const EADDRINUSE: c_int = -2147454954; +pub const EADDRNOTAVAIL: c_int = -2147454953; +pub const ENETDOWN: c_int = -2147454952; +pub const ENETUNREACH: c_int = -2147454951; +pub const ENETRESET: c_int = -2147454950; +pub const ECONNABORTED: c_int = -2147454949; +pub const ECONNRESET: c_int = -2147454948; +pub const EISCONN: c_int = -2147454947; +pub const ENOTCONN: c_int = -2147454946; +pub const ESHUTDOWN: c_int = -2147454945; +pub const ECONNREFUSED: c_int = -2147454944; +pub const EHOSTUNREACH: c_int = -2147454943; +pub const ENOPROTOOPT: c_int = -2147454942; +pub const ENOBUFS: c_int = -2147454941; +pub const EINPROGRESS: c_int = -2147454940; +pub const EALREADY: c_int = -2147454939; +pub const EILSEQ: c_int = -2147454938; +pub const ENOMSG: c_int = -2147454937; +pub const ESTALE: c_int = -2147454936; +pub const EOVERFLOW: c_int = -2147454935; +pub const EMSGSIZE: c_int = -2147454934; +pub const EOPNOTSUPP: c_int = -2147454933; +pub const ENOTSOCK: c_int = -2147454932; +pub const EHOSTDOWN: c_int = -2147454931; +pub const EBADMSG: c_int = -2147454930; +pub const ECANCELED: c_int = -2147454929; +pub const EDESTADDRREQ: c_int = -2147454928; +pub const EDQUOT: c_int = -2147454927; +pub const EIDRM: c_int = -2147454926; +pub const EMULTIHOP: c_int = -2147454925; +pub const ENODATA: c_int = -2147454924; +pub const ENOLINK: c_int = -2147454923; +pub const ENOSR: c_int = -2147454922; +pub const ENOSTR: c_int = -2147454921; +pub const ENOTSUP: c_int = -2147454920; +pub const EPROTO: c_int = -2147454919; +pub const ETIME: c_int = -2147454918; +pub const ETXTBSY: c_int = -2147454917; +pub const ENOATTR: c_int = -2147454916; // INT_MIN -pub const ENOMEM: ::c_int = -2147483648; +pub const ENOMEM: c_int = -2147483648; // POSIX errors that can be mapped to BeOS error codes -pub const EACCES: ::c_int = -2147483646; -pub const EINTR: ::c_int = -2147483638; -pub const EIO: ::c_int = -2147483647; -pub const EBUSY: ::c_int = -2147483634; -pub const EFAULT: ::c_int = -2147478783; -pub const ETIMEDOUT: ::c_int = -2147483639; -pub const EAGAIN: ::c_int = -2147483637; -pub const EWOULDBLOCK: ::c_int = -2147483637; -pub const EBADF: ::c_int = -2147459072; -pub const EEXIST: ::c_int = -2147459070; -pub const EINVAL: ::c_int = -2147483643; -pub const ENAMETOOLONG: ::c_int = -2147459068; -pub const ENOENT: ::c_int = -2147459069; -pub const EPERM: ::c_int = -2147483633; -pub const ENOTDIR: ::c_int = -2147459067; -pub const EISDIR: ::c_int = -2147459063; -pub const ENOTEMPTY: ::c_int = -2147459066; -pub const ENOSPC: ::c_int = -2147459065; -pub const EROFS: ::c_int = -2147459064; -pub const EMFILE: ::c_int = -2147459062; -pub const EXDEV: ::c_int = -2147459061; -pub const ELOOP: ::c_int = -2147459060; -pub const ENOEXEC: ::c_int = -2147478782; -pub const EPIPE: ::c_int = -2147459059; - -pub const IPPROTO_RAW: ::c_int = 255; +pub const EACCES: c_int = -2147483646; +pub const EINTR: c_int = -2147483638; +pub const EIO: c_int = -2147483647; +pub const EBUSY: c_int = -2147483634; +pub const EFAULT: c_int = -2147478783; +pub const ETIMEDOUT: c_int = -2147483639; +pub const EAGAIN: c_int = -2147483637; +pub const EWOULDBLOCK: c_int = -2147483637; +pub const EBADF: c_int = -2147459072; +pub const EEXIST: c_int = -2147459070; +pub const EINVAL: c_int = -2147483643; +pub const ENAMETOOLONG: c_int = -2147459068; +pub const ENOENT: c_int = -2147459069; +pub const EPERM: c_int = -2147483633; +pub const ENOTDIR: c_int = -2147459067; +pub const EISDIR: c_int = -2147459063; +pub const ENOTEMPTY: c_int = -2147459066; +pub const ENOSPC: c_int = -2147459065; +pub const EROFS: c_int = -2147459064; +pub const EMFILE: c_int = -2147459062; +pub const EXDEV: c_int = -2147459061; +pub const ELOOP: c_int = -2147459060; +pub const ENOEXEC: c_int = -2147478782; +pub const EPIPE: c_int = -2147459059; + +pub const IPPROTO_RAW: c_int = 255; // These are prefixed with POSIX_ on Haiku -pub const MADV_NORMAL: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_RANDOM: ::c_int = 3; -pub const MADV_WILLNEED: ::c_int = 4; -pub const MADV_DONTNEED: ::c_int = 5; -pub const MADV_FREE: ::c_int = 6; +pub const MADV_NORMAL: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_RANDOM: c_int = 3; +pub const MADV_WILLNEED: c_int = 4; +pub const MADV_DONTNEED: c_int = 5; +pub const MADV_FREE: c_int = 6; // https://github.com/haiku/haiku/blob/HEAD/headers/posix/net/if.h#L80 -pub const IFF_UP: ::c_int = 0x0001; -pub const IFF_BROADCAST: ::c_int = 0x0002; // valid broadcast address -pub const IFF_LOOPBACK: ::c_int = 0x0008; -pub const IFF_POINTOPOINT: ::c_int = 0x0010; // point-to-point link -pub const IFF_NOARP: ::c_int = 0x0040; // no address resolution -pub const IFF_AUTOUP: ::c_int = 0x0080; // auto dial -pub const IFF_PROMISC: ::c_int = 0x0100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x0200; // receive all multicast packets -pub const IFF_SIMPLEX: ::c_int = 0x0800; // doesn't receive own transmissions -pub const IFF_LINK: ::c_int = 0x1000; // has link -pub const IFF_AUTO_CONFIGURED: ::c_int = 0x2000; -pub const IFF_CONFIGURING: ::c_int = 0x4000; -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_INET: ::c_int = 1; -pub const AF_APPLETALK: ::c_int = 2; -pub const AF_ROUTE: ::c_int = 3; -pub const AF_LINK: ::c_int = 4; -pub const AF_INET6: ::c_int = 5; -pub const AF_DLI: ::c_int = 6; -pub const AF_IPX: ::c_int = 7; -pub const AF_NOTIFY: ::c_int = 8; -pub const AF_LOCAL: ::c_int = 9; -pub const AF_UNIX: ::c_int = AF_LOCAL; -pub const AF_BLUETOOTH: ::c_int = 10; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_LINK: ::c_int = AF_LINK; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_UNIX: ::c_int = AF_UNIX; -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; - -pub const IP_OPTIONS: ::c_int = 1; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_TOS: ::c_int = 3; -pub const IP_TTL: ::c_int = 4; -pub const IP_RECVOPTS: ::c_int = 5; -pub const IP_RECVRETOPTS: ::c_int = 6; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_RETOPTS: ::c_int = 8; -pub const IP_MULTICAST_IF: ::c_int = 9; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IP_BLOCK_SOURCE: ::c_int = 14; -pub const IP_UNBLOCK_SOURCE: ::c_int = 15; -pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 16; -pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 17; - -pub const TCP_NODELAY: ::c_int = 0x01; -pub const TCP_MAXSEG: ::c_int = 0x02; -pub const TCP_NOPUSH: ::c_int = 0x04; -pub const TCP_NOOPT: ::c_int = 0x08; - -pub const IF_NAMESIZE: ::size_t = 32; -pub const IFNAMSIZ: ::size_t = IF_NAMESIZE; - -pub const IPV6_MULTICAST_IF: ::c_int = 24; -pub const IPV6_MULTICAST_HOPS: ::c_int = 25; -pub const IPV6_MULTICAST_LOOP: ::c_int = 26; -pub const IPV6_UNICAST_HOPS: ::c_int = 27; -pub const IPV6_JOIN_GROUP: ::c_int = 28; -pub const IPV6_LEAVE_GROUP: ::c_int = 29; -pub const IPV6_V6ONLY: ::c_int = 30; -pub const IPV6_PKTINFO: ::c_int = 31; -pub const IPV6_RECVPKTINFO: ::c_int = 32; -pub const IPV6_HOPLIMIT: ::c_int = 33; -pub const IPV6_RECVHOPLIMIT: ::c_int = 34; -pub const IPV6_HOPOPTS: ::c_int = 35; -pub const IPV6_DSTOPTS: ::c_int = 36; -pub const IPV6_RTHDR: ::c_int = 37; - -pub const MSG_OOB: ::c_int = 0x0001; -pub const MSG_PEEK: ::c_int = 0x0002; -pub const MSG_DONTROUTE: ::c_int = 0x0004; -pub const MSG_EOR: ::c_int = 0x0008; -pub const MSG_TRUNC: ::c_int = 0x0010; -pub const MSG_CTRUNC: ::c_int = 0x0020; -pub const MSG_WAITALL: ::c_int = 0x0040; -pub const MSG_DONTWAIT: ::c_int = 0x0080; -pub const MSG_BCAST: ::c_int = 0x0100; -pub const MSG_MCAST: ::c_int = 0x0200; -pub const MSG_EOF: ::c_int = 0x0400; -pub const MSG_NOSIGNAL: ::c_int = 0x0800; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 0x01; -pub const LOCK_EX: ::c_int = 0x02; -pub const LOCK_NB: ::c_int = 0x04; -pub const LOCK_UN: ::c_int = 0x08; - -pub const MINSIGSTKSZ: ::size_t = 8192; -pub const SIGSTKSZ: ::size_t = 16384; - -pub const IOV_MAX: ::c_int = 1024; -pub const PATH_MAX: ::c_int = 1024; - -pub const SA_NOCLDSTOP: ::c_int = 0x01; -pub const SA_NOCLDWAIT: ::c_int = 0x02; -pub const SA_RESETHAND: ::c_int = 0x04; -pub const SA_NODEFER: ::c_int = 0x08; -pub const SA_RESTART: ::c_int = 0x10; -pub const SA_ONSTACK: ::c_int = 0x20; -pub const SA_SIGINFO: ::c_int = 0x40; -pub const SA_NOMASK: ::c_int = SA_NODEFER; -pub const SA_STACK: ::c_int = SA_ONSTACK; -pub const SA_ONESHOT: ::c_int = SA_RESETHAND; - -pub const SS_ONSTACK: ::c_int = 0x1; -pub const SS_DISABLE: ::c_int = 0x2; - -pub const FD_SETSIZE: ::c_int = 1024; - -pub const RTLD_LOCAL: ::c_int = 0x0; -pub const RTLD_NOW: ::c_int = 0x1; -pub const RTLD_GLOBAL: ::c_int = 0x2; -pub const RTLD_DEFAULT: *mut ::c_void = 0isize as *mut ::c_void; - -pub const BUFSIZ: ::c_uint = 8192; -pub const FILENAME_MAX: ::c_uint = 256; -pub const FOPEN_MAX: ::c_uint = 128; -pub const L_tmpnam: ::c_uint = 512; -pub const TMP_MAX: ::c_uint = 32768; - -pub const _PC_CHOWN_RESTRICTED: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_NO_TRUNC: ::c_int = 5; -pub const _PC_PATH_MAX: ::c_int = 6; -pub const _PC_PIPE_BUF: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_LINK_MAX: ::c_int = 25; -pub const _PC_SYNC_IO: ::c_int = 26; -pub const _PC_ASYNC_IO: ::c_int = 27; -pub const _PC_PRIO_IO: ::c_int = 28; -pub const _PC_SOCK_MAXBUF: ::c_int = 29; -pub const _PC_FILESIZEBITS: ::c_int = 30; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 31; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 32; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 33; -pub const _PC_REC_XFER_ALIGN: ::c_int = 34; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 35; -pub const _PC_SYMLINK_MAX: ::c_int = 36; -pub const _PC_2_SYMLINKS: ::c_int = 37; -pub const _PC_XATTR_EXISTS: ::c_int = 38; -pub const _PC_XATTR_ENABLED: ::c_int = 39; - -pub const FIONBIO: ::c_ulong = 0xbe000000; -pub const FIONREAD: ::c_ulong = 0xbe000001; -pub const FIOSEEKDATA: ::c_ulong = 0xbe000002; -pub const FIOSEEKHOLE: ::c_ulong = 0xbe000003; - -pub const _SC_ARG_MAX: ::c_int = 15; -pub const _SC_CHILD_MAX: ::c_int = 16; -pub const _SC_CLK_TCK: ::c_int = 17; -pub const _SC_JOB_CONTROL: ::c_int = 18; -pub const _SC_NGROUPS_MAX: ::c_int = 19; -pub const _SC_OPEN_MAX: ::c_int = 20; -pub const _SC_SAVED_IDS: ::c_int = 21; -pub const _SC_STREAM_MAX: ::c_int = 22; -pub const _SC_TZNAME_MAX: ::c_int = 23; -pub const _SC_VERSION: ::c_int = 24; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 25; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 26; -pub const _SC_PAGESIZE: ::c_int = 27; -pub const _SC_PAGE_SIZE: ::c_int = 27; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 28; -pub const _SC_SEM_VALUE_MAX: ::c_int = 29; -pub const _SC_SEMAPHORES: ::c_int = 30; -pub const _SC_THREADS: ::c_int = 31; -pub const _SC_IOV_MAX: ::c_int = 32; -pub const _SC_UIO_MAXIOV: ::c_int = 32; -pub const _SC_NPROCESSORS_CONF: ::c_int = 34; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 35; -pub const _SC_ATEXIT_MAX: ::c_int = 37; -pub const _SC_PASS_MAX: ::c_int = 39; -pub const _SC_PHYS_PAGES: ::c_int = 40; -pub const _SC_AVPHYS_PAGES: ::c_int = 41; -pub const _SC_PIPE: ::c_int = 42; -pub const _SC_SELECT: ::c_int = 43; -pub const _SC_POLL: ::c_int = 44; -pub const _SC_MAPPED_FILES: ::c_int = 45; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 46; -pub const _SC_THREAD_STACK_MIN: ::c_int = 47; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 48; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 49; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 50; -pub const _SC_REALTIME_SIGNALS: ::c_int = 51; -pub const _SC_MEMORY_PROTECTION: ::c_int = 52; -pub const _SC_SIGQUEUE_MAX: ::c_int = 53; -pub const _SC_RTSIG_MAX: ::c_int = 54; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 55; -pub const _SC_DELAYTIMER_MAX: ::c_int = 56; -pub const _SC_TIMER_MAX: ::c_int = 57; -pub const _SC_TIMERS: ::c_int = 58; -pub const _SC_CPUTIME: ::c_int = 59; -pub const _SC_THREAD_CPUTIME: ::c_int = 60; -pub const _SC_HOST_NAME_MAX: ::c_int = 61; -pub const _SC_REGEXP: ::c_int = 62; -pub const _SC_SYMLOOP_MAX: ::c_int = 63; -pub const _SC_SHELL: ::c_int = 64; -pub const _SC_TTY_NAME_MAX: ::c_int = 65; -pub const _SC_ADVISORY_INFO: ::c_int = 66; -pub const _SC_BARRIERS: ::c_int = 67; -pub const _SC_CLOCK_SELECTION: ::c_int = 68; -pub const _SC_FSYNC: ::c_int = 69; -pub const _SC_IPV6: ::c_int = 70; -pub const _SC_MEMLOCK: ::c_int = 71; -pub const _SC_MEMLOCK_RANGE: ::c_int = 72; -pub const _SC_MESSAGE_PASSING: ::c_int = 73; -pub const _SC_PRIORITIZED_IO: ::c_int = 74; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 75; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 76; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 77; -pub const _SC_SPAWN: ::c_int = 78; -pub const _SC_SPIN_LOCKS: ::c_int = 79; -pub const _SC_SPORADIC_SERVER: ::c_int = 80; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 81; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 82; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 83; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 84; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 85; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 86; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 87; -pub const _SC_TIMEOUTS: ::c_int = 88; -pub const _SC_TRACE: ::c_int = 89; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 90; -pub const _SC_TRACE_INHERIT: ::c_int = 91; -pub const _SC_TRACE_LOG: ::c_int = 92; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 93; -pub const _SC_V6_ILP32_OFF32: ::c_int = 94; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 95; -pub const _SC_V6_LP64_OFF64: ::c_int = 96; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 97; -pub const _SC_V7_ILP32_OFF32: ::c_int = 98; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 99; -pub const _SC_V7_LP64_OFF64: ::c_int = 100; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 101; -pub const _SC_2_C_BIND: ::c_int = 102; -pub const _SC_2_C_DEV: ::c_int = 103; -pub const _SC_2_CHAR_TERM: ::c_int = 104; -pub const _SC_2_FORT_DEV: ::c_int = 105; -pub const _SC_2_FORT_RUN: ::c_int = 106; -pub const _SC_2_LOCALEDEF: ::c_int = 107; -pub const _SC_2_PBS: ::c_int = 108; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 109; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 110; -pub const _SC_2_PBS_LOCATE: ::c_int = 111; -pub const _SC_2_PBS_MESSAGE: ::c_int = 112; -pub const _SC_2_PBS_TRACK: ::c_int = 113; -pub const _SC_2_SW_DEV: ::c_int = 114; -pub const _SC_2_UPE: ::c_int = 115; -pub const _SC_2_VERSION: ::c_int = 116; -pub const _SC_XOPEN_CRYPT: ::c_int = 117; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 118; -pub const _SC_XOPEN_REALTIME: ::c_int = 119; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 120; -pub const _SC_XOPEN_SHM: ::c_int = 121; -pub const _SC_XOPEN_STREAMS: ::c_int = 122; -pub const _SC_XOPEN_UNIX: ::c_int = 123; -pub const _SC_XOPEN_UUCP: ::c_int = 124; -pub const _SC_XOPEN_VERSION: ::c_int = 125; -pub const _SC_BC_BASE_MAX: ::c_int = 129; -pub const _SC_BC_DIM_MAX: ::c_int = 130; -pub const _SC_BC_SCALE_MAX: ::c_int = 131; -pub const _SC_BC_STRING_MAX: ::c_int = 132; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 133; -pub const _SC_EXPR_NEST_MAX: ::c_int = 134; -pub const _SC_LINE_MAX: ::c_int = 135; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 136; -pub const _SC_MQ_OPEN_MAX: ::c_int = 137; -pub const _SC_MQ_PRIO_MAX: ::c_int = 138; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 139; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 140; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 141; -pub const _SC_RE_DUP_MAX: ::c_int = 142; - -pub const PTHREAD_STACK_MIN: ::size_t = 8192; +pub const IFF_UP: c_int = 0x0001; +pub const IFF_BROADCAST: c_int = 0x0002; // valid broadcast address +pub const IFF_LOOPBACK: c_int = 0x0008; +pub const IFF_POINTOPOINT: c_int = 0x0010; // point-to-point link +pub const IFF_NOARP: c_int = 0x0040; // no address resolution +pub const IFF_AUTOUP: c_int = 0x0080; // auto dial +pub const IFF_PROMISC: c_int = 0x0100; // receive all packets +pub const IFF_ALLMULTI: c_int = 0x0200; // receive all multicast packets +pub const IFF_SIMPLEX: c_int = 0x0800; // doesn't receive own transmissions +pub const IFF_LINK: c_int = 0x1000; // has link +pub const IFF_AUTO_CONFIGURED: c_int = 0x2000; +pub const IFF_CONFIGURING: c_int = 0x4000; +pub const IFF_MULTICAST: c_int = 0x8000; // supports multicast + +pub const AF_UNSPEC: c_int = 0; +pub const AF_INET: c_int = 1; +pub const AF_APPLETALK: c_int = 2; +pub const AF_ROUTE: c_int = 3; +pub const AF_LINK: c_int = 4; +pub const AF_INET6: c_int = 5; +pub const AF_DLI: c_int = 6; +pub const AF_IPX: c_int = 7; +pub const AF_NOTIFY: c_int = 8; +pub const AF_LOCAL: c_int = 9; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_BLUETOOTH: c_int = 10; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_INET: c_int = AF_INET; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_UNIX: c_int = AF_UNIX; +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; + +pub const IP_OPTIONS: c_int = 1; +pub const IP_HDRINCL: c_int = 2; +pub const IP_TOS: c_int = 3; +pub const IP_TTL: c_int = 4; +pub const IP_RECVOPTS: c_int = 5; +pub const IP_RECVRETOPTS: c_int = 6; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_RETOPTS: c_int = 8; +pub const IP_MULTICAST_IF: c_int = 9; +pub const IP_MULTICAST_TTL: c_int = 10; +pub const IP_MULTICAST_LOOP: c_int = 11; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IP_BLOCK_SOURCE: c_int = 14; +pub const IP_UNBLOCK_SOURCE: c_int = 15; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 16; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 17; + +pub const TCP_NODELAY: c_int = 0x01; +pub const TCP_MAXSEG: c_int = 0x02; +pub const TCP_NOPUSH: c_int = 0x04; +pub const TCP_NOOPT: c_int = 0x08; + +pub const IF_NAMESIZE: size_t = 32; +pub const IFNAMSIZ: size_t = IF_NAMESIZE; + +pub const IPV6_MULTICAST_IF: c_int = 24; +pub const IPV6_MULTICAST_HOPS: c_int = 25; +pub const IPV6_MULTICAST_LOOP: c_int = 26; +pub const IPV6_UNICAST_HOPS: c_int = 27; +pub const IPV6_JOIN_GROUP: c_int = 28; +pub const IPV6_LEAVE_GROUP: c_int = 29; +pub const IPV6_V6ONLY: c_int = 30; +pub const IPV6_PKTINFO: c_int = 31; +pub const IPV6_RECVPKTINFO: c_int = 32; +pub const IPV6_HOPLIMIT: c_int = 33; +pub const IPV6_RECVHOPLIMIT: c_int = 34; +pub const IPV6_HOPOPTS: c_int = 35; +pub const IPV6_DSTOPTS: c_int = 36; +pub const IPV6_RTHDR: c_int = 37; + +pub const MSG_OOB: c_int = 0x0001; +pub const MSG_PEEK: c_int = 0x0002; +pub const MSG_DONTROUTE: c_int = 0x0004; +pub const MSG_EOR: c_int = 0x0008; +pub const MSG_TRUNC: c_int = 0x0010; +pub const MSG_CTRUNC: c_int = 0x0020; +pub const MSG_WAITALL: c_int = 0x0040; +pub const MSG_DONTWAIT: c_int = 0x0080; +pub const MSG_BCAST: c_int = 0x0100; +pub const MSG_MCAST: c_int = 0x0200; +pub const MSG_EOF: c_int = 0x0400; +pub const MSG_NOSIGNAL: c_int = 0x0800; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const LOCK_SH: c_int = 0x01; +pub const LOCK_EX: c_int = 0x02; +pub const LOCK_NB: c_int = 0x04; +pub const LOCK_UN: c_int = 0x08; + +pub const MINSIGSTKSZ: size_t = 8192; +pub const SIGSTKSZ: size_t = 16384; + +pub const IOV_MAX: c_int = 1024; +pub const PATH_MAX: c_int = 1024; + +pub const SA_NOCLDSTOP: c_int = 0x01; +pub const SA_NOCLDWAIT: c_int = 0x02; +pub const SA_RESETHAND: c_int = 0x04; +pub const SA_NODEFER: c_int = 0x08; +pub const SA_RESTART: c_int = 0x10; +pub const SA_ONSTACK: c_int = 0x20; +pub const SA_SIGINFO: c_int = 0x40; +pub const SA_NOMASK: c_int = SA_NODEFER; +pub const SA_STACK: c_int = SA_ONSTACK; +pub const SA_ONESHOT: c_int = SA_RESETHAND; + +pub const SS_ONSTACK: c_int = 0x1; +pub const SS_DISABLE: c_int = 0x2; + +pub const FD_SETSIZE: c_int = 1024; + +pub const RTLD_LOCAL: c_int = 0x0; +pub const RTLD_NOW: c_int = 0x1; +pub const RTLD_GLOBAL: c_int = 0x2; +pub const RTLD_DEFAULT: *mut c_void = 0isize as *mut c_void; + +pub const BUFSIZ: c_uint = 8192; +pub const FILENAME_MAX: c_uint = 256; +pub const FOPEN_MAX: c_uint = 128; +pub const L_tmpnam: c_uint = 512; +pub const TMP_MAX: c_uint = 32768; + +pub const _PC_CHOWN_RESTRICTED: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_NO_TRUNC: c_int = 5; +pub const _PC_PATH_MAX: c_int = 6; +pub const _PC_PIPE_BUF: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_LINK_MAX: c_int = 25; +pub const _PC_SYNC_IO: c_int = 26; +pub const _PC_ASYNC_IO: c_int = 27; +pub const _PC_PRIO_IO: c_int = 28; +pub const _PC_SOCK_MAXBUF: c_int = 29; +pub const _PC_FILESIZEBITS: c_int = 30; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 31; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 32; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 33; +pub const _PC_REC_XFER_ALIGN: c_int = 34; +pub const _PC_ALLOC_SIZE_MIN: c_int = 35; +pub const _PC_SYMLINK_MAX: c_int = 36; +pub const _PC_2_SYMLINKS: c_int = 37; +pub const _PC_XATTR_EXISTS: c_int = 38; +pub const _PC_XATTR_ENABLED: c_int = 39; + +pub const FIONBIO: c_ulong = 0xbe000000; +pub const FIONREAD: c_ulong = 0xbe000001; +pub const FIOSEEKDATA: c_ulong = 0xbe000002; +pub const FIOSEEKHOLE: c_ulong = 0xbe000003; + +pub const _SC_ARG_MAX: c_int = 15; +pub const _SC_CHILD_MAX: c_int = 16; +pub const _SC_CLK_TCK: c_int = 17; +pub const _SC_JOB_CONTROL: c_int = 18; +pub const _SC_NGROUPS_MAX: c_int = 19; +pub const _SC_OPEN_MAX: c_int = 20; +pub const _SC_SAVED_IDS: c_int = 21; +pub const _SC_STREAM_MAX: c_int = 22; +pub const _SC_TZNAME_MAX: c_int = 23; +pub const _SC_VERSION: c_int = 24; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 25; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 26; +pub const _SC_PAGESIZE: c_int = 27; +pub const _SC_PAGE_SIZE: c_int = 27; +pub const _SC_SEM_NSEMS_MAX: c_int = 28; +pub const _SC_SEM_VALUE_MAX: c_int = 29; +pub const _SC_SEMAPHORES: c_int = 30; +pub const _SC_THREADS: c_int = 31; +pub const _SC_IOV_MAX: c_int = 32; +pub const _SC_UIO_MAXIOV: c_int = 32; +pub const _SC_NPROCESSORS_CONF: c_int = 34; +pub const _SC_NPROCESSORS_ONLN: c_int = 35; +pub const _SC_ATEXIT_MAX: c_int = 37; +pub const _SC_PASS_MAX: c_int = 39; +pub const _SC_PHYS_PAGES: c_int = 40; +pub const _SC_AVPHYS_PAGES: c_int = 41; +pub const _SC_PIPE: c_int = 42; +pub const _SC_SELECT: c_int = 43; +pub const _SC_POLL: c_int = 44; +pub const _SC_MAPPED_FILES: c_int = 45; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 46; +pub const _SC_THREAD_STACK_MIN: c_int = 47; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 48; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 49; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 50; +pub const _SC_REALTIME_SIGNALS: c_int = 51; +pub const _SC_MEMORY_PROTECTION: c_int = 52; +pub const _SC_SIGQUEUE_MAX: c_int = 53; +pub const _SC_RTSIG_MAX: c_int = 54; +pub const _SC_MONOTONIC_CLOCK: c_int = 55; +pub const _SC_DELAYTIMER_MAX: c_int = 56; +pub const _SC_TIMER_MAX: c_int = 57; +pub const _SC_TIMERS: c_int = 58; +pub const _SC_CPUTIME: c_int = 59; +pub const _SC_THREAD_CPUTIME: c_int = 60; +pub const _SC_HOST_NAME_MAX: c_int = 61; +pub const _SC_REGEXP: c_int = 62; +pub const _SC_SYMLOOP_MAX: c_int = 63; +pub const _SC_SHELL: c_int = 64; +pub const _SC_TTY_NAME_MAX: c_int = 65; +pub const _SC_ADVISORY_INFO: c_int = 66; +pub const _SC_BARRIERS: c_int = 67; +pub const _SC_CLOCK_SELECTION: c_int = 68; +pub const _SC_FSYNC: c_int = 69; +pub const _SC_IPV6: c_int = 70; +pub const _SC_MEMLOCK: c_int = 71; +pub const _SC_MEMLOCK_RANGE: c_int = 72; +pub const _SC_MESSAGE_PASSING: c_int = 73; +pub const _SC_PRIORITIZED_IO: c_int = 74; +pub const _SC_PRIORITY_SCHEDULING: c_int = 75; +pub const _SC_READER_WRITER_LOCKS: c_int = 76; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 77; +pub const _SC_SPAWN: c_int = 78; +pub const _SC_SPIN_LOCKS: c_int = 79; +pub const _SC_SPORADIC_SERVER: c_int = 80; +pub const _SC_SYNCHRONIZED_IO: c_int = 81; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 82; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 83; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 84; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 85; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 86; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 87; +pub const _SC_TIMEOUTS: c_int = 88; +pub const _SC_TRACE: c_int = 89; +pub const _SC_TRACE_EVENT_FILTER: c_int = 90; +pub const _SC_TRACE_INHERIT: c_int = 91; +pub const _SC_TRACE_LOG: c_int = 92; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 93; +pub const _SC_V6_ILP32_OFF32: c_int = 94; +pub const _SC_V6_ILP32_OFFBIG: c_int = 95; +pub const _SC_V6_LP64_OFF64: c_int = 96; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 97; +pub const _SC_V7_ILP32_OFF32: c_int = 98; +pub const _SC_V7_ILP32_OFFBIG: c_int = 99; +pub const _SC_V7_LP64_OFF64: c_int = 100; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 101; +pub const _SC_2_C_BIND: c_int = 102; +pub const _SC_2_C_DEV: c_int = 103; +pub const _SC_2_CHAR_TERM: c_int = 104; +pub const _SC_2_FORT_DEV: c_int = 105; +pub const _SC_2_FORT_RUN: c_int = 106; +pub const _SC_2_LOCALEDEF: c_int = 107; +pub const _SC_2_PBS: c_int = 108; +pub const _SC_2_PBS_ACCOUNTING: c_int = 109; +pub const _SC_2_PBS_CHECKPOINT: c_int = 110; +pub const _SC_2_PBS_LOCATE: c_int = 111; +pub const _SC_2_PBS_MESSAGE: c_int = 112; +pub const _SC_2_PBS_TRACK: c_int = 113; +pub const _SC_2_SW_DEV: c_int = 114; +pub const _SC_2_UPE: c_int = 115; +pub const _SC_2_VERSION: c_int = 116; +pub const _SC_XOPEN_CRYPT: c_int = 117; +pub const _SC_XOPEN_ENH_I18N: c_int = 118; +pub const _SC_XOPEN_REALTIME: c_int = 119; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 120; +pub const _SC_XOPEN_SHM: c_int = 121; +pub const _SC_XOPEN_STREAMS: c_int = 122; +pub const _SC_XOPEN_UNIX: c_int = 123; +pub const _SC_XOPEN_UUCP: c_int = 124; +pub const _SC_XOPEN_VERSION: c_int = 125; +pub const _SC_BC_BASE_MAX: c_int = 129; +pub const _SC_BC_DIM_MAX: c_int = 130; +pub const _SC_BC_SCALE_MAX: c_int = 131; +pub const _SC_BC_STRING_MAX: c_int = 132; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 133; +pub const _SC_EXPR_NEST_MAX: c_int = 134; +pub const _SC_LINE_MAX: c_int = 135; +pub const _SC_LOGIN_NAME_MAX: c_int = 136; +pub const _SC_MQ_OPEN_MAX: c_int = 137; +pub const _SC_MQ_PRIO_MAX: c_int = 138; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 139; +pub const _SC_THREAD_KEYS_MAX: c_int = 140; +pub const _SC_THREAD_THREADS_MAX: c_int = 141; +pub const _SC_RE_DUP_MAX: c_int = 142; + +pub const PTHREAD_STACK_MIN: size_t = 8192; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { flags: 0, @@ -1295,68 +1299,68 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { waiters: [0 as *mut _; 2], }; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 3; +pub const PTHREAD_MUTEX_DEFAULT: c_int = 0; +pub const PTHREAD_MUTEX_NORMAL: c_int = 1; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 3; pub const FIOCLEX: c_ulong = 0; // FIXME: does not exist on Haiku! -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_SEQPACKET: ::c_int = 5; - -pub const SOL_SOCKET: ::c_int = -1; -pub const SO_ACCEPTCONN: ::c_int = 0x00000001; -pub const SO_BROADCAST: ::c_int = 0x00000002; -pub const SO_DEBUG: ::c_int = 0x00000004; -pub const SO_DONTROUTE: ::c_int = 0x00000008; -pub const SO_KEEPALIVE: ::c_int = 0x00000010; -pub const SO_OOBINLINE: ::c_int = 0x00000020; -pub const SO_REUSEADDR: ::c_int = 0x00000040; -pub const SO_REUSEPORT: ::c_int = 0x00000080; -pub const SO_USELOOPBACK: ::c_int = 0x00000100; -pub const SO_LINGER: ::c_int = 0x00000200; -pub const SO_SNDBUF: ::c_int = 0x40000001; -pub const SO_SNDLOWAT: ::c_int = 0x40000002; -pub const SO_SNDTIMEO: ::c_int = 0x40000003; -pub const SO_RCVBUF: ::c_int = 0x40000004; -pub const SO_RCVLOWAT: ::c_int = 0x40000005; -pub const SO_RCVTIMEO: ::c_int = 0x40000006; -pub const SO_ERROR: ::c_int = 0x40000007; -pub const SO_TYPE: ::c_int = 0x40000008; -pub const SO_NONBLOCK: ::c_int = 0x40000009; -pub const SO_BINDTODEVICE: ::c_int = 0x4000000a; -pub const SO_PEERCRED: ::c_int = 0x4000000b; - -pub const SCM_RIGHTS: ::c_int = 0x01; - -pub const SOMAXCONN: ::c_int = 32; - -pub const NI_MAXHOST: ::size_t = 1025; - -pub const WNOHANG: ::c_int = 0x01; -pub const WUNTRACED: ::c_int = 0x02; -pub const WCONTINUED: ::c_int = 0x04; -pub const WEXITED: ::c_int = 0x08; -pub const WSTOPPED: ::c_int = 0x10; -pub const WNOWAIT: ::c_int = 0x20; +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_SEQPACKET: c_int = 5; + +pub const SOL_SOCKET: c_int = -1; +pub const SO_ACCEPTCONN: c_int = 0x00000001; +pub const SO_BROADCAST: c_int = 0x00000002; +pub const SO_DEBUG: c_int = 0x00000004; +pub const SO_DONTROUTE: c_int = 0x00000008; +pub const SO_KEEPALIVE: c_int = 0x00000010; +pub const SO_OOBINLINE: c_int = 0x00000020; +pub const SO_REUSEADDR: c_int = 0x00000040; +pub const SO_REUSEPORT: c_int = 0x00000080; +pub const SO_USELOOPBACK: c_int = 0x00000100; +pub const SO_LINGER: c_int = 0x00000200; +pub const SO_SNDBUF: c_int = 0x40000001; +pub const SO_SNDLOWAT: c_int = 0x40000002; +pub const SO_SNDTIMEO: c_int = 0x40000003; +pub const SO_RCVBUF: c_int = 0x40000004; +pub const SO_RCVLOWAT: c_int = 0x40000005; +pub const SO_RCVTIMEO: c_int = 0x40000006; +pub const SO_ERROR: c_int = 0x40000007; +pub const SO_TYPE: c_int = 0x40000008; +pub const SO_NONBLOCK: c_int = 0x40000009; +pub const SO_BINDTODEVICE: c_int = 0x4000000a; +pub const SO_PEERCRED: c_int = 0x4000000b; + +pub const SCM_RIGHTS: c_int = 0x01; + +pub const SOMAXCONN: c_int = 32; + +pub const NI_MAXHOST: size_t = 1025; + +pub const WNOHANG: c_int = 0x01; +pub const WUNTRACED: c_int = 0x02; +pub const WCONTINUED: c_int = 0x04; +pub const WEXITED: c_int = 0x08; +pub const WSTOPPED: c_int = 0x10; +pub const WNOWAIT: c_int = 0x20; // si_code values for SIGBUS signal -pub const BUS_ADRALN: ::c_int = 40; -pub const BUS_ADRERR: ::c_int = 41; -pub const BUS_OBJERR: ::c_int = 42; +pub const BUS_ADRALN: c_int = 40; +pub const BUS_ADRERR: c_int = 41; +pub const BUS_OBJERR: c_int = 42; // si_code values for SIGCHLD signal -pub const CLD_EXITED: ::c_int = 60; -pub const CLD_KILLED: ::c_int = 61; -pub const CLD_DUMPED: ::c_int = 62; -pub const CLD_TRAPPED: ::c_int = 63; -pub const CLD_STOPPED: ::c_int = 64; -pub const CLD_CONTINUED: ::c_int = 65; +pub const CLD_EXITED: c_int = 60; +pub const CLD_KILLED: c_int = 61; +pub const CLD_DUMPED: c_int = 62; +pub const CLD_TRAPPED: c_int = 63; +pub const CLD_STOPPED: c_int = 64; +pub const CLD_CONTINUED: c_int = 65; pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; @@ -1379,95 +1383,95 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VSUSP: usize = 10; -pub const IGNBRK: ::tcflag_t = 0x01; -pub const BRKINT: ::tcflag_t = 0x02; -pub const IGNPAR: ::tcflag_t = 0x04; -pub const PARMRK: ::tcflag_t = 0x08; -pub const INPCK: ::tcflag_t = 0x10; -pub const ISTRIP: ::tcflag_t = 0x20; -pub const INLCR: ::tcflag_t = 0x40; -pub const IGNCR: ::tcflag_t = 0x80; -pub const ICRNL: ::tcflag_t = 0x100; -pub const IUCLC: ::tcflag_t = 0x200; -pub const IXON: ::tcflag_t = 0x400; -pub const IXANY: ::tcflag_t = 0x800; -pub const IXOFF: ::tcflag_t = 0x1000; - -pub const OPOST: ::tcflag_t = 0x00000001; -pub const OLCUC: ::tcflag_t = 0x00000002; -pub const ONLCR: ::tcflag_t = 0x00000004; -pub const OCRNL: ::tcflag_t = 0x00000008; -pub const ONOCR: ::tcflag_t = 0x00000010; -pub const ONLRET: ::tcflag_t = 0x00000020; -pub const OFILL: ::tcflag_t = 0x00000040; -pub const OFDEL: ::tcflag_t = 0x00000080; -pub const NLDLY: ::tcflag_t = 0x00000100; -pub const NL0: ::tcflag_t = 0x00000000; -pub const NL1: ::tcflag_t = 0x00000100; -pub const CRDLY: ::tcflag_t = 0x00000600; -pub const CR0: ::tcflag_t = 0x00000000; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const TABDLY: ::tcflag_t = 0x00001800; -pub const TAB0: ::tcflag_t = 0x00000000; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const BSDLY: ::tcflag_t = 0x00002000; -pub const BS0: ::tcflag_t = 0x00000000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VTDLY: ::tcflag_t = 0x00004000; -pub const VT0: ::tcflag_t = 0x00000000; -pub const VT1: ::tcflag_t = 0x00004000; -pub const FFDLY: ::tcflag_t = 0x00008000; -pub const FF0: ::tcflag_t = 0x00000000; -pub const FF1: ::tcflag_t = 0x00008000; - -pub const CSIZE: ::tcflag_t = 0x00000020; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CS6: ::tcflag_t = 0x00000000; -pub const CS7: ::tcflag_t = 0x00000000; -pub const CS8: ::tcflag_t = 0x00000020; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const XLOBLK: ::tcflag_t = 0x00001000; -pub const CTSFLOW: ::tcflag_t = 0x00002000; -pub const RTSFLOW: ::tcflag_t = 0x00004000; -pub const CRTSCTS: ::tcflag_t = RTSFLOW | CTSFLOW; - -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const XCASE: ::tcflag_t = 0x00000004; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const IEXTEN: ::tcflag_t = 0x00000200; -pub const ECHOCTL: ::tcflag_t = 0x00000400; -pub const ECHOPRT: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00001000; -pub const FLUSHO: ::tcflag_t = 0x00002000; -pub const PENDIN: ::tcflag_t = 0x00004000; - -pub const TCGB_CTS: ::c_int = 0x01; -pub const TCGB_DSR: ::c_int = 0x02; -pub const TCGB_RI: ::c_int = 0x04; -pub const TCGB_DCD: ::c_int = 0x08; -pub const TIOCM_CTS: ::c_int = TCGB_CTS; -pub const TIOCM_CD: ::c_int = TCGB_DCD; -pub const TIOCM_CAR: ::c_int = TCGB_DCD; -pub const TIOCM_RI: ::c_int = TCGB_RI; -pub const TIOCM_RNG: ::c_int = TCGB_RI; -pub const TIOCM_DSR: ::c_int = TCGB_DSR; -pub const TIOCM_DTR: ::c_int = 0x10; -pub const TIOCM_RTS: ::c_int = 0x20; +pub const IGNBRK: crate::tcflag_t = 0x01; +pub const BRKINT: crate::tcflag_t = 0x02; +pub const IGNPAR: crate::tcflag_t = 0x04; +pub const PARMRK: crate::tcflag_t = 0x08; +pub const INPCK: crate::tcflag_t = 0x10; +pub const ISTRIP: crate::tcflag_t = 0x20; +pub const INLCR: crate::tcflag_t = 0x40; +pub const IGNCR: crate::tcflag_t = 0x80; +pub const ICRNL: crate::tcflag_t = 0x100; +pub const IUCLC: crate::tcflag_t = 0x200; +pub const IXON: crate::tcflag_t = 0x400; +pub const IXANY: crate::tcflag_t = 0x800; +pub const IXOFF: crate::tcflag_t = 0x1000; + +pub const OPOST: crate::tcflag_t = 0x00000001; +pub const OLCUC: crate::tcflag_t = 0x00000002; +pub const ONLCR: crate::tcflag_t = 0x00000004; +pub const OCRNL: crate::tcflag_t = 0x00000008; +pub const ONOCR: crate::tcflag_t = 0x00000010; +pub const ONLRET: crate::tcflag_t = 0x00000020; +pub const OFILL: crate::tcflag_t = 0x00000040; +pub const OFDEL: crate::tcflag_t = 0x00000080; +pub const NLDLY: crate::tcflag_t = 0x00000100; +pub const NL0: crate::tcflag_t = 0x00000000; +pub const NL1: crate::tcflag_t = 0x00000100; +pub const CRDLY: crate::tcflag_t = 0x00000600; +pub const CR0: crate::tcflag_t = 0x00000000; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const TABDLY: crate::tcflag_t = 0x00001800; +pub const TAB0: crate::tcflag_t = 0x00000000; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const BSDLY: crate::tcflag_t = 0x00002000; +pub const BS0: crate::tcflag_t = 0x00000000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VTDLY: crate::tcflag_t = 0x00004000; +pub const VT0: crate::tcflag_t = 0x00000000; +pub const VT1: crate::tcflag_t = 0x00004000; +pub const FFDLY: crate::tcflag_t = 0x00008000; +pub const FF0: crate::tcflag_t = 0x00000000; +pub const FF1: crate::tcflag_t = 0x00008000; + +pub const CSIZE: crate::tcflag_t = 0x00000020; +pub const CS5: crate::tcflag_t = 0x00000000; +pub const CS6: crate::tcflag_t = 0x00000000; +pub const CS7: crate::tcflag_t = 0x00000000; +pub const CS8: crate::tcflag_t = 0x00000020; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const XLOBLK: crate::tcflag_t = 0x00001000; +pub const CTSFLOW: crate::tcflag_t = 0x00002000; +pub const RTSFLOW: crate::tcflag_t = 0x00004000; +pub const CRTSCTS: crate::tcflag_t = RTSFLOW | CTSFLOW; + +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const XCASE: crate::tcflag_t = 0x00000004; +pub const ECHO: crate::tcflag_t = 0x00000008; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const IEXTEN: crate::tcflag_t = 0x00000200; +pub const ECHOCTL: crate::tcflag_t = 0x00000400; +pub const ECHOPRT: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00001000; +pub const FLUSHO: crate::tcflag_t = 0x00002000; +pub const PENDIN: crate::tcflag_t = 0x00004000; + +pub const TCGB_CTS: c_int = 0x01; +pub const TCGB_DSR: c_int = 0x02; +pub const TCGB_RI: c_int = 0x04; +pub const TCGB_DCD: c_int = 0x08; +pub const TIOCM_CTS: c_int = TCGB_CTS; +pub const TIOCM_CD: c_int = TCGB_DCD; +pub const TIOCM_CAR: c_int = TCGB_DCD; +pub const TIOCM_RI: c_int = TCGB_RI; +pub const TIOCM_RNG: c_int = TCGB_RI; +pub const TIOCM_DSR: c_int = TCGB_DSR; +pub const TIOCM_DTR: c_int = 0x10; +pub const TIOCM_RTS: c_int = 0x20; pub const B0: speed_t = 0x00; pub const B50: speed_t = 0x01; @@ -1490,132 +1494,132 @@ pub const B115200: speed_t = 0x11; pub const B230400: speed_t = 0x12; pub const B31250: speed_t = 0x13; -pub const TCSANOW: ::c_int = 0x01; -pub const TCSADRAIN: ::c_int = 0x02; -pub const TCSAFLUSH: ::c_int = 0x04; - -pub const TCOOFF: ::c_int = 0x01; -pub const TCOON: ::c_int = 0x02; -pub const TCIOFF: ::c_int = 0x04; -pub const TCION: ::c_int = 0x08; - -pub const TCIFLUSH: ::c_int = 0x01; -pub const TCOFLUSH: ::c_int = 0x02; -pub const TCIOFLUSH: ::c_int = 0x03; - -pub const TCGETA: ::c_ulong = 0x8000; -pub const TCSETA: ::c_ulong = TCGETA + 1; -pub const TCSETAF: ::c_ulong = TCGETA + 2; -pub const TCSETAW: ::c_ulong = TCGETA + 3; -pub const TCSBRK: ::c_ulong = TCGETA + 5; -pub const TCFLSH: ::c_ulong = TCGETA + 6; -pub const TCXONC: ::c_ulong = TCGETA + 7; -pub const TCGETBITS: ::c_ulong = TCGETA + 9; -pub const TCSETDTR: ::c_ulong = TCGETA + 10; -pub const TCSETRTS: ::c_ulong = TCGETA + 11; -pub const TIOCGWINSZ: ::c_ulong = TCGETA + 12; -pub const TIOCSWINSZ: ::c_ulong = TCGETA + 13; -pub const TIOCGPGRP: ::c_ulong = TCGETA + 15; -pub const TIOCSPGRP: ::c_ulong = TCGETA + 16; -pub const TIOCSCTTY: ::c_ulong = TCGETA + 17; -pub const TIOCMGET: ::c_ulong = TCGETA + 18; -pub const TIOCMSET: ::c_ulong = TCGETA + 19; -pub const TIOCSBRK: ::c_ulong = TCGETA + 20; -pub const TIOCCBRK: ::c_ulong = TCGETA + 21; -pub const TIOCMBIS: ::c_ulong = TCGETA + 22; -pub const TIOCMBIC: ::c_ulong = TCGETA + 23; -pub const TIOCGSID: ::c_ulong = TCGETA + 24; -pub const TIOCOUTQ: ::c_ulong = TCGETA + 25; -pub const TIOCEXCL: ::c_ulong = TCGETA + 26; -pub const TIOCNXCL: ::c_ulong = TCGETA + 27; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; +pub const TCSANOW: c_int = 0x01; +pub const TCSADRAIN: c_int = 0x02; +pub const TCSAFLUSH: c_int = 0x04; + +pub const TCOOFF: c_int = 0x01; +pub const TCOON: c_int = 0x02; +pub const TCIOFF: c_int = 0x04; +pub const TCION: c_int = 0x08; + +pub const TCIFLUSH: c_int = 0x01; +pub const TCOFLUSH: c_int = 0x02; +pub const TCIOFLUSH: c_int = 0x03; + +pub const TCGETA: c_ulong = 0x8000; +pub const TCSETA: c_ulong = TCGETA + 1; +pub const TCSETAF: c_ulong = TCGETA + 2; +pub const TCSETAW: c_ulong = TCGETA + 3; +pub const TCSBRK: c_ulong = TCGETA + 5; +pub const TCFLSH: c_ulong = TCGETA + 6; +pub const TCXONC: c_ulong = TCGETA + 7; +pub const TCGETBITS: c_ulong = TCGETA + 9; +pub const TCSETDTR: c_ulong = TCGETA + 10; +pub const TCSETRTS: c_ulong = TCGETA + 11; +pub const TIOCGWINSZ: c_ulong = TCGETA + 12; +pub const TIOCSWINSZ: c_ulong = TCGETA + 13; +pub const TIOCGPGRP: c_ulong = TCGETA + 15; +pub const TIOCSPGRP: c_ulong = TCGETA + 16; +pub const TIOCSCTTY: c_ulong = TCGETA + 17; +pub const TIOCMGET: c_ulong = TCGETA + 18; +pub const TIOCMSET: c_ulong = TCGETA + 19; +pub const TIOCSBRK: c_ulong = TCGETA + 20; +pub const TIOCCBRK: c_ulong = TCGETA + 21; +pub const TIOCMBIS: c_ulong = TCGETA + 22; +pub const TIOCMBIC: c_ulong = TCGETA + 23; +pub const TIOCGSID: c_ulong = TCGETA + 24; +pub const TIOCOUTQ: c_ulong = TCGETA + 25; +pub const TIOCEXCL: c_ulong = TCGETA + 26; +pub const TIOCNXCL: c_ulong = TCGETA + 27; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; // utmpx entry types -pub const EMPTY: ::c_short = 0; -pub const BOOT_TIME: ::c_short = 1; -pub const OLD_TIME: ::c_short = 2; -pub const NEW_TIME: ::c_short = 3; -pub const USER_PROCESS: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const DEAD_PROCESS: ::c_short = 7; - -pub const LOG_PID: ::c_int = 1 << 12; -pub const LOG_CONS: ::c_int = 2 << 12; -pub const LOG_ODELAY: ::c_int = 4 << 12; -pub const LOG_NDELAY: ::c_int = 8 << 12; -pub const LOG_SERIAL: ::c_int = 16 << 12; -pub const LOG_PERROR: ::c_int = 32 << 12; -pub const LOG_NOWAIT: ::c_int = 64 << 12; +pub const EMPTY: c_short = 0; +pub const BOOT_TIME: c_short = 1; +pub const OLD_TIME: c_short = 2; +pub const NEW_TIME: c_short = 3; +pub const USER_PROCESS: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const DEAD_PROCESS: c_short = 7; + +pub const LOG_PID: c_int = 1 << 12; +pub const LOG_CONS: c_int = 2 << 12; +pub const LOG_ODELAY: c_int = 4 << 12; +pub const LOG_NDELAY: c_int = 8 << 12; +pub const LOG_SERIAL: c_int = 16 << 12; +pub const LOG_PERROR: c_int = 32 << 12; +pub const LOG_NOWAIT: c_int = 64 << 12; // spawn.h -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x01; -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x02; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x10; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x20; -pub const POSIX_SPAWN_SETSID: ::c_short = 0x40; +pub const POSIX_SPAWN_RESETIDS: c_short = 0x01; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x02; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x10; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x20; +pub const POSIX_SPAWN_SETSID: c_short = 0x40; const_fn! { {const} fn CMSG_ALIGN(len: usize) -> usize { - len + ::mem::size_of::() - 1 & !(::mem::size_of::() - 1) + len + crate::mem::size_of::() - 1 & !(crate::mem::size_of::() - 1) } } f! { pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { - if (*mhdr).msg_controllen as usize >= ::mem::size_of::() { + if (*mhdr).msg_controllen as usize >= crate::mem::size_of::() { (*mhdr).msg_control as *mut cmsghdr } else { 0 as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(CMSG_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::())) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (CMSG_ALIGN(length as usize) + CMSG_ALIGN(crate::mem::size_of::())) as c_uint } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - CMSG_ALIGN(::mem::size_of::()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + CMSG_ALIGN(crate::mem::size_of::()) as c_uint + length } pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { - return ::CMSG_FIRSTHDR(mhdr); + return crate::CMSG_FIRSTHDR(mhdr); }; let next = cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize) - + CMSG_ALIGN(::mem::size_of::<::cmsghdr>()); + + CMSG_ALIGN(crate::mem::size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { - (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr + (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } @@ -1628,533 +1632,519 @@ f! { } safe_f! { - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & !0xff) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { status & 0xff } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status >> 8) & 0xff) != 0 } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { ((status >> 16) & 0xff) != 0 } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 16) & 0xff } // actually WIFCORED, but this is used everywhere else - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x10000) != 0 } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { (status & 0x20000) != 0 } } extern "C" { - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; - pub fn getpriority(which: ::c_int, who: id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: id_t, priority: ::c_int) -> ::c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; + pub fn getpriority(which: c_int, who: id_t) -> c_int; + pub fn setpriority(which: c_int, who: id_t, priority: c_int) -> c_int; pub fn endusershell(); - pub fn getpass(prompt: *const ::c_char) -> *mut ::c_char; - pub fn getusershell() -> *mut ::c_char; - pub fn issetugid() -> ::c_int; + pub fn getpass(prompt: *const c_char) -> *mut c_char; + pub fn getusershell() -> *mut c_char; + pub fn issetugid() -> c_int; pub fn setusershell(); pub fn utimensat( - fd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; - pub fn _errnop() -> *mut ::c_int; - - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); + fd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + pub fn _errnop() -> *mut c_int; + + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); pub fn ppoll( - fds: *mut ::pollfd, - numfds: ::nfds_t, - timeout: *const ::timespec, + fds: *mut crate::pollfd, + numfds: crate::nfds_t, + timeout: *const crate::timespec, sigMask: *const sigset_t, - ) -> ::c_int; + ) -> c_int; pub fn getspent() -> *mut spwd; pub fn getspent_r( pwd: *mut spwd, - buf: *mut ::c_char, - bufferSize: ::size_t, + buf: *mut c_char, + bufferSize: size_t, res: *mut *mut spwd, - ) -> ::c_int; + ) -> c_int; pub fn setspent(); pub fn endspent(); - pub fn getspnam(name: *const ::c_char) -> *mut spwd; + pub fn getspnam(name: *const c_char) -> *mut spwd; pub fn getspnam_r( - name: *const ::c_char, + name: *const c_char, spwd: *mut spwd, - buffer: *mut ::c_char, - bufferSize: ::size_t, + buffer: *mut c_char, + bufferSize: size_t, res: *mut *mut spwd, - ) -> ::c_int; - pub fn sgetspent(line: *const ::c_char) -> *mut spwd; + ) -> c_int; + pub fn sgetspent(line: *const c_char) -> *mut spwd; pub fn sgetspent_r( - line: *const ::c_char, + line: *const c_char, spwd: *mut spwd, - buffer: *mut ::c_char, - bufferSize: ::size_t, + buffer: *mut c_char, + bufferSize: size_t, res: *mut *mut spwd, - ) -> ::c_int; - pub fn fgetspent(file: *mut ::FILE) -> *mut spwd; + ) -> c_int; + pub fn fgetspent(file: *mut crate::FILE) -> *mut spwd; pub fn fgetspent_r( - file: *mut ::FILE, + file: *mut crate::FILE, spwd: *mut spwd, - buffer: *mut ::c_char, - bufferSize: ::size_t, + buffer: *mut c_char, + bufferSize: size_t, res: *mut *mut spwd, - ) -> ::c_int; - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; + ) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn pthread_create( - thread: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + thread: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn valloc(numBytes: ::size_t) -> *mut ::c_void; - pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int; - pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn valloc(numBytes: size_t) -> *mut c_void; + pub fn malloc_usable_size(ptr: *mut c_void) -> size_t; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn setgroups(ngroups: c_int, ptr: *const crate::gid_t) -> c_int; + pub fn initgroups(name: *const c_char, basegid: crate::gid_t) -> c_int; + pub fn ioctl(fd: c_int, request: c_ulong, ...) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int; - pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_sigqueue(thread: crate::pthread_t, sig: c_int, value: crate::sigval) -> c_int; + pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; pub fn glob( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advice: ::c_int) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advice: c_int) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; - - pub fn writev(fd: ::c_int, iov: *const ::iovec, count: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, count: ::c_int) -> ::ssize_t; - - pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; + + pub fn writev(fd: c_int, iov: *const crate::iovec, count: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, count: c_int) -> ssize_t; + + pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; + pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; pub fn execvpe( - file: *const ::c_char, - argv: *const *mut ::c_char, - environment: *const *mut ::c_char, - ) -> ::c_int; + file: *const c_char, + argv: *const *mut c_char, + environment: *const *mut c_char, + ) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn getgrouplist( - user: *const ::c_char, - basegroup: ::gid_t, - grouplist: *mut ::gid_t, - groupcount: *mut ::c_int, - ) -> ::c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + user: *const c_char, + basegroup: crate::gid_t, + grouplist: *mut crate::gid_t, + groupcount: *mut c_int, + ) -> c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwent() -> *mut passwd; pub fn setpwent(); pub fn endpwent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; pub fn setgrent(); - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; pub fn pututxline(ut: *const utmpx) -> *mut utmpx; pub fn setutxent(); pub fn endutxent(); - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; - pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int; + pub fn getitimer(which: c_int, curr_value: *mut crate::itimerval) -> c_int; pub fn setitimer( - which: ::c_int, - new_value: *const ::itimerval, - old_value: *mut ::itimerval, - ) -> ::c_int; + which: c_int, + new_value: *const crate::itimerval, + old_value: *mut crate::itimerval, + ) -> c_int; - pub fn regcomp(preg: *mut regex_t, pattern: *const ::c_char, cflags: ::c_int) -> ::c_int; + pub fn regcomp(preg: *mut regex_t, pattern: *const c_char, cflags: c_int) -> c_int; pub fn regexec( preg: *const regex_t, - input: *const ::c_char, - nmatch: ::size_t, + input: *const c_char, + nmatch: size_t, pmatch: *mut regmatch_t, - eflags: ::c_int, - ) -> ::c_int; + eflags: c_int, + ) -> c_int; pub fn regerror( - errcode: ::c_int, + errcode: c_int, preg: *const regex_t, - errbuf: *mut ::c_char, - errbuf_size: ::size_t, - ) -> ::size_t; + errbuf: *mut c_char, + errbuf_size: size_t, + ) -> size_t; pub fn regfree(preg: *mut regex_t); - pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int; - pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int; + pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int; + pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int; pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtype: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; - pub fn msgsnd( - msqid: ::c_int, - msgp: *const ::c_void, - msgsz: ::size_t, - msgflg: ::c_int, - ) -> ::c_int; - pub fn semget(key: ::key_t, nsems: ::c_int, semflg: ::c_int) -> ::c_int; - pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn semop(semid: ::c_int, sops: *mut sembuf, nsops: ::size_t) -> ::c_int; - pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t; - - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtype: c_long, + msgflg: c_int, + ) -> ssize_t; + pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int; + pub fn semget(key: crate::key_t, nsems: c_int, semflg: c_int) -> c_int; + pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int; + pub fn semop(semid: c_int, sops: *mut sembuf, nsops: size_t) -> c_int; + pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t; + + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn lsearch( - key: *const ::c_void, - base: *mut ::c_void, - nelp: *mut ::size_t, - width: ::size_t, - compar: ::Option ::c_int>, - ) -> *mut ::c_void; + key: *const c_void, + base: *mut c_void, + nelp: *mut size_t, + width: size_t, + compar: Option c_int>, + ) -> *mut c_void; pub fn lfind( - key: *const ::c_void, - base: *const ::c_void, - nelp: *mut ::size_t, - width: ::size_t, - compar: ::Option ::c_int>, - ) -> *mut ::c_void; - pub fn hcreate(nelt: ::size_t) -> ::c_int; + key: *const c_void, + base: *const c_void, + nelp: *mut size_t, + width: size_t, + compar: Option c_int>, + ) -> *mut c_void; + pub fn hcreate(nelt: size_t) -> c_int; pub fn hdestroy(); - pub fn hsearch(entry: ::ENTRY, action: ::ACTION) -> *mut ::ENTRY; + pub fn hsearch(entry: crate::ENTRY, action: crate::ACTION) -> *mut crate::ENTRY; - pub fn drand48() -> ::c_double; - pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; - pub fn lrand48() -> ::c_long; - pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn mrand48() -> ::c_long; - pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn srand48(seed: ::c_long); - pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; - pub fn lcong48(p: *mut ::c_ushort); + pub fn drand48() -> c_double; + pub fn erand48(xseed: *mut c_ushort) -> c_double; + pub fn lrand48() -> c_long; + pub fn nrand48(xseed: *mut c_ushort) -> c_long; + pub fn mrand48() -> c_long; + pub fn jrand48(xseed: *mut c_ushort) -> c_long; + pub fn srand48(seed: c_long); + pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort; + pub fn lcong48(p: *mut c_ushort); - pub fn clearenv() -> ::c_int; - pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; + pub fn clearenv() -> c_int; + pub fn ctermid(s: *mut c_char) -> *mut c_char; pub fn sync(); - pub fn getpagesize() -> ::c_int; + pub fn getpagesize() -> c_int; - pub fn brk(addr: *mut ::c_void) -> ::c_int; - pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; + pub fn brk(addr: *mut c_void) -> c_int; + pub fn sbrk(increment: intptr_t) -> *mut c_void; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - - pub fn posix_spawn_file_actions_init(file_actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy( - file_actions: *mut posix_spawn_file_actions_t, - ) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + + pub fn posix_spawn_file_actions_init(file_actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(file_actions: *mut posix_spawn_file_actions_t) + -> c_int; pub fn posix_spawn_file_actions_addopen( file_actions: *mut posix_spawn_file_actions_t, - fildes: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fildes: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( file_actions: *mut posix_spawn_file_actions_t, - fildes: ::c_int, - ) -> ::c_int; + fildes: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( file_actions: *mut posix_spawn_file_actions_t, - fildes: ::c_int, - newfildes: ::c_int, - ) -> ::c_int; - - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - _flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + fildes: c_int, + newfildes: c_int, + ) -> c_int; + + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, _flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - _pgroup: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, pgroup: ::pid_t) -> ::c_int; + _pgroup: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, pgroup: crate::pid_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - sigdefault: *mut ::sigset_t, - ) -> ::c_int; + sigdefault: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - sigdefault: *const ::sigset_t, - ) -> ::c_int; + sigdefault: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - _sigmask: *mut ::sigset_t, - ) -> ::c_int; + _sigmask: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - sigmask: *const ::sigset_t, - ) -> ::c_int; + sigmask: *const crate::sigset_t, + ) -> c_int; pub fn getopt_long( - argc: ::c_int, + argc: c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, - longindex: *mut ::c_int, - ) -> ::c_int; + longindex: *mut c_int, + ) -> c_int; pub fn strcasecmp_l( - string1: *const ::c_char, - string2: *const ::c_char, - locale: ::locale_t, - ) -> ::c_int; + string1: *const c_char, + string2: *const c_char, + locale: crate::locale_t, + ) -> c_int; pub fn strncasecmp_l( - string1: *const ::c_char, - string2: *const ::c_char, - length: ::size_t, - locale: ::locale_t, - ) -> ::c_int; + string1: *const c_char, + string2: *const c_char, + length: size_t, + locale: crate::locale_t, + ) -> c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; } #[link(name = "bsd")] extern "C" { - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::pid_t; + winp: *mut crate::winsize, + ) -> crate::pid_t; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::c_int; - pub fn strsep(string: *mut *mut ::c_char, delimiters: *const ::c_char) -> *mut ::c_char; - pub fn explicit_bzero(buf: *mut ::c_void, len: ::size_t); - pub fn login_tty(_fd: ::c_int) -> ::c_int; + winp: *mut crate::winsize, + ) -> c_int; + pub fn strsep(string: *mut *mut c_char, delimiters: *const c_char) -> *mut c_char; + pub fn explicit_bzero(buf: *mut c_void, len: size_t); + pub fn login_tty(_fd: c_int) -> c_int; pub fn sl_init() -> *mut StringList; - pub fn sl_add(sl: *mut StringList, n: *mut ::c_char) -> ::c_int; - pub fn sl_free(sl: *mut StringList, i: ::c_int); - pub fn sl_find(sl: *mut StringList, n: *mut ::c_char) -> *mut ::c_char; + pub fn sl_add(sl: *mut StringList, n: *mut c_char) -> c_int; + pub fn sl_free(sl: *mut StringList, i: c_int); + pub fn sl_find(sl: *mut StringList, n: *mut c_char) -> *mut c_char; - pub fn getprogname() -> *const ::c_char; - pub fn setprogname(progname: *const ::c_char); + pub fn getprogname() -> *const c_char; + pub fn setprogname(progname: *const c_char); pub fn dl_iterate_phdr( - callback: ::Option< - unsafe extern "C" fn( - info: *mut dl_phdr_info, - size: usize, - data: *mut ::c_void, - ) -> ::c_int, + callback: Option< + unsafe extern "C" fn(info: *mut dl_phdr_info, size: usize, data: *mut c_void) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; pub fn arc4random() -> u32; pub fn arc4random_uniform(upper_bound: u32) -> u32; - pub fn arc4random_buf(buf: *mut ::c_void, n: ::size_t); + pub fn arc4random_buf(buf: *mut c_void, n: size_t); } #[link(name = "gnu")] extern "C" { pub fn memmem( - source: *const ::c_void, - sourceLength: ::size_t, - search: *const ::c_void, - searchLength: ::size_t, - ) -> *mut ::c_void; + source: *const c_void, + sourceLength: size_t, + search: *const c_void, + searchLength: size_t, + ) -> *mut c_void; - pub fn pthread_getattr_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_getattr_np(thread: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_getname_np( - thread: ::pthread_t, - buffer: *mut ::c_char, - length: ::size_t, - ) -> ::c_int; - pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int; + thread: crate::pthread_t, + buffer: *mut c_char, + length: size_t, + ) -> c_int; + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; } cfg_if! { diff --git a/src/unix/haiku/native.rs b/src/unix/haiku/native.rs index e2997d1da986c..4d51a38e97f41 100644 --- a/src/unix/haiku/native.rs +++ b/src/unix/haiku/native.rs @@ -1,3 +1,5 @@ +use crate::{c_char, c_double, c_int, c_uint, c_ulong, c_void, off_t, size_t, ssize_t}; + // This module contains bindings to the native Haiku API. The Haiku API // originates from BeOS, and it was the original way to perform low level // system and IO operations. The POSIX API was in that era was like a @@ -38,7 +40,7 @@ pub type sem_id = i32; pub type team_id = i32; pub type thread_id = i32; -pub type thread_func = extern "C" fn(*mut ::c_void) -> status_t; +pub type thread_func = extern "C" fn(*mut c_void) -> status_t; // kernel/image.h pub type image_id = i32; @@ -247,7 +249,7 @@ s! { // kernel/OS.h pub struct area_info { pub area: area_id, - pub name: [::c_char; B_OS_NAME_LENGTH], + pub name: [c_char; B_OS_NAME_LENGTH], pub size: usize, pub lock: u32, pub protection: u32, @@ -256,23 +258,23 @@ s! { pub copy_count: u32, pub in_count: u32, pub out_count: u32, - pub address: *mut ::c_void, + pub address: *mut c_void, } pub struct port_info { pub port: port_id, pub team: team_id, - pub name: [::c_char; B_OS_NAME_LENGTH], + pub name: [c_char; B_OS_NAME_LENGTH], pub capacity: i32, pub queue_count: i32, pub total_count: i32, } pub struct port_message_info { - pub size: ::size_t, - pub sender: ::uid_t, - pub sender_group: ::gid_t, - pub sender_team: ::team_id, + pub size: size_t, + pub sender: crate::uid_t, + pub sender_group: crate::gid_t, + pub sender_team: crate::team_id, } pub struct team_info { @@ -283,15 +285,15 @@ s! { pub debugger_nub_thread: thread_id, pub debugger_nub_port: port_id, pub argc: i32, - pub args: [::c_char; 64], - pub uid: ::uid_t, - pub gid: ::gid_t, + pub args: [c_char; 64], + pub uid: crate::uid_t, + pub gid: crate::gid_t, } pub struct sem_info { pub sem: sem_id, pub team: team_id, - pub name: [::c_char; B_OS_NAME_LENGTH], + pub name: [c_char; B_OS_NAME_LENGTH], pub count: i32, pub latest_holder: thread_id, } @@ -304,14 +306,14 @@ s! { pub struct thread_info { pub thread: thread_id, pub team: team_id, - pub name: [::c_char; B_OS_NAME_LENGTH], + pub name: [c_char; B_OS_NAME_LENGTH], pub state: thread_state, pub priority: i32, pub sem: sem_id, pub user_time: bigtime_t, pub kernel_time: bigtime_t, - pub stack_base: *mut ::c_void, - pub stack_end: *mut ::c_void, + pub stack_base: *mut c_void, + pub stack_end: *mut c_void, } pub struct cpu_info { @@ -341,9 +343,9 @@ s! { pub used_threads: u32, pub max_teams: u32, pub used_teams: u32, - pub kernel_name: [::c_char; B_FILE_NAME_LENGTH], - pub kernel_build_date: [::c_char; B_OS_NAME_LENGTH], - pub kernel_build_time: [::c_char; B_OS_NAME_LENGTH], + pub kernel_name: [c_char; B_FILE_NAME_LENGTH], + pub kernel_build_date: [c_char; B_OS_NAME_LENGTH], + pub kernel_build_time: [c_char; B_OS_NAME_LENGTH], pub kernel_version: i64, pub abi: u32, } @@ -370,48 +372,48 @@ s! { // kernel/fs_attr.h pub struct attr_info { pub type_: u32, - pub size: ::off_t, + pub size: off_t, } // kernel/fs_index.h pub struct index_info { pub type_: u32, - pub size: ::off_t, - pub modification_time: ::time_t, - pub creation_time: ::time_t, - pub uid: ::uid_t, - pub gid: ::gid_t, + pub size: off_t, + pub modification_time: crate::time_t, + pub creation_time: crate::time_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, } //kernel/fs_info.h pub struct fs_info { - pub dev: ::dev_t, - pub root: ::ino_t, + pub dev: crate::dev_t, + pub root: crate::ino_t, pub flags: u32, - pub block_size: ::off_t, - pub io_size: ::off_t, - pub total_blocks: ::off_t, - pub free_blocks: ::off_t, - pub total_nodes: ::off_t, - pub free_nodes: ::off_t, - pub device_name: [::c_char; 128], - pub volume_name: [::c_char; B_FILE_NAME_LENGTH], - pub fsh_name: [::c_char; B_OS_NAME_LENGTH], + pub block_size: off_t, + pub io_size: off_t, + pub total_blocks: off_t, + pub free_blocks: off_t, + pub total_nodes: off_t, + pub free_nodes: off_t, + pub device_name: [c_char; 128], + pub volume_name: [c_char; B_FILE_NAME_LENGTH], + pub fsh_name: [c_char; B_OS_NAME_LENGTH], } // kernel/image.h pub struct image_info { pub id: image_id, - pub image_type: ::c_int, + pub image_type: c_int, pub sequence: i32, pub init_order: i32, pub init_routine: extern "C" fn(), pub term_routine: extern "C" fn(), - pub device: ::dev_t, - pub node: ::ino_t, - pub name: [::c_char; ::PATH_MAX as usize], - pub text: *mut ::c_void, - pub data: *mut ::c_void, + pub device: crate::dev_t, + pub node: crate::ino_t, + pub name: [c_char; crate::PATH_MAX as usize], + pub text: *mut c_void, + pub data: *mut c_void, pub text_size: i32, pub data_size: i32, pub api_version: i32, @@ -420,7 +422,7 @@ s! { pub struct __c_anonymous_eax_0 { pub max_eax: u32, - pub vendor_id: [::c_char; 12], + pub vendor_id: [c_char; 12], } pub struct __c_anonymous_eax_1 { @@ -465,7 +467,7 @@ s_no_extra_traits! { pub eax_1: __c_anonymous_eax_1, pub eax_2: __c_anonymous_eax_2, pub eax_3: __c_anonymous_eax_3, - pub as_chars: [::c_char; 16], + pub as_chars: [c_char; 16], pub regs: __c_anonymous_regs, } @@ -498,8 +500,8 @@ cfg_if! { } } impl Eq for cpuid_info {} - impl ::fmt::Debug for cpuid_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for cpuid_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("cpuid_info") .field("eax_0", &self.eax_0) @@ -523,8 +525,8 @@ cfg_if! { } } impl Eq for __c_anonymous_cpu_topology_info_data {} - impl ::fmt::Debug for __c_anonymous_cpu_topology_info_data { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_cpu_topology_info_data { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("__c_anonymous_cpu_topology_info_data") .field("root", &self.root) @@ -542,8 +544,8 @@ cfg_if! { } impl Eq for cpu_topology_node_info {} - impl ::fmt::Debug for cpu_topology_node_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for cpu_topology_node_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("cpu_topology_node_info") .field("id", &self.id) .field("type", &self.type_) @@ -666,21 +668,21 @@ pub const B_SYMBOL_TYPE_ANY: i32 = 0x5; // storage/StorageDefs.h pub const B_DEV_NAME_LENGTH: usize = 128; -pub const B_FILE_NAME_LENGTH: usize = ::FILENAME_MAX as usize; -pub const B_PATH_NAME_LENGTH: usize = ::PATH_MAX as usize; +pub const B_FILE_NAME_LENGTH: usize = crate::FILENAME_MAX as usize; +pub const B_PATH_NAME_LENGTH: usize = crate::PATH_MAX as usize; pub const B_ATTR_NAME_LENGTH: usize = B_FILE_NAME_LENGTH - 1; pub const B_MIME_TYPE_LENGTH: usize = B_ATTR_NAME_LENGTH - 15; pub const B_MAX_SYMLINKS: usize = 16; // Haiku open modes in BFile are passed as u32 -pub const B_READ_ONLY: u32 = ::O_RDONLY as u32; -pub const B_WRITE_ONLY: u32 = ::O_WRONLY as u32; -pub const B_READ_WRITE: u32 = ::O_RDWR as u32; +pub const B_READ_ONLY: u32 = crate::O_RDONLY as u32; +pub const B_WRITE_ONLY: u32 = crate::O_WRONLY as u32; +pub const B_READ_WRITE: u32 = crate::O_RDWR as u32; -pub const B_FAIL_IF_EXISTS: u32 = ::O_EXCL as u32; -pub const B_CREATE_FILE: u32 = ::O_CREAT as u32; -pub const B_ERASE_FILE: u32 = ::O_TRUNC as u32; -pub const B_OPEN_AT_END: u32 = ::O_APPEND as u32; +pub const B_FAIL_IF_EXISTS: u32 = crate::O_EXCL as u32; +pub const B_CREATE_FILE: u32 = crate::O_CREAT as u32; +pub const B_ERASE_FILE: u32 = crate::O_TRUNC as u32; +pub const B_OPEN_AT_END: u32 = crate::O_APPEND as u32; pub const B_FILE_NODE: u32 = 0x01; pub const B_SYMLINK_NODE: u32 = 0x02; @@ -791,12 +793,12 @@ pub const B_PARTIAL_READ: status_t = B_STORAGE_ERROR_BASE + 16; pub const B_PARTIAL_WRITE: status_t = B_STORAGE_ERROR_BASE + 17; // Mapped posix errors -pub const B_BUFFER_OVERFLOW: status_t = ::EOVERFLOW; -pub const B_TOO_MANY_ARGS: status_t = ::E2BIG; -pub const B_FILE_TOO_LARGE: status_t = ::EFBIG; -pub const B_RESULT_NOT_REPRESENTABLE: status_t = ::ERANGE; -pub const B_DEVICE_NOT_FOUND: status_t = ::ENODEV; -pub const B_NOT_SUPPORTED: status_t = ::EOPNOTSUPP; +pub const B_BUFFER_OVERFLOW: status_t = crate::EOVERFLOW; +pub const B_TOO_MANY_ARGS: status_t = crate::E2BIG; +pub const B_FILE_TOO_LARGE: status_t = crate::EFBIG; +pub const B_RESULT_NOT_REPRESENTABLE: status_t = crate::ERANGE; +pub const B_DEVICE_NOT_FOUND: status_t = crate::ENODEV; +pub const B_NOT_SUPPORTED: status_t = crate::EOPNOTSUPP; // Media kit errors pub const B_STREAM_NOT_FOUND: status_t = B_MEDIA_ERROR_BASE + 0; @@ -943,27 +945,27 @@ pub const B_XATTR_TYPE: u32 = haiku_constant!('X', 'A', 'T', 'R'); pub const B_NETWORK_ADDRESS_TYPE: u32 = haiku_constant!('N', 'W', 'A', 'D'); pub const B_MIME_STRING_TYPE: u32 = haiku_constant!('M', 'I', 'M', 'S'); pub const B_ASCII_TYPE: u32 = haiku_constant!('T', 'E', 'X', 'T'); -pub const B_APP_IMAGE_SYMBOL: *const ::c_void = core::ptr::null(); +pub const B_APP_IMAGE_SYMBOL: *const c_void = core::ptr::null(); extern "C" { // kernel/OS.h pub fn create_area( - name: *const ::c_char, - startAddress: *mut *mut ::c_void, + name: *const c_char, + startAddress: *mut *mut c_void, addressSpec: u32, size: usize, lock: u32, protection: u32, ) -> area_id; pub fn clone_area( - name: *const ::c_char, - destAddress: *mut *mut ::c_void, + name: *const c_char, + destAddress: *mut *mut c_void, addressSpec: u32, protection: u32, source: area_id, ) -> area_id; - pub fn find_area(name: *const ::c_char) -> area_id; - pub fn area_for(address: *mut ::c_void) -> area_id; + pub fn find_area(name: *const c_char) -> area_id; + pub fn area_for(address: *mut c_void) -> area_id; pub fn delete_area(id: area_id) -> status_t; pub fn resize_area(id: area_id, newSize: usize) -> status_t; pub fn set_area_protection(id: area_id, newProtection: u32) -> status_t; @@ -975,59 +977,59 @@ extern "C" { size: usize, ) -> status_t; - pub fn create_port(capacity: i32, name: *const ::c_char) -> port_id; - pub fn find_port(name: *const ::c_char) -> port_id; + pub fn create_port(capacity: i32, name: *const c_char) -> port_id; + pub fn find_port(name: *const c_char) -> port_id; pub fn read_port( port: port_id, code: *mut i32, - buffer: *mut ::c_void, - bufferSize: ::size_t, - ) -> ::ssize_t; + buffer: *mut c_void, + bufferSize: size_t, + ) -> ssize_t; pub fn read_port_etc( port: port_id, code: *mut i32, - buffer: *mut ::c_void, - bufferSize: ::size_t, + buffer: *mut c_void, + bufferSize: size_t, flags: u32, timeout: bigtime_t, - ) -> ::ssize_t; + ) -> ssize_t; pub fn write_port( port: port_id, code: i32, - buffer: *const ::c_void, - bufferSize: ::size_t, + buffer: *const c_void, + bufferSize: size_t, ) -> status_t; pub fn write_port_etc( port: port_id, code: i32, - buffer: *const ::c_void, - bufferSize: ::size_t, + buffer: *const c_void, + bufferSize: size_t, flags: u32, timeout: bigtime_t, ) -> status_t; pub fn close_port(port: port_id) -> status_t; pub fn delete_port(port: port_id) -> status_t; - pub fn port_buffer_size(port: port_id) -> ::ssize_t; - pub fn port_buffer_size_etc(port: port_id, flags: u32, timeout: bigtime_t) -> ::ssize_t; - pub fn port_count(port: port_id) -> ::ssize_t; + pub fn port_buffer_size(port: port_id) -> ssize_t; + pub fn port_buffer_size_etc(port: port_id, flags: u32, timeout: bigtime_t) -> ssize_t; + pub fn port_count(port: port_id) -> ssize_t; pub fn set_port_owner(port: port_id, team: team_id) -> status_t; - pub fn _get_port_info(port: port_id, buf: *mut port_info, portInfoSize: ::size_t) -> status_t; + pub fn _get_port_info(port: port_id, buf: *mut port_info, portInfoSize: size_t) -> status_t; pub fn _get_next_port_info( port: port_id, cookie: *mut i32, portInfo: *mut port_info, - portInfoSize: ::size_t, + portInfoSize: size_t, ) -> status_t; pub fn _get_port_message_info_etc( port: port_id, info: *mut port_message_info, - infoSize: ::size_t, + infoSize: size_t, flags: u32, timeout: bigtime_t, ) -> status_t; - pub fn create_sem(count: i32, name: *const ::c_char) -> sem_id; + pub fn create_sem(count: i32, name: *const c_char) -> sem_id; pub fn delete_sem(id: sem_id) -> status_t; pub fn acquire_sem(id: sem_id) -> status_t; pub fn acquire_sem_etc(id: sem_id, count: i32, flags: u32, timeout: bigtime_t) -> status_t; @@ -1043,42 +1045,42 @@ extern "C" { ) -> status_t; pub fn get_sem_count(id: sem_id, threadCount: *mut i32) -> status_t; pub fn set_sem_owner(id: sem_id, team: team_id) -> status_t; - pub fn _get_sem_info(id: sem_id, info: *mut sem_info, infoSize: ::size_t) -> status_t; + pub fn _get_sem_info(id: sem_id, info: *mut sem_info, infoSize: size_t) -> status_t; pub fn _get_next_sem_info( team: team_id, cookie: *mut i32, info: *mut sem_info, - infoSize: ::size_t, + infoSize: size_t, ) -> status_t; pub fn kill_team(team: team_id) -> status_t; - pub fn _get_team_info(team: team_id, info: *mut team_info, size: ::size_t) -> status_t; - pub fn _get_next_team_info(cookie: *mut i32, info: *mut team_info, size: ::size_t) -> status_t; + pub fn _get_team_info(team: team_id, info: *mut team_info, size: size_t) -> status_t; + pub fn _get_next_team_info(cookie: *mut i32, info: *mut team_info, size: size_t) -> status_t; pub fn spawn_thread( func: thread_func, - name: *const ::c_char, + name: *const c_char, priority: i32, - data: *mut ::c_void, + data: *mut c_void, ) -> thread_id; pub fn kill_thread(thread: thread_id) -> status_t; pub fn resume_thread(thread: thread_id) -> status_t; pub fn suspend_thread(thread: thread_id) -> status_t; - pub fn rename_thread(thread: thread_id, newName: *const ::c_char) -> status_t; + pub fn rename_thread(thread: thread_id, newName: *const c_char) -> status_t; pub fn set_thread_priority(thread: thread_id, newPriority: i32) -> status_t; pub fn suggest_thread_priority( what: u32, period: i32, - jitter: ::bigtime_t, - length: ::bigtime_t, + jitter: crate::bigtime_t, + length: crate::bigtime_t, ) -> i32; - pub fn estimate_max_scheduling_latency(th: ::thread_id) -> ::bigtime_t; + pub fn estimate_max_scheduling_latency(th: crate::thread_id) -> crate::bigtime_t; pub fn exit_thread(status: status_t); pub fn wait_for_thread(thread: thread_id, returnValue: *mut status_t) -> status_t; - pub fn on_exit_thread(callback: extern "C" fn(*mut ::c_void), data: *mut ::c_void) -> status_t; + pub fn on_exit_thread(callback: extern "C" fn(*mut c_void), data: *mut c_void) -> status_t; - pub fn find_thread(name: *const ::c_char) -> thread_id; + pub fn find_thread(name: *const c_char) -> thread_id; pub fn get_scheduler_mode() -> i32; pub fn set_scheduler_mode(mode: i32) -> status_t; @@ -1086,244 +1088,237 @@ extern "C" { pub fn send_data( thread: thread_id, code: i32, - buffer: *const ::c_void, - bufferSize: ::size_t, + buffer: *const c_void, + bufferSize: size_t, ) -> status_t; - pub fn receive_data(sender: *mut thread_id, buffer: *mut ::c_void, bufferSize: ::size_t) - -> i32; + pub fn receive_data(sender: *mut thread_id, buffer: *mut c_void, bufferSize: size_t) -> i32; pub fn has_data(thread: thread_id) -> bool; pub fn snooze(amount: bigtime_t) -> status_t; - pub fn snooze_etc(amount: bigtime_t, timeBase: ::c_int, flags: u32) -> status_t; - pub fn snooze_until(time: bigtime_t, timeBase: ::c_int) -> status_t; + pub fn snooze_etc(amount: bigtime_t, timeBase: c_int, flags: u32) -> status_t; + pub fn snooze_until(time: bigtime_t, timeBase: c_int) -> status_t; - pub fn _get_thread_info(id: thread_id, info: *mut thread_info, size: ::size_t) -> status_t; + pub fn _get_thread_info(id: thread_id, info: *mut thread_info, size: size_t) -> status_t; pub fn _get_next_thread_info( team: team_id, cookie: *mut i32, info: *mut thread_info, - size: ::size_t, + size: size_t, ) -> status_t; - pub fn get_pthread_thread_id(thread: ::pthread_t) -> thread_id; + pub fn get_pthread_thread_id(thread: crate::pthread_t) -> thread_id; pub fn _get_team_usage_info( team: team_id, who: i32, info: *mut team_usage_info, - size: ::size_t, + size: size_t, ) -> status_t; - pub fn real_time_clock() -> ::c_ulong; - pub fn set_real_time_clock(secsSinceJan1st1970: ::c_ulong); + pub fn real_time_clock() -> c_ulong; + pub fn set_real_time_clock(secsSinceJan1st1970: c_ulong); pub fn real_time_clock_usecs() -> bigtime_t; pub fn system_time() -> bigtime_t; pub fn system_time_nsecs() -> nanotime_t; // set_timezone() is deprecated and a no-op pub fn set_alarm(when: bigtime_t, flags: u32) -> bigtime_t; - pub fn debugger(message: *const ::c_char); - pub fn disable_debugger(state: ::c_int) -> ::c_int; + pub fn debugger(message: *const c_char); + pub fn disable_debugger(state: c_int) -> c_int; pub fn get_system_info(info: *mut system_info) -> status_t; pub fn _get_cpu_info_etc( firstCPU: u32, cpuCount: u32, info: *mut cpu_info, - size: ::size_t, + size: size_t, ) -> status_t; pub fn get_cpu_topology_info( topologyInfos: *mut cpu_topology_node_info, topologyInfoCount: *mut u32, ) -> status_t; pub fn is_computer_on() -> i32; - pub fn is_computer_on_fire() -> ::c_double; - pub fn send_signal(threadID: thread_id, signal: ::c_uint) -> ::c_int; - pub fn set_signal_stack(base: *mut ::c_void, size: ::size_t); + pub fn is_computer_on_fire() -> c_double; + pub fn send_signal(threadID: thread_id, signal: c_uint) -> c_int; + pub fn set_signal_stack(base: *mut c_void, size: size_t); - pub fn wait_for_objects(infos: *mut object_wait_info, numInfos: ::c_int) -> ::ssize_t; + pub fn wait_for_objects(infos: *mut object_wait_info, numInfos: c_int) -> ssize_t; pub fn wait_for_objects_etc( infos: *mut object_wait_info, - numInfos: ::c_int, + numInfos: c_int, flags: u32, timeout: bigtime_t, - ) -> ::ssize_t; + ) -> ssize_t; // kernel/fs_attr.h pub fn fs_read_attr( - fd: ::c_int, - attribute: *const ::c_char, + fd: c_int, + attribute: *const c_char, type_: u32, - pos: ::off_t, - buffer: *mut ::c_void, - readBytes: ::size_t, - ) -> ::ssize_t; + pos: off_t, + buffer: *mut c_void, + readBytes: size_t, + ) -> ssize_t; pub fn fs_write_attr( - fd: ::c_int, - attribute: *const ::c_char, + fd: c_int, + attribute: *const c_char, type_: u32, - pos: ::off_t, - buffer: *const ::c_void, - writeBytes: ::size_t, - ) -> ::ssize_t; - pub fn fs_remove_attr(fd: ::c_int, attribute: *const ::c_char) -> ::c_int; - pub fn fs_stat_attr( - fd: ::c_int, - attribute: *const ::c_char, - attrInfo: *mut attr_info, - ) -> ::c_int; + pos: off_t, + buffer: *const c_void, + writeBytes: size_t, + ) -> ssize_t; + pub fn fs_remove_attr(fd: c_int, attribute: *const c_char) -> c_int; + pub fn fs_stat_attr(fd: c_int, attribute: *const c_char, attrInfo: *mut attr_info) -> c_int; pub fn fs_open_attr( - path: *const ::c_char, - attribute: *const ::c_char, - type_: u32, - openMode: ::c_int, - ) -> ::c_int; - pub fn fs_fopen_attr( - fd: ::c_int, - attribute: *const ::c_char, + path: *const c_char, + attribute: *const c_char, type_: u32, - openMode: ::c_int, - ) -> ::c_int; - pub fn fs_close_attr(fd: ::c_int) -> ::c_int; - - pub fn fs_open_attr_dir(path: *const ::c_char) -> *mut ::DIR; - pub fn fs_lopen_attr_dir(path: *const ::c_char) -> *mut ::DIR; - pub fn fs_fopen_attr_dir(fd: ::c_int) -> *mut ::DIR; - pub fn fs_close_attr_dir(dir: *mut ::DIR) -> ::c_int; - pub fn fs_read_attr_dir(dir: *mut ::DIR) -> *mut ::dirent; - pub fn fs_rewind_attr_dir(dir: *mut ::DIR); + openMode: c_int, + ) -> c_int; + pub fn fs_fopen_attr(fd: c_int, attribute: *const c_char, type_: u32, openMode: c_int) + -> c_int; + pub fn fs_close_attr(fd: c_int) -> c_int; + + pub fn fs_open_attr_dir(path: *const c_char) -> *mut crate::DIR; + pub fn fs_lopen_attr_dir(path: *const c_char) -> *mut crate::DIR; + pub fn fs_fopen_attr_dir(fd: c_int) -> *mut crate::DIR; + pub fn fs_close_attr_dir(dir: *mut crate::DIR) -> c_int; + pub fn fs_read_attr_dir(dir: *mut crate::DIR) -> *mut crate::dirent; + pub fn fs_rewind_attr_dir(dir: *mut crate::DIR); // kernel/fs_image.h pub fn fs_create_index( - device: ::dev_t, - name: *const ::c_char, + device: crate::dev_t, + name: *const c_char, type_: u32, flags: u32, - ) -> ::c_int; - pub fn fs_remove_index(device: ::dev_t, name: *const ::c_char) -> ::c_int; + ) -> c_int; + pub fn fs_remove_index(device: crate::dev_t, name: *const c_char) -> c_int; pub fn fs_stat_index( - device: ::dev_t, - name: *const ::c_char, + device: crate::dev_t, + name: *const c_char, indexInfo: *mut index_info, - ) -> ::c_int; + ) -> c_int; - pub fn fs_open_index_dir(device: ::dev_t) -> *mut ::DIR; - pub fn fs_close_index_dir(indexDirectory: *mut ::DIR) -> ::c_int; - pub fn fs_read_index_dir(indexDirectory: *mut ::DIR) -> *mut ::dirent; - pub fn fs_rewind_index_dir(indexDirectory: *mut ::DIR); + pub fn fs_open_index_dir(device: crate::dev_t) -> *mut crate::DIR; + pub fn fs_close_index_dir(indexDirectory: *mut crate::DIR) -> c_int; + pub fn fs_read_index_dir(indexDirectory: *mut crate::DIR) -> *mut crate::dirent; + pub fn fs_rewind_index_dir(indexDirectory: *mut crate::DIR); // kernel/fs_info.h - pub fn dev_for_path(path: *const ::c_char) -> ::dev_t; - pub fn next_dev(pos: *mut i32) -> ::dev_t; - pub fn fs_stat_dev(dev: ::dev_t, info: *mut fs_info) -> ::c_int; + pub fn dev_for_path(path: *const c_char) -> crate::dev_t; + pub fn next_dev(pos: *mut i32) -> crate::dev_t; + pub fn fs_stat_dev(dev: crate::dev_t, info: *mut fs_info) -> c_int; // kernel/fs_query.h - pub fn fs_open_query(device: ::dev_t, query: *const ::c_char, flags: u32) -> *mut ::DIR; + pub fn fs_open_query(device: crate::dev_t, query: *const c_char, flags: u32) + -> *mut crate::DIR; pub fn fs_open_live_query( - device: ::dev_t, - query: *const ::c_char, + device: crate::dev_t, + query: *const c_char, flags: u32, port: port_id, token: i32, - ) -> *mut ::DIR; - pub fn fs_close_query(d: *mut ::DIR) -> ::c_int; - pub fn fs_read_query(d: *mut ::DIR) -> *mut ::dirent; - pub fn get_path_for_dirent(dent: *mut ::dirent, buf: *mut ::c_char, len: ::size_t) -> status_t; + ) -> *mut crate::DIR; + pub fn fs_close_query(d: *mut crate::DIR) -> c_int; + pub fn fs_read_query(d: *mut crate::DIR) -> *mut crate::dirent; + pub fn get_path_for_dirent(dent: *mut crate::dirent, buf: *mut c_char, len: size_t) + -> status_t; // kernel/fs_volume.h pub fn fs_mount_volume( - where_: *const ::c_char, - device: *const ::c_char, - filesystem: *const ::c_char, + where_: *const c_char, + device: *const c_char, + filesystem: *const c_char, flags: u32, - parameters: *const ::c_char, - ) -> ::dev_t; - pub fn fs_unmount_volume(path: *const ::c_char, flags: u32) -> status_t; + parameters: *const c_char, + ) -> crate::dev_t; + pub fn fs_unmount_volume(path: *const c_char, flags: u32) -> status_t; // kernel/image.h pub fn load_image( argc: i32, - argv: *mut *const ::c_char, - environ: *mut *const ::c_char, + argv: *mut *const c_char, + environ: *mut *const c_char, ) -> thread_id; - pub fn load_add_on(path: *const ::c_char) -> image_id; + pub fn load_add_on(path: *const c_char) -> image_id; pub fn unload_add_on(image: image_id) -> status_t; pub fn get_image_symbol( image: image_id, - name: *const ::c_char, + name: *const c_char, symbolType: i32, - symbolLocation: *mut *mut ::c_void, + symbolLocation: *mut *mut c_void, ) -> status_t; pub fn get_nth_image_symbol( image: image_id, n: i32, - nameBuffer: *mut ::c_char, + nameBuffer: *mut c_char, nameLength: *mut i32, symbolType: *mut i32, - symbolLocation: *mut *mut ::c_void, + symbolLocation: *mut *mut c_void, ) -> status_t; - pub fn clear_caches(address: *mut ::c_void, length: ::size_t, flags: u32); - pub fn _get_image_info(image: image_id, info: *mut image_info, size: ::size_t) -> status_t; + pub fn clear_caches(address: *mut c_void, length: size_t, flags: u32); + pub fn _get_image_info(image: image_id, info: *mut image_info, size: size_t) -> status_t; pub fn _get_next_image_info( team: team_id, cookie: *mut i32, info: *mut image_info, - size: ::size_t, + size: size_t, ) -> status_t; pub fn find_path( - codePointer: *const ::c_void, + codePointer: *const c_void, baseDirectory: path_base_directory, - subPath: *const ::c_char, - pathBuffer: *mut ::c_char, + subPath: *const c_char, + pathBuffer: *mut c_char, bufferSize: usize, ) -> status_t; pub fn find_path_etc( - codePointer: *const ::c_void, - dependency: *const ::c_char, - architecture: *const ::c_char, + codePointer: *const c_void, + dependency: *const c_char, + architecture: *const c_char, baseDirectory: path_base_directory, - subPath: *const ::c_char, + subPath: *const c_char, flags: u32, - pathBuffer: *mut ::c_char, - bufferSize: ::size_t, + pathBuffer: *mut c_char, + bufferSize: size_t, ) -> status_t; pub fn find_path_for_path( - path: *const ::c_char, + path: *const c_char, baseDirectory: path_base_directory, - subPath: *const ::c_char, - pathBuffer: *mut ::c_char, - bufferSize: ::size_t, + subPath: *const c_char, + pathBuffer: *mut c_char, + bufferSize: size_t, ) -> status_t; pub fn find_path_for_path_etc( - path: *const ::c_char, - dependency: *const ::c_char, - architecture: *const ::c_char, + path: *const c_char, + dependency: *const c_char, + architecture: *const c_char, baseDirectory: path_base_directory, - subPath: *const ::c_char, + subPath: *const c_char, flags: u32, - pathBuffer: *mut ::c_char, - bufferSize: ::size_t, + pathBuffer: *mut c_char, + bufferSize: size_t, ) -> status_t; pub fn find_paths( baseDirectory: path_base_directory, - subPath: *const ::c_char, - _paths: *mut *mut *mut ::c_char, - pathCount: *mut ::size_t, + subPath: *const c_char, + _paths: *mut *mut *mut c_char, + pathCount: *mut size_t, ) -> status_t; pub fn find_paths_etc( - architecture: *const ::c_char, + architecture: *const c_char, baseDirectory: path_base_directory, - subPath: *const ::c_char, + subPath: *const c_char, flags: u32, - _paths: *mut *mut *mut ::c_char, - pathCount: *mut ::size_t, + _paths: *mut *mut *mut c_char, + pathCount: *mut size_t, ) -> status_t; pub fn find_directory( which: directory_which, - volume: ::dev_t, + volume: crate::dev_t, createIt: bool, - pathString: *mut ::c_char, + pathString: *mut c_char, length: i32, ) -> status_t; @@ -1337,7 +1332,7 @@ pub unsafe fn get_cpu_info(firstCPU: u32, cpuCount: u32, info: *mut cpu_info) -> firstCPU, cpuCount, info, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, ) } @@ -1362,7 +1357,7 @@ pub unsafe fn get_next_area_info( #[inline] pub unsafe fn get_port_info(port: port_id, buf: *mut port_info) -> status_t { - _get_port_info(port, buf, core::mem::size_of::() as ::size_t) + _get_port_info(port, buf, core::mem::size_of::() as size_t) } #[inline] @@ -1375,7 +1370,7 @@ pub unsafe fn get_next_port_info( port, cookie, portInfo, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, ) } @@ -1389,7 +1384,7 @@ pub unsafe fn get_port_message_info_etc( _get_port_message_info_etc( port, info, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, flags, timeout, ) @@ -1397,7 +1392,7 @@ pub unsafe fn get_port_message_info_etc( #[inline] pub unsafe fn get_sem_info(id: sem_id, info: *mut sem_info) -> status_t { - _get_sem_info(id, info, core::mem::size_of::() as ::size_t) + _get_sem_info(id, info, core::mem::size_of::() as size_t) } #[inline] @@ -1406,18 +1401,18 @@ pub unsafe fn get_next_sem_info(team: team_id, cookie: *mut i32, info: *mut sem_ team, cookie, info, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, ) } #[inline] pub unsafe fn get_team_info(team: team_id, info: *mut team_info) -> status_t { - _get_team_info(team, info, core::mem::size_of::() as ::size_t) + _get_team_info(team, info, core::mem::size_of::() as size_t) } #[inline] pub unsafe fn get_next_team_info(cookie: *mut i32, info: *mut team_info) -> status_t { - _get_next_team_info(cookie, info, core::mem::size_of::() as ::size_t) + _get_next_team_info(cookie, info, core::mem::size_of::() as size_t) } #[inline] @@ -1426,13 +1421,13 @@ pub unsafe fn get_team_usage_info(team: team_id, who: i32, info: *mut team_usage team, who, info, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, ) } #[inline] pub unsafe fn get_thread_info(id: thread_id, info: *mut thread_info) -> status_t { - _get_thread_info(id, info, core::mem::size_of::() as ::size_t) + _get_thread_info(id, info, core::mem::size_of::() as size_t) } #[inline] @@ -1445,14 +1440,14 @@ pub unsafe fn get_next_thread_info( team, cookie, info, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, ) } // kernel/image.h #[inline] pub unsafe fn get_image_info(image: image_id, info: *mut image_info) -> status_t { - _get_image_info(image, info, core::mem::size_of::() as ::size_t) + _get_image_info(image, info, core::mem::size_of::() as size_t) } #[inline] @@ -1465,6 +1460,6 @@ pub unsafe fn get_next_image_info( team, cookie, info, - core::mem::size_of::() as ::size_t, + core::mem::size_of::() as size_t, ) } diff --git a/src/unix/haiku/x86_64.rs b/src/unix/haiku/x86_64.rs index b52643695d42a..0b6f03b6daf6d 100644 --- a/src/unix/haiku/x86_64.rs +++ b/src/unix/haiku/x86_64.rs @@ -1,56 +1,58 @@ +use crate::{c_uchar, c_uint, c_ulong, c_ushort}; + s_no_extra_traits! { pub struct fpu_state { - pub control: ::c_ushort, - pub status: ::c_ushort, - pub tag: ::c_ushort, - pub opcode: ::c_ushort, - pub rip: ::c_ulong, - pub rdp: ::c_ulong, - pub mxcsr: ::c_uint, - pub mscsr_mask: ::c_uint, - pub _fpreg: [[::c_uchar; 8]; 16], - pub _xmm: [[::c_uchar; 16]; 16], - pub _reserved_416_511: [::c_uchar; 96], + pub control: c_ushort, + pub status: c_ushort, + pub tag: c_ushort, + pub opcode: c_ushort, + pub rip: c_ulong, + pub rdp: c_ulong, + pub mxcsr: c_uint, + pub mscsr_mask: c_uint, + pub _fpreg: [[c_uchar; 8]; 16], + pub _xmm: [[c_uchar; 16]; 16], + pub _reserved_416_511: [c_uchar; 96], } pub struct xstate_hdr { - pub bv: ::c_ulong, - pub xcomp_bv: ::c_ulong, - pub _reserved: [::c_uchar; 48], + pub bv: c_ulong, + pub xcomp_bv: c_ulong, + pub _reserved: [c_uchar; 48], } pub struct savefpu { pub fp_fxsave: fpu_state, pub fp_xstate: xstate_hdr, - pub _fp_ymm: [[::c_uchar; 16]; 16], + pub _fp_ymm: [[c_uchar; 16]; 16], } pub struct mcontext_t { - pub rax: ::c_ulong, - pub rbx: ::c_ulong, - pub rcx: ::c_ulong, - pub rdx: ::c_ulong, - pub rdi: ::c_ulong, - pub rsi: ::c_ulong, - pub rbp: ::c_ulong, - pub r8: ::c_ulong, - pub r9: ::c_ulong, - pub r10: ::c_ulong, - pub r11: ::c_ulong, - pub r12: ::c_ulong, - pub r13: ::c_ulong, - pub r14: ::c_ulong, - pub r15: ::c_ulong, - pub rsp: ::c_ulong, - pub rip: ::c_ulong, - pub rflags: ::c_ulong, + pub rax: c_ulong, + pub rbx: c_ulong, + pub rcx: c_ulong, + pub rdx: c_ulong, + pub rdi: c_ulong, + pub rsi: c_ulong, + pub rbp: c_ulong, + pub r8: c_ulong, + pub r9: c_ulong, + pub r10: c_ulong, + pub r11: c_ulong, + pub r12: c_ulong, + pub r13: c_ulong, + pub r14: c_ulong, + pub r15: c_ulong, + pub rsp: c_ulong, + pub rip: c_ulong, + pub rflags: c_ulong, pub fpu: savefpu, } pub struct ucontext_t { pub uc_link: *mut ucontext_t, - pub uc_sigmask: ::sigset_t, - pub uc_stack: ::stack_t, + pub uc_sigmask: crate::sigset_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, } } @@ -81,8 +83,8 @@ cfg_if! { } } impl Eq for fpu_state {} - impl ::fmt::Debug for fpu_state { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpu_state { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpu_state") .field("control", &self.control) .field("status", &self.status) @@ -98,8 +100,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for fpu_state { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fpu_state { + fn hash(&self, state: &mut H) { self.control.hash(state); self.status.hash(state); self.tag.hash(state); @@ -126,8 +128,8 @@ cfg_if! { } } impl Eq for xstate_hdr {} - impl ::fmt::Debug for xstate_hdr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for xstate_hdr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("xstate_hdr") .field("bv", &self.bv) .field("xcomp_bv", &self.xcomp_bv) @@ -135,8 +137,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for xstate_hdr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for xstate_hdr { + fn hash(&self, state: &mut H) { self.bv.hash(state); self.xcomp_bv.hash(state); self._reserved.hash(state); @@ -155,8 +157,8 @@ cfg_if! { } } impl Eq for savefpu {} - impl ::fmt::Debug for savefpu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for savefpu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("savefpu") .field("fp_fxsave", &self.fp_fxsave) .field("fp_xstate", &self.fp_xstate) @@ -164,8 +166,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for savefpu { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for savefpu { + fn hash(&self, state: &mut H) { self.fp_fxsave.hash(state); self.fp_xstate.hash(state); self._fp_ymm.hash(state); @@ -196,8 +198,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("rax", &self.rax) .field("rbx", &self.rbx) @@ -221,8 +223,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.rax.hash(state); self.rbx.hash(state); self.rcx.hash(state); @@ -254,8 +256,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_link", &self.uc_link) .field("uc_sigmask", &self.uc_sigmask) @@ -264,8 +266,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_link.hash(state); self.uc_sigmask.hash(state); self.uc_stack.hash(state); diff --git a/src/unix/hurd/b32.rs b/src/unix/hurd/b32.rs index 7e82a91d3be03..d98b97268fbb1 100644 --- a/src/unix/hurd/b32.rs +++ b/src/unix/hurd/b32.rs @@ -1,31 +1,33 @@ +use crate::{c_int, c_longlong, c_uchar, c_uint, c_ulonglong, c_ushort}; + pub type c_long = i32; pub type c_ulong = u32; -pub type __int64_t = ::c_longlong; -pub type __uint64_t = ::c_ulonglong; +pub type __int64_t = c_longlong; +pub type __uint64_t = c_ulonglong; -pub type int_fast16_t = ::c_int; -pub type int_fast32_t = ::c_int; -pub type int_fast64_t = ::c_longlong; -pub type uint_fast16_t = ::c_uint; -pub type uint_fast32_t = ::c_uint; -pub type uint_fast64_t = ::c_ulonglong; +pub type int_fast16_t = c_int; +pub type int_fast32_t = c_int; +pub type int_fast64_t = c_longlong; +pub type uint_fast16_t = c_uint; +pub type uint_fast32_t = c_uint; +pub type uint_fast64_t = c_ulonglong; -pub type __quad_t = ::c_longlong; -pub type __u_quad_t = ::c_ulonglong; -pub type __intmax_t = ::c_longlong; -pub type __uintmax_t = ::c_ulonglong; +pub type __quad_t = c_longlong; +pub type __u_quad_t = c_ulonglong; +pub type __intmax_t = c_longlong; +pub type __uintmax_t = c_ulonglong; -pub type __squad_type = ::__int64_t; -pub type __uquad_type = ::__uint64_t; -pub type __sword_type = ::c_int; -pub type __uword_type = ::c_uint; -pub type __slong32_type = ::c_long; -pub type __ulong32_type = ::c_ulong; -pub type __s64_type = ::__int64_t; -pub type __u64_type = ::__uint64_t; +pub type __squad_type = crate::__int64_t; +pub type __uquad_type = crate::__uint64_t; +pub type __sword_type = c_int; +pub type __uword_type = c_uint; +pub type __slong32_type = c_long; +pub type __ulong32_type = c_ulong; +pub type __s64_type = crate::__int64_t; +pub type __u64_type = crate::__uint64_t; -pub type __ipc_pid_t = ::c_ushort; +pub type __ipc_pid_t = c_ushort; pub type Elf32_Half = u16; pub type Elf32_Word = u32; @@ -33,16 +35,16 @@ pub type Elf32_Off = u32; pub type Elf32_Addr = u32; pub type Elf32_Section = u16; -pub type Elf_Addr = ::Elf32_Addr; -pub type Elf_Half = ::Elf32_Half; -pub type Elf_Ehdr = ::Elf32_Ehdr; -pub type Elf_Phdr = ::Elf32_Phdr; -pub type Elf_Shdr = ::Elf32_Shdr; -pub type Elf_Sym = ::Elf32_Sym; +pub type Elf_Addr = crate::Elf32_Addr; +pub type Elf_Half = crate::Elf32_Half; +pub type Elf_Ehdr = crate::Elf32_Ehdr; +pub type Elf_Phdr = crate::Elf32_Phdr; +pub type Elf_Shdr = crate::Elf32_Shdr; +pub type Elf_Sym = crate::Elf32_Sym; s! { pub struct Elf32_Ehdr { - pub e_ident: [::c_uchar; 16], + pub e_ident: [c_uchar; 16], pub e_type: Elf32_Half, pub e_machine: Elf32_Half, pub e_version: Elf32_Word, @@ -75,19 +77,19 @@ s! { pub st_name: Elf32_Word, pub st_value: Elf32_Addr, pub st_size: Elf32_Word, - pub st_info: ::c_uchar, - pub st_other: ::c_uchar, + pub st_info: c_uchar, + pub st_other: c_uchar, pub st_shndx: Elf32_Section, } pub struct Elf32_Phdr { - pub p_type: ::Elf32_Word, - pub p_offset: ::Elf32_Off, - pub p_vaddr: ::Elf32_Addr, - pub p_paddr: ::Elf32_Addr, - pub p_filesz: ::Elf32_Word, - pub p_memsz: ::Elf32_Word, - pub p_flags: ::Elf32_Word, - pub p_align: ::Elf32_Word, + pub p_type: crate::Elf32_Word, + pub p_offset: crate::Elf32_Off, + pub p_vaddr: crate::Elf32_Addr, + pub p_paddr: crate::Elf32_Addr, + pub p_filesz: crate::Elf32_Word, + pub p_memsz: crate::Elf32_Word, + pub p_flags: crate::Elf32_Word, + pub p_align: crate::Elf32_Word, } } diff --git a/src/unix/hurd/b64.rs b/src/unix/hurd/b64.rs index e2e502af2b645..41ba87ae59bf3 100644 --- a/src/unix/hurd/b64.rs +++ b/src/unix/hurd/b64.rs @@ -1,31 +1,33 @@ +use crate::{c_int, c_uchar, c_uint}; + pub type c_long = i64; pub type c_ulong = u64; -pub type __int64_t = ::c_long; -pub type __uint64_t = ::c_ulong; +pub type __int64_t = c_long; +pub type __uint64_t = c_ulong; -pub type int_fast16_t = ::c_long; -pub type int_fast32_t = ::c_long; -pub type int_fast64_t = ::c_long; -pub type uint_fast16_t = ::c_ulong; -pub type uint_fast32_t = ::c_ulong; -pub type uint_fast64_t = ::c_ulong; +pub type int_fast16_t = c_long; +pub type int_fast32_t = c_long; +pub type int_fast64_t = c_long; +pub type uint_fast16_t = c_ulong; +pub type uint_fast32_t = c_ulong; +pub type uint_fast64_t = c_ulong; -pub type __quad_t = ::c_long; -pub type __u_quad_t = ::c_ulong; -pub type __intmax_t = ::c_long; -pub type __uintmax_t = ::c_ulong; +pub type __quad_t = c_long; +pub type __u_quad_t = c_ulong; +pub type __intmax_t = c_long; +pub type __uintmax_t = c_ulong; -pub type __squad_type = ::c_long; -pub type __uquad_type = ::c_ulong; -pub type __sword_type = ::c_long; -pub type __uword_type = ::c_ulong; -pub type __slong32_type = ::c_int; -pub type __ulong32_type = ::c_uint; -pub type __s64_type = ::c_long; -pub type __u64_type = ::c_ulong; +pub type __squad_type = c_long; +pub type __uquad_type = c_ulong; +pub type __sword_type = c_long; +pub type __uword_type = c_ulong; +pub type __slong32_type = c_int; +pub type __ulong32_type = c_uint; +pub type __s64_type = c_long; +pub type __u64_type = c_ulong; -pub type __ipc_pid_t = ::c_int; +pub type __ipc_pid_t = c_int; pub type Elf64_Half = u16; pub type Elf64_Word = u32; @@ -35,16 +37,16 @@ pub type Elf64_Xword = u64; pub type Elf64_Sxword = i64; pub type Elf64_Section = u16; -pub type Elf_Addr = ::Elf64_Addr; -pub type Elf_Half = ::Elf64_Half; -pub type Elf_Ehdr = ::Elf64_Ehdr; -pub type Elf_Phdr = ::Elf64_Phdr; -pub type Elf_Shdr = ::Elf64_Shdr; -pub type Elf_Sym = ::Elf64_Sym; +pub type Elf_Addr = crate::Elf64_Addr; +pub type Elf_Half = crate::Elf64_Half; +pub type Elf_Ehdr = crate::Elf64_Ehdr; +pub type Elf_Phdr = crate::Elf64_Phdr; +pub type Elf_Shdr = crate::Elf64_Shdr; +pub type Elf_Sym = crate::Elf64_Sym; s! { pub struct Elf64_Ehdr { - pub e_ident: [::c_uchar; 16], + pub e_ident: [c_uchar; 16], pub e_type: Elf64_Half, pub e_machine: Elf64_Half, pub e_version: Elf64_Word, @@ -75,21 +77,21 @@ s! { pub struct Elf64_Sym { pub st_name: Elf64_Word, - pub st_info: ::c_uchar, - pub st_other: ::c_uchar, + pub st_info: c_uchar, + pub st_other: c_uchar, pub st_shndx: Elf64_Section, pub st_value: Elf64_Addr, pub st_size: Elf64_Xword, } pub struct Elf64_Phdr { - pub p_type: ::Elf64_Word, - pub p_flags: ::Elf64_Word, - pub p_offset: ::Elf64_Off, - pub p_vaddr: ::Elf64_Addr, - pub p_paddr: ::Elf64_Addr, - pub p_filesz: ::Elf64_Xword, - pub p_memsz: ::Elf64_Xword, - pub p_align: ::Elf64_Xword, + pub p_type: crate::Elf64_Word, + pub p_flags: crate::Elf64_Word, + pub p_offset: crate::Elf64_Off, + pub p_vaddr: crate::Elf64_Addr, + pub p_paddr: crate::Elf64_Addr, + pub p_filesz: crate::Elf64_Xword, + pub p_memsz: crate::Elf64_Xword, + pub p_align: crate::Elf64_Xword, } } diff --git a/src/unix/hurd/mod.rs b/src/unix/hurd/mod.rs index a7ec46ab5cdd4..cf5d7c568c9e5 100644 --- a/src/unix/hurd/mod.rs +++ b/src/unix/hurd/mod.rs @@ -1,25 +1,30 @@ #![allow(dead_code)] +use crate::{ + c_double, c_int, c_schar, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, intptr_t, + size_t, ssize_t, +}; + // types pub type c_char = i8; -pub type __s16_type = ::c_short; -pub type __u16_type = ::c_ushort; -pub type __s32_type = ::c_int; -pub type __u32_type = ::c_uint; -pub type __slongword_type = ::c_long; -pub type __ulongword_type = ::c_ulong; - -pub type __u_char = ::c_uchar; -pub type __u_short = ::c_ushort; -pub type __u_int = ::c_uint; -pub type __u_long = ::c_ulong; -pub type __int8_t = ::c_schar; -pub type __uint8_t = ::c_uchar; -pub type __int16_t = ::c_short; -pub type __uint16_t = ::c_ushort; -pub type __int32_t = ::c_int; -pub type __uint32_t = ::c_uint; +pub type __s16_type = c_short; +pub type __u16_type = c_ushort; +pub type __s32_type = c_int; +pub type __u32_type = c_uint; +pub type __slongword_type = c_long; +pub type __ulongword_type = c_ulong; + +pub type __u_char = c_uchar; +pub type __u_short = c_ushort; +pub type __u_int = c_uint; +pub type __u_long = c_ulong; +pub type __int8_t = c_schar; +pub type __uint8_t = c_uchar; +pub type __int16_t = c_short; +pub type __uint16_t = c_ushort; +pub type __int32_t = c_int; +pub type __uint32_t = c_uint; pub type __int_least8_t = __int8_t; pub type __uint_least8_t = __uint8_t; pub type __int_least16_t = __int16_t; @@ -66,14 +71,14 @@ pub type __syscall_ulong_t = __ulongword_type; pub type __cpu_mask = __ulongword_type; pub type __loff_t = __off64_t; -pub type __caddr_t = *mut ::c_char; +pub type __caddr_t = *mut c_char; pub type __intptr_t = __sword_type; pub type __ptrdiff_t = __sword_type; pub type __socklen_t = __u32_type; -pub type __sig_atomic_t = ::c_int; +pub type __sig_atomic_t = c_int; pub type __time64_t = __int64_t; -pub type wchar_t = ::c_int; -pub type wint_t = ::c_uint; +pub type wchar_t = c_int; +pub type wint_t = c_uint; pub type gid_t = __gid_t; pub type uid_t = __uid_t; pub type off_t = __off_t; @@ -114,18 +119,18 @@ pub type clockid_t = __clockid_t; pub type time_t = __time_t; pub type timer_t = __timer_t; pub type suseconds_t = __suseconds_t; -pub type ulong = ::c_ulong; -pub type ushort = ::c_ushort; -pub type uint = ::c_uint; +pub type ulong = c_ulong; +pub type ushort = c_ushort; +pub type uint = c_uint; pub type u_int8_t = __uint8_t; pub type u_int16_t = __uint16_t; pub type u_int32_t = __uint32_t; pub type u_int64_t = __uint64_t; -pub type register_t = ::c_int; -pub type __sigset_t = ::c_ulong; +pub type register_t = c_int; +pub type __sigset_t = c_ulong; pub type sigset_t = __sigset_t; -pub type __fd_mask = ::c_long; +pub type __fd_mask = c_long; pub type fd_mask = __fd_mask; pub type blksize_t = __blksize_t; pub type blkcnt_t = __blkcnt_t; @@ -135,19 +140,19 @@ pub type blkcnt64_t = __blkcnt64_t; pub type fsblkcnt64_t = __fsblkcnt64_t; pub type fsfilcnt64_t = __fsfilcnt64_t; -pub type __pthread_spinlock_t = ::c_int; -pub type __tss_t = ::c_int; -pub type __thrd_t = ::c_long; -pub type __pthread_t = ::c_long; +pub type __pthread_spinlock_t = c_int; +pub type __tss_t = c_int; +pub type __thrd_t = c_long; +pub type __pthread_t = c_long; pub type pthread_t = __pthread_t; -pub type __pthread_process_shared = ::c_uint; -pub type __pthread_inheritsched = ::c_uint; -pub type __pthread_contentionscope = ::c_uint; -pub type __pthread_detachstate = ::c_uint; +pub type __pthread_process_shared = c_uint; +pub type __pthread_inheritsched = c_uint; +pub type __pthread_contentionscope = c_uint; +pub type __pthread_detachstate = c_uint; pub type pthread_attr_t = __pthread_attr; -pub type __pthread_mutex_protocol = ::c_uint; -pub type __pthread_mutex_type = ::c_uint; -pub type __pthread_mutex_robustness = ::c_uint; +pub type __pthread_mutex_protocol = c_uint; +pub type __pthread_mutex_type = c_uint; +pub type __pthread_mutex_robustness = c_uint; pub type pthread_mutexattr_t = __pthread_mutexattr; pub type pthread_mutex_t = __pthread_mutex; pub type pthread_condattr_t = __pthread_condattr; @@ -157,43 +162,43 @@ pub type pthread_rwlockattr_t = __pthread_rwlockattr; pub type pthread_rwlock_t = __pthread_rwlock; pub type pthread_barrierattr_t = __pthread_barrierattr; pub type pthread_barrier_t = __pthread_barrier; -pub type __pthread_key = ::c_int; +pub type __pthread_key = c_int; pub type pthread_key_t = __pthread_key; pub type pthread_once_t = __pthread_once; -pub type __rlimit_resource = ::c_uint; +pub type __rlimit_resource = c_uint; pub type __rlimit_resource_t = __rlimit_resource; pub type rlim_t = __rlim_t; pub type rlim64_t = __rlim64_t; -pub type __rusage_who = ::c_int; +pub type __rusage_who = c_int; -pub type __priority_which = ::c_uint; +pub type __priority_which = c_uint; -pub type sa_family_t = ::c_uchar; +pub type sa_family_t = c_uchar; pub type in_port_t = u16; -pub type __sigval_t = ::sigval; +pub type __sigval_t = crate::sigval; pub type sigevent_t = sigevent; -pub type nfds_t = ::c_ulong; +pub type nfds_t = c_ulong; -pub type tcflag_t = ::c_uint; -pub type cc_t = ::c_uchar; -pub type speed_t = ::c_int; +pub type tcflag_t = c_uint; +pub type cc_t = c_uchar; +pub type speed_t = c_int; -pub type sigval_t = ::sigval; +pub type sigval_t = crate::sigval; -pub type greg_t = ::c_int; +pub type greg_t = c_int; pub type gregset_t = [greg_t; 19usize]; -pub type __ioctl_dir = ::c_uint; +pub type __ioctl_dir = c_uint; -pub type __ioctl_datum = ::c_uint; +pub type __ioctl_datum = c_uint; -pub type __error_t_codes = ::c_int; +pub type __error_t_codes = c_int; pub type int_least8_t = __int_least8_t; pub type int_least16_t = __int_least16_t; @@ -203,31 +208,31 @@ pub type uint_least8_t = __uint_least8_t; pub type uint_least16_t = __uint_least16_t; pub type uint_least32_t = __uint_least32_t; pub type uint_least64_t = __uint_least64_t; -pub type int_fast8_t = ::c_schar; -pub type uint_fast8_t = ::c_uchar; +pub type int_fast8_t = c_schar; +pub type uint_fast8_t = c_uchar; pub type intmax_t = __intmax_t; pub type uintmax_t = __uintmax_t; pub type tcp_seq = u32; -pub type tcp_ca_state = ::c_uint; +pub type tcp_ca_state = c_uint; -pub type idtype_t = ::c_uint; +pub type idtype_t = c_uint; -pub type mqd_t = ::c_int; +pub type mqd_t = c_int; -pub type Lmid_t = ::c_long; +pub type Lmid_t = c_long; -pub type regoff_t = ::c_int; +pub type regoff_t = c_int; -pub type nl_item = ::c_int; +pub type nl_item = c_int; -pub type iconv_t = *mut ::c_void; +pub type iconv_t = *mut c_void; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos64_t {} // FIXME: fill this out with a struct -impl ::Copy for fpos64_t {} -impl ::Clone for fpos64_t { +impl Copy for fpos64_t {} +impl Clone for fpos64_t { fn clone(&self) -> fpos64_t { *self } @@ -235,8 +240,8 @@ impl ::Clone for fpos64_t { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } @@ -252,7 +257,7 @@ s! { pub struct ip_mreqn { pub imr_multiaddr: in_addr, pub imr_address: in_addr, - pub imr_ifindex: ::c_int, + pub imr_ifindex: c_int, } pub struct ip_mreq_source { @@ -262,9 +267,9 @@ s! { } pub struct sockaddr { - pub sa_len: ::c_uchar, + pub sa_len: c_uchar, pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14usize], + pub sa_data: [c_char; 14usize], } pub struct in_addr { @@ -272,32 +277,32 @@ s! { } pub struct sockaddr_in { - pub sin_len: ::c_uchar, + pub sin_len: c_uchar, pub sin_family: sa_family_t, pub sin_port: in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_uchar; 8usize], + pub sin_addr: crate::in_addr, + pub sin_zero: [c_uchar; 8usize], } pub struct sockaddr_in6 { - pub sin6_len: ::c_uchar, + pub sin6_len: c_uchar, pub sin6_family: sa_family_t, pub sin6_port: in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct sockaddr_un { - pub sun_len: ::c_uchar, + pub sun_len: c_uchar, pub sun_family: sa_family_t, - pub sun_path: [::c_char; 108usize], + pub sun_path: [c_char; 108usize], } pub struct sockaddr_storage { - pub ss_len: ::c_uchar, + pub ss_len: c_uchar, pub ss_family: sa_family_t, - pub __ss_padding: [::c_char; 122usize], + pub __ss_padding: [c_char; 122usize], pub __ss_align: __uint32_t, } @@ -335,46 +340,46 @@ s! { } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::socklen_t, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: crate::socklen_t, pub ai_addr: *mut sockaddr, - pub ai_canonname: *mut ::c_char, + pub ai_canonname: *mut c_char, pub ai_next: *mut addrinfo, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct dirent { pub d_ino: __ino_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_namlen: ::c_uchar, - pub d_name: [::c_char; 1usize], + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_namlen: c_uchar, + pub d_name: [c_char; 1usize], } pub struct dirent64 { pub d_ino: __ino64_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_namlen: ::c_uchar, - pub d_name: [::c_char; 1usize], + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_namlen: c_uchar, + pub d_name: [c_char; 1usize], } pub struct fd_set { @@ -382,65 +387,65 @@ s! { } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; 20usize], - pub __ispeed: ::speed_t, - pub __ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; 20usize], + pub __ispeed: crate::speed_t, + pub __ospeed: crate::speed_t, } pub struct mallinfo { - pub arena: ::c_int, - pub ordblks: ::c_int, - pub smblks: ::c_int, - pub hblks: ::c_int, - pub hblkhd: ::c_int, - pub usmblks: ::c_int, - pub fsmblks: ::c_int, - pub uordblks: ::c_int, - pub fordblks: ::c_int, - pub keepcost: ::c_int, + pub arena: c_int, + pub ordblks: c_int, + pub smblks: c_int, + pub hblks: c_int, + pub hblkhd: c_int, + pub usmblks: c_int, + pub fsmblks: c_int, + pub uordblks: c_int, + pub fordblks: c_int, + pub keepcost: c_int, } pub struct mallinfo2 { - pub arena: ::size_t, - pub ordblks: ::size_t, - pub smblks: ::size_t, - pub hblks: ::size_t, - pub hblkhd: ::size_t, - pub usmblks: ::size_t, - pub fsmblks: ::size_t, - pub uordblks: ::size_t, - pub fordblks: ::size_t, - pub keepcost: ::size_t, + pub arena: size_t, + pub ordblks: size_t, + pub smblks: size_t, + pub hblks: size_t, + pub hblkhd: size_t, + pub usmblks: size_t, + pub fsmblks: size_t, + pub uordblks: size_t, + pub fordblks: size_t, + pub keepcost: size_t, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, + pub sa_sigaction: crate::sighandler_t, pub sa_mask: __sigset_t, - pub sa_flags: ::c_int, + pub sa_flags: c_int, } pub struct sigevent { - pub sigev_value: ::sigval, - pub sigev_signo: ::c_int, - pub sigev_notify: ::c_int, - __unused1: *mut ::c_void, //actually a function pointer + pub sigev_value: crate::sigval, + pub sigev_signo: c_int, + pub sigev_notify: c_int, + __unused1: *mut c_void, //actually a function pointer pub sigev_notify_attributes: *mut pthread_attr_t, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, pub si_pid: __pid_t, pub si_uid: __uid_t, - pub si_addr: *mut ::c_void, - pub si_status: ::c_int, - pub si_band: ::c_long, - pub si_value: ::sigval, + pub si_addr: *mut c_void, + pub si_status: c_int, + pub si_band: c_long, + pub si_value: crate::sigval, } pub struct timespec { @@ -458,45 +463,45 @@ s! { } pub struct stat { - pub st_fstype: ::c_int, + pub st_fstype: c_int, pub st_dev: __fsid_t, /* Actually st_fsid */ pub st_ino: __ino_t, - pub st_gen: ::c_uint, + pub st_gen: c_uint, pub st_rdev: __dev_t, pub st_mode: __mode_t, pub st_nlink: __nlink_t, pub st_uid: __uid_t, pub st_gid: __gid_t, pub st_size: __off_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, + pub st_atim: crate::timespec, + pub st_mtim: crate::timespec, + pub st_ctim: crate::timespec, pub st_blksize: __blksize_t, pub st_blocks: __blkcnt_t, pub st_author: __uid_t, - pub st_flags: ::c_uint, - pub st_spare: [::c_int; 11usize], + pub st_flags: c_uint, + pub st_spare: [c_int; 11usize], } pub struct stat64 { - pub st_fstype: ::c_int, + pub st_fstype: c_int, pub st_dev: __fsid_t, /* Actually st_fsid */ pub st_ino: __ino64_t, - pub st_gen: ::c_uint, + pub st_gen: c_uint, pub st_rdev: __dev_t, pub st_mode: __mode_t, pub st_nlink: __nlink_t, pub st_uid: __uid_t, pub st_gid: __gid_t, pub st_size: __off64_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, + pub st_atim: crate::timespec, + pub st_mtim: crate::timespec, + pub st_ctim: crate::timespec, pub st_blksize: __blksize_t, pub st_blocks: __blkcnt64_t, pub st_author: __uid_t, - pub st_flags: ::c_uint, - pub st_spare: [::c_int; 8usize], + pub st_flags: c_uint, + pub st_spare: [c_int; 8usize], } pub struct statx { @@ -512,10 +517,10 @@ s! { pub stx_size: u64, pub stx_blocks: u64, pub stx_attributes_mask: u64, - pub stx_atime: ::statx_timestamp, - pub stx_btime: ::statx_timestamp, - pub stx_ctime: ::statx_timestamp, - pub stx_mtime: ::statx_timestamp, + pub stx_atime: crate::statx_timestamp, + pub stx_btime: crate::statx_timestamp, + pub stx_ctime: crate::statx_timestamp, + pub stx_mtime: crate::statx_timestamp, pub stx_rdev_major: u32, pub stx_rdev_minor: u32, pub stx_dev_major: u32, @@ -530,103 +535,103 @@ s! { } pub struct statfs { - pub f_type: ::c_uint, - pub f_bsize: ::c_ulong, + pub f_type: c_uint, + pub f_bsize: c_ulong, pub f_blocks: __fsblkcnt_t, pub f_bfree: __fsblkcnt_t, pub f_bavail: __fsblkcnt_t, pub f_files: __fsblkcnt_t, pub f_ffree: __fsblkcnt_t, pub f_fsid: __fsid_t, - pub f_namelen: ::c_ulong, + pub f_namelen: c_ulong, pub f_favail: __fsfilcnt_t, - pub f_frsize: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_spare: [::c_uint; 3usize], + pub f_frsize: c_ulong, + pub f_flag: c_ulong, + pub f_spare: [c_uint; 3usize], } pub struct statfs64 { - pub f_type: ::c_uint, - pub f_bsize: ::c_ulong, + pub f_type: c_uint, + pub f_bsize: c_ulong, pub f_blocks: __fsblkcnt64_t, pub f_bfree: __fsblkcnt64_t, pub f_bavail: __fsblkcnt64_t, pub f_files: __fsblkcnt64_t, pub f_ffree: __fsblkcnt64_t, pub f_fsid: __fsid_t, - pub f_namelen: ::c_ulong, + pub f_namelen: c_ulong, pub f_favail: __fsfilcnt64_t, - pub f_frsize: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_spare: [::c_uint; 3usize], + pub f_frsize: c_ulong, + pub f_flag: c_ulong, + pub f_spare: [c_uint; 3usize], } pub struct statvfs { - pub __f_type: ::c_uint, - pub f_bsize: ::c_ulong, + pub __f_type: c_uint, + pub f_bsize: c_ulong, pub f_blocks: __fsblkcnt_t, pub f_bfree: __fsblkcnt_t, pub f_bavail: __fsblkcnt_t, pub f_files: __fsfilcnt_t, pub f_ffree: __fsfilcnt_t, pub f_fsid: __fsid_t, - pub f_namemax: ::c_ulong, + pub f_namemax: c_ulong, pub f_favail: __fsfilcnt_t, - pub f_frsize: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_spare: [::c_uint; 3usize], + pub f_frsize: c_ulong, + pub f_flag: c_ulong, + pub f_spare: [c_uint; 3usize], } pub struct statvfs64 { - pub __f_type: ::c_uint, - pub f_bsize: ::c_ulong, + pub __f_type: c_uint, + pub f_bsize: c_ulong, pub f_blocks: __fsblkcnt64_t, pub f_bfree: __fsblkcnt64_t, pub f_bavail: __fsblkcnt64_t, pub f_files: __fsfilcnt64_t, pub f_ffree: __fsfilcnt64_t, pub f_fsid: __fsid_t, - pub f_namemax: ::c_ulong, + pub f_namemax: c_ulong, pub f_favail: __fsfilcnt64_t, - pub f_frsize: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_spare: [::c_uint; 3usize], + pub f_frsize: c_ulong, + pub f_flag: c_ulong, + pub f_spare: [c_uint; 3usize], } pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_sigevent: ::sigevent, + pub aio_fildes: c_int, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_sigevent: crate::sigevent, __next_prio: *mut aiocb, - __abs_prio: ::c_int, - __policy: ::c_int, - __error_code: ::c_int, - __return_value: ::ssize_t, + __abs_prio: c_int, + __policy: c_int, + __error_code: c_int, + __return_value: ssize_t, pub aio_offset: off_t, #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))] - __unused1: [::c_char; 4], - __glibc_reserved: [::c_char; 32], + __unused1: [c_char; 4], + __glibc_reserved: [c_char; 32], } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, } pub struct __exit_status { - pub e_termination: ::c_short, - pub e_exit: ::c_short, + pub e_termination: c_short, + pub e_exit: c_short, } #[cfg_attr(target_pointer_width = "32", repr(align(4)))] #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct sem_t { - __size: [::c_char; 20usize], + __size: [c_char; 20usize], } pub struct __pthread { @@ -634,20 +639,20 @@ s! { } pub struct __pthread_mutexattr { - pub __prioceiling: ::c_int, + pub __prioceiling: c_int, pub __protocol: __pthread_mutex_protocol, pub __pshared: __pthread_process_shared, pub __mutex_type: __pthread_mutex_type, } pub struct __pthread_mutex { - pub __lock: ::c_uint, - pub __owner_id: ::c_uint, - pub __cnt: ::c_uint, - pub __shpid: ::c_int, - pub __type: ::c_int, - pub __flags: ::c_int, - pub __reserved1: ::c_uint, - pub __reserved2: ::c_uint, + pub __lock: c_uint, + pub __owner_id: c_uint, + pub __cnt: c_uint, + pub __shpid: c_int, + pub __type: c_int, + pub __flags: c_int, + pub __reserved1: c_uint, + pub __reserved2: c_uint, } pub struct __pthread_condattr { @@ -664,7 +669,7 @@ s! { } pub struct __pthread_once { - pub __run: ::c_int, + pub __run: c_int, pub __lock: __pthread_spinlock_t, } @@ -672,51 +677,51 @@ s! { pub __lock: __pthread_spinlock_t, pub __queue: *mut __pthread, pub __attr: *mut __pthread_condattr, - pub __wrefs: ::c_uint, - pub __data: *mut ::c_void, + pub __wrefs: c_uint, + pub __data: *mut c_void, } pub struct __pthread_attr { pub __schedparam: sched_param, - pub __stackaddr: *mut ::c_void, - pub __stacksize: ::size_t, - pub __guardsize: ::size_t, + pub __stackaddr: *mut c_void, + pub __stacksize: size_t, + pub __guardsize: size_t, pub __detachstate: __pthread_detachstate, pub __inheritsched: __pthread_inheritsched, pub __contentionscope: __pthread_contentionscope, - pub __schedpolicy: ::c_int, + pub __schedpolicy: c_int, } pub struct __pthread_rwlock { pub __held: __pthread_spinlock_t, pub __lock: __pthread_spinlock_t, - pub __readers: ::c_int, + pub __readers: c_int, pub __readerqueue: *mut __pthread, pub __writerqueue: *mut __pthread, pub __attr: *mut __pthread_rwlockattr, - pub __data: *mut ::c_void, + pub __data: *mut c_void, } pub struct __pthread_barrier { pub __lock: __pthread_spinlock_t, pub __queue: *mut __pthread, - pub __pending: ::c_uint, - pub __count: ::c_uint, + pub __pending: c_uint, + pub __count: c_uint, pub __attr: *mut __pthread_barrierattr, - pub __data: *mut ::c_void, + pub __data: *mut c_void, } pub struct seminfo { - pub semmap: ::c_int, - pub semmni: ::c_int, - pub semmns: ::c_int, - pub semmnu: ::c_int, - pub semmsl: ::c_int, - pub semopm: ::c_int, - pub semume: ::c_int, - pub semusz: ::c_int, - pub semvmx: ::c_int, - pub semaem: ::c_int, + pub semmap: c_int, + pub semmni: c_int, + pub semmns: c_int, + pub semmnu: c_int, + pub semmsl: c_int, + pub semopm: c_int, + pub semume: c_int, + pub semusz: c_int, + pub semvmx: c_int, + pub semaem: c_int, } pub struct _IO_FILE { @@ -724,112 +729,112 @@ s! { } pub struct sched_param { - pub sched_priority: ::c_int, + pub sched_priority: c_int, } pub struct iovec { - pub iov_base: *mut ::c_void, - pub iov_len: ::size_t, + pub iov_base: *mut c_void, + pub iov_len: size_t, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, pub pw_uid: __uid_t, pub pw_gid: __gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct spwd { - pub sp_namp: *mut ::c_char, - pub sp_pwdp: *mut ::c_char, - pub sp_lstchg: ::c_long, - pub sp_min: ::c_long, - pub sp_max: ::c_long, - pub sp_warn: ::c_long, - pub sp_inact: ::c_long, - pub sp_expire: ::c_long, - pub sp_flag: ::c_ulong, + pub sp_namp: *mut c_char, + pub sp_pwdp: *mut c_char, + pub sp_lstchg: c_long, + pub sp_min: c_long, + pub sp_max: c_long, + pub sp_warn: c_long, + pub sp_inact: c_long, + pub sp_expire: c_long, + pub sp_flag: c_ulong, } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *const ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_long, + pub tm_zone: *const c_char, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, pub ifa_name: *mut c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union - pub ifa_data: *mut ::c_void, + pub ifa_flags: c_uint, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union + pub ifa_data: *mut c_void, } pub struct arpreq { - pub arp_pa: ::sockaddr, - pub arp_ha: ::sockaddr, - pub arp_flags: ::c_int, - pub arp_netmask: ::sockaddr, - pub arp_dev: [::c_char; 16], + pub arp_pa: crate::sockaddr, + pub arp_ha: crate::sockaddr, + pub arp_flags: c_int, + pub arp_netmask: crate::sockaddr, + pub arp_dev: [c_char; 16], } pub struct arpreq_old { - pub arp_pa: ::sockaddr, - pub arp_ha: ::sockaddr, - pub arp_flags: ::c_int, - pub arp_netmask: ::sockaddr, + pub arp_pa: crate::sockaddr, + pub arp_ha: crate::sockaddr, + pub arp_flags: c_int, + pub arp_netmask: crate::sockaddr, } pub struct arphdr { @@ -841,40 +846,40 @@ s! { } pub struct arpd_request { - pub req: ::c_ushort, + pub req: c_ushort, pub ip: u32, - pub dev: ::c_ulong, - pub stamp: ::c_ulong, - pub updated: ::c_ulong, - pub ha: [::c_uchar; ::MAX_ADDR_LEN], + pub dev: c_ulong, + pub stamp: c_ulong, + pub updated: c_ulong, + pub ha: [c_uchar; crate::MAX_ADDR_LEN], } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::c_uint, + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, } pub struct ifreq { /// interface name, e.g. "en0" - pub ifr_name: [::c_char; ::IFNAMSIZ], - pub ifr_ifru: ::sockaddr, + pub ifr_name: [c_char; crate::IFNAMSIZ], + pub ifr_ifru: crate::sockaddr, } pub struct __locale_struct { pub __locales: [*mut __locale_data; 13usize], - pub __ctype_b: *const ::c_ushort, - pub __ctype_tolower: *const ::c_int, - pub __ctype_toupper: *const ::c_int, - pub __names: [*const ::c_char; 13usize], + pub __ctype_b: *const c_ushort, + pub __ctype_tolower: *const c_int, + pub __ctype_toupper: *const c_int, + pub __names: [*const c_char; 13usize], } pub struct utsname { - pub sysname: [::c_char; _UTSNAME_LENGTH], - pub nodename: [::c_char; _UTSNAME_LENGTH], - pub release: [::c_char; _UTSNAME_LENGTH], - pub version: [::c_char; _UTSNAME_LENGTH], - pub machine: [::c_char; _UTSNAME_LENGTH], - pub domainname: [::c_char; _UTSNAME_LENGTH], + pub sysname: [c_char; _UTSNAME_LENGTH], + pub nodename: [c_char; _UTSNAME_LENGTH], + pub release: [c_char; _UTSNAME_LENGTH], + pub version: [c_char; _UTSNAME_LENGTH], + pub machine: [c_char; _UTSNAME_LENGTH], + pub domainname: [c_char; _UTSNAME_LENGTH], } pub struct rlimit64 { @@ -883,31 +888,31 @@ s! { } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct dl_phdr_info { pub dlpi_addr: Elf_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, pub dlpi_phdr: *const Elf_Phdr, pub dlpi_phnum: Elf_Half, - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, - pub dlpi_tls_modid: ::size_t, - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, + pub dlpi_tls_modid: size_t, + pub dlpi_tls_data: *mut c_void, } pub struct flock { #[cfg(target_pointer_width = "32")] - pub l_type: ::c_int, + pub l_type: c_int, #[cfg(target_pointer_width = "32")] - pub l_whence: ::c_int, + pub l_whence: c_int, #[cfg(target_pointer_width = "64")] - pub l_type: ::c_short, + pub l_type: c_short, #[cfg(target_pointer_width = "64")] - pub l_whence: ::c_short, + pub l_whence: c_short, pub l_start: __off_t, pub l_len: __off_t, pub l_pid: __pid_t, @@ -915,52 +920,52 @@ s! { pub struct flock64 { #[cfg(target_pointer_width = "32")] - pub l_type: ::c_int, + pub l_type: c_int, #[cfg(target_pointer_width = "32")] - pub l_whence: ::c_int, + pub l_whence: c_int, #[cfg(target_pointer_width = "64")] - pub l_type: ::c_short, + pub l_type: c_short, #[cfg(target_pointer_width = "64")] - pub l_whence: ::c_short, + pub l_whence: c_short, pub l_start: __off_t, pub l_len: __off64_t, pub l_pid: __pid_t, } pub struct glob_t { - pub gl_pathc: ::size_t, + pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, + pub gl_offs: size_t, + pub gl_flags: c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct glob64_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, + pub gl_pathc: size_t, + pub gl_pathv: *mut *mut c_char, + pub gl_offs: size_t, + pub gl_flags: c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct regex_t { - __buffer: *mut ::c_void, - __allocated: ::size_t, - __used: ::size_t, - __syntax: ::c_ulong, - __fastmap: *mut ::c_char, - __translate: *mut ::c_char, - __re_nsub: ::size_t, + __buffer: *mut c_void, + __allocated: size_t, + __used: size_t, + __syntax: c_ulong, + __fastmap: *mut c_char, + __translate: *mut c_char, + __re_nsub: size_t, __bitfield: u8, } @@ -972,52 +977,52 @@ s! { } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } // System V IPC pub struct msginfo { - pub msgpool: ::c_int, - pub msgmap: ::c_int, - pub msgmax: ::c_int, - pub msgmnb: ::c_int, - pub msgmni: ::c_int, - pub msgssz: ::c_int, - pub msgtql: ::c_int, - pub msgseg: ::c_ushort, + pub msgpool: c_int, + pub msgmap: c_int, + pub msgmax: c_int, + pub msgmnb: c_int, + pub msgmni: c_int, + pub msgssz: c_int, + pub msgtql: c_int, + pub msgseg: c_ushort, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct mntent { - pub mnt_fsname: *mut ::c_char, - pub mnt_dir: *mut ::c_char, - pub mnt_type: *mut ::c_char, - pub mnt_opts: *mut ::c_char, - pub mnt_freq: ::c_int, - pub mnt_passno: ::c_int, + pub mnt_fsname: *mut c_char, + pub mnt_dir: *mut c_char, + pub mnt_type: *mut c_char, + pub mnt_opts: *mut c_char, + pub mnt_freq: c_int, + pub mnt_passno: c_int, } pub struct posix_spawn_file_actions_t { - __allocated: ::c_int, - __used: ::c_int, - __actions: *mut ::c_int, - __pad: [::c_int; 16], + __allocated: c_int, + __used: c_int, + __actions: *mut c_int, + __pad: [c_int; 16], } pub struct posix_spawnattr_t { - __flags: ::c_short, - __pgrp: ::pid_t, - __sd: ::sigset_t, - __ss: ::sigset_t, - __sp: ::sched_param, - __policy: ::c_int, - __pad: [::c_int; 16], + __flags: c_short, + __pgrp: crate::pid_t, + __sd: crate::sigset_t, + __ss: crate::sigset_t, + __sp: crate::sched_param, + __policy: c_int, + __pad: [c_int; 16], } pub struct regmatch_t { @@ -1026,28 +1031,28 @@ s! { } pub struct option { - pub name: *const ::c_char, - pub has_arg: ::c_int, - pub flag: *mut ::c_int, - pub val: ::c_int, + pub name: *const c_char, + pub has_arg: c_int, + pub flag: *mut c_int, + pub val: c_int, } } s_no_extra_traits! { pub struct utmpx { - pub ut_type: ::c_short, - pub ut_pid: ::pid_t, - pub ut_line: [::c_char; __UT_LINESIZE], - pub ut_id: [::c_char; 4], + pub ut_type: c_short, + pub ut_pid: crate::pid_t, + pub ut_line: [c_char; __UT_LINESIZE], + pub ut_id: [c_char; 4], - pub ut_user: [::c_char; __UT_NAMESIZE], - pub ut_host: [::c_char; __UT_HOSTSIZE], + pub ut_user: [c_char; __UT_NAMESIZE], + pub ut_host: [c_char; __UT_HOSTSIZE], pub ut_exit: __exit_status, #[cfg(any(all(target_pointer_width = "32", not(target_arch = "x86_64"))))] - pub ut_session: ::c_long, + pub ut_session: c_long, #[cfg(any(all(target_pointer_width = "32", not(target_arch = "x86_64"))))] - pub ut_tv: ::timeval, + pub ut_tv: crate::timeval, #[cfg(not(any(all(target_pointer_width = "32", not(target_arch = "x86_64")))))] pub ut_session: i32, @@ -1055,7 +1060,7 @@ s_no_extra_traits! { pub ut_tv: __timeval, pub ut_addr_v6: [i32; 4], - __glibc_reserved: [::c_char; 20], + __glibc_reserved: [c_char; 20], } } @@ -1083,8 +1088,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_type", &self.ut_type) .field("ut_pid", &self.ut_pid) @@ -1101,8 +1106,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_type.hash(state); self.ut_pid.hash(state); self.ut_line.hash(state); @@ -1120,23 +1125,23 @@ cfg_if! { } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { self.si_value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.si_status } } @@ -1144,101 +1149,101 @@ impl siginfo_t { // const // aio.h -pub const AIO_CANCELED: ::c_int = 0; -pub const AIO_NOTCANCELED: ::c_int = 1; -pub const AIO_ALLDONE: ::c_int = 2; -pub const LIO_READ: ::c_int = 0; -pub const LIO_WRITE: ::c_int = 1; -pub const LIO_NOP: ::c_int = 2; -pub const LIO_WAIT: ::c_int = 0; -pub const LIO_NOWAIT: ::c_int = 1; +pub const AIO_CANCELED: c_int = 0; +pub const AIO_NOTCANCELED: c_int = 1; +pub const AIO_ALLDONE: c_int = 2; +pub const LIO_READ: c_int = 0; +pub const LIO_WRITE: c_int = 1; +pub const LIO_NOP: c_int = 2; +pub const LIO_WAIT: c_int = 0; +pub const LIO_NOWAIT: c_int = 1; // glob.h -pub const GLOB_ERR: ::c_int = 1 << 0; -pub const GLOB_MARK: ::c_int = 1 << 1; -pub const GLOB_NOSORT: ::c_int = 1 << 2; -pub const GLOB_DOOFFS: ::c_int = 1 << 3; -pub const GLOB_NOCHECK: ::c_int = 1 << 4; -pub const GLOB_APPEND: ::c_int = 1 << 5; -pub const GLOB_NOESCAPE: ::c_int = 1 << 6; - -pub const GLOB_NOSPACE: ::c_int = 1; -pub const GLOB_ABORTED: ::c_int = 2; -pub const GLOB_NOMATCH: ::c_int = 3; - -pub const GLOB_PERIOD: ::c_int = 1 << 7; -pub const GLOB_ALTDIRFUNC: ::c_int = 1 << 9; -pub const GLOB_BRACE: ::c_int = 1 << 10; -pub const GLOB_NOMAGIC: ::c_int = 1 << 11; -pub const GLOB_TILDE: ::c_int = 1 << 12; -pub const GLOB_ONLYDIR: ::c_int = 1 << 13; -pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14; +pub const GLOB_ERR: c_int = 1 << 0; +pub const GLOB_MARK: c_int = 1 << 1; +pub const GLOB_NOSORT: c_int = 1 << 2; +pub const GLOB_DOOFFS: c_int = 1 << 3; +pub const GLOB_NOCHECK: c_int = 1 << 4; +pub const GLOB_APPEND: c_int = 1 << 5; +pub const GLOB_NOESCAPE: c_int = 1 << 6; + +pub const GLOB_NOSPACE: c_int = 1; +pub const GLOB_ABORTED: c_int = 2; +pub const GLOB_NOMATCH: c_int = 3; + +pub const GLOB_PERIOD: c_int = 1 << 7; +pub const GLOB_ALTDIRFUNC: c_int = 1 << 9; +pub const GLOB_BRACE: c_int = 1 << 10; +pub const GLOB_NOMAGIC: c_int = 1 << 11; +pub const GLOB_TILDE: c_int = 1 << 12; +pub const GLOB_ONLYDIR: c_int = 1 << 13; +pub const GLOB_TILDE_CHECK: c_int = 1 << 14; // ipc.h -pub const IPC_PRIVATE: ::key_t = 0; +pub const IPC_PRIVATE: crate::key_t = 0; -pub const IPC_CREAT: ::c_int = 0o1000; -pub const IPC_EXCL: ::c_int = 0o2000; -pub const IPC_NOWAIT: ::c_int = 0o4000; +pub const IPC_CREAT: c_int = 0o1000; +pub const IPC_EXCL: c_int = 0o2000; +pub const IPC_NOWAIT: c_int = 0o4000; -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; -pub const IPC_INFO: ::c_int = 3; -pub const MSG_STAT: ::c_int = 11; -pub const MSG_INFO: ::c_int = 12; +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; +pub const IPC_INFO: c_int = 3; +pub const MSG_STAT: c_int = 11; +pub const MSG_INFO: c_int = 12; -pub const MSG_NOERROR: ::c_int = 0o10000; -pub const MSG_EXCEPT: ::c_int = 0o20000; +pub const MSG_NOERROR: c_int = 0o10000; +pub const MSG_EXCEPT: c_int = 0o20000; // shm.h -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; +pub const SHM_R: c_int = 0o400; +pub const SHM_W: c_int = 0o200; -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_REMAP: ::c_int = 0o40000; +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_REMAP: c_int = 0o40000; -pub const SHM_LOCK: ::c_int = 11; -pub const SHM_UNLOCK: ::c_int = 12; +pub const SHM_LOCK: c_int = 11; +pub const SHM_UNLOCK: c_int = 12; // unistd.h -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const __FD_SETSIZE: ::c_int = 256; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const F_OK: ::c_int = 0; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const SEEK_DATA: ::c_int = 3; -pub const SEEK_HOLE: ::c_int = 4; -pub const L_SET: ::c_int = 0; -pub const L_INCR: ::c_int = 1; -pub const L_XTND: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_LOCK: ::c_int = 1; -pub const F_TLOCK: ::c_int = 2; -pub const F_TEST: ::c_int = 3; -pub const CLOSE_RANGE_CLOEXEC: ::c_int = 4; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const __FD_SETSIZE: c_int = 256; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const F_OK: c_int = 0; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const SEEK_DATA: c_int = 3; +pub const SEEK_HOLE: c_int = 4; +pub const L_SET: c_int = 0; +pub const L_INCR: c_int = 1; +pub const L_XTND: c_int = 2; +pub const F_ULOCK: c_int = 0; +pub const F_LOCK: c_int = 1; +pub const F_TLOCK: c_int = 2; +pub const F_TEST: c_int = 3; +pub const CLOSE_RANGE_CLOEXEC: c_int = 4; // stdio.h -pub const EOF: ::c_int = -1; +pub const EOF: c_int = -1; // stdlib.h -pub const WNOHANG: ::c_int = 1; -pub const WUNTRACED: ::c_int = 2; -pub const WSTOPPED: ::c_int = 2; -pub const WCONTINUED: ::c_int = 4; -pub const WNOWAIT: ::c_int = 8; -pub const WEXITED: ::c_int = 16; -pub const __W_CONTINUED: ::c_int = 65535; -pub const __WCOREFLAG: ::c_int = 128; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; +pub const WNOHANG: c_int = 1; +pub const WUNTRACED: c_int = 2; +pub const WSTOPPED: c_int = 2; +pub const WCONTINUED: c_int = 4; +pub const WNOWAIT: c_int = 8; +pub const WEXITED: c_int = 16; +pub const __W_CONTINUED: c_int = 65535; +pub const __WCOREFLAG: c_int = 128; +pub const RAND_MAX: c_int = 2147483647; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; pub const __LITTLE_ENDIAN: usize = 1234; pub const __BIG_ENDIAN: usize = 4321; pub const __PDP_ENDIAN: usize = 3412; @@ -1250,7 +1255,7 @@ pub const PDP_ENDIAN: usize = 3412; pub const BYTE_ORDER: usize = 1234; // sys/select.h -pub const FD_SETSIZE: ::c_int = 256; +pub const FD_SETSIZE: c_int = 256; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; pub const __SIZEOF_PTHREAD_ATTR_T: usize = 32; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 28; @@ -1261,160 +1266,160 @@ pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 8; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_ONCE_T: usize = 8; -pub const __PTHREAD_SPIN_LOCK_INITIALIZER: ::c_int = 0; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; +pub const __PTHREAD_SPIN_LOCK_INITIALIZER: c_int = 0; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; // sys/resource.h -pub const RLIM_INFINITY: ::rlim_t = 2147483647; -pub const RLIM64_INFINITY: ::rlim64_t = 9223372036854775807; -pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; -pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; -pub const PRIO_MIN: ::c_int = -20; -pub const PRIO_MAX: ::c_int = 20; +pub const RLIM_INFINITY: crate::rlim_t = 2147483647; +pub const RLIM64_INFINITY: crate::rlim64_t = 9223372036854775807; +pub const RLIM_SAVED_MAX: crate::rlim_t = RLIM_INFINITY; +pub const RLIM_SAVED_CUR: crate::rlim_t = RLIM_INFINITY; +pub const PRIO_MIN: c_int = -20; +pub const PRIO_MAX: c_int = 20; // pwd.h pub const NSS_BUFLEN_PASSWD: usize = 1024; // sys/socket.h pub const SOCK_TYPE_MASK: usize = 15; -pub const PF_UNSPEC: ::c_int = 0; -pub const PF_LOCAL: ::c_int = 1; -pub const PF_UNIX: ::c_int = 1; -pub const PF_FILE: ::c_int = 1; -pub const PF_INET: ::c_int = 2; -pub const PF_IMPLINK: ::c_int = 3; -pub const PF_PUP: ::c_int = 4; -pub const PF_CHAOS: ::c_int = 5; -pub const PF_NS: ::c_int = 6; -pub const PF_ISO: ::c_int = 7; -pub const PF_OSI: ::c_int = 7; -pub const PF_ECMA: ::c_int = 8; -pub const PF_DATAKIT: ::c_int = 9; -pub const PF_CCITT: ::c_int = 10; -pub const PF_SNA: ::c_int = 11; -pub const PF_DECnet: ::c_int = 12; -pub const PF_DLI: ::c_int = 13; -pub const PF_LAT: ::c_int = 14; -pub const PF_HYLINK: ::c_int = 15; -pub const PF_APPLETALK: ::c_int = 16; -pub const PF_ROUTE: ::c_int = 17; -pub const PF_XTP: ::c_int = 19; -pub const PF_COIP: ::c_int = 20; -pub const PF_CNT: ::c_int = 21; -pub const PF_RTIP: ::c_int = 22; -pub const PF_IPX: ::c_int = 23; -pub const PF_SIP: ::c_int = 24; -pub const PF_PIP: ::c_int = 25; -pub const PF_INET6: ::c_int = 26; -pub const PF_MAX: ::c_int = 27; -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_UNIX: ::c_int = 1; -pub const AF_FILE: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NS: ::c_int = 6; -pub const AF_ISO: ::c_int = 7; -pub const AF_OSI: ::c_int = 7; -pub const AF_ECMA: ::c_int = 8; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_ROUTE: ::c_int = 17; -pub const pseudo_AF_XTP: ::c_int = 19; -pub const AF_COIP: ::c_int = 20; -pub const AF_CNT: ::c_int = 21; -pub const pseudo_AF_RTIP: ::c_int = 22; -pub const AF_IPX: ::c_int = 23; -pub const AF_SIP: ::c_int = 24; -pub const pseudo_AF_PIP: ::c_int = 25; -pub const AF_INET6: ::c_int = 26; -pub const AF_MAX: ::c_int = 27; -pub const SOMAXCONN: ::c_int = 4096; +pub const PF_UNSPEC: c_int = 0; +pub const PF_LOCAL: c_int = 1; +pub const PF_UNIX: c_int = 1; +pub const PF_FILE: c_int = 1; +pub const PF_INET: c_int = 2; +pub const PF_IMPLINK: c_int = 3; +pub const PF_PUP: c_int = 4; +pub const PF_CHAOS: c_int = 5; +pub const PF_NS: c_int = 6; +pub const PF_ISO: c_int = 7; +pub const PF_OSI: c_int = 7; +pub const PF_ECMA: c_int = 8; +pub const PF_DATAKIT: c_int = 9; +pub const PF_CCITT: c_int = 10; +pub const PF_SNA: c_int = 11; +pub const PF_DECnet: c_int = 12; +pub const PF_DLI: c_int = 13; +pub const PF_LAT: c_int = 14; +pub const PF_HYLINK: c_int = 15; +pub const PF_APPLETALK: c_int = 16; +pub const PF_ROUTE: c_int = 17; +pub const PF_XTP: c_int = 19; +pub const PF_COIP: c_int = 20; +pub const PF_CNT: c_int = 21; +pub const PF_RTIP: c_int = 22; +pub const PF_IPX: c_int = 23; +pub const PF_SIP: c_int = 24; +pub const PF_PIP: c_int = 25; +pub const PF_INET6: c_int = 26; +pub const PF_MAX: c_int = 27; +pub const AF_UNSPEC: c_int = 0; +pub const AF_LOCAL: c_int = 1; +pub const AF_UNIX: c_int = 1; +pub const AF_FILE: c_int = 1; +pub const AF_INET: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NS: c_int = 6; +pub const AF_ISO: c_int = 7; +pub const AF_OSI: c_int = 7; +pub const AF_ECMA: c_int = 8; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_ROUTE: c_int = 17; +pub const pseudo_AF_XTP: c_int = 19; +pub const AF_COIP: c_int = 20; +pub const AF_CNT: c_int = 21; +pub const pseudo_AF_RTIP: c_int = 22; +pub const AF_IPX: c_int = 23; +pub const AF_SIP: c_int = 24; +pub const pseudo_AF_PIP: c_int = 25; +pub const AF_INET6: c_int = 26; +pub const AF_MAX: c_int = 27; +pub const SOMAXCONN: c_int = 4096; pub const _SS_SIZE: usize = 128; pub const CMGROUP_MAX: usize = 16; -pub const SOL_SOCKET: ::c_int = 65535; +pub const SOL_SOCKET: c_int = 65535; // sys/time.h -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; // netinet/in.h -pub const SOL_IP: ::c_int = 0; -pub const SOL_TCP: ::c_int = 6; -pub const SOL_UDP: ::c_int = 17; -pub const SOL_IPV6: ::c_int = 41; -pub const SOL_ICMPV6: ::c_int = 58; -pub const IP_OPTIONS: ::c_int = 1; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_TOS: ::c_int = 3; -pub const IP_TTL: ::c_int = 4; -pub const IP_RECVOPTS: ::c_int = 5; -pub const IP_RECVRETOPTS: ::c_int = 6; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_RETOPTS: ::c_int = 8; -pub const IP_MULTICAST_IF: ::c_int = 9; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IPV6_ADDRFORM: ::c_int = 1; -pub const IPV6_2292PKTINFO: ::c_int = 2; -pub const IPV6_2292HOPOPTS: ::c_int = 3; -pub const IPV6_2292DSTOPTS: ::c_int = 4; -pub const IPV6_2292RTHDR: ::c_int = 5; -pub const IPV6_2292PKTOPTIONS: ::c_int = 6; -pub const IPV6_CHECKSUM: ::c_int = 7; -pub const IPV6_2292HOPLIMIT: ::c_int = 8; -pub const IPV6_RXINFO: ::c_int = 2; -pub const IPV6_TXINFO: ::c_int = 2; -pub const SCM_SRCINFO: ::c_int = 2; -pub const IPV6_UNICAST_HOPS: ::c_int = 16; -pub const IPV6_MULTICAST_IF: ::c_int = 17; -pub const IPV6_MULTICAST_HOPS: ::c_int = 18; -pub const IPV6_MULTICAST_LOOP: ::c_int = 19; -pub const IPV6_JOIN_GROUP: ::c_int = 20; -pub const IPV6_LEAVE_GROUP: ::c_int = 21; -pub const IPV6_ROUTER_ALERT: ::c_int = 22; -pub const IPV6_MTU_DISCOVER: ::c_int = 23; -pub const IPV6_MTU: ::c_int = 24; -pub const IPV6_RECVERR: ::c_int = 25; -pub const IPV6_V6ONLY: ::c_int = 26; -pub const IPV6_JOIN_ANYCAST: ::c_int = 27; -pub const IPV6_LEAVE_ANYCAST: ::c_int = 28; -pub const IPV6_RECVPKTINFO: ::c_int = 49; -pub const IPV6_PKTINFO: ::c_int = 50; -pub const IPV6_RECVHOPLIMIT: ::c_int = 51; -pub const IPV6_HOPLIMIT: ::c_int = 52; -pub const IPV6_RECVHOPOPTS: ::c_int = 53; -pub const IPV6_HOPOPTS: ::c_int = 54; -pub const IPV6_RTHDRDSTOPTS: ::c_int = 55; -pub const IPV6_RECVRTHDR: ::c_int = 56; -pub const IPV6_RTHDR: ::c_int = 57; -pub const IPV6_RECVDSTOPTS: ::c_int = 58; -pub const IPV6_DSTOPTS: ::c_int = 59; -pub const IPV6_RECVPATHMTU: ::c_int = 60; -pub const IPV6_PATHMTU: ::c_int = 61; -pub const IPV6_DONTFRAG: ::c_int = 62; -pub const IPV6_RECVTCLASS: ::c_int = 66; -pub const IPV6_TCLASS: ::c_int = 67; -pub const IPV6_ADDR_PREFERENCES: ::c_int = 72; -pub const IPV6_MINHOPCOUNT: ::c_int = 73; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; -pub const IPV6_RXHOPOPTS: ::c_int = 3; -pub const IPV6_RXDSTOPTS: ::c_int = 4; -pub const IPV6_RTHDR_LOOSE: ::c_int = 0; -pub const IPV6_RTHDR_STRICT: ::c_int = 1; -pub const IPV6_RTHDR_TYPE_0: ::c_int = 0; +pub const SOL_IP: c_int = 0; +pub const SOL_TCP: c_int = 6; +pub const SOL_UDP: c_int = 17; +pub const SOL_IPV6: c_int = 41; +pub const SOL_ICMPV6: c_int = 58; +pub const IP_OPTIONS: c_int = 1; +pub const IP_HDRINCL: c_int = 2; +pub const IP_TOS: c_int = 3; +pub const IP_TTL: c_int = 4; +pub const IP_RECVOPTS: c_int = 5; +pub const IP_RECVRETOPTS: c_int = 6; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_RETOPTS: c_int = 8; +pub const IP_MULTICAST_IF: c_int = 9; +pub const IP_MULTICAST_TTL: c_int = 10; +pub const IP_MULTICAST_LOOP: c_int = 11; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IPV6_ADDRFORM: c_int = 1; +pub const IPV6_2292PKTINFO: c_int = 2; +pub const IPV6_2292HOPOPTS: c_int = 3; +pub const IPV6_2292DSTOPTS: c_int = 4; +pub const IPV6_2292RTHDR: c_int = 5; +pub const IPV6_2292PKTOPTIONS: c_int = 6; +pub const IPV6_CHECKSUM: c_int = 7; +pub const IPV6_2292HOPLIMIT: c_int = 8; +pub const IPV6_RXINFO: c_int = 2; +pub const IPV6_TXINFO: c_int = 2; +pub const SCM_SRCINFO: c_int = 2; +pub const IPV6_UNICAST_HOPS: c_int = 16; +pub const IPV6_MULTICAST_IF: c_int = 17; +pub const IPV6_MULTICAST_HOPS: c_int = 18; +pub const IPV6_MULTICAST_LOOP: c_int = 19; +pub const IPV6_JOIN_GROUP: c_int = 20; +pub const IPV6_LEAVE_GROUP: c_int = 21; +pub const IPV6_ROUTER_ALERT: c_int = 22; +pub const IPV6_MTU_DISCOVER: c_int = 23; +pub const IPV6_MTU: c_int = 24; +pub const IPV6_RECVERR: c_int = 25; +pub const IPV6_V6ONLY: c_int = 26; +pub const IPV6_JOIN_ANYCAST: c_int = 27; +pub const IPV6_LEAVE_ANYCAST: c_int = 28; +pub const IPV6_RECVPKTINFO: c_int = 49; +pub const IPV6_PKTINFO: c_int = 50; +pub const IPV6_RECVHOPLIMIT: c_int = 51; +pub const IPV6_HOPLIMIT: c_int = 52; +pub const IPV6_RECVHOPOPTS: c_int = 53; +pub const IPV6_HOPOPTS: c_int = 54; +pub const IPV6_RTHDRDSTOPTS: c_int = 55; +pub const IPV6_RECVRTHDR: c_int = 56; +pub const IPV6_RTHDR: c_int = 57; +pub const IPV6_RECVDSTOPTS: c_int = 58; +pub const IPV6_DSTOPTS: c_int = 59; +pub const IPV6_RECVPATHMTU: c_int = 60; +pub const IPV6_PATHMTU: c_int = 61; +pub const IPV6_DONTFRAG: c_int = 62; +pub const IPV6_RECVTCLASS: c_int = 66; +pub const IPV6_TCLASS: c_int = 67; +pub const IPV6_ADDR_PREFERENCES: c_int = 72; +pub const IPV6_MINHOPCOUNT: c_int = 73; +pub const IPV6_ADD_MEMBERSHIP: c_int = 20; +pub const IPV6_DROP_MEMBERSHIP: c_int = 21; +pub const IPV6_RXHOPOPTS: c_int = 3; +pub const IPV6_RXDSTOPTS: c_int = 4; +pub const IPV6_RTHDR_LOOSE: c_int = 0; +pub const IPV6_RTHDR_STRICT: c_int = 1; +pub const IPV6_RTHDR_TYPE_0: c_int = 0; pub const IN_CLASSA_NET: u32 = 4278190080; pub const IN_CLASSA_NSHIFT: usize = 24; pub const IN_CLASSA_HOST: u32 = 16777215; @@ -1497,13 +1502,13 @@ pub const ARPOP_InREPLY: u16 = 9; pub const ARPOP_NAK: u16 = 10; pub const MAX_ADDR_LEN: usize = 7; -pub const ARPD_UPDATE: ::c_ushort = 0x01; -pub const ARPD_LOOKUP: ::c_ushort = 0x02; -pub const ARPD_FLUSH: ::c_ushort = 0x03; -pub const ATF_MAGIC: ::c_int = 0x80; +pub const ARPD_UPDATE: c_ushort = 0x01; +pub const ARPD_LOOKUP: c_ushort = 0x02; +pub const ARPD_FLUSH: c_ushort = 0x03; +pub const ATF_MAGIC: c_int = 0x80; -pub const ATF_NETMASK: ::c_int = 0x20; -pub const ATF_DONTPUB: ::c_int = 0x40; +pub const ATF_NETMASK: c_int = 0x20; +pub const ATF_DONTPUB: c_int = 0x40; pub const ARPHRD_NETROM: u16 = 0; pub const ARPHRD_ETHER: u16 = 1; @@ -1582,8 +1587,8 @@ pub const _POSIX_MQ_OPEN_MAX: usize = 8; pub const _POSIX_MQ_PRIO_MAX: usize = 32; pub const _POSIX_NAME_MAX: usize = 14; pub const _POSIX_NGROUPS_MAX: usize = 8; -pub const _POSIX_OPEN_MAX: ::c_int = 20; -pub const _POSIX_FD_SETSIZE: ::c_int = 20; +pub const _POSIX_OPEN_MAX: c_int = 20; +pub const _POSIX_FD_SETSIZE: c_int = 20; pub const _POSIX_PATH_MAX: usize = 256; pub const _POSIX_PIPE_BUF: usize = 512; pub const _POSIX_RE_DUP_MAX: usize = 255; @@ -1607,7 +1612,7 @@ pub const NGROUPS_MAX: usize = 256; pub const _POSIX_THREAD_KEYS_MAX: usize = 128; pub const _POSIX_THREAD_DESTRUCTOR_ITERATIONS: usize = 4; pub const _POSIX_THREAD_THREADS_MAX: usize = 64; -pub const SEM_VALUE_MAX: ::c_int = 2147483647; +pub const SEM_VALUE_MAX: c_int = 2147483647; pub const MAXNAMLEN: usize = 255; // netdb.h @@ -1617,63 +1622,63 @@ pub const _PATH_NETWORKS: &'static [u8; 14usize] = b"/etc/networks\0"; pub const _PATH_NSSWITCH_CONF: &'static [u8; 19usize] = b"/etc/nsswitch.conf\0"; pub const _PATH_PROTOCOLS: &'static [u8; 15usize] = b"/etc/protocols\0"; pub const _PATH_SERVICES: &'static [u8; 14usize] = b"/etc/services\0"; -pub const HOST_NOT_FOUND: ::c_int = 1; -pub const TRY_AGAIN: ::c_int = 2; -pub const NO_RECOVERY: ::c_int = 3; -pub const NO_DATA: ::c_int = 4; -pub const NETDB_INTERNAL: ::c_int = -1; -pub const NETDB_SUCCESS: ::c_int = 0; -pub const NO_ADDRESS: ::c_int = 4; -pub const IPPORT_RESERVED: ::c_int = 1024; +pub const HOST_NOT_FOUND: c_int = 1; +pub const TRY_AGAIN: c_int = 2; +pub const NO_RECOVERY: c_int = 3; +pub const NO_DATA: c_int = 4; +pub const NETDB_INTERNAL: c_int = -1; +pub const NETDB_SUCCESS: c_int = 0; +pub const NO_ADDRESS: c_int = 4; +pub const IPPORT_RESERVED: c_int = 1024; pub const SCOPE_DELIMITER: u8 = 37u8; -pub const GAI_WAIT: ::c_int = 0; -pub const GAI_NOWAIT: ::c_int = 1; -pub const AI_PASSIVE: ::c_int = 1; -pub const AI_CANONNAME: ::c_int = 2; -pub const AI_NUMERICHOST: ::c_int = 4; -pub const AI_V4MAPPED: ::c_int = 8; -pub const AI_ALL: ::c_int = 16; -pub const AI_ADDRCONFIG: ::c_int = 32; -pub const AI_IDN: ::c_int = 64; -pub const AI_CANONIDN: ::c_int = 128; -pub const AI_NUMERICSERV: ::c_int = 1024; -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_SYSTEM: ::c_int = -11; -pub const EAI_OVERFLOW: ::c_int = -12; -pub const EAI_NODATA: ::c_int = -5; -pub const EAI_ADDRFAMILY: ::c_int = -9; -pub const EAI_INPROGRESS: ::c_int = -100; -pub const EAI_CANCELED: ::c_int = -101; -pub const EAI_NOTCANCELED: ::c_int = -102; -pub const EAI_ALLDONE: ::c_int = -103; -pub const EAI_INTR: ::c_int = -104; -pub const EAI_IDN_ENCODE: ::c_int = -105; +pub const GAI_WAIT: c_int = 0; +pub const GAI_NOWAIT: c_int = 1; +pub const AI_PASSIVE: c_int = 1; +pub const AI_CANONNAME: c_int = 2; +pub const AI_NUMERICHOST: c_int = 4; +pub const AI_V4MAPPED: c_int = 8; +pub const AI_ALL: c_int = 16; +pub const AI_ADDRCONFIG: c_int = 32; +pub const AI_IDN: c_int = 64; +pub const AI_CANONIDN: c_int = 128; +pub const AI_NUMERICSERV: c_int = 1024; +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_SYSTEM: c_int = -11; +pub const EAI_OVERFLOW: c_int = -12; +pub const EAI_NODATA: c_int = -5; +pub const EAI_ADDRFAMILY: c_int = -9; +pub const EAI_INPROGRESS: c_int = -100; +pub const EAI_CANCELED: c_int = -101; +pub const EAI_NOTCANCELED: c_int = -102; +pub const EAI_ALLDONE: c_int = -103; +pub const EAI_INTR: c_int = -104; +pub const EAI_IDN_ENCODE: c_int = -105; pub const NI_MAXHOST: usize = 1025; pub const NI_MAXSERV: usize = 32; -pub const NI_NUMERICHOST: ::c_int = 1; -pub const NI_NUMERICSERV: ::c_int = 2; -pub const NI_NOFQDN: ::c_int = 4; -pub const NI_NAMEREQD: ::c_int = 8; -pub const NI_DGRAM: ::c_int = 16; -pub const NI_IDN: ::c_int = 32; +pub const NI_NUMERICHOST: c_int = 1; +pub const NI_NUMERICSERV: c_int = 2; +pub const NI_NOFQDN: c_int = 4; +pub const NI_NAMEREQD: c_int = 8; +pub const NI_DGRAM: c_int = 16; +pub const NI_IDN: c_int = 32; // time.h -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_MONOTONIC: ::clockid_t = 1; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3; -pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; -pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5; -pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6; -pub const TIMER_ABSTIME: ::c_int = 1; -pub const TIME_UTC: ::c_int = 1; +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_MONOTONIC: crate::clockid_t = 1; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 3; +pub const CLOCK_MONOTONIC_RAW: crate::clockid_t = 4; +pub const CLOCK_REALTIME_COARSE: crate::clockid_t = 5; +pub const CLOCK_MONOTONIC_COARSE: crate::clockid_t = 6; +pub const TIMER_ABSTIME: c_int = 1; +pub const TIME_UTC: c_int = 1; // sys/poll.h pub const POLLIN: i16 = 1; @@ -1701,205 +1706,205 @@ pub const __LC_ADDRESS: usize = 9; pub const __LC_TELEPHONE: usize = 10; pub const __LC_MEASUREMENT: usize = 11; pub const __LC_IDENTIFICATION: usize = 12; -pub const LC_CTYPE: ::c_int = 0; -pub const LC_NUMERIC: ::c_int = 1; -pub const LC_TIME: ::c_int = 2; -pub const LC_COLLATE: ::c_int = 3; -pub const LC_MONETARY: ::c_int = 4; -pub const LC_MESSAGES: ::c_int = 5; -pub const LC_ALL: ::c_int = 6; -pub const LC_PAPER: ::c_int = 7; -pub const LC_NAME: ::c_int = 8; -pub const LC_ADDRESS: ::c_int = 9; -pub const LC_TELEPHONE: ::c_int = 10; -pub const LC_MEASUREMENT: ::c_int = 11; -pub const LC_IDENTIFICATION: ::c_int = 12; -pub const LC_CTYPE_MASK: ::c_int = 1; -pub const LC_NUMERIC_MASK: ::c_int = 2; -pub const LC_TIME_MASK: ::c_int = 4; -pub const LC_COLLATE_MASK: ::c_int = 8; -pub const LC_MONETARY_MASK: ::c_int = 16; -pub const LC_MESSAGES_MASK: ::c_int = 32; -pub const LC_PAPER_MASK: ::c_int = 128; -pub const LC_NAME_MASK: ::c_int = 256; -pub const LC_ADDRESS_MASK: ::c_int = 512; -pub const LC_TELEPHONE_MASK: ::c_int = 1024; -pub const LC_MEASUREMENT_MASK: ::c_int = 2048; -pub const LC_IDENTIFICATION_MASK: ::c_int = 4096; -pub const LC_ALL_MASK: ::c_int = 8127; - -pub const ABDAY_1: ::nl_item = 0x20000; -pub const ABDAY_2: ::nl_item = 0x20001; -pub const ABDAY_3: ::nl_item = 0x20002; -pub const ABDAY_4: ::nl_item = 0x20003; -pub const ABDAY_5: ::nl_item = 0x20004; -pub const ABDAY_6: ::nl_item = 0x20005; -pub const ABDAY_7: ::nl_item = 0x20006; - -pub const DAY_1: ::nl_item = 0x20007; -pub const DAY_2: ::nl_item = 0x20008; -pub const DAY_3: ::nl_item = 0x20009; -pub const DAY_4: ::nl_item = 0x2000A; -pub const DAY_5: ::nl_item = 0x2000B; -pub const DAY_6: ::nl_item = 0x2000C; -pub const DAY_7: ::nl_item = 0x2000D; - -pub const ABMON_1: ::nl_item = 0x2000E; -pub const ABMON_2: ::nl_item = 0x2000F; -pub const ABMON_3: ::nl_item = 0x20010; -pub const ABMON_4: ::nl_item = 0x20011; -pub const ABMON_5: ::nl_item = 0x20012; -pub const ABMON_6: ::nl_item = 0x20013; -pub const ABMON_7: ::nl_item = 0x20014; -pub const ABMON_8: ::nl_item = 0x20015; -pub const ABMON_9: ::nl_item = 0x20016; -pub const ABMON_10: ::nl_item = 0x20017; -pub const ABMON_11: ::nl_item = 0x20018; -pub const ABMON_12: ::nl_item = 0x20019; - -pub const MON_1: ::nl_item = 0x2001A; -pub const MON_2: ::nl_item = 0x2001B; -pub const MON_3: ::nl_item = 0x2001C; -pub const MON_4: ::nl_item = 0x2001D; -pub const MON_5: ::nl_item = 0x2001E; -pub const MON_6: ::nl_item = 0x2001F; -pub const MON_7: ::nl_item = 0x20020; -pub const MON_8: ::nl_item = 0x20021; -pub const MON_9: ::nl_item = 0x20022; -pub const MON_10: ::nl_item = 0x20023; -pub const MON_11: ::nl_item = 0x20024; -pub const MON_12: ::nl_item = 0x20025; - -pub const AM_STR: ::nl_item = 0x20026; -pub const PM_STR: ::nl_item = 0x20027; - -pub const D_T_FMT: ::nl_item = 0x20028; -pub const D_FMT: ::nl_item = 0x20029; -pub const T_FMT: ::nl_item = 0x2002A; -pub const T_FMT_AMPM: ::nl_item = 0x2002B; - -pub const ERA: ::nl_item = 0x2002C; -pub const ERA_D_FMT: ::nl_item = 0x2002E; -pub const ALT_DIGITS: ::nl_item = 0x2002F; -pub const ERA_D_T_FMT: ::nl_item = 0x20030; -pub const ERA_T_FMT: ::nl_item = 0x20031; - -pub const CODESET: ::nl_item = 14; -pub const CRNCYSTR: ::nl_item = 0x4000F; -pub const RADIXCHAR: ::nl_item = 0x10000; -pub const THOUSEP: ::nl_item = 0x10001; -pub const YESEXPR: ::nl_item = 0x50000; -pub const NOEXPR: ::nl_item = 0x50001; -pub const YESSTR: ::nl_item = 0x50002; -pub const NOSTR: ::nl_item = 0x50003; +pub const LC_CTYPE: c_int = 0; +pub const LC_NUMERIC: c_int = 1; +pub const LC_TIME: c_int = 2; +pub const LC_COLLATE: c_int = 3; +pub const LC_MONETARY: c_int = 4; +pub const LC_MESSAGES: c_int = 5; +pub const LC_ALL: c_int = 6; +pub const LC_PAPER: c_int = 7; +pub const LC_NAME: c_int = 8; +pub const LC_ADDRESS: c_int = 9; +pub const LC_TELEPHONE: c_int = 10; +pub const LC_MEASUREMENT: c_int = 11; +pub const LC_IDENTIFICATION: c_int = 12; +pub const LC_CTYPE_MASK: c_int = 1; +pub const LC_NUMERIC_MASK: c_int = 2; +pub const LC_TIME_MASK: c_int = 4; +pub const LC_COLLATE_MASK: c_int = 8; +pub const LC_MONETARY_MASK: c_int = 16; +pub const LC_MESSAGES_MASK: c_int = 32; +pub const LC_PAPER_MASK: c_int = 128; +pub const LC_NAME_MASK: c_int = 256; +pub const LC_ADDRESS_MASK: c_int = 512; +pub const LC_TELEPHONE_MASK: c_int = 1024; +pub const LC_MEASUREMENT_MASK: c_int = 2048; +pub const LC_IDENTIFICATION_MASK: c_int = 4096; +pub const LC_ALL_MASK: c_int = 8127; + +pub const ABDAY_1: crate::nl_item = 0x20000; +pub const ABDAY_2: crate::nl_item = 0x20001; +pub const ABDAY_3: crate::nl_item = 0x20002; +pub const ABDAY_4: crate::nl_item = 0x20003; +pub const ABDAY_5: crate::nl_item = 0x20004; +pub const ABDAY_6: crate::nl_item = 0x20005; +pub const ABDAY_7: crate::nl_item = 0x20006; + +pub const DAY_1: crate::nl_item = 0x20007; +pub const DAY_2: crate::nl_item = 0x20008; +pub const DAY_3: crate::nl_item = 0x20009; +pub const DAY_4: crate::nl_item = 0x2000A; +pub const DAY_5: crate::nl_item = 0x2000B; +pub const DAY_6: crate::nl_item = 0x2000C; +pub const DAY_7: crate::nl_item = 0x2000D; + +pub const ABMON_1: crate::nl_item = 0x2000E; +pub const ABMON_2: crate::nl_item = 0x2000F; +pub const ABMON_3: crate::nl_item = 0x20010; +pub const ABMON_4: crate::nl_item = 0x20011; +pub const ABMON_5: crate::nl_item = 0x20012; +pub const ABMON_6: crate::nl_item = 0x20013; +pub const ABMON_7: crate::nl_item = 0x20014; +pub const ABMON_8: crate::nl_item = 0x20015; +pub const ABMON_9: crate::nl_item = 0x20016; +pub const ABMON_10: crate::nl_item = 0x20017; +pub const ABMON_11: crate::nl_item = 0x20018; +pub const ABMON_12: crate::nl_item = 0x20019; + +pub const MON_1: crate::nl_item = 0x2001A; +pub const MON_2: crate::nl_item = 0x2001B; +pub const MON_3: crate::nl_item = 0x2001C; +pub const MON_4: crate::nl_item = 0x2001D; +pub const MON_5: crate::nl_item = 0x2001E; +pub const MON_6: crate::nl_item = 0x2001F; +pub const MON_7: crate::nl_item = 0x20020; +pub const MON_8: crate::nl_item = 0x20021; +pub const MON_9: crate::nl_item = 0x20022; +pub const MON_10: crate::nl_item = 0x20023; +pub const MON_11: crate::nl_item = 0x20024; +pub const MON_12: crate::nl_item = 0x20025; + +pub const AM_STR: crate::nl_item = 0x20026; +pub const PM_STR: crate::nl_item = 0x20027; + +pub const D_T_FMT: crate::nl_item = 0x20028; +pub const D_FMT: crate::nl_item = 0x20029; +pub const T_FMT: crate::nl_item = 0x2002A; +pub const T_FMT_AMPM: crate::nl_item = 0x2002B; + +pub const ERA: crate::nl_item = 0x2002C; +pub const ERA_D_FMT: crate::nl_item = 0x2002E; +pub const ALT_DIGITS: crate::nl_item = 0x2002F; +pub const ERA_D_T_FMT: crate::nl_item = 0x20030; +pub const ERA_T_FMT: crate::nl_item = 0x20031; + +pub const CODESET: crate::nl_item = 14; +pub const CRNCYSTR: crate::nl_item = 0x4000F; +pub const RADIXCHAR: crate::nl_item = 0x10000; +pub const THOUSEP: crate::nl_item = 0x10001; +pub const YESEXPR: crate::nl_item = 0x50000; +pub const NOEXPR: crate::nl_item = 0x50001; +pub const YESSTR: crate::nl_item = 0x50002; +pub const NOSTR: crate::nl_item = 0x50003; // reboot.h -pub const RB_AUTOBOOT: ::c_int = 0x0; -pub const RB_ASKNAME: ::c_int = 0x1; -pub const RB_SINGLE: ::c_int = 0x2; -pub const RB_KBD: ::c_int = 0x4; -pub const RB_HALT: ::c_int = 0x8; -pub const RB_INITNAME: ::c_int = 0x10; -pub const RB_DFLTROOT: ::c_int = 0x20; -pub const RB_NOBOOTRC: ::c_int = 0x20; -pub const RB_ALTBOOT: ::c_int = 0x40; -pub const RB_UNIPROC: ::c_int = 0x80; -pub const RB_DEBUGGER: ::c_int = 0x1000; +pub const RB_AUTOBOOT: c_int = 0x0; +pub const RB_ASKNAME: c_int = 0x1; +pub const RB_SINGLE: c_int = 0x2; +pub const RB_KBD: c_int = 0x4; +pub const RB_HALT: c_int = 0x8; +pub const RB_INITNAME: c_int = 0x10; +pub const RB_DFLTROOT: c_int = 0x20; +pub const RB_NOBOOTRC: c_int = 0x20; +pub const RB_ALTBOOT: c_int = 0x40; +pub const RB_UNIPROC: c_int = 0x80; +pub const RB_DEBUGGER: c_int = 0x1000; // semaphore.h pub const __SIZEOF_SEM_T: usize = 20; -pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; +pub const SEM_FAILED: *mut crate::sem_t = 0 as *mut sem_t; // termios.h -pub const IGNBRK: ::tcflag_t = 1; -pub const BRKINT: ::tcflag_t = 2; -pub const IGNPAR: ::tcflag_t = 4; -pub const PARMRK: ::tcflag_t = 8; -pub const INPCK: ::tcflag_t = 16; -pub const ISTRIP: ::tcflag_t = 32; -pub const INLCR: ::tcflag_t = 64; -pub const IGNCR: ::tcflag_t = 128; -pub const ICRNL: ::tcflag_t = 256; -pub const IXON: ::tcflag_t = 512; -pub const IXOFF: ::tcflag_t = 1024; -pub const IXANY: ::tcflag_t = 2048; -pub const IMAXBEL: ::tcflag_t = 8192; -pub const IUCLC: ::tcflag_t = 16384; -pub const OPOST: ::tcflag_t = 1; -pub const ONLCR: ::tcflag_t = 2; -pub const ONOEOT: ::tcflag_t = 8; -pub const OCRNL: ::tcflag_t = 16; -pub const ONOCR: ::tcflag_t = 32; -pub const ONLRET: ::tcflag_t = 64; -pub const NLDLY: ::tcflag_t = 768; -pub const NL0: ::tcflag_t = 0; -pub const NL1: ::tcflag_t = 256; -pub const TABDLY: ::tcflag_t = 3076; -pub const TAB0: ::tcflag_t = 0; -pub const TAB1: ::tcflag_t = 1024; -pub const TAB2: ::tcflag_t = 2048; -pub const TAB3: ::tcflag_t = 4; -pub const CRDLY: ::tcflag_t = 12288; -pub const CR0: ::tcflag_t = 0; -pub const CR1: ::tcflag_t = 4096; -pub const CR2: ::tcflag_t = 8192; -pub const CR3: ::tcflag_t = 12288; -pub const FFDLY: ::tcflag_t = 16384; -pub const FF0: ::tcflag_t = 0; -pub const FF1: ::tcflag_t = 16384; -pub const BSDLY: ::tcflag_t = 32768; -pub const BS0: ::tcflag_t = 0; -pub const BS1: ::tcflag_t = 32768; -pub const VTDLY: ::tcflag_t = 65536; -pub const VT0: ::tcflag_t = 0; -pub const VT1: ::tcflag_t = 65536; -pub const OLCUC: ::tcflag_t = 131072; -pub const OFILL: ::tcflag_t = 262144; -pub const OFDEL: ::tcflag_t = 524288; -pub const CIGNORE: ::tcflag_t = 1; -pub const CSIZE: ::tcflag_t = 768; -pub const CS5: ::tcflag_t = 0; -pub const CS6: ::tcflag_t = 256; -pub const CS7: ::tcflag_t = 512; -pub const CS8: ::tcflag_t = 768; -pub const CSTOPB: ::tcflag_t = 1024; -pub const CREAD: ::tcflag_t = 2048; -pub const PARENB: ::tcflag_t = 4096; -pub const PARODD: ::tcflag_t = 8192; -pub const HUPCL: ::tcflag_t = 16384; -pub const CLOCAL: ::tcflag_t = 32768; -pub const CRTSCTS: ::tcflag_t = 65536; -pub const CRTS_IFLOW: ::tcflag_t = 65536; -pub const CCTS_OFLOW: ::tcflag_t = 65536; -pub const CDTRCTS: ::tcflag_t = 131072; -pub const MDMBUF: ::tcflag_t = 1048576; -pub const CHWFLOW: ::tcflag_t = 1245184; -pub const ECHOKE: ::tcflag_t = 1; -pub const _ECHOE: ::tcflag_t = 2; -pub const ECHOE: ::tcflag_t = 2; -pub const _ECHOK: ::tcflag_t = 4; -pub const ECHOK: ::tcflag_t = 4; -pub const _ECHO: ::tcflag_t = 8; -pub const ECHO: ::tcflag_t = 8; -pub const _ECHONL: ::tcflag_t = 16; -pub const ECHONL: ::tcflag_t = 16; -pub const ECHOPRT: ::tcflag_t = 32; -pub const ECHOCTL: ::tcflag_t = 64; -pub const _ISIG: ::tcflag_t = 128; -pub const ISIG: ::tcflag_t = 128; -pub const _ICANON: ::tcflag_t = 256; -pub const ICANON: ::tcflag_t = 256; -pub const ALTWERASE: ::tcflag_t = 512; -pub const _IEXTEN: ::tcflag_t = 1024; -pub const IEXTEN: ::tcflag_t = 1024; -pub const EXTPROC: ::tcflag_t = 2048; -pub const _TOSTOP: ::tcflag_t = 4194304; -pub const TOSTOP: ::tcflag_t = 4194304; -pub const FLUSHO: ::tcflag_t = 8388608; -pub const NOKERNINFO: ::tcflag_t = 33554432; -pub const PENDIN: ::tcflag_t = 536870912; -pub const _NOFLSH: ::tcflag_t = 2147483648; -pub const NOFLSH: ::tcflag_t = 2147483648; +pub const IGNBRK: crate::tcflag_t = 1; +pub const BRKINT: crate::tcflag_t = 2; +pub const IGNPAR: crate::tcflag_t = 4; +pub const PARMRK: crate::tcflag_t = 8; +pub const INPCK: crate::tcflag_t = 16; +pub const ISTRIP: crate::tcflag_t = 32; +pub const INLCR: crate::tcflag_t = 64; +pub const IGNCR: crate::tcflag_t = 128; +pub const ICRNL: crate::tcflag_t = 256; +pub const IXON: crate::tcflag_t = 512; +pub const IXOFF: crate::tcflag_t = 1024; +pub const IXANY: crate::tcflag_t = 2048; +pub const IMAXBEL: crate::tcflag_t = 8192; +pub const IUCLC: crate::tcflag_t = 16384; +pub const OPOST: crate::tcflag_t = 1; +pub const ONLCR: crate::tcflag_t = 2; +pub const ONOEOT: crate::tcflag_t = 8; +pub const OCRNL: crate::tcflag_t = 16; +pub const ONOCR: crate::tcflag_t = 32; +pub const ONLRET: crate::tcflag_t = 64; +pub const NLDLY: crate::tcflag_t = 768; +pub const NL0: crate::tcflag_t = 0; +pub const NL1: crate::tcflag_t = 256; +pub const TABDLY: crate::tcflag_t = 3076; +pub const TAB0: crate::tcflag_t = 0; +pub const TAB1: crate::tcflag_t = 1024; +pub const TAB2: crate::tcflag_t = 2048; +pub const TAB3: crate::tcflag_t = 4; +pub const CRDLY: crate::tcflag_t = 12288; +pub const CR0: crate::tcflag_t = 0; +pub const CR1: crate::tcflag_t = 4096; +pub const CR2: crate::tcflag_t = 8192; +pub const CR3: crate::tcflag_t = 12288; +pub const FFDLY: crate::tcflag_t = 16384; +pub const FF0: crate::tcflag_t = 0; +pub const FF1: crate::tcflag_t = 16384; +pub const BSDLY: crate::tcflag_t = 32768; +pub const BS0: crate::tcflag_t = 0; +pub const BS1: crate::tcflag_t = 32768; +pub const VTDLY: crate::tcflag_t = 65536; +pub const VT0: crate::tcflag_t = 0; +pub const VT1: crate::tcflag_t = 65536; +pub const OLCUC: crate::tcflag_t = 131072; +pub const OFILL: crate::tcflag_t = 262144; +pub const OFDEL: crate::tcflag_t = 524288; +pub const CIGNORE: crate::tcflag_t = 1; +pub const CSIZE: crate::tcflag_t = 768; +pub const CS5: crate::tcflag_t = 0; +pub const CS6: crate::tcflag_t = 256; +pub const CS7: crate::tcflag_t = 512; +pub const CS8: crate::tcflag_t = 768; +pub const CSTOPB: crate::tcflag_t = 1024; +pub const CREAD: crate::tcflag_t = 2048; +pub const PARENB: crate::tcflag_t = 4096; +pub const PARODD: crate::tcflag_t = 8192; +pub const HUPCL: crate::tcflag_t = 16384; +pub const CLOCAL: crate::tcflag_t = 32768; +pub const CRTSCTS: crate::tcflag_t = 65536; +pub const CRTS_IFLOW: crate::tcflag_t = 65536; +pub const CCTS_OFLOW: crate::tcflag_t = 65536; +pub const CDTRCTS: crate::tcflag_t = 131072; +pub const MDMBUF: crate::tcflag_t = 1048576; +pub const CHWFLOW: crate::tcflag_t = 1245184; +pub const ECHOKE: crate::tcflag_t = 1; +pub const _ECHOE: crate::tcflag_t = 2; +pub const ECHOE: crate::tcflag_t = 2; +pub const _ECHOK: crate::tcflag_t = 4; +pub const ECHOK: crate::tcflag_t = 4; +pub const _ECHO: crate::tcflag_t = 8; +pub const ECHO: crate::tcflag_t = 8; +pub const _ECHONL: crate::tcflag_t = 16; +pub const ECHONL: crate::tcflag_t = 16; +pub const ECHOPRT: crate::tcflag_t = 32; +pub const ECHOCTL: crate::tcflag_t = 64; +pub const _ISIG: crate::tcflag_t = 128; +pub const ISIG: crate::tcflag_t = 128; +pub const _ICANON: crate::tcflag_t = 256; +pub const ICANON: crate::tcflag_t = 256; +pub const ALTWERASE: crate::tcflag_t = 512; +pub const _IEXTEN: crate::tcflag_t = 1024; +pub const IEXTEN: crate::tcflag_t = 1024; +pub const EXTPROC: crate::tcflag_t = 2048; +pub const _TOSTOP: crate::tcflag_t = 4194304; +pub const TOSTOP: crate::tcflag_t = 4194304; +pub const FLUSHO: crate::tcflag_t = 8388608; +pub const NOKERNINFO: crate::tcflag_t = 33554432; +pub const PENDIN: crate::tcflag_t = 536870912; +pub const _NOFLSH: crate::tcflag_t = 2147483648; +pub const NOFLSH: crate::tcflag_t = 2147483648; pub const VEOF: usize = 0; pub const VEOL: usize = 1; pub const VEOL2: usize = 2; @@ -1919,58 +1924,58 @@ pub const VMIN: usize = 16; pub const VTIME: usize = 17; pub const VSTATUS: usize = 18; pub const NCCS: usize = 20; -pub const B0: ::speed_t = 0; -pub const B50: ::speed_t = 50; -pub const B75: ::speed_t = 75; -pub const B110: ::speed_t = 110; -pub const B134: ::speed_t = 134; -pub const B150: ::speed_t = 150; -pub const B200: ::speed_t = 200; -pub const B300: ::speed_t = 300; -pub const B600: ::speed_t = 600; -pub const B1200: ::speed_t = 1200; -pub const B1800: ::speed_t = 1800; -pub const B2400: ::speed_t = 2400; -pub const B4800: ::speed_t = 4800; -pub const B9600: ::speed_t = 9600; -pub const B7200: ::speed_t = 7200; -pub const B14400: ::speed_t = 14400; -pub const B19200: ::speed_t = 19200; -pub const B28800: ::speed_t = 28800; -pub const B38400: ::speed_t = 38400; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 57600; -pub const B76800: ::speed_t = 76800; -pub const B115200: ::speed_t = 115200; -pub const B230400: ::speed_t = 230400; -pub const B460800: ::speed_t = 460800; -pub const B500000: ::speed_t = 500000; -pub const B576000: ::speed_t = 576000; -pub const B921600: ::speed_t = 921600; -pub const B1000000: ::speed_t = 1000000; -pub const B1152000: ::speed_t = 1152000; -pub const B1500000: ::speed_t = 1500000; -pub const B2000000: ::speed_t = 2000000; -pub const B2500000: ::speed_t = 2500000; -pub const B3000000: ::speed_t = 3000000; -pub const B3500000: ::speed_t = 3500000; -pub const B4000000: ::speed_t = 4000000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; -pub const TCSASOFT: ::c_int = 16; -pub const TCIFLUSH: ::c_int = 1; -pub const TCOFLUSH: ::c_int = 2; -pub const TCIOFLUSH: ::c_int = 3; -pub const TCOOFF: ::c_int = 1; -pub const TCOON: ::c_int = 2; -pub const TCIOFF: ::c_int = 3; -pub const TCION: ::c_int = 4; -pub const TTYDEF_IFLAG: ::tcflag_t = 11042; -pub const TTYDEF_LFLAG: ::tcflag_t = 1483; -pub const TTYDEF_CFLAG: ::tcflag_t = 23040; -pub const TTYDEF_SPEED: ::tcflag_t = 9600; +pub const B0: crate::speed_t = 0; +pub const B50: crate::speed_t = 50; +pub const B75: crate::speed_t = 75; +pub const B110: crate::speed_t = 110; +pub const B134: crate::speed_t = 134; +pub const B150: crate::speed_t = 150; +pub const B200: crate::speed_t = 200; +pub const B300: crate::speed_t = 300; +pub const B600: crate::speed_t = 600; +pub const B1200: crate::speed_t = 1200; +pub const B1800: crate::speed_t = 1800; +pub const B2400: crate::speed_t = 2400; +pub const B4800: crate::speed_t = 4800; +pub const B9600: crate::speed_t = 9600; +pub const B7200: crate::speed_t = 7200; +pub const B14400: crate::speed_t = 14400; +pub const B19200: crate::speed_t = 19200; +pub const B28800: crate::speed_t = 28800; +pub const B38400: crate::speed_t = 38400; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 57600; +pub const B76800: crate::speed_t = 76800; +pub const B115200: crate::speed_t = 115200; +pub const B230400: crate::speed_t = 230400; +pub const B460800: crate::speed_t = 460800; +pub const B500000: crate::speed_t = 500000; +pub const B576000: crate::speed_t = 576000; +pub const B921600: crate::speed_t = 921600; +pub const B1000000: crate::speed_t = 1000000; +pub const B1152000: crate::speed_t = 1152000; +pub const B1500000: crate::speed_t = 1500000; +pub const B2000000: crate::speed_t = 2000000; +pub const B2500000: crate::speed_t = 2500000; +pub const B3000000: crate::speed_t = 3000000; +pub const B3500000: crate::speed_t = 3500000; +pub const B4000000: crate::speed_t = 4000000; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; +pub const TCSASOFT: c_int = 16; +pub const TCIFLUSH: c_int = 1; +pub const TCOFLUSH: c_int = 2; +pub const TCIOFLUSH: c_int = 3; +pub const TCOOFF: c_int = 1; +pub const TCOON: c_int = 2; +pub const TCIOFF: c_int = 3; +pub const TCION: c_int = 4; +pub const TTYDEF_IFLAG: crate::tcflag_t = 11042; +pub const TTYDEF_LFLAG: crate::tcflag_t = 1483; +pub const TTYDEF_CFLAG: crate::tcflag_t = 23040; +pub const TTYDEF_SPEED: crate::tcflag_t = 9600; pub const CEOL: u8 = 0u8; pub const CERASE: u8 = 127; pub const CMIN: u8 = 1; @@ -1979,76 +1984,76 @@ pub const CTIME: u8 = 0; pub const CBRK: u8 = 0u8; // dlfcn.h -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; -pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; -pub const RTLD_LAZY: ::c_int = 1; -pub const RTLD_NOW: ::c_int = 2; -pub const RTLD_BINDING_MASK: ::c_int = 3; -pub const RTLD_NOLOAD: ::c_int = 4; -pub const RTLD_DEEPBIND: ::c_int = 8; -pub const RTLD_GLOBAL: ::c_int = 256; -pub const RTLD_LOCAL: ::c_int = 0; -pub const RTLD_NODELETE: ::c_int = 4096; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; +pub const RTLD_NEXT: *mut c_void = -1i64 as *mut c_void; +pub const RTLD_LAZY: c_int = 1; +pub const RTLD_NOW: c_int = 2; +pub const RTLD_BINDING_MASK: c_int = 3; +pub const RTLD_NOLOAD: c_int = 4; +pub const RTLD_DEEPBIND: c_int = 8; +pub const RTLD_GLOBAL: c_int = 256; +pub const RTLD_LOCAL: c_int = 0; +pub const RTLD_NODELETE: c_int = 4096; pub const DLFO_STRUCT_HAS_EH_DBASE: usize = 1; pub const DLFO_STRUCT_HAS_EH_COUNT: usize = 0; pub const LM_ID_BASE: c_long = 0; pub const LM_ID_NEWLM: c_long = -1; // bits/signum_generic.h -pub const SIGINT: ::c_int = 2; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGSEGV: ::c_int = 11; -pub const SIGTERM: ::c_int = 15; -pub const SIGHUP: ::c_int = 1; -pub const SIGQUIT: ::c_int = 3; -pub const SIGTRAP: ::c_int = 5; -pub const SIGKILL: ::c_int = 9; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGIOT: ::c_int = 6; -pub const SIGBUS: ::c_int = 10; -pub const SIGSYS: ::c_int = 12; -pub const SIGEMT: ::c_int = 7; -pub const SIGINFO: ::c_int = 29; -pub const SIGLOST: ::c_int = 32; -pub const SIGURG: ::c_int = 16; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGCONT: ::c_int = 19; -pub const SIGCHLD: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGPOLL: ::c_int = 23; -pub const SIGXCPU: ::c_int = 24; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const SIGWINCH: ::c_int = 28; -pub const SIGIO: ::c_int = 23; -pub const SIGCLD: ::c_int = 20; +pub const SIGINT: c_int = 2; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGFPE: c_int = 8; +pub const SIGSEGV: c_int = 11; +pub const SIGTERM: c_int = 15; +pub const SIGHUP: c_int = 1; +pub const SIGQUIT: c_int = 3; +pub const SIGTRAP: c_int = 5; +pub const SIGKILL: c_int = 9; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGIOT: c_int = 6; +pub const SIGBUS: c_int = 10; +pub const SIGSYS: c_int = 12; +pub const SIGEMT: c_int = 7; +pub const SIGINFO: c_int = 29; +pub const SIGLOST: c_int = 32; +pub const SIGURG: c_int = 16; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGCONT: c_int = 19; +pub const SIGCHLD: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGPOLL: c_int = 23; +pub const SIGXCPU: c_int = 24; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGXFSZ: c_int = 25; +pub const SIGUSR1: c_int = 30; +pub const SIGUSR2: c_int = 31; +pub const SIGWINCH: c_int = 28; +pub const SIGIO: c_int = 23; +pub const SIGCLD: c_int = 20; pub const __SIGRTMIN: usize = 32; pub const __SIGRTMAX: usize = 32; pub const _NSIG: usize = 33; pub const NSIG: usize = 33; // bits/sigaction.h -pub const SA_ONSTACK: ::c_int = 1; -pub const SA_RESTART: ::c_int = 2; -pub const SA_NODEFER: ::c_int = 16; -pub const SA_RESETHAND: ::c_int = 4; -pub const SA_NOCLDSTOP: ::c_int = 8; -pub const SA_SIGINFO: ::c_int = 64; -pub const SA_INTERRUPT: ::c_int = 0; -pub const SA_NOMASK: ::c_int = 16; -pub const SA_ONESHOT: ::c_int = 4; -pub const SA_STACK: ::c_int = 1; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; -pub const SIG_SETMASK: ::c_int = 3; +pub const SA_ONSTACK: c_int = 1; +pub const SA_RESTART: c_int = 2; +pub const SA_NODEFER: c_int = 16; +pub const SA_RESETHAND: c_int = 4; +pub const SA_NOCLDSTOP: c_int = 8; +pub const SA_SIGINFO: c_int = 64; +pub const SA_INTERRUPT: c_int = 0; +pub const SA_NOMASK: c_int = 16; +pub const SA_ONESHOT: c_int = 4; +pub const SA_STACK: c_int = 1; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; +pub const SIG_SETMASK: c_int = 3; // bits/sigcontext.h pub const FPC_IE: u16 = 1; @@ -2088,21 +2093,21 @@ pub const FPS_TOS: u16 = 14336; pub const FPS_TOS_SHIFT: u16 = 11; pub const FPS_C3: u16 = 16384; pub const FPS_BUSY: u16 = 32768; -pub const FPE_INTOVF_TRAP: ::c_int = 1; -pub const FPE_INTDIV_FAULT: ::c_int = 2; -pub const FPE_FLTOVF_FAULT: ::c_int = 3; -pub const FPE_FLTDIV_FAULT: ::c_int = 4; -pub const FPE_FLTUND_FAULT: ::c_int = 5; -pub const FPE_SUBRNG_FAULT: ::c_int = 7; -pub const FPE_FLTDNR_FAULT: ::c_int = 8; -pub const FPE_FLTINX_FAULT: ::c_int = 9; -pub const FPE_EMERR_FAULT: ::c_int = 10; -pub const FPE_EMBND_FAULT: ::c_int = 11; -pub const ILL_INVOPR_FAULT: ::c_int = 1; -pub const ILL_STACK_FAULT: ::c_int = 2; -pub const ILL_FPEOPR_FAULT: ::c_int = 3; -pub const DBG_SINGLE_TRAP: ::c_int = 1; -pub const DBG_BRKPNT_FAULT: ::c_int = 2; +pub const FPE_INTOVF_TRAP: c_int = 1; +pub const FPE_INTDIV_FAULT: c_int = 2; +pub const FPE_FLTOVF_FAULT: c_int = 3; +pub const FPE_FLTDIV_FAULT: c_int = 4; +pub const FPE_FLTUND_FAULT: c_int = 5; +pub const FPE_SUBRNG_FAULT: c_int = 7; +pub const FPE_FLTDNR_FAULT: c_int = 8; +pub const FPE_FLTINX_FAULT: c_int = 9; +pub const FPE_EMERR_FAULT: c_int = 10; +pub const FPE_EMBND_FAULT: c_int = 11; +pub const ILL_INVOPR_FAULT: c_int = 1; +pub const ILL_STACK_FAULT: c_int = 2; +pub const ILL_FPEOPR_FAULT: c_int = 3; +pub const DBG_SINGLE_TRAP: c_int = 1; +pub const DBG_BRKPNT_FAULT: c_int = 2; pub const __NGREG: usize = 19; pub const NGREG: usize = 19; @@ -2135,465 +2140,465 @@ pub const S_IROOT: mode_t = 0o4000_0000; pub const S_ITRANS: mode_t = 0o7000_0000; pub const S_IMMAP0: mode_t = 0o10000_0000; pub const CMASK: mode_t = 18; -pub const UF_SETTABLE: ::c_uint = 65535; -pub const UF_NODUMP: ::c_uint = 1; -pub const UF_IMMUTABLE: ::c_uint = 2; -pub const UF_APPEND: ::c_uint = 4; -pub const UF_OPAQUE: ::c_uint = 8; -pub const UF_NOUNLINK: ::c_uint = 16; -pub const SF_SETTABLE: ::c_uint = 4294901760; -pub const SF_ARCHIVED: ::c_uint = 65536; -pub const SF_IMMUTABLE: ::c_uint = 131072; -pub const SF_APPEND: ::c_uint = 262144; -pub const SF_NOUNLINK: ::c_uint = 1048576; -pub const SF_SNAPSHOT: ::c_uint = 2097152; -pub const UTIME_NOW: ::c_long = -1; -pub const UTIME_OMIT: ::c_long = -2; -pub const S_IFMT: ::mode_t = 0o17_0000; -pub const S_IFDIR: ::mode_t = 0o4_0000; -pub const S_IFCHR: ::mode_t = 0o2_0000; -pub const S_IFBLK: ::mode_t = 0o6_0000; -pub const S_IFREG: ::mode_t = 0o10_0000; -pub const S_IFIFO: ::mode_t = 0o1_0000; -pub const S_IFLNK: ::mode_t = 0o12_0000; -pub const S_IFSOCK: ::mode_t = 0o14_0000; -pub const S_ISUID: ::mode_t = 0o4000; -pub const S_ISGID: ::mode_t = 0o2000; -pub const S_ISVTX: ::mode_t = 0o1000; -pub const S_IRUSR: ::mode_t = 0o0400; -pub const S_IWUSR: ::mode_t = 0o0200; -pub const S_IXUSR: ::mode_t = 0o0100; -pub const S_IRWXU: ::mode_t = 0o0700; -pub const S_IREAD: ::mode_t = 0o0400; -pub const S_IWRITE: ::mode_t = 0o0200; -pub const S_IEXEC: ::mode_t = 0o0100; -pub const S_IRGRP: ::mode_t = 0o0040; -pub const S_IWGRP: ::mode_t = 0o0020; -pub const S_IXGRP: ::mode_t = 0o0010; -pub const S_IRWXG: ::mode_t = 0o0070; -pub const S_IROTH: ::mode_t = 0o0004; -pub const S_IWOTH: ::mode_t = 0o0002; -pub const S_IXOTH: ::mode_t = 0o0001; -pub const S_IRWXO: ::mode_t = 0o0007; -pub const ACCESSPERMS: ::mode_t = 511; -pub const ALLPERMS: ::mode_t = 4095; -pub const DEFFILEMODE: ::mode_t = 438; +pub const UF_SETTABLE: c_uint = 65535; +pub const UF_NODUMP: c_uint = 1; +pub const UF_IMMUTABLE: c_uint = 2; +pub const UF_APPEND: c_uint = 4; +pub const UF_OPAQUE: c_uint = 8; +pub const UF_NOUNLINK: c_uint = 16; +pub const SF_SETTABLE: c_uint = 4294901760; +pub const SF_ARCHIVED: c_uint = 65536; +pub const SF_IMMUTABLE: c_uint = 131072; +pub const SF_APPEND: c_uint = 262144; +pub const SF_NOUNLINK: c_uint = 1048576; +pub const SF_SNAPSHOT: c_uint = 2097152; +pub const UTIME_NOW: c_long = -1; +pub const UTIME_OMIT: c_long = -2; +pub const S_IFMT: crate::mode_t = 0o17_0000; +pub const S_IFDIR: crate::mode_t = 0o4_0000; +pub const S_IFCHR: crate::mode_t = 0o2_0000; +pub const S_IFBLK: crate::mode_t = 0o6_0000; +pub const S_IFREG: crate::mode_t = 0o10_0000; +pub const S_IFIFO: crate::mode_t = 0o1_0000; +pub const S_IFLNK: crate::mode_t = 0o12_0000; +pub const S_IFSOCK: crate::mode_t = 0o14_0000; +pub const S_ISUID: crate::mode_t = 0o4000; +pub const S_ISGID: crate::mode_t = 0o2000; +pub const S_ISVTX: crate::mode_t = 0o1000; +pub const S_IRUSR: crate::mode_t = 0o0400; +pub const S_IWUSR: crate::mode_t = 0o0200; +pub const S_IXUSR: crate::mode_t = 0o0100; +pub const S_IRWXU: crate::mode_t = 0o0700; +pub const S_IREAD: crate::mode_t = 0o0400; +pub const S_IWRITE: crate::mode_t = 0o0200; +pub const S_IEXEC: crate::mode_t = 0o0100; +pub const S_IRGRP: crate::mode_t = 0o0040; +pub const S_IWGRP: crate::mode_t = 0o0020; +pub const S_IXGRP: crate::mode_t = 0o0010; +pub const S_IRWXG: crate::mode_t = 0o0070; +pub const S_IROTH: crate::mode_t = 0o0004; +pub const S_IWOTH: crate::mode_t = 0o0002; +pub const S_IXOTH: crate::mode_t = 0o0001; +pub const S_IRWXO: crate::mode_t = 0o0007; +pub const ACCESSPERMS: crate::mode_t = 511; +pub const ALLPERMS: crate::mode_t = 4095; +pub const DEFFILEMODE: crate::mode_t = 438; pub const S_BLKSIZE: usize = 512; -pub const STATX_TYPE: ::c_uint = 1; -pub const STATX_MODE: ::c_uint = 2; -pub const STATX_NLINK: ::c_uint = 4; -pub const STATX_UID: ::c_uint = 8; -pub const STATX_GID: ::c_uint = 16; -pub const STATX_ATIME: ::c_uint = 32; -pub const STATX_MTIME: ::c_uint = 64; -pub const STATX_CTIME: ::c_uint = 128; -pub const STATX_INO: ::c_uint = 256; -pub const STATX_SIZE: ::c_uint = 512; -pub const STATX_BLOCKS: ::c_uint = 1024; -pub const STATX_BASIC_STATS: ::c_uint = 2047; -pub const STATX_ALL: ::c_uint = 4095; -pub const STATX_BTIME: ::c_uint = 2048; -pub const STATX_MNT_ID: ::c_uint = 4096; -pub const STATX_DIOALIGN: ::c_uint = 8192; -pub const STATX__RESERVED: ::c_uint = 2147483648; -pub const STATX_ATTR_COMPRESSED: ::c_uint = 4; -pub const STATX_ATTR_IMMUTABLE: ::c_uint = 16; -pub const STATX_ATTR_APPEND: ::c_uint = 32; -pub const STATX_ATTR_NODUMP: ::c_uint = 64; -pub const STATX_ATTR_ENCRYPTED: ::c_uint = 2048; -pub const STATX_ATTR_AUTOMOUNT: ::c_uint = 4096; -pub const STATX_ATTR_MOUNT_ROOT: ::c_uint = 8192; -pub const STATX_ATTR_VERITY: ::c_uint = 1048576; -pub const STATX_ATTR_DAX: ::c_uint = 2097152; +pub const STATX_TYPE: c_uint = 1; +pub const STATX_MODE: c_uint = 2; +pub const STATX_NLINK: c_uint = 4; +pub const STATX_UID: c_uint = 8; +pub const STATX_GID: c_uint = 16; +pub const STATX_ATIME: c_uint = 32; +pub const STATX_MTIME: c_uint = 64; +pub const STATX_CTIME: c_uint = 128; +pub const STATX_INO: c_uint = 256; +pub const STATX_SIZE: c_uint = 512; +pub const STATX_BLOCKS: c_uint = 1024; +pub const STATX_BASIC_STATS: c_uint = 2047; +pub const STATX_ALL: c_uint = 4095; +pub const STATX_BTIME: c_uint = 2048; +pub const STATX_MNT_ID: c_uint = 4096; +pub const STATX_DIOALIGN: c_uint = 8192; +pub const STATX__RESERVED: c_uint = 2147483648; +pub const STATX_ATTR_COMPRESSED: c_uint = 4; +pub const STATX_ATTR_IMMUTABLE: c_uint = 16; +pub const STATX_ATTR_APPEND: c_uint = 32; +pub const STATX_ATTR_NODUMP: c_uint = 64; +pub const STATX_ATTR_ENCRYPTED: c_uint = 2048; +pub const STATX_ATTR_AUTOMOUNT: c_uint = 4096; +pub const STATX_ATTR_MOUNT_ROOT: c_uint = 8192; +pub const STATX_ATTR_VERITY: c_uint = 1048576; +pub const STATX_ATTR_DAX: c_uint = 2097152; // sys/ioctl.h -pub const TIOCM_LE: ::c_int = 1; -pub const TIOCM_DTR: ::c_int = 2; -pub const TIOCM_RTS: ::c_int = 4; -pub const TIOCM_ST: ::c_int = 8; -pub const TIOCM_SR: ::c_int = 16; -pub const TIOCM_CTS: ::c_int = 32; -pub const TIOCM_CAR: ::c_int = 64; -pub const TIOCM_CD: ::c_int = 64; -pub const TIOCM_RNG: ::c_int = 128; -pub const TIOCM_RI: ::c_int = 128; -pub const TIOCM_DSR: ::c_int = 256; -pub const TIOCPKT_DATA: ::c_int = 0; -pub const TIOCPKT_FLUSHREAD: ::c_int = 1; -pub const TIOCPKT_FLUSHWRITE: ::c_int = 2; -pub const TIOCPKT_STOP: ::c_int = 4; -pub const TIOCPKT_START: ::c_int = 8; -pub const TIOCPKT_NOSTOP: ::c_int = 16; -pub const TIOCPKT_DOSTOP: ::c_int = 32; -pub const TIOCPKT_IOCTL: ::c_int = 64; -pub const TTYDISC: ::c_int = 0; -pub const TABLDISC: ::c_int = 3; -pub const SLIPDISC: ::c_int = 4; -pub const TANDEM: ::tcflag_t = 1; -pub const CBREAK: ::tcflag_t = 2; -pub const LCASE: ::tcflag_t = 4; -pub const CRMOD: ::tcflag_t = 16; -pub const RAW: ::tcflag_t = 32; -pub const ODDP: ::tcflag_t = 64; -pub const EVENP: ::tcflag_t = 128; -pub const ANYP: ::tcflag_t = 192; -pub const NLDELAY: ::tcflag_t = 768; -pub const NL2: ::tcflag_t = 512; -pub const NL3: ::tcflag_t = 768; -pub const TBDELAY: ::tcflag_t = 3072; -pub const XTABS: ::tcflag_t = 3072; -pub const CRDELAY: ::tcflag_t = 12288; -pub const VTDELAY: ::tcflag_t = 16384; -pub const BSDELAY: ::tcflag_t = 32768; -pub const ALLDELAY: ::tcflag_t = 65280; -pub const CRTBS: ::tcflag_t = 65536; -pub const PRTERA: ::tcflag_t = 131072; -pub const CRTERA: ::tcflag_t = 262144; -pub const TILDE: ::tcflag_t = 524288; -pub const LITOUT: ::tcflag_t = 2097152; -pub const NOHANG: ::tcflag_t = 16777216; -pub const L001000: ::tcflag_t = 33554432; -pub const CRTKIL: ::tcflag_t = 67108864; -pub const PASS8: ::tcflag_t = 134217728; -pub const CTLECH: ::tcflag_t = 268435456; -pub const DECCTQ: ::tcflag_t = 1073741824; - -pub const FIONBIO: ::c_ulong = 0xa008007e; -pub const FIONREAD: ::c_ulong = 0x6008007f; -pub const TIOCSWINSZ: ::c_ulong = 0x90200767; -pub const TIOCGWINSZ: ::c_ulong = 0x50200768; -pub const TIOCEXCL: ::c_ulong = 0x70d; -pub const TIOCNXCL: ::c_ulong = 0x70e; -pub const TIOCSCTTY: ::c_ulong = 0x761; - -pub const FIOCLEX: ::c_ulong = 1; +pub const TIOCM_LE: c_int = 1; +pub const TIOCM_DTR: c_int = 2; +pub const TIOCM_RTS: c_int = 4; +pub const TIOCM_ST: c_int = 8; +pub const TIOCM_SR: c_int = 16; +pub const TIOCM_CTS: c_int = 32; +pub const TIOCM_CAR: c_int = 64; +pub const TIOCM_CD: c_int = 64; +pub const TIOCM_RNG: c_int = 128; +pub const TIOCM_RI: c_int = 128; +pub const TIOCM_DSR: c_int = 256; +pub const TIOCPKT_DATA: c_int = 0; +pub const TIOCPKT_FLUSHREAD: c_int = 1; +pub const TIOCPKT_FLUSHWRITE: c_int = 2; +pub const TIOCPKT_STOP: c_int = 4; +pub const TIOCPKT_START: c_int = 8; +pub const TIOCPKT_NOSTOP: c_int = 16; +pub const TIOCPKT_DOSTOP: c_int = 32; +pub const TIOCPKT_IOCTL: c_int = 64; +pub const TTYDISC: c_int = 0; +pub const TABLDISC: c_int = 3; +pub const SLIPDISC: c_int = 4; +pub const TANDEM: crate::tcflag_t = 1; +pub const CBREAK: crate::tcflag_t = 2; +pub const LCASE: crate::tcflag_t = 4; +pub const CRMOD: crate::tcflag_t = 16; +pub const RAW: crate::tcflag_t = 32; +pub const ODDP: crate::tcflag_t = 64; +pub const EVENP: crate::tcflag_t = 128; +pub const ANYP: crate::tcflag_t = 192; +pub const NLDELAY: crate::tcflag_t = 768; +pub const NL2: crate::tcflag_t = 512; +pub const NL3: crate::tcflag_t = 768; +pub const TBDELAY: crate::tcflag_t = 3072; +pub const XTABS: crate::tcflag_t = 3072; +pub const CRDELAY: crate::tcflag_t = 12288; +pub const VTDELAY: crate::tcflag_t = 16384; +pub const BSDELAY: crate::tcflag_t = 32768; +pub const ALLDELAY: crate::tcflag_t = 65280; +pub const CRTBS: crate::tcflag_t = 65536; +pub const PRTERA: crate::tcflag_t = 131072; +pub const CRTERA: crate::tcflag_t = 262144; +pub const TILDE: crate::tcflag_t = 524288; +pub const LITOUT: crate::tcflag_t = 2097152; +pub const NOHANG: crate::tcflag_t = 16777216; +pub const L001000: crate::tcflag_t = 33554432; +pub const CRTKIL: crate::tcflag_t = 67108864; +pub const PASS8: crate::tcflag_t = 134217728; +pub const CTLECH: crate::tcflag_t = 268435456; +pub const DECCTQ: crate::tcflag_t = 1073741824; + +pub const FIONBIO: c_ulong = 0xa008007e; +pub const FIONREAD: c_ulong = 0x6008007f; +pub const TIOCSWINSZ: c_ulong = 0x90200767; +pub const TIOCGWINSZ: c_ulong = 0x50200768; +pub const TIOCEXCL: c_ulong = 0x70d; +pub const TIOCNXCL: c_ulong = 0x70e; +pub const TIOCSCTTY: c_ulong = 0x761; + +pub const FIOCLEX: c_ulong = 1; // fcntl.h -pub const O_EXEC: ::c_int = 4; -pub const O_NORW: ::c_int = 0; -pub const O_RDONLY: ::c_int = 1; -pub const O_WRONLY: ::c_int = 2; -pub const O_RDWR: ::c_int = 3; -pub const O_ACCMODE: ::c_int = 3; -pub const O_LARGEFILE: ::c_int = 0; -pub const O_CREAT: ::c_int = 16; -pub const O_EXCL: ::c_int = 32; -pub const O_NOLINK: ::c_int = 64; -pub const O_NOTRANS: ::c_int = 128; -pub const O_NOFOLLOW: ::c_int = 1048576; -pub const O_DIRECTORY: ::c_int = 2097152; -pub const O_APPEND: ::c_int = 256; -pub const O_ASYNC: ::c_int = 512; -pub const O_FSYNC: ::c_int = 1024; -pub const O_SYNC: ::c_int = 1024; -pub const O_NOATIME: ::c_int = 2048; -pub const O_SHLOCK: ::c_int = 131072; -pub const O_EXLOCK: ::c_int = 262144; -pub const O_DSYNC: ::c_int = 1024; -pub const O_RSYNC: ::c_int = 1024; -pub const O_NONBLOCK: ::c_int = 8; -pub const O_NDELAY: ::c_int = 8; -pub const O_HURD: ::c_int = 458751; -pub const O_TRUNC: ::c_int = 65536; -pub const O_CLOEXEC: ::c_int = 4194304; -pub const O_IGNORE_CTTY: ::c_int = 524288; -pub const O_TMPFILE: ::c_int = 8388608; -pub const O_NOCTTY: ::c_int = 0; -pub const FREAD: ::c_int = 1; -pub const FWRITE: ::c_int = 2; -pub const FASYNC: ::c_int = 512; -pub const FCREAT: ::c_int = 16; -pub const FEXCL: ::c_int = 32; -pub const FTRUNC: ::c_int = 65536; -pub const FNOCTTY: ::c_int = 0; -pub const FFSYNC: ::c_int = 1024; -pub const FSYNC: ::c_int = 1024; -pub const FAPPEND: ::c_int = 256; -pub const FNONBLOCK: ::c_int = 8; -pub const FNDELAY: ::c_int = 8; -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const F_GETLK64: ::c_int = 10; -pub const F_SETLK64: ::c_int = 11; -pub const F_SETLKW64: ::c_int = 12; -pub const F_DUPFD_CLOEXEC: ::c_int = 1030; -pub const FD_CLOEXEC: ::c_int = 1; -pub const F_RDLCK: ::c_int = 1; -pub const F_WRLCK: ::c_int = 2; -pub const F_UNLCK: ::c_int = 3; -pub const POSIX_FADV_NORMAL: ::c_int = 0; -pub const POSIX_FADV_RANDOM: ::c_int = 1; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_FADV_WILLNEED: ::c_int = 3; -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; -pub const AT_FDCWD: ::c_int = -100; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 256; -pub const AT_REMOVEDIR: ::c_int = 512; -pub const AT_SYMLINK_FOLLOW: ::c_int = 1024; -pub const AT_NO_AUTOMOUNT: ::c_int = 2048; -pub const AT_EMPTY_PATH: ::c_int = 4096; -pub const AT_STATX_SYNC_TYPE: ::c_int = 24576; -pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0; -pub const AT_STATX_FORCE_SYNC: ::c_int = 8192; -pub const AT_STATX_DONT_SYNC: ::c_int = 16384; -pub const AT_RECURSIVE: ::c_int = 32768; -pub const AT_EACCESS: ::c_int = 512; +pub const O_EXEC: c_int = 4; +pub const O_NORW: c_int = 0; +pub const O_RDONLY: c_int = 1; +pub const O_WRONLY: c_int = 2; +pub const O_RDWR: c_int = 3; +pub const O_ACCMODE: c_int = 3; +pub const O_LARGEFILE: c_int = 0; +pub const O_CREAT: c_int = 16; +pub const O_EXCL: c_int = 32; +pub const O_NOLINK: c_int = 64; +pub const O_NOTRANS: c_int = 128; +pub const O_NOFOLLOW: c_int = 1048576; +pub const O_DIRECTORY: c_int = 2097152; +pub const O_APPEND: c_int = 256; +pub const O_ASYNC: c_int = 512; +pub const O_FSYNC: c_int = 1024; +pub const O_SYNC: c_int = 1024; +pub const O_NOATIME: c_int = 2048; +pub const O_SHLOCK: c_int = 131072; +pub const O_EXLOCK: c_int = 262144; +pub const O_DSYNC: c_int = 1024; +pub const O_RSYNC: c_int = 1024; +pub const O_NONBLOCK: c_int = 8; +pub const O_NDELAY: c_int = 8; +pub const O_HURD: c_int = 458751; +pub const O_TRUNC: c_int = 65536; +pub const O_CLOEXEC: c_int = 4194304; +pub const O_IGNORE_CTTY: c_int = 524288; +pub const O_TMPFILE: c_int = 8388608; +pub const O_NOCTTY: c_int = 0; +pub const FREAD: c_int = 1; +pub const FWRITE: c_int = 2; +pub const FASYNC: c_int = 512; +pub const FCREAT: c_int = 16; +pub const FEXCL: c_int = 32; +pub const FTRUNC: c_int = 65536; +pub const FNOCTTY: c_int = 0; +pub const FFSYNC: c_int = 1024; +pub const FSYNC: c_int = 1024; +pub const FAPPEND: c_int = 256; +pub const FNONBLOCK: c_int = 8; +pub const FNDELAY: c_int = 8; +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; +pub const F_GETOWN: c_int = 5; +pub const F_SETOWN: c_int = 6; +pub const F_GETLK: c_int = 7; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const F_GETLK64: c_int = 10; +pub const F_SETLK64: c_int = 11; +pub const F_SETLKW64: c_int = 12; +pub const F_DUPFD_CLOEXEC: c_int = 1030; +pub const FD_CLOEXEC: c_int = 1; +pub const F_RDLCK: c_int = 1; +pub const F_WRLCK: c_int = 2; +pub const F_UNLCK: c_int = 3; +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_RANDOM: c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: c_int = 2; +pub const POSIX_FADV_WILLNEED: c_int = 3; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; +pub const AT_FDCWD: c_int = -100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 256; +pub const AT_REMOVEDIR: c_int = 512; +pub const AT_SYMLINK_FOLLOW: c_int = 1024; +pub const AT_NO_AUTOMOUNT: c_int = 2048; +pub const AT_EMPTY_PATH: c_int = 4096; +pub const AT_STATX_SYNC_TYPE: c_int = 24576; +pub const AT_STATX_SYNC_AS_STAT: c_int = 0; +pub const AT_STATX_FORCE_SYNC: c_int = 8192; +pub const AT_STATX_DONT_SYNC: c_int = 16384; +pub const AT_RECURSIVE: c_int = 32768; +pub const AT_EACCESS: c_int = 512; // sys/uio.h -pub const RWF_HIPRI: ::c_int = 1; -pub const RWF_DSYNC: ::c_int = 2; -pub const RWF_SYNC: ::c_int = 4; -pub const RWF_NOWAIT: ::c_int = 8; -pub const RWF_APPEND: ::c_int = 16; +pub const RWF_HIPRI: c_int = 1; +pub const RWF_DSYNC: c_int = 2; +pub const RWF_SYNC: c_int = 4; +pub const RWF_NOWAIT: c_int = 8; +pub const RWF_APPEND: c_int = 16; // errno.h -pub const EPERM: ::c_int = 1073741825; -pub const ENOENT: ::c_int = 1073741826; -pub const ESRCH: ::c_int = 1073741827; -pub const EINTR: ::c_int = 1073741828; -pub const EIO: ::c_int = 1073741829; -pub const ENXIO: ::c_int = 1073741830; -pub const E2BIG: ::c_int = 1073741831; -pub const ENOEXEC: ::c_int = 1073741832; -pub const EBADF: ::c_int = 1073741833; -pub const ECHILD: ::c_int = 1073741834; -pub const EDEADLK: ::c_int = 1073741835; -pub const ENOMEM: ::c_int = 1073741836; -pub const EACCES: ::c_int = 1073741837; -pub const EFAULT: ::c_int = 1073741838; -pub const ENOTBLK: ::c_int = 1073741839; -pub const EBUSY: ::c_int = 1073741840; -pub const EEXIST: ::c_int = 1073741841; -pub const EXDEV: ::c_int = 1073741842; -pub const ENODEV: ::c_int = 1073741843; -pub const ENOTDIR: ::c_int = 1073741844; -pub const EISDIR: ::c_int = 1073741845; -pub const EINVAL: ::c_int = 1073741846; -pub const EMFILE: ::c_int = 1073741848; -pub const ENFILE: ::c_int = 1073741847; -pub const ENOTTY: ::c_int = 1073741849; -pub const ETXTBSY: ::c_int = 1073741850; -pub const EFBIG: ::c_int = 1073741851; -pub const ENOSPC: ::c_int = 1073741852; -pub const ESPIPE: ::c_int = 1073741853; -pub const EROFS: ::c_int = 1073741854; -pub const EMLINK: ::c_int = 1073741855; -pub const EPIPE: ::c_int = 1073741856; -pub const EDOM: ::c_int = 1073741857; -pub const ERANGE: ::c_int = 1073741858; -pub const EAGAIN: ::c_int = 1073741859; -pub const EWOULDBLOCK: ::c_int = 1073741859; -pub const EINPROGRESS: ::c_int = 1073741860; -pub const EALREADY: ::c_int = 1073741861; -pub const ENOTSOCK: ::c_int = 1073741862; -pub const EMSGSIZE: ::c_int = 1073741864; -pub const EPROTOTYPE: ::c_int = 1073741865; -pub const ENOPROTOOPT: ::c_int = 1073741866; -pub const EPROTONOSUPPORT: ::c_int = 1073741867; -pub const ESOCKTNOSUPPORT: ::c_int = 1073741868; -pub const EOPNOTSUPP: ::c_int = 1073741869; -pub const EPFNOSUPPORT: ::c_int = 1073741870; -pub const EAFNOSUPPORT: ::c_int = 1073741871; -pub const EADDRINUSE: ::c_int = 1073741872; -pub const EADDRNOTAVAIL: ::c_int = 1073741873; -pub const ENETDOWN: ::c_int = 1073741874; -pub const ENETUNREACH: ::c_int = 1073741875; -pub const ENETRESET: ::c_int = 1073741876; -pub const ECONNABORTED: ::c_int = 1073741877; -pub const ECONNRESET: ::c_int = 1073741878; -pub const ENOBUFS: ::c_int = 1073741879; -pub const EISCONN: ::c_int = 1073741880; -pub const ENOTCONN: ::c_int = 1073741881; -pub const EDESTADDRREQ: ::c_int = 1073741863; -pub const ESHUTDOWN: ::c_int = 1073741882; -pub const ETOOMANYREFS: ::c_int = 1073741883; -pub const ETIMEDOUT: ::c_int = 1073741884; -pub const ECONNREFUSED: ::c_int = 1073741885; -pub const ELOOP: ::c_int = 1073741886; -pub const ENAMETOOLONG: ::c_int = 1073741887; -pub const EHOSTDOWN: ::c_int = 1073741888; -pub const EHOSTUNREACH: ::c_int = 1073741889; -pub const ENOTEMPTY: ::c_int = 1073741890; -pub const EPROCLIM: ::c_int = 1073741891; -pub const EUSERS: ::c_int = 1073741892; -pub const EDQUOT: ::c_int = 1073741893; -pub const ESTALE: ::c_int = 1073741894; -pub const EREMOTE: ::c_int = 1073741895; -pub const EBADRPC: ::c_int = 1073741896; -pub const ERPCMISMATCH: ::c_int = 1073741897; -pub const EPROGUNAVAIL: ::c_int = 1073741898; -pub const EPROGMISMATCH: ::c_int = 1073741899; -pub const EPROCUNAVAIL: ::c_int = 1073741900; -pub const ENOLCK: ::c_int = 1073741901; -pub const EFTYPE: ::c_int = 1073741903; -pub const EAUTH: ::c_int = 1073741904; -pub const ENEEDAUTH: ::c_int = 1073741905; -pub const ENOSYS: ::c_int = 1073741902; -pub const ELIBEXEC: ::c_int = 1073741907; -pub const ENOTSUP: ::c_int = 1073741942; -pub const EILSEQ: ::c_int = 1073741930; -pub const EBACKGROUND: ::c_int = 1073741924; -pub const EDIED: ::c_int = 1073741925; -pub const EGREGIOUS: ::c_int = 1073741927; -pub const EIEIO: ::c_int = 1073741928; -pub const EGRATUITOUS: ::c_int = 1073741929; -pub const EBADMSG: ::c_int = 1073741931; -pub const EIDRM: ::c_int = 1073741932; -pub const EMULTIHOP: ::c_int = 1073741933; -pub const ENODATA: ::c_int = 1073741934; -pub const ENOLINK: ::c_int = 1073741935; -pub const ENOMSG: ::c_int = 1073741936; -pub const ENOSR: ::c_int = 1073741937; -pub const ENOSTR: ::c_int = 1073741938; -pub const EOVERFLOW: ::c_int = 1073741939; -pub const EPROTO: ::c_int = 1073741940; -pub const ETIME: ::c_int = 1073741941; -pub const ECANCELED: ::c_int = 1073741943; -pub const EOWNERDEAD: ::c_int = 1073741944; -pub const ENOTRECOVERABLE: ::c_int = 1073741945; -pub const EMACH_SEND_IN_PROGRESS: ::c_int = 268435457; -pub const EMACH_SEND_INVALID_DATA: ::c_int = 268435458; -pub const EMACH_SEND_INVALID_DEST: ::c_int = 268435459; -pub const EMACH_SEND_TIMED_OUT: ::c_int = 268435460; -pub const EMACH_SEND_WILL_NOTIFY: ::c_int = 268435461; -pub const EMACH_SEND_NOTIFY_IN_PROGRESS: ::c_int = 268435462; -pub const EMACH_SEND_INTERRUPTED: ::c_int = 268435463; -pub const EMACH_SEND_MSG_TOO_SMALL: ::c_int = 268435464; -pub const EMACH_SEND_INVALID_REPLY: ::c_int = 268435465; -pub const EMACH_SEND_INVALID_RIGHT: ::c_int = 268435466; -pub const EMACH_SEND_INVALID_NOTIFY: ::c_int = 268435467; -pub const EMACH_SEND_INVALID_MEMORY: ::c_int = 268435468; -pub const EMACH_SEND_NO_BUFFER: ::c_int = 268435469; -pub const EMACH_SEND_NO_NOTIFY: ::c_int = 268435470; -pub const EMACH_SEND_INVALID_TYPE: ::c_int = 268435471; -pub const EMACH_SEND_INVALID_HEADER: ::c_int = 268435472; -pub const EMACH_RCV_IN_PROGRESS: ::c_int = 268451841; -pub const EMACH_RCV_INVALID_NAME: ::c_int = 268451842; -pub const EMACH_RCV_TIMED_OUT: ::c_int = 268451843; -pub const EMACH_RCV_TOO_LARGE: ::c_int = 268451844; -pub const EMACH_RCV_INTERRUPTED: ::c_int = 268451845; -pub const EMACH_RCV_PORT_CHANGED: ::c_int = 268451846; -pub const EMACH_RCV_INVALID_NOTIFY: ::c_int = 268451847; -pub const EMACH_RCV_INVALID_DATA: ::c_int = 268451848; -pub const EMACH_RCV_PORT_DIED: ::c_int = 268451849; -pub const EMACH_RCV_IN_SET: ::c_int = 268451850; -pub const EMACH_RCV_HEADER_ERROR: ::c_int = 268451851; -pub const EMACH_RCV_BODY_ERROR: ::c_int = 268451852; -pub const EKERN_INVALID_ADDRESS: ::c_int = 1; -pub const EKERN_PROTECTION_FAILURE: ::c_int = 2; -pub const EKERN_NO_SPACE: ::c_int = 3; -pub const EKERN_INVALID_ARGUMENT: ::c_int = 4; -pub const EKERN_FAILURE: ::c_int = 5; -pub const EKERN_RESOURCE_SHORTAGE: ::c_int = 6; -pub const EKERN_NOT_RECEIVER: ::c_int = 7; -pub const EKERN_NO_ACCESS: ::c_int = 8; -pub const EKERN_MEMORY_FAILURE: ::c_int = 9; -pub const EKERN_MEMORY_ERROR: ::c_int = 10; -pub const EKERN_NOT_IN_SET: ::c_int = 12; -pub const EKERN_NAME_EXISTS: ::c_int = 13; -pub const EKERN_ABORTED: ::c_int = 14; -pub const EKERN_INVALID_NAME: ::c_int = 15; -pub const EKERN_INVALID_TASK: ::c_int = 16; -pub const EKERN_INVALID_RIGHT: ::c_int = 17; -pub const EKERN_INVALID_VALUE: ::c_int = 18; -pub const EKERN_UREFS_OVERFLOW: ::c_int = 19; -pub const EKERN_INVALID_CAPABILITY: ::c_int = 20; -pub const EKERN_RIGHT_EXISTS: ::c_int = 21; -pub const EKERN_INVALID_HOST: ::c_int = 22; -pub const EKERN_MEMORY_PRESENT: ::c_int = 23; -pub const EKERN_WRITE_PROTECTION_FAILURE: ::c_int = 24; -pub const EKERN_TERMINATED: ::c_int = 26; -pub const EKERN_TIMEDOUT: ::c_int = 27; -pub const EKERN_INTERRUPTED: ::c_int = 28; -pub const EMIG_TYPE_ERROR: ::c_int = -300; -pub const EMIG_REPLY_MISMATCH: ::c_int = -301; -pub const EMIG_REMOTE_ERROR: ::c_int = -302; -pub const EMIG_BAD_ID: ::c_int = -303; -pub const EMIG_BAD_ARGUMENTS: ::c_int = -304; -pub const EMIG_NO_REPLY: ::c_int = -305; -pub const EMIG_EXCEPTION: ::c_int = -306; -pub const EMIG_ARRAY_TOO_LARGE: ::c_int = -307; -pub const EMIG_SERVER_DIED: ::c_int = -308; -pub const EMIG_DESTROY_REQUEST: ::c_int = -309; -pub const ED_IO_ERROR: ::c_int = 2500; -pub const ED_WOULD_BLOCK: ::c_int = 2501; -pub const ED_NO_SUCH_DEVICE: ::c_int = 2502; -pub const ED_ALREADY_OPEN: ::c_int = 2503; -pub const ED_DEVICE_DOWN: ::c_int = 2504; -pub const ED_INVALID_OPERATION: ::c_int = 2505; -pub const ED_INVALID_RECNUM: ::c_int = 2506; -pub const ED_INVALID_SIZE: ::c_int = 2507; -pub const ED_NO_MEMORY: ::c_int = 2508; -pub const ED_READ_ONLY: ::c_int = 2509; +pub const EPERM: c_int = 1073741825; +pub const ENOENT: c_int = 1073741826; +pub const ESRCH: c_int = 1073741827; +pub const EINTR: c_int = 1073741828; +pub const EIO: c_int = 1073741829; +pub const ENXIO: c_int = 1073741830; +pub const E2BIG: c_int = 1073741831; +pub const ENOEXEC: c_int = 1073741832; +pub const EBADF: c_int = 1073741833; +pub const ECHILD: c_int = 1073741834; +pub const EDEADLK: c_int = 1073741835; +pub const ENOMEM: c_int = 1073741836; +pub const EACCES: c_int = 1073741837; +pub const EFAULT: c_int = 1073741838; +pub const ENOTBLK: c_int = 1073741839; +pub const EBUSY: c_int = 1073741840; +pub const EEXIST: c_int = 1073741841; +pub const EXDEV: c_int = 1073741842; +pub const ENODEV: c_int = 1073741843; +pub const ENOTDIR: c_int = 1073741844; +pub const EISDIR: c_int = 1073741845; +pub const EINVAL: c_int = 1073741846; +pub const EMFILE: c_int = 1073741848; +pub const ENFILE: c_int = 1073741847; +pub const ENOTTY: c_int = 1073741849; +pub const ETXTBSY: c_int = 1073741850; +pub const EFBIG: c_int = 1073741851; +pub const ENOSPC: c_int = 1073741852; +pub const ESPIPE: c_int = 1073741853; +pub const EROFS: c_int = 1073741854; +pub const EMLINK: c_int = 1073741855; +pub const EPIPE: c_int = 1073741856; +pub const EDOM: c_int = 1073741857; +pub const ERANGE: c_int = 1073741858; +pub const EAGAIN: c_int = 1073741859; +pub const EWOULDBLOCK: c_int = 1073741859; +pub const EINPROGRESS: c_int = 1073741860; +pub const EALREADY: c_int = 1073741861; +pub const ENOTSOCK: c_int = 1073741862; +pub const EMSGSIZE: c_int = 1073741864; +pub const EPROTOTYPE: c_int = 1073741865; +pub const ENOPROTOOPT: c_int = 1073741866; +pub const EPROTONOSUPPORT: c_int = 1073741867; +pub const ESOCKTNOSUPPORT: c_int = 1073741868; +pub const EOPNOTSUPP: c_int = 1073741869; +pub const EPFNOSUPPORT: c_int = 1073741870; +pub const EAFNOSUPPORT: c_int = 1073741871; +pub const EADDRINUSE: c_int = 1073741872; +pub const EADDRNOTAVAIL: c_int = 1073741873; +pub const ENETDOWN: c_int = 1073741874; +pub const ENETUNREACH: c_int = 1073741875; +pub const ENETRESET: c_int = 1073741876; +pub const ECONNABORTED: c_int = 1073741877; +pub const ECONNRESET: c_int = 1073741878; +pub const ENOBUFS: c_int = 1073741879; +pub const EISCONN: c_int = 1073741880; +pub const ENOTCONN: c_int = 1073741881; +pub const EDESTADDRREQ: c_int = 1073741863; +pub const ESHUTDOWN: c_int = 1073741882; +pub const ETOOMANYREFS: c_int = 1073741883; +pub const ETIMEDOUT: c_int = 1073741884; +pub const ECONNREFUSED: c_int = 1073741885; +pub const ELOOP: c_int = 1073741886; +pub const ENAMETOOLONG: c_int = 1073741887; +pub const EHOSTDOWN: c_int = 1073741888; +pub const EHOSTUNREACH: c_int = 1073741889; +pub const ENOTEMPTY: c_int = 1073741890; +pub const EPROCLIM: c_int = 1073741891; +pub const EUSERS: c_int = 1073741892; +pub const EDQUOT: c_int = 1073741893; +pub const ESTALE: c_int = 1073741894; +pub const EREMOTE: c_int = 1073741895; +pub const EBADRPC: c_int = 1073741896; +pub const ERPCMISMATCH: c_int = 1073741897; +pub const EPROGUNAVAIL: c_int = 1073741898; +pub const EPROGMISMATCH: c_int = 1073741899; +pub const EPROCUNAVAIL: c_int = 1073741900; +pub const ENOLCK: c_int = 1073741901; +pub const EFTYPE: c_int = 1073741903; +pub const EAUTH: c_int = 1073741904; +pub const ENEEDAUTH: c_int = 1073741905; +pub const ENOSYS: c_int = 1073741902; +pub const ELIBEXEC: c_int = 1073741907; +pub const ENOTSUP: c_int = 1073741942; +pub const EILSEQ: c_int = 1073741930; +pub const EBACKGROUND: c_int = 1073741924; +pub const EDIED: c_int = 1073741925; +pub const EGREGIOUS: c_int = 1073741927; +pub const EIEIO: c_int = 1073741928; +pub const EGRATUITOUS: c_int = 1073741929; +pub const EBADMSG: c_int = 1073741931; +pub const EIDRM: c_int = 1073741932; +pub const EMULTIHOP: c_int = 1073741933; +pub const ENODATA: c_int = 1073741934; +pub const ENOLINK: c_int = 1073741935; +pub const ENOMSG: c_int = 1073741936; +pub const ENOSR: c_int = 1073741937; +pub const ENOSTR: c_int = 1073741938; +pub const EOVERFLOW: c_int = 1073741939; +pub const EPROTO: c_int = 1073741940; +pub const ETIME: c_int = 1073741941; +pub const ECANCELED: c_int = 1073741943; +pub const EOWNERDEAD: c_int = 1073741944; +pub const ENOTRECOVERABLE: c_int = 1073741945; +pub const EMACH_SEND_IN_PROGRESS: c_int = 268435457; +pub const EMACH_SEND_INVALID_DATA: c_int = 268435458; +pub const EMACH_SEND_INVALID_DEST: c_int = 268435459; +pub const EMACH_SEND_TIMED_OUT: c_int = 268435460; +pub const EMACH_SEND_WILL_NOTIFY: c_int = 268435461; +pub const EMACH_SEND_NOTIFY_IN_PROGRESS: c_int = 268435462; +pub const EMACH_SEND_INTERRUPTED: c_int = 268435463; +pub const EMACH_SEND_MSG_TOO_SMALL: c_int = 268435464; +pub const EMACH_SEND_INVALID_REPLY: c_int = 268435465; +pub const EMACH_SEND_INVALID_RIGHT: c_int = 268435466; +pub const EMACH_SEND_INVALID_NOTIFY: c_int = 268435467; +pub const EMACH_SEND_INVALID_MEMORY: c_int = 268435468; +pub const EMACH_SEND_NO_BUFFER: c_int = 268435469; +pub const EMACH_SEND_NO_NOTIFY: c_int = 268435470; +pub const EMACH_SEND_INVALID_TYPE: c_int = 268435471; +pub const EMACH_SEND_INVALID_HEADER: c_int = 268435472; +pub const EMACH_RCV_IN_PROGRESS: c_int = 268451841; +pub const EMACH_RCV_INVALID_NAME: c_int = 268451842; +pub const EMACH_RCV_TIMED_OUT: c_int = 268451843; +pub const EMACH_RCV_TOO_LARGE: c_int = 268451844; +pub const EMACH_RCV_INTERRUPTED: c_int = 268451845; +pub const EMACH_RCV_PORT_CHANGED: c_int = 268451846; +pub const EMACH_RCV_INVALID_NOTIFY: c_int = 268451847; +pub const EMACH_RCV_INVALID_DATA: c_int = 268451848; +pub const EMACH_RCV_PORT_DIED: c_int = 268451849; +pub const EMACH_RCV_IN_SET: c_int = 268451850; +pub const EMACH_RCV_HEADER_ERROR: c_int = 268451851; +pub const EMACH_RCV_BODY_ERROR: c_int = 268451852; +pub const EKERN_INVALID_ADDRESS: c_int = 1; +pub const EKERN_PROTECTION_FAILURE: c_int = 2; +pub const EKERN_NO_SPACE: c_int = 3; +pub const EKERN_INVALID_ARGUMENT: c_int = 4; +pub const EKERN_FAILURE: c_int = 5; +pub const EKERN_RESOURCE_SHORTAGE: c_int = 6; +pub const EKERN_NOT_RECEIVER: c_int = 7; +pub const EKERN_NO_ACCESS: c_int = 8; +pub const EKERN_MEMORY_FAILURE: c_int = 9; +pub const EKERN_MEMORY_ERROR: c_int = 10; +pub const EKERN_NOT_IN_SET: c_int = 12; +pub const EKERN_NAME_EXISTS: c_int = 13; +pub const EKERN_ABORTED: c_int = 14; +pub const EKERN_INVALID_NAME: c_int = 15; +pub const EKERN_INVALID_TASK: c_int = 16; +pub const EKERN_INVALID_RIGHT: c_int = 17; +pub const EKERN_INVALID_VALUE: c_int = 18; +pub const EKERN_UREFS_OVERFLOW: c_int = 19; +pub const EKERN_INVALID_CAPABILITY: c_int = 20; +pub const EKERN_RIGHT_EXISTS: c_int = 21; +pub const EKERN_INVALID_HOST: c_int = 22; +pub const EKERN_MEMORY_PRESENT: c_int = 23; +pub const EKERN_WRITE_PROTECTION_FAILURE: c_int = 24; +pub const EKERN_TERMINATED: c_int = 26; +pub const EKERN_TIMEDOUT: c_int = 27; +pub const EKERN_INTERRUPTED: c_int = 28; +pub const EMIG_TYPE_ERROR: c_int = -300; +pub const EMIG_REPLY_MISMATCH: c_int = -301; +pub const EMIG_REMOTE_ERROR: c_int = -302; +pub const EMIG_BAD_ID: c_int = -303; +pub const EMIG_BAD_ARGUMENTS: c_int = -304; +pub const EMIG_NO_REPLY: c_int = -305; +pub const EMIG_EXCEPTION: c_int = -306; +pub const EMIG_ARRAY_TOO_LARGE: c_int = -307; +pub const EMIG_SERVER_DIED: c_int = -308; +pub const EMIG_DESTROY_REQUEST: c_int = -309; +pub const ED_IO_ERROR: c_int = 2500; +pub const ED_WOULD_BLOCK: c_int = 2501; +pub const ED_NO_SUCH_DEVICE: c_int = 2502; +pub const ED_ALREADY_OPEN: c_int = 2503; +pub const ED_DEVICE_DOWN: c_int = 2504; +pub const ED_INVALID_OPERATION: c_int = 2505; +pub const ED_INVALID_RECNUM: c_int = 2506; +pub const ED_INVALID_SIZE: c_int = 2507; +pub const ED_NO_MEMORY: c_int = 2508; +pub const ED_READ_ONLY: c_int = 2509; pub const _HURD_ERRNOS: usize = 122; // sched.h -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; pub const _BITS_TYPES_STRUCT_SCHED_PARAM: usize = 1; pub const __CPU_SETSIZE: usize = 1024; pub const CPU_SETSIZE: usize = 1024; // pthread.h -pub const PTHREAD_SPINLOCK_INITIALIZER: ::c_int = 0; -pub const PTHREAD_CANCEL_DISABLE: ::c_int = 0; -pub const PTHREAD_CANCEL_ENABLE: ::c_int = 1; -pub const PTHREAD_CANCEL_DEFERRED: ::c_int = 0; -pub const PTHREAD_CANCEL_ASYNCHRONOUS: ::c_int = 1; -pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; +pub const PTHREAD_SPINLOCK_INITIALIZER: c_int = 0; +pub const PTHREAD_CANCEL_DISABLE: c_int = 0; +pub const PTHREAD_CANCEL_ENABLE: c_int = 1; +pub const PTHREAD_CANCEL_DEFERRED: c_int = 0; +pub const PTHREAD_CANCEL_ASYNCHRONOUS: c_int = 1; +pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1; // netinet/tcp.h -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_MAXSEG: ::c_int = 2; -pub const TCP_CORK: ::c_int = 3; -pub const TCP_KEEPIDLE: ::c_int = 4; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; -pub const TCP_SYNCNT: ::c_int = 7; -pub const TCP_LINGER2: ::c_int = 8; -pub const TCP_DEFER_ACCEPT: ::c_int = 9; -pub const TCP_WINDOW_CLAMP: ::c_int = 10; -pub const TCP_INFO: ::c_int = 11; -pub const TCP_QUICKACK: ::c_int = 12; -pub const TCP_CONGESTION: ::c_int = 13; -pub const TCP_MD5SIG: ::c_int = 14; -pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; -pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; -pub const TCP_THIN_DUPACK: ::c_int = 17; -pub const TCP_USER_TIMEOUT: ::c_int = 18; -pub const TCP_REPAIR: ::c_int = 19; -pub const TCP_REPAIR_QUEUE: ::c_int = 20; -pub const TCP_QUEUE_SEQ: ::c_int = 21; -pub const TCP_REPAIR_OPTIONS: ::c_int = 22; -pub const TCP_FASTOPEN: ::c_int = 23; -pub const TCP_TIMESTAMP: ::c_int = 24; -pub const TCP_NOTSENT_LOWAT: ::c_int = 25; -pub const TCP_CC_INFO: ::c_int = 26; -pub const TCP_SAVE_SYN: ::c_int = 27; -pub const TCP_SAVED_SYN: ::c_int = 28; -pub const TCP_REPAIR_WINDOW: ::c_int = 29; -pub const TCP_FASTOPEN_CONNECT: ::c_int = 30; -pub const TCP_ULP: ::c_int = 31; -pub const TCP_MD5SIG_EXT: ::c_int = 32; -pub const TCP_FASTOPEN_KEY: ::c_int = 33; -pub const TCP_FASTOPEN_NO_COOKIE: ::c_int = 34; -pub const TCP_ZEROCOPY_RECEIVE: ::c_int = 35; -pub const TCP_INQ: ::c_int = 36; -pub const TCP_CM_INQ: ::c_int = 36; -pub const TCP_TX_DELAY: ::c_int = 37; -pub const TCP_REPAIR_ON: ::c_int = 1; -pub const TCP_REPAIR_OFF: ::c_int = 0; -pub const TCP_REPAIR_OFF_NO_WP: ::c_int = -1; +pub const TCP_NODELAY: c_int = 1; +pub const TCP_MAXSEG: c_int = 2; +pub const TCP_CORK: c_int = 3; +pub const TCP_KEEPIDLE: c_int = 4; +pub const TCP_KEEPINTVL: c_int = 5; +pub const TCP_KEEPCNT: c_int = 6; +pub const TCP_SYNCNT: c_int = 7; +pub const TCP_LINGER2: c_int = 8; +pub const TCP_DEFER_ACCEPT: c_int = 9; +pub const TCP_WINDOW_CLAMP: c_int = 10; +pub const TCP_INFO: c_int = 11; +pub const TCP_QUICKACK: c_int = 12; +pub const TCP_CONGESTION: c_int = 13; +pub const TCP_MD5SIG: c_int = 14; +pub const TCP_COOKIE_TRANSACTIONS: c_int = 15; +pub const TCP_THIN_LINEAR_TIMEOUTS: c_int = 16; +pub const TCP_THIN_DUPACK: c_int = 17; +pub const TCP_USER_TIMEOUT: c_int = 18; +pub const TCP_REPAIR: c_int = 19; +pub const TCP_REPAIR_QUEUE: c_int = 20; +pub const TCP_QUEUE_SEQ: c_int = 21; +pub const TCP_REPAIR_OPTIONS: c_int = 22; +pub const TCP_FASTOPEN: c_int = 23; +pub const TCP_TIMESTAMP: c_int = 24; +pub const TCP_NOTSENT_LOWAT: c_int = 25; +pub const TCP_CC_INFO: c_int = 26; +pub const TCP_SAVE_SYN: c_int = 27; +pub const TCP_SAVED_SYN: c_int = 28; +pub const TCP_REPAIR_WINDOW: c_int = 29; +pub const TCP_FASTOPEN_CONNECT: c_int = 30; +pub const TCP_ULP: c_int = 31; +pub const TCP_MD5SIG_EXT: c_int = 32; +pub const TCP_FASTOPEN_KEY: c_int = 33; +pub const TCP_FASTOPEN_NO_COOKIE: c_int = 34; +pub const TCP_ZEROCOPY_RECEIVE: c_int = 35; +pub const TCP_INQ: c_int = 36; +pub const TCP_CM_INQ: c_int = 36; +pub const TCP_TX_DELAY: c_int = 37; +pub const TCP_REPAIR_ON: c_int = 1; +pub const TCP_REPAIR_OFF: c_int = 0; +pub const TCP_REPAIR_OFF_NO_WP: c_int = -1; // stdint.h pub const INT8_MIN: i8 = -128; @@ -2700,403 +2705,403 @@ pub const TCP_MD5SIG_FLAG_PREFIX: usize = 1; pub const TCP_COOKIE_MIN: usize = 8; pub const TCP_COOKIE_MAX: usize = 16; pub const TCP_COOKIE_PAIR_SIZE: usize = 32; -pub const TCP_COOKIE_IN_ALWAYS: ::c_int = 1; -pub const TCP_COOKIE_OUT_NEVER: ::c_int = 2; -pub const TCP_S_DATA_IN: ::c_int = 4; -pub const TCP_S_DATA_OUT: ::c_int = 8; +pub const TCP_COOKIE_IN_ALWAYS: c_int = 1; +pub const TCP_COOKIE_OUT_NEVER: c_int = 2; +pub const TCP_S_DATA_IN: c_int = 4; +pub const TCP_S_DATA_OUT: c_int = 8; pub const TCP_MSS_DEFAULT: usize = 536; pub const TCP_MSS_DESIRED: usize = 1220; // sys/wait.h -pub const WCOREFLAG: ::c_int = 128; +pub const WCOREFLAG: c_int = 128; pub const WAIT_ANY: pid_t = -1; pub const WAIT_MYPGRP: pid_t = 0; // sys/file.h -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_UN: ::c_int = 8; -pub const LOCK_NB: ::c_int = 4; +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_UN: c_int = 8; +pub const LOCK_NB: c_int = 4; // sys/mman.h -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 4; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 1; -pub const MAP_FILE: ::c_int = 1; -pub const MAP_ANON: ::c_int = 2; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; -pub const MAP_TYPE: ::c_int = 15; -pub const MAP_COPY: ::c_int = 32; -pub const MAP_SHARED: ::c_int = 16; -pub const MAP_PRIVATE: ::c_int = 0; -pub const MAP_FIXED: ::c_int = 256; -pub const MAP_NOEXTEND: ::c_int = 512; -pub const MAP_HASSEMAPHORE: ::c_int = 1024; -pub const MAP_INHERIT: ::c_int = 2048; -pub const MAP_32BIT: ::c_int = 4096; -pub const MAP_EXCL: ::c_int = 16384; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_WONTNEED: ::c_int = 4; - -pub const MS_ASYNC: ::c_int = 1; -pub const MS_SYNC: ::c_int = 0; -pub const MS_INVALIDATE: ::c_int = 2; -pub const MREMAP_MAYMOVE: ::c_int = 1; -pub const MREMAP_FIXED: ::c_int = 2; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 4; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 1; +pub const MAP_FILE: c_int = 1; +pub const MAP_ANON: c_int = 2; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; +pub const MAP_TYPE: c_int = 15; +pub const MAP_COPY: c_int = 32; +pub const MAP_SHARED: c_int = 16; +pub const MAP_PRIVATE: c_int = 0; +pub const MAP_FIXED: c_int = 256; +pub const MAP_NOEXTEND: c_int = 512; +pub const MAP_HASSEMAPHORE: c_int = 1024; +pub const MAP_INHERIT: c_int = 2048; +pub const MAP_32BIT: c_int = 4096; +pub const MAP_EXCL: c_int = 16384; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_MADV_WONTNEED: c_int = 4; + +pub const MS_ASYNC: c_int = 1; +pub const MS_SYNC: c_int = 0; +pub const MS_INVALIDATE: c_int = 2; +pub const MREMAP_MAYMOVE: c_int = 1; +pub const MREMAP_FIXED: c_int = 2; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; // sys/xattr.h -pub const XATTR_CREATE: ::c_int = 0x1; -pub const XATTR_REPLACE: ::c_int = 0x2; +pub const XATTR_CREATE: c_int = 0x1; +pub const XATTR_REPLACE: c_int = 0x2; // spawn.h -pub const POSIX_SPAWN_USEVFORK: ::c_short = 64; -pub const POSIX_SPAWN_SETSID: ::c_short = 128; +pub const POSIX_SPAWN_USEVFORK: c_short = 64; +pub const POSIX_SPAWN_SETSID: c_short = 128; // sys/syslog.h -pub const LOG_CRON: ::c_int = 9 << 3; -pub const LOG_AUTHPRIV: ::c_int = 10 << 3; -pub const LOG_FTP: ::c_int = 11 << 3; -pub const LOG_PERROR: ::c_int = 0x20; +pub const LOG_CRON: c_int = 9 << 3; +pub const LOG_AUTHPRIV: c_int = 10 << 3; +pub const LOG_FTP: c_int = 11 << 3; +pub const LOG_PERROR: c_int = 0x20; // net/if.h -pub const IFF_UP: ::c_int = 0x1; -pub const IFF_BROADCAST: ::c_int = 0x2; -pub const IFF_DEBUG: ::c_int = 0x4; -pub const IFF_LOOPBACK: ::c_int = 0x8; -pub const IFF_POINTOPOINT: ::c_int = 0x10; -pub const IFF_NOTRAILERS: ::c_int = 0x20; -pub const IFF_RUNNING: ::c_int = 0x40; -pub const IFF_NOARP: ::c_int = 0x80; -pub const IFF_PROMISC: ::c_int = 0x100; -pub const IFF_ALLMULTI: ::c_int = 0x200; -pub const IFF_MASTER: ::c_int = 0x400; -pub const IFF_SLAVE: ::c_int = 0x800; -pub const IFF_MULTICAST: ::c_int = 0x1000; -pub const IFF_PORTSEL: ::c_int = 0x2000; -pub const IFF_AUTOMEDIA: ::c_int = 0x4000; -pub const IFF_DYNAMIC: ::c_int = 0x8000; +pub const IFF_UP: c_int = 0x1; +pub const IFF_BROADCAST: c_int = 0x2; +pub const IFF_DEBUG: c_int = 0x4; +pub const IFF_LOOPBACK: c_int = 0x8; +pub const IFF_POINTOPOINT: c_int = 0x10; +pub const IFF_NOTRAILERS: c_int = 0x20; +pub const IFF_RUNNING: c_int = 0x40; +pub const IFF_NOARP: c_int = 0x80; +pub const IFF_PROMISC: c_int = 0x100; +pub const IFF_ALLMULTI: c_int = 0x200; +pub const IFF_MASTER: c_int = 0x400; +pub const IFF_SLAVE: c_int = 0x800; +pub const IFF_MULTICAST: c_int = 0x1000; +pub const IFF_PORTSEL: c_int = 0x2000; +pub const IFF_AUTOMEDIA: c_int = 0x4000; +pub const IFF_DYNAMIC: c_int = 0x8000; // random.h -pub const GRND_NONBLOCK: ::c_uint = 1; -pub const GRND_RANDOM: ::c_uint = 2; -pub const GRND_INSECURE: ::c_uint = 4; - -pub const _PC_LINK_MAX: ::c_int = 0; -pub const _PC_MAX_CANON: ::c_int = 1; -pub const _PC_MAX_INPUT: ::c_int = 2; -pub const _PC_NAME_MAX: ::c_int = 3; -pub const _PC_PATH_MAX: ::c_int = 4; -pub const _PC_PIPE_BUF: ::c_int = 5; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 6; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_SYNC_IO: ::c_int = 9; -pub const _PC_ASYNC_IO: ::c_int = 10; -pub const _PC_PRIO_IO: ::c_int = 11; -pub const _PC_SOCK_MAXBUF: ::c_int = 12; -pub const _PC_FILESIZEBITS: ::c_int = 13; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18; -pub const _PC_SYMLINK_MAX: ::c_int = 19; -pub const _PC_2_SYMLINKS: ::c_int = 20; -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; -pub const _SC_JOB_CONTROL: ::c_int = 7; -pub const _SC_SAVED_IDS: ::c_int = 8; -pub const _SC_REALTIME_SIGNALS: ::c_int = 9; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; -pub const _SC_TIMERS: ::c_int = 11; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; -pub const _SC_PRIORITIZED_IO: ::c_int = 13; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; -pub const _SC_FSYNC: ::c_int = 15; -pub const _SC_MAPPED_FILES: ::c_int = 16; -pub const _SC_MEMLOCK: ::c_int = 17; -pub const _SC_MEMLOCK_RANGE: ::c_int = 18; -pub const _SC_MEMORY_PROTECTION: ::c_int = 19; -pub const _SC_MESSAGE_PASSING: ::c_int = 20; -pub const _SC_SEMAPHORES: ::c_int = 21; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; -pub const _SC_AIO_MAX: ::c_int = 24; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; -pub const _SC_DELAYTIMER_MAX: ::c_int = 26; -pub const _SC_MQ_OPEN_MAX: ::c_int = 27; -pub const _SC_MQ_PRIO_MAX: ::c_int = 28; -pub const _SC_VERSION: ::c_int = 29; -pub const _SC_PAGESIZE: ::c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = 30; -pub const _SC_RTSIG_MAX: ::c_int = 31; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; -pub const _SC_SEM_VALUE_MAX: ::c_int = 33; -pub const _SC_SIGQUEUE_MAX: ::c_int = 34; -pub const _SC_TIMER_MAX: ::c_int = 35; -pub const _SC_BC_BASE_MAX: ::c_int = 36; -pub const _SC_BC_DIM_MAX: ::c_int = 37; -pub const _SC_BC_SCALE_MAX: ::c_int = 38; -pub const _SC_BC_STRING_MAX: ::c_int = 39; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; -pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41; -pub const _SC_EXPR_NEST_MAX: ::c_int = 42; -pub const _SC_LINE_MAX: ::c_int = 43; -pub const _SC_RE_DUP_MAX: ::c_int = 44; -pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45; -pub const _SC_2_VERSION: ::c_int = 46; -pub const _SC_2_C_BIND: ::c_int = 47; -pub const _SC_2_C_DEV: ::c_int = 48; -pub const _SC_2_FORT_DEV: ::c_int = 49; -pub const _SC_2_FORT_RUN: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_LOCALEDEF: ::c_int = 52; -pub const _SC_PII: ::c_int = 53; -pub const _SC_PII_XTI: ::c_int = 54; -pub const _SC_PII_SOCKET: ::c_int = 55; -pub const _SC_PII_INTERNET: ::c_int = 56; -pub const _SC_PII_OSI: ::c_int = 57; -pub const _SC_POLL: ::c_int = 58; -pub const _SC_SELECT: ::c_int = 59; -pub const _SC_UIO_MAXIOV: ::c_int = 60; -pub const _SC_IOV_MAX: ::c_int = 60; -pub const _SC_PII_INTERNET_STREAM: ::c_int = 61; -pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62; -pub const _SC_PII_OSI_COTS: ::c_int = 63; -pub const _SC_PII_OSI_CLTS: ::c_int = 64; -pub const _SC_PII_OSI_M: ::c_int = 65; -pub const _SC_T_IOV_MAX: ::c_int = 66; -pub const _SC_THREADS: ::c_int = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; -pub const _SC_TTY_NAME_MAX: ::c_int = 72; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; -pub const _SC_THREAD_STACK_MIN: ::c_int = 75; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82; -pub const _SC_NPROCESSORS_CONF: ::c_int = 83; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; -pub const _SC_PHYS_PAGES: ::c_int = 85; -pub const _SC_AVPHYS_PAGES: ::c_int = 86; -pub const _SC_ATEXIT_MAX: ::c_int = 87; -pub const _SC_PASS_MAX: ::c_int = 88; -pub const _SC_XOPEN_VERSION: ::c_int = 89; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; -pub const _SC_XOPEN_UNIX: ::c_int = 91; -pub const _SC_XOPEN_CRYPT: ::c_int = 92; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; -pub const _SC_XOPEN_SHM: ::c_int = 94; -pub const _SC_2_CHAR_TERM: ::c_int = 95; -pub const _SC_2_C_VERSION: ::c_int = 96; -pub const _SC_2_UPE: ::c_int = 97; -pub const _SC_XOPEN_XPG2: ::c_int = 98; -pub const _SC_XOPEN_XPG3: ::c_int = 99; -pub const _SC_XOPEN_XPG4: ::c_int = 100; -pub const _SC_CHAR_BIT: ::c_int = 101; -pub const _SC_CHAR_MAX: ::c_int = 102; -pub const _SC_CHAR_MIN: ::c_int = 103; -pub const _SC_INT_MAX: ::c_int = 104; -pub const _SC_INT_MIN: ::c_int = 105; -pub const _SC_LONG_BIT: ::c_int = 106; -pub const _SC_WORD_BIT: ::c_int = 107; -pub const _SC_MB_LEN_MAX: ::c_int = 108; -pub const _SC_NZERO: ::c_int = 109; -pub const _SC_SSIZE_MAX: ::c_int = 110; -pub const _SC_SCHAR_MAX: ::c_int = 111; -pub const _SC_SCHAR_MIN: ::c_int = 112; -pub const _SC_SHRT_MAX: ::c_int = 113; -pub const _SC_SHRT_MIN: ::c_int = 114; -pub const _SC_UCHAR_MAX: ::c_int = 115; -pub const _SC_UINT_MAX: ::c_int = 116; -pub const _SC_ULONG_MAX: ::c_int = 117; -pub const _SC_USHRT_MAX: ::c_int = 118; -pub const _SC_NL_ARGMAX: ::c_int = 119; -pub const _SC_NL_LANGMAX: ::c_int = 120; -pub const _SC_NL_MSGMAX: ::c_int = 121; -pub const _SC_NL_NMAX: ::c_int = 122; -pub const _SC_NL_SETMAX: ::c_int = 123; -pub const _SC_NL_TEXTMAX: ::c_int = 124; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 127; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; -pub const _SC_XOPEN_LEGACY: ::c_int = 129; -pub const _SC_XOPEN_REALTIME: ::c_int = 130; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; -pub const _SC_ADVISORY_INFO: ::c_int = 132; -pub const _SC_BARRIERS: ::c_int = 133; -pub const _SC_BASE: ::c_int = 134; -pub const _SC_C_LANG_SUPPORT: ::c_int = 135; -pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136; -pub const _SC_CLOCK_SELECTION: ::c_int = 137; -pub const _SC_CPUTIME: ::c_int = 138; -pub const _SC_THREAD_CPUTIME: ::c_int = 139; -pub const _SC_DEVICE_IO: ::c_int = 140; -pub const _SC_DEVICE_SPECIFIC: ::c_int = 141; -pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142; -pub const _SC_FD_MGMT: ::c_int = 143; -pub const _SC_FIFO: ::c_int = 144; -pub const _SC_PIPE: ::c_int = 145; -pub const _SC_FILE_ATTRIBUTES: ::c_int = 146; -pub const _SC_FILE_LOCKING: ::c_int = 147; -pub const _SC_FILE_SYSTEM: ::c_int = 148; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 149; -pub const _SC_MULTI_PROCESS: ::c_int = 150; -pub const _SC_SINGLE_PROCESS: ::c_int = 151; -pub const _SC_NETWORKING: ::c_int = 152; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 153; -pub const _SC_SPIN_LOCKS: ::c_int = 154; -pub const _SC_REGEXP: ::c_int = 155; -pub const _SC_REGEX_VERSION: ::c_int = 156; -pub const _SC_SHELL: ::c_int = 157; -pub const _SC_SIGNALS: ::c_int = 158; -pub const _SC_SPAWN: ::c_int = 159; -pub const _SC_SPORADIC_SERVER: ::c_int = 160; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161; -pub const _SC_SYSTEM_DATABASE: ::c_int = 162; -pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163; -pub const _SC_TIMEOUTS: ::c_int = 164; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165; -pub const _SC_USER_GROUPS: ::c_int = 166; -pub const _SC_USER_GROUPS_R: ::c_int = 167; -pub const _SC_2_PBS: ::c_int = 168; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169; -pub const _SC_2_PBS_LOCATE: ::c_int = 170; -pub const _SC_2_PBS_MESSAGE: ::c_int = 171; -pub const _SC_2_PBS_TRACK: ::c_int = 172; -pub const _SC_SYMLOOP_MAX: ::c_int = 173; -pub const _SC_STREAMS: ::c_int = 174; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175; -pub const _SC_V6_ILP32_OFF32: ::c_int = 176; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177; -pub const _SC_V6_LP64_OFF64: ::c_int = 178; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179; -pub const _SC_HOST_NAME_MAX: ::c_int = 180; -pub const _SC_TRACE: ::c_int = 181; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182; -pub const _SC_TRACE_INHERIT: ::c_int = 183; -pub const _SC_TRACE_LOG: ::c_int = 184; -pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185; -pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186; -pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187; -pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188; -pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189; -pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190; -pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191; -pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192; -pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193; -pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194; -pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195; -pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196; -pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197; -pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198; -pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199; -pub const _SC_IPV6: ::c_int = 235; -pub const _SC_RAW_SOCKETS: ::c_int = 236; -pub const _SC_V7_ILP32_OFF32: ::c_int = 237; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238; -pub const _SC_V7_LP64_OFF64: ::c_int = 239; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240; -pub const _SC_SS_REPL_MAX: ::c_int = 241; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242; -pub const _SC_TRACE_NAME_MAX: ::c_int = 243; -pub const _SC_TRACE_SYS_MAX: ::c_int = 244; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245; -pub const _SC_XOPEN_STREAMS: ::c_int = 246; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248; -pub const _SC_MINSIGSTKSZ: ::c_int = 249; -pub const _SC_SIGSTKSZ: ::c_int = 250; - -pub const _CS_PATH: ::c_int = 0; -pub const _CS_V6_WIDTH_RESTRICTED_ENVS: ::c_int = 1; -pub const _CS_GNU_LIBC_VERSION: ::c_int = 2; -pub const _CS_GNU_LIBPTHREAD_VERSION: ::c_int = 3; -pub const _CS_V5_WIDTH_RESTRICTED_ENVS: ::c_int = 4; -pub const _CS_V7_WIDTH_RESTRICTED_ENVS: ::c_int = 5; -pub const _CS_LFS_CFLAGS: ::c_int = 1000; -pub const _CS_LFS_LDFLAGS: ::c_int = 1001; -pub const _CS_LFS_LIBS: ::c_int = 1002; -pub const _CS_LFS_LINTFLAGS: ::c_int = 1003; -pub const _CS_LFS64_CFLAGS: ::c_int = 1004; -pub const _CS_LFS64_LDFLAGS: ::c_int = 1005; -pub const _CS_LFS64_LIBS: ::c_int = 1006; -pub const _CS_LFS64_LINTFLAGS: ::c_int = 1007; -pub const _CS_XBS5_ILP32_OFF32_CFLAGS: ::c_int = 1100; -pub const _CS_XBS5_ILP32_OFF32_LDFLAGS: ::c_int = 1101; -pub const _CS_XBS5_ILP32_OFF32_LIBS: ::c_int = 1102; -pub const _CS_XBS5_ILP32_OFF32_LINTFLAGS: ::c_int = 1103; -pub const _CS_XBS5_ILP32_OFFBIG_CFLAGS: ::c_int = 1104; -pub const _CS_XBS5_ILP32_OFFBIG_LDFLAGS: ::c_int = 1105; -pub const _CS_XBS5_ILP32_OFFBIG_LIBS: ::c_int = 1106; -pub const _CS_XBS5_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1107; -pub const _CS_XBS5_LP64_OFF64_CFLAGS: ::c_int = 1108; -pub const _CS_XBS5_LP64_OFF64_LDFLAGS: ::c_int = 1109; -pub const _CS_XBS5_LP64_OFF64_LIBS: ::c_int = 1110; -pub const _CS_XBS5_LP64_OFF64_LINTFLAGS: ::c_int = 1111; -pub const _CS_XBS5_LPBIG_OFFBIG_CFLAGS: ::c_int = 1112; -pub const _CS_XBS5_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1113; -pub const _CS_XBS5_LPBIG_OFFBIG_LIBS: ::c_int = 1114; -pub const _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1115; -pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: ::c_int = 1116; -pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: ::c_int = 1117; -pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: ::c_int = 1118; -pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: ::c_int = 1119; -pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: ::c_int = 1120; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: ::c_int = 1121; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: ::c_int = 1122; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1123; -pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: ::c_int = 1124; -pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: ::c_int = 1125; -pub const _CS_POSIX_V6_LP64_OFF64_LIBS: ::c_int = 1126; -pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: ::c_int = 1127; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: ::c_int = 1128; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1129; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: ::c_int = 1130; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1131; -pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: ::c_int = 1132; -pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: ::c_int = 1133; -pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: ::c_int = 1134; -pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: ::c_int = 1135; -pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: ::c_int = 1136; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: ::c_int = 1137; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: ::c_int = 1138; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1139; -pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: ::c_int = 1140; -pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: ::c_int = 1141; -pub const _CS_POSIX_V7_LP64_OFF64_LIBS: ::c_int = 1142; -pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: ::c_int = 1143; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: ::c_int = 1144; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1145; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: ::c_int = 1146; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1147; -pub const _CS_V6_ENV: ::c_int = 1148; -pub const _CS_V7_ENV: ::c_int = 1149; +pub const GRND_NONBLOCK: c_uint = 1; +pub const GRND_RANDOM: c_uint = 2; +pub const GRND_INSECURE: c_uint = 4; + +pub const _PC_LINK_MAX: c_int = 0; +pub const _PC_MAX_CANON: c_int = 1; +pub const _PC_MAX_INPUT: c_int = 2; +pub const _PC_NAME_MAX: c_int = 3; +pub const _PC_PATH_MAX: c_int = 4; +pub const _PC_PIPE_BUF: c_int = 5; +pub const _PC_CHOWN_RESTRICTED: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SOCK_MAXBUF: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_ALLOC_SIZE_MIN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_2_SYMLINKS: c_int = 20; +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; +pub const _SC_JOB_CONTROL: c_int = 7; +pub const _SC_SAVED_IDS: c_int = 8; +pub const _SC_REALTIME_SIGNALS: c_int = 9; +pub const _SC_PRIORITY_SCHEDULING: c_int = 10; +pub const _SC_TIMERS: c_int = 11; +pub const _SC_ASYNCHRONOUS_IO: c_int = 12; +pub const _SC_PRIORITIZED_IO: c_int = 13; +pub const _SC_SYNCHRONIZED_IO: c_int = 14; +pub const _SC_FSYNC: c_int = 15; +pub const _SC_MAPPED_FILES: c_int = 16; +pub const _SC_MEMLOCK: c_int = 17; +pub const _SC_MEMLOCK_RANGE: c_int = 18; +pub const _SC_MEMORY_PROTECTION: c_int = 19; +pub const _SC_MESSAGE_PASSING: c_int = 20; +pub const _SC_SEMAPHORES: c_int = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22; +pub const _SC_AIO_LISTIO_MAX: c_int = 23; +pub const _SC_AIO_MAX: c_int = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 25; +pub const _SC_DELAYTIMER_MAX: c_int = 26; +pub const _SC_MQ_OPEN_MAX: c_int = 27; +pub const _SC_MQ_PRIO_MAX: c_int = 28; +pub const _SC_VERSION: c_int = 29; +pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_PAGE_SIZE: c_int = 30; +pub const _SC_RTSIG_MAX: c_int = 31; +pub const _SC_SEM_NSEMS_MAX: c_int = 32; +pub const _SC_SEM_VALUE_MAX: c_int = 33; +pub const _SC_SIGQUEUE_MAX: c_int = 34; +pub const _SC_TIMER_MAX: c_int = 35; +pub const _SC_BC_BASE_MAX: c_int = 36; +pub const _SC_BC_DIM_MAX: c_int = 37; +pub const _SC_BC_SCALE_MAX: c_int = 38; +pub const _SC_BC_STRING_MAX: c_int = 39; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 40; +pub const _SC_EQUIV_CLASS_MAX: c_int = 41; +pub const _SC_EXPR_NEST_MAX: c_int = 42; +pub const _SC_LINE_MAX: c_int = 43; +pub const _SC_RE_DUP_MAX: c_int = 44; +pub const _SC_CHARCLASS_NAME_MAX: c_int = 45; +pub const _SC_2_VERSION: c_int = 46; +pub const _SC_2_C_BIND: c_int = 47; +pub const _SC_2_C_DEV: c_int = 48; +pub const _SC_2_FORT_DEV: c_int = 49; +pub const _SC_2_FORT_RUN: c_int = 50; +pub const _SC_2_SW_DEV: c_int = 51; +pub const _SC_2_LOCALEDEF: c_int = 52; +pub const _SC_PII: c_int = 53; +pub const _SC_PII_XTI: c_int = 54; +pub const _SC_PII_SOCKET: c_int = 55; +pub const _SC_PII_INTERNET: c_int = 56; +pub const _SC_PII_OSI: c_int = 57; +pub const _SC_POLL: c_int = 58; +pub const _SC_SELECT: c_int = 59; +pub const _SC_UIO_MAXIOV: c_int = 60; +pub const _SC_IOV_MAX: c_int = 60; +pub const _SC_PII_INTERNET_STREAM: c_int = 61; +pub const _SC_PII_INTERNET_DGRAM: c_int = 62; +pub const _SC_PII_OSI_COTS: c_int = 63; +pub const _SC_PII_OSI_CLTS: c_int = 64; +pub const _SC_PII_OSI_M: c_int = 65; +pub const _SC_T_IOV_MAX: c_int = 66; +pub const _SC_THREADS: c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 68; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 69; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 70; +pub const _SC_LOGIN_NAME_MAX: c_int = 71; +pub const _SC_TTY_NAME_MAX: c_int = 72; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 73; +pub const _SC_THREAD_KEYS_MAX: c_int = 74; +pub const _SC_THREAD_STACK_MIN: c_int = 75; +pub const _SC_THREAD_THREADS_MAX: c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 80; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 81; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 82; +pub const _SC_NPROCESSORS_CONF: c_int = 83; +pub const _SC_NPROCESSORS_ONLN: c_int = 84; +pub const _SC_PHYS_PAGES: c_int = 85; +pub const _SC_AVPHYS_PAGES: c_int = 86; +pub const _SC_ATEXIT_MAX: c_int = 87; +pub const _SC_PASS_MAX: c_int = 88; +pub const _SC_XOPEN_VERSION: c_int = 89; +pub const _SC_XOPEN_XCU_VERSION: c_int = 90; +pub const _SC_XOPEN_UNIX: c_int = 91; +pub const _SC_XOPEN_CRYPT: c_int = 92; +pub const _SC_XOPEN_ENH_I18N: c_int = 93; +pub const _SC_XOPEN_SHM: c_int = 94; +pub const _SC_2_CHAR_TERM: c_int = 95; +pub const _SC_2_C_VERSION: c_int = 96; +pub const _SC_2_UPE: c_int = 97; +pub const _SC_XOPEN_XPG2: c_int = 98; +pub const _SC_XOPEN_XPG3: c_int = 99; +pub const _SC_XOPEN_XPG4: c_int = 100; +pub const _SC_CHAR_BIT: c_int = 101; +pub const _SC_CHAR_MAX: c_int = 102; +pub const _SC_CHAR_MIN: c_int = 103; +pub const _SC_INT_MAX: c_int = 104; +pub const _SC_INT_MIN: c_int = 105; +pub const _SC_LONG_BIT: c_int = 106; +pub const _SC_WORD_BIT: c_int = 107; +pub const _SC_MB_LEN_MAX: c_int = 108; +pub const _SC_NZERO: c_int = 109; +pub const _SC_SSIZE_MAX: c_int = 110; +pub const _SC_SCHAR_MAX: c_int = 111; +pub const _SC_SCHAR_MIN: c_int = 112; +pub const _SC_SHRT_MAX: c_int = 113; +pub const _SC_SHRT_MIN: c_int = 114; +pub const _SC_UCHAR_MAX: c_int = 115; +pub const _SC_UINT_MAX: c_int = 116; +pub const _SC_ULONG_MAX: c_int = 117; +pub const _SC_USHRT_MAX: c_int = 118; +pub const _SC_NL_ARGMAX: c_int = 119; +pub const _SC_NL_LANGMAX: c_int = 120; +pub const _SC_NL_MSGMAX: c_int = 121; +pub const _SC_NL_NMAX: c_int = 122; +pub const _SC_NL_SETMAX: c_int = 123; +pub const _SC_NL_TEXTMAX: c_int = 124; +pub const _SC_XBS5_ILP32_OFF32: c_int = 125; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 126; +pub const _SC_XBS5_LP64_OFF64: c_int = 127; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 128; +pub const _SC_XOPEN_LEGACY: c_int = 129; +pub const _SC_XOPEN_REALTIME: c_int = 130; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 131; +pub const _SC_ADVISORY_INFO: c_int = 132; +pub const _SC_BARRIERS: c_int = 133; +pub const _SC_BASE: c_int = 134; +pub const _SC_C_LANG_SUPPORT: c_int = 135; +pub const _SC_C_LANG_SUPPORT_R: c_int = 136; +pub const _SC_CLOCK_SELECTION: c_int = 137; +pub const _SC_CPUTIME: c_int = 138; +pub const _SC_THREAD_CPUTIME: c_int = 139; +pub const _SC_DEVICE_IO: c_int = 140; +pub const _SC_DEVICE_SPECIFIC: c_int = 141; +pub const _SC_DEVICE_SPECIFIC_R: c_int = 142; +pub const _SC_FD_MGMT: c_int = 143; +pub const _SC_FIFO: c_int = 144; +pub const _SC_PIPE: c_int = 145; +pub const _SC_FILE_ATTRIBUTES: c_int = 146; +pub const _SC_FILE_LOCKING: c_int = 147; +pub const _SC_FILE_SYSTEM: c_int = 148; +pub const _SC_MONOTONIC_CLOCK: c_int = 149; +pub const _SC_MULTI_PROCESS: c_int = 150; +pub const _SC_SINGLE_PROCESS: c_int = 151; +pub const _SC_NETWORKING: c_int = 152; +pub const _SC_READER_WRITER_LOCKS: c_int = 153; +pub const _SC_SPIN_LOCKS: c_int = 154; +pub const _SC_REGEXP: c_int = 155; +pub const _SC_REGEX_VERSION: c_int = 156; +pub const _SC_SHELL: c_int = 157; +pub const _SC_SIGNALS: c_int = 158; +pub const _SC_SPAWN: c_int = 159; +pub const _SC_SPORADIC_SERVER: c_int = 160; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 161; +pub const _SC_SYSTEM_DATABASE: c_int = 162; +pub const _SC_SYSTEM_DATABASE_R: c_int = 163; +pub const _SC_TIMEOUTS: c_int = 164; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 165; +pub const _SC_USER_GROUPS: c_int = 166; +pub const _SC_USER_GROUPS_R: c_int = 167; +pub const _SC_2_PBS: c_int = 168; +pub const _SC_2_PBS_ACCOUNTING: c_int = 169; +pub const _SC_2_PBS_LOCATE: c_int = 170; +pub const _SC_2_PBS_MESSAGE: c_int = 171; +pub const _SC_2_PBS_TRACK: c_int = 172; +pub const _SC_SYMLOOP_MAX: c_int = 173; +pub const _SC_STREAMS: c_int = 174; +pub const _SC_2_PBS_CHECKPOINT: c_int = 175; +pub const _SC_V6_ILP32_OFF32: c_int = 176; +pub const _SC_V6_ILP32_OFFBIG: c_int = 177; +pub const _SC_V6_LP64_OFF64: c_int = 178; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 179; +pub const _SC_HOST_NAME_MAX: c_int = 180; +pub const _SC_TRACE: c_int = 181; +pub const _SC_TRACE_EVENT_FILTER: c_int = 182; +pub const _SC_TRACE_INHERIT: c_int = 183; +pub const _SC_TRACE_LOG: c_int = 184; +pub const _SC_LEVEL1_ICACHE_SIZE: c_int = 185; +pub const _SC_LEVEL1_ICACHE_ASSOC: c_int = 186; +pub const _SC_LEVEL1_ICACHE_LINESIZE: c_int = 187; +pub const _SC_LEVEL1_DCACHE_SIZE: c_int = 188; +pub const _SC_LEVEL1_DCACHE_ASSOC: c_int = 189; +pub const _SC_LEVEL1_DCACHE_LINESIZE: c_int = 190; +pub const _SC_LEVEL2_CACHE_SIZE: c_int = 191; +pub const _SC_LEVEL2_CACHE_ASSOC: c_int = 192; +pub const _SC_LEVEL2_CACHE_LINESIZE: c_int = 193; +pub const _SC_LEVEL3_CACHE_SIZE: c_int = 194; +pub const _SC_LEVEL3_CACHE_ASSOC: c_int = 195; +pub const _SC_LEVEL3_CACHE_LINESIZE: c_int = 196; +pub const _SC_LEVEL4_CACHE_SIZE: c_int = 197; +pub const _SC_LEVEL4_CACHE_ASSOC: c_int = 198; +pub const _SC_LEVEL4_CACHE_LINESIZE: c_int = 199; +pub const _SC_IPV6: c_int = 235; +pub const _SC_RAW_SOCKETS: c_int = 236; +pub const _SC_V7_ILP32_OFF32: c_int = 237; +pub const _SC_V7_ILP32_OFFBIG: c_int = 238; +pub const _SC_V7_LP64_OFF64: c_int = 239; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 240; +pub const _SC_SS_REPL_MAX: c_int = 241; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 242; +pub const _SC_TRACE_NAME_MAX: c_int = 243; +pub const _SC_TRACE_SYS_MAX: c_int = 244; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 245; +pub const _SC_XOPEN_STREAMS: c_int = 246; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248; +pub const _SC_MINSIGSTKSZ: c_int = 249; +pub const _SC_SIGSTKSZ: c_int = 250; + +pub const _CS_PATH: c_int = 0; +pub const _CS_V6_WIDTH_RESTRICTED_ENVS: c_int = 1; +pub const _CS_GNU_LIBC_VERSION: c_int = 2; +pub const _CS_GNU_LIBPTHREAD_VERSION: c_int = 3; +pub const _CS_V5_WIDTH_RESTRICTED_ENVS: c_int = 4; +pub const _CS_V7_WIDTH_RESTRICTED_ENVS: c_int = 5; +pub const _CS_LFS_CFLAGS: c_int = 1000; +pub const _CS_LFS_LDFLAGS: c_int = 1001; +pub const _CS_LFS_LIBS: c_int = 1002; +pub const _CS_LFS_LINTFLAGS: c_int = 1003; +pub const _CS_LFS64_CFLAGS: c_int = 1004; +pub const _CS_LFS64_LDFLAGS: c_int = 1005; +pub const _CS_LFS64_LIBS: c_int = 1006; +pub const _CS_LFS64_LINTFLAGS: c_int = 1007; +pub const _CS_XBS5_ILP32_OFF32_CFLAGS: c_int = 1100; +pub const _CS_XBS5_ILP32_OFF32_LDFLAGS: c_int = 1101; +pub const _CS_XBS5_ILP32_OFF32_LIBS: c_int = 1102; +pub const _CS_XBS5_ILP32_OFF32_LINTFLAGS: c_int = 1103; +pub const _CS_XBS5_ILP32_OFFBIG_CFLAGS: c_int = 1104; +pub const _CS_XBS5_ILP32_OFFBIG_LDFLAGS: c_int = 1105; +pub const _CS_XBS5_ILP32_OFFBIG_LIBS: c_int = 1106; +pub const _CS_XBS5_ILP32_OFFBIG_LINTFLAGS: c_int = 1107; +pub const _CS_XBS5_LP64_OFF64_CFLAGS: c_int = 1108; +pub const _CS_XBS5_LP64_OFF64_LDFLAGS: c_int = 1109; +pub const _CS_XBS5_LP64_OFF64_LIBS: c_int = 1110; +pub const _CS_XBS5_LP64_OFF64_LINTFLAGS: c_int = 1111; +pub const _CS_XBS5_LPBIG_OFFBIG_CFLAGS: c_int = 1112; +pub const _CS_XBS5_LPBIG_OFFBIG_LDFLAGS: c_int = 1113; +pub const _CS_XBS5_LPBIG_OFFBIG_LIBS: c_int = 1114; +pub const _CS_XBS5_LPBIG_OFFBIG_LINTFLAGS: c_int = 1115; +pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: c_int = 1116; +pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: c_int = 1117; +pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: c_int = 1118; +pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: c_int = 1119; +pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: c_int = 1120; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: c_int = 1121; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: c_int = 1122; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: c_int = 1123; +pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: c_int = 1124; +pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: c_int = 1125; +pub const _CS_POSIX_V6_LP64_OFF64_LIBS: c_int = 1126; +pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: c_int = 1127; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: c_int = 1128; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: c_int = 1129; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: c_int = 1130; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: c_int = 1131; +pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: c_int = 1132; +pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: c_int = 1133; +pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: c_int = 1134; +pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: c_int = 1135; +pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: c_int = 1136; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: c_int = 1137; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: c_int = 1138; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: c_int = 1139; +pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: c_int = 1140; +pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: c_int = 1141; +pub const _CS_POSIX_V7_LP64_OFF64_LIBS: c_int = 1142; +pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: c_int = 1143; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: c_int = 1144; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: c_int = 1145; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: c_int = 1146; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: c_int = 1147; +pub const _CS_V6_ENV: c_int = 1148; +pub const _CS_V7_ENV: c_int = 1149; pub const PTHREAD_PROCESS_PRIVATE: __pthread_process_shared = 0; pub const PTHREAD_PROCESS_SHARED: __pthread_process_shared = 1; @@ -3121,21 +3126,21 @@ pub const PTHREAD_MUTEX_RECURSIVE: __pthread_mutex_type = 2; pub const PTHREAD_MUTEX_STALLED: __pthread_mutex_robustness = 0; pub const PTHREAD_MUTEX_ROBUST: __pthread_mutex_robustness = 256; -pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; -pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; -pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; -pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; -pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; -pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; -pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 6; -pub const RLIMIT_NPROC: ::__rlimit_resource_t = 7; -pub const RLIMIT_OFILE: ::__rlimit_resource_t = 8; -pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 8; -pub const RLIMIT_SBSIZE: ::__rlimit_resource_t = 9; -pub const RLIMIT_AS: ::__rlimit_resource_t = 10; -pub const RLIMIT_VMEM: ::__rlimit_resource_t = 10; -pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = 11; -pub const RLIM_NLIMITS: ::__rlimit_resource_t = 11; +pub const RLIMIT_CPU: crate::__rlimit_resource_t = 0; +pub const RLIMIT_FSIZE: crate::__rlimit_resource_t = 1; +pub const RLIMIT_DATA: crate::__rlimit_resource_t = 2; +pub const RLIMIT_STACK: crate::__rlimit_resource_t = 3; +pub const RLIMIT_CORE: crate::__rlimit_resource_t = 4; +pub const RLIMIT_RSS: crate::__rlimit_resource_t = 5; +pub const RLIMIT_MEMLOCK: crate::__rlimit_resource_t = 6; +pub const RLIMIT_NPROC: crate::__rlimit_resource_t = 7; +pub const RLIMIT_OFILE: crate::__rlimit_resource_t = 8; +pub const RLIMIT_NOFILE: crate::__rlimit_resource_t = 8; +pub const RLIMIT_SBSIZE: crate::__rlimit_resource_t = 9; +pub const RLIMIT_AS: crate::__rlimit_resource_t = 10; +pub const RLIMIT_VMEM: crate::__rlimit_resource_t = 10; +pub const RLIMIT_NLIMITS: crate::__rlimit_resource_t = 11; +pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 11; pub const RUSAGE_SELF: __rusage_who = 0; pub const RUSAGE_CHILDREN: __rusage_who = -1; @@ -3148,86 +3153,86 @@ pub const __UT_LINESIZE: usize = 32; pub const __UT_NAMESIZE: usize = 32; pub const __UT_HOSTSIZE: usize = 256; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_CLOEXEC: ::c_int = 4194304; -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTROUTE: ::c_int = 4; -pub const MSG_EOR: ::c_int = 8; -pub const MSG_TRUNC: ::c_int = 16; -pub const MSG_CTRUNC: ::c_int = 32; -pub const MSG_WAITALL: ::c_int = 64; -pub const MSG_DONTWAIT: ::c_int = 128; -pub const MSG_NOSIGNAL: ::c_int = 1024; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; - -pub const SCM_RIGHTS: ::c_int = 1; -pub const SCM_TIMESTAMP: ::c_int = 2; -pub const SCM_CREDS: ::c_int = 3; - -pub const SO_DEBUG: ::c_int = 1; -pub const SO_ACCEPTCONN: ::c_int = 2; -pub const SO_REUSEADDR: ::c_int = 4; -pub const SO_KEEPALIVE: ::c_int = 8; -pub const SO_DONTROUTE: ::c_int = 16; -pub const SO_BROADCAST: ::c_int = 32; -pub const SO_USELOOPBACK: ::c_int = 64; -pub const SO_LINGER: ::c_int = 128; -pub const SO_OOBINLINE: ::c_int = 256; -pub const SO_REUSEPORT: ::c_int = 512; -pub const SO_SNDBUF: ::c_int = 4097; -pub const SO_RCVBUF: ::c_int = 4098; -pub const SO_SNDLOWAT: ::c_int = 4099; -pub const SO_RCVLOWAT: ::c_int = 4100; -pub const SO_SNDTIMEO: ::c_int = 4101; -pub const SO_RCVTIMEO: ::c_int = 4102; -pub const SO_ERROR: ::c_int = 4103; -pub const SO_STYLE: ::c_int = 4104; -pub const SO_TYPE: ::c_int = 4104; - -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_ICMP: ::c_int = 1; -pub const IPPROTO_IGMP: ::c_int = 2; -pub const IPPROTO_IPIP: ::c_int = 4; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_EGP: ::c_int = 8; -pub const IPPROTO_PUP: ::c_int = 12; -pub const IPPROTO_UDP: ::c_int = 17; -pub const IPPROTO_IDP: ::c_int = 22; -pub const IPPROTO_TP: ::c_int = 29; -pub const IPPROTO_DCCP: ::c_int = 33; -pub const IPPROTO_IPV6: ::c_int = 41; -pub const IPPROTO_RSVP: ::c_int = 46; -pub const IPPROTO_GRE: ::c_int = 47; -pub const IPPROTO_ESP: ::c_int = 50; -pub const IPPROTO_AH: ::c_int = 51; -pub const IPPROTO_MTP: ::c_int = 92; -pub const IPPROTO_BEETPH: ::c_int = 94; -pub const IPPROTO_ENCAP: ::c_int = 98; -pub const IPPROTO_PIM: ::c_int = 103; -pub const IPPROTO_COMP: ::c_int = 108; -pub const IPPROTO_L2TP: ::c_int = 115; -pub const IPPROTO_SCTP: ::c_int = 132; -pub const IPPROTO_UDPLITE: ::c_int = 136; -pub const IPPROTO_MPLS: ::c_int = 137; -pub const IPPROTO_ETHERNET: ::c_int = 143; -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_MPTCP: ::c_int = 262; -pub const IPPROTO_MAX: ::c_int = 263; - -pub const IPPROTO_HOPOPTS: ::c_int = 0; -pub const IPPROTO_ROUTING: ::c_int = 43; -pub const IPPROTO_FRAGMENT: ::c_int = 44; -pub const IPPROTO_ICMPV6: ::c_int = 58; -pub const IPPROTO_NONE: ::c_int = 59; -pub const IPPROTO_DSTOPTS: ::c_int = 60; -pub const IPPROTO_MH: ::c_int = 135; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_CLOEXEC: c_int = 4194304; +pub const SOCK_NONBLOCK: c_int = 2048; + +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_DONTROUTE: c_int = 4; +pub const MSG_EOR: c_int = 8; +pub const MSG_TRUNC: c_int = 16; +pub const MSG_CTRUNC: c_int = 32; +pub const MSG_WAITALL: c_int = 64; +pub const MSG_DONTWAIT: c_int = 128; +pub const MSG_NOSIGNAL: c_int = 1024; +pub const MSG_CMSG_CLOEXEC: c_int = 0x40000000; + +pub const SCM_RIGHTS: c_int = 1; +pub const SCM_TIMESTAMP: c_int = 2; +pub const SCM_CREDS: c_int = 3; + +pub const SO_DEBUG: c_int = 1; +pub const SO_ACCEPTCONN: c_int = 2; +pub const SO_REUSEADDR: c_int = 4; +pub const SO_KEEPALIVE: c_int = 8; +pub const SO_DONTROUTE: c_int = 16; +pub const SO_BROADCAST: c_int = 32; +pub const SO_USELOOPBACK: c_int = 64; +pub const SO_LINGER: c_int = 128; +pub const SO_OOBINLINE: c_int = 256; +pub const SO_REUSEPORT: c_int = 512; +pub const SO_SNDBUF: c_int = 4097; +pub const SO_RCVBUF: c_int = 4098; +pub const SO_SNDLOWAT: c_int = 4099; +pub const SO_RCVLOWAT: c_int = 4100; +pub const SO_SNDTIMEO: c_int = 4101; +pub const SO_RCVTIMEO: c_int = 4102; +pub const SO_ERROR: c_int = 4103; +pub const SO_STYLE: c_int = 4104; +pub const SO_TYPE: c_int = 4104; + +pub const IPPROTO_IP: c_int = 0; +pub const IPPROTO_ICMP: c_int = 1; +pub const IPPROTO_IGMP: c_int = 2; +pub const IPPROTO_IPIP: c_int = 4; +pub const IPPROTO_TCP: c_int = 6; +pub const IPPROTO_EGP: c_int = 8; +pub const IPPROTO_PUP: c_int = 12; +pub const IPPROTO_UDP: c_int = 17; +pub const IPPROTO_IDP: c_int = 22; +pub const IPPROTO_TP: c_int = 29; +pub const IPPROTO_DCCP: c_int = 33; +pub const IPPROTO_IPV6: c_int = 41; +pub const IPPROTO_RSVP: c_int = 46; +pub const IPPROTO_GRE: c_int = 47; +pub const IPPROTO_ESP: c_int = 50; +pub const IPPROTO_AH: c_int = 51; +pub const IPPROTO_MTP: c_int = 92; +pub const IPPROTO_BEETPH: c_int = 94; +pub const IPPROTO_ENCAP: c_int = 98; +pub const IPPROTO_PIM: c_int = 103; +pub const IPPROTO_COMP: c_int = 108; +pub const IPPROTO_L2TP: c_int = 115; +pub const IPPROTO_SCTP: c_int = 132; +pub const IPPROTO_UDPLITE: c_int = 136; +pub const IPPROTO_MPLS: c_int = 137; +pub const IPPROTO_ETHERNET: c_int = 143; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_MPTCP: c_int = 262; +pub const IPPROTO_MAX: c_int = 263; + +pub const IPPROTO_HOPOPTS: c_int = 0; +pub const IPPROTO_ROUTING: c_int = 43; +pub const IPPROTO_FRAGMENT: c_int = 44; +pub const IPPROTO_ICMPV6: c_int = 58; +pub const IPPROTO_NONE: c_int = 59; +pub const IPPROTO_DSTOPTS: c_int = 60; +pub const IPPROTO_MH: c_int = 135; pub const IPPORT_ECHO: in_port_t = 7; pub const IPPORT_DISCARD: in_port_t = 9; @@ -3255,107 +3260,107 @@ pub const IPPORT_WHOSERVER: in_port_t = 513; pub const IPPORT_ROUTESERVER: in_port_t = 520; pub const IPPORT_USERRESERVED: in_port_t = 5000; -pub const DT_UNKNOWN: ::c_uchar = 0; -pub const DT_FIFO: ::c_uchar = 1; -pub const DT_CHR: ::c_uchar = 2; -pub const DT_DIR: ::c_uchar = 4; -pub const DT_BLK: ::c_uchar = 6; -pub const DT_REG: ::c_uchar = 8; -pub const DT_LNK: ::c_uchar = 10; -pub const DT_SOCK: ::c_uchar = 12; -pub const DT_WHT: ::c_uchar = 14; - -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; -pub const ST_NOEXEC: ::c_ulong = 8; -pub const ST_SYNCHRONOUS: ::c_ulong = 16; -pub const ST_NOATIME: ::c_ulong = 32; -pub const ST_RELATIME: ::c_ulong = 64; - -pub const RTLD_DI_LMID: ::c_int = 1; -pub const RTLD_DI_LINKMAP: ::c_int = 2; -pub const RTLD_DI_CONFIGADDR: ::c_int = 3; -pub const RTLD_DI_SERINFO: ::c_int = 4; -pub const RTLD_DI_SERINFOSIZE: ::c_int = 5; -pub const RTLD_DI_ORIGIN: ::c_int = 6; -pub const RTLD_DI_PROFILENAME: ::c_int = 7; -pub const RTLD_DI_PROFILEOUT: ::c_int = 8; -pub const RTLD_DI_TLS_MODID: ::c_int = 9; -pub const RTLD_DI_TLS_DATA: ::c_int = 10; -pub const RTLD_DI_PHDR: ::c_int = 11; -pub const RTLD_DI_MAX: ::c_int = 11; - -pub const SI_ASYNCIO: ::c_int = -4; -pub const SI_MESGQ: ::c_int = -3; -pub const SI_TIMER: ::c_int = -2; -pub const SI_QUEUE: ::c_int = -1; -pub const SI_USER: ::c_int = 0; - -pub const ILL_ILLOPC: ::c_int = 1; -pub const ILL_ILLOPN: ::c_int = 2; -pub const ILL_ILLADR: ::c_int = 3; -pub const ILL_ILLTRP: ::c_int = 4; -pub const ILL_PRVOPC: ::c_int = 5; -pub const ILL_PRVREG: ::c_int = 6; -pub const ILL_COPROC: ::c_int = 7; -pub const ILL_BADSTK: ::c_int = 8; - -pub const FPE_INTDIV: ::c_int = 1; -pub const FPE_INTOVF: ::c_int = 2; -pub const FPE_FLTDIV: ::c_int = 3; -pub const FPE_FLTOVF: ::c_int = 4; -pub const FPE_FLTUND: ::c_int = 5; -pub const FPE_FLTRES: ::c_int = 6; -pub const FPE_FLTINV: ::c_int = 7; -pub const FPE_FLTSUB: ::c_int = 8; - -pub const SEGV_MAPERR: ::c_int = 1; -pub const SEGV_ACCERR: ::c_int = 2; - -pub const BUS_ADRALN: ::c_int = 1; -pub const BUS_ADRERR: ::c_int = 2; -pub const BUS_OBJERR: ::c_int = 3; - -pub const TRAP_BRKPT: ::c_int = 1; -pub const TRAP_TRACE: ::c_int = 2; - -pub const CLD_EXITED: ::c_int = 1; -pub const CLD_KILLED: ::c_int = 2; -pub const CLD_DUMPED: ::c_int = 3; -pub const CLD_TRAPPED: ::c_int = 4; -pub const CLD_STOPPED: ::c_int = 5; -pub const CLD_CONTINUED: ::c_int = 6; - -pub const POLL_IN: ::c_int = 1; -pub const POLL_OUT: ::c_int = 2; -pub const POLL_MSG: ::c_int = 3; -pub const POLL_ERR: ::c_int = 4; -pub const POLL_PRI: ::c_int = 5; -pub const POLL_HUP: ::c_int = 6; - -pub const SIGEV_SIGNAL: ::c_int = 0; -pub const SIGEV_NONE: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 2; - -pub const REG_GS: ::c_uint = 0; -pub const REG_FS: ::c_uint = 1; -pub const REG_ES: ::c_uint = 2; -pub const REG_DS: ::c_uint = 3; -pub const REG_EDI: ::c_uint = 4; -pub const REG_ESI: ::c_uint = 5; -pub const REG_EBP: ::c_uint = 6; -pub const REG_ESP: ::c_uint = 7; -pub const REG_EBX: ::c_uint = 8; -pub const REG_EDX: ::c_uint = 9; -pub const REG_ECX: ::c_uint = 10; -pub const REG_EAX: ::c_uint = 11; -pub const REG_TRAPNO: ::c_uint = 12; -pub const REG_ERR: ::c_uint = 13; -pub const REG_EIP: ::c_uint = 14; -pub const REG_CS: ::c_uint = 15; -pub const REG_EFL: ::c_uint = 16; -pub const REG_UESP: ::c_uint = 17; -pub const REG_SS: ::c_uint = 18; +pub const DT_UNKNOWN: c_uchar = 0; +pub const DT_FIFO: c_uchar = 1; +pub const DT_CHR: c_uchar = 2; +pub const DT_DIR: c_uchar = 4; +pub const DT_BLK: c_uchar = 6; +pub const DT_REG: c_uchar = 8; +pub const DT_LNK: c_uchar = 10; +pub const DT_SOCK: c_uchar = 12; +pub const DT_WHT: c_uchar = 14; + +pub const ST_RDONLY: c_ulong = 1; +pub const ST_NOSUID: c_ulong = 2; +pub const ST_NOEXEC: c_ulong = 8; +pub const ST_SYNCHRONOUS: c_ulong = 16; +pub const ST_NOATIME: c_ulong = 32; +pub const ST_RELATIME: c_ulong = 64; + +pub const RTLD_DI_LMID: c_int = 1; +pub const RTLD_DI_LINKMAP: c_int = 2; +pub const RTLD_DI_CONFIGADDR: c_int = 3; +pub const RTLD_DI_SERINFO: c_int = 4; +pub const RTLD_DI_SERINFOSIZE: c_int = 5; +pub const RTLD_DI_ORIGIN: c_int = 6; +pub const RTLD_DI_PROFILENAME: c_int = 7; +pub const RTLD_DI_PROFILEOUT: c_int = 8; +pub const RTLD_DI_TLS_MODID: c_int = 9; +pub const RTLD_DI_TLS_DATA: c_int = 10; +pub const RTLD_DI_PHDR: c_int = 11; +pub const RTLD_DI_MAX: c_int = 11; + +pub const SI_ASYNCIO: c_int = -4; +pub const SI_MESGQ: c_int = -3; +pub const SI_TIMER: c_int = -2; +pub const SI_QUEUE: c_int = -1; +pub const SI_USER: c_int = 0; + +pub const ILL_ILLOPC: c_int = 1; +pub const ILL_ILLOPN: c_int = 2; +pub const ILL_ILLADR: c_int = 3; +pub const ILL_ILLTRP: c_int = 4; +pub const ILL_PRVOPC: c_int = 5; +pub const ILL_PRVREG: c_int = 6; +pub const ILL_COPROC: c_int = 7; +pub const ILL_BADSTK: c_int = 8; + +pub const FPE_INTDIV: c_int = 1; +pub const FPE_INTOVF: c_int = 2; +pub const FPE_FLTDIV: c_int = 3; +pub const FPE_FLTOVF: c_int = 4; +pub const FPE_FLTUND: c_int = 5; +pub const FPE_FLTRES: c_int = 6; +pub const FPE_FLTINV: c_int = 7; +pub const FPE_FLTSUB: c_int = 8; + +pub const SEGV_MAPERR: c_int = 1; +pub const SEGV_ACCERR: c_int = 2; + +pub const BUS_ADRALN: c_int = 1; +pub const BUS_ADRERR: c_int = 2; +pub const BUS_OBJERR: c_int = 3; + +pub const TRAP_BRKPT: c_int = 1; +pub const TRAP_TRACE: c_int = 2; + +pub const CLD_EXITED: c_int = 1; +pub const CLD_KILLED: c_int = 2; +pub const CLD_DUMPED: c_int = 3; +pub const CLD_TRAPPED: c_int = 4; +pub const CLD_STOPPED: c_int = 5; +pub const CLD_CONTINUED: c_int = 6; + +pub const POLL_IN: c_int = 1; +pub const POLL_OUT: c_int = 2; +pub const POLL_MSG: c_int = 3; +pub const POLL_ERR: c_int = 4; +pub const POLL_PRI: c_int = 5; +pub const POLL_HUP: c_int = 6; + +pub const SIGEV_SIGNAL: c_int = 0; +pub const SIGEV_NONE: c_int = 1; +pub const SIGEV_THREAD: c_int = 2; + +pub const REG_GS: c_uint = 0; +pub const REG_FS: c_uint = 1; +pub const REG_ES: c_uint = 2; +pub const REG_DS: c_uint = 3; +pub const REG_EDI: c_uint = 4; +pub const REG_ESI: c_uint = 5; +pub const REG_EBP: c_uint = 6; +pub const REG_ESP: c_uint = 7; +pub const REG_EBX: c_uint = 8; +pub const REG_EDX: c_uint = 9; +pub const REG_ECX: c_uint = 10; +pub const REG_EAX: c_uint = 11; +pub const REG_TRAPNO: c_uint = 12; +pub const REG_ERR: c_uint = 13; +pub const REG_EIP: c_uint = 14; +pub const REG_CS: c_uint = 15; +pub const REG_EFL: c_uint = 16; +pub const REG_UESP: c_uint = 17; +pub const REG_SS: c_uint = 18; pub const IOC_VOID: __ioctl_dir = 0; pub const IOC_OUT: __ioctl_dir = 1; @@ -3367,17 +3372,17 @@ pub const IOC_16: __ioctl_datum = 1; pub const IOC_32: __ioctl_datum = 2; pub const IOC_64: __ioctl_datum = 3; -pub const TCP_ESTABLISHED: ::c_uint = 1; -pub const TCP_SYN_SENT: ::c_uint = 2; -pub const TCP_SYN_RECV: ::c_uint = 3; -pub const TCP_FIN_WAIT1: ::c_uint = 4; -pub const TCP_FIN_WAIT2: ::c_uint = 5; -pub const TCP_TIME_WAIT: ::c_uint = 6; -pub const TCP_CLOSE: ::c_uint = 7; -pub const TCP_CLOSE_WAIT: ::c_uint = 8; -pub const TCP_LAST_ACK: ::c_uint = 9; -pub const TCP_LISTEN: ::c_uint = 10; -pub const TCP_CLOSING: ::c_uint = 11; +pub const TCP_ESTABLISHED: c_uint = 1; +pub const TCP_SYN_SENT: c_uint = 2; +pub const TCP_SYN_RECV: c_uint = 3; +pub const TCP_FIN_WAIT1: c_uint = 4; +pub const TCP_FIN_WAIT2: c_uint = 5; +pub const TCP_TIME_WAIT: c_uint = 6; +pub const TCP_CLOSE: c_uint = 7; +pub const TCP_CLOSE_WAIT: c_uint = 8; +pub const TCP_LAST_ACK: c_uint = 9; +pub const TCP_LISTEN: c_uint = 10; +pub const TCP_CLOSING: c_uint = 11; pub const TCP_CA_Open: tcp_ca_state = 0; pub const TCP_CA_Disorder: tcp_ca_state = 1; @@ -3385,27 +3390,27 @@ pub const TCP_CA_CWR: tcp_ca_state = 2; pub const TCP_CA_Recovery: tcp_ca_state = 3; pub const TCP_CA_Loss: tcp_ca_state = 4; -pub const TCP_NO_QUEUE: ::c_uint = 0; -pub const TCP_RECV_QUEUE: ::c_uint = 1; -pub const TCP_SEND_QUEUE: ::c_uint = 2; -pub const TCP_QUEUES_NR: ::c_uint = 3; +pub const TCP_NO_QUEUE: c_uint = 0; +pub const TCP_RECV_QUEUE: c_uint = 1; +pub const TCP_SEND_QUEUE: c_uint = 2; +pub const TCP_QUEUES_NR: c_uint = 3; pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; pub const P_PGID: idtype_t = 2; -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 4; +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 4; -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { __lock: 0, __owner_id: 0, __cnt: 0, __shpid: 0, - __type: PTHREAD_MUTEX_TIMED as ::c_int, + __type: PTHREAD_MUTEX_TIMED as c_int, __flags: 0, __reserved1: 0, __reserved2: 0, @@ -3415,7 +3420,7 @@ pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { __queue: 0i64 as *mut __pthread, __attr: 0i64 as *mut __pthread_condattr, __wrefs: 0, - __data: 0i64 as *mut ::c_void, + __data: 0i64 as *mut c_void, }; pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __held: __PTHREAD_SPIN_LOCK_INITIALIZER, @@ -3424,43 +3429,43 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __readerqueue: 0i64 as *mut __pthread, __writerqueue: 0i64 as *mut __pthread, __attr: 0i64 as *mut __pthread_rwlockattr, - __data: 0i64 as *mut ::c_void, + __data: 0i64 as *mut c_void, }; -pub const PTHREAD_STACK_MIN: ::size_t = 0; +pub const PTHREAD_STACK_MIN: size_t = 0; // Non-public helper constants const _UTSNAME_LENGTH: usize = 1024; const_fn! { {const} fn CMSG_ALIGN(len: usize) -> usize { - len + ::mem::size_of::() - 1 & !(::mem::size_of::() - 1) + len + crate::mem::size_of::() - 1 & !(crate::mem::size_of::() - 1) } } // functions f! { pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { - if (*mhdr).msg_controllen as usize >= ::mem::size_of::() { + if (*mhdr).msg_controllen as usize >= crate::mem::size_of::() { (*mhdr).msg_control as *mut cmsghdr } else { 0 as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut ::c_uchar { - cmsg.offset(1) as *mut ::c_uchar + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + cmsg.offset(1) as *mut c_uchar } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::())) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (CMSG_ALIGN(length as usize) + CMSG_ALIGN(crate::mem::size_of::())) as c_uint } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - CMSG_ALIGN(::mem::size_of::()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + CMSG_ALIGN(crate::mem::size_of::()) as c_uint + length } pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { - if ((*cmsg).cmsg_len as usize) < ::mem::size_of::() { + if ((*cmsg).cmsg_len as usize) < crate::mem::size_of::() { return 0 as *mut cmsghdr; }; let next = (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; @@ -3474,10 +3479,10 @@ f! { } } - pub fn CPU_ALLOC_SIZE(count: ::c_int) -> ::size_t { - let _dummy: cpu_set_t = ::mem::zeroed(); - let size_in_bits = 8 * ::mem::size_of_val(&_dummy.bits[0]); - ((count as ::size_t + size_in_bits - 1) / 8) as ::size_t + pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + let _dummy: cpu_set_t = crate::mem::zeroed(); + let size_in_bits = 8 * crate::mem::size_of_val(&_dummy.bits[0]); + ((count as size_t + size_in_bits - 1) / 8) as size_t } pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { @@ -3487,48 +3492,48 @@ f! { } pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; () } pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); () } pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> ::c_int { + pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; - let size_of_mask = ::mem::size_of_val(&cpuset.bits[0]); + let size_of_mask = crate::mem::size_of_val(&cpuset.bits[0]); for i in cpuset.bits[..(size / size_of_mask)].iter() { s += i.count_ones(); } - s as ::c_int + s as c_int } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> ::c_int { - CPU_COUNT_S(::mem::size_of::(), cpuset) + pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { + CPU_COUNT_S(crate::mem::size_of::(), cpuset) } pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.bits == set2.bits } - pub fn major(dev: ::dev_t) -> ::c_uint { - ((dev >> 8) & 0xff) as ::c_uint + pub fn major(dev: crate::dev_t) -> c_uint { + ((dev >> 8) & 0xff) as c_uint } - pub fn minor(dev: ::dev_t) -> ::c_uint { - (dev & 0xffff00ff) as ::c_uint + pub fn minor(dev: crate::dev_t) -> c_uint { + (dev & 0xffff00ff) as c_uint } pub fn IPTOS_TOS(tos: u8) -> u8 { @@ -3539,22 +3544,22 @@ f! { tos & IPTOS_PREC_MASK } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } @@ -3567,327 +3572,312 @@ f! { } extern "C" { - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; - pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int; - pub fn futimens(__fd: ::c_int, __times: *const ::timespec) -> ::c_int; + pub fn futimes(fd: c_int, times: *const crate::timeval) -> c_int; + pub fn futimens(__fd: c_int, __times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; - pub fn mkfifoat(__fd: ::c_int, __path: *const ::c_char, __mode: __mode_t) -> ::c_int; + pub fn mkfifoat(__fd: c_int, __path: *const c_char, __mode: __mode_t) -> c_int; - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; - pub fn __libc_current_sigrtmin() -> ::c_int; + pub fn __libc_current_sigrtmin() -> c_int; - pub fn __libc_current_sigrtmax() -> ::c_int; + pub fn __libc_current_sigrtmax() -> c_int; pub fn wait4( - pid: ::pid_t, - status: *mut ::c_int, - options: ::c_int, - rusage: *mut ::rusage, - ) -> ::pid_t; - - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; - - pub fn sigwait(__set: *const sigset_t, __sig: *mut ::c_int) -> ::c_int; - - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; + pid: crate::pid_t, + status: *mut c_int, + options: c_int, + rusage: *mut crate::rusage, + ) -> crate::pid_t; + + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; + + pub fn sigwait(__set: *const sigset_t, __sig: *mut c_int) -> c_int; + + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; - pub fn ioctl(__fd: ::c_int, __request: ::c_ulong, ...) -> ::c_int; + pub fn ioctl(__fd: c_int, __request: c_ulong, ...) -> c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; - pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; + pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int; - pub fn pread64(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off64_t) -> ::ssize_t; - pub fn pwrite64( - fd: ::c_int, - buf: *const ::c_void, - count: ::size_t, - offset: off64_t, - ) -> ::ssize_t; + pub fn pread64(fd: c_int, buf: *mut c_void, count: size_t, offset: off64_t) -> ssize_t; + pub fn pwrite64(fd: c_int, buf: *const c_void, count: size_t, offset: off64_t) -> ssize_t; - pub fn readv(__fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int) -> ::ssize_t; - pub fn writev(__fd: ::c_int, __iovec: *const ::iovec, __count: ::c_int) -> ::ssize_t; + pub fn readv(__fd: c_int, __iovec: *const crate::iovec, __count: c_int) -> ssize_t; + pub fn writev(__fd: c_int, __iovec: *const crate::iovec, __count: c_int) -> ssize_t; pub fn preadv( - __fd: ::c_int, - __iovec: *const ::iovec, - __count: ::c_int, + __fd: c_int, + __iovec: *const crate::iovec, + __count: c_int, __offset: __off_t, - ) -> ::ssize_t; + ) -> ssize_t; pub fn pwritev( - __fd: ::c_int, - __iovec: *const ::iovec, - __count: ::c_int, + __fd: c_int, + __iovec: *const crate::iovec, + __count: c_int, __offset: __off_t, - ) -> ::ssize_t; - - pub fn preadv64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - ) -> ::ssize_t; + ) -> ssize_t; + + pub fn preadv64(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) + -> ssize_t; pub fn pwritev64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, + ) -> ssize_t; pub fn fread_unlocked( - buf: *mut ::c_void, - size: ::size_t, - nobj: ::size_t, - stream: *mut ::FILE, - ) -> ::size_t; - - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + buf: *mut c_void, + size: size_t, + nobj: size_t, + stream: *mut crate::FILE, + ) -> size_t; + + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, - sevp: *mut ::sigevent, - ) -> ::c_int; + nitems: c_int, + sevp: *mut crate::sigevent, + ) -> c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; - - pub fn lseek64(__fd: ::c_int, __offset: __off64_t, __whence: ::c_int) -> __off64_t; - - pub fn lseek(__fd: ::c_int, __offset: __off_t, __whence: ::c_int) -> __off_t; - - pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; - pub fn fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int; - pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; - pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; - - pub fn bind(__fd: ::c_int, __addr: *const sockaddr, __len: ::socklen_t) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; + pub fn mq_setattr( + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; + + pub fn lseek64(__fd: c_int, __offset: __off64_t, __whence: c_int) -> __off64_t; + + pub fn lseek(__fd: c_int, __offset: __off_t, __whence: c_int) -> __off_t; + + pub fn fgetpos64(stream: *mut crate::FILE, ptr: *mut fpos64_t) -> c_int; + pub fn fseeko64(stream: *mut crate::FILE, offset: off64_t, whence: c_int) -> c_int; + pub fn fsetpos64(stream: *mut crate::FILE, ptr: *const fpos64_t) -> c_int; + pub fn ftello64(stream: *mut crate::FILE) -> off64_t; + + pub fn bind(__fd: c_int, __addr: *const sockaddr, __len: crate::socklen_t) -> c_int; pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int; + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int; pub fn ppoll( - fds: *mut ::pollfd, + fds: *mut crate::pollfd, nfds: nfds_t, - timeout: *const ::timespec, + timeout: *const crate::timespec, sigmask: *const sigset_t, - ) -> ::c_int; + ) -> c_int; - pub fn recvmsg(__fd: ::c_int, __message: *mut msghdr, __flags: ::c_int) -> ::ssize_t; + pub fn recvmsg(__fd: c_int, __message: *mut msghdr, __flags: c_int) -> ssize_t; - pub fn sendmsg(__fd: ::c_int, __message: *const msghdr, __flags: ::c_int) -> ::ssize_t; + pub fn sendmsg(__fd: c_int, __message: *const msghdr, __flags: c_int) -> ssize_t; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - - pub fn sendfile( - out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut off_t, - count: ::size_t, - ) -> ::ssize_t; - pub fn sendfile64( - out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut off64_t, - count: ::size_t, - ) -> ::ssize_t; - - pub fn shutdown(__fd: ::c_int, __how: ::c_int) -> ::c_int; - - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + + pub fn sendfile(out_fd: c_int, in_fd: c_int, offset: *mut off_t, count: size_t) -> ssize_t; + pub fn sendfile64(out_fd: c_int, in_fd: c_int, offset: *mut off64_t, count: size_t) -> ssize_t; + + pub fn shutdown(__fd: c_int, __how: c_int) -> c_int; + + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); - pub fn uname(buf: *mut ::utsname) -> ::c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; - pub fn gethostid() -> ::c_long; - pub fn sethostid(hostid: ::c_long) -> ::c_int; + pub fn gethostid() -> c_long; + pub fn sethostid(hostid: c_long) -> c_int; pub fn setpwent(); pub fn endpwent(); pub fn getpwent() -> *mut passwd; pub fn setgrent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; pub fn setspent(); pub fn endspent(); pub fn getspent() -> *mut spwd; - pub fn getspnam(name: *const ::c_char) -> *mut spwd; + pub fn getspnam(name: *const c_char) -> *mut spwd; pub fn getpwent_r( - pwd: *mut ::passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::passwd, - ) -> ::c_int; + pwd: *mut crate::passwd, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::passwd, + ) -> c_int; pub fn getgrent_r( - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn fgetpwent_r( - stream: *mut ::FILE, - pwd: *mut ::passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::passwd, - ) -> ::c_int; + stream: *mut crate::FILE, + pwd: *mut crate::passwd, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::passwd, + ) -> c_int; pub fn fgetgrent_r( - stream: *mut ::FILE, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + stream: *mut crate::FILE, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; - pub fn putpwent(p: *const ::passwd, stream: *mut ::FILE) -> ::c_int; - pub fn putgrent(grp: *const ::group, stream: *mut ::FILE) -> ::c_int; + pub fn putpwent(p: *const crate::passwd, stream: *mut crate::FILE) -> c_int; + pub fn putgrent(grp: *const crate::group, stream: *mut crate::FILE) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn fgetspent_r( - fp: *mut ::FILE, - spbuf: *mut ::spwd, - buf: *mut ::c_char, - buflen: ::size_t, - spbufp: *mut *mut ::spwd, - ) -> ::c_int; + fp: *mut crate::FILE, + spbuf: *mut crate::spwd, + buf: *mut c_char, + buflen: size_t, + spbufp: *mut *mut crate::spwd, + ) -> c_int; pub fn sgetspent_r( - s: *const ::c_char, - spbuf: *mut ::spwd, - buf: *mut ::c_char, - buflen: ::size_t, - spbufp: *mut *mut ::spwd, - ) -> ::c_int; + s: *const c_char, + spbuf: *mut crate::spwd, + buf: *mut c_char, + buflen: size_t, + spbufp: *mut *mut crate::spwd, + ) -> c_int; pub fn getspent_r( - spbuf: *mut ::spwd, - buf: *mut ::c_char, - buflen: ::size_t, - spbufp: *mut *mut ::spwd, - ) -> ::c_int; + spbuf: *mut crate::spwd, + buf: *mut c_char, + buflen: size_t, + spbufp: *mut *mut crate::spwd, + ) -> c_int; pub fn getspnam_r( - name: *const ::c_char, + name: *const c_char, spbuf: *mut spwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, spbufp: *mut *mut spwd, - ) -> ::c_int; + ) -> c_int; // mntent.h pub fn getmntent_r( - stream: *mut ::FILE, - mntbuf: *mut ::mntent, - buf: *mut ::c_char, - buflen: ::c_int, - ) -> *mut ::mntent; - - pub fn utmpname(file: *const ::c_char) -> ::c_int; - pub fn utmpxname(file: *const ::c_char) -> ::c_int; + stream: *mut crate::FILE, + mntbuf: *mut crate::mntent, + buf: *mut c_char, + buflen: c_int, + ) -> *mut crate::mntent; + + pub fn utmpname(file: *const c_char) -> c_int; + pub fn utmpxname(file: *const c_char) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; @@ -3895,749 +3885,738 @@ extern "C" { pub fn setutxent(); pub fn endutxent(); - pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; - pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; - pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; - pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; - - pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; - - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + pub fn getresuid( + ruid: *mut crate::uid_t, + euid: *mut crate::uid_t, + suid: *mut crate::uid_t, + ) -> c_int; + pub fn getresgid( + rgid: *mut crate::gid_t, + egid: *mut crate::gid_t, + sgid: *mut crate::gid_t, + ) -> c_int; + pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int; + pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int; + + pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int; + + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + + pub fn getgrnam(name: *const c_char) -> *mut crate::group; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn getgrouplist( - user: *const ::c_char, - group: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; + user: *const c_char, + group: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; - pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int; + pub fn setgroups(ngroups: size_t, ptr: *const crate::gid_t) -> c_int; - pub fn acct(filename: *const ::c_char) -> ::c_int; + pub fn acct(filename: *const c_char) -> c_int; - pub fn setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE; - pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent; - pub fn addmntent(stream: *mut ::FILE, mnt: *const ::mntent) -> ::c_int; - pub fn endmntent(streamp: *mut ::FILE) -> ::c_int; - pub fn hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char; + pub fn setmntent(filename: *const c_char, ty: *const c_char) -> *mut crate::FILE; + pub fn getmntent(stream: *mut crate::FILE) -> *mut crate::mntent; + pub fn addmntent(stream: *mut crate::FILE, mnt: *const crate::mntent) -> c_int; + pub fn endmntent(streamp: *mut crate::FILE) -> c_int; + pub fn hasmntopt(mnt: *const crate::mntent, opt: *const c_char) -> *mut c_char; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; - pub fn pthread_kill(__threadid: ::pthread_t, __signo: ::c_int) -> ::c_int; - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; - pub fn __pthread_equal(__t1: __pthread_t, __t2: __pthread_t) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; + pub fn pthread_kill(__threadid: crate::pthread_t, __signo: c_int) -> c_int; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; + pub fn __pthread_equal(__t1: __pthread_t, __t2: __pthread_t) -> c_int; - pub fn pthread_getattr_np(__thr: ::pthread_t, __attr: *mut pthread_attr_t) -> ::c_int; + pub fn pthread_getattr_np(__thr: crate::pthread_t, __attr: *mut pthread_attr_t) -> c_int; pub fn pthread_attr_getguardsize( __attr: *const pthread_attr_t, - __guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + __guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getstack( __attr: *const pthread_attr_t, - __stackaddr: *mut *mut ::c_void, - __stacksize: *mut ::size_t, - ) -> ::c_int; + __stackaddr: *mut *mut c_void, + __stacksize: *mut size_t, + ) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_mutexattr_setpshared( - attr: *mut pthread_mutexattr_t, - pshared: ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; pub fn pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; + val: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: c_int) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_setclock( __attr: *mut pthread_condattr_t, __clock_id: __clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; - pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> ::c_int; + pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> c_int; - pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; - pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; + pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_getpshared( - attr: *const ::pthread_barrierattr_t, - shared: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + shared: *mut c_int, + ) -> c_int; pub fn pthread_barrierattr_setpshared( - attr: *mut ::pthread_barrierattr_t, - shared: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_barrierattr_t, + shared: c_int, + ) -> c_int; pub fn pthread_barrier_init( barrier: *mut pthread_barrier_t, - attr: *const ::pthread_barrierattr_t, - count: ::c_uint, - ) -> ::c_int; - pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; pub fn pthread_sigmask( - __how: ::c_int, + __how: c_int, __newmask: *const __sigset_t, __oldmask: *mut __sigset_t, - ) -> ::c_int; + ) -> c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; - pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; - pub fn clock_getres(__clock_id: clockid_t, __res: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut ::timespec) -> ::c_int; - pub fn clock_settime(__clock_id: clockid_t, __tp: *const ::timespec) -> ::c_int; - pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn clock_getres(__clock_id: clockid_t, __res: *mut crate::timespec) -> c_int; + pub fn clock_gettime(__clock_id: clockid_t, __tp: *mut crate::timespec) -> c_int; + pub fn clock_settime(__clock_id: clockid_t, __tp: *const crate::timespec) -> c_int; + pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; - pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char; - pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char; + pub fn asctime_r(tm: *const crate::tm, buf: *mut c_char) -> *mut c_char; + pub fn ctime_r(timep: *const time_t, buf: *mut c_char) -> *mut c_char; pub fn strftime( - s: *mut ::c_char, - max: ::size_t, - format: *const ::c_char, - tm: *const ::tm, - ) -> ::size_t; - pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char; + s: *mut c_char, + max: size_t, + format: *const c_char, + tm: *const crate::tm, + ) -> size_t; + pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char; pub fn timer_create( - clockid: ::clockid_t, - sevp: *mut ::sigevent, - timerid: *mut ::timer_t, - ) -> ::c_int; - pub fn timer_delete(timerid: ::timer_t) -> ::c_int; - pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int; - pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int; + clockid: crate::clockid_t, + sevp: *mut crate::sigevent, + timerid: *mut crate::timer_t, + ) -> c_int; + pub fn timer_delete(timerid: crate::timer_t) -> c_int; + pub fn timer_getoverrun(timerid: crate::timer_t) -> c_int; + pub fn timer_gettime(timerid: crate::timer_t, curr_value: *mut crate::itimerspec) -> c_int; pub fn timer_settime( - timerid: ::timer_t, - flags: ::c_int, - new_value: *const ::itimerspec, - old_value: *mut ::itimerspec, - ) -> ::c_int; - - pub fn fstat(__fd: ::c_int, __buf: *mut stat) -> ::c_int; - pub fn fstat64(__fd: ::c_int, __buf: *mut stat64) -> ::c_int; - - pub fn fstatat( - __fd: ::c_int, - __file: *const ::c_char, - __buf: *mut stat, - __flag: ::c_int, - ) -> ::c_int; + timerid: crate::timer_t, + flags: c_int, + new_value: *const crate::itimerspec, + old_value: *mut crate::itimerspec, + ) -> c_int; + + pub fn fstat(__fd: c_int, __buf: *mut stat) -> c_int; + pub fn fstat64(__fd: c_int, __buf: *mut stat64) -> c_int; + + pub fn fstatat(__fd: c_int, __file: *const c_char, __buf: *mut stat, __flag: c_int) -> c_int; pub fn fstatat64( - __fd: ::c_int, - __file: *const ::c_char, + __fd: c_int, + __file: *const c_char, __buf: *mut stat64, - __flag: ::c_int, - ) -> ::c_int; + __flag: c_int, + ) -> c_int; pub fn statx( - dirfd: ::c_int, + dirfd: c_int, pathname: *const c_char, - flags: ::c_int, - mask: ::c_uint, + flags: c_int, + mask: c_uint, statxbuf: *mut statx, - ) -> ::c_int; + ) -> c_int; - pub fn ftruncate(__fd: ::c_int, __length: __off_t) -> ::c_int; - pub fn ftruncate64(__fd: ::c_int, __length: __off64_t) -> ::c_int; - pub fn truncate64(__file: *const ::c_char, __length: __off64_t) -> ::c_int; + pub fn ftruncate(__fd: c_int, __length: __off_t) -> c_int; + pub fn ftruncate64(__fd: c_int, __length: __off64_t) -> c_int; + pub fn truncate64(__file: *const c_char, __length: __off64_t) -> c_int; - pub fn lstat(__file: *const ::c_char, __buf: *mut stat) -> ::c_int; - pub fn lstat64(__file: *const ::c_char, __buf: *mut stat64) -> ::c_int; + pub fn lstat(__file: *const c_char, __buf: *mut stat) -> c_int; + pub fn lstat64(__file: *const c_char, __buf: *mut stat64) -> c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn statfs64(__file: *const ::c_char, __buf: *mut statfs64) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn fstatfs64(__fildes: ::c_int, __buf: *mut statfs64) -> ::c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; + pub fn statfs64(__file: *const c_char, __buf: *mut statfs64) -> c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn fstatfs64(__fildes: c_int, __buf: *mut statfs64) -> c_int; - pub fn statvfs(__file: *const ::c_char, __buf: *mut statvfs) -> ::c_int; - pub fn statvfs64(__file: *const ::c_char, __buf: *mut statvfs64) -> ::c_int; - pub fn fstatvfs(__fildes: ::c_int, __buf: *mut statvfs) -> ::c_int; - pub fn fstatvfs64(__fildes: ::c_int, __buf: *mut statvfs64) -> ::c_int; + pub fn statvfs(__file: *const c_char, __buf: *mut statvfs) -> c_int; + pub fn statvfs64(__file: *const c_char, __buf: *mut statvfs64) -> c_int; + pub fn fstatvfs(__fildes: c_int, __buf: *mut statvfs) -> c_int; + pub fn fstatvfs64(__fildes: c_int, __buf: *mut statvfs64) -> c_int; - pub fn open(__file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; - pub fn open64(__file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; + pub fn open(__file: *const c_char, __oflag: c_int, ...) -> c_int; + pub fn open64(__file: *const c_char, __oflag: c_int, ...) -> c_int; - pub fn openat(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; - pub fn openat64(__fd: ::c_int, __file: *const ::c_char, __oflag: ::c_int, ...) -> ::c_int; + pub fn openat(__fd: c_int, __file: *const c_char, __oflag: c_int, ...) -> c_int; + pub fn openat64(__fd: c_int, __file: *const c_char, __oflag: c_int, ...) -> c_int; - pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut crate::FILE; pub fn freopen64( filename: *const c_char, mode: *const c_char, - file: *mut ::FILE, - ) -> *mut ::FILE; + file: *mut crate::FILE, + ) -> *mut crate::FILE; - pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn creat64(path: *const c_char, mode: mode_t) -> c_int; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - pub fn tmpfile64() -> *mut ::FILE; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + pub fn tmpfile64() -> *mut crate::FILE; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; - pub fn getdtablesize() -> ::c_int; + pub fn getdtablesize() -> c_int; // Added in `glibc` 2.34 - pub fn close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn close_range(first: c_uint, last: c_uint, flags: c_int) -> c_int; pub fn openpty( - __amaster: *mut ::c_int, - __aslave: *mut ::c_int, - __name: *mut ::c_char, + __amaster: *mut c_int, + __aslave: *mut c_int, + __name: *mut c_char, __termp: *const termios, - __winp: *const ::winsize, - ) -> ::c_int; + __winp: *const crate::winsize, + ) -> c_int; pub fn forkpty( - __amaster: *mut ::c_int, - __name: *mut ::c_char, + __amaster: *mut c_int, + __name: *mut c_char, __termp: *const termios, - __winp: *const ::winsize, - ) -> ::pid_t; + __winp: *const crate::winsize, + ) -> crate::pid_t; - pub fn getpt() -> ::c_int; - pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; - pub fn login_tty(fd: ::c_int) -> ::c_int; + pub fn getpt() -> c_int; + pub fn ptsname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + pub fn login_tty(fd: c_int) -> c_int; - pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; + pub fn ctermid(s: *mut c_char) -> *mut c_char; - pub fn clearenv() -> ::c_int; + pub fn clearenv() -> c_int; pub fn execveat( - dirfd: ::c_int, - pathname: *const ::c_char, + dirfd: c_int, + pathname: *const c_char, argv: *const *mut c_char, envp: *const *mut c_char, - flags: ::c_int, - ) -> ::c_int; + flags: c_int, + ) -> c_int; pub fn execvpe( - file: *const ::c_char, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; + file: *const c_char, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; // posix/spawn.h pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, - flags: *mut ::c_int, - ) -> ::c_int; - pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; + flags: *mut c_int, + ) -> c_int; + pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int; pub fn posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, - param: *mut ::sched_param, - ) -> ::c_int; + param: *mut crate::sched_param, + ) -> c_int; pub fn posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, - param: *const ::sched_param, - ) -> ::c_int; + param: *const crate::sched_param, + ) -> c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; // Added in `glibc` 2.29 pub fn posix_spawn_file_actions_addchdir_np( - actions: *mut ::posix_spawn_file_actions_t, - path: *const ::c_char, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + path: *const c_char, + ) -> c_int; // Added in `glibc` 2.29 pub fn posix_spawn_file_actions_addfchdir_np( - actions: *mut ::posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + fd: c_int, + ) -> c_int; // Added in `glibc` 2.34 pub fn posix_spawn_file_actions_addclosefrom_np( - actions: *mut ::posix_spawn_file_actions_t, - from: ::c_int, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + from: c_int, + ) -> c_int; // Added in `glibc` 2.35 pub fn posix_spawn_file_actions_addtcsetpgrp_np( - actions: *mut ::posix_spawn_file_actions_t, - tcfd: ::c_int, - ) -> ::c_int; - - pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; - - pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; - pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; - - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; - - pub fn stat(__file: *const ::c_char, __buf: *mut stat) -> ::c_int; - pub fn stat64(__file: *const ::c_char, __buf: *mut stat64) -> ::c_int; - - pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; - pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64; - pub fn readdir_r(dirp: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) - -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + tcfd: c_int, + ) -> c_int; + + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; + + pub fn euidaccess(pathname: *const c_char, mode: c_int) -> c_int; + pub fn eaccess(pathname: *const c_char, mode: c_int) -> c_int; + + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; + + pub fn stat(__file: *const c_char, __buf: *mut stat) -> c_int; + pub fn stat64(__file: *const c_char, __buf: *mut stat64) -> c_int; + + pub fn readdir(dirp: *mut crate::DIR) -> *mut crate::dirent; + pub fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64; + pub fn readdir_r( + dirp: *mut crate::DIR, + entry: *mut crate::dirent, + result: *mut *mut crate::dirent, + ) -> c_int; pub fn readdir64_r( - dirp: *mut ::DIR, - entry: *mut ::dirent64, - result: *mut *mut ::dirent64, - ) -> ::c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; + dirp: *mut crate::DIR, + entry: *mut crate::dirent64, + result: *mut *mut crate::dirent64, + ) -> c_int; + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); + pub fn telldir(dirp: *mut crate::DIR) -> c_long; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; #[link_name = "__xpg_strerror_r"] - pub fn strerror_r(__errnum: ::c_int, __buf: *mut ::c_char, __buflen: ::size_t) -> ::c_int; + pub fn strerror_r(__errnum: c_int, __buf: *mut c_char, __buflen: size_t) -> c_int; - pub fn __errno_location() -> *mut ::c_int; + pub fn __errno_location() -> *mut c_int; pub fn mmap64( - __addr: *mut ::c_void, - __len: ::size_t, - __prot: ::c_int, - __flags: ::c_int, - __fd: ::c_int, + __addr: *mut c_void, + __len: size_t, + __prot: c_int, + __flags: c_int, + __fd: c_int, __offset: __off64_t, - ) -> *mut ::c_void; + ) -> *mut c_void; pub fn mremap( - addr: *mut ::c_void, - len: ::size_t, - new_len: ::size_t, - flags: ::c_int, + addr: *mut c_void, + len: size_t, + new_len: size_t, + flags: c_int, ... - ) -> *mut ::c_void; + ) -> *mut c_void; - pub fn mprotect(__addr: *mut ::c_void, __len: ::size_t, __prot: ::c_int) -> ::c_int; + pub fn mprotect(__addr: *mut c_void, __len: size_t, __prot: c_int) -> c_int; - pub fn msync(__addr: *mut ::c_void, __len: ::size_t, __flags: ::c_int) -> ::c_int; + pub fn msync(__addr: *mut c_void, __len: size_t, __flags: c_int) -> c_int; pub fn sync(); - pub fn syncfs(fd: ::c_int) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; + pub fn syncfs(fd: c_int) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; - pub fn fallocate64(fd: ::c_int, mode: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; + pub fn fallocate64(fd: c_int, mode: c_int, offset: off64_t, len: off64_t) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; - pub fn posix_fadvise64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, - advise: ::c_int, - ) -> ::c_int; + pub fn posix_fadvise64(fd: c_int, offset: off64_t, len: off64_t, advise: c_int) -> c_int; - pub fn madvise(__addr: *mut ::c_void, __len: ::size_t, __advice: ::c_int) -> ::c_int; + pub fn madvise(__addr: *mut c_void, __len: size_t, __advice: c_int) -> c_int; - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int; - pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int; - pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int; - pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int; + pub fn getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int; + pub fn getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int; + pub fn setrlimit(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit) -> c_int; + pub fn setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64) + -> c_int; - pub fn getpriority(which: ::__priority_which, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::__priority_which, who: ::id_t, prio: ::c_int) -> ::c_int; + pub fn getpriority(which: crate::__priority_which, who: crate::id_t) -> c_int; + pub fn setpriority(which: crate::__priority_which, who: crate::id_t, prio: c_int) -> c_int; - pub fn getrandom(__buffer: *mut ::c_void, __length: ::size_t, __flags: ::c_uint) -> ::ssize_t; - pub fn getentropy(__buffer: *mut ::c_void, __length: ::size_t) -> ::c_int; + pub fn getrandom(__buffer: *mut c_void, __length: size_t, __flags: c_uint) -> ssize_t; + pub fn getentropy(__buffer: *mut c_void, __length: size_t) -> c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; - pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char; - - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); - - pub fn drand48() -> ::c_double; - pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; - pub fn lrand48() -> ::c_long; - pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn mrand48() -> ::c_long; - pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn srand48(seed: ::c_long); - pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; - pub fn lcong48(p: *mut ::c_ushort); + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; + pub fn strchrnul(s: *const c_char, c: c_int) -> *mut c_char; + + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); + + pub fn drand48() -> c_double; + pub fn erand48(xseed: *mut c_ushort) -> c_double; + pub fn lrand48() -> c_long; + pub fn nrand48(xseed: *mut c_ushort) -> c_long; + pub fn mrand48() -> c_long; + pub fn jrand48(xseed: *mut c_ushort) -> c_long; + pub fn srand48(seed: c_long); + pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort; + pub fn lcong48(p: *mut c_ushort); pub fn qsort_r( - base: *mut ::c_void, - num: ::size_t, - size: ::size_t, - compar: ::Option< - unsafe extern "C" fn(*const ::c_void, *const ::c_void, *mut ::c_void) -> ::c_int, - >, - arg: *mut ::c_void, + base: *mut c_void, + num: size_t, + size: size_t, + compar: Option c_int>, + arg: *mut c_void, ); - pub fn brk(addr: *mut ::c_void) -> ::c_int; - pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; + pub fn brk(addr: *mut c_void) -> c_int; + pub fn sbrk(increment: intptr_t) -> *mut c_void; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn mallopt(param: c_int, value: c_int) -> c_int; - pub fn mallinfo() -> ::mallinfo; - pub fn mallinfo2() -> ::mallinfo2; - pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; - pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; - pub fn malloc_trim(__pad: ::size_t) -> ::c_int; + pub fn mallinfo() -> crate::mallinfo; + pub fn mallinfo2() -> crate::mallinfo2; + pub fn malloc_info(options: c_int, stream: *mut crate::FILE) -> c_int; + pub fn malloc_usable_size(ptr: *mut c_void) -> size_t; + pub fn malloc_trim(__pad: size_t) -> c_int; - pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; + pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t; pub fn iconv( cd: iconv_t, - inbuf: *mut *mut ::c_char, - inbytesleft: *mut ::size_t, - outbuf: *mut *mut ::c_char, - outbytesleft: *mut ::size_t, - ) -> ::size_t; - pub fn iconv_close(cd: iconv_t) -> ::c_int; + inbuf: *mut *mut c_char, + inbytesleft: *mut size_t, + outbuf: *mut *mut c_char, + outbytesleft: *mut size_t, + ) -> size_t; + pub fn iconv_close(cd: iconv_t) -> c_int; pub fn getopt_long( - argc: ::c_int, + argc: c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, - longindex: *mut ::c_int, - ) -> ::c_int; + longindex: *mut c_int, + ) -> c_int; - pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; + pub fn backtrace(buf: *mut *mut c_void, sz: c_int) -> c_int; - pub fn reboot(how_to: ::c_int) -> ::c_int; + pub fn reboot(how_to: c_int) -> c_int; - pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; + pub fn getloadavg(loadavg: *mut c_double, nelem: c_int) -> c_int; pub fn regexec( - preg: *const ::regex_t, - input: *const ::c_char, - nmatch: ::size_t, + preg: *const crate::regex_t, + input: *const c_char, + nmatch: size_t, pmatch: *mut regmatch_t, - eflags: ::c_int, - ) -> ::c_int; + eflags: c_int, + ) -> c_int; pub fn regerror( - errcode: ::c_int, - preg: *const ::regex_t, - errbuf: *mut ::c_char, - errbuf_size: ::size_t, - ) -> ::size_t; + errcode: c_int, + preg: *const crate::regex_t, + errbuf: *mut c_char, + errbuf_size: size_t, + ) -> size_t; - pub fn regfree(preg: *mut ::regex_t); + pub fn regfree(preg: *mut crate::regex_t); pub fn glob( pattern: *const c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); pub fn glob64( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, pglob: *mut glob64_t, - ) -> ::c_int; + ) -> c_int; pub fn globfree64(pglob: *mut glob64_t); pub fn getxattr( path: *const c_char, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn lgetxattr( path: *const c_char, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn fgetxattr( - filedes: ::c_int, + filedes: c_int, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn setxattr( path: *const c_char, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn lsetxattr( path: *const c_char, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn fsetxattr( - filedes: ::c_int, + filedes: c_int, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn listxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn llistxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn flistxattr(filedes: ::c_int, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; - - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; + pub fn listxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn llistxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn flistxattr(filedes: c_int, list: *mut c_char, size: size_t) -> ssize_t; + pub fn removexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn lremovexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn fremovexattr(filedes: c_int, name: *const c_char) -> c_int; + + pub fn dirname(path: *mut c_char) -> *mut c_char; /// POSIX version of `basename(3)`, defined in `libgen.h`. #[link_name = "__xpg_basename"] - pub fn posix_basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn posix_basename(path: *mut c_char) -> *mut c_char; /// GNU version of `basename(3)`, defined in `string.h`. #[link_name = "basename"] - pub fn gnu_basename(path: *const ::c_char) -> *mut ::c_char; + pub fn gnu_basename(path: *const c_char) -> *mut c_char; - pub fn dlmopen(lmid: Lmid_t, filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; - pub fn dlinfo(handle: *mut ::c_void, request: ::c_int, info: *mut ::c_void) -> ::c_int; + pub fn dlmopen(lmid: Lmid_t, filename: *const c_char, flag: c_int) -> *mut c_void; + pub fn dlinfo(handle: *mut c_void, request: c_int, info: *mut c_void) -> c_int; pub fn dladdr1( - addr: *const ::c_void, - info: *mut ::Dl_info, - extra_info: *mut *mut ::c_void, - flags: ::c_int, - ) -> ::c_int; - - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; + addr: *const c_void, + info: *mut crate::Dl_info, + extra_info: *mut *mut c_void, + flags: c_int, + ) -> c_int; + + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char; pub fn dl_iterate_phdr( - callback: ::Option< + callback: Option< unsafe extern "C" fn( - info: *mut ::dl_phdr_info, - size: ::size_t, - data: *mut ::c_void, - ) -> ::c_int, + info: *mut crate::dl_phdr_info, + size: size_t, + data: *mut c_void, + ) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; - pub fn gnu_get_libc_release() -> *const ::c_char; - pub fn gnu_get_libc_version() -> *const ::c_char; + pub fn gnu_get_libc_release() -> *const c_char; + pub fn gnu_get_libc_version() -> *const c_char; } safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= major << 8; dev |= minor; dev } - pub fn SIGRTMAX() -> ::c_int { + pub fn SIGRTMAX() -> c_int { unsafe { __libc_current_sigrtmax() } } - pub fn SIGRTMIN() -> ::c_int { + pub fn SIGRTMIN() -> c_int { unsafe { __libc_current_sigrtmin() } } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub {const} fn W_EXITCODE(ret: ::c_int, sig: ::c_int) -> ::c_int { + pub {const} fn W_EXITCODE(ret: c_int, sig: c_int) -> c_int { (ret << 8) | sig } - pub {const} fn W_STOPCODE(sig: ::c_int) -> ::c_int { + pub {const} fn W_STOPCODE(sig: c_int) -> c_int { (sig << 8) | 0x7f } - pub {const} fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int { + pub {const} fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } @@ -4654,7 +4633,7 @@ safe_f! { } pub {const} fn IPTOS_ECN(x: u8) -> u8 { - x & ::IPTOS_ECN_MASK + x & crate::IPTOS_ECN_MASK } } diff --git a/src/unix/linux_like/android/b32/arm.rs b/src/unix/linux_like/android/b32/arm.rs index f8e5f613fb1ea..c9bf6c8bee3dc 100644 --- a/src/unix/linux_like/android/b32/arm.rs +++ b/src/unix/linux_like/android/b32/arm.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_long, c_longlong, c_ulong}; + pub type c_char = u8; pub type wchar_t = u32; pub type greg_t = i32; @@ -5,53 +7,53 @@ pub type mcontext_t = sigcontext; s! { pub struct sigcontext { - pub trap_no: ::c_ulong, - pub error_code: ::c_ulong, - pub oldmask: ::c_ulong, - pub arm_r0: ::c_ulong, - pub arm_r1: ::c_ulong, - pub arm_r2: ::c_ulong, - pub arm_r3: ::c_ulong, - pub arm_r4: ::c_ulong, - pub arm_r5: ::c_ulong, - pub arm_r6: ::c_ulong, - pub arm_r7: ::c_ulong, - pub arm_r8: ::c_ulong, - pub arm_r9: ::c_ulong, - pub arm_r10: ::c_ulong, - pub arm_fp: ::c_ulong, - pub arm_ip: ::c_ulong, - pub arm_sp: ::c_ulong, - pub arm_lr: ::c_ulong, - pub arm_pc: ::c_ulong, - pub arm_cpsr: ::c_ulong, - pub fault_address: ::c_ulong, + pub trap_no: c_ulong, + pub error_code: c_ulong, + pub oldmask: c_ulong, + pub arm_r0: c_ulong, + pub arm_r1: c_ulong, + pub arm_r2: c_ulong, + pub arm_r3: c_ulong, + pub arm_r4: c_ulong, + pub arm_r5: c_ulong, + pub arm_r6: c_ulong, + pub arm_r7: c_ulong, + pub arm_r8: c_ulong, + pub arm_r9: c_ulong, + pub arm_r10: c_ulong, + pub arm_fp: c_ulong, + pub arm_ip: c_ulong, + pub arm_sp: c_ulong, + pub arm_lr: c_ulong, + pub arm_pc: c_ulong, + pub arm_cpsr: c_ulong, + pub fault_address: c_ulong, } } s_no_extra_traits! { pub struct __c_anonymous_uc_sigmask_with_padding { - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, /* Android has a wrong (smaller) sigset_t on x86. */ __padding_rt_sigset: u32, } pub union __c_anonymous_uc_sigmask { uc_sigmask: __c_anonymous_uc_sigmask_with_padding, - uc_sigmask64: ::sigset64_t, + uc_sigmask64: crate::sigset64_t, } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, pub uc_sigmask__c_anonymous_union: __c_anonymous_uc_sigmask, /* The kernel adds extra padding after uc_sigmask to match * glibc sigset_t on ARM. */ __padding: [c_char; 120], - __align: [::c_longlong; 0], - uc_regspace: [::c_ulong; 128], + __align: [c_longlong; 0], + uc_regspace: [c_ulong; 128], } } @@ -64,16 +66,16 @@ cfg_if! { } } impl Eq for __c_anonymous_uc_sigmask_with_padding {} - impl ::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uc_sigmask_with_padding") .field("uc_sigmask_with_padding", &self.uc_sigmask) // Ignore padding .finish() } } - impl ::hash::Hash for __c_anonymous_uc_sigmask_with_padding { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_uc_sigmask_with_padding { + fn hash(&self, state: &mut H) { self.uc_sigmask.hash(state) // Ignore padding } @@ -85,15 +87,15 @@ cfg_if! { } } impl Eq for __c_anonymous_uc_sigmask {} - impl ::fmt::Debug for __c_anonymous_uc_sigmask { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_uc_sigmask { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uc_sigmask") .field("uc_sigmask", unsafe { &self.uc_sigmask }) .finish() } } - impl ::hash::Hash for __c_anonymous_uc_sigmask { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_uc_sigmask { + fn hash(&self, state: &mut H) { unsafe { self.uc_sigmask.hash(state) } } } @@ -110,8 +112,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -126,8 +128,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -140,410 +142,410 @@ cfg_if! { } } -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_LARGEFILE: ::c_int = 0o400000; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_LARGEFILE: c_int = 0o400000; -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_pause: ::c_long = 29; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS_getdents: ::c_long = 141; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_pivot_root: ::c_long = 218; -pub const SYS_mincore: ::c_long = 219; -pub const SYS_madvise: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_io_setup: ::c_long = 243; -pub const SYS_io_destroy: ::c_long = 244; -pub const SYS_io_getevents: ::c_long = 245; -pub const SYS_io_submit: ::c_long = 246; -pub const SYS_io_cancel: ::c_long = 247; -pub const SYS_exit_group: ::c_long = 248; -pub const SYS_lookup_dcookie: ::c_long = 249; -pub const SYS_epoll_create: ::c_long = 250; -pub const SYS_epoll_ctl: ::c_long = 251; -pub const SYS_epoll_wait: ::c_long = 252; -pub const SYS_remap_file_pages: ::c_long = 253; -pub const SYS_set_tid_address: ::c_long = 256; -pub const SYS_timer_create: ::c_long = 257; -pub const SYS_timer_settime: ::c_long = 258; -pub const SYS_timer_gettime: ::c_long = 259; -pub const SYS_timer_getoverrun: ::c_long = 260; -pub const SYS_timer_delete: ::c_long = 261; -pub const SYS_clock_settime: ::c_long = 262; -pub const SYS_clock_gettime: ::c_long = 263; -pub const SYS_clock_getres: ::c_long = 264; -pub const SYS_clock_nanosleep: ::c_long = 265; -pub const SYS_statfs64: ::c_long = 266; -pub const SYS_fstatfs64: ::c_long = 267; -pub const SYS_tgkill: ::c_long = 268; -pub const SYS_utimes: ::c_long = 269; -pub const SYS_arm_fadvise64_64: ::c_long = 270; -pub const SYS_pciconfig_iobase: ::c_long = 271; -pub const SYS_pciconfig_read: ::c_long = 272; -pub const SYS_pciconfig_write: ::c_long = 273; -pub const SYS_mq_open: ::c_long = 274; -pub const SYS_mq_unlink: ::c_long = 275; -pub const SYS_mq_timedsend: ::c_long = 276; -pub const SYS_mq_timedreceive: ::c_long = 277; -pub const SYS_mq_notify: ::c_long = 278; -pub const SYS_mq_getsetattr: ::c_long = 279; -pub const SYS_waitid: ::c_long = 280; -pub const SYS_socket: ::c_long = 281; -pub const SYS_bind: ::c_long = 282; -pub const SYS_connect: ::c_long = 283; -pub const SYS_listen: ::c_long = 284; -pub const SYS_accept: ::c_long = 285; -pub const SYS_getsockname: ::c_long = 286; -pub const SYS_getpeername: ::c_long = 287; -pub const SYS_socketpair: ::c_long = 288; -pub const SYS_send: ::c_long = 289; -pub const SYS_sendto: ::c_long = 290; -pub const SYS_recv: ::c_long = 291; -pub const SYS_recvfrom: ::c_long = 292; -pub const SYS_shutdown: ::c_long = 293; -pub const SYS_setsockopt: ::c_long = 294; -pub const SYS_getsockopt: ::c_long = 295; -pub const SYS_sendmsg: ::c_long = 296; -pub const SYS_recvmsg: ::c_long = 297; -pub const SYS_semop: ::c_long = 298; -pub const SYS_semget: ::c_long = 299; -pub const SYS_semctl: ::c_long = 300; -pub const SYS_msgsnd: ::c_long = 301; -pub const SYS_msgrcv: ::c_long = 302; -pub const SYS_msgget: ::c_long = 303; -pub const SYS_msgctl: ::c_long = 304; -pub const SYS_shmat: ::c_long = 305; -pub const SYS_shmdt: ::c_long = 306; -pub const SYS_shmget: ::c_long = 307; -pub const SYS_shmctl: ::c_long = 308; -pub const SYS_add_key: ::c_long = 309; -pub const SYS_request_key: ::c_long = 310; -pub const SYS_keyctl: ::c_long = 311; -pub const SYS_semtimedop: ::c_long = 312; -pub const SYS_vserver: ::c_long = 313; -pub const SYS_ioprio_set: ::c_long = 314; -pub const SYS_ioprio_get: ::c_long = 315; -pub const SYS_inotify_init: ::c_long = 316; -pub const SYS_inotify_add_watch: ::c_long = 317; -pub const SYS_inotify_rm_watch: ::c_long = 318; -pub const SYS_mbind: ::c_long = 319; -pub const SYS_get_mempolicy: ::c_long = 320; -pub const SYS_set_mempolicy: ::c_long = 321; -pub const SYS_openat: ::c_long = 322; -pub const SYS_mkdirat: ::c_long = 323; -pub const SYS_mknodat: ::c_long = 324; -pub const SYS_fchownat: ::c_long = 325; -pub const SYS_futimesat: ::c_long = 326; -pub const SYS_fstatat64: ::c_long = 327; -pub const SYS_unlinkat: ::c_long = 328; -pub const SYS_renameat: ::c_long = 329; -pub const SYS_linkat: ::c_long = 330; -pub const SYS_symlinkat: ::c_long = 331; -pub const SYS_readlinkat: ::c_long = 332; -pub const SYS_fchmodat: ::c_long = 333; -pub const SYS_faccessat: ::c_long = 334; -pub const SYS_pselect6: ::c_long = 335; -pub const SYS_ppoll: ::c_long = 336; -pub const SYS_unshare: ::c_long = 337; -pub const SYS_set_robust_list: ::c_long = 338; -pub const SYS_get_robust_list: ::c_long = 339; -pub const SYS_splice: ::c_long = 340; -pub const SYS_arm_sync_file_range: ::c_long = 341; -pub const SYS_tee: ::c_long = 342; -pub const SYS_vmsplice: ::c_long = 343; -pub const SYS_move_pages: ::c_long = 344; -pub const SYS_getcpu: ::c_long = 345; -pub const SYS_epoll_pwait: ::c_long = 346; -pub const SYS_kexec_load: ::c_long = 347; -pub const SYS_utimensat: ::c_long = 348; -pub const SYS_signalfd: ::c_long = 349; -pub const SYS_timerfd_create: ::c_long = 350; -pub const SYS_eventfd: ::c_long = 351; -pub const SYS_fallocate: ::c_long = 352; -pub const SYS_timerfd_settime: ::c_long = 353; -pub const SYS_timerfd_gettime: ::c_long = 354; -pub const SYS_signalfd4: ::c_long = 355; -pub const SYS_eventfd2: ::c_long = 356; -pub const SYS_epoll_create1: ::c_long = 357; -pub const SYS_dup3: ::c_long = 358; -pub const SYS_pipe2: ::c_long = 359; -pub const SYS_inotify_init1: ::c_long = 360; -pub const SYS_preadv: ::c_long = 361; -pub const SYS_pwritev: ::c_long = 362; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 363; -pub const SYS_perf_event_open: ::c_long = 364; -pub const SYS_recvmmsg: ::c_long = 365; -pub const SYS_accept4: ::c_long = 366; -pub const SYS_fanotify_init: ::c_long = 367; -pub const SYS_fanotify_mark: ::c_long = 368; -pub const SYS_prlimit64: ::c_long = 369; -pub const SYS_name_to_handle_at: ::c_long = 370; -pub const SYS_open_by_handle_at: ::c_long = 371; -pub const SYS_clock_adjtime: ::c_long = 372; -pub const SYS_syncfs: ::c_long = 373; -pub const SYS_sendmmsg: ::c_long = 374; -pub const SYS_setns: ::c_long = 375; -pub const SYS_process_vm_readv: ::c_long = 376; -pub const SYS_process_vm_writev: ::c_long = 377; -pub const SYS_kcmp: ::c_long = 378; -pub const SYS_finit_module: ::c_long = 379; -pub const SYS_sched_setattr: ::c_long = 380; -pub const SYS_sched_getattr: ::c_long = 381; -pub const SYS_renameat2: ::c_long = 382; -pub const SYS_seccomp: ::c_long = 383; -pub const SYS_getrandom: ::c_long = 384; -pub const SYS_memfd_create: ::c_long = 385; -pub const SYS_bpf: ::c_long = 386; -pub const SYS_execveat: ::c_long = 387; -pub const SYS_userfaultfd: ::c_long = 388; -pub const SYS_membarrier: ::c_long = 389; -pub const SYS_mlock2: ::c_long = 390; -pub const SYS_copy_file_range: ::c_long = 391; -pub const SYS_preadv2: ::c_long = 392; -pub const SYS_pwritev2: ::c_long = 393; -pub const SYS_pkey_mprotect: ::c_long = 394; -pub const SYS_pkey_alloc: ::c_long = 395; -pub const SYS_pkey_free: ::c_long = 396; -pub const SYS_statx: ::c_long = 397; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_ptrace: c_long = 26; +pub const SYS_pause: c_long = 29; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_symlink: c_long = 83; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_vhangup: c_long = 111; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS_getdents: c_long = 141; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_pivot_root: c_long = 218; +pub const SYS_mincore: c_long = 219; +pub const SYS_madvise: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_io_setup: c_long = 243; +pub const SYS_io_destroy: c_long = 244; +pub const SYS_io_getevents: c_long = 245; +pub const SYS_io_submit: c_long = 246; +pub const SYS_io_cancel: c_long = 247; +pub const SYS_exit_group: c_long = 248; +pub const SYS_lookup_dcookie: c_long = 249; +pub const SYS_epoll_create: c_long = 250; +pub const SYS_epoll_ctl: c_long = 251; +pub const SYS_epoll_wait: c_long = 252; +pub const SYS_remap_file_pages: c_long = 253; +pub const SYS_set_tid_address: c_long = 256; +pub const SYS_timer_create: c_long = 257; +pub const SYS_timer_settime: c_long = 258; +pub const SYS_timer_gettime: c_long = 259; +pub const SYS_timer_getoverrun: c_long = 260; +pub const SYS_timer_delete: c_long = 261; +pub const SYS_clock_settime: c_long = 262; +pub const SYS_clock_gettime: c_long = 263; +pub const SYS_clock_getres: c_long = 264; +pub const SYS_clock_nanosleep: c_long = 265; +pub const SYS_statfs64: c_long = 266; +pub const SYS_fstatfs64: c_long = 267; +pub const SYS_tgkill: c_long = 268; +pub const SYS_utimes: c_long = 269; +pub const SYS_arm_fadvise64_64: c_long = 270; +pub const SYS_pciconfig_iobase: c_long = 271; +pub const SYS_pciconfig_read: c_long = 272; +pub const SYS_pciconfig_write: c_long = 273; +pub const SYS_mq_open: c_long = 274; +pub const SYS_mq_unlink: c_long = 275; +pub const SYS_mq_timedsend: c_long = 276; +pub const SYS_mq_timedreceive: c_long = 277; +pub const SYS_mq_notify: c_long = 278; +pub const SYS_mq_getsetattr: c_long = 279; +pub const SYS_waitid: c_long = 280; +pub const SYS_socket: c_long = 281; +pub const SYS_bind: c_long = 282; +pub const SYS_connect: c_long = 283; +pub const SYS_listen: c_long = 284; +pub const SYS_accept: c_long = 285; +pub const SYS_getsockname: c_long = 286; +pub const SYS_getpeername: c_long = 287; +pub const SYS_socketpair: c_long = 288; +pub const SYS_send: c_long = 289; +pub const SYS_sendto: c_long = 290; +pub const SYS_recv: c_long = 291; +pub const SYS_recvfrom: c_long = 292; +pub const SYS_shutdown: c_long = 293; +pub const SYS_setsockopt: c_long = 294; +pub const SYS_getsockopt: c_long = 295; +pub const SYS_sendmsg: c_long = 296; +pub const SYS_recvmsg: c_long = 297; +pub const SYS_semop: c_long = 298; +pub const SYS_semget: c_long = 299; +pub const SYS_semctl: c_long = 300; +pub const SYS_msgsnd: c_long = 301; +pub const SYS_msgrcv: c_long = 302; +pub const SYS_msgget: c_long = 303; +pub const SYS_msgctl: c_long = 304; +pub const SYS_shmat: c_long = 305; +pub const SYS_shmdt: c_long = 306; +pub const SYS_shmget: c_long = 307; +pub const SYS_shmctl: c_long = 308; +pub const SYS_add_key: c_long = 309; +pub const SYS_request_key: c_long = 310; +pub const SYS_keyctl: c_long = 311; +pub const SYS_semtimedop: c_long = 312; +pub const SYS_vserver: c_long = 313; +pub const SYS_ioprio_set: c_long = 314; +pub const SYS_ioprio_get: c_long = 315; +pub const SYS_inotify_init: c_long = 316; +pub const SYS_inotify_add_watch: c_long = 317; +pub const SYS_inotify_rm_watch: c_long = 318; +pub const SYS_mbind: c_long = 319; +pub const SYS_get_mempolicy: c_long = 320; +pub const SYS_set_mempolicy: c_long = 321; +pub const SYS_openat: c_long = 322; +pub const SYS_mkdirat: c_long = 323; +pub const SYS_mknodat: c_long = 324; +pub const SYS_fchownat: c_long = 325; +pub const SYS_futimesat: c_long = 326; +pub const SYS_fstatat64: c_long = 327; +pub const SYS_unlinkat: c_long = 328; +pub const SYS_renameat: c_long = 329; +pub const SYS_linkat: c_long = 330; +pub const SYS_symlinkat: c_long = 331; +pub const SYS_readlinkat: c_long = 332; +pub const SYS_fchmodat: c_long = 333; +pub const SYS_faccessat: c_long = 334; +pub const SYS_pselect6: c_long = 335; +pub const SYS_ppoll: c_long = 336; +pub const SYS_unshare: c_long = 337; +pub const SYS_set_robust_list: c_long = 338; +pub const SYS_get_robust_list: c_long = 339; +pub const SYS_splice: c_long = 340; +pub const SYS_arm_sync_file_range: c_long = 341; +pub const SYS_tee: c_long = 342; +pub const SYS_vmsplice: c_long = 343; +pub const SYS_move_pages: c_long = 344; +pub const SYS_getcpu: c_long = 345; +pub const SYS_epoll_pwait: c_long = 346; +pub const SYS_kexec_load: c_long = 347; +pub const SYS_utimensat: c_long = 348; +pub const SYS_signalfd: c_long = 349; +pub const SYS_timerfd_create: c_long = 350; +pub const SYS_eventfd: c_long = 351; +pub const SYS_fallocate: c_long = 352; +pub const SYS_timerfd_settime: c_long = 353; +pub const SYS_timerfd_gettime: c_long = 354; +pub const SYS_signalfd4: c_long = 355; +pub const SYS_eventfd2: c_long = 356; +pub const SYS_epoll_create1: c_long = 357; +pub const SYS_dup3: c_long = 358; +pub const SYS_pipe2: c_long = 359; +pub const SYS_inotify_init1: c_long = 360; +pub const SYS_preadv: c_long = 361; +pub const SYS_pwritev: c_long = 362; +pub const SYS_rt_tgsigqueueinfo: c_long = 363; +pub const SYS_perf_event_open: c_long = 364; +pub const SYS_recvmmsg: c_long = 365; +pub const SYS_accept4: c_long = 366; +pub const SYS_fanotify_init: c_long = 367; +pub const SYS_fanotify_mark: c_long = 368; +pub const SYS_prlimit64: c_long = 369; +pub const SYS_name_to_handle_at: c_long = 370; +pub const SYS_open_by_handle_at: c_long = 371; +pub const SYS_clock_adjtime: c_long = 372; +pub const SYS_syncfs: c_long = 373; +pub const SYS_sendmmsg: c_long = 374; +pub const SYS_setns: c_long = 375; +pub const SYS_process_vm_readv: c_long = 376; +pub const SYS_process_vm_writev: c_long = 377; +pub const SYS_kcmp: c_long = 378; +pub const SYS_finit_module: c_long = 379; +pub const SYS_sched_setattr: c_long = 380; +pub const SYS_sched_getattr: c_long = 381; +pub const SYS_renameat2: c_long = 382; +pub const SYS_seccomp: c_long = 383; +pub const SYS_getrandom: c_long = 384; +pub const SYS_memfd_create: c_long = 385; +pub const SYS_bpf: c_long = 386; +pub const SYS_execveat: c_long = 387; +pub const SYS_userfaultfd: c_long = 388; +pub const SYS_membarrier: c_long = 389; +pub const SYS_mlock2: c_long = 390; +pub const SYS_copy_file_range: c_long = 391; +pub const SYS_preadv2: c_long = 392; +pub const SYS_pwritev2: c_long = 393; +pub const SYS_pkey_mprotect: c_long = 394; +pub const SYS_pkey_alloc: c_long = 395; +pub const SYS_pkey_free: c_long = 396; +pub const SYS_statx: c_long = 397; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; // offsets in mcontext_t.gregs from sys/ucontext.h -pub const REG_R0: ::c_int = 0; -pub const REG_R1: ::c_int = 1; -pub const REG_R2: ::c_int = 2; -pub const REG_R3: ::c_int = 3; -pub const REG_R4: ::c_int = 4; -pub const REG_R5: ::c_int = 5; -pub const REG_R6: ::c_int = 6; -pub const REG_R7: ::c_int = 7; -pub const REG_R8: ::c_int = 8; -pub const REG_R9: ::c_int = 9; -pub const REG_R10: ::c_int = 10; -pub const REG_R11: ::c_int = 11; -pub const REG_R12: ::c_int = 12; -pub const REG_R13: ::c_int = 13; -pub const REG_R14: ::c_int = 14; -pub const REG_R15: ::c_int = 15; +pub const REG_R0: c_int = 0; +pub const REG_R1: c_int = 1; +pub const REG_R2: c_int = 2; +pub const REG_R3: c_int = 3; +pub const REG_R4: c_int = 4; +pub const REG_R5: c_int = 5; +pub const REG_R6: c_int = 6; +pub const REG_R7: c_int = 7; +pub const REG_R8: c_int = 8; +pub const REG_R9: c_int = 9; +pub const REG_R10: c_int = 10; +pub const REG_R11: c_int = 11; +pub const REG_R12: c_int = 12; +pub const REG_R13: c_int = 13; +pub const REG_R14: c_int = 14; +pub const REG_R15: c_int = 15; -pub const NGREG: ::c_int = 18; +pub const NGREG: c_int = 18; // From NDK's asm/auxvec.h -pub const AT_SYSINFO_EHDR: ::c_ulong = 33; +pub const AT_SYSINFO_EHDR: c_ulong = 33; f! { // Sadly, Android before 5.0 (API level 21), the accept4 syscall is not @@ -552,11 +554,11 @@ f! { // Android is bumped. When the workaround is removed, `accept4` can be // moved back to `linux_like/mod.rs` pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int { - ::syscall(SYS_accept4, fd, addr, len, flg) as ::c_int + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int { + crate::syscall(SYS_accept4, fd, addr, len, flg) as c_int } } diff --git a/src/unix/linux_like/android/b32/mod.rs b/src/unix/linux_like/android/b32/mod.rs index 49f7579463c11..8ef7a917007a1 100644 --- a/src/unix/linux_like/android/b32/mod.rs +++ b/src/unix/linux_like/android/b32/mod.rs @@ -1,22 +1,24 @@ +use crate::{c_int, c_longlong, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, size_t}; + // The following definitions are correct for arm and i686, // but may be wrong for mips pub type c_long = i32; pub type c_ulong = u32; pub type mode_t = u16; -pub type off64_t = ::c_longlong; -pub type sigset_t = ::c_ulong; +pub type off64_t = c_longlong; +pub type sigset_t = c_ulong; pub type socklen_t = i32; pub type time64_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct rlimit64 { @@ -25,47 +27,47 @@ s! { } pub struct stat { - pub st_dev: ::c_ulonglong, - __pad0: [::c_uchar; 4], - __st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulonglong, - __pad3: [::c_uchar; 4], - pub st_size: ::c_longlong, - pub st_blksize: ::blksize_t, - pub st_blocks: ::c_ulonglong, - pub st_atime: ::c_long, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::c_long, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::c_long, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::c_ulonglong, + pub st_dev: c_ulonglong, + __pad0: [c_uchar; 4], + __st_ino: crate::ino_t, + pub st_mode: c_uint, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulonglong, + __pad3: [c_uchar; 4], + pub st_size: c_longlong, + pub st_blksize: crate::blksize_t, + pub st_blocks: c_ulonglong, + pub st_atime: c_long, + pub st_atime_nsec: c_long, + pub st_mtime: c_long, + pub st_mtime_nsec: c_long, + pub st_ctime: c_long, + pub st_ctime_nsec: c_long, + pub st_ino: c_ulonglong, } pub struct stat64 { - pub st_dev: ::c_ulonglong, - __pad0: [::c_uchar; 4], - __st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulonglong, - __pad3: [::c_uchar; 4], - pub st_size: ::c_longlong, - pub st_blksize: ::blksize_t, - pub st_blocks: ::c_ulonglong, - pub st_atime: ::c_long, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::c_long, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::c_long, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::c_ulonglong, + pub st_dev: c_ulonglong, + __pad0: [c_uchar; 4], + __st_ino: crate::ino_t, + pub st_mode: c_uint, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulonglong, + __pad3: [c_uchar; 4], + pub st_size: c_longlong, + pub st_blksize: crate::blksize_t, + pub st_blocks: c_ulonglong, + pub st_atime: c_long, + pub st_atime_nsec: c_long, + pub st_mtime: c_long, + pub st_mtime_nsec: c_long, + pub st_ctime: c_long, + pub st_ctime_nsec: c_long, + pub st_ino: c_ulonglong, } pub struct statfs64 { @@ -76,7 +78,7 @@ s! { pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::__fsid_t, + pub f_fsid: crate::__fsid_t, pub f_namelen: u32, pub f_frsize: u32, pub f_flags: u32, @@ -84,45 +86,45 @@ s! { } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::c_ulong, - pub f_bfree: ::c_ulong, - pub f_bavail: ::c_ulong, - pub f_files: ::c_ulong, - pub f_ffree: ::c_ulong, - pub f_favail: ::c_ulong, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: c_ulong, + pub f_bfree: c_ulong, + pub f_bavail: c_ulong, + pub f_files: c_ulong, + pub f_ffree: c_ulong, + pub f_favail: c_ulong, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, } pub struct pthread_attr_t { pub flags: u32, - pub stack_base: *mut ::c_void, - pub stack_size: ::size_t, - pub guard_size: ::size_t, + pub stack_base: *mut c_void, + pub stack_size: size_t, + pub guard_size: size_t, pub sched_policy: i32, pub sched_priority: i32, } pub struct pthread_mutex_t { - value: ::c_int, + value: c_int, } pub struct pthread_cond_t { - value: ::c_int, + value: c_int, } pub struct pthread_rwlock_t { lock: pthread_mutex_t, cond: pthread_cond_t, - numLocks: ::c_int, - writerThreadId: ::c_int, - pendingReaders: ::c_int, - pendingWriters: ::c_int, + numLocks: c_int, + writerThreadId: c_int, + pendingReaders: c_int, + pendingWriters: c_int, attr: i32, - __reserved: [::c_char; 12], + __reserved: [c_char; 12], } pub struct pthread_barrier_t { @@ -134,12 +136,12 @@ s! { } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct statfs { @@ -150,7 +152,7 @@ s! { pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::__fsid_t, + pub f_fsid: crate::__fsid_t, pub f_namelen: u32, pub f_frsize: u32, pub f_flags: u32, @@ -158,33 +160,33 @@ s! { } pub struct sysinfo { - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 8], + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 8], } } s_no_extra_traits! { pub struct sigset64_t { - __bits: [::c_ulong; 2], + __bits: [c_ulong; 2], } } cfg_if! { if #[cfg(feature = "extra_traits")] { - impl ::fmt::Debug for sigset64_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigset64_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigset64_t") .field("__bits", &self.__bits) .finish() @@ -194,20 +196,20 @@ cfg_if! { } // These constants must be of the same type of sigaction.sa_flags -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; +pub const SA_NOCLDSTOP: c_int = 0x00000001; +pub const SA_NOCLDWAIT: c_int = 0x00000002; +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_SIGINFO: c_int = 0x00000004; -pub const RTLD_GLOBAL: ::c_int = 2; -pub const RTLD_NOW: ::c_int = 0; -pub const RTLD_DEFAULT: *mut ::c_void = -1isize as *mut ::c_void; +pub const RTLD_GLOBAL: c_int = 2; +pub const RTLD_NOW: c_int = 0; +pub const RTLD_DEFAULT: *mut c_void = -1isize as *mut c_void; -pub const PTRACE_GETFPREGS: ::c_int = 14; -pub const PTRACE_SETFPREGS: ::c_int = 15; +pub const PTRACE_GETFPREGS: c_int = 14; +pub const PTRACE_SETFPREGS: c_int = 15; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { value: 0 }; pub const PTHREAD_COND_INITIALIZER: pthread_cond_t = pthread_cond_t { value: 0 }; @@ -221,19 +223,19 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { attr: 0, __reserved: [0; 12], }; -pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 2; -pub const CPU_SETSIZE: ::size_t = 32; -pub const __CPU_BITS: ::size_t = 32; +pub const PTHREAD_STACK_MIN: size_t = 4096 * 2; +pub const CPU_SETSIZE: size_t = 32; +pub const __CPU_BITS: size_t = 32; pub const UT_LINESIZE: usize = 8; pub const UT_NAMESIZE: usize = 8; pub const UT_HOSTSIZE: usize = 16; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; extern "C" { - pub fn timegm64(tm: *const ::tm) -> ::time64_t; + pub fn timegm64(tm: *const crate::tm) -> crate::time64_t; } cfg_if! { diff --git a/src/unix/linux_like/android/b32/x86/mod.rs b/src/unix/linux_like/android/b32/x86/mod.rs index 742916bf8861d..a456ad6a4a34b 100644 --- a/src/unix/linux_like/android/b32/x86/mod.rs +++ b/src/unix/linux_like/android/b32/x86/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_long, c_ulong}; + pub type c_char = i8; pub type wchar_t = i32; pub type greg_t = i32; @@ -9,41 +11,41 @@ s! { } pub struct _libc_fpstate { - pub cw: ::c_ulong, - pub sw: ::c_ulong, - pub tag: ::c_ulong, - pub ipoff: ::c_ulong, - pub cssel: ::c_ulong, - pub dataoff: ::c_ulong, - pub datasel: ::c_ulong, + pub cw: c_ulong, + pub sw: c_ulong, + pub tag: c_ulong, + pub ipoff: c_ulong, + pub cssel: c_ulong, + pub dataoff: c_ulong, + pub datasel: c_ulong, pub _st: [_libc_fpreg; 8], - pub status: ::c_ulong, + pub status: c_ulong, } pub struct mcontext_t { pub gregs: [greg_t; 19], pub fpregs: *mut _libc_fpstate, - pub oldmask: ::c_ulong, - pub cr2: ::c_ulong, + pub oldmask: c_ulong, + pub cr2: c_ulong, } } s_no_extra_traits! { pub struct __c_anonymous_uc_sigmask_with_padding { - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, /* Android has a wrong (smaller) sigset_t on x86. */ __padding_rt_sigset: u32, } pub union __c_anonymous_uc_sigmask { uc_sigmask: __c_anonymous_uc_sigmask_with_padding, - uc_sigmask64: ::sigset64_t, + uc_sigmask64: crate::sigset64_t, } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, pub uc_sigmask__c_anonymous_union: __c_anonymous_uc_sigmask, __padding_rt_sigset: u32, @@ -66,16 +68,16 @@ cfg_if! { } } impl Eq for __c_anonymous_uc_sigmask_with_padding {} - impl ::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_uc_sigmask_with_padding { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uc_sigmask_with_padding") .field("uc_sigmask_with_padding", &self.uc_sigmask) // Ignore padding .finish() } } - impl ::hash::Hash for __c_anonymous_uc_sigmask_with_padding { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_uc_sigmask_with_padding { + fn hash(&self, state: &mut H) { self.uc_sigmask.hash(state) // Ignore padding } @@ -87,15 +89,15 @@ cfg_if! { } } impl Eq for __c_anonymous_uc_sigmask {} - impl ::fmt::Debug for __c_anonymous_uc_sigmask { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_uc_sigmask { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uc_sigmask") .field("uc_sigmask", unsafe { &self.uc_sigmask }) .finish() } } - impl ::hash::Hash for __c_anonymous_uc_sigmask { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_uc_sigmask { + fn hash(&self, state: &mut H) { unsafe { self.uc_sigmask.hash(state) } } } @@ -111,8 +113,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -126,8 +128,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -139,475 +141,475 @@ cfg_if! { } } -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_LARGEFILE: ::c_int = 0o0100000; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_LARGEFILE: c_int = 0o0100000; -pub const MAP_32BIT: ::c_int = 0x40; +pub const MAP_32BIT: c_int = 0x40; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86old: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86old: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; // FIXME: SYS__llseek is in the NDK sources but for some reason is // not available in the tests -// pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; +// pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; // FIXME: SYS__newselect is in the NDK sources but for some reason is // not available in the tests -// pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; +// pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; // FIXME: SYS__llseek is in the NDK sources but for some reason is // not available in the tests -// pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_vm86: ::c_long = 166; -pub const SYS_query_module: ::c_long = 167; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_getpmsg: ::c_long = 188; -pub const SYS_putpmsg: ::c_long = 189; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_pivot_root: ::c_long = 217; -pub const SYS_mincore: ::c_long = 218; -pub const SYS_madvise: ::c_long = 219; -pub const SYS_getdents64: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_set_thread_area: ::c_long = 243; -pub const SYS_get_thread_area: ::c_long = 244; -pub const SYS_io_setup: ::c_long = 245; -pub const SYS_io_destroy: ::c_long = 246; -pub const SYS_io_getevents: ::c_long = 247; -pub const SYS_io_submit: ::c_long = 248; -pub const SYS_io_cancel: ::c_long = 249; -pub const SYS_fadvise64: ::c_long = 250; -pub const SYS_exit_group: ::c_long = 252; -pub const SYS_lookup_dcookie: ::c_long = 253; -pub const SYS_epoll_create: ::c_long = 254; -pub const SYS_epoll_ctl: ::c_long = 255; -pub const SYS_epoll_wait: ::c_long = 256; -pub const SYS_remap_file_pages: ::c_long = 257; -pub const SYS_set_tid_address: ::c_long = 258; -pub const SYS_timer_create: ::c_long = 259; -pub const SYS_timer_settime: ::c_long = 260; -pub const SYS_timer_gettime: ::c_long = 261; -pub const SYS_timer_getoverrun: ::c_long = 262; -pub const SYS_timer_delete: ::c_long = 263; -pub const SYS_clock_settime: ::c_long = 264; -pub const SYS_clock_gettime: ::c_long = 265; -pub const SYS_clock_getres: ::c_long = 266; -pub const SYS_clock_nanosleep: ::c_long = 267; -pub const SYS_statfs64: ::c_long = 268; -pub const SYS_fstatfs64: ::c_long = 269; -pub const SYS_tgkill: ::c_long = 270; -pub const SYS_utimes: ::c_long = 271; -pub const SYS_fadvise64_64: ::c_long = 272; -pub const SYS_vserver: ::c_long = 273; -pub const SYS_mbind: ::c_long = 274; -pub const SYS_get_mempolicy: ::c_long = 275; -pub const SYS_set_mempolicy: ::c_long = 276; -pub const SYS_mq_open: ::c_long = 277; -pub const SYS_mq_unlink: ::c_long = 278; -pub const SYS_mq_timedsend: ::c_long = 279; -pub const SYS_mq_timedreceive: ::c_long = 280; -pub const SYS_mq_notify: ::c_long = 281; -pub const SYS_mq_getsetattr: ::c_long = 282; -pub const SYS_kexec_load: ::c_long = 283; -pub const SYS_waitid: ::c_long = 284; -pub const SYS_add_key: ::c_long = 286; -pub const SYS_request_key: ::c_long = 287; -pub const SYS_keyctl: ::c_long = 288; -pub const SYS_ioprio_set: ::c_long = 289; -pub const SYS_ioprio_get: ::c_long = 290; -pub const SYS_inotify_init: ::c_long = 291; -pub const SYS_inotify_add_watch: ::c_long = 292; -pub const SYS_inotify_rm_watch: ::c_long = 293; -pub const SYS_migrate_pages: ::c_long = 294; -pub const SYS_openat: ::c_long = 295; -pub const SYS_mkdirat: ::c_long = 296; -pub const SYS_mknodat: ::c_long = 297; -pub const SYS_fchownat: ::c_long = 298; -pub const SYS_futimesat: ::c_long = 299; -pub const SYS_fstatat64: ::c_long = 300; -pub const SYS_unlinkat: ::c_long = 301; -pub const SYS_renameat: ::c_long = 302; -pub const SYS_linkat: ::c_long = 303; -pub const SYS_symlinkat: ::c_long = 304; -pub const SYS_readlinkat: ::c_long = 305; -pub const SYS_fchmodat: ::c_long = 306; -pub const SYS_faccessat: ::c_long = 307; -pub const SYS_pselect6: ::c_long = 308; -pub const SYS_ppoll: ::c_long = 309; -pub const SYS_unshare: ::c_long = 310; -pub const SYS_set_robust_list: ::c_long = 311; -pub const SYS_get_robust_list: ::c_long = 312; -pub const SYS_splice: ::c_long = 313; -pub const SYS_sync_file_range: ::c_long = 314; -pub const SYS_tee: ::c_long = 315; -pub const SYS_vmsplice: ::c_long = 316; -pub const SYS_move_pages: ::c_long = 317; -pub const SYS_getcpu: ::c_long = 318; -pub const SYS_epoll_pwait: ::c_long = 319; -pub const SYS_utimensat: ::c_long = 320; -pub const SYS_signalfd: ::c_long = 321; -pub const SYS_timerfd_create: ::c_long = 322; -pub const SYS_eventfd: ::c_long = 323; -pub const SYS_fallocate: ::c_long = 324; -pub const SYS_timerfd_settime: ::c_long = 325; -pub const SYS_timerfd_gettime: ::c_long = 326; -pub const SYS_signalfd4: ::c_long = 327; -pub const SYS_eventfd2: ::c_long = 328; -pub const SYS_epoll_create1: ::c_long = 329; -pub const SYS_dup3: ::c_long = 330; -pub const SYS_pipe2: ::c_long = 331; -pub const SYS_inotify_init1: ::c_long = 332; -pub const SYS_preadv: ::c_long = 333; -pub const SYS_pwritev: ::c_long = 334; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 335; -pub const SYS_perf_event_open: ::c_long = 336; -pub const SYS_recvmmsg: ::c_long = 337; -pub const SYS_fanotify_init: ::c_long = 338; -pub const SYS_fanotify_mark: ::c_long = 339; -pub const SYS_prlimit64: ::c_long = 340; -pub const SYS_name_to_handle_at: ::c_long = 341; -pub const SYS_open_by_handle_at: ::c_long = 342; -pub const SYS_clock_adjtime: ::c_long = 343; -pub const SYS_syncfs: ::c_long = 344; -pub const SYS_sendmmsg: ::c_long = 345; -pub const SYS_setns: ::c_long = 346; -pub const SYS_process_vm_readv: ::c_long = 347; -pub const SYS_process_vm_writev: ::c_long = 348; -pub const SYS_kcmp: ::c_long = 349; -pub const SYS_finit_module: ::c_long = 350; -pub const SYS_sched_setattr: ::c_long = 351; -pub const SYS_sched_getattr: ::c_long = 352; -pub const SYS_renameat2: ::c_long = 353; -pub const SYS_seccomp: ::c_long = 354; -pub const SYS_getrandom: ::c_long = 355; -pub const SYS_memfd_create: ::c_long = 356; -pub const SYS_bpf: ::c_long = 357; -pub const SYS_execveat: ::c_long = 358; -pub const SYS_socket: ::c_long = 359; -pub const SYS_socketpair: ::c_long = 360; -pub const SYS_bind: ::c_long = 361; -pub const SYS_connect: ::c_long = 362; -pub const SYS_listen: ::c_long = 363; -pub const SYS_accept4: ::c_long = 364; -pub const SYS_getsockopt: ::c_long = 365; -pub const SYS_setsockopt: ::c_long = 366; -pub const SYS_getsockname: ::c_long = 367; -pub const SYS_getpeername: ::c_long = 368; -pub const SYS_sendto: ::c_long = 369; -pub const SYS_sendmsg: ::c_long = 370; -pub const SYS_recvfrom: ::c_long = 371; -pub const SYS_recvmsg: ::c_long = 372; -pub const SYS_shutdown: ::c_long = 373; -pub const SYS_userfaultfd: ::c_long = 374; -pub const SYS_membarrier: ::c_long = 375; -pub const SYS_mlock2: ::c_long = 376; -pub const SYS_copy_file_range: ::c_long = 377; -pub const SYS_preadv2: ::c_long = 378; -pub const SYS_pwritev2: ::c_long = 379; -pub const SYS_pkey_mprotect: ::c_long = 380; -pub const SYS_pkey_alloc: ::c_long = 381; -pub const SYS_pkey_free: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +// pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_vm86: c_long = 166; +pub const SYS_query_module: c_long = 167; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_getpmsg: c_long = 188; +pub const SYS_putpmsg: c_long = 189; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_pivot_root: c_long = 217; +pub const SYS_mincore: c_long = 218; +pub const SYS_madvise: c_long = 219; +pub const SYS_getdents64: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_set_thread_area: c_long = 243; +pub const SYS_get_thread_area: c_long = 244; +pub const SYS_io_setup: c_long = 245; +pub const SYS_io_destroy: c_long = 246; +pub const SYS_io_getevents: c_long = 247; +pub const SYS_io_submit: c_long = 248; +pub const SYS_io_cancel: c_long = 249; +pub const SYS_fadvise64: c_long = 250; +pub const SYS_exit_group: c_long = 252; +pub const SYS_lookup_dcookie: c_long = 253; +pub const SYS_epoll_create: c_long = 254; +pub const SYS_epoll_ctl: c_long = 255; +pub const SYS_epoll_wait: c_long = 256; +pub const SYS_remap_file_pages: c_long = 257; +pub const SYS_set_tid_address: c_long = 258; +pub const SYS_timer_create: c_long = 259; +pub const SYS_timer_settime: c_long = 260; +pub const SYS_timer_gettime: c_long = 261; +pub const SYS_timer_getoverrun: c_long = 262; +pub const SYS_timer_delete: c_long = 263; +pub const SYS_clock_settime: c_long = 264; +pub const SYS_clock_gettime: c_long = 265; +pub const SYS_clock_getres: c_long = 266; +pub const SYS_clock_nanosleep: c_long = 267; +pub const SYS_statfs64: c_long = 268; +pub const SYS_fstatfs64: c_long = 269; +pub const SYS_tgkill: c_long = 270; +pub const SYS_utimes: c_long = 271; +pub const SYS_fadvise64_64: c_long = 272; +pub const SYS_vserver: c_long = 273; +pub const SYS_mbind: c_long = 274; +pub const SYS_get_mempolicy: c_long = 275; +pub const SYS_set_mempolicy: c_long = 276; +pub const SYS_mq_open: c_long = 277; +pub const SYS_mq_unlink: c_long = 278; +pub const SYS_mq_timedsend: c_long = 279; +pub const SYS_mq_timedreceive: c_long = 280; +pub const SYS_mq_notify: c_long = 281; +pub const SYS_mq_getsetattr: c_long = 282; +pub const SYS_kexec_load: c_long = 283; +pub const SYS_waitid: c_long = 284; +pub const SYS_add_key: c_long = 286; +pub const SYS_request_key: c_long = 287; +pub const SYS_keyctl: c_long = 288; +pub const SYS_ioprio_set: c_long = 289; +pub const SYS_ioprio_get: c_long = 290; +pub const SYS_inotify_init: c_long = 291; +pub const SYS_inotify_add_watch: c_long = 292; +pub const SYS_inotify_rm_watch: c_long = 293; +pub const SYS_migrate_pages: c_long = 294; +pub const SYS_openat: c_long = 295; +pub const SYS_mkdirat: c_long = 296; +pub const SYS_mknodat: c_long = 297; +pub const SYS_fchownat: c_long = 298; +pub const SYS_futimesat: c_long = 299; +pub const SYS_fstatat64: c_long = 300; +pub const SYS_unlinkat: c_long = 301; +pub const SYS_renameat: c_long = 302; +pub const SYS_linkat: c_long = 303; +pub const SYS_symlinkat: c_long = 304; +pub const SYS_readlinkat: c_long = 305; +pub const SYS_fchmodat: c_long = 306; +pub const SYS_faccessat: c_long = 307; +pub const SYS_pselect6: c_long = 308; +pub const SYS_ppoll: c_long = 309; +pub const SYS_unshare: c_long = 310; +pub const SYS_set_robust_list: c_long = 311; +pub const SYS_get_robust_list: c_long = 312; +pub const SYS_splice: c_long = 313; +pub const SYS_sync_file_range: c_long = 314; +pub const SYS_tee: c_long = 315; +pub const SYS_vmsplice: c_long = 316; +pub const SYS_move_pages: c_long = 317; +pub const SYS_getcpu: c_long = 318; +pub const SYS_epoll_pwait: c_long = 319; +pub const SYS_utimensat: c_long = 320; +pub const SYS_signalfd: c_long = 321; +pub const SYS_timerfd_create: c_long = 322; +pub const SYS_eventfd: c_long = 323; +pub const SYS_fallocate: c_long = 324; +pub const SYS_timerfd_settime: c_long = 325; +pub const SYS_timerfd_gettime: c_long = 326; +pub const SYS_signalfd4: c_long = 327; +pub const SYS_eventfd2: c_long = 328; +pub const SYS_epoll_create1: c_long = 329; +pub const SYS_dup3: c_long = 330; +pub const SYS_pipe2: c_long = 331; +pub const SYS_inotify_init1: c_long = 332; +pub const SYS_preadv: c_long = 333; +pub const SYS_pwritev: c_long = 334; +pub const SYS_rt_tgsigqueueinfo: c_long = 335; +pub const SYS_perf_event_open: c_long = 336; +pub const SYS_recvmmsg: c_long = 337; +pub const SYS_fanotify_init: c_long = 338; +pub const SYS_fanotify_mark: c_long = 339; +pub const SYS_prlimit64: c_long = 340; +pub const SYS_name_to_handle_at: c_long = 341; +pub const SYS_open_by_handle_at: c_long = 342; +pub const SYS_clock_adjtime: c_long = 343; +pub const SYS_syncfs: c_long = 344; +pub const SYS_sendmmsg: c_long = 345; +pub const SYS_setns: c_long = 346; +pub const SYS_process_vm_readv: c_long = 347; +pub const SYS_process_vm_writev: c_long = 348; +pub const SYS_kcmp: c_long = 349; +pub const SYS_finit_module: c_long = 350; +pub const SYS_sched_setattr: c_long = 351; +pub const SYS_sched_getattr: c_long = 352; +pub const SYS_renameat2: c_long = 353; +pub const SYS_seccomp: c_long = 354; +pub const SYS_getrandom: c_long = 355; +pub const SYS_memfd_create: c_long = 356; +pub const SYS_bpf: c_long = 357; +pub const SYS_execveat: c_long = 358; +pub const SYS_socket: c_long = 359; +pub const SYS_socketpair: c_long = 360; +pub const SYS_bind: c_long = 361; +pub const SYS_connect: c_long = 362; +pub const SYS_listen: c_long = 363; +pub const SYS_accept4: c_long = 364; +pub const SYS_getsockopt: c_long = 365; +pub const SYS_setsockopt: c_long = 366; +pub const SYS_getsockname: c_long = 367; +pub const SYS_getpeername: c_long = 368; +pub const SYS_sendto: c_long = 369; +pub const SYS_sendmsg: c_long = 370; +pub const SYS_recvfrom: c_long = 371; +pub const SYS_recvmsg: c_long = 372; +pub const SYS_shutdown: c_long = 373; +pub const SYS_userfaultfd: c_long = 374; +pub const SYS_membarrier: c_long = 375; +pub const SYS_mlock2: c_long = 376; +pub const SYS_copy_file_range: c_long = 377; +pub const SYS_preadv2: c_long = 378; +pub const SYS_pwritev2: c_long = 379; +pub const SYS_pkey_mprotect: c_long = 380; +pub const SYS_pkey_alloc: c_long = 381; +pub const SYS_pkey_free: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; // offsets in user_regs_structs, from sys/reg.h -pub const EBX: ::c_int = 0; -pub const ECX: ::c_int = 1; -pub const EDX: ::c_int = 2; -pub const ESI: ::c_int = 3; -pub const EDI: ::c_int = 4; -pub const EBP: ::c_int = 5; -pub const EAX: ::c_int = 6; -pub const DS: ::c_int = 7; -pub const ES: ::c_int = 8; -pub const FS: ::c_int = 9; -pub const GS: ::c_int = 10; -pub const ORIG_EAX: ::c_int = 11; -pub const EIP: ::c_int = 12; -pub const CS: ::c_int = 13; -pub const EFL: ::c_int = 14; -pub const UESP: ::c_int = 15; -pub const SS: ::c_int = 16; +pub const EBX: c_int = 0; +pub const ECX: c_int = 1; +pub const EDX: c_int = 2; +pub const ESI: c_int = 3; +pub const EDI: c_int = 4; +pub const EBP: c_int = 5; +pub const EAX: c_int = 6; +pub const DS: c_int = 7; +pub const ES: c_int = 8; +pub const FS: c_int = 9; +pub const GS: c_int = 10; +pub const ORIG_EAX: c_int = 11; +pub const EIP: c_int = 12; +pub const CS: c_int = 13; +pub const EFL: c_int = 14; +pub const UESP: c_int = 15; +pub const SS: c_int = 16; // offsets in mcontext_t.gregs from sys/ucontext.h -pub const REG_GS: ::c_int = 0; -pub const REG_FS: ::c_int = 1; -pub const REG_ES: ::c_int = 2; -pub const REG_DS: ::c_int = 3; -pub const REG_EDI: ::c_int = 4; -pub const REG_ESI: ::c_int = 5; -pub const REG_EBP: ::c_int = 6; -pub const REG_ESP: ::c_int = 7; -pub const REG_EBX: ::c_int = 8; -pub const REG_EDX: ::c_int = 9; -pub const REG_ECX: ::c_int = 10; -pub const REG_EAX: ::c_int = 11; -pub const REG_TRAPNO: ::c_int = 12; -pub const REG_ERR: ::c_int = 13; -pub const REG_EIP: ::c_int = 14; -pub const REG_CS: ::c_int = 15; -pub const REG_EFL: ::c_int = 16; -pub const REG_UESP: ::c_int = 17; -pub const REG_SS: ::c_int = 18; +pub const REG_GS: c_int = 0; +pub const REG_FS: c_int = 1; +pub const REG_ES: c_int = 2; +pub const REG_DS: c_int = 3; +pub const REG_EDI: c_int = 4; +pub const REG_ESI: c_int = 5; +pub const REG_EBP: c_int = 6; +pub const REG_ESP: c_int = 7; +pub const REG_EBX: c_int = 8; +pub const REG_EDX: c_int = 9; +pub const REG_ECX: c_int = 10; +pub const REG_EAX: c_int = 11; +pub const REG_TRAPNO: c_int = 12; +pub const REG_ERR: c_int = 13; +pub const REG_EIP: c_int = 14; +pub const REG_CS: c_int = 15; +pub const REG_EFL: c_int = 16; +pub const REG_UESP: c_int = 17; +pub const REG_SS: c_int = 18; // From NDK's asm/auxvec.h -pub const AT_SYSINFO: ::c_ulong = 32; -pub const AT_SYSINFO_EHDR: ::c_ulong = 33; -pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 3; +pub const AT_SYSINFO: c_ulong = 32; +pub const AT_SYSINFO_EHDR: c_ulong = 33; +pub const AT_VECTOR_SIZE_ARCH: c_ulong = 3; // socketcall values from linux/net.h (only the needed ones, and not public) -const SYS_ACCEPT4: ::c_int = 18; +const SYS_ACCEPT4: c_int = 18; f! { // Sadly, Android before 5.0 (API level 21), the accept4 syscall is not @@ -618,19 +620,14 @@ f! { // When the workaround is removed, `accept4` can be moved back // to `linux_like/mod.rs` pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int { + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int { // Arguments are passed as array of `long int` // (which is big enough on x86 for a pointer). - let mut args = [ - fd as ::c_long, - addr as ::c_long, - len as ::c_long, - flg as ::c_long, - ]; - ::syscall(SYS_socketcall, SYS_ACCEPT4, args[..].as_mut_ptr()) + let mut args = [fd as c_long, addr as c_long, len as c_long, flg as c_long]; + crate::syscall(SYS_socketcall, SYS_ACCEPT4, args[..].as_mut_ptr()) } } diff --git a/src/unix/linux_like/android/b64/aarch64/mod.rs b/src/unix/linux_like/android/b64/aarch64/mod.rs index 2ea2d2cfcc0ac..aceb52c0722d6 100644 --- a/src/unix/linux_like/android/b64/aarch64/mod.rs +++ b/src/unix/linux_like/android/b64/aarch64/mod.rs @@ -1,53 +1,55 @@ +use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, off64_t, size_t}; + pub type c_char = u8; pub type wchar_t = u32; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::c_ulong, - pub st_size: ::off64_t, - pub st_blksize: ::c_int, - __pad2: ::c_int, - pub st_blocks: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused4: ::c_uint, - __unused5: ::c_uint, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: c_uint, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: c_ulong, + pub st_size: off64_t, + pub st_blksize: c_int, + __pad2: c_int, + pub st_blocks: c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused4: c_uint, + __unused5: c_uint, } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::c_ulong, - pub st_size: ::off64_t, - pub st_blksize: ::c_int, - __pad2: ::c_int, - pub st_blocks: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused4: ::c_uint, - __unused5: ::c_uint, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: c_uint, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: c_ulong, + pub st_size: off64_t, + pub st_blksize: c_int, + __pad2: c_int, + pub st_blocks: c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused4: c_uint, + __unused5: c_uint, } pub struct user_regs_struct { @@ -58,25 +60,25 @@ s! { } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[repr(align(16))] pub struct mcontext_t { - pub fault_address: ::c_ulonglong, - pub regs: [::c_ulonglong; 31], - pub sp: ::c_ulonglong, - pub pc: ::c_ulonglong, - pub pstate: ::c_ulonglong, + pub fault_address: c_ulonglong, + pub regs: [c_ulonglong; 31], + pub sp: c_ulonglong, + pub pc: c_ulonglong, + pub pstate: c_ulonglong, __reserved: [u64; 512], } pub struct user_fpsimd_struct { - pub vregs: [::__uint128_t; 32], + pub vregs: [crate::__uint128_t; 32], pub fpsr: u32, pub fpcr: u32, } @@ -90,383 +92,383 @@ s_no_extra_traits! { } } -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_LARGEFILE: ::c_int = 0o400000; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_LARGEFILE: c_int = 0o400000; -pub const SIGSTKSZ: ::size_t = 16384; -pub const MINSIGSTKSZ: ::size_t = 5120; +pub const SIGSTKSZ: size_t = 16384; +pub const MINSIGSTKSZ: size_t = 5120; // From NDK's asm/hwcap.h -pub const HWCAP_FP: ::c_ulong = 1 << 0; -pub const HWCAP_ASIMD: ::c_ulong = 1 << 1; -pub const HWCAP_EVTSTRM: ::c_ulong = 1 << 2; -pub const HWCAP_AES: ::c_ulong = 1 << 3; -pub const HWCAP_PMULL: ::c_ulong = 1 << 4; -pub const HWCAP_SHA1: ::c_ulong = 1 << 5; -pub const HWCAP_SHA2: ::c_ulong = 1 << 6; -pub const HWCAP_CRC32: ::c_ulong = 1 << 7; -pub const HWCAP_ATOMICS: ::c_ulong = 1 << 8; -pub const HWCAP_FPHP: ::c_ulong = 1 << 9; -pub const HWCAP_ASIMDHP: ::c_ulong = 1 << 10; -pub const HWCAP_CPUID: ::c_ulong = 1 << 11; -pub const HWCAP_ASIMDRDM: ::c_ulong = 1 << 12; -pub const HWCAP_JSCVT: ::c_ulong = 1 << 13; -pub const HWCAP_FCMA: ::c_ulong = 1 << 14; -pub const HWCAP_LRCPC: ::c_ulong = 1 << 15; -pub const HWCAP_DCPOP: ::c_ulong = 1 << 16; -pub const HWCAP_SHA3: ::c_ulong = 1 << 17; -pub const HWCAP_SM3: ::c_ulong = 1 << 18; -pub const HWCAP_SM4: ::c_ulong = 1 << 19; -pub const HWCAP_ASIMDDP: ::c_ulong = 1 << 20; -pub const HWCAP_SHA512: ::c_ulong = 1 << 21; -pub const HWCAP_SVE: ::c_ulong = 1 << 22; -pub const HWCAP_ASIMDFHM: ::c_ulong = 1 << 23; -pub const HWCAP_DIT: ::c_ulong = 1 << 24; -pub const HWCAP_USCAT: ::c_ulong = 1 << 25; -pub const HWCAP_ILRCPC: ::c_ulong = 1 << 26; -pub const HWCAP_FLAGM: ::c_ulong = 1 << 27; -pub const HWCAP_SSBS: ::c_ulong = 1 << 28; -pub const HWCAP_SB: ::c_ulong = 1 << 29; -pub const HWCAP_PACA: ::c_ulong = 1 << 30; -pub const HWCAP_PACG: ::c_ulong = 1 << 31; -pub const HWCAP2_DCPODP: ::c_ulong = 1 << 0; -pub const HWCAP2_SVE2: ::c_ulong = 1 << 1; -pub const HWCAP2_SVEAES: ::c_ulong = 1 << 2; -pub const HWCAP2_SVEPMULL: ::c_ulong = 1 << 3; -pub const HWCAP2_SVEBITPERM: ::c_ulong = 1 << 4; -pub const HWCAP2_SVESHA3: ::c_ulong = 1 << 5; -pub const HWCAP2_SVESM4: ::c_ulong = 1 << 6; -pub const HWCAP2_FLAGM2: ::c_ulong = 1 << 7; -pub const HWCAP2_FRINT: ::c_ulong = 1 << 8; -pub const HWCAP2_SVEI8MM: ::c_ulong = 1 << 9; -pub const HWCAP2_SVEF32MM: ::c_ulong = 1 << 10; -pub const HWCAP2_SVEF64MM: ::c_ulong = 1 << 11; -pub const HWCAP2_SVEBF16: ::c_ulong = 1 << 12; -pub const HWCAP2_I8MM: ::c_ulong = 1 << 13; -pub const HWCAP2_BF16: ::c_ulong = 1 << 14; -pub const HWCAP2_DGH: ::c_ulong = 1 << 15; -pub const HWCAP2_RNG: ::c_ulong = 1 << 16; -pub const HWCAP2_BTI: ::c_ulong = 1 << 17; -pub const HWCAP2_MTE: ::c_ulong = 1 << 18; -pub const HWCAP2_ECV: ::c_ulong = 1 << 19; -pub const HWCAP2_AFP: ::c_ulong = 1 << 20; -pub const HWCAP2_RPRES: ::c_ulong = 1 << 21; -pub const HWCAP2_MTE3: ::c_ulong = 1 << 22; -pub const HWCAP2_SME: ::c_ulong = 1 << 23; -pub const HWCAP2_SME_I16I64: ::c_ulong = 1 << 24; -pub const HWCAP2_SME_F64F64: ::c_ulong = 1 << 25; -pub const HWCAP2_SME_I8I32: ::c_ulong = 1 << 26; -pub const HWCAP2_SME_F16F32: ::c_ulong = 1 << 27; -pub const HWCAP2_SME_B16F32: ::c_ulong = 1 << 28; -pub const HWCAP2_SME_F32F32: ::c_ulong = 1 << 29; -pub const HWCAP2_SME_FA64: ::c_ulong = 1 << 30; -pub const HWCAP2_WFXT: ::c_ulong = 1 << 31; -pub const HWCAP2_EBF16: ::c_ulong = 1 << 32; -pub const HWCAP2_SVE_EBF16: ::c_ulong = 1 << 33; +pub const HWCAP_FP: c_ulong = 1 << 0; +pub const HWCAP_ASIMD: c_ulong = 1 << 1; +pub const HWCAP_EVTSTRM: c_ulong = 1 << 2; +pub const HWCAP_AES: c_ulong = 1 << 3; +pub const HWCAP_PMULL: c_ulong = 1 << 4; +pub const HWCAP_SHA1: c_ulong = 1 << 5; +pub const HWCAP_SHA2: c_ulong = 1 << 6; +pub const HWCAP_CRC32: c_ulong = 1 << 7; +pub const HWCAP_ATOMICS: c_ulong = 1 << 8; +pub const HWCAP_FPHP: c_ulong = 1 << 9; +pub const HWCAP_ASIMDHP: c_ulong = 1 << 10; +pub const HWCAP_CPUID: c_ulong = 1 << 11; +pub const HWCAP_ASIMDRDM: c_ulong = 1 << 12; +pub const HWCAP_JSCVT: c_ulong = 1 << 13; +pub const HWCAP_FCMA: c_ulong = 1 << 14; +pub const HWCAP_LRCPC: c_ulong = 1 << 15; +pub const HWCAP_DCPOP: c_ulong = 1 << 16; +pub const HWCAP_SHA3: c_ulong = 1 << 17; +pub const HWCAP_SM3: c_ulong = 1 << 18; +pub const HWCAP_SM4: c_ulong = 1 << 19; +pub const HWCAP_ASIMDDP: c_ulong = 1 << 20; +pub const HWCAP_SHA512: c_ulong = 1 << 21; +pub const HWCAP_SVE: c_ulong = 1 << 22; +pub const HWCAP_ASIMDFHM: c_ulong = 1 << 23; +pub const HWCAP_DIT: c_ulong = 1 << 24; +pub const HWCAP_USCAT: c_ulong = 1 << 25; +pub const HWCAP_ILRCPC: c_ulong = 1 << 26; +pub const HWCAP_FLAGM: c_ulong = 1 << 27; +pub const HWCAP_SSBS: c_ulong = 1 << 28; +pub const HWCAP_SB: c_ulong = 1 << 29; +pub const HWCAP_PACA: c_ulong = 1 << 30; +pub const HWCAP_PACG: c_ulong = 1 << 31; +pub const HWCAP2_DCPODP: c_ulong = 1 << 0; +pub const HWCAP2_SVE2: c_ulong = 1 << 1; +pub const HWCAP2_SVEAES: c_ulong = 1 << 2; +pub const HWCAP2_SVEPMULL: c_ulong = 1 << 3; +pub const HWCAP2_SVEBITPERM: c_ulong = 1 << 4; +pub const HWCAP2_SVESHA3: c_ulong = 1 << 5; +pub const HWCAP2_SVESM4: c_ulong = 1 << 6; +pub const HWCAP2_FLAGM2: c_ulong = 1 << 7; +pub const HWCAP2_FRINT: c_ulong = 1 << 8; +pub const HWCAP2_SVEI8MM: c_ulong = 1 << 9; +pub const HWCAP2_SVEF32MM: c_ulong = 1 << 10; +pub const HWCAP2_SVEF64MM: c_ulong = 1 << 11; +pub const HWCAP2_SVEBF16: c_ulong = 1 << 12; +pub const HWCAP2_I8MM: c_ulong = 1 << 13; +pub const HWCAP2_BF16: c_ulong = 1 << 14; +pub const HWCAP2_DGH: c_ulong = 1 << 15; +pub const HWCAP2_RNG: c_ulong = 1 << 16; +pub const HWCAP2_BTI: c_ulong = 1 << 17; +pub const HWCAP2_MTE: c_ulong = 1 << 18; +pub const HWCAP2_ECV: c_ulong = 1 << 19; +pub const HWCAP2_AFP: c_ulong = 1 << 20; +pub const HWCAP2_RPRES: c_ulong = 1 << 21; +pub const HWCAP2_MTE3: c_ulong = 1 << 22; +pub const HWCAP2_SME: c_ulong = 1 << 23; +pub const HWCAP2_SME_I16I64: c_ulong = 1 << 24; +pub const HWCAP2_SME_F64F64: c_ulong = 1 << 25; +pub const HWCAP2_SME_I8I32: c_ulong = 1 << 26; +pub const HWCAP2_SME_F16F32: c_ulong = 1 << 27; +pub const HWCAP2_SME_B16F32: c_ulong = 1 << 28; +pub const HWCAP2_SME_F32F32: c_ulong = 1 << 29; +pub const HWCAP2_SME_FA64: c_ulong = 1 << 30; +pub const HWCAP2_WFXT: c_ulong = 1 << 31; +pub const HWCAP2_EBF16: c_ulong = 1 << 32; +pub const HWCAP2_SVE_EBF16: c_ulong = 1 << 33; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_dup: ::c_long = 23; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_flock: ::c_long = 32; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_renameat: ::c_long = 38; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_mount: ::c_long = 40; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_openat: ::c_long = 56; -pub const SYS_close: ::c_long = 57; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_sync: ::c_long = 81; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_acct: ::c_long = 89; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_personality: ::c_long = 92; -pub const SYS_exit: ::c_long = 93; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_futex: ::c_long = 98; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_kill: ::c_long = 129; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_times: ::c_long = 153; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_uname: ::c_long = 160; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_umask: ::c_long = 166; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_semop: ::c_long = 193; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_socket: ::c_long = 198; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_accept: ::c_long = 202; -pub const SYS_connect: ::c_long = 203; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_brk: ::c_long = 214; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_arch_specific_syscall: ::c_long = 244; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_setns: ::c_long = 268; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_syscalls: ::c_long = 451; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_getcwd: c_long = 17; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_dup: c_long = 23; +pub const SYS_dup3: c_long = 24; +pub const SYS_fcntl: c_long = 25; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_ioctl: c_long = 29; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_flock: c_long = 32; +pub const SYS_mknodat: c_long = 33; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_linkat: c_long = 37; +pub const SYS_renameat: c_long = 38; +pub const SYS_umount2: c_long = 39; +pub const SYS_mount: c_long = 40; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_fallocate: c_long = 47; +pub const SYS_faccessat: c_long = 48; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_chroot: c_long = 51; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_fchownat: c_long = 54; +pub const SYS_fchown: c_long = 55; +pub const SYS_openat: c_long = 56; +pub const SYS_close: c_long = 57; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pipe2: c_long = 59; +pub const SYS_quotactl: c_long = 60; +pub const SYS_getdents64: c_long = 61; +pub const SYS_lseek: c_long = 62; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_sync: c_long = 81; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_utimensat: c_long = 88; +pub const SYS_acct: c_long = 89; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_personality: c_long = 92; +pub const SYS_exit: c_long = 93; +pub const SYS_exit_group: c_long = 94; +pub const SYS_waitid: c_long = 95; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_unshare: c_long = 97; +pub const SYS_futex: c_long = 98; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_syslog: c_long = 116; +pub const SYS_ptrace: c_long = 117; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_kill: c_long = 129; +pub const SYS_tkill: c_long = 130; +pub const SYS_tgkill: c_long = 131; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_setpriority: c_long = 140; +pub const SYS_getpriority: c_long = 141; +pub const SYS_reboot: c_long = 142; +pub const SYS_setregid: c_long = 143; +pub const SYS_setgid: c_long = 144; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setuid: c_long = 146; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_times: c_long = 153; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getpgid: c_long = 155; +pub const SYS_getsid: c_long = 156; +pub const SYS_setsid: c_long = 157; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_uname: c_long = 160; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_getrusage: c_long = 165; +pub const SYS_umask: c_long = 166; +pub const SYS_prctl: c_long = 167; +pub const SYS_getcpu: c_long = 168; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_getpid: c_long = 172; +pub const SYS_getppid: c_long = 173; +pub const SYS_getuid: c_long = 174; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getgid: c_long = 176; +pub const SYS_getegid: c_long = 177; +pub const SYS_gettid: c_long = 178; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgctl: c_long = 187; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_semget: c_long = 190; +pub const SYS_semctl: c_long = 191; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_semop: c_long = 193; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmctl: c_long = 195; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmdt: c_long = 197; +pub const SYS_socket: c_long = 198; +pub const SYS_socketpair: c_long = 199; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_accept: c_long = 202; +pub const SYS_connect: c_long = 203; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_shutdown: c_long = 210; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_readahead: c_long = 213; +pub const SYS_brk: c_long = 214; +pub const SYS_munmap: c_long = 215; +pub const SYS_mremap: c_long = 216; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_mmap: c_long = 222; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_mprotect: c_long = 226; +pub const SYS_msync: c_long = 227; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_mbind: c_long = 235; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_move_pages: c_long = 239; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_accept4: c_long = 242; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_arch_specific_syscall: c_long = 244; +pub const SYS_wait4: c_long = 260; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_setns: c_long = 268; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_syscalls: c_long = 451; -pub const PROT_BTI: ::c_int = 0x10; -pub const PROT_MTE: ::c_int = 0x20; +pub const PROT_BTI: c_int = 0x10; +pub const PROT_MTE: c_int = 0x20; // From NDK's asm/auxvec.h -pub const AT_SYSINFO_EHDR: ::c_ulong = 33; -pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 2; +pub const AT_SYSINFO_EHDR: c_ulong = 33; +pub const AT_VECTOR_SIZE_ARCH: c_ulong = 2; diff --git a/src/unix/linux_like/android/b64/mod.rs b/src/unix/linux_like/android/b64/mod.rs index 88db6a3fa4246..73390421602d1 100644 --- a/src/unix/linux_like/android/b64/mod.rs +++ b/src/unix/linux_like/android/b64/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_uint, c_ulonglong, c_ushort, c_void, size_t}; + // The following definitions are correct for aarch64 and x86_64, // but may be wrong for mips64 @@ -9,39 +11,39 @@ pub type socklen_t = u32; s! { pub struct sigset_t { - __val: [::c_ulong; 1], + __val: [c_ulong; 1], } pub struct sigaction { - pub sa_flags: ::c_int, - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_restorer: ::Option, + pub sa_flags: c_int, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_restorer: Option, } pub struct rlimit64 { - pub rlim_cur: ::c_ulonglong, - pub rlim_max: ::c_ulonglong, + pub rlim_cur: c_ulonglong, + pub rlim_max: c_ulonglong, } pub struct pthread_attr_t { pub flags: u32, - pub stack_base: *mut ::c_void, - pub stack_size: ::size_t, - pub guard_size: ::size_t, + pub stack_base: *mut c_void, + pub stack_size: size_t, + pub guard_size: size_t, pub sched_policy: i32, pub sched_priority: i32, - __reserved: [::c_char; 16], + __reserved: [c_char; 16], } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct statfs { @@ -52,7 +54,7 @@ s! { pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::__fsid_t, + pub f_fsid: crate::__fsid_t, pub f_namelen: u64, pub f_frsize: u64, pub f_flags: u64, @@ -60,20 +62,20 @@ s! { } pub struct sysinfo { - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 0], + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 0], } pub struct statfs64 { @@ -84,7 +86,7 @@ s! { pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::__fsid_t, + pub f_fsid: crate::__fsid_t, pub f_namelen: u64, pub f_frsize: u64, pub f_flags: u64, @@ -92,18 +94,18 @@ s! { } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_barrier_t { @@ -117,26 +119,26 @@ s! { s_no_extra_traits! { pub struct pthread_mutex_t { - value: ::c_int, - __reserved: [::c_char; 36], + value: c_int, + __reserved: [c_char; 36], } pub struct pthread_cond_t { - value: ::c_int, - __reserved: [::c_char; 44], + value: c_int, + __reserved: [c_char; 44], } pub struct pthread_rwlock_t { - numLocks: ::c_int, - writerThreadId: ::c_int, - pendingReaders: ::c_int, - pendingWriters: ::c_int, + numLocks: c_int, + writerThreadId: c_int, + pendingReaders: c_int, + pendingWriters: c_int, attr: i32, - __reserved: [::c_char; 36], + __reserved: [c_char; 36], } pub struct sigset64_t { - __bits: [::c_ulong; 1], + __bits: [c_ulong; 1], } } @@ -155,8 +157,8 @@ cfg_if! { impl Eq for pthread_mutex_t {} - impl ::fmt::Debug for pthread_mutex_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_mutex_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_mutex_t") .field("value", &self.value) // FIXME: .field("__reserved", &self.__reserved) @@ -164,8 +166,8 @@ cfg_if! { } } - impl ::hash::Hash for pthread_mutex_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_mutex_t { + fn hash(&self, state: &mut H) { self.value.hash(state); self.__reserved.hash(state); } @@ -184,8 +186,8 @@ cfg_if! { impl Eq for pthread_cond_t {} - impl ::fmt::Debug for pthread_cond_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_cond_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_cond_t") .field("value", &self.value) // FIXME: .field("__reserved", &self.__reserved) @@ -193,8 +195,8 @@ cfg_if! { } } - impl ::hash::Hash for pthread_cond_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_cond_t { + fn hash(&self, state: &mut H) { self.value.hash(state); self.__reserved.hash(state); } @@ -217,8 +219,8 @@ cfg_if! { impl Eq for pthread_rwlock_t {} - impl ::fmt::Debug for pthread_rwlock_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_rwlock_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_rwlock_t") .field("numLocks", &self.numLocks) .field("writerThreadId", &self.writerThreadId) @@ -230,8 +232,8 @@ cfg_if! { } } - impl ::hash::Hash for pthread_rwlock_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_rwlock_t { + fn hash(&self, state: &mut H) { self.numLocks.hash(state); self.writerThreadId.hash(state); self.pendingReaders.hash(state); @@ -241,8 +243,8 @@ cfg_if! { } } - impl ::fmt::Debug for sigset64_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigset64_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigset64_t") .field("__bits", &self.__bits) .finish() @@ -252,17 +254,17 @@ cfg_if! { } // These constants must be of the same type of sigaction.sa_flags -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; - -pub const RTLD_GLOBAL: ::c_int = 0x00100; -pub const RTLD_NOW: ::c_int = 2; -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; +pub const SA_NOCLDSTOP: c_int = 0x00000001; +pub const SA_NOCLDWAIT: c_int = 0x00000002; +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_SIGINFO: c_int = 0x00000004; + +pub const RTLD_GLOBAL: c_int = 0x00100; +pub const RTLD_NOW: c_int = 2; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { value: 0, @@ -280,9 +282,9 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { attr: 0, __reserved: [0; 36], }; -pub const PTHREAD_STACK_MIN: ::size_t = 4096 * 4; -pub const CPU_SETSIZE: ::size_t = 1024; -pub const __CPU_BITS: ::size_t = 64; +pub const PTHREAD_STACK_MIN: size_t = 4096 * 4; +pub const CPU_SETSIZE: size_t = 1024; +pub const __CPU_BITS: size_t = 64; pub const UT_LINESIZE: usize = 32; pub const UT_NAMESIZE: usize = 32; @@ -295,22 +297,22 @@ f! { // Android is bumped. When the workaround is removed, `accept4` can be // moved back to `linux_like/mod.rs` pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int { - ::syscall(SYS_accept4, fd, addr, len, flg) as ::c_int + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int { + crate::syscall(SYS_accept4, fd, addr, len, flg) as c_int } } extern "C" { - pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; + pub fn getauxval(type_: c_ulong) -> c_ulong; pub fn __system_property_wait( - pi: *const ::prop_info, + pi: *const crate::prop_info, __old_serial: u32, __new_serial_ptr: *mut u32, - __relative_timeout: *const ::timespec, + __relative_timeout: *const crate::timespec, ) -> bool; } diff --git a/src/unix/linux_like/android/b64/riscv64/mod.rs b/src/unix/linux_like/android/b64/riscv64/mod.rs index cd7175c1b99d2..8fff9a6793335 100644 --- a/src/unix/linux_like/android/b64/riscv64/mod.rs +++ b/src/unix/linux_like/android/b64/riscv64/mod.rs @@ -1,54 +1,56 @@ +use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, off64_t, size_t}; + pub type c_char = i8; pub type wchar_t = u32; pub type greg_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::c_uint, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::c_ulong, - pub st_size: ::off64_t, - pub st_blksize: ::c_int, - __pad2: ::c_int, - pub st_blocks: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused4: ::c_uint, - __unused5: ::c_uint, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: c_uint, + pub st_nlink: c_uint, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: c_ulong, + pub st_size: off64_t, + pub st_blksize: c_int, + __pad2: c_int, + pub st_blocks: c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused4: c_uint, + __unused5: c_uint, } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::c_uint, - pub st_nlink: ::c_uint, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::c_ulong, - pub st_size: ::off64_t, - pub st_blksize: ::c_int, - __pad2: ::c_int, - pub st_blocks: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused4: ::c_uint, - __unused5: ::c_uint, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: c_uint, + pub st_nlink: c_uint, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: c_ulong, + pub st_size: off64_t, + pub st_blksize: c_int, + __pad2: c_int, + pub st_blocks: c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused4: c_uint, + __unused5: c_uint, } } @@ -60,324 +62,324 @@ s_no_extra_traits! { } } -pub const O_DIRECT: ::c_int = 0x40000; -pub const O_DIRECTORY: ::c_int = 0x200000; -pub const O_NOFOLLOW: ::c_int = 0x400000; -pub const O_LARGEFILE: ::c_int = 0x100000; +pub const O_DIRECT: c_int = 0x40000; +pub const O_DIRECTORY: c_int = 0x200000; +pub const O_NOFOLLOW: c_int = 0x400000; +pub const O_LARGEFILE: c_int = 0x100000; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; // From NDK's asm/hwcap.h -pub const COMPAT_HWCAP_ISA_I: ::c_ulong = 1 << (b'I' - b'A'); -pub const COMPAT_HWCAP_ISA_M: ::c_ulong = 1 << (b'M' - b'A'); -pub const COMPAT_HWCAP_ISA_A: ::c_ulong = 1 << (b'A' - b'A'); -pub const COMPAT_HWCAP_ISA_F: ::c_ulong = 1 << (b'F' - b'A'); -pub const COMPAT_HWCAP_ISA_D: ::c_ulong = 1 << (b'D' - b'A'); -pub const COMPAT_HWCAP_ISA_C: ::c_ulong = 1 << (b'C' - b'A'); +pub const COMPAT_HWCAP_ISA_I: c_ulong = 1 << (b'I' - b'A'); +pub const COMPAT_HWCAP_ISA_M: c_ulong = 1 << (b'M' - b'A'); +pub const COMPAT_HWCAP_ISA_A: c_ulong = 1 << (b'A' - b'A'); +pub const COMPAT_HWCAP_ISA_F: c_ulong = 1 << (b'F' - b'A'); +pub const COMPAT_HWCAP_ISA_D: c_ulong = 1 << (b'D' - b'A'); +pub const COMPAT_HWCAP_ISA_C: c_ulong = 1 << (b'C' - b'A'); -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_dup: ::c_long = 23; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_flock: ::c_long = 32; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_renameat: ::c_long = 38; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_mount: ::c_long = 40; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_openat: ::c_long = 56; -pub const SYS_close: ::c_long = 57; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_sync: ::c_long = 81; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_acct: ::c_long = 89; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_personality: ::c_long = 92; -pub const SYS_exit: ::c_long = 93; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_futex: ::c_long = 98; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_kill: ::c_long = 129; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_times: ::c_long = 153; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_uname: ::c_long = 160; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_umask: ::c_long = 166; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_semop: ::c_long = 193; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_socket: ::c_long = 198; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_accept: ::c_long = 202; -pub const SYS_connect: ::c_long = 203; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_brk: ::c_long = 214; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_arch_specific_syscall: ::c_long = 244; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_setns: ::c_long = 268; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_getcwd: c_long = 17; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_dup: c_long = 23; +pub const SYS_dup3: c_long = 24; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_ioctl: c_long = 29; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_flock: c_long = 32; +pub const SYS_mknodat: c_long = 33; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_linkat: c_long = 37; +pub const SYS_renameat: c_long = 38; +pub const SYS_umount2: c_long = 39; +pub const SYS_mount: c_long = 40; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_fallocate: c_long = 47; +pub const SYS_faccessat: c_long = 48; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_chroot: c_long = 51; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_fchownat: c_long = 54; +pub const SYS_fchown: c_long = 55; +pub const SYS_openat: c_long = 56; +pub const SYS_close: c_long = 57; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pipe2: c_long = 59; +pub const SYS_quotactl: c_long = 60; +pub const SYS_getdents64: c_long = 61; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_sync: c_long = 81; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_utimensat: c_long = 88; +pub const SYS_acct: c_long = 89; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_personality: c_long = 92; +pub const SYS_exit: c_long = 93; +pub const SYS_exit_group: c_long = 94; +pub const SYS_waitid: c_long = 95; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_unshare: c_long = 97; +pub const SYS_futex: c_long = 98; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_syslog: c_long = 116; +pub const SYS_ptrace: c_long = 117; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_kill: c_long = 129; +pub const SYS_tkill: c_long = 130; +pub const SYS_tgkill: c_long = 131; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_setpriority: c_long = 140; +pub const SYS_getpriority: c_long = 141; +pub const SYS_reboot: c_long = 142; +pub const SYS_setregid: c_long = 143; +pub const SYS_setgid: c_long = 144; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setuid: c_long = 146; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_times: c_long = 153; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getpgid: c_long = 155; +pub const SYS_getsid: c_long = 156; +pub const SYS_setsid: c_long = 157; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_uname: c_long = 160; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_getrusage: c_long = 165; +pub const SYS_umask: c_long = 166; +pub const SYS_prctl: c_long = 167; +pub const SYS_getcpu: c_long = 168; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_getpid: c_long = 172; +pub const SYS_getppid: c_long = 173; +pub const SYS_getuid: c_long = 174; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getgid: c_long = 176; +pub const SYS_getegid: c_long = 177; +pub const SYS_gettid: c_long = 178; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgctl: c_long = 187; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_semget: c_long = 190; +pub const SYS_semctl: c_long = 191; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_semop: c_long = 193; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmctl: c_long = 195; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmdt: c_long = 197; +pub const SYS_socket: c_long = 198; +pub const SYS_socketpair: c_long = 199; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_accept: c_long = 202; +pub const SYS_connect: c_long = 203; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_shutdown: c_long = 210; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_readahead: c_long = 213; +pub const SYS_brk: c_long = 214; +pub const SYS_munmap: c_long = 215; +pub const SYS_mremap: c_long = 216; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_mprotect: c_long = 226; +pub const SYS_msync: c_long = 227; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_mbind: c_long = 235; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_move_pages: c_long = 239; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_accept4: c_long = 242; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_arch_specific_syscall: c_long = 244; +pub const SYS_wait4: c_long = 260; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_setns: c_long = 268; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; // From NDK's asm/auxvec.h -pub const AT_SYSINFO_EHDR: ::c_ulong = 33; -pub const AT_L1I_CACHESIZE: ::c_ulong = 40; -pub const AT_L1I_CACHEGEOMETRY: ::c_ulong = 41; -pub const AT_L1D_CACHESIZE: ::c_ulong = 42; -pub const AT_L1D_CACHEGEOMETRY: ::c_ulong = 43; -pub const AT_L2_CACHESIZE: ::c_ulong = 44; -pub const AT_L2_CACHEGEOMETRY: ::c_ulong = 45; -pub const AT_L3_CACHESIZE: ::c_ulong = 46; -pub const AT_L3_CACHEGEOMETRY: ::c_ulong = 47; -pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 9; +pub const AT_SYSINFO_EHDR: c_ulong = 33; +pub const AT_L1I_CACHESIZE: c_ulong = 40; +pub const AT_L1I_CACHEGEOMETRY: c_ulong = 41; +pub const AT_L1D_CACHESIZE: c_ulong = 42; +pub const AT_L1D_CACHEGEOMETRY: c_ulong = 43; +pub const AT_L2_CACHESIZE: c_ulong = 44; +pub const AT_L2_CACHEGEOMETRY: c_ulong = 45; +pub const AT_L3_CACHESIZE: c_ulong = 46; +pub const AT_L3_CACHEGEOMETRY: c_ulong = 47; +pub const AT_VECTOR_SIZE_ARCH: c_ulong = 9; diff --git a/src/unix/linux_like/android/b64/x86_64/mod.rs b/src/unix/linux_like/android/b64/x86_64/mod.rs index 1f88573704b3e..609def88b2d97 100644 --- a/src/unix/linux_like/android/b64/x86_64/mod.rs +++ b/src/unix/linux_like/android/b64/x86_64/mod.rs @@ -1,48 +1,50 @@ +use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, c_ushort, off64_t, size_t}; + pub type c_char = i8; pub type wchar_t = i32; pub type greg_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::c_ulong, - pub st_mode: ::c_uint, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::c_long, - pub st_blocks: ::c_long, - pub st_atime: ::c_long, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::c_long, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::c_long, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: c_ulong, + pub st_mode: c_uint, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: c_long, + pub st_blocks: c_long, + pub st_atime: c_long, + pub st_atime_nsec: c_long, + pub st_mtime: c_long, + pub st_mtime_nsec: c_long, + pub st_ctime: c_long, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::c_ulong, - pub st_mode: ::c_uint, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::c_long, - pub st_blocks: ::c_long, - pub st_atime: ::c_long, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::c_long, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::c_long, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: c_ulong, + pub st_mode: c_uint, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: c_long, + pub st_blocks: c_long, + pub st_atime: c_long, + pub st_atime_nsec: c_long, + pub st_mtime: c_long, + pub st_mtime_nsec: c_long, + pub st_ctime: c_long, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } pub struct _libc_xmmreg { @@ -50,64 +52,64 @@ s! { } pub struct user_regs_struct { - pub r15: ::c_ulong, - pub r14: ::c_ulong, - pub r13: ::c_ulong, - pub r12: ::c_ulong, - pub rbp: ::c_ulong, - pub rbx: ::c_ulong, - pub r11: ::c_ulong, - pub r10: ::c_ulong, - pub r9: ::c_ulong, - pub r8: ::c_ulong, - pub rax: ::c_ulong, - pub rcx: ::c_ulong, - pub rdx: ::c_ulong, - pub rsi: ::c_ulong, - pub rdi: ::c_ulong, - pub orig_rax: ::c_ulong, - pub rip: ::c_ulong, - pub cs: ::c_ulong, - pub eflags: ::c_ulong, - pub rsp: ::c_ulong, - pub ss: ::c_ulong, - pub fs_base: ::c_ulong, - pub gs_base: ::c_ulong, - pub ds: ::c_ulong, - pub es: ::c_ulong, - pub fs: ::c_ulong, - pub gs: ::c_ulong, + pub r15: c_ulong, + pub r14: c_ulong, + pub r13: c_ulong, + pub r12: c_ulong, + pub rbp: c_ulong, + pub rbx: c_ulong, + pub r11: c_ulong, + pub r10: c_ulong, + pub r9: c_ulong, + pub r8: c_ulong, + pub rax: c_ulong, + pub rcx: c_ulong, + pub rdx: c_ulong, + pub rsi: c_ulong, + pub rdi: c_ulong, + pub orig_rax: c_ulong, + pub rip: c_ulong, + pub cs: c_ulong, + pub eflags: c_ulong, + pub rsp: c_ulong, + pub ss: c_ulong, + pub fs_base: c_ulong, + pub gs_base: c_ulong, + pub ds: c_ulong, + pub es: c_ulong, + pub fs: c_ulong, + pub gs: c_ulong, } pub struct user { pub regs: user_regs_struct, - pub u_fpvalid: ::c_int, + pub u_fpvalid: c_int, pub i387: user_fpregs_struct, - pub u_tsize: ::c_ulong, - pub u_dsize: ::c_ulong, - pub u_ssize: ::c_ulong, - pub start_code: ::c_ulong, - pub start_stack: ::c_ulong, - pub signal: ::c_long, - __reserved: ::c_int, + pub u_tsize: c_ulong, + pub u_dsize: c_ulong, + pub u_ssize: c_ulong, + pub start_code: c_ulong, + pub start_stack: c_ulong, + pub signal: c_long, + __reserved: c_int, #[cfg(target_pointer_width = "32")] __pad1: u32, pub u_ar0: *mut user_regs_struct, #[cfg(target_pointer_width = "32")] __pad2: u32, pub u_fpstate: *mut user_fpregs_struct, - pub magic: ::c_ulong, - pub u_comm: [::c_char; 32], - pub u_debugreg: [::c_ulong; 8], - pub error_code: ::c_ulong, - pub fault_address: ::c_ulong, + pub magic: c_ulong, + pub u_comm: [c_char; 32], + pub u_debugreg: [c_ulong; 8], + pub error_code: c_ulong, + pub fault_address: c_ulong, } } s_no_extra_traits! { pub union __c_anonymous_uc_sigmask { - uc_sigmask: ::sigset_t, - uc_sigmask64: ::sigset64_t, + uc_sigmask: crate::sigset_t, + uc_sigmask64: crate::sigset64_t, } #[allow(missing_debug_implementations)] @@ -125,15 +127,15 @@ cfg_if! { } } impl Eq for __c_anonymous_uc_sigmask {} - impl ::fmt::Debug for __c_anonymous_uc_sigmask { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_uc_sigmask { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uc_sigmask") .field("uc_sigmask", unsafe { &self.uc_sigmask }) .finish() } } - impl ::hash::Hash for __c_anonymous_uc_sigmask { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_uc_sigmask { + fn hash(&self, state: &mut H) { unsafe { self.uc_sigmask.hash(state) } } } @@ -168,26 +170,26 @@ s_no_extra_traits! { } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, pub uc_sigmask64: __c_anonymous_uc_sigmask, __fpregs_mem: _libc_fpstate, } pub struct user_fpregs_struct { - pub cwd: ::c_ushort, - pub swd: ::c_ushort, - pub ftw: ::c_ushort, - pub fop: ::c_ushort, - pub rip: ::c_ulong, - pub rdp: ::c_ulong, - pub mxcsr: ::c_uint, - pub mxcr_mask: ::c_uint, - pub st_space: [::c_uint; 32], - pub xmm_space: [::c_uint; 64], - padding: [::c_uint; 24], + pub cwd: c_ushort, + pub swd: c_ushort, + pub ftw: c_ushort, + pub fop: c_ushort, + pub rip: c_ulong, + pub rdp: c_ulong, + pub mxcsr: c_uint, + pub mxcr_mask: c_uint, + pub st_space: [c_uint; 32], + pub xmm_space: [c_uint; 64], + padding: [c_uint; 24], } } @@ -200,8 +202,8 @@ cfg_if! { } } impl Eq for _libc_fpxreg {} - impl ::fmt::Debug for _libc_fpxreg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for _libc_fpxreg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("_libc_fpxreg") .field("significand", &self.significand) .field("exponent", &self.exponent) @@ -209,8 +211,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for _libc_fpxreg { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for _libc_fpxreg { + fn hash(&self, state: &mut H) { self.significand.hash(state); self.exponent.hash(state); // Ignore padding field @@ -233,8 +235,8 @@ cfg_if! { } } impl Eq for _libc_fpstate {} - impl ::fmt::Debug for _libc_fpstate { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for _libc_fpstate { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("_libc_fpstate") .field("cwd", &self.cwd) .field("swd", &self.swd) @@ -250,8 +252,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for _libc_fpstate { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for _libc_fpstate { + fn hash(&self, state: &mut H) { self.cwd.hash(state); self.swd.hash(state); self.ftw.hash(state); @@ -273,8 +275,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("gregs", &self.gregs) .field("fpregs", &self.fpregs) @@ -282,8 +284,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mcontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mcontext_t { + fn hash(&self, state: &mut H) { self.gregs.hash(state); self.fpregs.hash(state); // Ignore padding field @@ -301,8 +303,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -313,8 +315,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -346,8 +348,8 @@ cfg_if! { impl Eq for user_fpregs_struct {} - impl ::fmt::Debug for user_fpregs_struct { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for user_fpregs_struct { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("user_fpregs_struct") .field("cwd", &self.cwd) .field("swd", &self.swd) @@ -364,8 +366,8 @@ cfg_if! { } } - impl ::hash::Hash for user_fpregs_struct { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for user_fpregs_struct { + fn hash(&self, state: &mut H) { self.cwd.hash(state); self.swd.hash(state); self.ftw.hash(state); @@ -382,435 +384,435 @@ cfg_if! { } } -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_LARGEFILE: ::c_int = 0o0100000; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_LARGEFILE: c_int = 0o0100000; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; -pub const MAP_32BIT: ::c_int = 0x40; +pub const MAP_32BIT: c_int = 0x40; // Syscall table -pub const SYS_read: ::c_long = 0; -pub const SYS_write: ::c_long = 1; -pub const SYS_open: ::c_long = 2; -pub const SYS_close: ::c_long = 3; -pub const SYS_stat: ::c_long = 4; -pub const SYS_fstat: ::c_long = 5; -pub const SYS_lstat: ::c_long = 6; -pub const SYS_poll: ::c_long = 7; -pub const SYS_lseek: ::c_long = 8; -pub const SYS_mmap: ::c_long = 9; -pub const SYS_mprotect: ::c_long = 10; -pub const SYS_munmap: ::c_long = 11; -pub const SYS_brk: ::c_long = 12; -pub const SYS_rt_sigaction: ::c_long = 13; -pub const SYS_rt_sigprocmask: ::c_long = 14; -pub const SYS_rt_sigreturn: ::c_long = 15; -pub const SYS_ioctl: ::c_long = 16; -pub const SYS_pread64: ::c_long = 17; -pub const SYS_pwrite64: ::c_long = 18; -pub const SYS_readv: ::c_long = 19; -pub const SYS_writev: ::c_long = 20; -pub const SYS_access: ::c_long = 21; -pub const SYS_pipe: ::c_long = 22; -pub const SYS_select: ::c_long = 23; -pub const SYS_sched_yield: ::c_long = 24; -pub const SYS_mremap: ::c_long = 25; -pub const SYS_msync: ::c_long = 26; -pub const SYS_mincore: ::c_long = 27; -pub const SYS_madvise: ::c_long = 28; -pub const SYS_shmget: ::c_long = 29; -pub const SYS_shmat: ::c_long = 30; -pub const SYS_shmctl: ::c_long = 31; -pub const SYS_dup: ::c_long = 32; -pub const SYS_dup2: ::c_long = 33; -pub const SYS_pause: ::c_long = 34; -pub const SYS_nanosleep: ::c_long = 35; -pub const SYS_getitimer: ::c_long = 36; -pub const SYS_alarm: ::c_long = 37; -pub const SYS_setitimer: ::c_long = 38; -pub const SYS_getpid: ::c_long = 39; -pub const SYS_sendfile: ::c_long = 40; -pub const SYS_socket: ::c_long = 41; -pub const SYS_connect: ::c_long = 42; -pub const SYS_accept: ::c_long = 43; -pub const SYS_sendto: ::c_long = 44; -pub const SYS_recvfrom: ::c_long = 45; -pub const SYS_sendmsg: ::c_long = 46; -pub const SYS_recvmsg: ::c_long = 47; -pub const SYS_shutdown: ::c_long = 48; -pub const SYS_bind: ::c_long = 49; -pub const SYS_listen: ::c_long = 50; -pub const SYS_getsockname: ::c_long = 51; -pub const SYS_getpeername: ::c_long = 52; -pub const SYS_socketpair: ::c_long = 53; -pub const SYS_setsockopt: ::c_long = 54; -pub const SYS_getsockopt: ::c_long = 55; -pub const SYS_clone: ::c_long = 56; -pub const SYS_fork: ::c_long = 57; -pub const SYS_vfork: ::c_long = 58; -pub const SYS_execve: ::c_long = 59; -pub const SYS_exit: ::c_long = 60; -pub const SYS_wait4: ::c_long = 61; -pub const SYS_kill: ::c_long = 62; -pub const SYS_uname: ::c_long = 63; -pub const SYS_semget: ::c_long = 64; -pub const SYS_semop: ::c_long = 65; -pub const SYS_semctl: ::c_long = 66; -pub const SYS_shmdt: ::c_long = 67; -pub const SYS_msgget: ::c_long = 68; -pub const SYS_msgsnd: ::c_long = 69; -pub const SYS_msgrcv: ::c_long = 70; -pub const SYS_msgctl: ::c_long = 71; -pub const SYS_fcntl: ::c_long = 72; -pub const SYS_flock: ::c_long = 73; -pub const SYS_fsync: ::c_long = 74; -pub const SYS_fdatasync: ::c_long = 75; -pub const SYS_truncate: ::c_long = 76; -pub const SYS_ftruncate: ::c_long = 77; -pub const SYS_getdents: ::c_long = 78; -pub const SYS_getcwd: ::c_long = 79; -pub const SYS_chdir: ::c_long = 80; -pub const SYS_fchdir: ::c_long = 81; -pub const SYS_rename: ::c_long = 82; -pub const SYS_mkdir: ::c_long = 83; -pub const SYS_rmdir: ::c_long = 84; -pub const SYS_creat: ::c_long = 85; -pub const SYS_link: ::c_long = 86; -pub const SYS_unlink: ::c_long = 87; -pub const SYS_symlink: ::c_long = 88; -pub const SYS_readlink: ::c_long = 89; -pub const SYS_chmod: ::c_long = 90; -pub const SYS_fchmod: ::c_long = 91; -pub const SYS_chown: ::c_long = 92; -pub const SYS_fchown: ::c_long = 93; -pub const SYS_lchown: ::c_long = 94; -pub const SYS_umask: ::c_long = 95; -pub const SYS_gettimeofday: ::c_long = 96; -pub const SYS_getrlimit: ::c_long = 97; -pub const SYS_getrusage: ::c_long = 98; -pub const SYS_sysinfo: ::c_long = 99; -pub const SYS_times: ::c_long = 100; -pub const SYS_ptrace: ::c_long = 101; -pub const SYS_getuid: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_getgid: ::c_long = 104; -pub const SYS_setuid: ::c_long = 105; -pub const SYS_setgid: ::c_long = 106; -pub const SYS_geteuid: ::c_long = 107; -pub const SYS_getegid: ::c_long = 108; -pub const SYS_setpgid: ::c_long = 109; -pub const SYS_getppid: ::c_long = 110; -pub const SYS_getpgrp: ::c_long = 111; -pub const SYS_setsid: ::c_long = 112; -pub const SYS_setreuid: ::c_long = 113; -pub const SYS_setregid: ::c_long = 114; -pub const SYS_getgroups: ::c_long = 115; -pub const SYS_setgroups: ::c_long = 116; -pub const SYS_setresuid: ::c_long = 117; -pub const SYS_getresuid: ::c_long = 118; -pub const SYS_setresgid: ::c_long = 119; -pub const SYS_getresgid: ::c_long = 120; -pub const SYS_getpgid: ::c_long = 121; -pub const SYS_setfsuid: ::c_long = 122; -pub const SYS_setfsgid: ::c_long = 123; -pub const SYS_getsid: ::c_long = 124; -pub const SYS_capget: ::c_long = 125; -pub const SYS_capset: ::c_long = 126; -pub const SYS_rt_sigpending: ::c_long = 127; -pub const SYS_rt_sigtimedwait: ::c_long = 128; -pub const SYS_rt_sigqueueinfo: ::c_long = 129; -pub const SYS_rt_sigsuspend: ::c_long = 130; -pub const SYS_sigaltstack: ::c_long = 131; -pub const SYS_utime: ::c_long = 132; -pub const SYS_mknod: ::c_long = 133; -pub const SYS_uselib: ::c_long = 134; -pub const SYS_personality: ::c_long = 135; -pub const SYS_ustat: ::c_long = 136; -pub const SYS_statfs: ::c_long = 137; -pub const SYS_fstatfs: ::c_long = 138; -pub const SYS_sysfs: ::c_long = 139; -pub const SYS_getpriority: ::c_long = 140; -pub const SYS_setpriority: ::c_long = 141; -pub const SYS_sched_setparam: ::c_long = 142; -pub const SYS_sched_getparam: ::c_long = 143; -pub const SYS_sched_setscheduler: ::c_long = 144; -pub const SYS_sched_getscheduler: ::c_long = 145; -pub const SYS_sched_get_priority_max: ::c_long = 146; -pub const SYS_sched_get_priority_min: ::c_long = 147; -pub const SYS_sched_rr_get_interval: ::c_long = 148; -pub const SYS_mlock: ::c_long = 149; -pub const SYS_munlock: ::c_long = 150; -pub const SYS_mlockall: ::c_long = 151; -pub const SYS_munlockall: ::c_long = 152; -pub const SYS_vhangup: ::c_long = 153; -pub const SYS_modify_ldt: ::c_long = 154; -pub const SYS_pivot_root: ::c_long = 155; +pub const SYS_read: c_long = 0; +pub const SYS_write: c_long = 1; +pub const SYS_open: c_long = 2; +pub const SYS_close: c_long = 3; +pub const SYS_stat: c_long = 4; +pub const SYS_fstat: c_long = 5; +pub const SYS_lstat: c_long = 6; +pub const SYS_poll: c_long = 7; +pub const SYS_lseek: c_long = 8; +pub const SYS_mmap: c_long = 9; +pub const SYS_mprotect: c_long = 10; +pub const SYS_munmap: c_long = 11; +pub const SYS_brk: c_long = 12; +pub const SYS_rt_sigaction: c_long = 13; +pub const SYS_rt_sigprocmask: c_long = 14; +pub const SYS_rt_sigreturn: c_long = 15; +pub const SYS_ioctl: c_long = 16; +pub const SYS_pread64: c_long = 17; +pub const SYS_pwrite64: c_long = 18; +pub const SYS_readv: c_long = 19; +pub const SYS_writev: c_long = 20; +pub const SYS_access: c_long = 21; +pub const SYS_pipe: c_long = 22; +pub const SYS_select: c_long = 23; +pub const SYS_sched_yield: c_long = 24; +pub const SYS_mremap: c_long = 25; +pub const SYS_msync: c_long = 26; +pub const SYS_mincore: c_long = 27; +pub const SYS_madvise: c_long = 28; +pub const SYS_shmget: c_long = 29; +pub const SYS_shmat: c_long = 30; +pub const SYS_shmctl: c_long = 31; +pub const SYS_dup: c_long = 32; +pub const SYS_dup2: c_long = 33; +pub const SYS_pause: c_long = 34; +pub const SYS_nanosleep: c_long = 35; +pub const SYS_getitimer: c_long = 36; +pub const SYS_alarm: c_long = 37; +pub const SYS_setitimer: c_long = 38; +pub const SYS_getpid: c_long = 39; +pub const SYS_sendfile: c_long = 40; +pub const SYS_socket: c_long = 41; +pub const SYS_connect: c_long = 42; +pub const SYS_accept: c_long = 43; +pub const SYS_sendto: c_long = 44; +pub const SYS_recvfrom: c_long = 45; +pub const SYS_sendmsg: c_long = 46; +pub const SYS_recvmsg: c_long = 47; +pub const SYS_shutdown: c_long = 48; +pub const SYS_bind: c_long = 49; +pub const SYS_listen: c_long = 50; +pub const SYS_getsockname: c_long = 51; +pub const SYS_getpeername: c_long = 52; +pub const SYS_socketpair: c_long = 53; +pub const SYS_setsockopt: c_long = 54; +pub const SYS_getsockopt: c_long = 55; +pub const SYS_clone: c_long = 56; +pub const SYS_fork: c_long = 57; +pub const SYS_vfork: c_long = 58; +pub const SYS_execve: c_long = 59; +pub const SYS_exit: c_long = 60; +pub const SYS_wait4: c_long = 61; +pub const SYS_kill: c_long = 62; +pub const SYS_uname: c_long = 63; +pub const SYS_semget: c_long = 64; +pub const SYS_semop: c_long = 65; +pub const SYS_semctl: c_long = 66; +pub const SYS_shmdt: c_long = 67; +pub const SYS_msgget: c_long = 68; +pub const SYS_msgsnd: c_long = 69; +pub const SYS_msgrcv: c_long = 70; +pub const SYS_msgctl: c_long = 71; +pub const SYS_fcntl: c_long = 72; +pub const SYS_flock: c_long = 73; +pub const SYS_fsync: c_long = 74; +pub const SYS_fdatasync: c_long = 75; +pub const SYS_truncate: c_long = 76; +pub const SYS_ftruncate: c_long = 77; +pub const SYS_getdents: c_long = 78; +pub const SYS_getcwd: c_long = 79; +pub const SYS_chdir: c_long = 80; +pub const SYS_fchdir: c_long = 81; +pub const SYS_rename: c_long = 82; +pub const SYS_mkdir: c_long = 83; +pub const SYS_rmdir: c_long = 84; +pub const SYS_creat: c_long = 85; +pub const SYS_link: c_long = 86; +pub const SYS_unlink: c_long = 87; +pub const SYS_symlink: c_long = 88; +pub const SYS_readlink: c_long = 89; +pub const SYS_chmod: c_long = 90; +pub const SYS_fchmod: c_long = 91; +pub const SYS_chown: c_long = 92; +pub const SYS_fchown: c_long = 93; +pub const SYS_lchown: c_long = 94; +pub const SYS_umask: c_long = 95; +pub const SYS_gettimeofday: c_long = 96; +pub const SYS_getrlimit: c_long = 97; +pub const SYS_getrusage: c_long = 98; +pub const SYS_sysinfo: c_long = 99; +pub const SYS_times: c_long = 100; +pub const SYS_ptrace: c_long = 101; +pub const SYS_getuid: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_getgid: c_long = 104; +pub const SYS_setuid: c_long = 105; +pub const SYS_setgid: c_long = 106; +pub const SYS_geteuid: c_long = 107; +pub const SYS_getegid: c_long = 108; +pub const SYS_setpgid: c_long = 109; +pub const SYS_getppid: c_long = 110; +pub const SYS_getpgrp: c_long = 111; +pub const SYS_setsid: c_long = 112; +pub const SYS_setreuid: c_long = 113; +pub const SYS_setregid: c_long = 114; +pub const SYS_getgroups: c_long = 115; +pub const SYS_setgroups: c_long = 116; +pub const SYS_setresuid: c_long = 117; +pub const SYS_getresuid: c_long = 118; +pub const SYS_setresgid: c_long = 119; +pub const SYS_getresgid: c_long = 120; +pub const SYS_getpgid: c_long = 121; +pub const SYS_setfsuid: c_long = 122; +pub const SYS_setfsgid: c_long = 123; +pub const SYS_getsid: c_long = 124; +pub const SYS_capget: c_long = 125; +pub const SYS_capset: c_long = 126; +pub const SYS_rt_sigpending: c_long = 127; +pub const SYS_rt_sigtimedwait: c_long = 128; +pub const SYS_rt_sigqueueinfo: c_long = 129; +pub const SYS_rt_sigsuspend: c_long = 130; +pub const SYS_sigaltstack: c_long = 131; +pub const SYS_utime: c_long = 132; +pub const SYS_mknod: c_long = 133; +pub const SYS_uselib: c_long = 134; +pub const SYS_personality: c_long = 135; +pub const SYS_ustat: c_long = 136; +pub const SYS_statfs: c_long = 137; +pub const SYS_fstatfs: c_long = 138; +pub const SYS_sysfs: c_long = 139; +pub const SYS_getpriority: c_long = 140; +pub const SYS_setpriority: c_long = 141; +pub const SYS_sched_setparam: c_long = 142; +pub const SYS_sched_getparam: c_long = 143; +pub const SYS_sched_setscheduler: c_long = 144; +pub const SYS_sched_getscheduler: c_long = 145; +pub const SYS_sched_get_priority_max: c_long = 146; +pub const SYS_sched_get_priority_min: c_long = 147; +pub const SYS_sched_rr_get_interval: c_long = 148; +pub const SYS_mlock: c_long = 149; +pub const SYS_munlock: c_long = 150; +pub const SYS_mlockall: c_long = 151; +pub const SYS_munlockall: c_long = 152; +pub const SYS_vhangup: c_long = 153; +pub const SYS_modify_ldt: c_long = 154; +pub const SYS_pivot_root: c_long = 155; // FIXME: SYS__sysctl is in the NDK sources but for some reason is // not available in the tests -// pub const SYS__sysctl: ::c_long = 156; -pub const SYS_prctl: ::c_long = 157; -pub const SYS_arch_prctl: ::c_long = 158; -pub const SYS_adjtimex: ::c_long = 159; -pub const SYS_setrlimit: ::c_long = 160; -pub const SYS_chroot: ::c_long = 161; -pub const SYS_sync: ::c_long = 162; -pub const SYS_acct: ::c_long = 163; -pub const SYS_settimeofday: ::c_long = 164; -pub const SYS_mount: ::c_long = 165; -pub const SYS_umount2: ::c_long = 166; -pub const SYS_swapon: ::c_long = 167; -pub const SYS_swapoff: ::c_long = 168; -pub const SYS_reboot: ::c_long = 169; -pub const SYS_sethostname: ::c_long = 170; -pub const SYS_setdomainname: ::c_long = 171; -pub const SYS_iopl: ::c_long = 172; -pub const SYS_ioperm: ::c_long = 173; -pub const SYS_create_module: ::c_long = 174; -pub const SYS_init_module: ::c_long = 175; -pub const SYS_delete_module: ::c_long = 176; -pub const SYS_get_kernel_syms: ::c_long = 177; -pub const SYS_query_module: ::c_long = 178; -pub const SYS_quotactl: ::c_long = 179; -pub const SYS_nfsservctl: ::c_long = 180; -pub const SYS_getpmsg: ::c_long = 181; -pub const SYS_putpmsg: ::c_long = 182; -pub const SYS_afs_syscall: ::c_long = 183; -pub const SYS_tuxcall: ::c_long = 184; -pub const SYS_security: ::c_long = 185; -pub const SYS_gettid: ::c_long = 186; -pub const SYS_readahead: ::c_long = 187; -pub const SYS_setxattr: ::c_long = 188; -pub const SYS_lsetxattr: ::c_long = 189; -pub const SYS_fsetxattr: ::c_long = 190; -pub const SYS_getxattr: ::c_long = 191; -pub const SYS_lgetxattr: ::c_long = 192; -pub const SYS_fgetxattr: ::c_long = 193; -pub const SYS_listxattr: ::c_long = 194; -pub const SYS_llistxattr: ::c_long = 195; -pub const SYS_flistxattr: ::c_long = 196; -pub const SYS_removexattr: ::c_long = 197; -pub const SYS_lremovexattr: ::c_long = 198; -pub const SYS_fremovexattr: ::c_long = 199; -pub const SYS_tkill: ::c_long = 200; -pub const SYS_time: ::c_long = 201; -pub const SYS_futex: ::c_long = 202; -pub const SYS_sched_setaffinity: ::c_long = 203; -pub const SYS_sched_getaffinity: ::c_long = 204; -pub const SYS_set_thread_area: ::c_long = 205; -pub const SYS_io_setup: ::c_long = 206; -pub const SYS_io_destroy: ::c_long = 207; -pub const SYS_io_getevents: ::c_long = 208; -pub const SYS_io_submit: ::c_long = 209; -pub const SYS_io_cancel: ::c_long = 210; -pub const SYS_get_thread_area: ::c_long = 211; -pub const SYS_lookup_dcookie: ::c_long = 212; -pub const SYS_epoll_create: ::c_long = 213; -pub const SYS_epoll_ctl_old: ::c_long = 214; -pub const SYS_epoll_wait_old: ::c_long = 215; -pub const SYS_remap_file_pages: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_set_tid_address: ::c_long = 218; -pub const SYS_restart_syscall: ::c_long = 219; -pub const SYS_semtimedop: ::c_long = 220; -pub const SYS_fadvise64: ::c_long = 221; -pub const SYS_timer_create: ::c_long = 222; -pub const SYS_timer_settime: ::c_long = 223; -pub const SYS_timer_gettime: ::c_long = 224; -pub const SYS_timer_getoverrun: ::c_long = 225; -pub const SYS_timer_delete: ::c_long = 226; -pub const SYS_clock_settime: ::c_long = 227; -pub const SYS_clock_gettime: ::c_long = 228; -pub const SYS_clock_getres: ::c_long = 229; -pub const SYS_clock_nanosleep: ::c_long = 230; -pub const SYS_exit_group: ::c_long = 231; -pub const SYS_epoll_wait: ::c_long = 232; -pub const SYS_epoll_ctl: ::c_long = 233; -pub const SYS_tgkill: ::c_long = 234; -pub const SYS_utimes: ::c_long = 235; -pub const SYS_vserver: ::c_long = 236; -pub const SYS_mbind: ::c_long = 237; -pub const SYS_set_mempolicy: ::c_long = 238; -pub const SYS_get_mempolicy: ::c_long = 239; -pub const SYS_mq_open: ::c_long = 240; -pub const SYS_mq_unlink: ::c_long = 241; -pub const SYS_mq_timedsend: ::c_long = 242; -pub const SYS_mq_timedreceive: ::c_long = 243; -pub const SYS_mq_notify: ::c_long = 244; -pub const SYS_mq_getsetattr: ::c_long = 245; -pub const SYS_kexec_load: ::c_long = 246; -pub const SYS_waitid: ::c_long = 247; -pub const SYS_add_key: ::c_long = 248; -pub const SYS_request_key: ::c_long = 249; -pub const SYS_keyctl: ::c_long = 250; -pub const SYS_ioprio_set: ::c_long = 251; -pub const SYS_ioprio_get: ::c_long = 252; -pub const SYS_inotify_init: ::c_long = 253; -pub const SYS_inotify_add_watch: ::c_long = 254; -pub const SYS_inotify_rm_watch: ::c_long = 255; -pub const SYS_migrate_pages: ::c_long = 256; -pub const SYS_openat: ::c_long = 257; -pub const SYS_mkdirat: ::c_long = 258; -pub const SYS_mknodat: ::c_long = 259; -pub const SYS_fchownat: ::c_long = 260; -pub const SYS_futimesat: ::c_long = 261; -pub const SYS_newfstatat: ::c_long = 262; -pub const SYS_unlinkat: ::c_long = 263; -pub const SYS_renameat: ::c_long = 264; -pub const SYS_linkat: ::c_long = 265; -pub const SYS_symlinkat: ::c_long = 266; -pub const SYS_readlinkat: ::c_long = 267; -pub const SYS_fchmodat: ::c_long = 268; -pub const SYS_faccessat: ::c_long = 269; -pub const SYS_pselect6: ::c_long = 270; -pub const SYS_ppoll: ::c_long = 271; -pub const SYS_unshare: ::c_long = 272; -pub const SYS_set_robust_list: ::c_long = 273; -pub const SYS_get_robust_list: ::c_long = 274; -pub const SYS_splice: ::c_long = 275; -pub const SYS_tee: ::c_long = 276; -pub const SYS_sync_file_range: ::c_long = 277; -pub const SYS_vmsplice: ::c_long = 278; -pub const SYS_move_pages: ::c_long = 279; -pub const SYS_utimensat: ::c_long = 280; -pub const SYS_epoll_pwait: ::c_long = 281; -pub const SYS_signalfd: ::c_long = 282; -pub const SYS_timerfd_create: ::c_long = 283; -pub const SYS_eventfd: ::c_long = 284; -pub const SYS_fallocate: ::c_long = 285; -pub const SYS_timerfd_settime: ::c_long = 286; -pub const SYS_timerfd_gettime: ::c_long = 287; -pub const SYS_accept4: ::c_long = 288; -pub const SYS_signalfd4: ::c_long = 289; -pub const SYS_eventfd2: ::c_long = 290; -pub const SYS_epoll_create1: ::c_long = 291; -pub const SYS_dup3: ::c_long = 292; -pub const SYS_pipe2: ::c_long = 293; -pub const SYS_inotify_init1: ::c_long = 294; -pub const SYS_preadv: ::c_long = 295; -pub const SYS_pwritev: ::c_long = 296; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 297; -pub const SYS_perf_event_open: ::c_long = 298; -pub const SYS_recvmmsg: ::c_long = 299; -pub const SYS_fanotify_init: ::c_long = 300; -pub const SYS_fanotify_mark: ::c_long = 301; -pub const SYS_prlimit64: ::c_long = 302; -pub const SYS_name_to_handle_at: ::c_long = 303; -pub const SYS_open_by_handle_at: ::c_long = 304; -pub const SYS_clock_adjtime: ::c_long = 305; -pub const SYS_syncfs: ::c_long = 306; -pub const SYS_sendmmsg: ::c_long = 307; -pub const SYS_setns: ::c_long = 308; -pub const SYS_getcpu: ::c_long = 309; -pub const SYS_process_vm_readv: ::c_long = 310; -pub const SYS_process_vm_writev: ::c_long = 311; -pub const SYS_kcmp: ::c_long = 312; -pub const SYS_finit_module: ::c_long = 313; -pub const SYS_sched_setattr: ::c_long = 314; -pub const SYS_sched_getattr: ::c_long = 315; -pub const SYS_renameat2: ::c_long = 316; -pub const SYS_seccomp: ::c_long = 317; -pub const SYS_getrandom: ::c_long = 318; -pub const SYS_memfd_create: ::c_long = 319; -pub const SYS_kexec_file_load: ::c_long = 320; -pub const SYS_bpf: ::c_long = 321; -pub const SYS_execveat: ::c_long = 322; -pub const SYS_userfaultfd: ::c_long = 323; -pub const SYS_membarrier: ::c_long = 324; -pub const SYS_mlock2: ::c_long = 325; -pub const SYS_copy_file_range: ::c_long = 326; -pub const SYS_preadv2: ::c_long = 327; -pub const SYS_pwritev2: ::c_long = 328; -pub const SYS_pkey_mprotect: ::c_long = 329; -pub const SYS_pkey_alloc: ::c_long = 330; -pub const SYS_pkey_free: ::c_long = 331; -pub const SYS_statx: ::c_long = 332; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +// pub const SYS__sysctl: c_long = 156; +pub const SYS_prctl: c_long = 157; +pub const SYS_arch_prctl: c_long = 158; +pub const SYS_adjtimex: c_long = 159; +pub const SYS_setrlimit: c_long = 160; +pub const SYS_chroot: c_long = 161; +pub const SYS_sync: c_long = 162; +pub const SYS_acct: c_long = 163; +pub const SYS_settimeofday: c_long = 164; +pub const SYS_mount: c_long = 165; +pub const SYS_umount2: c_long = 166; +pub const SYS_swapon: c_long = 167; +pub const SYS_swapoff: c_long = 168; +pub const SYS_reboot: c_long = 169; +pub const SYS_sethostname: c_long = 170; +pub const SYS_setdomainname: c_long = 171; +pub const SYS_iopl: c_long = 172; +pub const SYS_ioperm: c_long = 173; +pub const SYS_create_module: c_long = 174; +pub const SYS_init_module: c_long = 175; +pub const SYS_delete_module: c_long = 176; +pub const SYS_get_kernel_syms: c_long = 177; +pub const SYS_query_module: c_long = 178; +pub const SYS_quotactl: c_long = 179; +pub const SYS_nfsservctl: c_long = 180; +pub const SYS_getpmsg: c_long = 181; +pub const SYS_putpmsg: c_long = 182; +pub const SYS_afs_syscall: c_long = 183; +pub const SYS_tuxcall: c_long = 184; +pub const SYS_security: c_long = 185; +pub const SYS_gettid: c_long = 186; +pub const SYS_readahead: c_long = 187; +pub const SYS_setxattr: c_long = 188; +pub const SYS_lsetxattr: c_long = 189; +pub const SYS_fsetxattr: c_long = 190; +pub const SYS_getxattr: c_long = 191; +pub const SYS_lgetxattr: c_long = 192; +pub const SYS_fgetxattr: c_long = 193; +pub const SYS_listxattr: c_long = 194; +pub const SYS_llistxattr: c_long = 195; +pub const SYS_flistxattr: c_long = 196; +pub const SYS_removexattr: c_long = 197; +pub const SYS_lremovexattr: c_long = 198; +pub const SYS_fremovexattr: c_long = 199; +pub const SYS_tkill: c_long = 200; +pub const SYS_time: c_long = 201; +pub const SYS_futex: c_long = 202; +pub const SYS_sched_setaffinity: c_long = 203; +pub const SYS_sched_getaffinity: c_long = 204; +pub const SYS_set_thread_area: c_long = 205; +pub const SYS_io_setup: c_long = 206; +pub const SYS_io_destroy: c_long = 207; +pub const SYS_io_getevents: c_long = 208; +pub const SYS_io_submit: c_long = 209; +pub const SYS_io_cancel: c_long = 210; +pub const SYS_get_thread_area: c_long = 211; +pub const SYS_lookup_dcookie: c_long = 212; +pub const SYS_epoll_create: c_long = 213; +pub const SYS_epoll_ctl_old: c_long = 214; +pub const SYS_epoll_wait_old: c_long = 215; +pub const SYS_remap_file_pages: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_set_tid_address: c_long = 218; +pub const SYS_restart_syscall: c_long = 219; +pub const SYS_semtimedop: c_long = 220; +pub const SYS_fadvise64: c_long = 221; +pub const SYS_timer_create: c_long = 222; +pub const SYS_timer_settime: c_long = 223; +pub const SYS_timer_gettime: c_long = 224; +pub const SYS_timer_getoverrun: c_long = 225; +pub const SYS_timer_delete: c_long = 226; +pub const SYS_clock_settime: c_long = 227; +pub const SYS_clock_gettime: c_long = 228; +pub const SYS_clock_getres: c_long = 229; +pub const SYS_clock_nanosleep: c_long = 230; +pub const SYS_exit_group: c_long = 231; +pub const SYS_epoll_wait: c_long = 232; +pub const SYS_epoll_ctl: c_long = 233; +pub const SYS_tgkill: c_long = 234; +pub const SYS_utimes: c_long = 235; +pub const SYS_vserver: c_long = 236; +pub const SYS_mbind: c_long = 237; +pub const SYS_set_mempolicy: c_long = 238; +pub const SYS_get_mempolicy: c_long = 239; +pub const SYS_mq_open: c_long = 240; +pub const SYS_mq_unlink: c_long = 241; +pub const SYS_mq_timedsend: c_long = 242; +pub const SYS_mq_timedreceive: c_long = 243; +pub const SYS_mq_notify: c_long = 244; +pub const SYS_mq_getsetattr: c_long = 245; +pub const SYS_kexec_load: c_long = 246; +pub const SYS_waitid: c_long = 247; +pub const SYS_add_key: c_long = 248; +pub const SYS_request_key: c_long = 249; +pub const SYS_keyctl: c_long = 250; +pub const SYS_ioprio_set: c_long = 251; +pub const SYS_ioprio_get: c_long = 252; +pub const SYS_inotify_init: c_long = 253; +pub const SYS_inotify_add_watch: c_long = 254; +pub const SYS_inotify_rm_watch: c_long = 255; +pub const SYS_migrate_pages: c_long = 256; +pub const SYS_openat: c_long = 257; +pub const SYS_mkdirat: c_long = 258; +pub const SYS_mknodat: c_long = 259; +pub const SYS_fchownat: c_long = 260; +pub const SYS_futimesat: c_long = 261; +pub const SYS_newfstatat: c_long = 262; +pub const SYS_unlinkat: c_long = 263; +pub const SYS_renameat: c_long = 264; +pub const SYS_linkat: c_long = 265; +pub const SYS_symlinkat: c_long = 266; +pub const SYS_readlinkat: c_long = 267; +pub const SYS_fchmodat: c_long = 268; +pub const SYS_faccessat: c_long = 269; +pub const SYS_pselect6: c_long = 270; +pub const SYS_ppoll: c_long = 271; +pub const SYS_unshare: c_long = 272; +pub const SYS_set_robust_list: c_long = 273; +pub const SYS_get_robust_list: c_long = 274; +pub const SYS_splice: c_long = 275; +pub const SYS_tee: c_long = 276; +pub const SYS_sync_file_range: c_long = 277; +pub const SYS_vmsplice: c_long = 278; +pub const SYS_move_pages: c_long = 279; +pub const SYS_utimensat: c_long = 280; +pub const SYS_epoll_pwait: c_long = 281; +pub const SYS_signalfd: c_long = 282; +pub const SYS_timerfd_create: c_long = 283; +pub const SYS_eventfd: c_long = 284; +pub const SYS_fallocate: c_long = 285; +pub const SYS_timerfd_settime: c_long = 286; +pub const SYS_timerfd_gettime: c_long = 287; +pub const SYS_accept4: c_long = 288; +pub const SYS_signalfd4: c_long = 289; +pub const SYS_eventfd2: c_long = 290; +pub const SYS_epoll_create1: c_long = 291; +pub const SYS_dup3: c_long = 292; +pub const SYS_pipe2: c_long = 293; +pub const SYS_inotify_init1: c_long = 294; +pub const SYS_preadv: c_long = 295; +pub const SYS_pwritev: c_long = 296; +pub const SYS_rt_tgsigqueueinfo: c_long = 297; +pub const SYS_perf_event_open: c_long = 298; +pub const SYS_recvmmsg: c_long = 299; +pub const SYS_fanotify_init: c_long = 300; +pub const SYS_fanotify_mark: c_long = 301; +pub const SYS_prlimit64: c_long = 302; +pub const SYS_name_to_handle_at: c_long = 303; +pub const SYS_open_by_handle_at: c_long = 304; +pub const SYS_clock_adjtime: c_long = 305; +pub const SYS_syncfs: c_long = 306; +pub const SYS_sendmmsg: c_long = 307; +pub const SYS_setns: c_long = 308; +pub const SYS_getcpu: c_long = 309; +pub const SYS_process_vm_readv: c_long = 310; +pub const SYS_process_vm_writev: c_long = 311; +pub const SYS_kcmp: c_long = 312; +pub const SYS_finit_module: c_long = 313; +pub const SYS_sched_setattr: c_long = 314; +pub const SYS_sched_getattr: c_long = 315; +pub const SYS_renameat2: c_long = 316; +pub const SYS_seccomp: c_long = 317; +pub const SYS_getrandom: c_long = 318; +pub const SYS_memfd_create: c_long = 319; +pub const SYS_kexec_file_load: c_long = 320; +pub const SYS_bpf: c_long = 321; +pub const SYS_execveat: c_long = 322; +pub const SYS_userfaultfd: c_long = 323; +pub const SYS_membarrier: c_long = 324; +pub const SYS_mlock2: c_long = 325; +pub const SYS_copy_file_range: c_long = 326; +pub const SYS_preadv2: c_long = 327; +pub const SYS_pwritev2: c_long = 328; +pub const SYS_pkey_mprotect: c_long = 329; +pub const SYS_pkey_alloc: c_long = 330; +pub const SYS_pkey_free: c_long = 331; +pub const SYS_statx: c_long = 332; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; // offsets in user_regs_structs, from sys/reg.h -pub const R15: ::c_int = 0; -pub const R14: ::c_int = 1; -pub const R13: ::c_int = 2; -pub const R12: ::c_int = 3; -pub const RBP: ::c_int = 4; -pub const RBX: ::c_int = 5; -pub const R11: ::c_int = 6; -pub const R10: ::c_int = 7; -pub const R9: ::c_int = 8; -pub const R8: ::c_int = 9; -pub const RAX: ::c_int = 10; -pub const RCX: ::c_int = 11; -pub const RDX: ::c_int = 12; -pub const RSI: ::c_int = 13; -pub const RDI: ::c_int = 14; -pub const ORIG_RAX: ::c_int = 15; -pub const RIP: ::c_int = 16; -pub const CS: ::c_int = 17; -pub const EFLAGS: ::c_int = 18; -pub const RSP: ::c_int = 19; -pub const SS: ::c_int = 20; -pub const FS_BASE: ::c_int = 21; -pub const GS_BASE: ::c_int = 22; -pub const DS: ::c_int = 23; -pub const ES: ::c_int = 24; -pub const FS: ::c_int = 25; -pub const GS: ::c_int = 26; +pub const R15: c_int = 0; +pub const R14: c_int = 1; +pub const R13: c_int = 2; +pub const R12: c_int = 3; +pub const RBP: c_int = 4; +pub const RBX: c_int = 5; +pub const R11: c_int = 6; +pub const R10: c_int = 7; +pub const R9: c_int = 8; +pub const R8: c_int = 9; +pub const RAX: c_int = 10; +pub const RCX: c_int = 11; +pub const RDX: c_int = 12; +pub const RSI: c_int = 13; +pub const RDI: c_int = 14; +pub const ORIG_RAX: c_int = 15; +pub const RIP: c_int = 16; +pub const CS: c_int = 17; +pub const EFLAGS: c_int = 18; +pub const RSP: c_int = 19; +pub const SS: c_int = 20; +pub const FS_BASE: c_int = 21; +pub const GS_BASE: c_int = 22; +pub const DS: c_int = 23; +pub const ES: c_int = 24; +pub const FS: c_int = 25; +pub const GS: c_int = 26; // offsets in mcontext_t.gregs from sys/ucontext.h -pub const REG_R8: ::c_int = 0; -pub const REG_R9: ::c_int = 1; -pub const REG_R10: ::c_int = 2; -pub const REG_R11: ::c_int = 3; -pub const REG_R12: ::c_int = 4; -pub const REG_R13: ::c_int = 5; -pub const REG_R14: ::c_int = 6; -pub const REG_R15: ::c_int = 7; -pub const REG_RDI: ::c_int = 8; -pub const REG_RSI: ::c_int = 9; -pub const REG_RBP: ::c_int = 10; -pub const REG_RBX: ::c_int = 11; -pub const REG_RDX: ::c_int = 12; -pub const REG_RAX: ::c_int = 13; -pub const REG_RCX: ::c_int = 14; -pub const REG_RSP: ::c_int = 15; -pub const REG_RIP: ::c_int = 16; -pub const REG_EFL: ::c_int = 17; -pub const REG_CSGSFS: ::c_int = 18; -pub const REG_ERR: ::c_int = 19; -pub const REG_TRAPNO: ::c_int = 20; -pub const REG_OLDMASK: ::c_int = 21; -pub const REG_CR2: ::c_int = 22; +pub const REG_R8: c_int = 0; +pub const REG_R9: c_int = 1; +pub const REG_R10: c_int = 2; +pub const REG_R11: c_int = 3; +pub const REG_R12: c_int = 4; +pub const REG_R13: c_int = 5; +pub const REG_R14: c_int = 6; +pub const REG_R15: c_int = 7; +pub const REG_RDI: c_int = 8; +pub const REG_RSI: c_int = 9; +pub const REG_RBP: c_int = 10; +pub const REG_RBX: c_int = 11; +pub const REG_RDX: c_int = 12; +pub const REG_RAX: c_int = 13; +pub const REG_RCX: c_int = 14; +pub const REG_RSP: c_int = 15; +pub const REG_RIP: c_int = 16; +pub const REG_EFL: c_int = 17; +pub const REG_CSGSFS: c_int = 18; +pub const REG_ERR: c_int = 19; +pub const REG_TRAPNO: c_int = 20; +pub const REG_OLDMASK: c_int = 21; +pub const REG_CR2: c_int = 22; // From NDK's asm/auxvec.h -pub const AT_SYSINFO_EHDR: ::c_ulong = 33; -pub const AT_VECTOR_SIZE_ARCH: ::c_ulong = 3; +pub const AT_SYSINFO_EHDR: c_ulong = 33; +pub const AT_VECTOR_SIZE_ARCH: c_ulong = 3; diff --git a/src/unix/linux_like/android/mod.rs b/src/unix/linux_like/android/mod.rs index 9c0274423f282..e352a3b4a2fd8 100644 --- a/src/unix/linux_like/android/mod.rs +++ b/src/unix/linux_like/android/mod.rs @@ -1,37 +1,41 @@ //! Android-specific definitions for linux-like values -pub type clock_t = ::c_long; -pub type time_t = ::c_long; -pub type suseconds_t = ::c_long; -pub type off_t = ::c_long; -pub type blkcnt_t = ::c_ulong; -pub type blksize_t = ::c_ulong; +use crate::{ + c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, size_t, ssize_t, +}; + +pub type clock_t = c_long; +pub type time_t = c_long; +pub type suseconds_t = c_long; +pub type off_t = c_long; +pub type blkcnt_t = c_ulong; +pub type blksize_t = c_ulong; pub type nlink_t = u32; pub type useconds_t = u32; -pub type pthread_t = ::c_long; -pub type pthread_mutexattr_t = ::c_long; -pub type pthread_rwlockattr_t = ::c_long; -pub type pthread_barrierattr_t = ::c_int; -pub type pthread_condattr_t = ::c_long; -pub type pthread_key_t = ::c_int; -pub type fsfilcnt_t = ::c_ulong; -pub type fsblkcnt_t = ::c_ulong; -pub type nfds_t = ::c_uint; -pub type rlim_t = ::c_ulong; -pub type dev_t = ::c_ulong; -pub type ino_t = ::c_ulong; +pub type pthread_t = c_long; +pub type pthread_mutexattr_t = c_long; +pub type pthread_rwlockattr_t = c_long; +pub type pthread_barrierattr_t = c_int; +pub type pthread_condattr_t = c_long; +pub type pthread_key_t = c_int; +pub type fsfilcnt_t = c_ulong; +pub type fsblkcnt_t = c_ulong; +pub type nfds_t = c_uint; +pub type rlim_t = c_ulong; +pub type dev_t = c_ulong; +pub type ino_t = c_ulong; pub type ino64_t = u64; -pub type __CPU_BITTYPE = ::c_ulong; -pub type idtype_t = ::c_int; -pub type loff_t = ::c_longlong; -pub type __kernel_loff_t = ::c_longlong; -pub type __kernel_pid_t = ::c_int; - -pub type __u8 = ::c_uchar; -pub type __u16 = ::c_ushort; -pub type __s16 = ::c_short; -pub type __u32 = ::c_uint; -pub type __s32 = ::c_int; +pub type __CPU_BITTYPE = c_ulong; +pub type idtype_t = c_int; +pub type loff_t = c_longlong; +pub type __kernel_loff_t = c_longlong; +pub type __kernel_pid_t = c_int; + +pub type __u8 = c_uchar; +pub type __u16 = c_ushort; +pub type __s16 = c_short; +pub type __u32 = c_uint; +pub type __s32 = c_int; // linux/elf.h @@ -49,83 +53,83 @@ pub type Elf64_Xword = u64; pub type eventfd_t = u64; // these structs sit behind a heap allocation on Android -pub type posix_spawn_file_actions_t = *mut ::c_void; -pub type posix_spawnattr_t = *mut ::c_void; +pub type posix_spawn_file_actions_t = *mut c_void; +pub type posix_spawnattr_t = *mut c_void; s! { pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct __fsid_t { - __val: [::c_int; 2], + __val: [c_int; 2], } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: size_t, + pub msg_control: *mut c_void, + pub msg_controllen: size_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::size_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: size_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct termios2 { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; 19], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; 19], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct mallinfo { - pub arena: ::size_t, - pub ordblks: ::size_t, - pub smblks: ::size_t, - pub hblks: ::size_t, - pub hblkhd: ::size_t, - pub usmblks: ::size_t, - pub fsmblks: ::size_t, - pub uordblks: ::size_t, - pub fordblks: ::size_t, - pub keepcost: ::size_t, + pub arena: size_t, + pub ordblks: size_t, + pub smblks: size_t, + pub hblks: size_t, + pub hblkhd: size_t, + pub usmblks: size_t, + pub fsmblks: size_t, + pub uordblks: size_t, + pub fordblks: size_t, + pub keepcost: size_t, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::__kernel_loff_t, - pub l_len: ::__kernel_loff_t, - pub l_pid: ::__kernel_pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: crate::__kernel_loff_t, + pub l_len: crate::__kernel_loff_t, + pub l_pid: crate::__kernel_pid_t, } pub struct cpu_set_t { @@ -136,28 +140,28 @@ s! { } pub struct sem_t { - count: ::c_uint, + count: c_uint, #[cfg(target_pointer_width = "64")] - __reserved: [::c_int; 3], + __reserved: [c_int; 3], } pub struct exit_status { - pub e_termination: ::c_short, - pub e_exit: ::c_short, + pub e_termination: c_short, + pub e_exit: c_short, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, #[cfg(target_pointer_width = "64")] __f_reserved: [u32; 6], } @@ -175,10 +179,10 @@ s! { pub ssi_trapno: u32, pub ssi_status: i32, pub ssi_int: i32, - pub ssi_ptr: ::c_ulonglong, - pub ssi_utime: ::c_ulonglong, - pub ssi_stime: ::c_ulonglong, - pub ssi_addr: ::c_ulonglong, + pub ssi_ptr: c_ulonglong, + pub ssi_utime: c_ulonglong, + pub ssi_stime: c_ulonglong, + pub ssi_addr: c_ulonglong, pub ssi_addr_lsb: u16, _pad2: u16, pub ssi_syscall: i32, @@ -188,14 +192,14 @@ s! { } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct ucred { - pub pid: ::pid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, + pub pid: crate::pid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, } pub struct genlmsghdr { @@ -213,7 +217,7 @@ s! { } pub struct nlmsgerr { - pub error: ::c_int, + pub error: c_int, pub msg: nlmsghdr, } @@ -222,15 +226,15 @@ s! { } pub struct nl_mmap_req { - pub nm_block_size: ::c_uint, - pub nm_block_nr: ::c_uint, - pub nm_frame_size: ::c_uint, - pub nm_frame_nr: ::c_uint, + pub nm_block_size: c_uint, + pub nm_block_nr: c_uint, + pub nm_frame_size: c_uint, + pub nm_frame_nr: c_uint, } pub struct nl_mmap_hdr { - pub nm_status: ::c_uint, - pub nm_len: ::c_uint, + pub nm_status: c_uint, + pub nm_len: c_uint, pub nm_group: u32, pub nm_pid: u32, pub nm_uid: u32, @@ -243,12 +247,12 @@ s! { } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_int, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_int, } pub struct inotify_event { - pub wd: ::c_int, + pub wd: c_int, pub mask: u32, pub cookie: u32, pub len: u32, @@ -265,22 +269,22 @@ s! { } pub struct regex_t { - re_magic: ::c_int, - re_nsub: ::size_t, - re_endp: *const ::c_char, - re_guts: *mut ::c_void, + re_magic: c_int, + re_nsub: size_t, + re_endp: *const c_char, + re_guts: *mut c_void, } pub struct regmatch_t { - pub rm_so: ::ssize_t, - pub rm_eo: ::ssize_t, + pub rm_so: ssize_t, + pub rm_eo: ssize_t, } pub struct sockaddr_vm { - pub svm_family: ::sa_family_t, - pub svm_reserved1: ::c_ushort, - pub svm_port: ::c_uint, - pub svm_cid: ::c_uint, + pub svm_family: crate::sa_family_t, + pub svm_reserved1: c_ushort, + pub svm_port: c_uint, + pub svm_cid: c_uint, pub svm_zero: [u8; 4], } @@ -316,7 +320,7 @@ s! { #[cfg(target_pointer_width = "32")] pub dlpi_addr: Elf32_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, #[cfg(target_pointer_width = "64")] pub dlpi_phdr: *const Elf64_Phdr, @@ -329,143 +333,143 @@ s! { pub dlpi_phnum: Elf32_Half, // These fields were added in Android R - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, - pub dlpi_tls_modid: ::size_t, - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, + pub dlpi_tls_modid: size_t, + pub dlpi_tls_data: *mut c_void, } // linux/filter.h pub struct sock_filter { - pub code: ::__u16, - pub jt: ::__u8, - pub jf: ::__u8, - pub k: ::__u32, + pub code: crate::__u16, + pub jt: crate::__u8, + pub jf: crate::__u8, + pub k: crate::__u32, } pub struct sock_fprog { - pub len: ::c_ushort, + pub len: c_ushort, pub filter: *mut sock_filter, } // linux/seccomp.h pub struct seccomp_data { - pub nr: ::c_int, - pub arch: ::__u32, - pub instruction_pointer: ::__u64, - pub args: [::__u64; 6], + pub nr: c_int, + pub arch: crate::__u32, + pub instruction_pointer: crate::__u64, + pub args: [crate::__u64; 6], } pub struct seccomp_metadata { - pub filter_off: ::__u64, - pub flags: ::__u64, + pub filter_off: crate::__u64, + pub flags: crate::__u64, } pub struct ptrace_peeksiginfo_args { - pub off: ::__u64, - pub flags: ::__u32, - pub nr: ::__s32, + pub off: crate::__u64, + pub flags: crate::__u32, + pub nr: crate::__s32, } // linux/input.h pub struct input_event { - pub time: ::timeval, - pub type_: ::__u16, - pub code: ::__u16, - pub value: ::__s32, + pub time: crate::timeval, + pub type_: crate::__u16, + pub code: crate::__u16, + pub value: crate::__s32, } pub struct input_id { - pub bustype: ::__u16, - pub vendor: ::__u16, - pub product: ::__u16, - pub version: ::__u16, + pub bustype: crate::__u16, + pub vendor: crate::__u16, + pub product: crate::__u16, + pub version: crate::__u16, } pub struct input_absinfo { - pub value: ::__s32, - pub minimum: ::__s32, - pub maximum: ::__s32, - pub fuzz: ::__s32, - pub flat: ::__s32, - pub resolution: ::__s32, + pub value: crate::__s32, + pub minimum: crate::__s32, + pub maximum: crate::__s32, + pub fuzz: crate::__s32, + pub flat: crate::__s32, + pub resolution: crate::__s32, } pub struct input_keymap_entry { - pub flags: ::__u8, - pub len: ::__u8, - pub index: ::__u16, - pub keycode: ::__u32, - pub scancode: [::__u8; 32], + pub flags: crate::__u8, + pub len: crate::__u8, + pub index: crate::__u16, + pub keycode: crate::__u32, + pub scancode: [crate::__u8; 32], } pub struct input_mask { - pub type_: ::__u32, - pub codes_size: ::__u32, - pub codes_ptr: ::__u64, + pub type_: crate::__u32, + pub codes_size: crate::__u32, + pub codes_ptr: crate::__u64, } pub struct ff_replay { - pub length: ::__u16, - pub delay: ::__u16, + pub length: crate::__u16, + pub delay: crate::__u16, } pub struct ff_trigger { - pub button: ::__u16, - pub interval: ::__u16, + pub button: crate::__u16, + pub interval: crate::__u16, } pub struct ff_envelope { - pub attack_length: ::__u16, - pub attack_level: ::__u16, - pub fade_length: ::__u16, - pub fade_level: ::__u16, + pub attack_length: crate::__u16, + pub attack_level: crate::__u16, + pub fade_length: crate::__u16, + pub fade_level: crate::__u16, } pub struct ff_constant_effect { - pub level: ::__s16, + pub level: crate::__s16, pub envelope: ff_envelope, } pub struct ff_ramp_effect { - pub start_level: ::__s16, - pub end_level: ::__s16, + pub start_level: crate::__s16, + pub end_level: crate::__s16, pub envelope: ff_envelope, } pub struct ff_condition_effect { - pub right_saturation: ::__u16, - pub left_saturation: ::__u16, + pub right_saturation: crate::__u16, + pub left_saturation: crate::__u16, - pub right_coeff: ::__s16, - pub left_coeff: ::__s16, + pub right_coeff: crate::__s16, + pub left_coeff: crate::__s16, - pub deadband: ::__u16, - pub center: ::__s16, + pub deadband: crate::__u16, + pub center: crate::__s16, } pub struct ff_periodic_effect { - pub waveform: ::__u16, - pub period: ::__u16, - pub magnitude: ::__s16, - pub offset: ::__s16, - pub phase: ::__u16, + pub waveform: crate::__u16, + pub period: crate::__u16, + pub magnitude: crate::__s16, + pub offset: crate::__s16, + pub phase: crate::__u16, pub envelope: ff_envelope, - pub custom_len: ::__u32, - pub custom_data: *mut ::__s16, + pub custom_len: crate::__u32, + pub custom_data: *mut crate::__s16, } pub struct ff_rumble_effect { - pub strong_magnitude: ::__u16, - pub weak_magnitude: ::__u16, + pub strong_magnitude: crate::__u16, + pub weak_magnitude: crate::__u16, } pub struct ff_effect { - pub type_: ::__u16, - pub id: ::__s16, - pub direction: ::__u16, + pub type_: crate::__u16, + pub id: crate::__s16, + pub direction: crate::__u16, pub trigger: ff_trigger, pub replay: ff_replay, // FIXME(1.0): this is actually a union @@ -477,50 +481,50 @@ s! { // linux/uinput.h pub struct uinput_ff_upload { - pub request_id: ::__u32, - pub retval: ::__s32, + pub request_id: crate::__u32, + pub retval: crate::__s32, pub effect: ff_effect, pub old: ff_effect, } pub struct uinput_ff_erase { - pub request_id: ::__u32, - pub retval: ::__s32, - pub effect_id: ::__u32, + pub request_id: crate::__u32, + pub retval: crate::__s32, + pub effect_id: crate::__u32, } pub struct uinput_abs_setup { - pub code: ::__u16, + pub code: crate::__u16, pub absinfo: input_absinfo, } pub struct option { - pub name: *const ::c_char, - pub has_arg: ::c_int, - pub flag: *mut ::c_int, - pub val: ::c_int, + pub name: *const c_char, + pub has_arg: c_int, + pub flag: *mut c_int, + pub val: c_int, } pub struct __c_anonymous_ifru_map { - pub mem_start: ::c_ulong, - pub mem_end: ::c_ulong, - pub base_addr: ::c_ushort, - pub irq: ::c_uchar, - pub dma: ::c_uchar, - pub port: ::c_uchar, + pub mem_start: c_ulong, + pub mem_end: c_ulong, + pub base_addr: c_ushort, + pub irq: c_uchar, + pub dma: c_uchar, + pub port: c_uchar, } pub struct in6_ifreq { - pub ifr6_addr: ::in6_addr, + pub ifr6_addr: crate::in6_addr, pub ifr6_prefixlen: u32, - pub ifr6_ifindex: ::c_int, + pub ifr6_ifindex: c_int, } } s_no_extra_traits! { pub struct sockaddr_nl { - pub nl_family: ::sa_family_t, - nl_pad: ::c_ushort, + pub nl_family: crate::sa_family_t, + nl_pad: c_ushort, pub nl_pid: u32, pub nl_groups: u32, } @@ -528,112 +532,112 @@ s_no_extra_traits! { pub struct dirent { pub d_ino: u64, pub d_off: i64, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct dirent64 { pub d_ino: u64, pub d_off: i64, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct lastlog { - ll_time: ::time_t, - ll_line: [::c_char; UT_LINESIZE], - ll_host: [::c_char; UT_HOSTSIZE], + ll_time: crate::time_t, + ll_line: [c_char; UT_LINESIZE], + ll_host: [c_char; UT_HOSTSIZE], } pub struct utmp { - pub ut_type: ::c_short, - pub ut_pid: ::pid_t, - pub ut_line: [::c_char; UT_LINESIZE], - pub ut_id: [::c_char; 4], - pub ut_user: [::c_char; UT_NAMESIZE], - pub ut_host: [::c_char; UT_HOSTSIZE], + pub ut_type: c_short, + pub ut_pid: crate::pid_t, + pub ut_line: [c_char; UT_LINESIZE], + pub ut_id: [c_char; 4], + pub ut_user: [c_char; UT_NAMESIZE], + pub ut_host: [c_char; UT_HOSTSIZE], pub ut_exit: exit_status, - pub ut_session: ::c_long, - pub ut_tv: ::timeval, + pub ut_session: c_long, + pub ut_tv: crate::timeval, pub ut_addr_v6: [i32; 4], - unused: [::c_char; 20], + unused: [c_char; 20], } pub struct sockaddr_alg { - pub salg_family: ::sa_family_t, - pub salg_type: [::c_uchar; 14], + pub salg_family: crate::sa_family_t, + pub salg_type: [c_uchar; 14], pub salg_feat: u32, pub salg_mask: u32, - pub salg_name: [::c_uchar; 64], + pub salg_name: [c_uchar; 64], } pub struct uinput_setup { pub id: input_id, - pub name: [::c_char; UINPUT_MAX_NAME_SIZE], - pub ff_effects_max: ::__u32, + pub name: [c_char; UINPUT_MAX_NAME_SIZE], + pub ff_effects_max: crate::__u32, } pub struct uinput_user_dev { - pub name: [::c_char; UINPUT_MAX_NAME_SIZE], + pub name: [c_char; UINPUT_MAX_NAME_SIZE], pub id: input_id, - pub ff_effects_max: ::__u32, - pub absmax: [::__s32; ABS_CNT], - pub absmin: [::__s32; ABS_CNT], - pub absfuzz: [::__s32; ABS_CNT], - pub absflat: [::__s32; ABS_CNT], + pub ff_effects_max: crate::__u32, + pub absmax: [crate::__s32; ABS_CNT], + pub absmin: [crate::__s32; ABS_CNT], + pub absfuzz: [crate::__s32; ABS_CNT], + pub absflat: [crate::__s32; ABS_CNT], } #[allow(missing_debug_implementations)] pub struct af_alg_iv { pub ivlen: u32, - pub iv: [::c_uchar; 0], + pub iv: [c_uchar; 0], } pub struct prop_info { - __name: [::c_char; 32], - __serial: ::c_uint, - __value: [::c_char; 92], + __name: [c_char; 32], + __serial: c_uint, + __value: [c_char; 92], } pub union __c_anonymous_ifr_ifru { - pub ifru_addr: ::sockaddr, - pub ifru_dstaddr: ::sockaddr, - pub ifru_broadaddr: ::sockaddr, - pub ifru_netmask: ::sockaddr, - pub ifru_hwaddr: ::sockaddr, - pub ifru_flags: ::c_short, - pub ifru_ifindex: ::c_int, - pub ifru_metric: ::c_int, - pub ifru_mtu: ::c_int, + pub ifru_addr: crate::sockaddr, + pub ifru_dstaddr: crate::sockaddr, + pub ifru_broadaddr: crate::sockaddr, + pub ifru_netmask: crate::sockaddr, + pub ifru_hwaddr: crate::sockaddr, + pub ifru_flags: c_short, + pub ifru_ifindex: c_int, + pub ifru_metric: c_int, + pub ifru_mtu: c_int, pub ifru_map: __c_anonymous_ifru_map, - pub ifru_slave: [::c_char; ::IFNAMSIZ], - pub ifru_newname: [::c_char; ::IFNAMSIZ], - pub ifru_data: *mut ::c_char, + pub ifru_slave: [c_char; crate::IFNAMSIZ], + pub ifru_newname: [c_char; crate::IFNAMSIZ], + pub ifru_data: *mut c_char, } pub struct ifreq { /// interface name, e.g. "en0" - pub ifr_name: [::c_char; ::IFNAMSIZ], + pub ifr_name: [c_char; crate::IFNAMSIZ], pub ifr_ifru: __c_anonymous_ifr_ifru, } pub union __c_anonymous_ifc_ifcu { - pub ifcu_buf: *mut ::c_char, - pub ifcu_req: *mut ::ifreq, + pub ifcu_buf: *mut c_char, + pub ifcu_req: *mut crate::ifreq, } pub struct ifconf { - pub ifc_len: ::c_int, + pub ifc_len: c_int, pub ifc_ifcu: __c_anonymous_ifc_ifcu, } } @@ -648,8 +652,8 @@ cfg_if! { } } impl Eq for sockaddr_nl {} - impl ::fmt::Debug for sockaddr_nl { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_nl { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_nl") .field("nl_family", &self.nl_family) .field("nl_pid", &self.nl_pid) @@ -657,8 +661,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_nl { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_nl { + fn hash(&self, state: &mut H) { self.nl_family.hash(state); self.nl_pid.hash(state); self.nl_groups.hash(state); @@ -681,8 +685,8 @@ cfg_if! { impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -693,8 +697,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -719,8 +723,8 @@ cfg_if! { impl Eq for dirent64 {} - impl ::fmt::Debug for dirent64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent64 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent64") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -731,8 +735,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent64 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent64 { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -753,8 +757,8 @@ cfg_if! { impl Eq for siginfo_t {} - impl ::fmt::Debug for siginfo_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for siginfo_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("siginfo_t") .field("si_signo", &self.si_signo) .field("si_errno", &self.si_errno) @@ -765,8 +769,8 @@ cfg_if! { } } - impl ::hash::Hash for siginfo_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for siginfo_t { + fn hash(&self, state: &mut H) { self.si_signo.hash(state); self.si_errno.hash(state); self.si_code.hash(state); @@ -793,8 +797,8 @@ cfg_if! { impl Eq for lastlog {} - impl ::fmt::Debug for lastlog { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for lastlog { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("lastlog") .field("ll_time", &self.ll_time) .field("ll_line", &self.ll_line) @@ -803,8 +807,8 @@ cfg_if! { } } - impl ::hash::Hash for lastlog { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for lastlog { + fn hash(&self, state: &mut H) { self.ll_time.hash(state); self.ll_line.hash(state); self.ll_host.hash(state); @@ -841,8 +845,8 @@ cfg_if! { impl Eq for utmp {} - impl ::fmt::Debug for utmp { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmp { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmp") .field("ut_type", &self.ut_type) .field("ut_pid", &self.ut_pid) @@ -859,8 +863,8 @@ cfg_if! { } } - impl ::hash::Hash for utmp { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmp { + fn hash(&self, state: &mut H) { self.ut_type.hash(state); self.ut_pid.hash(state); self.ut_line.hash(state); @@ -895,8 +899,8 @@ cfg_if! { impl Eq for sockaddr_alg {} - impl ::fmt::Debug for sockaddr_alg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_alg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_alg") .field("salg_family", &self.salg_family) .field("salg_type", &self.salg_type) @@ -907,8 +911,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_alg { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_alg { + fn hash(&self, state: &mut H) { self.salg_family.hash(state); self.salg_type.hash(state); self.salg_feat.hash(state); @@ -926,8 +930,8 @@ cfg_if! { } impl Eq for uinput_setup {} - impl ::fmt::Debug for uinput_setup { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for uinput_setup { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uinput_setup") .field("id", &self.id) .field("name", &&self.name[..]) @@ -936,8 +940,8 @@ cfg_if! { } } - impl ::hash::Hash for uinput_setup { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for uinput_setup { + fn hash(&self, state: &mut H) { self.id.hash(state); self.name.hash(state); self.ff_effects_max.hash(state); @@ -957,8 +961,8 @@ cfg_if! { } impl Eq for uinput_user_dev {} - impl ::fmt::Debug for uinput_user_dev { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for uinput_user_dev { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uinput_setup") .field("name", &&self.name[..]) .field("id", &self.id) @@ -971,8 +975,8 @@ cfg_if! { } } - impl ::hash::Hash for uinput_user_dev { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for uinput_user_dev { + fn hash(&self, state: &mut H) { self.name.hash(state); self.id.hash(state); self.ff_effects_max.hash(state); @@ -983,8 +987,8 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_ifr_ifru { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifr_ifru { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifr_ifru") .field("ifru_addr", unsafe { &self.ifru_addr }) .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) @@ -1002,8 +1006,8 @@ cfg_if! { .finish() } } - impl ::fmt::Debug for ifreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifreq") .field("ifr_name", &self.ifr_name) .field("ifr_ifru", &self.ifr_ifru) @@ -1011,16 +1015,16 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_ifc_ifcu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifc_ifcu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifr_ifru") .field("ifcu_buf", unsafe { &self.ifcu_buf }) .field("ifcu_req", unsafe { &self.ifcu_req }) .finish() } } - impl ::fmt::Debug for ifconf { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifconf { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifconf") .field("ifc_len", &self.ifc_len) .field("ifc_ifcu", &self.ifc_ifcu) @@ -1036,8 +1040,8 @@ cfg_if! { } } impl Eq for prop_info {} - impl ::fmt::Debug for prop_info { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for prop_info { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("prop_info") .field("__name", &self.__name) .field("__serial", &self.__serial) @@ -1048,309 +1052,309 @@ cfg_if! { } } -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MS_NOUSER: ::c_ulong = 0xffffffff80000000; -pub const MS_RMT_MASK: ::c_ulong = 0x02800051; - -pub const O_TRUNC: ::c_int = 512; -pub const O_CLOEXEC: ::c_int = 0x80000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_NOATIME: ::c_int = 0o1000000; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MS_NOUSER: c_ulong = 0xffffffff80000000; +pub const MS_RMT_MASK: c_ulong = 0x02800051; + +pub const O_TRUNC: c_int = 512; +pub const O_CLOEXEC: c_int = 0x80000; +pub const O_PATH: c_int = 0o10000000; +pub const O_NOATIME: c_int = 0o1000000; + +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; + +pub const EPOLL_CLOEXEC: c_int = 0x80000; // sys/eventfd.h -pub const EFD_SEMAPHORE: ::c_int = 0x1; -pub const EFD_CLOEXEC: ::c_int = O_CLOEXEC; -pub const EFD_NONBLOCK: ::c_int = O_NONBLOCK; +pub const EFD_SEMAPHORE: c_int = 0x1; +pub const EFD_CLOEXEC: c_int = O_CLOEXEC; +pub const EFD_NONBLOCK: c_int = O_NONBLOCK; // sys/timerfd.h -pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC; -pub const TFD_NONBLOCK: ::c_int = O_NONBLOCK; -pub const TFD_TIMER_ABSTIME: ::c_int = 1; -pub const TFD_TIMER_CANCEL_ON_SET: ::c_int = 2; +pub const TFD_CLOEXEC: c_int = O_CLOEXEC; +pub const TFD_NONBLOCK: c_int = O_NONBLOCK; +pub const TFD_TIMER_ABSTIME: c_int = 1; +pub const TFD_TIMER_CANCEL_ON_SET: c_int = 2; -pub const USER_PROCESS: ::c_short = 7; +pub const USER_PROCESS: c_short = 7; -pub const _POSIX_VDISABLE: ::cc_t = 0; +pub const _POSIX_VDISABLE: crate::cc_t = 0; // linux/falloc.h -pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; -pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; -pub const FALLOC_FL_NO_HIDE_STALE: ::c_int = 0x04; -pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08; -pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10; -pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20; -pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40; - -pub const BUFSIZ: ::c_uint = 1024; -pub const FILENAME_MAX: ::c_uint = 4096; -pub const FOPEN_MAX: ::c_uint = 20; -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; -pub const L_tmpnam: ::c_uint = 4096; -pub const TMP_MAX: ::c_uint = 308915776; -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_2_SYMLINKS: ::c_int = 7; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 8; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 9; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 10; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 11; -pub const _PC_REC_XFER_ALIGN: ::c_int = 12; -pub const _PC_SYMLINK_MAX: ::c_int = 13; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 14; -pub const _PC_NO_TRUNC: ::c_int = 15; -pub const _PC_VDISABLE: ::c_int = 16; -pub const _PC_ASYNC_IO: ::c_int = 17; -pub const _PC_PRIO_IO: ::c_int = 18; -pub const _PC_SYNC_IO: ::c_int = 19; - -pub const FIONBIO: ::c_int = 0x5421; - -pub const _SC_ARG_MAX: ::c_int = 0x0000; -pub const _SC_BC_BASE_MAX: ::c_int = 0x0001; -pub const _SC_BC_DIM_MAX: ::c_int = 0x0002; -pub const _SC_BC_SCALE_MAX: ::c_int = 0x0003; -pub const _SC_BC_STRING_MAX: ::c_int = 0x0004; -pub const _SC_CHILD_MAX: ::c_int = 0x0005; -pub const _SC_CLK_TCK: ::c_int = 0x0006; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 0x0007; -pub const _SC_EXPR_NEST_MAX: ::c_int = 0x0008; -pub const _SC_LINE_MAX: ::c_int = 0x0009; -pub const _SC_NGROUPS_MAX: ::c_int = 0x000a; -pub const _SC_OPEN_MAX: ::c_int = 0x000b; -pub const _SC_PASS_MAX: ::c_int = 0x000c; -pub const _SC_2_C_BIND: ::c_int = 0x000d; -pub const _SC_2_C_DEV: ::c_int = 0x000e; -pub const _SC_2_C_VERSION: ::c_int = 0x000f; -pub const _SC_2_CHAR_TERM: ::c_int = 0x0010; -pub const _SC_2_FORT_DEV: ::c_int = 0x0011; -pub const _SC_2_FORT_RUN: ::c_int = 0x0012; -pub const _SC_2_LOCALEDEF: ::c_int = 0x0013; -pub const _SC_2_SW_DEV: ::c_int = 0x0014; -pub const _SC_2_UPE: ::c_int = 0x0015; -pub const _SC_2_VERSION: ::c_int = 0x0016; -pub const _SC_JOB_CONTROL: ::c_int = 0x0017; -pub const _SC_SAVED_IDS: ::c_int = 0x0018; -pub const _SC_VERSION: ::c_int = 0x0019; -pub const _SC_RE_DUP_MAX: ::c_int = 0x001a; -pub const _SC_STREAM_MAX: ::c_int = 0x001b; -pub const _SC_TZNAME_MAX: ::c_int = 0x001c; -pub const _SC_XOPEN_CRYPT: ::c_int = 0x001d; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 0x001e; -pub const _SC_XOPEN_SHM: ::c_int = 0x001f; -pub const _SC_XOPEN_VERSION: ::c_int = 0x0020; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 0x0021; -pub const _SC_XOPEN_REALTIME: ::c_int = 0x0022; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 0x0023; -pub const _SC_XOPEN_LEGACY: ::c_int = 0x0024; -pub const _SC_ATEXIT_MAX: ::c_int = 0x0025; -pub const _SC_IOV_MAX: ::c_int = 0x0026; -pub const _SC_UIO_MAXIOV: ::c_int = _SC_IOV_MAX; -pub const _SC_PAGESIZE: ::c_int = 0x0027; -pub const _SC_PAGE_SIZE: ::c_int = 0x0028; -pub const _SC_XOPEN_UNIX: ::c_int = 0x0029; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 0x002a; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 0x002b; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 0x002c; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 0x002d; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 0x002e; -pub const _SC_AIO_MAX: ::c_int = 0x002f; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 0x0030; -pub const _SC_DELAYTIMER_MAX: ::c_int = 0x0031; -pub const _SC_MQ_OPEN_MAX: ::c_int = 0x0032; -pub const _SC_MQ_PRIO_MAX: ::c_int = 0x0033; -pub const _SC_RTSIG_MAX: ::c_int = 0x0034; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 0x0035; -pub const _SC_SEM_VALUE_MAX: ::c_int = 0x0036; -pub const _SC_SIGQUEUE_MAX: ::c_int = 0x0037; -pub const _SC_TIMER_MAX: ::c_int = 0x0038; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 0x0039; -pub const _SC_FSYNC: ::c_int = 0x003a; -pub const _SC_MAPPED_FILES: ::c_int = 0x003b; -pub const _SC_MEMLOCK: ::c_int = 0x003c; -pub const _SC_MEMLOCK_RANGE: ::c_int = 0x003d; -pub const _SC_MEMORY_PROTECTION: ::c_int = 0x003e; -pub const _SC_MESSAGE_PASSING: ::c_int = 0x003f; -pub const _SC_PRIORITIZED_IO: ::c_int = 0x0040; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 0x0041; -pub const _SC_REALTIME_SIGNALS: ::c_int = 0x0042; -pub const _SC_SEMAPHORES: ::c_int = 0x0043; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 0x0044; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 0x0045; -pub const _SC_TIMERS: ::c_int = 0x0046; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 0x0047; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 0x0048; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 0x0049; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 0x004a; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 0x004b; -pub const _SC_THREAD_STACK_MIN: ::c_int = 0x004c; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 0x004d; -pub const _SC_TTY_NAME_MAX: ::c_int = 0x004e; -pub const _SC_THREADS: ::c_int = 0x004f; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 0x0050; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 0x0051; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 0x0052; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 0x0053; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 0x0054; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 0x0055; -pub const _SC_NPROCESSORS_CONF: ::c_int = 0x0060; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 0x0061; -pub const _SC_PHYS_PAGES: ::c_int = 0x0062; -pub const _SC_AVPHYS_PAGES: ::c_int = 0x0063; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 0x0064; -pub const _SC_2_PBS: ::c_int = 0x0065; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 0x0066; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 0x0067; -pub const _SC_2_PBS_LOCATE: ::c_int = 0x0068; -pub const _SC_2_PBS_MESSAGE: ::c_int = 0x0069; -pub const _SC_2_PBS_TRACK: ::c_int = 0x006a; -pub const _SC_ADVISORY_INFO: ::c_int = 0x006b; -pub const _SC_BARRIERS: ::c_int = 0x006c; -pub const _SC_CLOCK_SELECTION: ::c_int = 0x006d; -pub const _SC_CPUTIME: ::c_int = 0x006e; -pub const _SC_HOST_NAME_MAX: ::c_int = 0x006f; -pub const _SC_IPV6: ::c_int = 0x0070; -pub const _SC_RAW_SOCKETS: ::c_int = 0x0071; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 0x0072; -pub const _SC_REGEXP: ::c_int = 0x0073; -pub const _SC_SHELL: ::c_int = 0x0074; -pub const _SC_SPAWN: ::c_int = 0x0075; -pub const _SC_SPIN_LOCKS: ::c_int = 0x0076; -pub const _SC_SPORADIC_SERVER: ::c_int = 0x0077; -pub const _SC_SS_REPL_MAX: ::c_int = 0x0078; -pub const _SC_SYMLOOP_MAX: ::c_int = 0x0079; -pub const _SC_THREAD_CPUTIME: ::c_int = 0x007a; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 0x007b; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 0x007c; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 0x007d; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 0x007e; -pub const _SC_TIMEOUTS: ::c_int = 0x007f; -pub const _SC_TRACE: ::c_int = 0x0080; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 0x0081; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 0x0082; -pub const _SC_TRACE_INHERIT: ::c_int = 0x0083; -pub const _SC_TRACE_LOG: ::c_int = 0x0084; -pub const _SC_TRACE_NAME_MAX: ::c_int = 0x0085; -pub const _SC_TRACE_SYS_MAX: ::c_int = 0x0086; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 0x0087; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 0x0088; -pub const _SC_V7_ILP32_OFF32: ::c_int = 0x0089; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 0x008a; -pub const _SC_V7_LP64_OFF64: ::c_int = 0x008b; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 0x008c; -pub const _SC_XOPEN_STREAMS: ::c_int = 0x008d; -pub const _SC_XOPEN_UUCP: ::c_int = 0x008e; -pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 0x008f; -pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 0x0090; -pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 0x0091; -pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 0x0092; -pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 0x0093; -pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 0x0094; -pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 0x0095; -pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 0x0096; -pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 0x0097; -pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 0x0098; -pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 0x0099; -pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 0x009a; -pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 0x009b; -pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 0x009c; -pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 0x009d; - -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; - -pub const F_SEAL_FUTURE_WRITE: ::c_int = 0x0010; - -pub const IFF_LOWER_UP: ::c_int = 0x10000; -pub const IFF_DORMANT: ::c_int = 0x20000; -pub const IFF_ECHO: ::c_int = 0x40000; - -pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; - -pub const PTHREAD_EXPLICIT_SCHED: ::c_int = 0; -pub const PTHREAD_INHERIT_SCHED: ::c_int = 1; +pub const FALLOC_FL_KEEP_SIZE: c_int = 0x01; +pub const FALLOC_FL_PUNCH_HOLE: c_int = 0x02; +pub const FALLOC_FL_NO_HIDE_STALE: c_int = 0x04; +pub const FALLOC_FL_COLLAPSE_RANGE: c_int = 0x08; +pub const FALLOC_FL_ZERO_RANGE: c_int = 0x10; +pub const FALLOC_FL_INSERT_RANGE: c_int = 0x20; +pub const FALLOC_FL_UNSHARE_RANGE: c_int = 0x40; + +pub const BUFSIZ: c_uint = 1024; +pub const FILENAME_MAX: c_uint = 4096; +pub const FOPEN_MAX: c_uint = 20; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; +pub const L_tmpnam: c_uint = 4096; +pub const TMP_MAX: c_uint = 308915776; +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_2_SYMLINKS: c_int = 7; +pub const _PC_ALLOC_SIZE_MIN: c_int = 8; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 9; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 10; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 11; +pub const _PC_REC_XFER_ALIGN: c_int = 12; +pub const _PC_SYMLINK_MAX: c_int = 13; +pub const _PC_CHOWN_RESTRICTED: c_int = 14; +pub const _PC_NO_TRUNC: c_int = 15; +pub const _PC_VDISABLE: c_int = 16; +pub const _PC_ASYNC_IO: c_int = 17; +pub const _PC_PRIO_IO: c_int = 18; +pub const _PC_SYNC_IO: c_int = 19; + +pub const FIONBIO: c_int = 0x5421; + +pub const _SC_ARG_MAX: c_int = 0x0000; +pub const _SC_BC_BASE_MAX: c_int = 0x0001; +pub const _SC_BC_DIM_MAX: c_int = 0x0002; +pub const _SC_BC_SCALE_MAX: c_int = 0x0003; +pub const _SC_BC_STRING_MAX: c_int = 0x0004; +pub const _SC_CHILD_MAX: c_int = 0x0005; +pub const _SC_CLK_TCK: c_int = 0x0006; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 0x0007; +pub const _SC_EXPR_NEST_MAX: c_int = 0x0008; +pub const _SC_LINE_MAX: c_int = 0x0009; +pub const _SC_NGROUPS_MAX: c_int = 0x000a; +pub const _SC_OPEN_MAX: c_int = 0x000b; +pub const _SC_PASS_MAX: c_int = 0x000c; +pub const _SC_2_C_BIND: c_int = 0x000d; +pub const _SC_2_C_DEV: c_int = 0x000e; +pub const _SC_2_C_VERSION: c_int = 0x000f; +pub const _SC_2_CHAR_TERM: c_int = 0x0010; +pub const _SC_2_FORT_DEV: c_int = 0x0011; +pub const _SC_2_FORT_RUN: c_int = 0x0012; +pub const _SC_2_LOCALEDEF: c_int = 0x0013; +pub const _SC_2_SW_DEV: c_int = 0x0014; +pub const _SC_2_UPE: c_int = 0x0015; +pub const _SC_2_VERSION: c_int = 0x0016; +pub const _SC_JOB_CONTROL: c_int = 0x0017; +pub const _SC_SAVED_IDS: c_int = 0x0018; +pub const _SC_VERSION: c_int = 0x0019; +pub const _SC_RE_DUP_MAX: c_int = 0x001a; +pub const _SC_STREAM_MAX: c_int = 0x001b; +pub const _SC_TZNAME_MAX: c_int = 0x001c; +pub const _SC_XOPEN_CRYPT: c_int = 0x001d; +pub const _SC_XOPEN_ENH_I18N: c_int = 0x001e; +pub const _SC_XOPEN_SHM: c_int = 0x001f; +pub const _SC_XOPEN_VERSION: c_int = 0x0020; +pub const _SC_XOPEN_XCU_VERSION: c_int = 0x0021; +pub const _SC_XOPEN_REALTIME: c_int = 0x0022; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 0x0023; +pub const _SC_XOPEN_LEGACY: c_int = 0x0024; +pub const _SC_ATEXIT_MAX: c_int = 0x0025; +pub const _SC_IOV_MAX: c_int = 0x0026; +pub const _SC_UIO_MAXIOV: c_int = _SC_IOV_MAX; +pub const _SC_PAGESIZE: c_int = 0x0027; +pub const _SC_PAGE_SIZE: c_int = 0x0028; +pub const _SC_XOPEN_UNIX: c_int = 0x0029; +pub const _SC_XBS5_ILP32_OFF32: c_int = 0x002a; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 0x002b; +pub const _SC_XBS5_LP64_OFF64: c_int = 0x002c; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 0x002d; +pub const _SC_AIO_LISTIO_MAX: c_int = 0x002e; +pub const _SC_AIO_MAX: c_int = 0x002f; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 0x0030; +pub const _SC_DELAYTIMER_MAX: c_int = 0x0031; +pub const _SC_MQ_OPEN_MAX: c_int = 0x0032; +pub const _SC_MQ_PRIO_MAX: c_int = 0x0033; +pub const _SC_RTSIG_MAX: c_int = 0x0034; +pub const _SC_SEM_NSEMS_MAX: c_int = 0x0035; +pub const _SC_SEM_VALUE_MAX: c_int = 0x0036; +pub const _SC_SIGQUEUE_MAX: c_int = 0x0037; +pub const _SC_TIMER_MAX: c_int = 0x0038; +pub const _SC_ASYNCHRONOUS_IO: c_int = 0x0039; +pub const _SC_FSYNC: c_int = 0x003a; +pub const _SC_MAPPED_FILES: c_int = 0x003b; +pub const _SC_MEMLOCK: c_int = 0x003c; +pub const _SC_MEMLOCK_RANGE: c_int = 0x003d; +pub const _SC_MEMORY_PROTECTION: c_int = 0x003e; +pub const _SC_MESSAGE_PASSING: c_int = 0x003f; +pub const _SC_PRIORITIZED_IO: c_int = 0x0040; +pub const _SC_PRIORITY_SCHEDULING: c_int = 0x0041; +pub const _SC_REALTIME_SIGNALS: c_int = 0x0042; +pub const _SC_SEMAPHORES: c_int = 0x0043; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 0x0044; +pub const _SC_SYNCHRONIZED_IO: c_int = 0x0045; +pub const _SC_TIMERS: c_int = 0x0046; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 0x0047; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 0x0048; +pub const _SC_LOGIN_NAME_MAX: c_int = 0x0049; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 0x004a; +pub const _SC_THREAD_KEYS_MAX: c_int = 0x004b; +pub const _SC_THREAD_STACK_MIN: c_int = 0x004c; +pub const _SC_THREAD_THREADS_MAX: c_int = 0x004d; +pub const _SC_TTY_NAME_MAX: c_int = 0x004e; +pub const _SC_THREADS: c_int = 0x004f; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 0x0050; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 0x0051; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 0x0052; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 0x0053; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 0x0054; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 0x0055; +pub const _SC_NPROCESSORS_CONF: c_int = 0x0060; +pub const _SC_NPROCESSORS_ONLN: c_int = 0x0061; +pub const _SC_PHYS_PAGES: c_int = 0x0062; +pub const _SC_AVPHYS_PAGES: c_int = 0x0063; +pub const _SC_MONOTONIC_CLOCK: c_int = 0x0064; +pub const _SC_2_PBS: c_int = 0x0065; +pub const _SC_2_PBS_ACCOUNTING: c_int = 0x0066; +pub const _SC_2_PBS_CHECKPOINT: c_int = 0x0067; +pub const _SC_2_PBS_LOCATE: c_int = 0x0068; +pub const _SC_2_PBS_MESSAGE: c_int = 0x0069; +pub const _SC_2_PBS_TRACK: c_int = 0x006a; +pub const _SC_ADVISORY_INFO: c_int = 0x006b; +pub const _SC_BARRIERS: c_int = 0x006c; +pub const _SC_CLOCK_SELECTION: c_int = 0x006d; +pub const _SC_CPUTIME: c_int = 0x006e; +pub const _SC_HOST_NAME_MAX: c_int = 0x006f; +pub const _SC_IPV6: c_int = 0x0070; +pub const _SC_RAW_SOCKETS: c_int = 0x0071; +pub const _SC_READER_WRITER_LOCKS: c_int = 0x0072; +pub const _SC_REGEXP: c_int = 0x0073; +pub const _SC_SHELL: c_int = 0x0074; +pub const _SC_SPAWN: c_int = 0x0075; +pub const _SC_SPIN_LOCKS: c_int = 0x0076; +pub const _SC_SPORADIC_SERVER: c_int = 0x0077; +pub const _SC_SS_REPL_MAX: c_int = 0x0078; +pub const _SC_SYMLOOP_MAX: c_int = 0x0079; +pub const _SC_THREAD_CPUTIME: c_int = 0x007a; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 0x007b; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 0x007c; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 0x007d; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 0x007e; +pub const _SC_TIMEOUTS: c_int = 0x007f; +pub const _SC_TRACE: c_int = 0x0080; +pub const _SC_TRACE_EVENT_FILTER: c_int = 0x0081; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 0x0082; +pub const _SC_TRACE_INHERIT: c_int = 0x0083; +pub const _SC_TRACE_LOG: c_int = 0x0084; +pub const _SC_TRACE_NAME_MAX: c_int = 0x0085; +pub const _SC_TRACE_SYS_MAX: c_int = 0x0086; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 0x0087; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 0x0088; +pub const _SC_V7_ILP32_OFF32: c_int = 0x0089; +pub const _SC_V7_ILP32_OFFBIG: c_int = 0x008a; +pub const _SC_V7_LP64_OFF64: c_int = 0x008b; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 0x008c; +pub const _SC_XOPEN_STREAMS: c_int = 0x008d; +pub const _SC_XOPEN_UUCP: c_int = 0x008e; +pub const _SC_LEVEL1_ICACHE_SIZE: c_int = 0x008f; +pub const _SC_LEVEL1_ICACHE_ASSOC: c_int = 0x0090; +pub const _SC_LEVEL1_ICACHE_LINESIZE: c_int = 0x0091; +pub const _SC_LEVEL1_DCACHE_SIZE: c_int = 0x0092; +pub const _SC_LEVEL1_DCACHE_ASSOC: c_int = 0x0093; +pub const _SC_LEVEL1_DCACHE_LINESIZE: c_int = 0x0094; +pub const _SC_LEVEL2_CACHE_SIZE: c_int = 0x0095; +pub const _SC_LEVEL2_CACHE_ASSOC: c_int = 0x0096; +pub const _SC_LEVEL2_CACHE_LINESIZE: c_int = 0x0097; +pub const _SC_LEVEL3_CACHE_SIZE: c_int = 0x0098; +pub const _SC_LEVEL3_CACHE_ASSOC: c_int = 0x0099; +pub const _SC_LEVEL3_CACHE_LINESIZE: c_int = 0x009a; +pub const _SC_LEVEL4_CACHE_SIZE: c_int = 0x009b; +pub const _SC_LEVEL4_CACHE_ASSOC: c_int = 0x009c; +pub const _SC_LEVEL4_CACHE_LINESIZE: c_int = 0x009d; + +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; + +pub const F_SEAL_FUTURE_WRITE: c_int = 0x0010; + +pub const IFF_LOWER_UP: c_int = 0x10000; +pub const IFF_DORMANT: c_int = 0x20000; +pub const IFF_ECHO: c_int = 0x40000; + +pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; + +pub const PTHREAD_EXPLICIT_SCHED: c_int = 0; +pub const PTHREAD_INHERIT_SCHED: c_int = 1; // stdio.h -pub const RENAME_NOREPLACE: ::c_int = 1; -pub const RENAME_EXCHANGE: ::c_int = 2; -pub const RENAME_WHITEOUT: ::c_int = 4; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONCLEX: ::c_int = 0x5450; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const RENAME_NOREPLACE: c_int = 1; +pub const RENAME_EXCHANGE: c_int = 2; +pub const RENAME_WHITEOUT: c_int = 4; + +pub const FIOCLEX: c_int = 0x5451; +pub const FIONCLEX: c_int = 0x5450; + +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const LC_PAPER: ::c_int = 7; -pub const LC_NAME: ::c_int = 8; -pub const LC_ADDRESS: ::c_int = 9; -pub const LC_TELEPHONE: ::c_int = 10; -pub const LC_MEASUREMENT: ::c_int = 11; -pub const LC_IDENTIFICATION: ::c_int = 12; -pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER; -pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME; -pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS; -pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE; -pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT; -pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION; -pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK - | ::LC_NUMERIC_MASK - | ::LC_TIME_MASK - | ::LC_COLLATE_MASK - | ::LC_MONETARY_MASK - | ::LC_MESSAGES_MASK +pub const SIGUNUSED: c_int = 31; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; + +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const LC_PAPER: c_int = 7; +pub const LC_NAME: c_int = 8; +pub const LC_ADDRESS: c_int = 9; +pub const LC_TELEPHONE: c_int = 10; +pub const LC_MEASUREMENT: c_int = 11; +pub const LC_IDENTIFICATION: c_int = 12; +pub const LC_PAPER_MASK: c_int = 1 << LC_PAPER; +pub const LC_NAME_MASK: c_int = 1 << LC_NAME; +pub const LC_ADDRESS_MASK: c_int = 1 << LC_ADDRESS; +pub const LC_TELEPHONE_MASK: c_int = 1 << LC_TELEPHONE; +pub const LC_MEASUREMENT_MASK: c_int = 1 << LC_MEASUREMENT; +pub const LC_IDENTIFICATION_MASK: c_int = 1 << LC_IDENTIFICATION; +pub const LC_ALL_MASK: c_int = crate::LC_CTYPE_MASK + | crate::LC_NUMERIC_MASK + | crate::LC_TIME_MASK + | crate::LC_COLLATE_MASK + | crate::LC_MONETARY_MASK + | crate::LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK | LC_ADDRESS_MASK @@ -1358,321 +1362,321 @@ pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK | LC_MEASUREMENT_MASK | LC_IDENTIFICATION_MASK; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; - -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_DCCP: ::c_int = 6; -pub const SOCK_PACKET: ::c_int = 10; - -pub const IPPROTO_MAX: ::c_int = 256; - -pub const SOL_SOCKET: ::c_int = 1; -pub const SOL_SCTP: ::c_int = 132; -pub const SOL_IPX: ::c_int = 256; -pub const SOL_AX25: ::c_int = 257; -pub const SOL_ATALK: ::c_int = 258; -pub const SOL_NETROM: ::c_int = 259; -pub const SOL_ROSE: ::c_int = 260; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; + +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; + +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_DCCP: c_int = 6; +pub const SOCK_PACKET: c_int = 10; + +pub const IPPROTO_MAX: c_int = 256; + +pub const SOL_SOCKET: c_int = 1; +pub const SOL_SCTP: c_int = 132; +pub const SOL_IPX: c_int = 256; +pub const SOL_AX25: c_int = 257; +pub const SOL_ATALK: c_int = 258; +pub const SOL_NETROM: c_int = 259; +pub const SOL_ROSE: c_int = 260; /* DCCP socket options */ -pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1; -pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2; -pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3; -pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4; -pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5; -pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6; -pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10; -pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11; -pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12; -pub const DCCP_SOCKOPT_CCID: ::c_int = 13; -pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14; -pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15; -pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16; -pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17; -pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128; -pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192; +pub const DCCP_SOCKOPT_PACKET_SIZE: c_int = 1; +pub const DCCP_SOCKOPT_SERVICE: c_int = 2; +pub const DCCP_SOCKOPT_CHANGE_L: c_int = 3; +pub const DCCP_SOCKOPT_CHANGE_R: c_int = 4; +pub const DCCP_SOCKOPT_GET_CUR_MPS: c_int = 5; +pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: c_int = 6; +pub const DCCP_SOCKOPT_SEND_CSCOV: c_int = 10; +pub const DCCP_SOCKOPT_RECV_CSCOV: c_int = 11; +pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: c_int = 12; +pub const DCCP_SOCKOPT_CCID: c_int = 13; +pub const DCCP_SOCKOPT_TX_CCID: c_int = 14; +pub const DCCP_SOCKOPT_RX_CCID: c_int = 15; +pub const DCCP_SOCKOPT_QPOLICY_ID: c_int = 16; +pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: c_int = 17; +pub const DCCP_SOCKOPT_CCID_RX_INFO: c_int = 128; +pub const DCCP_SOCKOPT_CCID_TX_INFO: c_int = 192; /// maximum number of services provided on the same listening port -pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_PRIORITY: ::c_int = 12; -pub const SO_LINGER: ::c_int = 13; -pub const SO_BSDCOMPAT: ::c_int = 14; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_PASSCRED: ::c_int = 16; -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_ATTACH_FILTER: ::c_int = 26; -pub const SO_DETACH_FILTER: ::c_int = 27; -pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; -pub const SO_TIMESTAMP: ::c_int = 29; -pub const SO_ACCEPTCONN: ::c_int = 30; -pub const SO_PEERSEC: ::c_int = 31; -pub const SO_SNDBUFFORCE: ::c_int = 32; -pub const SO_RCVBUFFORCE: ::c_int = 33; -pub const SO_PASSSEC: ::c_int = 34; -pub const SO_TIMESTAMPNS: ::c_int = 35; -// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35; -pub const SO_MARK: ::c_int = 36; -pub const SO_TIMESTAMPING: ::c_int = 37; -// pub const SO_TIMESTAMPING_OLD: ::c_int = 37; -pub const SO_PROTOCOL: ::c_int = 38; -pub const SO_DOMAIN: ::c_int = 39; -pub const SO_RXQ_OVFL: ::c_int = 40; -pub const SO_PEEK_OFF: ::c_int = 42; -pub const SO_BUSY_POLL: ::c_int = 46; -pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 54; -pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 58; -pub const SO_TIMESTAMP_NEW: ::c_int = 63; -pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; -pub const SO_TIMESTAMPING_NEW: ::c_int = 65; +pub const DCCP_SERVICE_LIST_MAX_LEN: c_int = 32; + +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_DONTROUTE: c_int = 5; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_OOBINLINE: c_int = 10; +pub const SO_PRIORITY: c_int = 12; +pub const SO_LINGER: c_int = 13; +pub const SO_BSDCOMPAT: c_int = 14; +pub const SO_REUSEPORT: c_int = 15; +pub const SO_PASSCRED: c_int = 16; +pub const SO_PEERCRED: c_int = 17; +pub const SO_RCVLOWAT: c_int = 18; +pub const SO_SNDLOWAT: c_int = 19; +pub const SO_RCVTIMEO: c_int = 20; +pub const SO_SNDTIMEO: c_int = 21; +pub const SO_BINDTODEVICE: c_int = 25; +pub const SO_ATTACH_FILTER: c_int = 26; +pub const SO_DETACH_FILTER: c_int = 27; +pub const SO_GET_FILTER: c_int = SO_ATTACH_FILTER; +pub const SO_TIMESTAMP: c_int = 29; +pub const SO_ACCEPTCONN: c_int = 30; +pub const SO_PEERSEC: c_int = 31; +pub const SO_SNDBUFFORCE: c_int = 32; +pub const SO_RCVBUFFORCE: c_int = 33; +pub const SO_PASSSEC: c_int = 34; +pub const SO_TIMESTAMPNS: c_int = 35; +// pub const SO_TIMESTAMPNS_OLD: c_int = 35; +pub const SO_MARK: c_int = 36; +pub const SO_TIMESTAMPING: c_int = 37; +// pub const SO_TIMESTAMPING_OLD: c_int = 37; +pub const SO_PROTOCOL: c_int = 38; +pub const SO_DOMAIN: c_int = 39; +pub const SO_RXQ_OVFL: c_int = 40; +pub const SO_PEEK_OFF: c_int = 42; +pub const SO_BUSY_POLL: c_int = 46; +pub const SCM_TIMESTAMPING_OPT_STATS: c_int = 54; +pub const SCM_TIMESTAMPING_PKTINFO: c_int = 58; +pub const SO_TIMESTAMP_NEW: c_int = 63; +pub const SO_TIMESTAMPNS_NEW: c_int = 64; +pub const SO_TIMESTAMPING_NEW: c_int = 65; // Defined in unix/linux_like/mod.rs -// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; -pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; -pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; +// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; +pub const SCM_TIMESTAMPNS: c_int = SO_TIMESTAMPNS; +pub const SCM_TIMESTAMPING: c_int = SO_TIMESTAMPING; pub const IPTOS_ECN_NOTECT: u8 = 0x00; -pub const O_ACCMODE: ::c_int = 3; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 0x101000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; -pub const O_DSYNC: ::c_int = 4096; -pub const O_RSYNC: ::c_int = O_SYNC; - -pub const NI_MAXHOST: ::size_t = 1025; -pub const NI_MAXSERV: ::size_t = 32; - -pub const NI_NOFQDN: ::c_int = 0x00000001; -pub const NI_NUMERICHOST: ::c_int = 0x00000002; -pub const NI_NAMEREQD: ::c_int = 0x00000004; -pub const NI_NUMERICSERV: ::c_int = 0x00000008; -pub const NI_DGRAM: ::c_int = 0x00000010; +pub const O_ACCMODE: c_int = 3; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 0x101000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; +pub const O_DSYNC: c_int = 4096; +pub const O_RSYNC: c_int = O_SYNC; + +pub const NI_MAXHOST: size_t = 1025; +pub const NI_MAXSERV: size_t = 32; + +pub const NI_NOFQDN: c_int = 0x00000001; +pub const NI_NUMERICHOST: c_int = 0x00000002; +pub const NI_NAMEREQD: c_int = 0x00000004; +pub const NI_NUMERICSERV: c_int = 0x00000008; +pub const NI_DGRAM: c_int = 0x00000010; pub const NCCS: usize = 19; -pub const TCSBRKP: ::c_int = 0x5425; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 0x1; -pub const TCSAFLUSH: ::c_int = 0x2; +pub const TCSBRKP: c_int = 0x5425; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 0x1; +pub const TCSAFLUSH: c_int = 0x2; pub const VEOF: usize = 4; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0o200000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const PTRACE_TRACEME: ::c_int = 0; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_GETREGS: ::c_int = 12; -pub const PTRACE_SETREGS: ::c_int = 13; -pub const PTRACE_ATTACH: ::c_int = 16; -pub const PTRACE_DETACH: ::c_int = 17; -pub const PTRACE_SYSCALL: ::c_int = 24; -pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; -pub const PTRACE_GETREGSET: ::c_int = 0x4204; -pub const PTRACE_SETREGSET: ::c_int = 0x4205; -pub const PTRACE_SECCOMP_GET_METADATA: ::c_int = 0x420d; - -pub const PTRACE_EVENT_STOP: ::c_int = 128; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_MEMLOCK: ::c_int = 8; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_LOCKS: ::c_int = 10; -pub const RLIMIT_SIGPENDING: ::c_int = 11; -pub const RLIMIT_MSGQUEUE: ::c_int = 12; -pub const RLIMIT_NICE: ::c_int = 13; -pub const RLIMIT_RTPRIO: ::c_int = 14; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0o200000; + +pub const MAP_HUGETLB: c_int = 0x040000; + +pub const PTRACE_TRACEME: c_int = 0; +pub const PTRACE_PEEKTEXT: c_int = 1; +pub const PTRACE_PEEKDATA: c_int = 2; +pub const PTRACE_PEEKUSER: c_int = 3; +pub const PTRACE_POKETEXT: c_int = 4; +pub const PTRACE_POKEDATA: c_int = 5; +pub const PTRACE_POKEUSER: c_int = 6; +pub const PTRACE_CONT: c_int = 7; +pub const PTRACE_KILL: c_int = 8; +pub const PTRACE_SINGLESTEP: c_int = 9; +pub const PTRACE_GETREGS: c_int = 12; +pub const PTRACE_SETREGS: c_int = 13; +pub const PTRACE_ATTACH: c_int = 16; +pub const PTRACE_DETACH: c_int = 17; +pub const PTRACE_SYSCALL: c_int = 24; +pub const PTRACE_SETOPTIONS: c_int = 0x4200; +pub const PTRACE_GETEVENTMSG: c_int = 0x4201; +pub const PTRACE_GETSIGINFO: c_int = 0x4202; +pub const PTRACE_SETSIGINFO: c_int = 0x4203; +pub const PTRACE_GETREGSET: c_int = 0x4204; +pub const PTRACE_SETREGSET: c_int = 0x4205; +pub const PTRACE_SECCOMP_GET_METADATA: c_int = 0x420d; + +pub const PTRACE_EVENT_STOP: c_int = 128; + +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; + +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_RSS: c_int = 5; +pub const RLIMIT_NPROC: c_int = 6; +pub const RLIMIT_NOFILE: c_int = 7; +pub const RLIMIT_MEMLOCK: c_int = 8; +pub const RLIMIT_AS: c_int = 9; +pub const RLIMIT_LOCKS: c_int = 10; +pub const RLIMIT_SIGPENDING: c_int = 11; +pub const RLIMIT_MSGQUEUE: c_int = 12; +pub const RLIMIT_NICE: c_int = 13; +pub const RLIMIT_RTPRIO: c_int = 14; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 16; -pub const RLIM_INFINITY: ::rlim_t = !0; - -pub const TCGETS: ::c_int = 0x5401; -pub const TCSETS: ::c_int = 0x5402; -pub const TCSETSW: ::c_int = 0x5403; -pub const TCSETSF: ::c_int = 0x5404; -pub const TCGETS2: ::c_int = 0x802c542a; -pub const TCSETS2: ::c_int = 0x402c542b; -pub const TCSETSW2: ::c_int = 0x402c542c; -pub const TCSETSF2: ::c_int = 0x402c542d; -pub const TCGETA: ::c_int = 0x5405; -pub const TCSETA: ::c_int = 0x5406; -pub const TCSETAW: ::c_int = 0x5407; -pub const TCSETAF: ::c_int = 0x5408; -pub const TCSBRK: ::c_int = 0x5409; -pub const TCXONC: ::c_int = 0x540A; -pub const TCFLSH: ::c_int = 0x540B; -pub const TIOCGSOFTCAR: ::c_int = 0x5419; -pub const TIOCSSOFTCAR: ::c_int = 0x541A; -pub const TIOCINQ: ::c_int = 0x541B; -pub const TIOCLINUX: ::c_int = 0x541C; -pub const TIOCGSERIAL: ::c_int = 0x541E; -pub const TIOCEXCL: ::c_int = 0x540C; -pub const TIOCNXCL: ::c_int = 0x540D; -pub const TIOCSCTTY: ::c_int = 0x540E; -pub const TIOCGPGRP: ::c_int = 0x540F; -pub const TIOCSPGRP: ::c_int = 0x5410; -pub const TIOCOUTQ: ::c_int = 0x5411; -pub const TIOCSTI: ::c_int = 0x5412; -pub const TIOCGWINSZ: ::c_int = 0x5413; -pub const TIOCSWINSZ: ::c_int = 0x5414; -pub const TIOCMGET: ::c_int = 0x5415; -pub const TIOCMBIS: ::c_int = 0x5416; -pub const TIOCMBIC: ::c_int = 0x5417; -pub const TIOCMSET: ::c_int = 0x5418; -pub const FIONREAD: ::c_int = 0x541B; -pub const TIOCCONS: ::c_int = 0x541D; -pub const TIOCSBRK: ::c_int = 0x5427; -pub const TIOCCBRK: ::c_int = 0x5428; +pub const RLIM_NLIMITS: c_int = 16; +pub const RLIM_INFINITY: crate::rlim_t = !0; + +pub const TCGETS: c_int = 0x5401; +pub const TCSETS: c_int = 0x5402; +pub const TCSETSW: c_int = 0x5403; +pub const TCSETSF: c_int = 0x5404; +pub const TCGETS2: c_int = 0x802c542a; +pub const TCSETS2: c_int = 0x402c542b; +pub const TCSETSW2: c_int = 0x402c542c; +pub const TCSETSF2: c_int = 0x402c542d; +pub const TCGETA: c_int = 0x5405; +pub const TCSETA: c_int = 0x5406; +pub const TCSETAW: c_int = 0x5407; +pub const TCSETAF: c_int = 0x5408; +pub const TCSBRK: c_int = 0x5409; +pub const TCXONC: c_int = 0x540A; +pub const TCFLSH: c_int = 0x540B; +pub const TIOCGSOFTCAR: c_int = 0x5419; +pub const TIOCSSOFTCAR: c_int = 0x541A; +pub const TIOCINQ: c_int = 0x541B; +pub const TIOCLINUX: c_int = 0x541C; +pub const TIOCGSERIAL: c_int = 0x541E; +pub const TIOCEXCL: c_int = 0x540C; +pub const TIOCNXCL: c_int = 0x540D; +pub const TIOCSCTTY: c_int = 0x540E; +pub const TIOCGPGRP: c_int = 0x540F; +pub const TIOCSPGRP: c_int = 0x5410; +pub const TIOCOUTQ: c_int = 0x5411; +pub const TIOCSTI: c_int = 0x5412; +pub const TIOCGWINSZ: c_int = 0x5413; +pub const TIOCSWINSZ: c_int = 0x5414; +pub const TIOCMGET: c_int = 0x5415; +pub const TIOCMBIS: c_int = 0x5416; +pub const TIOCMBIC: c_int = 0x5417; +pub const TIOCMSET: c_int = 0x5418; +pub const FIONREAD: c_int = 0x541B; +pub const TIOCCONS: c_int = 0x541D; +pub const TIOCSBRK: c_int = 0x5427; +pub const TIOCCBRK: c_int = 0x5428; cfg_if! { if #[cfg(any( target_arch = "x86", @@ -1682,118 +1686,118 @@ cfg_if! { target_arch = "riscv64", target_arch = "s390x" ))] { - pub const FICLONE: ::c_int = 0x40049409; - pub const FICLONERANGE: ::c_int = 0x4020940D; + pub const FICLONE: c_int = 0x40049409; + pub const FICLONERANGE: c_int = 0x4020940D; } else if #[cfg(any( target_arch = "mips", target_arch = "mips64", target_arch = "powerpc", target_arch = "powerpc64" ))] { - pub const FICLONE: ::c_int = 0x80049409; - pub const FICLONERANGE: ::c_int = 0x8020940D; + pub const FICLONE: c_int = 0x80049409; + pub const FICLONERANGE: c_int = 0x8020940D; } } -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; -pub const ST_NODEV: ::c_ulong = 4; -pub const ST_NOEXEC: ::c_ulong = 8; -pub const ST_SYNCHRONOUS: ::c_ulong = 16; -pub const ST_MANDLOCK: ::c_ulong = 64; -pub const ST_NOATIME: ::c_ulong = 1024; -pub const ST_NODIRATIME: ::c_ulong = 2048; -pub const ST_RELATIME: ::c_ulong = 4096; +pub const ST_RDONLY: c_ulong = 1; +pub const ST_NOSUID: c_ulong = 2; +pub const ST_NODEV: c_ulong = 4; +pub const ST_NOEXEC: c_ulong = 8; +pub const ST_SYNCHRONOUS: c_ulong = 16; +pub const ST_MANDLOCK: c_ulong = 64; +pub const ST_NOATIME: c_ulong = 1024; +pub const ST_NODIRATIME: c_ulong = 2048; +pub const ST_RELATIME: c_ulong = 4096; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const RTLD_NODELETE: ::c_int = 0x1000; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const RTLD_NODELETE: c_int = 0x1000; pub const SEM_FAILED: *mut sem_t = 0 as *mut sem_t; -pub const AI_PASSIVE: ::c_int = 0x00000001; -pub const AI_CANONNAME: ::c_int = 0x00000002; -pub const AI_NUMERICHOST: ::c_int = 0x00000004; -pub const AI_NUMERICSERV: ::c_int = 0x00000008; -pub const AI_MASK: ::c_int = +pub const AI_PASSIVE: c_int = 0x00000001; +pub const AI_CANONNAME: c_int = 0x00000002; +pub const AI_NUMERICHOST: c_int = 0x00000004; +pub const AI_NUMERICSERV: c_int = 0x00000008; +pub const AI_MASK: c_int = AI_PASSIVE | AI_CANONNAME | AI_NUMERICHOST | AI_NUMERICSERV | AI_ADDRCONFIG; -pub const AI_ALL: ::c_int = 0x00000100; -pub const AI_V4MAPPED_CFG: ::c_int = 0x00000200; -pub const AI_ADDRCONFIG: ::c_int = 0x00000400; -pub const AI_V4MAPPED: ::c_int = 0x00000800; -pub const AI_DEFAULT: ::c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; +pub const AI_ALL: c_int = 0x00000100; +pub const AI_V4MAPPED_CFG: c_int = 0x00000200; +pub const AI_ADDRCONFIG: c_int = 0x00000400; +pub const AI_V4MAPPED: c_int = 0x00000800; +pub const AI_DEFAULT: c_int = AI_V4MAPPED_CFG | AI_ADDRCONFIG; // linux/kexec.h -pub const KEXEC_ON_CRASH: ::c_int = 0x00000001; -pub const KEXEC_PRESERVE_CONTEXT: ::c_int = 0x00000002; -pub const KEXEC_ARCH_MASK: ::c_int = 0xffff0000; -pub const KEXEC_FILE_UNLOAD: ::c_int = 0x00000001; -pub const KEXEC_FILE_ON_CRASH: ::c_int = 0x00000002; -pub const KEXEC_FILE_NO_INITRAMFS: ::c_int = 0x00000004; - -pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead; -pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793; -pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278; -pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448; -pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216; - -pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567; -pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123; -pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF; -pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000; -pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC; -pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4; -pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2; -pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543; - -pub const REG_BASIC: ::c_int = 0; -pub const REG_EXTENDED: ::c_int = 1; -pub const REG_ICASE: ::c_int = 2; -pub const REG_NOSUB: ::c_int = 4; -pub const REG_NEWLINE: ::c_int = 8; -pub const REG_NOSPEC: ::c_int = 16; -pub const REG_PEND: ::c_int = 32; -pub const REG_DUMP: ::c_int = 128; - -pub const REG_NOMATCH: ::c_int = 1; -pub const REG_BADPAT: ::c_int = 2; -pub const REG_ECOLLATE: ::c_int = 3; -pub const REG_ECTYPE: ::c_int = 4; -pub const REG_EESCAPE: ::c_int = 5; -pub const REG_ESUBREG: ::c_int = 6; -pub const REG_EBRACK: ::c_int = 7; -pub const REG_EPAREN: ::c_int = 8; -pub const REG_EBRACE: ::c_int = 9; -pub const REG_BADBR: ::c_int = 10; -pub const REG_ERANGE: ::c_int = 11; -pub const REG_ESPACE: ::c_int = 12; -pub const REG_BADRPT: ::c_int = 13; -pub const REG_EMPTY: ::c_int = 14; -pub const REG_ASSERT: ::c_int = 15; -pub const REG_INVARG: ::c_int = 16; -pub const REG_ATOI: ::c_int = 255; -pub const REG_ITOA: ::c_int = 256; - -pub const REG_NOTBOL: ::c_int = 1; -pub const REG_NOTEOL: ::c_int = 2; -pub const REG_STARTEND: ::c_int = 4; -pub const REG_TRACE: ::c_int = 256; -pub const REG_LARGE: ::c_int = 512; -pub const REG_BACKR: ::c_int = 1024; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const KEXEC_ON_CRASH: c_int = 0x00000001; +pub const KEXEC_PRESERVE_CONTEXT: c_int = 0x00000002; +pub const KEXEC_ARCH_MASK: c_int = 0xffff0000; +pub const KEXEC_FILE_UNLOAD: c_int = 0x00000001; +pub const KEXEC_FILE_ON_CRASH: c_int = 0x00000002; +pub const KEXEC_FILE_NO_INITRAMFS: c_int = 0x00000004; + +pub const LINUX_REBOOT_MAGIC1: c_int = 0xfee1dead; +pub const LINUX_REBOOT_MAGIC2: c_int = 672274793; +pub const LINUX_REBOOT_MAGIC2A: c_int = 85072278; +pub const LINUX_REBOOT_MAGIC2B: c_int = 369367448; +pub const LINUX_REBOOT_MAGIC2C: c_int = 537993216; + +pub const LINUX_REBOOT_CMD_RESTART: c_int = 0x01234567; +pub const LINUX_REBOOT_CMD_HALT: c_int = 0xCDEF0123; +pub const LINUX_REBOOT_CMD_CAD_ON: c_int = 0x89ABCDEF; +pub const LINUX_REBOOT_CMD_CAD_OFF: c_int = 0x00000000; +pub const LINUX_REBOOT_CMD_POWER_OFF: c_int = 0x4321FEDC; +pub const LINUX_REBOOT_CMD_RESTART2: c_int = 0xA1B2C3D4; +pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = 0xD000FCE2; +pub const LINUX_REBOOT_CMD_KEXEC: c_int = 0x45584543; + +pub const REG_BASIC: c_int = 0; +pub const REG_EXTENDED: c_int = 1; +pub const REG_ICASE: c_int = 2; +pub const REG_NOSUB: c_int = 4; +pub const REG_NEWLINE: c_int = 8; +pub const REG_NOSPEC: c_int = 16; +pub const REG_PEND: c_int = 32; +pub const REG_DUMP: c_int = 128; + +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; +pub const REG_EMPTY: c_int = 14; +pub const REG_ASSERT: c_int = 15; +pub const REG_INVARG: c_int = 16; +pub const REG_ATOI: c_int = 255; +pub const REG_ITOA: c_int = 256; + +pub const REG_NOTBOL: c_int = 1; +pub const REG_NOTEOL: c_int = 2; +pub const REG_STARTEND: c_int = 4; +pub const REG_TRACE: c_int = 256; +pub const REG_LARGE: c_int = 512; +pub const REG_BACKR: c_int = 1024; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -1801,79 +1805,79 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const BOTHER: ::speed_t = 0o010000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; -pub const IBSHIFT: ::tcflag_t = 16; - -pub const BLKIOMIN: ::c_int = 0x1278; -pub const BLKIOOPT: ::c_int = 0x1279; -pub const BLKSSZGET: ::c_int = 0x1268; -pub const BLKPBSZGET: ::c_int = 0x127B; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const BOTHER: crate::speed_t = 0o010000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; +pub const IBSHIFT: crate::tcflag_t = 16; + +pub const BLKIOMIN: c_int = 0x1278; +pub const BLKIOOPT: c_int = 0x1279; +pub const BLKSSZGET: c_int = 0x1268; +pub const BLKPBSZGET: c_int = 0x127B; cfg_if! { // Those type are constructed using the _IOC macro @@ -1883,384 +1887,384 @@ cfg_if! { // where T stands for type ('f','v','X'...) // where N stands for NR (NumbeR) if #[cfg(any(target_arch = "x86", target_arch = "arm"))] { - pub const FS_IOC_GETFLAGS: ::c_int = 0x80046601; - pub const FS_IOC_SETFLAGS: ::c_int = 0x40046602; - pub const FS_IOC_GETVERSION: ::c_int = 0x80047601; - pub const FS_IOC_SETVERSION: ::c_int = 0x40047602; - pub const FS_IOC32_GETFLAGS: ::c_int = 0x80046601; - pub const FS_IOC32_SETFLAGS: ::c_int = 0x40046602; - pub const FS_IOC32_GETVERSION: ::c_int = 0x80047601; - pub const FS_IOC32_SETVERSION: ::c_int = 0x40047602; + pub const FS_IOC_GETFLAGS: c_int = 0x80046601; + pub const FS_IOC_SETFLAGS: c_int = 0x40046602; + pub const FS_IOC_GETVERSION: c_int = 0x80047601; + pub const FS_IOC_SETVERSION: c_int = 0x40047602; + pub const FS_IOC32_GETFLAGS: c_int = 0x80046601; + pub const FS_IOC32_SETFLAGS: c_int = 0x40046602; + pub const FS_IOC32_GETVERSION: c_int = 0x80047601; + pub const FS_IOC32_SETVERSION: c_int = 0x40047602; } else if #[cfg(any( target_arch = "x86_64", target_arch = "riscv64", target_arch = "aarch64" ))] { - pub const FS_IOC_GETFLAGS: ::c_int = 0x80086601; - pub const FS_IOC_SETFLAGS: ::c_int = 0x40086602; - pub const FS_IOC_GETVERSION: ::c_int = 0x80087601; - pub const FS_IOC_SETVERSION: ::c_int = 0x40087602; - pub const FS_IOC32_GETFLAGS: ::c_int = 0x80046601; - pub const FS_IOC32_SETFLAGS: ::c_int = 0x40046602; - pub const FS_IOC32_GETVERSION: ::c_int = 0x80047601; - pub const FS_IOC32_SETVERSION: ::c_int = 0x40047602; + pub const FS_IOC_GETFLAGS: c_int = 0x80086601; + pub const FS_IOC_SETFLAGS: c_int = 0x40086602; + pub const FS_IOC_GETVERSION: c_int = 0x80087601; + pub const FS_IOC_SETVERSION: c_int = 0x40087602; + pub const FS_IOC32_GETFLAGS: c_int = 0x80046601; + pub const FS_IOC32_SETFLAGS: c_int = 0x40046602; + pub const FS_IOC32_GETVERSION: c_int = 0x80047601; + pub const FS_IOC32_SETVERSION: c_int = 0x40047602; } } -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const NETLINK_ROUTE: ::c_int = 0; -pub const NETLINK_UNUSED: ::c_int = 1; -pub const NETLINK_USERSOCK: ::c_int = 2; -pub const NETLINK_FIREWALL: ::c_int = 3; -pub const NETLINK_SOCK_DIAG: ::c_int = 4; -pub const NETLINK_NFLOG: ::c_int = 5; -pub const NETLINK_XFRM: ::c_int = 6; -pub const NETLINK_SELINUX: ::c_int = 7; -pub const NETLINK_ISCSI: ::c_int = 8; -pub const NETLINK_AUDIT: ::c_int = 9; -pub const NETLINK_FIB_LOOKUP: ::c_int = 10; -pub const NETLINK_CONNECTOR: ::c_int = 11; -pub const NETLINK_NETFILTER: ::c_int = 12; -pub const NETLINK_IP6_FW: ::c_int = 13; -pub const NETLINK_DNRTMSG: ::c_int = 14; -pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15; -pub const NETLINK_GENERIC: ::c_int = 16; -pub const NETLINK_SCSITRANSPORT: ::c_int = 18; -pub const NETLINK_ECRYPTFS: ::c_int = 19; -pub const NETLINK_RDMA: ::c_int = 20; -pub const NETLINK_CRYPTO: ::c_int = 21; -pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG; - -pub const MAX_LINKS: ::c_int = 32; - -pub const NLM_F_REQUEST: ::c_int = 1; -pub const NLM_F_MULTI: ::c_int = 2; -pub const NLM_F_ACK: ::c_int = 4; -pub const NLM_F_ECHO: ::c_int = 8; -pub const NLM_F_DUMP_INTR: ::c_int = 16; -pub const NLM_F_DUMP_FILTERED: ::c_int = 32; - -pub const NLM_F_ROOT: ::c_int = 0x100; -pub const NLM_F_MATCH: ::c_int = 0x200; -pub const NLM_F_ATOMIC: ::c_int = 0x400; -pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH; - -pub const NLM_F_REPLACE: ::c_int = 0x100; -pub const NLM_F_EXCL: ::c_int = 0x200; -pub const NLM_F_CREATE: ::c_int = 0x400; -pub const NLM_F_APPEND: ::c_int = 0x800; - -pub const NLMSG_NOOP: ::c_int = 0x1; -pub const NLMSG_ERROR: ::c_int = 0x2; -pub const NLMSG_DONE: ::c_int = 0x3; -pub const NLMSG_OVERRUN: ::c_int = 0x4; -pub const NLMSG_MIN_TYPE: ::c_int = 0x10; +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NODATA: c_int = 7; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const NETLINK_ROUTE: c_int = 0; +pub const NETLINK_UNUSED: c_int = 1; +pub const NETLINK_USERSOCK: c_int = 2; +pub const NETLINK_FIREWALL: c_int = 3; +pub const NETLINK_SOCK_DIAG: c_int = 4; +pub const NETLINK_NFLOG: c_int = 5; +pub const NETLINK_XFRM: c_int = 6; +pub const NETLINK_SELINUX: c_int = 7; +pub const NETLINK_ISCSI: c_int = 8; +pub const NETLINK_AUDIT: c_int = 9; +pub const NETLINK_FIB_LOOKUP: c_int = 10; +pub const NETLINK_CONNECTOR: c_int = 11; +pub const NETLINK_NETFILTER: c_int = 12; +pub const NETLINK_IP6_FW: c_int = 13; +pub const NETLINK_DNRTMSG: c_int = 14; +pub const NETLINK_KOBJECT_UEVENT: c_int = 15; +pub const NETLINK_GENERIC: c_int = 16; +pub const NETLINK_SCSITRANSPORT: c_int = 18; +pub const NETLINK_ECRYPTFS: c_int = 19; +pub const NETLINK_RDMA: c_int = 20; +pub const NETLINK_CRYPTO: c_int = 21; +pub const NETLINK_INET_DIAG: c_int = NETLINK_SOCK_DIAG; + +pub const MAX_LINKS: c_int = 32; + +pub const NLM_F_REQUEST: c_int = 1; +pub const NLM_F_MULTI: c_int = 2; +pub const NLM_F_ACK: c_int = 4; +pub const NLM_F_ECHO: c_int = 8; +pub const NLM_F_DUMP_INTR: c_int = 16; +pub const NLM_F_DUMP_FILTERED: c_int = 32; + +pub const NLM_F_ROOT: c_int = 0x100; +pub const NLM_F_MATCH: c_int = 0x200; +pub const NLM_F_ATOMIC: c_int = 0x400; +pub const NLM_F_DUMP: c_int = NLM_F_ROOT | NLM_F_MATCH; + +pub const NLM_F_REPLACE: c_int = 0x100; +pub const NLM_F_EXCL: c_int = 0x200; +pub const NLM_F_CREATE: c_int = 0x400; +pub const NLM_F_APPEND: c_int = 0x800; + +pub const NLMSG_NOOP: c_int = 0x1; +pub const NLMSG_ERROR: c_int = 0x2; +pub const NLMSG_DONE: c_int = 0x3; +pub const NLMSG_OVERRUN: c_int = 0x4; +pub const NLMSG_MIN_TYPE: c_int = 0x10; // linux/netfilter/nfnetlink.h -pub const NFNLGRP_NONE: ::c_int = 0; -pub const NFNLGRP_CONNTRACK_NEW: ::c_int = 1; -pub const NFNLGRP_CONNTRACK_UPDATE: ::c_int = 2; -pub const NFNLGRP_CONNTRACK_DESTROY: ::c_int = 3; -pub const NFNLGRP_CONNTRACK_EXP_NEW: ::c_int = 4; -pub const NFNLGRP_CONNTRACK_EXP_UPDATE: ::c_int = 5; -pub const NFNLGRP_CONNTRACK_EXP_DESTROY: ::c_int = 6; -pub const NFNLGRP_NFTABLES: ::c_int = 7; -pub const NFNLGRP_ACCT_QUOTA: ::c_int = 8; - -pub const NFNETLINK_V0: ::c_int = 0; - -pub const NFNL_SUBSYS_NONE: ::c_int = 0; -pub const NFNL_SUBSYS_CTNETLINK: ::c_int = 1; -pub const NFNL_SUBSYS_CTNETLINK_EXP: ::c_int = 2; -pub const NFNL_SUBSYS_QUEUE: ::c_int = 3; -pub const NFNL_SUBSYS_ULOG: ::c_int = 4; -pub const NFNL_SUBSYS_OSF: ::c_int = 5; -pub const NFNL_SUBSYS_IPSET: ::c_int = 6; -pub const NFNL_SUBSYS_ACCT: ::c_int = 7; -pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: ::c_int = 8; -pub const NFNL_SUBSYS_CTHELPER: ::c_int = 9; -pub const NFNL_SUBSYS_NFTABLES: ::c_int = 10; -pub const NFNL_SUBSYS_NFT_COMPAT: ::c_int = 11; -pub const NFNL_SUBSYS_COUNT: ::c_int = 12; - -pub const NFNL_MSG_BATCH_BEGIN: ::c_int = NLMSG_MIN_TYPE; -pub const NFNL_MSG_BATCH_END: ::c_int = NLMSG_MIN_TYPE + 1; +pub const NFNLGRP_NONE: c_int = 0; +pub const NFNLGRP_CONNTRACK_NEW: c_int = 1; +pub const NFNLGRP_CONNTRACK_UPDATE: c_int = 2; +pub const NFNLGRP_CONNTRACK_DESTROY: c_int = 3; +pub const NFNLGRP_CONNTRACK_EXP_NEW: c_int = 4; +pub const NFNLGRP_CONNTRACK_EXP_UPDATE: c_int = 5; +pub const NFNLGRP_CONNTRACK_EXP_DESTROY: c_int = 6; +pub const NFNLGRP_NFTABLES: c_int = 7; +pub const NFNLGRP_ACCT_QUOTA: c_int = 8; + +pub const NFNETLINK_V0: c_int = 0; + +pub const NFNL_SUBSYS_NONE: c_int = 0; +pub const NFNL_SUBSYS_CTNETLINK: c_int = 1; +pub const NFNL_SUBSYS_CTNETLINK_EXP: c_int = 2; +pub const NFNL_SUBSYS_QUEUE: c_int = 3; +pub const NFNL_SUBSYS_ULOG: c_int = 4; +pub const NFNL_SUBSYS_OSF: c_int = 5; +pub const NFNL_SUBSYS_IPSET: c_int = 6; +pub const NFNL_SUBSYS_ACCT: c_int = 7; +pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: c_int = 8; +pub const NFNL_SUBSYS_CTHELPER: c_int = 9; +pub const NFNL_SUBSYS_NFTABLES: c_int = 10; +pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11; +pub const NFNL_SUBSYS_COUNT: c_int = 12; + +pub const NFNL_MSG_BATCH_BEGIN: c_int = NLMSG_MIN_TYPE; +pub const NFNL_MSG_BATCH_END: c_int = NLMSG_MIN_TYPE + 1; // linux/netfilter/nfnetlink_log.h -pub const NFULNL_MSG_PACKET: ::c_int = 0; -pub const NFULNL_MSG_CONFIG: ::c_int = 1; - -pub const NFULA_UNSPEC: ::c_int = 0; -pub const NFULA_PACKET_HDR: ::c_int = 1; -pub const NFULA_MARK: ::c_int = 2; -pub const NFULA_TIMESTAMP: ::c_int = 3; -pub const NFULA_IFINDEX_INDEV: ::c_int = 4; -pub const NFULA_IFINDEX_OUTDEV: ::c_int = 5; -pub const NFULA_IFINDEX_PHYSINDEV: ::c_int = 6; -pub const NFULA_IFINDEX_PHYSOUTDEV: ::c_int = 7; -pub const NFULA_HWADDR: ::c_int = 8; -pub const NFULA_PAYLOAD: ::c_int = 9; -pub const NFULA_PREFIX: ::c_int = 10; -pub const NFULA_UID: ::c_int = 11; -pub const NFULA_SEQ: ::c_int = 12; -pub const NFULA_SEQ_GLOBAL: ::c_int = 13; -pub const NFULA_GID: ::c_int = 14; -pub const NFULA_HWTYPE: ::c_int = 15; -pub const NFULA_HWHEADER: ::c_int = 16; -pub const NFULA_HWLEN: ::c_int = 17; -pub const NFULA_CT: ::c_int = 18; -pub const NFULA_CT_INFO: ::c_int = 19; - -pub const NFULNL_CFG_CMD_NONE: ::c_int = 0; -pub const NFULNL_CFG_CMD_BIND: ::c_int = 1; -pub const NFULNL_CFG_CMD_UNBIND: ::c_int = 2; -pub const NFULNL_CFG_CMD_PF_BIND: ::c_int = 3; -pub const NFULNL_CFG_CMD_PF_UNBIND: ::c_int = 4; - -pub const NFULA_CFG_UNSPEC: ::c_int = 0; -pub const NFULA_CFG_CMD: ::c_int = 1; -pub const NFULA_CFG_MODE: ::c_int = 2; -pub const NFULA_CFG_NLBUFSIZ: ::c_int = 3; -pub const NFULA_CFG_TIMEOUT: ::c_int = 4; -pub const NFULA_CFG_QTHRESH: ::c_int = 5; -pub const NFULA_CFG_FLAGS: ::c_int = 6; - -pub const NFULNL_COPY_NONE: ::c_int = 0x00; -pub const NFULNL_COPY_META: ::c_int = 0x01; -pub const NFULNL_COPY_PACKET: ::c_int = 0x02; - -pub const NFULNL_CFG_F_SEQ: ::c_int = 0x0001; -pub const NFULNL_CFG_F_SEQ_GLOBAL: ::c_int = 0x0002; -pub const NFULNL_CFG_F_CONNTRACK: ::c_int = 0x0004; +pub const NFULNL_MSG_PACKET: c_int = 0; +pub const NFULNL_MSG_CONFIG: c_int = 1; + +pub const NFULA_UNSPEC: c_int = 0; +pub const NFULA_PACKET_HDR: c_int = 1; +pub const NFULA_MARK: c_int = 2; +pub const NFULA_TIMESTAMP: c_int = 3; +pub const NFULA_IFINDEX_INDEV: c_int = 4; +pub const NFULA_IFINDEX_OUTDEV: c_int = 5; +pub const NFULA_IFINDEX_PHYSINDEV: c_int = 6; +pub const NFULA_IFINDEX_PHYSOUTDEV: c_int = 7; +pub const NFULA_HWADDR: c_int = 8; +pub const NFULA_PAYLOAD: c_int = 9; +pub const NFULA_PREFIX: c_int = 10; +pub const NFULA_UID: c_int = 11; +pub const NFULA_SEQ: c_int = 12; +pub const NFULA_SEQ_GLOBAL: c_int = 13; +pub const NFULA_GID: c_int = 14; +pub const NFULA_HWTYPE: c_int = 15; +pub const NFULA_HWHEADER: c_int = 16; +pub const NFULA_HWLEN: c_int = 17; +pub const NFULA_CT: c_int = 18; +pub const NFULA_CT_INFO: c_int = 19; + +pub const NFULNL_CFG_CMD_NONE: c_int = 0; +pub const NFULNL_CFG_CMD_BIND: c_int = 1; +pub const NFULNL_CFG_CMD_UNBIND: c_int = 2; +pub const NFULNL_CFG_CMD_PF_BIND: c_int = 3; +pub const NFULNL_CFG_CMD_PF_UNBIND: c_int = 4; + +pub const NFULA_CFG_UNSPEC: c_int = 0; +pub const NFULA_CFG_CMD: c_int = 1; +pub const NFULA_CFG_MODE: c_int = 2; +pub const NFULA_CFG_NLBUFSIZ: c_int = 3; +pub const NFULA_CFG_TIMEOUT: c_int = 4; +pub const NFULA_CFG_QTHRESH: c_int = 5; +pub const NFULA_CFG_FLAGS: c_int = 6; + +pub const NFULNL_COPY_NONE: c_int = 0x00; +pub const NFULNL_COPY_META: c_int = 0x01; +pub const NFULNL_COPY_PACKET: c_int = 0x02; + +pub const NFULNL_CFG_F_SEQ: c_int = 0x0001; +pub const NFULNL_CFG_F_SEQ_GLOBAL: c_int = 0x0002; +pub const NFULNL_CFG_F_CONNTRACK: c_int = 0x0004; // linux/netfilter/nfnetlink_log.h -pub const NFQNL_MSG_PACKET: ::c_int = 0; -pub const NFQNL_MSG_VERDICT: ::c_int = 1; -pub const NFQNL_MSG_CONFIG: ::c_int = 2; -pub const NFQNL_MSG_VERDICT_BATCH: ::c_int = 3; - -pub const NFQA_UNSPEC: ::c_int = 0; -pub const NFQA_PACKET_HDR: ::c_int = 1; -pub const NFQA_VERDICT_HDR: ::c_int = 2; -pub const NFQA_MARK: ::c_int = 3; -pub const NFQA_TIMESTAMP: ::c_int = 4; -pub const NFQA_IFINDEX_INDEV: ::c_int = 5; -pub const NFQA_IFINDEX_OUTDEV: ::c_int = 6; -pub const NFQA_IFINDEX_PHYSINDEV: ::c_int = 7; -pub const NFQA_IFINDEX_PHYSOUTDEV: ::c_int = 8; -pub const NFQA_HWADDR: ::c_int = 9; -pub const NFQA_PAYLOAD: ::c_int = 10; -pub const NFQA_CT: ::c_int = 11; -pub const NFQA_CT_INFO: ::c_int = 12; -pub const NFQA_CAP_LEN: ::c_int = 13; -pub const NFQA_SKB_INFO: ::c_int = 14; -pub const NFQA_EXP: ::c_int = 15; -pub const NFQA_UID: ::c_int = 16; -pub const NFQA_GID: ::c_int = 17; -pub const NFQA_SECCTX: ::c_int = 18; +pub const NFQNL_MSG_PACKET: c_int = 0; +pub const NFQNL_MSG_VERDICT: c_int = 1; +pub const NFQNL_MSG_CONFIG: c_int = 2; +pub const NFQNL_MSG_VERDICT_BATCH: c_int = 3; + +pub const NFQA_UNSPEC: c_int = 0; +pub const NFQA_PACKET_HDR: c_int = 1; +pub const NFQA_VERDICT_HDR: c_int = 2; +pub const NFQA_MARK: c_int = 3; +pub const NFQA_TIMESTAMP: c_int = 4; +pub const NFQA_IFINDEX_INDEV: c_int = 5; +pub const NFQA_IFINDEX_OUTDEV: c_int = 6; +pub const NFQA_IFINDEX_PHYSINDEV: c_int = 7; +pub const NFQA_IFINDEX_PHYSOUTDEV: c_int = 8; +pub const NFQA_HWADDR: c_int = 9; +pub const NFQA_PAYLOAD: c_int = 10; +pub const NFQA_CT: c_int = 11; +pub const NFQA_CT_INFO: c_int = 12; +pub const NFQA_CAP_LEN: c_int = 13; +pub const NFQA_SKB_INFO: c_int = 14; +pub const NFQA_EXP: c_int = 15; +pub const NFQA_UID: c_int = 16; +pub const NFQA_GID: c_int = 17; +pub const NFQA_SECCTX: c_int = 18; /* FIXME: These are not yet available in musl sanitized kernel headers and make the tests fail. Enable them once musl has them. See https://github.com/rust-lang/libc/pull/1628 for more details. -pub const NFQA_VLAN: ::c_int = 19; -pub const NFQA_L2HDR: ::c_int = 20; +pub const NFQA_VLAN: c_int = 19; +pub const NFQA_L2HDR: c_int = 20; -pub const NFQA_VLAN_UNSPEC: ::c_int = 0; -pub const NFQA_VLAN_PROTO: ::c_int = 1; -pub const NFQA_VLAN_TCI: ::c_int = 2; +pub const NFQA_VLAN_UNSPEC: c_int = 0; +pub const NFQA_VLAN_PROTO: c_int = 1; +pub const NFQA_VLAN_TCI: c_int = 2; */ -pub const NFQNL_CFG_CMD_NONE: ::c_int = 0; -pub const NFQNL_CFG_CMD_BIND: ::c_int = 1; -pub const NFQNL_CFG_CMD_UNBIND: ::c_int = 2; -pub const NFQNL_CFG_CMD_PF_BIND: ::c_int = 3; -pub const NFQNL_CFG_CMD_PF_UNBIND: ::c_int = 4; - -pub const NFQNL_COPY_NONE: ::c_int = 0; -pub const NFQNL_COPY_META: ::c_int = 1; -pub const NFQNL_COPY_PACKET: ::c_int = 2; - -pub const NFQA_CFG_UNSPEC: ::c_int = 0; -pub const NFQA_CFG_CMD: ::c_int = 1; -pub const NFQA_CFG_PARAMS: ::c_int = 2; -pub const NFQA_CFG_QUEUE_MAXLEN: ::c_int = 3; -pub const NFQA_CFG_MASK: ::c_int = 4; -pub const NFQA_CFG_FLAGS: ::c_int = 5; - -pub const NFQA_CFG_F_FAIL_OPEN: ::c_int = 0x0001; -pub const NFQA_CFG_F_CONNTRACK: ::c_int = 0x0002; -pub const NFQA_CFG_F_GSO: ::c_int = 0x0004; -pub const NFQA_CFG_F_UID_GID: ::c_int = 0x0008; -pub const NFQA_CFG_F_SECCTX: ::c_int = 0x0010; -pub const NFQA_CFG_F_MAX: ::c_int = 0x0020; - -pub const NFQA_SKB_CSUMNOTREADY: ::c_int = 0x0001; -pub const NFQA_SKB_GSO: ::c_int = 0x0002; -pub const NFQA_SKB_CSUM_NOTVERIFIED: ::c_int = 0x0004; - -pub const GENL_NAMSIZ: ::c_int = 16; - -pub const GENL_MIN_ID: ::c_int = NLMSG_MIN_TYPE; -pub const GENL_MAX_ID: ::c_int = 1023; - -pub const GENL_ADMIN_PERM: ::c_int = 0x01; -pub const GENL_CMD_CAP_DO: ::c_int = 0x02; -pub const GENL_CMD_CAP_DUMP: ::c_int = 0x04; -pub const GENL_CMD_CAP_HASPOL: ::c_int = 0x08; -pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10; - -pub const GENL_ID_CTRL: ::c_int = NLMSG_MIN_TYPE; -pub const GENL_ID_VFS_DQUOT: ::c_int = NLMSG_MIN_TYPE + 1; -pub const GENL_ID_PMCRAID: ::c_int = NLMSG_MIN_TYPE + 2; - -pub const CTRL_CMD_UNSPEC: ::c_int = 0; -pub const CTRL_CMD_NEWFAMILY: ::c_int = 1; -pub const CTRL_CMD_DELFAMILY: ::c_int = 2; -pub const CTRL_CMD_GETFAMILY: ::c_int = 3; -pub const CTRL_CMD_NEWOPS: ::c_int = 4; -pub const CTRL_CMD_DELOPS: ::c_int = 5; -pub const CTRL_CMD_GETOPS: ::c_int = 6; -pub const CTRL_CMD_NEWMCAST_GRP: ::c_int = 7; -pub const CTRL_CMD_DELMCAST_GRP: ::c_int = 8; -pub const CTRL_CMD_GETMCAST_GRP: ::c_int = 9; - -pub const CTRL_ATTR_UNSPEC: ::c_int = 0; -pub const CTRL_ATTR_FAMILY_ID: ::c_int = 1; -pub const CTRL_ATTR_FAMILY_NAME: ::c_int = 2; -pub const CTRL_ATTR_VERSION: ::c_int = 3; -pub const CTRL_ATTR_HDRSIZE: ::c_int = 4; -pub const CTRL_ATTR_MAXATTR: ::c_int = 5; -pub const CTRL_ATTR_OPS: ::c_int = 6; -pub const CTRL_ATTR_MCAST_GROUPS: ::c_int = 7; - -pub const CTRL_ATTR_OP_UNSPEC: ::c_int = 0; -pub const CTRL_ATTR_OP_ID: ::c_int = 1; -pub const CTRL_ATTR_OP_FLAGS: ::c_int = 2; - -pub const CTRL_ATTR_MCAST_GRP_UNSPEC: ::c_int = 0; -pub const CTRL_ATTR_MCAST_GRP_NAME: ::c_int = 1; -pub const CTRL_ATTR_MCAST_GRP_ID: ::c_int = 2; - -pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1; -pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2; -pub const NETLINK_PKTINFO: ::c_int = 3; -pub const NETLINK_BROADCAST_ERROR: ::c_int = 4; -pub const NETLINK_NO_ENOBUFS: ::c_int = 5; -pub const NETLINK_RX_RING: ::c_int = 6; -pub const NETLINK_TX_RING: ::c_int = 7; -pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8; -pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9; -pub const NETLINK_CAP_ACK: ::c_int = 10; -pub const NETLINK_EXT_ACK: ::c_int = 11; -pub const NETLINK_GET_STRICT_CHK: ::c_int = 12; - -pub const GRND_NONBLOCK: ::c_uint = 0x0001; -pub const GRND_RANDOM: ::c_uint = 0x0002; -pub const GRND_INSECURE: ::c_uint = 0x0004; - -pub const SECCOMP_MODE_DISABLED: ::c_uint = 0; -pub const SECCOMP_MODE_STRICT: ::c_uint = 1; -pub const SECCOMP_MODE_FILTER: ::c_uint = 2; - -pub const SECCOMP_FILTER_FLAG_TSYNC: ::c_ulong = 1; -pub const SECCOMP_FILTER_FLAG_LOG: ::c_ulong = 2; -pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: ::c_ulong = 4; -pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: ::c_ulong = 8; - -pub const SECCOMP_RET_ACTION_FULL: ::c_uint = 0xffff0000; -pub const SECCOMP_RET_ACTION: ::c_uint = 0x7fff0000; -pub const SECCOMP_RET_DATA: ::c_uint = 0x0000ffff; - -pub const SECCOMP_RET_KILL_PROCESS: ::c_uint = 0x80000000; -pub const SECCOMP_RET_KILL_THREAD: ::c_uint = 0x00000000; -pub const SECCOMP_RET_KILL: ::c_uint = SECCOMP_RET_KILL_THREAD; -pub const SECCOMP_RET_TRAP: ::c_uint = 0x00030000; -pub const SECCOMP_RET_ERRNO: ::c_uint = 0x00050000; -pub const SECCOMP_RET_USER_NOTIF: ::c_uint = 0x7fc00000; -pub const SECCOMP_RET_TRACE: ::c_uint = 0x7ff00000; -pub const SECCOMP_RET_LOG: ::c_uint = 0x7ffc0000; -pub const SECCOMP_RET_ALLOW: ::c_uint = 0x7fff0000; - -pub const NLA_F_NESTED: ::c_int = 1 << 15; -pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14; -pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); - -pub const NLA_ALIGNTO: ::c_int = 4; - -pub const SIGEV_THREAD_ID: ::c_int = 4; - -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; - -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x008; -pub const TIOCM_SR: ::c_int = 0x010; -pub const TIOCM_CTS: ::c_int = 0x020; -pub const TIOCM_CAR: ::c_int = 0x040; -pub const TIOCM_RNG: ::c_int = 0x080; -pub const TIOCM_DSR: ::c_int = 0x100; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; - -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const SFD_CLOEXEC: ::c_int = O_CLOEXEC; -pub const SFD_NONBLOCK: ::c_int = O_NONBLOCK; - -pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; - -pub const SO_ORIGINAL_DST: ::c_int = 80; - -pub const IP_RECVFRAGSIZE: ::c_int = 25; - -pub const IPV6_FLOWINFO: ::c_int = 11; -pub const IPV6_MULTICAST_ALL: ::c_int = 29; -pub const IPV6_ROUTER_ALERT_ISOLATE: ::c_int = 30; -pub const IPV6_FLOWLABEL_MGR: ::c_int = 32; -pub const IPV6_FLOWINFO_SEND: ::c_int = 33; -pub const IPV6_RECVFRAGSIZE: ::c_int = 77; -pub const IPV6_FREEBIND: ::c_int = 78; -pub const IPV6_FLOWINFO_FLOWLABEL: ::c_int = 0x000fffff; -pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 0x0ff00000; - -pub const IUTF8: ::tcflag_t = 0x00004000; -pub const CMSPAR: ::tcflag_t = 0o10000000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const MFD_CLOEXEC: ::c_uint = 0x0001; -pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002; -pub const MFD_HUGETLB: ::c_uint = 0x0004; -pub const MFD_NOEXEC_SEAL: ::c_uint = 0x0008; -pub const MFD_EXEC: ::c_uint = 0x0010; -pub const MFD_HUGE_64KB: ::c_uint = 0x40000000; -pub const MFD_HUGE_512KB: ::c_uint = 0x4c000000; -pub const MFD_HUGE_1MB: ::c_uint = 0x50000000; -pub const MFD_HUGE_2MB: ::c_uint = 0x54000000; -pub const MFD_HUGE_8MB: ::c_uint = 0x5c000000; -pub const MFD_HUGE_16MB: ::c_uint = 0x60000000; -pub const MFD_HUGE_32MB: ::c_uint = 0x64000000; -pub const MFD_HUGE_256MB: ::c_uint = 0x70000000; -pub const MFD_HUGE_512MB: ::c_uint = 0x74000000; -pub const MFD_HUGE_1GB: ::c_uint = 0x78000000; -pub const MFD_HUGE_2GB: ::c_uint = 0x7c000000; -pub const MFD_HUGE_16GB: ::c_uint = 0x88000000; -pub const MFD_HUGE_MASK: ::c_uint = 63; -pub const MFD_HUGE_SHIFT: ::c_uint = 26; +pub const NFQNL_CFG_CMD_NONE: c_int = 0; +pub const NFQNL_CFG_CMD_BIND: c_int = 1; +pub const NFQNL_CFG_CMD_UNBIND: c_int = 2; +pub const NFQNL_CFG_CMD_PF_BIND: c_int = 3; +pub const NFQNL_CFG_CMD_PF_UNBIND: c_int = 4; + +pub const NFQNL_COPY_NONE: c_int = 0; +pub const NFQNL_COPY_META: c_int = 1; +pub const NFQNL_COPY_PACKET: c_int = 2; + +pub const NFQA_CFG_UNSPEC: c_int = 0; +pub const NFQA_CFG_CMD: c_int = 1; +pub const NFQA_CFG_PARAMS: c_int = 2; +pub const NFQA_CFG_QUEUE_MAXLEN: c_int = 3; +pub const NFQA_CFG_MASK: c_int = 4; +pub const NFQA_CFG_FLAGS: c_int = 5; + +pub const NFQA_CFG_F_FAIL_OPEN: c_int = 0x0001; +pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002; +pub const NFQA_CFG_F_GSO: c_int = 0x0004; +pub const NFQA_CFG_F_UID_GID: c_int = 0x0008; +pub const NFQA_CFG_F_SECCTX: c_int = 0x0010; +pub const NFQA_CFG_F_MAX: c_int = 0x0020; + +pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001; +pub const NFQA_SKB_GSO: c_int = 0x0002; +pub const NFQA_SKB_CSUM_NOTVERIFIED: c_int = 0x0004; + +pub const GENL_NAMSIZ: c_int = 16; + +pub const GENL_MIN_ID: c_int = NLMSG_MIN_TYPE; +pub const GENL_MAX_ID: c_int = 1023; + +pub const GENL_ADMIN_PERM: c_int = 0x01; +pub const GENL_CMD_CAP_DO: c_int = 0x02; +pub const GENL_CMD_CAP_DUMP: c_int = 0x04; +pub const GENL_CMD_CAP_HASPOL: c_int = 0x08; +pub const GENL_UNS_ADMIN_PERM: c_int = 0x10; + +pub const GENL_ID_CTRL: c_int = NLMSG_MIN_TYPE; +pub const GENL_ID_VFS_DQUOT: c_int = NLMSG_MIN_TYPE + 1; +pub const GENL_ID_PMCRAID: c_int = NLMSG_MIN_TYPE + 2; + +pub const CTRL_CMD_UNSPEC: c_int = 0; +pub const CTRL_CMD_NEWFAMILY: c_int = 1; +pub const CTRL_CMD_DELFAMILY: c_int = 2; +pub const CTRL_CMD_GETFAMILY: c_int = 3; +pub const CTRL_CMD_NEWOPS: c_int = 4; +pub const CTRL_CMD_DELOPS: c_int = 5; +pub const CTRL_CMD_GETOPS: c_int = 6; +pub const CTRL_CMD_NEWMCAST_GRP: c_int = 7; +pub const CTRL_CMD_DELMCAST_GRP: c_int = 8; +pub const CTRL_CMD_GETMCAST_GRP: c_int = 9; + +pub const CTRL_ATTR_UNSPEC: c_int = 0; +pub const CTRL_ATTR_FAMILY_ID: c_int = 1; +pub const CTRL_ATTR_FAMILY_NAME: c_int = 2; +pub const CTRL_ATTR_VERSION: c_int = 3; +pub const CTRL_ATTR_HDRSIZE: c_int = 4; +pub const CTRL_ATTR_MAXATTR: c_int = 5; +pub const CTRL_ATTR_OPS: c_int = 6; +pub const CTRL_ATTR_MCAST_GROUPS: c_int = 7; + +pub const CTRL_ATTR_OP_UNSPEC: c_int = 0; +pub const CTRL_ATTR_OP_ID: c_int = 1; +pub const CTRL_ATTR_OP_FLAGS: c_int = 2; + +pub const CTRL_ATTR_MCAST_GRP_UNSPEC: c_int = 0; +pub const CTRL_ATTR_MCAST_GRP_NAME: c_int = 1; +pub const CTRL_ATTR_MCAST_GRP_ID: c_int = 2; + +pub const NETLINK_ADD_MEMBERSHIP: c_int = 1; +pub const NETLINK_DROP_MEMBERSHIP: c_int = 2; +pub const NETLINK_PKTINFO: c_int = 3; +pub const NETLINK_BROADCAST_ERROR: c_int = 4; +pub const NETLINK_NO_ENOBUFS: c_int = 5; +pub const NETLINK_RX_RING: c_int = 6; +pub const NETLINK_TX_RING: c_int = 7; +pub const NETLINK_LISTEN_ALL_NSID: c_int = 8; +pub const NETLINK_LIST_MEMBERSHIPS: c_int = 9; +pub const NETLINK_CAP_ACK: c_int = 10; +pub const NETLINK_EXT_ACK: c_int = 11; +pub const NETLINK_GET_STRICT_CHK: c_int = 12; + +pub const GRND_NONBLOCK: c_uint = 0x0001; +pub const GRND_RANDOM: c_uint = 0x0002; +pub const GRND_INSECURE: c_uint = 0x0004; + +pub const SECCOMP_MODE_DISABLED: c_uint = 0; +pub const SECCOMP_MODE_STRICT: c_uint = 1; +pub const SECCOMP_MODE_FILTER: c_uint = 2; + +pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1; +pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 2; +pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 4; +pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 8; + +pub const SECCOMP_RET_ACTION_FULL: c_uint = 0xffff0000; +pub const SECCOMP_RET_ACTION: c_uint = 0x7fff0000; +pub const SECCOMP_RET_DATA: c_uint = 0x0000ffff; + +pub const SECCOMP_RET_KILL_PROCESS: c_uint = 0x80000000; +pub const SECCOMP_RET_KILL_THREAD: c_uint = 0x00000000; +pub const SECCOMP_RET_KILL: c_uint = SECCOMP_RET_KILL_THREAD; +pub const SECCOMP_RET_TRAP: c_uint = 0x00030000; +pub const SECCOMP_RET_ERRNO: c_uint = 0x00050000; +pub const SECCOMP_RET_USER_NOTIF: c_uint = 0x7fc00000; +pub const SECCOMP_RET_TRACE: c_uint = 0x7ff00000; +pub const SECCOMP_RET_LOG: c_uint = 0x7ffc0000; +pub const SECCOMP_RET_ALLOW: c_uint = 0x7fff0000; + +pub const NLA_F_NESTED: c_int = 1 << 15; +pub const NLA_F_NET_BYTEORDER: c_int = 1 << 14; +pub const NLA_TYPE_MASK: c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); + +pub const NLA_ALIGNTO: c_int = 4; + +pub const SIGEV_THREAD_ID: c_int = 4; + +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; + +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x008; +pub const TIOCM_SR: c_int = 0x010; +pub const TIOCM_CTS: c_int = 0x020; +pub const TIOCM_CAR: c_int = 0x040; +pub const TIOCM_RNG: c_int = 0x080; +pub const TIOCM_DSR: c_int = 0x100; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RI: c_int = TIOCM_RNG; + +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const SFD_CLOEXEC: c_int = O_CLOEXEC; +pub const SFD_NONBLOCK: c_int = O_NONBLOCK; + +pub const SOCK_NONBLOCK: c_int = O_NONBLOCK; + +pub const SO_ORIGINAL_DST: c_int = 80; + +pub const IP_RECVFRAGSIZE: c_int = 25; + +pub const IPV6_FLOWINFO: c_int = 11; +pub const IPV6_MULTICAST_ALL: c_int = 29; +pub const IPV6_ROUTER_ALERT_ISOLATE: c_int = 30; +pub const IPV6_FLOWLABEL_MGR: c_int = 32; +pub const IPV6_FLOWINFO_SEND: c_int = 33; +pub const IPV6_RECVFRAGSIZE: c_int = 77; +pub const IPV6_FREEBIND: c_int = 78; +pub const IPV6_FLOWINFO_FLOWLABEL: c_int = 0x000fffff; +pub const IPV6_FLOWINFO_PRIORITY: c_int = 0x0ff00000; + +pub const IUTF8: crate::tcflag_t = 0x00004000; +pub const CMSPAR: crate::tcflag_t = 0o10000000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const MFD_CLOEXEC: c_uint = 0x0001; +pub const MFD_ALLOW_SEALING: c_uint = 0x0002; +pub const MFD_HUGETLB: c_uint = 0x0004; +pub const MFD_NOEXEC_SEAL: c_uint = 0x0008; +pub const MFD_EXEC: c_uint = 0x0010; +pub const MFD_HUGE_64KB: c_uint = 0x40000000; +pub const MFD_HUGE_512KB: c_uint = 0x4c000000; +pub const MFD_HUGE_1MB: c_uint = 0x50000000; +pub const MFD_HUGE_2MB: c_uint = 0x54000000; +pub const MFD_HUGE_8MB: c_uint = 0x5c000000; +pub const MFD_HUGE_16MB: c_uint = 0x60000000; +pub const MFD_HUGE_32MB: c_uint = 0x64000000; +pub const MFD_HUGE_256MB: c_uint = 0x70000000; +pub const MFD_HUGE_512MB: c_uint = 0x74000000; +pub const MFD_HUGE_1GB: c_uint = 0x78000000; +pub const MFD_HUGE_2GB: c_uint = 0x7c000000; +pub const MFD_HUGE_16GB: c_uint = 0x88000000; +pub const MFD_HUGE_MASK: c_uint = 63; +pub const MFD_HUGE_SHIFT: c_uint = 26; // these are used in the p_type field of Elf32_Phdr and Elf64_Phdr, which has // the type Elf32Word and Elf64Word respectively. Luckily, both of those are u32 @@ -2282,490 +2286,490 @@ pub const PT_LOPROC: u32 = 0x70000000; pub const PT_HIPROC: u32 = 0x7fffffff; // uapi/linux/mount.h -pub const OPEN_TREE_CLONE: ::c_uint = 0x01; -pub const OPEN_TREE_CLOEXEC: ::c_uint = O_CLOEXEC as ::c_uint; +pub const OPEN_TREE_CLONE: c_uint = 0x01; +pub const OPEN_TREE_CLOEXEC: c_uint = O_CLOEXEC as c_uint; // linux/netfilter.h -pub const NF_DROP: ::c_int = 0; -pub const NF_ACCEPT: ::c_int = 1; -pub const NF_STOLEN: ::c_int = 2; -pub const NF_QUEUE: ::c_int = 3; -pub const NF_REPEAT: ::c_int = 4; -pub const NF_STOP: ::c_int = 5; -pub const NF_MAX_VERDICT: ::c_int = NF_STOP; - -pub const NF_VERDICT_MASK: ::c_int = 0x000000ff; -pub const NF_VERDICT_FLAG_QUEUE_BYPASS: ::c_int = 0x00008000; - -pub const NF_VERDICT_QMASK: ::c_int = 0xffff0000; -pub const NF_VERDICT_QBITS: ::c_int = 16; - -pub const NF_VERDICT_BITS: ::c_int = 16; - -pub const NF_INET_PRE_ROUTING: ::c_int = 0; -pub const NF_INET_LOCAL_IN: ::c_int = 1; -pub const NF_INET_FORWARD: ::c_int = 2; -pub const NF_INET_LOCAL_OUT: ::c_int = 3; -pub const NF_INET_POST_ROUTING: ::c_int = 4; -pub const NF_INET_NUMHOOKS: ::c_int = 5; -pub const NF_INET_INGRESS: ::c_int = NF_INET_NUMHOOKS; - -pub const NF_NETDEV_INGRESS: ::c_int = 0; -pub const NF_NETDEV_EGRESS: ::c_int = 1; -pub const NF_NETDEV_NUMHOOKS: ::c_int = 2; - -pub const NFPROTO_UNSPEC: ::c_int = 0; -pub const NFPROTO_INET: ::c_int = 1; -pub const NFPROTO_IPV4: ::c_int = 2; -pub const NFPROTO_ARP: ::c_int = 3; -pub const NFPROTO_NETDEV: ::c_int = 5; -pub const NFPROTO_BRIDGE: ::c_int = 7; -pub const NFPROTO_IPV6: ::c_int = 10; -pub const NFPROTO_DECNET: ::c_int = 12; -pub const NFPROTO_NUMPROTO: ::c_int = 13; +pub const NF_DROP: c_int = 0; +pub const NF_ACCEPT: c_int = 1; +pub const NF_STOLEN: c_int = 2; +pub const NF_QUEUE: c_int = 3; +pub const NF_REPEAT: c_int = 4; +pub const NF_STOP: c_int = 5; +pub const NF_MAX_VERDICT: c_int = NF_STOP; + +pub const NF_VERDICT_MASK: c_int = 0x000000ff; +pub const NF_VERDICT_FLAG_QUEUE_BYPASS: c_int = 0x00008000; + +pub const NF_VERDICT_QMASK: c_int = 0xffff0000; +pub const NF_VERDICT_QBITS: c_int = 16; + +pub const NF_VERDICT_BITS: c_int = 16; + +pub const NF_INET_PRE_ROUTING: c_int = 0; +pub const NF_INET_LOCAL_IN: c_int = 1; +pub const NF_INET_FORWARD: c_int = 2; +pub const NF_INET_LOCAL_OUT: c_int = 3; +pub const NF_INET_POST_ROUTING: c_int = 4; +pub const NF_INET_NUMHOOKS: c_int = 5; +pub const NF_INET_INGRESS: c_int = NF_INET_NUMHOOKS; + +pub const NF_NETDEV_INGRESS: c_int = 0; +pub const NF_NETDEV_EGRESS: c_int = 1; +pub const NF_NETDEV_NUMHOOKS: c_int = 2; + +pub const NFPROTO_UNSPEC: c_int = 0; +pub const NFPROTO_INET: c_int = 1; +pub const NFPROTO_IPV4: c_int = 2; +pub const NFPROTO_ARP: c_int = 3; +pub const NFPROTO_NETDEV: c_int = 5; +pub const NFPROTO_BRIDGE: c_int = 7; +pub const NFPROTO_IPV6: c_int = 10; +pub const NFPROTO_DECNET: c_int = 12; +pub const NFPROTO_NUMPROTO: c_int = 13; // linux/netfilter_arp.h -pub const NF_ARP: ::c_int = 0; -pub const NF_ARP_IN: ::c_int = 0; -pub const NF_ARP_OUT: ::c_int = 1; -pub const NF_ARP_FORWARD: ::c_int = 2; -pub const NF_ARP_NUMHOOKS: ::c_int = 3; +pub const NF_ARP: c_int = 0; +pub const NF_ARP_IN: c_int = 0; +pub const NF_ARP_OUT: c_int = 1; +pub const NF_ARP_FORWARD: c_int = 2; +pub const NF_ARP_NUMHOOKS: c_int = 3; // linux/netfilter_bridge.h -pub const NF_BR_PRE_ROUTING: ::c_int = 0; -pub const NF_BR_LOCAL_IN: ::c_int = 1; -pub const NF_BR_FORWARD: ::c_int = 2; -pub const NF_BR_LOCAL_OUT: ::c_int = 3; -pub const NF_BR_POST_ROUTING: ::c_int = 4; -pub const NF_BR_BROUTING: ::c_int = 5; -pub const NF_BR_NUMHOOKS: ::c_int = 6; - -pub const NF_BR_PRI_FIRST: ::c_int = ::INT_MIN; -pub const NF_BR_PRI_NAT_DST_BRIDGED: ::c_int = -300; -pub const NF_BR_PRI_FILTER_BRIDGED: ::c_int = -200; -pub const NF_BR_PRI_BRNF: ::c_int = 0; -pub const NF_BR_PRI_NAT_DST_OTHER: ::c_int = 100; -pub const NF_BR_PRI_FILTER_OTHER: ::c_int = 200; -pub const NF_BR_PRI_NAT_SRC: ::c_int = 300; -pub const NF_BR_PRI_LAST: ::c_int = ::INT_MAX; +pub const NF_BR_PRE_ROUTING: c_int = 0; +pub const NF_BR_LOCAL_IN: c_int = 1; +pub const NF_BR_FORWARD: c_int = 2; +pub const NF_BR_LOCAL_OUT: c_int = 3; +pub const NF_BR_POST_ROUTING: c_int = 4; +pub const NF_BR_BROUTING: c_int = 5; +pub const NF_BR_NUMHOOKS: c_int = 6; + +pub const NF_BR_PRI_FIRST: c_int = crate::INT_MIN; +pub const NF_BR_PRI_NAT_DST_BRIDGED: c_int = -300; +pub const NF_BR_PRI_FILTER_BRIDGED: c_int = -200; +pub const NF_BR_PRI_BRNF: c_int = 0; +pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100; +pub const NF_BR_PRI_FILTER_OTHER: c_int = 200; +pub const NF_BR_PRI_NAT_SRC: c_int = 300; +pub const NF_BR_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv4.h -pub const NF_IP_PRE_ROUTING: ::c_int = 0; -pub const NF_IP_LOCAL_IN: ::c_int = 1; -pub const NF_IP_FORWARD: ::c_int = 2; -pub const NF_IP_LOCAL_OUT: ::c_int = 3; -pub const NF_IP_POST_ROUTING: ::c_int = 4; -pub const NF_IP_NUMHOOKS: ::c_int = 5; - -pub const NF_IP_PRI_FIRST: ::c_int = ::INT_MIN; -pub const NF_IP_PRI_RAW_BEFORE_DEFRAG: ::c_int = -450; -pub const NF_IP_PRI_CONNTRACK_DEFRAG: ::c_int = -400; -pub const NF_IP_PRI_RAW: ::c_int = -300; -pub const NF_IP_PRI_SELINUX_FIRST: ::c_int = -225; -pub const NF_IP_PRI_CONNTRACK: ::c_int = -200; -pub const NF_IP_PRI_MANGLE: ::c_int = -150; -pub const NF_IP_PRI_NAT_DST: ::c_int = -100; -pub const NF_IP_PRI_FILTER: ::c_int = 0; -pub const NF_IP_PRI_SECURITY: ::c_int = 50; -pub const NF_IP_PRI_NAT_SRC: ::c_int = 100; -pub const NF_IP_PRI_SELINUX_LAST: ::c_int = 225; -pub const NF_IP_PRI_CONNTRACK_HELPER: ::c_int = 300; -pub const NF_IP_PRI_CONNTRACK_CONFIRM: ::c_int = ::INT_MAX; -pub const NF_IP_PRI_LAST: ::c_int = ::INT_MAX; +pub const NF_IP_PRE_ROUTING: c_int = 0; +pub const NF_IP_LOCAL_IN: c_int = 1; +pub const NF_IP_FORWARD: c_int = 2; +pub const NF_IP_LOCAL_OUT: c_int = 3; +pub const NF_IP_POST_ROUTING: c_int = 4; +pub const NF_IP_NUMHOOKS: c_int = 5; + +pub const NF_IP_PRI_FIRST: c_int = crate::INT_MIN; +pub const NF_IP_PRI_RAW_BEFORE_DEFRAG: c_int = -450; +pub const NF_IP_PRI_CONNTRACK_DEFRAG: c_int = -400; +pub const NF_IP_PRI_RAW: c_int = -300; +pub const NF_IP_PRI_SELINUX_FIRST: c_int = -225; +pub const NF_IP_PRI_CONNTRACK: c_int = -200; +pub const NF_IP_PRI_MANGLE: c_int = -150; +pub const NF_IP_PRI_NAT_DST: c_int = -100; +pub const NF_IP_PRI_FILTER: c_int = 0; +pub const NF_IP_PRI_SECURITY: c_int = 50; +pub const NF_IP_PRI_NAT_SRC: c_int = 100; +pub const NF_IP_PRI_SELINUX_LAST: c_int = 225; +pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300; +pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = crate::INT_MAX; +pub const NF_IP_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6.h -pub const NF_IP6_PRE_ROUTING: ::c_int = 0; -pub const NF_IP6_LOCAL_IN: ::c_int = 1; -pub const NF_IP6_FORWARD: ::c_int = 2; -pub const NF_IP6_LOCAL_OUT: ::c_int = 3; -pub const NF_IP6_POST_ROUTING: ::c_int = 4; -pub const NF_IP6_NUMHOOKS: ::c_int = 5; - -pub const NF_IP6_PRI_FIRST: ::c_int = ::INT_MIN; -pub const NF_IP6_PRI_RAW_BEFORE_DEFRAG: ::c_int = -450; -pub const NF_IP6_PRI_CONNTRACK_DEFRAG: ::c_int = -400; -pub const NF_IP6_PRI_RAW: ::c_int = -300; -pub const NF_IP6_PRI_SELINUX_FIRST: ::c_int = -225; -pub const NF_IP6_PRI_CONNTRACK: ::c_int = -200; -pub const NF_IP6_PRI_MANGLE: ::c_int = -150; -pub const NF_IP6_PRI_NAT_DST: ::c_int = -100; -pub const NF_IP6_PRI_FILTER: ::c_int = 0; -pub const NF_IP6_PRI_SECURITY: ::c_int = 50; -pub const NF_IP6_PRI_NAT_SRC: ::c_int = 100; -pub const NF_IP6_PRI_SELINUX_LAST: ::c_int = 225; -pub const NF_IP6_PRI_CONNTRACK_HELPER: ::c_int = 300; -pub const NF_IP6_PRI_LAST: ::c_int = ::INT_MAX; +pub const NF_IP6_PRE_ROUTING: c_int = 0; +pub const NF_IP6_LOCAL_IN: c_int = 1; +pub const NF_IP6_FORWARD: c_int = 2; +pub const NF_IP6_LOCAL_OUT: c_int = 3; +pub const NF_IP6_POST_ROUTING: c_int = 4; +pub const NF_IP6_NUMHOOKS: c_int = 5; + +pub const NF_IP6_PRI_FIRST: c_int = crate::INT_MIN; +pub const NF_IP6_PRI_RAW_BEFORE_DEFRAG: c_int = -450; +pub const NF_IP6_PRI_CONNTRACK_DEFRAG: c_int = -400; +pub const NF_IP6_PRI_RAW: c_int = -300; +pub const NF_IP6_PRI_SELINUX_FIRST: c_int = -225; +pub const NF_IP6_PRI_CONNTRACK: c_int = -200; +pub const NF_IP6_PRI_MANGLE: c_int = -150; +pub const NF_IP6_PRI_NAT_DST: c_int = -100; +pub const NF_IP6_PRI_FILTER: c_int = 0; +pub const NF_IP6_PRI_SECURITY: c_int = 50; +pub const NF_IP6_PRI_NAT_SRC: c_int = 100; +pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225; +pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300; +pub const NF_IP6_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6/ip6_tables.h -pub const IP6T_SO_ORIGINAL_DST: ::c_int = 80; +pub const IP6T_SO_ORIGINAL_DST: c_int = 80; // linux/netfilter/nf_tables.h -pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256; -pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256; -pub const NFT_SET_MAXNAMELEN: ::c_int = 256; -pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256; -pub const NFT_USERDATA_MAXLEN: ::c_int = 256; - -pub const NFT_REG_VERDICT: ::c_int = 0; -pub const NFT_REG_1: ::c_int = 1; -pub const NFT_REG_2: ::c_int = 2; -pub const NFT_REG_3: ::c_int = 3; -pub const NFT_REG_4: ::c_int = 4; -pub const __NFT_REG_MAX: ::c_int = 5; -pub const NFT_REG32_00: ::c_int = 8; -pub const NFT_REG32_01: ::c_int = 9; -pub const NFT_REG32_02: ::c_int = 10; -pub const NFT_REG32_03: ::c_int = 11; -pub const NFT_REG32_04: ::c_int = 12; -pub const NFT_REG32_05: ::c_int = 13; -pub const NFT_REG32_06: ::c_int = 14; -pub const NFT_REG32_07: ::c_int = 15; -pub const NFT_REG32_08: ::c_int = 16; -pub const NFT_REG32_09: ::c_int = 17; -pub const NFT_REG32_10: ::c_int = 18; -pub const NFT_REG32_11: ::c_int = 19; -pub const NFT_REG32_12: ::c_int = 20; -pub const NFT_REG32_13: ::c_int = 21; -pub const NFT_REG32_14: ::c_int = 22; -pub const NFT_REG32_15: ::c_int = 23; - -pub const NFT_REG_SIZE: ::c_int = 16; -pub const NFT_REG32_SIZE: ::c_int = 4; - -pub const NFT_CONTINUE: ::c_int = -1; -pub const NFT_BREAK: ::c_int = -2; -pub const NFT_JUMP: ::c_int = -3; -pub const NFT_GOTO: ::c_int = -4; -pub const NFT_RETURN: ::c_int = -5; - -pub const NFT_MSG_NEWTABLE: ::c_int = 0; -pub const NFT_MSG_GETTABLE: ::c_int = 1; -pub const NFT_MSG_DELTABLE: ::c_int = 2; -pub const NFT_MSG_NEWCHAIN: ::c_int = 3; -pub const NFT_MSG_GETCHAIN: ::c_int = 4; -pub const NFT_MSG_DELCHAIN: ::c_int = 5; -pub const NFT_MSG_NEWRULE: ::c_int = 6; -pub const NFT_MSG_GETRULE: ::c_int = 7; -pub const NFT_MSG_DELRULE: ::c_int = 8; -pub const NFT_MSG_NEWSET: ::c_int = 9; -pub const NFT_MSG_GETSET: ::c_int = 10; -pub const NFT_MSG_DELSET: ::c_int = 11; -pub const NFT_MSG_NEWSETELEM: ::c_int = 12; -pub const NFT_MSG_GETSETELEM: ::c_int = 13; -pub const NFT_MSG_DELSETELEM: ::c_int = 14; -pub const NFT_MSG_NEWGEN: ::c_int = 15; -pub const NFT_MSG_GETGEN: ::c_int = 16; -pub const NFT_MSG_TRACE: ::c_int = 17; -pub const NFT_MSG_NEWOBJ: ::c_int = 18; -pub const NFT_MSG_GETOBJ: ::c_int = 19; -pub const NFT_MSG_DELOBJ: ::c_int = 20; -pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21; -pub const NFT_MSG_MAX: ::c_int = 25; - -pub const NFT_SET_ANONYMOUS: ::c_int = 0x1; -pub const NFT_SET_CONSTANT: ::c_int = 0x2; -pub const NFT_SET_INTERVAL: ::c_int = 0x4; -pub const NFT_SET_MAP: ::c_int = 0x8; -pub const NFT_SET_TIMEOUT: ::c_int = 0x10; -pub const NFT_SET_EVAL: ::c_int = 0x20; - -pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0; -pub const NFT_SET_POL_MEMORY: ::c_int = 1; - -pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1; - -pub const NFT_DATA_VALUE: ::c_uint = 0; -pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00; - -pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00; - -pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64; - -pub const NFT_BYTEORDER_NTOH: ::c_int = 0; -pub const NFT_BYTEORDER_HTON: ::c_int = 1; - -pub const NFT_CMP_EQ: ::c_int = 0; -pub const NFT_CMP_NEQ: ::c_int = 1; -pub const NFT_CMP_LT: ::c_int = 2; -pub const NFT_CMP_LTE: ::c_int = 3; -pub const NFT_CMP_GT: ::c_int = 4; -pub const NFT_CMP_GTE: ::c_int = 5; - -pub const NFT_RANGE_EQ: ::c_int = 0; -pub const NFT_RANGE_NEQ: ::c_int = 1; - -pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0; - -pub const NFT_DYNSET_OP_ADD: ::c_int = 0; -pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1; - -pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0; - -pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0; -pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1; -pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2; - -pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0; -pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1; - -pub const NFT_META_LEN: ::c_int = 0; -pub const NFT_META_PROTOCOL: ::c_int = 1; -pub const NFT_META_PRIORITY: ::c_int = 2; -pub const NFT_META_MARK: ::c_int = 3; -pub const NFT_META_IIF: ::c_int = 4; -pub const NFT_META_OIF: ::c_int = 5; -pub const NFT_META_IIFNAME: ::c_int = 6; -pub const NFT_META_OIFNAME: ::c_int = 7; -pub const NFT_META_IIFTYPE: ::c_int = 8; -pub const NFT_META_OIFTYPE: ::c_int = 9; -pub const NFT_META_SKUID: ::c_int = 10; -pub const NFT_META_SKGID: ::c_int = 11; -pub const NFT_META_NFTRACE: ::c_int = 12; -pub const NFT_META_RTCLASSID: ::c_int = 13; -pub const NFT_META_SECMARK: ::c_int = 14; -pub const NFT_META_NFPROTO: ::c_int = 15; -pub const NFT_META_L4PROTO: ::c_int = 16; -pub const NFT_META_BRI_IIFNAME: ::c_int = 17; -pub const NFT_META_BRI_OIFNAME: ::c_int = 18; -pub const NFT_META_PKTTYPE: ::c_int = 19; -pub const NFT_META_CPU: ::c_int = 20; -pub const NFT_META_IIFGROUP: ::c_int = 21; -pub const NFT_META_OIFGROUP: ::c_int = 22; -pub const NFT_META_CGROUP: ::c_int = 23; -pub const NFT_META_PRANDOM: ::c_int = 24; - -pub const NFT_CT_STATE: ::c_int = 0; -pub const NFT_CT_DIRECTION: ::c_int = 1; -pub const NFT_CT_STATUS: ::c_int = 2; -pub const NFT_CT_MARK: ::c_int = 3; -pub const NFT_CT_SECMARK: ::c_int = 4; -pub const NFT_CT_EXPIRATION: ::c_int = 5; -pub const NFT_CT_HELPER: ::c_int = 6; -pub const NFT_CT_L3PROTOCOL: ::c_int = 7; -pub const NFT_CT_SRC: ::c_int = 8; -pub const NFT_CT_DST: ::c_int = 9; -pub const NFT_CT_PROTOCOL: ::c_int = 10; -pub const NFT_CT_PROTO_SRC: ::c_int = 11; -pub const NFT_CT_PROTO_DST: ::c_int = 12; -pub const NFT_CT_LABELS: ::c_int = 13; -pub const NFT_CT_PKTS: ::c_int = 14; -pub const NFT_CT_BYTES: ::c_int = 15; -pub const NFT_CT_AVGPKT: ::c_int = 16; -pub const NFT_CT_ZONE: ::c_int = 17; -pub const NFT_CT_EVENTMASK: ::c_int = 18; -pub const NFT_CT_SRC_IP: ::c_int = 19; -pub const NFT_CT_DST_IP: ::c_int = 20; -pub const NFT_CT_SRC_IP6: ::c_int = 21; -pub const NFT_CT_DST_IP6: ::c_int = 22; -pub const NFT_CT_ID: ::c_int = 23; - -pub const NFT_LIMIT_PKTS: ::c_int = 0; -pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1; - -pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0; - -pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01; -pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02; -pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03; - -pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0; - -pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0; -pub const NFT_REJECT_TCP_RST: ::c_int = 1; -pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2; - -pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0; -pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1; -pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2; -pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3; - -pub const NFT_NAT_SNAT: ::c_int = 0; -pub const NFT_NAT_DNAT: ::c_int = 1; - -pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0; -pub const NFT_TRACETYPE_POLICY: ::c_int = 1; -pub const NFT_TRACETYPE_RETURN: ::c_int = 2; -pub const NFT_TRACETYPE_RULE: ::c_int = 3; - -pub const NFT_NG_INCREMENTAL: ::c_int = 0; -pub const NFT_NG_RANDOM: ::c_int = 1; +pub const NFT_TABLE_MAXNAMELEN: c_int = 256; +pub const NFT_CHAIN_MAXNAMELEN: c_int = 256; +pub const NFT_SET_MAXNAMELEN: c_int = 256; +pub const NFT_OBJ_MAXNAMELEN: c_int = 256; +pub const NFT_USERDATA_MAXLEN: c_int = 256; + +pub const NFT_REG_VERDICT: c_int = 0; +pub const NFT_REG_1: c_int = 1; +pub const NFT_REG_2: c_int = 2; +pub const NFT_REG_3: c_int = 3; +pub const NFT_REG_4: c_int = 4; +pub const __NFT_REG_MAX: c_int = 5; +pub const NFT_REG32_00: c_int = 8; +pub const NFT_REG32_01: c_int = 9; +pub const NFT_REG32_02: c_int = 10; +pub const NFT_REG32_03: c_int = 11; +pub const NFT_REG32_04: c_int = 12; +pub const NFT_REG32_05: c_int = 13; +pub const NFT_REG32_06: c_int = 14; +pub const NFT_REG32_07: c_int = 15; +pub const NFT_REG32_08: c_int = 16; +pub const NFT_REG32_09: c_int = 17; +pub const NFT_REG32_10: c_int = 18; +pub const NFT_REG32_11: c_int = 19; +pub const NFT_REG32_12: c_int = 20; +pub const NFT_REG32_13: c_int = 21; +pub const NFT_REG32_14: c_int = 22; +pub const NFT_REG32_15: c_int = 23; + +pub const NFT_REG_SIZE: c_int = 16; +pub const NFT_REG32_SIZE: c_int = 4; + +pub const NFT_CONTINUE: c_int = -1; +pub const NFT_BREAK: c_int = -2; +pub const NFT_JUMP: c_int = -3; +pub const NFT_GOTO: c_int = -4; +pub const NFT_RETURN: c_int = -5; + +pub const NFT_MSG_NEWTABLE: c_int = 0; +pub const NFT_MSG_GETTABLE: c_int = 1; +pub const NFT_MSG_DELTABLE: c_int = 2; +pub const NFT_MSG_NEWCHAIN: c_int = 3; +pub const NFT_MSG_GETCHAIN: c_int = 4; +pub const NFT_MSG_DELCHAIN: c_int = 5; +pub const NFT_MSG_NEWRULE: c_int = 6; +pub const NFT_MSG_GETRULE: c_int = 7; +pub const NFT_MSG_DELRULE: c_int = 8; +pub const NFT_MSG_NEWSET: c_int = 9; +pub const NFT_MSG_GETSET: c_int = 10; +pub const NFT_MSG_DELSET: c_int = 11; +pub const NFT_MSG_NEWSETELEM: c_int = 12; +pub const NFT_MSG_GETSETELEM: c_int = 13; +pub const NFT_MSG_DELSETELEM: c_int = 14; +pub const NFT_MSG_NEWGEN: c_int = 15; +pub const NFT_MSG_GETGEN: c_int = 16; +pub const NFT_MSG_TRACE: c_int = 17; +pub const NFT_MSG_NEWOBJ: c_int = 18; +pub const NFT_MSG_GETOBJ: c_int = 19; +pub const NFT_MSG_DELOBJ: c_int = 20; +pub const NFT_MSG_GETOBJ_RESET: c_int = 21; +pub const NFT_MSG_MAX: c_int = 25; + +pub const NFT_SET_ANONYMOUS: c_int = 0x1; +pub const NFT_SET_CONSTANT: c_int = 0x2; +pub const NFT_SET_INTERVAL: c_int = 0x4; +pub const NFT_SET_MAP: c_int = 0x8; +pub const NFT_SET_TIMEOUT: c_int = 0x10; +pub const NFT_SET_EVAL: c_int = 0x20; + +pub const NFT_SET_POL_PERFORMANCE: c_int = 0; +pub const NFT_SET_POL_MEMORY: c_int = 1; + +pub const NFT_SET_ELEM_INTERVAL_END: c_int = 0x1; + +pub const NFT_DATA_VALUE: c_uint = 0; +pub const NFT_DATA_VERDICT: c_uint = 0xffffff00; + +pub const NFT_DATA_RESERVED_MASK: c_uint = 0xffffff00; + +pub const NFT_DATA_VALUE_MAXLEN: c_int = 64; + +pub const NFT_BYTEORDER_NTOH: c_int = 0; +pub const NFT_BYTEORDER_HTON: c_int = 1; + +pub const NFT_CMP_EQ: c_int = 0; +pub const NFT_CMP_NEQ: c_int = 1; +pub const NFT_CMP_LT: c_int = 2; +pub const NFT_CMP_LTE: c_int = 3; +pub const NFT_CMP_GT: c_int = 4; +pub const NFT_CMP_GTE: c_int = 5; + +pub const NFT_RANGE_EQ: c_int = 0; +pub const NFT_RANGE_NEQ: c_int = 1; + +pub const NFT_LOOKUP_F_INV: c_int = 1 << 0; + +pub const NFT_DYNSET_OP_ADD: c_int = 0; +pub const NFT_DYNSET_OP_UPDATE: c_int = 1; + +pub const NFT_DYNSET_F_INV: c_int = 1 << 0; + +pub const NFT_PAYLOAD_LL_HEADER: c_int = 0; +pub const NFT_PAYLOAD_NETWORK_HEADER: c_int = 1; +pub const NFT_PAYLOAD_TRANSPORT_HEADER: c_int = 2; + +pub const NFT_PAYLOAD_CSUM_NONE: c_int = 0; +pub const NFT_PAYLOAD_CSUM_INET: c_int = 1; + +pub const NFT_META_LEN: c_int = 0; +pub const NFT_META_PROTOCOL: c_int = 1; +pub const NFT_META_PRIORITY: c_int = 2; +pub const NFT_META_MARK: c_int = 3; +pub const NFT_META_IIF: c_int = 4; +pub const NFT_META_OIF: c_int = 5; +pub const NFT_META_IIFNAME: c_int = 6; +pub const NFT_META_OIFNAME: c_int = 7; +pub const NFT_META_IIFTYPE: c_int = 8; +pub const NFT_META_OIFTYPE: c_int = 9; +pub const NFT_META_SKUID: c_int = 10; +pub const NFT_META_SKGID: c_int = 11; +pub const NFT_META_NFTRACE: c_int = 12; +pub const NFT_META_RTCLASSID: c_int = 13; +pub const NFT_META_SECMARK: c_int = 14; +pub const NFT_META_NFPROTO: c_int = 15; +pub const NFT_META_L4PROTO: c_int = 16; +pub const NFT_META_BRI_IIFNAME: c_int = 17; +pub const NFT_META_BRI_OIFNAME: c_int = 18; +pub const NFT_META_PKTTYPE: c_int = 19; +pub const NFT_META_CPU: c_int = 20; +pub const NFT_META_IIFGROUP: c_int = 21; +pub const NFT_META_OIFGROUP: c_int = 22; +pub const NFT_META_CGROUP: c_int = 23; +pub const NFT_META_PRANDOM: c_int = 24; + +pub const NFT_CT_STATE: c_int = 0; +pub const NFT_CT_DIRECTION: c_int = 1; +pub const NFT_CT_STATUS: c_int = 2; +pub const NFT_CT_MARK: c_int = 3; +pub const NFT_CT_SECMARK: c_int = 4; +pub const NFT_CT_EXPIRATION: c_int = 5; +pub const NFT_CT_HELPER: c_int = 6; +pub const NFT_CT_L3PROTOCOL: c_int = 7; +pub const NFT_CT_SRC: c_int = 8; +pub const NFT_CT_DST: c_int = 9; +pub const NFT_CT_PROTOCOL: c_int = 10; +pub const NFT_CT_PROTO_SRC: c_int = 11; +pub const NFT_CT_PROTO_DST: c_int = 12; +pub const NFT_CT_LABELS: c_int = 13; +pub const NFT_CT_PKTS: c_int = 14; +pub const NFT_CT_BYTES: c_int = 15; +pub const NFT_CT_AVGPKT: c_int = 16; +pub const NFT_CT_ZONE: c_int = 17; +pub const NFT_CT_EVENTMASK: c_int = 18; +pub const NFT_CT_SRC_IP: c_int = 19; +pub const NFT_CT_DST_IP: c_int = 20; +pub const NFT_CT_SRC_IP6: c_int = 21; +pub const NFT_CT_DST_IP6: c_int = 22; +pub const NFT_CT_ID: c_int = 23; + +pub const NFT_LIMIT_PKTS: c_int = 0; +pub const NFT_LIMIT_PKT_BYTES: c_int = 1; + +pub const NFT_LIMIT_F_INV: c_int = 1 << 0; + +pub const NFT_QUEUE_FLAG_BYPASS: c_int = 0x01; +pub const NFT_QUEUE_FLAG_CPU_FANOUT: c_int = 0x02; +pub const NFT_QUEUE_FLAG_MASK: c_int = 0x03; + +pub const NFT_QUOTA_F_INV: c_int = 1 << 0; + +pub const NFT_REJECT_ICMP_UNREACH: c_int = 0; +pub const NFT_REJECT_TCP_RST: c_int = 1; +pub const NFT_REJECT_ICMPX_UNREACH: c_int = 2; + +pub const NFT_REJECT_ICMPX_NO_ROUTE: c_int = 0; +pub const NFT_REJECT_ICMPX_PORT_UNREACH: c_int = 1; +pub const NFT_REJECT_ICMPX_HOST_UNREACH: c_int = 2; +pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: c_int = 3; + +pub const NFT_NAT_SNAT: c_int = 0; +pub const NFT_NAT_DNAT: c_int = 1; + +pub const NFT_TRACETYPE_UNSPEC: c_int = 0; +pub const NFT_TRACETYPE_POLICY: c_int = 1; +pub const NFT_TRACETYPE_RETURN: c_int = 2; +pub const NFT_TRACETYPE_RULE: c_int = 3; + +pub const NFT_NG_INCREMENTAL: c_int = 0; +pub const NFT_NG_RANDOM: c_int = 1; // linux/input.h -pub const FF_MAX: ::__u16 = 0x7f; +pub const FF_MAX: crate::__u16 = 0x7f; pub const FF_CNT: usize = FF_MAX as usize + 1; // linux/input-event-codes.h -pub const INPUT_PROP_MAX: ::__u16 = 0x1f; +pub const INPUT_PROP_MAX: crate::__u16 = 0x1f; pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1; -pub const EV_MAX: ::__u16 = 0x1f; +pub const EV_MAX: crate::__u16 = 0x1f; pub const EV_CNT: usize = EV_MAX as usize + 1; -pub const SYN_MAX: ::__u16 = 0xf; +pub const SYN_MAX: crate::__u16 = 0xf; pub const SYN_CNT: usize = SYN_MAX as usize + 1; -pub const KEY_MAX: ::__u16 = 0x2ff; +pub const KEY_MAX: crate::__u16 = 0x2ff; pub const KEY_CNT: usize = KEY_MAX as usize + 1; -pub const REL_MAX: ::__u16 = 0x0f; +pub const REL_MAX: crate::__u16 = 0x0f; pub const REL_CNT: usize = REL_MAX as usize + 1; -pub const ABS_MAX: ::__u16 = 0x3f; +pub const ABS_MAX: crate::__u16 = 0x3f; pub const ABS_CNT: usize = ABS_MAX as usize + 1; -pub const SW_MAX: ::__u16 = 0x0f; +pub const SW_MAX: crate::__u16 = 0x0f; pub const SW_CNT: usize = SW_MAX as usize + 1; -pub const MSC_MAX: ::__u16 = 0x07; +pub const MSC_MAX: crate::__u16 = 0x07; pub const MSC_CNT: usize = MSC_MAX as usize + 1; -pub const LED_MAX: ::__u16 = 0x0f; +pub const LED_MAX: crate::__u16 = 0x0f; pub const LED_CNT: usize = LED_MAX as usize + 1; -pub const REP_MAX: ::__u16 = 0x01; +pub const REP_MAX: crate::__u16 = 0x01; pub const REP_CNT: usize = REP_MAX as usize + 1; -pub const SND_MAX: ::__u16 = 0x07; +pub const SND_MAX: crate::__u16 = 0x07; pub const SND_CNT: usize = SND_MAX as usize + 1; // linux/uinput.h -pub const UINPUT_VERSION: ::c_uint = 5; +pub const UINPUT_VERSION: c_uint = 5; pub const UINPUT_MAX_NAME_SIZE: usize = 80; // bionic/libc/kernel/uapi/linux/if_tun.h -pub const IFF_TUN: ::c_int = 0x0001; -pub const IFF_TAP: ::c_int = 0x0002; -pub const IFF_NAPI: ::c_int = 0x0010; -pub const IFF_NAPI_FRAGS: ::c_int = 0x0020; -pub const IFF_NO_CARRIER: ::c_int = 0x0040; -pub const IFF_NO_PI: ::c_int = 0x1000; -pub const IFF_ONE_QUEUE: ::c_int = 0x2000; -pub const IFF_VNET_HDR: ::c_int = 0x4000; -pub const IFF_TUN_EXCL: ::c_int = 0x8000; -pub const IFF_MULTI_QUEUE: ::c_int = 0x0100; -pub const IFF_ATTACH_QUEUE: ::c_int = 0x0200; -pub const IFF_DETACH_QUEUE: ::c_int = 0x0400; -pub const IFF_PERSIST: ::c_int = 0x0800; -pub const IFF_NOFILTER: ::c_int = 0x1000; +pub const IFF_TUN: c_int = 0x0001; +pub const IFF_TAP: c_int = 0x0002; +pub const IFF_NAPI: c_int = 0x0010; +pub const IFF_NAPI_FRAGS: c_int = 0x0020; +pub const IFF_NO_CARRIER: c_int = 0x0040; +pub const IFF_NO_PI: c_int = 0x1000; +pub const IFF_ONE_QUEUE: c_int = 0x2000; +pub const IFF_VNET_HDR: c_int = 0x4000; +pub const IFF_TUN_EXCL: c_int = 0x8000; +pub const IFF_MULTI_QUEUE: c_int = 0x0100; +pub const IFF_ATTACH_QUEUE: c_int = 0x0200; +pub const IFF_DETACH_QUEUE: c_int = 0x0400; +pub const IFF_PERSIST: c_int = 0x0800; +pub const IFF_NOFILTER: c_int = 0x1000; // Features for GSO (TUNSETOFFLOAD) -pub const TUN_F_CSUM: ::c_uint = 0x01; -pub const TUN_F_TSO4: ::c_uint = 0x02; -pub const TUN_F_TSO6: ::c_uint = 0x04; -pub const TUN_F_TSO_ECN: ::c_uint = 0x08; -pub const TUN_F_UFO: ::c_uint = 0x10; -pub const TUN_F_USO4: ::c_uint = 0x20; -pub const TUN_F_USO6: ::c_uint = 0x40; +pub const TUN_F_CSUM: c_uint = 0x01; +pub const TUN_F_TSO4: c_uint = 0x02; +pub const TUN_F_TSO6: c_uint = 0x04; +pub const TUN_F_TSO_ECN: c_uint = 0x08; +pub const TUN_F_UFO: c_uint = 0x10; +pub const TUN_F_USO4: c_uint = 0x20; +pub const TUN_F_USO6: c_uint = 0x40; // start android/platform/bionic/libc/kernel/uapi/linux/if_ether.h // from https://android.googlesource.com/platform/bionic/+/HEAD/libc/kernel/uapi/linux/if_ether.h -pub const ETH_ALEN: ::c_int = 6; -pub const ETH_HLEN: ::c_int = 14; -pub const ETH_ZLEN: ::c_int = 60; -pub const ETH_DATA_LEN: ::c_int = 1500; -pub const ETH_FRAME_LEN: ::c_int = 1514; -pub const ETH_FCS_LEN: ::c_int = 4; -pub const ETH_MIN_MTU: ::c_int = 68; -pub const ETH_MAX_MTU: ::c_int = 0xFFFF; -pub const ETH_P_LOOP: ::c_int = 0x0060; -pub const ETH_P_PUP: ::c_int = 0x0200; -pub const ETH_P_PUPAT: ::c_int = 0x0201; -pub const ETH_P_TSN: ::c_int = 0x22F0; -pub const ETH_P_IP: ::c_int = 0x0800; -pub const ETH_P_X25: ::c_int = 0x0805; -pub const ETH_P_ARP: ::c_int = 0x0806; -pub const ETH_P_BPQ: ::c_int = 0x08FF; -pub const ETH_P_IEEEPUP: ::c_int = 0x0a00; -pub const ETH_P_IEEEPUPAT: ::c_int = 0x0a01; -pub const ETH_P_BATMAN: ::c_int = 0x4305; -pub const ETH_P_DEC: ::c_int = 0x6000; -pub const ETH_P_DNA_DL: ::c_int = 0x6001; -pub const ETH_P_DNA_RC: ::c_int = 0x6002; -pub const ETH_P_DNA_RT: ::c_int = 0x6003; -pub const ETH_P_LAT: ::c_int = 0x6004; -pub const ETH_P_DIAG: ::c_int = 0x6005; -pub const ETH_P_CUST: ::c_int = 0x6006; -pub const ETH_P_SCA: ::c_int = 0x6007; -pub const ETH_P_TEB: ::c_int = 0x6558; -pub const ETH_P_RARP: ::c_int = 0x8035; -pub const ETH_P_ATALK: ::c_int = 0x809B; -pub const ETH_P_AARP: ::c_int = 0x80F3; -pub const ETH_P_8021Q: ::c_int = 0x8100; -/* see rust-lang/libc#924 pub const ETH_P_ERSPAN: ::c_int = 0x88BE;*/ -pub const ETH_P_IPX: ::c_int = 0x8137; -pub const ETH_P_IPV6: ::c_int = 0x86DD; -pub const ETH_P_PAUSE: ::c_int = 0x8808; -pub const ETH_P_SLOW: ::c_int = 0x8809; -pub const ETH_P_WCCP: ::c_int = 0x883E; -pub const ETH_P_MPLS_UC: ::c_int = 0x8847; -pub const ETH_P_MPLS_MC: ::c_int = 0x8848; -pub const ETH_P_ATMMPOA: ::c_int = 0x884c; -pub const ETH_P_PPP_DISC: ::c_int = 0x8863; -pub const ETH_P_PPP_SES: ::c_int = 0x8864; -pub const ETH_P_LINK_CTL: ::c_int = 0x886c; -pub const ETH_P_ATMFATE: ::c_int = 0x8884; -pub const ETH_P_PAE: ::c_int = 0x888E; -pub const ETH_P_AOE: ::c_int = 0x88A2; -pub const ETH_P_8021AD: ::c_int = 0x88A8; -pub const ETH_P_802_EX1: ::c_int = 0x88B5; -pub const ETH_P_TIPC: ::c_int = 0x88CA; -pub const ETH_P_MACSEC: ::c_int = 0x88E5; -pub const ETH_P_8021AH: ::c_int = 0x88E7; -pub const ETH_P_MVRP: ::c_int = 0x88F5; -pub const ETH_P_1588: ::c_int = 0x88F7; -pub const ETH_P_NCSI: ::c_int = 0x88F8; -pub const ETH_P_PRP: ::c_int = 0x88FB; -pub const ETH_P_FCOE: ::c_int = 0x8906; -/* see rust-lang/libc#924 pub const ETH_P_IBOE: ::c_int = 0x8915;*/ -pub const ETH_P_TDLS: ::c_int = 0x890D; -pub const ETH_P_FIP: ::c_int = 0x8914; -pub const ETH_P_80221: ::c_int = 0x8917; -pub const ETH_P_HSR: ::c_int = 0x892F; -/* see rust-lang/libc#924 pub const ETH_P_NSH: ::c_int = 0x894F;*/ -pub const ETH_P_LOOPBACK: ::c_int = 0x9000; -pub const ETH_P_QINQ1: ::c_int = 0x9100; -pub const ETH_P_QINQ2: ::c_int = 0x9200; -pub const ETH_P_QINQ3: ::c_int = 0x9300; -pub const ETH_P_EDSA: ::c_int = 0xDADA; -/* see rust-lang/libc#924 pub const ETH_P_IFE: ::c_int = 0xED3E;*/ -pub const ETH_P_AF_IUCV: ::c_int = 0xFBFB; -pub const ETH_P_802_3_MIN: ::c_int = 0x0600; -pub const ETH_P_802_3: ::c_int = 0x0001; -pub const ETH_P_AX25: ::c_int = 0x0002; -pub const ETH_P_ALL: ::c_int = 0x0003; -pub const ETH_P_802_2: ::c_int = 0x0004; -pub const ETH_P_SNAP: ::c_int = 0x0005; -pub const ETH_P_DDCMP: ::c_int = 0x0006; -pub const ETH_P_WAN_PPP: ::c_int = 0x0007; -pub const ETH_P_PPP_MP: ::c_int = 0x0008; -pub const ETH_P_LOCALTALK: ::c_int = 0x0009; -pub const ETH_P_CAN: ::c_int = 0x000C; -pub const ETH_P_CANFD: ::c_int = 0x000D; -pub const ETH_P_PPPTALK: ::c_int = 0x0010; -pub const ETH_P_TR_802_2: ::c_int = 0x0011; -pub const ETH_P_MOBITEX: ::c_int = 0x0015; -pub const ETH_P_CONTROL: ::c_int = 0x0016; -pub const ETH_P_IRDA: ::c_int = 0x0017; -pub const ETH_P_ECONET: ::c_int = 0x0018; -pub const ETH_P_HDLC: ::c_int = 0x0019; -pub const ETH_P_ARCNET: ::c_int = 0x001A; -pub const ETH_P_DSA: ::c_int = 0x001B; -pub const ETH_P_TRAILER: ::c_int = 0x001C; -pub const ETH_P_PHONET: ::c_int = 0x00F5; -pub const ETH_P_IEEE802154: ::c_int = 0x00F6; -pub const ETH_P_CAIF: ::c_int = 0x00F7; -pub const ETH_P_XDSA: ::c_int = 0x00F8; -/* see rust-lang/libc#924 pub const ETH_P_MAP: ::c_int = 0x00F9;*/ +pub const ETH_ALEN: c_int = 6; +pub const ETH_HLEN: c_int = 14; +pub const ETH_ZLEN: c_int = 60; +pub const ETH_DATA_LEN: c_int = 1500; +pub const ETH_FRAME_LEN: c_int = 1514; +pub const ETH_FCS_LEN: c_int = 4; +pub const ETH_MIN_MTU: c_int = 68; +pub const ETH_MAX_MTU: c_int = 0xFFFF; +pub const ETH_P_LOOP: c_int = 0x0060; +pub const ETH_P_PUP: c_int = 0x0200; +pub const ETH_P_PUPAT: c_int = 0x0201; +pub const ETH_P_TSN: c_int = 0x22F0; +pub const ETH_P_IP: c_int = 0x0800; +pub const ETH_P_X25: c_int = 0x0805; +pub const ETH_P_ARP: c_int = 0x0806; +pub const ETH_P_BPQ: c_int = 0x08FF; +pub const ETH_P_IEEEPUP: c_int = 0x0a00; +pub const ETH_P_IEEEPUPAT: c_int = 0x0a01; +pub const ETH_P_BATMAN: c_int = 0x4305; +pub const ETH_P_DEC: c_int = 0x6000; +pub const ETH_P_DNA_DL: c_int = 0x6001; +pub const ETH_P_DNA_RC: c_int = 0x6002; +pub const ETH_P_DNA_RT: c_int = 0x6003; +pub const ETH_P_LAT: c_int = 0x6004; +pub const ETH_P_DIAG: c_int = 0x6005; +pub const ETH_P_CUST: c_int = 0x6006; +pub const ETH_P_SCA: c_int = 0x6007; +pub const ETH_P_TEB: c_int = 0x6558; +pub const ETH_P_RARP: c_int = 0x8035; +pub const ETH_P_ATALK: c_int = 0x809B; +pub const ETH_P_AARP: c_int = 0x80F3; +pub const ETH_P_8021Q: c_int = 0x8100; +/* see rust-lang/libc#924 pub const ETH_P_ERSPAN: c_int = 0x88BE;*/ +pub const ETH_P_IPX: c_int = 0x8137; +pub const ETH_P_IPV6: c_int = 0x86DD; +pub const ETH_P_PAUSE: c_int = 0x8808; +pub const ETH_P_SLOW: c_int = 0x8809; +pub const ETH_P_WCCP: c_int = 0x883E; +pub const ETH_P_MPLS_UC: c_int = 0x8847; +pub const ETH_P_MPLS_MC: c_int = 0x8848; +pub const ETH_P_ATMMPOA: c_int = 0x884c; +pub const ETH_P_PPP_DISC: c_int = 0x8863; +pub const ETH_P_PPP_SES: c_int = 0x8864; +pub const ETH_P_LINK_CTL: c_int = 0x886c; +pub const ETH_P_ATMFATE: c_int = 0x8884; +pub const ETH_P_PAE: c_int = 0x888E; +pub const ETH_P_AOE: c_int = 0x88A2; +pub const ETH_P_8021AD: c_int = 0x88A8; +pub const ETH_P_802_EX1: c_int = 0x88B5; +pub const ETH_P_TIPC: c_int = 0x88CA; +pub const ETH_P_MACSEC: c_int = 0x88E5; +pub const ETH_P_8021AH: c_int = 0x88E7; +pub const ETH_P_MVRP: c_int = 0x88F5; +pub const ETH_P_1588: c_int = 0x88F7; +pub const ETH_P_NCSI: c_int = 0x88F8; +pub const ETH_P_PRP: c_int = 0x88FB; +pub const ETH_P_FCOE: c_int = 0x8906; +/* see rust-lang/libc#924 pub const ETH_P_IBOE: c_int = 0x8915;*/ +pub const ETH_P_TDLS: c_int = 0x890D; +pub const ETH_P_FIP: c_int = 0x8914; +pub const ETH_P_80221: c_int = 0x8917; +pub const ETH_P_HSR: c_int = 0x892F; +/* see rust-lang/libc#924 pub const ETH_P_NSH: c_int = 0x894F;*/ +pub const ETH_P_LOOPBACK: c_int = 0x9000; +pub const ETH_P_QINQ1: c_int = 0x9100; +pub const ETH_P_QINQ2: c_int = 0x9200; +pub const ETH_P_QINQ3: c_int = 0x9300; +pub const ETH_P_EDSA: c_int = 0xDADA; +/* see rust-lang/libc#924 pub const ETH_P_IFE: c_int = 0xED3E;*/ +pub const ETH_P_AF_IUCV: c_int = 0xFBFB; +pub const ETH_P_802_3_MIN: c_int = 0x0600; +pub const ETH_P_802_3: c_int = 0x0001; +pub const ETH_P_AX25: c_int = 0x0002; +pub const ETH_P_ALL: c_int = 0x0003; +pub const ETH_P_802_2: c_int = 0x0004; +pub const ETH_P_SNAP: c_int = 0x0005; +pub const ETH_P_DDCMP: c_int = 0x0006; +pub const ETH_P_WAN_PPP: c_int = 0x0007; +pub const ETH_P_PPP_MP: c_int = 0x0008; +pub const ETH_P_LOCALTALK: c_int = 0x0009; +pub const ETH_P_CAN: c_int = 0x000C; +pub const ETH_P_CANFD: c_int = 0x000D; +pub const ETH_P_PPPTALK: c_int = 0x0010; +pub const ETH_P_TR_802_2: c_int = 0x0011; +pub const ETH_P_MOBITEX: c_int = 0x0015; +pub const ETH_P_CONTROL: c_int = 0x0016; +pub const ETH_P_IRDA: c_int = 0x0017; +pub const ETH_P_ECONET: c_int = 0x0018; +pub const ETH_P_HDLC: c_int = 0x0019; +pub const ETH_P_ARCNET: c_int = 0x001A; +pub const ETH_P_DSA: c_int = 0x001B; +pub const ETH_P_TRAILER: c_int = 0x001C; +pub const ETH_P_PHONET: c_int = 0x00F5; +pub const ETH_P_IEEE802154: c_int = 0x00F6; +pub const ETH_P_CAIF: c_int = 0x00F7; +pub const ETH_P_XDSA: c_int = 0x00F8; +/* see rust-lang/libc#924 pub const ETH_P_MAP: c_int = 0x00F9;*/ // end android/platform/bionic/libc/kernel/uapi/linux/if_ether.h // start android/platform/bionic/libc/kernel/uapi/linux/neighbour.h -pub const NDA_UNSPEC: ::c_ushort = 0; -pub const NDA_DST: ::c_ushort = 1; -pub const NDA_LLADDR: ::c_ushort = 2; -pub const NDA_CACHEINFO: ::c_ushort = 3; -pub const NDA_PROBES: ::c_ushort = 4; -pub const NDA_VLAN: ::c_ushort = 5; -pub const NDA_PORT: ::c_ushort = 6; -pub const NDA_VNI: ::c_ushort = 7; -pub const NDA_IFINDEX: ::c_ushort = 8; -pub const NDA_MASTER: ::c_ushort = 9; -pub const NDA_LINK_NETNSID: ::c_ushort = 10; -pub const NDA_SRC_VNI: ::c_ushort = 11; -pub const NDA_PROTOCOL: ::c_ushort = 12; -pub const NDA_NH_ID: ::c_ushort = 13; -pub const NDA_FDB_EXT_ATTRS: ::c_ushort = 14; -pub const NDA_FLAGS_EXT: ::c_ushort = 15; -pub const NDA_NDM_STATE_MASK: ::c_ushort = 16; -pub const NDA_NDM_FLAGS_MASK: ::c_ushort = 17; +pub const NDA_UNSPEC: c_ushort = 0; +pub const NDA_DST: c_ushort = 1; +pub const NDA_LLADDR: c_ushort = 2; +pub const NDA_CACHEINFO: c_ushort = 3; +pub const NDA_PROBES: c_ushort = 4; +pub const NDA_VLAN: c_ushort = 5; +pub const NDA_PORT: c_ushort = 6; +pub const NDA_VNI: c_ushort = 7; +pub const NDA_IFINDEX: c_ushort = 8; +pub const NDA_MASTER: c_ushort = 9; +pub const NDA_LINK_NETNSID: c_ushort = 10; +pub const NDA_SRC_VNI: c_ushort = 11; +pub const NDA_PROTOCOL: c_ushort = 12; +pub const NDA_NH_ID: c_ushort = 13; +pub const NDA_FDB_EXT_ATTRS: c_ushort = 14; +pub const NDA_FLAGS_EXT: c_ushort = 15; +pub const NDA_NDM_STATE_MASK: c_ushort = 16; +pub const NDA_NDM_FLAGS_MASK: c_ushort = 17; pub const NTF_USE: u8 = 0x01; pub const NTF_SELF: u8 = 0x02; @@ -2789,169 +2793,169 @@ pub const NUD_FAILED: u16 = 0x20; pub const NUD_NOARP: u16 = 0x40; pub const NUD_PERMANENT: u16 = 0x80; -pub const NDTPA_UNSPEC: ::c_ushort = 0; -pub const NDTPA_IFINDEX: ::c_ushort = 1; -pub const NDTPA_REFCNT: ::c_ushort = 2; -pub const NDTPA_REACHABLE_TIME: ::c_ushort = 3; -pub const NDTPA_BASE_REACHABLE_TIME: ::c_ushort = 4; -pub const NDTPA_RETRANS_TIME: ::c_ushort = 5; -pub const NDTPA_GC_STALETIME: ::c_ushort = 6; -pub const NDTPA_DELAY_PROBE_TIME: ::c_ushort = 7; -pub const NDTPA_QUEUE_LEN: ::c_ushort = 8; -pub const NDTPA_APP_PROBES: ::c_ushort = 9; -pub const NDTPA_UCAST_PROBES: ::c_ushort = 10; -pub const NDTPA_MCAST_PROBES: ::c_ushort = 11; -pub const NDTPA_ANYCAST_DELAY: ::c_ushort = 12; -pub const NDTPA_PROXY_DELAY: ::c_ushort = 13; -pub const NDTPA_PROXY_QLEN: ::c_ushort = 14; -pub const NDTPA_LOCKTIME: ::c_ushort = 15; -pub const NDTPA_QUEUE_LENBYTES: ::c_ushort = 16; -pub const NDTPA_MCAST_REPROBES: ::c_ushort = 17; -pub const NDTPA_PAD: ::c_ushort = 18; -pub const NDTPA_INTERVAL_PROBE_TIME_MS: ::c_ushort = 19; - -pub const NDTA_UNSPEC: ::c_ushort = 0; -pub const NDTA_NAME: ::c_ushort = 1; -pub const NDTA_THRESH1: ::c_ushort = 2; -pub const NDTA_THRESH2: ::c_ushort = 3; -pub const NDTA_THRESH3: ::c_ushort = 4; -pub const NDTA_CONFIG: ::c_ushort = 5; -pub const NDTA_PARMS: ::c_ushort = 6; -pub const NDTA_STATS: ::c_ushort = 7; -pub const NDTA_GC_INTERVAL: ::c_ushort = 8; -pub const NDTA_PAD: ::c_ushort = 9; +pub const NDTPA_UNSPEC: c_ushort = 0; +pub const NDTPA_IFINDEX: c_ushort = 1; +pub const NDTPA_REFCNT: c_ushort = 2; +pub const NDTPA_REACHABLE_TIME: c_ushort = 3; +pub const NDTPA_BASE_REACHABLE_TIME: c_ushort = 4; +pub const NDTPA_RETRANS_TIME: c_ushort = 5; +pub const NDTPA_GC_STALETIME: c_ushort = 6; +pub const NDTPA_DELAY_PROBE_TIME: c_ushort = 7; +pub const NDTPA_QUEUE_LEN: c_ushort = 8; +pub const NDTPA_APP_PROBES: c_ushort = 9; +pub const NDTPA_UCAST_PROBES: c_ushort = 10; +pub const NDTPA_MCAST_PROBES: c_ushort = 11; +pub const NDTPA_ANYCAST_DELAY: c_ushort = 12; +pub const NDTPA_PROXY_DELAY: c_ushort = 13; +pub const NDTPA_PROXY_QLEN: c_ushort = 14; +pub const NDTPA_LOCKTIME: c_ushort = 15; +pub const NDTPA_QUEUE_LENBYTES: c_ushort = 16; +pub const NDTPA_MCAST_REPROBES: c_ushort = 17; +pub const NDTPA_PAD: c_ushort = 18; +pub const NDTPA_INTERVAL_PROBE_TIME_MS: c_ushort = 19; + +pub const NDTA_UNSPEC: c_ushort = 0; +pub const NDTA_NAME: c_ushort = 1; +pub const NDTA_THRESH1: c_ushort = 2; +pub const NDTA_THRESH2: c_ushort = 3; +pub const NDTA_THRESH3: c_ushort = 4; +pub const NDTA_CONFIG: c_ushort = 5; +pub const NDTA_PARMS: c_ushort = 6; +pub const NDTA_STATS: c_ushort = 7; +pub const NDTA_GC_INTERVAL: c_ushort = 8; +pub const NDTA_PAD: c_ushort = 9; pub const FDB_NOTIFY_BIT: u16 = 0x01; pub const FDB_NOTIFY_INACTIVE_BIT: u16 = 0x02; -pub const NFEA_UNSPEC: ::c_ushort = 0; -pub const NFEA_ACTIVITY_NOTIFY: ::c_ushort = 1; -pub const NFEA_DONT_REFRESH: ::c_ushort = 2; +pub const NFEA_UNSPEC: c_ushort = 0; +pub const NFEA_ACTIVITY_NOTIFY: c_ushort = 1; +pub const NFEA_DONT_REFRESH: c_ushort = 2; // end android/platform/bionic/libc/kernel/uapi/linux/neighbour.h -pub const SIOCADDRT: ::c_ulong = 0x0000890B; -pub const SIOCDELRT: ::c_ulong = 0x0000890C; -pub const SIOCRTMSG: ::c_ulong = 0x0000890D; -pub const SIOCGIFNAME: ::c_ulong = 0x00008910; -pub const SIOCSIFLINK: ::c_ulong = 0x00008911; -pub const SIOCGIFCONF: ::c_ulong = 0x00008912; -pub const SIOCGIFFLAGS: ::c_ulong = 0x00008913; -pub const SIOCSIFFLAGS: ::c_ulong = 0x00008914; -pub const SIOCGIFADDR: ::c_ulong = 0x00008915; -pub const SIOCSIFADDR: ::c_ulong = 0x00008916; -pub const SIOCGIFDSTADDR: ::c_ulong = 0x00008917; -pub const SIOCSIFDSTADDR: ::c_ulong = 0x00008918; -pub const SIOCGIFBRDADDR: ::c_ulong = 0x00008919; -pub const SIOCSIFBRDADDR: ::c_ulong = 0x0000891A; -pub const SIOCGIFNETMASK: ::c_ulong = 0x0000891B; -pub const SIOCSIFNETMASK: ::c_ulong = 0x0000891C; -pub const SIOCGIFMETRIC: ::c_ulong = 0x0000891D; -pub const SIOCSIFMETRIC: ::c_ulong = 0x0000891E; -pub const SIOCGIFMEM: ::c_ulong = 0x0000891F; -pub const SIOCSIFMEM: ::c_ulong = 0x00008920; -pub const SIOCGIFMTU: ::c_ulong = 0x00008921; -pub const SIOCSIFMTU: ::c_ulong = 0x00008922; -pub const SIOCSIFNAME: ::c_ulong = 0x00008923; -pub const SIOCSIFHWADDR: ::c_ulong = 0x00008924; -pub const SIOCGIFENCAP: ::c_ulong = 0x00008925; -pub const SIOCSIFENCAP: ::c_ulong = 0x00008926; -pub const SIOCGIFHWADDR: ::c_ulong = 0x00008927; -pub const SIOCGIFSLAVE: ::c_ulong = 0x00008929; -pub const SIOCSIFSLAVE: ::c_ulong = 0x00008930; -pub const SIOCADDMULTI: ::c_ulong = 0x00008931; -pub const SIOCDELMULTI: ::c_ulong = 0x00008932; -pub const SIOCGIFINDEX: ::c_ulong = 0x00008933; -pub const SIOGIFINDEX: ::c_ulong = SIOCGIFINDEX; -pub const SIOCSIFPFLAGS: ::c_ulong = 0x00008934; -pub const SIOCGIFPFLAGS: ::c_ulong = 0x00008935; -pub const SIOCDIFADDR: ::c_ulong = 0x00008936; -pub const SIOCSIFHWBROADCAST: ::c_ulong = 0x00008937; -pub const SIOCGIFCOUNT: ::c_ulong = 0x00008938; -pub const SIOCGIFBR: ::c_ulong = 0x00008940; -pub const SIOCSIFBR: ::c_ulong = 0x00008941; -pub const SIOCGIFTXQLEN: ::c_ulong = 0x00008942; -pub const SIOCSIFTXQLEN: ::c_ulong = 0x00008943; -pub const SIOCETHTOOL: ::c_ulong = 0x00008946; -pub const SIOCGMIIPHY: ::c_ulong = 0x00008947; -pub const SIOCGMIIREG: ::c_ulong = 0x00008948; -pub const SIOCSMIIREG: ::c_ulong = 0x00008949; -pub const SIOCWANDEV: ::c_ulong = 0x0000894A; -pub const SIOCOUTQNSD: ::c_ulong = 0x0000894B; -pub const SIOCGSKNS: ::c_ulong = 0x0000894C; -pub const SIOCDARP: ::c_ulong = 0x00008953; -pub const SIOCGARP: ::c_ulong = 0x00008954; -pub const SIOCSARP: ::c_ulong = 0x00008955; -pub const SIOCDRARP: ::c_ulong = 0x00008960; -pub const SIOCGRARP: ::c_ulong = 0x00008961; -pub const SIOCSRARP: ::c_ulong = 0x00008962; -pub const SIOCGIFMAP: ::c_ulong = 0x00008970; -pub const SIOCSIFMAP: ::c_ulong = 0x00008971; -pub const SIOCADDDLCI: ::c_ulong = 0x00008980; -pub const SIOCDELDLCI: ::c_ulong = 0x00008981; -pub const SIOCGIFVLAN: ::c_ulong = 0x00008982; -pub const SIOCSIFVLAN: ::c_ulong = 0x00008983; -pub const SIOCBONDENSLAVE: ::c_ulong = 0x00008990; -pub const SIOCBONDRELEASE: ::c_ulong = 0x00008991; -pub const SIOCBONDSETHWADDR: ::c_ulong = 0x00008992; -pub const SIOCBONDSLAVEINFOQUERY: ::c_ulong = 0x00008993; -pub const SIOCBONDINFOQUERY: ::c_ulong = 0x00008994; -pub const SIOCBONDCHANGEACTIVE: ::c_ulong = 0x00008995; -pub const SIOCBRADDBR: ::c_ulong = 0x000089a0; -pub const SIOCBRDELBR: ::c_ulong = 0x000089a1; -pub const SIOCBRADDIF: ::c_ulong = 0x000089a2; -pub const SIOCBRDELIF: ::c_ulong = 0x000089a3; -pub const SIOCSHWTSTAMP: ::c_ulong = 0x000089b0; -pub const SIOCGHWTSTAMP: ::c_ulong = 0x000089b1; -pub const SIOCDEVPRIVATE: ::c_ulong = 0x000089F0; -pub const SIOCPROTOPRIVATE: ::c_ulong = 0x000089E0; +pub const SIOCADDRT: c_ulong = 0x0000890B; +pub const SIOCDELRT: c_ulong = 0x0000890C; +pub const SIOCRTMSG: c_ulong = 0x0000890D; +pub const SIOCGIFNAME: c_ulong = 0x00008910; +pub const SIOCSIFLINK: c_ulong = 0x00008911; +pub const SIOCGIFCONF: c_ulong = 0x00008912; +pub const SIOCGIFFLAGS: c_ulong = 0x00008913; +pub const SIOCSIFFLAGS: c_ulong = 0x00008914; +pub const SIOCGIFADDR: c_ulong = 0x00008915; +pub const SIOCSIFADDR: c_ulong = 0x00008916; +pub const SIOCGIFDSTADDR: c_ulong = 0x00008917; +pub const SIOCSIFDSTADDR: c_ulong = 0x00008918; +pub const SIOCGIFBRDADDR: c_ulong = 0x00008919; +pub const SIOCSIFBRDADDR: c_ulong = 0x0000891A; +pub const SIOCGIFNETMASK: c_ulong = 0x0000891B; +pub const SIOCSIFNETMASK: c_ulong = 0x0000891C; +pub const SIOCGIFMETRIC: c_ulong = 0x0000891D; +pub const SIOCSIFMETRIC: c_ulong = 0x0000891E; +pub const SIOCGIFMEM: c_ulong = 0x0000891F; +pub const SIOCSIFMEM: c_ulong = 0x00008920; +pub const SIOCGIFMTU: c_ulong = 0x00008921; +pub const SIOCSIFMTU: c_ulong = 0x00008922; +pub const SIOCSIFNAME: c_ulong = 0x00008923; +pub const SIOCSIFHWADDR: c_ulong = 0x00008924; +pub const SIOCGIFENCAP: c_ulong = 0x00008925; +pub const SIOCSIFENCAP: c_ulong = 0x00008926; +pub const SIOCGIFHWADDR: c_ulong = 0x00008927; +pub const SIOCGIFSLAVE: c_ulong = 0x00008929; +pub const SIOCSIFSLAVE: c_ulong = 0x00008930; +pub const SIOCADDMULTI: c_ulong = 0x00008931; +pub const SIOCDELMULTI: c_ulong = 0x00008932; +pub const SIOCGIFINDEX: c_ulong = 0x00008933; +pub const SIOGIFINDEX: c_ulong = SIOCGIFINDEX; +pub const SIOCSIFPFLAGS: c_ulong = 0x00008934; +pub const SIOCGIFPFLAGS: c_ulong = 0x00008935; +pub const SIOCDIFADDR: c_ulong = 0x00008936; +pub const SIOCSIFHWBROADCAST: c_ulong = 0x00008937; +pub const SIOCGIFCOUNT: c_ulong = 0x00008938; +pub const SIOCGIFBR: c_ulong = 0x00008940; +pub const SIOCSIFBR: c_ulong = 0x00008941; +pub const SIOCGIFTXQLEN: c_ulong = 0x00008942; +pub const SIOCSIFTXQLEN: c_ulong = 0x00008943; +pub const SIOCETHTOOL: c_ulong = 0x00008946; +pub const SIOCGMIIPHY: c_ulong = 0x00008947; +pub const SIOCGMIIREG: c_ulong = 0x00008948; +pub const SIOCSMIIREG: c_ulong = 0x00008949; +pub const SIOCWANDEV: c_ulong = 0x0000894A; +pub const SIOCOUTQNSD: c_ulong = 0x0000894B; +pub const SIOCGSKNS: c_ulong = 0x0000894C; +pub const SIOCDARP: c_ulong = 0x00008953; +pub const SIOCGARP: c_ulong = 0x00008954; +pub const SIOCSARP: c_ulong = 0x00008955; +pub const SIOCDRARP: c_ulong = 0x00008960; +pub const SIOCGRARP: c_ulong = 0x00008961; +pub const SIOCSRARP: c_ulong = 0x00008962; +pub const SIOCGIFMAP: c_ulong = 0x00008970; +pub const SIOCSIFMAP: c_ulong = 0x00008971; +pub const SIOCADDDLCI: c_ulong = 0x00008980; +pub const SIOCDELDLCI: c_ulong = 0x00008981; +pub const SIOCGIFVLAN: c_ulong = 0x00008982; +pub const SIOCSIFVLAN: c_ulong = 0x00008983; +pub const SIOCBONDENSLAVE: c_ulong = 0x00008990; +pub const SIOCBONDRELEASE: c_ulong = 0x00008991; +pub const SIOCBONDSETHWADDR: c_ulong = 0x00008992; +pub const SIOCBONDSLAVEINFOQUERY: c_ulong = 0x00008993; +pub const SIOCBONDINFOQUERY: c_ulong = 0x00008994; +pub const SIOCBONDCHANGEACTIVE: c_ulong = 0x00008995; +pub const SIOCBRADDBR: c_ulong = 0x000089a0; +pub const SIOCBRDELBR: c_ulong = 0x000089a1; +pub const SIOCBRADDIF: c_ulong = 0x000089a2; +pub const SIOCBRDELIF: c_ulong = 0x000089a3; +pub const SIOCSHWTSTAMP: c_ulong = 0x000089b0; +pub const SIOCGHWTSTAMP: c_ulong = 0x000089b1; +pub const SIOCDEVPRIVATE: c_ulong = 0x000089F0; +pub const SIOCPROTOPRIVATE: c_ulong = 0x000089E0; // linux/module.h -pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001; -pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002; +pub const MODULE_INIT_IGNORE_MODVERSIONS: c_uint = 0x0001; +pub const MODULE_INIT_IGNORE_VERMAGIC: c_uint = 0x0002; // linux/net_tstamp.h -pub const SOF_TIMESTAMPING_TX_HARDWARE: ::c_uint = 1 << 0; -pub const SOF_TIMESTAMPING_TX_SOFTWARE: ::c_uint = 1 << 1; -pub const SOF_TIMESTAMPING_RX_HARDWARE: ::c_uint = 1 << 2; -pub const SOF_TIMESTAMPING_RX_SOFTWARE: ::c_uint = 1 << 3; -pub const SOF_TIMESTAMPING_SOFTWARE: ::c_uint = 1 << 4; -pub const SOF_TIMESTAMPING_SYS_HARDWARE: ::c_uint = 1 << 5; -pub const SOF_TIMESTAMPING_RAW_HARDWARE: ::c_uint = 1 << 6; -pub const SOF_TIMESTAMPING_OPT_ID: ::c_uint = 1 << 7; -pub const SOF_TIMESTAMPING_TX_SCHED: ::c_uint = 1 << 8; -pub const SOF_TIMESTAMPING_TX_ACK: ::c_uint = 1 << 9; -pub const SOF_TIMESTAMPING_OPT_CMSG: ::c_uint = 1 << 10; -pub const SOF_TIMESTAMPING_OPT_TSONLY: ::c_uint = 1 << 11; -pub const SOF_TIMESTAMPING_OPT_STATS: ::c_uint = 1 << 12; -pub const SOF_TIMESTAMPING_OPT_PKTINFO: ::c_uint = 1 << 13; -pub const SOF_TIMESTAMPING_OPT_TX_SWHW: ::c_uint = 1 << 14; +pub const SOF_TIMESTAMPING_TX_HARDWARE: c_uint = 1 << 0; +pub const SOF_TIMESTAMPING_TX_SOFTWARE: c_uint = 1 << 1; +pub const SOF_TIMESTAMPING_RX_HARDWARE: c_uint = 1 << 2; +pub const SOF_TIMESTAMPING_RX_SOFTWARE: c_uint = 1 << 3; +pub const SOF_TIMESTAMPING_SOFTWARE: c_uint = 1 << 4; +pub const SOF_TIMESTAMPING_SYS_HARDWARE: c_uint = 1 << 5; +pub const SOF_TIMESTAMPING_RAW_HARDWARE: c_uint = 1 << 6; +pub const SOF_TIMESTAMPING_OPT_ID: c_uint = 1 << 7; +pub const SOF_TIMESTAMPING_TX_SCHED: c_uint = 1 << 8; +pub const SOF_TIMESTAMPING_TX_ACK: c_uint = 1 << 9; +pub const SOF_TIMESTAMPING_OPT_CMSG: c_uint = 1 << 10; +pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11; +pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12; +pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13; +pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14; #[deprecated( since = "0.2.55", note = "ENOATTR is not available on Android; use ENODATA instead" )] -pub const ENOATTR: ::c_int = ::ENODATA; +pub const ENOATTR: c_int = crate::ENODATA; // linux/if_alg.h -pub const ALG_SET_KEY: ::c_int = 1; -pub const ALG_SET_IV: ::c_int = 2; -pub const ALG_SET_OP: ::c_int = 3; -pub const ALG_SET_AEAD_ASSOCLEN: ::c_int = 4; -pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5; -pub const ALG_SET_DRBG_ENTROPY: ::c_int = 6; +pub const ALG_SET_KEY: c_int = 1; +pub const ALG_SET_IV: c_int = 2; +pub const ALG_SET_OP: c_int = 3; +pub const ALG_SET_AEAD_ASSOCLEN: c_int = 4; +pub const ALG_SET_AEAD_AUTHSIZE: c_int = 5; +pub const ALG_SET_DRBG_ENTROPY: c_int = 6; -pub const ALG_OP_DECRYPT: ::c_int = 0; -pub const ALG_OP_ENCRYPT: ::c_int = 1; +pub const ALG_OP_DECRYPT: c_int = 0; +pub const ALG_OP_ENCRYPT: c_int = 1; // sys/mman.h -pub const MLOCK_ONFAULT: ::c_int = 0x01; +pub const MLOCK_ONFAULT: c_int = 0x01; // uapi/linux/vm_sockets.h -pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF; -pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0; -pub const VMADDR_CID_LOCAL: ::c_uint = 1; -pub const VMADDR_CID_HOST: ::c_uint = 2; -pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_ANY: c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_HYPERVISOR: c_uint = 0; +pub const VMADDR_CID_LOCAL: c_uint = 1; +pub const VMADDR_CID_HOST: c_uint = 2; +pub const VMADDR_PORT_ANY: c_uint = 0xFFFFFFFF; // uapi/linux/inotify.h pub const IN_ACCESS: u32 = 0x0000_0001; @@ -2993,27 +2997,27 @@ pub const IN_ALL_EVENTS: u32 = IN_ACCESS | IN_DELETE_SELF | IN_MOVE_SELF; -pub const IN_CLOEXEC: ::c_int = O_CLOEXEC; -pub const IN_NONBLOCK: ::c_int = O_NONBLOCK; - -pub const FUTEX_WAIT: ::c_int = 0; -pub const FUTEX_WAKE: ::c_int = 1; -pub const FUTEX_FD: ::c_int = 2; -pub const FUTEX_REQUEUE: ::c_int = 3; -pub const FUTEX_CMP_REQUEUE: ::c_int = 4; -pub const FUTEX_WAKE_OP: ::c_int = 5; -pub const FUTEX_LOCK_PI: ::c_int = 6; -pub const FUTEX_UNLOCK_PI: ::c_int = 7; -pub const FUTEX_TRYLOCK_PI: ::c_int = 8; -pub const FUTEX_WAIT_BITSET: ::c_int = 9; -pub const FUTEX_WAKE_BITSET: ::c_int = 10; -pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11; -pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12; -pub const FUTEX_LOCK_PI2: ::c_int = 13; - -pub const FUTEX_PRIVATE_FLAG: ::c_int = 128; -pub const FUTEX_CLOCK_REALTIME: ::c_int = 256; -pub const FUTEX_CMD_MASK: ::c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); +pub const IN_CLOEXEC: c_int = O_CLOEXEC; +pub const IN_NONBLOCK: c_int = O_NONBLOCK; + +pub const FUTEX_WAIT: c_int = 0; +pub const FUTEX_WAKE: c_int = 1; +pub const FUTEX_FD: c_int = 2; +pub const FUTEX_REQUEUE: c_int = 3; +pub const FUTEX_CMP_REQUEUE: c_int = 4; +pub const FUTEX_WAKE_OP: c_int = 5; +pub const FUTEX_LOCK_PI: c_int = 6; +pub const FUTEX_UNLOCK_PI: c_int = 7; +pub const FUTEX_TRYLOCK_PI: c_int = 8; +pub const FUTEX_WAIT_BITSET: c_int = 9; +pub const FUTEX_WAKE_BITSET: c_int = 10; +pub const FUTEX_WAIT_REQUEUE_PI: c_int = 11; +pub const FUTEX_CMP_REQUEUE_PI: c_int = 12; +pub const FUTEX_LOCK_PI2: c_int = 13; + +pub const FUTEX_PRIVATE_FLAG: c_int = 128; +pub const FUTEX_CLOCK_REALTIME: c_int = 256; +pub const FUTEX_CMD_MASK: c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); // linux/errqueue.h pub const SO_EE_ORIGIN_NONE: u8 = 0; @@ -3024,125 +3028,125 @@ pub const SO_EE_ORIGIN_TXSTATUS: u8 = 4; pub const SO_EE_ORIGIN_TIMESTAMPING: u8 = SO_EE_ORIGIN_TXSTATUS; // errno.h -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EWOULDBLOCK: ::c_int = EAGAIN; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EWOULDBLOCK: c_int = EAGAIN; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; // linux/sched.h -pub const SCHED_NORMAL: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_BATCH: ::c_int = 3; -pub const SCHED_IDLE: ::c_int = 5; -pub const SCHED_DEADLINE: ::c_int = 6; +pub const SCHED_NORMAL: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; +pub const SCHED_BATCH: c_int = 3; +pub const SCHED_IDLE: c_int = 5; +pub const SCHED_DEADLINE: c_int = 6; -pub const SCHED_RESET_ON_FORK: ::c_int = 0x40000000; +pub const SCHED_RESET_ON_FORK: c_int = 0x40000000; -pub const CLONE_PIDFD: ::c_int = 0x1000; +pub const CLONE_PIDFD: c_int = 0x1000; // linux/membarrier.h -pub const MEMBARRIER_CMD_QUERY: ::c_int = 0; -pub const MEMBARRIER_CMD_GLOBAL: ::c_int = 1 << 0; -pub const MEMBARRIER_CMD_GLOBAL_EXPEDITED: ::c_int = 1 << 1; -pub const MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: ::c_int = 1 << 2; -pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED: ::c_int = 1 << 3; -pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: ::c_int = 1 << 4; -pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: ::c_int = 1 << 5; -pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: ::c_int = 1 << 6; -pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: ::c_int = 1 << 7; -pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ: ::c_int = 1 << 8; +pub const MEMBARRIER_CMD_QUERY: c_int = 0; +pub const MEMBARRIER_CMD_GLOBAL: c_int = 1 << 0; +pub const MEMBARRIER_CMD_GLOBAL_EXPEDITED: c_int = 1 << 1; +pub const MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: c_int = 1 << 2; +pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED: c_int = 1 << 3; +pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: c_int = 1 << 4; +pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: c_int = 1 << 5; +pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: c_int = 1 << 6; +pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: c_int = 1 << 7; +pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ: c_int = 1 << 8; // linux/mempolicy.h -pub const MPOL_DEFAULT: ::c_int = 0; -pub const MPOL_PREFERRED: ::c_int = 1; -pub const MPOL_BIND: ::c_int = 2; -pub const MPOL_INTERLEAVE: ::c_int = 3; -pub const MPOL_LOCAL: ::c_int = 4; -pub const MPOL_F_NUMA_BALANCING: ::c_int = 1 << 13; -pub const MPOL_F_RELATIVE_NODES: ::c_int = 1 << 14; -pub const MPOL_F_STATIC_NODES: ::c_int = 1 << 15; +pub const MPOL_DEFAULT: c_int = 0; +pub const MPOL_PREFERRED: c_int = 1; +pub const MPOL_BIND: c_int = 2; +pub const MPOL_INTERLEAVE: c_int = 3; +pub const MPOL_LOCAL: c_int = 4; +pub const MPOL_F_NUMA_BALANCING: c_int = 1 << 13; +pub const MPOL_F_RELATIVE_NODES: c_int = 1 << 14; +pub const MPOL_F_STATIC_NODES: c_int = 1 << 15; // bits/seek_constants.h -pub const SEEK_DATA: ::c_int = 3; -pub const SEEK_HOLE: ::c_int = 4; +pub const SEEK_DATA: c_int = 3; +pub const SEEK_HOLE: c_int = 4; // sys/socket.h -pub const AF_NFC: ::c_int = 39; -pub const AF_VSOCK: ::c_int = 40; -pub const PF_NFC: ::c_int = AF_NFC; -pub const PF_VSOCK: ::c_int = AF_VSOCK; +pub const AF_NFC: c_int = 39; +pub const AF_VSOCK: c_int = 40; +pub const PF_NFC: c_int = AF_NFC; +pub const PF_VSOCK: c_int = AF_VSOCK; -pub const SOMAXCONN: ::c_int = 128; +pub const SOMAXCONN: c_int = 128; // sys/prctl.h -pub const PR_SET_PDEATHSIG: ::c_int = 1; -pub const PR_GET_PDEATHSIG: ::c_int = 2; -pub const PR_GET_SECUREBITS: ::c_int = 27; -pub const PR_SET_SECUREBITS: ::c_int = 28; +pub const PR_SET_PDEATHSIG: c_int = 1; +pub const PR_GET_PDEATHSIG: c_int = 2; +pub const PR_GET_SECUREBITS: c_int = 27; +pub const PR_SET_SECUREBITS: c_int = 28; // sys/system_properties.h -pub const PROP_VALUE_MAX: ::c_int = 92; -pub const PROP_NAME_MAX: ::c_int = 32; +pub const PROP_VALUE_MAX: c_int = 92; +pub const PROP_NAME_MAX: c_int = 32; // sys/prctl.h -pub const PR_SET_VMA: ::c_int = 0x53564d41; -pub const PR_SET_VMA_ANON_NAME: ::c_int = 0; -pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38; -pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39; -pub const PR_GET_SECCOMP: ::c_int = 21; -pub const PR_SET_SECCOMP: ::c_int = 22; -pub const PR_GET_TIMING: ::c_int = 13; -pub const PR_SET_TIMING: ::c_int = 14; -pub const PR_TIMING_STATISTICAL: ::c_int = 0; -pub const PR_TIMING_TIMESTAMP: ::c_int = 1; -pub const PR_SET_NAME: ::c_int = 15; -pub const PR_GET_NAME: ::c_int = 16; +pub const PR_SET_VMA: c_int = 0x53564d41; +pub const PR_SET_VMA_ANON_NAME: c_int = 0; +pub const PR_SET_NO_NEW_PRIVS: c_int = 38; +pub const PR_GET_NO_NEW_PRIVS: c_int = 39; +pub const PR_GET_SECCOMP: c_int = 21; +pub const PR_SET_SECCOMP: c_int = 22; +pub const PR_GET_TIMING: c_int = 13; +pub const PR_SET_TIMING: c_int = 14; +pub const PR_TIMING_STATISTICAL: c_int = 0; +pub const PR_TIMING_TIMESTAMP: c_int = 1; +pub const PR_SET_NAME: c_int = 15; +pub const PR_GET_NAME: c_int = 16; // linux/if_addr.h -pub const IFA_UNSPEC: ::c_ushort = 0; -pub const IFA_ADDRESS: ::c_ushort = 1; -pub const IFA_LOCAL: ::c_ushort = 2; -pub const IFA_LABEL: ::c_ushort = 3; -pub const IFA_BROADCAST: ::c_ushort = 4; -pub const IFA_ANYCAST: ::c_ushort = 5; -pub const IFA_CACHEINFO: ::c_ushort = 6; -pub const IFA_MULTICAST: ::c_ushort = 7; +pub const IFA_UNSPEC: c_ushort = 0; +pub const IFA_ADDRESS: c_ushort = 1; +pub const IFA_LOCAL: c_ushort = 2; +pub const IFA_LABEL: c_ushort = 3; +pub const IFA_BROADCAST: c_ushort = 4; +pub const IFA_ANYCAST: c_ushort = 5; +pub const IFA_CACHEINFO: c_ushort = 6; +pub const IFA_MULTICAST: c_ushort = 7; pub const IFA_F_SECONDARY: u32 = 0x01; pub const IFA_F_TEMPORARY: u32 = 0x01; @@ -3155,90 +3159,90 @@ pub const IFA_F_TENTATIVE: u32 = 0x40; pub const IFA_F_PERMANENT: u32 = 0x80; // linux/if_link.h -pub const IFLA_UNSPEC: ::c_ushort = 0; -pub const IFLA_ADDRESS: ::c_ushort = 1; -pub const IFLA_BROADCAST: ::c_ushort = 2; -pub const IFLA_IFNAME: ::c_ushort = 3; -pub const IFLA_MTU: ::c_ushort = 4; -pub const IFLA_LINK: ::c_ushort = 5; -pub const IFLA_QDISC: ::c_ushort = 6; -pub const IFLA_STATS: ::c_ushort = 7; -pub const IFLA_COST: ::c_ushort = 8; -pub const IFLA_PRIORITY: ::c_ushort = 9; -pub const IFLA_MASTER: ::c_ushort = 10; -pub const IFLA_WIRELESS: ::c_ushort = 11; -pub const IFLA_PROTINFO: ::c_ushort = 12; -pub const IFLA_TXQLEN: ::c_ushort = 13; -pub const IFLA_MAP: ::c_ushort = 14; -pub const IFLA_WEIGHT: ::c_ushort = 15; -pub const IFLA_OPERSTATE: ::c_ushort = 16; -pub const IFLA_LINKMODE: ::c_ushort = 17; -pub const IFLA_LINKINFO: ::c_ushort = 18; -pub const IFLA_NET_NS_PID: ::c_ushort = 19; -pub const IFLA_IFALIAS: ::c_ushort = 20; -pub const IFLA_NUM_VF: ::c_ushort = 21; -pub const IFLA_VFINFO_LIST: ::c_ushort = 22; -pub const IFLA_STATS64: ::c_ushort = 23; -pub const IFLA_VF_PORTS: ::c_ushort = 24; -pub const IFLA_PORT_SELF: ::c_ushort = 25; -pub const IFLA_AF_SPEC: ::c_ushort = 26; -pub const IFLA_GROUP: ::c_ushort = 27; -pub const IFLA_NET_NS_FD: ::c_ushort = 28; -pub const IFLA_EXT_MASK: ::c_ushort = 29; -pub const IFLA_PROMISCUITY: ::c_ushort = 30; -pub const IFLA_NUM_TX_QUEUES: ::c_ushort = 31; -pub const IFLA_NUM_RX_QUEUES: ::c_ushort = 32; -pub const IFLA_CARRIER: ::c_ushort = 33; -pub const IFLA_PHYS_PORT_ID: ::c_ushort = 34; -pub const IFLA_CARRIER_CHANGES: ::c_ushort = 35; -pub const IFLA_PHYS_SWITCH_ID: ::c_ushort = 36; -pub const IFLA_LINK_NETNSID: ::c_ushort = 37; -pub const IFLA_PHYS_PORT_NAME: ::c_ushort = 38; -pub const IFLA_PROTO_DOWN: ::c_ushort = 39; -pub const IFLA_GSO_MAX_SEGS: ::c_ushort = 40; -pub const IFLA_GSO_MAX_SIZE: ::c_ushort = 41; -pub const IFLA_PAD: ::c_ushort = 42; -pub const IFLA_XDP: ::c_ushort = 43; -pub const IFLA_EVENT: ::c_ushort = 44; -pub const IFLA_NEW_NETNSID: ::c_ushort = 45; -pub const IFLA_IF_NETNSID: ::c_ushort = 46; -pub const IFLA_TARGET_NETNSID: ::c_ushort = IFLA_IF_NETNSID; -pub const IFLA_CARRIER_UP_COUNT: ::c_ushort = 47; -pub const IFLA_CARRIER_DOWN_COUNT: ::c_ushort = 48; -pub const IFLA_NEW_IFINDEX: ::c_ushort = 49; -pub const IFLA_MIN_MTU: ::c_ushort = 50; -pub const IFLA_MAX_MTU: ::c_ushort = 51; -pub const IFLA_PROP_LIST: ::c_ushort = 52; -pub const IFLA_ALT_IFNAME: ::c_ushort = 53; -pub const IFLA_PERM_ADDRESS: ::c_ushort = 54; -pub const IFLA_PROTO_DOWN_REASON: ::c_ushort = 55; -pub const IFLA_PARENT_DEV_NAME: ::c_ushort = 56; -pub const IFLA_PARENT_DEV_BUS_NAME: ::c_ushort = 57; -pub const IFLA_GRO_MAX_SIZE: ::c_ushort = 58; -pub const IFLA_TSO_MAX_SIZE: ::c_ushort = 59; -pub const IFLA_TSO_MAX_SEGS: ::c_ushort = 60; -pub const IFLA_ALLMULTI: ::c_ushort = 61; -pub const IFLA_DEVLINK_PORT: ::c_ushort = 62; -pub const IFLA_GSO_IPV4_MAX_SIZE: ::c_ushort = 63; -pub const IFLA_GRO_IPV4_MAX_SIZE: ::c_ushort = 64; - -pub const IFLA_INFO_UNSPEC: ::c_ushort = 0; -pub const IFLA_INFO_KIND: ::c_ushort = 1; -pub const IFLA_INFO_DATA: ::c_ushort = 2; -pub const IFLA_INFO_XSTATS: ::c_ushort = 3; -pub const IFLA_INFO_SLAVE_KIND: ::c_ushort = 4; -pub const IFLA_INFO_SLAVE_DATA: ::c_ushort = 5; +pub const IFLA_UNSPEC: c_ushort = 0; +pub const IFLA_ADDRESS: c_ushort = 1; +pub const IFLA_BROADCAST: c_ushort = 2; +pub const IFLA_IFNAME: c_ushort = 3; +pub const IFLA_MTU: c_ushort = 4; +pub const IFLA_LINK: c_ushort = 5; +pub const IFLA_QDISC: c_ushort = 6; +pub const IFLA_STATS: c_ushort = 7; +pub const IFLA_COST: c_ushort = 8; +pub const IFLA_PRIORITY: c_ushort = 9; +pub const IFLA_MASTER: c_ushort = 10; +pub const IFLA_WIRELESS: c_ushort = 11; +pub const IFLA_PROTINFO: c_ushort = 12; +pub const IFLA_TXQLEN: c_ushort = 13; +pub const IFLA_MAP: c_ushort = 14; +pub const IFLA_WEIGHT: c_ushort = 15; +pub const IFLA_OPERSTATE: c_ushort = 16; +pub const IFLA_LINKMODE: c_ushort = 17; +pub const IFLA_LINKINFO: c_ushort = 18; +pub const IFLA_NET_NS_PID: c_ushort = 19; +pub const IFLA_IFALIAS: c_ushort = 20; +pub const IFLA_NUM_VF: c_ushort = 21; +pub const IFLA_VFINFO_LIST: c_ushort = 22; +pub const IFLA_STATS64: c_ushort = 23; +pub const IFLA_VF_PORTS: c_ushort = 24; +pub const IFLA_PORT_SELF: c_ushort = 25; +pub const IFLA_AF_SPEC: c_ushort = 26; +pub const IFLA_GROUP: c_ushort = 27; +pub const IFLA_NET_NS_FD: c_ushort = 28; +pub const IFLA_EXT_MASK: c_ushort = 29; +pub const IFLA_PROMISCUITY: c_ushort = 30; +pub const IFLA_NUM_TX_QUEUES: c_ushort = 31; +pub const IFLA_NUM_RX_QUEUES: c_ushort = 32; +pub const IFLA_CARRIER: c_ushort = 33; +pub const IFLA_PHYS_PORT_ID: c_ushort = 34; +pub const IFLA_CARRIER_CHANGES: c_ushort = 35; +pub const IFLA_PHYS_SWITCH_ID: c_ushort = 36; +pub const IFLA_LINK_NETNSID: c_ushort = 37; +pub const IFLA_PHYS_PORT_NAME: c_ushort = 38; +pub const IFLA_PROTO_DOWN: c_ushort = 39; +pub const IFLA_GSO_MAX_SEGS: c_ushort = 40; +pub const IFLA_GSO_MAX_SIZE: c_ushort = 41; +pub const IFLA_PAD: c_ushort = 42; +pub const IFLA_XDP: c_ushort = 43; +pub const IFLA_EVENT: c_ushort = 44; +pub const IFLA_NEW_NETNSID: c_ushort = 45; +pub const IFLA_IF_NETNSID: c_ushort = 46; +pub const IFLA_TARGET_NETNSID: c_ushort = IFLA_IF_NETNSID; +pub const IFLA_CARRIER_UP_COUNT: c_ushort = 47; +pub const IFLA_CARRIER_DOWN_COUNT: c_ushort = 48; +pub const IFLA_NEW_IFINDEX: c_ushort = 49; +pub const IFLA_MIN_MTU: c_ushort = 50; +pub const IFLA_MAX_MTU: c_ushort = 51; +pub const IFLA_PROP_LIST: c_ushort = 52; +pub const IFLA_ALT_IFNAME: c_ushort = 53; +pub const IFLA_PERM_ADDRESS: c_ushort = 54; +pub const IFLA_PROTO_DOWN_REASON: c_ushort = 55; +pub const IFLA_PARENT_DEV_NAME: c_ushort = 56; +pub const IFLA_PARENT_DEV_BUS_NAME: c_ushort = 57; +pub const IFLA_GRO_MAX_SIZE: c_ushort = 58; +pub const IFLA_TSO_MAX_SIZE: c_ushort = 59; +pub const IFLA_TSO_MAX_SEGS: c_ushort = 60; +pub const IFLA_ALLMULTI: c_ushort = 61; +pub const IFLA_DEVLINK_PORT: c_ushort = 62; +pub const IFLA_GSO_IPV4_MAX_SIZE: c_ushort = 63; +pub const IFLA_GRO_IPV4_MAX_SIZE: c_ushort = 64; + +pub const IFLA_INFO_UNSPEC: c_ushort = 0; +pub const IFLA_INFO_KIND: c_ushort = 1; +pub const IFLA_INFO_DATA: c_ushort = 2; +pub const IFLA_INFO_XSTATS: c_ushort = 3; +pub const IFLA_INFO_SLAVE_KIND: c_ushort = 4; +pub const IFLA_INFO_SLAVE_DATA: c_ushort = 5; // linux/rtnetlink.h -pub const TCA_UNSPEC: ::c_ushort = 0; -pub const TCA_KIND: ::c_ushort = 1; -pub const TCA_OPTIONS: ::c_ushort = 2; -pub const TCA_STATS: ::c_ushort = 3; -pub const TCA_XSTATS: ::c_ushort = 4; -pub const TCA_RATE: ::c_ushort = 5; -pub const TCA_FCNT: ::c_ushort = 6; -pub const TCA_STATS2: ::c_ushort = 7; -pub const TCA_STAB: ::c_ushort = 8; +pub const TCA_UNSPEC: c_ushort = 0; +pub const TCA_KIND: c_ushort = 1; +pub const TCA_OPTIONS: c_ushort = 2; +pub const TCA_STATS: c_ushort = 3; +pub const TCA_XSTATS: c_ushort = 4; +pub const TCA_RATE: c_ushort = 5; +pub const TCA_FCNT: c_ushort = 6; +pub const TCA_STATS2: c_ushort = 7; +pub const TCA_STAB: c_ushort = 8; pub const RTM_NEWLINK: u16 = 16; pub const RTM_DELLINK: u16 = 17; @@ -3289,276 +3293,276 @@ pub const RTM_NEWNSID: u16 = 88; pub const RTM_DELNSID: u16 = 89; pub const RTM_GETNSID: u16 = 90; -pub const RTM_F_NOTIFY: ::c_uint = 0x100; -pub const RTM_F_CLONED: ::c_uint = 0x200; -pub const RTM_F_EQUALIZE: ::c_uint = 0x400; -pub const RTM_F_PREFIX: ::c_uint = 0x800; - -pub const RTA_UNSPEC: ::c_ushort = 0; -pub const RTA_DST: ::c_ushort = 1; -pub const RTA_SRC: ::c_ushort = 2; -pub const RTA_IIF: ::c_ushort = 3; -pub const RTA_OIF: ::c_ushort = 4; -pub const RTA_GATEWAY: ::c_ushort = 5; -pub const RTA_PRIORITY: ::c_ushort = 6; -pub const RTA_PREFSRC: ::c_ushort = 7; -pub const RTA_METRICS: ::c_ushort = 8; -pub const RTA_MULTIPATH: ::c_ushort = 9; -pub const RTA_PROTOINFO: ::c_ushort = 10; // No longer used -pub const RTA_FLOW: ::c_ushort = 11; -pub const RTA_CACHEINFO: ::c_ushort = 12; -pub const RTA_SESSION: ::c_ushort = 13; // No longer used -pub const RTA_MP_ALGO: ::c_ushort = 14; // No longer used -pub const RTA_TABLE: ::c_ushort = 15; -pub const RTA_MARK: ::c_ushort = 16; -pub const RTA_MFC_STATS: ::c_ushort = 17; - -pub const RTN_UNSPEC: ::c_uchar = 0; -pub const RTN_UNICAST: ::c_uchar = 1; -pub const RTN_LOCAL: ::c_uchar = 2; -pub const RTN_BROADCAST: ::c_uchar = 3; -pub const RTN_ANYCAST: ::c_uchar = 4; -pub const RTN_MULTICAST: ::c_uchar = 5; -pub const RTN_BLACKHOLE: ::c_uchar = 6; -pub const RTN_UNREACHABLE: ::c_uchar = 7; -pub const RTN_PROHIBIT: ::c_uchar = 8; -pub const RTN_THROW: ::c_uchar = 9; -pub const RTN_NAT: ::c_uchar = 10; -pub const RTN_XRESOLVE: ::c_uchar = 11; - -pub const RTPROT_UNSPEC: ::c_uchar = 0; -pub const RTPROT_REDIRECT: ::c_uchar = 1; -pub const RTPROT_KERNEL: ::c_uchar = 2; -pub const RTPROT_BOOT: ::c_uchar = 3; -pub const RTPROT_STATIC: ::c_uchar = 4; - -pub const RT_SCOPE_UNIVERSE: ::c_uchar = 0; -pub const RT_SCOPE_SITE: ::c_uchar = 200; -pub const RT_SCOPE_LINK: ::c_uchar = 253; -pub const RT_SCOPE_HOST: ::c_uchar = 254; -pub const RT_SCOPE_NOWHERE: ::c_uchar = 255; - -pub const RT_TABLE_UNSPEC: ::c_uchar = 0; -pub const RT_TABLE_COMPAT: ::c_uchar = 252; -pub const RT_TABLE_DEFAULT: ::c_uchar = 253; -pub const RT_TABLE_MAIN: ::c_uchar = 254; -pub const RT_TABLE_LOCAL: ::c_uchar = 255; +pub const RTM_F_NOTIFY: c_uint = 0x100; +pub const RTM_F_CLONED: c_uint = 0x200; +pub const RTM_F_EQUALIZE: c_uint = 0x400; +pub const RTM_F_PREFIX: c_uint = 0x800; + +pub const RTA_UNSPEC: c_ushort = 0; +pub const RTA_DST: c_ushort = 1; +pub const RTA_SRC: c_ushort = 2; +pub const RTA_IIF: c_ushort = 3; +pub const RTA_OIF: c_ushort = 4; +pub const RTA_GATEWAY: c_ushort = 5; +pub const RTA_PRIORITY: c_ushort = 6; +pub const RTA_PREFSRC: c_ushort = 7; +pub const RTA_METRICS: c_ushort = 8; +pub const RTA_MULTIPATH: c_ushort = 9; +pub const RTA_PROTOINFO: c_ushort = 10; // No longer used +pub const RTA_FLOW: c_ushort = 11; +pub const RTA_CACHEINFO: c_ushort = 12; +pub const RTA_SESSION: c_ushort = 13; // No longer used +pub const RTA_MP_ALGO: c_ushort = 14; // No longer used +pub const RTA_TABLE: c_ushort = 15; +pub const RTA_MARK: c_ushort = 16; +pub const RTA_MFC_STATS: c_ushort = 17; + +pub const RTN_UNSPEC: c_uchar = 0; +pub const RTN_UNICAST: c_uchar = 1; +pub const RTN_LOCAL: c_uchar = 2; +pub const RTN_BROADCAST: c_uchar = 3; +pub const RTN_ANYCAST: c_uchar = 4; +pub const RTN_MULTICAST: c_uchar = 5; +pub const RTN_BLACKHOLE: c_uchar = 6; +pub const RTN_UNREACHABLE: c_uchar = 7; +pub const RTN_PROHIBIT: c_uchar = 8; +pub const RTN_THROW: c_uchar = 9; +pub const RTN_NAT: c_uchar = 10; +pub const RTN_XRESOLVE: c_uchar = 11; + +pub const RTPROT_UNSPEC: c_uchar = 0; +pub const RTPROT_REDIRECT: c_uchar = 1; +pub const RTPROT_KERNEL: c_uchar = 2; +pub const RTPROT_BOOT: c_uchar = 3; +pub const RTPROT_STATIC: c_uchar = 4; + +pub const RT_SCOPE_UNIVERSE: c_uchar = 0; +pub const RT_SCOPE_SITE: c_uchar = 200; +pub const RT_SCOPE_LINK: c_uchar = 253; +pub const RT_SCOPE_HOST: c_uchar = 254; +pub const RT_SCOPE_NOWHERE: c_uchar = 255; + +pub const RT_TABLE_UNSPEC: c_uchar = 0; +pub const RT_TABLE_COMPAT: c_uchar = 252; +pub const RT_TABLE_DEFAULT: c_uchar = 253; +pub const RT_TABLE_MAIN: c_uchar = 254; +pub const RT_TABLE_LOCAL: c_uchar = 255; pub const RTMSG_NEWDEVICE: u32 = 0x11; pub const RTMSG_DELDEVICE: u32 = 0x12; pub const RTMSG_NEWROUTE: u32 = 0x21; pub const RTMSG_DELROUTE: u32 = 0x22; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_NET: ::c_int = 3; -pub const CTL_FS: ::c_int = 5; -pub const CTL_DEBUG: ::c_int = 6; -pub const CTL_DEV: ::c_int = 7; -pub const CTL_BUS: ::c_int = 8; -pub const CTL_ABI: ::c_int = 9; -pub const CTL_CPU: ::c_int = 10; - -pub const CTL_BUS_ISA: ::c_int = 1; - -pub const INOTIFY_MAX_USER_INSTANCES: ::c_int = 1; -pub const INOTIFY_MAX_USER_WATCHES: ::c_int = 2; -pub const INOTIFY_MAX_QUEUED_EVENTS: ::c_int = 3; - -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_SECUREMASK: ::c_int = 5; -pub const KERN_PROF: ::c_int = 6; -pub const KERN_NODENAME: ::c_int = 7; -pub const KERN_DOMAINNAME: ::c_int = 8; -pub const KERN_PANIC: ::c_int = 15; -pub const KERN_REALROOTDEV: ::c_int = 16; -pub const KERN_SPARC_REBOOT: ::c_int = 21; -pub const KERN_CTLALTDEL: ::c_int = 22; -pub const KERN_PRINTK: ::c_int = 23; -pub const KERN_NAMETRANS: ::c_int = 24; -pub const KERN_PPC_HTABRECLAIM: ::c_int = 25; -pub const KERN_PPC_ZEROPAGED: ::c_int = 26; -pub const KERN_PPC_POWERSAVE_NAP: ::c_int = 27; -pub const KERN_MODPROBE: ::c_int = 28; -pub const KERN_SG_BIG_BUFF: ::c_int = 29; -pub const KERN_ACCT: ::c_int = 30; -pub const KERN_PPC_L2CR: ::c_int = 31; -pub const KERN_RTSIGNR: ::c_int = 32; -pub const KERN_RTSIGMAX: ::c_int = 33; -pub const KERN_SHMMAX: ::c_int = 34; -pub const KERN_MSGMAX: ::c_int = 35; -pub const KERN_MSGMNB: ::c_int = 36; -pub const KERN_MSGPOOL: ::c_int = 37; -pub const KERN_SYSRQ: ::c_int = 38; -pub const KERN_MAX_THREADS: ::c_int = 39; -pub const KERN_RANDOM: ::c_int = 40; -pub const KERN_SHMALL: ::c_int = 41; -pub const KERN_MSGMNI: ::c_int = 42; -pub const KERN_SEM: ::c_int = 43; -pub const KERN_SPARC_STOP_A: ::c_int = 44; -pub const KERN_SHMMNI: ::c_int = 45; -pub const KERN_OVERFLOWUID: ::c_int = 46; -pub const KERN_OVERFLOWGID: ::c_int = 47; -pub const KERN_SHMPATH: ::c_int = 48; -pub const KERN_HOTPLUG: ::c_int = 49; -pub const KERN_IEEE_EMULATION_WARNINGS: ::c_int = 50; -pub const KERN_S390_USER_DEBUG_LOGGING: ::c_int = 51; -pub const KERN_CORE_USES_PID: ::c_int = 52; -pub const KERN_TAINTED: ::c_int = 53; -pub const KERN_CADPID: ::c_int = 54; -pub const KERN_PIDMAX: ::c_int = 55; -pub const KERN_CORE_PATTERN: ::c_int = 56; -pub const KERN_PANIC_ON_OOPS: ::c_int = 57; -pub const KERN_HPPA_PWRSW: ::c_int = 58; -pub const KERN_HPPA_UNALIGNED: ::c_int = 59; -pub const KERN_PRINTK_RATELIMIT: ::c_int = 60; -pub const KERN_PRINTK_RATELIMIT_BURST: ::c_int = 61; -pub const KERN_PTY: ::c_int = 62; -pub const KERN_NGROUPS_MAX: ::c_int = 63; -pub const KERN_SPARC_SCONS_PWROFF: ::c_int = 64; -pub const KERN_HZ_TIMER: ::c_int = 65; -pub const KERN_UNKNOWN_NMI_PANIC: ::c_int = 66; -pub const KERN_BOOTLOADER_TYPE: ::c_int = 67; -pub const KERN_RANDOMIZE: ::c_int = 68; -pub const KERN_SETUID_DUMPABLE: ::c_int = 69; -pub const KERN_SPIN_RETRY: ::c_int = 70; -pub const KERN_ACPI_VIDEO_FLAGS: ::c_int = 71; -pub const KERN_IA64_UNALIGNED: ::c_int = 72; -pub const KERN_COMPAT_LOG: ::c_int = 73; -pub const KERN_MAX_LOCK_DEPTH: ::c_int = 74; - -pub const VM_OVERCOMMIT_MEMORY: ::c_int = 5; -pub const VM_PAGE_CLUSTER: ::c_int = 10; -pub const VM_DIRTY_BACKGROUND: ::c_int = 11; -pub const VM_DIRTY_RATIO: ::c_int = 12; -pub const VM_DIRTY_WB_CS: ::c_int = 13; -pub const VM_DIRTY_EXPIRE_CS: ::c_int = 14; -pub const VM_NR_PDFLUSH_THREADS: ::c_int = 15; -pub const VM_OVERCOMMIT_RATIO: ::c_int = 16; -pub const VM_PAGEBUF: ::c_int = 17; -pub const VM_HUGETLB_PAGES: ::c_int = 18; -pub const VM_SWAPPINESS: ::c_int = 19; -pub const VM_LOWMEM_RESERVE_RATIO: ::c_int = 20; -pub const VM_MIN_FREE_KBYTES: ::c_int = 21; -pub const VM_MAX_MAP_COUNT: ::c_int = 22; -pub const VM_LAPTOP_MODE: ::c_int = 23; -pub const VM_BLOCK_DUMP: ::c_int = 24; -pub const VM_HUGETLB_GROUP: ::c_int = 25; -pub const VM_VFS_CACHE_PRESSURE: ::c_int = 26; -pub const VM_LEGACY_VA_LAYOUT: ::c_int = 27; -pub const VM_SWAP_TOKEN_TIMEOUT: ::c_int = 28; -pub const VM_DROP_PAGECACHE: ::c_int = 29; -pub const VM_PERCPU_PAGELIST_FRACTION: ::c_int = 30; -pub const VM_ZONE_RECLAIM_MODE: ::c_int = 31; -pub const VM_MIN_UNMAPPED: ::c_int = 32; -pub const VM_PANIC_ON_OOM: ::c_int = 33; -pub const VM_VDSO_ENABLED: ::c_int = 34; - -pub const NET_CORE: ::c_int = 1; -pub const NET_ETHER: ::c_int = 2; -pub const NET_802: ::c_int = 3; -pub const NET_UNIX: ::c_int = 4; -pub const NET_IPV4: ::c_int = 5; -pub const NET_IPX: ::c_int = 6; -pub const NET_ATALK: ::c_int = 7; -pub const NET_NETROM: ::c_int = 8; -pub const NET_AX25: ::c_int = 9; -pub const NET_BRIDGE: ::c_int = 10; -pub const NET_ROSE: ::c_int = 11; -pub const NET_IPV6: ::c_int = 12; -pub const NET_X25: ::c_int = 13; -pub const NET_TR: ::c_int = 14; -pub const NET_DECNET: ::c_int = 15; -pub const NET_ECONET: ::c_int = 16; -pub const NET_SCTP: ::c_int = 17; -pub const NET_LLC: ::c_int = 18; -pub const NET_NETFILTER: ::c_int = 19; -pub const NET_DCCP: ::c_int = 20; -pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26; -pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_NET: c_int = 3; +pub const CTL_FS: c_int = 5; +pub const CTL_DEBUG: c_int = 6; +pub const CTL_DEV: c_int = 7; +pub const CTL_BUS: c_int = 8; +pub const CTL_ABI: c_int = 9; +pub const CTL_CPU: c_int = 10; + +pub const CTL_BUS_ISA: c_int = 1; + +pub const INOTIFY_MAX_USER_INSTANCES: c_int = 1; +pub const INOTIFY_MAX_USER_WATCHES: c_int = 2; +pub const INOTIFY_MAX_QUEUED_EVENTS: c_int = 3; + +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_SECUREMASK: c_int = 5; +pub const KERN_PROF: c_int = 6; +pub const KERN_NODENAME: c_int = 7; +pub const KERN_DOMAINNAME: c_int = 8; +pub const KERN_PANIC: c_int = 15; +pub const KERN_REALROOTDEV: c_int = 16; +pub const KERN_SPARC_REBOOT: c_int = 21; +pub const KERN_CTLALTDEL: c_int = 22; +pub const KERN_PRINTK: c_int = 23; +pub const KERN_NAMETRANS: c_int = 24; +pub const KERN_PPC_HTABRECLAIM: c_int = 25; +pub const KERN_PPC_ZEROPAGED: c_int = 26; +pub const KERN_PPC_POWERSAVE_NAP: c_int = 27; +pub const KERN_MODPROBE: c_int = 28; +pub const KERN_SG_BIG_BUFF: c_int = 29; +pub const KERN_ACCT: c_int = 30; +pub const KERN_PPC_L2CR: c_int = 31; +pub const KERN_RTSIGNR: c_int = 32; +pub const KERN_RTSIGMAX: c_int = 33; +pub const KERN_SHMMAX: c_int = 34; +pub const KERN_MSGMAX: c_int = 35; +pub const KERN_MSGMNB: c_int = 36; +pub const KERN_MSGPOOL: c_int = 37; +pub const KERN_SYSRQ: c_int = 38; +pub const KERN_MAX_THREADS: c_int = 39; +pub const KERN_RANDOM: c_int = 40; +pub const KERN_SHMALL: c_int = 41; +pub const KERN_MSGMNI: c_int = 42; +pub const KERN_SEM: c_int = 43; +pub const KERN_SPARC_STOP_A: c_int = 44; +pub const KERN_SHMMNI: c_int = 45; +pub const KERN_OVERFLOWUID: c_int = 46; +pub const KERN_OVERFLOWGID: c_int = 47; +pub const KERN_SHMPATH: c_int = 48; +pub const KERN_HOTPLUG: c_int = 49; +pub const KERN_IEEE_EMULATION_WARNINGS: c_int = 50; +pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51; +pub const KERN_CORE_USES_PID: c_int = 52; +pub const KERN_TAINTED: c_int = 53; +pub const KERN_CADPID: c_int = 54; +pub const KERN_PIDMAX: c_int = 55; +pub const KERN_CORE_PATTERN: c_int = 56; +pub const KERN_PANIC_ON_OOPS: c_int = 57; +pub const KERN_HPPA_PWRSW: c_int = 58; +pub const KERN_HPPA_UNALIGNED: c_int = 59; +pub const KERN_PRINTK_RATELIMIT: c_int = 60; +pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61; +pub const KERN_PTY: c_int = 62; +pub const KERN_NGROUPS_MAX: c_int = 63; +pub const KERN_SPARC_SCONS_PWROFF: c_int = 64; +pub const KERN_HZ_TIMER: c_int = 65; +pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66; +pub const KERN_BOOTLOADER_TYPE: c_int = 67; +pub const KERN_RANDOMIZE: c_int = 68; +pub const KERN_SETUID_DUMPABLE: c_int = 69; +pub const KERN_SPIN_RETRY: c_int = 70; +pub const KERN_ACPI_VIDEO_FLAGS: c_int = 71; +pub const KERN_IA64_UNALIGNED: c_int = 72; +pub const KERN_COMPAT_LOG: c_int = 73; +pub const KERN_MAX_LOCK_DEPTH: c_int = 74; + +pub const VM_OVERCOMMIT_MEMORY: c_int = 5; +pub const VM_PAGE_CLUSTER: c_int = 10; +pub const VM_DIRTY_BACKGROUND: c_int = 11; +pub const VM_DIRTY_RATIO: c_int = 12; +pub const VM_DIRTY_WB_CS: c_int = 13; +pub const VM_DIRTY_EXPIRE_CS: c_int = 14; +pub const VM_NR_PDFLUSH_THREADS: c_int = 15; +pub const VM_OVERCOMMIT_RATIO: c_int = 16; +pub const VM_PAGEBUF: c_int = 17; +pub const VM_HUGETLB_PAGES: c_int = 18; +pub const VM_SWAPPINESS: c_int = 19; +pub const VM_LOWMEM_RESERVE_RATIO: c_int = 20; +pub const VM_MIN_FREE_KBYTES: c_int = 21; +pub const VM_MAX_MAP_COUNT: c_int = 22; +pub const VM_LAPTOP_MODE: c_int = 23; +pub const VM_BLOCK_DUMP: c_int = 24; +pub const VM_HUGETLB_GROUP: c_int = 25; +pub const VM_VFS_CACHE_PRESSURE: c_int = 26; +pub const VM_LEGACY_VA_LAYOUT: c_int = 27; +pub const VM_SWAP_TOKEN_TIMEOUT: c_int = 28; +pub const VM_DROP_PAGECACHE: c_int = 29; +pub const VM_PERCPU_PAGELIST_FRACTION: c_int = 30; +pub const VM_ZONE_RECLAIM_MODE: c_int = 31; +pub const VM_MIN_UNMAPPED: c_int = 32; +pub const VM_PANIC_ON_OOM: c_int = 33; +pub const VM_VDSO_ENABLED: c_int = 34; + +pub const NET_CORE: c_int = 1; +pub const NET_ETHER: c_int = 2; +pub const NET_802: c_int = 3; +pub const NET_UNIX: c_int = 4; +pub const NET_IPV4: c_int = 5; +pub const NET_IPX: c_int = 6; +pub const NET_ATALK: c_int = 7; +pub const NET_NETROM: c_int = 8; +pub const NET_AX25: c_int = 9; +pub const NET_BRIDGE: c_int = 10; +pub const NET_ROSE: c_int = 11; +pub const NET_IPV6: c_int = 12; +pub const NET_X25: c_int = 13; +pub const NET_TR: c_int = 14; +pub const NET_DECNET: c_int = 15; +pub const NET_ECONET: c_int = 16; +pub const NET_SCTP: c_int = 17; +pub const NET_LLC: c_int = 18; +pub const NET_NETFILTER: c_int = 19; +pub const NET_DCCP: c_int = 20; +pub const HUGETLB_FLAG_ENCODE_SHIFT: c_int = 26; +pub const MAP_HUGE_SHIFT: c_int = HUGETLB_FLAG_ENCODE_SHIFT; // include/linux/sched.h -pub const PF_VCPU: ::c_int = 0x00000001; -pub const PF_IDLE: ::c_int = 0x00000002; -pub const PF_EXITING: ::c_int = 0x00000004; -pub const PF_POSTCOREDUMP: ::c_int = 0x00000008; -pub const PF_IO_WORKER: ::c_int = 0x00000010; -pub const PF_WQ_WORKER: ::c_int = 0x00000020; -pub const PF_FORKNOEXEC: ::c_int = 0x00000040; -pub const PF_MCE_PROCESS: ::c_int = 0x00000080; -pub const PF_SUPERPRIV: ::c_int = 0x00000100; -pub const PF_DUMPCORE: ::c_int = 0x00000200; -pub const PF_SIGNALED: ::c_int = 0x00000400; -pub const PF_MEMALLOC: ::c_int = 0x00000800; -pub const PF_NPROC_EXCEEDED: ::c_int = 0x00001000; -pub const PF_USED_MATH: ::c_int = 0x00002000; -pub const PF_USER_WORKER: ::c_int = 0x00004000; -pub const PF_NOFREEZE: ::c_int = 0x00008000; - -pub const PF_KSWAPD: ::c_int = 0x00020000; -pub const PF_MEMALLOC_NOFS: ::c_int = 0x00040000; -pub const PF_MEMALLOC_NOIO: ::c_int = 0x00080000; -pub const PF_LOCAL_THROTTLE: ::c_int = 0x00100000; -pub const PF_KTHREAD: ::c_int = 0x00200000; -pub const PF_RANDOMIZE: ::c_int = 0x00400000; - -pub const PF_NO_SETAFFINITY: ::c_int = 0x04000000; -pub const PF_MCE_EARLY: ::c_int = 0x08000000; -pub const PF_MEMALLOC_PIN: ::c_int = 0x10000000; - -pub const PF_SUSPEND_TASK: ::c_int = 0x80000000; - -pub const KLOG_CLOSE: ::c_int = 0; -pub const KLOG_OPEN: ::c_int = 1; -pub const KLOG_READ: ::c_int = 2; -pub const KLOG_READ_ALL: ::c_int = 3; -pub const KLOG_READ_CLEAR: ::c_int = 4; -pub const KLOG_CLEAR: ::c_int = 5; -pub const KLOG_CONSOLE_OFF: ::c_int = 6; -pub const KLOG_CONSOLE_ON: ::c_int = 7; -pub const KLOG_CONSOLE_LEVEL: ::c_int = 8; -pub const KLOG_SIZE_UNREAD: ::c_int = 9; -pub const KLOG_SIZE_BUFFER: ::c_int = 10; +pub const PF_VCPU: c_int = 0x00000001; +pub const PF_IDLE: c_int = 0x00000002; +pub const PF_EXITING: c_int = 0x00000004; +pub const PF_POSTCOREDUMP: c_int = 0x00000008; +pub const PF_IO_WORKER: c_int = 0x00000010; +pub const PF_WQ_WORKER: c_int = 0x00000020; +pub const PF_FORKNOEXEC: c_int = 0x00000040; +pub const PF_MCE_PROCESS: c_int = 0x00000080; +pub const PF_SUPERPRIV: c_int = 0x00000100; +pub const PF_DUMPCORE: c_int = 0x00000200; +pub const PF_SIGNALED: c_int = 0x00000400; +pub const PF_MEMALLOC: c_int = 0x00000800; +pub const PF_NPROC_EXCEEDED: c_int = 0x00001000; +pub const PF_USED_MATH: c_int = 0x00002000; +pub const PF_USER_WORKER: c_int = 0x00004000; +pub const PF_NOFREEZE: c_int = 0x00008000; + +pub const PF_KSWAPD: c_int = 0x00020000; +pub const PF_MEMALLOC_NOFS: c_int = 0x00040000; +pub const PF_MEMALLOC_NOIO: c_int = 0x00080000; +pub const PF_LOCAL_THROTTLE: c_int = 0x00100000; +pub const PF_KTHREAD: c_int = 0x00200000; +pub const PF_RANDOMIZE: c_int = 0x00400000; + +pub const PF_NO_SETAFFINITY: c_int = 0x04000000; +pub const PF_MCE_EARLY: c_int = 0x08000000; +pub const PF_MEMALLOC_PIN: c_int = 0x10000000; + +pub const PF_SUSPEND_TASK: c_int = 0x80000000; + +pub const KLOG_CLOSE: c_int = 0; +pub const KLOG_OPEN: c_int = 1; +pub const KLOG_READ: c_int = 2; +pub const KLOG_READ_ALL: c_int = 3; +pub const KLOG_READ_CLEAR: c_int = 4; +pub const KLOG_CLEAR: c_int = 5; +pub const KLOG_CONSOLE_OFF: c_int = 6; +pub const KLOG_CONSOLE_ON: c_int = 7; +pub const KLOG_CONSOLE_LEVEL: c_int = 8; +pub const KLOG_SIZE_UNREAD: c_int = 9; +pub const KLOG_SIZE_BUFFER: c_int = 10; // From NDK's linux/auxvec.h -pub const AT_NULL: ::c_ulong = 0; -pub const AT_IGNORE: ::c_ulong = 1; -pub const AT_EXECFD: ::c_ulong = 2; -pub const AT_PHDR: ::c_ulong = 3; -pub const AT_PHENT: ::c_ulong = 4; -pub const AT_PHNUM: ::c_ulong = 5; -pub const AT_PAGESZ: ::c_ulong = 6; -pub const AT_BASE: ::c_ulong = 7; -pub const AT_FLAGS: ::c_ulong = 8; -pub const AT_ENTRY: ::c_ulong = 9; -pub const AT_NOTELF: ::c_ulong = 10; -pub const AT_UID: ::c_ulong = 11; -pub const AT_EUID: ::c_ulong = 12; -pub const AT_GID: ::c_ulong = 13; -pub const AT_EGID: ::c_ulong = 14; -pub const AT_PLATFORM: ::c_ulong = 15; -pub const AT_HWCAP: ::c_ulong = 16; -pub const AT_CLKTCK: ::c_ulong = 17; -pub const AT_SECURE: ::c_ulong = 23; -pub const AT_BASE_PLATFORM: ::c_ulong = 24; -pub const AT_RANDOM: ::c_ulong = 25; -pub const AT_HWCAP2: ::c_ulong = 26; -pub const AT_RSEQ_FEATURE_SIZE: ::c_ulong = 27; -pub const AT_RSEQ_ALIGN: ::c_ulong = 28; -pub const AT_EXECFN: ::c_ulong = 31; -pub const AT_MINSIGSTKSZ: ::c_ulong = 51; +pub const AT_NULL: c_ulong = 0; +pub const AT_IGNORE: c_ulong = 1; +pub const AT_EXECFD: c_ulong = 2; +pub const AT_PHDR: c_ulong = 3; +pub const AT_PHENT: c_ulong = 4; +pub const AT_PHNUM: c_ulong = 5; +pub const AT_PAGESZ: c_ulong = 6; +pub const AT_BASE: c_ulong = 7; +pub const AT_FLAGS: c_ulong = 8; +pub const AT_ENTRY: c_ulong = 9; +pub const AT_NOTELF: c_ulong = 10; +pub const AT_UID: c_ulong = 11; +pub const AT_EUID: c_ulong = 12; +pub const AT_GID: c_ulong = 13; +pub const AT_EGID: c_ulong = 14; +pub const AT_PLATFORM: c_ulong = 15; +pub const AT_HWCAP: c_ulong = 16; +pub const AT_CLKTCK: c_ulong = 17; +pub const AT_SECURE: c_ulong = 23; +pub const AT_BASE_PLATFORM: c_ulong = 24; +pub const AT_RANDOM: c_ulong = 25; +pub const AT_HWCAP2: c_ulong = 26; +pub const AT_RSEQ_FEATURE_SIZE: c_ulong = 27; +pub const AT_RSEQ_ALIGN: c_ulong = 28; +pub const AT_EXECFN: c_ulong = 31; +pub const AT_MINSIGSTKSZ: c_ulong = 51; // Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the // following are only available on newer Linux versions than the versions // currently used in CI in some configurations, so we define them here. cfg_if! { if #[cfg(not(target_arch = "s390x"))] { - pub const XFS_SUPER_MAGIC: ::c_long = 0x58465342; + pub const XFS_SUPER_MAGIC: c_long = 0x58465342; } else if #[cfg(target_arch = "s390x")] { - pub const XFS_SUPER_MAGIC: ::c_uint = 0x58465342; + pub const XFS_SUPER_MAGIC: c_uint = 0x58465342; } } @@ -3573,10 +3577,10 @@ f! { } } - pub fn CPU_ALLOC_SIZE(count: ::c_int) -> ::size_t { - let _dummy: cpu_set_t = ::mem::zeroed(); - let size_in_bits = 8 * ::mem::size_of_val(&_dummy.__bits[0]); - ((count as ::size_t + size_in_bits - 1) / 8) as ::size_t + pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + let _dummy: cpu_set_t = crate::mem::zeroed(); + let size_in_bits = 8 * crate::mem::size_of_val(&_dummy.__bits[0]); + ((count as size_t + size_in_bits - 1) / 8) as size_t } pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { @@ -3586,61 +3590,61 @@ f! { } pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.__bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.__bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.__bits[idx] |= 1 << offset; () } pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.__bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.__bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.__bits[idx] &= !(1 << offset); () } pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.__bits[0]); + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.__bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.__bits[idx] & (1 << offset)) } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> ::c_int { + pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; - let size_of_mask = ::mem::size_of_val(&cpuset.__bits[0]); + let size_of_mask = crate::mem::size_of_val(&cpuset.__bits[0]); for i in cpuset.__bits[..(size / size_of_mask)].iter() { s += i.count_ones(); } - s as ::c_int + s as c_int } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> ::c_int { - CPU_COUNT_S(::mem::size_of::(), cpuset) + pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { + CPU_COUNT_S(crate::mem::size_of::(), cpuset) } pub fn CPU_EQUAL(set1: &cpu_set_t, set2: &cpu_set_t) -> bool { set1.__bits == set2.__bits } - pub fn major(dev: ::dev_t) -> ::c_int { - ((dev >> 8) & 0xfff) as ::c_int + pub fn major(dev: crate::dev_t) -> c_int { + ((dev >> 8) & 0xfff) as c_int } - pub fn minor(dev: ::dev_t) -> ::c_int { - ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as ::c_int + pub fn minor(dev: crate::dev_t) -> c_int { + ((dev & 0xff) | ((dev >> 12) & 0xfff00)) as c_int } - pub fn NLA_ALIGN(len: ::c_int) -> ::c_int { + pub fn NLA_ALIGN(len: c_int) -> c_int { return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1); } - pub fn SO_EE_OFFENDER(ee: *const ::sock_extended_err) -> *mut ::sockaddr { - ee.offset(1) as *mut ::sockaddr + pub fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr { + ee.offset(1) as *mut crate::sockaddr } } safe_f! { - pub {const} fn makedev(ma: ::c_uint, mi: ::c_uint) -> ::dev_t { - let ma = ma as ::dev_t; - let mi = mi as ::dev_t; + pub {const} fn makedev(ma: c_uint, mi: c_uint) -> crate::dev_t { + let ma = ma as crate::dev_t; + let mi = mi as crate::dev_t; ((ma & 0xfff) << 8) | (mi & 0xff) | ((mi & 0xfff00) << 12) } } @@ -3648,488 +3652,467 @@ safe_f! { extern "C" { pub fn setgrent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; - pub fn getrlimit64(resource: ::c_int, rlim: *mut rlimit64) -> ::c_int; - pub fn setrlimit64(resource: ::c_int, rlim: *const rlimit64) -> ::c_int; - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + pub fn getgrent() -> *mut crate::group; + pub fn getrlimit64(resource: c_int, rlim: *mut rlimit64) -> c_int; + pub fn setrlimit64(resource: c_int, rlim: *const rlimit64) -> c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; pub fn prlimit( - pid: ::pid_t, - resource: ::c_int, - new_limit: *const ::rlimit, - old_limit: *mut ::rlimit, - ) -> ::c_int; + pid: crate::pid_t, + resource: c_int, + new_limit: *const crate::rlimit, + old_limit: *mut crate::rlimit, + ) -> c_int; pub fn prlimit64( - pid: ::pid_t, - resource: ::c_int, - new_limit: *const ::rlimit64, - old_limit: *mut ::rlimit64, - ) -> ::c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; - - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; - pub fn mlock2(addr: *const ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; + pid: crate::pid_t, + resource: c_int, + new_limit: *const crate::rlimit64, + old_limit: *mut crate::rlimit64, + ) -> c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; + pub fn mlock2(addr: *const c_void, len: size_t, flags: c_int) -> c_int; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::size_t, - serv: *mut ::c_char, - servlen: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, count: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, count: ::c_int, offset: ::off_t) -> ::ssize_t; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: size_t, + serv: *mut c_char, + servlen: size_t, + flags: c_int, + ) -> c_int; + pub fn preadv(fd: c_int, iov: *const crate::iovec, count: c_int, offset: off_t) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, count: c_int, offset: off_t) -> ssize_t; pub fn process_vm_readv( - pid: ::pid_t, - local_iov: *const ::iovec, - local_iov_count: ::c_ulong, - remote_iov: *const ::iovec, - remote_iov_count: ::c_ulong, - flags: ::c_ulong, - ) -> ::ssize_t; + pid: crate::pid_t, + local_iov: *const crate::iovec, + local_iov_count: c_ulong, + remote_iov: *const crate::iovec, + remote_iov_count: c_ulong, + flags: c_ulong, + ) -> ssize_t; pub fn process_vm_writev( - pid: ::pid_t, - local_iov: *const ::iovec, - local_iov_count: ::c_ulong, - remote_iov: *const ::iovec, - remote_iov_count: ::c_ulong, - flags: ::c_ulong, - ) -> ::ssize_t; - pub fn ptrace(request: ::c_int, ...) -> ::c_long; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; - pub fn __sched_cpualloc(count: ::size_t) -> *mut ::cpu_set_t; - pub fn __sched_cpufree(set: *mut ::cpu_set_t); - pub fn __sched_cpucount(setsize: ::size_t, set: *const cpu_set_t) -> ::c_int; - pub fn sched_getcpu() -> ::c_int; - pub fn mallinfo() -> ::mallinfo; + pid: crate::pid_t, + local_iov: *const crate::iovec, + local_iov_count: c_ulong, + remote_iov: *const crate::iovec, + remote_iov_count: c_ulong, + flags: c_ulong, + ) -> ssize_t; + pub fn ptrace(request: c_int, ...) -> c_long; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; + pub fn __sched_cpualloc(count: size_t) -> *mut crate::cpu_set_t; + pub fn __sched_cpufree(set: *mut crate::cpu_set_t); + pub fn __sched_cpucount(setsize: size_t, set: *const cpu_set_t) -> c_int; + pub fn sched_getcpu() -> c_int; + pub fn mallinfo() -> crate::mallinfo; // available from API 23 - pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; + pub fn malloc_info(options: c_int, stream: *mut crate::FILE) -> c_int; - pub fn malloc_usable_size(ptr: *const ::c_void) -> ::size_t; + pub fn malloc_usable_size(ptr: *const c_void) -> size_t; - pub fn utmpname(name: *const ::c_char) -> ::c_int; + pub fn utmpname(name: *const c_char) -> c_int; pub fn setutent(); pub fn getutent() -> *mut utmp; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn fallocate(fd: ::c_int, mode: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn fallocate64(fd: ::c_int, mode: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn fallocate(fd: c_int, mode: c_int, offset: off_t, len: off_t) -> c_int; + pub fn fallocate64(fd: c_int, mode: c_int, offset: off64_t, len: off64_t) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int; pub fn getxattr( path: *const c_char, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn lgetxattr( path: *const c_char, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn fgetxattr( - filedes: ::c_int, + filedes: c_int, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn setxattr( path: *const c_char, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn lsetxattr( path: *const c_char, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn fsetxattr( - filedes: ::c_int, + filedes: c_int, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn listxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn llistxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn flistxattr(filedes: ::c_int, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; - pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int) -> ::c_int; - pub fn timerfd_create(clock: ::clockid_t, flags: ::c_int) -> ::c_int; - pub fn timerfd_gettime(fd: ::c_int, current_value: *mut itimerspec) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; + pub fn listxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn llistxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn flistxattr(filedes: c_int, list: *mut c_char, size: size_t) -> ssize_t; + pub fn removexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn lremovexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn fremovexattr(filedes: c_int, name: *const c_char) -> c_int; + pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int; + pub fn timerfd_create(clock: crate::clockid_t, flags: c_int) -> c_int; + pub fn timerfd_gettime(fd: c_int, current_value: *mut itimerspec) -> c_int; pub fn timerfd_settime( - fd: ::c_int, - flags: ::c_int, + fd: c_int, + flags: c_int, new_value: *const itimerspec, old_value: *mut itimerspec, - ) -> ::c_int; - pub fn syscall(num: ::c_long, ...) -> ::c_long; - pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, cpuset: *mut cpu_set_t) - -> ::c_int; + ) -> c_int; + pub fn syscall(num: c_long, ...) -> c_long; + pub fn sched_getaffinity( + pid: crate::pid_t, + cpusetsize: size_t, + cpuset: *mut cpu_set_t, + ) -> c_int; pub fn sched_setaffinity( - pid: ::pid_t, - cpusetsize: ::size_t, + pid: crate::pid_t, + cpusetsize: size_t, cpuset: *const cpu_set_t, - ) -> ::c_int; - pub fn epoll_create(size: ::c_int) -> ::c_int; - pub fn epoll_create1(flags: ::c_int) -> ::c_int; + ) -> c_int; + pub fn epoll_create(size: c_int) -> c_int; + pub fn epoll_create1(flags: c_int) -> c_int; pub fn epoll_wait( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - ) -> ::c_int; - pub fn epoll_ctl(epfd: ::c_int, op: ::c_int, fd: ::c_int, event: *mut ::epoll_event) - -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: c_int, + ) -> c_int; + pub fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut crate::epoll_event) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; - pub fn unshare(flags: ::c_int) -> ::c_int; - pub fn umount(target: *const ::c_char) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn tee(fd_in: ::c_int, fd_out: ::c_int, len: ::size_t, flags: ::c_uint) -> ::ssize_t; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; + pub fn unshare(flags: c_int) -> c_int; + pub fn umount(target: *const c_char) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn tee(fd_in: c_int, fd_out: c_int, len: size_t, flags: c_uint) -> ssize_t; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn splice( - fd_in: ::c_int, - off_in: *mut ::loff_t, - fd_out: ::c_int, - off_out: *mut ::loff_t, - len: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn eventfd_read(fd: ::c_int, value: *mut eventfd_t) -> ::c_int; - pub fn eventfd_write(fd: ::c_int, value: eventfd_t) -> ::c_int; - pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; - pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int; - pub fn swapoff(puath: *const ::c_char) -> ::c_int; - pub fn vmsplice( - fd: ::c_int, - iov: *const ::iovec, - nr_segs: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; + fd_in: c_int, + off_in: *mut crate::loff_t, + fd_out: c_int, + off_out: *mut crate::loff_t, + len: size_t, + flags: c_uint, + ) -> ssize_t; + pub fn eventfd(init: c_uint, flags: c_int) -> c_int; + pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int; + pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int; + pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; + pub fn setns(fd: c_int, nstype: c_int) -> c_int; + pub fn swapoff(puath: *const c_char) -> c_int; + pub fn vmsplice(fd: c_int, iov: *const crate::iovec, nr_segs: size_t, flags: c_uint) + -> ssize_t; pub fn mount( - src: *const ::c_char, - target: *const ::c_char, - fstype: *const ::c_char, - flags: ::c_ulong, - data: *const ::c_void, - ) -> ::c_int; - pub fn personality(persona: ::c_uint) -> ::c_int; - pub fn prctl(option: ::c_int, ...) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; + src: *const c_char, + target: *const c_char, + fstype: *const c_char, + flags: c_ulong, + data: *const c_void, + ) -> c_int; + pub fn personality(persona: c_uint) -> c_int; + pub fn prctl(option: c_int, ...) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; pub fn ppoll( - fds: *mut ::pollfd, + fds: *mut crate::pollfd, nfds: nfds_t, - timeout: *const ::timespec, + timeout: *const crate::timespec, sigmask: *const sigset_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; - pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_getpshared( - attr: *const ::pthread_barrierattr_t, - shared: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + shared: *mut c_int, + ) -> c_int; pub fn pthread_barrierattr_setpshared( - attr: *mut ::pthread_barrierattr_t, - shared: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_barrierattr_t, + shared: c_int, + ) -> c_int; pub fn pthread_barrier_init( barrier: *mut pthread_barrier_t, - attr: *const ::pthread_barrierattr_t, - count: ::c_uint, - ) -> ::c_int; - pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; pub fn clone( - cb: extern "C" fn(*mut ::c_void) -> ::c_int, - child_stack: *mut ::c_void, - flags: ::c_int, - arg: *mut ::c_void, + cb: extern "C" fn(*mut c_void) -> c_int, + child_stack: *mut c_void, + flags: c_int, + arg: *mut c_void, ... - ) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + ) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getinheritsched( - attr: *const ::pthread_attr_t, - flag: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_attr_setinheritsched(attr: *mut ::pthread_attr_t, flag: ::c_int) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; + attr: *const crate::pthread_attr_t, + flag: *mut c_int, + ) -> c_int; + pub fn pthread_attr_setinheritsched(attr: *mut crate::pthread_attr_t, flag: c_int) -> c_int; + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int; - pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn sysinfo(info: *mut crate::sysinfo) -> c_int; + pub fn umount2(target: *const c_char, flags: c_int) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn swapon(path: *const c_char, swapflags: c_int) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sendfile( - out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut ::off_t, - count: ::size_t, - ) -> ::ssize_t; - pub fn sendfile64( - out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut ::off64_t, - count: ::size_t, - ) -> ::ssize_t; - pub fn setfsgid(gid: ::gid_t) -> ::c_int; - pub fn setfsuid(uid: ::uid_t) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn sendfile(out_fd: c_int, in_fd: c_int, offset: *mut off_t, count: size_t) -> ssize_t; + pub fn sendfile64(out_fd: c_int, in_fd: c_int, offset: *mut off64_t, count: size_t) -> ssize_t; + pub fn setfsgid(gid: crate::gid_t) -> c_int; + pub fn setfsuid(uid: crate::uid_t) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrouplist( - user: *const ::c_char, - group: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; - pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; + user: *const c_char, + group: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; + pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; - pub fn __errno() -> *mut ::c_int; - pub fn inotify_rm_watch(fd: ::c_int, wd: u32) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; + pub fn __errno() -> *mut c_int; + pub fn inotify_rm_watch(fd: c_int, wd: u32) -> c_int; pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *const ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - ) -> ::c_int; + sockfd: c_int, + msgvec: *const crate::mmsghdr, + vlen: c_uint, + flags: c_int, + ) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn inotify_init() -> ::c_int; - pub fn inotify_init1(flags: ::c_int) -> ::c_int; - pub fn inotify_add_watch(fd: ::c_int, path: *const ::c_char, mask: u32) -> ::c_int; - - pub fn regcomp(preg: *mut ::regex_t, pattern: *const ::c_char, cflags: ::c_int) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn inotify_init() -> c_int; + pub fn inotify_init1(flags: c_int) -> c_int; + pub fn inotify_add_watch(fd: c_int, path: *const c_char, mask: u32) -> c_int; + + pub fn regcomp(preg: *mut crate::regex_t, pattern: *const c_char, cflags: c_int) -> c_int; pub fn regexec( - preg: *const ::regex_t, - input: *const ::c_char, - nmatch: ::size_t, + preg: *const crate::regex_t, + input: *const c_char, + nmatch: size_t, pmatch: *mut regmatch_t, - eflags: ::c_int, - ) -> ::c_int; + eflags: c_int, + ) -> c_int; pub fn regerror( - errcode: ::c_int, - preg: *const ::regex_t, - errbuf: *mut ::c_char, - errbuf_size: ::size_t, - ) -> ::size_t; + errcode: c_int, + preg: *const crate::regex_t, + errbuf: *mut c_char, + errbuf_size: size_t, + ) -> size_t; - pub fn regfree(preg: *mut ::regex_t); + pub fn regfree(preg: *mut crate::regex_t); - pub fn android_set_abort_message(msg: *const ::c_char); + pub fn android_set_abort_message(msg: *const c_char); - pub fn gettid() -> ::pid_t; + pub fn gettid() -> crate::pid_t; /// Only available in API Version 28+ - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; - pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int; + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; - pub fn __system_property_set(__name: *const ::c_char, __value: *const ::c_char) -> ::c_int; - pub fn __system_property_get(__name: *const ::c_char, __value: *mut ::c_char) -> ::c_int; - pub fn __system_property_find(__name: *const ::c_char) -> *const prop_info; - pub fn __system_property_find_nth(__n: ::c_uint) -> *const prop_info; + pub fn __system_property_set(__name: *const c_char, __value: *const c_char) -> c_int; + pub fn __system_property_get(__name: *const c_char, __value: *mut c_char) -> c_int; + pub fn __system_property_find(__name: *const c_char) -> *const prop_info; + pub fn __system_property_find_nth(__n: c_uint) -> *const prop_info; pub fn __system_property_foreach( - __callback: unsafe extern "C" fn(__pi: *const prop_info, __cookie: *mut ::c_void), - __cookie: *mut ::c_void, - ) -> ::c_int; + __callback: unsafe extern "C" fn(__pi: *const prop_info, __cookie: *mut c_void), + __cookie: *mut c_void, + ) -> c_int; // #include /// Only available in API Version 21+ pub fn dl_iterate_phdr( - callback: ::Option< - unsafe extern "C" fn( - info: *mut dl_phdr_info, - size: usize, - data: *mut ::c_void, - ) -> ::c_int, + callback: Option< + unsafe extern "C" fn(info: *mut dl_phdr_info, size: usize, data: *mut c_void) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; pub fn arc4random() -> u32; pub fn arc4random_uniform(__upper_bound: u32) -> u32; - pub fn arc4random_buf(__buf: *mut ::c_void, __n: ::size_t); + pub fn arc4random_buf(__buf: *mut c_void, __n: size_t); - pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; - pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; - pub fn dirname(path: *const ::c_char) -> *mut ::c_char; - pub fn basename(path: *const ::c_char) -> *mut ::c_char; + pub fn dirname(path: *const c_char) -> *mut c_char; + pub fn basename(path: *const c_char) -> *mut c_char; pub fn getopt_long( - argc: ::c_int, + argc: c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, - longindex: *mut ::c_int, - ) -> ::c_int; + longindex: *mut c_int, + ) -> c_int; pub fn sync(); - pub fn syncfs(fd: ::c_int) -> ::c_int; + pub fn syncfs(fd: c_int) -> c_int; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; pub fn fread_unlocked( - buf: *mut ::c_void, - size: ::size_t, - nobj: ::size_t, - stream: *mut ::FILE, - ) -> ::size_t; + buf: *mut c_void, + size: size_t, + nobj: size_t, + stream: *mut crate::FILE, + ) -> size_t; pub fn fwrite_unlocked( - buf: *const ::c_void, - size: ::size_t, - nobj: ::size_t, - stream: *mut ::FILE, - ) -> ::size_t; - pub fn fflush_unlocked(stream: *mut ::FILE) -> ::c_int; - pub fn fgets_unlocked(buf: *mut ::c_char, size: ::c_int, stream: *mut ::FILE) -> *mut ::c_char; + buf: *const c_void, + size: size_t, + nobj: size_t, + stream: *mut crate::FILE, + ) -> size_t; + pub fn fflush_unlocked(stream: *mut crate::FILE) -> c_int; + pub fn fgets_unlocked(buf: *mut c_char, size: c_int, stream: *mut crate::FILE) -> *mut c_char; - pub fn klogctl(syslog_type: ::c_int, bufp: *mut ::c_char, len: ::c_int) -> ::c_int; + pub fn klogctl(syslog_type: c_int, bufp: *mut c_char, len: c_int) -> c_int; - pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int; + pub fn memfd_create(name: *const c_char, flags: c_uint) -> c_int; pub fn renameat2( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - flags: ::c_uint, - ) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + flags: c_uint, + ) -> c_int; } cfg_if! { @@ -4145,26 +4128,26 @@ cfg_if! { } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { #[repr(C)] struct siginfo_sigfault { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - si_addr: *mut ::c_void, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + si_addr: *mut c_void, } (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - _si_tid: ::c_int, - _si_overrun: ::c_int, - si_sigval: ::sigval, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + _si_tid: c_int, + _si_overrun: c_int, + si_sigval: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_timer)).si_sigval } @@ -4173,14 +4156,14 @@ impl siginfo_t { // Internal, for casts to access union fields #[repr(C)] struct sifields_sigchld { - si_pid: ::pid_t, - si_uid: ::uid_t, - si_status: ::c_int, - si_utime: ::c_long, - si_stime: ::c_long, + si_pid: crate::pid_t, + si_uid: crate::uid_t, + si_status: c_int, + si_utime: c_long, + si_stime: c_long, } -impl ::Copy for sifields_sigchld {} -impl ::Clone for sifields_sigchld { +impl Copy for sifields_sigchld {} +impl Clone for sifields_sigchld { fn clone(&self) -> sifields_sigchld { *self } @@ -4189,7 +4172,7 @@ impl ::Clone for sifields_sigchld { // Internal, for casts to access union fields #[repr(C)] union sifields { - _align_pointer: *mut ::c_void, + _align_pointer: *mut c_void, sigchld: sifields_sigchld, } @@ -4198,7 +4181,7 @@ union sifields { // sifields vary on 32-bit and 64-bit architectures. #[repr(C)] struct siginfo_f { - _siginfo_base: [::c_int; 3], + _siginfo_base: [c_int; 3], sifields: sifields, } @@ -4207,23 +4190,23 @@ impl siginfo_t { &(*(self as *const siginfo_t as *const siginfo_f)).sifields } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.sifields().sigchld.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.sifields().sigchld.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.sifields().sigchld.si_status } - pub unsafe fn si_utime(&self) -> ::c_long { + pub unsafe fn si_utime(&self) -> c_long { self.sifields().sigchld.si_utime } - pub unsafe fn si_stime(&self) -> ::c_long { + pub unsafe fn si_stime(&self) -> c_long { self.sifields().sigchld.si_stime } } diff --git a/src/unix/linux_like/emscripten/lfs64.rs b/src/unix/linux_like/emscripten/lfs64.rs index c4cdfb849a2ff..70d10dba393b1 100644 --- a/src/unix/linux_like/emscripten/lfs64.rs +++ b/src/unix/linux_like/emscripten/lfs64.rs @@ -1,103 +1,105 @@ +use crate::{c_char, c_int, c_void, off64_t, size_t, ssize_t}; + // In-sync with ../linux/musl/lfs64.rs except for fallocate64, prlimit64 and sendfile64 #[inline] -pub unsafe extern "C" fn creat64(path: *const ::c_char, mode: ::mode_t) -> ::c_int { - ::creat(path, mode) +pub unsafe extern "C" fn creat64(path: *const c_char, mode: crate::mode_t) -> c_int { + crate::creat(path, mode) } #[inline] -pub unsafe extern "C" fn fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int { - ::fgetpos(stream, pos as *mut _) +pub unsafe extern "C" fn fgetpos64(stream: *mut crate::FILE, pos: *mut crate::fpos64_t) -> c_int { + crate::fgetpos(stream, pos as *mut _) } #[inline] -pub unsafe extern "C" fn fopen64(pathname: *const ::c_char, mode: *const ::c_char) -> *mut ::FILE { - ::fopen(pathname, mode) +pub unsafe extern "C" fn fopen64(pathname: *const c_char, mode: *const c_char) -> *mut crate::FILE { + crate::fopen(pathname, mode) } #[inline] pub unsafe extern "C" fn freopen64( - pathname: *const ::c_char, - mode: *const ::c_char, - stream: *mut ::FILE, -) -> *mut ::FILE { - ::freopen(pathname, mode, stream) + pathname: *const c_char, + mode: *const c_char, + stream: *mut crate::FILE, +) -> *mut crate::FILE { + crate::freopen(pathname, mode, stream) } #[inline] pub unsafe extern "C" fn fseeko64( - stream: *mut ::FILE, - offset: ::off64_t, - whence: ::c_int, -) -> ::c_int { - ::fseeko(stream, offset, whence) + stream: *mut crate::FILE, + offset: off64_t, + whence: c_int, +) -> c_int { + crate::fseeko(stream, offset, whence) } #[inline] -pub unsafe extern "C" fn fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int { - ::fsetpos(stream, pos as *mut _) +pub unsafe extern "C" fn fsetpos64(stream: *mut crate::FILE, pos: *const crate::fpos64_t) -> c_int { + crate::fsetpos(stream, pos as *mut _) } #[inline] -pub unsafe extern "C" fn fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int { - ::fstat(fildes, buf as *mut _) +pub unsafe extern "C" fn fstat64(fildes: c_int, buf: *mut crate::stat64) -> c_int { + crate::fstat(fildes, buf as *mut _) } #[inline] pub unsafe extern "C" fn fstatat64( - fd: ::c_int, - path: *const ::c_char, - buf: *mut ::stat64, - flag: ::c_int, -) -> ::c_int { - ::fstatat(fd, path, buf as *mut _, flag) + fd: c_int, + path: *const c_char, + buf: *mut crate::stat64, + flag: c_int, +) -> c_int { + crate::fstatat(fd, path, buf as *mut _, flag) } #[inline] -pub unsafe extern "C" fn fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int { - ::fstatfs(fd, buf as *mut _) +pub unsafe extern "C" fn fstatfs64(fd: c_int, buf: *mut crate::statfs64) -> c_int { + crate::fstatfs(fd, buf as *mut _) } #[inline] -pub unsafe extern "C" fn fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int { - ::fstatvfs(fd, buf as *mut _) +pub unsafe extern "C" fn fstatvfs64(fd: c_int, buf: *mut crate::statvfs64) -> c_int { + crate::fstatvfs(fd, buf as *mut _) } #[inline] -pub unsafe extern "C" fn ftello64(stream: *mut ::FILE) -> ::off64_t { - ::ftello(stream) +pub unsafe extern "C" fn ftello64(stream: *mut crate::FILE) -> off64_t { + crate::ftello(stream) } #[inline] -pub unsafe extern "C" fn ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int { - ::ftruncate(fd, length) +pub unsafe extern "C" fn ftruncate64(fd: c_int, length: off64_t) -> c_int { + crate::ftruncate(fd, length) } #[inline] -pub unsafe extern "C" fn getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int { - ::getrlimit(resource, rlim as *mut _) +pub unsafe extern "C" fn getrlimit64(resource: c_int, rlim: *mut crate::rlimit64) -> c_int { + crate::getrlimit(resource, rlim as *mut _) } #[inline] -pub unsafe extern "C" fn lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int) -> ::off64_t { - ::lseek(fd, offset, whence) +pub unsafe extern "C" fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> off64_t { + crate::lseek(fd, offset, whence) } #[inline] -pub unsafe extern "C" fn lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int { - ::lstat(path, buf as *mut _) +pub unsafe extern "C" fn lstat64(path: *const c_char, buf: *mut crate::stat64) -> c_int { + crate::lstat(path, buf as *mut _) } #[inline] pub unsafe extern "C" fn mmap64( - addr: *mut ::c_void, - length: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, - offset: ::off64_t, -) -> *mut ::c_void { - ::mmap(addr, length, prot, flags, fd, offset) + addr: *mut c_void, + length: size_t, + prot: c_int, + flags: c_int, + fd: c_int, + offset: off64_t, +) -> *mut c_void { + crate::mmap(addr, length, prot, flags, fd, offset) } // These functions are variadic in the C ABI since the `mode` argument is "optional". Variadic @@ -106,107 +108,103 @@ pub unsafe extern "C" fn mmap64( // // These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an // argument, nor do their names clash with any declared types. -pub use {open as open64, openat as openat64}; +pub use crate::{open as open64, openat as openat64}; #[inline] pub unsafe extern "C" fn posix_fadvise64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, - advice: ::c_int, -) -> ::c_int { - ::posix_fadvise(fd, offset, len, advice) + fd: c_int, + offset: off64_t, + len: off64_t, + advice: c_int, +) -> c_int { + crate::posix_fadvise(fd, offset, len, advice) } #[inline] -pub unsafe extern "C" fn posix_fallocate64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, -) -> ::c_int { - ::posix_fallocate(fd, offset, len) +pub unsafe extern "C" fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int { + crate::posix_fallocate(fd, offset, len) } #[inline] pub unsafe extern "C" fn pread64( - fd: ::c_int, - buf: *mut ::c_void, - count: ::size_t, - offset: ::off64_t, -) -> ::ssize_t { - ::pread(fd, buf, count, offset) + fd: c_int, + buf: *mut c_void, + count: size_t, + offset: off64_t, +) -> ssize_t { + crate::pread(fd, buf, count, offset) } #[inline] pub unsafe extern "C" fn preadv64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, -) -> ::ssize_t { - ::preadv(fd, iov, iovcnt, offset) + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, +) -> ssize_t { + crate::preadv(fd, iov, iovcnt, offset) } #[inline] pub unsafe extern "C" fn pwrite64( - fd: ::c_int, - buf: *const ::c_void, - count: ::size_t, - offset: ::off64_t, -) -> ::ssize_t { - ::pwrite(fd, buf, count, offset) + fd: c_int, + buf: *const c_void, + count: size_t, + offset: off64_t, +) -> ssize_t { + crate::pwrite(fd, buf, count, offset) } #[inline] pub unsafe extern "C" fn pwritev64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, -) -> ::ssize_t { - ::pwritev(fd, iov, iovcnt, offset) + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, +) -> ssize_t { + crate::pwritev(fd, iov, iovcnt, offset) } #[inline] -pub unsafe extern "C" fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64 { - ::readdir(dirp) as *mut _ +pub unsafe extern "C" fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64 { + crate::readdir(dirp) as *mut _ } #[inline] pub unsafe extern "C" fn readdir64_r( - dirp: *mut ::DIR, - entry: *mut ::dirent64, - result: *mut *mut ::dirent64, -) -> ::c_int { - ::readdir_r(dirp, entry as *mut _, result as *mut _) + dirp: *mut crate::DIR, + entry: *mut crate::dirent64, + result: *mut *mut crate::dirent64, +) -> c_int { + crate::readdir_r(dirp, entry as *mut _, result as *mut _) } #[inline] -pub unsafe extern "C" fn setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int { - ::setrlimit(resource, rlim as *mut _) +pub unsafe extern "C" fn setrlimit64(resource: c_int, rlim: *const crate::rlimit64) -> c_int { + crate::setrlimit(resource, rlim as *mut _) } #[inline] -pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int { - ::stat(pathname, statbuf as *mut _) +pub unsafe extern "C" fn stat64(pathname: *const c_char, statbuf: *mut crate::stat64) -> c_int { + crate::stat(pathname, statbuf as *mut _) } #[inline] -pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int { - ::statfs(pathname, buf as *mut _) +pub unsafe extern "C" fn statfs64(pathname: *const c_char, buf: *mut crate::statfs64) -> c_int { + crate::statfs(pathname, buf as *mut _) } #[inline] -pub unsafe extern "C" fn statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int { - ::statvfs(path, buf as *mut _) +pub unsafe extern "C" fn statvfs64(path: *const c_char, buf: *mut crate::statvfs64) -> c_int { + crate::statvfs(path, buf as *mut _) } #[inline] -pub unsafe extern "C" fn tmpfile64() -> *mut ::FILE { - ::tmpfile() +pub unsafe extern "C" fn tmpfile64() -> *mut crate::FILE { + crate::tmpfile() } #[inline] -pub unsafe extern "C" fn truncate64(path: *const ::c_char, length: ::off64_t) -> ::c_int { - ::truncate(path, length) +pub unsafe extern "C" fn truncate64(path: *const c_char, length: off64_t) -> c_int { + crate::truncate(path, length) } diff --git a/src/unix/linux_like/emscripten/mod.rs b/src/unix/linux_like/emscripten/mod.rs index a6666c6a61d51..f997d438aaf54 100644 --- a/src/unix/linux_like/emscripten/mod.rs +++ b/src/unix/linux_like/emscripten/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_double, c_int, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t}; + pub type c_char = i8; pub type wchar_t = i32; pub type useconds_t = u32; @@ -5,15 +7,15 @@ pub type dev_t = u32; pub type socklen_t = u32; pub type pthread_t = c_ulong; pub type mode_t = u32; -pub type shmatt_t = ::c_ulong; -pub type mqd_t = ::c_int; -pub type msgqnum_t = ::c_ulong; -pub type msglen_t = ::c_ulong; -pub type nfds_t = ::c_ulong; -pub type nl_item = ::c_int; -pub type idtype_t = ::c_uint; +pub type shmatt_t = c_ulong; +pub type mqd_t = c_int; +pub type msgqnum_t = c_ulong; +pub type msglen_t = c_ulong; +pub type nfds_t = c_ulong; +pub type nl_item = c_int; +pub type idtype_t = c_uint; pub type loff_t = i64; -pub type pthread_key_t = ::c_uint; +pub type pthread_key_t = c_uint; pub type clock_t = c_long; pub type time_t = i64; @@ -30,22 +32,22 @@ pub type c_long = i32; pub type c_ulong = u32; pub type nlink_t = u32; -pub type ino64_t = ::ino_t; -pub type off64_t = ::off_t; -pub type blkcnt64_t = ::blkcnt_t; -pub type rlim64_t = ::rlim_t; +pub type ino64_t = crate::ino_t; +pub type off64_t = off_t; +pub type blkcnt64_t = crate::blkcnt_t; +pub type rlim64_t = crate::rlim_t; -pub type rlimit64 = ::rlimit; -pub type flock64 = ::flock; -pub type stat64 = ::stat; -pub type statfs64 = ::statfs; -pub type statvfs64 = ::statvfs; -pub type dirent64 = ::dirent; +pub type rlimit64 = crate::rlimit; +pub type flock64 = crate::flock; +pub type stat64 = crate::stat; +pub type statfs64 = crate::statfs; +pub type statvfs64 = crate::statvfs; +pub type dirent64 = crate::dirent; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos64_t {} // FIXME: fill this out with a struct -impl ::Copy for fpos64_t {} -impl ::Clone for fpos64_t { +impl Copy for fpos64_t {} +impl Clone for fpos64_t { fn clone(&self) -> fpos64_t { *self } @@ -53,54 +55,54 @@ impl ::Clone for fpos64_t { s! { pub struct glob_t { - pub gl_pathc: ::size_t, + pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + pub gl_offs: size_t, + pub gl_flags: c_int, + + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct spwd { - pub sp_namp: *mut ::c_char, - pub sp_pwdp: *mut ::c_char, - pub sp_lstchg: ::c_long, - pub sp_min: ::c_long, - pub sp_max: ::c_long, - pub sp_warn: ::c_long, - pub sp_inact: ::c_long, - pub sp_expire: ::c_long, - pub sp_flag: ::c_ulong, + pub sp_namp: *mut c_char, + pub sp_pwdp: *mut c_char, + pub sp_lstchg: c_long, + pub sp_min: c_long, + pub sp_max: c_long, + pub sp_warn: c_long, + pub sp_inact: c_long, + pub sp_expire: c_long, + pub sp_flag: c_ulong, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct signalfd_siginfo { @@ -129,7 +131,7 @@ s! { } pub struct fsid_t { - __val: [::c_int; 2], + __val: [c_int; 2], } pub struct cpu_set_t { @@ -137,64 +139,64 @@ s! { } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } // System V IPC pub struct msginfo { - pub msgpool: ::c_int, - pub msgmap: ::c_int, - pub msgmax: ::c_int, - pub msgmnb: ::c_int, - pub msgmni: ::c_int, - pub msgssz: ::c_int, - pub msgtql: ::c_int, - pub msgseg: ::c_ushort, + pub msgpool: c_int, + pub msgmap: c_int, + pub msgmax: c_int, + pub msgmnb: c_int, + pub msgmni: c_int, + pub msgssz: c_int, + pub msgtql: c_int, + pub msgseg: c_ushort, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - pub __c_ispeed: ::speed_t, - pub __c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub __c_ispeed: crate::speed_t, + pub __c_ospeed: crate::speed_t, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct pthread_attr_t { @@ -202,183 +204,183 @@ s! { } pub struct sigset_t { - __val: [::c_ulong; 32], + __val: [c_ulong; 32], } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct sem_t { - __val: [::c_int; 4], + __val: [c_int; 4], } pub struct stat { - pub st_dev: ::dev_t, + pub st_dev: crate::dev_t, #[cfg(not(emscripten_new_stat_abi))] - __st_dev_padding: ::c_int, + __st_dev_padding: c_int, #[cfg(not(emscripten_new_stat_abi))] - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, + __st_ino_truncated: c_long, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, #[cfg(not(emscripten_new_stat_abi))] - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino_t, + __st_rdev_padding: c_int, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino_t, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_frsize: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 4], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct arpd_request { - pub req: ::c_ushort, + pub req: c_ushort, pub ip: u32, - pub dev: ::c_ulong, - pub stamp: ::c_ulong, - pub updated: ::c_ulong, - pub ha: [::c_uchar; ::MAX_ADDR_LEN], + pub dev: c_ulong, + pub stamp: c_ulong, + pub updated: c_ulong, + pub ha: [c_uchar; crate::MAX_ADDR_LEN], } #[allow(missing_debug_implementations)] #[repr(align(4))] pub struct pthread_mutex_t { - size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEX_T], } #[repr(align(4))] pub struct pthread_rwlock_t { - size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T], } #[repr(align(4))] pub struct pthread_mutexattr_t { - size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], } #[repr(align(4))] pub struct pthread_rwlockattr_t { - size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T], } #[repr(align(4))] pub struct pthread_condattr_t { - size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], } } s_no_extra_traits! { pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_ino: crate::ino_t, + pub d_off: off_t, + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct sysinfo { - pub uptime: ::c_ulong, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub __reserved: [::c_char; 256], + pub uptime: c_ulong, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub __reserved: [c_char; 256], } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, - pad: [::c_long; 4], + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, + pad: [c_long; 4], } #[cfg_attr(target_pointer_width = "32", repr(align(4)))] #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct pthread_cond_t { - size: [u8; ::__SIZEOF_PTHREAD_COND_T], + size: [u8; crate::__SIZEOF_PTHREAD_COND_T], } #[allow(missing_debug_implementations)] @@ -404,8 +406,8 @@ cfg_if! { } } impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -415,8 +417,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -448,8 +450,8 @@ cfg_if! { } } impl Eq for sysinfo {} - impl ::fmt::Debug for sysinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sysinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sysinfo") .field("uptime", &self.uptime) .field("loads", &self.loads) @@ -468,8 +470,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sysinfo { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sysinfo { + fn hash(&self, state: &mut H) { self.uptime.hash(state); self.loads.hash(state); self.totalram.hash(state); @@ -496,8 +498,8 @@ cfg_if! { } } impl Eq for mq_attr {} - impl ::fmt::Debug for mq_attr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mq_attr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mq_attr") .field("mq_flags", &self.mq_flags) .field("mq_maxmsg", &self.mq_maxmsg) @@ -506,8 +508,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mq_attr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mq_attr { + fn hash(&self, state: &mut H) { self.mq_flags.hash(state); self.mq_maxmsg.hash(state); self.mq_msgsize.hash(state); @@ -521,309 +523,309 @@ cfg_if! { } } impl Eq for pthread_cond_t {} - impl ::fmt::Debug for pthread_cond_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_cond_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_cond_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_cond_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_cond_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } } } -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MS_NOUSER: ::c_ulong = 0x80000000; -pub const MS_RMT_MASK: ::c_ulong = 0x02800051; - -pub const ABDAY_1: ::nl_item = 0x20000; -pub const ABDAY_2: ::nl_item = 0x20001; -pub const ABDAY_3: ::nl_item = 0x20002; -pub const ABDAY_4: ::nl_item = 0x20003; -pub const ABDAY_5: ::nl_item = 0x20004; -pub const ABDAY_6: ::nl_item = 0x20005; -pub const ABDAY_7: ::nl_item = 0x20006; - -pub const DAY_1: ::nl_item = 0x20007; -pub const DAY_2: ::nl_item = 0x20008; -pub const DAY_3: ::nl_item = 0x20009; -pub const DAY_4: ::nl_item = 0x2000A; -pub const DAY_5: ::nl_item = 0x2000B; -pub const DAY_6: ::nl_item = 0x2000C; -pub const DAY_7: ::nl_item = 0x2000D; - -pub const ABMON_1: ::nl_item = 0x2000E; -pub const ABMON_2: ::nl_item = 0x2000F; -pub const ABMON_3: ::nl_item = 0x20010; -pub const ABMON_4: ::nl_item = 0x20011; -pub const ABMON_5: ::nl_item = 0x20012; -pub const ABMON_6: ::nl_item = 0x20013; -pub const ABMON_7: ::nl_item = 0x20014; -pub const ABMON_8: ::nl_item = 0x20015; -pub const ABMON_9: ::nl_item = 0x20016; -pub const ABMON_10: ::nl_item = 0x20017; -pub const ABMON_11: ::nl_item = 0x20018; -pub const ABMON_12: ::nl_item = 0x20019; - -pub const MON_1: ::nl_item = 0x2001A; -pub const MON_2: ::nl_item = 0x2001B; -pub const MON_3: ::nl_item = 0x2001C; -pub const MON_4: ::nl_item = 0x2001D; -pub const MON_5: ::nl_item = 0x2001E; -pub const MON_6: ::nl_item = 0x2001F; -pub const MON_7: ::nl_item = 0x20020; -pub const MON_8: ::nl_item = 0x20021; -pub const MON_9: ::nl_item = 0x20022; -pub const MON_10: ::nl_item = 0x20023; -pub const MON_11: ::nl_item = 0x20024; -pub const MON_12: ::nl_item = 0x20025; - -pub const AM_STR: ::nl_item = 0x20026; -pub const PM_STR: ::nl_item = 0x20027; - -pub const D_T_FMT: ::nl_item = 0x20028; -pub const D_FMT: ::nl_item = 0x20029; -pub const T_FMT: ::nl_item = 0x2002A; -pub const T_FMT_AMPM: ::nl_item = 0x2002B; - -pub const ERA: ::nl_item = 0x2002C; -pub const ERA_D_FMT: ::nl_item = 0x2002E; -pub const ALT_DIGITS: ::nl_item = 0x2002F; -pub const ERA_D_T_FMT: ::nl_item = 0x20030; -pub const ERA_T_FMT: ::nl_item = 0x20031; - -pub const CODESET: ::nl_item = 14; - -pub const CRNCYSTR: ::nl_item = 0x4000F; - -pub const RUSAGE_THREAD: ::c_int = 1; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const RADIXCHAR: ::nl_item = 0x10000; -pub const THOUSEP: ::nl_item = 0x10001; - -pub const YESEXPR: ::nl_item = 0x50000; -pub const NOEXPR: ::nl_item = 0x50001; -pub const YESSTR: ::nl_item = 0x50002; -pub const NOSTR: ::nl_item = 0x50003; - -pub const FILENAME_MAX: ::c_uint = 4096; -pub const L_tmpnam: ::c_uint = 20; -pub const _PC_LINK_MAX: ::c_int = 0; -pub const _PC_MAX_CANON: ::c_int = 1; -pub const _PC_MAX_INPUT: ::c_int = 2; -pub const _PC_NAME_MAX: ::c_int = 3; -pub const _PC_PATH_MAX: ::c_int = 4; -pub const _PC_PIPE_BUF: ::c_int = 5; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 6; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_SYNC_IO: ::c_int = 9; -pub const _PC_ASYNC_IO: ::c_int = 10; -pub const _PC_PRIO_IO: ::c_int = 11; -pub const _PC_SOCK_MAXBUF: ::c_int = 12; -pub const _PC_FILESIZEBITS: ::c_int = 13; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18; -pub const _PC_SYMLINK_MAX: ::c_int = 19; -pub const _PC_2_SYMLINKS: ::c_int = 20; - -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; -pub const _SC_JOB_CONTROL: ::c_int = 7; -pub const _SC_SAVED_IDS: ::c_int = 8; -pub const _SC_REALTIME_SIGNALS: ::c_int = 9; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; -pub const _SC_TIMERS: ::c_int = 11; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; -pub const _SC_PRIORITIZED_IO: ::c_int = 13; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; -pub const _SC_FSYNC: ::c_int = 15; -pub const _SC_MAPPED_FILES: ::c_int = 16; -pub const _SC_MEMLOCK: ::c_int = 17; -pub const _SC_MEMLOCK_RANGE: ::c_int = 18; -pub const _SC_MEMORY_PROTECTION: ::c_int = 19; -pub const _SC_MESSAGE_PASSING: ::c_int = 20; -pub const _SC_SEMAPHORES: ::c_int = 21; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; -pub const _SC_AIO_MAX: ::c_int = 24; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; -pub const _SC_DELAYTIMER_MAX: ::c_int = 26; -pub const _SC_MQ_OPEN_MAX: ::c_int = 27; -pub const _SC_MQ_PRIO_MAX: ::c_int = 28; -pub const _SC_VERSION: ::c_int = 29; -pub const _SC_PAGESIZE: ::c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_RTSIG_MAX: ::c_int = 31; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; -pub const _SC_SEM_VALUE_MAX: ::c_int = 33; -pub const _SC_SIGQUEUE_MAX: ::c_int = 34; -pub const _SC_TIMER_MAX: ::c_int = 35; -pub const _SC_BC_BASE_MAX: ::c_int = 36; -pub const _SC_BC_DIM_MAX: ::c_int = 37; -pub const _SC_BC_SCALE_MAX: ::c_int = 38; -pub const _SC_BC_STRING_MAX: ::c_int = 39; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; -pub const _SC_EXPR_NEST_MAX: ::c_int = 42; -pub const _SC_LINE_MAX: ::c_int = 43; -pub const _SC_RE_DUP_MAX: ::c_int = 44; -pub const _SC_2_VERSION: ::c_int = 46; -pub const _SC_2_C_BIND: ::c_int = 47; -pub const _SC_2_C_DEV: ::c_int = 48; -pub const _SC_2_FORT_DEV: ::c_int = 49; -pub const _SC_2_FORT_RUN: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_LOCALEDEF: ::c_int = 52; -pub const _SC_UIO_MAXIOV: ::c_int = 60; -pub const _SC_IOV_MAX: ::c_int = 60; -pub const _SC_THREADS: ::c_int = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; -pub const _SC_TTY_NAME_MAX: ::c_int = 72; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; -pub const _SC_THREAD_STACK_MIN: ::c_int = 75; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82; -pub const _SC_NPROCESSORS_CONF: ::c_int = 83; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; -pub const _SC_PHYS_PAGES: ::c_int = 85; -pub const _SC_AVPHYS_PAGES: ::c_int = 86; -pub const _SC_ATEXIT_MAX: ::c_int = 87; -pub const _SC_PASS_MAX: ::c_int = 88; -pub const _SC_XOPEN_VERSION: ::c_int = 89; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; -pub const _SC_XOPEN_UNIX: ::c_int = 91; -pub const _SC_XOPEN_CRYPT: ::c_int = 92; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; -pub const _SC_XOPEN_SHM: ::c_int = 94; -pub const _SC_2_CHAR_TERM: ::c_int = 95; -pub const _SC_2_UPE: ::c_int = 97; -pub const _SC_XOPEN_XPG2: ::c_int = 98; -pub const _SC_XOPEN_XPG3: ::c_int = 99; -pub const _SC_XOPEN_XPG4: ::c_int = 100; -pub const _SC_NZERO: ::c_int = 109; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 127; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; -pub const _SC_XOPEN_LEGACY: ::c_int = 129; -pub const _SC_XOPEN_REALTIME: ::c_int = 130; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; -pub const _SC_ADVISORY_INFO: ::c_int = 132; -pub const _SC_BARRIERS: ::c_int = 133; -pub const _SC_CLOCK_SELECTION: ::c_int = 137; -pub const _SC_CPUTIME: ::c_int = 138; -pub const _SC_THREAD_CPUTIME: ::c_int = 139; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 149; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 153; -pub const _SC_SPIN_LOCKS: ::c_int = 154; -pub const _SC_REGEXP: ::c_int = 155; -pub const _SC_SHELL: ::c_int = 157; -pub const _SC_SPAWN: ::c_int = 159; -pub const _SC_SPORADIC_SERVER: ::c_int = 160; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161; -pub const _SC_TIMEOUTS: ::c_int = 164; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165; -pub const _SC_2_PBS: ::c_int = 168; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169; -pub const _SC_2_PBS_LOCATE: ::c_int = 170; -pub const _SC_2_PBS_MESSAGE: ::c_int = 171; -pub const _SC_2_PBS_TRACK: ::c_int = 172; -pub const _SC_SYMLOOP_MAX: ::c_int = 173; -pub const _SC_STREAMS: ::c_int = 174; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175; -pub const _SC_V6_ILP32_OFF32: ::c_int = 176; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177; -pub const _SC_V6_LP64_OFF64: ::c_int = 178; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179; -pub const _SC_HOST_NAME_MAX: ::c_int = 180; -pub const _SC_TRACE: ::c_int = 181; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182; -pub const _SC_TRACE_INHERIT: ::c_int = 183; -pub const _SC_TRACE_LOG: ::c_int = 184; -pub const _SC_IPV6: ::c_int = 235; -pub const _SC_RAW_SOCKETS: ::c_int = 236; -pub const _SC_V7_ILP32_OFF32: ::c_int = 237; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238; -pub const _SC_V7_LP64_OFF64: ::c_int = 239; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240; -pub const _SC_SS_REPL_MAX: ::c_int = 241; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242; -pub const _SC_TRACE_NAME_MAX: ::c_int = 243; -pub const _SC_TRACE_SYS_MAX: ::c_int = 244; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245; -pub const _SC_XOPEN_STREAMS: ::c_int = 246; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248; - -pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; -pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; - -pub const GLOB_ERR: ::c_int = 1 << 0; -pub const GLOB_MARK: ::c_int = 1 << 1; -pub const GLOB_NOSORT: ::c_int = 1 << 2; -pub const GLOB_DOOFFS: ::c_int = 1 << 3; -pub const GLOB_NOCHECK: ::c_int = 1 << 4; -pub const GLOB_APPEND: ::c_int = 1 << 5; -pub const GLOB_NOESCAPE: ::c_int = 1 << 6; - -pub const GLOB_NOSPACE: ::c_int = 1; -pub const GLOB_ABORTED: ::c_int = 2; -pub const GLOB_NOMATCH: ::c_int = 3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; - -pub const AT_EACCESS: ::c_int = 0x200; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MS_NOUSER: c_ulong = 0x80000000; +pub const MS_RMT_MASK: c_ulong = 0x02800051; + +pub const ABDAY_1: crate::nl_item = 0x20000; +pub const ABDAY_2: crate::nl_item = 0x20001; +pub const ABDAY_3: crate::nl_item = 0x20002; +pub const ABDAY_4: crate::nl_item = 0x20003; +pub const ABDAY_5: crate::nl_item = 0x20004; +pub const ABDAY_6: crate::nl_item = 0x20005; +pub const ABDAY_7: crate::nl_item = 0x20006; + +pub const DAY_1: crate::nl_item = 0x20007; +pub const DAY_2: crate::nl_item = 0x20008; +pub const DAY_3: crate::nl_item = 0x20009; +pub const DAY_4: crate::nl_item = 0x2000A; +pub const DAY_5: crate::nl_item = 0x2000B; +pub const DAY_6: crate::nl_item = 0x2000C; +pub const DAY_7: crate::nl_item = 0x2000D; + +pub const ABMON_1: crate::nl_item = 0x2000E; +pub const ABMON_2: crate::nl_item = 0x2000F; +pub const ABMON_3: crate::nl_item = 0x20010; +pub const ABMON_4: crate::nl_item = 0x20011; +pub const ABMON_5: crate::nl_item = 0x20012; +pub const ABMON_6: crate::nl_item = 0x20013; +pub const ABMON_7: crate::nl_item = 0x20014; +pub const ABMON_8: crate::nl_item = 0x20015; +pub const ABMON_9: crate::nl_item = 0x20016; +pub const ABMON_10: crate::nl_item = 0x20017; +pub const ABMON_11: crate::nl_item = 0x20018; +pub const ABMON_12: crate::nl_item = 0x20019; + +pub const MON_1: crate::nl_item = 0x2001A; +pub const MON_2: crate::nl_item = 0x2001B; +pub const MON_3: crate::nl_item = 0x2001C; +pub const MON_4: crate::nl_item = 0x2001D; +pub const MON_5: crate::nl_item = 0x2001E; +pub const MON_6: crate::nl_item = 0x2001F; +pub const MON_7: crate::nl_item = 0x20020; +pub const MON_8: crate::nl_item = 0x20021; +pub const MON_9: crate::nl_item = 0x20022; +pub const MON_10: crate::nl_item = 0x20023; +pub const MON_11: crate::nl_item = 0x20024; +pub const MON_12: crate::nl_item = 0x20025; + +pub const AM_STR: crate::nl_item = 0x20026; +pub const PM_STR: crate::nl_item = 0x20027; + +pub const D_T_FMT: crate::nl_item = 0x20028; +pub const D_FMT: crate::nl_item = 0x20029; +pub const T_FMT: crate::nl_item = 0x2002A; +pub const T_FMT_AMPM: crate::nl_item = 0x2002B; + +pub const ERA: crate::nl_item = 0x2002C; +pub const ERA_D_FMT: crate::nl_item = 0x2002E; +pub const ALT_DIGITS: crate::nl_item = 0x2002F; +pub const ERA_D_T_FMT: crate::nl_item = 0x20030; +pub const ERA_T_FMT: crate::nl_item = 0x20031; + +pub const CODESET: crate::nl_item = 14; + +pub const CRNCYSTR: crate::nl_item = 0x4000F; + +pub const RUSAGE_THREAD: c_int = 1; +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const RADIXCHAR: crate::nl_item = 0x10000; +pub const THOUSEP: crate::nl_item = 0x10001; + +pub const YESEXPR: crate::nl_item = 0x50000; +pub const NOEXPR: crate::nl_item = 0x50001; +pub const YESSTR: crate::nl_item = 0x50002; +pub const NOSTR: crate::nl_item = 0x50003; + +pub const FILENAME_MAX: c_uint = 4096; +pub const L_tmpnam: c_uint = 20; +pub const _PC_LINK_MAX: c_int = 0; +pub const _PC_MAX_CANON: c_int = 1; +pub const _PC_MAX_INPUT: c_int = 2; +pub const _PC_NAME_MAX: c_int = 3; +pub const _PC_PATH_MAX: c_int = 4; +pub const _PC_PIPE_BUF: c_int = 5; +pub const _PC_CHOWN_RESTRICTED: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SOCK_MAXBUF: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_ALLOC_SIZE_MIN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_2_SYMLINKS: c_int = 20; + +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; +pub const _SC_JOB_CONTROL: c_int = 7; +pub const _SC_SAVED_IDS: c_int = 8; +pub const _SC_REALTIME_SIGNALS: c_int = 9; +pub const _SC_PRIORITY_SCHEDULING: c_int = 10; +pub const _SC_TIMERS: c_int = 11; +pub const _SC_ASYNCHRONOUS_IO: c_int = 12; +pub const _SC_PRIORITIZED_IO: c_int = 13; +pub const _SC_SYNCHRONIZED_IO: c_int = 14; +pub const _SC_FSYNC: c_int = 15; +pub const _SC_MAPPED_FILES: c_int = 16; +pub const _SC_MEMLOCK: c_int = 17; +pub const _SC_MEMLOCK_RANGE: c_int = 18; +pub const _SC_MEMORY_PROTECTION: c_int = 19; +pub const _SC_MESSAGE_PASSING: c_int = 20; +pub const _SC_SEMAPHORES: c_int = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22; +pub const _SC_AIO_LISTIO_MAX: c_int = 23; +pub const _SC_AIO_MAX: c_int = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 25; +pub const _SC_DELAYTIMER_MAX: c_int = 26; +pub const _SC_MQ_OPEN_MAX: c_int = 27; +pub const _SC_MQ_PRIO_MAX: c_int = 28; +pub const _SC_VERSION: c_int = 29; +pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_RTSIG_MAX: c_int = 31; +pub const _SC_SEM_NSEMS_MAX: c_int = 32; +pub const _SC_SEM_VALUE_MAX: c_int = 33; +pub const _SC_SIGQUEUE_MAX: c_int = 34; +pub const _SC_TIMER_MAX: c_int = 35; +pub const _SC_BC_BASE_MAX: c_int = 36; +pub const _SC_BC_DIM_MAX: c_int = 37; +pub const _SC_BC_SCALE_MAX: c_int = 38; +pub const _SC_BC_STRING_MAX: c_int = 39; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 40; +pub const _SC_EXPR_NEST_MAX: c_int = 42; +pub const _SC_LINE_MAX: c_int = 43; +pub const _SC_RE_DUP_MAX: c_int = 44; +pub const _SC_2_VERSION: c_int = 46; +pub const _SC_2_C_BIND: c_int = 47; +pub const _SC_2_C_DEV: c_int = 48; +pub const _SC_2_FORT_DEV: c_int = 49; +pub const _SC_2_FORT_RUN: c_int = 50; +pub const _SC_2_SW_DEV: c_int = 51; +pub const _SC_2_LOCALEDEF: c_int = 52; +pub const _SC_UIO_MAXIOV: c_int = 60; +pub const _SC_IOV_MAX: c_int = 60; +pub const _SC_THREADS: c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 68; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 69; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 70; +pub const _SC_LOGIN_NAME_MAX: c_int = 71; +pub const _SC_TTY_NAME_MAX: c_int = 72; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 73; +pub const _SC_THREAD_KEYS_MAX: c_int = 74; +pub const _SC_THREAD_STACK_MIN: c_int = 75; +pub const _SC_THREAD_THREADS_MAX: c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 80; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 81; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 82; +pub const _SC_NPROCESSORS_CONF: c_int = 83; +pub const _SC_NPROCESSORS_ONLN: c_int = 84; +pub const _SC_PHYS_PAGES: c_int = 85; +pub const _SC_AVPHYS_PAGES: c_int = 86; +pub const _SC_ATEXIT_MAX: c_int = 87; +pub const _SC_PASS_MAX: c_int = 88; +pub const _SC_XOPEN_VERSION: c_int = 89; +pub const _SC_XOPEN_XCU_VERSION: c_int = 90; +pub const _SC_XOPEN_UNIX: c_int = 91; +pub const _SC_XOPEN_CRYPT: c_int = 92; +pub const _SC_XOPEN_ENH_I18N: c_int = 93; +pub const _SC_XOPEN_SHM: c_int = 94; +pub const _SC_2_CHAR_TERM: c_int = 95; +pub const _SC_2_UPE: c_int = 97; +pub const _SC_XOPEN_XPG2: c_int = 98; +pub const _SC_XOPEN_XPG3: c_int = 99; +pub const _SC_XOPEN_XPG4: c_int = 100; +pub const _SC_NZERO: c_int = 109; +pub const _SC_XBS5_ILP32_OFF32: c_int = 125; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 126; +pub const _SC_XBS5_LP64_OFF64: c_int = 127; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 128; +pub const _SC_XOPEN_LEGACY: c_int = 129; +pub const _SC_XOPEN_REALTIME: c_int = 130; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 131; +pub const _SC_ADVISORY_INFO: c_int = 132; +pub const _SC_BARRIERS: c_int = 133; +pub const _SC_CLOCK_SELECTION: c_int = 137; +pub const _SC_CPUTIME: c_int = 138; +pub const _SC_THREAD_CPUTIME: c_int = 139; +pub const _SC_MONOTONIC_CLOCK: c_int = 149; +pub const _SC_READER_WRITER_LOCKS: c_int = 153; +pub const _SC_SPIN_LOCKS: c_int = 154; +pub const _SC_REGEXP: c_int = 155; +pub const _SC_SHELL: c_int = 157; +pub const _SC_SPAWN: c_int = 159; +pub const _SC_SPORADIC_SERVER: c_int = 160; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 161; +pub const _SC_TIMEOUTS: c_int = 164; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 165; +pub const _SC_2_PBS: c_int = 168; +pub const _SC_2_PBS_ACCOUNTING: c_int = 169; +pub const _SC_2_PBS_LOCATE: c_int = 170; +pub const _SC_2_PBS_MESSAGE: c_int = 171; +pub const _SC_2_PBS_TRACK: c_int = 172; +pub const _SC_SYMLOOP_MAX: c_int = 173; +pub const _SC_STREAMS: c_int = 174; +pub const _SC_2_PBS_CHECKPOINT: c_int = 175; +pub const _SC_V6_ILP32_OFF32: c_int = 176; +pub const _SC_V6_ILP32_OFFBIG: c_int = 177; +pub const _SC_V6_LP64_OFF64: c_int = 178; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 179; +pub const _SC_HOST_NAME_MAX: c_int = 180; +pub const _SC_TRACE: c_int = 181; +pub const _SC_TRACE_EVENT_FILTER: c_int = 182; +pub const _SC_TRACE_INHERIT: c_int = 183; +pub const _SC_TRACE_LOG: c_int = 184; +pub const _SC_IPV6: c_int = 235; +pub const _SC_RAW_SOCKETS: c_int = 236; +pub const _SC_V7_ILP32_OFF32: c_int = 237; +pub const _SC_V7_ILP32_OFFBIG: c_int = 238; +pub const _SC_V7_LP64_OFF64: c_int = 239; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 240; +pub const _SC_SS_REPL_MAX: c_int = 241; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 242; +pub const _SC_TRACE_NAME_MAX: c_int = 243; +pub const _SC_TRACE_SYS_MAX: c_int = 244; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 245; +pub const _SC_XOPEN_STREAMS: c_int = 246; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248; + +pub const RLIM_SAVED_MAX: crate::rlim_t = RLIM_INFINITY; +pub const RLIM_SAVED_CUR: crate::rlim_t = RLIM_INFINITY; + +pub const GLOB_ERR: c_int = 1 << 0; +pub const GLOB_MARK: c_int = 1 << 1; +pub const GLOB_NOSORT: c_int = 1 << 2; +pub const GLOB_DOOFFS: c_int = 1 << 3; +pub const GLOB_NOCHECK: c_int = 1 << 4; +pub const GLOB_APPEND: c_int = 1 << 5; +pub const GLOB_NOESCAPE: c_int = 1 << 6; + +pub const GLOB_NOSPACE: c_int = 1; +pub const GLOB_ABORTED: c_int = 2; +pub const GLOB_NOMATCH: c_int = 3; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; + +pub const AT_EACCESS: c_int = 0x200; pub const S_IEXEC: mode_t = 0o0100; pub const S_IWRITE: mode_t = 0o0200; pub const S_IREAD: mode_t = 0o0400; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; - -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; -pub const ST_NODEV: ::c_ulong = 4; -pub const ST_NOEXEC: ::c_ulong = 8; -pub const ST_SYNCHRONOUS: ::c_ulong = 16; -pub const ST_MANDLOCK: ::c_ulong = 64; -pub const ST_WRITE: ::c_ulong = 128; -pub const ST_APPEND: ::c_ulong = 256; -pub const ST_IMMUTABLE: ::c_ulong = 512; -pub const ST_NOATIME: ::c_ulong = 1024; -pub const ST_NODIRATIME: ::c_ulong = 2048; - -pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOW: ::c_int = 0x2; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; + +pub const ST_RDONLY: c_ulong = 1; +pub const ST_NOSUID: c_ulong = 2; +pub const ST_NODEV: c_ulong = 4; +pub const ST_NOEXEC: c_ulong = 8; +pub const ST_SYNCHRONOUS: c_ulong = 16; +pub const ST_MANDLOCK: c_ulong = 64; +pub const ST_WRITE: c_ulong = 128; +pub const ST_APPEND: c_ulong = 256; +pub const ST_IMMUTABLE: c_ulong = 512; +pub const ST_NOATIME: c_ulong = 1024; +pub const ST_NODIRATIME: c_ulong = 2048; + +pub const RTLD_NEXT: *mut c_void = -1i64 as *mut c_void; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; +pub const RTLD_NODELETE: c_int = 0x1000; +pub const RTLD_NOW: c_int = 0x2; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { size: [0; __SIZEOF_PTHREAD_MUTEX_T], @@ -835,315 +837,315 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { size: [0; __SIZEOF_PTHREAD_RWLOCK_T], }; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; -pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; +pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; pub const __SIZEOF_PTHREAD_COND_T: usize = 48; -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_BATCH: ::c_int = 3; -pub const SCHED_IDLE: ::c_int = 5; - -pub const AF_IB: ::c_int = 27; -pub const AF_MPLS: ::c_int = 28; -pub const AF_NFC: ::c_int = 39; -pub const AF_VSOCK: ::c_int = 40; -pub const PF_IB: ::c_int = AF_IB; -pub const PF_MPLS: ::c_int = AF_MPLS; -pub const PF_NFC: ::c_int = AF_NFC; -pub const PF_VSOCK: ::c_int = AF_VSOCK; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; +pub const SCHED_BATCH: c_int = 3; +pub const SCHED_IDLE: c_int = 5; + +pub const AF_IB: c_int = 27; +pub const AF_MPLS: c_int = 28; +pub const AF_NFC: c_int = 39; +pub const AF_VSOCK: c_int = 40; +pub const PF_IB: c_int = AF_IB; +pub const PF_MPLS: c_int = AF_MPLS; +pub const PF_NFC: c_int = AF_NFC; +pub const PF_VSOCK: c_int = AF_VSOCK; // System V IPC -pub const IPC_PRIVATE: ::key_t = 0; +pub const IPC_PRIVATE: crate::key_t = 0; -pub const IPC_CREAT: ::c_int = 0o1000; -pub const IPC_EXCL: ::c_int = 0o2000; -pub const IPC_NOWAIT: ::c_int = 0o4000; +pub const IPC_CREAT: c_int = 0o1000; +pub const IPC_EXCL: c_int = 0o2000; +pub const IPC_NOWAIT: c_int = 0o4000; -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; -pub const IPC_INFO: ::c_int = 3; -pub const MSG_STAT: ::c_int = 11; -pub const MSG_INFO: ::c_int = 12; +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; +pub const IPC_INFO: c_int = 3; +pub const MSG_STAT: c_int = 11; +pub const MSG_INFO: c_int = 12; -pub const MSG_NOERROR: ::c_int = 0o10000; -pub const MSG_EXCEPT: ::c_int = 0o20000; +pub const MSG_NOERROR: c_int = 0o10000; +pub const MSG_EXCEPT: c_int = 0o20000; -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; +pub const SHM_R: c_int = 0o400; +pub const SHM_W: c_int = 0o200; -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_REMAP: ::c_int = 0o40000; -pub const SHM_EXEC: ::c_int = 0o100000; +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_REMAP: c_int = 0o40000; +pub const SHM_EXEC: c_int = 0o100000; -pub const SHM_LOCK: ::c_int = 11; -pub const SHM_UNLOCK: ::c_int = 12; +pub const SHM_LOCK: c_int = 11; +pub const SHM_UNLOCK: c_int = 12; -pub const SHM_HUGETLB: ::c_int = 0o4000; -pub const SHM_NORESERVE: ::c_int = 0o10000; +pub const SHM_HUGETLB: c_int = 0o4000; +pub const SHM_NORESERVE: c_int = 0o10000; -pub const LOG_NFACILITIES: ::c_int = 24; +pub const LOG_NFACILITIES: c_int = 24; -pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; +pub const SEM_FAILED: *mut crate::sem_t = 0 as *mut sem_t; -pub const AI_PASSIVE: ::c_int = 0x0001; -pub const AI_CANONNAME: ::c_int = 0x0002; -pub const AI_NUMERICHOST: ::c_int = 0x0004; -pub const AI_V4MAPPED: ::c_int = 0x0008; -pub const AI_ALL: ::c_int = 0x0010; -pub const AI_ADDRCONFIG: ::c_int = 0x0020; +pub const AI_PASSIVE: c_int = 0x0001; +pub const AI_CANONNAME: c_int = 0x0002; +pub const AI_NUMERICHOST: c_int = 0x0004; +pub const AI_V4MAPPED: c_int = 0x0008; +pub const AI_ALL: c_int = 0x0010; +pub const AI_ADDRCONFIG: c_int = 0x0020; -pub const AI_NUMERICSERV: ::c_int = 0x0400; +pub const AI_NUMERICSERV: c_int = 0x0400; -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_OVERFLOW: ::c_int = -12; +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_OVERFLOW: c_int = -12; -pub const NI_NUMERICHOST: ::c_int = 1; -pub const NI_NUMERICSERV: ::c_int = 2; -pub const NI_NOFQDN: ::c_int = 4; -pub const NI_NAMEREQD: ::c_int = 8; -pub const NI_DGRAM: ::c_int = 16; +pub const NI_NUMERICHOST: c_int = 1; +pub const NI_NUMERICSERV: c_int = 2; +pub const NI_NOFQDN: c_int = 4; +pub const NI_NAMEREQD: c_int = 8; +pub const NI_DGRAM: c_int = 16; -pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1; -pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2; -pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4; +pub const SYNC_FILE_RANGE_WAIT_BEFORE: c_uint = 1; +pub const SYNC_FILE_RANGE_WRITE: c_uint = 2; +pub const SYNC_FILE_RANGE_WAIT_AFTER: c_uint = 4; -pub const EAI_SYSTEM: ::c_int = -11; +pub const EAI_SYSTEM: c_int = -11; -pub const MREMAP_MAYMOVE: ::c_int = 1; -pub const MREMAP_FIXED: ::c_int = 2; +pub const MREMAP_MAYMOVE: c_int = 1; +pub const MREMAP_FIXED: c_int = 2; -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; -pub const _POSIX_VDISABLE: ::cc_t = 0; +pub const _POSIX_VDISABLE: crate::cc_t = 0; -pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; -pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; +pub const FALLOC_FL_KEEP_SIZE: c_int = 0x01; +pub const FALLOC_FL_PUNCH_HOLE: c_int = 0x02; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_CLOEXEC: ::c_int = 0x80000; +pub const O_TRUNC: c_int = 512; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_CLOEXEC: c_int = 0x80000; // Defined as wasi value. -pub const EPERM: ::c_int = 63; -pub const ENOENT: ::c_int = 44; -pub const ESRCH: ::c_int = 71; -pub const EINTR: ::c_int = 27; -pub const EIO: ::c_int = 29; -pub const ENXIO: ::c_int = 60; -pub const E2BIG: ::c_int = 1; -pub const ENOEXEC: ::c_int = 45; -pub const EBADF: ::c_int = 8; -pub const ECHILD: ::c_int = 12; -pub const EAGAIN: ::c_int = 6; -pub const ENOMEM: ::c_int = 48; -pub const EACCES: ::c_int = 2; -pub const EFAULT: ::c_int = 21; -pub const ENOTBLK: ::c_int = 105; -pub const EBUSY: ::c_int = 10; -pub const EEXIST: ::c_int = 20; -pub const EXDEV: ::c_int = 75; -pub const ENODEV: ::c_int = 43; -pub const ENOTDIR: ::c_int = 54; -pub const EISDIR: ::c_int = 31; -pub const EINVAL: ::c_int = 28; -pub const ENFILE: ::c_int = 41; -pub const EMFILE: ::c_int = 33; -pub const ENOTTY: ::c_int = 59; -pub const ETXTBSY: ::c_int = 74; -pub const EFBIG: ::c_int = 22; -pub const ENOSPC: ::c_int = 51; -pub const ESPIPE: ::c_int = 70; -pub const EROFS: ::c_int = 69; -pub const EMLINK: ::c_int = 34; -pub const EPIPE: ::c_int = 64; -pub const EDOM: ::c_int = 18; -pub const ERANGE: ::c_int = 68; -pub const EWOULDBLOCK: ::c_int = EAGAIN; -pub const ENOLINK: ::c_int = 47; -pub const EPROTO: ::c_int = 65; -pub const EDEADLK: ::c_int = 16; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const ENAMETOOLONG: ::c_int = 37; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 52; -pub const ENOTEMPTY: ::c_int = 55; -pub const ELOOP: ::c_int = 32; -pub const ENOMSG: ::c_int = 49; -pub const EIDRM: ::c_int = 24; -pub const EMULTIHOP: ::c_int = 36; -pub const EBADMSG: ::c_int = 9; -pub const EOVERFLOW: ::c_int = 61; -pub const EILSEQ: ::c_int = 25; -pub const ENOTSOCK: ::c_int = 57; -pub const EDESTADDRREQ: ::c_int = 17; -pub const EMSGSIZE: ::c_int = 35; -pub const EPROTOTYPE: ::c_int = 67; -pub const ENOPROTOOPT: ::c_int = 50; -pub const EPROTONOSUPPORT: ::c_int = 66; -pub const EAFNOSUPPORT: ::c_int = 5; -pub const EADDRINUSE: ::c_int = 3; -pub const EADDRNOTAVAIL: ::c_int = 4; -pub const ENETDOWN: ::c_int = 38; -pub const ENETUNREACH: ::c_int = 40; -pub const ENETRESET: ::c_int = 39; -pub const ECONNABORTED: ::c_int = 13; -pub const ECONNRESET: ::c_int = 15; -pub const ENOBUFS: ::c_int = 42; -pub const EISCONN: ::c_int = 30; -pub const ENOTCONN: ::c_int = 53; -pub const ETIMEDOUT: ::c_int = 73; -pub const ECONNREFUSED: ::c_int = 14; -pub const EHOSTUNREACH: ::c_int = 23; -pub const EALREADY: ::c_int = 7; -pub const EINPROGRESS: ::c_int = 26; -pub const ESTALE: ::c_int = 72; -pub const EDQUOT: ::c_int = 19; -pub const ECANCELED: ::c_int = 11; -pub const EOWNERDEAD: ::c_int = 62; -pub const ENOTRECOVERABLE: ::c_int = 56; - -pub const ENOSTR: ::c_int = 100; -pub const EBFONT: ::c_int = 101; -pub const EBADSLT: ::c_int = 102; -pub const EBADRQC: ::c_int = 103; -pub const ENOANO: ::c_int = 104; -pub const ECHRNG: ::c_int = 106; -pub const EL3HLT: ::c_int = 107; -pub const EL3RST: ::c_int = 108; -pub const ELNRNG: ::c_int = 109; -pub const EUNATCH: ::c_int = 110; -pub const ENOCSI: ::c_int = 111; -pub const EL2HLT: ::c_int = 112; -pub const EBADE: ::c_int = 113; -pub const EBADR: ::c_int = 114; -pub const EXFULL: ::c_int = 115; -pub const ENODATA: ::c_int = 116; -pub const ETIME: ::c_int = 117; -pub const ENOSR: ::c_int = 118; -pub const ENONET: ::c_int = 119; -pub const ENOPKG: ::c_int = 120; -pub const EREMOTE: ::c_int = 121; -pub const EADV: ::c_int = 122; -pub const ESRMNT: ::c_int = 123; -pub const ECOMM: ::c_int = 124; -pub const EDOTDOT: ::c_int = 125; -pub const ENOTUNIQ: ::c_int = 126; -pub const EBADFD: ::c_int = 127; -pub const EREMCHG: ::c_int = 128; -pub const ELIBACC: ::c_int = 129; -pub const ELIBBAD: ::c_int = 130; -pub const ELIBSCN: ::c_int = 131; -pub const ELIBMAX: ::c_int = 132; -pub const ELIBEXEC: ::c_int = 133; -pub const ERESTART: ::c_int = 134; -pub const ESTRPIPE: ::c_int = 135; -pub const EUSERS: ::c_int = 136; -pub const ESOCKTNOSUPPORT: ::c_int = 137; -pub const EOPNOTSUPP: ::c_int = 138; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 139; -pub const ESHUTDOWN: ::c_int = 140; -pub const ETOOMANYREFS: ::c_int = 141; -pub const EHOSTDOWN: ::c_int = 142; -pub const EUCLEAN: ::c_int = 143; -pub const ENOTNAM: ::c_int = 144; -pub const ENAVAIL: ::c_int = 145; -pub const EISNAM: ::c_int = 146; -pub const EREMOTEIO: ::c_int = 147; -pub const ENOMEDIUM: ::c_int = 148; -pub const EMEDIUMTYPE: ::c_int = 149; -pub const ENOKEY: ::c_int = 150; -pub const EKEYEXPIRED: ::c_int = 151; -pub const EKEYREVOKED: ::c_int = 152; -pub const EKEYREJECTED: ::c_int = 153; -pub const ERFKILL: ::c_int = 154; -pub const EHWPOISON: ::c_int = 155; -pub const EL2NSYNC: ::c_int = 156; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const BUFSIZ: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 10000; -pub const FOPEN_MAX: ::c_uint = 1000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_EXEC: ::c_int = 0o10000000; -pub const O_SEARCH: ::c_int = 0o10000000; -pub const O_ACCMODE: ::c_int = 0o10000003; -pub const O_NDELAY: ::c_int = O_NONBLOCK; -pub const NI_MAXHOST: ::socklen_t = 255; -pub const PTHREAD_STACK_MIN: ::size_t = 2048; -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; - -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const RLIM_INFINITY: ::rlim_t = !0; +pub const EPERM: c_int = 63; +pub const ENOENT: c_int = 44; +pub const ESRCH: c_int = 71; +pub const EINTR: c_int = 27; +pub const EIO: c_int = 29; +pub const ENXIO: c_int = 60; +pub const E2BIG: c_int = 1; +pub const ENOEXEC: c_int = 45; +pub const EBADF: c_int = 8; +pub const ECHILD: c_int = 12; +pub const EAGAIN: c_int = 6; +pub const ENOMEM: c_int = 48; +pub const EACCES: c_int = 2; +pub const EFAULT: c_int = 21; +pub const ENOTBLK: c_int = 105; +pub const EBUSY: c_int = 10; +pub const EEXIST: c_int = 20; +pub const EXDEV: c_int = 75; +pub const ENODEV: c_int = 43; +pub const ENOTDIR: c_int = 54; +pub const EISDIR: c_int = 31; +pub const EINVAL: c_int = 28; +pub const ENFILE: c_int = 41; +pub const EMFILE: c_int = 33; +pub const ENOTTY: c_int = 59; +pub const ETXTBSY: c_int = 74; +pub const EFBIG: c_int = 22; +pub const ENOSPC: c_int = 51; +pub const ESPIPE: c_int = 70; +pub const EROFS: c_int = 69; +pub const EMLINK: c_int = 34; +pub const EPIPE: c_int = 64; +pub const EDOM: c_int = 18; +pub const ERANGE: c_int = 68; +pub const EWOULDBLOCK: c_int = EAGAIN; +pub const ENOLINK: c_int = 47; +pub const EPROTO: c_int = 65; +pub const EDEADLK: c_int = 16; +pub const EDEADLOCK: c_int = EDEADLK; +pub const ENAMETOOLONG: c_int = 37; +pub const ENOLCK: c_int = 46; +pub const ENOSYS: c_int = 52; +pub const ENOTEMPTY: c_int = 55; +pub const ELOOP: c_int = 32; +pub const ENOMSG: c_int = 49; +pub const EIDRM: c_int = 24; +pub const EMULTIHOP: c_int = 36; +pub const EBADMSG: c_int = 9; +pub const EOVERFLOW: c_int = 61; +pub const EILSEQ: c_int = 25; +pub const ENOTSOCK: c_int = 57; +pub const EDESTADDRREQ: c_int = 17; +pub const EMSGSIZE: c_int = 35; +pub const EPROTOTYPE: c_int = 67; +pub const ENOPROTOOPT: c_int = 50; +pub const EPROTONOSUPPORT: c_int = 66; +pub const EAFNOSUPPORT: c_int = 5; +pub const EADDRINUSE: c_int = 3; +pub const EADDRNOTAVAIL: c_int = 4; +pub const ENETDOWN: c_int = 38; +pub const ENETUNREACH: c_int = 40; +pub const ENETRESET: c_int = 39; +pub const ECONNABORTED: c_int = 13; +pub const ECONNRESET: c_int = 15; +pub const ENOBUFS: c_int = 42; +pub const EISCONN: c_int = 30; +pub const ENOTCONN: c_int = 53; +pub const ETIMEDOUT: c_int = 73; +pub const ECONNREFUSED: c_int = 14; +pub const EHOSTUNREACH: c_int = 23; +pub const EALREADY: c_int = 7; +pub const EINPROGRESS: c_int = 26; +pub const ESTALE: c_int = 72; +pub const EDQUOT: c_int = 19; +pub const ECANCELED: c_int = 11; +pub const EOWNERDEAD: c_int = 62; +pub const ENOTRECOVERABLE: c_int = 56; + +pub const ENOSTR: c_int = 100; +pub const EBFONT: c_int = 101; +pub const EBADSLT: c_int = 102; +pub const EBADRQC: c_int = 103; +pub const ENOANO: c_int = 104; +pub const ECHRNG: c_int = 106; +pub const EL3HLT: c_int = 107; +pub const EL3RST: c_int = 108; +pub const ELNRNG: c_int = 109; +pub const EUNATCH: c_int = 110; +pub const ENOCSI: c_int = 111; +pub const EL2HLT: c_int = 112; +pub const EBADE: c_int = 113; +pub const EBADR: c_int = 114; +pub const EXFULL: c_int = 115; +pub const ENODATA: c_int = 116; +pub const ETIME: c_int = 117; +pub const ENOSR: c_int = 118; +pub const ENONET: c_int = 119; +pub const ENOPKG: c_int = 120; +pub const EREMOTE: c_int = 121; +pub const EADV: c_int = 122; +pub const ESRMNT: c_int = 123; +pub const ECOMM: c_int = 124; +pub const EDOTDOT: c_int = 125; +pub const ENOTUNIQ: c_int = 126; +pub const EBADFD: c_int = 127; +pub const EREMCHG: c_int = 128; +pub const ELIBACC: c_int = 129; +pub const ELIBBAD: c_int = 130; +pub const ELIBSCN: c_int = 131; +pub const ELIBMAX: c_int = 132; +pub const ELIBEXEC: c_int = 133; +pub const ERESTART: c_int = 134; +pub const ESTRPIPE: c_int = 135; +pub const EUSERS: c_int = 136; +pub const ESOCKTNOSUPPORT: c_int = 137; +pub const EOPNOTSUPP: c_int = 138; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 139; +pub const ESHUTDOWN: c_int = 140; +pub const ETOOMANYREFS: c_int = 141; +pub const EHOSTDOWN: c_int = 142; +pub const EUCLEAN: c_int = 143; +pub const ENOTNAM: c_int = 144; +pub const ENAVAIL: c_int = 145; +pub const EISNAM: c_int = 146; +pub const EREMOTEIO: c_int = 147; +pub const ENOMEDIUM: c_int = 148; +pub const EMEDIUMTYPE: c_int = 149; +pub const ENOKEY: c_int = 150; +pub const EKEYEXPIRED: c_int = 151; +pub const EKEYREVOKED: c_int = 152; +pub const EKEYREJECTED: c_int = 153; +pub const ERFKILL: c_int = 154; +pub const EHWPOISON: c_int = 155; +pub const EL2NSYNC: c_int = 156; + +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; + +pub const BUFSIZ: c_uint = 1024; +pub const TMP_MAX: c_uint = 10000; +pub const FOPEN_MAX: c_uint = 1000; +pub const O_PATH: c_int = 0o10000000; +pub const O_EXEC: c_int = 0o10000000; +pub const O_SEARCH: c_int = 0o10000000; +pub const O_ACCMODE: c_int = 0o10000003; +pub const O_NDELAY: c_int = O_NONBLOCK; +pub const NI_MAXHOST: crate::socklen_t = 255; +pub const PTHREAD_STACK_MIN: size_t = 2048; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; + +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const RLIM_INFINITY: crate::rlim_t = !0; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIMIT_NLIMITS: ::c_int = 16; +pub const RLIMIT_NLIMITS: c_int = 16; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = RLIMIT_NLIMITS; +pub const RLIM_NLIMITS: c_int = RLIMIT_NLIMITS; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; #[doc(hidden)] #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = ::SIGSYS; +pub const SIGUNUSED: c_int = crate::SIGSYS; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; -pub const CPU_SETSIZE: ::c_int = 1024; +pub const CPU_SETSIZE: c_int = 1024; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; -pub const TIOCINQ: ::c_int = ::FIONREAD; +pub const TIOCINQ: c_int = crate::FIONREAD; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; -pub const CLOCK_SGI_CYCLE: ::clockid_t = 10; +pub const CLOCK_SGI_CYCLE: crate::clockid_t = 10; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -1151,268 +1153,268 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; - -pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_TIMESTAMP: ::c_int = 63; -pub const SO_MARK: ::c_int = 36; -pub const SO_RXQ_OVFL: ::c_int = 40; -pub const SO_PEEK_OFF: ::c_int = 42; -pub const SO_BUSY_POLL: ::c_int = 46; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; + +pub const SO_BINDTODEVICE: c_int = 25; +pub const SO_TIMESTAMP: c_int = 63; +pub const SO_MARK: c_int = 36; +pub const SO_RXQ_OVFL: c_int = 40; +pub const SO_PEEK_OFF: c_int = 42; +pub const SO_BUSY_POLL: c_int = 46; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 32; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_ASYNC: ::c_int = 0x2000; - -pub const FIOCLEX: ::c_int = 0x5451; -pub const FIONBIO: ::c_int = 0x5421; - -pub const RLIMIT_RSS: ::c_int = 5; -pub const RLIMIT_NOFILE: ::c_int = 7; -pub const RLIMIT_AS: ::c_int = 9; -pub const RLIMIT_NPROC: ::c_int = 6; -pub const RLIMIT_MEMLOCK: ::c_int = 8; -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_LOCKS: ::c_int = 10; -pub const RLIMIT_SIGPENDING: ::c_int = 11; -pub const RLIMIT_MSGQUEUE: ::c_int = 12; -pub const RLIMIT_NICE: ::c_int = 13; -pub const RLIMIT_RTPRIO: ::c_int = 14; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; - -pub const SOCK_NONBLOCK: ::c_int = 2048; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_SEQPACKET: ::c_int = 5; - -pub const IPPROTO_MAX: ::c_int = 263; - -pub const SOL_SOCKET: ::c_int = 1; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_LINGER: ::c_int = 13; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 66; -pub const SO_SNDTIMEO: ::c_int = 67; -pub const SO_ACCEPTCONN: ::c_int = 30; - -pub const IPV6_RTHDR_LOOSE: ::c_int = 0; -pub const IPV6_RTHDR_STRICT: ::c_int = 1; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_ASYNC: c_int = 0x2000; + +pub const FIOCLEX: c_int = 0x5451; +pub const FIONBIO: c_int = 0x5421; + +pub const RLIMIT_RSS: c_int = 5; +pub const RLIMIT_NOFILE: c_int = 7; +pub const RLIMIT_AS: c_int = 9; +pub const RLIMIT_NPROC: c_int = 6; +pub const RLIMIT_MEMLOCK: c_int = 8; +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_LOCKS: c_int = 10; +pub const RLIMIT_SIGPENDING: c_int = 11; +pub const RLIMIT_MSGQUEUE: c_int = 12; +pub const RLIMIT_NICE: c_int = 13; +pub const RLIMIT_RTPRIO: c_int = 14; + +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; + +pub const SOCK_NONBLOCK: c_int = 2048; + +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_SEQPACKET: c_int = 5; + +pub const IPPROTO_MAX: c_int = 263; + +pub const SOL_SOCKET: c_int = 1; + +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_DONTROUTE: c_int = 5; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_OOBINLINE: c_int = 10; +pub const SO_LINGER: c_int = 13; +pub const SO_REUSEPORT: c_int = 15; +pub const SO_RCVLOWAT: c_int = 18; +pub const SO_SNDLOWAT: c_int = 19; +pub const SO_RCVTIMEO: c_int = 66; +pub const SO_SNDTIMEO: c_int = 67; +pub const SO_ACCEPTCONN: c_int = 30; + +pub const IPV6_RTHDR_LOOSE: c_int = 0; +pub const IPV6_RTHDR_STRICT: c_int = 1; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; + +pub const EXTPROC: crate::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: c_int = 0x040000; + +pub const F_GETLK: c_int = 12; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 13; +pub const F_SETLKW: c_int = 14; +pub const F_SETOWN: c_int = 8; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; pub const VEOF: usize = 4; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; - -pub const TCGETS: ::c_int = 0x5401; -pub const TCSETS: ::c_int = 0x5402; -pub const TCSETSW: ::c_int = 0x5403; -pub const TCSETSF: ::c_int = 0x5404; -pub const TCGETA: ::c_int = 0x5405; -pub const TCSETA: ::c_int = 0x5406; -pub const TCSETAW: ::c_int = 0x5407; -pub const TCSETAF: ::c_int = 0x5408; -pub const TCSBRK: ::c_int = 0x5409; -pub const TCXONC: ::c_int = 0x540A; -pub const TCFLSH: ::c_int = 0x540B; -pub const TIOCGSOFTCAR: ::c_int = 0x5419; -pub const TIOCSSOFTCAR: ::c_int = 0x541A; -pub const TIOCLINUX: ::c_int = 0x541C; -pub const TIOCGSERIAL: ::c_int = 0x541E; -pub const TIOCEXCL: ::c_int = 0x540C; -pub const TIOCNXCL: ::c_int = 0x540D; -pub const TIOCSCTTY: ::c_int = 0x540E; -pub const TIOCGPGRP: ::c_int = 0x540F; -pub const TIOCSPGRP: ::c_int = 0x5410; -pub const TIOCOUTQ: ::c_int = 0x5411; -pub const TIOCSTI: ::c_int = 0x5412; -pub const TIOCGWINSZ: ::c_int = 0x5413; -pub const TIOCSWINSZ: ::c_int = 0x5414; -pub const TIOCMGET: ::c_int = 0x5415; -pub const TIOCMBIS: ::c_int = 0x5416; -pub const TIOCMBIC: ::c_int = 0x5417; -pub const TIOCMSET: ::c_int = 0x5418; -pub const FIONREAD: ::c_int = 0x541B; -pub const TIOCCONS: ::c_int = 0x541D; - -pub const SYS_gettid: ::c_long = 224; // Valid for arm (32-bit) and x86 (32-bit) - -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x008; -pub const TIOCM_SR: ::c_int = 0x010; -pub const TIOCM_CTS: ::c_int = 0x020; -pub const TIOCM_CAR: ::c_int = 0x040; -pub const TIOCM_RNG: ::c_int = 0x080; -pub const TIOCM_DSR: ::c_int = 0x100; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const O_TMPFILE: ::c_int = 0x410000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; + +pub const TCGETS: c_int = 0x5401; +pub const TCSETS: c_int = 0x5402; +pub const TCSETSW: c_int = 0x5403; +pub const TCSETSF: c_int = 0x5404; +pub const TCGETA: c_int = 0x5405; +pub const TCSETA: c_int = 0x5406; +pub const TCSETAW: c_int = 0x5407; +pub const TCSETAF: c_int = 0x5408; +pub const TCSBRK: c_int = 0x5409; +pub const TCXONC: c_int = 0x540A; +pub const TCFLSH: c_int = 0x540B; +pub const TIOCGSOFTCAR: c_int = 0x5419; +pub const TIOCSSOFTCAR: c_int = 0x541A; +pub const TIOCLINUX: c_int = 0x541C; +pub const TIOCGSERIAL: c_int = 0x541E; +pub const TIOCEXCL: c_int = 0x540C; +pub const TIOCNXCL: c_int = 0x540D; +pub const TIOCSCTTY: c_int = 0x540E; +pub const TIOCGPGRP: c_int = 0x540F; +pub const TIOCSPGRP: c_int = 0x5410; +pub const TIOCOUTQ: c_int = 0x5411; +pub const TIOCSTI: c_int = 0x5412; +pub const TIOCGWINSZ: c_int = 0x5413; +pub const TIOCSWINSZ: c_int = 0x5414; +pub const TIOCMGET: c_int = 0x5415; +pub const TIOCMBIS: c_int = 0x5416; +pub const TIOCMBIC: c_int = 0x5417; +pub const TIOCMSET: c_int = 0x5418; +pub const FIONREAD: c_int = 0x541B; +pub const TIOCCONS: c_int = 0x541D; + +pub const SYS_gettid: c_long = 224; // Valid for arm (32-bit) and x86 (32-bit) + +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x008; +pub const TIOCM_SR: c_int = 0x010; +pub const TIOCM_CTS: c_int = 0x020; +pub const TIOCM_CAR: c_int = 0x040; +pub const TIOCM_RNG: c_int = 0x080; +pub const TIOCM_DSR: c_int = 0x100; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const O_TMPFILE: c_int = 0x410000; pub const MAX_ADDR_LEN: usize = 7; -pub const ARPD_UPDATE: ::c_ushort = 0x01; -pub const ARPD_LOOKUP: ::c_ushort = 0x02; -pub const ARPD_FLUSH: ::c_ushort = 0x03; -pub const ATF_MAGIC: ::c_int = 0x80; +pub const ARPD_UPDATE: c_ushort = 0x01; +pub const ARPD_LOOKUP: c_ushort = 0x02; +pub const ARPD_FLUSH: c_ushort = 0x03; +pub const ATF_MAGIC: c_int = 0x80; -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; -pub const SOMAXCONN: ::c_int = 128; +pub const SOMAXCONN: c_int = 128; f! { pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { - if ((*cmsg).cmsg_len as usize) < ::mem::size_of::() { + if ((*cmsg).cmsg_len as usize) < crate::mem::size_of::() { return 0 as *mut cmsghdr; }; let next = (cmsg as usize + super::CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr; @@ -1431,21 +1433,21 @@ f! { } pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; () } pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); () } pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } @@ -1454,31 +1456,31 @@ f! { set1.bits == set2.bits } - pub fn major(dev: ::dev_t) -> ::c_uint { + pub fn major(dev: crate::dev_t) -> c_uint { // see // https://github.com/emscripten-core/emscripten/blob/ // main/system/lib/libc/musl/include/sys/sysmacros.h let mut major = 0; major |= (dev & 0x00000fff) >> 8; major |= (dev & 0xfffff000) >> 31 >> 1; - major as ::c_uint + major as c_uint } - pub fn minor(dev: ::dev_t) -> ::c_uint { + pub fn minor(dev: crate::dev_t) -> c_uint { // see // https://github.com/emscripten-core/emscripten/blob/ // main/system/lib/libc/musl/include/sys/sysmacros.h let mut minor = 0; minor |= (dev & 0x000000ff) >> 0; minor |= (dev & 0xffffff00) >> 12; - minor as ::c_uint + minor as c_uint } } safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= (major & 0x00000fff) << 8; dev |= (major & 0xfffff000) << 31 << 1; @@ -1489,153 +1491,152 @@ safe_f! { } extern "C" { - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; pub fn setpwent(); pub fn endpwent(); pub fn getpwent() -> *mut passwd; - pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn __errno_location() -> *mut ::c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn __errno_location() -> *mut c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; + pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char; pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int; + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; - - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; + pub fn getloadavg(loadavg: *mut c_double, nelem: c_int) -> c_int; + + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn mremap( - addr: *mut ::c_void, - len: ::size_t, - new_len: ::size_t, - flags: ::c_int, + addr: *mut c_void, + len: size_t, + new_len: size_t, + flags: c_int, ... - ) -> *mut ::c_void; + ) -> *mut c_void; pub fn glob( pattern: *const c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - - pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_uint, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + ) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_uint, - timeout: *mut ::timespec, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + timeout: *mut crate::timespec, + ) -> c_int; pub fn sync(); - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; // grp.h - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; } // Alias to 64 to mimic glibc's LFS64 support diff --git a/src/unix/linux_like/linux/arch/generic/mod.rs b/src/unix/linux_like/linux/arch/generic/mod.rs index 0d2514b60aa41..3e7d3a1117d52 100644 --- a/src/unix/linux_like/linux/arch/generic/mod.rs +++ b/src/unix/linux_like/linux/arch/generic/mod.rs @@ -1,13 +1,15 @@ +use crate::{c_int, Ioctl}; + s! { pub struct termios2 { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; 19], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; 19], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } } @@ -15,80 +17,80 @@ s! { // arch/alpha/include/uapi/asm/socket.h // tools/include/uapi/asm-generic/socket.h // arch/mips/include/uapi/asm/socket.h -pub const SOL_SOCKET: ::c_int = 1; +pub const SOL_SOCKET: c_int = 1; // Defined in unix/linux_like/mod.rs -// pub const SO_DEBUG: ::c_int = 1; -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_NO_CHECK: ::c_int = 11; -pub const SO_PRIORITY: ::c_int = 12; -pub const SO_LINGER: ::c_int = 13; -pub const SO_BSDCOMPAT: ::c_int = 14; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_PASSCRED: ::c_int = 16; -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -// pub const SO_RCVTIMEO_OLD: ::c_int = 20; -// pub const SO_SNDTIMEO_OLD: ::c_int = 21; -pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22; -pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23; -pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24; -pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_ATTACH_FILTER: ::c_int = 26; -pub const SO_DETACH_FILTER: ::c_int = 27; -pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; -pub const SO_PEERNAME: ::c_int = 28; -pub const SO_TIMESTAMP: ::c_int = 29; -// pub const SO_TIMESTAMP_OLD: ::c_int = 29; -pub const SO_ACCEPTCONN: ::c_int = 30; -pub const SO_PEERSEC: ::c_int = 31; -pub const SO_SNDBUFFORCE: ::c_int = 32; -pub const SO_RCVBUFFORCE: ::c_int = 33; -pub const SO_PASSSEC: ::c_int = 34; -pub const SO_TIMESTAMPNS: ::c_int = 35; -// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35; -pub const SO_MARK: ::c_int = 36; -pub const SO_TIMESTAMPING: ::c_int = 37; -// pub const SO_TIMESTAMPING_OLD: ::c_int = 37; -pub const SO_PROTOCOL: ::c_int = 38; -pub const SO_DOMAIN: ::c_int = 39; -pub const SO_RXQ_OVFL: ::c_int = 40; -pub const SO_WIFI_STATUS: ::c_int = 41; -pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS; -pub const SO_PEEK_OFF: ::c_int = 42; -pub const SO_NOFCS: ::c_int = 43; -pub const SO_LOCK_FILTER: ::c_int = 44; -pub const SO_SELECT_ERR_QUEUE: ::c_int = 45; -pub const SO_BUSY_POLL: ::c_int = 46; -pub const SO_MAX_PACING_RATE: ::c_int = 47; -pub const SO_BPF_EXTENSIONS: ::c_int = 48; -pub const SO_INCOMING_CPU: ::c_int = 49; -pub const SO_ATTACH_BPF: ::c_int = 50; -pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER; -pub const SO_ATTACH_REUSEPORT_CBPF: ::c_int = 51; -pub const SO_ATTACH_REUSEPORT_EBPF: ::c_int = 52; -pub const SO_CNX_ADVICE: ::c_int = 53; -pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 54; -pub const SO_MEMINFO: ::c_int = 55; -pub const SO_INCOMING_NAPI_ID: ::c_int = 56; -pub const SO_COOKIE: ::c_int = 57; -pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 58; -pub const SO_PEERGROUPS: ::c_int = 59; -pub const SO_ZEROCOPY: ::c_int = 60; -pub const SO_TXTIME: ::c_int = 61; -pub const SCM_TXTIME: ::c_int = SO_TXTIME; -pub const SO_BINDTOIFINDEX: ::c_int = 62; +// pub const SO_DEBUG: c_int = 1; +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_DONTROUTE: c_int = 5; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_OOBINLINE: c_int = 10; +pub const SO_NO_CHECK: c_int = 11; +pub const SO_PRIORITY: c_int = 12; +pub const SO_LINGER: c_int = 13; +pub const SO_BSDCOMPAT: c_int = 14; +pub const SO_REUSEPORT: c_int = 15; +pub const SO_PASSCRED: c_int = 16; +pub const SO_PEERCRED: c_int = 17; +pub const SO_RCVLOWAT: c_int = 18; +pub const SO_SNDLOWAT: c_int = 19; +pub const SO_RCVTIMEO: c_int = 20; +pub const SO_SNDTIMEO: c_int = 21; +// pub const SO_RCVTIMEO_OLD: c_int = 20; +// pub const SO_SNDTIMEO_OLD: c_int = 21; +pub const SO_SECURITY_AUTHENTICATION: c_int = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: c_int = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: c_int = 24; +pub const SO_BINDTODEVICE: c_int = 25; +pub const SO_ATTACH_FILTER: c_int = 26; +pub const SO_DETACH_FILTER: c_int = 27; +pub const SO_GET_FILTER: c_int = SO_ATTACH_FILTER; +pub const SO_PEERNAME: c_int = 28; +pub const SO_TIMESTAMP: c_int = 29; +// pub const SO_TIMESTAMP_OLD: c_int = 29; +pub const SO_ACCEPTCONN: c_int = 30; +pub const SO_PEERSEC: c_int = 31; +pub const SO_SNDBUFFORCE: c_int = 32; +pub const SO_RCVBUFFORCE: c_int = 33; +pub const SO_PASSSEC: c_int = 34; +pub const SO_TIMESTAMPNS: c_int = 35; +// pub const SO_TIMESTAMPNS_OLD: c_int = 35; +pub const SO_MARK: c_int = 36; +pub const SO_TIMESTAMPING: c_int = 37; +// pub const SO_TIMESTAMPING_OLD: c_int = 37; +pub const SO_PROTOCOL: c_int = 38; +pub const SO_DOMAIN: c_int = 39; +pub const SO_RXQ_OVFL: c_int = 40; +pub const SO_WIFI_STATUS: c_int = 41; +pub const SCM_WIFI_STATUS: c_int = SO_WIFI_STATUS; +pub const SO_PEEK_OFF: c_int = 42; +pub const SO_NOFCS: c_int = 43; +pub const SO_LOCK_FILTER: c_int = 44; +pub const SO_SELECT_ERR_QUEUE: c_int = 45; +pub const SO_BUSY_POLL: c_int = 46; +pub const SO_MAX_PACING_RATE: c_int = 47; +pub const SO_BPF_EXTENSIONS: c_int = 48; +pub const SO_INCOMING_CPU: c_int = 49; +pub const SO_ATTACH_BPF: c_int = 50; +pub const SO_DETACH_BPF: c_int = SO_DETACH_FILTER; +pub const SO_ATTACH_REUSEPORT_CBPF: c_int = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: c_int = 52; +pub const SO_CNX_ADVICE: c_int = 53; +pub const SCM_TIMESTAMPING_OPT_STATS: c_int = 54; +pub const SO_MEMINFO: c_int = 55; +pub const SO_INCOMING_NAPI_ID: c_int = 56; +pub const SO_COOKIE: c_int = 57; +pub const SCM_TIMESTAMPING_PKTINFO: c_int = 58; +pub const SO_PEERGROUPS: c_int = 59; +pub const SO_ZEROCOPY: c_int = 60; +pub const SO_TXTIME: c_int = 61; +pub const SCM_TXTIME: c_int = SO_TXTIME; +pub const SO_BINDTOIFINDEX: c_int = 62; cfg_if! { // Some of these platforms in CI already have these constants. // But they may still not have those _OLD ones. @@ -102,16 +104,16 @@ cfg_if! { ), not(any(target_env = "musl", target_env = "ohos")) ))] { - pub const SO_TIMESTAMP_NEW: ::c_int = 63; - pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; - pub const SO_TIMESTAMPING_NEW: ::c_int = 65; - pub const SO_RCVTIMEO_NEW: ::c_int = 66; - pub const SO_SNDTIMEO_NEW: ::c_int = 67; - pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68; + pub const SO_TIMESTAMP_NEW: c_int = 63; + pub const SO_TIMESTAMPNS_NEW: c_int = 64; + pub const SO_TIMESTAMPING_NEW: c_int = 65; + pub const SO_RCVTIMEO_NEW: c_int = 66; + pub const SO_SNDTIMEO_NEW: c_int = 67; + pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; } } -// pub const SO_PREFER_BUSY_POLL: ::c_int = 69; -// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70; +// pub const SO_PREFER_BUSY_POLL: c_int = 69; +// pub const SO_BUSY_POLL_BUDGET: c_int = 70; cfg_if! { if #[cfg(any( @@ -124,126 +126,126 @@ cfg_if! { target_arch = "csky", target_arch = "loongarch64" ))] { - pub const FICLONE: ::c_ulong = 0x40049409; - pub const FICLONERANGE: ::c_ulong = 0x4020940D; + pub const FICLONE: crate::c_ulong = 0x40049409; + pub const FICLONERANGE: crate::c_ulong = 0x4020940D; } } // Defined in unix/linux_like/mod.rs -// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; -pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; -pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; +// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; +pub const SCM_TIMESTAMPNS: c_int = SO_TIMESTAMPNS; +pub const SCM_TIMESTAMPING: c_int = SO_TIMESTAMPING; // Ioctl Constants -pub const TCGETS: ::Ioctl = 0x5401; -pub const TCSETS: ::Ioctl = 0x5402; -pub const TCSETSW: ::Ioctl = 0x5403; -pub const TCSETSF: ::Ioctl = 0x5404; -pub const TCGETA: ::Ioctl = 0x5405; -pub const TCSETA: ::Ioctl = 0x5406; -pub const TCSETAW: ::Ioctl = 0x5407; -pub const TCSETAF: ::Ioctl = 0x5408; -pub const TCSBRK: ::Ioctl = 0x5409; -pub const TCXONC: ::Ioctl = 0x540A; -pub const TCFLSH: ::Ioctl = 0x540B; -pub const TIOCEXCL: ::Ioctl = 0x540C; -pub const TIOCNXCL: ::Ioctl = 0x540D; -pub const TIOCSCTTY: ::Ioctl = 0x540E; -pub const TIOCGPGRP: ::Ioctl = 0x540F; -pub const TIOCSPGRP: ::Ioctl = 0x5410; -pub const TIOCOUTQ: ::Ioctl = 0x5411; -pub const TIOCSTI: ::Ioctl = 0x5412; -pub const TIOCGWINSZ: ::Ioctl = 0x5413; -pub const TIOCSWINSZ: ::Ioctl = 0x5414; -pub const TIOCMGET: ::Ioctl = 0x5415; -pub const TIOCMBIS: ::Ioctl = 0x5416; -pub const TIOCMBIC: ::Ioctl = 0x5417; -pub const TIOCMSET: ::Ioctl = 0x5418; -pub const TIOCGSOFTCAR: ::Ioctl = 0x5419; -pub const TIOCSSOFTCAR: ::Ioctl = 0x541A; -pub const FIONREAD: ::Ioctl = 0x541B; -pub const TIOCINQ: ::Ioctl = FIONREAD; -pub const TIOCLINUX: ::Ioctl = 0x541C; -pub const TIOCCONS: ::Ioctl = 0x541D; -pub const TIOCGSERIAL: ::Ioctl = 0x541E; -pub const TIOCSSERIAL: ::Ioctl = 0x541F; -pub const TIOCPKT: ::Ioctl = 0x5420; -pub const FIONBIO: ::Ioctl = 0x5421; -pub const TIOCNOTTY: ::Ioctl = 0x5422; -pub const TIOCSETD: ::Ioctl = 0x5423; -pub const TIOCGETD: ::Ioctl = 0x5424; -pub const TCSBRKP: ::Ioctl = 0x5425; -pub const TIOCSBRK: ::Ioctl = 0x5427; -pub const TIOCCBRK: ::Ioctl = 0x5428; -pub const TIOCGSID: ::Ioctl = 0x5429; -pub const TCGETS2: ::Ioctl = 0x802c542a; -pub const TCSETS2: ::Ioctl = 0x402c542b; -pub const TCSETSW2: ::Ioctl = 0x402c542c; -pub const TCSETSF2: ::Ioctl = 0x402c542d; -pub const TIOCGRS485: ::Ioctl = 0x542E; -pub const TIOCSRS485: ::Ioctl = 0x542F; -pub const TIOCGPTN: ::Ioctl = 0x80045430; -pub const TIOCSPTLCK: ::Ioctl = 0x40045431; -pub const TIOCGDEV: ::Ioctl = 0x80045432; -pub const TCGETX: ::Ioctl = 0x5432; -pub const TCSETX: ::Ioctl = 0x5433; -pub const TCSETXF: ::Ioctl = 0x5434; -pub const TCSETXW: ::Ioctl = 0x5435; -pub const TIOCSIG: ::Ioctl = 0x40045436; -pub const TIOCVHANGUP: ::Ioctl = 0x5437; -pub const TIOCGPKT: ::Ioctl = 0x80045438; -pub const TIOCGPTLCK: ::Ioctl = 0x80045439; -pub const TIOCGEXCL: ::Ioctl = 0x80045440; -pub const TIOCGPTPEER: ::Ioctl = 0x5441; -// pub const TIOCGISO7816: ::Ioctl = 0x80285442; -// pub const TIOCSISO7816: ::Ioctl = 0xc0285443; -pub const FIONCLEX: ::Ioctl = 0x5450; -pub const FIOCLEX: ::Ioctl = 0x5451; -pub const FIOASYNC: ::Ioctl = 0x5452; -pub const TIOCSERCONFIG: ::Ioctl = 0x5453; -pub const TIOCSERGWILD: ::Ioctl = 0x5454; -pub const TIOCSERSWILD: ::Ioctl = 0x5455; -pub const TIOCGLCKTRMIOS: ::Ioctl = 0x5456; -pub const TIOCSLCKTRMIOS: ::Ioctl = 0x5457; -pub const TIOCSERGSTRUCT: ::Ioctl = 0x5458; -pub const TIOCSERGETLSR: ::Ioctl = 0x5459; -pub const TIOCSERGETMULTI: ::Ioctl = 0x545A; -pub const TIOCSERSETMULTI: ::Ioctl = 0x545B; -pub const TIOCMIWAIT: ::Ioctl = 0x545C; -pub const TIOCGICOUNT: ::Ioctl = 0x545D; -pub const BLKIOMIN: ::Ioctl = 0x1278; -pub const BLKIOOPT: ::Ioctl = 0x1279; -pub const BLKSSZGET: ::Ioctl = 0x1268; -pub const BLKPBSZGET: ::Ioctl = 0x127B; +pub const TCGETS: Ioctl = 0x5401; +pub const TCSETS: Ioctl = 0x5402; +pub const TCSETSW: Ioctl = 0x5403; +pub const TCSETSF: Ioctl = 0x5404; +pub const TCGETA: Ioctl = 0x5405; +pub const TCSETA: Ioctl = 0x5406; +pub const TCSETAW: Ioctl = 0x5407; +pub const TCSETAF: Ioctl = 0x5408; +pub const TCSBRK: Ioctl = 0x5409; +pub const TCXONC: Ioctl = 0x540A; +pub const TCFLSH: Ioctl = 0x540B; +pub const TIOCEXCL: Ioctl = 0x540C; +pub const TIOCNXCL: Ioctl = 0x540D; +pub const TIOCSCTTY: Ioctl = 0x540E; +pub const TIOCGPGRP: Ioctl = 0x540F; +pub const TIOCSPGRP: Ioctl = 0x5410; +pub const TIOCOUTQ: Ioctl = 0x5411; +pub const TIOCSTI: Ioctl = 0x5412; +pub const TIOCGWINSZ: Ioctl = 0x5413; +pub const TIOCSWINSZ: Ioctl = 0x5414; +pub const TIOCMGET: Ioctl = 0x5415; +pub const TIOCMBIS: Ioctl = 0x5416; +pub const TIOCMBIC: Ioctl = 0x5417; +pub const TIOCMSET: Ioctl = 0x5418; +pub const TIOCGSOFTCAR: Ioctl = 0x5419; +pub const TIOCSSOFTCAR: Ioctl = 0x541A; +pub const FIONREAD: Ioctl = 0x541B; +pub const TIOCINQ: Ioctl = FIONREAD; +pub const TIOCLINUX: Ioctl = 0x541C; +pub const TIOCCONS: Ioctl = 0x541D; +pub const TIOCGSERIAL: Ioctl = 0x541E; +pub const TIOCSSERIAL: Ioctl = 0x541F; +pub const TIOCPKT: Ioctl = 0x5420; +pub const FIONBIO: Ioctl = 0x5421; +pub const TIOCNOTTY: Ioctl = 0x5422; +pub const TIOCSETD: Ioctl = 0x5423; +pub const TIOCGETD: Ioctl = 0x5424; +pub const TCSBRKP: Ioctl = 0x5425; +pub const TIOCSBRK: Ioctl = 0x5427; +pub const TIOCCBRK: Ioctl = 0x5428; +pub const TIOCGSID: Ioctl = 0x5429; +pub const TCGETS2: Ioctl = 0x802c542a; +pub const TCSETS2: Ioctl = 0x402c542b; +pub const TCSETSW2: Ioctl = 0x402c542c; +pub const TCSETSF2: Ioctl = 0x402c542d; +pub const TIOCGRS485: Ioctl = 0x542E; +pub const TIOCSRS485: Ioctl = 0x542F; +pub const TIOCGPTN: Ioctl = 0x80045430; +pub const TIOCSPTLCK: Ioctl = 0x40045431; +pub const TIOCGDEV: Ioctl = 0x80045432; +pub const TCGETX: Ioctl = 0x5432; +pub const TCSETX: Ioctl = 0x5433; +pub const TCSETXF: Ioctl = 0x5434; +pub const TCSETXW: Ioctl = 0x5435; +pub const TIOCSIG: Ioctl = 0x40045436; +pub const TIOCVHANGUP: Ioctl = 0x5437; +pub const TIOCGPKT: Ioctl = 0x80045438; +pub const TIOCGPTLCK: Ioctl = 0x80045439; +pub const TIOCGEXCL: Ioctl = 0x80045440; +pub const TIOCGPTPEER: Ioctl = 0x5441; +// pub const TIOCGISO7816: Ioctl = 0x80285442; +// pub const TIOCSISO7816: Ioctl = 0xc0285443; +pub const FIONCLEX: Ioctl = 0x5450; +pub const FIOCLEX: Ioctl = 0x5451; +pub const FIOASYNC: Ioctl = 0x5452; +pub const TIOCSERCONFIG: Ioctl = 0x5453; +pub const TIOCSERGWILD: Ioctl = 0x5454; +pub const TIOCSERSWILD: Ioctl = 0x5455; +pub const TIOCGLCKTRMIOS: Ioctl = 0x5456; +pub const TIOCSLCKTRMIOS: Ioctl = 0x5457; +pub const TIOCSERGSTRUCT: Ioctl = 0x5458; +pub const TIOCSERGETLSR: Ioctl = 0x5459; +pub const TIOCSERGETMULTI: Ioctl = 0x545A; +pub const TIOCSERSETMULTI: Ioctl = 0x545B; +pub const TIOCMIWAIT: Ioctl = 0x545C; +pub const TIOCGICOUNT: Ioctl = 0x545D; +pub const BLKIOMIN: Ioctl = 0x1278; +pub const BLKIOOPT: Ioctl = 0x1279; +pub const BLKSSZGET: Ioctl = 0x1268; +pub const BLKPBSZGET: Ioctl = 0x127B; // linux/if_tun.h -pub const TUNSETNOCSUM: ::Ioctl = 0x400454c8; -pub const TUNSETDEBUG: ::Ioctl = 0x400454c9; -pub const TUNSETIFF: ::Ioctl = 0x400454ca; -pub const TUNSETPERSIST: ::Ioctl = 0x400454cb; -pub const TUNSETOWNER: ::Ioctl = 0x400454cc; -pub const TUNSETLINK: ::Ioctl = 0x400454cd; -pub const TUNSETGROUP: ::Ioctl = 0x400454ce; -pub const TUNGETFEATURES: ::Ioctl = 0x800454cf; -pub const TUNSETOFFLOAD: ::Ioctl = 0x400454d0; -pub const TUNSETTXFILTER: ::Ioctl = 0x400454d1; -pub const TUNGETIFF: ::Ioctl = 0x800454d2; -pub const TUNGETSNDBUF: ::Ioctl = 0x800454d3; -pub const TUNSETSNDBUF: ::Ioctl = 0x400454d4; -pub const TUNGETVNETHDRSZ: ::Ioctl = 0x800454d7; -pub const TUNSETVNETHDRSZ: ::Ioctl = 0x400454d8; -pub const TUNSETQUEUE: ::Ioctl = 0x400454d9; -pub const TUNSETIFINDEX: ::Ioctl = 0x400454da; -pub const TUNSETVNETLE: ::Ioctl = 0x400454dc; -pub const TUNGETVNETLE: ::Ioctl = 0x800454dd; +pub const TUNSETNOCSUM: Ioctl = 0x400454c8; +pub const TUNSETDEBUG: Ioctl = 0x400454c9; +pub const TUNSETIFF: Ioctl = 0x400454ca; +pub const TUNSETPERSIST: Ioctl = 0x400454cb; +pub const TUNSETOWNER: Ioctl = 0x400454cc; +pub const TUNSETLINK: Ioctl = 0x400454cd; +pub const TUNSETGROUP: Ioctl = 0x400454ce; +pub const TUNGETFEATURES: Ioctl = 0x800454cf; +pub const TUNSETOFFLOAD: Ioctl = 0x400454d0; +pub const TUNSETTXFILTER: Ioctl = 0x400454d1; +pub const TUNGETIFF: Ioctl = 0x800454d2; +pub const TUNGETSNDBUF: Ioctl = 0x800454d3; +pub const TUNSETSNDBUF: Ioctl = 0x400454d4; +pub const TUNGETVNETHDRSZ: Ioctl = 0x800454d7; +pub const TUNSETVNETHDRSZ: Ioctl = 0x400454d8; +pub const TUNSETQUEUE: Ioctl = 0x400454d9; +pub const TUNSETIFINDEX: Ioctl = 0x400454da; +pub const TUNSETVNETLE: Ioctl = 0x400454dc; +pub const TUNGETVNETLE: Ioctl = 0x800454dd; /* The TUNSETVNETBE and TUNGETVNETBE ioctls are for cross-endian support on * little-endian hosts. Not all kernel configurations support them, but all * configurations that support SET also support GET. */ -pub const TUNSETVNETBE: ::Ioctl = 0x400454de; -pub const TUNGETVNETBE: ::Ioctl = 0x800454df; -pub const TUNSETSTEERINGEBPF: ::Ioctl = 0x800454e0; -pub const TUNSETFILTEREBPF: ::Ioctl = 0x800454e1; +pub const TUNSETVNETBE: Ioctl = 0x400454de; +pub const TUNGETVNETBE: Ioctl = 0x800454df; +pub const TUNSETSTEERINGEBPF: Ioctl = 0x800454e0; +pub const TUNSETFILTEREBPF: Ioctl = 0x800454e1; cfg_if! { // Those type are constructed using the _IOC macro @@ -257,17 +259,17 @@ cfg_if! { target_arch = "arm", target_arch = "csky" ))] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80046601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40046602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x80047601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x40047602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x80046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x40046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x80047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x40047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x400854d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x400854d6; - pub const TUNGETFILTER: ::Ioctl = 0x800854db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x80046601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x40046602; + pub const FS_IOC_GETVERSION: Ioctl = 0x80047601; + pub const FS_IOC_SETVERSION: Ioctl = 0x40047602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x80046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x40046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x80047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x40047602; + pub const TUNATTACHFILTER: Ioctl = 0x400854d5; + pub const TUNDETACHFILTER: Ioctl = 0x400854d6; + pub const TUNGETFILTER: Ioctl = 0x800854db; } else if #[cfg(any( target_arch = "x86_64", target_arch = "riscv64", @@ -275,102 +277,102 @@ cfg_if! { target_arch = "s390x", target_arch = "loongarch64" ))] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x80086601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x40086602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x80087601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x40087602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x80046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x40046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x80047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x40047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x401054d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x401054d6; - pub const TUNGETFILTER: ::Ioctl = 0x801054db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x80086601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x40086602; + pub const FS_IOC_GETVERSION: Ioctl = 0x80087601; + pub const FS_IOC_SETVERSION: Ioctl = 0x40087602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x80046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x40046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x80047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x40047602; + pub const TUNATTACHFILTER: Ioctl = 0x401054d5; + pub const TUNDETACHFILTER: Ioctl = 0x401054d6; + pub const TUNGETFILTER: Ioctl = 0x801054db; } } cfg_if! { if #[cfg(any(target_arch = "arm", target_arch = "s390x"))] { - pub const FIOQSIZE: ::Ioctl = 0x545E; + pub const FIOQSIZE: Ioctl = 0x545E; } else { - pub const FIOQSIZE: ::Ioctl = 0x5460; + pub const FIOQSIZE: Ioctl = 0x5460; } } -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x008; -pub const TIOCM_SR: ::c_int = 0x010; -pub const TIOCM_CTS: ::c_int = 0x020; -pub const TIOCM_CAR: ::c_int = 0x040; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RNG: ::c_int = 0x080; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const TIOCM_DSR: ::c_int = 0x100; +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x008; +pub const TIOCM_SR: c_int = 0x010; +pub const TIOCM_CTS: c_int = 0x020; +pub const TIOCM_CAR: c_int = 0x040; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RNG: c_int = 0x080; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const TIOCM_DSR: c_int = 0x100; -pub const BOTHER: ::speed_t = 0o010000; -pub const IBSHIFT: ::tcflag_t = 16; +pub const BOTHER: crate::speed_t = 0o010000; +pub const IBSHIFT: crate::tcflag_t = 16; // RLIMIT Constants cfg_if! { if #[cfg(any(target_env = "gnu", target_env = "uclibc"))] { - pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; - pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; - pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; - pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; - pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; - pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; - pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6; - pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7; - pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8; - pub const RLIMIT_AS: ::__rlimit_resource_t = 9; - pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10; - pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11; - pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12; - pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; - pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; - pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; + pub const RLIMIT_CPU: crate::__rlimit_resource_t = 0; + pub const RLIMIT_FSIZE: crate::__rlimit_resource_t = 1; + pub const RLIMIT_DATA: crate::__rlimit_resource_t = 2; + pub const RLIMIT_STACK: crate::__rlimit_resource_t = 3; + pub const RLIMIT_CORE: crate::__rlimit_resource_t = 4; + pub const RLIMIT_RSS: crate::__rlimit_resource_t = 5; + pub const RLIMIT_NPROC: crate::__rlimit_resource_t = 6; + pub const RLIMIT_NOFILE: crate::__rlimit_resource_t = 7; + pub const RLIMIT_MEMLOCK: crate::__rlimit_resource_t = 8; + pub const RLIMIT_AS: crate::__rlimit_resource_t = 9; + pub const RLIMIT_LOCKS: crate::__rlimit_resource_t = 10; + pub const RLIMIT_SIGPENDING: crate::__rlimit_resource_t = 11; + pub const RLIMIT_MSGQUEUE: crate::__rlimit_resource_t = 12; + pub const RLIMIT_NICE: crate::__rlimit_resource_t = 13; + pub const RLIMIT_RTPRIO: crate::__rlimit_resource_t = 14; + pub const RLIMIT_RTTIME: crate::__rlimit_resource_t = 15; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; + pub const RLIMIT_NLIMITS: crate::__rlimit_resource_t = RLIM_NLIMITS; } else if #[cfg(any(target_env = "musl", target_env = "ohos"))] { - pub const RLIMIT_CPU: ::c_int = 0; - pub const RLIMIT_FSIZE: ::c_int = 1; - pub const RLIMIT_DATA: ::c_int = 2; - pub const RLIMIT_STACK: ::c_int = 3; - pub const RLIMIT_CORE: ::c_int = 4; - pub const RLIMIT_RSS: ::c_int = 5; - pub const RLIMIT_NPROC: ::c_int = 6; - pub const RLIMIT_NOFILE: ::c_int = 7; - pub const RLIMIT_MEMLOCK: ::c_int = 8; - pub const RLIMIT_AS: ::c_int = 9; - pub const RLIMIT_LOCKS: ::c_int = 10; - pub const RLIMIT_SIGPENDING: ::c_int = 11; - pub const RLIMIT_MSGQUEUE: ::c_int = 12; - pub const RLIMIT_NICE: ::c_int = 13; - pub const RLIMIT_RTPRIO: ::c_int = 14; - pub const RLIMIT_RTTIME: ::c_int = 15; + pub const RLIMIT_CPU: c_int = 0; + pub const RLIMIT_FSIZE: c_int = 1; + pub const RLIMIT_DATA: c_int = 2; + pub const RLIMIT_STACK: c_int = 3; + pub const RLIMIT_CORE: c_int = 4; + pub const RLIMIT_RSS: c_int = 5; + pub const RLIMIT_NPROC: c_int = 6; + pub const RLIMIT_NOFILE: c_int = 7; + pub const RLIMIT_MEMLOCK: c_int = 8; + pub const RLIMIT_AS: c_int = 9; + pub const RLIMIT_LOCKS: c_int = 10; + pub const RLIMIT_SIGPENDING: c_int = 11; + pub const RLIMIT_MSGQUEUE: c_int = 12; + pub const RLIMIT_NICE: c_int = 13; + pub const RLIMIT_RTPRIO: c_int = 14; + pub const RLIMIT_RTTIME: c_int = 15; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] #[cfg(not(target_arch = "loongarch64"))] - pub const RLIM_NLIMITS: ::c_int = 15; + pub const RLIM_NLIMITS: c_int = 15; #[cfg(target_arch = "loongarch64")] - pub const RLIM_NLIMITS: ::c_int = 16; + pub const RLIM_NLIMITS: c_int = 16; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; + pub const RLIMIT_NLIMITS: c_int = RLIM_NLIMITS; } } cfg_if! { if #[cfg(target_env = "gnu")] { #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; + pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 16; } else if #[cfg(target_env = "uclibc")] { #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15; + pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 15; } } -pub const RLIM_INFINITY: ::rlim_t = !0; +pub const RLIM_INFINITY: crate::rlim_t = !0; diff --git a/src/unix/linux_like/linux/arch/mips/mod.rs b/src/unix/linux_like/linux/arch/mips/mod.rs index 6432bc405bf66..52469befdccc0 100644 --- a/src/unix/linux_like/linux/arch/mips/mod.rs +++ b/src/unix/linux_like/linux/arch/mips/mod.rs @@ -1,225 +1,227 @@ +use crate::{c_int, c_ulong, Ioctl}; + s! { pub struct termios2 { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; 23], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; 23], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } } // arch/mips/include/uapi/asm/socket.h -pub const SOL_SOCKET: ::c_int = 0xffff; +pub const SOL_SOCKET: c_int = 0xffff; // Defined in unix/linux_like/mod.rs -// pub const SO_DEBUG: ::c_int = 0x0001; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_TYPE: ::c_int = 0x1008; -// pub const SO_STYLE: ::c_int = SO_TYPE; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; +// pub const SO_DEBUG: c_int = 0x0001; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_TYPE: c_int = 0x1008; +// pub const SO_STYLE: c_int = SO_TYPE; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; // NOTE: These definitions are now being renamed with _OLD postfix, // but CI haven't support them yet. // Some related consts could be found in b32.rs and b64.rs -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -// pub const SO_SNDTIMEO_OLD: ::c_int = 0x1005; -// pub const SO_RCVTIMEO_OLD: ::c_int = 0x1006; -pub const SO_ACCEPTCONN: ::c_int = 0x1009; -pub const SO_PROTOCOL: ::c_int = 0x1028; -pub const SO_DOMAIN: ::c_int = 0x1029; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; +// pub const SO_SNDTIMEO_OLD: c_int = 0x1005; +// pub const SO_RCVTIMEO_OLD: c_int = 0x1006; +pub const SO_ACCEPTCONN: c_int = 0x1009; +pub const SO_PROTOCOL: c_int = 0x1028; +pub const SO_DOMAIN: c_int = 0x1029; -pub const SO_NO_CHECK: ::c_int = 11; -pub const SO_PRIORITY: ::c_int = 12; -pub const SO_BSDCOMPAT: ::c_int = 14; -pub const SO_PASSCRED: ::c_int = 17; -pub const SO_PEERCRED: ::c_int = 18; -pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22; -pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23; -pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24; -pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_ATTACH_FILTER: ::c_int = 26; -pub const SO_DETACH_FILTER: ::c_int = 27; -pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; -pub const SO_PEERNAME: ::c_int = 28; -pub const SO_PEERSEC: ::c_int = 30; -pub const SO_SNDBUFFORCE: ::c_int = 31; -pub const SO_RCVBUFFORCE: ::c_int = 33; -pub const SO_PASSSEC: ::c_int = 34; -pub const SO_MARK: ::c_int = 36; -pub const SO_RXQ_OVFL: ::c_int = 40; -pub const SO_WIFI_STATUS: ::c_int = 41; -pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS; -pub const SO_PEEK_OFF: ::c_int = 42; -pub const SO_NOFCS: ::c_int = 43; -pub const SO_LOCK_FILTER: ::c_int = 44; -pub const SO_SELECT_ERR_QUEUE: ::c_int = 45; -pub const SO_BUSY_POLL: ::c_int = 46; -pub const SO_MAX_PACING_RATE: ::c_int = 47; -pub const SO_BPF_EXTENSIONS: ::c_int = 48; -pub const SO_INCOMING_CPU: ::c_int = 49; -pub const SO_ATTACH_BPF: ::c_int = 50; -pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER; -pub const SO_ATTACH_REUSEPORT_CBPF: ::c_int = 51; -pub const SO_ATTACH_REUSEPORT_EBPF: ::c_int = 52; -pub const SO_CNX_ADVICE: ::c_int = 53; -pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 54; -pub const SO_MEMINFO: ::c_int = 55; -pub const SO_INCOMING_NAPI_ID: ::c_int = 56; -pub const SO_COOKIE: ::c_int = 57; -pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 58; -pub const SO_PEERGROUPS: ::c_int = 59; -pub const SO_ZEROCOPY: ::c_int = 60; -pub const SO_TXTIME: ::c_int = 61; -pub const SCM_TXTIME: ::c_int = SO_TXTIME; -pub const SO_BINDTOIFINDEX: ::c_int = 62; +pub const SO_NO_CHECK: c_int = 11; +pub const SO_PRIORITY: c_int = 12; +pub const SO_BSDCOMPAT: c_int = 14; +pub const SO_PASSCRED: c_int = 17; +pub const SO_PEERCRED: c_int = 18; +pub const SO_SECURITY_AUTHENTICATION: c_int = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: c_int = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: c_int = 24; +pub const SO_BINDTODEVICE: c_int = 25; +pub const SO_ATTACH_FILTER: c_int = 26; +pub const SO_DETACH_FILTER: c_int = 27; +pub const SO_GET_FILTER: c_int = SO_ATTACH_FILTER; +pub const SO_PEERNAME: c_int = 28; +pub const SO_PEERSEC: c_int = 30; +pub const SO_SNDBUFFORCE: c_int = 31; +pub const SO_RCVBUFFORCE: c_int = 33; +pub const SO_PASSSEC: c_int = 34; +pub const SO_MARK: c_int = 36; +pub const SO_RXQ_OVFL: c_int = 40; +pub const SO_WIFI_STATUS: c_int = 41; +pub const SCM_WIFI_STATUS: c_int = SO_WIFI_STATUS; +pub const SO_PEEK_OFF: c_int = 42; +pub const SO_NOFCS: c_int = 43; +pub const SO_LOCK_FILTER: c_int = 44; +pub const SO_SELECT_ERR_QUEUE: c_int = 45; +pub const SO_BUSY_POLL: c_int = 46; +pub const SO_MAX_PACING_RATE: c_int = 47; +pub const SO_BPF_EXTENSIONS: c_int = 48; +pub const SO_INCOMING_CPU: c_int = 49; +pub const SO_ATTACH_BPF: c_int = 50; +pub const SO_DETACH_BPF: c_int = SO_DETACH_FILTER; +pub const SO_ATTACH_REUSEPORT_CBPF: c_int = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: c_int = 52; +pub const SO_CNX_ADVICE: c_int = 53; +pub const SCM_TIMESTAMPING_OPT_STATS: c_int = 54; +pub const SO_MEMINFO: c_int = 55; +pub const SO_INCOMING_NAPI_ID: c_int = 56; +pub const SO_COOKIE: c_int = 57; +pub const SCM_TIMESTAMPING_PKTINFO: c_int = 58; +pub const SO_PEERGROUPS: c_int = 59; +pub const SO_ZEROCOPY: c_int = 60; +pub const SO_TXTIME: c_int = 61; +pub const SCM_TXTIME: c_int = SO_TXTIME; +pub const SO_BINDTOIFINDEX: c_int = 62; // NOTE: These definitions are now being renamed with _OLD postfix, // but CI haven't support them yet. // Some related consts could be found in b32.rs and b64.rs -pub const SO_TIMESTAMP: ::c_int = 29; -pub const SO_TIMESTAMPNS: ::c_int = 35; -pub const SO_TIMESTAMPING: ::c_int = 37; -// pub const SO_TIMESTAMP_OLD: ::c_int = 29; -// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35; -// pub const SO_TIMESTAMPING_OLD: ::c_int = 37; -// pub const SO_TIMESTAMP_NEW: ::c_int = 63; -// pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; -// pub const SO_TIMESTAMPING_NEW: ::c_int = 65; -// pub const SO_RCVTIMEO_NEW: ::c_int = 66; -// pub const SO_SNDTIMEO_NEW: ::c_int = 67; -// pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68; -// pub const SO_PREFER_BUSY_POLL: ::c_int = 69; -// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70; +pub const SO_TIMESTAMP: c_int = 29; +pub const SO_TIMESTAMPNS: c_int = 35; +pub const SO_TIMESTAMPING: c_int = 37; +// pub const SO_TIMESTAMP_OLD: c_int = 29; +// pub const SO_TIMESTAMPNS_OLD: c_int = 35; +// pub const SO_TIMESTAMPING_OLD: c_int = 37; +// pub const SO_TIMESTAMP_NEW: c_int = 63; +// pub const SO_TIMESTAMPNS_NEW: c_int = 64; +// pub const SO_TIMESTAMPING_NEW: c_int = 65; +// pub const SO_RCVTIMEO_NEW: c_int = 66; +// pub const SO_SNDTIMEO_NEW: c_int = 67; +// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; +// pub const SO_PREFER_BUSY_POLL: c_int = 69; +// pub const SO_BUSY_POLL_BUDGET: c_int = 70; -pub const FICLONE: ::c_ulong = 0x80049409; -pub const FICLONERANGE: ::c_ulong = 0x8020940D; +pub const FICLONE: c_ulong = 0x80049409; +pub const FICLONERANGE: c_ulong = 0x8020940D; // Defined in unix/linux_like/mod.rs -// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; -pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; -pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; +// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; +pub const SCM_TIMESTAMPNS: c_int = SO_TIMESTAMPNS; +pub const SCM_TIMESTAMPING: c_int = SO_TIMESTAMPING; // Ioctl Constants -pub const TCGETS: ::Ioctl = 0x540d; -pub const TCSETS: ::Ioctl = 0x540e; -pub const TCSETSW: ::Ioctl = 0x540f; -pub const TCSETSF: ::Ioctl = 0x5410; -pub const TCGETA: ::Ioctl = 0x5401; -pub const TCSETA: ::Ioctl = 0x5402; -pub const TCSETAW: ::Ioctl = 0x5403; -pub const TCSETAF: ::Ioctl = 0x5404; -pub const TCSBRK: ::Ioctl = 0x5405; -pub const TCXONC: ::Ioctl = 0x5406; -pub const TCFLSH: ::Ioctl = 0x5407; -pub const TIOCEXCL: ::Ioctl = 0x740d; -pub const TIOCNXCL: ::Ioctl = 0x740e; -pub const TIOCSCTTY: ::Ioctl = 0x5480; -pub const TIOCGPGRP: ::Ioctl = 0x40047477; -pub const TIOCSPGRP: ::Ioctl = 0x80047476; -pub const TIOCOUTQ: ::Ioctl = 0x7472; -pub const TIOCSTI: ::Ioctl = 0x5472; -pub const TIOCGWINSZ: ::Ioctl = 0x40087468; -pub const TIOCSWINSZ: ::Ioctl = 0x80087467; -pub const TIOCMGET: ::Ioctl = 0x741d; -pub const TIOCMBIS: ::Ioctl = 0x741b; -pub const TIOCMBIC: ::Ioctl = 0x741c; -pub const TIOCMSET: ::Ioctl = 0x741a; -pub const TIOCGSOFTCAR: ::Ioctl = 0x5481; -pub const TIOCSSOFTCAR: ::Ioctl = 0x5482; -pub const FIONREAD: ::Ioctl = 0x467f; -pub const TIOCINQ: ::Ioctl = FIONREAD; -pub const TIOCLINUX: ::Ioctl = 0x5483; -pub const TIOCCONS: ::Ioctl = 0x80047478; -pub const TIOCGSERIAL: ::Ioctl = 0x5484; -pub const TIOCSSERIAL: ::Ioctl = 0x5485; -pub const TIOCPKT: ::Ioctl = 0x5470; -pub const FIONBIO: ::Ioctl = 0x667e; -pub const TIOCNOTTY: ::Ioctl = 0x5471; -pub const TIOCSETD: ::Ioctl = 0x7401; -pub const TIOCGETD: ::Ioctl = 0x7400; -pub const TCSBRKP: ::Ioctl = 0x5486; -pub const TIOCSBRK: ::Ioctl = 0x5427; -pub const TIOCCBRK: ::Ioctl = 0x5428; -pub const TIOCGSID: ::Ioctl = 0x7416; -pub const TCGETS2: ::Ioctl = 0x4030542a; -pub const TCSETS2: ::Ioctl = 0x8030542b; -pub const TCSETSW2: ::Ioctl = 0x8030542c; -pub const TCSETSF2: ::Ioctl = 0x8030542d; -pub const TIOCGPTN: ::Ioctl = 0x40045430; -pub const TIOCSPTLCK: ::Ioctl = 0x80045431; -pub const TIOCGDEV: ::Ioctl = 0x40045432; -pub const TIOCSIG: ::Ioctl = 0x80045436; -pub const TIOCVHANGUP: ::Ioctl = 0x5437; -pub const TIOCGPKT: ::Ioctl = 0x40045438; -pub const TIOCGPTLCK: ::Ioctl = 0x40045439; -pub const TIOCGEXCL: ::Ioctl = 0x40045440; -pub const TIOCGPTPEER: ::Ioctl = 0x20005441; -//pub const TIOCGISO7816: ::Ioctl = 0x40285442; -//pub const TIOCSISO7816: ::Ioctl = 0xc0285443; -pub const FIONCLEX: ::Ioctl = 0x6602; -pub const FIOCLEX: ::Ioctl = 0x6601; -pub const FIOASYNC: ::Ioctl = 0x667d; -pub const TIOCSERCONFIG: ::Ioctl = 0x5488; -pub const TIOCSERGWILD: ::Ioctl = 0x5489; -pub const TIOCSERSWILD: ::Ioctl = 0x548a; -pub const TIOCGLCKTRMIOS: ::Ioctl = 0x548b; -pub const TIOCSLCKTRMIOS: ::Ioctl = 0x548c; -pub const TIOCSERGSTRUCT: ::Ioctl = 0x548d; -pub const TIOCSERGETLSR: ::Ioctl = 0x548e; -pub const TIOCSERGETMULTI: ::Ioctl = 0x548f; -pub const TIOCSERSETMULTI: ::Ioctl = 0x5490; -pub const TIOCMIWAIT: ::Ioctl = 0x5491; -pub const TIOCGICOUNT: ::Ioctl = 0x5492; -pub const FIOQSIZE: ::Ioctl = 0x667f; -pub const TIOCSLTC: ::Ioctl = 0x7475; -pub const TIOCGETP: ::Ioctl = 0x7408; -pub const TIOCSETP: ::Ioctl = 0x7409; -pub const TIOCSETN: ::Ioctl = 0x740a; -pub const BLKIOMIN: ::Ioctl = 0x20001278; -pub const BLKIOOPT: ::Ioctl = 0x20001279; -pub const BLKSSZGET: ::Ioctl = 0x20001268; -pub const BLKPBSZGET: ::Ioctl = 0x2000127B; +pub const TCGETS: Ioctl = 0x540d; +pub const TCSETS: Ioctl = 0x540e; +pub const TCSETSW: Ioctl = 0x540f; +pub const TCSETSF: Ioctl = 0x5410; +pub const TCGETA: Ioctl = 0x5401; +pub const TCSETA: Ioctl = 0x5402; +pub const TCSETAW: Ioctl = 0x5403; +pub const TCSETAF: Ioctl = 0x5404; +pub const TCSBRK: Ioctl = 0x5405; +pub const TCXONC: Ioctl = 0x5406; +pub const TCFLSH: Ioctl = 0x5407; +pub const TIOCEXCL: Ioctl = 0x740d; +pub const TIOCNXCL: Ioctl = 0x740e; +pub const TIOCSCTTY: Ioctl = 0x5480; +pub const TIOCGPGRP: Ioctl = 0x40047477; +pub const TIOCSPGRP: Ioctl = 0x80047476; +pub const TIOCOUTQ: Ioctl = 0x7472; +pub const TIOCSTI: Ioctl = 0x5472; +pub const TIOCGWINSZ: Ioctl = 0x40087468; +pub const TIOCSWINSZ: Ioctl = 0x80087467; +pub const TIOCMGET: Ioctl = 0x741d; +pub const TIOCMBIS: Ioctl = 0x741b; +pub const TIOCMBIC: Ioctl = 0x741c; +pub const TIOCMSET: Ioctl = 0x741a; +pub const TIOCGSOFTCAR: Ioctl = 0x5481; +pub const TIOCSSOFTCAR: Ioctl = 0x5482; +pub const FIONREAD: Ioctl = 0x467f; +pub const TIOCINQ: Ioctl = FIONREAD; +pub const TIOCLINUX: Ioctl = 0x5483; +pub const TIOCCONS: Ioctl = 0x80047478; +pub const TIOCGSERIAL: Ioctl = 0x5484; +pub const TIOCSSERIAL: Ioctl = 0x5485; +pub const TIOCPKT: Ioctl = 0x5470; +pub const FIONBIO: Ioctl = 0x667e; +pub const TIOCNOTTY: Ioctl = 0x5471; +pub const TIOCSETD: Ioctl = 0x7401; +pub const TIOCGETD: Ioctl = 0x7400; +pub const TCSBRKP: Ioctl = 0x5486; +pub const TIOCSBRK: Ioctl = 0x5427; +pub const TIOCCBRK: Ioctl = 0x5428; +pub const TIOCGSID: Ioctl = 0x7416; +pub const TCGETS2: Ioctl = 0x4030542a; +pub const TCSETS2: Ioctl = 0x8030542b; +pub const TCSETSW2: Ioctl = 0x8030542c; +pub const TCSETSF2: Ioctl = 0x8030542d; +pub const TIOCGPTN: Ioctl = 0x40045430; +pub const TIOCSPTLCK: Ioctl = 0x80045431; +pub const TIOCGDEV: Ioctl = 0x40045432; +pub const TIOCSIG: Ioctl = 0x80045436; +pub const TIOCVHANGUP: Ioctl = 0x5437; +pub const TIOCGPKT: Ioctl = 0x40045438; +pub const TIOCGPTLCK: Ioctl = 0x40045439; +pub const TIOCGEXCL: Ioctl = 0x40045440; +pub const TIOCGPTPEER: Ioctl = 0x20005441; +//pub const TIOCGISO7816: Ioctl = 0x40285442; +//pub const TIOCSISO7816: Ioctl = 0xc0285443; +pub const FIONCLEX: Ioctl = 0x6602; +pub const FIOCLEX: Ioctl = 0x6601; +pub const FIOASYNC: Ioctl = 0x667d; +pub const TIOCSERCONFIG: Ioctl = 0x5488; +pub const TIOCSERGWILD: Ioctl = 0x5489; +pub const TIOCSERSWILD: Ioctl = 0x548a; +pub const TIOCGLCKTRMIOS: Ioctl = 0x548b; +pub const TIOCSLCKTRMIOS: Ioctl = 0x548c; +pub const TIOCSERGSTRUCT: Ioctl = 0x548d; +pub const TIOCSERGETLSR: Ioctl = 0x548e; +pub const TIOCSERGETMULTI: Ioctl = 0x548f; +pub const TIOCSERSETMULTI: Ioctl = 0x5490; +pub const TIOCMIWAIT: Ioctl = 0x5491; +pub const TIOCGICOUNT: Ioctl = 0x5492; +pub const FIOQSIZE: Ioctl = 0x667f; +pub const TIOCSLTC: Ioctl = 0x7475; +pub const TIOCGETP: Ioctl = 0x7408; +pub const TIOCSETP: Ioctl = 0x7409; +pub const TIOCSETN: Ioctl = 0x740a; +pub const BLKIOMIN: Ioctl = 0x20001278; +pub const BLKIOOPT: Ioctl = 0x20001279; +pub const BLKSSZGET: Ioctl = 0x20001268; +pub const BLKPBSZGET: Ioctl = 0x2000127B; // linux/if_tun.h -pub const TUNSETNOCSUM: ::Ioctl = 0x800454c8; -pub const TUNSETDEBUG: ::Ioctl = 0x800454c9; -pub const TUNSETIFF: ::Ioctl = 0x800454ca; -pub const TUNSETPERSIST: ::Ioctl = 0x800454cb; -pub const TUNSETOWNER: ::Ioctl = 0x800454cc; -pub const TUNSETLINK: ::Ioctl = 0x800454cd; -pub const TUNSETGROUP: ::Ioctl = 0x800454ce; -pub const TUNGETFEATURES: ::Ioctl = 0x400454cf; -pub const TUNSETOFFLOAD: ::Ioctl = 0x800454d0; -pub const TUNSETTXFILTER: ::Ioctl = 0x800454d1; -pub const TUNGETIFF: ::Ioctl = 0x400454d2; -pub const TUNGETSNDBUF: ::Ioctl = 0x400454d3; -pub const TUNSETSNDBUF: ::Ioctl = 0x800454d4; -pub const TUNGETVNETHDRSZ: ::Ioctl = 0x400454d7; -pub const TUNSETVNETHDRSZ: ::Ioctl = 0x800454d8; -pub const TUNSETQUEUE: ::Ioctl = 0x800454d9; -pub const TUNSETIFINDEX: ::Ioctl = 0x800454da; -pub const TUNSETVNETLE: ::Ioctl = 0x800454dc; -pub const TUNGETVNETLE: ::Ioctl = 0x400454dd; +pub const TUNSETNOCSUM: Ioctl = 0x800454c8; +pub const TUNSETDEBUG: Ioctl = 0x800454c9; +pub const TUNSETIFF: Ioctl = 0x800454ca; +pub const TUNSETPERSIST: Ioctl = 0x800454cb; +pub const TUNSETOWNER: Ioctl = 0x800454cc; +pub const TUNSETLINK: Ioctl = 0x800454cd; +pub const TUNSETGROUP: Ioctl = 0x800454ce; +pub const TUNGETFEATURES: Ioctl = 0x400454cf; +pub const TUNSETOFFLOAD: Ioctl = 0x800454d0; +pub const TUNSETTXFILTER: Ioctl = 0x800454d1; +pub const TUNGETIFF: Ioctl = 0x400454d2; +pub const TUNGETSNDBUF: Ioctl = 0x400454d3; +pub const TUNSETSNDBUF: Ioctl = 0x800454d4; +pub const TUNGETVNETHDRSZ: Ioctl = 0x400454d7; +pub const TUNSETVNETHDRSZ: Ioctl = 0x800454d8; +pub const TUNSETQUEUE: Ioctl = 0x800454d9; +pub const TUNSETIFINDEX: Ioctl = 0x800454da; +pub const TUNSETVNETLE: Ioctl = 0x800454dc; +pub const TUNGETVNETLE: Ioctl = 0x400454dd; /* The TUNSETVNETBE and TUNGETVNETBE ioctls are for cross-endian support on * little-endian hosts. Not all kernel configurations support them, but all * configurations that support SET also support GET. */ -pub const TUNSETVNETBE: ::Ioctl = 0x800454de; -pub const TUNGETVNETBE: ::Ioctl = 0x400454df; -pub const TUNSETSTEERINGEBPF: ::Ioctl = 0x400454e0; -pub const TUNSETFILTEREBPF: ::Ioctl = 0x400454e1; +pub const TUNSETVNETBE: Ioctl = 0x800454de; +pub const TUNGETVNETBE: Ioctl = 0x400454df; +pub const TUNSETSTEERINGEBPF: Ioctl = 0x400454e0; +pub const TUNSETFILTEREBPF: Ioctl = 0x400454e1; cfg_if! { // Those type are constructed using the _IOC macro @@ -229,110 +231,110 @@ cfg_if! { // where T stands for type ('f','v','X'...) // where N stands for NR (NumbeR) if #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x80047602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x80047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x800854d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x800854d6; - pub const TUNGETFILTER: ::Ioctl = 0x400854db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC_SETVERSION: Ioctl = 0x80047602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x80047602; + pub const TUNATTACHFILTER: Ioctl = 0x800854d5; + pub const TUNDETACHFILTER: Ioctl = 0x800854d6; + pub const TUNGETFILTER: Ioctl = 0x400854db; } else if #[cfg(any(target_arch = "mips64", target_arch = "mips64r6"))] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x40086601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x80086602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x40087601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x80087602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x80047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x801054d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x801054d6; - pub const TUNGETFILTER: ::Ioctl = 0x401054db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x40086601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x80086602; + pub const FS_IOC_GETVERSION: Ioctl = 0x40087601; + pub const FS_IOC_SETVERSION: Ioctl = 0x80087602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x80047602; + pub const TUNATTACHFILTER: Ioctl = 0x801054d5; + pub const TUNDETACHFILTER: Ioctl = 0x801054d6; + pub const TUNGETFILTER: Ioctl = 0x401054db; } } cfg_if! { if #[cfg(target_env = "musl")] { - pub const TIOCGRS485: ::Ioctl = 0x4020542e; - pub const TIOCSRS485: ::Ioctl = 0xc020542f; + pub const TIOCGRS485: Ioctl = 0x4020542e; + pub const TIOCSRS485: Ioctl = 0xc020542f; } } -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x010; -pub const TIOCM_SR: ::c_int = 0x020; -pub const TIOCM_CTS: ::c_int = 0x040; -pub const TIOCM_CAR: ::c_int = 0x100; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RNG: ::c_int = 0x200; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const TIOCM_DSR: ::c_int = 0x400; +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x010; +pub const TIOCM_SR: c_int = 0x020; +pub const TIOCM_CTS: c_int = 0x040; +pub const TIOCM_CAR: c_int = 0x100; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RNG: c_int = 0x200; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const TIOCM_DSR: c_int = 0x400; -pub const BOTHER: ::speed_t = 0o010000; -pub const IBSHIFT: ::tcflag_t = 16; +pub const BOTHER: crate::speed_t = 0o010000; +pub const IBSHIFT: crate::tcflag_t = 16; // RLIMIT Constants cfg_if! { if #[cfg(any(target_env = "gnu", target_env = "uclibc"))] { - pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; - pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; - pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; - pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; - pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; - pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 5; - pub const RLIMIT_AS: ::__rlimit_resource_t = 6; - pub const RLIMIT_RSS: ::__rlimit_resource_t = 7; - pub const RLIMIT_NPROC: ::__rlimit_resource_t = 8; - pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 9; - pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10; - pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11; - pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12; - pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; - pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; - pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; + pub const RLIMIT_CPU: crate::__rlimit_resource_t = 0; + pub const RLIMIT_FSIZE: crate::__rlimit_resource_t = 1; + pub const RLIMIT_DATA: crate::__rlimit_resource_t = 2; + pub const RLIMIT_STACK: crate::__rlimit_resource_t = 3; + pub const RLIMIT_CORE: crate::__rlimit_resource_t = 4; + pub const RLIMIT_NOFILE: crate::__rlimit_resource_t = 5; + pub const RLIMIT_AS: crate::__rlimit_resource_t = 6; + pub const RLIMIT_RSS: crate::__rlimit_resource_t = 7; + pub const RLIMIT_NPROC: crate::__rlimit_resource_t = 8; + pub const RLIMIT_MEMLOCK: crate::__rlimit_resource_t = 9; + pub const RLIMIT_LOCKS: crate::__rlimit_resource_t = 10; + pub const RLIMIT_SIGPENDING: crate::__rlimit_resource_t = 11; + pub const RLIMIT_MSGQUEUE: crate::__rlimit_resource_t = 12; + pub const RLIMIT_NICE: crate::__rlimit_resource_t = 13; + pub const RLIMIT_RTPRIO: crate::__rlimit_resource_t = 14; + pub const RLIMIT_RTTIME: crate::__rlimit_resource_t = 15; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; + pub const RLIMIT_NLIMITS: crate::__rlimit_resource_t = RLIM_NLIMITS; } else if #[cfg(target_env = "musl")] { - pub const RLIMIT_CPU: ::c_int = 0; - pub const RLIMIT_FSIZE: ::c_int = 1; - pub const RLIMIT_DATA: ::c_int = 2; - pub const RLIMIT_STACK: ::c_int = 3; - pub const RLIMIT_CORE: ::c_int = 4; - pub const RLIMIT_NOFILE: ::c_int = 5; - pub const RLIMIT_AS: ::c_int = 6; - pub const RLIMIT_RSS: ::c_int = 7; - pub const RLIMIT_NPROC: ::c_int = 8; - pub const RLIMIT_MEMLOCK: ::c_int = 9; - pub const RLIMIT_LOCKS: ::c_int = 10; - pub const RLIMIT_SIGPENDING: ::c_int = 11; - pub const RLIMIT_MSGQUEUE: ::c_int = 12; - pub const RLIMIT_NICE: ::c_int = 13; - pub const RLIMIT_RTPRIO: ::c_int = 14; - pub const RLIMIT_RTTIME: ::c_int = 15; + pub const RLIMIT_CPU: c_int = 0; + pub const RLIMIT_FSIZE: c_int = 1; + pub const RLIMIT_DATA: c_int = 2; + pub const RLIMIT_STACK: c_int = 3; + pub const RLIMIT_CORE: c_int = 4; + pub const RLIMIT_NOFILE: c_int = 5; + pub const RLIMIT_AS: c_int = 6; + pub const RLIMIT_RSS: c_int = 7; + pub const RLIMIT_NPROC: c_int = 8; + pub const RLIMIT_MEMLOCK: c_int = 9; + pub const RLIMIT_LOCKS: c_int = 10; + pub const RLIMIT_SIGPENDING: c_int = 11; + pub const RLIMIT_MSGQUEUE: c_int = 12; + pub const RLIMIT_NICE: c_int = 13; + pub const RLIMIT_RTPRIO: c_int = 14; + pub const RLIMIT_RTTIME: c_int = 15; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::c_int = 15; + pub const RLIM_NLIMITS: c_int = 15; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; - pub const RLIM_INFINITY: ::rlim_t = !0; + pub const RLIMIT_NLIMITS: c_int = RLIM_NLIMITS; + pub const RLIM_INFINITY: crate::rlim_t = !0; } } cfg_if! { if #[cfg(target_env = "gnu")] { #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; + pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 16; } else if #[cfg(target_env = "uclibc")] { #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::__rlimit_resource_t = 15; + pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 15; } } @@ -341,7 +343,7 @@ cfg_if! { any(target_arch = "mips64", target_arch = "mips64r6"), any(target_env = "gnu", target_env = "uclibc") )] { - pub const RLIM_INFINITY: ::rlim_t = !0; + pub const RLIM_INFINITY: crate::rlim_t = !0; } } @@ -350,6 +352,6 @@ cfg_if! { any(target_arch = "mips", target_arch = "mips32r6"), any(target_env = "gnu", target_env = "uclibc") )] { - pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff; + pub const RLIM_INFINITY: crate::rlim_t = 0x7fffffff; } } diff --git a/src/unix/linux_like/linux/arch/powerpc/mod.rs b/src/unix/linux_like/linux/arch/powerpc/mod.rs index ca2ffd348e8db..2c856061d3391 100644 --- a/src/unix/linux_like/linux/arch/powerpc/mod.rs +++ b/src/unix/linux_like/linux/arch/powerpc/mod.rs @@ -1,211 +1,213 @@ +use crate::{c_int, c_ulong, Ioctl}; + // arch/powerpc/include/uapi/asm/socket.h -pub const SOL_SOCKET: ::c_int = 1; +pub const SOL_SOCKET: c_int = 1; // Defined in unix/linux_like/mod.rs -// pub const SO_DEBUG: ::c_int = 1; -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_NO_CHECK: ::c_int = 11; -pub const SO_PRIORITY: ::c_int = 12; -pub const SO_LINGER: ::c_int = 13; -pub const SO_BSDCOMPAT: ::c_int = 14; -pub const SO_REUSEPORT: ::c_int = 15; +// pub const SO_DEBUG: c_int = 1; +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_DONTROUTE: c_int = 5; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_OOBINLINE: c_int = 10; +pub const SO_NO_CHECK: c_int = 11; +pub const SO_PRIORITY: c_int = 12; +pub const SO_LINGER: c_int = 13; +pub const SO_BSDCOMPAT: c_int = 14; +pub const SO_REUSEPORT: c_int = 15; // powerpc only differs in these -pub const SO_RCVLOWAT: ::c_int = 16; -pub const SO_SNDLOWAT: ::c_int = 17; -pub const SO_RCVTIMEO: ::c_int = 18; -pub const SO_SNDTIMEO: ::c_int = 19; -// pub const SO_RCVTIMEO_OLD: ::c_int = 18; -// pub const SO_SNDTIMEO_OLD: ::c_int = 19; -pub const SO_PASSCRED: ::c_int = 20; -pub const SO_PEERCRED: ::c_int = 21; +pub const SO_RCVLOWAT: c_int = 16; +pub const SO_SNDLOWAT: c_int = 17; +pub const SO_RCVTIMEO: c_int = 18; +pub const SO_SNDTIMEO: c_int = 19; +// pub const SO_RCVTIMEO_OLD: c_int = 18; +// pub const SO_SNDTIMEO_OLD: c_int = 19; +pub const SO_PASSCRED: c_int = 20; +pub const SO_PEERCRED: c_int = 21; // end -pub const SO_SECURITY_AUTHENTICATION: ::c_int = 22; -pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 23; -pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 24; -pub const SO_BINDTODEVICE: ::c_int = 25; -pub const SO_ATTACH_FILTER: ::c_int = 26; -pub const SO_DETACH_FILTER: ::c_int = 27; -pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; -pub const SO_PEERNAME: ::c_int = 28; -pub const SO_TIMESTAMP: ::c_int = 29; -// pub const SO_TIMESTAMP_OLD: ::c_int = 29; -pub const SO_ACCEPTCONN: ::c_int = 30; -pub const SO_PEERSEC: ::c_int = 31; -pub const SO_SNDBUFFORCE: ::c_int = 32; -pub const SO_RCVBUFFORCE: ::c_int = 33; -pub const SO_PASSSEC: ::c_int = 34; -pub const SO_TIMESTAMPNS: ::c_int = 35; -// pub const SO_TIMESTAMPNS_OLD: ::c_int = 35; -pub const SO_MARK: ::c_int = 36; -pub const SO_TIMESTAMPING: ::c_int = 37; -// pub const SO_TIMESTAMPING_OLD: ::c_int = 37; -pub const SO_PROTOCOL: ::c_int = 38; -pub const SO_DOMAIN: ::c_int = 39; -pub const SO_RXQ_OVFL: ::c_int = 40; -pub const SO_WIFI_STATUS: ::c_int = 41; -pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS; -pub const SO_PEEK_OFF: ::c_int = 42; -pub const SO_NOFCS: ::c_int = 43; -pub const SO_LOCK_FILTER: ::c_int = 44; -pub const SO_SELECT_ERR_QUEUE: ::c_int = 45; -pub const SO_BUSY_POLL: ::c_int = 46; -pub const SO_MAX_PACING_RATE: ::c_int = 47; -pub const SO_BPF_EXTENSIONS: ::c_int = 48; -pub const SO_INCOMING_CPU: ::c_int = 49; -pub const SO_ATTACH_BPF: ::c_int = 50; -pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER; -pub const SO_ATTACH_REUSEPORT_CBPF: ::c_int = 51; -pub const SO_ATTACH_REUSEPORT_EBPF: ::c_int = 52; -pub const SO_CNX_ADVICE: ::c_int = 53; -pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 54; -pub const SO_MEMINFO: ::c_int = 55; -pub const SO_INCOMING_NAPI_ID: ::c_int = 56; -pub const SO_COOKIE: ::c_int = 57; -pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 58; -pub const SO_PEERGROUPS: ::c_int = 59; -pub const SO_ZEROCOPY: ::c_int = 60; -pub const SO_TXTIME: ::c_int = 61; -pub const SCM_TXTIME: ::c_int = SO_TXTIME; -pub const SO_BINDTOIFINDEX: ::c_int = 62; -// pub const SO_TIMESTAMP_NEW: ::c_int = 63; -// pub const SO_TIMESTAMPNS_NEW: ::c_int = 64; -// pub const SO_TIMESTAMPING_NEW: ::c_int = 65; -// pub const SO_RCVTIMEO_NEW: ::c_int = 66; -// pub const SO_SNDTIMEO_NEW: ::c_int = 67; -// pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 68; -// pub const SO_PREFER_BUSY_POLL: ::c_int = 69; -// pub const SO_BUSY_POLL_BUDGET: ::c_int = 70; +pub const SO_SECURITY_AUTHENTICATION: c_int = 22; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: c_int = 23; +pub const SO_SECURITY_ENCRYPTION_NETWORK: c_int = 24; +pub const SO_BINDTODEVICE: c_int = 25; +pub const SO_ATTACH_FILTER: c_int = 26; +pub const SO_DETACH_FILTER: c_int = 27; +pub const SO_GET_FILTER: c_int = SO_ATTACH_FILTER; +pub const SO_PEERNAME: c_int = 28; +pub const SO_TIMESTAMP: c_int = 29; +// pub const SO_TIMESTAMP_OLD: c_int = 29; +pub const SO_ACCEPTCONN: c_int = 30; +pub const SO_PEERSEC: c_int = 31; +pub const SO_SNDBUFFORCE: c_int = 32; +pub const SO_RCVBUFFORCE: c_int = 33; +pub const SO_PASSSEC: c_int = 34; +pub const SO_TIMESTAMPNS: c_int = 35; +// pub const SO_TIMESTAMPNS_OLD: c_int = 35; +pub const SO_MARK: c_int = 36; +pub const SO_TIMESTAMPING: c_int = 37; +// pub const SO_TIMESTAMPING_OLD: c_int = 37; +pub const SO_PROTOCOL: c_int = 38; +pub const SO_DOMAIN: c_int = 39; +pub const SO_RXQ_OVFL: c_int = 40; +pub const SO_WIFI_STATUS: c_int = 41; +pub const SCM_WIFI_STATUS: c_int = SO_WIFI_STATUS; +pub const SO_PEEK_OFF: c_int = 42; +pub const SO_NOFCS: c_int = 43; +pub const SO_LOCK_FILTER: c_int = 44; +pub const SO_SELECT_ERR_QUEUE: c_int = 45; +pub const SO_BUSY_POLL: c_int = 46; +pub const SO_MAX_PACING_RATE: c_int = 47; +pub const SO_BPF_EXTENSIONS: c_int = 48; +pub const SO_INCOMING_CPU: c_int = 49; +pub const SO_ATTACH_BPF: c_int = 50; +pub const SO_DETACH_BPF: c_int = SO_DETACH_FILTER; +pub const SO_ATTACH_REUSEPORT_CBPF: c_int = 51; +pub const SO_ATTACH_REUSEPORT_EBPF: c_int = 52; +pub const SO_CNX_ADVICE: c_int = 53; +pub const SCM_TIMESTAMPING_OPT_STATS: c_int = 54; +pub const SO_MEMINFO: c_int = 55; +pub const SO_INCOMING_NAPI_ID: c_int = 56; +pub const SO_COOKIE: c_int = 57; +pub const SCM_TIMESTAMPING_PKTINFO: c_int = 58; +pub const SO_PEERGROUPS: c_int = 59; +pub const SO_ZEROCOPY: c_int = 60; +pub const SO_TXTIME: c_int = 61; +pub const SCM_TXTIME: c_int = SO_TXTIME; +pub const SO_BINDTOIFINDEX: c_int = 62; +// pub const SO_TIMESTAMP_NEW: c_int = 63; +// pub const SO_TIMESTAMPNS_NEW: c_int = 64; +// pub const SO_TIMESTAMPING_NEW: c_int = 65; +// pub const SO_RCVTIMEO_NEW: c_int = 66; +// pub const SO_SNDTIMEO_NEW: c_int = 67; +// pub const SO_DETACH_REUSEPORT_BPF: c_int = 68; +// pub const SO_PREFER_BUSY_POLL: c_int = 69; +// pub const SO_BUSY_POLL_BUDGET: c_int = 70; -pub const FICLONE: ::c_ulong = 0x80049409; -pub const FICLONERANGE: ::c_ulong = 0x8020940D; +pub const FICLONE: c_ulong = 0x80049409; +pub const FICLONERANGE: c_ulong = 0x8020940D; // Defined in unix/linux_like/mod.rs -// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; -pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; -pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; +// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; +pub const SCM_TIMESTAMPNS: c_int = SO_TIMESTAMPNS; +pub const SCM_TIMESTAMPING: c_int = SO_TIMESTAMPING; // Ioctl Constants cfg_if! { if #[cfg(target_env = "gnu")] { - pub const TCGETS: ::Ioctl = 0x403c7413; - pub const TCSETS: ::Ioctl = 0x803c7414; - pub const TCSETSW: ::Ioctl = 0x803c7415; - pub const TCSETSF: ::Ioctl = 0x803c7416; + pub const TCGETS: Ioctl = 0x403c7413; + pub const TCSETS: Ioctl = 0x803c7414; + pub const TCSETSW: Ioctl = 0x803c7415; + pub const TCSETSF: Ioctl = 0x803c7416; } else if #[cfg(target_env = "musl")] { - pub const TCGETS: ::Ioctl = 0x402c7413; - pub const TCSETS: ::Ioctl = 0x802c7414; - pub const TCSETSW: ::Ioctl = 0x802c7415; - pub const TCSETSF: ::Ioctl = 0x802c7416; + pub const TCGETS: Ioctl = 0x402c7413; + pub const TCSETS: Ioctl = 0x802c7414; + pub const TCSETSW: Ioctl = 0x802c7415; + pub const TCSETSF: Ioctl = 0x802c7416; } } -pub const TCGETA: ::Ioctl = 0x40147417; -pub const TCSETA: ::Ioctl = 0x80147418; -pub const TCSETAW: ::Ioctl = 0x80147419; -pub const TCSETAF: ::Ioctl = 0x8014741C; -pub const TCSBRK: ::Ioctl = 0x2000741D; -pub const TCXONC: ::Ioctl = 0x2000741E; -pub const TCFLSH: ::Ioctl = 0x2000741F; -pub const TIOCEXCL: ::Ioctl = 0x540C; -pub const TIOCNXCL: ::Ioctl = 0x540D; -pub const TIOCSCTTY: ::Ioctl = 0x540E; -pub const TIOCGPGRP: ::Ioctl = 0x40047477; -pub const TIOCSPGRP: ::Ioctl = 0x80047476; -pub const TIOCOUTQ: ::Ioctl = 0x40047473; -pub const TIOCSTI: ::Ioctl = 0x5412; -pub const TIOCGWINSZ: ::Ioctl = 0x40087468; -pub const TIOCSWINSZ: ::Ioctl = 0x80087467; -pub const TIOCMGET: ::Ioctl = 0x5415; -pub const TIOCMBIS: ::Ioctl = 0x5416; -pub const TIOCMBIC: ::Ioctl = 0x5417; -pub const TIOCMSET: ::Ioctl = 0x5418; -pub const TIOCGSOFTCAR: ::Ioctl = 0x5419; -pub const TIOCSSOFTCAR: ::Ioctl = 0x541A; -pub const FIONREAD: ::Ioctl = 0x4004667F; -pub const TIOCINQ: ::Ioctl = FIONREAD; -pub const TIOCLINUX: ::Ioctl = 0x541C; -pub const TIOCCONS: ::Ioctl = 0x541D; -pub const TIOCGSERIAL: ::Ioctl = 0x541E; -pub const TIOCSSERIAL: ::Ioctl = 0x541F; -pub const TIOCPKT: ::Ioctl = 0x5420; -pub const FIONBIO: ::Ioctl = 0x8004667e; -pub const TIOCNOTTY: ::Ioctl = 0x5422; -pub const TIOCSETD: ::Ioctl = 0x5423; -pub const TIOCGETD: ::Ioctl = 0x5424; -pub const TCSBRKP: ::Ioctl = 0x5425; -pub const TIOCSBRK: ::Ioctl = 0x5427; -pub const TIOCCBRK: ::Ioctl = 0x5428; -pub const TIOCGSID: ::Ioctl = 0x5429; -pub const TIOCGRS485: ::Ioctl = 0x542e; -pub const TIOCSRS485: ::Ioctl = 0x542f; -pub const TIOCGPTN: ::Ioctl = 0x40045430; -pub const TIOCSPTLCK: ::Ioctl = 0x80045431; -pub const TIOCGDEV: ::Ioctl = 0x40045432; -pub const TIOCSIG: ::Ioctl = 0x80045436; -pub const TIOCVHANGUP: ::Ioctl = 0x5437; -pub const TIOCGPKT: ::Ioctl = 0x40045438; -pub const TIOCGPTLCK: ::Ioctl = 0x40045439; -pub const TIOCGEXCL: ::Ioctl = 0x40045440; -pub const TIOCGPTPEER: ::Ioctl = 0x20005441; -//pub const TIOCGISO7816: ::Ioctl = 0x40285442; -//pub const TIOCSISO7816: ::Ioctl = 0xc0285443; -pub const FIONCLEX: ::Ioctl = 0x20006602; -pub const FIOCLEX: ::Ioctl = 0x20006601; -pub const FIOASYNC: ::Ioctl = 0x8004667d; -pub const TIOCSERCONFIG: ::Ioctl = 0x5453; -pub const TIOCSERGWILD: ::Ioctl = 0x5454; -pub const TIOCSERSWILD: ::Ioctl = 0x5455; -pub const TIOCGLCKTRMIOS: ::Ioctl = 0x5456; -pub const TIOCSLCKTRMIOS: ::Ioctl = 0x5457; -pub const TIOCSERGSTRUCT: ::Ioctl = 0x5458; -pub const TIOCSERGETLSR: ::Ioctl = 0x5459; -pub const TIOCSERGETMULTI: ::Ioctl = 0x545A; -pub const TIOCSERSETMULTI: ::Ioctl = 0x545B; -pub const TIOCMIWAIT: ::Ioctl = 0x545C; -pub const TIOCGICOUNT: ::Ioctl = 0x545D; -pub const BLKIOMIN: ::Ioctl = 0x20001278; -pub const BLKIOOPT: ::Ioctl = 0x20001279; -pub const BLKSSZGET: ::Ioctl = 0x20001268; -pub const BLKPBSZGET: ::Ioctl = 0x2000127B; -//pub const FIOQSIZE: ::Ioctl = 0x40086680; +pub const TCGETA: Ioctl = 0x40147417; +pub const TCSETA: Ioctl = 0x80147418; +pub const TCSETAW: Ioctl = 0x80147419; +pub const TCSETAF: Ioctl = 0x8014741C; +pub const TCSBRK: Ioctl = 0x2000741D; +pub const TCXONC: Ioctl = 0x2000741E; +pub const TCFLSH: Ioctl = 0x2000741F; +pub const TIOCEXCL: Ioctl = 0x540C; +pub const TIOCNXCL: Ioctl = 0x540D; +pub const TIOCSCTTY: Ioctl = 0x540E; +pub const TIOCGPGRP: Ioctl = 0x40047477; +pub const TIOCSPGRP: Ioctl = 0x80047476; +pub const TIOCOUTQ: Ioctl = 0x40047473; +pub const TIOCSTI: Ioctl = 0x5412; +pub const TIOCGWINSZ: Ioctl = 0x40087468; +pub const TIOCSWINSZ: Ioctl = 0x80087467; +pub const TIOCMGET: Ioctl = 0x5415; +pub const TIOCMBIS: Ioctl = 0x5416; +pub const TIOCMBIC: Ioctl = 0x5417; +pub const TIOCMSET: Ioctl = 0x5418; +pub const TIOCGSOFTCAR: Ioctl = 0x5419; +pub const TIOCSSOFTCAR: Ioctl = 0x541A; +pub const FIONREAD: Ioctl = 0x4004667F; +pub const TIOCINQ: Ioctl = FIONREAD; +pub const TIOCLINUX: Ioctl = 0x541C; +pub const TIOCCONS: Ioctl = 0x541D; +pub const TIOCGSERIAL: Ioctl = 0x541E; +pub const TIOCSSERIAL: Ioctl = 0x541F; +pub const TIOCPKT: Ioctl = 0x5420; +pub const FIONBIO: Ioctl = 0x8004667e; +pub const TIOCNOTTY: Ioctl = 0x5422; +pub const TIOCSETD: Ioctl = 0x5423; +pub const TIOCGETD: Ioctl = 0x5424; +pub const TCSBRKP: Ioctl = 0x5425; +pub const TIOCSBRK: Ioctl = 0x5427; +pub const TIOCCBRK: Ioctl = 0x5428; +pub const TIOCGSID: Ioctl = 0x5429; +pub const TIOCGRS485: Ioctl = 0x542e; +pub const TIOCSRS485: Ioctl = 0x542f; +pub const TIOCGPTN: Ioctl = 0x40045430; +pub const TIOCSPTLCK: Ioctl = 0x80045431; +pub const TIOCGDEV: Ioctl = 0x40045432; +pub const TIOCSIG: Ioctl = 0x80045436; +pub const TIOCVHANGUP: Ioctl = 0x5437; +pub const TIOCGPKT: Ioctl = 0x40045438; +pub const TIOCGPTLCK: Ioctl = 0x40045439; +pub const TIOCGEXCL: Ioctl = 0x40045440; +pub const TIOCGPTPEER: Ioctl = 0x20005441; +//pub const TIOCGISO7816: Ioctl = 0x40285442; +//pub const TIOCSISO7816: Ioctl = 0xc0285443; +pub const FIONCLEX: Ioctl = 0x20006602; +pub const FIOCLEX: Ioctl = 0x20006601; +pub const FIOASYNC: Ioctl = 0x8004667d; +pub const TIOCSERCONFIG: Ioctl = 0x5453; +pub const TIOCSERGWILD: Ioctl = 0x5454; +pub const TIOCSERSWILD: Ioctl = 0x5455; +pub const TIOCGLCKTRMIOS: Ioctl = 0x5456; +pub const TIOCSLCKTRMIOS: Ioctl = 0x5457; +pub const TIOCSERGSTRUCT: Ioctl = 0x5458; +pub const TIOCSERGETLSR: Ioctl = 0x5459; +pub const TIOCSERGETMULTI: Ioctl = 0x545A; +pub const TIOCSERSETMULTI: Ioctl = 0x545B; +pub const TIOCMIWAIT: Ioctl = 0x545C; +pub const TIOCGICOUNT: Ioctl = 0x545D; +pub const BLKIOMIN: Ioctl = 0x20001278; +pub const BLKIOOPT: Ioctl = 0x20001279; +pub const BLKSSZGET: Ioctl = 0x20001268; +pub const BLKPBSZGET: Ioctl = 0x2000127B; +//pub const FIOQSIZE: Ioctl = 0x40086680; // linux/if_tun.h -pub const TUNSETNOCSUM: ::Ioctl = 0x800454c8; -pub const TUNSETDEBUG: ::Ioctl = 0x800454c9; -pub const TUNSETIFF: ::Ioctl = 0x800454ca; -pub const TUNSETPERSIST: ::Ioctl = 0x800454cb; -pub const TUNSETOWNER: ::Ioctl = 0x800454cc; -pub const TUNSETLINK: ::Ioctl = 0x800454cd; -pub const TUNSETGROUP: ::Ioctl = 0x800454ce; -pub const TUNGETFEATURES: ::Ioctl = 0x400454cf; -pub const TUNSETOFFLOAD: ::Ioctl = 0x800454d0; -pub const TUNSETTXFILTER: ::Ioctl = 0x800454d1; -pub const TUNGETIFF: ::Ioctl = 0x400454d2; -pub const TUNGETSNDBUF: ::Ioctl = 0x400454d3; -pub const TUNSETSNDBUF: ::Ioctl = 0x800454d4; -pub const TUNGETVNETHDRSZ: ::Ioctl = 0x400454d7; -pub const TUNSETVNETHDRSZ: ::Ioctl = 0x800454d8; -pub const TUNSETQUEUE: ::Ioctl = 0x800454d9; -pub const TUNSETIFINDEX: ::Ioctl = 0x800454da; -pub const TUNSETVNETLE: ::Ioctl = 0x800454dc; -pub const TUNGETVNETLE: ::Ioctl = 0x400454dd; +pub const TUNSETNOCSUM: Ioctl = 0x800454c8; +pub const TUNSETDEBUG: Ioctl = 0x800454c9; +pub const TUNSETIFF: Ioctl = 0x800454ca; +pub const TUNSETPERSIST: Ioctl = 0x800454cb; +pub const TUNSETOWNER: Ioctl = 0x800454cc; +pub const TUNSETLINK: Ioctl = 0x800454cd; +pub const TUNSETGROUP: Ioctl = 0x800454ce; +pub const TUNGETFEATURES: Ioctl = 0x400454cf; +pub const TUNSETOFFLOAD: Ioctl = 0x800454d0; +pub const TUNSETTXFILTER: Ioctl = 0x800454d1; +pub const TUNGETIFF: Ioctl = 0x400454d2; +pub const TUNGETSNDBUF: Ioctl = 0x400454d3; +pub const TUNSETSNDBUF: Ioctl = 0x800454d4; +pub const TUNGETVNETHDRSZ: Ioctl = 0x400454d7; +pub const TUNSETVNETHDRSZ: Ioctl = 0x800454d8; +pub const TUNSETQUEUE: Ioctl = 0x800454d9; +pub const TUNSETIFINDEX: Ioctl = 0x800454da; +pub const TUNSETVNETLE: Ioctl = 0x800454dc; +pub const TUNGETVNETLE: Ioctl = 0x400454dd; /* The TUNSETVNETBE and TUNGETVNETBE ioctls are for cross-endian support on * little-endian hosts. Not all kernel configurations support them, but all * configurations that support SET also support GET. */ -pub const TUNSETVNETBE: ::Ioctl = 0x800454de; -pub const TUNGETVNETBE: ::Ioctl = 0x400454df; -pub const TUNSETSTEERINGEBPF: ::Ioctl = 0x400454e0; -pub const TUNSETFILTEREBPF: ::Ioctl = 0x400454e1; +pub const TUNSETVNETBE: Ioctl = 0x800454de; +pub const TUNGETVNETBE: Ioctl = 0x400454df; +pub const TUNSETSTEERINGEBPF: Ioctl = 0x400454e0; +pub const TUNSETFILTEREBPF: Ioctl = 0x400454e1; cfg_if! { // Those type are constructed using the _IOC macro @@ -215,94 +217,94 @@ cfg_if! { // where T stands for type ('f','v','X'...) // where N stands for NR (NumbeR) if #[cfg(target_arch = "powerpc")] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x80047602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x80047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x800854d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x800854d6; - pub const TUNGETFILTER: ::Ioctl = 0x400854db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC_SETVERSION: Ioctl = 0x80047602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x80047602; + pub const TUNATTACHFILTER: Ioctl = 0x800854d5; + pub const TUNDETACHFILTER: Ioctl = 0x800854d6; + pub const TUNGETFILTER: Ioctl = 0x400854db; } else if #[cfg(target_arch = "powerpc64")] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x40086601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x80086602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x40087601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x80087602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x80047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x801054d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x801054d6; - pub const TUNGETFILTER: ::Ioctl = 0x401054db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x40086601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x80086602; + pub const FS_IOC_GETVERSION: Ioctl = 0x40087601; + pub const FS_IOC_SETVERSION: Ioctl = 0x80087602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x80047602; + pub const TUNATTACHFILTER: Ioctl = 0x801054d5; + pub const TUNDETACHFILTER: Ioctl = 0x801054d6; + pub const TUNGETFILTER: Ioctl = 0x401054db; } } -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x008; -pub const TIOCM_SR: ::c_int = 0x010; -pub const TIOCM_CTS: ::c_int = 0x020; -pub const TIOCM_CAR: ::c_int = 0x040; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RNG: ::c_int = 0x080; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const TIOCM_DSR: ::c_int = 0x100; +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x008; +pub const TIOCM_SR: c_int = 0x010; +pub const TIOCM_CTS: c_int = 0x020; +pub const TIOCM_CAR: c_int = 0x040; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RNG: c_int = 0x080; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const TIOCM_DSR: c_int = 0x100; -pub const BOTHER: ::speed_t = 0o0037; -pub const IBSHIFT: ::tcflag_t = 16; +pub const BOTHER: crate::speed_t = 0o0037; +pub const IBSHIFT: crate::tcflag_t = 16; // RLIMIT Constants cfg_if! { if #[cfg(target_env = "gnu")] { - pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; - pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; - pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; - pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; - pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; - pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; - pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6; - pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7; - pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8; - pub const RLIMIT_AS: ::__rlimit_resource_t = 9; - pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10; - pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11; - pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12; - pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; - pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; - pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; + pub const RLIMIT_CPU: crate::__rlimit_resource_t = 0; + pub const RLIMIT_FSIZE: crate::__rlimit_resource_t = 1; + pub const RLIMIT_DATA: crate::__rlimit_resource_t = 2; + pub const RLIMIT_STACK: crate::__rlimit_resource_t = 3; + pub const RLIMIT_CORE: crate::__rlimit_resource_t = 4; + pub const RLIMIT_RSS: crate::__rlimit_resource_t = 5; + pub const RLIMIT_NPROC: crate::__rlimit_resource_t = 6; + pub const RLIMIT_NOFILE: crate::__rlimit_resource_t = 7; + pub const RLIMIT_MEMLOCK: crate::__rlimit_resource_t = 8; + pub const RLIMIT_AS: crate::__rlimit_resource_t = 9; + pub const RLIMIT_LOCKS: crate::__rlimit_resource_t = 10; + pub const RLIMIT_SIGPENDING: crate::__rlimit_resource_t = 11; + pub const RLIMIT_MSGQUEUE: crate::__rlimit_resource_t = 12; + pub const RLIMIT_NICE: crate::__rlimit_resource_t = 13; + pub const RLIMIT_RTPRIO: crate::__rlimit_resource_t = 14; + pub const RLIMIT_RTTIME: crate::__rlimit_resource_t = 15; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; + pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 16; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; + pub const RLIMIT_NLIMITS: crate::__rlimit_resource_t = RLIM_NLIMITS; } else if #[cfg(target_env = "musl")] { - pub const RLIMIT_CPU: ::c_int = 0; - pub const RLIMIT_FSIZE: ::c_int = 1; - pub const RLIMIT_DATA: ::c_int = 2; - pub const RLIMIT_STACK: ::c_int = 3; - pub const RLIMIT_CORE: ::c_int = 4; - pub const RLIMIT_RSS: ::c_int = 5; - pub const RLIMIT_NPROC: ::c_int = 6; - pub const RLIMIT_NOFILE: ::c_int = 7; - pub const RLIMIT_MEMLOCK: ::c_int = 8; - pub const RLIMIT_AS: ::c_int = 9; - pub const RLIMIT_LOCKS: ::c_int = 10; - pub const RLIMIT_SIGPENDING: ::c_int = 11; - pub const RLIMIT_MSGQUEUE: ::c_int = 12; - pub const RLIMIT_NICE: ::c_int = 13; - pub const RLIMIT_RTPRIO: ::c_int = 14; - pub const RLIMIT_RTTIME: ::c_int = 15; + pub const RLIMIT_CPU: c_int = 0; + pub const RLIMIT_FSIZE: c_int = 1; + pub const RLIMIT_DATA: c_int = 2; + pub const RLIMIT_STACK: c_int = 3; + pub const RLIMIT_CORE: c_int = 4; + pub const RLIMIT_RSS: c_int = 5; + pub const RLIMIT_NPROC: c_int = 6; + pub const RLIMIT_NOFILE: c_int = 7; + pub const RLIMIT_MEMLOCK: c_int = 8; + pub const RLIMIT_AS: c_int = 9; + pub const RLIMIT_LOCKS: c_int = 10; + pub const RLIMIT_SIGPENDING: c_int = 11; + pub const RLIMIT_MSGQUEUE: c_int = 12; + pub const RLIMIT_NICE: c_int = 13; + pub const RLIMIT_RTPRIO: c_int = 14; + pub const RLIMIT_RTTIME: c_int = 15; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIM_NLIMITS: ::c_int = 15; + pub const RLIM_NLIMITS: c_int = 15; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] - pub const RLIMIT_NLIMITS: ::c_int = RLIM_NLIMITS; + pub const RLIMIT_NLIMITS: c_int = RLIM_NLIMITS; } } -pub const RLIM_INFINITY: ::rlim_t = !0; +pub const RLIM_INFINITY: crate::rlim_t = !0; diff --git a/src/unix/linux_like/linux/arch/sparc/mod.rs b/src/unix/linux_like/linux/arch/sparc/mod.rs index b64e6ce7149a5..40454fde34f5d 100644 --- a/src/unix/linux_like/linux/arch/sparc/mod.rs +++ b/src/unix/linux_like/linux/arch/sparc/mod.rs @@ -1,261 +1,263 @@ +use crate::{c_int, Ioctl}; + s! { pub struct termios2 { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; 19], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; 19], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } } // arch/sparc/include/uapi/asm/socket.h -pub const SOL_SOCKET: ::c_int = 0xffff; +pub const SOL_SOCKET: c_int = 0xffff; // Defined in unix/linux_like/mod.rs -// pub const SO_DEBUG: ::c_int = 0x0001; -pub const SO_PASSCRED: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_PEERCRED: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_BSDCOMPAT: ::c_int = 0x0400; -pub const SO_RCVLOWAT: ::c_int = 0x0800; -pub const SO_SNDLOWAT: ::c_int = 0x1000; -pub const SO_RCVTIMEO: ::c_int = 0x2000; -pub const SO_SNDTIMEO: ::c_int = 0x4000; -// pub const SO_RCVTIMEO_OLD: ::c_int = 0x2000; -// pub const SO_SNDTIMEO_OLD: ::c_int = 0x4000; -pub const SO_ACCEPTCONN: ::c_int = 0x8000; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDBUFFORCE: ::c_int = 0x100a; -pub const SO_RCVBUFFORCE: ::c_int = 0x100b; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_PROTOCOL: ::c_int = 0x1028; -pub const SO_DOMAIN: ::c_int = 0x1029; -pub const SO_NO_CHECK: ::c_int = 0x000b; -pub const SO_PRIORITY: ::c_int = 0x000c; -pub const SO_BINDTODEVICE: ::c_int = 0x000d; -pub const SO_ATTACH_FILTER: ::c_int = 0x001a; -pub const SO_DETACH_FILTER: ::c_int = 0x001b; -pub const SO_GET_FILTER: ::c_int = SO_ATTACH_FILTER; -pub const SO_PEERNAME: ::c_int = 0x001c; -pub const SO_PEERSEC: ::c_int = 0x001e; -pub const SO_PASSSEC: ::c_int = 0x001f; -pub const SO_MARK: ::c_int = 0x0022; -pub const SO_RXQ_OVFL: ::c_int = 0x0024; -pub const SO_WIFI_STATUS: ::c_int = 0x0025; -pub const SCM_WIFI_STATUS: ::c_int = SO_WIFI_STATUS; -pub const SO_PEEK_OFF: ::c_int = 0x0026; -pub const SO_NOFCS: ::c_int = 0x0027; -pub const SO_LOCK_FILTER: ::c_int = 0x0028; -pub const SO_SELECT_ERR_QUEUE: ::c_int = 0x0029; -pub const SO_BUSY_POLL: ::c_int = 0x0030; -pub const SO_MAX_PACING_RATE: ::c_int = 0x0031; -pub const SO_BPF_EXTENSIONS: ::c_int = 0x0032; -pub const SO_INCOMING_CPU: ::c_int = 0x0033; -pub const SO_ATTACH_BPF: ::c_int = 0x0034; -pub const SO_DETACH_BPF: ::c_int = SO_DETACH_FILTER; -pub const SO_ATTACH_REUSEPORT_CBPF: ::c_int = 0x0035; -pub const SO_ATTACH_REUSEPORT_EBPF: ::c_int = 0x0036; -pub const SO_CNX_ADVICE: ::c_int = 0x0037; -pub const SCM_TIMESTAMPING_OPT_STATS: ::c_int = 0x0038; -pub const SO_MEMINFO: ::c_int = 0x0039; -pub const SO_INCOMING_NAPI_ID: ::c_int = 0x003a; -pub const SO_COOKIE: ::c_int = 0x003b; -pub const SCM_TIMESTAMPING_PKTINFO: ::c_int = 0x003c; -pub const SO_PEERGROUPS: ::c_int = 0x003d; -pub const SO_ZEROCOPY: ::c_int = 0x003e; -pub const SO_TXTIME: ::c_int = 0x003f; -pub const SCM_TXTIME: ::c_int = SO_TXTIME; -pub const SO_BINDTOIFINDEX: ::c_int = 0x0041; -pub const SO_SECURITY_AUTHENTICATION: ::c_int = 0x5001; -pub const SO_SECURITY_ENCRYPTION_TRANSPORT: ::c_int = 0x5002; -pub const SO_SECURITY_ENCRYPTION_NETWORK: ::c_int = 0x5004; -pub const SO_TIMESTAMP: ::c_int = 0x001d; -pub const SO_TIMESTAMPNS: ::c_int = 0x0021; -pub const SO_TIMESTAMPING: ::c_int = 0x0023; -// pub const SO_TIMESTAMP_OLD: ::c_int = 0x001d; -// pub const SO_TIMESTAMPNS_OLD: ::c_int = 0x0021; -// pub const SO_TIMESTAMPING_OLD: ::c_int = 0x0023; -// pub const SO_TIMESTAMP_NEW: ::c_int = 0x0046; -// pub const SO_TIMESTAMPNS_NEW: ::c_int = 0x0042; -// pub const SO_TIMESTAMPING_NEW: ::c_int = 0x0043; -// pub const SO_RCVTIMEO_NEW: ::c_int = 0x0044; -// pub const SO_SNDTIMEO_NEW: ::c_int = 0x0045; -// pub const SO_DETACH_REUSEPORT_BPF: ::c_int = 0x0047; -// pub const SO_PREFER_BUSY_POLL: ::c_int = 0x0048; -// pub const SO_BUSY_POLL_BUDGET: ::c_int = 0x0049; +// pub const SO_DEBUG: c_int = 0x0001; +pub const SO_PASSCRED: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_PEERCRED: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_BSDCOMPAT: c_int = 0x0400; +pub const SO_RCVLOWAT: c_int = 0x0800; +pub const SO_SNDLOWAT: c_int = 0x1000; +pub const SO_RCVTIMEO: c_int = 0x2000; +pub const SO_SNDTIMEO: c_int = 0x4000; +// pub const SO_RCVTIMEO_OLD: c_int = 0x2000; +// pub const SO_SNDTIMEO_OLD: c_int = 0x4000; +pub const SO_ACCEPTCONN: c_int = 0x8000; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDBUFFORCE: c_int = 0x100a; +pub const SO_RCVBUFFORCE: c_int = 0x100b; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; +pub const SO_PROTOCOL: c_int = 0x1028; +pub const SO_DOMAIN: c_int = 0x1029; +pub const SO_NO_CHECK: c_int = 0x000b; +pub const SO_PRIORITY: c_int = 0x000c; +pub const SO_BINDTODEVICE: c_int = 0x000d; +pub const SO_ATTACH_FILTER: c_int = 0x001a; +pub const SO_DETACH_FILTER: c_int = 0x001b; +pub const SO_GET_FILTER: c_int = SO_ATTACH_FILTER; +pub const SO_PEERNAME: c_int = 0x001c; +pub const SO_PEERSEC: c_int = 0x001e; +pub const SO_PASSSEC: c_int = 0x001f; +pub const SO_MARK: c_int = 0x0022; +pub const SO_RXQ_OVFL: c_int = 0x0024; +pub const SO_WIFI_STATUS: c_int = 0x0025; +pub const SCM_WIFI_STATUS: c_int = SO_WIFI_STATUS; +pub const SO_PEEK_OFF: c_int = 0x0026; +pub const SO_NOFCS: c_int = 0x0027; +pub const SO_LOCK_FILTER: c_int = 0x0028; +pub const SO_SELECT_ERR_QUEUE: c_int = 0x0029; +pub const SO_BUSY_POLL: c_int = 0x0030; +pub const SO_MAX_PACING_RATE: c_int = 0x0031; +pub const SO_BPF_EXTENSIONS: c_int = 0x0032; +pub const SO_INCOMING_CPU: c_int = 0x0033; +pub const SO_ATTACH_BPF: c_int = 0x0034; +pub const SO_DETACH_BPF: c_int = SO_DETACH_FILTER; +pub const SO_ATTACH_REUSEPORT_CBPF: c_int = 0x0035; +pub const SO_ATTACH_REUSEPORT_EBPF: c_int = 0x0036; +pub const SO_CNX_ADVICE: c_int = 0x0037; +pub const SCM_TIMESTAMPING_OPT_STATS: c_int = 0x0038; +pub const SO_MEMINFO: c_int = 0x0039; +pub const SO_INCOMING_NAPI_ID: c_int = 0x003a; +pub const SO_COOKIE: c_int = 0x003b; +pub const SCM_TIMESTAMPING_PKTINFO: c_int = 0x003c; +pub const SO_PEERGROUPS: c_int = 0x003d; +pub const SO_ZEROCOPY: c_int = 0x003e; +pub const SO_TXTIME: c_int = 0x003f; +pub const SCM_TXTIME: c_int = SO_TXTIME; +pub const SO_BINDTOIFINDEX: c_int = 0x0041; +pub const SO_SECURITY_AUTHENTICATION: c_int = 0x5001; +pub const SO_SECURITY_ENCRYPTION_TRANSPORT: c_int = 0x5002; +pub const SO_SECURITY_ENCRYPTION_NETWORK: c_int = 0x5004; +pub const SO_TIMESTAMP: c_int = 0x001d; +pub const SO_TIMESTAMPNS: c_int = 0x0021; +pub const SO_TIMESTAMPING: c_int = 0x0023; +// pub const SO_TIMESTAMP_OLD: c_int = 0x001d; +// pub const SO_TIMESTAMPNS_OLD: c_int = 0x0021; +// pub const SO_TIMESTAMPING_OLD: c_int = 0x0023; +// pub const SO_TIMESTAMP_NEW: c_int = 0x0046; +// pub const SO_TIMESTAMPNS_NEW: c_int = 0x0042; +// pub const SO_TIMESTAMPING_NEW: c_int = 0x0043; +// pub const SO_RCVTIMEO_NEW: c_int = 0x0044; +// pub const SO_SNDTIMEO_NEW: c_int = 0x0045; +// pub const SO_DETACH_REUSEPORT_BPF: c_int = 0x0047; +// pub const SO_PREFER_BUSY_POLL: c_int = 0x0048; +// pub const SO_BUSY_POLL_BUDGET: c_int = 0x0049; // Defined in unix/linux_like/mod.rs -// pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; -pub const SCM_TIMESTAMPNS: ::c_int = SO_TIMESTAMPNS; -pub const SCM_TIMESTAMPING: ::c_int = SO_TIMESTAMPING; +// pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; +pub const SCM_TIMESTAMPNS: c_int = SO_TIMESTAMPNS; +pub const SCM_TIMESTAMPING: c_int = SO_TIMESTAMPING; // Ioctl Constants -pub const TCGETS: ::Ioctl = 0x40245408; -pub const TCSETS: ::Ioctl = 0x80245409; -pub const TCSETSW: ::Ioctl = 0x8024540a; -pub const TCSETSF: ::Ioctl = 0x8024540b; -pub const TCGETA: ::Ioctl = 0x40125401; -pub const TCSETA: ::Ioctl = 0x80125402; -pub const TCSETAW: ::Ioctl = 0x80125403; -pub const TCSETAF: ::Ioctl = 0x80125404; -pub const TCSBRK: ::Ioctl = 0x20005405; -pub const TCXONC: ::Ioctl = 0x20005406; -pub const TCFLSH: ::Ioctl = 0x20005407; -pub const TIOCEXCL: ::Ioctl = 0x2000740d; -pub const TIOCNXCL: ::Ioctl = 0x2000740e; -pub const TIOCSCTTY: ::Ioctl = 0x20007484; -pub const TIOCGPGRP: ::Ioctl = 0x40047483; -pub const TIOCSPGRP: ::Ioctl = 0x80047482; -pub const TIOCOUTQ: ::Ioctl = 0x40047473; -pub const TIOCSTI: ::Ioctl = 0x80017472; -pub const TIOCGWINSZ: ::Ioctl = 0x40087468; -pub const TIOCSWINSZ: ::Ioctl = 0x80087467; -pub const TIOCMGET: ::Ioctl = 0x4004746a; -pub const TIOCMBIS: ::Ioctl = 0x8004746c; -pub const TIOCMBIC: ::Ioctl = 0x8004746b; -pub const TIOCMSET: ::Ioctl = 0x8004746d; -pub const TIOCGSOFTCAR: ::Ioctl = 0x40047464; -pub const TIOCSSOFTCAR: ::Ioctl = 0x80047465; -pub const FIONREAD: ::Ioctl = 0x4004667f; -pub const TIOCINQ: ::Ioctl = FIONREAD; -pub const TIOCLINUX: ::Ioctl = 0x541C; -pub const TIOCCONS: ::Ioctl = 0x20007424; -pub const TIOCGSERIAL: ::Ioctl = 0x541E; -pub const TIOCSSERIAL: ::Ioctl = 0x541F; -pub const TIOCPKT: ::Ioctl = 0x80047470; -pub const FIONBIO: ::Ioctl = 0x8004667e; -pub const TIOCNOTTY: ::Ioctl = 0x20007471; -pub const TIOCSETD: ::Ioctl = 0x80047401; -pub const TIOCGETD: ::Ioctl = 0x40047400; -pub const TCSBRKP: ::Ioctl = 0x5425; -pub const TIOCSBRK: ::Ioctl = 0x2000747b; -pub const TIOCCBRK: ::Ioctl = 0x2000747a; -pub const TIOCGSID: ::Ioctl = 0x40047485; -pub const TCGETS2: ::Ioctl = 0x402c540c; -pub const TCSETS2: ::Ioctl = 0x802c540d; -pub const TCSETSW2: ::Ioctl = 0x802c540e; -pub const TCSETSF2: ::Ioctl = 0x802c540f; -pub const TIOCGPTN: ::Ioctl = 0x40047486; -pub const TIOCSPTLCK: ::Ioctl = 0x80047487; -pub const TIOCGDEV: ::Ioctl = 0x40045432; -pub const TIOCSIG: ::Ioctl = 0x80047488; -pub const TIOCVHANGUP: ::Ioctl = 0x20005437; -pub const TIOCGPKT: ::Ioctl = 0x40045438; -pub const TIOCGPTLCK: ::Ioctl = 0x40045439; -pub const TIOCGEXCL: ::Ioctl = 0x40045440; -pub const TIOCGPTPEER: ::Ioctl = 0x20007489; -pub const FIONCLEX: ::Ioctl = 0x20006602; -pub const FIOCLEX: ::Ioctl = 0x20006601; -pub const TIOCSERCONFIG: ::Ioctl = 0x5453; -pub const TIOCSERGWILD: ::Ioctl = 0x5454; -pub const TIOCSERSWILD: ::Ioctl = 0x5455; -pub const TIOCGLCKTRMIOS: ::Ioctl = 0x5456; -pub const TIOCSLCKTRMIOS: ::Ioctl = 0x5457; -pub const TIOCSERGSTRUCT: ::Ioctl = 0x5458; -pub const TIOCSERGETLSR: ::Ioctl = 0x5459; -pub const TIOCSERGETMULTI: ::Ioctl = 0x545A; -pub const TIOCSERSETMULTI: ::Ioctl = 0x545B; -pub const TIOCMIWAIT: ::Ioctl = 0x545C; -pub const TIOCGICOUNT: ::Ioctl = 0x545D; -pub const TIOCSTART: ::Ioctl = 0x2000746e; -pub const TIOCSTOP: ::Ioctl = 0x2000746f; -pub const BLKIOMIN: ::Ioctl = 0x20001278; -pub const BLKIOOPT: ::Ioctl = 0x20001279; -pub const BLKSSZGET: ::Ioctl = 0x20001268; -pub const BLKPBSZGET: ::Ioctl = 0x2000127B; +pub const TCGETS: Ioctl = 0x40245408; +pub const TCSETS: Ioctl = 0x80245409; +pub const TCSETSW: Ioctl = 0x8024540a; +pub const TCSETSF: Ioctl = 0x8024540b; +pub const TCGETA: Ioctl = 0x40125401; +pub const TCSETA: Ioctl = 0x80125402; +pub const TCSETAW: Ioctl = 0x80125403; +pub const TCSETAF: Ioctl = 0x80125404; +pub const TCSBRK: Ioctl = 0x20005405; +pub const TCXONC: Ioctl = 0x20005406; +pub const TCFLSH: Ioctl = 0x20005407; +pub const TIOCEXCL: Ioctl = 0x2000740d; +pub const TIOCNXCL: Ioctl = 0x2000740e; +pub const TIOCSCTTY: Ioctl = 0x20007484; +pub const TIOCGPGRP: Ioctl = 0x40047483; +pub const TIOCSPGRP: Ioctl = 0x80047482; +pub const TIOCOUTQ: Ioctl = 0x40047473; +pub const TIOCSTI: Ioctl = 0x80017472; +pub const TIOCGWINSZ: Ioctl = 0x40087468; +pub const TIOCSWINSZ: Ioctl = 0x80087467; +pub const TIOCMGET: Ioctl = 0x4004746a; +pub const TIOCMBIS: Ioctl = 0x8004746c; +pub const TIOCMBIC: Ioctl = 0x8004746b; +pub const TIOCMSET: Ioctl = 0x8004746d; +pub const TIOCGSOFTCAR: Ioctl = 0x40047464; +pub const TIOCSSOFTCAR: Ioctl = 0x80047465; +pub const FIONREAD: Ioctl = 0x4004667f; +pub const TIOCINQ: Ioctl = FIONREAD; +pub const TIOCLINUX: Ioctl = 0x541C; +pub const TIOCCONS: Ioctl = 0x20007424; +pub const TIOCGSERIAL: Ioctl = 0x541E; +pub const TIOCSSERIAL: Ioctl = 0x541F; +pub const TIOCPKT: Ioctl = 0x80047470; +pub const FIONBIO: Ioctl = 0x8004667e; +pub const TIOCNOTTY: Ioctl = 0x20007471; +pub const TIOCSETD: Ioctl = 0x80047401; +pub const TIOCGETD: Ioctl = 0x40047400; +pub const TCSBRKP: Ioctl = 0x5425; +pub const TIOCSBRK: Ioctl = 0x2000747b; +pub const TIOCCBRK: Ioctl = 0x2000747a; +pub const TIOCGSID: Ioctl = 0x40047485; +pub const TCGETS2: Ioctl = 0x402c540c; +pub const TCSETS2: Ioctl = 0x802c540d; +pub const TCSETSW2: Ioctl = 0x802c540e; +pub const TCSETSF2: Ioctl = 0x802c540f; +pub const TIOCGPTN: Ioctl = 0x40047486; +pub const TIOCSPTLCK: Ioctl = 0x80047487; +pub const TIOCGDEV: Ioctl = 0x40045432; +pub const TIOCSIG: Ioctl = 0x80047488; +pub const TIOCVHANGUP: Ioctl = 0x20005437; +pub const TIOCGPKT: Ioctl = 0x40045438; +pub const TIOCGPTLCK: Ioctl = 0x40045439; +pub const TIOCGEXCL: Ioctl = 0x40045440; +pub const TIOCGPTPEER: Ioctl = 0x20007489; +pub const FIONCLEX: Ioctl = 0x20006602; +pub const FIOCLEX: Ioctl = 0x20006601; +pub const TIOCSERCONFIG: Ioctl = 0x5453; +pub const TIOCSERGWILD: Ioctl = 0x5454; +pub const TIOCSERSWILD: Ioctl = 0x5455; +pub const TIOCGLCKTRMIOS: Ioctl = 0x5456; +pub const TIOCSLCKTRMIOS: Ioctl = 0x5457; +pub const TIOCSERGSTRUCT: Ioctl = 0x5458; +pub const TIOCSERGETLSR: Ioctl = 0x5459; +pub const TIOCSERGETMULTI: Ioctl = 0x545A; +pub const TIOCSERSETMULTI: Ioctl = 0x545B; +pub const TIOCMIWAIT: Ioctl = 0x545C; +pub const TIOCGICOUNT: Ioctl = 0x545D; +pub const TIOCSTART: Ioctl = 0x2000746e; +pub const TIOCSTOP: Ioctl = 0x2000746f; +pub const BLKIOMIN: Ioctl = 0x20001278; +pub const BLKIOOPT: Ioctl = 0x20001279; +pub const BLKSSZGET: Ioctl = 0x20001268; +pub const BLKPBSZGET: Ioctl = 0x2000127B; -//pub const FIOASYNC: ::Ioctl = 0x4004667d; -//pub const FIOQSIZE: ::Ioctl = ; -//pub const TIOCGISO7816: ::Ioctl = 0x40285443; -//pub const TIOCSISO7816: ::Ioctl = 0xc0285444; -//pub const TIOCGRS485: ::Ioctl = 0x40205441; -//pub const TIOCSRS485: ::Ioctl = 0xc0205442; +//pub const FIOASYNC: Ioctl = 0x4004667d; +//pub const FIOQSIZE: Ioctl = ; +//pub const TIOCGISO7816: Ioctl = 0x40285443; +//pub const TIOCSISO7816: Ioctl = 0xc0285444; +//pub const TIOCGRS485: Ioctl = 0x40205441; +//pub const TIOCSRS485: Ioctl = 0xc0205442; // linux/if_tun.h -pub const TUNSETNOCSUM: ::Ioctl = 0x800454c8; -pub const TUNSETDEBUG: ::Ioctl = 0x800454c9; -pub const TUNSETIFF: ::Ioctl = 0x800454ca; -pub const TUNSETPERSIST: ::Ioctl = 0x800454cb; -pub const TUNSETOWNER: ::Ioctl = 0x800454cc; -pub const TUNSETLINK: ::Ioctl = 0x800454cd; -pub const TUNSETGROUP: ::Ioctl = 0x800454ce; -pub const TUNGETFEATURES: ::Ioctl = 0x400454cf; -pub const TUNSETOFFLOAD: ::Ioctl = 0x800454d0; -pub const TUNSETTXFILTER: ::Ioctl = 0x800454d1; -pub const TUNGETIFF: ::Ioctl = 0x400454d2; -pub const TUNGETSNDBUF: ::Ioctl = 0x400454d3; -pub const TUNSETSNDBUF: ::Ioctl = 0x800454d4; -pub const TUNGETVNETHDRSZ: ::Ioctl = 0x400454d7; -pub const TUNSETVNETHDRSZ: ::Ioctl = 0x800454d8; -pub const TUNSETQUEUE: ::Ioctl = 0x800454d9; -pub const TUNSETIFINDEX: ::Ioctl = 0x800454da; -pub const TUNSETVNETLE: ::Ioctl = 0x800454dc; -pub const TUNGETVNETLE: ::Ioctl = 0x400454dd; +pub const TUNSETNOCSUM: Ioctl = 0x800454c8; +pub const TUNSETDEBUG: Ioctl = 0x800454c9; +pub const TUNSETIFF: Ioctl = 0x800454ca; +pub const TUNSETPERSIST: Ioctl = 0x800454cb; +pub const TUNSETOWNER: Ioctl = 0x800454cc; +pub const TUNSETLINK: Ioctl = 0x800454cd; +pub const TUNSETGROUP: Ioctl = 0x800454ce; +pub const TUNGETFEATURES: Ioctl = 0x400454cf; +pub const TUNSETOFFLOAD: Ioctl = 0x800454d0; +pub const TUNSETTXFILTER: Ioctl = 0x800454d1; +pub const TUNGETIFF: Ioctl = 0x400454d2; +pub const TUNGETSNDBUF: Ioctl = 0x400454d3; +pub const TUNSETSNDBUF: Ioctl = 0x800454d4; +pub const TUNGETVNETHDRSZ: Ioctl = 0x400454d7; +pub const TUNSETVNETHDRSZ: Ioctl = 0x800454d8; +pub const TUNSETQUEUE: Ioctl = 0x800454d9; +pub const TUNSETIFINDEX: Ioctl = 0x800454da; +pub const TUNSETVNETLE: Ioctl = 0x800454dc; +pub const TUNGETVNETLE: Ioctl = 0x400454dd; /* The TUNSETVNETBE and TUNGETVNETBE ioctls are for cross-endian support on * little-endian hosts. Not all kernel configurations support them, but all * configurations that support SET also support GET. */ -pub const TUNSETVNETBE: ::Ioctl = 0x800454de; -pub const TUNGETVNETBE: ::Ioctl = 0x400454df; -pub const TUNSETSTEERINGEBPF: ::Ioctl = 0x400454e0; -pub const TUNSETFILTEREBPF: ::Ioctl = 0x400454e1; +pub const TUNSETVNETBE: Ioctl = 0x800454de; +pub const TUNGETVNETBE: Ioctl = 0x400454df; +pub const TUNSETSTEERINGEBPF: Ioctl = 0x400454e0; +pub const TUNSETFILTEREBPF: Ioctl = 0x400454e1; -pub const TIOCM_LE: ::c_int = 0x001; -pub const TIOCM_DTR: ::c_int = 0x002; -pub const TIOCM_RTS: ::c_int = 0x004; -pub const TIOCM_ST: ::c_int = 0x008; -pub const TIOCM_SR: ::c_int = 0x010; -pub const TIOCM_CTS: ::c_int = 0x020; -pub const TIOCM_CAR: ::c_int = 0x040; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RNG: ::c_int = 0x080; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const TIOCM_DSR: ::c_int = 0x100; +pub const TIOCM_LE: c_int = 0x001; +pub const TIOCM_DTR: c_int = 0x002; +pub const TIOCM_RTS: c_int = 0x004; +pub const TIOCM_ST: c_int = 0x008; +pub const TIOCM_SR: c_int = 0x010; +pub const TIOCM_CTS: c_int = 0x020; +pub const TIOCM_CAR: c_int = 0x040; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RNG: c_int = 0x080; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const TIOCM_DSR: c_int = 0x100; -pub const BOTHER: ::speed_t = 0x1000; -pub const IBSHIFT: ::tcflag_t = 16; +pub const BOTHER: crate::speed_t = 0x1000; +pub const IBSHIFT: crate::tcflag_t = 16; // RLIMIT Constants -pub const RLIMIT_CPU: ::__rlimit_resource_t = 0; -pub const RLIMIT_FSIZE: ::__rlimit_resource_t = 1; -pub const RLIMIT_DATA: ::__rlimit_resource_t = 2; -pub const RLIMIT_STACK: ::__rlimit_resource_t = 3; -pub const RLIMIT_CORE: ::__rlimit_resource_t = 4; -pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; -pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 6; -pub const RLIMIT_NPROC: ::__rlimit_resource_t = 7; -pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8; -pub const RLIMIT_AS: ::__rlimit_resource_t = 9; -pub const RLIMIT_LOCKS: ::__rlimit_resource_t = 10; -pub const RLIMIT_SIGPENDING: ::__rlimit_resource_t = 11; -pub const RLIMIT_MSGQUEUE: ::__rlimit_resource_t = 12; -pub const RLIMIT_NICE: ::__rlimit_resource_t = 13; -pub const RLIMIT_RTPRIO: ::__rlimit_resource_t = 14; -pub const RLIMIT_RTTIME: ::__rlimit_resource_t = 15; +pub const RLIMIT_CPU: crate::__rlimit_resource_t = 0; +pub const RLIMIT_FSIZE: crate::__rlimit_resource_t = 1; +pub const RLIMIT_DATA: crate::__rlimit_resource_t = 2; +pub const RLIMIT_STACK: crate::__rlimit_resource_t = 3; +pub const RLIMIT_CORE: crate::__rlimit_resource_t = 4; +pub const RLIMIT_RSS: crate::__rlimit_resource_t = 5; +pub const RLIMIT_NOFILE: crate::__rlimit_resource_t = 6; +pub const RLIMIT_NPROC: crate::__rlimit_resource_t = 7; +pub const RLIMIT_MEMLOCK: crate::__rlimit_resource_t = 8; +pub const RLIMIT_AS: crate::__rlimit_resource_t = 9; +pub const RLIMIT_LOCKS: crate::__rlimit_resource_t = 10; +pub const RLIMIT_SIGPENDING: crate::__rlimit_resource_t = 11; +pub const RLIMIT_MSGQUEUE: crate::__rlimit_resource_t = 12; +pub const RLIMIT_NICE: crate::__rlimit_resource_t = 13; +pub const RLIMIT_RTPRIO: crate::__rlimit_resource_t = 14; +pub const RLIMIT_RTTIME: crate::__rlimit_resource_t = 15; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::__rlimit_resource_t = 16; +pub const RLIM_NLIMITS: crate::__rlimit_resource_t = 16; #[allow(deprecated)] #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIMIT_NLIMITS: ::__rlimit_resource_t = RLIM_NLIMITS; +pub const RLIMIT_NLIMITS: crate::__rlimit_resource_t = RLIM_NLIMITS; cfg_if! { if #[cfg(target_arch = "sparc64")] { - pub const RLIM_INFINITY: ::rlim_t = !0; + pub const RLIM_INFINITY: crate::rlim_t = !0; } else if #[cfg(target_arch = "sparc")] { - pub const RLIM_INFINITY: ::rlim_t = 0x7fffffff; + pub const RLIM_INFINITY: crate::rlim_t = 0x7fffffff; } } @@ -267,28 +269,28 @@ cfg_if! { // where T stands for type ('f','v','X'...) // where N stands for NR (NumbeR) if #[cfg(target_arch = "sparc")] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x80047602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x80047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x800854d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x800854d6; - pub const TUNGETFILTER: ::Ioctl = 0x400854db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC_SETVERSION: Ioctl = 0x80047602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x80047602; + pub const TUNATTACHFILTER: Ioctl = 0x800854d5; + pub const TUNDETACHFILTER: Ioctl = 0x800854d6; + pub const TUNGETFILTER: Ioctl = 0x400854db; } else if #[cfg(target_arch = "sparc64")] { - pub const FS_IOC_GETFLAGS: ::Ioctl = 0x40086601; - pub const FS_IOC_SETFLAGS: ::Ioctl = 0x80086602; - pub const FS_IOC_GETVERSION: ::Ioctl = 0x40087601; - pub const FS_IOC_SETVERSION: ::Ioctl = 0x80087602; - pub const FS_IOC32_GETFLAGS: ::Ioctl = 0x40046601; - pub const FS_IOC32_SETFLAGS: ::Ioctl = 0x80046602; - pub const FS_IOC32_GETVERSION: ::Ioctl = 0x40047601; - pub const FS_IOC32_SETVERSION: ::Ioctl = 0x80047602; - pub const TUNATTACHFILTER: ::Ioctl = 0x801054d5; - pub const TUNDETACHFILTER: ::Ioctl = 0x801054d6; - pub const TUNGETFILTER: ::Ioctl = 0x401054db; + pub const FS_IOC_GETFLAGS: Ioctl = 0x40086601; + pub const FS_IOC_SETFLAGS: Ioctl = 0x80086602; + pub const FS_IOC_GETVERSION: Ioctl = 0x40087601; + pub const FS_IOC_SETVERSION: Ioctl = 0x80087602; + pub const FS_IOC32_GETFLAGS: Ioctl = 0x40046601; + pub const FS_IOC32_SETFLAGS: Ioctl = 0x80046602; + pub const FS_IOC32_GETVERSION: Ioctl = 0x40047601; + pub const FS_IOC32_SETVERSION: Ioctl = 0x80047602; + pub const TUNATTACHFILTER: Ioctl = 0x801054d5; + pub const TUNDETACHFILTER: Ioctl = 0x801054d6; + pub const TUNGETFILTER: Ioctl = 0x401054db; } } diff --git a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs index 67a91084e81c5..f318b4ad9223f 100644 --- a/src/unix/linux_like/linux/gnu/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/arm/mod.rs @@ -1,151 +1,153 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = u8; pub type wchar_t = u32; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - f_spare: [::__fsword_t; 4], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + f_spare: [crate::__fsword_t; 4], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct stat64 { - pub st_dev: ::dev_t, - __pad1: ::c_uint, - __st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_uint, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino64_t, + pub st_dev: crate::dev_t, + __pad1: c_uint, + __st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: c_uint, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino64_t, } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_ulong, - pub shm_dtime: ::time_t, - __unused2: ::c_ulong, - pub shm_ctime: ::time_t, - __unused3: ::c_ulong, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_ulong, + pub shm_dtime: crate::time_t, + __unused2: c_ulong, + pub shm_ctime: crate::time_t, + __unused3: c_ulong, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __glibc_reserved1: ::c_ulong, - pub msg_rtime: ::time_t, - __glibc_reserved2: ::c_ulong, - pub msg_ctime: ::time_t, - __glibc_reserved3: ::c_ulong, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __glibc_reserved1: c_ulong, + pub msg_rtime: crate::time_t, + __glibc_reserved2: c_ulong, + pub msg_ctime: crate::time_t, + __glibc_reserved3: c_ulong, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -153,59 +155,59 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct mcontext_t { - pub trap_no: ::c_ulong, - pub error_code: ::c_ulong, - pub oldmask: ::c_ulong, - pub arm_r0: ::c_ulong, - pub arm_r1: ::c_ulong, - pub arm_r2: ::c_ulong, - pub arm_r3: ::c_ulong, - pub arm_r4: ::c_ulong, - pub arm_r5: ::c_ulong, - pub arm_r6: ::c_ulong, - pub arm_r7: ::c_ulong, - pub arm_r8: ::c_ulong, - pub arm_r9: ::c_ulong, - pub arm_r10: ::c_ulong, - pub arm_fp: ::c_ulong, - pub arm_ip: ::c_ulong, - pub arm_sp: ::c_ulong, - pub arm_lr: ::c_ulong, - pub arm_pc: ::c_ulong, - pub arm_cpsr: ::c_ulong, - pub fault_address: ::c_ulong, + pub trap_no: c_ulong, + pub error_code: c_ulong, + pub oldmask: c_ulong, + pub arm_r0: c_ulong, + pub arm_r1: c_ulong, + pub arm_r2: c_ulong, + pub arm_r3: c_ulong, + pub arm_r4: c_ulong, + pub arm_r5: c_ulong, + pub arm_r6: c_ulong, + pub arm_r7: c_ulong, + pub arm_r8: c_ulong, + pub arm_r9: c_ulong, + pub arm_r10: c_ulong, + pub arm_fp: c_ulong, + pub arm_ip: c_ulong, + pub arm_sp: c_ulong, + pub arm_lr: c_ulong, + pub arm_pc: c_ulong, + pub arm_cpsr: c_ulong, + pub fault_address: c_ulong, } pub struct user_regs { - pub arm_r0: ::c_ulong, - pub arm_r1: ::c_ulong, - pub arm_r2: ::c_ulong, - pub arm_r3: ::c_ulong, - pub arm_r4: ::c_ulong, - pub arm_r5: ::c_ulong, - pub arm_r6: ::c_ulong, - pub arm_r7: ::c_ulong, - pub arm_r8: ::c_ulong, - pub arm_r9: ::c_ulong, - pub arm_r10: ::c_ulong, - pub arm_fp: ::c_ulong, - pub arm_ip: ::c_ulong, - pub arm_sp: ::c_ulong, - pub arm_lr: ::c_ulong, - pub arm_pc: ::c_ulong, - pub arm_cpsr: ::c_ulong, - pub arm_orig_r0: ::c_ulong, + pub arm_r0: c_ulong, + pub arm_r1: c_ulong, + pub arm_r2: c_ulong, + pub arm_r3: c_ulong, + pub arm_r4: c_ulong, + pub arm_r5: c_ulong, + pub arm_r6: c_ulong, + pub arm_r7: c_ulong, + pub arm_r8: c_ulong, + pub arm_r9: c_ulong, + pub arm_r10: c_ulong, + pub arm_fp: c_ulong, + pub arm_ip: c_ulong, + pub arm_sp: c_ulong, + pub arm_lr: c_ulong, + pub arm_pc: c_ulong, + pub arm_cpsr: c_ulong, + pub arm_orig_r0: c_ulong, } } @@ -219,12 +221,12 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] #[repr(align(8))] pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_mcontext: ::mcontext_t, - pub uc_sigmask: ::sigset_t, - pub uc_regspace: [::c_ulong; 128], + pub uc_stack: crate::stack_t, + pub uc_mcontext: crate::mcontext_t, + pub uc_sigmask: crate::sigset_t, + pub uc_regspace: [c_ulong; 128], } } @@ -240,8 +242,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_link) .field("uc_link", &self.uc_link) @@ -251,8 +253,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -264,181 +266,181 @@ cfg_if! { } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_LARGEFILE: ::c_int = 0o400000; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; - -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; - -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const SFD_NONBLOCK: ::c_int = 0x0800; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_LARGEFILE: c_int = 0o400000; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; + +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; + +pub const EFD_NONBLOCK: c_int = 0x800; +pub const SFD_NONBLOCK: c_int = 0x0800; + +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -446,468 +448,468 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_pause: ::c_long = 29; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_pivot_root: ::c_long = 218; -pub const SYS_mincore: ::c_long = 219; -pub const SYS_madvise: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_io_setup: ::c_long = 243; -pub const SYS_io_destroy: ::c_long = 244; -pub const SYS_io_getevents: ::c_long = 245; -pub const SYS_io_submit: ::c_long = 246; -pub const SYS_io_cancel: ::c_long = 247; -pub const SYS_exit_group: ::c_long = 248; -pub const SYS_lookup_dcookie: ::c_long = 249; -pub const SYS_epoll_create: ::c_long = 250; -pub const SYS_epoll_ctl: ::c_long = 251; -pub const SYS_epoll_wait: ::c_long = 252; -pub const SYS_remap_file_pages: ::c_long = 253; -pub const SYS_set_tid_address: ::c_long = 256; -pub const SYS_timer_create: ::c_long = 257; -pub const SYS_timer_settime: ::c_long = 258; -pub const SYS_timer_gettime: ::c_long = 259; -pub const SYS_timer_getoverrun: ::c_long = 260; -pub const SYS_timer_delete: ::c_long = 261; -pub const SYS_clock_settime: ::c_long = 262; -pub const SYS_clock_gettime: ::c_long = 263; -pub const SYS_clock_getres: ::c_long = 264; -pub const SYS_clock_nanosleep: ::c_long = 265; -pub const SYS_statfs64: ::c_long = 266; -pub const SYS_fstatfs64: ::c_long = 267; -pub const SYS_tgkill: ::c_long = 268; -pub const SYS_utimes: ::c_long = 269; -pub const SYS_arm_fadvise64_64: ::c_long = 270; -pub const SYS_pciconfig_iobase: ::c_long = 271; -pub const SYS_pciconfig_read: ::c_long = 272; -pub const SYS_pciconfig_write: ::c_long = 273; -pub const SYS_mq_open: ::c_long = 274; -pub const SYS_mq_unlink: ::c_long = 275; -pub const SYS_mq_timedsend: ::c_long = 276; -pub const SYS_mq_timedreceive: ::c_long = 277; -pub const SYS_mq_notify: ::c_long = 278; -pub const SYS_mq_getsetattr: ::c_long = 279; -pub const SYS_waitid: ::c_long = 280; -pub const SYS_socket: ::c_long = 281; -pub const SYS_bind: ::c_long = 282; -pub const SYS_connect: ::c_long = 283; -pub const SYS_listen: ::c_long = 284; -pub const SYS_accept: ::c_long = 285; -pub const SYS_getsockname: ::c_long = 286; -pub const SYS_getpeername: ::c_long = 287; -pub const SYS_socketpair: ::c_long = 288; -pub const SYS_send: ::c_long = 289; -pub const SYS_sendto: ::c_long = 290; -pub const SYS_recv: ::c_long = 291; -pub const SYS_recvfrom: ::c_long = 292; -pub const SYS_shutdown: ::c_long = 293; -pub const SYS_setsockopt: ::c_long = 294; -pub const SYS_getsockopt: ::c_long = 295; -pub const SYS_sendmsg: ::c_long = 296; -pub const SYS_recvmsg: ::c_long = 297; -pub const SYS_semop: ::c_long = 298; -pub const SYS_semget: ::c_long = 299; -pub const SYS_semctl: ::c_long = 300; -pub const SYS_msgsnd: ::c_long = 301; -pub const SYS_msgrcv: ::c_long = 302; -pub const SYS_msgget: ::c_long = 303; -pub const SYS_msgctl: ::c_long = 304; -pub const SYS_shmat: ::c_long = 305; -pub const SYS_shmdt: ::c_long = 306; -pub const SYS_shmget: ::c_long = 307; -pub const SYS_shmctl: ::c_long = 308; -pub const SYS_add_key: ::c_long = 309; -pub const SYS_request_key: ::c_long = 310; -pub const SYS_keyctl: ::c_long = 311; -pub const SYS_semtimedop: ::c_long = 312; -pub const SYS_vserver: ::c_long = 313; -pub const SYS_ioprio_set: ::c_long = 314; -pub const SYS_ioprio_get: ::c_long = 315; -pub const SYS_inotify_init: ::c_long = 316; -pub const SYS_inotify_add_watch: ::c_long = 317; -pub const SYS_inotify_rm_watch: ::c_long = 318; -pub const SYS_mbind: ::c_long = 319; -pub const SYS_get_mempolicy: ::c_long = 320; -pub const SYS_set_mempolicy: ::c_long = 321; -pub const SYS_openat: ::c_long = 322; -pub const SYS_mkdirat: ::c_long = 323; -pub const SYS_mknodat: ::c_long = 324; -pub const SYS_fchownat: ::c_long = 325; -pub const SYS_futimesat: ::c_long = 326; -pub const SYS_fstatat64: ::c_long = 327; -pub const SYS_unlinkat: ::c_long = 328; -pub const SYS_renameat: ::c_long = 329; -pub const SYS_linkat: ::c_long = 330; -pub const SYS_symlinkat: ::c_long = 331; -pub const SYS_readlinkat: ::c_long = 332; -pub const SYS_fchmodat: ::c_long = 333; -pub const SYS_faccessat: ::c_long = 334; -pub const SYS_pselect6: ::c_long = 335; -pub const SYS_ppoll: ::c_long = 336; -pub const SYS_unshare: ::c_long = 337; -pub const SYS_set_robust_list: ::c_long = 338; -pub const SYS_get_robust_list: ::c_long = 339; -pub const SYS_splice: ::c_long = 340; -pub const SYS_arm_sync_file_range: ::c_long = 341; -pub const SYS_tee: ::c_long = 342; -pub const SYS_vmsplice: ::c_long = 343; -pub const SYS_move_pages: ::c_long = 344; -pub const SYS_getcpu: ::c_long = 345; -pub const SYS_epoll_pwait: ::c_long = 346; -pub const SYS_kexec_load: ::c_long = 347; -pub const SYS_utimensat: ::c_long = 348; -pub const SYS_signalfd: ::c_long = 349; -pub const SYS_timerfd_create: ::c_long = 350; -pub const SYS_eventfd: ::c_long = 351; -pub const SYS_fallocate: ::c_long = 352; -pub const SYS_timerfd_settime: ::c_long = 353; -pub const SYS_timerfd_gettime: ::c_long = 354; -pub const SYS_signalfd4: ::c_long = 355; -pub const SYS_eventfd2: ::c_long = 356; -pub const SYS_epoll_create1: ::c_long = 357; -pub const SYS_dup3: ::c_long = 358; -pub const SYS_pipe2: ::c_long = 359; -pub const SYS_inotify_init1: ::c_long = 360; -pub const SYS_preadv: ::c_long = 361; -pub const SYS_pwritev: ::c_long = 362; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 363; -pub const SYS_perf_event_open: ::c_long = 364; -pub const SYS_recvmmsg: ::c_long = 365; -pub const SYS_accept4: ::c_long = 366; -pub const SYS_fanotify_init: ::c_long = 367; -pub const SYS_fanotify_mark: ::c_long = 368; -pub const SYS_prlimit64: ::c_long = 369; -pub const SYS_name_to_handle_at: ::c_long = 370; -pub const SYS_open_by_handle_at: ::c_long = 371; -pub const SYS_clock_adjtime: ::c_long = 372; -pub const SYS_syncfs: ::c_long = 373; -pub const SYS_sendmmsg: ::c_long = 374; -pub const SYS_setns: ::c_long = 375; -pub const SYS_process_vm_readv: ::c_long = 376; -pub const SYS_process_vm_writev: ::c_long = 377; -pub const SYS_kcmp: ::c_long = 378; -pub const SYS_finit_module: ::c_long = 379; -pub const SYS_sched_setattr: ::c_long = 380; -pub const SYS_sched_getattr: ::c_long = 381; -pub const SYS_renameat2: ::c_long = 382; -pub const SYS_seccomp: ::c_long = 383; -pub const SYS_getrandom: ::c_long = 384; -pub const SYS_memfd_create: ::c_long = 385; -pub const SYS_bpf: ::c_long = 386; -pub const SYS_execveat: ::c_long = 387; -pub const SYS_userfaultfd: ::c_long = 388; -pub const SYS_membarrier: ::c_long = 389; -pub const SYS_mlock2: ::c_long = 390; -pub const SYS_copy_file_range: ::c_long = 391; -pub const SYS_preadv2: ::c_long = 392; -pub const SYS_pwritev2: ::c_long = 393; -pub const SYS_pkey_mprotect: ::c_long = 394; -pub const SYS_pkey_alloc: ::c_long = 395; -pub const SYS_pkey_free: ::c_long = 396; -pub const SYS_statx: ::c_long = 397; -pub const SYS_rseq: ::c_long = 398; -pub const SYS_kexec_file_load: ::c_long = 401; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_ptrace: c_long = 26; +pub const SYS_pause: c_long = 29; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_symlink: c_long = 83; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_vhangup: c_long = 111; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_pivot_root: c_long = 218; +pub const SYS_mincore: c_long = 219; +pub const SYS_madvise: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_io_setup: c_long = 243; +pub const SYS_io_destroy: c_long = 244; +pub const SYS_io_getevents: c_long = 245; +pub const SYS_io_submit: c_long = 246; +pub const SYS_io_cancel: c_long = 247; +pub const SYS_exit_group: c_long = 248; +pub const SYS_lookup_dcookie: c_long = 249; +pub const SYS_epoll_create: c_long = 250; +pub const SYS_epoll_ctl: c_long = 251; +pub const SYS_epoll_wait: c_long = 252; +pub const SYS_remap_file_pages: c_long = 253; +pub const SYS_set_tid_address: c_long = 256; +pub const SYS_timer_create: c_long = 257; +pub const SYS_timer_settime: c_long = 258; +pub const SYS_timer_gettime: c_long = 259; +pub const SYS_timer_getoverrun: c_long = 260; +pub const SYS_timer_delete: c_long = 261; +pub const SYS_clock_settime: c_long = 262; +pub const SYS_clock_gettime: c_long = 263; +pub const SYS_clock_getres: c_long = 264; +pub const SYS_clock_nanosleep: c_long = 265; +pub const SYS_statfs64: c_long = 266; +pub const SYS_fstatfs64: c_long = 267; +pub const SYS_tgkill: c_long = 268; +pub const SYS_utimes: c_long = 269; +pub const SYS_arm_fadvise64_64: c_long = 270; +pub const SYS_pciconfig_iobase: c_long = 271; +pub const SYS_pciconfig_read: c_long = 272; +pub const SYS_pciconfig_write: c_long = 273; +pub const SYS_mq_open: c_long = 274; +pub const SYS_mq_unlink: c_long = 275; +pub const SYS_mq_timedsend: c_long = 276; +pub const SYS_mq_timedreceive: c_long = 277; +pub const SYS_mq_notify: c_long = 278; +pub const SYS_mq_getsetattr: c_long = 279; +pub const SYS_waitid: c_long = 280; +pub const SYS_socket: c_long = 281; +pub const SYS_bind: c_long = 282; +pub const SYS_connect: c_long = 283; +pub const SYS_listen: c_long = 284; +pub const SYS_accept: c_long = 285; +pub const SYS_getsockname: c_long = 286; +pub const SYS_getpeername: c_long = 287; +pub const SYS_socketpair: c_long = 288; +pub const SYS_send: c_long = 289; +pub const SYS_sendto: c_long = 290; +pub const SYS_recv: c_long = 291; +pub const SYS_recvfrom: c_long = 292; +pub const SYS_shutdown: c_long = 293; +pub const SYS_setsockopt: c_long = 294; +pub const SYS_getsockopt: c_long = 295; +pub const SYS_sendmsg: c_long = 296; +pub const SYS_recvmsg: c_long = 297; +pub const SYS_semop: c_long = 298; +pub const SYS_semget: c_long = 299; +pub const SYS_semctl: c_long = 300; +pub const SYS_msgsnd: c_long = 301; +pub const SYS_msgrcv: c_long = 302; +pub const SYS_msgget: c_long = 303; +pub const SYS_msgctl: c_long = 304; +pub const SYS_shmat: c_long = 305; +pub const SYS_shmdt: c_long = 306; +pub const SYS_shmget: c_long = 307; +pub const SYS_shmctl: c_long = 308; +pub const SYS_add_key: c_long = 309; +pub const SYS_request_key: c_long = 310; +pub const SYS_keyctl: c_long = 311; +pub const SYS_semtimedop: c_long = 312; +pub const SYS_vserver: c_long = 313; +pub const SYS_ioprio_set: c_long = 314; +pub const SYS_ioprio_get: c_long = 315; +pub const SYS_inotify_init: c_long = 316; +pub const SYS_inotify_add_watch: c_long = 317; +pub const SYS_inotify_rm_watch: c_long = 318; +pub const SYS_mbind: c_long = 319; +pub const SYS_get_mempolicy: c_long = 320; +pub const SYS_set_mempolicy: c_long = 321; +pub const SYS_openat: c_long = 322; +pub const SYS_mkdirat: c_long = 323; +pub const SYS_mknodat: c_long = 324; +pub const SYS_fchownat: c_long = 325; +pub const SYS_futimesat: c_long = 326; +pub const SYS_fstatat64: c_long = 327; +pub const SYS_unlinkat: c_long = 328; +pub const SYS_renameat: c_long = 329; +pub const SYS_linkat: c_long = 330; +pub const SYS_symlinkat: c_long = 331; +pub const SYS_readlinkat: c_long = 332; +pub const SYS_fchmodat: c_long = 333; +pub const SYS_faccessat: c_long = 334; +pub const SYS_pselect6: c_long = 335; +pub const SYS_ppoll: c_long = 336; +pub const SYS_unshare: c_long = 337; +pub const SYS_set_robust_list: c_long = 338; +pub const SYS_get_robust_list: c_long = 339; +pub const SYS_splice: c_long = 340; +pub const SYS_arm_sync_file_range: c_long = 341; +pub const SYS_tee: c_long = 342; +pub const SYS_vmsplice: c_long = 343; +pub const SYS_move_pages: c_long = 344; +pub const SYS_getcpu: c_long = 345; +pub const SYS_epoll_pwait: c_long = 346; +pub const SYS_kexec_load: c_long = 347; +pub const SYS_utimensat: c_long = 348; +pub const SYS_signalfd: c_long = 349; +pub const SYS_timerfd_create: c_long = 350; +pub const SYS_eventfd: c_long = 351; +pub const SYS_fallocate: c_long = 352; +pub const SYS_timerfd_settime: c_long = 353; +pub const SYS_timerfd_gettime: c_long = 354; +pub const SYS_signalfd4: c_long = 355; +pub const SYS_eventfd2: c_long = 356; +pub const SYS_epoll_create1: c_long = 357; +pub const SYS_dup3: c_long = 358; +pub const SYS_pipe2: c_long = 359; +pub const SYS_inotify_init1: c_long = 360; +pub const SYS_preadv: c_long = 361; +pub const SYS_pwritev: c_long = 362; +pub const SYS_rt_tgsigqueueinfo: c_long = 363; +pub const SYS_perf_event_open: c_long = 364; +pub const SYS_recvmmsg: c_long = 365; +pub const SYS_accept4: c_long = 366; +pub const SYS_fanotify_init: c_long = 367; +pub const SYS_fanotify_mark: c_long = 368; +pub const SYS_prlimit64: c_long = 369; +pub const SYS_name_to_handle_at: c_long = 370; +pub const SYS_open_by_handle_at: c_long = 371; +pub const SYS_clock_adjtime: c_long = 372; +pub const SYS_syncfs: c_long = 373; +pub const SYS_sendmmsg: c_long = 374; +pub const SYS_setns: c_long = 375; +pub const SYS_process_vm_readv: c_long = 376; +pub const SYS_process_vm_writev: c_long = 377; +pub const SYS_kcmp: c_long = 378; +pub const SYS_finit_module: c_long = 379; +pub const SYS_sched_setattr: c_long = 380; +pub const SYS_sched_getattr: c_long = 381; +pub const SYS_renameat2: c_long = 382; +pub const SYS_seccomp: c_long = 383; +pub const SYS_getrandom: c_long = 384; +pub const SYS_memfd_create: c_long = 385; +pub const SYS_bpf: c_long = 386; +pub const SYS_execveat: c_long = 387; +pub const SYS_userfaultfd: c_long = 388; +pub const SYS_membarrier: c_long = 389; +pub const SYS_mlock2: c_long = 390; +pub const SYS_copy_file_range: c_long = 391; +pub const SYS_preadv2: c_long = 392; +pub const SYS_pwritev2: c_long = 393; +pub const SYS_pkey_mprotect: c_long = 394; +pub const SYS_pkey_alloc: c_long = 395; +pub const SYS_pkey_free: c_long = 396; +pub const SYS_statx: c_long = 397; +pub const SYS_rseq: c_long = 398; +pub const SYS_kexec_file_load: c_long = 401; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; diff --git a/src/unix/linux_like/linux/gnu/b32/csky/mod.rs b/src/unix/linux_like/linux/gnu/b32/csky/mod.rs index 7560fd0ab7d5e..7677f10571912 100644 --- a/src/unix/linux_like/linux/gnu/b32/csky/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/csky/mod.rs @@ -1,150 +1,152 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = u8; pub type wchar_t = u32; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + f_spare: [crate::__fsword_t; 5], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct stat64 { - pub st_dev: ::dev_t, - __pad1: ::c_uint, - __st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_uint, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino64_t, + pub st_dev: crate::dev_t, + __pad1: c_uint, + __st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: c_uint, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino64_t, } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_ulong, - pub shm_dtime: ::time_t, - __unused2: ::c_ulong, - pub shm_ctime: ::time_t, - __unused3: ::c_ulong, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_ulong, + pub shm_dtime: crate::time_t, + __unused2: c_ulong, + pub shm_ctime: crate::time_t, + __unused3: c_ulong, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __glibc_reserved1: ::c_ulong, - pub msg_rtime: ::time_t, - __glibc_reserved2: ::c_ulong, - pub msg_ctime: ::time_t, - __glibc_reserved3: ::c_ulong, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __glibc_reserved1: c_ulong, + pub msg_rtime: crate::time_t, + __glibc_reserved2: c_ulong, + pub msg_ctime: crate::time_t, + __glibc_reserved3: c_ulong, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -152,14 +154,14 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } } @@ -172,181 +174,181 @@ s_no_extra_traits! { } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_LARGEFILE: ::c_int = 0o100000; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_LARGEFILE: c_int = 0o100000; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_SYNC: c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const EFD_NONBLOCK: c_int = 0x800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -354,389 +356,389 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; // Syscall table -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_close: ::c_long = 57; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_brk: ::c_long = 214; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_dup: ::c_long = 23; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_socket: ::c_long = 198; -pub const SYS_connect: ::c_long = 203; -pub const SYS_accept: ::c_long = 202; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_exit: ::c_long = 93; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_kill: ::c_long = 129; -pub const SYS_uname: ::c_long = 160; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semop: ::c_long = 193; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_flock: ::c_long = 32; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_umask: ::c_long = 166; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_times: ::c_long = 153; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_personality: ::c_long = 92; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_sync: ::c_long = 81; -pub const SYS_acct: ::c_long = 89; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_mount: ::c_long = 40; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_futex: ::c_long = 98; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_openat: ::c_long = 56; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_setns: ::c_long = 268; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_syscall: ::c_long = 294; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_close: c_long = 57; +pub const SYS_fstat: c_long = 80; +pub const SYS_lseek: c_long = 62; +pub const SYS_mmap: c_long = 222; +pub const SYS_mprotect: c_long = 226; +pub const SYS_munmap: c_long = 215; +pub const SYS_brk: c_long = 214; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_ioctl: c_long = 29; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_mremap: c_long = 216; +pub const SYS_msync: c_long = 227; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmctl: c_long = 195; +pub const SYS_dup: c_long = 23; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_getpid: c_long = 172; +pub const SYS_sendfile: c_long = 71; +pub const SYS_socket: c_long = 198; +pub const SYS_connect: c_long = 203; +pub const SYS_accept: c_long = 202; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_shutdown: c_long = 210; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_socketpair: c_long = 199; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_exit: c_long = 93; +pub const SYS_wait4: c_long = 260; +pub const SYS_kill: c_long = 129; +pub const SYS_uname: c_long = 160; +pub const SYS_semget: c_long = 190; +pub const SYS_semop: c_long = 193; +pub const SYS_semctl: c_long = 191; +pub const SYS_shmdt: c_long = 197; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgctl: c_long = 187; +pub const SYS_fcntl: c_long = 25; +pub const SYS_flock: c_long = 32; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_getcwd: c_long = 17; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchown: c_long = 55; +pub const SYS_umask: c_long = 166; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_getrusage: c_long = 165; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_times: c_long = 153; +pub const SYS_ptrace: c_long = 117; +pub const SYS_getuid: c_long = 174; +pub const SYS_syslog: c_long = 116; +pub const SYS_getgid: c_long = 176; +pub const SYS_setuid: c_long = 146; +pub const SYS_setgid: c_long = 144; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getegid: c_long = 177; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getppid: c_long = 173; +pub const SYS_setsid: c_long = 157; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setregid: c_long = 143; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_getpgid: c_long = 155; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_getsid: c_long = 156; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_personality: c_long = 92; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_getpriority: c_long = 141; +pub const SYS_setpriority: c_long = 140; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_prctl: c_long = 167; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_chroot: c_long = 51; +pub const SYS_sync: c_long = 81; +pub const SYS_acct: c_long = 89; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_mount: c_long = 40; +pub const SYS_umount2: c_long = 39; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_reboot: c_long = 142; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_quotactl: c_long = 60; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_gettid: c_long = 178; +pub const SYS_readahead: c_long = 213; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_tkill: c_long = 130; +pub const SYS_futex: c_long = 98; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_getdents64: c_long = 61; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_exit_group: c_long = 94; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_tgkill: c_long = 131; +pub const SYS_mbind: c_long = 235; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_waitid: c_long = 95; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_openat: c_long = 56; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_mknodat: c_long = 33; +pub const SYS_fchownat: c_long = 54; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_linkat: c_long = 37; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_faccessat: c_long = 48; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_unshare: c_long = 97; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_move_pages: c_long = 239; +pub const SYS_utimensat: c_long = 88; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_fallocate: c_long = 47; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_accept4: c_long = 242; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_dup3: c_long = 24; +pub const SYS_pipe2: c_long = 59; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_setns: c_long = 268; +pub const SYS_getcpu: c_long = 168; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_rseq: c_long = 293; +pub const SYS_syscall: c_long = 294; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; diff --git a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs index 68c59babe0411..6b705ffe7f159 100644 --- a/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/m68k/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = i8; pub type wchar_t = i32; @@ -5,8 +7,8 @@ s! { pub struct sigaction { pub sa_sigaction: ::sighandler_t, pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { @@ -27,18 +29,18 @@ s! { } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, pub l_pid: ::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, pub l_pid: ::pid_t, } @@ -49,31 +51,31 @@ s! { pub cuid: ::uid_t, pub cgid: ::gid_t, pub mode: ::mode_t, - __seq: ::c_ushort, - __pad1: ::c_ushort, - __glibc_reserved1: ::c_ulong, - __glibc_reserved2: ::c_ulong, + __seq: c_ushort, + __pad1: c_ushort, + __glibc_reserved1: c_ulong, + __glibc_reserved2: c_ulong, } pub struct stat64 { pub st_dev: ::dev_t, - __pad1: ::c_ushort, + __pad1: c_ushort, pub __st_ino: ::ino_t, pub st_mode: ::mode_t, pub st_nlink: ::nlink_t, pub st_uid: ::uid_t, pub st_gid: ::gid_t, pub st_rdev: ::dev_t, - __pad2: ::c_ushort, - pub st_size: ::off64_t, + __pad2: c_ushort, + pub st_size: off64_t, pub st_blksize: ::blksize_t, pub st_blocks: ::blkcnt64_t, pub st_atime: ::time_t, - pub st_atime_nsec: ::c_ulong, + pub st_atime_nsec: c_ulong, pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_ulong, + pub st_mtime_nsec: c_ulong, pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_ulong, + pub st_ctime_nsec: c_ulong, pub st_ino: ::ino64_t, } @@ -93,66 +95,66 @@ s! { } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: ::fsblkcnt64_t, pub f_bfree: ::fsblkcnt64_t, pub f_bavail: ::fsblkcnt64_t, pub f_files: ::fsblkcnt64_t, pub f_ffree: ::fsblkcnt64_t, pub f_favail: ::fsblkcnt64_t, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct shmid_ds { pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, + pub shm_segsz: size_t, pub shm_atime: ::time_t, - __glibc_reserved1: ::c_long, + __glibc_reserved1: c_long, pub shm_dtime: ::time_t, - __glibc_reserved2: ::c_long, + __glibc_reserved2: c_long, pub shm_ctime: ::time_t, - __glibc_reserved3: ::c_long, + __glibc_reserved3: c_long, pub shm_cpid: ::pid_t, pub shm_lpid: ::pid_t, pub shm_nattch: ::shmatt_t, - __glibc_reserved5: ::c_ulong, - __glibc_reserved6: ::c_ulong, + __glibc_reserved5: c_ulong, + __glibc_reserved6: c_ulong, } pub struct msqid_ds { pub msg_perm: ::ipc_perm, pub msg_stime: ::time_t, - __glibc_reserved1: ::c_uint, + __glibc_reserved1: c_uint, pub msg_rtime: ::time_t, - __glibc_reserved2: ::c_uint, + __glibc_reserved2: c_uint, pub msg_ctime: ::time_t, - __glibc_reserved3: ::c_uint, - __msg_cbytes: ::c_ulong, + __glibc_reserved3: c_uint, + __msg_cbytes: c_ulong, pub msg_qnum: ::msgqnum_t, pub msg_qbytes: ::msglen_t, pub msg_lspid: ::pid_t, pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } } @@ -165,177 +167,177 @@ s_no_extra_traits! { } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_LARGEFILE: ::c_int = 0x20000; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_LARGEFILE: c_int = 0x20000; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_32BIT: ::c_int = 0x0040; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_32BIT: c_int = 0x0040; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_SYNC: c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_SYSEMU: ::c_uint = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; +pub const PTRACE_SYSEMU: c_uint = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_uint = 32; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const EFD_NONBLOCK: c_int = 0x800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; pub const CBAUD: ::tcflag_t = 0o0010017; pub const TAB1: ::tcflag_t = 0x00000800; pub const TAB2: ::tcflag_t = 0x00001000; @@ -430,429 +432,429 @@ pub const TOSTOP: ::tcflag_t = 0x00000100; pub const FLUSHO: ::tcflag_t = 0x00001000; pub const EXTPROC: ::tcflag_t = 0x00010000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time32: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_chown16: ::c_long = 16; -pub const SYS_stat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_oldumount: ::c_long = 22; -pub const SYS_setuid16: ::c_long = 23; -pub const SYS_getuid16: ::c_long = 24; -pub const SYS_stime32: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_fstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime32: ::c_long = 30; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid16: ::c_long = 46; -pub const SYS_getgid16: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid16: ::c_long = 49; -pub const SYS_getegid16: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid16: ::c_long = 70; -pub const SYS_setregid16: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_old_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups16: ::c_long = 80; -pub const SYS_setgroups16: ::c_long = 81; -pub const SYS_old_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_lstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_old_readdir: ::c_long = 89; -pub const SYS_old_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown16: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_newstat: ::c_long = 106; -pub const SYS_newlstat: ::c_long = 107; -pub const SYS_newfstat: ::c_long = 108; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_newuname: ::c_long = 122; -pub const SYS_cacheflush: ::c_long = 123; -pub const SYS_adjtimex_time32: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_setfsuid16: ::c_long = 138; -pub const SYS_setfsgid16: ::c_long = 139; -pub const SYS_llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS_select: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval_time32: ::c_long = 161; -pub const SYS_nanosleep_time32: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid16: ::c_long = 164; -pub const SYS_getresuid16: ::c_long = 165; -pub const SYS_getpagesize: ::c_long = 166; -pub const SYS_query_module: ::c_long = 167; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid16: ::c_long = 170; -pub const SYS_getresgid16: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait_time32: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_lchown16: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_getpmsg: ::c_long = 188; -pub const SYS_putpmsg: ::c_long = 189; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_getrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_chown: ::c_long = 198; -pub const SYS_getuid: ::c_long = 199; -pub const SYS_getgid: ::c_long = 200; -pub const SYS_geteuid: ::c_long = 201; -pub const SYS_getegid: ::c_long = 202; -pub const SYS_setreuid: ::c_long = 203; -pub const SYS_setregid: ::c_long = 204; -pub const SYS_getgroups: ::c_long = 205; -pub const SYS_setgroups: ::c_long = 206; -pub const SYS_fchown: ::c_long = 207; -pub const SYS_setresuid: ::c_long = 208; -pub const SYS_getresuid: ::c_long = 209; -pub const SYS_setresgid: ::c_long = 210; -pub const SYS_getresgid: ::c_long = 211; -pub const SYS_lchown: ::c_long = 212; -pub const SYS_setuid: ::c_long = 213; -pub const SYS_setgid: ::c_long = 214; -pub const SYS_setfsuid: ::c_long = 215; -pub const SYS_setfsgid: ::c_long = 216; -pub const SYS_pivot_root: ::c_long = 217; -pub const SYS_getdents64: ::c_long = 220; -pub const SYS_gettid: ::c_long = 221; -pub const SYS_tkill: ::c_long = 222; -pub const SYS_setxattr: ::c_long = 223; -pub const SYS_lsetxattr: ::c_long = 224; -pub const SYS_fsetxattr: ::c_long = 225; -pub const SYS_getxattr: ::c_long = 226; -pub const SYS_lgetxattr: ::c_long = 227; -pub const SYS_fgetxattr: ::c_long = 228; -pub const SYS_listxattr: ::c_long = 229; -pub const SYS_llistxattr: ::c_long = 230; -pub const SYS_flistxattr: ::c_long = 231; -pub const SYS_removexattr: ::c_long = 232; -pub const SYS_lremovexattr: ::c_long = 233; -pub const SYS_fremovexattr: ::c_long = 234; -pub const SYS_futex_time32: ::c_long = 235; -pub const SYS_sendfile64: ::c_long = 236; -pub const SYS_mincore: ::c_long = 237; -pub const SYS_madvise: ::c_long = 238; -pub const SYS_fcntl64: ::c_long = 239; -pub const SYS_readahead: ::c_long = 240; -pub const SYS_io_setup: ::c_long = 241; -pub const SYS_io_destroy: ::c_long = 242; -pub const SYS_io_getevents_time32: ::c_long = 243; -pub const SYS_io_submit: ::c_long = 244; -pub const SYS_io_cancel: ::c_long = 245; -pub const SYS_fadvise64: ::c_long = 246; -pub const SYS_exit_group: ::c_long = 247; -pub const SYS_lookup_dcookie: ::c_long = 248; -pub const SYS_epoll_create: ::c_long = 249; -pub const SYS_epoll_ctl: ::c_long = 250; -pub const SYS_epoll_wait: ::c_long = 251; -pub const SYS_remap_file_pages: ::c_long = 252; -pub const SYS_set_tid_address: ::c_long = 253; -pub const SYS_timer_create: ::c_long = 254; -pub const SYS_timer_settime32: ::c_long = 255; -pub const SYS_timer_gettime32: ::c_long = 256; -pub const SYS_timer_getoverrun: ::c_long = 257; -pub const SYS_timer_delete: ::c_long = 258; -pub const SYS_clock_settime32: ::c_long = 259; -pub const SYS_clock_gettime32: ::c_long = 260; -pub const SYS_clock_getres_time32: ::c_long = 261; -pub const SYS_clock_nanosleep_time32: ::c_long = 262; -pub const SYS_statfs64: ::c_long = 263; -pub const SYS_fstatfs64: ::c_long = 264; -pub const SYS_tgkill: ::c_long = 265; -pub const SYS_utimes_time32: ::c_long = 266; -pub const SYS_fadvise64_64: ::c_long = 267; -pub const SYS_mbind: ::c_long = 268; -pub const SYS_get_mempolicy: ::c_long = 269; -pub const SYS_set_mempolicy: ::c_long = 270; -pub const SYS_mq_open: ::c_long = 271; -pub const SYS_mq_unlink: ::c_long = 272; -pub const SYS_mq_timedsend_time32: ::c_long = 273; -pub const SYS_mq_timedreceive_time32: ::c_long = 274; -pub const SYS_mq_notify: ::c_long = 275; -pub const SYS_mq_getsetattr: ::c_long = 276; -pub const SYS_waitid: ::c_long = 277; -pub const SYS_add_key: ::c_long = 279; -pub const SYS_request_key: ::c_long = 280; -pub const SYS_keyctl: ::c_long = 281; -pub const SYS_ioprio_set: ::c_long = 282; -pub const SYS_ioprio_get: ::c_long = 283; -pub const SYS_inotify_init: ::c_long = 284; -pub const SYS_inotify_add_watch: ::c_long = 285; -pub const SYS_inotify_rm_watch: ::c_long = 286; -pub const SYS_migrate_pages: ::c_long = 287; -pub const SYS_openat: ::c_long = 288; -pub const SYS_mkdirat: ::c_long = 289; -pub const SYS_mknodat: ::c_long = 290; -pub const SYS_fchownat: ::c_long = 291; -pub const SYS_futimesat_time32: ::c_long = 292; -pub const SYS_fstatat64: ::c_long = 293; -pub const SYS_unlinkat: ::c_long = 294; -pub const SYS_renameat: ::c_long = 295; -pub const SYS_linkat: ::c_long = 296; -pub const SYS_symlinkat: ::c_long = 297; -pub const SYS_readlinkat: ::c_long = 298; -pub const SYS_fchmodat: ::c_long = 299; -pub const SYS_faccessat: ::c_long = 300; -pub const SYS_pselect6_time32: ::c_long = 301; -pub const SYS_ppoll_time32: ::c_long = 302; -pub const SYS_unshare: ::c_long = 303; -pub const SYS_set_robust_list: ::c_long = 304; -pub const SYS_get_robust_list: ::c_long = 305; -pub const SYS_splice: ::c_long = 306; -pub const SYS_sync_file_range: ::c_long = 307; -pub const SYS_tee: ::c_long = 308; -pub const SYS_vmsplice: ::c_long = 309; -pub const SYS_move_pages: ::c_long = 310; -pub const SYS_sched_setaffinity: ::c_long = 311; -pub const SYS_sched_getaffinity: ::c_long = 312; -pub const SYS_kexec_load: ::c_long = 313; -pub const SYS_getcpu: ::c_long = 314; -pub const SYS_epoll_pwait: ::c_long = 315; -pub const SYS_utimensat_time32: ::c_long = 316; -pub const SYS_signalfd: ::c_long = 317; -pub const SYS_timerfd_create: ::c_long = 318; -pub const SYS_eventfd: ::c_long = 319; -pub const SYS_fallocate: ::c_long = 320; -pub const SYS_timerfd_settime32: ::c_long = 321; -pub const SYS_timerfd_gettime32: ::c_long = 322; -pub const SYS_signalfd4: ::c_long = 323; -pub const SYS_eventfd2: ::c_long = 324; -pub const SYS_epoll_create1: ::c_long = 325; -pub const SYS_dup3: ::c_long = 326; -pub const SYS_pipe2: ::c_long = 327; -pub const SYS_inotify_init1: ::c_long = 328; -pub const SYS_preadv: ::c_long = 329; -pub const SYS_pwritev: ::c_long = 330; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 331; -pub const SYS_perf_event_open: ::c_long = 332; -pub const SYS_get_thread_area: ::c_long = 333; -pub const SYS_set_thread_area: ::c_long = 334; -pub const SYS_atomic_cmpxchg_32: ::c_long = 335; -pub const SYS_atomic_barrier: ::c_long = 336; -pub const SYS_fanotify_init: ::c_long = 337; -pub const SYS_fanotify_mark: ::c_long = 338; -pub const SYS_prlimit64: ::c_long = 339; -pub const SYS_name_to_handle_at: ::c_long = 340; -pub const SYS_open_by_handle_at: ::c_long = 341; -pub const SYS_clock_adjtime32: ::c_long = 342; -pub const SYS_syncfs: ::c_long = 343; -pub const SYS_setns: ::c_long = 344; -pub const SYS_process_vm_readv: ::c_long = 345; -pub const SYS_process_vm_writev: ::c_long = 346; -pub const SYS_kcmp: ::c_long = 347; -pub const SYS_finit_module: ::c_long = 348; -pub const SYS_sched_setattr: ::c_long = 349; -pub const SYS_sched_getattr: ::c_long = 350; -pub const SYS_renameat2: ::c_long = 351; -pub const SYS_getrandom: ::c_long = 352; -pub const SYS_memfd_create: ::c_long = 353; -pub const SYS_bpf: ::c_long = 354; -pub const SYS_execveat: ::c_long = 355; -pub const SYS_socket: ::c_long = 356; -pub const SYS_socketpair: ::c_long = 357; -pub const SYS_bind: ::c_long = 358; -pub const SYS_connect: ::c_long = 359; -pub const SYS_listen: ::c_long = 360; -pub const SYS_accept4: ::c_long = 361; -pub const SYS_getsockopt: ::c_long = 362; -pub const SYS_setsockopt: ::c_long = 363; -pub const SYS_getsockname: ::c_long = 364; -pub const SYS_getpeername: ::c_long = 365; -pub const SYS_sendto: ::c_long = 366; -pub const SYS_sendmsg: ::c_long = 367; -pub const SYS_recvfrom: ::c_long = 368; -pub const SYS_recvmsg: ::c_long = 369; -pub const SYS_shutdown: ::c_long = 370; -pub const SYS_recvmmsg_time32: ::c_long = 371; -pub const SYS_sendmmsg: ::c_long = 372; -pub const SYS_userfaultfd: ::c_long = 373; -pub const SYS_membarrier: ::c_long = 374; -pub const SYS_mlock2: ::c_long = 375; -pub const SYS_copy_file_range: ::c_long = 376; -pub const SYS_preadv2: ::c_long = 377; -pub const SYS_pwritev2: ::c_long = 378; -pub const SYS_statx: ::c_long = 379; -pub const SYS_seccomp: ::c_long = 380; -pub const SYS_pkey_mprotect: ::c_long = 381; -pub const SYS_pkey_alloc: ::c_long = 382; -pub const SYS_pkey_free: ::c_long = 383; -pub const SYS_rseq: ::c_long = 384; -pub const SYS_semget: ::c_long = 393; -pub const SYS_semctl: ::c_long = 394; -pub const SYS_shmget: ::c_long = 395; -pub const SYS_shmctl: ::c_long = 396; -pub const SYS_shmat: ::c_long = 397; -pub const SYS_shmdt: ::c_long = 398; -pub const SYS_msgget: ::c_long = 399; -pub const SYS_msgsnd: ::c_long = 400; -pub const SYS_msgrcv: ::c_long = 401; -pub const SYS_msgctl: ::c_long = 402; -pub const SYS_clock_gettime: ::c_long = 403; -pub const SYS_clock_settime: ::c_long = 404; -pub const SYS_clock_adjtime: ::c_long = 405; -pub const SYS_clock_getres: ::c_long = 406; -pub const SYS_clock_nanosleep: ::c_long = 407; -pub const SYS_timer_gettime: ::c_long = 408; -pub const SYS_timer_settime: ::c_long = 409; -pub const SYS_timerfd_gettime: ::c_long = 410; -pub const SYS_timerfd_settime: ::c_long = 411; -pub const SYS_utimensat: ::c_long = 412; -pub const SYS_pselect6: ::c_long = 413; -pub const SYS_ppoll: ::c_long = 414; -pub const SYS_io_pgetevents: ::c_long = 416; -pub const SYS_recvmmsg: ::c_long = 417; -pub const SYS_mq_timedsend: ::c_long = 418; -pub const SYS_mq_timedreceive: ::c_long = 419; -pub const SYS_semtimedop: ::c_long = 420; -pub const SYS_rt_sigtimedwait: ::c_long = 421; -pub const SYS_futex: ::c_long = 422; -pub const SYS_sched_rr_get_interval: ::c_long = 423; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time32: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_chown16: c_long = 16; +pub const SYS_stat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_oldumount: c_long = 22; +pub const SYS_setuid16: c_long = 23; +pub const SYS_getuid16: c_long = 24; +pub const SYS_stime32: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_fstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime32: c_long = 30; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid16: c_long = 46; +pub const SYS_getgid16: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid16: c_long = 49; +pub const SYS_getegid16: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid16: c_long = 70; +pub const SYS_setregid16: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_old_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups16: c_long = 80; +pub const SYS_setgroups16: c_long = 81; +pub const SYS_old_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_lstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_old_readdir: c_long = 89; +pub const SYS_old_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown16: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_newstat: c_long = 106; +pub const SYS_newlstat: c_long = 107; +pub const SYS_newfstat: c_long = 108; +pub const SYS_vhangup: c_long = 111; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_newuname: c_long = 122; +pub const SYS_cacheflush: c_long = 123; +pub const SYS_adjtimex_time32: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_setfsuid16: c_long = 138; +pub const SYS_setfsgid16: c_long = 139; +pub const SYS_llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS_select: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval_time32: c_long = 161; +pub const SYS_nanosleep_time32: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid16: c_long = 164; +pub const SYS_getresuid16: c_long = 165; +pub const SYS_getpagesize: c_long = 166; +pub const SYS_query_module: c_long = 167; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid16: c_long = 170; +pub const SYS_getresgid16: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait_time32: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_lchown16: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_getpmsg: c_long = 188; +pub const SYS_putpmsg: c_long = 189; +pub const SYS_vfork: c_long = 190; +pub const SYS_getrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_chown: c_long = 198; +pub const SYS_getuid: c_long = 199; +pub const SYS_getgid: c_long = 200; +pub const SYS_geteuid: c_long = 201; +pub const SYS_getegid: c_long = 202; +pub const SYS_setreuid: c_long = 203; +pub const SYS_setregid: c_long = 204; +pub const SYS_getgroups: c_long = 205; +pub const SYS_setgroups: c_long = 206; +pub const SYS_fchown: c_long = 207; +pub const SYS_setresuid: c_long = 208; +pub const SYS_getresuid: c_long = 209; +pub const SYS_setresgid: c_long = 210; +pub const SYS_getresgid: c_long = 211; +pub const SYS_lchown: c_long = 212; +pub const SYS_setuid: c_long = 213; +pub const SYS_setgid: c_long = 214; +pub const SYS_setfsuid: c_long = 215; +pub const SYS_setfsgid: c_long = 216; +pub const SYS_pivot_root: c_long = 217; +pub const SYS_getdents64: c_long = 220; +pub const SYS_gettid: c_long = 221; +pub const SYS_tkill: c_long = 222; +pub const SYS_setxattr: c_long = 223; +pub const SYS_lsetxattr: c_long = 224; +pub const SYS_fsetxattr: c_long = 225; +pub const SYS_getxattr: c_long = 226; +pub const SYS_lgetxattr: c_long = 227; +pub const SYS_fgetxattr: c_long = 228; +pub const SYS_listxattr: c_long = 229; +pub const SYS_llistxattr: c_long = 230; +pub const SYS_flistxattr: c_long = 231; +pub const SYS_removexattr: c_long = 232; +pub const SYS_lremovexattr: c_long = 233; +pub const SYS_fremovexattr: c_long = 234; +pub const SYS_futex_time32: c_long = 235; +pub const SYS_sendfile64: c_long = 236; +pub const SYS_mincore: c_long = 237; +pub const SYS_madvise: c_long = 238; +pub const SYS_fcntl64: c_long = 239; +pub const SYS_readahead: c_long = 240; +pub const SYS_io_setup: c_long = 241; +pub const SYS_io_destroy: c_long = 242; +pub const SYS_io_getevents_time32: c_long = 243; +pub const SYS_io_submit: c_long = 244; +pub const SYS_io_cancel: c_long = 245; +pub const SYS_fadvise64: c_long = 246; +pub const SYS_exit_group: c_long = 247; +pub const SYS_lookup_dcookie: c_long = 248; +pub const SYS_epoll_create: c_long = 249; +pub const SYS_epoll_ctl: c_long = 250; +pub const SYS_epoll_wait: c_long = 251; +pub const SYS_remap_file_pages: c_long = 252; +pub const SYS_set_tid_address: c_long = 253; +pub const SYS_timer_create: c_long = 254; +pub const SYS_timer_settime32: c_long = 255; +pub const SYS_timer_gettime32: c_long = 256; +pub const SYS_timer_getoverrun: c_long = 257; +pub const SYS_timer_delete: c_long = 258; +pub const SYS_clock_settime32: c_long = 259; +pub const SYS_clock_gettime32: c_long = 260; +pub const SYS_clock_getres_time32: c_long = 261; +pub const SYS_clock_nanosleep_time32: c_long = 262; +pub const SYS_statfs64: c_long = 263; +pub const SYS_fstatfs64: c_long = 264; +pub const SYS_tgkill: c_long = 265; +pub const SYS_utimes_time32: c_long = 266; +pub const SYS_fadvise64_64: c_long = 267; +pub const SYS_mbind: c_long = 268; +pub const SYS_get_mempolicy: c_long = 269; +pub const SYS_set_mempolicy: c_long = 270; +pub const SYS_mq_open: c_long = 271; +pub const SYS_mq_unlink: c_long = 272; +pub const SYS_mq_timedsend_time32: c_long = 273; +pub const SYS_mq_timedreceive_time32: c_long = 274; +pub const SYS_mq_notify: c_long = 275; +pub const SYS_mq_getsetattr: c_long = 276; +pub const SYS_waitid: c_long = 277; +pub const SYS_add_key: c_long = 279; +pub const SYS_request_key: c_long = 280; +pub const SYS_keyctl: c_long = 281; +pub const SYS_ioprio_set: c_long = 282; +pub const SYS_ioprio_get: c_long = 283; +pub const SYS_inotify_init: c_long = 284; +pub const SYS_inotify_add_watch: c_long = 285; +pub const SYS_inotify_rm_watch: c_long = 286; +pub const SYS_migrate_pages: c_long = 287; +pub const SYS_openat: c_long = 288; +pub const SYS_mkdirat: c_long = 289; +pub const SYS_mknodat: c_long = 290; +pub const SYS_fchownat: c_long = 291; +pub const SYS_futimesat_time32: c_long = 292; +pub const SYS_fstatat64: c_long = 293; +pub const SYS_unlinkat: c_long = 294; +pub const SYS_renameat: c_long = 295; +pub const SYS_linkat: c_long = 296; +pub const SYS_symlinkat: c_long = 297; +pub const SYS_readlinkat: c_long = 298; +pub const SYS_fchmodat: c_long = 299; +pub const SYS_faccessat: c_long = 300; +pub const SYS_pselect6_time32: c_long = 301; +pub const SYS_ppoll_time32: c_long = 302; +pub const SYS_unshare: c_long = 303; +pub const SYS_set_robust_list: c_long = 304; +pub const SYS_get_robust_list: c_long = 305; +pub const SYS_splice: c_long = 306; +pub const SYS_sync_file_range: c_long = 307; +pub const SYS_tee: c_long = 308; +pub const SYS_vmsplice: c_long = 309; +pub const SYS_move_pages: c_long = 310; +pub const SYS_sched_setaffinity: c_long = 311; +pub const SYS_sched_getaffinity: c_long = 312; +pub const SYS_kexec_load: c_long = 313; +pub const SYS_getcpu: c_long = 314; +pub const SYS_epoll_pwait: c_long = 315; +pub const SYS_utimensat_time32: c_long = 316; +pub const SYS_signalfd: c_long = 317; +pub const SYS_timerfd_create: c_long = 318; +pub const SYS_eventfd: c_long = 319; +pub const SYS_fallocate: c_long = 320; +pub const SYS_timerfd_settime32: c_long = 321; +pub const SYS_timerfd_gettime32: c_long = 322; +pub const SYS_signalfd4: c_long = 323; +pub const SYS_eventfd2: c_long = 324; +pub const SYS_epoll_create1: c_long = 325; +pub const SYS_dup3: c_long = 326; +pub const SYS_pipe2: c_long = 327; +pub const SYS_inotify_init1: c_long = 328; +pub const SYS_preadv: c_long = 329; +pub const SYS_pwritev: c_long = 330; +pub const SYS_rt_tgsigqueueinfo: c_long = 331; +pub const SYS_perf_event_open: c_long = 332; +pub const SYS_get_thread_area: c_long = 333; +pub const SYS_set_thread_area: c_long = 334; +pub const SYS_atomic_cmpxchg_32: c_long = 335; +pub const SYS_atomic_barrier: c_long = 336; +pub const SYS_fanotify_init: c_long = 337; +pub const SYS_fanotify_mark: c_long = 338; +pub const SYS_prlimit64: c_long = 339; +pub const SYS_name_to_handle_at: c_long = 340; +pub const SYS_open_by_handle_at: c_long = 341; +pub const SYS_clock_adjtime32: c_long = 342; +pub const SYS_syncfs: c_long = 343; +pub const SYS_setns: c_long = 344; +pub const SYS_process_vm_readv: c_long = 345; +pub const SYS_process_vm_writev: c_long = 346; +pub const SYS_kcmp: c_long = 347; +pub const SYS_finit_module: c_long = 348; +pub const SYS_sched_setattr: c_long = 349; +pub const SYS_sched_getattr: c_long = 350; +pub const SYS_renameat2: c_long = 351; +pub const SYS_getrandom: c_long = 352; +pub const SYS_memfd_create: c_long = 353; +pub const SYS_bpf: c_long = 354; +pub const SYS_execveat: c_long = 355; +pub const SYS_socket: c_long = 356; +pub const SYS_socketpair: c_long = 357; +pub const SYS_bind: c_long = 358; +pub const SYS_connect: c_long = 359; +pub const SYS_listen: c_long = 360; +pub const SYS_accept4: c_long = 361; +pub const SYS_getsockopt: c_long = 362; +pub const SYS_setsockopt: c_long = 363; +pub const SYS_getsockname: c_long = 364; +pub const SYS_getpeername: c_long = 365; +pub const SYS_sendto: c_long = 366; +pub const SYS_sendmsg: c_long = 367; +pub const SYS_recvfrom: c_long = 368; +pub const SYS_recvmsg: c_long = 369; +pub const SYS_shutdown: c_long = 370; +pub const SYS_recvmmsg_time32: c_long = 371; +pub const SYS_sendmmsg: c_long = 372; +pub const SYS_userfaultfd: c_long = 373; +pub const SYS_membarrier: c_long = 374; +pub const SYS_mlock2: c_long = 375; +pub const SYS_copy_file_range: c_long = 376; +pub const SYS_preadv2: c_long = 377; +pub const SYS_pwritev2: c_long = 378; +pub const SYS_statx: c_long = 379; +pub const SYS_seccomp: c_long = 380; +pub const SYS_pkey_mprotect: c_long = 381; +pub const SYS_pkey_alloc: c_long = 382; +pub const SYS_pkey_free: c_long = 383; +pub const SYS_rseq: c_long = 384; +pub const SYS_semget: c_long = 393; +pub const SYS_semctl: c_long = 394; +pub const SYS_shmget: c_long = 395; +pub const SYS_shmctl: c_long = 396; +pub const SYS_shmat: c_long = 397; +pub const SYS_shmdt: c_long = 398; +pub const SYS_msgget: c_long = 399; +pub const SYS_msgsnd: c_long = 400; +pub const SYS_msgrcv: c_long = 401; +pub const SYS_msgctl: c_long = 402; +pub const SYS_clock_gettime: c_long = 403; +pub const SYS_clock_settime: c_long = 404; +pub const SYS_clock_adjtime: c_long = 405; +pub const SYS_clock_getres: c_long = 406; +pub const SYS_clock_nanosleep: c_long = 407; +pub const SYS_timer_gettime: c_long = 408; +pub const SYS_timer_settime: c_long = 409; +pub const SYS_timerfd_gettime: c_long = 410; +pub const SYS_timerfd_settime: c_long = 411; +pub const SYS_utimensat: c_long = 412; +pub const SYS_pselect6: c_long = 413; +pub const SYS_ppoll: c_long = 414; +pub const SYS_io_pgetevents: c_long = 416; +pub const SYS_recvmmsg: c_long = 417; +pub const SYS_mq_timedsend: c_long = 418; +pub const SYS_mq_timedreceive: c_long = 419; +pub const SYS_semtimedop: c_long = 420; +pub const SYS_rt_sigtimedwait: c_long = 421; +pub const SYS_futex: c_long = 422; +pub const SYS_sched_rr_get_interval: c_long = 423; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; diff --git a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs index 13feaf6ff2a31..19fe9b23d4ade 100644 --- a/src/unix/linux_like/linux/gnu/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/mips/mod.rs @@ -1,158 +1,160 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = i8; pub type wchar_t = i32; s! { pub struct stat64 { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 3], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - st_pad2: [::c_long; 2], - pub st_size: ::off64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - st_pad3: ::c_long, - pub st_blocks: ::blkcnt64_t, - st_pad5: [::c_long; 14], + pub st_dev: c_ulong, + st_pad1: [c_long; 3], + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulong, + st_pad2: [c_long; 2], + pub st_size: off64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + st_pad3: c_long, + pub st_blocks: crate::blkcnt64_t, + st_pad5: [c_long; 14], } pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsblkcnt_t, - pub f_ffree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::c_long, - pub f_flags: ::c_long, - f_spare: [::c_long; 5], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_files: crate::fsblkcnt_t, + pub f_ffree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: c_long, + pub f_flags: c_long, + f_spare: [c_long; 5], } pub struct statfs64 { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, pub f_blocks: u64, pub f_bfree: u64, pub f_files: u64, pub f_ffree: u64, pub f_bavail: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 5], + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 5], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct sigaction { - pub sa_flags: ::c_int, - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_restorer: ::Option, - _resv: [::c_int; 1], + pub sa_flags: c_int, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_restorer: Option, + _resv: [c_int; 1], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + pub _pad: [c_int; 29], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_uint, + pub __seq: c_ushort, + __pad1: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, + pub msg_perm: crate::ipc_perm, #[cfg(target_endian = "big")] - __glibc_reserved1: ::c_ulong, - pub msg_stime: ::time_t, + __glibc_reserved1: c_ulong, + pub msg_stime: crate::time_t, #[cfg(target_endian = "little")] - __glibc_reserved1: ::c_ulong, + __glibc_reserved1: c_ulong, #[cfg(target_endian = "big")] - __glibc_reserved2: ::c_ulong, - pub msg_rtime: ::time_t, + __glibc_reserved2: c_ulong, + pub msg_rtime: crate::time_t, #[cfg(target_endian = "little")] - __glibc_reserved2: ::c_ulong, + __glibc_reserved2: c_ulong, #[cfg(target_endian = "big")] - __glibc_reserved3: ::c_ulong, - pub msg_ctime: ::time_t, + __glibc_reserved3: c_ulong, + pub msg_ctime: crate::time_t, #[cfg(target_endian = "little")] - __glibc_reserved3: ::c_ulong, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + __glibc_reserved3: c_ulong, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_sysid: ::c_long, - pub l_pid: ::pid_t, - pad: [::c_long; 4], + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_sysid: c_long, + pub l_pid: crate::pid_t, + pad: [c_long; 4], } } @@ -164,584 +166,584 @@ s_no_extra_traits! { } } -pub const O_LARGEFILE: ::c_int = 0x2000; - -pub const SYS_syscall: ::c_long = 4000 + 0; -pub const SYS_exit: ::c_long = 4000 + 1; -pub const SYS_fork: ::c_long = 4000 + 2; -pub const SYS_read: ::c_long = 4000 + 3; -pub const SYS_write: ::c_long = 4000 + 4; -pub const SYS_open: ::c_long = 4000 + 5; -pub const SYS_close: ::c_long = 4000 + 6; -pub const SYS_waitpid: ::c_long = 4000 + 7; -pub const SYS_creat: ::c_long = 4000 + 8; -pub const SYS_link: ::c_long = 4000 + 9; -pub const SYS_unlink: ::c_long = 4000 + 10; -pub const SYS_execve: ::c_long = 4000 + 11; -pub const SYS_chdir: ::c_long = 4000 + 12; -pub const SYS_time: ::c_long = 4000 + 13; -pub const SYS_mknod: ::c_long = 4000 + 14; -pub const SYS_chmod: ::c_long = 4000 + 15; -pub const SYS_lchown: ::c_long = 4000 + 16; -pub const SYS_break: ::c_long = 4000 + 17; -pub const SYS_lseek: ::c_long = 4000 + 19; -pub const SYS_getpid: ::c_long = 4000 + 20; -pub const SYS_mount: ::c_long = 4000 + 21; -pub const SYS_umount: ::c_long = 4000 + 22; -pub const SYS_setuid: ::c_long = 4000 + 23; -pub const SYS_getuid: ::c_long = 4000 + 24; -pub const SYS_stime: ::c_long = 4000 + 25; -pub const SYS_ptrace: ::c_long = 4000 + 26; -pub const SYS_alarm: ::c_long = 4000 + 27; -pub const SYS_pause: ::c_long = 4000 + 29; -pub const SYS_utime: ::c_long = 4000 + 30; -pub const SYS_stty: ::c_long = 4000 + 31; -pub const SYS_gtty: ::c_long = 4000 + 32; -pub const SYS_access: ::c_long = 4000 + 33; -pub const SYS_nice: ::c_long = 4000 + 34; -pub const SYS_ftime: ::c_long = 4000 + 35; -pub const SYS_sync: ::c_long = 4000 + 36; -pub const SYS_kill: ::c_long = 4000 + 37; -pub const SYS_rename: ::c_long = 4000 + 38; -pub const SYS_mkdir: ::c_long = 4000 + 39; -pub const SYS_rmdir: ::c_long = 4000 + 40; -pub const SYS_dup: ::c_long = 4000 + 41; -pub const SYS_pipe: ::c_long = 4000 + 42; -pub const SYS_times: ::c_long = 4000 + 43; -pub const SYS_prof: ::c_long = 4000 + 44; -pub const SYS_brk: ::c_long = 4000 + 45; -pub const SYS_setgid: ::c_long = 4000 + 46; -pub const SYS_getgid: ::c_long = 4000 + 47; -pub const SYS_signal: ::c_long = 4000 + 48; -pub const SYS_geteuid: ::c_long = 4000 + 49; -pub const SYS_getegid: ::c_long = 4000 + 50; -pub const SYS_acct: ::c_long = 4000 + 51; -pub const SYS_umount2: ::c_long = 4000 + 52; -pub const SYS_lock: ::c_long = 4000 + 53; -pub const SYS_ioctl: ::c_long = 4000 + 54; -pub const SYS_fcntl: ::c_long = 4000 + 55; -pub const SYS_mpx: ::c_long = 4000 + 56; -pub const SYS_setpgid: ::c_long = 4000 + 57; -pub const SYS_ulimit: ::c_long = 4000 + 58; -pub const SYS_umask: ::c_long = 4000 + 60; -pub const SYS_chroot: ::c_long = 4000 + 61; -pub const SYS_ustat: ::c_long = 4000 + 62; -pub const SYS_dup2: ::c_long = 4000 + 63; -pub const SYS_getppid: ::c_long = 4000 + 64; -pub const SYS_getpgrp: ::c_long = 4000 + 65; -pub const SYS_setsid: ::c_long = 4000 + 66; -pub const SYS_sigaction: ::c_long = 4000 + 67; -pub const SYS_sgetmask: ::c_long = 4000 + 68; -pub const SYS_ssetmask: ::c_long = 4000 + 69; -pub const SYS_setreuid: ::c_long = 4000 + 70; -pub const SYS_setregid: ::c_long = 4000 + 71; -pub const SYS_sigsuspend: ::c_long = 4000 + 72; -pub const SYS_sigpending: ::c_long = 4000 + 73; -pub const SYS_sethostname: ::c_long = 4000 + 74; -pub const SYS_setrlimit: ::c_long = 4000 + 75; -pub const SYS_getrlimit: ::c_long = 4000 + 76; -pub const SYS_getrusage: ::c_long = 4000 + 77; -pub const SYS_gettimeofday: ::c_long = 4000 + 78; -pub const SYS_settimeofday: ::c_long = 4000 + 79; -pub const SYS_getgroups: ::c_long = 4000 + 80; -pub const SYS_setgroups: ::c_long = 4000 + 81; -pub const SYS_symlink: ::c_long = 4000 + 83; -pub const SYS_readlink: ::c_long = 4000 + 85; -pub const SYS_uselib: ::c_long = 4000 + 86; -pub const SYS_swapon: ::c_long = 4000 + 87; -pub const SYS_reboot: ::c_long = 4000 + 88; -pub const SYS_readdir: ::c_long = 4000 + 89; -pub const SYS_mmap: ::c_long = 4000 + 90; -pub const SYS_munmap: ::c_long = 4000 + 91; -pub const SYS_truncate: ::c_long = 4000 + 92; -pub const SYS_ftruncate: ::c_long = 4000 + 93; -pub const SYS_fchmod: ::c_long = 4000 + 94; -pub const SYS_fchown: ::c_long = 4000 + 95; -pub const SYS_getpriority: ::c_long = 4000 + 96; -pub const SYS_setpriority: ::c_long = 4000 + 97; -pub const SYS_profil: ::c_long = 4000 + 98; -pub const SYS_statfs: ::c_long = 4000 + 99; -pub const SYS_fstatfs: ::c_long = 4000 + 100; -pub const SYS_ioperm: ::c_long = 4000 + 101; -pub const SYS_socketcall: ::c_long = 4000 + 102; -pub const SYS_syslog: ::c_long = 4000 + 103; -pub const SYS_setitimer: ::c_long = 4000 + 104; -pub const SYS_getitimer: ::c_long = 4000 + 105; -pub const SYS_stat: ::c_long = 4000 + 106; -pub const SYS_lstat: ::c_long = 4000 + 107; -pub const SYS_fstat: ::c_long = 4000 + 108; -pub const SYS_iopl: ::c_long = 4000 + 110; -pub const SYS_vhangup: ::c_long = 4000 + 111; -pub const SYS_idle: ::c_long = 4000 + 112; -pub const SYS_vm86: ::c_long = 4000 + 113; -pub const SYS_wait4: ::c_long = 4000 + 114; -pub const SYS_swapoff: ::c_long = 4000 + 115; -pub const SYS_sysinfo: ::c_long = 4000 + 116; -pub const SYS_ipc: ::c_long = 4000 + 117; -pub const SYS_fsync: ::c_long = 4000 + 118; -pub const SYS_sigreturn: ::c_long = 4000 + 119; -pub const SYS_clone: ::c_long = 4000 + 120; -pub const SYS_setdomainname: ::c_long = 4000 + 121; -pub const SYS_uname: ::c_long = 4000 + 122; -pub const SYS_modify_ldt: ::c_long = 4000 + 123; -pub const SYS_adjtimex: ::c_long = 4000 + 124; -pub const SYS_mprotect: ::c_long = 4000 + 125; -pub const SYS_sigprocmask: ::c_long = 4000 + 126; -pub const SYS_create_module: ::c_long = 4000 + 127; -pub const SYS_init_module: ::c_long = 4000 + 128; -pub const SYS_delete_module: ::c_long = 4000 + 129; -pub const SYS_get_kernel_syms: ::c_long = 4000 + 130; -pub const SYS_quotactl: ::c_long = 4000 + 131; -pub const SYS_getpgid: ::c_long = 4000 + 132; -pub const SYS_fchdir: ::c_long = 4000 + 133; -pub const SYS_bdflush: ::c_long = 4000 + 134; -pub const SYS_sysfs: ::c_long = 4000 + 135; -pub const SYS_personality: ::c_long = 4000 + 136; -pub const SYS_afs_syscall: ::c_long = 4000 + 137; -pub const SYS_setfsuid: ::c_long = 4000 + 138; -pub const SYS_setfsgid: ::c_long = 4000 + 139; -pub const SYS__llseek: ::c_long = 4000 + 140; -pub const SYS_getdents: ::c_long = 4000 + 141; -pub const SYS__newselect: ::c_long = 4000 + 142; -pub const SYS_flock: ::c_long = 4000 + 143; -pub const SYS_msync: ::c_long = 4000 + 144; -pub const SYS_readv: ::c_long = 4000 + 145; -pub const SYS_writev: ::c_long = 4000 + 146; -pub const SYS_cacheflush: ::c_long = 4000 + 147; -pub const SYS_cachectl: ::c_long = 4000 + 148; -pub const SYS_sysmips: ::c_long = 4000 + 149; -pub const SYS_getsid: ::c_long = 4000 + 151; -pub const SYS_fdatasync: ::c_long = 4000 + 152; -pub const SYS__sysctl: ::c_long = 4000 + 153; -pub const SYS_mlock: ::c_long = 4000 + 154; -pub const SYS_munlock: ::c_long = 4000 + 155; -pub const SYS_mlockall: ::c_long = 4000 + 156; -pub const SYS_munlockall: ::c_long = 4000 + 157; -pub const SYS_sched_setparam: ::c_long = 4000 + 158; -pub const SYS_sched_getparam: ::c_long = 4000 + 159; -pub const SYS_sched_setscheduler: ::c_long = 4000 + 160; -pub const SYS_sched_getscheduler: ::c_long = 4000 + 161; -pub const SYS_sched_yield: ::c_long = 4000 + 162; -pub const SYS_sched_get_priority_max: ::c_long = 4000 + 163; -pub const SYS_sched_get_priority_min: ::c_long = 4000 + 164; -pub const SYS_sched_rr_get_interval: ::c_long = 4000 + 165; -pub const SYS_nanosleep: ::c_long = 4000 + 166; -pub const SYS_mremap: ::c_long = 4000 + 167; -pub const SYS_accept: ::c_long = 4000 + 168; -pub const SYS_bind: ::c_long = 4000 + 169; -pub const SYS_connect: ::c_long = 4000 + 170; -pub const SYS_getpeername: ::c_long = 4000 + 171; -pub const SYS_getsockname: ::c_long = 4000 + 172; -pub const SYS_getsockopt: ::c_long = 4000 + 173; -pub const SYS_listen: ::c_long = 4000 + 174; -pub const SYS_recv: ::c_long = 4000 + 175; -pub const SYS_recvfrom: ::c_long = 4000 + 176; -pub const SYS_recvmsg: ::c_long = 4000 + 177; -pub const SYS_send: ::c_long = 4000 + 178; -pub const SYS_sendmsg: ::c_long = 4000 + 179; -pub const SYS_sendto: ::c_long = 4000 + 180; -pub const SYS_setsockopt: ::c_long = 4000 + 181; -pub const SYS_shutdown: ::c_long = 4000 + 182; -pub const SYS_socket: ::c_long = 4000 + 183; -pub const SYS_socketpair: ::c_long = 4000 + 184; -pub const SYS_setresuid: ::c_long = 4000 + 185; -pub const SYS_getresuid: ::c_long = 4000 + 186; -pub const SYS_query_module: ::c_long = 4000 + 187; -pub const SYS_poll: ::c_long = 4000 + 188; -pub const SYS_nfsservctl: ::c_long = 4000 + 189; -pub const SYS_setresgid: ::c_long = 4000 + 190; -pub const SYS_getresgid: ::c_long = 4000 + 191; -pub const SYS_prctl: ::c_long = 4000 + 192; -pub const SYS_rt_sigreturn: ::c_long = 4000 + 193; -pub const SYS_rt_sigaction: ::c_long = 4000 + 194; -pub const SYS_rt_sigprocmask: ::c_long = 4000 + 195; -pub const SYS_rt_sigpending: ::c_long = 4000 + 196; -pub const SYS_rt_sigtimedwait: ::c_long = 4000 + 197; -pub const SYS_rt_sigqueueinfo: ::c_long = 4000 + 198; -pub const SYS_rt_sigsuspend: ::c_long = 4000 + 199; -pub const SYS_pread64: ::c_long = 4000 + 200; -pub const SYS_pwrite64: ::c_long = 4000 + 201; -pub const SYS_chown: ::c_long = 4000 + 202; -pub const SYS_getcwd: ::c_long = 4000 + 203; -pub const SYS_capget: ::c_long = 4000 + 204; -pub const SYS_capset: ::c_long = 4000 + 205; -pub const SYS_sigaltstack: ::c_long = 4000 + 206; -pub const SYS_sendfile: ::c_long = 4000 + 207; -pub const SYS_getpmsg: ::c_long = 4000 + 208; -pub const SYS_putpmsg: ::c_long = 4000 + 209; -pub const SYS_mmap2: ::c_long = 4000 + 210; -pub const SYS_truncate64: ::c_long = 4000 + 211; -pub const SYS_ftruncate64: ::c_long = 4000 + 212; -pub const SYS_stat64: ::c_long = 4000 + 213; -pub const SYS_lstat64: ::c_long = 4000 + 214; -pub const SYS_fstat64: ::c_long = 4000 + 215; -pub const SYS_pivot_root: ::c_long = 4000 + 216; -pub const SYS_mincore: ::c_long = 4000 + 217; -pub const SYS_madvise: ::c_long = 4000 + 218; -pub const SYS_getdents64: ::c_long = 4000 + 219; -pub const SYS_fcntl64: ::c_long = 4000 + 220; -pub const SYS_gettid: ::c_long = 4000 + 222; -pub const SYS_readahead: ::c_long = 4000 + 223; -pub const SYS_setxattr: ::c_long = 4000 + 224; -pub const SYS_lsetxattr: ::c_long = 4000 + 225; -pub const SYS_fsetxattr: ::c_long = 4000 + 226; -pub const SYS_getxattr: ::c_long = 4000 + 227; -pub const SYS_lgetxattr: ::c_long = 4000 + 228; -pub const SYS_fgetxattr: ::c_long = 4000 + 229; -pub const SYS_listxattr: ::c_long = 4000 + 230; -pub const SYS_llistxattr: ::c_long = 4000 + 231; -pub const SYS_flistxattr: ::c_long = 4000 + 232; -pub const SYS_removexattr: ::c_long = 4000 + 233; -pub const SYS_lremovexattr: ::c_long = 4000 + 234; -pub const SYS_fremovexattr: ::c_long = 4000 + 235; -pub const SYS_tkill: ::c_long = 4000 + 236; -pub const SYS_sendfile64: ::c_long = 4000 + 237; -pub const SYS_futex: ::c_long = 4000 + 238; -pub const SYS_sched_setaffinity: ::c_long = 4000 + 239; -pub const SYS_sched_getaffinity: ::c_long = 4000 + 240; -pub const SYS_io_setup: ::c_long = 4000 + 241; -pub const SYS_io_destroy: ::c_long = 4000 + 242; -pub const SYS_io_getevents: ::c_long = 4000 + 243; -pub const SYS_io_submit: ::c_long = 4000 + 244; -pub const SYS_io_cancel: ::c_long = 4000 + 245; -pub const SYS_exit_group: ::c_long = 4000 + 246; -pub const SYS_lookup_dcookie: ::c_long = 4000 + 247; -pub const SYS_epoll_create: ::c_long = 4000 + 248; -pub const SYS_epoll_ctl: ::c_long = 4000 + 249; -pub const SYS_epoll_wait: ::c_long = 4000 + 250; -pub const SYS_remap_file_pages: ::c_long = 4000 + 251; -pub const SYS_set_tid_address: ::c_long = 4000 + 252; -pub const SYS_restart_syscall: ::c_long = 4000 + 253; -pub const SYS_fadvise64: ::c_long = 4000 + 254; -pub const SYS_statfs64: ::c_long = 4000 + 255; -pub const SYS_fstatfs64: ::c_long = 4000 + 256; -pub const SYS_timer_create: ::c_long = 4000 + 257; -pub const SYS_timer_settime: ::c_long = 4000 + 258; -pub const SYS_timer_gettime: ::c_long = 4000 + 259; -pub const SYS_timer_getoverrun: ::c_long = 4000 + 260; -pub const SYS_timer_delete: ::c_long = 4000 + 261; -pub const SYS_clock_settime: ::c_long = 4000 + 262; -pub const SYS_clock_gettime: ::c_long = 4000 + 263; -pub const SYS_clock_getres: ::c_long = 4000 + 264; -pub const SYS_clock_nanosleep: ::c_long = 4000 + 265; -pub const SYS_tgkill: ::c_long = 4000 + 266; -pub const SYS_utimes: ::c_long = 4000 + 267; -pub const SYS_mbind: ::c_long = 4000 + 268; -pub const SYS_get_mempolicy: ::c_long = 4000 + 269; -pub const SYS_set_mempolicy: ::c_long = 4000 + 270; -pub const SYS_mq_open: ::c_long = 4000 + 271; -pub const SYS_mq_unlink: ::c_long = 4000 + 272; -pub const SYS_mq_timedsend: ::c_long = 4000 + 273; -pub const SYS_mq_timedreceive: ::c_long = 4000 + 274; -pub const SYS_mq_notify: ::c_long = 4000 + 275; -pub const SYS_mq_getsetattr: ::c_long = 4000 + 276; -pub const SYS_vserver: ::c_long = 4000 + 277; -pub const SYS_waitid: ::c_long = 4000 + 278; -/* pub const SYS_sys_setaltroot: ::c_long = 4000 + 279; */ -pub const SYS_add_key: ::c_long = 4000 + 280; -pub const SYS_request_key: ::c_long = 4000 + 281; -pub const SYS_keyctl: ::c_long = 4000 + 282; -pub const SYS_set_thread_area: ::c_long = 4000 + 283; -pub const SYS_inotify_init: ::c_long = 4000 + 284; -pub const SYS_inotify_add_watch: ::c_long = 4000 + 285; -pub const SYS_inotify_rm_watch: ::c_long = 4000 + 286; -pub const SYS_migrate_pages: ::c_long = 4000 + 287; -pub const SYS_openat: ::c_long = 4000 + 288; -pub const SYS_mkdirat: ::c_long = 4000 + 289; -pub const SYS_mknodat: ::c_long = 4000 + 290; -pub const SYS_fchownat: ::c_long = 4000 + 291; -pub const SYS_futimesat: ::c_long = 4000 + 292; -pub const SYS_fstatat64: ::c_long = 4000 + 293; -pub const SYS_unlinkat: ::c_long = 4000 + 294; -pub const SYS_renameat: ::c_long = 4000 + 295; -pub const SYS_linkat: ::c_long = 4000 + 296; -pub const SYS_symlinkat: ::c_long = 4000 + 297; -pub const SYS_readlinkat: ::c_long = 4000 + 298; -pub const SYS_fchmodat: ::c_long = 4000 + 299; -pub const SYS_faccessat: ::c_long = 4000 + 300; -pub const SYS_pselect6: ::c_long = 4000 + 301; -pub const SYS_ppoll: ::c_long = 4000 + 302; -pub const SYS_unshare: ::c_long = 4000 + 303; -pub const SYS_splice: ::c_long = 4000 + 304; -pub const SYS_sync_file_range: ::c_long = 4000 + 305; -pub const SYS_tee: ::c_long = 4000 + 306; -pub const SYS_vmsplice: ::c_long = 4000 + 307; -pub const SYS_move_pages: ::c_long = 4000 + 308; -pub const SYS_set_robust_list: ::c_long = 4000 + 309; -pub const SYS_get_robust_list: ::c_long = 4000 + 310; -pub const SYS_kexec_load: ::c_long = 4000 + 311; -pub const SYS_getcpu: ::c_long = 4000 + 312; -pub const SYS_epoll_pwait: ::c_long = 4000 + 313; -pub const SYS_ioprio_set: ::c_long = 4000 + 314; -pub const SYS_ioprio_get: ::c_long = 4000 + 315; -pub const SYS_utimensat: ::c_long = 4000 + 316; -pub const SYS_signalfd: ::c_long = 4000 + 317; -pub const SYS_timerfd: ::c_long = 4000 + 318; -pub const SYS_eventfd: ::c_long = 4000 + 319; -pub const SYS_fallocate: ::c_long = 4000 + 320; -pub const SYS_timerfd_create: ::c_long = 4000 + 321; -pub const SYS_timerfd_gettime: ::c_long = 4000 + 322; -pub const SYS_timerfd_settime: ::c_long = 4000 + 323; -pub const SYS_signalfd4: ::c_long = 4000 + 324; -pub const SYS_eventfd2: ::c_long = 4000 + 325; -pub const SYS_epoll_create1: ::c_long = 4000 + 326; -pub const SYS_dup3: ::c_long = 4000 + 327; -pub const SYS_pipe2: ::c_long = 4000 + 328; -pub const SYS_inotify_init1: ::c_long = 4000 + 329; -pub const SYS_preadv: ::c_long = 4000 + 330; -pub const SYS_pwritev: ::c_long = 4000 + 331; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 4000 + 332; -pub const SYS_perf_event_open: ::c_long = 4000 + 333; -pub const SYS_accept4: ::c_long = 4000 + 334; -pub const SYS_recvmmsg: ::c_long = 4000 + 335; -pub const SYS_fanotify_init: ::c_long = 4000 + 336; -pub const SYS_fanotify_mark: ::c_long = 4000 + 337; -pub const SYS_prlimit64: ::c_long = 4000 + 338; -pub const SYS_name_to_handle_at: ::c_long = 4000 + 339; -pub const SYS_open_by_handle_at: ::c_long = 4000 + 340; -pub const SYS_clock_adjtime: ::c_long = 4000 + 341; -pub const SYS_syncfs: ::c_long = 4000 + 342; -pub const SYS_sendmmsg: ::c_long = 4000 + 343; -pub const SYS_setns: ::c_long = 4000 + 344; -pub const SYS_process_vm_readv: ::c_long = 4000 + 345; -pub const SYS_process_vm_writev: ::c_long = 4000 + 346; -pub const SYS_kcmp: ::c_long = 4000 + 347; -pub const SYS_finit_module: ::c_long = 4000 + 348; -pub const SYS_sched_setattr: ::c_long = 4000 + 349; -pub const SYS_sched_getattr: ::c_long = 4000 + 350; -pub const SYS_renameat2: ::c_long = 4000 + 351; -pub const SYS_seccomp: ::c_long = 4000 + 352; -pub const SYS_getrandom: ::c_long = 4000 + 353; -pub const SYS_memfd_create: ::c_long = 4000 + 354; -pub const SYS_bpf: ::c_long = 4000 + 355; -pub const SYS_execveat: ::c_long = 4000 + 356; -pub const SYS_userfaultfd: ::c_long = 4000 + 357; -pub const SYS_membarrier: ::c_long = 4000 + 358; -pub const SYS_mlock2: ::c_long = 4000 + 359; -pub const SYS_copy_file_range: ::c_long = 4000 + 360; -pub const SYS_preadv2: ::c_long = 4000 + 361; -pub const SYS_pwritev2: ::c_long = 4000 + 362; -pub const SYS_pkey_mprotect: ::c_long = 4000 + 363; -pub const SYS_pkey_alloc: ::c_long = 4000 + 364; -pub const SYS_pkey_free: ::c_long = 4000 + 365; -pub const SYS_statx: ::c_long = 4000 + 366; -pub const SYS_rseq: ::c_long = 4000 + 367; -pub const SYS_pidfd_send_signal: ::c_long = 4000 + 424; -pub const SYS_io_uring_setup: ::c_long = 4000 + 425; -pub const SYS_io_uring_enter: ::c_long = 4000 + 426; -pub const SYS_io_uring_register: ::c_long = 4000 + 427; -pub const SYS_open_tree: ::c_long = 4000 + 428; -pub const SYS_move_mount: ::c_long = 4000 + 429; -pub const SYS_fsopen: ::c_long = 4000 + 430; -pub const SYS_fsconfig: ::c_long = 4000 + 431; -pub const SYS_fsmount: ::c_long = 4000 + 432; -pub const SYS_fspick: ::c_long = 4000 + 433; -pub const SYS_pidfd_open: ::c_long = 4000 + 434; -pub const SYS_clone3: ::c_long = 4000 + 435; -pub const SYS_close_range: ::c_long = 4000 + 436; -pub const SYS_openat2: ::c_long = 4000 + 437; -pub const SYS_pidfd_getfd: ::c_long = 4000 + 438; -pub const SYS_faccessat2: ::c_long = 4000 + 439; -pub const SYS_process_madvise: ::c_long = 4000 + 440; -pub const SYS_epoll_pwait2: ::c_long = 4000 + 441; -pub const SYS_mount_setattr: ::c_long = 4000 + 442; -pub const SYS_quotactl_fd: ::c_long = 4000 + 443; -pub const SYS_landlock_create_ruleset: ::c_long = 4000 + 444; -pub const SYS_landlock_add_rule: ::c_long = 4000 + 445; -pub const SYS_landlock_restrict_self: ::c_long = 4000 + 446; -pub const SYS_memfd_secret: ::c_long = 4000 + 447; -pub const SYS_process_mrelease: ::c_long = 4000 + 448; -pub const SYS_futex_waitv: ::c_long = 4000 + 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 4000 + 450; - -pub const O_DIRECT: ::c_int = 0x8000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; - -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_NONBLOCK: ::c_int = 128; -pub const O_SYNC: ::c_int = 0x4010; -pub const O_RSYNC: ::c_int = 0x4010; -pub const O_DSYNC: ::c_int = 0x10; -pub const O_FSYNC: ::c_int = 0x4010; -pub const O_ASYNC: ::c_int = 0x1000; -pub const O_NDELAY: ::c_int = 0x80; - -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const ERFKILL: ::c_int = 167; - -pub const MAP_NORESERVE: ::c_int = 0x400; -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_ANONYMOUS: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; -pub const MAP_STACK: ::c_int = 0x40000; - -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; - -pub const SA_SIGINFO: ::c_int = 0x00000008; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; - -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 22; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; - -pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLWRBAND: ::c_short = 0x100; +pub const O_LARGEFILE: c_int = 0x2000; + +pub const SYS_syscall: c_long = 4000 + 0; +pub const SYS_exit: c_long = 4000 + 1; +pub const SYS_fork: c_long = 4000 + 2; +pub const SYS_read: c_long = 4000 + 3; +pub const SYS_write: c_long = 4000 + 4; +pub const SYS_open: c_long = 4000 + 5; +pub const SYS_close: c_long = 4000 + 6; +pub const SYS_waitpid: c_long = 4000 + 7; +pub const SYS_creat: c_long = 4000 + 8; +pub const SYS_link: c_long = 4000 + 9; +pub const SYS_unlink: c_long = 4000 + 10; +pub const SYS_execve: c_long = 4000 + 11; +pub const SYS_chdir: c_long = 4000 + 12; +pub const SYS_time: c_long = 4000 + 13; +pub const SYS_mknod: c_long = 4000 + 14; +pub const SYS_chmod: c_long = 4000 + 15; +pub const SYS_lchown: c_long = 4000 + 16; +pub const SYS_break: c_long = 4000 + 17; +pub const SYS_lseek: c_long = 4000 + 19; +pub const SYS_getpid: c_long = 4000 + 20; +pub const SYS_mount: c_long = 4000 + 21; +pub const SYS_umount: c_long = 4000 + 22; +pub const SYS_setuid: c_long = 4000 + 23; +pub const SYS_getuid: c_long = 4000 + 24; +pub const SYS_stime: c_long = 4000 + 25; +pub const SYS_ptrace: c_long = 4000 + 26; +pub const SYS_alarm: c_long = 4000 + 27; +pub const SYS_pause: c_long = 4000 + 29; +pub const SYS_utime: c_long = 4000 + 30; +pub const SYS_stty: c_long = 4000 + 31; +pub const SYS_gtty: c_long = 4000 + 32; +pub const SYS_access: c_long = 4000 + 33; +pub const SYS_nice: c_long = 4000 + 34; +pub const SYS_ftime: c_long = 4000 + 35; +pub const SYS_sync: c_long = 4000 + 36; +pub const SYS_kill: c_long = 4000 + 37; +pub const SYS_rename: c_long = 4000 + 38; +pub const SYS_mkdir: c_long = 4000 + 39; +pub const SYS_rmdir: c_long = 4000 + 40; +pub const SYS_dup: c_long = 4000 + 41; +pub const SYS_pipe: c_long = 4000 + 42; +pub const SYS_times: c_long = 4000 + 43; +pub const SYS_prof: c_long = 4000 + 44; +pub const SYS_brk: c_long = 4000 + 45; +pub const SYS_setgid: c_long = 4000 + 46; +pub const SYS_getgid: c_long = 4000 + 47; +pub const SYS_signal: c_long = 4000 + 48; +pub const SYS_geteuid: c_long = 4000 + 49; +pub const SYS_getegid: c_long = 4000 + 50; +pub const SYS_acct: c_long = 4000 + 51; +pub const SYS_umount2: c_long = 4000 + 52; +pub const SYS_lock: c_long = 4000 + 53; +pub const SYS_ioctl: c_long = 4000 + 54; +pub const SYS_fcntl: c_long = 4000 + 55; +pub const SYS_mpx: c_long = 4000 + 56; +pub const SYS_setpgid: c_long = 4000 + 57; +pub const SYS_ulimit: c_long = 4000 + 58; +pub const SYS_umask: c_long = 4000 + 60; +pub const SYS_chroot: c_long = 4000 + 61; +pub const SYS_ustat: c_long = 4000 + 62; +pub const SYS_dup2: c_long = 4000 + 63; +pub const SYS_getppid: c_long = 4000 + 64; +pub const SYS_getpgrp: c_long = 4000 + 65; +pub const SYS_setsid: c_long = 4000 + 66; +pub const SYS_sigaction: c_long = 4000 + 67; +pub const SYS_sgetmask: c_long = 4000 + 68; +pub const SYS_ssetmask: c_long = 4000 + 69; +pub const SYS_setreuid: c_long = 4000 + 70; +pub const SYS_setregid: c_long = 4000 + 71; +pub const SYS_sigsuspend: c_long = 4000 + 72; +pub const SYS_sigpending: c_long = 4000 + 73; +pub const SYS_sethostname: c_long = 4000 + 74; +pub const SYS_setrlimit: c_long = 4000 + 75; +pub const SYS_getrlimit: c_long = 4000 + 76; +pub const SYS_getrusage: c_long = 4000 + 77; +pub const SYS_gettimeofday: c_long = 4000 + 78; +pub const SYS_settimeofday: c_long = 4000 + 79; +pub const SYS_getgroups: c_long = 4000 + 80; +pub const SYS_setgroups: c_long = 4000 + 81; +pub const SYS_symlink: c_long = 4000 + 83; +pub const SYS_readlink: c_long = 4000 + 85; +pub const SYS_uselib: c_long = 4000 + 86; +pub const SYS_swapon: c_long = 4000 + 87; +pub const SYS_reboot: c_long = 4000 + 88; +pub const SYS_readdir: c_long = 4000 + 89; +pub const SYS_mmap: c_long = 4000 + 90; +pub const SYS_munmap: c_long = 4000 + 91; +pub const SYS_truncate: c_long = 4000 + 92; +pub const SYS_ftruncate: c_long = 4000 + 93; +pub const SYS_fchmod: c_long = 4000 + 94; +pub const SYS_fchown: c_long = 4000 + 95; +pub const SYS_getpriority: c_long = 4000 + 96; +pub const SYS_setpriority: c_long = 4000 + 97; +pub const SYS_profil: c_long = 4000 + 98; +pub const SYS_statfs: c_long = 4000 + 99; +pub const SYS_fstatfs: c_long = 4000 + 100; +pub const SYS_ioperm: c_long = 4000 + 101; +pub const SYS_socketcall: c_long = 4000 + 102; +pub const SYS_syslog: c_long = 4000 + 103; +pub const SYS_setitimer: c_long = 4000 + 104; +pub const SYS_getitimer: c_long = 4000 + 105; +pub const SYS_stat: c_long = 4000 + 106; +pub const SYS_lstat: c_long = 4000 + 107; +pub const SYS_fstat: c_long = 4000 + 108; +pub const SYS_iopl: c_long = 4000 + 110; +pub const SYS_vhangup: c_long = 4000 + 111; +pub const SYS_idle: c_long = 4000 + 112; +pub const SYS_vm86: c_long = 4000 + 113; +pub const SYS_wait4: c_long = 4000 + 114; +pub const SYS_swapoff: c_long = 4000 + 115; +pub const SYS_sysinfo: c_long = 4000 + 116; +pub const SYS_ipc: c_long = 4000 + 117; +pub const SYS_fsync: c_long = 4000 + 118; +pub const SYS_sigreturn: c_long = 4000 + 119; +pub const SYS_clone: c_long = 4000 + 120; +pub const SYS_setdomainname: c_long = 4000 + 121; +pub const SYS_uname: c_long = 4000 + 122; +pub const SYS_modify_ldt: c_long = 4000 + 123; +pub const SYS_adjtimex: c_long = 4000 + 124; +pub const SYS_mprotect: c_long = 4000 + 125; +pub const SYS_sigprocmask: c_long = 4000 + 126; +pub const SYS_create_module: c_long = 4000 + 127; +pub const SYS_init_module: c_long = 4000 + 128; +pub const SYS_delete_module: c_long = 4000 + 129; +pub const SYS_get_kernel_syms: c_long = 4000 + 130; +pub const SYS_quotactl: c_long = 4000 + 131; +pub const SYS_getpgid: c_long = 4000 + 132; +pub const SYS_fchdir: c_long = 4000 + 133; +pub const SYS_bdflush: c_long = 4000 + 134; +pub const SYS_sysfs: c_long = 4000 + 135; +pub const SYS_personality: c_long = 4000 + 136; +pub const SYS_afs_syscall: c_long = 4000 + 137; +pub const SYS_setfsuid: c_long = 4000 + 138; +pub const SYS_setfsgid: c_long = 4000 + 139; +pub const SYS__llseek: c_long = 4000 + 140; +pub const SYS_getdents: c_long = 4000 + 141; +pub const SYS__newselect: c_long = 4000 + 142; +pub const SYS_flock: c_long = 4000 + 143; +pub const SYS_msync: c_long = 4000 + 144; +pub const SYS_readv: c_long = 4000 + 145; +pub const SYS_writev: c_long = 4000 + 146; +pub const SYS_cacheflush: c_long = 4000 + 147; +pub const SYS_cachectl: c_long = 4000 + 148; +pub const SYS_sysmips: c_long = 4000 + 149; +pub const SYS_getsid: c_long = 4000 + 151; +pub const SYS_fdatasync: c_long = 4000 + 152; +pub const SYS__sysctl: c_long = 4000 + 153; +pub const SYS_mlock: c_long = 4000 + 154; +pub const SYS_munlock: c_long = 4000 + 155; +pub const SYS_mlockall: c_long = 4000 + 156; +pub const SYS_munlockall: c_long = 4000 + 157; +pub const SYS_sched_setparam: c_long = 4000 + 158; +pub const SYS_sched_getparam: c_long = 4000 + 159; +pub const SYS_sched_setscheduler: c_long = 4000 + 160; +pub const SYS_sched_getscheduler: c_long = 4000 + 161; +pub const SYS_sched_yield: c_long = 4000 + 162; +pub const SYS_sched_get_priority_max: c_long = 4000 + 163; +pub const SYS_sched_get_priority_min: c_long = 4000 + 164; +pub const SYS_sched_rr_get_interval: c_long = 4000 + 165; +pub const SYS_nanosleep: c_long = 4000 + 166; +pub const SYS_mremap: c_long = 4000 + 167; +pub const SYS_accept: c_long = 4000 + 168; +pub const SYS_bind: c_long = 4000 + 169; +pub const SYS_connect: c_long = 4000 + 170; +pub const SYS_getpeername: c_long = 4000 + 171; +pub const SYS_getsockname: c_long = 4000 + 172; +pub const SYS_getsockopt: c_long = 4000 + 173; +pub const SYS_listen: c_long = 4000 + 174; +pub const SYS_recv: c_long = 4000 + 175; +pub const SYS_recvfrom: c_long = 4000 + 176; +pub const SYS_recvmsg: c_long = 4000 + 177; +pub const SYS_send: c_long = 4000 + 178; +pub const SYS_sendmsg: c_long = 4000 + 179; +pub const SYS_sendto: c_long = 4000 + 180; +pub const SYS_setsockopt: c_long = 4000 + 181; +pub const SYS_shutdown: c_long = 4000 + 182; +pub const SYS_socket: c_long = 4000 + 183; +pub const SYS_socketpair: c_long = 4000 + 184; +pub const SYS_setresuid: c_long = 4000 + 185; +pub const SYS_getresuid: c_long = 4000 + 186; +pub const SYS_query_module: c_long = 4000 + 187; +pub const SYS_poll: c_long = 4000 + 188; +pub const SYS_nfsservctl: c_long = 4000 + 189; +pub const SYS_setresgid: c_long = 4000 + 190; +pub const SYS_getresgid: c_long = 4000 + 191; +pub const SYS_prctl: c_long = 4000 + 192; +pub const SYS_rt_sigreturn: c_long = 4000 + 193; +pub const SYS_rt_sigaction: c_long = 4000 + 194; +pub const SYS_rt_sigprocmask: c_long = 4000 + 195; +pub const SYS_rt_sigpending: c_long = 4000 + 196; +pub const SYS_rt_sigtimedwait: c_long = 4000 + 197; +pub const SYS_rt_sigqueueinfo: c_long = 4000 + 198; +pub const SYS_rt_sigsuspend: c_long = 4000 + 199; +pub const SYS_pread64: c_long = 4000 + 200; +pub const SYS_pwrite64: c_long = 4000 + 201; +pub const SYS_chown: c_long = 4000 + 202; +pub const SYS_getcwd: c_long = 4000 + 203; +pub const SYS_capget: c_long = 4000 + 204; +pub const SYS_capset: c_long = 4000 + 205; +pub const SYS_sigaltstack: c_long = 4000 + 206; +pub const SYS_sendfile: c_long = 4000 + 207; +pub const SYS_getpmsg: c_long = 4000 + 208; +pub const SYS_putpmsg: c_long = 4000 + 209; +pub const SYS_mmap2: c_long = 4000 + 210; +pub const SYS_truncate64: c_long = 4000 + 211; +pub const SYS_ftruncate64: c_long = 4000 + 212; +pub const SYS_stat64: c_long = 4000 + 213; +pub const SYS_lstat64: c_long = 4000 + 214; +pub const SYS_fstat64: c_long = 4000 + 215; +pub const SYS_pivot_root: c_long = 4000 + 216; +pub const SYS_mincore: c_long = 4000 + 217; +pub const SYS_madvise: c_long = 4000 + 218; +pub const SYS_getdents64: c_long = 4000 + 219; +pub const SYS_fcntl64: c_long = 4000 + 220; +pub const SYS_gettid: c_long = 4000 + 222; +pub const SYS_readahead: c_long = 4000 + 223; +pub const SYS_setxattr: c_long = 4000 + 224; +pub const SYS_lsetxattr: c_long = 4000 + 225; +pub const SYS_fsetxattr: c_long = 4000 + 226; +pub const SYS_getxattr: c_long = 4000 + 227; +pub const SYS_lgetxattr: c_long = 4000 + 228; +pub const SYS_fgetxattr: c_long = 4000 + 229; +pub const SYS_listxattr: c_long = 4000 + 230; +pub const SYS_llistxattr: c_long = 4000 + 231; +pub const SYS_flistxattr: c_long = 4000 + 232; +pub const SYS_removexattr: c_long = 4000 + 233; +pub const SYS_lremovexattr: c_long = 4000 + 234; +pub const SYS_fremovexattr: c_long = 4000 + 235; +pub const SYS_tkill: c_long = 4000 + 236; +pub const SYS_sendfile64: c_long = 4000 + 237; +pub const SYS_futex: c_long = 4000 + 238; +pub const SYS_sched_setaffinity: c_long = 4000 + 239; +pub const SYS_sched_getaffinity: c_long = 4000 + 240; +pub const SYS_io_setup: c_long = 4000 + 241; +pub const SYS_io_destroy: c_long = 4000 + 242; +pub const SYS_io_getevents: c_long = 4000 + 243; +pub const SYS_io_submit: c_long = 4000 + 244; +pub const SYS_io_cancel: c_long = 4000 + 245; +pub const SYS_exit_group: c_long = 4000 + 246; +pub const SYS_lookup_dcookie: c_long = 4000 + 247; +pub const SYS_epoll_create: c_long = 4000 + 248; +pub const SYS_epoll_ctl: c_long = 4000 + 249; +pub const SYS_epoll_wait: c_long = 4000 + 250; +pub const SYS_remap_file_pages: c_long = 4000 + 251; +pub const SYS_set_tid_address: c_long = 4000 + 252; +pub const SYS_restart_syscall: c_long = 4000 + 253; +pub const SYS_fadvise64: c_long = 4000 + 254; +pub const SYS_statfs64: c_long = 4000 + 255; +pub const SYS_fstatfs64: c_long = 4000 + 256; +pub const SYS_timer_create: c_long = 4000 + 257; +pub const SYS_timer_settime: c_long = 4000 + 258; +pub const SYS_timer_gettime: c_long = 4000 + 259; +pub const SYS_timer_getoverrun: c_long = 4000 + 260; +pub const SYS_timer_delete: c_long = 4000 + 261; +pub const SYS_clock_settime: c_long = 4000 + 262; +pub const SYS_clock_gettime: c_long = 4000 + 263; +pub const SYS_clock_getres: c_long = 4000 + 264; +pub const SYS_clock_nanosleep: c_long = 4000 + 265; +pub const SYS_tgkill: c_long = 4000 + 266; +pub const SYS_utimes: c_long = 4000 + 267; +pub const SYS_mbind: c_long = 4000 + 268; +pub const SYS_get_mempolicy: c_long = 4000 + 269; +pub const SYS_set_mempolicy: c_long = 4000 + 270; +pub const SYS_mq_open: c_long = 4000 + 271; +pub const SYS_mq_unlink: c_long = 4000 + 272; +pub const SYS_mq_timedsend: c_long = 4000 + 273; +pub const SYS_mq_timedreceive: c_long = 4000 + 274; +pub const SYS_mq_notify: c_long = 4000 + 275; +pub const SYS_mq_getsetattr: c_long = 4000 + 276; +pub const SYS_vserver: c_long = 4000 + 277; +pub const SYS_waitid: c_long = 4000 + 278; +/* pub const SYS_sys_setaltroot: c_long = 4000 + 279; */ +pub const SYS_add_key: c_long = 4000 + 280; +pub const SYS_request_key: c_long = 4000 + 281; +pub const SYS_keyctl: c_long = 4000 + 282; +pub const SYS_set_thread_area: c_long = 4000 + 283; +pub const SYS_inotify_init: c_long = 4000 + 284; +pub const SYS_inotify_add_watch: c_long = 4000 + 285; +pub const SYS_inotify_rm_watch: c_long = 4000 + 286; +pub const SYS_migrate_pages: c_long = 4000 + 287; +pub const SYS_openat: c_long = 4000 + 288; +pub const SYS_mkdirat: c_long = 4000 + 289; +pub const SYS_mknodat: c_long = 4000 + 290; +pub const SYS_fchownat: c_long = 4000 + 291; +pub const SYS_futimesat: c_long = 4000 + 292; +pub const SYS_fstatat64: c_long = 4000 + 293; +pub const SYS_unlinkat: c_long = 4000 + 294; +pub const SYS_renameat: c_long = 4000 + 295; +pub const SYS_linkat: c_long = 4000 + 296; +pub const SYS_symlinkat: c_long = 4000 + 297; +pub const SYS_readlinkat: c_long = 4000 + 298; +pub const SYS_fchmodat: c_long = 4000 + 299; +pub const SYS_faccessat: c_long = 4000 + 300; +pub const SYS_pselect6: c_long = 4000 + 301; +pub const SYS_ppoll: c_long = 4000 + 302; +pub const SYS_unshare: c_long = 4000 + 303; +pub const SYS_splice: c_long = 4000 + 304; +pub const SYS_sync_file_range: c_long = 4000 + 305; +pub const SYS_tee: c_long = 4000 + 306; +pub const SYS_vmsplice: c_long = 4000 + 307; +pub const SYS_move_pages: c_long = 4000 + 308; +pub const SYS_set_robust_list: c_long = 4000 + 309; +pub const SYS_get_robust_list: c_long = 4000 + 310; +pub const SYS_kexec_load: c_long = 4000 + 311; +pub const SYS_getcpu: c_long = 4000 + 312; +pub const SYS_epoll_pwait: c_long = 4000 + 313; +pub const SYS_ioprio_set: c_long = 4000 + 314; +pub const SYS_ioprio_get: c_long = 4000 + 315; +pub const SYS_utimensat: c_long = 4000 + 316; +pub const SYS_signalfd: c_long = 4000 + 317; +pub const SYS_timerfd: c_long = 4000 + 318; +pub const SYS_eventfd: c_long = 4000 + 319; +pub const SYS_fallocate: c_long = 4000 + 320; +pub const SYS_timerfd_create: c_long = 4000 + 321; +pub const SYS_timerfd_gettime: c_long = 4000 + 322; +pub const SYS_timerfd_settime: c_long = 4000 + 323; +pub const SYS_signalfd4: c_long = 4000 + 324; +pub const SYS_eventfd2: c_long = 4000 + 325; +pub const SYS_epoll_create1: c_long = 4000 + 326; +pub const SYS_dup3: c_long = 4000 + 327; +pub const SYS_pipe2: c_long = 4000 + 328; +pub const SYS_inotify_init1: c_long = 4000 + 329; +pub const SYS_preadv: c_long = 4000 + 330; +pub const SYS_pwritev: c_long = 4000 + 331; +pub const SYS_rt_tgsigqueueinfo: c_long = 4000 + 332; +pub const SYS_perf_event_open: c_long = 4000 + 333; +pub const SYS_accept4: c_long = 4000 + 334; +pub const SYS_recvmmsg: c_long = 4000 + 335; +pub const SYS_fanotify_init: c_long = 4000 + 336; +pub const SYS_fanotify_mark: c_long = 4000 + 337; +pub const SYS_prlimit64: c_long = 4000 + 338; +pub const SYS_name_to_handle_at: c_long = 4000 + 339; +pub const SYS_open_by_handle_at: c_long = 4000 + 340; +pub const SYS_clock_adjtime: c_long = 4000 + 341; +pub const SYS_syncfs: c_long = 4000 + 342; +pub const SYS_sendmmsg: c_long = 4000 + 343; +pub const SYS_setns: c_long = 4000 + 344; +pub const SYS_process_vm_readv: c_long = 4000 + 345; +pub const SYS_process_vm_writev: c_long = 4000 + 346; +pub const SYS_kcmp: c_long = 4000 + 347; +pub const SYS_finit_module: c_long = 4000 + 348; +pub const SYS_sched_setattr: c_long = 4000 + 349; +pub const SYS_sched_getattr: c_long = 4000 + 350; +pub const SYS_renameat2: c_long = 4000 + 351; +pub const SYS_seccomp: c_long = 4000 + 352; +pub const SYS_getrandom: c_long = 4000 + 353; +pub const SYS_memfd_create: c_long = 4000 + 354; +pub const SYS_bpf: c_long = 4000 + 355; +pub const SYS_execveat: c_long = 4000 + 356; +pub const SYS_userfaultfd: c_long = 4000 + 357; +pub const SYS_membarrier: c_long = 4000 + 358; +pub const SYS_mlock2: c_long = 4000 + 359; +pub const SYS_copy_file_range: c_long = 4000 + 360; +pub const SYS_preadv2: c_long = 4000 + 361; +pub const SYS_pwritev2: c_long = 4000 + 362; +pub const SYS_pkey_mprotect: c_long = 4000 + 363; +pub const SYS_pkey_alloc: c_long = 4000 + 364; +pub const SYS_pkey_free: c_long = 4000 + 365; +pub const SYS_statx: c_long = 4000 + 366; +pub const SYS_rseq: c_long = 4000 + 367; +pub const SYS_pidfd_send_signal: c_long = 4000 + 424; +pub const SYS_io_uring_setup: c_long = 4000 + 425; +pub const SYS_io_uring_enter: c_long = 4000 + 426; +pub const SYS_io_uring_register: c_long = 4000 + 427; +pub const SYS_open_tree: c_long = 4000 + 428; +pub const SYS_move_mount: c_long = 4000 + 429; +pub const SYS_fsopen: c_long = 4000 + 430; +pub const SYS_fsconfig: c_long = 4000 + 431; +pub const SYS_fsmount: c_long = 4000 + 432; +pub const SYS_fspick: c_long = 4000 + 433; +pub const SYS_pidfd_open: c_long = 4000 + 434; +pub const SYS_clone3: c_long = 4000 + 435; +pub const SYS_close_range: c_long = 4000 + 436; +pub const SYS_openat2: c_long = 4000 + 437; +pub const SYS_pidfd_getfd: c_long = 4000 + 438; +pub const SYS_faccessat2: c_long = 4000 + 439; +pub const SYS_process_madvise: c_long = 4000 + 440; +pub const SYS_epoll_pwait2: c_long = 4000 + 441; +pub const SYS_mount_setattr: c_long = 4000 + 442; +pub const SYS_quotactl_fd: c_long = 4000 + 443; +pub const SYS_landlock_create_ruleset: c_long = 4000 + 444; +pub const SYS_landlock_add_rule: c_long = 4000 + 445; +pub const SYS_landlock_restrict_self: c_long = 4000 + 446; +pub const SYS_memfd_secret: c_long = 4000 + 447; +pub const SYS_process_mrelease: c_long = 4000 + 448; +pub const SYS_futex_waitv: c_long = 4000 + 449; +pub const SYS_set_mempolicy_home_node: c_long = 4000 + 450; + +pub const O_DIRECT: c_int = 0x8000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; + +pub const O_APPEND: c_int = 8; +pub const O_CREAT: c_int = 256; +pub const O_EXCL: c_int = 1024; +pub const O_NOCTTY: c_int = 2048; +pub const O_NONBLOCK: c_int = 128; +pub const O_SYNC: c_int = 0x4010; +pub const O_RSYNC: c_int = 0x4010; +pub const O_DSYNC: c_int = 0x10; +pub const O_FSYNC: c_int = 0x4010; +pub const O_ASYNC: c_int = 0x1000; +pub const O_NDELAY: c_int = 0x80; + +pub const EDEADLK: c_int = 45; +pub const ENAMETOOLONG: c_int = 78; +pub const ENOLCK: c_int = 46; +pub const ENOSYS: c_int = 89; +pub const ENOTEMPTY: c_int = 93; +pub const ELOOP: c_int = 90; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EDEADLOCK: c_int = 56; +pub const EMULTIHOP: c_int = 74; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EBADMSG: c_int = 77; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const EUSERS: c_int = 94; +pub const ENOTSOCK: c_int = 95; +pub const EDESTADDRREQ: c_int = 96; +pub const EMSGSIZE: c_int = 97; +pub const EPROTOTYPE: c_int = 98; +pub const ENOPROTOOPT: c_int = 99; +pub const EPROTONOSUPPORT: c_int = 120; +pub const ESOCKTNOSUPPORT: c_int = 121; +pub const EOPNOTSUPP: c_int = 122; +pub const EPFNOSUPPORT: c_int = 123; +pub const EAFNOSUPPORT: c_int = 124; +pub const EADDRINUSE: c_int = 125; +pub const EADDRNOTAVAIL: c_int = 126; +pub const ENETDOWN: c_int = 127; +pub const ENETUNREACH: c_int = 128; +pub const ENETRESET: c_int = 129; +pub const ECONNABORTED: c_int = 130; +pub const ECONNRESET: c_int = 131; +pub const ENOBUFS: c_int = 132; +pub const EISCONN: c_int = 133; +pub const ENOTCONN: c_int = 134; +pub const ESHUTDOWN: c_int = 143; +pub const ETOOMANYREFS: c_int = 144; +pub const ETIMEDOUT: c_int = 145; +pub const ECONNREFUSED: c_int = 146; +pub const EHOSTDOWN: c_int = 147; +pub const EHOSTUNREACH: c_int = 148; +pub const EALREADY: c_int = 149; +pub const EINPROGRESS: c_int = 150; +pub const ESTALE: c_int = 151; +pub const EUCLEAN: c_int = 135; +pub const ENOTNAM: c_int = 137; +pub const ENAVAIL: c_int = 138; +pub const EISNAM: c_int = 139; +pub const EREMOTEIO: c_int = 140; +pub const EDQUOT: c_int = 1133; +pub const ENOMEDIUM: c_int = 159; +pub const EMEDIUMTYPE: c_int = 160; +pub const ECANCELED: c_int = 158; +pub const ENOKEY: c_int = 161; +pub const EKEYEXPIRED: c_int = 162; +pub const EKEYREVOKED: c_int = 163; +pub const EKEYREJECTED: c_int = 164; +pub const EOWNERDEAD: c_int = 165; +pub const ENOTRECOVERABLE: c_int = 166; +pub const ERFKILL: c_int = 167; + +pub const MAP_NORESERVE: c_int = 0x400; +pub const MAP_ANON: c_int = 0x800; +pub const MAP_ANONYMOUS: c_int = 0x800; +pub const MAP_GROWSDOWN: c_int = 0x1000; +pub const MAP_DENYWRITE: c_int = 0x2000; +pub const MAP_EXECUTABLE: c_int = 0x4000; +pub const MAP_LOCKED: c_int = 0x8000; +pub const MAP_POPULATE: c_int = 0x10000; +pub const MAP_NONBLOCK: c_int = 0x20000; +pub const MAP_STACK: c_int = 0x40000; + +pub const SOCK_STREAM: c_int = 2; +pub const SOCK_DGRAM: c_int = 1; + +pub const SA_SIGINFO: c_int = 0x00000008; +pub const SA_NOCLDWAIT: c_int = 0x00010000; + +pub const SIGCHLD: c_int = 18; +pub const SIGBUS: c_int = 10; +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGWINCH: c_int = 20; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGCONT: c_int = 25; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGURG: c_int = 21; +pub const SIGIO: c_int = 22; +pub const SIGSYS: c_int = 12; +pub const SIGPOLL: c_int = 22; +pub const SIGPWR: c_int = 19; +pub const SIG_SETMASK: c_int = 3; +pub const SIG_BLOCK: c_int = 0x1; +pub const SIG_UNBLOCK: c_int = 0x2; + +pub const POLLWRNORM: c_short = 0x004; +pub const POLLWRBAND: c_short = 0x100; pub const VEOF: usize = 16; pub const VEOL: usize = 17; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x00000100; -pub const TOSTOP: ::tcflag_t = 0x00008000; -pub const FLUSHO: ::tcflag_t = 0x00002000; -pub const EXTPROC: ::tcflag_t = 0o200000; -pub const TCSANOW: ::c_int = 0x540e; -pub const TCSADRAIN: ::c_int = 0x540f; -pub const TCSAFLUSH: ::c_int = 0x5410; - -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; - -pub const MAP_HUGETLB: ::c_int = 0x080000; - -pub const EFD_NONBLOCK: ::c_int = 0x80; - -pub const F_GETLK: ::c_int = 14; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETOWN: ::c_int = 24; - -pub const SFD_NONBLOCK: ::c_int = 0x80; - -pub const RTLD_DEEPBIND: ::c_int = 0x10; -pub const RTLD_GLOBAL: ::c_int = 0x4; -pub const RTLD_NOLOAD: ::c_int = 0x8; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const IEXTEN: crate::tcflag_t = 0x00000100; +pub const TOSTOP: crate::tcflag_t = 0x00008000; +pub const FLUSHO: crate::tcflag_t = 0x00002000; +pub const EXTPROC: crate::tcflag_t = 0o200000; +pub const TCSANOW: c_int = 0x540e; +pub const TCSADRAIN: c_int = 0x540f; +pub const TCSAFLUSH: c_int = 0x5410; + +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; + +pub const MAP_HUGETLB: c_int = 0x080000; + +pub const EFD_NONBLOCK: c_int = 0x80; + +pub const F_GETLK: c_int = 14; +pub const F_GETOWN: c_int = 23; +pub const F_SETOWN: c_int = 24; + +pub const SFD_NONBLOCK: c_int = 0x80; + +pub const RTLD_DEEPBIND: c_int = 0x10; +pub const RTLD_GLOBAL: c_int = 0x4; +pub const RTLD_NOLOAD: c_int = 0x8; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -749,73 +751,73 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; - -pub const EHWPOISON: ::c_int = 168; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; + +pub const EHWPOISON: c_int = 168; diff --git a/src/unix/linux_like/linux/gnu/b32/mod.rs b/src/unix/linux_like/linux/gnu/b32/mod.rs index eb09a5b3ed9dd..c4550e183de19 100644 --- a/src/unix/linux_like/linux/gnu/b32/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/mod.rs @@ -1,21 +1,21 @@ //! 32-bit specific definitions for linux-like values -use pthread_mutex_t; +use crate::{c_int, c_longlong, c_uint, c_ulonglong, c_ushort, c_void, pthread_mutex_t, size_t}; pub type c_long = i32; pub type c_ulong = u32; pub type clock_t = i32; -pub type shmatt_t = ::c_ulong; -pub type msgqnum_t = ::c_ulong; -pub type msglen_t = ::c_ulong; +pub type shmatt_t = c_ulong; +pub type msgqnum_t = c_ulong; +pub type msglen_t = c_ulong; pub type nlink_t = u32; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; pub type __fsword_t = i32; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; -pub type __syscall_ulong_t = ::c_ulong; +pub type __syscall_ulong_t = c_ulong; cfg_if! { if #[cfg(target_arch = "riscv32")] { @@ -34,8 +34,8 @@ cfg_if! { pub type ino_t = u32; pub type off_t = i32; pub type blkcnt_t = i32; - pub type fsblkcnt_t = ::c_ulong; - pub type fsfilcnt_t = ::c_ulong; + pub type fsblkcnt_t = c_ulong; + pub type fsfilcnt_t = c_ulong; pub type rlim_t = c_ulong; pub type blksize_t = i32; } @@ -44,66 +44,66 @@ cfg_if! { s! { pub struct stat { #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - pub st_dev: ::dev_t, + pub st_dev: crate::dev_t, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - pub st_dev: ::c_ulong, + pub st_dev: c_ulong, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - __pad1: ::c_short, + __pad1: crate::c_short, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - st_pad1: [::c_long; 3], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, + st_pad1: [c_long; 3], + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - pub st_rdev: ::dev_t, + pub st_rdev: crate::dev_t, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - pub st_rdev: ::c_ulong, + pub st_rdev: c_ulong, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - __pad2: ::c_short, + __pad2: crate::c_short, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - st_pad2: [::c_long; 2], - pub st_size: ::off_t, + st_pad2: [c_long; 2], + pub st_size: off_t, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - st_pad3: ::c_long, + st_pad3: c_long, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - pub st_blksize: ::blksize_t, + pub st_blksize: crate::blksize_t, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - __unused4: ::c_long, + __unused4: c_long, #[cfg(not(any(target_arch = "mips", target_arch = "mips32r6")))] - __unused5: ::c_long, + __unused5: c_long, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - pub st_blksize: ::blksize_t, + pub st_blksize: crate::blksize_t, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - pub st_blocks: ::blkcnt_t, + pub st_blocks: crate::blkcnt_t, #[cfg(any(target_arch = "mips", target_arch = "mips32r6"))] - st_pad5: [::c_long; 14], + st_pad5: [c_long; 14], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { @@ -111,62 +111,62 @@ s! { } pub struct sigset_t { - __val: [::c_ulong; 32], + __val: [c_ulong; 32], } pub struct sysinfo { - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, #[deprecated( since = "0.2.58", note = "This padding field might become private in the future" )] - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 8], + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 8], } pub struct semid_ds { pub sem_perm: ipc_perm, #[cfg(target_arch = "powerpc")] - __reserved: ::__syscall_ulong_t, - pub sem_otime: ::time_t, + __reserved: crate::__syscall_ulong_t, + pub sem_otime: crate::time_t, #[cfg(not(any( target_arch = "mips", target_arch = "mips32r6", target_arch = "powerpc" )))] - __reserved: ::__syscall_ulong_t, + __reserved: crate::__syscall_ulong_t, #[cfg(target_arch = "powerpc")] - __reserved2: ::__syscall_ulong_t, - pub sem_ctime: ::time_t, + __reserved2: crate::__syscall_ulong_t, + pub sem_ctime: crate::time_t, #[cfg(not(any( target_arch = "mips", target_arch = "mips32r6", target_arch = "powerpc" )))] - __reserved2: ::__syscall_ulong_t, - pub sem_nsems: ::__syscall_ulong_t, - __glibc_reserved3: ::__syscall_ulong_t, - __glibc_reserved4: ::__syscall_ulong_t, + __reserved2: crate::__syscall_ulong_t, + pub sem_nsems: crate::__syscall_ulong_t, + __glibc_reserved3: crate::__syscall_ulong_t, + __glibc_reserved4: crate::__syscall_ulong_t, } } -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; @@ -178,150 +178,150 @@ pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; cfg_if! { if #[cfg(target_arch = "sparc")] { - pub const O_NOATIME: ::c_int = 0x200000; - pub const O_PATH: ::c_int = 0x1000000; - pub const O_TMPFILE: ::c_int = 0x2000000 | O_DIRECTORY; + pub const O_NOATIME: c_int = 0x200000; + pub const O_PATH: c_int = 0x1000000; + pub const O_TMPFILE: c_int = 0x2000000 | O_DIRECTORY; - pub const SA_ONSTACK: ::c_int = 1; + pub const SA_ONSTACK: c_int = 1; - pub const PTRACE_DETACH: ::c_uint = 11; + pub const PTRACE_DETACH: c_uint = 11; - pub const F_SETLK: ::c_int = 8; - pub const F_SETLKW: ::c_int = 9; + pub const F_SETLK: c_int = 8; + pub const F_SETLKW: c_int = 9; - pub const F_RDLCK: ::c_int = 1; - pub const F_WRLCK: ::c_int = 2; - pub const F_UNLCK: ::c_int = 3; + pub const F_RDLCK: c_int = 1; + pub const F_WRLCK: c_int = 2; + pub const F_UNLCK: c_int = 3; - pub const SFD_CLOEXEC: ::c_int = 0x400000; + pub const SFD_CLOEXEC: c_int = 0x400000; pub const NCCS: usize = 17; - pub const O_TRUNC: ::c_int = 0x400; - pub const O_CLOEXEC: ::c_int = 0x400000; - - pub const EBFONT: ::c_int = 109; - pub const ENOSTR: ::c_int = 72; - pub const ENODATA: ::c_int = 111; - pub const ETIME: ::c_int = 73; - pub const ENOSR: ::c_int = 74; - pub const ENONET: ::c_int = 80; - pub const ENOPKG: ::c_int = 113; - pub const EREMOTE: ::c_int = 71; - pub const ENOLINK: ::c_int = 82; - pub const EADV: ::c_int = 83; - pub const ESRMNT: ::c_int = 84; - pub const ECOMM: ::c_int = 85; - pub const EPROTO: ::c_int = 86; - pub const EDOTDOT: ::c_int = 88; - - pub const SA_NODEFER: ::c_int = 0x20; - pub const SA_RESETHAND: ::c_int = 0x4; - pub const SA_RESTART: ::c_int = 0x2; - pub const SA_NOCLDSTOP: ::c_int = 0x00000008; - - pub const EPOLL_CLOEXEC: ::c_int = 0x400000; - - pub const EFD_CLOEXEC: ::c_int = 0x400000; + pub const O_TRUNC: c_int = 0x400; + pub const O_CLOEXEC: c_int = 0x400000; + + pub const EBFONT: c_int = 109; + pub const ENOSTR: c_int = 72; + pub const ENODATA: c_int = 111; + pub const ETIME: c_int = 73; + pub const ENOSR: c_int = 74; + pub const ENONET: c_int = 80; + pub const ENOPKG: c_int = 113; + pub const EREMOTE: c_int = 71; + pub const ENOLINK: c_int = 82; + pub const EADV: c_int = 83; + pub const ESRMNT: c_int = 84; + pub const ECOMM: c_int = 85; + pub const EPROTO: c_int = 86; + pub const EDOTDOT: c_int = 88; + + pub const SA_NODEFER: c_int = 0x20; + pub const SA_RESETHAND: c_int = 0x4; + pub const SA_RESTART: c_int = 0x2; + pub const SA_NOCLDSTOP: c_int = 0x00000008; + + pub const EPOLL_CLOEXEC: c_int = 0x400000; + + pub const EFD_CLOEXEC: c_int = 0x400000; } else { - pub const O_NOATIME: ::c_int = 0o1000000; - pub const O_PATH: ::c_int = 0o10000000; - pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; + pub const O_NOATIME: c_int = 0o1000000; + pub const O_PATH: c_int = 0o10000000; + pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; - pub const SA_ONSTACK: ::c_int = 0x08000000; + pub const SA_ONSTACK: c_int = 0x08000000; - pub const PTRACE_DETACH: ::c_uint = 17; + pub const PTRACE_DETACH: c_uint = 17; - pub const F_SETLK: ::c_int = 6; - pub const F_SETLKW: ::c_int = 7; + pub const F_SETLK: c_int = 6; + pub const F_SETLKW: c_int = 7; - pub const F_RDLCK: ::c_int = 0; - pub const F_WRLCK: ::c_int = 1; - pub const F_UNLCK: ::c_int = 2; + pub const F_RDLCK: c_int = 0; + pub const F_WRLCK: c_int = 1; + pub const F_UNLCK: c_int = 2; - pub const SFD_CLOEXEC: ::c_int = 0x080000; + pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; - pub const O_TRUNC: ::c_int = 512; - pub const O_CLOEXEC: ::c_int = 0x80000; - pub const EBFONT: ::c_int = 59; - pub const ENOSTR: ::c_int = 60; - pub const ENODATA: ::c_int = 61; - pub const ETIME: ::c_int = 62; - pub const ENOSR: ::c_int = 63; - pub const ENONET: ::c_int = 64; - pub const ENOPKG: ::c_int = 65; - pub const EREMOTE: ::c_int = 66; - pub const ENOLINK: ::c_int = 67; - pub const EADV: ::c_int = 68; - pub const ESRMNT: ::c_int = 69; - pub const ECOMM: ::c_int = 70; - pub const EPROTO: ::c_int = 71; - pub const EDOTDOT: ::c_int = 73; - - pub const SA_NODEFER: ::c_int = 0x40000000; - pub const SA_RESETHAND: ::c_int = 0x80000000; - pub const SA_RESTART: ::c_int = 0x10000000; - pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - - pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - - pub const EFD_CLOEXEC: ::c_int = 0x80000; + pub const O_TRUNC: c_int = 512; + pub const O_CLOEXEC: c_int = 0x80000; + pub const EBFONT: c_int = 59; + pub const ENOSTR: c_int = 60; + pub const ENODATA: c_int = 61; + pub const ETIME: c_int = 62; + pub const ENOSR: c_int = 63; + pub const ENONET: c_int = 64; + pub const ENOPKG: c_int = 65; + pub const EREMOTE: c_int = 66; + pub const ENOLINK: c_int = 67; + pub const EADV: c_int = 68; + pub const ESRMNT: c_int = 69; + pub const ECOMM: c_int = 70; + pub const EPROTO: c_int = 71; + pub const EDOTDOT: c_int = 73; + + pub const SA_NODEFER: c_int = 0x40000000; + pub const SA_RESETHAND: c_int = 0x80000000; + pub const SA_RESTART: c_int = 0x10000000; + pub const SA_NOCLDSTOP: c_int = 0x00000001; + + pub const EPOLL_CLOEXEC: c_int = 0x80000; + + pub const EFD_CLOEXEC: c_int = 0x80000; } } #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; +pub const PTRACE_GETFPREGS: c_uint = 14; +pub const PTRACE_SETFPREGS: c_uint = 15; +pub const PTRACE_GETREGS: c_uint = 12; +pub const PTRACE_SETREGS: c_uint = 13; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; } cfg_if! { diff --git a/src/unix/linux_like/linux/gnu/b32/powerpc.rs b/src/unix/linux_like/linux/gnu/b32/powerpc.rs index 9a045cedb1a86..e2e5088bb390d 100644 --- a/src/unix/linux_like/linux/gnu/b32/powerpc.rs +++ b/src/unix/linux_like/linux/gnu/b32/powerpc.rs @@ -1,54 +1,56 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = u8; pub type wchar_t = i32; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - f_spare: [::__fsword_t; 4], + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + f_spare: [crate::__fsword_t; 4], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct ipc_perm { - __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, + __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, __seq: u32, __pad1: u32, __glibc_reserved1: u64, @@ -56,96 +58,96 @@ s! { } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_ushort, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: c_ushort, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - __glibc_reserved1: ::c_uint, - pub shm_atime: ::time_t, - __glibc_reserved2: ::c_uint, - pub shm_dtime: ::time_t, - __glibc_reserved3: ::c_uint, - pub shm_ctime: ::time_t, - __glibc_reserved4: ::c_uint, - pub shm_segsz: ::size_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __glibc_reserved5: ::c_ulong, - __glibc_reserved6: ::c_ulong, + pub shm_perm: crate::ipc_perm, + __glibc_reserved1: c_uint, + pub shm_atime: crate::time_t, + __glibc_reserved2: c_uint, + pub shm_dtime: crate::time_t, + __glibc_reserved3: c_uint, + pub shm_ctime: crate::time_t, + __glibc_reserved4: c_uint, + pub shm_segsz: size_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __glibc_reserved5: c_ulong, + __glibc_reserved6: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - __glibc_reserved1: ::c_uint, - pub msg_stime: ::time_t, - __glibc_reserved2: ::c_uint, - pub msg_rtime: ::time_t, - __glibc_reserved3: ::c_uint, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + pub msg_perm: crate::ipc_perm, + __glibc_reserved1: c_uint, + pub msg_stime: crate::time_t, + __glibc_reserved2: c_uint, + pub msg_rtime: crate::time_t, + __glibc_reserved3: c_uint, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -153,196 +155,196 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_DIRECT: ::c_int = 0x20000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_LARGEFILE: ::c_int = 0o200000; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_DIRECT: c_int = 0x20000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_LARGEFILE: c_int = 0o200000; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_LOCKED: ::c_int = 0x00080; -pub const MAP_NORESERVE: ::c_int = 0x00040; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_LOCKED: c_int = 0x00080; +pub const MAP_NORESERVE: c_int = 0x00040; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_SYNC: c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 58; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const EDEADLOCK: c_int = 58; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const MCL_CURRENT: ::c_int = 0x2000; -pub const MCL_FUTURE: ::c_int = 0x4000; -pub const MCL_ONFAULT: ::c_int = 0x8000; +pub const MCL_CURRENT: c_int = 0x2000; +pub const MCL_FUTURE: c_int = 0x4000; +pub const MCL_ONFAULT: c_int = 0x8000; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const EFD_NONBLOCK: c_int = 0x800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGSTKSZ: ::size_t = 0x4000; -pub const MINSIGSTKSZ: ::size_t = 4096; -pub const CBAUD: ::tcflag_t = 0xff; -pub const TAB1: ::tcflag_t = 0x400; -pub const TAB2: ::tcflag_t = 0x800; -pub const TAB3: ::tcflag_t = 0xc00; -pub const CR1: ::tcflag_t = 0x1000; -pub const CR2: ::tcflag_t = 0x2000; -pub const CR3: ::tcflag_t = 0x3000; -pub const FF1: ::tcflag_t = 0x4000; -pub const BS1: ::tcflag_t = 0x8000; -pub const VT1: ::tcflag_t = 0x10000; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGSTKSZ: size_t = 0x4000; +pub const MINSIGSTKSZ: size_t = 4096; +pub const CBAUD: crate::tcflag_t = 0xff; +pub const TAB1: crate::tcflag_t = 0x400; +pub const TAB2: crate::tcflag_t = 0x800; +pub const TAB3: crate::tcflag_t = 0xc00; +pub const CR1: crate::tcflag_t = 0x1000; +pub const CR2: crate::tcflag_t = 0x2000; +pub const CR3: crate::tcflag_t = 0x3000; +pub const FF1: crate::tcflag_t = 0x4000; +pub const BS1: crate::tcflag_t = 0x8000; +pub const VT1: crate::tcflag_t = 0x10000; pub const VWERASE: usize = 0xa; pub const VREPRINT: usize = 0xb; pub const VSUSP: usize = 0xc; @@ -350,478 +352,478 @@ pub const VSTART: usize = 0xd; pub const VSTOP: usize = 0xe; pub const VDISCARD: usize = 0x10; pub const VTIME: usize = 0x7; -pub const IXON: ::tcflag_t = 0x200; -pub const IXOFF: ::tcflag_t = 0x400; -pub const ONLCR: ::tcflag_t = 0x2; -pub const CSIZE: ::tcflag_t = 0x300; -pub const CS6: ::tcflag_t = 0x100; -pub const CS7: ::tcflag_t = 0x200; -pub const CS8: ::tcflag_t = 0x300; -pub const CSTOPB: ::tcflag_t = 0x400; -pub const CREAD: ::tcflag_t = 0x800; -pub const PARENB: ::tcflag_t = 0x1000; -pub const PARODD: ::tcflag_t = 0x2000; -pub const HUPCL: ::tcflag_t = 0x4000; -pub const CLOCAL: ::tcflag_t = 0x8000; -pub const ECHOKE: ::tcflag_t = 0x1; -pub const ECHOE: ::tcflag_t = 0x2; -pub const ECHOK: ::tcflag_t = 0x4; -pub const ECHONL: ::tcflag_t = 0x10; -pub const ECHOPRT: ::tcflag_t = 0x20; -pub const ECHOCTL: ::tcflag_t = 0x40; -pub const ISIG: ::tcflag_t = 0x80; -pub const ICANON: ::tcflag_t = 0x100; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const IXON: crate::tcflag_t = 0x200; +pub const IXOFF: crate::tcflag_t = 0x400; +pub const ONLCR: crate::tcflag_t = 0x2; +pub const CSIZE: crate::tcflag_t = 0x300; +pub const CS6: crate::tcflag_t = 0x100; +pub const CS7: crate::tcflag_t = 0x200; +pub const CS8: crate::tcflag_t = 0x300; +pub const CSTOPB: crate::tcflag_t = 0x400; +pub const CREAD: crate::tcflag_t = 0x800; +pub const PARENB: crate::tcflag_t = 0x1000; +pub const PARODD: crate::tcflag_t = 0x2000; +pub const HUPCL: crate::tcflag_t = 0x4000; +pub const CLOCAL: crate::tcflag_t = 0x8000; +pub const ECHOKE: crate::tcflag_t = 0x1; +pub const ECHOE: crate::tcflag_t = 0x2; +pub const ECHOK: crate::tcflag_t = 0x4; +pub const ECHONL: crate::tcflag_t = 0x10; +pub const ECHOPRT: crate::tcflag_t = 0x20; +pub const ECHOCTL: crate::tcflag_t = 0x40; +pub const ISIG: crate::tcflag_t = 0x80; +pub const ICANON: crate::tcflag_t = 0x100; +pub const PENDIN: crate::tcflag_t = 0x20000000; +pub const NOFLSH: crate::tcflag_t = 0x80000000; pub const VSWTC: usize = 9; -pub const OLCUC: ::tcflag_t = 0o000004; -pub const NLDLY: ::tcflag_t = 0o001400; -pub const CRDLY: ::tcflag_t = 0o030000; -pub const TABDLY: ::tcflag_t = 0o006000; -pub const BSDLY: ::tcflag_t = 0o100000; -pub const FFDLY: ::tcflag_t = 0o040000; -pub const VTDLY: ::tcflag_t = 0o200000; -pub const XTABS: ::tcflag_t = 0o006000; +pub const OLCUC: crate::tcflag_t = 0o000004; +pub const NLDLY: crate::tcflag_t = 0o001400; +pub const CRDLY: crate::tcflag_t = 0o030000; +pub const TABDLY: crate::tcflag_t = 0o006000; +pub const BSDLY: crate::tcflag_t = 0o100000; +pub const FFDLY: crate::tcflag_t = 0o040000; +pub const VTDLY: crate::tcflag_t = 0o200000; +pub const XTABS: crate::tcflag_t = 0o006000; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const CBAUDEX: ::speed_t = 0o000020; -pub const B57600: ::speed_t = 0o0020; -pub const B115200: ::speed_t = 0o0021; -pub const B230400: ::speed_t = 0o0022; -pub const B460800: ::speed_t = 0o0023; -pub const B500000: ::speed_t = 0o0024; -pub const B576000: ::speed_t = 0o0025; -pub const B921600: ::speed_t = 0o0026; -pub const B1000000: ::speed_t = 0o0027; -pub const B1152000: ::speed_t = 0o0030; -pub const B1500000: ::speed_t = 0o0031; -pub const B2000000: ::speed_t = 0o0032; -pub const B2500000: ::speed_t = 0o0033; -pub const B3000000: ::speed_t = 0o0034; -pub const B3500000: ::speed_t = 0o0035; -pub const B4000000: ::speed_t = 0o0036; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const CBAUDEX: crate::speed_t = 0o000020; +pub const B57600: crate::speed_t = 0o0020; +pub const B115200: crate::speed_t = 0o0021; +pub const B230400: crate::speed_t = 0o0022; +pub const B460800: crate::speed_t = 0o0023; +pub const B500000: crate::speed_t = 0o0024; +pub const B576000: crate::speed_t = 0o0025; +pub const B921600: crate::speed_t = 0o0026; +pub const B1000000: crate::speed_t = 0o0027; +pub const B1152000: crate::speed_t = 0o0030; +pub const B1500000: crate::speed_t = 0o0031; +pub const B2000000: crate::speed_t = 0o0032; +pub const B2500000: crate::speed_t = 0o0033; +pub const B3000000: crate::speed_t = 0o0034; +pub const B3500000: crate::speed_t = 0o0035; +pub const B4000000: crate::speed_t = 0o0036; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; pub const VMIN: usize = 5; -pub const IEXTEN: ::tcflag_t = 0x400; -pub const TOSTOP: ::tcflag_t = 0x400000; -pub const FLUSHO: ::tcflag_t = 0x800000; -pub const EXTPROC: ::tcflag_t = 0x10000000; +pub const IEXTEN: crate::tcflag_t = 0x400; +pub const TOSTOP: crate::tcflag_t = 0x400000; +pub const FLUSHO: crate::tcflag_t = 0x800000; +pub const EXTPROC: crate::tcflag_t = 0x10000000; -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */ -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_query_module: ::c_long = 166; -pub const SYS_poll: ::c_long = 167; -pub const SYS_nfsservctl: ::c_long = 168; -pub const SYS_setresgid: ::c_long = 169; -pub const SYS_getresgid: ::c_long = 170; -pub const SYS_prctl: ::c_long = 171; -pub const SYS_rt_sigreturn: ::c_long = 172; -pub const SYS_rt_sigaction: ::c_long = 173; -pub const SYS_rt_sigprocmask: ::c_long = 174; -pub const SYS_rt_sigpending: ::c_long = 175; -pub const SYS_rt_sigtimedwait: ::c_long = 176; -pub const SYS_rt_sigqueueinfo: ::c_long = 177; -pub const SYS_rt_sigsuspend: ::c_long = 178; -pub const SYS_pread64: ::c_long = 179; -pub const SYS_pwrite64: ::c_long = 180; -pub const SYS_chown: ::c_long = 181; -pub const SYS_getcwd: ::c_long = 182; -pub const SYS_capget: ::c_long = 183; -pub const SYS_capset: ::c_long = 184; -pub const SYS_sigaltstack: ::c_long = 185; -pub const SYS_sendfile: ::c_long = 186; -pub const SYS_getpmsg: ::c_long = 187; /* some people actually want streams */ -pub const SYS_putpmsg: ::c_long = 188; /* some people actually want streams */ -pub const SYS_vfork: ::c_long = 189; -pub const SYS_ugetrlimit: ::c_long = 190; /* SuS compliant getrlimit */ -pub const SYS_readahead: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_pciconfig_read: ::c_long = 198; -pub const SYS_pciconfig_write: ::c_long = 199; -pub const SYS_pciconfig_iobase: ::c_long = 200; -pub const SYS_multiplexer: ::c_long = 201; -pub const SYS_getdents64: ::c_long = 202; -pub const SYS_pivot_root: ::c_long = 203; -pub const SYS_fcntl64: ::c_long = 204; -pub const SYS_madvise: ::c_long = 205; -pub const SYS_mincore: ::c_long = 206; -pub const SYS_gettid: ::c_long = 207; -pub const SYS_tkill: ::c_long = 208; -pub const SYS_setxattr: ::c_long = 209; -pub const SYS_lsetxattr: ::c_long = 210; -pub const SYS_fsetxattr: ::c_long = 211; -pub const SYS_getxattr: ::c_long = 212; -pub const SYS_lgetxattr: ::c_long = 213; -pub const SYS_fgetxattr: ::c_long = 214; -pub const SYS_listxattr: ::c_long = 215; -pub const SYS_llistxattr: ::c_long = 216; -pub const SYS_flistxattr: ::c_long = 217; -pub const SYS_removexattr: ::c_long = 218; -pub const SYS_lremovexattr: ::c_long = 219; -pub const SYS_fremovexattr: ::c_long = 220; -pub const SYS_futex: ::c_long = 221; -pub const SYS_sched_setaffinity: ::c_long = 222; -pub const SYS_sched_getaffinity: ::c_long = 223; -pub const SYS_tuxcall: ::c_long = 225; -pub const SYS_sendfile64: ::c_long = 226; -pub const SYS_io_setup: ::c_long = 227; -pub const SYS_io_destroy: ::c_long = 228; -pub const SYS_io_getevents: ::c_long = 229; -pub const SYS_io_submit: ::c_long = 230; -pub const SYS_io_cancel: ::c_long = 231; -pub const SYS_set_tid_address: ::c_long = 232; -pub const SYS_fadvise64: ::c_long = 233; -pub const SYS_exit_group: ::c_long = 234; -pub const SYS_lookup_dcookie: ::c_long = 235; -pub const SYS_epoll_create: ::c_long = 236; -pub const SYS_epoll_ctl: ::c_long = 237; -pub const SYS_epoll_wait: ::c_long = 238; -pub const SYS_remap_file_pages: ::c_long = 239; -pub const SYS_timer_create: ::c_long = 240; -pub const SYS_timer_settime: ::c_long = 241; -pub const SYS_timer_gettime: ::c_long = 242; -pub const SYS_timer_getoverrun: ::c_long = 243; -pub const SYS_timer_delete: ::c_long = 244; -pub const SYS_clock_settime: ::c_long = 245; -pub const SYS_clock_gettime: ::c_long = 246; -pub const SYS_clock_getres: ::c_long = 247; -pub const SYS_clock_nanosleep: ::c_long = 248; -pub const SYS_swapcontext: ::c_long = 249; -pub const SYS_tgkill: ::c_long = 250; -pub const SYS_utimes: ::c_long = 251; -pub const SYS_statfs64: ::c_long = 252; -pub const SYS_fstatfs64: ::c_long = 253; -pub const SYS_fadvise64_64: ::c_long = 254; -pub const SYS_rtas: ::c_long = 255; -pub const SYS_sys_debug_setcontext: ::c_long = 256; -pub const SYS_migrate_pages: ::c_long = 258; -pub const SYS_mbind: ::c_long = 259; -pub const SYS_get_mempolicy: ::c_long = 260; -pub const SYS_set_mempolicy: ::c_long = 261; -pub const SYS_mq_open: ::c_long = 262; -pub const SYS_mq_unlink: ::c_long = 263; -pub const SYS_mq_timedsend: ::c_long = 264; -pub const SYS_mq_timedreceive: ::c_long = 265; -pub const SYS_mq_notify: ::c_long = 266; -pub const SYS_mq_getsetattr: ::c_long = 267; -pub const SYS_kexec_load: ::c_long = 268; -pub const SYS_add_key: ::c_long = 269; -pub const SYS_request_key: ::c_long = 270; -pub const SYS_keyctl: ::c_long = 271; -pub const SYS_waitid: ::c_long = 272; -pub const SYS_ioprio_set: ::c_long = 273; -pub const SYS_ioprio_get: ::c_long = 274; -pub const SYS_inotify_init: ::c_long = 275; -pub const SYS_inotify_add_watch: ::c_long = 276; -pub const SYS_inotify_rm_watch: ::c_long = 277; -pub const SYS_spu_run: ::c_long = 278; -pub const SYS_spu_create: ::c_long = 279; -pub const SYS_pselect6: ::c_long = 280; -pub const SYS_ppoll: ::c_long = 281; -pub const SYS_unshare: ::c_long = 282; -pub const SYS_splice: ::c_long = 283; -pub const SYS_tee: ::c_long = 284; -pub const SYS_vmsplice: ::c_long = 285; -pub const SYS_openat: ::c_long = 286; -pub const SYS_mkdirat: ::c_long = 287; -pub const SYS_mknodat: ::c_long = 288; -pub const SYS_fchownat: ::c_long = 289; -pub const SYS_futimesat: ::c_long = 290; -pub const SYS_fstatat64: ::c_long = 291; -pub const SYS_unlinkat: ::c_long = 292; -pub const SYS_renameat: ::c_long = 293; -pub const SYS_linkat: ::c_long = 294; -pub const SYS_symlinkat: ::c_long = 295; -pub const SYS_readlinkat: ::c_long = 296; -pub const SYS_fchmodat: ::c_long = 297; -pub const SYS_faccessat: ::c_long = 298; -pub const SYS_get_robust_list: ::c_long = 299; -pub const SYS_set_robust_list: ::c_long = 300; -pub const SYS_move_pages: ::c_long = 301; -pub const SYS_getcpu: ::c_long = 302; -pub const SYS_epoll_pwait: ::c_long = 303; -pub const SYS_utimensat: ::c_long = 304; -pub const SYS_signalfd: ::c_long = 305; -pub const SYS_timerfd_create: ::c_long = 306; -pub const SYS_eventfd: ::c_long = 307; -pub const SYS_sync_file_range2: ::c_long = 308; -pub const SYS_fallocate: ::c_long = 309; -pub const SYS_subpage_prot: ::c_long = 310; -pub const SYS_timerfd_settime: ::c_long = 311; -pub const SYS_timerfd_gettime: ::c_long = 312; -pub const SYS_signalfd4: ::c_long = 313; -pub const SYS_eventfd2: ::c_long = 314; -pub const SYS_epoll_create1: ::c_long = 315; -pub const SYS_dup3: ::c_long = 316; -pub const SYS_pipe2: ::c_long = 317; -pub const SYS_inotify_init1: ::c_long = 318; -pub const SYS_perf_event_open: ::c_long = 319; -pub const SYS_preadv: ::c_long = 320; -pub const SYS_pwritev: ::c_long = 321; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 322; -pub const SYS_fanotify_init: ::c_long = 323; -pub const SYS_fanotify_mark: ::c_long = 324; -pub const SYS_prlimit64: ::c_long = 325; -pub const SYS_socket: ::c_long = 326; -pub const SYS_bind: ::c_long = 327; -pub const SYS_connect: ::c_long = 328; -pub const SYS_listen: ::c_long = 329; -pub const SYS_accept: ::c_long = 330; -pub const SYS_getsockname: ::c_long = 331; -pub const SYS_getpeername: ::c_long = 332; -pub const SYS_socketpair: ::c_long = 333; -pub const SYS_send: ::c_long = 334; -pub const SYS_sendto: ::c_long = 335; -pub const SYS_recv: ::c_long = 336; -pub const SYS_recvfrom: ::c_long = 337; -pub const SYS_shutdown: ::c_long = 338; -pub const SYS_setsockopt: ::c_long = 339; -pub const SYS_getsockopt: ::c_long = 340; -pub const SYS_sendmsg: ::c_long = 341; -pub const SYS_recvmsg: ::c_long = 342; -pub const SYS_recvmmsg: ::c_long = 343; -pub const SYS_accept4: ::c_long = 344; -pub const SYS_name_to_handle_at: ::c_long = 345; -pub const SYS_open_by_handle_at: ::c_long = 346; -pub const SYS_clock_adjtime: ::c_long = 347; -pub const SYS_syncfs: ::c_long = 348; -pub const SYS_sendmmsg: ::c_long = 349; -pub const SYS_setns: ::c_long = 350; -pub const SYS_process_vm_readv: ::c_long = 351; -pub const SYS_process_vm_writev: ::c_long = 352; -pub const SYS_finit_module: ::c_long = 353; -pub const SYS_kcmp: ::c_long = 354; -pub const SYS_sched_setattr: ::c_long = 355; -pub const SYS_sched_getattr: ::c_long = 356; -pub const SYS_renameat2: ::c_long = 357; -pub const SYS_seccomp: ::c_long = 358; -pub const SYS_getrandom: ::c_long = 359; -pub const SYS_memfd_create: ::c_long = 360; -pub const SYS_bpf: ::c_long = 361; -pub const SYS_execveat: ::c_long = 362; -pub const SYS_switch_endian: ::c_long = 363; -pub const SYS_userfaultfd: ::c_long = 364; -pub const SYS_membarrier: ::c_long = 365; -pub const SYS_mlock2: ::c_long = 378; -pub const SYS_copy_file_range: ::c_long = 379; -pub const SYS_preadv2: ::c_long = 380; -pub const SYS_pwritev2: ::c_long = 381; -pub const SYS_kexec_file_load: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_rseq: ::c_long = 387; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; /* Syscall for Andrew File System */ +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_query_module: c_long = 166; +pub const SYS_poll: c_long = 167; +pub const SYS_nfsservctl: c_long = 168; +pub const SYS_setresgid: c_long = 169; +pub const SYS_getresgid: c_long = 170; +pub const SYS_prctl: c_long = 171; +pub const SYS_rt_sigreturn: c_long = 172; +pub const SYS_rt_sigaction: c_long = 173; +pub const SYS_rt_sigprocmask: c_long = 174; +pub const SYS_rt_sigpending: c_long = 175; +pub const SYS_rt_sigtimedwait: c_long = 176; +pub const SYS_rt_sigqueueinfo: c_long = 177; +pub const SYS_rt_sigsuspend: c_long = 178; +pub const SYS_pread64: c_long = 179; +pub const SYS_pwrite64: c_long = 180; +pub const SYS_chown: c_long = 181; +pub const SYS_getcwd: c_long = 182; +pub const SYS_capget: c_long = 183; +pub const SYS_capset: c_long = 184; +pub const SYS_sigaltstack: c_long = 185; +pub const SYS_sendfile: c_long = 186; +pub const SYS_getpmsg: c_long = 187; /* some people actually want streams */ +pub const SYS_putpmsg: c_long = 188; /* some people actually want streams */ +pub const SYS_vfork: c_long = 189; +pub const SYS_ugetrlimit: c_long = 190; /* SuS compliant getrlimit */ +pub const SYS_readahead: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_pciconfig_read: c_long = 198; +pub const SYS_pciconfig_write: c_long = 199; +pub const SYS_pciconfig_iobase: c_long = 200; +pub const SYS_multiplexer: c_long = 201; +pub const SYS_getdents64: c_long = 202; +pub const SYS_pivot_root: c_long = 203; +pub const SYS_fcntl64: c_long = 204; +pub const SYS_madvise: c_long = 205; +pub const SYS_mincore: c_long = 206; +pub const SYS_gettid: c_long = 207; +pub const SYS_tkill: c_long = 208; +pub const SYS_setxattr: c_long = 209; +pub const SYS_lsetxattr: c_long = 210; +pub const SYS_fsetxattr: c_long = 211; +pub const SYS_getxattr: c_long = 212; +pub const SYS_lgetxattr: c_long = 213; +pub const SYS_fgetxattr: c_long = 214; +pub const SYS_listxattr: c_long = 215; +pub const SYS_llistxattr: c_long = 216; +pub const SYS_flistxattr: c_long = 217; +pub const SYS_removexattr: c_long = 218; +pub const SYS_lremovexattr: c_long = 219; +pub const SYS_fremovexattr: c_long = 220; +pub const SYS_futex: c_long = 221; +pub const SYS_sched_setaffinity: c_long = 222; +pub const SYS_sched_getaffinity: c_long = 223; +pub const SYS_tuxcall: c_long = 225; +pub const SYS_sendfile64: c_long = 226; +pub const SYS_io_setup: c_long = 227; +pub const SYS_io_destroy: c_long = 228; +pub const SYS_io_getevents: c_long = 229; +pub const SYS_io_submit: c_long = 230; +pub const SYS_io_cancel: c_long = 231; +pub const SYS_set_tid_address: c_long = 232; +pub const SYS_fadvise64: c_long = 233; +pub const SYS_exit_group: c_long = 234; +pub const SYS_lookup_dcookie: c_long = 235; +pub const SYS_epoll_create: c_long = 236; +pub const SYS_epoll_ctl: c_long = 237; +pub const SYS_epoll_wait: c_long = 238; +pub const SYS_remap_file_pages: c_long = 239; +pub const SYS_timer_create: c_long = 240; +pub const SYS_timer_settime: c_long = 241; +pub const SYS_timer_gettime: c_long = 242; +pub const SYS_timer_getoverrun: c_long = 243; +pub const SYS_timer_delete: c_long = 244; +pub const SYS_clock_settime: c_long = 245; +pub const SYS_clock_gettime: c_long = 246; +pub const SYS_clock_getres: c_long = 247; +pub const SYS_clock_nanosleep: c_long = 248; +pub const SYS_swapcontext: c_long = 249; +pub const SYS_tgkill: c_long = 250; +pub const SYS_utimes: c_long = 251; +pub const SYS_statfs64: c_long = 252; +pub const SYS_fstatfs64: c_long = 253; +pub const SYS_fadvise64_64: c_long = 254; +pub const SYS_rtas: c_long = 255; +pub const SYS_sys_debug_setcontext: c_long = 256; +pub const SYS_migrate_pages: c_long = 258; +pub const SYS_mbind: c_long = 259; +pub const SYS_get_mempolicy: c_long = 260; +pub const SYS_set_mempolicy: c_long = 261; +pub const SYS_mq_open: c_long = 262; +pub const SYS_mq_unlink: c_long = 263; +pub const SYS_mq_timedsend: c_long = 264; +pub const SYS_mq_timedreceive: c_long = 265; +pub const SYS_mq_notify: c_long = 266; +pub const SYS_mq_getsetattr: c_long = 267; +pub const SYS_kexec_load: c_long = 268; +pub const SYS_add_key: c_long = 269; +pub const SYS_request_key: c_long = 270; +pub const SYS_keyctl: c_long = 271; +pub const SYS_waitid: c_long = 272; +pub const SYS_ioprio_set: c_long = 273; +pub const SYS_ioprio_get: c_long = 274; +pub const SYS_inotify_init: c_long = 275; +pub const SYS_inotify_add_watch: c_long = 276; +pub const SYS_inotify_rm_watch: c_long = 277; +pub const SYS_spu_run: c_long = 278; +pub const SYS_spu_create: c_long = 279; +pub const SYS_pselect6: c_long = 280; +pub const SYS_ppoll: c_long = 281; +pub const SYS_unshare: c_long = 282; +pub const SYS_splice: c_long = 283; +pub const SYS_tee: c_long = 284; +pub const SYS_vmsplice: c_long = 285; +pub const SYS_openat: c_long = 286; +pub const SYS_mkdirat: c_long = 287; +pub const SYS_mknodat: c_long = 288; +pub const SYS_fchownat: c_long = 289; +pub const SYS_futimesat: c_long = 290; +pub const SYS_fstatat64: c_long = 291; +pub const SYS_unlinkat: c_long = 292; +pub const SYS_renameat: c_long = 293; +pub const SYS_linkat: c_long = 294; +pub const SYS_symlinkat: c_long = 295; +pub const SYS_readlinkat: c_long = 296; +pub const SYS_fchmodat: c_long = 297; +pub const SYS_faccessat: c_long = 298; +pub const SYS_get_robust_list: c_long = 299; +pub const SYS_set_robust_list: c_long = 300; +pub const SYS_move_pages: c_long = 301; +pub const SYS_getcpu: c_long = 302; +pub const SYS_epoll_pwait: c_long = 303; +pub const SYS_utimensat: c_long = 304; +pub const SYS_signalfd: c_long = 305; +pub const SYS_timerfd_create: c_long = 306; +pub const SYS_eventfd: c_long = 307; +pub const SYS_sync_file_range2: c_long = 308; +pub const SYS_fallocate: c_long = 309; +pub const SYS_subpage_prot: c_long = 310; +pub const SYS_timerfd_settime: c_long = 311; +pub const SYS_timerfd_gettime: c_long = 312; +pub const SYS_signalfd4: c_long = 313; +pub const SYS_eventfd2: c_long = 314; +pub const SYS_epoll_create1: c_long = 315; +pub const SYS_dup3: c_long = 316; +pub const SYS_pipe2: c_long = 317; +pub const SYS_inotify_init1: c_long = 318; +pub const SYS_perf_event_open: c_long = 319; +pub const SYS_preadv: c_long = 320; +pub const SYS_pwritev: c_long = 321; +pub const SYS_rt_tgsigqueueinfo: c_long = 322; +pub const SYS_fanotify_init: c_long = 323; +pub const SYS_fanotify_mark: c_long = 324; +pub const SYS_prlimit64: c_long = 325; +pub const SYS_socket: c_long = 326; +pub const SYS_bind: c_long = 327; +pub const SYS_connect: c_long = 328; +pub const SYS_listen: c_long = 329; +pub const SYS_accept: c_long = 330; +pub const SYS_getsockname: c_long = 331; +pub const SYS_getpeername: c_long = 332; +pub const SYS_socketpair: c_long = 333; +pub const SYS_send: c_long = 334; +pub const SYS_sendto: c_long = 335; +pub const SYS_recv: c_long = 336; +pub const SYS_recvfrom: c_long = 337; +pub const SYS_shutdown: c_long = 338; +pub const SYS_setsockopt: c_long = 339; +pub const SYS_getsockopt: c_long = 340; +pub const SYS_sendmsg: c_long = 341; +pub const SYS_recvmsg: c_long = 342; +pub const SYS_recvmmsg: c_long = 343; +pub const SYS_accept4: c_long = 344; +pub const SYS_name_to_handle_at: c_long = 345; +pub const SYS_open_by_handle_at: c_long = 346; +pub const SYS_clock_adjtime: c_long = 347; +pub const SYS_syncfs: c_long = 348; +pub const SYS_sendmmsg: c_long = 349; +pub const SYS_setns: c_long = 350; +pub const SYS_process_vm_readv: c_long = 351; +pub const SYS_process_vm_writev: c_long = 352; +pub const SYS_finit_module: c_long = 353; +pub const SYS_kcmp: c_long = 354; +pub const SYS_sched_setattr: c_long = 355; +pub const SYS_sched_getattr: c_long = 356; +pub const SYS_renameat2: c_long = 357; +pub const SYS_seccomp: c_long = 358; +pub const SYS_getrandom: c_long = 359; +pub const SYS_memfd_create: c_long = 360; +pub const SYS_bpf: c_long = 361; +pub const SYS_execveat: c_long = 362; +pub const SYS_switch_endian: c_long = 363; +pub const SYS_userfaultfd: c_long = 364; +pub const SYS_membarrier: c_long = 365; +pub const SYS_mlock2: c_long = 378; +pub const SYS_copy_file_range: c_long = 379; +pub const SYS_preadv2: c_long = 380; +pub const SYS_pwritev2: c_long = 381; +pub const SYS_kexec_file_load: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_rseq: c_long = 387; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; diff --git a/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs b/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs index 950be29a42ae7..2b86d5eacc8fd 100644 --- a/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/riscv32/mod.rs @@ -1,94 +1,98 @@ //! RISC-V-specific definitions for 32-bit linux-like values +use crate::{ + c_int, c_long, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, +}; + pub type c_char = u8; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; s! { pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_frsize: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 4], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_frsize: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 4], } pub struct statfs64 { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_frsize: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 4], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_frsize: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_favail: ::fsfilcnt64_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_favail: crate::fsfilcnt64_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub __f_spare: [c_int; 6], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -96,116 +100,116 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [u64; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused5: ::c_ulong, - __unused6: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused5: c_ulong, + __unused6: c_ulong, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct user_regs_struct { - pub pc: ::c_ulong, - pub ra: ::c_ulong, - pub sp: ::c_ulong, - pub gp: ::c_ulong, - pub tp: ::c_ulong, - pub t0: ::c_ulong, - pub t1: ::c_ulong, - pub t2: ::c_ulong, - pub s0: ::c_ulong, - pub s1: ::c_ulong, - pub a0: ::c_ulong, - pub a1: ::c_ulong, - pub a2: ::c_ulong, - pub a3: ::c_ulong, - pub a4: ::c_ulong, - pub a5: ::c_ulong, - pub a6: ::c_ulong, - pub a7: ::c_ulong, - pub s2: ::c_ulong, - pub s3: ::c_ulong, - pub s4: ::c_ulong, - pub s5: ::c_ulong, - pub s6: ::c_ulong, - pub s7: ::c_ulong, - pub s8: ::c_ulong, - pub s9: ::c_ulong, - pub s10: ::c_ulong, - pub s11: ::c_ulong, - pub t3: ::c_ulong, - pub t4: ::c_ulong, - pub t5: ::c_ulong, - pub t6: ::c_ulong, + pub pc: c_ulong, + pub ra: c_ulong, + pub sp: c_ulong, + pub gp: c_ulong, + pub tp: c_ulong, + pub t0: c_ulong, + pub t1: c_ulong, + pub t2: c_ulong, + pub s0: c_ulong, + pub s1: c_ulong, + pub a0: c_ulong, + pub a1: c_ulong, + pub a2: c_ulong, + pub a3: c_ulong, + pub a4: c_ulong, + pub a5: c_ulong, + pub a6: c_ulong, + pub a7: c_ulong, + pub s2: c_ulong, + pub s3: c_ulong, + pub s4: c_ulong, + pub s5: c_ulong, + pub s6: c_ulong, + pub s7: c_ulong, + pub s8: c_ulong, + pub s9: c_ulong, + pub s10: c_ulong, + pub s11: c_ulong, + pub t3: c_ulong, + pub t4: c_ulong, + pub t5: c_ulong, + pub t6: c_ulong, } } s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct ucontext_t { - pub __uc_flags: ::c_ulong, + pub __uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[allow(missing_debug_implementations)] #[repr(align(16))] pub struct mcontext_t { - pub __gregs: [::c_ulong; 32], + pub __gregs: [c_ulong; 32], pub __fpregs: __riscv_mc_fp_state, } @@ -218,198 +222,198 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct __riscv_mc_f_ext_state { - pub __f: [::c_uint; 32], - pub __fcsr: ::c_uint, + pub __f: [c_uint; 32], + pub __fcsr: c_uint, } #[allow(missing_debug_implementations)] pub struct __riscv_mc_d_ext_state { - pub __f: [::c_ulonglong; 32], - pub __fcsr: ::c_uint, + pub __f: [c_ulonglong; 32], + pub __fcsr: c_uint, } #[allow(missing_debug_implementations)] #[repr(align(16))] pub struct __riscv_mc_q_ext_state { - pub __f: [::c_ulonglong; 64], - pub __fcsr: ::c_uint, - pub __glibc_reserved: [::c_uint; 3], + pub __f: [c_ulonglong; 64], + pub __fcsr: c_uint, + pub __glibc_reserved: [c_uint; 3], } } -pub const O_LARGEFILE: ::c_int = 0; +pub const O_LARGEFILE: c_int = 0; pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 1052672; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 256; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 1052672; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 256; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SA_SIGINFO: ::c_int = 4; -pub const SA_NOCLDWAIT: ::c_int = 2; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; -pub const POLLWRNORM: ::c_short = 256; -pub const POLLWRBAND: ::c_short = 512; -pub const O_ASYNC: ::c_int = 8192; -pub const O_NDELAY: ::c_int = 2048; -pub const EFD_NONBLOCK: ::c_int = 2048; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const SFD_NONBLOCK: ::c_int = 2048; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SA_SIGINFO: c_int = 4; +pub const SA_NOCLDWAIT: c_int = 2; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; +pub const POLLWRNORM: c_short = 256; +pub const POLLWRBAND: c_short = 512; +pub const O_ASYNC: c_int = 8192; +pub const O_NDELAY: c_int = 2048; +pub const EFD_NONBLOCK: c_int = 2048; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const SFD_NONBLOCK: c_int = 2048; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const O_DIRECT: ::c_int = 16384; -pub const O_DIRECTORY: ::c_int = 65536; -pub const O_NOFOLLOW: ::c_int = 131072; -pub const MAP_HUGETLB: ::c_int = 262144; -pub const MAP_LOCKED: ::c_int = 8192; -pub const MAP_NORESERVE: ::c_int = 16384; -pub const MAP_ANON: ::c_int = 32; -pub const MAP_ANONYMOUS: ::c_int = 32; -pub const MAP_DENYWRITE: ::c_int = 2048; -pub const MAP_EXECUTABLE: ::c_int = 4096; -pub const MAP_POPULATE: ::c_int = 32768; -pub const MAP_NONBLOCK: ::c_int = 65536; -pub const MAP_STACK: ::c_int = 131072; -pub const MAP_SYNC: ::c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const MCL_CURRENT: ::c_int = 1; -pub const MCL_FUTURE: ::c_int = 2; -pub const MCL_ONFAULT: ::c_int = 4; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 4111; -pub const TAB1: ::tcflag_t = 2048; -pub const TAB2: ::tcflag_t = 4096; -pub const TAB3: ::tcflag_t = 6144; -pub const CR1: ::tcflag_t = 512; -pub const CR2: ::tcflag_t = 1024; -pub const CR3: ::tcflag_t = 1536; -pub const FF1: ::tcflag_t = 32768; -pub const BS1: ::tcflag_t = 8192; -pub const VT1: ::tcflag_t = 16384; +pub const O_DIRECT: c_int = 16384; +pub const O_DIRECTORY: c_int = 65536; +pub const O_NOFOLLOW: c_int = 131072; +pub const MAP_HUGETLB: c_int = 262144; +pub const MAP_LOCKED: c_int = 8192; +pub const MAP_NORESERVE: c_int = 16384; +pub const MAP_ANON: c_int = 32; +pub const MAP_ANONYMOUS: c_int = 32; +pub const MAP_DENYWRITE: c_int = 2048; +pub const MAP_EXECUTABLE: c_int = 4096; +pub const MAP_POPULATE: c_int = 32768; +pub const MAP_NONBLOCK: c_int = 65536; +pub const MAP_STACK: c_int = 131072; +pub const MAP_SYNC: c_int = 0x080000; +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const MCL_CURRENT: c_int = 1; +pub const MCL_FUTURE: c_int = 2; +pub const MCL_ONFAULT: c_int = 4; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 4111; +pub const TAB1: crate::tcflag_t = 2048; +pub const TAB2: crate::tcflag_t = 4096; +pub const TAB3: crate::tcflag_t = 6144; +pub const CR1: crate::tcflag_t = 512; +pub const CR2: crate::tcflag_t = 1024; +pub const CR3: crate::tcflag_t = 1536; +pub const FF1: crate::tcflag_t = 32768; +pub const BS1: crate::tcflag_t = 8192; +pub const VT1: crate::tcflag_t = 16384; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -417,80 +421,80 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 1024; -pub const IXOFF: ::tcflag_t = 4096; -pub const ONLCR: ::tcflag_t = 4; -pub const CSIZE: ::tcflag_t = 48; -pub const CS6: ::tcflag_t = 16; -pub const CS7: ::tcflag_t = 32; -pub const CS8: ::tcflag_t = 48; -pub const CSTOPB: ::tcflag_t = 64; -pub const CREAD: ::tcflag_t = 128; -pub const PARENB: ::tcflag_t = 256; -pub const PARODD: ::tcflag_t = 512; -pub const HUPCL: ::tcflag_t = 1024; -pub const CLOCAL: ::tcflag_t = 2048; -pub const ECHOKE: ::tcflag_t = 2048; -pub const ECHOE: ::tcflag_t = 16; -pub const ECHOK: ::tcflag_t = 32; -pub const ECHONL: ::tcflag_t = 64; -pub const ECHOPRT: ::tcflag_t = 1024; -pub const ECHOCTL: ::tcflag_t = 512; -pub const ISIG: ::tcflag_t = 1; -pub const ICANON: ::tcflag_t = 2; -pub const PENDIN: ::tcflag_t = 16384; -pub const NOFLSH: ::tcflag_t = 128; -pub const CIBAUD: ::tcflag_t = 269418496; -pub const CBAUDEX: ::tcflag_t = 4096; +pub const IXON: crate::tcflag_t = 1024; +pub const IXOFF: crate::tcflag_t = 4096; +pub const ONLCR: crate::tcflag_t = 4; +pub const CSIZE: crate::tcflag_t = 48; +pub const CS6: crate::tcflag_t = 16; +pub const CS7: crate::tcflag_t = 32; +pub const CS8: crate::tcflag_t = 48; +pub const CSTOPB: crate::tcflag_t = 64; +pub const CREAD: crate::tcflag_t = 128; +pub const PARENB: crate::tcflag_t = 256; +pub const PARODD: crate::tcflag_t = 512; +pub const HUPCL: crate::tcflag_t = 1024; +pub const CLOCAL: crate::tcflag_t = 2048; +pub const ECHOKE: crate::tcflag_t = 2048; +pub const ECHOE: crate::tcflag_t = 16; +pub const ECHOK: crate::tcflag_t = 32; +pub const ECHONL: crate::tcflag_t = 64; +pub const ECHOPRT: crate::tcflag_t = 1024; +pub const ECHOCTL: crate::tcflag_t = 512; +pub const ISIG: crate::tcflag_t = 1; +pub const ICANON: crate::tcflag_t = 2; +pub const PENDIN: crate::tcflag_t = 16384; +pub const NOFLSH: crate::tcflag_t = 128; +pub const CIBAUD: crate::tcflag_t = 269418496; +pub const CBAUDEX: crate::tcflag_t = 4096; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 2; -pub const NLDLY: ::tcflag_t = 256; -pub const CRDLY: ::tcflag_t = 1536; -pub const TABDLY: ::tcflag_t = 6144; -pub const BSDLY: ::tcflag_t = 8192; -pub const FFDLY: ::tcflag_t = 32768; -pub const VTDLY: ::tcflag_t = 16384; -pub const XTABS: ::tcflag_t = 6144; -pub const B0: ::speed_t = 0; -pub const B50: ::speed_t = 1; -pub const B75: ::speed_t = 2; -pub const B110: ::speed_t = 3; -pub const B134: ::speed_t = 4; -pub const B150: ::speed_t = 5; -pub const B200: ::speed_t = 6; -pub const B300: ::speed_t = 7; -pub const B600: ::speed_t = 8; -pub const B1200: ::speed_t = 9; -pub const B1800: ::speed_t = 10; -pub const B2400: ::speed_t = 11; -pub const B4800: ::speed_t = 12; -pub const B9600: ::speed_t = 13; -pub const B19200: ::speed_t = 14; -pub const B38400: ::speed_t = 15; -pub const EXTA: ::speed_t = 14; -pub const EXTB: ::speed_t = 15; -pub const B57600: ::speed_t = 4097; -pub const B115200: ::speed_t = 4098; -pub const B230400: ::speed_t = 4099; -pub const B460800: ::speed_t = 4100; -pub const B500000: ::speed_t = 4101; -pub const B576000: ::speed_t = 4102; -pub const B921600: ::speed_t = 4103; -pub const B1000000: ::speed_t = 4104; -pub const B1152000: ::speed_t = 4105; -pub const B1500000: ::speed_t = 4106; -pub const B2000000: ::speed_t = 4107; -pub const B2500000: ::speed_t = 4108; -pub const B3000000: ::speed_t = 4109; -pub const B3500000: ::speed_t = 4110; -pub const B4000000: ::speed_t = 4111; +pub const OLCUC: crate::tcflag_t = 2; +pub const NLDLY: crate::tcflag_t = 256; +pub const CRDLY: crate::tcflag_t = 1536; +pub const TABDLY: crate::tcflag_t = 6144; +pub const BSDLY: crate::tcflag_t = 8192; +pub const FFDLY: crate::tcflag_t = 32768; +pub const VTDLY: crate::tcflag_t = 16384; +pub const XTABS: crate::tcflag_t = 6144; +pub const B0: crate::speed_t = 0; +pub const B50: crate::speed_t = 1; +pub const B75: crate::speed_t = 2; +pub const B110: crate::speed_t = 3; +pub const B134: crate::speed_t = 4; +pub const B150: crate::speed_t = 5; +pub const B200: crate::speed_t = 6; +pub const B300: crate::speed_t = 7; +pub const B600: crate::speed_t = 8; +pub const B1200: crate::speed_t = 9; +pub const B1800: crate::speed_t = 10; +pub const B2400: crate::speed_t = 11; +pub const B4800: crate::speed_t = 12; +pub const B9600: crate::speed_t = 13; +pub const B19200: crate::speed_t = 14; +pub const B38400: crate::speed_t = 15; +pub const EXTA: crate::speed_t = 14; +pub const EXTB: crate::speed_t = 15; +pub const B57600: crate::speed_t = 4097; +pub const B115200: crate::speed_t = 4098; +pub const B230400: crate::speed_t = 4099; +pub const B460800: crate::speed_t = 4100; +pub const B500000: crate::speed_t = 4101; +pub const B576000: crate::speed_t = 4102; +pub const B921600: crate::speed_t = 4103; +pub const B1000000: crate::speed_t = 4104; +pub const B1152000: crate::speed_t = 4105; +pub const B1500000: crate::speed_t = 4106; +pub const B2000000: crate::speed_t = 4107; +pub const B2500000: crate::speed_t = 4108; +pub const B3000000: crate::speed_t = 4109; +pub const B3500000: crate::speed_t = 4110; +pub const B4000000: crate::speed_t = 4111; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 32768; -pub const TOSTOP: ::tcflag_t = 256; -pub const FLUSHO: ::tcflag_t = 4096; -pub const EXTPROC: ::tcflag_t = 65536; +pub const IEXTEN: crate::tcflag_t = 32768; +pub const TOSTOP: crate::tcflag_t = 256; +pub const FLUSHO: crate::tcflag_t = 4096; +pub const EXTPROC: crate::tcflag_t = 65536; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; @@ -505,306 +509,306 @@ pub const REG_A0: usize = 10; pub const REG_S2: usize = 18; pub const REG_NARGS: usize = 8; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_close: ::c_long = 57; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_brk: ::c_long = 214; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_dup: ::c_long = 23; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_socket: ::c_long = 198; -pub const SYS_connect: ::c_long = 203; -pub const SYS_accept: ::c_long = 202; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_exit: ::c_long = 93; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_kill: ::c_long = 129; -pub const SYS_uname: ::c_long = 160; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semop: ::c_long = 193; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_flock: ::c_long = 32; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_umask: ::c_long = 166; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_times: ::c_long = 153; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_personality: ::c_long = 92; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_sync: ::c_long = 81; -pub const SYS_acct: ::c_long = 89; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_mount: ::c_long = 40; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_futex: ::c_long = 98; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_openat: ::c_long = 56; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_setns: ::c_long = 268; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_close: c_long = 57; +pub const SYS_fstat: c_long = 80; +pub const SYS_lseek: c_long = 62; +pub const SYS_mmap: c_long = 222; +pub const SYS_mprotect: c_long = 226; +pub const SYS_munmap: c_long = 215; +pub const SYS_brk: c_long = 214; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_ioctl: c_long = 29; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_mremap: c_long = 216; +pub const SYS_msync: c_long = 227; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmctl: c_long = 195; +pub const SYS_dup: c_long = 23; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_getpid: c_long = 172; +pub const SYS_sendfile: c_long = 71; +pub const SYS_socket: c_long = 198; +pub const SYS_connect: c_long = 203; +pub const SYS_accept: c_long = 202; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_shutdown: c_long = 210; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_socketpair: c_long = 199; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_exit: c_long = 93; +pub const SYS_wait4: c_long = 260; +pub const SYS_kill: c_long = 129; +pub const SYS_uname: c_long = 160; +pub const SYS_semget: c_long = 190; +pub const SYS_semop: c_long = 193; +pub const SYS_semctl: c_long = 191; +pub const SYS_shmdt: c_long = 197; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgctl: c_long = 187; +pub const SYS_fcntl: c_long = 25; +pub const SYS_flock: c_long = 32; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_getcwd: c_long = 17; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchown: c_long = 55; +pub const SYS_umask: c_long = 166; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_getrusage: c_long = 165; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_times: c_long = 153; +pub const SYS_ptrace: c_long = 117; +pub const SYS_getuid: c_long = 174; +pub const SYS_syslog: c_long = 116; +pub const SYS_getgid: c_long = 176; +pub const SYS_setuid: c_long = 146; +pub const SYS_setgid: c_long = 144; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getegid: c_long = 177; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getppid: c_long = 173; +pub const SYS_setsid: c_long = 157; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setregid: c_long = 143; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_getpgid: c_long = 155; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_getsid: c_long = 156; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_personality: c_long = 92; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_getpriority: c_long = 141; +pub const SYS_setpriority: c_long = 140; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_prctl: c_long = 167; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_chroot: c_long = 51; +pub const SYS_sync: c_long = 81; +pub const SYS_acct: c_long = 89; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_mount: c_long = 40; +pub const SYS_umount2: c_long = 39; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_reboot: c_long = 142; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_quotactl: c_long = 60; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_gettid: c_long = 178; +pub const SYS_readahead: c_long = 213; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_tkill: c_long = 130; +pub const SYS_futex: c_long = 98; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_getdents64: c_long = 61; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_exit_group: c_long = 94; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_tgkill: c_long = 131; +pub const SYS_mbind: c_long = 235; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_waitid: c_long = 95; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_openat: c_long = 56; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_mknodat: c_long = 33; +pub const SYS_fchownat: c_long = 54; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_linkat: c_long = 37; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_faccessat: c_long = 48; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_unshare: c_long = 97; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_move_pages: c_long = 239; +pub const SYS_utimensat: c_long = 88; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_fallocate: c_long = 47; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_accept4: c_long = 242; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_dup3: c_long = 24; +pub const SYS_pipe2: c_long = 59; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_setns: c_long = 268; +pub const SYS_getcpu: c_long = 168; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_rseq: c_long = 293; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; diff --git a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs index fac8cd0a85d83..d14309f45a8ed 100644 --- a/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/sparc/mod.rs @@ -1,159 +1,163 @@ //! SPARC-specific definitions for 32-bit linux-like values +use crate::{ + c_int, c_long, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, +}; + pub type c_char = i8; pub type wchar_t = i32; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + f_spare: [crate::__fsword_t; 5], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + _pad: [c_int; 29], _align: [usize; 0], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, - __reserved: ::c_short, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, + __reserved: c_short, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_ushort, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: c_ushort, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __reserved: [c_long; 2], } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - __pad1: ::c_ushort, - pub mode: ::c_ushort, - __pad2: ::c_ushort, - pub __seq: ::c_ushort, - __unused1: ::c_ulonglong, - __unused2: ::c_ulonglong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + __pad1: c_ushort, + pub mode: c_ushort, + __pad2: c_ushort, + pub __seq: c_ushort, + __unused1: c_ulonglong, + __unused2: c_ulonglong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - __pad1: ::c_uint, - pub shm_atime: ::time_t, - __pad2: ::c_uint, - pub shm_dtime: ::time_t, - __pad3: ::c_uint, - pub shm_ctime: ::time_t, - pub shm_segsz: ::size_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __reserved1: ::c_ulong, - __reserved2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + __pad1: c_uint, + pub shm_atime: crate::time_t, + __pad2: c_uint, + pub shm_dtime: crate::time_t, + __pad3: c_uint, + pub shm_ctime: crate::time_t, + pub shm_segsz: size_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __reserved1: c_ulong, + __reserved2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - __pad1: ::c_uint, - pub msg_stime: ::time_t, - __pad2: ::c_uint, - pub msg_rtime: ::time_t, - __pad3: ::c_uint, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ushort, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved1: ::c_ulong, - __glibc_reserved2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + __pad1: c_uint, + pub msg_stime: crate::time_t, + __pad2: c_uint, + pub msg_rtime: crate::time_t, + __pad3: c_uint, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ushort, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved1: c_ulong, + __glibc_reserved2: c_ulong, } } @@ -166,189 +170,189 @@ s_no_extra_traits! { } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; - -pub const O_APPEND: ::c_int = 0x8; -pub const O_CREAT: ::c_int = 0x200; -pub const O_EXCL: ::c_int = 0x800; -pub const O_NOCTTY: ::c_int = 0x8000; -pub const O_NONBLOCK: ::c_int = 0x4000; -pub const O_SYNC: ::c_int = 0x802000; -pub const O_RSYNC: ::c_int = 0x802000; -pub const O_DSYNC: ::c_int = 0x2000; -pub const O_FSYNC: ::c_int = 0x802000; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0200; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLK: ::c_int = 78; -pub const ENAMETOOLONG: ::c_int = 63; -pub const ENOLCK: ::c_int = 79; -pub const ENOSYS: ::c_int = 90; -pub const ENOTEMPTY: ::c_int = 66; -pub const ELOOP: ::c_int = 62; -pub const ENOMSG: ::c_int = 75; -pub const EIDRM: ::c_int = 77; -pub const ECHRNG: ::c_int = 94; -pub const EL2NSYNC: ::c_int = 95; -pub const EL3HLT: ::c_int = 96; -pub const EL3RST: ::c_int = 97; -pub const ELNRNG: ::c_int = 98; -pub const EUNATCH: ::c_int = 99; -pub const ENOCSI: ::c_int = 100; -pub const EL2HLT: ::c_int = 101; -pub const EBADE: ::c_int = 102; -pub const EBADR: ::c_int = 103; -pub const EXFULL: ::c_int = 104; -pub const ENOANO: ::c_int = 105; -pub const EBADRQC: ::c_int = 106; -pub const EBADSLT: ::c_int = 107; -pub const EMULTIHOP: ::c_int = 87; -pub const EOVERFLOW: ::c_int = 92; -pub const ENOTUNIQ: ::c_int = 115; -pub const EBADFD: ::c_int = 93; -pub const EBADMSG: ::c_int = 76; -pub const EREMCHG: ::c_int = 89; -pub const ELIBACC: ::c_int = 114; -pub const ELIBBAD: ::c_int = 112; -pub const ELIBSCN: ::c_int = 124; -pub const ELIBMAX: ::c_int = 123; -pub const ELIBEXEC: ::c_int = 110; -pub const EILSEQ: ::c_int = 122; -pub const ERESTART: ::c_int = 116; -pub const ESTRPIPE: ::c_int = 91; -pub const EUSERS: ::c_int = 68; -pub const ENOTSOCK: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 39; -pub const EMSGSIZE: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const EOPNOTSUPP: ::c_int = 45; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENETDOWN: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const EHOSTDOWN: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const EALREADY: ::c_int = 37; -pub const EINPROGRESS: ::c_int = 36; -pub const ESTALE: ::c_int = 70; -pub const EDQUOT: ::c_int = 69; -pub const ENOMEDIUM: ::c_int = 125; -pub const EMEDIUMTYPE: ::c_int = 126; -pub const ECANCELED: ::c_int = 127; -pub const ENOKEY: ::c_int = 128; -pub const EKEYEXPIRED: ::c_int = 129; -pub const EKEYREVOKED: ::c_int = 130; -pub const EKEYREJECTED: ::c_int = 131; -pub const EOWNERDEAD: ::c_int = 132; -pub const ENOTRECOVERABLE: ::c_int = 133; -pub const EHWPOISON: ::c_int = 135; -pub const ERFKILL: ::c_int = 134; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SA_SIGINFO: ::c_int = 0x200; -pub const SA_NOCLDWAIT: ::c_int = 0x100; - -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 20; -pub const SIGBUS: ::c_int = 10; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const SIGCONT: ::c_int = 19; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGURG: ::c_int = 16; -pub const SIGIO: ::c_int = 23; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 23; -pub const SIGPWR: ::c_int = 29; -pub const SIG_SETMASK: ::c_int = 4; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; - -pub const POLLWRNORM: ::c_short = 4; -pub const POLLWRBAND: ::c_short = 0x100; - -pub const O_ASYNC: ::c_int = 0x40; -pub const O_NDELAY: ::c_int = 0x4004; - -pub const EFD_NONBLOCK: ::c_int = 0x4000; - -pub const F_GETLK: ::c_int = 7; -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; - -pub const SFD_NONBLOCK: ::c_int = 0x4000; - -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; - -pub const O_DIRECTORY: ::c_int = 0o200000; -pub const O_NOFOLLOW: ::c_int = 0o400000; -pub const O_LARGEFILE: ::c_int = 0x40000; -pub const O_DIRECT: ::c_int = 0x100000; - -pub const MAP_LOCKED: ::c_int = 0x0100; -pub const MAP_NORESERVE: ::c_int = 0x00040; - -pub const EDEADLOCK: ::c_int = 108; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; - -pub const MCL_CURRENT: ::c_int = 0x2000; -pub const MCL_FUTURE: ::c_int = 0x4000; -pub const MCL_ONFAULT: ::c_int = 0x8000; - -pub const SIGSTKSZ: ::size_t = 16384; -pub const MINSIGSTKSZ: ::size_t = 4096; -pub const CBAUD: ::tcflag_t = 0x0000100f; -pub const TAB1: ::tcflag_t = 0x800; -pub const TAB2: ::tcflag_t = 0x1000; -pub const TAB3: ::tcflag_t = 0x1800; -pub const CR1: ::tcflag_t = 0x200; -pub const CR2: ::tcflag_t = 0x400; -pub const CR3: ::tcflag_t = 0x600; -pub const FF1: ::tcflag_t = 0x8000; -pub const BS1: ::tcflag_t = 0x2000; -pub const VT1: ::tcflag_t = 0x4000; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; + +pub const O_APPEND: c_int = 0x8; +pub const O_CREAT: c_int = 0x200; +pub const O_EXCL: c_int = 0x800; +pub const O_NOCTTY: c_int = 0x8000; +pub const O_NONBLOCK: c_int = 0x4000; +pub const O_SYNC: c_int = 0x802000; +pub const O_RSYNC: c_int = 0x802000; +pub const O_DSYNC: c_int = 0x2000; +pub const O_FSYNC: c_int = 0x802000; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0200; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLK: c_int = 78; +pub const ENAMETOOLONG: c_int = 63; +pub const ENOLCK: c_int = 79; +pub const ENOSYS: c_int = 90; +pub const ENOTEMPTY: c_int = 66; +pub const ELOOP: c_int = 62; +pub const ENOMSG: c_int = 75; +pub const EIDRM: c_int = 77; +pub const ECHRNG: c_int = 94; +pub const EL2NSYNC: c_int = 95; +pub const EL3HLT: c_int = 96; +pub const EL3RST: c_int = 97; +pub const ELNRNG: c_int = 98; +pub const EUNATCH: c_int = 99; +pub const ENOCSI: c_int = 100; +pub const EL2HLT: c_int = 101; +pub const EBADE: c_int = 102; +pub const EBADR: c_int = 103; +pub const EXFULL: c_int = 104; +pub const ENOANO: c_int = 105; +pub const EBADRQC: c_int = 106; +pub const EBADSLT: c_int = 107; +pub const EMULTIHOP: c_int = 87; +pub const EOVERFLOW: c_int = 92; +pub const ENOTUNIQ: c_int = 115; +pub const EBADFD: c_int = 93; +pub const EBADMSG: c_int = 76; +pub const EREMCHG: c_int = 89; +pub const ELIBACC: c_int = 114; +pub const ELIBBAD: c_int = 112; +pub const ELIBSCN: c_int = 124; +pub const ELIBMAX: c_int = 123; +pub const ELIBEXEC: c_int = 110; +pub const EILSEQ: c_int = 122; +pub const ERESTART: c_int = 116; +pub const ESTRPIPE: c_int = 91; +pub const EUSERS: c_int = 68; +pub const ENOTSOCK: c_int = 38; +pub const EDESTADDRREQ: c_int = 39; +pub const EMSGSIZE: c_int = 40; +pub const EPROTOTYPE: c_int = 41; +pub const ENOPROTOOPT: c_int = 42; +pub const EPROTONOSUPPORT: c_int = 43; +pub const ESOCKTNOSUPPORT: c_int = 44; +pub const EOPNOTSUPP: c_int = 45; +pub const EPFNOSUPPORT: c_int = 46; +pub const EAFNOSUPPORT: c_int = 47; +pub const EADDRINUSE: c_int = 48; +pub const EADDRNOTAVAIL: c_int = 49; +pub const ENETDOWN: c_int = 50; +pub const ENETUNREACH: c_int = 51; +pub const ENETRESET: c_int = 52; +pub const ECONNABORTED: c_int = 53; +pub const ECONNRESET: c_int = 54; +pub const ENOBUFS: c_int = 55; +pub const EISCONN: c_int = 56; +pub const ENOTCONN: c_int = 57; +pub const ESHUTDOWN: c_int = 58; +pub const ETOOMANYREFS: c_int = 59; +pub const ETIMEDOUT: c_int = 60; +pub const ECONNREFUSED: c_int = 61; +pub const EHOSTDOWN: c_int = 64; +pub const EHOSTUNREACH: c_int = 65; +pub const EALREADY: c_int = 37; +pub const EINPROGRESS: c_int = 36; +pub const ESTALE: c_int = 70; +pub const EDQUOT: c_int = 69; +pub const ENOMEDIUM: c_int = 125; +pub const EMEDIUMTYPE: c_int = 126; +pub const ECANCELED: c_int = 127; +pub const ENOKEY: c_int = 128; +pub const EKEYEXPIRED: c_int = 129; +pub const EKEYREVOKED: c_int = 130; +pub const EKEYREJECTED: c_int = 131; +pub const EOWNERDEAD: c_int = 132; +pub const ENOTRECOVERABLE: c_int = 133; +pub const EHWPOISON: c_int = 135; +pub const ERFKILL: c_int = 134; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SA_SIGINFO: c_int = 0x200; +pub const SA_NOCLDWAIT: c_int = 0x100; + +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 20; +pub const SIGBUS: c_int = 10; +pub const SIGUSR1: c_int = 30; +pub const SIGUSR2: c_int = 31; +pub const SIGCONT: c_int = 19; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGURG: c_int = 16; +pub const SIGIO: c_int = 23; +pub const SIGSYS: c_int = 12; +pub const SIGPOLL: c_int = 23; +pub const SIGPWR: c_int = 29; +pub const SIG_SETMASK: c_int = 4; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; + +pub const POLLWRNORM: c_short = 4; +pub const POLLWRBAND: c_short = 0x100; + +pub const O_ASYNC: c_int = 0x40; +pub const O_NDELAY: c_int = 0x4004; + +pub const EFD_NONBLOCK: c_int = 0x4000; + +pub const F_GETLK: c_int = 7; +pub const F_GETOWN: c_int = 5; +pub const F_SETOWN: c_int = 6; + +pub const SFD_NONBLOCK: c_int = 0x4000; + +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; + +pub const O_DIRECTORY: c_int = 0o200000; +pub const O_NOFOLLOW: c_int = 0o400000; +pub const O_LARGEFILE: c_int = 0x40000; +pub const O_DIRECT: c_int = 0x100000; + +pub const MAP_LOCKED: c_int = 0x0100; +pub const MAP_NORESERVE: c_int = 0x00040; + +pub const EDEADLOCK: c_int = 108; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; + +pub const MCL_CURRENT: c_int = 0x2000; +pub const MCL_FUTURE: c_int = 0x4000; +pub const MCL_ONFAULT: c_int = 0x8000; + +pub const SIGSTKSZ: size_t = 16384; +pub const MINSIGSTKSZ: size_t = 4096; +pub const CBAUD: crate::tcflag_t = 0x0000100f; +pub const TAB1: crate::tcflag_t = 0x800; +pub const TAB2: crate::tcflag_t = 0x1000; +pub const TAB3: crate::tcflag_t = 0x1800; +pub const CR1: crate::tcflag_t = 0x200; +pub const CR2: crate::tcflag_t = 0x400; +pub const CR3: crate::tcflag_t = 0x600; +pub const FF1: crate::tcflag_t = 0x8000; +pub const BS1: crate::tcflag_t = 0x2000; +pub const VT1: crate::tcflag_t = 0x4000; pub const VWERASE: usize = 0xe; pub const VREPRINT: usize = 0xc; pub const VSUSP: usize = 0xa; @@ -356,467 +360,467 @@ pub const VSTART: usize = 0x8; pub const VSTOP: usize = 0x9; pub const VDISCARD: usize = 0xd; pub const VTIME: usize = 0x5; -pub const IXON: ::tcflag_t = 0x400; -pub const IXOFF: ::tcflag_t = 0x1000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x30; -pub const CS6: ::tcflag_t = 0x10; -pub const CS7: ::tcflag_t = 0x20; -pub const CS8: ::tcflag_t = 0x30; -pub const CSTOPB: ::tcflag_t = 0x40; -pub const CREAD: ::tcflag_t = 0x80; -pub const PARENB: ::tcflag_t = 0x100; -pub const PARODD: ::tcflag_t = 0x200; -pub const HUPCL: ::tcflag_t = 0x400; -pub const CLOCAL: ::tcflag_t = 0x800; -pub const ECHOKE: ::tcflag_t = 0x800; -pub const ECHOE: ::tcflag_t = 0x10; -pub const ECHOK: ::tcflag_t = 0x20; -pub const ECHONL: ::tcflag_t = 0x40; -pub const ECHOPRT: ::tcflag_t = 0x400; -pub const ECHOCTL: ::tcflag_t = 0x200; -pub const ISIG: ::tcflag_t = 0x1; -pub const ICANON: ::tcflag_t = 0x2; -pub const PENDIN: ::tcflag_t = 0x4000; -pub const NOFLSH: ::tcflag_t = 0x80; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0x00001000; +pub const IXON: crate::tcflag_t = 0x400; +pub const IXOFF: crate::tcflag_t = 0x1000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x30; +pub const CS6: crate::tcflag_t = 0x10; +pub const CS7: crate::tcflag_t = 0x20; +pub const CS8: crate::tcflag_t = 0x30; +pub const CSTOPB: crate::tcflag_t = 0x40; +pub const CREAD: crate::tcflag_t = 0x80; +pub const PARENB: crate::tcflag_t = 0x100; +pub const PARODD: crate::tcflag_t = 0x200; +pub const HUPCL: crate::tcflag_t = 0x400; +pub const CLOCAL: crate::tcflag_t = 0x800; +pub const ECHOKE: crate::tcflag_t = 0x800; +pub const ECHOE: crate::tcflag_t = 0x10; +pub const ECHOK: crate::tcflag_t = 0x20; +pub const ECHONL: crate::tcflag_t = 0x40; +pub const ECHOPRT: crate::tcflag_t = 0x400; +pub const ECHOCTL: crate::tcflag_t = 0x200; +pub const ISIG: crate::tcflag_t = 0x1; +pub const ICANON: crate::tcflag_t = 0x2; +pub const PENDIN: crate::tcflag_t = 0x4000; +pub const NOFLSH: crate::tcflag_t = 0x80; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0x00001000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0x1001; -pub const B115200: ::speed_t = 0x1002; -pub const B230400: ::speed_t = 0x1003; -pub const B460800: ::speed_t = 0x1004; -pub const B76800: ::speed_t = 0x1005; -pub const B153600: ::speed_t = 0x1006; -pub const B307200: ::speed_t = 0x1007; -pub const B614400: ::speed_t = 0x1008; -pub const B921600: ::speed_t = 0x1009; -pub const B500000: ::speed_t = 0x100a; -pub const B576000: ::speed_t = 0x100b; -pub const B1000000: ::speed_t = 0x100c; -pub const B1152000: ::speed_t = 0x100d; -pub const B1500000: ::speed_t = 0x100e; -pub const B2000000: ::speed_t = 0x100f; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0x1001; +pub const B115200: crate::speed_t = 0x1002; +pub const B230400: crate::speed_t = 0x1003; +pub const B460800: crate::speed_t = 0x1004; +pub const B76800: crate::speed_t = 0x1005; +pub const B153600: crate::speed_t = 0x1006; +pub const B307200: crate::speed_t = 0x1007; +pub const B614400: crate::speed_t = 0x1008; +pub const B921600: crate::speed_t = 0x1009; +pub const B500000: crate::speed_t = 0x100a; +pub const B576000: crate::speed_t = 0x100b; +pub const B1000000: crate::speed_t = 0x100c; +pub const B1152000: crate::speed_t = 0x100d; +pub const B1500000: crate::speed_t = 0x100e; +pub const B2000000: crate::speed_t = 0x100f; pub const VEOL: usize = 5; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x8000; -pub const TOSTOP: ::tcflag_t = 0x100; -pub const FLUSHO: ::tcflag_t = 0x1000; -pub const EXTPROC: ::tcflag_t = 0x10000; - -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_wait4: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execv: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_chown: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_brk: ::c_long = 17; -pub const SYS_perfctr: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_capget: ::c_long = 21; -pub const SYS_capset: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_vmsplice: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_sigaltstack: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_lchown32: ::c_long = 31; -pub const SYS_fchown32: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_chown32: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_stat: ::c_long = 38; -pub const SYS_sendfile: ::c_long = 39; -pub const SYS_lstat: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_getuid32: ::c_long = 44; -pub const SYS_umount2: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_getgid32: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_reboot: ::c_long = 55; -pub const SYS_mmap2: ::c_long = 56; -pub const SYS_symlink: ::c_long = 57; -pub const SYS_readlink: ::c_long = 58; -pub const SYS_execve: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_fstat: ::c_long = 62; -pub const SYS_fstat64: ::c_long = 63; -pub const SYS_getpagesize: ::c_long = 64; -pub const SYS_msync: ::c_long = 65; -pub const SYS_vfork: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_geteuid32: ::c_long = 69; -pub const SYS_getegid32: ::c_long = 70; -pub const SYS_mmap: ::c_long = 71; -pub const SYS_setreuid32: ::c_long = 72; -pub const SYS_munmap: ::c_long = 73; -pub const SYS_mprotect: ::c_long = 74; -pub const SYS_madvise: ::c_long = 75; -pub const SYS_vhangup: ::c_long = 76; -pub const SYS_truncate64: ::c_long = 77; -pub const SYS_mincore: ::c_long = 78; -pub const SYS_getgroups: ::c_long = 79; -pub const SYS_setgroups: ::c_long = 80; -pub const SYS_getpgrp: ::c_long = 81; -pub const SYS_setgroups32: ::c_long = 82; -pub const SYS_setitimer: ::c_long = 83; -pub const SYS_ftruncate64: ::c_long = 84; -pub const SYS_swapon: ::c_long = 85; -pub const SYS_getitimer: ::c_long = 86; -pub const SYS_setuid32: ::c_long = 87; -pub const SYS_sethostname: ::c_long = 88; -pub const SYS_setgid32: ::c_long = 89; -pub const SYS_dup2: ::c_long = 90; -pub const SYS_setfsuid32: ::c_long = 91; -pub const SYS_fcntl: ::c_long = 92; -pub const SYS_select: ::c_long = 93; -pub const SYS_setfsgid32: ::c_long = 94; -pub const SYS_fsync: ::c_long = 95; -pub const SYS_setpriority: ::c_long = 96; -pub const SYS_socket: ::c_long = 97; -pub const SYS_connect: ::c_long = 98; -pub const SYS_accept: ::c_long = 99; -pub const SYS_getpriority: ::c_long = 100; -pub const SYS_rt_sigreturn: ::c_long = 101; -pub const SYS_rt_sigaction: ::c_long = 102; -pub const SYS_rt_sigprocmask: ::c_long = 103; -pub const SYS_rt_sigpending: ::c_long = 104; -pub const SYS_rt_sigtimedwait: ::c_long = 105; -pub const SYS_rt_sigqueueinfo: ::c_long = 106; -pub const SYS_rt_sigsuspend: ::c_long = 107; -pub const SYS_setresuid32: ::c_long = 108; -pub const SYS_getresuid32: ::c_long = 109; -pub const SYS_setresgid32: ::c_long = 110; -pub const SYS_getresgid32: ::c_long = 111; -pub const SYS_setregid32: ::c_long = 112; -pub const SYS_recvmsg: ::c_long = 113; -pub const SYS_sendmsg: ::c_long = 114; -pub const SYS_getgroups32: ::c_long = 115; -pub const SYS_gettimeofday: ::c_long = 116; -pub const SYS_getrusage: ::c_long = 117; -pub const SYS_getsockopt: ::c_long = 118; -pub const SYS_getcwd: ::c_long = 119; -pub const SYS_readv: ::c_long = 120; -pub const SYS_writev: ::c_long = 121; -pub const SYS_settimeofday: ::c_long = 122; -pub const SYS_fchown: ::c_long = 123; -pub const SYS_fchmod: ::c_long = 124; -pub const SYS_recvfrom: ::c_long = 125; -pub const SYS_setreuid: ::c_long = 126; -pub const SYS_setregid: ::c_long = 127; -pub const SYS_rename: ::c_long = 128; -pub const SYS_truncate: ::c_long = 129; -pub const SYS_ftruncate: ::c_long = 130; -pub const SYS_flock: ::c_long = 131; -pub const SYS_lstat64: ::c_long = 132; -pub const SYS_sendto: ::c_long = 133; -pub const SYS_shutdown: ::c_long = 134; -pub const SYS_socketpair: ::c_long = 135; -pub const SYS_mkdir: ::c_long = 136; -pub const SYS_rmdir: ::c_long = 137; -pub const SYS_utimes: ::c_long = 138; -pub const SYS_stat64: ::c_long = 139; -pub const SYS_sendfile64: ::c_long = 140; -pub const SYS_getpeername: ::c_long = 141; -pub const SYS_futex: ::c_long = 142; -pub const SYS_gettid: ::c_long = 143; -pub const SYS_getrlimit: ::c_long = 144; -pub const SYS_setrlimit: ::c_long = 145; -pub const SYS_pivot_root: ::c_long = 146; -pub const SYS_prctl: ::c_long = 147; -pub const SYS_pciconfig_read: ::c_long = 148; -pub const SYS_pciconfig_write: ::c_long = 149; -pub const SYS_getsockname: ::c_long = 150; -pub const SYS_inotify_init: ::c_long = 151; -pub const SYS_inotify_add_watch: ::c_long = 152; -pub const SYS_poll: ::c_long = 153; -pub const SYS_getdents64: ::c_long = 154; -pub const SYS_fcntl64: ::c_long = 155; -pub const SYS_inotify_rm_watch: ::c_long = 156; -pub const SYS_statfs: ::c_long = 157; -pub const SYS_fstatfs: ::c_long = 158; -pub const SYS_umount: ::c_long = 159; -pub const SYS_sched_set_affinity: ::c_long = 160; -pub const SYS_sched_get_affinity: ::c_long = 161; -pub const SYS_getdomainname: ::c_long = 162; -pub const SYS_setdomainname: ::c_long = 163; -pub const SYS_quotactl: ::c_long = 165; -pub const SYS_set_tid_address: ::c_long = 166; -pub const SYS_mount: ::c_long = 167; -pub const SYS_ustat: ::c_long = 168; -pub const SYS_setxattr: ::c_long = 169; -pub const SYS_lsetxattr: ::c_long = 170; -pub const SYS_fsetxattr: ::c_long = 171; -pub const SYS_getxattr: ::c_long = 172; -pub const SYS_lgetxattr: ::c_long = 173; -pub const SYS_getdents: ::c_long = 174; -pub const SYS_setsid: ::c_long = 175; -pub const SYS_fchdir: ::c_long = 176; -pub const SYS_fgetxattr: ::c_long = 177; -pub const SYS_listxattr: ::c_long = 178; -pub const SYS_llistxattr: ::c_long = 179; -pub const SYS_flistxattr: ::c_long = 180; -pub const SYS_removexattr: ::c_long = 181; -pub const SYS_lremovexattr: ::c_long = 182; -pub const SYS_sigpending: ::c_long = 183; -pub const SYS_query_module: ::c_long = 184; -pub const SYS_setpgid: ::c_long = 185; -pub const SYS_fremovexattr: ::c_long = 186; -pub const SYS_tkill: ::c_long = 187; -pub const SYS_exit_group: ::c_long = 188; -pub const SYS_uname: ::c_long = 189; -pub const SYS_init_module: ::c_long = 190; -pub const SYS_personality: ::c_long = 191; -pub const SYS_remap_file_pages: ::c_long = 192; -pub const SYS_epoll_create: ::c_long = 193; -pub const SYS_epoll_ctl: ::c_long = 194; -pub const SYS_epoll_wait: ::c_long = 195; -pub const SYS_ioprio_set: ::c_long = 196; -pub const SYS_getppid: ::c_long = 197; -pub const SYS_sigaction: ::c_long = 198; -pub const SYS_sgetmask: ::c_long = 199; -pub const SYS_ssetmask: ::c_long = 200; -pub const SYS_sigsuspend: ::c_long = 201; -pub const SYS_oldlstat: ::c_long = 202; -pub const SYS_uselib: ::c_long = 203; -pub const SYS_readdir: ::c_long = 204; -pub const SYS_readahead: ::c_long = 205; -pub const SYS_socketcall: ::c_long = 206; -pub const SYS_syslog: ::c_long = 207; -pub const SYS_lookup_dcookie: ::c_long = 208; -pub const SYS_fadvise64: ::c_long = 209; -pub const SYS_fadvise64_64: ::c_long = 210; -pub const SYS_tgkill: ::c_long = 211; -pub const SYS_waitpid: ::c_long = 212; -pub const SYS_swapoff: ::c_long = 213; -pub const SYS_sysinfo: ::c_long = 214; -pub const SYS_ipc: ::c_long = 215; -pub const SYS_sigreturn: ::c_long = 216; -pub const SYS_clone: ::c_long = 217; -pub const SYS_ioprio_get: ::c_long = 218; -pub const SYS_adjtimex: ::c_long = 219; -pub const SYS_sigprocmask: ::c_long = 220; -pub const SYS_create_module: ::c_long = 221; -pub const SYS_delete_module: ::c_long = 222; -pub const SYS_get_kernel_syms: ::c_long = 223; -pub const SYS_getpgid: ::c_long = 224; -pub const SYS_bdflush: ::c_long = 225; -pub const SYS_sysfs: ::c_long = 226; -pub const SYS_afs_syscall: ::c_long = 227; -pub const SYS_setfsuid: ::c_long = 228; -pub const SYS_setfsgid: ::c_long = 229; -pub const SYS__newselect: ::c_long = 230; -pub const SYS_time: ::c_long = 231; -pub const SYS_splice: ::c_long = 232; -pub const SYS_stime: ::c_long = 233; -pub const SYS_statfs64: ::c_long = 234; -pub const SYS_fstatfs64: ::c_long = 235; -pub const SYS__llseek: ::c_long = 236; -pub const SYS_mlock: ::c_long = 237; -pub const SYS_munlock: ::c_long = 238; -pub const SYS_mlockall: ::c_long = 239; -pub const SYS_munlockall: ::c_long = 240; -pub const SYS_sched_setparam: ::c_long = 241; -pub const SYS_sched_getparam: ::c_long = 242; -pub const SYS_sched_setscheduler: ::c_long = 243; -pub const SYS_sched_getscheduler: ::c_long = 244; -pub const SYS_sched_yield: ::c_long = 245; -pub const SYS_sched_get_priority_max: ::c_long = 246; -pub const SYS_sched_get_priority_min: ::c_long = 247; -pub const SYS_sched_rr_get_interval: ::c_long = 248; -pub const SYS_nanosleep: ::c_long = 249; -pub const SYS_mremap: ::c_long = 250; -pub const SYS__sysctl: ::c_long = 251; -pub const SYS_getsid: ::c_long = 252; -pub const SYS_fdatasync: ::c_long = 253; -pub const SYS_nfsservctl: ::c_long = 254; -pub const SYS_sync_file_range: ::c_long = 255; -pub const SYS_clock_settime: ::c_long = 256; -pub const SYS_clock_gettime: ::c_long = 257; -pub const SYS_clock_getres: ::c_long = 258; -pub const SYS_clock_nanosleep: ::c_long = 259; -pub const SYS_sched_getaffinity: ::c_long = 260; -pub const SYS_sched_setaffinity: ::c_long = 261; -pub const SYS_timer_settime: ::c_long = 262; -pub const SYS_timer_gettime: ::c_long = 263; -pub const SYS_timer_getoverrun: ::c_long = 264; -pub const SYS_timer_delete: ::c_long = 265; -pub const SYS_timer_create: ::c_long = 266; -pub const SYS_io_setup: ::c_long = 268; -pub const SYS_io_destroy: ::c_long = 269; -pub const SYS_io_submit: ::c_long = 270; -pub const SYS_io_cancel: ::c_long = 271; -pub const SYS_io_getevents: ::c_long = 272; -pub const SYS_mq_open: ::c_long = 273; -pub const SYS_mq_unlink: ::c_long = 274; -pub const SYS_mq_timedsend: ::c_long = 275; -pub const SYS_mq_timedreceive: ::c_long = 276; -pub const SYS_mq_notify: ::c_long = 277; -pub const SYS_mq_getsetattr: ::c_long = 278; -pub const SYS_waitid: ::c_long = 279; -pub const SYS_tee: ::c_long = 280; -pub const SYS_add_key: ::c_long = 281; -pub const SYS_request_key: ::c_long = 282; -pub const SYS_keyctl: ::c_long = 283; -pub const SYS_openat: ::c_long = 284; -pub const SYS_mkdirat: ::c_long = 285; -pub const SYS_mknodat: ::c_long = 286; -pub const SYS_fchownat: ::c_long = 287; -pub const SYS_futimesat: ::c_long = 288; -pub const SYS_fstatat64: ::c_long = 289; -pub const SYS_unlinkat: ::c_long = 290; -pub const SYS_renameat: ::c_long = 291; -pub const SYS_linkat: ::c_long = 292; -pub const SYS_symlinkat: ::c_long = 293; -pub const SYS_readlinkat: ::c_long = 294; -pub const SYS_fchmodat: ::c_long = 295; -pub const SYS_faccessat: ::c_long = 296; -pub const SYS_pselect6: ::c_long = 297; -pub const SYS_ppoll: ::c_long = 298; -pub const SYS_unshare: ::c_long = 299; -pub const SYS_set_robust_list: ::c_long = 300; -pub const SYS_get_robust_list: ::c_long = 301; -pub const SYS_migrate_pages: ::c_long = 302; -pub const SYS_mbind: ::c_long = 303; -pub const SYS_get_mempolicy: ::c_long = 304; -pub const SYS_set_mempolicy: ::c_long = 305; -pub const SYS_kexec_load: ::c_long = 306; -pub const SYS_move_pages: ::c_long = 307; -pub const SYS_getcpu: ::c_long = 308; -pub const SYS_epoll_pwait: ::c_long = 309; -pub const SYS_utimensat: ::c_long = 310; -pub const SYS_signalfd: ::c_long = 311; -pub const SYS_timerfd_create: ::c_long = 312; -pub const SYS_eventfd: ::c_long = 313; -pub const SYS_fallocate: ::c_long = 314; -pub const SYS_timerfd_settime: ::c_long = 315; -pub const SYS_timerfd_gettime: ::c_long = 316; -pub const SYS_signalfd4: ::c_long = 317; -pub const SYS_eventfd2: ::c_long = 318; -pub const SYS_epoll_create1: ::c_long = 319; -pub const SYS_dup3: ::c_long = 320; -pub const SYS_pipe2: ::c_long = 321; -pub const SYS_inotify_init1: ::c_long = 322; -pub const SYS_accept4: ::c_long = 323; -pub const SYS_preadv: ::c_long = 324; -pub const SYS_pwritev: ::c_long = 325; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 326; -pub const SYS_perf_event_open: ::c_long = 327; -pub const SYS_recvmmsg: ::c_long = 328; -pub const SYS_fanotify_init: ::c_long = 329; -pub const SYS_fanotify_mark: ::c_long = 330; -pub const SYS_prlimit64: ::c_long = 331; -pub const SYS_name_to_handle_at: ::c_long = 332; -pub const SYS_open_by_handle_at: ::c_long = 333; -pub const SYS_clock_adjtime: ::c_long = 334; -pub const SYS_syncfs: ::c_long = 335; -pub const SYS_sendmmsg: ::c_long = 336; -pub const SYS_setns: ::c_long = 337; -pub const SYS_process_vm_readv: ::c_long = 338; -pub const SYS_process_vm_writev: ::c_long = 339; -pub const SYS_kern_features: ::c_long = 340; -pub const SYS_kcmp: ::c_long = 341; -pub const SYS_finit_module: ::c_long = 342; -pub const SYS_sched_setattr: ::c_long = 343; -pub const SYS_sched_getattr: ::c_long = 344; -pub const SYS_renameat2: ::c_long = 345; -pub const SYS_seccomp: ::c_long = 346; -pub const SYS_getrandom: ::c_long = 347; -pub const SYS_memfd_create: ::c_long = 348; -pub const SYS_bpf: ::c_long = 349; -pub const SYS_execveat: ::c_long = 350; -pub const SYS_membarrier: ::c_long = 351; -pub const SYS_userfaultfd: ::c_long = 352; -pub const SYS_bind: ::c_long = 353; -pub const SYS_listen: ::c_long = 354; -pub const SYS_setsockopt: ::c_long = 355; -pub const SYS_mlock2: ::c_long = 356; -pub const SYS_copy_file_range: ::c_long = 357; -pub const SYS_preadv2: ::c_long = 358; -pub const SYS_pwritev2: ::c_long = 359; -pub const SYS_statx: ::c_long = 360; -pub const SYS_rseq: ::c_long = 365; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; +pub const IEXTEN: crate::tcflag_t = 0x8000; +pub const TOSTOP: crate::tcflag_t = 0x100; +pub const FLUSHO: crate::tcflag_t = 0x1000; +pub const EXTPROC: crate::tcflag_t = 0x10000; + +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_wait4: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execv: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_chown: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_brk: c_long = 17; +pub const SYS_perfctr: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_capget: c_long = 21; +pub const SYS_capset: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_vmsplice: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_sigaltstack: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_lchown32: c_long = 31; +pub const SYS_fchown32: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_chown32: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_stat: c_long = 38; +pub const SYS_sendfile: c_long = 39; +pub const SYS_lstat: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_getuid32: c_long = 44; +pub const SYS_umount2: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_getgid32: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_reboot: c_long = 55; +pub const SYS_mmap2: c_long = 56; +pub const SYS_symlink: c_long = 57; +pub const SYS_readlink: c_long = 58; +pub const SYS_execve: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_fstat: c_long = 62; +pub const SYS_fstat64: c_long = 63; +pub const SYS_getpagesize: c_long = 64; +pub const SYS_msync: c_long = 65; +pub const SYS_vfork: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_geteuid32: c_long = 69; +pub const SYS_getegid32: c_long = 70; +pub const SYS_mmap: c_long = 71; +pub const SYS_setreuid32: c_long = 72; +pub const SYS_munmap: c_long = 73; +pub const SYS_mprotect: c_long = 74; +pub const SYS_madvise: c_long = 75; +pub const SYS_vhangup: c_long = 76; +pub const SYS_truncate64: c_long = 77; +pub const SYS_mincore: c_long = 78; +pub const SYS_getgroups: c_long = 79; +pub const SYS_setgroups: c_long = 80; +pub const SYS_getpgrp: c_long = 81; +pub const SYS_setgroups32: c_long = 82; +pub const SYS_setitimer: c_long = 83; +pub const SYS_ftruncate64: c_long = 84; +pub const SYS_swapon: c_long = 85; +pub const SYS_getitimer: c_long = 86; +pub const SYS_setuid32: c_long = 87; +pub const SYS_sethostname: c_long = 88; +pub const SYS_setgid32: c_long = 89; +pub const SYS_dup2: c_long = 90; +pub const SYS_setfsuid32: c_long = 91; +pub const SYS_fcntl: c_long = 92; +pub const SYS_select: c_long = 93; +pub const SYS_setfsgid32: c_long = 94; +pub const SYS_fsync: c_long = 95; +pub const SYS_setpriority: c_long = 96; +pub const SYS_socket: c_long = 97; +pub const SYS_connect: c_long = 98; +pub const SYS_accept: c_long = 99; +pub const SYS_getpriority: c_long = 100; +pub const SYS_rt_sigreturn: c_long = 101; +pub const SYS_rt_sigaction: c_long = 102; +pub const SYS_rt_sigprocmask: c_long = 103; +pub const SYS_rt_sigpending: c_long = 104; +pub const SYS_rt_sigtimedwait: c_long = 105; +pub const SYS_rt_sigqueueinfo: c_long = 106; +pub const SYS_rt_sigsuspend: c_long = 107; +pub const SYS_setresuid32: c_long = 108; +pub const SYS_getresuid32: c_long = 109; +pub const SYS_setresgid32: c_long = 110; +pub const SYS_getresgid32: c_long = 111; +pub const SYS_setregid32: c_long = 112; +pub const SYS_recvmsg: c_long = 113; +pub const SYS_sendmsg: c_long = 114; +pub const SYS_getgroups32: c_long = 115; +pub const SYS_gettimeofday: c_long = 116; +pub const SYS_getrusage: c_long = 117; +pub const SYS_getsockopt: c_long = 118; +pub const SYS_getcwd: c_long = 119; +pub const SYS_readv: c_long = 120; +pub const SYS_writev: c_long = 121; +pub const SYS_settimeofday: c_long = 122; +pub const SYS_fchown: c_long = 123; +pub const SYS_fchmod: c_long = 124; +pub const SYS_recvfrom: c_long = 125; +pub const SYS_setreuid: c_long = 126; +pub const SYS_setregid: c_long = 127; +pub const SYS_rename: c_long = 128; +pub const SYS_truncate: c_long = 129; +pub const SYS_ftruncate: c_long = 130; +pub const SYS_flock: c_long = 131; +pub const SYS_lstat64: c_long = 132; +pub const SYS_sendto: c_long = 133; +pub const SYS_shutdown: c_long = 134; +pub const SYS_socketpair: c_long = 135; +pub const SYS_mkdir: c_long = 136; +pub const SYS_rmdir: c_long = 137; +pub const SYS_utimes: c_long = 138; +pub const SYS_stat64: c_long = 139; +pub const SYS_sendfile64: c_long = 140; +pub const SYS_getpeername: c_long = 141; +pub const SYS_futex: c_long = 142; +pub const SYS_gettid: c_long = 143; +pub const SYS_getrlimit: c_long = 144; +pub const SYS_setrlimit: c_long = 145; +pub const SYS_pivot_root: c_long = 146; +pub const SYS_prctl: c_long = 147; +pub const SYS_pciconfig_read: c_long = 148; +pub const SYS_pciconfig_write: c_long = 149; +pub const SYS_getsockname: c_long = 150; +pub const SYS_inotify_init: c_long = 151; +pub const SYS_inotify_add_watch: c_long = 152; +pub const SYS_poll: c_long = 153; +pub const SYS_getdents64: c_long = 154; +pub const SYS_fcntl64: c_long = 155; +pub const SYS_inotify_rm_watch: c_long = 156; +pub const SYS_statfs: c_long = 157; +pub const SYS_fstatfs: c_long = 158; +pub const SYS_umount: c_long = 159; +pub const SYS_sched_set_affinity: c_long = 160; +pub const SYS_sched_get_affinity: c_long = 161; +pub const SYS_getdomainname: c_long = 162; +pub const SYS_setdomainname: c_long = 163; +pub const SYS_quotactl: c_long = 165; +pub const SYS_set_tid_address: c_long = 166; +pub const SYS_mount: c_long = 167; +pub const SYS_ustat: c_long = 168; +pub const SYS_setxattr: c_long = 169; +pub const SYS_lsetxattr: c_long = 170; +pub const SYS_fsetxattr: c_long = 171; +pub const SYS_getxattr: c_long = 172; +pub const SYS_lgetxattr: c_long = 173; +pub const SYS_getdents: c_long = 174; +pub const SYS_setsid: c_long = 175; +pub const SYS_fchdir: c_long = 176; +pub const SYS_fgetxattr: c_long = 177; +pub const SYS_listxattr: c_long = 178; +pub const SYS_llistxattr: c_long = 179; +pub const SYS_flistxattr: c_long = 180; +pub const SYS_removexattr: c_long = 181; +pub const SYS_lremovexattr: c_long = 182; +pub const SYS_sigpending: c_long = 183; +pub const SYS_query_module: c_long = 184; +pub const SYS_setpgid: c_long = 185; +pub const SYS_fremovexattr: c_long = 186; +pub const SYS_tkill: c_long = 187; +pub const SYS_exit_group: c_long = 188; +pub const SYS_uname: c_long = 189; +pub const SYS_init_module: c_long = 190; +pub const SYS_personality: c_long = 191; +pub const SYS_remap_file_pages: c_long = 192; +pub const SYS_epoll_create: c_long = 193; +pub const SYS_epoll_ctl: c_long = 194; +pub const SYS_epoll_wait: c_long = 195; +pub const SYS_ioprio_set: c_long = 196; +pub const SYS_getppid: c_long = 197; +pub const SYS_sigaction: c_long = 198; +pub const SYS_sgetmask: c_long = 199; +pub const SYS_ssetmask: c_long = 200; +pub const SYS_sigsuspend: c_long = 201; +pub const SYS_oldlstat: c_long = 202; +pub const SYS_uselib: c_long = 203; +pub const SYS_readdir: c_long = 204; +pub const SYS_readahead: c_long = 205; +pub const SYS_socketcall: c_long = 206; +pub const SYS_syslog: c_long = 207; +pub const SYS_lookup_dcookie: c_long = 208; +pub const SYS_fadvise64: c_long = 209; +pub const SYS_fadvise64_64: c_long = 210; +pub const SYS_tgkill: c_long = 211; +pub const SYS_waitpid: c_long = 212; +pub const SYS_swapoff: c_long = 213; +pub const SYS_sysinfo: c_long = 214; +pub const SYS_ipc: c_long = 215; +pub const SYS_sigreturn: c_long = 216; +pub const SYS_clone: c_long = 217; +pub const SYS_ioprio_get: c_long = 218; +pub const SYS_adjtimex: c_long = 219; +pub const SYS_sigprocmask: c_long = 220; +pub const SYS_create_module: c_long = 221; +pub const SYS_delete_module: c_long = 222; +pub const SYS_get_kernel_syms: c_long = 223; +pub const SYS_getpgid: c_long = 224; +pub const SYS_bdflush: c_long = 225; +pub const SYS_sysfs: c_long = 226; +pub const SYS_afs_syscall: c_long = 227; +pub const SYS_setfsuid: c_long = 228; +pub const SYS_setfsgid: c_long = 229; +pub const SYS__newselect: c_long = 230; +pub const SYS_time: c_long = 231; +pub const SYS_splice: c_long = 232; +pub const SYS_stime: c_long = 233; +pub const SYS_statfs64: c_long = 234; +pub const SYS_fstatfs64: c_long = 235; +pub const SYS__llseek: c_long = 236; +pub const SYS_mlock: c_long = 237; +pub const SYS_munlock: c_long = 238; +pub const SYS_mlockall: c_long = 239; +pub const SYS_munlockall: c_long = 240; +pub const SYS_sched_setparam: c_long = 241; +pub const SYS_sched_getparam: c_long = 242; +pub const SYS_sched_setscheduler: c_long = 243; +pub const SYS_sched_getscheduler: c_long = 244; +pub const SYS_sched_yield: c_long = 245; +pub const SYS_sched_get_priority_max: c_long = 246; +pub const SYS_sched_get_priority_min: c_long = 247; +pub const SYS_sched_rr_get_interval: c_long = 248; +pub const SYS_nanosleep: c_long = 249; +pub const SYS_mremap: c_long = 250; +pub const SYS__sysctl: c_long = 251; +pub const SYS_getsid: c_long = 252; +pub const SYS_fdatasync: c_long = 253; +pub const SYS_nfsservctl: c_long = 254; +pub const SYS_sync_file_range: c_long = 255; +pub const SYS_clock_settime: c_long = 256; +pub const SYS_clock_gettime: c_long = 257; +pub const SYS_clock_getres: c_long = 258; +pub const SYS_clock_nanosleep: c_long = 259; +pub const SYS_sched_getaffinity: c_long = 260; +pub const SYS_sched_setaffinity: c_long = 261; +pub const SYS_timer_settime: c_long = 262; +pub const SYS_timer_gettime: c_long = 263; +pub const SYS_timer_getoverrun: c_long = 264; +pub const SYS_timer_delete: c_long = 265; +pub const SYS_timer_create: c_long = 266; +pub const SYS_io_setup: c_long = 268; +pub const SYS_io_destroy: c_long = 269; +pub const SYS_io_submit: c_long = 270; +pub const SYS_io_cancel: c_long = 271; +pub const SYS_io_getevents: c_long = 272; +pub const SYS_mq_open: c_long = 273; +pub const SYS_mq_unlink: c_long = 274; +pub const SYS_mq_timedsend: c_long = 275; +pub const SYS_mq_timedreceive: c_long = 276; +pub const SYS_mq_notify: c_long = 277; +pub const SYS_mq_getsetattr: c_long = 278; +pub const SYS_waitid: c_long = 279; +pub const SYS_tee: c_long = 280; +pub const SYS_add_key: c_long = 281; +pub const SYS_request_key: c_long = 282; +pub const SYS_keyctl: c_long = 283; +pub const SYS_openat: c_long = 284; +pub const SYS_mkdirat: c_long = 285; +pub const SYS_mknodat: c_long = 286; +pub const SYS_fchownat: c_long = 287; +pub const SYS_futimesat: c_long = 288; +pub const SYS_fstatat64: c_long = 289; +pub const SYS_unlinkat: c_long = 290; +pub const SYS_renameat: c_long = 291; +pub const SYS_linkat: c_long = 292; +pub const SYS_symlinkat: c_long = 293; +pub const SYS_readlinkat: c_long = 294; +pub const SYS_fchmodat: c_long = 295; +pub const SYS_faccessat: c_long = 296; +pub const SYS_pselect6: c_long = 297; +pub const SYS_ppoll: c_long = 298; +pub const SYS_unshare: c_long = 299; +pub const SYS_set_robust_list: c_long = 300; +pub const SYS_get_robust_list: c_long = 301; +pub const SYS_migrate_pages: c_long = 302; +pub const SYS_mbind: c_long = 303; +pub const SYS_get_mempolicy: c_long = 304; +pub const SYS_set_mempolicy: c_long = 305; +pub const SYS_kexec_load: c_long = 306; +pub const SYS_move_pages: c_long = 307; +pub const SYS_getcpu: c_long = 308; +pub const SYS_epoll_pwait: c_long = 309; +pub const SYS_utimensat: c_long = 310; +pub const SYS_signalfd: c_long = 311; +pub const SYS_timerfd_create: c_long = 312; +pub const SYS_eventfd: c_long = 313; +pub const SYS_fallocate: c_long = 314; +pub const SYS_timerfd_settime: c_long = 315; +pub const SYS_timerfd_gettime: c_long = 316; +pub const SYS_signalfd4: c_long = 317; +pub const SYS_eventfd2: c_long = 318; +pub const SYS_epoll_create1: c_long = 319; +pub const SYS_dup3: c_long = 320; +pub const SYS_pipe2: c_long = 321; +pub const SYS_inotify_init1: c_long = 322; +pub const SYS_accept4: c_long = 323; +pub const SYS_preadv: c_long = 324; +pub const SYS_pwritev: c_long = 325; +pub const SYS_rt_tgsigqueueinfo: c_long = 326; +pub const SYS_perf_event_open: c_long = 327; +pub const SYS_recvmmsg: c_long = 328; +pub const SYS_fanotify_init: c_long = 329; +pub const SYS_fanotify_mark: c_long = 330; +pub const SYS_prlimit64: c_long = 331; +pub const SYS_name_to_handle_at: c_long = 332; +pub const SYS_open_by_handle_at: c_long = 333; +pub const SYS_clock_adjtime: c_long = 334; +pub const SYS_syncfs: c_long = 335; +pub const SYS_sendmmsg: c_long = 336; +pub const SYS_setns: c_long = 337; +pub const SYS_process_vm_readv: c_long = 338; +pub const SYS_process_vm_writev: c_long = 339; +pub const SYS_kern_features: c_long = 340; +pub const SYS_kcmp: c_long = 341; +pub const SYS_finit_module: c_long = 342; +pub const SYS_sched_setattr: c_long = 343; +pub const SYS_sched_getattr: c_long = 344; +pub const SYS_renameat2: c_long = 345; +pub const SYS_seccomp: c_long = 346; +pub const SYS_getrandom: c_long = 347; +pub const SYS_memfd_create: c_long = 348; +pub const SYS_bpf: c_long = 349; +pub const SYS_execveat: c_long = 350; +pub const SYS_membarrier: c_long = 351; +pub const SYS_userfaultfd: c_long = 352; +pub const SYS_bind: c_long = 353; +pub const SYS_listen: c_long = 354; +pub const SYS_setsockopt: c_long = 355; +pub const SYS_mlock2: c_long = 356; +pub const SYS_copy_file_range: c_long = 357; +pub const SYS_preadv2: c_long = 358; +pub const SYS_pwritev2: c_long = 359; +pub const SYS_statx: c_long = 360; +pub const SYS_rseq: c_long = 365; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; // Reserved in the kernel, but not actually implemented yet -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; diff --git a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs index 137ed0bfd1aad..7e7de0ce2dfaf 100644 --- a/src/unix/linux_like/linux/gnu/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/gnu/b32/x86/mod.rs @@ -1,46 +1,48 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = i8; pub type wchar_t = i32; pub type greg_t = i32; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - f_spare: [::__fsword_t; 4], + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + f_spare: [crate::__fsword_t; 4], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct _libc_fpreg { @@ -49,177 +51,177 @@ s! { } pub struct _libc_fpstate { - pub cw: ::c_ulong, - pub sw: ::c_ulong, - pub tag: ::c_ulong, - pub ipoff: ::c_ulong, - pub cssel: ::c_ulong, - pub dataoff: ::c_ulong, - pub datasel: ::c_ulong, + pub cw: c_ulong, + pub sw: c_ulong, + pub tag: c_ulong, + pub ipoff: c_ulong, + pub cssel: c_ulong, + pub dataoff: c_ulong, + pub datasel: c_ulong, pub _st: [_libc_fpreg; 8], - pub status: ::c_ulong, + pub status: c_ulong, } pub struct user_fpregs_struct { - pub cwd: ::c_long, - pub swd: ::c_long, - pub twd: ::c_long, - pub fip: ::c_long, - pub fcs: ::c_long, - pub foo: ::c_long, - pub fos: ::c_long, - pub st_space: [::c_long; 20], + pub cwd: c_long, + pub swd: c_long, + pub twd: c_long, + pub fip: c_long, + pub fcs: c_long, + pub foo: c_long, + pub fos: c_long, + pub st_space: [c_long; 20], } pub struct user_regs_struct { - pub ebx: ::c_long, - pub ecx: ::c_long, - pub edx: ::c_long, - pub esi: ::c_long, - pub edi: ::c_long, - pub ebp: ::c_long, - pub eax: ::c_long, - pub xds: ::c_long, - pub xes: ::c_long, - pub xfs: ::c_long, - pub xgs: ::c_long, - pub orig_eax: ::c_long, - pub eip: ::c_long, - pub xcs: ::c_long, - pub eflags: ::c_long, - pub esp: ::c_long, - pub xss: ::c_long, + pub ebx: c_long, + pub ecx: c_long, + pub edx: c_long, + pub esi: c_long, + pub edi: c_long, + pub ebp: c_long, + pub eax: c_long, + pub xds: c_long, + pub xes: c_long, + pub xfs: c_long, + pub xgs: c_long, + pub orig_eax: c_long, + pub eip: c_long, + pub xcs: c_long, + pub eflags: c_long, + pub esp: c_long, + pub xss: c_long, } pub struct user { pub regs: user_regs_struct, - pub u_fpvalid: ::c_int, + pub u_fpvalid: c_int, pub i387: user_fpregs_struct, - pub u_tsize: ::c_ulong, - pub u_dsize: ::c_ulong, - pub u_ssize: ::c_ulong, - pub start_code: ::c_ulong, - pub start_stack: ::c_ulong, - pub signal: ::c_long, - __reserved: ::c_int, + pub u_tsize: c_ulong, + pub u_dsize: c_ulong, + pub u_ssize: c_ulong, + pub start_code: c_ulong, + pub start_stack: c_ulong, + pub signal: c_long, + __reserved: c_int, pub u_ar0: *mut user_regs_struct, pub u_fpstate: *mut user_fpregs_struct, - pub magic: ::c_ulong, + pub magic: c_ulong, pub u_comm: [c_char; 32], - pub u_debugreg: [::c_int; 8], + pub u_debugreg: [c_int; 8], } pub struct mcontext_t { pub gregs: [greg_t; 19], pub fpregs: *mut _libc_fpstate, - pub oldmask: ::c_ulong, - pub cr2: ::c_ulong, + pub oldmask: c_ulong, + pub cr2: c_ulong, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct stat64 { - pub st_dev: ::dev_t, - __pad1: ::c_uint, - __st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_uint, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino64_t, + pub st_dev: crate::dev_t, + __pad1: c_uint, + __st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: c_uint, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino64_t, } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_ulong, - pub shm_dtime: ::time_t, - __unused2: ::c_ulong, - pub shm_ctime: ::time_t, - __unused3: ::c_ulong, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_ulong, + pub shm_dtime: crate::time_t, + __unused2: c_ulong, + pub shm_ctime: crate::time_t, + __unused3: c_ulong, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __glibc_reserved1: ::c_ulong, - pub msg_rtime: ::time_t, - __glibc_reserved2: ::c_ulong, - pub msg_ctime: ::time_t, - __glibc_reserved3: ::c_ulong, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __glibc_reserved1: c_ulong, + pub msg_rtime: crate::time_t, + __glibc_reserved2: c_ulong, + pub msg_ctime: crate::time_t, + __glibc_reserved3: c_ulong, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -227,42 +229,42 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } } s_no_extra_traits! { pub struct user_fpxregs_struct { - pub cwd: ::c_ushort, - pub swd: ::c_ushort, - pub twd: ::c_ushort, - pub fop: ::c_ushort, - pub fip: ::c_long, - pub fcs: ::c_long, - pub foo: ::c_long, - pub fos: ::c_long, - pub mxcsr: ::c_long, - __reserved: ::c_long, - pub st_space: [::c_long; 32], - pub xmm_space: [::c_long; 32], - padding: [::c_long; 56], + pub cwd: c_ushort, + pub swd: c_ushort, + pub twd: c_ushort, + pub fop: c_ushort, + pub fip: c_long, + pub fcs: c_long, + pub foo: c_long, + pub fos: c_long, + pub mxcsr: c_long, + __reserved: c_long, + pub st_space: [c_long; 32], + pub xmm_space: [c_long; 32], + padding: [c_long; 56], } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, __private: [u8; 112], - __ssp: [::c_ulong; 4], + __ssp: [c_ulong; 4], } #[allow(missing_debug_implementations)] @@ -294,8 +296,8 @@ cfg_if! { impl Eq for user_fpxregs_struct {} - impl ::fmt::Debug for user_fpxregs_struct { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for user_fpxregs_struct { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("user_fpxregs_struct") .field("cwd", &self.cwd) .field("swd", &self.swd) @@ -314,8 +316,8 @@ cfg_if! { } } - impl ::hash::Hash for user_fpxregs_struct { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for user_fpxregs_struct { + fn hash(&self, state: &mut H) { self.cwd.hash(state); self.swd.hash(state); self.twd.hash(state); @@ -345,8 +347,8 @@ cfg_if! { impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -358,8 +360,8 @@ cfg_if! { } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -372,187 +374,187 @@ cfg_if! { } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_LARGEFILE: ::c_int = 0o0100000; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_LARGEFILE: c_int = 0o0100000; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_32BIT: ::c_int = 0x0040; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_32BIT: c_int = 0x0040; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_SYNC: c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_SYSEMU: ::c_uint = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; +pub const PTRACE_SYSEMU: c_uint = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_uint = 32; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const EFD_NONBLOCK: c_int = 0x800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -560,542 +562,542 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86old: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_vm86: ::c_long = 166; -pub const SYS_query_module: ::c_long = 167; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_getpmsg: ::c_long = 188; -pub const SYS_putpmsg: ::c_long = 189; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_pivot_root: ::c_long = 217; -pub const SYS_mincore: ::c_long = 218; -pub const SYS_madvise: ::c_long = 219; -pub const SYS_getdents64: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_set_thread_area: ::c_long = 243; -pub const SYS_get_thread_area: ::c_long = 244; -pub const SYS_io_setup: ::c_long = 245; -pub const SYS_io_destroy: ::c_long = 246; -pub const SYS_io_getevents: ::c_long = 247; -pub const SYS_io_submit: ::c_long = 248; -pub const SYS_io_cancel: ::c_long = 249; -pub const SYS_fadvise64: ::c_long = 250; -pub const SYS_exit_group: ::c_long = 252; -pub const SYS_lookup_dcookie: ::c_long = 253; -pub const SYS_epoll_create: ::c_long = 254; -pub const SYS_epoll_ctl: ::c_long = 255; -pub const SYS_epoll_wait: ::c_long = 256; -pub const SYS_remap_file_pages: ::c_long = 257; -pub const SYS_set_tid_address: ::c_long = 258; -pub const SYS_timer_create: ::c_long = 259; -pub const SYS_timer_settime: ::c_long = 260; -pub const SYS_timer_gettime: ::c_long = 261; -pub const SYS_timer_getoverrun: ::c_long = 262; -pub const SYS_timer_delete: ::c_long = 263; -pub const SYS_clock_settime: ::c_long = 264; -pub const SYS_clock_gettime: ::c_long = 265; -pub const SYS_clock_getres: ::c_long = 266; -pub const SYS_clock_nanosleep: ::c_long = 267; -pub const SYS_statfs64: ::c_long = 268; -pub const SYS_fstatfs64: ::c_long = 269; -pub const SYS_tgkill: ::c_long = 270; -pub const SYS_utimes: ::c_long = 271; -pub const SYS_fadvise64_64: ::c_long = 272; -pub const SYS_vserver: ::c_long = 273; -pub const SYS_mbind: ::c_long = 274; -pub const SYS_get_mempolicy: ::c_long = 275; -pub const SYS_set_mempolicy: ::c_long = 276; -pub const SYS_mq_open: ::c_long = 277; -pub const SYS_mq_unlink: ::c_long = 278; -pub const SYS_mq_timedsend: ::c_long = 279; -pub const SYS_mq_timedreceive: ::c_long = 280; -pub const SYS_mq_notify: ::c_long = 281; -pub const SYS_mq_getsetattr: ::c_long = 282; -pub const SYS_kexec_load: ::c_long = 283; -pub const SYS_waitid: ::c_long = 284; -pub const SYS_add_key: ::c_long = 286; -pub const SYS_request_key: ::c_long = 287; -pub const SYS_keyctl: ::c_long = 288; -pub const SYS_ioprio_set: ::c_long = 289; -pub const SYS_ioprio_get: ::c_long = 290; -pub const SYS_inotify_init: ::c_long = 291; -pub const SYS_inotify_add_watch: ::c_long = 292; -pub const SYS_inotify_rm_watch: ::c_long = 293; -pub const SYS_migrate_pages: ::c_long = 294; -pub const SYS_openat: ::c_long = 295; -pub const SYS_mkdirat: ::c_long = 296; -pub const SYS_mknodat: ::c_long = 297; -pub const SYS_fchownat: ::c_long = 298; -pub const SYS_futimesat: ::c_long = 299; -pub const SYS_fstatat64: ::c_long = 300; -pub const SYS_unlinkat: ::c_long = 301; -pub const SYS_renameat: ::c_long = 302; -pub const SYS_linkat: ::c_long = 303; -pub const SYS_symlinkat: ::c_long = 304; -pub const SYS_readlinkat: ::c_long = 305; -pub const SYS_fchmodat: ::c_long = 306; -pub const SYS_faccessat: ::c_long = 307; -pub const SYS_pselect6: ::c_long = 308; -pub const SYS_ppoll: ::c_long = 309; -pub const SYS_unshare: ::c_long = 310; -pub const SYS_set_robust_list: ::c_long = 311; -pub const SYS_get_robust_list: ::c_long = 312; -pub const SYS_splice: ::c_long = 313; -pub const SYS_sync_file_range: ::c_long = 314; -pub const SYS_tee: ::c_long = 315; -pub const SYS_vmsplice: ::c_long = 316; -pub const SYS_move_pages: ::c_long = 317; -pub const SYS_getcpu: ::c_long = 318; -pub const SYS_epoll_pwait: ::c_long = 319; -pub const SYS_utimensat: ::c_long = 320; -pub const SYS_signalfd: ::c_long = 321; -pub const SYS_timerfd_create: ::c_long = 322; -pub const SYS_eventfd: ::c_long = 323; -pub const SYS_fallocate: ::c_long = 324; -pub const SYS_timerfd_settime: ::c_long = 325; -pub const SYS_timerfd_gettime: ::c_long = 326; -pub const SYS_signalfd4: ::c_long = 327; -pub const SYS_eventfd2: ::c_long = 328; -pub const SYS_epoll_create1: ::c_long = 329; -pub const SYS_dup3: ::c_long = 330; -pub const SYS_pipe2: ::c_long = 331; -pub const SYS_inotify_init1: ::c_long = 332; -pub const SYS_preadv: ::c_long = 333; -pub const SYS_pwritev: ::c_long = 334; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 335; -pub const SYS_perf_event_open: ::c_long = 336; -pub const SYS_recvmmsg: ::c_long = 337; -pub const SYS_fanotify_init: ::c_long = 338; -pub const SYS_fanotify_mark: ::c_long = 339; -pub const SYS_prlimit64: ::c_long = 340; -pub const SYS_name_to_handle_at: ::c_long = 341; -pub const SYS_open_by_handle_at: ::c_long = 342; -pub const SYS_clock_adjtime: ::c_long = 343; -pub const SYS_syncfs: ::c_long = 344; -pub const SYS_sendmmsg: ::c_long = 345; -pub const SYS_setns: ::c_long = 346; -pub const SYS_process_vm_readv: ::c_long = 347; -pub const SYS_process_vm_writev: ::c_long = 348; -pub const SYS_kcmp: ::c_long = 349; -pub const SYS_finit_module: ::c_long = 350; -pub const SYS_sched_setattr: ::c_long = 351; -pub const SYS_sched_getattr: ::c_long = 352; -pub const SYS_renameat2: ::c_long = 353; -pub const SYS_seccomp: ::c_long = 354; -pub const SYS_getrandom: ::c_long = 355; -pub const SYS_memfd_create: ::c_long = 356; -pub const SYS_bpf: ::c_long = 357; -pub const SYS_execveat: ::c_long = 358; -pub const SYS_socket: ::c_long = 359; -pub const SYS_socketpair: ::c_long = 360; -pub const SYS_bind: ::c_long = 361; -pub const SYS_connect: ::c_long = 362; -pub const SYS_listen: ::c_long = 363; -pub const SYS_accept4: ::c_long = 364; -pub const SYS_getsockopt: ::c_long = 365; -pub const SYS_setsockopt: ::c_long = 366; -pub const SYS_getsockname: ::c_long = 367; -pub const SYS_getpeername: ::c_long = 368; -pub const SYS_sendto: ::c_long = 369; -pub const SYS_sendmsg: ::c_long = 370; -pub const SYS_recvfrom: ::c_long = 371; -pub const SYS_recvmsg: ::c_long = 372; -pub const SYS_shutdown: ::c_long = 373; -pub const SYS_userfaultfd: ::c_long = 374; -pub const SYS_membarrier: ::c_long = 375; -pub const SYS_mlock2: ::c_long = 376; -pub const SYS_copy_file_range: ::c_long = 377; -pub const SYS_preadv2: ::c_long = 378; -pub const SYS_pwritev2: ::c_long = 379; -pub const SYS_pkey_mprotect: ::c_long = 380; -pub const SYS_pkey_alloc: ::c_long = 381; -pub const SYS_pkey_free: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_rseq: ::c_long = 386; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_fchmodat2: ::c_long = 452; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86old: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_vm86: c_long = 166; +pub const SYS_query_module: c_long = 167; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_getpmsg: c_long = 188; +pub const SYS_putpmsg: c_long = 189; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_pivot_root: c_long = 217; +pub const SYS_mincore: c_long = 218; +pub const SYS_madvise: c_long = 219; +pub const SYS_getdents64: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_set_thread_area: c_long = 243; +pub const SYS_get_thread_area: c_long = 244; +pub const SYS_io_setup: c_long = 245; +pub const SYS_io_destroy: c_long = 246; +pub const SYS_io_getevents: c_long = 247; +pub const SYS_io_submit: c_long = 248; +pub const SYS_io_cancel: c_long = 249; +pub const SYS_fadvise64: c_long = 250; +pub const SYS_exit_group: c_long = 252; +pub const SYS_lookup_dcookie: c_long = 253; +pub const SYS_epoll_create: c_long = 254; +pub const SYS_epoll_ctl: c_long = 255; +pub const SYS_epoll_wait: c_long = 256; +pub const SYS_remap_file_pages: c_long = 257; +pub const SYS_set_tid_address: c_long = 258; +pub const SYS_timer_create: c_long = 259; +pub const SYS_timer_settime: c_long = 260; +pub const SYS_timer_gettime: c_long = 261; +pub const SYS_timer_getoverrun: c_long = 262; +pub const SYS_timer_delete: c_long = 263; +pub const SYS_clock_settime: c_long = 264; +pub const SYS_clock_gettime: c_long = 265; +pub const SYS_clock_getres: c_long = 266; +pub const SYS_clock_nanosleep: c_long = 267; +pub const SYS_statfs64: c_long = 268; +pub const SYS_fstatfs64: c_long = 269; +pub const SYS_tgkill: c_long = 270; +pub const SYS_utimes: c_long = 271; +pub const SYS_fadvise64_64: c_long = 272; +pub const SYS_vserver: c_long = 273; +pub const SYS_mbind: c_long = 274; +pub const SYS_get_mempolicy: c_long = 275; +pub const SYS_set_mempolicy: c_long = 276; +pub const SYS_mq_open: c_long = 277; +pub const SYS_mq_unlink: c_long = 278; +pub const SYS_mq_timedsend: c_long = 279; +pub const SYS_mq_timedreceive: c_long = 280; +pub const SYS_mq_notify: c_long = 281; +pub const SYS_mq_getsetattr: c_long = 282; +pub const SYS_kexec_load: c_long = 283; +pub const SYS_waitid: c_long = 284; +pub const SYS_add_key: c_long = 286; +pub const SYS_request_key: c_long = 287; +pub const SYS_keyctl: c_long = 288; +pub const SYS_ioprio_set: c_long = 289; +pub const SYS_ioprio_get: c_long = 290; +pub const SYS_inotify_init: c_long = 291; +pub const SYS_inotify_add_watch: c_long = 292; +pub const SYS_inotify_rm_watch: c_long = 293; +pub const SYS_migrate_pages: c_long = 294; +pub const SYS_openat: c_long = 295; +pub const SYS_mkdirat: c_long = 296; +pub const SYS_mknodat: c_long = 297; +pub const SYS_fchownat: c_long = 298; +pub const SYS_futimesat: c_long = 299; +pub const SYS_fstatat64: c_long = 300; +pub const SYS_unlinkat: c_long = 301; +pub const SYS_renameat: c_long = 302; +pub const SYS_linkat: c_long = 303; +pub const SYS_symlinkat: c_long = 304; +pub const SYS_readlinkat: c_long = 305; +pub const SYS_fchmodat: c_long = 306; +pub const SYS_faccessat: c_long = 307; +pub const SYS_pselect6: c_long = 308; +pub const SYS_ppoll: c_long = 309; +pub const SYS_unshare: c_long = 310; +pub const SYS_set_robust_list: c_long = 311; +pub const SYS_get_robust_list: c_long = 312; +pub const SYS_splice: c_long = 313; +pub const SYS_sync_file_range: c_long = 314; +pub const SYS_tee: c_long = 315; +pub const SYS_vmsplice: c_long = 316; +pub const SYS_move_pages: c_long = 317; +pub const SYS_getcpu: c_long = 318; +pub const SYS_epoll_pwait: c_long = 319; +pub const SYS_utimensat: c_long = 320; +pub const SYS_signalfd: c_long = 321; +pub const SYS_timerfd_create: c_long = 322; +pub const SYS_eventfd: c_long = 323; +pub const SYS_fallocate: c_long = 324; +pub const SYS_timerfd_settime: c_long = 325; +pub const SYS_timerfd_gettime: c_long = 326; +pub const SYS_signalfd4: c_long = 327; +pub const SYS_eventfd2: c_long = 328; +pub const SYS_epoll_create1: c_long = 329; +pub const SYS_dup3: c_long = 330; +pub const SYS_pipe2: c_long = 331; +pub const SYS_inotify_init1: c_long = 332; +pub const SYS_preadv: c_long = 333; +pub const SYS_pwritev: c_long = 334; +pub const SYS_rt_tgsigqueueinfo: c_long = 335; +pub const SYS_perf_event_open: c_long = 336; +pub const SYS_recvmmsg: c_long = 337; +pub const SYS_fanotify_init: c_long = 338; +pub const SYS_fanotify_mark: c_long = 339; +pub const SYS_prlimit64: c_long = 340; +pub const SYS_name_to_handle_at: c_long = 341; +pub const SYS_open_by_handle_at: c_long = 342; +pub const SYS_clock_adjtime: c_long = 343; +pub const SYS_syncfs: c_long = 344; +pub const SYS_sendmmsg: c_long = 345; +pub const SYS_setns: c_long = 346; +pub const SYS_process_vm_readv: c_long = 347; +pub const SYS_process_vm_writev: c_long = 348; +pub const SYS_kcmp: c_long = 349; +pub const SYS_finit_module: c_long = 350; +pub const SYS_sched_setattr: c_long = 351; +pub const SYS_sched_getattr: c_long = 352; +pub const SYS_renameat2: c_long = 353; +pub const SYS_seccomp: c_long = 354; +pub const SYS_getrandom: c_long = 355; +pub const SYS_memfd_create: c_long = 356; +pub const SYS_bpf: c_long = 357; +pub const SYS_execveat: c_long = 358; +pub const SYS_socket: c_long = 359; +pub const SYS_socketpair: c_long = 360; +pub const SYS_bind: c_long = 361; +pub const SYS_connect: c_long = 362; +pub const SYS_listen: c_long = 363; +pub const SYS_accept4: c_long = 364; +pub const SYS_getsockopt: c_long = 365; +pub const SYS_setsockopt: c_long = 366; +pub const SYS_getsockname: c_long = 367; +pub const SYS_getpeername: c_long = 368; +pub const SYS_sendto: c_long = 369; +pub const SYS_sendmsg: c_long = 370; +pub const SYS_recvfrom: c_long = 371; +pub const SYS_recvmsg: c_long = 372; +pub const SYS_shutdown: c_long = 373; +pub const SYS_userfaultfd: c_long = 374; +pub const SYS_membarrier: c_long = 375; +pub const SYS_mlock2: c_long = 376; +pub const SYS_copy_file_range: c_long = 377; +pub const SYS_preadv2: c_long = 378; +pub const SYS_pwritev2: c_long = 379; +pub const SYS_pkey_mprotect: c_long = 380; +pub const SYS_pkey_alloc: c_long = 381; +pub const SYS_pkey_free: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_rseq: c_long = 386; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_fchmodat2: c_long = 452; +pub const SYS_mseal: c_long = 462; // offsets in user_regs_structs, from sys/reg.h -pub const EBX: ::c_int = 0; -pub const ECX: ::c_int = 1; -pub const EDX: ::c_int = 2; -pub const ESI: ::c_int = 3; -pub const EDI: ::c_int = 4; -pub const EBP: ::c_int = 5; -pub const EAX: ::c_int = 6; -pub const DS: ::c_int = 7; -pub const ES: ::c_int = 8; -pub const FS: ::c_int = 9; -pub const GS: ::c_int = 10; -pub const ORIG_EAX: ::c_int = 11; -pub const EIP: ::c_int = 12; -pub const CS: ::c_int = 13; -pub const EFL: ::c_int = 14; -pub const UESP: ::c_int = 15; -pub const SS: ::c_int = 16; +pub const EBX: c_int = 0; +pub const ECX: c_int = 1; +pub const EDX: c_int = 2; +pub const ESI: c_int = 3; +pub const EDI: c_int = 4; +pub const EBP: c_int = 5; +pub const EAX: c_int = 6; +pub const DS: c_int = 7; +pub const ES: c_int = 8; +pub const FS: c_int = 9; +pub const GS: c_int = 10; +pub const ORIG_EAX: c_int = 11; +pub const EIP: c_int = 12; +pub const CS: c_int = 13; +pub const EFL: c_int = 14; +pub const UESP: c_int = 15; +pub const SS: c_int = 16; // offsets in mcontext_t.gregs from sys/ucontext.h -pub const REG_GS: ::c_int = 0; -pub const REG_FS: ::c_int = 1; -pub const REG_ES: ::c_int = 2; -pub const REG_DS: ::c_int = 3; -pub const REG_EDI: ::c_int = 4; -pub const REG_ESI: ::c_int = 5; -pub const REG_EBP: ::c_int = 6; -pub const REG_ESP: ::c_int = 7; -pub const REG_EBX: ::c_int = 8; -pub const REG_EDX: ::c_int = 9; -pub const REG_ECX: ::c_int = 10; -pub const REG_EAX: ::c_int = 11; -pub const REG_TRAPNO: ::c_int = 12; -pub const REG_ERR: ::c_int = 13; -pub const REG_EIP: ::c_int = 14; -pub const REG_CS: ::c_int = 15; -pub const REG_EFL: ::c_int = 16; -pub const REG_UESP: ::c_int = 17; -pub const REG_SS: ::c_int = 18; +pub const REG_GS: c_int = 0; +pub const REG_FS: c_int = 1; +pub const REG_ES: c_int = 2; +pub const REG_DS: c_int = 3; +pub const REG_EDI: c_int = 4; +pub const REG_ESI: c_int = 5; +pub const REG_EBP: c_int = 6; +pub const REG_ESP: c_int = 7; +pub const REG_EBX: c_int = 8; +pub const REG_EDX: c_int = 9; +pub const REG_ECX: c_int = 10; +pub const REG_EAX: c_int = 11; +pub const REG_TRAPNO: c_int = 12; +pub const REG_ERR: c_int = 13; +pub const REG_EIP: c_int = 14; +pub const REG_CS: c_int = 15; +pub const REG_EFL: c_int = 16; +pub const REG_UESP: c_int = 17; +pub const REG_SS: c_int = 18; extern "C" { - pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; - pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; - pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); - pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; + pub fn getcontext(ucp: *mut ucontext_t) -> c_int; + pub fn setcontext(ucp: *const ucontext_t) -> c_int; + pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: c_int, ...); + pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> c_int; } diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs index 5a0785c13c7a8..cec3b7ee28b5a 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/ilp32.rs @@ -1,4 +1,4 @@ -use pthread_mutex_t; +use crate::pthread_mutex_t; pub type c_long = i32; pub type c_ulong = u32; @@ -11,46 +11,46 @@ pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 20; #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const SYS_sync_file_range2: ::c_long = 84; +pub const SYS_sync_file_range2: c_long = 84; diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs index efe3cc57e8a2f..4b09e476d370c 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/lp64.rs @@ -1,4 +1,4 @@ -use pthread_mutex_t; +use crate::pthread_mutex_t; pub type c_long = i64; pub type c_ulong = u64; @@ -11,49 +11,49 @@ pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 8; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const SYS_renameat: ::c_long = 38; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_setrlimit: ::c_long = 164; +pub const SYS_renameat: c_long = 38; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_setrlimit: c_long = 164; diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index 82273217aacf1..a12614e8f8c71 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -1,142 +1,146 @@ //! AArch64-specific definitions for 64-bit linux-like values +use crate::{ + c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, +}; + pub type c_char = u8; pub type wchar_t = u32; pub type nlink_t = u32; pub type blksize_t = i32; pub type suseconds_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, #[cfg(target_arch = "sparc64")] - __reserved0: ::c_int, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + __reserved0: c_int, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + f_spare: [crate::__fsword_t; 5], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - __pad2: ::c_int, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + __pad2: c_int, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { @@ -144,42 +148,42 @@ s! { } pub struct user_regs_struct { - pub regs: [::c_ulonglong; 31], - pub sp: ::c_ulonglong, - pub pc: ::c_ulonglong, - pub pstate: ::c_ulonglong, + pub regs: [c_ulonglong; 31], + pub sp: c_ulonglong, + pub pc: c_ulonglong, + pub pstate: c_ulonglong, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_uint, + pub __seq: c_ushort, + __pad1: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -187,53 +191,53 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[repr(align(16))] pub struct mcontext_t { - pub fault_address: ::c_ulonglong, - pub regs: [::c_ulonglong; 31], - pub sp: ::c_ulonglong, - pub pc: ::c_ulonglong, - pub pstate: ::c_ulonglong, + pub fault_address: c_ulonglong, + pub regs: [c_ulonglong; 31], + pub sp: c_ulonglong, + pub pc: c_ulonglong, + pub pstate: c_ulonglong, __reserved: [u64; 512], } pub struct user_fpsimd_struct { - pub vregs: [::__uint128_t; 32], - pub fpsr: ::c_uint, - pub fpcr: ::c_uint, + pub vregs: [crate::__uint128_t; 32], + pub fpsr: c_uint, + pub fpcr: c_uint, } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } @@ -247,237 +251,237 @@ s_no_extra_traits! { pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; - -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; - -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; + +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_PATH: c_int = 0o10000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0100; + +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; + +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; -pub const PTRACE_DETACH: ::c_uint = 17; +pub const PTRACE_DETACH: c_uint = 17; -pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const EFD_NONBLOCK: c_int = 0x800; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; - -pub const O_CLOEXEC: ::c_int = 0x80000; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; - -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; - -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLOCK: ::c_int = 35; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const SIGSTKSZ: ::size_t = 16384; -pub const MINSIGSTKSZ: ::size_t = 5120; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const O_TRUNC: c_int = 512; + +pub const O_CLOEXEC: c_int = 0x80000; + +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; + +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: c_int = 0x80000; + +pub const EFD_CLOEXEC: c_int = 0x80000; + +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; + +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLOCK: c_int = 35; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const SIGSTKSZ: size_t = 16384; +pub const MINSIGSTKSZ: size_t = 5120; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -485,478 +489,478 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; // sys/auxv.h -pub const HWCAP_FP: ::c_ulong = 1 << 0; -pub const HWCAP_ASIMD: ::c_ulong = 1 << 1; -pub const HWCAP_EVTSTRM: ::c_ulong = 1 << 2; -pub const HWCAP_AES: ::c_ulong = 1 << 3; -pub const HWCAP_PMULL: ::c_ulong = 1 << 4; -pub const HWCAP_SHA1: ::c_ulong = 1 << 5; -pub const HWCAP_SHA2: ::c_ulong = 1 << 6; -pub const HWCAP_CRC32: ::c_ulong = 1 << 7; -pub const HWCAP_ATOMICS: ::c_ulong = 1 << 8; -pub const HWCAP_FPHP: ::c_ulong = 1 << 9; -pub const HWCAP_ASIMDHP: ::c_ulong = 1 << 10; -pub const HWCAP_CPUID: ::c_ulong = 1 << 11; -pub const HWCAP_ASIMDRDM: ::c_ulong = 1 << 12; -pub const HWCAP_JSCVT: ::c_ulong = 1 << 13; -pub const HWCAP_FCMA: ::c_ulong = 1 << 14; -pub const HWCAP_LRCPC: ::c_ulong = 1 << 15; -pub const HWCAP_DCPOP: ::c_ulong = 1 << 16; -pub const HWCAP_SHA3: ::c_ulong = 1 << 17; -pub const HWCAP_SM3: ::c_ulong = 1 << 18; -pub const HWCAP_SM4: ::c_ulong = 1 << 19; -pub const HWCAP_ASIMDDP: ::c_ulong = 1 << 20; -pub const HWCAP_SHA512: ::c_ulong = 1 << 21; -pub const HWCAP_SVE: ::c_ulong = 1 << 22; -pub const HWCAP_ASIMDFHM: ::c_ulong = 1 << 23; -pub const HWCAP_DIT: ::c_ulong = 1 << 24; -pub const HWCAP_USCAT: ::c_ulong = 1 << 25; -pub const HWCAP_ILRCPC: ::c_ulong = 1 << 26; -pub const HWCAP_FLAGM: ::c_ulong = 1 << 27; -pub const HWCAP_SSBS: ::c_ulong = 1 << 28; -pub const HWCAP_SB: ::c_ulong = 1 << 29; -pub const HWCAP_PACA: ::c_ulong = 1 << 30; -pub const HWCAP_PACG: ::c_ulong = 1 << 31; +pub const HWCAP_FP: c_ulong = 1 << 0; +pub const HWCAP_ASIMD: c_ulong = 1 << 1; +pub const HWCAP_EVTSTRM: c_ulong = 1 << 2; +pub const HWCAP_AES: c_ulong = 1 << 3; +pub const HWCAP_PMULL: c_ulong = 1 << 4; +pub const HWCAP_SHA1: c_ulong = 1 << 5; +pub const HWCAP_SHA2: c_ulong = 1 << 6; +pub const HWCAP_CRC32: c_ulong = 1 << 7; +pub const HWCAP_ATOMICS: c_ulong = 1 << 8; +pub const HWCAP_FPHP: c_ulong = 1 << 9; +pub const HWCAP_ASIMDHP: c_ulong = 1 << 10; +pub const HWCAP_CPUID: c_ulong = 1 << 11; +pub const HWCAP_ASIMDRDM: c_ulong = 1 << 12; +pub const HWCAP_JSCVT: c_ulong = 1 << 13; +pub const HWCAP_FCMA: c_ulong = 1 << 14; +pub const HWCAP_LRCPC: c_ulong = 1 << 15; +pub const HWCAP_DCPOP: c_ulong = 1 << 16; +pub const HWCAP_SHA3: c_ulong = 1 << 17; +pub const HWCAP_SM3: c_ulong = 1 << 18; +pub const HWCAP_SM4: c_ulong = 1 << 19; +pub const HWCAP_ASIMDDP: c_ulong = 1 << 20; +pub const HWCAP_SHA512: c_ulong = 1 << 21; +pub const HWCAP_SVE: c_ulong = 1 << 22; +pub const HWCAP_ASIMDFHM: c_ulong = 1 << 23; +pub const HWCAP_DIT: c_ulong = 1 << 24; +pub const HWCAP_USCAT: c_ulong = 1 << 25; +pub const HWCAP_ILRCPC: c_ulong = 1 << 26; +pub const HWCAP_FLAGM: c_ulong = 1 << 27; +pub const HWCAP_SSBS: c_ulong = 1 << 28; +pub const HWCAP_SB: c_ulong = 1 << 29; +pub const HWCAP_PACA: c_ulong = 1 << 30; +pub const HWCAP_PACG: c_ulong = 1 << 31; // FIXME: enable these again once linux-api-headers are up to date enough on CI. // See discussion in https://github.com/rust-lang/libc/pull/1638 -//pub const HWCAP2_DCPODP: ::c_ulong = 1 << 0; -//pub const HWCAP2_SVE2: ::c_ulong = 1 << 1; -//pub const HWCAP2_SVEAES: ::c_ulong = 1 << 2; -//pub const HWCAP2_SVEPMULL: ::c_ulong = 1 << 3; -//pub const HWCAP2_SVEBITPERM: ::c_ulong = 1 << 4; -//pub const HWCAP2_SVESHA3: ::c_ulong = 1 << 5; -//pub const HWCAP2_SVESM4: ::c_ulong = 1 << 6; -//pub const HWCAP2_FLAGM2: ::c_ulong = 1 << 7; -//pub const HWCAP2_FRINT: ::c_ulong = 1 << 8; -//pub const HWCAP2_MTE: ::c_ulong = 1 << 18; +//pub const HWCAP2_DCPODP: c_ulong = 1 << 0; +//pub const HWCAP2_SVE2: c_ulong = 1 << 1; +//pub const HWCAP2_SVEAES: c_ulong = 1 << 2; +//pub const HWCAP2_SVEPMULL: c_ulong = 1 << 3; +//pub const HWCAP2_SVEBITPERM: c_ulong = 1 << 4; +//pub const HWCAP2_SVESHA3: c_ulong = 1 << 5; +//pub const HWCAP2_SVESM4: c_ulong = 1 << 6; +//pub const HWCAP2_FLAGM2: c_ulong = 1 << 7; +//pub const HWCAP2_FRINT: c_ulong = 1 << 8; +//pub const HWCAP2_MTE: c_ulong = 1 << 18; // linux/prctl.h -pub const PR_PAC_RESET_KEYS: ::c_int = 54; -pub const PR_SET_TAGGED_ADDR_CTRL: ::c_int = 55; -pub const PR_GET_TAGGED_ADDR_CTRL: ::c_int = 56; -pub const PR_PAC_SET_ENABLED_KEYS: ::c_int = 60; -pub const PR_PAC_GET_ENABLED_KEYS: ::c_int = 61; +pub const PR_PAC_RESET_KEYS: c_int = 54; +pub const PR_SET_TAGGED_ADDR_CTRL: c_int = 55; +pub const PR_GET_TAGGED_ADDR_CTRL: c_int = 56; +pub const PR_PAC_SET_ENABLED_KEYS: c_int = 60; +pub const PR_PAC_GET_ENABLED_KEYS: c_int = 61; -pub const PR_TAGGED_ADDR_ENABLE: ::c_ulong = 1; +pub const PR_TAGGED_ADDR_ENABLE: c_ulong = 1; -pub const PR_PAC_APIAKEY: ::c_ulong = 1 << 0; -pub const PR_PAC_APIBKEY: ::c_ulong = 1 << 1; -pub const PR_PAC_APDAKEY: ::c_ulong = 1 << 2; -pub const PR_PAC_APDBKEY: ::c_ulong = 1 << 3; -pub const PR_PAC_APGAKEY: ::c_ulong = 1 << 4; +pub const PR_PAC_APIAKEY: c_ulong = 1 << 0; +pub const PR_PAC_APIBKEY: c_ulong = 1 << 1; +pub const PR_PAC_APDAKEY: c_ulong = 1 << 2; +pub const PR_PAC_APDBKEY: c_ulong = 1 << 3; +pub const PR_PAC_APGAKEY: c_ulong = 1 << 4; -pub const PR_SME_SET_VL: ::c_int = 63; -pub const PR_SME_GET_VL: ::c_int = 64; -pub const PR_SME_VL_LEN_MAX: ::c_int = 0xffff; +pub const PR_SME_SET_VL: c_int = 63; +pub const PR_SME_GET_VL: c_int = 64; +pub const PR_SME_VL_LEN_MAX: c_int = 0xffff; -pub const PR_SME_SET_VL_INHERIT: ::c_ulong = 1 << 17; -pub const PR_SME_SET_VL_ONE_EXEC: ::c_ulong = 1 << 18; +pub const PR_SME_SET_VL_INHERIT: c_ulong = 1 << 17; +pub const PR_SME_SET_VL_ONE_EXEC: c_ulong = 1 << 18; // Syscall table -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_dup: ::c_long = 23; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_flock: ::c_long = 32; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_linkat: ::c_long = 37; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_getcwd: c_long = 17; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_dup: c_long = 23; +pub const SYS_dup3: c_long = 24; +pub const SYS_fcntl: c_long = 25; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_ioctl: c_long = 29; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_flock: c_long = 32; +pub const SYS_mknodat: c_long = 33; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_linkat: c_long = 37; // 38 is renameat only on LP64 -pub const SYS_umount2: ::c_long = 39; -pub const SYS_mount: ::c_long = 40; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_openat: ::c_long = 56; -pub const SYS_close: ::c_long = 57; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_sync: ::c_long = 81; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; +pub const SYS_umount2: c_long = 39; +pub const SYS_mount: c_long = 40; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_fallocate: c_long = 47; +pub const SYS_faccessat: c_long = 48; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_chroot: c_long = 51; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_fchownat: c_long = 54; +pub const SYS_fchown: c_long = 55; +pub const SYS_openat: c_long = 56; +pub const SYS_close: c_long = 57; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pipe2: c_long = 59; +pub const SYS_quotactl: c_long = 60; +pub const SYS_getdents64: c_long = 61; +pub const SYS_lseek: c_long = 62; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_fstat: c_long = 80; +pub const SYS_sync: c_long = 81; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; // 84 sync_file_range on LP64 and sync_file_range2 on ILP32 -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_acct: ::c_long = 89; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_personality: ::c_long = 92; -pub const SYS_exit: ::c_long = 93; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_futex: ::c_long = 98; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_kill: ::c_long = 129; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_times: ::c_long = 153; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_uname: ::c_long = 160; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_utimensat: c_long = 88; +pub const SYS_acct: c_long = 89; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_personality: c_long = 92; +pub const SYS_exit: c_long = 93; +pub const SYS_exit_group: c_long = 94; +pub const SYS_waitid: c_long = 95; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_unshare: c_long = 97; +pub const SYS_futex: c_long = 98; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_syslog: c_long = 116; +pub const SYS_ptrace: c_long = 117; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_kill: c_long = 129; +pub const SYS_tkill: c_long = 130; +pub const SYS_tgkill: c_long = 131; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_setpriority: c_long = 140; +pub const SYS_getpriority: c_long = 141; +pub const SYS_reboot: c_long = 142; +pub const SYS_setregid: c_long = 143; +pub const SYS_setgid: c_long = 144; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setuid: c_long = 146; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_times: c_long = 153; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getpgid: c_long = 155; +pub const SYS_getsid: c_long = 156; +pub const SYS_setsid: c_long = 157; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_uname: c_long = 160; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; // 163 is getrlimit only on LP64 // 164 is setrlimit only on LP64 -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_umask: ::c_long = 166; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_semop: ::c_long = 193; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_socket: ::c_long = 198; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_accept: ::c_long = 202; -pub const SYS_connect: ::c_long = 203; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_brk: ::c_long = 214; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_setns: ::c_long = 268; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_kexec_file_load: ::c_long = 294; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; - -pub const PROT_BTI: ::c_int = 0x10; -pub const PROT_MTE: ::c_int = 0x20; +pub const SYS_getrusage: c_long = 165; +pub const SYS_umask: c_long = 166; +pub const SYS_prctl: c_long = 167; +pub const SYS_getcpu: c_long = 168; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_getpid: c_long = 172; +pub const SYS_getppid: c_long = 173; +pub const SYS_getuid: c_long = 174; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getgid: c_long = 176; +pub const SYS_getegid: c_long = 177; +pub const SYS_gettid: c_long = 178; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgctl: c_long = 187; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_semget: c_long = 190; +pub const SYS_semctl: c_long = 191; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_semop: c_long = 193; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmctl: c_long = 195; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmdt: c_long = 197; +pub const SYS_socket: c_long = 198; +pub const SYS_socketpair: c_long = 199; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_accept: c_long = 202; +pub const SYS_connect: c_long = 203; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_shutdown: c_long = 210; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_readahead: c_long = 213; +pub const SYS_brk: c_long = 214; +pub const SYS_munmap: c_long = 215; +pub const SYS_mremap: c_long = 216; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_mmap: c_long = 222; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_mprotect: c_long = 226; +pub const SYS_msync: c_long = 227; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_mbind: c_long = 235; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_move_pages: c_long = 239; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_accept4: c_long = 242; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_wait4: c_long = 260; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_setns: c_long = 268; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_rseq: c_long = 293; +pub const SYS_kexec_file_load: c_long = 294; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; + +pub const PROT_BTI: c_int = 0x10; +pub const PROT_MTE: c_int = 0x20; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; - - pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; - pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; - pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); - pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; + + pub fn getcontext(ucp: *mut ucontext_t) -> c_int; + pub fn setcontext(ucp: *const ucontext_t) -> c_int; + pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: c_int, ...); + pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> c_int; } cfg_if! { diff --git a/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs index ff807e5ae6fb2..8305ccdf25a53 100644 --- a/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/loongarch64/mod.rs @@ -1,4 +1,7 @@ -use pthread_mutex_t; +use crate::{ + c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, + pthread_mutex_t, size_t, +}; pub type c_char = i8; pub type c_long = i64; @@ -8,151 +11,151 @@ pub type wchar_t = i32; pub type blksize_t = i32; pub type nlink_t = u32; pub type suseconds_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { - __size: [::c_ulong; 7], + __size: [c_ulong; 7], } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -160,34 +163,34 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [u64; 0], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_uint, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct user_regs_struct { @@ -205,34 +208,34 @@ s! { } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[repr(align(16))] pub struct mcontext_t { - pub __pc: ::c_ulonglong, - pub __gregs: [::c_ulonglong; 32], - pub __flags: ::c_uint, - pub __extcontext: [::c_ulonglong; 0], + pub __pc: c_ulonglong, + pub __gregs: [c_ulonglong; 32], + pub __flags: c_uint, + pub __extcontext: [c_ulonglong; 0], } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } @@ -252,21 +255,21 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -294,527 +297,527 @@ pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mut ], }; -pub const HWCAP_LOONGARCH_CPUCFG: ::c_ulong = 1 << 0; -pub const HWCAP_LOONGARCH_LAM: ::c_ulong = 1 << 1; -pub const HWCAP_LOONGARCH_UAL: ::c_ulong = 1 << 2; -pub const HWCAP_LOONGARCH_FPU: ::c_ulong = 1 << 3; -pub const HWCAP_LOONGARCH_LSX: ::c_ulong = 1 << 4; -pub const HWCAP_LOONGARCH_LASX: ::c_ulong = 1 << 5; -pub const HWCAP_LOONGARCH_CRC32: ::c_ulong = 1 << 6; -pub const HWCAP_LOONGARCH_COMPLEX: ::c_ulong = 1 << 7; -pub const HWCAP_LOONGARCH_CRYPTO: ::c_ulong = 1 << 8; -pub const HWCAP_LOONGARCH_LVZ: ::c_ulong = 1 << 9; -pub const HWCAP_LOONGARCH_LBT_X86: ::c_ulong = 1 << 10; -pub const HWCAP_LOONGARCH_LBT_ARM: ::c_ulong = 1 << 11; -pub const HWCAP_LOONGARCH_LBT_MIPS: ::c_ulong = 1 << 12; -pub const HWCAP_LOONGARCH_PTW: ::c_ulong = 1 << 13; - -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_dup: ::c_long = 23; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_flock: ::c_long = 32; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_mount: ::c_long = 40; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_openat: ::c_long = 56; -pub const SYS_close: ::c_long = 57; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_sync: ::c_long = 81; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_acct: ::c_long = 89; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_personality: ::c_long = 92; -pub const SYS_exit: ::c_long = 93; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_futex: ::c_long = 98; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_kill: ::c_long = 129; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_times: ::c_long = 153; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_uname: ::c_long = 160; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_umask: ::c_long = 166; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_semop: ::c_long = 193; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_socket: ::c_long = 198; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_accept: ::c_long = 202; -pub const SYS_connect: ::c_long = 203; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_brk: ::c_long = 214; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_recvmmsg: ::c_long = 243; -//pub const SYS_arch_specific_syscall: ::c_long = 244; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_setns: ::c_long = 268; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_io_pgetevents: ::c_long = 292; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_kexec_file_load: ::c_long = 294; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; - -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; -pub const O_DIRECT: ::c_int = 0o00040000; -pub const O_DIRECTORY: ::c_int = 0o00200000; -pub const O_NOFOLLOW: ::c_int = 0o00400000; -pub const O_TRUNC: ::c_int = 0o00001000; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_CLOEXEC: ::c_int = 0o02000000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; -pub const O_APPEND: ::c_int = 0o00002000; -pub const O_CREAT: ::c_int = 0o00000100; -pub const O_EXCL: ::c_int = 0o00000200; -pub const O_NOCTTY: ::c_int = 0o00000400; -pub const O_NONBLOCK: ::c_int = 0o00004000; -pub const FASYNC: ::c_int = 0o00020000; -pub const O_SYNC: ::c_int = 0o04010000; -pub const O_RSYNC: ::c_int = 0o04010000; -pub const O_FSYNC: ::c_int = O_SYNC; -pub const O_ASYNC: ::c_int = 0o00020000; -pub const O_DSYNC: ::c_int = 0o00010000; -pub const O_NDELAY: ::c_int = O_NONBLOCK; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; -pub const F_GETLK: ::c_int = 5; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; -pub const F_GETOWN: ::c_int = 9; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; - -pub const EDEADLK: ::c_int = 35; -pub const EDEADLOCK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; - -pub const MAP_NORESERVE: ::c_int = 0x4000; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x1000; -pub const MAP_LOCKED: ::c_int = 0x2000; -pub const MAP_POPULATE: ::c_int = 0x8000; -pub const MAP_NONBLOCK: ::c_int = 0x10000; -pub const MAP_STACK: ::c_int = 0x20000; -pub const MAP_HUGETLB: ::c_int = 0x40000; -pub const MAP_SYNC: ::c_int = 0x080000; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SFD_NONBLOCK: ::c_int = 0x800; -pub const SFD_CLOEXEC: ::c_int = 0x080000; -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGCHLD: ::c_int = 17; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGURG: ::c_int = 23; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGIO: ::c_int = 29; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIGSYS: ::c_int = 31; -pub const SIGUNUSED: ::c_int = 31; - -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_DETACH: ::c_uint = 17; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; -pub const PTRACE_SYSEMU: ::c_uint = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; - -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const HWCAP_LOONGARCH_CPUCFG: c_ulong = 1 << 0; +pub const HWCAP_LOONGARCH_LAM: c_ulong = 1 << 1; +pub const HWCAP_LOONGARCH_UAL: c_ulong = 1 << 2; +pub const HWCAP_LOONGARCH_FPU: c_ulong = 1 << 3; +pub const HWCAP_LOONGARCH_LSX: c_ulong = 1 << 4; +pub const HWCAP_LOONGARCH_LASX: c_ulong = 1 << 5; +pub const HWCAP_LOONGARCH_CRC32: c_ulong = 1 << 6; +pub const HWCAP_LOONGARCH_COMPLEX: c_ulong = 1 << 7; +pub const HWCAP_LOONGARCH_CRYPTO: c_ulong = 1 << 8; +pub const HWCAP_LOONGARCH_LVZ: c_ulong = 1 << 9; +pub const HWCAP_LOONGARCH_LBT_X86: c_ulong = 1 << 10; +pub const HWCAP_LOONGARCH_LBT_ARM: c_ulong = 1 << 11; +pub const HWCAP_LOONGARCH_LBT_MIPS: c_ulong = 1 << 12; +pub const HWCAP_LOONGARCH_PTW: c_ulong = 1 << 13; + +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_getcwd: c_long = 17; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_dup: c_long = 23; +pub const SYS_dup3: c_long = 24; +pub const SYS_fcntl: c_long = 25; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_ioctl: c_long = 29; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_flock: c_long = 32; +pub const SYS_mknodat: c_long = 33; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_linkat: c_long = 37; +pub const SYS_umount2: c_long = 39; +pub const SYS_mount: c_long = 40; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_fallocate: c_long = 47; +pub const SYS_faccessat: c_long = 48; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_chroot: c_long = 51; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_fchownat: c_long = 54; +pub const SYS_fchown: c_long = 55; +pub const SYS_openat: c_long = 56; +pub const SYS_close: c_long = 57; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pipe2: c_long = 59; +pub const SYS_quotactl: c_long = 60; +pub const SYS_getdents64: c_long = 61; +pub const SYS_lseek: c_long = 62; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_sendfile: c_long = 71; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_sync: c_long = 81; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_utimensat: c_long = 88; +pub const SYS_acct: c_long = 89; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_personality: c_long = 92; +pub const SYS_exit: c_long = 93; +pub const SYS_exit_group: c_long = 94; +pub const SYS_waitid: c_long = 95; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_unshare: c_long = 97; +pub const SYS_futex: c_long = 98; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_syslog: c_long = 116; +pub const SYS_ptrace: c_long = 117; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_kill: c_long = 129; +pub const SYS_tkill: c_long = 130; +pub const SYS_tgkill: c_long = 131; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_setpriority: c_long = 140; +pub const SYS_getpriority: c_long = 141; +pub const SYS_reboot: c_long = 142; +pub const SYS_setregid: c_long = 143; +pub const SYS_setgid: c_long = 144; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setuid: c_long = 146; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_times: c_long = 153; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getpgid: c_long = 155; +pub const SYS_getsid: c_long = 156; +pub const SYS_setsid: c_long = 157; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_uname: c_long = 160; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_getrusage: c_long = 165; +pub const SYS_umask: c_long = 166; +pub const SYS_prctl: c_long = 167; +pub const SYS_getcpu: c_long = 168; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_getpid: c_long = 172; +pub const SYS_getppid: c_long = 173; +pub const SYS_getuid: c_long = 174; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getgid: c_long = 176; +pub const SYS_getegid: c_long = 177; +pub const SYS_gettid: c_long = 178; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgctl: c_long = 187; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_semget: c_long = 190; +pub const SYS_semctl: c_long = 191; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_semop: c_long = 193; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmctl: c_long = 195; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmdt: c_long = 197; +pub const SYS_socket: c_long = 198; +pub const SYS_socketpair: c_long = 199; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_accept: c_long = 202; +pub const SYS_connect: c_long = 203; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_shutdown: c_long = 210; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_readahead: c_long = 213; +pub const SYS_brk: c_long = 214; +pub const SYS_munmap: c_long = 215; +pub const SYS_mremap: c_long = 216; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_mmap: c_long = 222; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_mprotect: c_long = 226; +pub const SYS_msync: c_long = 227; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_mbind: c_long = 235; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_move_pages: c_long = 239; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_accept4: c_long = 242; +pub const SYS_recvmmsg: c_long = 243; +//pub const SYS_arch_specific_syscall: c_long = 244; +pub const SYS_wait4: c_long = 260; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_setns: c_long = 268; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_io_pgetevents: c_long = 292; +pub const SYS_rseq: c_long = 293; +pub const SYS_kexec_file_load: c_long = 294; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; + +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; +pub const O_DIRECT: c_int = 0o00040000; +pub const O_DIRECTORY: c_int = 0o00200000; +pub const O_NOFOLLOW: c_int = 0o00400000; +pub const O_TRUNC: c_int = 0o00001000; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_CLOEXEC: c_int = 0o02000000; +pub const O_PATH: c_int = 0o10000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; +pub const O_APPEND: c_int = 0o00002000; +pub const O_CREAT: c_int = 0o00000100; +pub const O_EXCL: c_int = 0o00000200; +pub const O_NOCTTY: c_int = 0o00000400; +pub const O_NONBLOCK: c_int = 0o00004000; +pub const FASYNC: c_int = 0o00020000; +pub const O_SYNC: c_int = 0o04010000; +pub const O_RSYNC: c_int = 0o04010000; +pub const O_FSYNC: c_int = O_SYNC; +pub const O_ASYNC: c_int = 0o00020000; +pub const O_DSYNC: c_int = 0o00010000; +pub const O_NDELAY: c_int = O_NONBLOCK; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; +pub const F_GETLK: c_int = 5; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; +pub const F_GETOWN: c_int = 9; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; + +pub const EDEADLK: c_int = 35; +pub const EDEADLOCK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; + +pub const MADV_SOFT_OFFLINE: c_int = 101; + +pub const MAP_NORESERVE: c_int = 0x4000; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x1000; +pub const MAP_LOCKED: c_int = 0x2000; +pub const MAP_POPULATE: c_int = 0x8000; +pub const MAP_NONBLOCK: c_int = 0x10000; +pub const MAP_STACK: c_int = 0x20000; +pub const MAP_HUGETLB: c_int = 0x40000; +pub const MAP_SYNC: c_int = 0x080000; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SFD_NONBLOCK: c_int = 0x800; +pub const SFD_CLOEXEC: c_int = 0x080000; +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; +pub const SIG_SETMASK: c_int = 2; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGSTKFLT: c_int = 16; +pub const SIGCHLD: c_int = 17; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGURG: c_int = 23; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGIO: c_int = 29; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIGSYS: c_int = 31; +pub const SIGUNUSED: c_int = 31; + +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const PTRACE_GETFPREGS: c_uint = 14; +pub const PTRACE_SETFPREGS: c_uint = 15; +pub const PTRACE_DETACH: c_uint = 17; +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; +pub const PTRACE_GETREGS: c_uint = 12; +pub const PTRACE_SETREGS: c_uint = 13; +pub const PTRACE_SYSEMU: c_uint = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_uint = 32; + +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; pub const VEOF: usize = 4; pub const VTIME: usize = 5; @@ -828,96 +831,96 @@ pub const VREPRINT: usize = 12; pub const VDISCARD: usize = 13; pub const VWERASE: usize = 14; pub const VEOL2: usize = 16; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; -pub const SIGSTKSZ: ::size_t = 16384; -pub const MINSIGSTKSZ: ::size_t = 4096; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const VT1: ::tcflag_t = 0x00004000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const XCASE: ::tcflag_t = 0x00000004; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; +pub const SIGSTKSZ: size_t = 16384; +pub const MINSIGSTKSZ: size_t = 4096; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const VT1: crate::tcflag_t = 0x00004000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const XCASE: crate::tcflag_t = 0x00000004; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; pub const NCCS: usize = 32; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; +pub const EPOLL_CLOEXEC: c_int = 0x80000; -pub const EFD_CLOEXEC: ::c_int = 0x80000; -pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const EFD_CLOEXEC: c_int = 0x80000; +pub const EFD_NONBLOCK: c_int = 0x800; diff --git a/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs b/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs index 0ed28906d0198..1f82bb18aec34 100644 --- a/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/mips64/mod.rs @@ -1,4 +1,4 @@ -use pthread_mutex_t; +use crate::{c_int, c_short, c_uint, c_ushort, c_void, off64_t, off_t, pthread_mutex_t, size_t}; pub type blksize_t = i64; pub type c_char = i8; @@ -7,182 +7,182 @@ pub type c_ulong = u64; pub type nlink_t = u64; pub type suseconds_t = i64; pub type wchar_t = i32; -pub type __u64 = ::c_ulong; -pub type __s64 = ::c_long; +pub type __u64 = c_ulong; +pub type __s64 = c_long; s! { pub struct stat { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 2], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - st_pad2: [::c_ulong; 1], - pub st_size: ::off_t, - st_pad3: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - st_pad4: ::c_long, - pub st_blocks: ::blkcnt_t, - st_pad5: [::c_long; 7], + pub st_dev: c_ulong, + st_pad1: [c_long; 2], + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulong, + st_pad2: [c_ulong; 1], + pub st_size: off_t, + st_pad3: c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + st_pad4: c_long, + pub st_blocks: crate::blkcnt_t, + st_pad5: [c_long; 7], } pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsblkcnt_t, - pub f_ffree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::c_long, - f_spare: [::c_long; 6], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_files: crate::fsblkcnt_t, + pub f_ffree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: c_long, + f_spare: [c_long; 6], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct stat64 { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 2], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - st_pad2: [::c_long; 2], - pub st_size: ::off64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - st_pad3: ::c_long, - pub st_blocks: ::blkcnt64_t, - st_pad5: [::c_long; 7], + pub st_dev: c_ulong, + st_pad1: [c_long; 2], + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulong, + st_pad2: [c_long; 2], + pub st_size: off64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + st_pad3: c_long, + pub st_blocks: crate::blkcnt64_t, + st_pad5: [c_long; 7], } pub struct statfs64 { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, pub f_blocks: u64, pub f_bfree: u64, pub f_files: u64, pub f_ffree: u64, pub f_bavail: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 5], + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 5], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { - __size: [::c_ulong; 7], + __size: [c_ulong; 7], } pub struct sigaction { - pub sa_flags: ::c_int, - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_restorer: ::Option, + pub sa_flags: c_int, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_restorer: Option, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - _pad: ::c_int, - _pad2: [::c_long; 14], + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + _pad: c_int, + _pad2: [c_long; 14], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_uint, + pub __seq: c_ushort, + __pad1: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } } @@ -202,641 +202,641 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const SYS_read: ::c_long = 5000 + 0; -pub const SYS_write: ::c_long = 5000 + 1; -pub const SYS_open: ::c_long = 5000 + 2; -pub const SYS_close: ::c_long = 5000 + 3; -pub const SYS_stat: ::c_long = 5000 + 4; -pub const SYS_fstat: ::c_long = 5000 + 5; -pub const SYS_lstat: ::c_long = 5000 + 6; -pub const SYS_poll: ::c_long = 5000 + 7; -pub const SYS_lseek: ::c_long = 5000 + 8; -pub const SYS_mmap: ::c_long = 5000 + 9; -pub const SYS_mprotect: ::c_long = 5000 + 10; -pub const SYS_munmap: ::c_long = 5000 + 11; -pub const SYS_brk: ::c_long = 5000 + 12; -pub const SYS_rt_sigaction: ::c_long = 5000 + 13; -pub const SYS_rt_sigprocmask: ::c_long = 5000 + 14; -pub const SYS_ioctl: ::c_long = 5000 + 15; -pub const SYS_pread64: ::c_long = 5000 + 16; -pub const SYS_pwrite64: ::c_long = 5000 + 17; -pub const SYS_readv: ::c_long = 5000 + 18; -pub const SYS_writev: ::c_long = 5000 + 19; -pub const SYS_access: ::c_long = 5000 + 20; -pub const SYS_pipe: ::c_long = 5000 + 21; -pub const SYS__newselect: ::c_long = 5000 + 22; -pub const SYS_sched_yield: ::c_long = 5000 + 23; -pub const SYS_mremap: ::c_long = 5000 + 24; -pub const SYS_msync: ::c_long = 5000 + 25; -pub const SYS_mincore: ::c_long = 5000 + 26; -pub const SYS_madvise: ::c_long = 5000 + 27; -pub const SYS_shmget: ::c_long = 5000 + 28; -pub const SYS_shmat: ::c_long = 5000 + 29; -pub const SYS_shmctl: ::c_long = 5000 + 30; -pub const SYS_dup: ::c_long = 5000 + 31; -pub const SYS_dup2: ::c_long = 5000 + 32; -pub const SYS_pause: ::c_long = 5000 + 33; -pub const SYS_nanosleep: ::c_long = 5000 + 34; -pub const SYS_getitimer: ::c_long = 5000 + 35; -pub const SYS_setitimer: ::c_long = 5000 + 36; -pub const SYS_alarm: ::c_long = 5000 + 37; -pub const SYS_getpid: ::c_long = 5000 + 38; -pub const SYS_sendfile: ::c_long = 5000 + 39; -pub const SYS_socket: ::c_long = 5000 + 40; -pub const SYS_connect: ::c_long = 5000 + 41; -pub const SYS_accept: ::c_long = 5000 + 42; -pub const SYS_sendto: ::c_long = 5000 + 43; -pub const SYS_recvfrom: ::c_long = 5000 + 44; -pub const SYS_sendmsg: ::c_long = 5000 + 45; -pub const SYS_recvmsg: ::c_long = 5000 + 46; -pub const SYS_shutdown: ::c_long = 5000 + 47; -pub const SYS_bind: ::c_long = 5000 + 48; -pub const SYS_listen: ::c_long = 5000 + 49; -pub const SYS_getsockname: ::c_long = 5000 + 50; -pub const SYS_getpeername: ::c_long = 5000 + 51; -pub const SYS_socketpair: ::c_long = 5000 + 52; -pub const SYS_setsockopt: ::c_long = 5000 + 53; -pub const SYS_getsockopt: ::c_long = 5000 + 54; -pub const SYS_clone: ::c_long = 5000 + 55; -pub const SYS_fork: ::c_long = 5000 + 56; -pub const SYS_execve: ::c_long = 5000 + 57; -pub const SYS_exit: ::c_long = 5000 + 58; -pub const SYS_wait4: ::c_long = 5000 + 59; -pub const SYS_kill: ::c_long = 5000 + 60; -pub const SYS_uname: ::c_long = 5000 + 61; -pub const SYS_semget: ::c_long = 5000 + 62; -pub const SYS_semop: ::c_long = 5000 + 63; -pub const SYS_semctl: ::c_long = 5000 + 64; -pub const SYS_shmdt: ::c_long = 5000 + 65; -pub const SYS_msgget: ::c_long = 5000 + 66; -pub const SYS_msgsnd: ::c_long = 5000 + 67; -pub const SYS_msgrcv: ::c_long = 5000 + 68; -pub const SYS_msgctl: ::c_long = 5000 + 69; -pub const SYS_fcntl: ::c_long = 5000 + 70; -pub const SYS_flock: ::c_long = 5000 + 71; -pub const SYS_fsync: ::c_long = 5000 + 72; -pub const SYS_fdatasync: ::c_long = 5000 + 73; -pub const SYS_truncate: ::c_long = 5000 + 74; -pub const SYS_ftruncate: ::c_long = 5000 + 75; -pub const SYS_getdents: ::c_long = 5000 + 76; -pub const SYS_getcwd: ::c_long = 5000 + 77; -pub const SYS_chdir: ::c_long = 5000 + 78; -pub const SYS_fchdir: ::c_long = 5000 + 79; -pub const SYS_rename: ::c_long = 5000 + 80; -pub const SYS_mkdir: ::c_long = 5000 + 81; -pub const SYS_rmdir: ::c_long = 5000 + 82; -pub const SYS_creat: ::c_long = 5000 + 83; -pub const SYS_link: ::c_long = 5000 + 84; -pub const SYS_unlink: ::c_long = 5000 + 85; -pub const SYS_symlink: ::c_long = 5000 + 86; -pub const SYS_readlink: ::c_long = 5000 + 87; -pub const SYS_chmod: ::c_long = 5000 + 88; -pub const SYS_fchmod: ::c_long = 5000 + 89; -pub const SYS_chown: ::c_long = 5000 + 90; -pub const SYS_fchown: ::c_long = 5000 + 91; -pub const SYS_lchown: ::c_long = 5000 + 92; -pub const SYS_umask: ::c_long = 5000 + 93; -pub const SYS_gettimeofday: ::c_long = 5000 + 94; -pub const SYS_getrlimit: ::c_long = 5000 + 95; -pub const SYS_getrusage: ::c_long = 5000 + 96; -pub const SYS_sysinfo: ::c_long = 5000 + 97; -pub const SYS_times: ::c_long = 5000 + 98; -pub const SYS_ptrace: ::c_long = 5000 + 99; -pub const SYS_getuid: ::c_long = 5000 + 100; -pub const SYS_syslog: ::c_long = 5000 + 101; -pub const SYS_getgid: ::c_long = 5000 + 102; -pub const SYS_setuid: ::c_long = 5000 + 103; -pub const SYS_setgid: ::c_long = 5000 + 104; -pub const SYS_geteuid: ::c_long = 5000 + 105; -pub const SYS_getegid: ::c_long = 5000 + 106; -pub const SYS_setpgid: ::c_long = 5000 + 107; -pub const SYS_getppid: ::c_long = 5000 + 108; -pub const SYS_getpgrp: ::c_long = 5000 + 109; -pub const SYS_setsid: ::c_long = 5000 + 110; -pub const SYS_setreuid: ::c_long = 5000 + 111; -pub const SYS_setregid: ::c_long = 5000 + 112; -pub const SYS_getgroups: ::c_long = 5000 + 113; -pub const SYS_setgroups: ::c_long = 5000 + 114; -pub const SYS_setresuid: ::c_long = 5000 + 115; -pub const SYS_getresuid: ::c_long = 5000 + 116; -pub const SYS_setresgid: ::c_long = 5000 + 117; -pub const SYS_getresgid: ::c_long = 5000 + 118; -pub const SYS_getpgid: ::c_long = 5000 + 119; -pub const SYS_setfsuid: ::c_long = 5000 + 120; -pub const SYS_setfsgid: ::c_long = 5000 + 121; -pub const SYS_getsid: ::c_long = 5000 + 122; -pub const SYS_capget: ::c_long = 5000 + 123; -pub const SYS_capset: ::c_long = 5000 + 124; -pub const SYS_rt_sigpending: ::c_long = 5000 + 125; -pub const SYS_rt_sigtimedwait: ::c_long = 5000 + 126; -pub const SYS_rt_sigqueueinfo: ::c_long = 5000 + 127; -pub const SYS_rt_sigsuspend: ::c_long = 5000 + 128; -pub const SYS_sigaltstack: ::c_long = 5000 + 129; -pub const SYS_utime: ::c_long = 5000 + 130; -pub const SYS_mknod: ::c_long = 5000 + 131; -pub const SYS_personality: ::c_long = 5000 + 132; -pub const SYS_ustat: ::c_long = 5000 + 133; -pub const SYS_statfs: ::c_long = 5000 + 134; -pub const SYS_fstatfs: ::c_long = 5000 + 135; -pub const SYS_sysfs: ::c_long = 5000 + 136; -pub const SYS_getpriority: ::c_long = 5000 + 137; -pub const SYS_setpriority: ::c_long = 5000 + 138; -pub const SYS_sched_setparam: ::c_long = 5000 + 139; -pub const SYS_sched_getparam: ::c_long = 5000 + 140; -pub const SYS_sched_setscheduler: ::c_long = 5000 + 141; -pub const SYS_sched_getscheduler: ::c_long = 5000 + 142; -pub const SYS_sched_get_priority_max: ::c_long = 5000 + 143; -pub const SYS_sched_get_priority_min: ::c_long = 5000 + 144; -pub const SYS_sched_rr_get_interval: ::c_long = 5000 + 145; -pub const SYS_mlock: ::c_long = 5000 + 146; -pub const SYS_munlock: ::c_long = 5000 + 147; -pub const SYS_mlockall: ::c_long = 5000 + 148; -pub const SYS_munlockall: ::c_long = 5000 + 149; -pub const SYS_vhangup: ::c_long = 5000 + 150; -pub const SYS_pivot_root: ::c_long = 5000 + 151; -pub const SYS__sysctl: ::c_long = 5000 + 152; -pub const SYS_prctl: ::c_long = 5000 + 153; -pub const SYS_adjtimex: ::c_long = 5000 + 154; -pub const SYS_setrlimit: ::c_long = 5000 + 155; -pub const SYS_chroot: ::c_long = 5000 + 156; -pub const SYS_sync: ::c_long = 5000 + 157; -pub const SYS_acct: ::c_long = 5000 + 158; -pub const SYS_settimeofday: ::c_long = 5000 + 159; -pub const SYS_mount: ::c_long = 5000 + 160; -pub const SYS_umount2: ::c_long = 5000 + 161; -pub const SYS_swapon: ::c_long = 5000 + 162; -pub const SYS_swapoff: ::c_long = 5000 + 163; -pub const SYS_reboot: ::c_long = 5000 + 164; -pub const SYS_sethostname: ::c_long = 5000 + 165; -pub const SYS_setdomainname: ::c_long = 5000 + 166; -pub const SYS_create_module: ::c_long = 5000 + 167; -pub const SYS_init_module: ::c_long = 5000 + 168; -pub const SYS_delete_module: ::c_long = 5000 + 169; -pub const SYS_get_kernel_syms: ::c_long = 5000 + 170; -pub const SYS_query_module: ::c_long = 5000 + 171; -pub const SYS_quotactl: ::c_long = 5000 + 172; -pub const SYS_nfsservctl: ::c_long = 5000 + 173; -pub const SYS_getpmsg: ::c_long = 5000 + 174; -pub const SYS_putpmsg: ::c_long = 5000 + 175; -pub const SYS_afs_syscall: ::c_long = 5000 + 176; -pub const SYS_gettid: ::c_long = 5000 + 178; -pub const SYS_readahead: ::c_long = 5000 + 179; -pub const SYS_setxattr: ::c_long = 5000 + 180; -pub const SYS_lsetxattr: ::c_long = 5000 + 181; -pub const SYS_fsetxattr: ::c_long = 5000 + 182; -pub const SYS_getxattr: ::c_long = 5000 + 183; -pub const SYS_lgetxattr: ::c_long = 5000 + 184; -pub const SYS_fgetxattr: ::c_long = 5000 + 185; -pub const SYS_listxattr: ::c_long = 5000 + 186; -pub const SYS_llistxattr: ::c_long = 5000 + 187; -pub const SYS_flistxattr: ::c_long = 5000 + 188; -pub const SYS_removexattr: ::c_long = 5000 + 189; -pub const SYS_lremovexattr: ::c_long = 5000 + 190; -pub const SYS_fremovexattr: ::c_long = 5000 + 191; -pub const SYS_tkill: ::c_long = 5000 + 192; -pub const SYS_futex: ::c_long = 5000 + 194; -pub const SYS_sched_setaffinity: ::c_long = 5000 + 195; -pub const SYS_sched_getaffinity: ::c_long = 5000 + 196; -pub const SYS_cacheflush: ::c_long = 5000 + 197; -pub const SYS_cachectl: ::c_long = 5000 + 198; -pub const SYS_sysmips: ::c_long = 5000 + 199; -pub const SYS_io_setup: ::c_long = 5000 + 200; -pub const SYS_io_destroy: ::c_long = 5000 + 201; -pub const SYS_io_getevents: ::c_long = 5000 + 202; -pub const SYS_io_submit: ::c_long = 5000 + 203; -pub const SYS_io_cancel: ::c_long = 5000 + 204; -pub const SYS_exit_group: ::c_long = 5000 + 205; -pub const SYS_lookup_dcookie: ::c_long = 5000 + 206; -pub const SYS_epoll_create: ::c_long = 5000 + 207; -pub const SYS_epoll_ctl: ::c_long = 5000 + 208; -pub const SYS_epoll_wait: ::c_long = 5000 + 209; -pub const SYS_remap_file_pages: ::c_long = 5000 + 210; -pub const SYS_rt_sigreturn: ::c_long = 5000 + 211; -pub const SYS_set_tid_address: ::c_long = 5000 + 212; -pub const SYS_restart_syscall: ::c_long = 5000 + 213; -pub const SYS_semtimedop: ::c_long = 5000 + 214; -pub const SYS_fadvise64: ::c_long = 5000 + 215; -pub const SYS_timer_create: ::c_long = 5000 + 216; -pub const SYS_timer_settime: ::c_long = 5000 + 217; -pub const SYS_timer_gettime: ::c_long = 5000 + 218; -pub const SYS_timer_getoverrun: ::c_long = 5000 + 219; -pub const SYS_timer_delete: ::c_long = 5000 + 220; -pub const SYS_clock_settime: ::c_long = 5000 + 221; -pub const SYS_clock_gettime: ::c_long = 5000 + 222; -pub const SYS_clock_getres: ::c_long = 5000 + 223; -pub const SYS_clock_nanosleep: ::c_long = 5000 + 224; -pub const SYS_tgkill: ::c_long = 5000 + 225; -pub const SYS_utimes: ::c_long = 5000 + 226; -pub const SYS_mbind: ::c_long = 5000 + 227; -pub const SYS_get_mempolicy: ::c_long = 5000 + 228; -pub const SYS_set_mempolicy: ::c_long = 5000 + 229; -pub const SYS_mq_open: ::c_long = 5000 + 230; -pub const SYS_mq_unlink: ::c_long = 5000 + 231; -pub const SYS_mq_timedsend: ::c_long = 5000 + 232; -pub const SYS_mq_timedreceive: ::c_long = 5000 + 233; -pub const SYS_mq_notify: ::c_long = 5000 + 234; -pub const SYS_mq_getsetattr: ::c_long = 5000 + 235; -pub const SYS_vserver: ::c_long = 5000 + 236; -pub const SYS_waitid: ::c_long = 5000 + 237; -/* pub const SYS_sys_setaltroot: ::c_long = 5000 + 238; */ -pub const SYS_add_key: ::c_long = 5000 + 239; -pub const SYS_request_key: ::c_long = 5000 + 240; -pub const SYS_keyctl: ::c_long = 5000 + 241; -pub const SYS_set_thread_area: ::c_long = 5000 + 242; -pub const SYS_inotify_init: ::c_long = 5000 + 243; -pub const SYS_inotify_add_watch: ::c_long = 5000 + 244; -pub const SYS_inotify_rm_watch: ::c_long = 5000 + 245; -pub const SYS_migrate_pages: ::c_long = 5000 + 246; -pub const SYS_openat: ::c_long = 5000 + 247; -pub const SYS_mkdirat: ::c_long = 5000 + 248; -pub const SYS_mknodat: ::c_long = 5000 + 249; -pub const SYS_fchownat: ::c_long = 5000 + 250; -pub const SYS_futimesat: ::c_long = 5000 + 251; -pub const SYS_newfstatat: ::c_long = 5000 + 252; -pub const SYS_unlinkat: ::c_long = 5000 + 253; -pub const SYS_renameat: ::c_long = 5000 + 254; -pub const SYS_linkat: ::c_long = 5000 + 255; -pub const SYS_symlinkat: ::c_long = 5000 + 256; -pub const SYS_readlinkat: ::c_long = 5000 + 257; -pub const SYS_fchmodat: ::c_long = 5000 + 258; -pub const SYS_faccessat: ::c_long = 5000 + 259; -pub const SYS_pselect6: ::c_long = 5000 + 260; -pub const SYS_ppoll: ::c_long = 5000 + 261; -pub const SYS_unshare: ::c_long = 5000 + 262; -pub const SYS_splice: ::c_long = 5000 + 263; -pub const SYS_sync_file_range: ::c_long = 5000 + 264; -pub const SYS_tee: ::c_long = 5000 + 265; -pub const SYS_vmsplice: ::c_long = 5000 + 266; -pub const SYS_move_pages: ::c_long = 5000 + 267; -pub const SYS_set_robust_list: ::c_long = 5000 + 268; -pub const SYS_get_robust_list: ::c_long = 5000 + 269; -pub const SYS_kexec_load: ::c_long = 5000 + 270; -pub const SYS_getcpu: ::c_long = 5000 + 271; -pub const SYS_epoll_pwait: ::c_long = 5000 + 272; -pub const SYS_ioprio_set: ::c_long = 5000 + 273; -pub const SYS_ioprio_get: ::c_long = 5000 + 274; -pub const SYS_utimensat: ::c_long = 5000 + 275; -pub const SYS_signalfd: ::c_long = 5000 + 276; -pub const SYS_timerfd: ::c_long = 5000 + 277; -pub const SYS_eventfd: ::c_long = 5000 + 278; -pub const SYS_fallocate: ::c_long = 5000 + 279; -pub const SYS_timerfd_create: ::c_long = 5000 + 280; -pub const SYS_timerfd_gettime: ::c_long = 5000 + 281; -pub const SYS_timerfd_settime: ::c_long = 5000 + 282; -pub const SYS_signalfd4: ::c_long = 5000 + 283; -pub const SYS_eventfd2: ::c_long = 5000 + 284; -pub const SYS_epoll_create1: ::c_long = 5000 + 285; -pub const SYS_dup3: ::c_long = 5000 + 286; -pub const SYS_pipe2: ::c_long = 5000 + 287; -pub const SYS_inotify_init1: ::c_long = 5000 + 288; -pub const SYS_preadv: ::c_long = 5000 + 289; -pub const SYS_pwritev: ::c_long = 5000 + 290; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 5000 + 291; -pub const SYS_perf_event_open: ::c_long = 5000 + 292; -pub const SYS_accept4: ::c_long = 5000 + 293; -pub const SYS_recvmmsg: ::c_long = 5000 + 294; -pub const SYS_fanotify_init: ::c_long = 5000 + 295; -pub const SYS_fanotify_mark: ::c_long = 5000 + 296; -pub const SYS_prlimit64: ::c_long = 5000 + 297; -pub const SYS_name_to_handle_at: ::c_long = 5000 + 298; -pub const SYS_open_by_handle_at: ::c_long = 5000 + 299; -pub const SYS_clock_adjtime: ::c_long = 5000 + 300; -pub const SYS_syncfs: ::c_long = 5000 + 301; -pub const SYS_sendmmsg: ::c_long = 5000 + 302; -pub const SYS_setns: ::c_long = 5000 + 303; -pub const SYS_process_vm_readv: ::c_long = 5000 + 304; -pub const SYS_process_vm_writev: ::c_long = 5000 + 305; -pub const SYS_kcmp: ::c_long = 5000 + 306; -pub const SYS_finit_module: ::c_long = 5000 + 307; -pub const SYS_getdents64: ::c_long = 5000 + 308; -pub const SYS_sched_setattr: ::c_long = 5000 + 309; -pub const SYS_sched_getattr: ::c_long = 5000 + 310; -pub const SYS_renameat2: ::c_long = 5000 + 311; -pub const SYS_seccomp: ::c_long = 5000 + 312; -pub const SYS_getrandom: ::c_long = 5000 + 313; -pub const SYS_memfd_create: ::c_long = 5000 + 314; -pub const SYS_bpf: ::c_long = 5000 + 315; -pub const SYS_execveat: ::c_long = 5000 + 316; -pub const SYS_userfaultfd: ::c_long = 5000 + 317; -pub const SYS_membarrier: ::c_long = 5000 + 318; -pub const SYS_mlock2: ::c_long = 5000 + 319; -pub const SYS_copy_file_range: ::c_long = 5000 + 320; -pub const SYS_preadv2: ::c_long = 5000 + 321; -pub const SYS_pwritev2: ::c_long = 5000 + 322; -pub const SYS_pkey_mprotect: ::c_long = 5000 + 323; -pub const SYS_pkey_alloc: ::c_long = 5000 + 324; -pub const SYS_pkey_free: ::c_long = 5000 + 325; -pub const SYS_statx: ::c_long = 5000 + 326; -pub const SYS_rseq: ::c_long = 5000 + 327; -pub const SYS_pidfd_send_signal: ::c_long = 5000 + 424; -pub const SYS_io_uring_setup: ::c_long = 5000 + 425; -pub const SYS_io_uring_enter: ::c_long = 5000 + 426; -pub const SYS_io_uring_register: ::c_long = 5000 + 427; -pub const SYS_open_tree: ::c_long = 5000 + 428; -pub const SYS_move_mount: ::c_long = 5000 + 429; -pub const SYS_fsopen: ::c_long = 5000 + 430; -pub const SYS_fsconfig: ::c_long = 5000 + 431; -pub const SYS_fsmount: ::c_long = 5000 + 432; -pub const SYS_fspick: ::c_long = 5000 + 433; -pub const SYS_pidfd_open: ::c_long = 5000 + 434; -pub const SYS_clone3: ::c_long = 5000 + 435; -pub const SYS_close_range: ::c_long = 5000 + 436; -pub const SYS_openat2: ::c_long = 5000 + 437; -pub const SYS_pidfd_getfd: ::c_long = 5000 + 438; -pub const SYS_faccessat2: ::c_long = 5000 + 439; -pub const SYS_process_madvise: ::c_long = 5000 + 440; -pub const SYS_epoll_pwait2: ::c_long = 5000 + 441; -pub const SYS_mount_setattr: ::c_long = 5000 + 442; -pub const SYS_quotactl_fd: ::c_long = 5000 + 443; -pub const SYS_landlock_create_ruleset: ::c_long = 5000 + 444; -pub const SYS_landlock_add_rule: ::c_long = 5000 + 445; -pub const SYS_landlock_restrict_self: ::c_long = 5000 + 446; -pub const SYS_memfd_secret: ::c_long = 5000 + 447; -pub const SYS_process_mrelease: ::c_long = 5000 + 448; -pub const SYS_futex_waitv: ::c_long = 5000 + 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 5000 + 450; - -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const SYS_read: c_long = 5000 + 0; +pub const SYS_write: c_long = 5000 + 1; +pub const SYS_open: c_long = 5000 + 2; +pub const SYS_close: c_long = 5000 + 3; +pub const SYS_stat: c_long = 5000 + 4; +pub const SYS_fstat: c_long = 5000 + 5; +pub const SYS_lstat: c_long = 5000 + 6; +pub const SYS_poll: c_long = 5000 + 7; +pub const SYS_lseek: c_long = 5000 + 8; +pub const SYS_mmap: c_long = 5000 + 9; +pub const SYS_mprotect: c_long = 5000 + 10; +pub const SYS_munmap: c_long = 5000 + 11; +pub const SYS_brk: c_long = 5000 + 12; +pub const SYS_rt_sigaction: c_long = 5000 + 13; +pub const SYS_rt_sigprocmask: c_long = 5000 + 14; +pub const SYS_ioctl: c_long = 5000 + 15; +pub const SYS_pread64: c_long = 5000 + 16; +pub const SYS_pwrite64: c_long = 5000 + 17; +pub const SYS_readv: c_long = 5000 + 18; +pub const SYS_writev: c_long = 5000 + 19; +pub const SYS_access: c_long = 5000 + 20; +pub const SYS_pipe: c_long = 5000 + 21; +pub const SYS__newselect: c_long = 5000 + 22; +pub const SYS_sched_yield: c_long = 5000 + 23; +pub const SYS_mremap: c_long = 5000 + 24; +pub const SYS_msync: c_long = 5000 + 25; +pub const SYS_mincore: c_long = 5000 + 26; +pub const SYS_madvise: c_long = 5000 + 27; +pub const SYS_shmget: c_long = 5000 + 28; +pub const SYS_shmat: c_long = 5000 + 29; +pub const SYS_shmctl: c_long = 5000 + 30; +pub const SYS_dup: c_long = 5000 + 31; +pub const SYS_dup2: c_long = 5000 + 32; +pub const SYS_pause: c_long = 5000 + 33; +pub const SYS_nanosleep: c_long = 5000 + 34; +pub const SYS_getitimer: c_long = 5000 + 35; +pub const SYS_setitimer: c_long = 5000 + 36; +pub const SYS_alarm: c_long = 5000 + 37; +pub const SYS_getpid: c_long = 5000 + 38; +pub const SYS_sendfile: c_long = 5000 + 39; +pub const SYS_socket: c_long = 5000 + 40; +pub const SYS_connect: c_long = 5000 + 41; +pub const SYS_accept: c_long = 5000 + 42; +pub const SYS_sendto: c_long = 5000 + 43; +pub const SYS_recvfrom: c_long = 5000 + 44; +pub const SYS_sendmsg: c_long = 5000 + 45; +pub const SYS_recvmsg: c_long = 5000 + 46; +pub const SYS_shutdown: c_long = 5000 + 47; +pub const SYS_bind: c_long = 5000 + 48; +pub const SYS_listen: c_long = 5000 + 49; +pub const SYS_getsockname: c_long = 5000 + 50; +pub const SYS_getpeername: c_long = 5000 + 51; +pub const SYS_socketpair: c_long = 5000 + 52; +pub const SYS_setsockopt: c_long = 5000 + 53; +pub const SYS_getsockopt: c_long = 5000 + 54; +pub const SYS_clone: c_long = 5000 + 55; +pub const SYS_fork: c_long = 5000 + 56; +pub const SYS_execve: c_long = 5000 + 57; +pub const SYS_exit: c_long = 5000 + 58; +pub const SYS_wait4: c_long = 5000 + 59; +pub const SYS_kill: c_long = 5000 + 60; +pub const SYS_uname: c_long = 5000 + 61; +pub const SYS_semget: c_long = 5000 + 62; +pub const SYS_semop: c_long = 5000 + 63; +pub const SYS_semctl: c_long = 5000 + 64; +pub const SYS_shmdt: c_long = 5000 + 65; +pub const SYS_msgget: c_long = 5000 + 66; +pub const SYS_msgsnd: c_long = 5000 + 67; +pub const SYS_msgrcv: c_long = 5000 + 68; +pub const SYS_msgctl: c_long = 5000 + 69; +pub const SYS_fcntl: c_long = 5000 + 70; +pub const SYS_flock: c_long = 5000 + 71; +pub const SYS_fsync: c_long = 5000 + 72; +pub const SYS_fdatasync: c_long = 5000 + 73; +pub const SYS_truncate: c_long = 5000 + 74; +pub const SYS_ftruncate: c_long = 5000 + 75; +pub const SYS_getdents: c_long = 5000 + 76; +pub const SYS_getcwd: c_long = 5000 + 77; +pub const SYS_chdir: c_long = 5000 + 78; +pub const SYS_fchdir: c_long = 5000 + 79; +pub const SYS_rename: c_long = 5000 + 80; +pub const SYS_mkdir: c_long = 5000 + 81; +pub const SYS_rmdir: c_long = 5000 + 82; +pub const SYS_creat: c_long = 5000 + 83; +pub const SYS_link: c_long = 5000 + 84; +pub const SYS_unlink: c_long = 5000 + 85; +pub const SYS_symlink: c_long = 5000 + 86; +pub const SYS_readlink: c_long = 5000 + 87; +pub const SYS_chmod: c_long = 5000 + 88; +pub const SYS_fchmod: c_long = 5000 + 89; +pub const SYS_chown: c_long = 5000 + 90; +pub const SYS_fchown: c_long = 5000 + 91; +pub const SYS_lchown: c_long = 5000 + 92; +pub const SYS_umask: c_long = 5000 + 93; +pub const SYS_gettimeofday: c_long = 5000 + 94; +pub const SYS_getrlimit: c_long = 5000 + 95; +pub const SYS_getrusage: c_long = 5000 + 96; +pub const SYS_sysinfo: c_long = 5000 + 97; +pub const SYS_times: c_long = 5000 + 98; +pub const SYS_ptrace: c_long = 5000 + 99; +pub const SYS_getuid: c_long = 5000 + 100; +pub const SYS_syslog: c_long = 5000 + 101; +pub const SYS_getgid: c_long = 5000 + 102; +pub const SYS_setuid: c_long = 5000 + 103; +pub const SYS_setgid: c_long = 5000 + 104; +pub const SYS_geteuid: c_long = 5000 + 105; +pub const SYS_getegid: c_long = 5000 + 106; +pub const SYS_setpgid: c_long = 5000 + 107; +pub const SYS_getppid: c_long = 5000 + 108; +pub const SYS_getpgrp: c_long = 5000 + 109; +pub const SYS_setsid: c_long = 5000 + 110; +pub const SYS_setreuid: c_long = 5000 + 111; +pub const SYS_setregid: c_long = 5000 + 112; +pub const SYS_getgroups: c_long = 5000 + 113; +pub const SYS_setgroups: c_long = 5000 + 114; +pub const SYS_setresuid: c_long = 5000 + 115; +pub const SYS_getresuid: c_long = 5000 + 116; +pub const SYS_setresgid: c_long = 5000 + 117; +pub const SYS_getresgid: c_long = 5000 + 118; +pub const SYS_getpgid: c_long = 5000 + 119; +pub const SYS_setfsuid: c_long = 5000 + 120; +pub const SYS_setfsgid: c_long = 5000 + 121; +pub const SYS_getsid: c_long = 5000 + 122; +pub const SYS_capget: c_long = 5000 + 123; +pub const SYS_capset: c_long = 5000 + 124; +pub const SYS_rt_sigpending: c_long = 5000 + 125; +pub const SYS_rt_sigtimedwait: c_long = 5000 + 126; +pub const SYS_rt_sigqueueinfo: c_long = 5000 + 127; +pub const SYS_rt_sigsuspend: c_long = 5000 + 128; +pub const SYS_sigaltstack: c_long = 5000 + 129; +pub const SYS_utime: c_long = 5000 + 130; +pub const SYS_mknod: c_long = 5000 + 131; +pub const SYS_personality: c_long = 5000 + 132; +pub const SYS_ustat: c_long = 5000 + 133; +pub const SYS_statfs: c_long = 5000 + 134; +pub const SYS_fstatfs: c_long = 5000 + 135; +pub const SYS_sysfs: c_long = 5000 + 136; +pub const SYS_getpriority: c_long = 5000 + 137; +pub const SYS_setpriority: c_long = 5000 + 138; +pub const SYS_sched_setparam: c_long = 5000 + 139; +pub const SYS_sched_getparam: c_long = 5000 + 140; +pub const SYS_sched_setscheduler: c_long = 5000 + 141; +pub const SYS_sched_getscheduler: c_long = 5000 + 142; +pub const SYS_sched_get_priority_max: c_long = 5000 + 143; +pub const SYS_sched_get_priority_min: c_long = 5000 + 144; +pub const SYS_sched_rr_get_interval: c_long = 5000 + 145; +pub const SYS_mlock: c_long = 5000 + 146; +pub const SYS_munlock: c_long = 5000 + 147; +pub const SYS_mlockall: c_long = 5000 + 148; +pub const SYS_munlockall: c_long = 5000 + 149; +pub const SYS_vhangup: c_long = 5000 + 150; +pub const SYS_pivot_root: c_long = 5000 + 151; +pub const SYS__sysctl: c_long = 5000 + 152; +pub const SYS_prctl: c_long = 5000 + 153; +pub const SYS_adjtimex: c_long = 5000 + 154; +pub const SYS_setrlimit: c_long = 5000 + 155; +pub const SYS_chroot: c_long = 5000 + 156; +pub const SYS_sync: c_long = 5000 + 157; +pub const SYS_acct: c_long = 5000 + 158; +pub const SYS_settimeofday: c_long = 5000 + 159; +pub const SYS_mount: c_long = 5000 + 160; +pub const SYS_umount2: c_long = 5000 + 161; +pub const SYS_swapon: c_long = 5000 + 162; +pub const SYS_swapoff: c_long = 5000 + 163; +pub const SYS_reboot: c_long = 5000 + 164; +pub const SYS_sethostname: c_long = 5000 + 165; +pub const SYS_setdomainname: c_long = 5000 + 166; +pub const SYS_create_module: c_long = 5000 + 167; +pub const SYS_init_module: c_long = 5000 + 168; +pub const SYS_delete_module: c_long = 5000 + 169; +pub const SYS_get_kernel_syms: c_long = 5000 + 170; +pub const SYS_query_module: c_long = 5000 + 171; +pub const SYS_quotactl: c_long = 5000 + 172; +pub const SYS_nfsservctl: c_long = 5000 + 173; +pub const SYS_getpmsg: c_long = 5000 + 174; +pub const SYS_putpmsg: c_long = 5000 + 175; +pub const SYS_afs_syscall: c_long = 5000 + 176; +pub const SYS_gettid: c_long = 5000 + 178; +pub const SYS_readahead: c_long = 5000 + 179; +pub const SYS_setxattr: c_long = 5000 + 180; +pub const SYS_lsetxattr: c_long = 5000 + 181; +pub const SYS_fsetxattr: c_long = 5000 + 182; +pub const SYS_getxattr: c_long = 5000 + 183; +pub const SYS_lgetxattr: c_long = 5000 + 184; +pub const SYS_fgetxattr: c_long = 5000 + 185; +pub const SYS_listxattr: c_long = 5000 + 186; +pub const SYS_llistxattr: c_long = 5000 + 187; +pub const SYS_flistxattr: c_long = 5000 + 188; +pub const SYS_removexattr: c_long = 5000 + 189; +pub const SYS_lremovexattr: c_long = 5000 + 190; +pub const SYS_fremovexattr: c_long = 5000 + 191; +pub const SYS_tkill: c_long = 5000 + 192; +pub const SYS_futex: c_long = 5000 + 194; +pub const SYS_sched_setaffinity: c_long = 5000 + 195; +pub const SYS_sched_getaffinity: c_long = 5000 + 196; +pub const SYS_cacheflush: c_long = 5000 + 197; +pub const SYS_cachectl: c_long = 5000 + 198; +pub const SYS_sysmips: c_long = 5000 + 199; +pub const SYS_io_setup: c_long = 5000 + 200; +pub const SYS_io_destroy: c_long = 5000 + 201; +pub const SYS_io_getevents: c_long = 5000 + 202; +pub const SYS_io_submit: c_long = 5000 + 203; +pub const SYS_io_cancel: c_long = 5000 + 204; +pub const SYS_exit_group: c_long = 5000 + 205; +pub const SYS_lookup_dcookie: c_long = 5000 + 206; +pub const SYS_epoll_create: c_long = 5000 + 207; +pub const SYS_epoll_ctl: c_long = 5000 + 208; +pub const SYS_epoll_wait: c_long = 5000 + 209; +pub const SYS_remap_file_pages: c_long = 5000 + 210; +pub const SYS_rt_sigreturn: c_long = 5000 + 211; +pub const SYS_set_tid_address: c_long = 5000 + 212; +pub const SYS_restart_syscall: c_long = 5000 + 213; +pub const SYS_semtimedop: c_long = 5000 + 214; +pub const SYS_fadvise64: c_long = 5000 + 215; +pub const SYS_timer_create: c_long = 5000 + 216; +pub const SYS_timer_settime: c_long = 5000 + 217; +pub const SYS_timer_gettime: c_long = 5000 + 218; +pub const SYS_timer_getoverrun: c_long = 5000 + 219; +pub const SYS_timer_delete: c_long = 5000 + 220; +pub const SYS_clock_settime: c_long = 5000 + 221; +pub const SYS_clock_gettime: c_long = 5000 + 222; +pub const SYS_clock_getres: c_long = 5000 + 223; +pub const SYS_clock_nanosleep: c_long = 5000 + 224; +pub const SYS_tgkill: c_long = 5000 + 225; +pub const SYS_utimes: c_long = 5000 + 226; +pub const SYS_mbind: c_long = 5000 + 227; +pub const SYS_get_mempolicy: c_long = 5000 + 228; +pub const SYS_set_mempolicy: c_long = 5000 + 229; +pub const SYS_mq_open: c_long = 5000 + 230; +pub const SYS_mq_unlink: c_long = 5000 + 231; +pub const SYS_mq_timedsend: c_long = 5000 + 232; +pub const SYS_mq_timedreceive: c_long = 5000 + 233; +pub const SYS_mq_notify: c_long = 5000 + 234; +pub const SYS_mq_getsetattr: c_long = 5000 + 235; +pub const SYS_vserver: c_long = 5000 + 236; +pub const SYS_waitid: c_long = 5000 + 237; +/* pub const SYS_sys_setaltroot: c_long = 5000 + 238; */ +pub const SYS_add_key: c_long = 5000 + 239; +pub const SYS_request_key: c_long = 5000 + 240; +pub const SYS_keyctl: c_long = 5000 + 241; +pub const SYS_set_thread_area: c_long = 5000 + 242; +pub const SYS_inotify_init: c_long = 5000 + 243; +pub const SYS_inotify_add_watch: c_long = 5000 + 244; +pub const SYS_inotify_rm_watch: c_long = 5000 + 245; +pub const SYS_migrate_pages: c_long = 5000 + 246; +pub const SYS_openat: c_long = 5000 + 247; +pub const SYS_mkdirat: c_long = 5000 + 248; +pub const SYS_mknodat: c_long = 5000 + 249; +pub const SYS_fchownat: c_long = 5000 + 250; +pub const SYS_futimesat: c_long = 5000 + 251; +pub const SYS_newfstatat: c_long = 5000 + 252; +pub const SYS_unlinkat: c_long = 5000 + 253; +pub const SYS_renameat: c_long = 5000 + 254; +pub const SYS_linkat: c_long = 5000 + 255; +pub const SYS_symlinkat: c_long = 5000 + 256; +pub const SYS_readlinkat: c_long = 5000 + 257; +pub const SYS_fchmodat: c_long = 5000 + 258; +pub const SYS_faccessat: c_long = 5000 + 259; +pub const SYS_pselect6: c_long = 5000 + 260; +pub const SYS_ppoll: c_long = 5000 + 261; +pub const SYS_unshare: c_long = 5000 + 262; +pub const SYS_splice: c_long = 5000 + 263; +pub const SYS_sync_file_range: c_long = 5000 + 264; +pub const SYS_tee: c_long = 5000 + 265; +pub const SYS_vmsplice: c_long = 5000 + 266; +pub const SYS_move_pages: c_long = 5000 + 267; +pub const SYS_set_robust_list: c_long = 5000 + 268; +pub const SYS_get_robust_list: c_long = 5000 + 269; +pub const SYS_kexec_load: c_long = 5000 + 270; +pub const SYS_getcpu: c_long = 5000 + 271; +pub const SYS_epoll_pwait: c_long = 5000 + 272; +pub const SYS_ioprio_set: c_long = 5000 + 273; +pub const SYS_ioprio_get: c_long = 5000 + 274; +pub const SYS_utimensat: c_long = 5000 + 275; +pub const SYS_signalfd: c_long = 5000 + 276; +pub const SYS_timerfd: c_long = 5000 + 277; +pub const SYS_eventfd: c_long = 5000 + 278; +pub const SYS_fallocate: c_long = 5000 + 279; +pub const SYS_timerfd_create: c_long = 5000 + 280; +pub const SYS_timerfd_gettime: c_long = 5000 + 281; +pub const SYS_timerfd_settime: c_long = 5000 + 282; +pub const SYS_signalfd4: c_long = 5000 + 283; +pub const SYS_eventfd2: c_long = 5000 + 284; +pub const SYS_epoll_create1: c_long = 5000 + 285; +pub const SYS_dup3: c_long = 5000 + 286; +pub const SYS_pipe2: c_long = 5000 + 287; +pub const SYS_inotify_init1: c_long = 5000 + 288; +pub const SYS_preadv: c_long = 5000 + 289; +pub const SYS_pwritev: c_long = 5000 + 290; +pub const SYS_rt_tgsigqueueinfo: c_long = 5000 + 291; +pub const SYS_perf_event_open: c_long = 5000 + 292; +pub const SYS_accept4: c_long = 5000 + 293; +pub const SYS_recvmmsg: c_long = 5000 + 294; +pub const SYS_fanotify_init: c_long = 5000 + 295; +pub const SYS_fanotify_mark: c_long = 5000 + 296; +pub const SYS_prlimit64: c_long = 5000 + 297; +pub const SYS_name_to_handle_at: c_long = 5000 + 298; +pub const SYS_open_by_handle_at: c_long = 5000 + 299; +pub const SYS_clock_adjtime: c_long = 5000 + 300; +pub const SYS_syncfs: c_long = 5000 + 301; +pub const SYS_sendmmsg: c_long = 5000 + 302; +pub const SYS_setns: c_long = 5000 + 303; +pub const SYS_process_vm_readv: c_long = 5000 + 304; +pub const SYS_process_vm_writev: c_long = 5000 + 305; +pub const SYS_kcmp: c_long = 5000 + 306; +pub const SYS_finit_module: c_long = 5000 + 307; +pub const SYS_getdents64: c_long = 5000 + 308; +pub const SYS_sched_setattr: c_long = 5000 + 309; +pub const SYS_sched_getattr: c_long = 5000 + 310; +pub const SYS_renameat2: c_long = 5000 + 311; +pub const SYS_seccomp: c_long = 5000 + 312; +pub const SYS_getrandom: c_long = 5000 + 313; +pub const SYS_memfd_create: c_long = 5000 + 314; +pub const SYS_bpf: c_long = 5000 + 315; +pub const SYS_execveat: c_long = 5000 + 316; +pub const SYS_userfaultfd: c_long = 5000 + 317; +pub const SYS_membarrier: c_long = 5000 + 318; +pub const SYS_mlock2: c_long = 5000 + 319; +pub const SYS_copy_file_range: c_long = 5000 + 320; +pub const SYS_preadv2: c_long = 5000 + 321; +pub const SYS_pwritev2: c_long = 5000 + 322; +pub const SYS_pkey_mprotect: c_long = 5000 + 323; +pub const SYS_pkey_alloc: c_long = 5000 + 324; +pub const SYS_pkey_free: c_long = 5000 + 325; +pub const SYS_statx: c_long = 5000 + 326; +pub const SYS_rseq: c_long = 5000 + 327; +pub const SYS_pidfd_send_signal: c_long = 5000 + 424; +pub const SYS_io_uring_setup: c_long = 5000 + 425; +pub const SYS_io_uring_enter: c_long = 5000 + 426; +pub const SYS_io_uring_register: c_long = 5000 + 427; +pub const SYS_open_tree: c_long = 5000 + 428; +pub const SYS_move_mount: c_long = 5000 + 429; +pub const SYS_fsopen: c_long = 5000 + 430; +pub const SYS_fsconfig: c_long = 5000 + 431; +pub const SYS_fsmount: c_long = 5000 + 432; +pub const SYS_fspick: c_long = 5000 + 433; +pub const SYS_pidfd_open: c_long = 5000 + 434; +pub const SYS_clone3: c_long = 5000 + 435; +pub const SYS_close_range: c_long = 5000 + 436; +pub const SYS_openat2: c_long = 5000 + 437; +pub const SYS_pidfd_getfd: c_long = 5000 + 438; +pub const SYS_faccessat2: c_long = 5000 + 439; +pub const SYS_process_madvise: c_long = 5000 + 440; +pub const SYS_epoll_pwait2: c_long = 5000 + 441; +pub const SYS_mount_setattr: c_long = 5000 + 442; +pub const SYS_quotactl_fd: c_long = 5000 + 443; +pub const SYS_landlock_create_ruleset: c_long = 5000 + 444; +pub const SYS_landlock_add_rule: c_long = 5000 + 445; +pub const SYS_landlock_restrict_self: c_long = 5000 + 446; +pub const SYS_memfd_secret: c_long = 5000 + 447; +pub const SYS_process_mrelease: c_long = 5000 + 448; +pub const SYS_futex_waitv: c_long = 5000 + 449; +pub const SYS_set_mempolicy_home_node: c_long = 5000 + 450; + +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; - -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_CLOEXEC: ::c_int = 0x80000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; - -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; - -pub const O_DIRECT: ::c_int = 0x8000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; - -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_NONBLOCK: ::c_int = 128; -pub const O_SYNC: ::c_int = 0x4010; -pub const O_RSYNC: ::c_int = 0x4010; -pub const O_DSYNC: ::c_int = 0x10; -pub const O_FSYNC: ::c_int = 0x4010; -pub const O_ASYNC: ::c_int = 0x1000; -pub const O_NDELAY: ::c_int = 0x80; - -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const ERFKILL: ::c_int = 167; - -pub const MAP_NORESERVE: ::c_int = 0x400; -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_ANONYMOUS: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; -pub const MAP_STACK: ::c_int = 0x40000; -pub const MAP_HUGETLB: ::c_int = 0x080000; - -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000008; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; - -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 22; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; - -pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLWRBAND: ::c_short = 0x100; +pub const O_TRUNC: c_int = 512; + +pub const O_NOATIME: c_int = 0o1000000; +pub const O_CLOEXEC: c_int = 0x80000; +pub const O_PATH: c_int = 0o10000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; + +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; + +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; + +pub const EPOLL_CLOEXEC: c_int = 0x80000; + +pub const EFD_CLOEXEC: c_int = 0x80000; + +pub const O_DIRECT: c_int = 0x8000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; + +pub const O_APPEND: c_int = 8; +pub const O_CREAT: c_int = 256; +pub const O_EXCL: c_int = 1024; +pub const O_NOCTTY: c_int = 2048; +pub const O_NONBLOCK: c_int = 128; +pub const O_SYNC: c_int = 0x4010; +pub const O_RSYNC: c_int = 0x4010; +pub const O_DSYNC: c_int = 0x10; +pub const O_FSYNC: c_int = 0x4010; +pub const O_ASYNC: c_int = 0x1000; +pub const O_NDELAY: c_int = 0x80; + +pub const EDEADLK: c_int = 45; +pub const ENAMETOOLONG: c_int = 78; +pub const ENOLCK: c_int = 46; +pub const ENOSYS: c_int = 89; +pub const ENOTEMPTY: c_int = 93; +pub const ELOOP: c_int = 90; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EDEADLOCK: c_int = 56; +pub const EMULTIHOP: c_int = 74; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EBADMSG: c_int = 77; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const EUSERS: c_int = 94; +pub const ENOTSOCK: c_int = 95; +pub const EDESTADDRREQ: c_int = 96; +pub const EMSGSIZE: c_int = 97; +pub const EPROTOTYPE: c_int = 98; +pub const ENOPROTOOPT: c_int = 99; +pub const EPROTONOSUPPORT: c_int = 120; +pub const ESOCKTNOSUPPORT: c_int = 121; +pub const EOPNOTSUPP: c_int = 122; +pub const EPFNOSUPPORT: c_int = 123; +pub const EAFNOSUPPORT: c_int = 124; +pub const EADDRINUSE: c_int = 125; +pub const EADDRNOTAVAIL: c_int = 126; +pub const ENETDOWN: c_int = 127; +pub const ENETUNREACH: c_int = 128; +pub const ENETRESET: c_int = 129; +pub const ECONNABORTED: c_int = 130; +pub const ECONNRESET: c_int = 131; +pub const ENOBUFS: c_int = 132; +pub const EISCONN: c_int = 133; +pub const ENOTCONN: c_int = 134; +pub const ESHUTDOWN: c_int = 143; +pub const ETOOMANYREFS: c_int = 144; +pub const ETIMEDOUT: c_int = 145; +pub const ECONNREFUSED: c_int = 146; +pub const EHOSTDOWN: c_int = 147; +pub const EHOSTUNREACH: c_int = 148; +pub const EALREADY: c_int = 149; +pub const EINPROGRESS: c_int = 150; +pub const ESTALE: c_int = 151; +pub const EUCLEAN: c_int = 135; +pub const ENOTNAM: c_int = 137; +pub const ENAVAIL: c_int = 138; +pub const EISNAM: c_int = 139; +pub const EREMOTEIO: c_int = 140; +pub const EDQUOT: c_int = 1133; +pub const ENOMEDIUM: c_int = 159; +pub const EMEDIUMTYPE: c_int = 160; +pub const ECANCELED: c_int = 158; +pub const ENOKEY: c_int = 161; +pub const EKEYEXPIRED: c_int = 162; +pub const EKEYREVOKED: c_int = 163; +pub const EKEYREJECTED: c_int = 164; +pub const EOWNERDEAD: c_int = 165; +pub const ENOTRECOVERABLE: c_int = 166; +pub const ERFKILL: c_int = 167; + +pub const MAP_NORESERVE: c_int = 0x400; +pub const MAP_ANON: c_int = 0x800; +pub const MAP_ANONYMOUS: c_int = 0x800; +pub const MAP_GROWSDOWN: c_int = 0x1000; +pub const MAP_DENYWRITE: c_int = 0x2000; +pub const MAP_EXECUTABLE: c_int = 0x4000; +pub const MAP_LOCKED: c_int = 0x8000; +pub const MAP_POPULATE: c_int = 0x10000; +pub const MAP_NONBLOCK: c_int = 0x20000; +pub const MAP_STACK: c_int = 0x40000; +pub const MAP_HUGETLB: c_int = 0x080000; + +pub const SOCK_STREAM: c_int = 2; +pub const SOCK_DGRAM: c_int = 1; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000008; +pub const SA_NOCLDWAIT: c_int = 0x00010000; + +pub const SIGCHLD: c_int = 18; +pub const SIGBUS: c_int = 10; +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGWINCH: c_int = 20; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGCONT: c_int = 25; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGURG: c_int = 21; +pub const SIGIO: c_int = 22; +pub const SIGSYS: c_int = 12; +pub const SIGPOLL: c_int = 22; +pub const SIGPWR: c_int = 19; +pub const SIG_SETMASK: c_int = 3; +pub const SIG_BLOCK: c_int = 0x1; +pub const SIG_UNBLOCK: c_int = 0x2; + +pub const POLLWRNORM: c_short = 0x004; +pub const POLLWRBAND: c_short = 0x100; pub const VEOF: usize = 16; pub const VEOL: usize = 17; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x00000100; -pub const TOSTOP: ::tcflag_t = 0x00008000; -pub const FLUSHO: ::tcflag_t = 0x00002000; -pub const EXTPROC: ::tcflag_t = 0o200000; -pub const TCSANOW: ::c_int = 0x540e; -pub const TCSADRAIN: ::c_int = 0x540f; -pub const TCSAFLUSH: ::c_int = 0x5410; - -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_DETACH: ::c_uint = 17; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; - -pub const EFD_NONBLOCK: ::c_int = 0x80; - -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; -pub const F_GETLK: ::c_int = 14; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETOWN: ::c_int = 24; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; - -pub const SFD_NONBLOCK: ::c_int = 0x80; - -pub const RTLD_DEEPBIND: ::c_int = 0x10; -pub const RTLD_GLOBAL: ::c_int = 0x4; -pub const RTLD_NOLOAD: ::c_int = 0x8; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const IEXTEN: crate::tcflag_t = 0x00000100; +pub const TOSTOP: crate::tcflag_t = 0x00008000; +pub const FLUSHO: crate::tcflag_t = 0x00002000; +pub const EXTPROC: crate::tcflag_t = 0o200000; +pub const TCSANOW: c_int = 0x540e; +pub const TCSADRAIN: c_int = 0x540f; +pub const TCSAFLUSH: c_int = 0x5410; + +pub const PTRACE_GETFPREGS: c_uint = 14; +pub const PTRACE_SETFPREGS: c_uint = 15; +pub const PTRACE_DETACH: c_uint = 17; +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; +pub const PTRACE_GETREGS: c_uint = 12; +pub const PTRACE_SETREGS: c_uint = 13; + +pub const EFD_NONBLOCK: c_int = 0x80; + +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; +pub const F_GETLK: c_int = 14; +pub const F_GETOWN: c_int = 23; +pub const F_SETOWN: c_int = 24; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; + +pub const SFD_NONBLOCK: c_int = 0x80; + +pub const RTLD_DEEPBIND: c_int = 0x10; +pub const RTLD_GLOBAL: c_int = 0x4; +pub const RTLD_NOLOAD: c_int = 0x8; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -844,84 +844,84 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; - -pub const EHWPOISON: ::c_int = 168; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; + +pub const EHWPOISON: c_int = 168; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; } diff --git a/src/unix/linux_like/linux/gnu/b64/mod.rs b/src/unix/linux_like/linux/gnu/b64/mod.rs index b703800503139..6d2927a465241 100644 --- a/src/unix/linux_like/linux/gnu/b64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/mod.rs @@ -1,5 +1,7 @@ //! 64-bit specific definitions for linux-like values +use crate::{c_int, c_uint, c_ushort}; + pub type ino_t = u64; pub type off_t = i64; pub type blkcnt_t = i64; @@ -10,9 +12,9 @@ pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; pub type rlim_t = u64; #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] -pub type __syscall_ulong_t = ::c_ulonglong; +pub type __syscall_ulong_t = crate::c_ulonglong; #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] -pub type __syscall_ulong_t = ::c_ulong; +pub type __syscall_ulong_t = c_ulong; cfg_if! { if #[cfg(all(target_arch = "aarch64", target_pointer_width = "32"))] { @@ -43,31 +45,31 @@ s! { pub bufferram: u64, pub totalswap: u64, pub freeswap: u64, - pub procs: ::c_ushort, - pub pad: ::c_ushort, + pub procs: c_ushort, + pub pad: c_ushort, pub totalhigh: u64, pub freehigh: u64, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 0], + pub mem_unit: c_uint, + pub _f: [c_char; 0], } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, __msg_cbytes: u64, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, __glibc_reserved4: u64, __glibc_reserved5: u64, } pub struct semid_ds { pub sem_perm: ipc_perm, - pub sem_otime: ::time_t, + pub sem_otime: crate::time_t, #[cfg(not(any( target_arch = "aarch64", target_arch = "loongarch64", @@ -77,8 +79,8 @@ s! { target_arch = "riscv64", target_arch = "sparc64" )))] - __reserved: ::__syscall_ulong_t, - pub sem_ctime: ::time_t, + __reserved: crate::__syscall_ulong_t, + pub sem_ctime: crate::time_t, #[cfg(not(any( target_arch = "aarch64", target_arch = "loongarch64", @@ -88,16 +90,16 @@ s! { target_arch = "riscv64", target_arch = "sparc64" )))] - __reserved2: ::__syscall_ulong_t, - pub sem_nsems: ::__syscall_ulong_t, - __glibc_reserved3: ::__syscall_ulong_t, - __glibc_reserved4: ::__syscall_ulong_t, + __reserved2: crate::__syscall_ulong_t, + pub sem_nsems: crate::__syscall_ulong_t, + __glibc_reserved3: crate::__syscall_ulong_t, + __glibc_reserved4: crate::__syscall_ulong_t, } } pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; -pub const O_LARGEFILE: ::c_int = 0; +pub const O_LARGEFILE: c_int = 0; cfg_if! { if #[cfg(target_arch = "aarch64")] { diff --git a/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs index d9b80fa0ef530..3cfdf2fa8a88d 100644 --- a/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/powerpc64/mod.rs @@ -1,6 +1,6 @@ //! PowerPC64-specific definitions for 64-bit linux-like values -use pthread_mutex_t; +use crate::{c_int, c_short, c_uint, c_void, off64_t, off_t, pthread_mutex_t, size_t}; pub type c_long = i64; pub type c_ulong = u64; @@ -9,136 +9,136 @@ pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = i64; pub type suseconds_t = i64; -pub type __u64 = ::c_ulong; -pub type __s64 = ::c_long; +pub type __u64 = c_ulong; +pub type __s64 = c_long; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, #[cfg(target_arch = "sparc64")] - __reserved0: ::c_int, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + __reserved0: c_int, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + f_spare: [crate::__fsword_t; 5], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __reserved: [c_long; 3], } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { @@ -146,35 +146,35 @@ s! { } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, pub __seq: u32, __pad1: u32, __unused1: u64, - __unused2: ::c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_segsz: ::size_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_segsz: size_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -182,14 +182,14 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } } @@ -201,212 +201,212 @@ s_no_extra_traits! { } } -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; pub const VEOF: usize = 4; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_PATH: c_int = 0o10000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; + +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; -pub const PTRACE_DETACH: ::c_uint = 17; +pub const PTRACE_DETACH: c_uint = 17; -pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const EFD_NONBLOCK: c_int = 0x800; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; +pub const O_TRUNC: c_int = 512; -pub const O_CLOEXEC: ::c_int = 0x80000; +pub const O_CLOEXEC: c_int = 0x80000; -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; +pub const EPOLL_CLOEXEC: c_int = 0x80000; -pub const EFD_CLOEXEC: ::c_int = 0x80000; +pub const EFD_CLOEXEC: c_int = 0x80000; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; @@ -414,79 +414,79 @@ pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "big")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_DIRECT: ::c_int = 0x20000; - -pub const MAP_LOCKED: ::c_int = 0x00080; -pub const MAP_NORESERVE: ::c_int = 0x00040; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLOCK: ::c_int = 58; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; - -pub const MCL_CURRENT: ::c_int = 0x2000; -pub const MCL_FUTURE: ::c_int = 0x4000; -pub const MCL_ONFAULT: ::c_int = 0x8000; - -pub const SIGSTKSZ: ::size_t = 0x4000; -pub const MINSIGSTKSZ: ::size_t = 4096; -pub const CBAUD: ::tcflag_t = 0xff; -pub const TAB1: ::tcflag_t = 0x400; -pub const TAB2: ::tcflag_t = 0x800; -pub const TAB3: ::tcflag_t = 0xc00; -pub const CR1: ::tcflag_t = 0x1000; -pub const CR2: ::tcflag_t = 0x2000; -pub const CR3: ::tcflag_t = 0x3000; -pub const FF1: ::tcflag_t = 0x4000; -pub const BS1: ::tcflag_t = 0x8000; -pub const VT1: ::tcflag_t = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_DIRECT: c_int = 0x20000; + +pub const MAP_LOCKED: c_int = 0x00080; +pub const MAP_NORESERVE: c_int = 0x00040; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLOCK: c_int = 58; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; + +pub const MCL_CURRENT: c_int = 0x2000; +pub const MCL_FUTURE: c_int = 0x4000; +pub const MCL_ONFAULT: c_int = 0x8000; + +pub const SIGSTKSZ: size_t = 0x4000; +pub const MINSIGSTKSZ: size_t = 4096; +pub const CBAUD: crate::tcflag_t = 0xff; +pub const TAB1: crate::tcflag_t = 0x400; +pub const TAB2: crate::tcflag_t = 0x800; +pub const TAB3: crate::tcflag_t = 0xc00; +pub const CR1: crate::tcflag_t = 0x1000; +pub const CR2: crate::tcflag_t = 0x2000; +pub const CR3: crate::tcflag_t = 0x3000; +pub const FF1: crate::tcflag_t = 0x4000; +pub const BS1: crate::tcflag_t = 0x8000; +pub const VT1: crate::tcflag_t = 0x10000; pub const VWERASE: usize = 0xa; pub const VREPRINT: usize = 0xb; pub const VSUSP: usize = 0xc; @@ -494,479 +494,479 @@ pub const VSTART: usize = 0xd; pub const VSTOP: usize = 0xe; pub const VDISCARD: usize = 0x10; pub const VTIME: usize = 0x7; -pub const IXON: ::tcflag_t = 0x200; -pub const IXOFF: ::tcflag_t = 0x400; -pub const ONLCR: ::tcflag_t = 0x2; -pub const CSIZE: ::tcflag_t = 0x300; -pub const CS6: ::tcflag_t = 0x100; -pub const CS7: ::tcflag_t = 0x200; -pub const CS8: ::tcflag_t = 0x300; -pub const CSTOPB: ::tcflag_t = 0x400; -pub const CREAD: ::tcflag_t = 0x800; -pub const PARENB: ::tcflag_t = 0x1000; -pub const PARODD: ::tcflag_t = 0x2000; -pub const HUPCL: ::tcflag_t = 0x4000; -pub const CLOCAL: ::tcflag_t = 0x8000; -pub const ECHOKE: ::tcflag_t = 0x1; -pub const ECHOE: ::tcflag_t = 0x2; -pub const ECHOK: ::tcflag_t = 0x4; -pub const ECHONL: ::tcflag_t = 0x10; -pub const ECHOPRT: ::tcflag_t = 0x20; -pub const ECHOCTL: ::tcflag_t = 0x40; -pub const ISIG: ::tcflag_t = 0x80; -pub const ICANON: ::tcflag_t = 0x100; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const IXON: crate::tcflag_t = 0x200; +pub const IXOFF: crate::tcflag_t = 0x400; +pub const ONLCR: crate::tcflag_t = 0x2; +pub const CSIZE: crate::tcflag_t = 0x300; +pub const CS6: crate::tcflag_t = 0x100; +pub const CS7: crate::tcflag_t = 0x200; +pub const CS8: crate::tcflag_t = 0x300; +pub const CSTOPB: crate::tcflag_t = 0x400; +pub const CREAD: crate::tcflag_t = 0x800; +pub const PARENB: crate::tcflag_t = 0x1000; +pub const PARODD: crate::tcflag_t = 0x2000; +pub const HUPCL: crate::tcflag_t = 0x4000; +pub const CLOCAL: crate::tcflag_t = 0x8000; +pub const ECHOKE: crate::tcflag_t = 0x1; +pub const ECHOE: crate::tcflag_t = 0x2; +pub const ECHOK: crate::tcflag_t = 0x4; +pub const ECHONL: crate::tcflag_t = 0x10; +pub const ECHOPRT: crate::tcflag_t = 0x20; +pub const ECHOCTL: crate::tcflag_t = 0x40; +pub const ISIG: crate::tcflag_t = 0x80; +pub const ICANON: crate::tcflag_t = 0x100; +pub const PENDIN: crate::tcflag_t = 0x20000000; +pub const NOFLSH: crate::tcflag_t = 0x80000000; pub const VSWTC: usize = 9; -pub const OLCUC: ::tcflag_t = 0o000004; -pub const NLDLY: ::tcflag_t = 0o001400; -pub const CRDLY: ::tcflag_t = 0o030000; -pub const TABDLY: ::tcflag_t = 0o006000; -pub const BSDLY: ::tcflag_t = 0o100000; -pub const FFDLY: ::tcflag_t = 0o040000; -pub const VTDLY: ::tcflag_t = 0o200000; -pub const XTABS: ::tcflag_t = 0o006000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const CBAUDEX: ::speed_t = 0o000020; -pub const B57600: ::speed_t = 0o0020; -pub const B115200: ::speed_t = 0o0021; -pub const B230400: ::speed_t = 0o0022; -pub const B460800: ::speed_t = 0o0023; -pub const B500000: ::speed_t = 0o0024; -pub const B576000: ::speed_t = 0o0025; -pub const B921600: ::speed_t = 0o0026; -pub const B1000000: ::speed_t = 0o0027; -pub const B1152000: ::speed_t = 0o0030; -pub const B1500000: ::speed_t = 0o0031; -pub const B2000000: ::speed_t = 0o0032; -pub const B2500000: ::speed_t = 0o0033; -pub const B3000000: ::speed_t = 0o0034; -pub const B3500000: ::speed_t = 0o0035; -pub const B4000000: ::speed_t = 0o0036; +pub const OLCUC: crate::tcflag_t = 0o000004; +pub const NLDLY: crate::tcflag_t = 0o001400; +pub const CRDLY: crate::tcflag_t = 0o030000; +pub const TABDLY: crate::tcflag_t = 0o006000; +pub const BSDLY: crate::tcflag_t = 0o100000; +pub const FFDLY: crate::tcflag_t = 0o040000; +pub const VTDLY: crate::tcflag_t = 0o200000; +pub const XTABS: crate::tcflag_t = 0o006000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const CBAUDEX: crate::speed_t = 0o000020; +pub const B57600: crate::speed_t = 0o0020; +pub const B115200: crate::speed_t = 0o0021; +pub const B230400: crate::speed_t = 0o0022; +pub const B460800: crate::speed_t = 0o0023; +pub const B500000: crate::speed_t = 0o0024; +pub const B576000: crate::speed_t = 0o0025; +pub const B921600: crate::speed_t = 0o0026; +pub const B1000000: crate::speed_t = 0o0027; +pub const B1152000: crate::speed_t = 0o0030; +pub const B1500000: crate::speed_t = 0o0031; +pub const B2000000: crate::speed_t = 0o0032; +pub const B2500000: crate::speed_t = 0o0033; +pub const B3000000: crate::speed_t = 0o0034; +pub const B3500000: crate::speed_t = 0o0035; +pub const B4000000: crate::speed_t = 0o0036; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; pub const VMIN: usize = 5; -pub const IEXTEN: ::tcflag_t = 0x400; -pub const TOSTOP: ::tcflag_t = 0x400000; -pub const FLUSHO: ::tcflag_t = 0x800000; -pub const EXTPROC: ::tcflag_t = 0x10000000; +pub const IEXTEN: crate::tcflag_t = 0x400; +pub const TOSTOP: crate::tcflag_t = 0x400000; +pub const FLUSHO: crate::tcflag_t = 0x800000; +pub const EXTPROC: crate::tcflag_t = 0x10000000; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */ -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_query_module: ::c_long = 166; -pub const SYS_poll: ::c_long = 167; -pub const SYS_nfsservctl: ::c_long = 168; -pub const SYS_setresgid: ::c_long = 169; -pub const SYS_getresgid: ::c_long = 170; -pub const SYS_prctl: ::c_long = 171; -pub const SYS_rt_sigreturn: ::c_long = 172; -pub const SYS_rt_sigaction: ::c_long = 173; -pub const SYS_rt_sigprocmask: ::c_long = 174; -pub const SYS_rt_sigpending: ::c_long = 175; -pub const SYS_rt_sigtimedwait: ::c_long = 176; -pub const SYS_rt_sigqueueinfo: ::c_long = 177; -pub const SYS_rt_sigsuspend: ::c_long = 178; -pub const SYS_pread64: ::c_long = 179; -pub const SYS_pwrite64: ::c_long = 180; -pub const SYS_chown: ::c_long = 181; -pub const SYS_getcwd: ::c_long = 182; -pub const SYS_capget: ::c_long = 183; -pub const SYS_capset: ::c_long = 184; -pub const SYS_sigaltstack: ::c_long = 185; -pub const SYS_sendfile: ::c_long = 186; -pub const SYS_getpmsg: ::c_long = 187; /* some people actually want streams */ -pub const SYS_putpmsg: ::c_long = 188; /* some people actually want streams */ -pub const SYS_vfork: ::c_long = 189; -pub const SYS_ugetrlimit: ::c_long = 190; /* SuS compliant getrlimit */ -pub const SYS_readahead: ::c_long = 191; -pub const SYS_pciconfig_read: ::c_long = 198; -pub const SYS_pciconfig_write: ::c_long = 199; -pub const SYS_pciconfig_iobase: ::c_long = 200; -pub const SYS_multiplexer: ::c_long = 201; -pub const SYS_getdents64: ::c_long = 202; -pub const SYS_pivot_root: ::c_long = 203; -pub const SYS_madvise: ::c_long = 205; -pub const SYS_mincore: ::c_long = 206; -pub const SYS_gettid: ::c_long = 207; -pub const SYS_tkill: ::c_long = 208; -pub const SYS_setxattr: ::c_long = 209; -pub const SYS_lsetxattr: ::c_long = 210; -pub const SYS_fsetxattr: ::c_long = 211; -pub const SYS_getxattr: ::c_long = 212; -pub const SYS_lgetxattr: ::c_long = 213; -pub const SYS_fgetxattr: ::c_long = 214; -pub const SYS_listxattr: ::c_long = 215; -pub const SYS_llistxattr: ::c_long = 216; -pub const SYS_flistxattr: ::c_long = 217; -pub const SYS_removexattr: ::c_long = 218; -pub const SYS_lremovexattr: ::c_long = 219; -pub const SYS_fremovexattr: ::c_long = 220; -pub const SYS_futex: ::c_long = 221; -pub const SYS_sched_setaffinity: ::c_long = 222; -pub const SYS_sched_getaffinity: ::c_long = 223; -pub const SYS_tuxcall: ::c_long = 225; -pub const SYS_io_setup: ::c_long = 227; -pub const SYS_io_destroy: ::c_long = 228; -pub const SYS_io_getevents: ::c_long = 229; -pub const SYS_io_submit: ::c_long = 230; -pub const SYS_io_cancel: ::c_long = 231; -pub const SYS_set_tid_address: ::c_long = 232; -pub const SYS_exit_group: ::c_long = 234; -pub const SYS_lookup_dcookie: ::c_long = 235; -pub const SYS_epoll_create: ::c_long = 236; -pub const SYS_epoll_ctl: ::c_long = 237; -pub const SYS_epoll_wait: ::c_long = 238; -pub const SYS_remap_file_pages: ::c_long = 239; -pub const SYS_timer_create: ::c_long = 240; -pub const SYS_timer_settime: ::c_long = 241; -pub const SYS_timer_gettime: ::c_long = 242; -pub const SYS_timer_getoverrun: ::c_long = 243; -pub const SYS_timer_delete: ::c_long = 244; -pub const SYS_clock_settime: ::c_long = 245; -pub const SYS_clock_gettime: ::c_long = 246; -pub const SYS_clock_getres: ::c_long = 247; -pub const SYS_clock_nanosleep: ::c_long = 248; -pub const SYS_swapcontext: ::c_long = 249; -pub const SYS_tgkill: ::c_long = 250; -pub const SYS_utimes: ::c_long = 251; -pub const SYS_statfs64: ::c_long = 252; -pub const SYS_fstatfs64: ::c_long = 253; -pub const SYS_rtas: ::c_long = 255; -pub const SYS_sys_debug_setcontext: ::c_long = 256; -pub const SYS_migrate_pages: ::c_long = 258; -pub const SYS_mbind: ::c_long = 259; -pub const SYS_get_mempolicy: ::c_long = 260; -pub const SYS_set_mempolicy: ::c_long = 261; -pub const SYS_mq_open: ::c_long = 262; -pub const SYS_mq_unlink: ::c_long = 263; -pub const SYS_mq_timedsend: ::c_long = 264; -pub const SYS_mq_timedreceive: ::c_long = 265; -pub const SYS_mq_notify: ::c_long = 266; -pub const SYS_mq_getsetattr: ::c_long = 267; -pub const SYS_kexec_load: ::c_long = 268; -pub const SYS_add_key: ::c_long = 269; -pub const SYS_request_key: ::c_long = 270; -pub const SYS_keyctl: ::c_long = 271; -pub const SYS_waitid: ::c_long = 272; -pub const SYS_ioprio_set: ::c_long = 273; -pub const SYS_ioprio_get: ::c_long = 274; -pub const SYS_inotify_init: ::c_long = 275; -pub const SYS_inotify_add_watch: ::c_long = 276; -pub const SYS_inotify_rm_watch: ::c_long = 277; -pub const SYS_spu_run: ::c_long = 278; -pub const SYS_spu_create: ::c_long = 279; -pub const SYS_pselect6: ::c_long = 280; -pub const SYS_ppoll: ::c_long = 281; -pub const SYS_unshare: ::c_long = 282; -pub const SYS_splice: ::c_long = 283; -pub const SYS_tee: ::c_long = 284; -pub const SYS_vmsplice: ::c_long = 285; -pub const SYS_openat: ::c_long = 286; -pub const SYS_mkdirat: ::c_long = 287; -pub const SYS_mknodat: ::c_long = 288; -pub const SYS_fchownat: ::c_long = 289; -pub const SYS_futimesat: ::c_long = 290; -pub const SYS_newfstatat: ::c_long = 291; -pub const SYS_unlinkat: ::c_long = 292; -pub const SYS_renameat: ::c_long = 293; -pub const SYS_linkat: ::c_long = 294; -pub const SYS_symlinkat: ::c_long = 295; -pub const SYS_readlinkat: ::c_long = 296; -pub const SYS_fchmodat: ::c_long = 297; -pub const SYS_faccessat: ::c_long = 298; -pub const SYS_get_robust_list: ::c_long = 299; -pub const SYS_set_robust_list: ::c_long = 300; -pub const SYS_move_pages: ::c_long = 301; -pub const SYS_getcpu: ::c_long = 302; -pub const SYS_epoll_pwait: ::c_long = 303; -pub const SYS_utimensat: ::c_long = 304; -pub const SYS_signalfd: ::c_long = 305; -pub const SYS_timerfd_create: ::c_long = 306; -pub const SYS_eventfd: ::c_long = 307; -pub const SYS_sync_file_range2: ::c_long = 308; -pub const SYS_fallocate: ::c_long = 309; -pub const SYS_subpage_prot: ::c_long = 310; -pub const SYS_timerfd_settime: ::c_long = 311; -pub const SYS_timerfd_gettime: ::c_long = 312; -pub const SYS_signalfd4: ::c_long = 313; -pub const SYS_eventfd2: ::c_long = 314; -pub const SYS_epoll_create1: ::c_long = 315; -pub const SYS_dup3: ::c_long = 316; -pub const SYS_pipe2: ::c_long = 317; -pub const SYS_inotify_init1: ::c_long = 318; -pub const SYS_perf_event_open: ::c_long = 319; -pub const SYS_preadv: ::c_long = 320; -pub const SYS_pwritev: ::c_long = 321; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 322; -pub const SYS_fanotify_init: ::c_long = 323; -pub const SYS_fanotify_mark: ::c_long = 324; -pub const SYS_prlimit64: ::c_long = 325; -pub const SYS_socket: ::c_long = 326; -pub const SYS_bind: ::c_long = 327; -pub const SYS_connect: ::c_long = 328; -pub const SYS_listen: ::c_long = 329; -pub const SYS_accept: ::c_long = 330; -pub const SYS_getsockname: ::c_long = 331; -pub const SYS_getpeername: ::c_long = 332; -pub const SYS_socketpair: ::c_long = 333; -pub const SYS_send: ::c_long = 334; -pub const SYS_sendto: ::c_long = 335; -pub const SYS_recv: ::c_long = 336; -pub const SYS_recvfrom: ::c_long = 337; -pub const SYS_shutdown: ::c_long = 338; -pub const SYS_setsockopt: ::c_long = 339; -pub const SYS_getsockopt: ::c_long = 340; -pub const SYS_sendmsg: ::c_long = 341; -pub const SYS_recvmsg: ::c_long = 342; -pub const SYS_recvmmsg: ::c_long = 343; -pub const SYS_accept4: ::c_long = 344; -pub const SYS_name_to_handle_at: ::c_long = 345; -pub const SYS_open_by_handle_at: ::c_long = 346; -pub const SYS_clock_adjtime: ::c_long = 347; -pub const SYS_syncfs: ::c_long = 348; -pub const SYS_sendmmsg: ::c_long = 349; -pub const SYS_setns: ::c_long = 350; -pub const SYS_process_vm_readv: ::c_long = 351; -pub const SYS_process_vm_writev: ::c_long = 352; -pub const SYS_finit_module: ::c_long = 353; -pub const SYS_kcmp: ::c_long = 354; -pub const SYS_sched_setattr: ::c_long = 355; -pub const SYS_sched_getattr: ::c_long = 356; -pub const SYS_renameat2: ::c_long = 357; -pub const SYS_seccomp: ::c_long = 358; -pub const SYS_getrandom: ::c_long = 359; -pub const SYS_memfd_create: ::c_long = 360; -pub const SYS_bpf: ::c_long = 361; -pub const SYS_execveat: ::c_long = 362; -pub const SYS_switch_endian: ::c_long = 363; -pub const SYS_userfaultfd: ::c_long = 364; -pub const SYS_membarrier: ::c_long = 365; -pub const SYS_mlock2: ::c_long = 378; -pub const SYS_copy_file_range: ::c_long = 379; -pub const SYS_preadv2: ::c_long = 380; -pub const SYS_pwritev2: ::c_long = 381; -pub const SYS_kexec_file_load: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_rseq: ::c_long = 387; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; /* Syscall for Andrew File System */ +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_query_module: c_long = 166; +pub const SYS_poll: c_long = 167; +pub const SYS_nfsservctl: c_long = 168; +pub const SYS_setresgid: c_long = 169; +pub const SYS_getresgid: c_long = 170; +pub const SYS_prctl: c_long = 171; +pub const SYS_rt_sigreturn: c_long = 172; +pub const SYS_rt_sigaction: c_long = 173; +pub const SYS_rt_sigprocmask: c_long = 174; +pub const SYS_rt_sigpending: c_long = 175; +pub const SYS_rt_sigtimedwait: c_long = 176; +pub const SYS_rt_sigqueueinfo: c_long = 177; +pub const SYS_rt_sigsuspend: c_long = 178; +pub const SYS_pread64: c_long = 179; +pub const SYS_pwrite64: c_long = 180; +pub const SYS_chown: c_long = 181; +pub const SYS_getcwd: c_long = 182; +pub const SYS_capget: c_long = 183; +pub const SYS_capset: c_long = 184; +pub const SYS_sigaltstack: c_long = 185; +pub const SYS_sendfile: c_long = 186; +pub const SYS_getpmsg: c_long = 187; /* some people actually want streams */ +pub const SYS_putpmsg: c_long = 188; /* some people actually want streams */ +pub const SYS_vfork: c_long = 189; +pub const SYS_ugetrlimit: c_long = 190; /* SuS compliant getrlimit */ +pub const SYS_readahead: c_long = 191; +pub const SYS_pciconfig_read: c_long = 198; +pub const SYS_pciconfig_write: c_long = 199; +pub const SYS_pciconfig_iobase: c_long = 200; +pub const SYS_multiplexer: c_long = 201; +pub const SYS_getdents64: c_long = 202; +pub const SYS_pivot_root: c_long = 203; +pub const SYS_madvise: c_long = 205; +pub const SYS_mincore: c_long = 206; +pub const SYS_gettid: c_long = 207; +pub const SYS_tkill: c_long = 208; +pub const SYS_setxattr: c_long = 209; +pub const SYS_lsetxattr: c_long = 210; +pub const SYS_fsetxattr: c_long = 211; +pub const SYS_getxattr: c_long = 212; +pub const SYS_lgetxattr: c_long = 213; +pub const SYS_fgetxattr: c_long = 214; +pub const SYS_listxattr: c_long = 215; +pub const SYS_llistxattr: c_long = 216; +pub const SYS_flistxattr: c_long = 217; +pub const SYS_removexattr: c_long = 218; +pub const SYS_lremovexattr: c_long = 219; +pub const SYS_fremovexattr: c_long = 220; +pub const SYS_futex: c_long = 221; +pub const SYS_sched_setaffinity: c_long = 222; +pub const SYS_sched_getaffinity: c_long = 223; +pub const SYS_tuxcall: c_long = 225; +pub const SYS_io_setup: c_long = 227; +pub const SYS_io_destroy: c_long = 228; +pub const SYS_io_getevents: c_long = 229; +pub const SYS_io_submit: c_long = 230; +pub const SYS_io_cancel: c_long = 231; +pub const SYS_set_tid_address: c_long = 232; +pub const SYS_exit_group: c_long = 234; +pub const SYS_lookup_dcookie: c_long = 235; +pub const SYS_epoll_create: c_long = 236; +pub const SYS_epoll_ctl: c_long = 237; +pub const SYS_epoll_wait: c_long = 238; +pub const SYS_remap_file_pages: c_long = 239; +pub const SYS_timer_create: c_long = 240; +pub const SYS_timer_settime: c_long = 241; +pub const SYS_timer_gettime: c_long = 242; +pub const SYS_timer_getoverrun: c_long = 243; +pub const SYS_timer_delete: c_long = 244; +pub const SYS_clock_settime: c_long = 245; +pub const SYS_clock_gettime: c_long = 246; +pub const SYS_clock_getres: c_long = 247; +pub const SYS_clock_nanosleep: c_long = 248; +pub const SYS_swapcontext: c_long = 249; +pub const SYS_tgkill: c_long = 250; +pub const SYS_utimes: c_long = 251; +pub const SYS_statfs64: c_long = 252; +pub const SYS_fstatfs64: c_long = 253; +pub const SYS_rtas: c_long = 255; +pub const SYS_sys_debug_setcontext: c_long = 256; +pub const SYS_migrate_pages: c_long = 258; +pub const SYS_mbind: c_long = 259; +pub const SYS_get_mempolicy: c_long = 260; +pub const SYS_set_mempolicy: c_long = 261; +pub const SYS_mq_open: c_long = 262; +pub const SYS_mq_unlink: c_long = 263; +pub const SYS_mq_timedsend: c_long = 264; +pub const SYS_mq_timedreceive: c_long = 265; +pub const SYS_mq_notify: c_long = 266; +pub const SYS_mq_getsetattr: c_long = 267; +pub const SYS_kexec_load: c_long = 268; +pub const SYS_add_key: c_long = 269; +pub const SYS_request_key: c_long = 270; +pub const SYS_keyctl: c_long = 271; +pub const SYS_waitid: c_long = 272; +pub const SYS_ioprio_set: c_long = 273; +pub const SYS_ioprio_get: c_long = 274; +pub const SYS_inotify_init: c_long = 275; +pub const SYS_inotify_add_watch: c_long = 276; +pub const SYS_inotify_rm_watch: c_long = 277; +pub const SYS_spu_run: c_long = 278; +pub const SYS_spu_create: c_long = 279; +pub const SYS_pselect6: c_long = 280; +pub const SYS_ppoll: c_long = 281; +pub const SYS_unshare: c_long = 282; +pub const SYS_splice: c_long = 283; +pub const SYS_tee: c_long = 284; +pub const SYS_vmsplice: c_long = 285; +pub const SYS_openat: c_long = 286; +pub const SYS_mkdirat: c_long = 287; +pub const SYS_mknodat: c_long = 288; +pub const SYS_fchownat: c_long = 289; +pub const SYS_futimesat: c_long = 290; +pub const SYS_newfstatat: c_long = 291; +pub const SYS_unlinkat: c_long = 292; +pub const SYS_renameat: c_long = 293; +pub const SYS_linkat: c_long = 294; +pub const SYS_symlinkat: c_long = 295; +pub const SYS_readlinkat: c_long = 296; +pub const SYS_fchmodat: c_long = 297; +pub const SYS_faccessat: c_long = 298; +pub const SYS_get_robust_list: c_long = 299; +pub const SYS_set_robust_list: c_long = 300; +pub const SYS_move_pages: c_long = 301; +pub const SYS_getcpu: c_long = 302; +pub const SYS_epoll_pwait: c_long = 303; +pub const SYS_utimensat: c_long = 304; +pub const SYS_signalfd: c_long = 305; +pub const SYS_timerfd_create: c_long = 306; +pub const SYS_eventfd: c_long = 307; +pub const SYS_sync_file_range2: c_long = 308; +pub const SYS_fallocate: c_long = 309; +pub const SYS_subpage_prot: c_long = 310; +pub const SYS_timerfd_settime: c_long = 311; +pub const SYS_timerfd_gettime: c_long = 312; +pub const SYS_signalfd4: c_long = 313; +pub const SYS_eventfd2: c_long = 314; +pub const SYS_epoll_create1: c_long = 315; +pub const SYS_dup3: c_long = 316; +pub const SYS_pipe2: c_long = 317; +pub const SYS_inotify_init1: c_long = 318; +pub const SYS_perf_event_open: c_long = 319; +pub const SYS_preadv: c_long = 320; +pub const SYS_pwritev: c_long = 321; +pub const SYS_rt_tgsigqueueinfo: c_long = 322; +pub const SYS_fanotify_init: c_long = 323; +pub const SYS_fanotify_mark: c_long = 324; +pub const SYS_prlimit64: c_long = 325; +pub const SYS_socket: c_long = 326; +pub const SYS_bind: c_long = 327; +pub const SYS_connect: c_long = 328; +pub const SYS_listen: c_long = 329; +pub const SYS_accept: c_long = 330; +pub const SYS_getsockname: c_long = 331; +pub const SYS_getpeername: c_long = 332; +pub const SYS_socketpair: c_long = 333; +pub const SYS_send: c_long = 334; +pub const SYS_sendto: c_long = 335; +pub const SYS_recv: c_long = 336; +pub const SYS_recvfrom: c_long = 337; +pub const SYS_shutdown: c_long = 338; +pub const SYS_setsockopt: c_long = 339; +pub const SYS_getsockopt: c_long = 340; +pub const SYS_sendmsg: c_long = 341; +pub const SYS_recvmsg: c_long = 342; +pub const SYS_recvmmsg: c_long = 343; +pub const SYS_accept4: c_long = 344; +pub const SYS_name_to_handle_at: c_long = 345; +pub const SYS_open_by_handle_at: c_long = 346; +pub const SYS_clock_adjtime: c_long = 347; +pub const SYS_syncfs: c_long = 348; +pub const SYS_sendmmsg: c_long = 349; +pub const SYS_setns: c_long = 350; +pub const SYS_process_vm_readv: c_long = 351; +pub const SYS_process_vm_writev: c_long = 352; +pub const SYS_finit_module: c_long = 353; +pub const SYS_kcmp: c_long = 354; +pub const SYS_sched_setattr: c_long = 355; +pub const SYS_sched_getattr: c_long = 356; +pub const SYS_renameat2: c_long = 357; +pub const SYS_seccomp: c_long = 358; +pub const SYS_getrandom: c_long = 359; +pub const SYS_memfd_create: c_long = 360; +pub const SYS_bpf: c_long = 361; +pub const SYS_execveat: c_long = 362; +pub const SYS_switch_endian: c_long = 363; +pub const SYS_userfaultfd: c_long = 364; +pub const SYS_membarrier: c_long = 365; +pub const SYS_mlock2: c_long = 378; +pub const SYS_copy_file_range: c_long = 379; +pub const SYS_preadv2: c_long = 380; +pub const SYS_pwritev2: c_long = 381; +pub const SYS_kexec_file_load: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_rseq: c_long = 387; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; } diff --git a/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs b/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs index 88e8ce9891d70..27c96dca3d8bc 100644 --- a/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/riscv64/mod.rs @@ -1,131 +1,135 @@ //! RISC-V-specific definitions for 64-bit linux-like values +use crate::{ + c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, +}; + pub type c_char = u8; pub type c_long = i64; pub type c_ulong = u64; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; -pub type nlink_t = ::c_uint; -pub type blksize_t = ::c_int; -pub type fsblkcnt64_t = ::c_ulong; -pub type fsfilcnt64_t = ::c_ulong; +pub type nlink_t = c_uint; +pub type blksize_t = c_int; +pub type fsblkcnt64_t = c_ulong; +pub type fsfilcnt64_t = c_ulong; pub type suseconds_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct pthread_attr_t { - __size: [::c_ulong; 7], + __size: [c_ulong; 7], } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2usize], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_frsize: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 4], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_frsize: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 4], } pub struct statfs64 { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_frsize: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 4], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_frsize: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 4], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub __f_spare: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_favail: ::fsfilcnt64_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_favail: crate::fsfilcnt64_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub __f_spare: [c_int; 6], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -133,131 +137,131 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [u64; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused5: ::c_ulong, - __unused6: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused5: c_ulong, + __unused6: c_ulong, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct user_regs_struct { - pub pc: ::c_ulong, - pub ra: ::c_ulong, - pub sp: ::c_ulong, - pub gp: ::c_ulong, - pub tp: ::c_ulong, - pub t0: ::c_ulong, - pub t1: ::c_ulong, - pub t2: ::c_ulong, - pub s0: ::c_ulong, - pub s1: ::c_ulong, - pub a0: ::c_ulong, - pub a1: ::c_ulong, - pub a2: ::c_ulong, - pub a3: ::c_ulong, - pub a4: ::c_ulong, - pub a5: ::c_ulong, - pub a6: ::c_ulong, - pub a7: ::c_ulong, - pub s2: ::c_ulong, - pub s3: ::c_ulong, - pub s4: ::c_ulong, - pub s5: ::c_ulong, - pub s6: ::c_ulong, - pub s7: ::c_ulong, - pub s8: ::c_ulong, - pub s9: ::c_ulong, - pub s10: ::c_ulong, - pub s11: ::c_ulong, - pub t3: ::c_ulong, - pub t4: ::c_ulong, - pub t5: ::c_ulong, - pub t6: ::c_ulong, + pub pc: c_ulong, + pub ra: c_ulong, + pub sp: c_ulong, + pub gp: c_ulong, + pub tp: c_ulong, + pub t0: c_ulong, + pub t1: c_ulong, + pub t2: c_ulong, + pub s0: c_ulong, + pub s1: c_ulong, + pub a0: c_ulong, + pub a1: c_ulong, + pub a2: c_ulong, + pub a3: c_ulong, + pub a4: c_ulong, + pub a5: c_ulong, + pub a6: c_ulong, + pub a7: c_ulong, + pub s2: c_ulong, + pub s3: c_ulong, + pub s4: c_ulong, + pub s5: c_ulong, + pub s6: c_ulong, + pub s7: c_ulong, + pub s8: c_ulong, + pub s9: c_ulong, + pub s10: c_ulong, + pub s11: c_ulong, + pub t3: c_ulong, + pub t4: c_ulong, + pub t5: c_ulong, + pub t6: c_ulong, } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct ucontext_t { - pub __uc_flags: ::c_ulong, + pub __uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[allow(missing_debug_implementations)] #[repr(align(16))] pub struct mcontext_t { - pub __gregs: [::c_ulong; 32], + pub __gregs: [c_ulong; 32], pub __fpregs: __riscv_mc_fp_state, } @@ -270,241 +274,241 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct __riscv_mc_f_ext_state { - pub __f: [::c_uint; 32], - pub __fcsr: ::c_uint, + pub __f: [c_uint; 32], + pub __fcsr: c_uint, } #[allow(missing_debug_implementations)] pub struct __riscv_mc_d_ext_state { - pub __f: [::c_ulonglong; 32], - pub __fcsr: ::c_uint, + pub __f: [c_ulonglong; 32], + pub __fcsr: c_uint, } #[allow(missing_debug_implementations)] #[repr(align(16))] pub struct __riscv_mc_q_ext_state { - pub __f: [::c_ulonglong; 64], - pub __fcsr: ::c_uint, - pub __glibc_reserved: [::c_uint; 3], + pub __f: [c_ulonglong; 64], + pub __fcsr: c_uint, + pub __glibc_reserved: [c_uint; 3], } } -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 1052672; -pub const O_NOATIME: ::c_int = 262144; -pub const O_PATH: ::c_int = 2097152; -pub const O_TMPFILE: ::c_int = 4259840; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 256; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 1052672; +pub const O_NOATIME: c_int = 262144; +pub const O_PATH: c_int = 2097152; +pub const O_TMPFILE: c_int = 4259840; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 256; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SA_ONSTACK: ::c_int = 134217728; -pub const SA_SIGINFO: ::c_int = 4; -pub const SA_NOCLDWAIT: ::c_int = 2; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; -pub const POLLWRNORM: ::c_short = 256; -pub const POLLWRBAND: ::c_short = 512; -pub const O_ASYNC: ::c_int = 8192; -pub const O_NDELAY: ::c_int = 2048; -pub const PTRACE_DETACH: ::c_uint = 17; -pub const EFD_NONBLOCK: ::c_int = 2048; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; -pub const SFD_NONBLOCK: ::c_int = 2048; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; -pub const SFD_CLOEXEC: ::c_int = 524288; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SA_ONSTACK: c_int = 134217728; +pub const SA_SIGINFO: c_int = 4; +pub const SA_NOCLDWAIT: c_int = 2; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; +pub const POLLWRNORM: c_short = 256; +pub const POLLWRBAND: c_short = 512; +pub const O_ASYNC: c_int = 8192; +pub const O_NDELAY: c_int = 2048; +pub const PTRACE_DETACH: c_uint = 17; +pub const EFD_NONBLOCK: c_int = 2048; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; +pub const SFD_NONBLOCK: c_int = 2048; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; +pub const SFD_CLOEXEC: c_int = 524288; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; -pub const O_CLOEXEC: ::c_int = 524288; -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; -pub const SA_NODEFER: ::c_int = 1073741824; -pub const SA_RESETHAND: ::c_int = -2147483648; -pub const SA_RESTART: ::c_int = 268435456; -pub const SA_NOCLDSTOP: ::c_int = 1; -pub const EPOLL_CLOEXEC: ::c_int = 524288; -pub const EFD_CLOEXEC: ::c_int = 524288; +pub const O_TRUNC: c_int = 512; +pub const O_CLOEXEC: c_int = 524288; +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; +pub const SA_NODEFER: c_int = 1073741824; +pub const SA_RESETHAND: c_int = -2147483648; +pub const SA_RESTART: c_int = 268435456; +pub const SA_NOCLDSTOP: c_int = 1; +pub const EPOLL_CLOEXEC: c_int = 524288; +pub const EFD_CLOEXEC: c_int = 524288; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const O_DIRECT: ::c_int = 16384; -pub const O_DIRECTORY: ::c_int = 65536; -pub const O_NOFOLLOW: ::c_int = 131072; -pub const MAP_HUGETLB: ::c_int = 262144; -pub const MAP_LOCKED: ::c_int = 8192; -pub const MAP_NORESERVE: ::c_int = 16384; -pub const MAP_ANON: ::c_int = 32; -pub const MAP_ANONYMOUS: ::c_int = 32; -pub const MAP_DENYWRITE: ::c_int = 2048; -pub const MAP_EXECUTABLE: ::c_int = 4096; -pub const MAP_POPULATE: ::c_int = 32768; -pub const MAP_NONBLOCK: ::c_int = 65536; -pub const MAP_STACK: ::c_int = 131072; -pub const MAP_SYNC: ::c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; -pub const MCL_CURRENT: ::c_int = 1; -pub const MCL_FUTURE: ::c_int = 2; -pub const MCL_ONFAULT: ::c_int = 4; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 4111; -pub const TAB1: ::tcflag_t = 2048; -pub const TAB2: ::tcflag_t = 4096; -pub const TAB3: ::tcflag_t = 6144; -pub const CR1: ::tcflag_t = 512; -pub const CR2: ::tcflag_t = 1024; -pub const CR3: ::tcflag_t = 1536; -pub const FF1: ::tcflag_t = 32768; -pub const BS1: ::tcflag_t = 8192; -pub const VT1: ::tcflag_t = 16384; +pub const O_DIRECT: c_int = 16384; +pub const O_DIRECTORY: c_int = 65536; +pub const O_NOFOLLOW: c_int = 131072; +pub const MAP_HUGETLB: c_int = 262144; +pub const MAP_LOCKED: c_int = 8192; +pub const MAP_NORESERVE: c_int = 16384; +pub const MAP_ANON: c_int = 32; +pub const MAP_ANONYMOUS: c_int = 32; +pub const MAP_DENYWRITE: c_int = 2048; +pub const MAP_EXECUTABLE: c_int = 4096; +pub const MAP_POPULATE: c_int = 32768; +pub const MAP_NONBLOCK: c_int = 65536; +pub const MAP_STACK: c_int = 131072; +pub const MAP_SYNC: c_int = 0x080000; +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const PTRACE_GETFPREGS: c_uint = 14; +pub const PTRACE_SETFPREGS: c_uint = 15; +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; +pub const PTRACE_GETREGS: c_uint = 12; +pub const PTRACE_SETREGS: c_uint = 13; +pub const MCL_CURRENT: c_int = 1; +pub const MCL_FUTURE: c_int = 2; +pub const MCL_ONFAULT: c_int = 4; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 4111; +pub const TAB1: crate::tcflag_t = 2048; +pub const TAB2: crate::tcflag_t = 4096; +pub const TAB3: crate::tcflag_t = 6144; +pub const CR1: crate::tcflag_t = 512; +pub const CR2: crate::tcflag_t = 1024; +pub const CR3: crate::tcflag_t = 1536; +pub const FF1: crate::tcflag_t = 32768; +pub const BS1: crate::tcflag_t = 8192; +pub const VT1: crate::tcflag_t = 16384; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -512,80 +516,80 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 1024; -pub const IXOFF: ::tcflag_t = 4096; -pub const ONLCR: ::tcflag_t = 4; -pub const CSIZE: ::tcflag_t = 48; -pub const CS6: ::tcflag_t = 16; -pub const CS7: ::tcflag_t = 32; -pub const CS8: ::tcflag_t = 48; -pub const CSTOPB: ::tcflag_t = 64; -pub const CREAD: ::tcflag_t = 128; -pub const PARENB: ::tcflag_t = 256; -pub const PARODD: ::tcflag_t = 512; -pub const HUPCL: ::tcflag_t = 1024; -pub const CLOCAL: ::tcflag_t = 2048; -pub const ECHOKE: ::tcflag_t = 2048; -pub const ECHOE: ::tcflag_t = 16; -pub const ECHOK: ::tcflag_t = 32; -pub const ECHONL: ::tcflag_t = 64; -pub const ECHOPRT: ::tcflag_t = 1024; -pub const ECHOCTL: ::tcflag_t = 512; -pub const ISIG: ::tcflag_t = 1; -pub const ICANON: ::tcflag_t = 2; -pub const PENDIN: ::tcflag_t = 16384; -pub const NOFLSH: ::tcflag_t = 128; -pub const CIBAUD: ::tcflag_t = 269418496; -pub const CBAUDEX: ::tcflag_t = 4096; +pub const IXON: crate::tcflag_t = 1024; +pub const IXOFF: crate::tcflag_t = 4096; +pub const ONLCR: crate::tcflag_t = 4; +pub const CSIZE: crate::tcflag_t = 48; +pub const CS6: crate::tcflag_t = 16; +pub const CS7: crate::tcflag_t = 32; +pub const CS8: crate::tcflag_t = 48; +pub const CSTOPB: crate::tcflag_t = 64; +pub const CREAD: crate::tcflag_t = 128; +pub const PARENB: crate::tcflag_t = 256; +pub const PARODD: crate::tcflag_t = 512; +pub const HUPCL: crate::tcflag_t = 1024; +pub const CLOCAL: crate::tcflag_t = 2048; +pub const ECHOKE: crate::tcflag_t = 2048; +pub const ECHOE: crate::tcflag_t = 16; +pub const ECHOK: crate::tcflag_t = 32; +pub const ECHONL: crate::tcflag_t = 64; +pub const ECHOPRT: crate::tcflag_t = 1024; +pub const ECHOCTL: crate::tcflag_t = 512; +pub const ISIG: crate::tcflag_t = 1; +pub const ICANON: crate::tcflag_t = 2; +pub const PENDIN: crate::tcflag_t = 16384; +pub const NOFLSH: crate::tcflag_t = 128; +pub const CIBAUD: crate::tcflag_t = 269418496; +pub const CBAUDEX: crate::tcflag_t = 4096; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 2; -pub const NLDLY: ::tcflag_t = 256; -pub const CRDLY: ::tcflag_t = 1536; -pub const TABDLY: ::tcflag_t = 6144; -pub const BSDLY: ::tcflag_t = 8192; -pub const FFDLY: ::tcflag_t = 32768; -pub const VTDLY: ::tcflag_t = 16384; -pub const XTABS: ::tcflag_t = 6144; -pub const B0: ::speed_t = 0; -pub const B50: ::speed_t = 1; -pub const B75: ::speed_t = 2; -pub const B110: ::speed_t = 3; -pub const B134: ::speed_t = 4; -pub const B150: ::speed_t = 5; -pub const B200: ::speed_t = 6; -pub const B300: ::speed_t = 7; -pub const B600: ::speed_t = 8; -pub const B1200: ::speed_t = 9; -pub const B1800: ::speed_t = 10; -pub const B2400: ::speed_t = 11; -pub const B4800: ::speed_t = 12; -pub const B9600: ::speed_t = 13; -pub const B19200: ::speed_t = 14; -pub const B38400: ::speed_t = 15; -pub const EXTA: ::speed_t = 14; -pub const EXTB: ::speed_t = 15; -pub const B57600: ::speed_t = 4097; -pub const B115200: ::speed_t = 4098; -pub const B230400: ::speed_t = 4099; -pub const B460800: ::speed_t = 4100; -pub const B500000: ::speed_t = 4101; -pub const B576000: ::speed_t = 4102; -pub const B921600: ::speed_t = 4103; -pub const B1000000: ::speed_t = 4104; -pub const B1152000: ::speed_t = 4105; -pub const B1500000: ::speed_t = 4106; -pub const B2000000: ::speed_t = 4107; -pub const B2500000: ::speed_t = 4108; -pub const B3000000: ::speed_t = 4109; -pub const B3500000: ::speed_t = 4110; -pub const B4000000: ::speed_t = 4111; +pub const OLCUC: crate::tcflag_t = 2; +pub const NLDLY: crate::tcflag_t = 256; +pub const CRDLY: crate::tcflag_t = 1536; +pub const TABDLY: crate::tcflag_t = 6144; +pub const BSDLY: crate::tcflag_t = 8192; +pub const FFDLY: crate::tcflag_t = 32768; +pub const VTDLY: crate::tcflag_t = 16384; +pub const XTABS: crate::tcflag_t = 6144; +pub const B0: crate::speed_t = 0; +pub const B50: crate::speed_t = 1; +pub const B75: crate::speed_t = 2; +pub const B110: crate::speed_t = 3; +pub const B134: crate::speed_t = 4; +pub const B150: crate::speed_t = 5; +pub const B200: crate::speed_t = 6; +pub const B300: crate::speed_t = 7; +pub const B600: crate::speed_t = 8; +pub const B1200: crate::speed_t = 9; +pub const B1800: crate::speed_t = 10; +pub const B2400: crate::speed_t = 11; +pub const B4800: crate::speed_t = 12; +pub const B9600: crate::speed_t = 13; +pub const B19200: crate::speed_t = 14; +pub const B38400: crate::speed_t = 15; +pub const EXTA: crate::speed_t = 14; +pub const EXTB: crate::speed_t = 15; +pub const B57600: crate::speed_t = 4097; +pub const B115200: crate::speed_t = 4098; +pub const B230400: crate::speed_t = 4099; +pub const B460800: crate::speed_t = 4100; +pub const B500000: crate::speed_t = 4101; +pub const B576000: crate::speed_t = 4102; +pub const B921600: crate::speed_t = 4103; +pub const B1000000: crate::speed_t = 4104; +pub const B1152000: crate::speed_t = 4105; +pub const B1500000: crate::speed_t = 4106; +pub const B2000000: crate::speed_t = 4107; +pub const B2500000: crate::speed_t = 4108; +pub const B3000000: crate::speed_t = 4109; +pub const B3500000: crate::speed_t = 4110; +pub const B4000000: crate::speed_t = 4111; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 32768; -pub const TOSTOP: ::tcflag_t = 256; -pub const FLUSHO: ::tcflag_t = 4096; -pub const EXTPROC: ::tcflag_t = 65536; +pub const IEXTEN: crate::tcflag_t = 32768; +pub const TOSTOP: crate::tcflag_t = 256; +pub const FLUSHO: crate::tcflag_t = 4096; +pub const EXTPROC: crate::tcflag_t = 65536; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; @@ -600,314 +604,314 @@ pub const REG_A0: usize = 10; pub const REG_S2: usize = 18; pub const REG_NARGS: usize = 8; -pub const COMPAT_HWCAP_ISA_I: ::c_ulong = 1 << (b'I' - b'A'); -pub const COMPAT_HWCAP_ISA_M: ::c_ulong = 1 << (b'M' - b'A'); -pub const COMPAT_HWCAP_ISA_A: ::c_ulong = 1 << (b'A' - b'A'); -pub const COMPAT_HWCAP_ISA_F: ::c_ulong = 1 << (b'F' - b'A'); -pub const COMPAT_HWCAP_ISA_D: ::c_ulong = 1 << (b'D' - b'A'); -pub const COMPAT_HWCAP_ISA_C: ::c_ulong = 1 << (b'C' - b'A'); -pub const COMPAT_HWCAP_ISA_V: ::c_ulong = 1 << (b'V' - b'A'); +pub const COMPAT_HWCAP_ISA_I: c_ulong = 1 << (b'I' - b'A'); +pub const COMPAT_HWCAP_ISA_M: c_ulong = 1 << (b'M' - b'A'); +pub const COMPAT_HWCAP_ISA_A: c_ulong = 1 << (b'A' - b'A'); +pub const COMPAT_HWCAP_ISA_F: c_ulong = 1 << (b'F' - b'A'); +pub const COMPAT_HWCAP_ISA_D: c_ulong = 1 << (b'D' - b'A'); +pub const COMPAT_HWCAP_ISA_C: c_ulong = 1 << (b'C' - b'A'); +pub const COMPAT_HWCAP_ISA_V: c_ulong = 1 << (b'V' - b'A'); -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_close: ::c_long = 57; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_brk: ::c_long = 214; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_dup: ::c_long = 23; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_socket: ::c_long = 198; -pub const SYS_connect: ::c_long = 203; -pub const SYS_accept: ::c_long = 202; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_exit: ::c_long = 93; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_kill: ::c_long = 129; -pub const SYS_uname: ::c_long = 160; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semop: ::c_long = 193; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_flock: ::c_long = 32; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_umask: ::c_long = 166; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_times: ::c_long = 153; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_personality: ::c_long = 92; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_sync: ::c_long = 81; -pub const SYS_acct: ::c_long = 89; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_mount: ::c_long = 40; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_futex: ::c_long = 98; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_openat: ::c_long = 56; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_setns: ::c_long = 268; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_close: c_long = 57; +pub const SYS_fstat: c_long = 80; +pub const SYS_lseek: c_long = 62; +pub const SYS_mmap: c_long = 222; +pub const SYS_mprotect: c_long = 226; +pub const SYS_munmap: c_long = 215; +pub const SYS_brk: c_long = 214; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_ioctl: c_long = 29; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_mremap: c_long = 216; +pub const SYS_msync: c_long = 227; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmctl: c_long = 195; +pub const SYS_dup: c_long = 23; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_getpid: c_long = 172; +pub const SYS_sendfile: c_long = 71; +pub const SYS_socket: c_long = 198; +pub const SYS_connect: c_long = 203; +pub const SYS_accept: c_long = 202; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_shutdown: c_long = 210; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_socketpair: c_long = 199; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_exit: c_long = 93; +pub const SYS_wait4: c_long = 260; +pub const SYS_kill: c_long = 129; +pub const SYS_uname: c_long = 160; +pub const SYS_semget: c_long = 190; +pub const SYS_semop: c_long = 193; +pub const SYS_semctl: c_long = 191; +pub const SYS_shmdt: c_long = 197; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgctl: c_long = 187; +pub const SYS_fcntl: c_long = 25; +pub const SYS_flock: c_long = 32; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_getcwd: c_long = 17; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchown: c_long = 55; +pub const SYS_umask: c_long = 166; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_getrusage: c_long = 165; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_times: c_long = 153; +pub const SYS_ptrace: c_long = 117; +pub const SYS_getuid: c_long = 174; +pub const SYS_syslog: c_long = 116; +pub const SYS_getgid: c_long = 176; +pub const SYS_setuid: c_long = 146; +pub const SYS_setgid: c_long = 144; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getegid: c_long = 177; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getppid: c_long = 173; +pub const SYS_setsid: c_long = 157; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setregid: c_long = 143; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_getpgid: c_long = 155; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_getsid: c_long = 156; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_personality: c_long = 92; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_getpriority: c_long = 141; +pub const SYS_setpriority: c_long = 140; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_prctl: c_long = 167; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_chroot: c_long = 51; +pub const SYS_sync: c_long = 81; +pub const SYS_acct: c_long = 89; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_mount: c_long = 40; +pub const SYS_umount2: c_long = 39; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_reboot: c_long = 142; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_quotactl: c_long = 60; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_gettid: c_long = 178; +pub const SYS_readahead: c_long = 213; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_tkill: c_long = 130; +pub const SYS_futex: c_long = 98; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_getdents64: c_long = 61; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_exit_group: c_long = 94; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_tgkill: c_long = 131; +pub const SYS_mbind: c_long = 235; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_waitid: c_long = 95; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_openat: c_long = 56; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_mknodat: c_long = 33; +pub const SYS_fchownat: c_long = 54; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_linkat: c_long = 37; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_faccessat: c_long = 48; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_unshare: c_long = 97; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_move_pages: c_long = 239; +pub const SYS_utimensat: c_long = 88; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_fallocate: c_long = 47; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_accept4: c_long = 242; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_dup3: c_long = 24; +pub const SYS_pipe2: c_long = 59; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_setns: c_long = 268; +pub const SYS_getcpu: c_long = 168; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_rseq: c_long = 293; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; diff --git a/src/unix/linux_like/linux/gnu/b64/s390x.rs b/src/unix/linux_like/linux/gnu/b64/s390x.rs index 4c31252fbad30..210db71ae84b6 100644 --- a/src/unix/linux_like/linux/gnu/b64/s390x.rs +++ b/src/unix/linux_like/linux/gnu/b64/s390x.rs @@ -1,6 +1,8 @@ //! s390x -use pthread_mutex_t; +use crate::{ + c_double, c_int, c_short, c_uint, c_ushort, c_void, off64_t, off_t, pthread_mutex_t, size_t, +}; pub type blksize_t = i64; pub type c_char = u8; @@ -15,143 +17,143 @@ pub type __s64 = i64; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - __glibc_reserved0: ::c_int, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + __glibc_reserved0: c_int, + pub sa_flags: c_int, + pub sa_restorer: Option, + pub sa_mask: crate::sigset_t, } pub struct statfs { - pub f_type: ::c_uint, - pub f_bsize: ::c_uint, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_uint, - pub f_frsize: ::c_uint, - pub f_flags: ::c_uint, - f_spare: [::c_uint; 4], + pub f_type: c_uint, + pub f_bsize: c_uint, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_uint, + pub f_frsize: c_uint, + pub f_flags: c_uint, + f_spare: [c_uint; 4], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - _pad: ::c_int, - _pad2: [::c_long; 14], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + _pad: c_int, + _pad2: [c_long; 14], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - st_pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - __glibc_reserved: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + st_pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + __glibc_reserved: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - st_pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - __glibc_reserved: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + st_pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + __glibc_reserved: [c_long; 3], } pub struct pthread_attr_t { - __size: [::c_ulong; 7], + __size: [c_ulong; 7], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_ushort, + __pad1: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct __psw_t { @@ -173,49 +175,49 @@ s! { } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, } pub struct statfs64 { - pub f_type: ::c_uint, - pub f_bsize: ::c_uint, + pub f_type: c_uint, + pub f_bsize: c_uint, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_uint, - pub f_frsize: ::c_uint, - pub f_flags: ::c_uint, - pub f_spare: [::c_uint; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: c_uint, + pub f_frsize: c_uint, + pub f_flags: c_uint, + pub f_spare: [c_uint; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } } s_no_extra_traits! { // FIXME: This is actually a union. pub struct fpreg_t { - pub d: ::c_double, - // f: ::c_float, + pub d: c_double, + // f: c_float, } } @@ -229,61 +231,61 @@ cfg_if! { impl Eq for fpreg_t {} - impl ::fmt::Debug for fpreg_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpreg_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpreg_t").field("d", &self.d).finish() } } - impl ::hash::Hash for fpreg_t { - fn hash(&self, state: &mut H) { - let d: u64 = unsafe { ::mem::transmute(self.d) }; + impl crate::hash::Hash for fpreg_t { + fn hash(&self, state: &mut H) { + let d: u64 = unsafe { crate::mem::transmute(self.d) }; d.hash(state); } } } } -pub const POSIX_FADV_DONTNEED: ::c_int = 6; -pub const POSIX_FADV_NOREUSE: ::c_int = 7; +pub const POSIX_FADV_DONTNEED: c_int = 6; +pub const POSIX_FADV_NOREUSE: c_int = 7; pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_CLOEXEC: ::c_int = 0x80000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; +pub const O_TRUNC: c_int = 512; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_CLOEXEC: c_int = 0x80000; +pub const O_PATH: c_int = 0o10000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; + +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: c_int = 0x80000; + +pub const EFD_CLOEXEC: c_int = 0x80000; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; @@ -292,209 +294,209 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNREFUSED: ::c_int = 111; -pub const ECONNRESET: ::c_int = 104; -pub const EDEADLK: ::c_int = 35; -pub const ENOSYS: ::c_int = 38; -pub const ENOTCONN: ::c_int = 107; -pub const ETIMEDOUT: ::c_int = 110; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NONBLOCK: ::c_int = 2048; -pub const SA_NOCLDWAIT: ::c_int = 2; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 4; -pub const SIGBUS: ::c_int = 7; -pub const SIGSTKSZ: ::size_t = 0x2000; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const SIG_SETMASK: ::c_int = 2; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const O_NOCTTY: ::c_int = 256; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLOCK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; - -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ECONNABORTED: c_int = 103; +pub const ECONNREFUSED: c_int = 111; +pub const ECONNRESET: c_int = 104; +pub const EDEADLK: c_int = 35; +pub const ENOSYS: c_int = 38; +pub const ENOTCONN: c_int = 107; +pub const ETIMEDOUT: c_int = 110; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NONBLOCK: c_int = 2048; +pub const SA_NOCLDWAIT: c_int = 2; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 4; +pub const SIGBUS: c_int = 7; +pub const SIGSTKSZ: size_t = 0x2000; +pub const MINSIGSTKSZ: size_t = 2048; +pub const SIG_SETMASK: c_int = 2; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const O_NOCTTY: c_int = 256; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLOCK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; + +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const PTRACE_DETACH: ::c_uint = 17; +pub const PTRACE_DETACH: c_uint = 17; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const EFD_NONBLOCK: c_int = 0x800; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; pub const VTIME: usize = 5; pub const VSWTC: usize = 7; @@ -504,455 +506,455 @@ pub const VSUSP: usize = 10; pub const VREPRINT: usize = 12; pub const VDISCARD: usize = 13; pub const VWERASE: usize = 14; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const ONLCR: ::tcflag_t = 0o000004; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const FF1: ::tcflag_t = 0x00008000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const VT1: ::tcflag_t = 0x00004000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const CBAUD: ::speed_t = 0o010017; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const CSIZE: ::tcflag_t = 0o000060; -pub const CS6: ::tcflag_t = 0o000020; -pub const CS7: ::tcflag_t = 0o000040; -pub const CS8: ::tcflag_t = 0o000060; -pub const CSTOPB: ::tcflag_t = 0o000100; -pub const CREAD: ::tcflag_t = 0o000200; -pub const PARENB: ::tcflag_t = 0o000400; -pub const PARODD: ::tcflag_t = 0o001000; -pub const HUPCL: ::tcflag_t = 0o002000; -pub const CLOCAL: ::tcflag_t = 0o004000; -pub const CBAUDEX: ::tcflag_t = 0o010000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; -pub const CIBAUD: ::tcflag_t = 0o02003600000; - -pub const ISIG: ::tcflag_t = 0o000001; -pub const ICANON: ::tcflag_t = 0o000002; -pub const XCASE: ::tcflag_t = 0o000004; -pub const ECHOE: ::tcflag_t = 0o000020; -pub const ECHOK: ::tcflag_t = 0o000040; -pub const ECHONL: ::tcflag_t = 0o000100; -pub const NOFLSH: ::tcflag_t = 0o000200; -pub const ECHOCTL: ::tcflag_t = 0o001000; -pub const ECHOPRT: ::tcflag_t = 0o002000; -pub const ECHOKE: ::tcflag_t = 0o004000; -pub const PENDIN: ::tcflag_t = 0o040000; - -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const IXON: ::tcflag_t = 0o002000; -pub const IXOFF: ::tcflag_t = 0o010000; - -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_restart_syscall: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_signal: ::c_long = 48; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_lookup_dcookie: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */ -pub const SYS_getdents: ::c_long = 141; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_query_module: ::c_long = 167; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_getpmsg: ::c_long = 188; -pub const SYS_putpmsg: ::c_long = 189; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_pivot_root: ::c_long = 217; -pub const SYS_mincore: ::c_long = 218; -pub const SYS_madvise: ::c_long = 219; -pub const SYS_getdents64: ::c_long = 220; -pub const SYS_readahead: ::c_long = 222; -pub const SYS_setxattr: ::c_long = 224; -pub const SYS_lsetxattr: ::c_long = 225; -pub const SYS_fsetxattr: ::c_long = 226; -pub const SYS_getxattr: ::c_long = 227; -pub const SYS_lgetxattr: ::c_long = 228; -pub const SYS_fgetxattr: ::c_long = 229; -pub const SYS_listxattr: ::c_long = 230; -pub const SYS_llistxattr: ::c_long = 231; -pub const SYS_flistxattr: ::c_long = 232; -pub const SYS_removexattr: ::c_long = 233; -pub const SYS_lremovexattr: ::c_long = 234; -pub const SYS_fremovexattr: ::c_long = 235; -pub const SYS_gettid: ::c_long = 236; -pub const SYS_tkill: ::c_long = 237; -pub const SYS_futex: ::c_long = 238; -pub const SYS_sched_setaffinity: ::c_long = 239; -pub const SYS_sched_getaffinity: ::c_long = 240; -pub const SYS_tgkill: ::c_long = 241; -pub const SYS_io_setup: ::c_long = 243; -pub const SYS_io_destroy: ::c_long = 244; -pub const SYS_io_getevents: ::c_long = 245; -pub const SYS_io_submit: ::c_long = 246; -pub const SYS_io_cancel: ::c_long = 247; -pub const SYS_exit_group: ::c_long = 248; -pub const SYS_epoll_create: ::c_long = 249; -pub const SYS_epoll_ctl: ::c_long = 250; -pub const SYS_epoll_wait: ::c_long = 251; -pub const SYS_set_tid_address: ::c_long = 252; -pub const SYS_fadvise64: ::c_long = 253; -pub const SYS_timer_create: ::c_long = 254; -pub const SYS_timer_settime: ::c_long = 255; -pub const SYS_timer_gettime: ::c_long = 256; -pub const SYS_timer_getoverrun: ::c_long = 257; -pub const SYS_timer_delete: ::c_long = 258; -pub const SYS_clock_settime: ::c_long = 259; -pub const SYS_clock_gettime: ::c_long = 260; -pub const SYS_clock_getres: ::c_long = 261; -pub const SYS_clock_nanosleep: ::c_long = 262; -pub const SYS_statfs64: ::c_long = 265; -pub const SYS_fstatfs64: ::c_long = 266; -pub const SYS_remap_file_pages: ::c_long = 267; -pub const SYS_mbind: ::c_long = 268; -pub const SYS_get_mempolicy: ::c_long = 269; -pub const SYS_set_mempolicy: ::c_long = 270; -pub const SYS_mq_open: ::c_long = 271; -pub const SYS_mq_unlink: ::c_long = 272; -pub const SYS_mq_timedsend: ::c_long = 273; -pub const SYS_mq_timedreceive: ::c_long = 274; -pub const SYS_mq_notify: ::c_long = 275; -pub const SYS_mq_getsetattr: ::c_long = 276; -pub const SYS_kexec_load: ::c_long = 277; -pub const SYS_add_key: ::c_long = 278; -pub const SYS_request_key: ::c_long = 279; -pub const SYS_keyctl: ::c_long = 280; -pub const SYS_waitid: ::c_long = 281; -pub const SYS_ioprio_set: ::c_long = 282; -pub const SYS_ioprio_get: ::c_long = 283; -pub const SYS_inotify_init: ::c_long = 284; -pub const SYS_inotify_add_watch: ::c_long = 285; -pub const SYS_inotify_rm_watch: ::c_long = 286; -pub const SYS_migrate_pages: ::c_long = 287; -pub const SYS_openat: ::c_long = 288; -pub const SYS_mkdirat: ::c_long = 289; -pub const SYS_mknodat: ::c_long = 290; -pub const SYS_fchownat: ::c_long = 291; -pub const SYS_futimesat: ::c_long = 292; -pub const SYS_unlinkat: ::c_long = 294; -pub const SYS_renameat: ::c_long = 295; -pub const SYS_linkat: ::c_long = 296; -pub const SYS_symlinkat: ::c_long = 297; -pub const SYS_readlinkat: ::c_long = 298; -pub const SYS_fchmodat: ::c_long = 299; -pub const SYS_faccessat: ::c_long = 300; -pub const SYS_pselect6: ::c_long = 301; -pub const SYS_ppoll: ::c_long = 302; -pub const SYS_unshare: ::c_long = 303; -pub const SYS_set_robust_list: ::c_long = 304; -pub const SYS_get_robust_list: ::c_long = 305; -pub const SYS_splice: ::c_long = 306; -pub const SYS_sync_file_range: ::c_long = 307; -pub const SYS_tee: ::c_long = 308; -pub const SYS_vmsplice: ::c_long = 309; -pub const SYS_move_pages: ::c_long = 310; -pub const SYS_getcpu: ::c_long = 311; -pub const SYS_epoll_pwait: ::c_long = 312; -pub const SYS_utimes: ::c_long = 313; -pub const SYS_fallocate: ::c_long = 314; -pub const SYS_utimensat: ::c_long = 315; -pub const SYS_signalfd: ::c_long = 316; -pub const SYS_timerfd: ::c_long = 317; -pub const SYS_eventfd: ::c_long = 318; -pub const SYS_timerfd_create: ::c_long = 319; -pub const SYS_timerfd_settime: ::c_long = 320; -pub const SYS_timerfd_gettime: ::c_long = 321; -pub const SYS_signalfd4: ::c_long = 322; -pub const SYS_eventfd2: ::c_long = 323; -pub const SYS_inotify_init1: ::c_long = 324; -pub const SYS_pipe2: ::c_long = 325; -pub const SYS_dup3: ::c_long = 326; -pub const SYS_epoll_create1: ::c_long = 327; -pub const SYS_preadv: ::c_long = 328; -pub const SYS_pwritev: ::c_long = 329; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 330; -pub const SYS_perf_event_open: ::c_long = 331; -pub const SYS_fanotify_init: ::c_long = 332; -pub const SYS_fanotify_mark: ::c_long = 333; -pub const SYS_prlimit64: ::c_long = 334; -pub const SYS_name_to_handle_at: ::c_long = 335; -pub const SYS_open_by_handle_at: ::c_long = 336; -pub const SYS_clock_adjtime: ::c_long = 337; -pub const SYS_syncfs: ::c_long = 338; -pub const SYS_setns: ::c_long = 339; -pub const SYS_process_vm_readv: ::c_long = 340; -pub const SYS_process_vm_writev: ::c_long = 341; -pub const SYS_s390_runtime_instr: ::c_long = 342; -pub const SYS_kcmp: ::c_long = 343; -pub const SYS_finit_module: ::c_long = 344; -pub const SYS_sched_setattr: ::c_long = 345; -pub const SYS_sched_getattr: ::c_long = 346; -pub const SYS_renameat2: ::c_long = 347; -pub const SYS_seccomp: ::c_long = 348; -pub const SYS_getrandom: ::c_long = 349; -pub const SYS_memfd_create: ::c_long = 350; -pub const SYS_bpf: ::c_long = 351; -pub const SYS_s390_pci_mmio_write: ::c_long = 352; -pub const SYS_s390_pci_mmio_read: ::c_long = 353; -pub const SYS_execveat: ::c_long = 354; -pub const SYS_userfaultfd: ::c_long = 355; -pub const SYS_membarrier: ::c_long = 356; -pub const SYS_recvmmsg: ::c_long = 357; -pub const SYS_sendmmsg: ::c_long = 358; -pub const SYS_socket: ::c_long = 359; -pub const SYS_socketpair: ::c_long = 360; -pub const SYS_bind: ::c_long = 361; -pub const SYS_connect: ::c_long = 362; -pub const SYS_listen: ::c_long = 363; -pub const SYS_accept4: ::c_long = 364; -pub const SYS_getsockopt: ::c_long = 365; -pub const SYS_setsockopt: ::c_long = 366; -pub const SYS_getsockname: ::c_long = 367; -pub const SYS_getpeername: ::c_long = 368; -pub const SYS_sendto: ::c_long = 369; -pub const SYS_sendmsg: ::c_long = 370; -pub const SYS_recvfrom: ::c_long = 371; -pub const SYS_recvmsg: ::c_long = 372; -pub const SYS_shutdown: ::c_long = 373; -pub const SYS_mlock2: ::c_long = 374; -pub const SYS_copy_file_range: ::c_long = 375; -pub const SYS_preadv2: ::c_long = 376; -pub const SYS_pwritev2: ::c_long = 377; -pub const SYS_lchown: ::c_long = 198; -pub const SYS_setuid: ::c_long = 213; -pub const SYS_getuid: ::c_long = 199; -pub const SYS_setgid: ::c_long = 214; -pub const SYS_getgid: ::c_long = 200; -pub const SYS_geteuid: ::c_long = 201; -pub const SYS_setreuid: ::c_long = 203; -pub const SYS_setregid: ::c_long = 204; -pub const SYS_getrlimit: ::c_long = 191; -pub const SYS_getgroups: ::c_long = 205; -pub const SYS_fchown: ::c_long = 207; -pub const SYS_setresuid: ::c_long = 208; -pub const SYS_setresgid: ::c_long = 210; -pub const SYS_getresgid: ::c_long = 211; -pub const SYS_select: ::c_long = 142; -pub const SYS_getegid: ::c_long = 202; -pub const SYS_setgroups: ::c_long = 206; -pub const SYS_getresuid: ::c_long = 209; -pub const SYS_chown: ::c_long = 212; -pub const SYS_setfsuid: ::c_long = 215; -pub const SYS_setfsgid: ::c_long = 216; -pub const SYS_newfstatat: ::c_long = 293; -pub const SYS_statx: ::c_long = 379; -pub const SYS_rseq: ::c_long = 383; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const ONLCR: crate::tcflag_t = 0o000004; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const VT1: crate::tcflag_t = 0x00004000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const CBAUD: crate::speed_t = 0o010017; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const CSIZE: crate::tcflag_t = 0o000060; +pub const CS6: crate::tcflag_t = 0o000020; +pub const CS7: crate::tcflag_t = 0o000040; +pub const CS8: crate::tcflag_t = 0o000060; +pub const CSTOPB: crate::tcflag_t = 0o000100; +pub const CREAD: crate::tcflag_t = 0o000200; +pub const PARENB: crate::tcflag_t = 0o000400; +pub const PARODD: crate::tcflag_t = 0o001000; +pub const HUPCL: crate::tcflag_t = 0o002000; +pub const CLOCAL: crate::tcflag_t = 0o004000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; + +pub const ISIG: crate::tcflag_t = 0o000001; +pub const ICANON: crate::tcflag_t = 0o000002; +pub const XCASE: crate::tcflag_t = 0o000004; +pub const ECHOE: crate::tcflag_t = 0o000020; +pub const ECHOK: crate::tcflag_t = 0o000040; +pub const ECHONL: crate::tcflag_t = 0o000100; +pub const NOFLSH: crate::tcflag_t = 0o000200; +pub const ECHOCTL: crate::tcflag_t = 0o001000; +pub const ECHOPRT: crate::tcflag_t = 0o002000; +pub const ECHOKE: crate::tcflag_t = 0o004000; +pub const PENDIN: crate::tcflag_t = 0o040000; + +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const IXON: crate::tcflag_t = 0o002000; +pub const IXOFF: crate::tcflag_t = 0o010000; + +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_restart_syscall: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_signal: c_long = 48; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_symlink: c_long = 83; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_lookup_dcookie: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; /* Syscall for Andrew File System */ +pub const SYS_getdents: c_long = 141; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_query_module: c_long = 167; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_getpmsg: c_long = 188; +pub const SYS_putpmsg: c_long = 189; +pub const SYS_vfork: c_long = 190; +pub const SYS_pivot_root: c_long = 217; +pub const SYS_mincore: c_long = 218; +pub const SYS_madvise: c_long = 219; +pub const SYS_getdents64: c_long = 220; +pub const SYS_readahead: c_long = 222; +pub const SYS_setxattr: c_long = 224; +pub const SYS_lsetxattr: c_long = 225; +pub const SYS_fsetxattr: c_long = 226; +pub const SYS_getxattr: c_long = 227; +pub const SYS_lgetxattr: c_long = 228; +pub const SYS_fgetxattr: c_long = 229; +pub const SYS_listxattr: c_long = 230; +pub const SYS_llistxattr: c_long = 231; +pub const SYS_flistxattr: c_long = 232; +pub const SYS_removexattr: c_long = 233; +pub const SYS_lremovexattr: c_long = 234; +pub const SYS_fremovexattr: c_long = 235; +pub const SYS_gettid: c_long = 236; +pub const SYS_tkill: c_long = 237; +pub const SYS_futex: c_long = 238; +pub const SYS_sched_setaffinity: c_long = 239; +pub const SYS_sched_getaffinity: c_long = 240; +pub const SYS_tgkill: c_long = 241; +pub const SYS_io_setup: c_long = 243; +pub const SYS_io_destroy: c_long = 244; +pub const SYS_io_getevents: c_long = 245; +pub const SYS_io_submit: c_long = 246; +pub const SYS_io_cancel: c_long = 247; +pub const SYS_exit_group: c_long = 248; +pub const SYS_epoll_create: c_long = 249; +pub const SYS_epoll_ctl: c_long = 250; +pub const SYS_epoll_wait: c_long = 251; +pub const SYS_set_tid_address: c_long = 252; +pub const SYS_fadvise64: c_long = 253; +pub const SYS_timer_create: c_long = 254; +pub const SYS_timer_settime: c_long = 255; +pub const SYS_timer_gettime: c_long = 256; +pub const SYS_timer_getoverrun: c_long = 257; +pub const SYS_timer_delete: c_long = 258; +pub const SYS_clock_settime: c_long = 259; +pub const SYS_clock_gettime: c_long = 260; +pub const SYS_clock_getres: c_long = 261; +pub const SYS_clock_nanosleep: c_long = 262; +pub const SYS_statfs64: c_long = 265; +pub const SYS_fstatfs64: c_long = 266; +pub const SYS_remap_file_pages: c_long = 267; +pub const SYS_mbind: c_long = 268; +pub const SYS_get_mempolicy: c_long = 269; +pub const SYS_set_mempolicy: c_long = 270; +pub const SYS_mq_open: c_long = 271; +pub const SYS_mq_unlink: c_long = 272; +pub const SYS_mq_timedsend: c_long = 273; +pub const SYS_mq_timedreceive: c_long = 274; +pub const SYS_mq_notify: c_long = 275; +pub const SYS_mq_getsetattr: c_long = 276; +pub const SYS_kexec_load: c_long = 277; +pub const SYS_add_key: c_long = 278; +pub const SYS_request_key: c_long = 279; +pub const SYS_keyctl: c_long = 280; +pub const SYS_waitid: c_long = 281; +pub const SYS_ioprio_set: c_long = 282; +pub const SYS_ioprio_get: c_long = 283; +pub const SYS_inotify_init: c_long = 284; +pub const SYS_inotify_add_watch: c_long = 285; +pub const SYS_inotify_rm_watch: c_long = 286; +pub const SYS_migrate_pages: c_long = 287; +pub const SYS_openat: c_long = 288; +pub const SYS_mkdirat: c_long = 289; +pub const SYS_mknodat: c_long = 290; +pub const SYS_fchownat: c_long = 291; +pub const SYS_futimesat: c_long = 292; +pub const SYS_unlinkat: c_long = 294; +pub const SYS_renameat: c_long = 295; +pub const SYS_linkat: c_long = 296; +pub const SYS_symlinkat: c_long = 297; +pub const SYS_readlinkat: c_long = 298; +pub const SYS_fchmodat: c_long = 299; +pub const SYS_faccessat: c_long = 300; +pub const SYS_pselect6: c_long = 301; +pub const SYS_ppoll: c_long = 302; +pub const SYS_unshare: c_long = 303; +pub const SYS_set_robust_list: c_long = 304; +pub const SYS_get_robust_list: c_long = 305; +pub const SYS_splice: c_long = 306; +pub const SYS_sync_file_range: c_long = 307; +pub const SYS_tee: c_long = 308; +pub const SYS_vmsplice: c_long = 309; +pub const SYS_move_pages: c_long = 310; +pub const SYS_getcpu: c_long = 311; +pub const SYS_epoll_pwait: c_long = 312; +pub const SYS_utimes: c_long = 313; +pub const SYS_fallocate: c_long = 314; +pub const SYS_utimensat: c_long = 315; +pub const SYS_signalfd: c_long = 316; +pub const SYS_timerfd: c_long = 317; +pub const SYS_eventfd: c_long = 318; +pub const SYS_timerfd_create: c_long = 319; +pub const SYS_timerfd_settime: c_long = 320; +pub const SYS_timerfd_gettime: c_long = 321; +pub const SYS_signalfd4: c_long = 322; +pub const SYS_eventfd2: c_long = 323; +pub const SYS_inotify_init1: c_long = 324; +pub const SYS_pipe2: c_long = 325; +pub const SYS_dup3: c_long = 326; +pub const SYS_epoll_create1: c_long = 327; +pub const SYS_preadv: c_long = 328; +pub const SYS_pwritev: c_long = 329; +pub const SYS_rt_tgsigqueueinfo: c_long = 330; +pub const SYS_perf_event_open: c_long = 331; +pub const SYS_fanotify_init: c_long = 332; +pub const SYS_fanotify_mark: c_long = 333; +pub const SYS_prlimit64: c_long = 334; +pub const SYS_name_to_handle_at: c_long = 335; +pub const SYS_open_by_handle_at: c_long = 336; +pub const SYS_clock_adjtime: c_long = 337; +pub const SYS_syncfs: c_long = 338; +pub const SYS_setns: c_long = 339; +pub const SYS_process_vm_readv: c_long = 340; +pub const SYS_process_vm_writev: c_long = 341; +pub const SYS_s390_runtime_instr: c_long = 342; +pub const SYS_kcmp: c_long = 343; +pub const SYS_finit_module: c_long = 344; +pub const SYS_sched_setattr: c_long = 345; +pub const SYS_sched_getattr: c_long = 346; +pub const SYS_renameat2: c_long = 347; +pub const SYS_seccomp: c_long = 348; +pub const SYS_getrandom: c_long = 349; +pub const SYS_memfd_create: c_long = 350; +pub const SYS_bpf: c_long = 351; +pub const SYS_s390_pci_mmio_write: c_long = 352; +pub const SYS_s390_pci_mmio_read: c_long = 353; +pub const SYS_execveat: c_long = 354; +pub const SYS_userfaultfd: c_long = 355; +pub const SYS_membarrier: c_long = 356; +pub const SYS_recvmmsg: c_long = 357; +pub const SYS_sendmmsg: c_long = 358; +pub const SYS_socket: c_long = 359; +pub const SYS_socketpair: c_long = 360; +pub const SYS_bind: c_long = 361; +pub const SYS_connect: c_long = 362; +pub const SYS_listen: c_long = 363; +pub const SYS_accept4: c_long = 364; +pub const SYS_getsockopt: c_long = 365; +pub const SYS_setsockopt: c_long = 366; +pub const SYS_getsockname: c_long = 367; +pub const SYS_getpeername: c_long = 368; +pub const SYS_sendto: c_long = 369; +pub const SYS_sendmsg: c_long = 370; +pub const SYS_recvfrom: c_long = 371; +pub const SYS_recvmsg: c_long = 372; +pub const SYS_shutdown: c_long = 373; +pub const SYS_mlock2: c_long = 374; +pub const SYS_copy_file_range: c_long = 375; +pub const SYS_preadv2: c_long = 376; +pub const SYS_pwritev2: c_long = 377; +pub const SYS_lchown: c_long = 198; +pub const SYS_setuid: c_long = 213; +pub const SYS_getuid: c_long = 199; +pub const SYS_setgid: c_long = 214; +pub const SYS_getgid: c_long = 200; +pub const SYS_geteuid: c_long = 201; +pub const SYS_setreuid: c_long = 203; +pub const SYS_setregid: c_long = 204; +pub const SYS_getrlimit: c_long = 191; +pub const SYS_getgroups: c_long = 205; +pub const SYS_fchown: c_long = 207; +pub const SYS_setresuid: c_long = 208; +pub const SYS_setresgid: c_long = 210; +pub const SYS_getresgid: c_long = 211; +pub const SYS_select: c_long = 142; +pub const SYS_getegid: c_long = 202; +pub const SYS_setgroups: c_long = 206; +pub const SYS_getresuid: c_long = 209; +pub const SYS_chown: c_long = 212; +pub const SYS_setfsuid: c_long = 215; +pub const SYS_setfsgid: c_long = 216; +pub const SYS_newfstatat: c_long = 293; +pub const SYS_statx: c_long = 379; +pub const SYS_rseq: c_long = 383; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; - pub fn getcontext(ucp: *mut ::ucontext_t) -> ::c_int; - pub fn setcontext(ucp: *const ::ucontext_t) -> ::c_int; - pub fn makecontext(ucp: *mut ::ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); - pub fn swapcontext(uocp: *mut ::ucontext_t, ucp: *const ::ucontext_t) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; + pub fn getcontext(ucp: *mut crate::ucontext_t) -> c_int; + pub fn setcontext(ucp: *const crate::ucontext_t) -> c_int; + pub fn makecontext(ucp: *mut crate::ucontext_t, func: extern "C" fn(), argc: c_int, ...); + pub fn swapcontext(uocp: *mut crate::ucontext_t, ucp: *const crate::ucontext_t) -> c_int; } diff --git a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs index efb0aec7c1e9f..8dd7b85032beb 100644 --- a/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/sparc64/mod.rs @@ -1,6 +1,9 @@ //! SPARC64-specific definitions for 64-bit linux-like values -use pthread_mutex_t; +use crate::{ + c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, + pthread_mutex_t, size_t, +}; pub type c_long = i64; pub type c_ulong = u64; @@ -9,39 +12,39 @@ pub type wchar_t = i32; pub type nlink_t = u32; pub type blksize_t = i64; pub type suseconds_t = i32; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, #[cfg(target_arch = "sparc64")] - __reserved0: ::c_int, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + __reserved0: c_int, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + f_spare: [crate::__fsword_t; 5], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -49,120 +52,120 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, - __reserved: ::c_short, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, + __reserved: c_short, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct stat { - pub st_dev: ::dev_t, + pub st_dev: crate::dev_t, __pad0: u64, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, __pad1: u64, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 2], + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 2], } pub struct stat64 { - pub st_dev: ::dev_t, + pub st_dev: crate::dev_t, __pad0: u64, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: ::c_int, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 2], + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: c_int, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __reserved: [c_long; 2], } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { @@ -170,29 +173,29 @@ s! { } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, __pad0: u16, - pub __seq: ::c_ushort, - __unused1: ::c_ulonglong, - __unused2: ::c_ulonglong, + pub __seq: c_ushort, + __unused1: c_ulonglong, + __unused2: c_ulonglong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_segsz: ::size_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __reserved1: ::c_ulong, - __reserved2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_segsz: size_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __reserved1: c_ulong, + __reserved2: c_ulong, } } @@ -204,263 +207,263 @@ s_no_extra_traits! { } } -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -pub const O_APPEND: ::c_int = 0x8; -pub const O_CREAT: ::c_int = 0x200; -pub const O_EXCL: ::c_int = 0x800; -pub const O_NOCTTY: ::c_int = 0x8000; -pub const O_NONBLOCK: ::c_int = 0x4000; -pub const O_SYNC: ::c_int = 0x802000; -pub const O_RSYNC: ::c_int = 0x802000; -pub const O_DSYNC: ::c_int = 0x2000; -pub const O_FSYNC: ::c_int = 0x802000; -pub const O_NOATIME: ::c_int = 0x200000; -pub const O_PATH: ::c_int = 0x1000000; -pub const O_TMPFILE: ::c_int = 0x2000000 | O_DIRECTORY; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0200; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLK: ::c_int = 78; -pub const ENAMETOOLONG: ::c_int = 63; -pub const ENOLCK: ::c_int = 79; -pub const ENOSYS: ::c_int = 90; -pub const ENOTEMPTY: ::c_int = 66; -pub const ELOOP: ::c_int = 62; -pub const ENOMSG: ::c_int = 75; -pub const EIDRM: ::c_int = 77; -pub const ECHRNG: ::c_int = 94; -pub const EL2NSYNC: ::c_int = 95; -pub const EL3HLT: ::c_int = 96; -pub const EL3RST: ::c_int = 97; -pub const ELNRNG: ::c_int = 98; -pub const EUNATCH: ::c_int = 99; -pub const ENOCSI: ::c_int = 100; -pub const EL2HLT: ::c_int = 101; -pub const EBADE: ::c_int = 102; -pub const EBADR: ::c_int = 103; -pub const EXFULL: ::c_int = 104; -pub const ENOANO: ::c_int = 105; -pub const EBADRQC: ::c_int = 106; -pub const EBADSLT: ::c_int = 107; -pub const EMULTIHOP: ::c_int = 87; -pub const EOVERFLOW: ::c_int = 92; -pub const ENOTUNIQ: ::c_int = 115; -pub const EBADFD: ::c_int = 93; -pub const EBADMSG: ::c_int = 76; -pub const EREMCHG: ::c_int = 89; -pub const ELIBACC: ::c_int = 114; -pub const ELIBBAD: ::c_int = 112; -pub const ELIBSCN: ::c_int = 124; -pub const ELIBMAX: ::c_int = 123; -pub const ELIBEXEC: ::c_int = 110; -pub const EILSEQ: ::c_int = 122; -pub const ERESTART: ::c_int = 116; -pub const ESTRPIPE: ::c_int = 91; -pub const EUSERS: ::c_int = 68; -pub const ENOTSOCK: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 39; -pub const EMSGSIZE: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const EOPNOTSUPP: ::c_int = 45; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENETDOWN: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const EHOSTDOWN: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const EALREADY: ::c_int = 37; -pub const EINPROGRESS: ::c_int = 36; -pub const ESTALE: ::c_int = 70; -pub const EDQUOT: ::c_int = 69; -pub const ENOMEDIUM: ::c_int = 125; -pub const EMEDIUMTYPE: ::c_int = 126; -pub const ECANCELED: ::c_int = 127; -pub const ENOKEY: ::c_int = 128; -pub const EKEYEXPIRED: ::c_int = 129; -pub const EKEYREVOKED: ::c_int = 130; -pub const EKEYREJECTED: ::c_int = 131; -pub const EOWNERDEAD: ::c_int = 132; -pub const ENOTRECOVERABLE: ::c_int = 133; -pub const EHWPOISON: ::c_int = 135; -pub const ERFKILL: ::c_int = 134; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SA_ONSTACK: ::c_int = 1; -pub const SA_SIGINFO: ::c_int = 0x200; -pub const SA_NOCLDWAIT: ::c_int = 0x100; - -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 20; -pub const SIGBUS: ::c_int = 10; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const SIGCONT: ::c_int = 19; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGURG: ::c_int = 16; -pub const SIGIO: ::c_int = 23; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 23; -pub const SIGPWR: ::c_int = 29; -pub const SIG_SETMASK: ::c_int = 4; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; - -pub const POLLWRNORM: ::c_short = 4; -pub const POLLWRBAND: ::c_short = 0x100; - -pub const O_ASYNC: ::c_int = 0x40; -pub const O_NDELAY: ::c_int = 0x4004; - -pub const PTRACE_DETACH: ::c_uint = 17; - -pub const EFD_NONBLOCK: ::c_int = 0x4000; - -pub const F_GETLK: ::c_int = 7; -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; - -pub const F_RDLCK: ::c_int = 1; -pub const F_WRLCK: ::c_int = 2; -pub const F_UNLCK: ::c_int = 3; - -pub const SFD_NONBLOCK: ::c_int = 0x4000; - -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; - -pub const SFD_CLOEXEC: ::c_int = 0x400000; +pub const O_APPEND: c_int = 0x8; +pub const O_CREAT: c_int = 0x200; +pub const O_EXCL: c_int = 0x800; +pub const O_NOCTTY: c_int = 0x8000; +pub const O_NONBLOCK: c_int = 0x4000; +pub const O_SYNC: c_int = 0x802000; +pub const O_RSYNC: c_int = 0x802000; +pub const O_DSYNC: c_int = 0x2000; +pub const O_FSYNC: c_int = 0x802000; +pub const O_NOATIME: c_int = 0x200000; +pub const O_PATH: c_int = 0x1000000; +pub const O_TMPFILE: c_int = 0x2000000 | O_DIRECTORY; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0200; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLK: c_int = 78; +pub const ENAMETOOLONG: c_int = 63; +pub const ENOLCK: c_int = 79; +pub const ENOSYS: c_int = 90; +pub const ENOTEMPTY: c_int = 66; +pub const ELOOP: c_int = 62; +pub const ENOMSG: c_int = 75; +pub const EIDRM: c_int = 77; +pub const ECHRNG: c_int = 94; +pub const EL2NSYNC: c_int = 95; +pub const EL3HLT: c_int = 96; +pub const EL3RST: c_int = 97; +pub const ELNRNG: c_int = 98; +pub const EUNATCH: c_int = 99; +pub const ENOCSI: c_int = 100; +pub const EL2HLT: c_int = 101; +pub const EBADE: c_int = 102; +pub const EBADR: c_int = 103; +pub const EXFULL: c_int = 104; +pub const ENOANO: c_int = 105; +pub const EBADRQC: c_int = 106; +pub const EBADSLT: c_int = 107; +pub const EMULTIHOP: c_int = 87; +pub const EOVERFLOW: c_int = 92; +pub const ENOTUNIQ: c_int = 115; +pub const EBADFD: c_int = 93; +pub const EBADMSG: c_int = 76; +pub const EREMCHG: c_int = 89; +pub const ELIBACC: c_int = 114; +pub const ELIBBAD: c_int = 112; +pub const ELIBSCN: c_int = 124; +pub const ELIBMAX: c_int = 123; +pub const ELIBEXEC: c_int = 110; +pub const EILSEQ: c_int = 122; +pub const ERESTART: c_int = 116; +pub const ESTRPIPE: c_int = 91; +pub const EUSERS: c_int = 68; +pub const ENOTSOCK: c_int = 38; +pub const EDESTADDRREQ: c_int = 39; +pub const EMSGSIZE: c_int = 40; +pub const EPROTOTYPE: c_int = 41; +pub const ENOPROTOOPT: c_int = 42; +pub const EPROTONOSUPPORT: c_int = 43; +pub const ESOCKTNOSUPPORT: c_int = 44; +pub const EOPNOTSUPP: c_int = 45; +pub const EPFNOSUPPORT: c_int = 46; +pub const EAFNOSUPPORT: c_int = 47; +pub const EADDRINUSE: c_int = 48; +pub const EADDRNOTAVAIL: c_int = 49; +pub const ENETDOWN: c_int = 50; +pub const ENETUNREACH: c_int = 51; +pub const ENETRESET: c_int = 52; +pub const ECONNABORTED: c_int = 53; +pub const ECONNRESET: c_int = 54; +pub const ENOBUFS: c_int = 55; +pub const EISCONN: c_int = 56; +pub const ENOTCONN: c_int = 57; +pub const ESHUTDOWN: c_int = 58; +pub const ETOOMANYREFS: c_int = 59; +pub const ETIMEDOUT: c_int = 60; +pub const ECONNREFUSED: c_int = 61; +pub const EHOSTDOWN: c_int = 64; +pub const EHOSTUNREACH: c_int = 65; +pub const EALREADY: c_int = 37; +pub const EINPROGRESS: c_int = 36; +pub const ESTALE: c_int = 70; +pub const EDQUOT: c_int = 69; +pub const ENOMEDIUM: c_int = 125; +pub const EMEDIUMTYPE: c_int = 126; +pub const ECANCELED: c_int = 127; +pub const ENOKEY: c_int = 128; +pub const EKEYEXPIRED: c_int = 129; +pub const EKEYREVOKED: c_int = 130; +pub const EKEYREJECTED: c_int = 131; +pub const EOWNERDEAD: c_int = 132; +pub const ENOTRECOVERABLE: c_int = 133; +pub const EHWPOISON: c_int = 135; +pub const ERFKILL: c_int = 134; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SA_ONSTACK: c_int = 1; +pub const SA_SIGINFO: c_int = 0x200; +pub const SA_NOCLDWAIT: c_int = 0x100; + +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 20; +pub const SIGBUS: c_int = 10; +pub const SIGUSR1: c_int = 30; +pub const SIGUSR2: c_int = 31; +pub const SIGCONT: c_int = 19; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGURG: c_int = 16; +pub const SIGIO: c_int = 23; +pub const SIGSYS: c_int = 12; +pub const SIGPOLL: c_int = 23; +pub const SIGPWR: c_int = 29; +pub const SIG_SETMASK: c_int = 4; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; + +pub const POLLWRNORM: c_short = 4; +pub const POLLWRBAND: c_short = 0x100; + +pub const O_ASYNC: c_int = 0x40; +pub const O_NDELAY: c_int = 0x4004; + +pub const PTRACE_DETACH: c_uint = 17; + +pub const EFD_NONBLOCK: c_int = 0x4000; + +pub const F_GETLK: c_int = 7; +pub const F_GETOWN: c_int = 5; +pub const F_SETOWN: c_int = 6; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; + +pub const F_RDLCK: c_int = 1; +pub const F_WRLCK: c_int = 2; +pub const F_UNLCK: c_int = 3; + +pub const SFD_NONBLOCK: c_int = 0x4000; + +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; + +pub const SFD_CLOEXEC: c_int = 0x400000; pub const NCCS: usize = 17; -pub const O_TRUNC: ::c_int = 0x400; - -pub const O_CLOEXEC: ::c_int = 0x400000; - -pub const EBFONT: ::c_int = 109; -pub const ENOSTR: ::c_int = 72; -pub const ENODATA: ::c_int = 111; -pub const ETIME: ::c_int = 73; -pub const ENOSR: ::c_int = 74; -pub const ENONET: ::c_int = 80; -pub const ENOPKG: ::c_int = 113; -pub const EREMOTE: ::c_int = 71; -pub const ENOLINK: ::c_int = 82; -pub const EADV: ::c_int = 83; -pub const ESRMNT: ::c_int = 84; -pub const ECOMM: ::c_int = 85; -pub const EPROTO: ::c_int = 86; -pub const EDOTDOT: ::c_int = 88; - -pub const SA_NODEFER: ::c_int = 0x20; -pub const SA_RESETHAND: ::c_int = 0x4; -pub const SA_RESTART: ::c_int = 0x2; -pub const SA_NOCLDSTOP: ::c_int = 0x00000008; - -pub const EPOLL_CLOEXEC: ::c_int = 0x400000; - -pub const EFD_CLOEXEC: ::c_int = 0x400000; +pub const O_TRUNC: c_int = 0x400; + +pub const O_CLOEXEC: c_int = 0x400000; + +pub const EBFONT: c_int = 109; +pub const ENOSTR: c_int = 72; +pub const ENODATA: c_int = 111; +pub const ETIME: c_int = 73; +pub const ENOSR: c_int = 74; +pub const ENONET: c_int = 80; +pub const ENOPKG: c_int = 113; +pub const EREMOTE: c_int = 71; +pub const ENOLINK: c_int = 82; +pub const EADV: c_int = 83; +pub const ESRMNT: c_int = 84; +pub const ECOMM: c_int = 85; +pub const EPROTO: c_int = 86; +pub const EDOTDOT: c_int = 88; + +pub const SA_NODEFER: c_int = 0x20; +pub const SA_RESETHAND: c_int = 0x4; +pub const SA_RESTART: c_int = 0x2; +pub const SA_NOCLDSTOP: c_int = 0x00000008; + +pub const EPOLL_CLOEXEC: c_int = 0x400000; + +pub const EFD_CLOEXEC: c_int = 0x400000; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const O_DIRECTORY: ::c_int = 0o200000; -pub const O_NOFOLLOW: ::c_int = 0o400000; -pub const O_DIRECT: ::c_int = 0x100000; - -pub const MAP_LOCKED: ::c_int = 0x0100; -pub const MAP_NORESERVE: ::c_int = 0x00040; - -pub const EDEADLOCK: ::c_int = 108; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; - -pub const MCL_CURRENT: ::c_int = 0x2000; -pub const MCL_FUTURE: ::c_int = 0x4000; -pub const MCL_ONFAULT: ::c_int = 0x8000; - -pub const SIGSTKSZ: ::size_t = 16384; -pub const MINSIGSTKSZ: ::size_t = 4096; -pub const CBAUD: ::tcflag_t = 0x0000100f; -pub const TAB1: ::tcflag_t = 0x800; -pub const TAB2: ::tcflag_t = 0x1000; -pub const TAB3: ::tcflag_t = 0x1800; -pub const CR1: ::tcflag_t = 0x200; -pub const CR2: ::tcflag_t = 0x400; -pub const CR3: ::tcflag_t = 0x600; -pub const FF1: ::tcflag_t = 0x8000; -pub const BS1: ::tcflag_t = 0x2000; -pub const VT1: ::tcflag_t = 0x4000; +pub const O_DIRECTORY: c_int = 0o200000; +pub const O_NOFOLLOW: c_int = 0o400000; +pub const O_DIRECT: c_int = 0x100000; + +pub const MAP_LOCKED: c_int = 0x0100; +pub const MAP_NORESERVE: c_int = 0x00040; + +pub const EDEADLOCK: c_int = 108; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; + +pub const MCL_CURRENT: c_int = 0x2000; +pub const MCL_FUTURE: c_int = 0x4000; +pub const MCL_ONFAULT: c_int = 0x8000; + +pub const SIGSTKSZ: size_t = 16384; +pub const MINSIGSTKSZ: size_t = 4096; +pub const CBAUD: crate::tcflag_t = 0x0000100f; +pub const TAB1: crate::tcflag_t = 0x800; +pub const TAB2: crate::tcflag_t = 0x1000; +pub const TAB3: crate::tcflag_t = 0x1800; +pub const CR1: crate::tcflag_t = 0x200; +pub const CR2: crate::tcflag_t = 0x400; +pub const CR3: crate::tcflag_t = 0x600; +pub const FF1: crate::tcflag_t = 0x8000; +pub const BS1: crate::tcflag_t = 0x2000; +pub const VT1: crate::tcflag_t = 0x4000; pub const VWERASE: usize = 0xe; pub const VREPRINT: usize = 0xc; pub const VSUSP: usize = 0xa; @@ -468,460 +471,460 @@ pub const VSTART: usize = 0x8; pub const VSTOP: usize = 0x9; pub const VDISCARD: usize = 0xd; pub const VTIME: usize = 0x5; -pub const IXON: ::tcflag_t = 0x400; -pub const IXOFF: ::tcflag_t = 0x1000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x30; -pub const CS6: ::tcflag_t = 0x10; -pub const CS7: ::tcflag_t = 0x20; -pub const CS8: ::tcflag_t = 0x30; -pub const CSTOPB: ::tcflag_t = 0x40; -pub const CREAD: ::tcflag_t = 0x80; -pub const PARENB: ::tcflag_t = 0x100; -pub const PARODD: ::tcflag_t = 0x200; -pub const HUPCL: ::tcflag_t = 0x400; -pub const CLOCAL: ::tcflag_t = 0x800; -pub const ECHOKE: ::tcflag_t = 0x800; -pub const ECHOE: ::tcflag_t = 0x10; -pub const ECHOK: ::tcflag_t = 0x20; -pub const ECHONL: ::tcflag_t = 0x40; -pub const ECHOPRT: ::tcflag_t = 0x400; -pub const ECHOCTL: ::tcflag_t = 0x200; -pub const ISIG: ::tcflag_t = 0x1; -pub const ICANON: ::tcflag_t = 0x2; -pub const PENDIN: ::tcflag_t = 0x4000; -pub const NOFLSH: ::tcflag_t = 0x80; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0x00001000; +pub const IXON: crate::tcflag_t = 0x400; +pub const IXOFF: crate::tcflag_t = 0x1000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x30; +pub const CS6: crate::tcflag_t = 0x10; +pub const CS7: crate::tcflag_t = 0x20; +pub const CS8: crate::tcflag_t = 0x30; +pub const CSTOPB: crate::tcflag_t = 0x40; +pub const CREAD: crate::tcflag_t = 0x80; +pub const PARENB: crate::tcflag_t = 0x100; +pub const PARODD: crate::tcflag_t = 0x200; +pub const HUPCL: crate::tcflag_t = 0x400; +pub const CLOCAL: crate::tcflag_t = 0x800; +pub const ECHOKE: crate::tcflag_t = 0x800; +pub const ECHOE: crate::tcflag_t = 0x10; +pub const ECHOK: crate::tcflag_t = 0x20; +pub const ECHONL: crate::tcflag_t = 0x40; +pub const ECHOPRT: crate::tcflag_t = 0x400; +pub const ECHOCTL: crate::tcflag_t = 0x200; +pub const ISIG: crate::tcflag_t = 0x1; +pub const ICANON: crate::tcflag_t = 0x2; +pub const PENDIN: crate::tcflag_t = 0x4000; +pub const NOFLSH: crate::tcflag_t = 0x80; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0x00001000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0x1001; -pub const B115200: ::speed_t = 0x1002; -pub const B230400: ::speed_t = 0x1003; -pub const B460800: ::speed_t = 0x1004; -pub const B76800: ::speed_t = 0x1005; -pub const B153600: ::speed_t = 0x1006; -pub const B307200: ::speed_t = 0x1007; -pub const B614400: ::speed_t = 0x1008; -pub const B921600: ::speed_t = 0x1009; -pub const B500000: ::speed_t = 0x100a; -pub const B576000: ::speed_t = 0x100b; -pub const B1000000: ::speed_t = 0x100c; -pub const B1152000: ::speed_t = 0x100d; -pub const B1500000: ::speed_t = 0x100e; -pub const B2000000: ::speed_t = 0x100f; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0x1001; +pub const B115200: crate::speed_t = 0x1002; +pub const B230400: crate::speed_t = 0x1003; +pub const B460800: crate::speed_t = 0x1004; +pub const B76800: crate::speed_t = 0x1005; +pub const B153600: crate::speed_t = 0x1006; +pub const B307200: crate::speed_t = 0x1007; +pub const B614400: crate::speed_t = 0x1008; +pub const B921600: crate::speed_t = 0x1009; +pub const B500000: crate::speed_t = 0x100a; +pub const B576000: crate::speed_t = 0x100b; +pub const B1000000: crate::speed_t = 0x100c; +pub const B1152000: crate::speed_t = 0x100d; +pub const B1500000: crate::speed_t = 0x100e; +pub const B2000000: crate::speed_t = 0x100f; pub const VEOL: usize = 5; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x8000; -pub const TOSTOP: ::tcflag_t = 0x100; -pub const FLUSHO: ::tcflag_t = 0x1000; -pub const EXTPROC: ::tcflag_t = 0x10000; - -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_wait4: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execv: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_chown: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_brk: ::c_long = 17; -pub const SYS_perfctr: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_capget: ::c_long = 21; -pub const SYS_capset: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_vmsplice: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_sigaltstack: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_stat: ::c_long = 38; -pub const SYS_sendfile: ::c_long = 39; -pub const SYS_lstat: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_umount2: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_memory_ordering: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_reboot: ::c_long = 55; -pub const SYS_symlink: ::c_long = 57; -pub const SYS_readlink: ::c_long = 58; -pub const SYS_execve: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_fstat: ::c_long = 62; -pub const SYS_fstat64: ::c_long = 63; -pub const SYS_getpagesize: ::c_long = 64; -pub const SYS_msync: ::c_long = 65; -pub const SYS_vfork: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_mmap: ::c_long = 71; -pub const SYS_munmap: ::c_long = 73; -pub const SYS_mprotect: ::c_long = 74; -pub const SYS_madvise: ::c_long = 75; -pub const SYS_vhangup: ::c_long = 76; -pub const SYS_mincore: ::c_long = 78; -pub const SYS_getgroups: ::c_long = 79; -pub const SYS_setgroups: ::c_long = 80; -pub const SYS_getpgrp: ::c_long = 81; -pub const SYS_setitimer: ::c_long = 83; -pub const SYS_swapon: ::c_long = 85; -pub const SYS_getitimer: ::c_long = 86; -pub const SYS_sethostname: ::c_long = 88; -pub const SYS_dup2: ::c_long = 90; -pub const SYS_fcntl: ::c_long = 92; -pub const SYS_select: ::c_long = 93; -pub const SYS_fsync: ::c_long = 95; -pub const SYS_setpriority: ::c_long = 96; -pub const SYS_socket: ::c_long = 97; -pub const SYS_connect: ::c_long = 98; -pub const SYS_accept: ::c_long = 99; -pub const SYS_getpriority: ::c_long = 100; -pub const SYS_rt_sigreturn: ::c_long = 101; -pub const SYS_rt_sigaction: ::c_long = 102; -pub const SYS_rt_sigprocmask: ::c_long = 103; -pub const SYS_rt_sigpending: ::c_long = 104; -pub const SYS_rt_sigtimedwait: ::c_long = 105; -pub const SYS_rt_sigqueueinfo: ::c_long = 106; -pub const SYS_rt_sigsuspend: ::c_long = 107; -pub const SYS_setresuid: ::c_long = 108; -pub const SYS_getresuid: ::c_long = 109; -pub const SYS_setresgid: ::c_long = 110; -pub const SYS_getresgid: ::c_long = 111; -pub const SYS_recvmsg: ::c_long = 113; -pub const SYS_sendmsg: ::c_long = 114; -pub const SYS_gettimeofday: ::c_long = 116; -pub const SYS_getrusage: ::c_long = 117; -pub const SYS_getsockopt: ::c_long = 118; -pub const SYS_getcwd: ::c_long = 119; -pub const SYS_readv: ::c_long = 120; -pub const SYS_writev: ::c_long = 121; -pub const SYS_settimeofday: ::c_long = 122; -pub const SYS_fchown: ::c_long = 123; -pub const SYS_fchmod: ::c_long = 124; -pub const SYS_recvfrom: ::c_long = 125; -pub const SYS_setreuid: ::c_long = 126; -pub const SYS_setregid: ::c_long = 127; -pub const SYS_rename: ::c_long = 128; -pub const SYS_truncate: ::c_long = 129; -pub const SYS_ftruncate: ::c_long = 130; -pub const SYS_flock: ::c_long = 131; -pub const SYS_lstat64: ::c_long = 132; -pub const SYS_sendto: ::c_long = 133; -pub const SYS_shutdown: ::c_long = 134; -pub const SYS_socketpair: ::c_long = 135; -pub const SYS_mkdir: ::c_long = 136; -pub const SYS_rmdir: ::c_long = 137; -pub const SYS_utimes: ::c_long = 138; -pub const SYS_stat64: ::c_long = 139; -pub const SYS_sendfile64: ::c_long = 140; -pub const SYS_getpeername: ::c_long = 141; -pub const SYS_futex: ::c_long = 142; -pub const SYS_gettid: ::c_long = 143; -pub const SYS_getrlimit: ::c_long = 144; -pub const SYS_setrlimit: ::c_long = 145; -pub const SYS_pivot_root: ::c_long = 146; -pub const SYS_prctl: ::c_long = 147; -pub const SYS_pciconfig_read: ::c_long = 148; -pub const SYS_pciconfig_write: ::c_long = 149; -pub const SYS_getsockname: ::c_long = 150; -pub const SYS_inotify_init: ::c_long = 151; -pub const SYS_inotify_add_watch: ::c_long = 152; -pub const SYS_poll: ::c_long = 153; -pub const SYS_getdents64: ::c_long = 154; -pub const SYS_inotify_rm_watch: ::c_long = 156; -pub const SYS_statfs: ::c_long = 157; -pub const SYS_fstatfs: ::c_long = 158; -pub const SYS_umount: ::c_long = 159; -pub const SYS_sched_set_affinity: ::c_long = 160; -pub const SYS_sched_get_affinity: ::c_long = 161; -pub const SYS_getdomainname: ::c_long = 162; -pub const SYS_setdomainname: ::c_long = 163; -pub const SYS_utrap_install: ::c_long = 164; -pub const SYS_quotactl: ::c_long = 165; -pub const SYS_set_tid_address: ::c_long = 166; -pub const SYS_mount: ::c_long = 167; -pub const SYS_ustat: ::c_long = 168; -pub const SYS_setxattr: ::c_long = 169; -pub const SYS_lsetxattr: ::c_long = 170; -pub const SYS_fsetxattr: ::c_long = 171; -pub const SYS_getxattr: ::c_long = 172; -pub const SYS_lgetxattr: ::c_long = 173; -pub const SYS_getdents: ::c_long = 174; -pub const SYS_setsid: ::c_long = 175; -pub const SYS_fchdir: ::c_long = 176; -pub const SYS_fgetxattr: ::c_long = 177; -pub const SYS_listxattr: ::c_long = 178; -pub const SYS_llistxattr: ::c_long = 179; -pub const SYS_flistxattr: ::c_long = 180; -pub const SYS_removexattr: ::c_long = 181; -pub const SYS_lremovexattr: ::c_long = 182; -pub const SYS_sigpending: ::c_long = 183; -pub const SYS_query_module: ::c_long = 184; -pub const SYS_setpgid: ::c_long = 185; -pub const SYS_fremovexattr: ::c_long = 186; -pub const SYS_tkill: ::c_long = 187; -pub const SYS_exit_group: ::c_long = 188; -pub const SYS_uname: ::c_long = 189; -pub const SYS_init_module: ::c_long = 190; -pub const SYS_personality: ::c_long = 191; -pub const SYS_remap_file_pages: ::c_long = 192; -pub const SYS_epoll_create: ::c_long = 193; -pub const SYS_epoll_ctl: ::c_long = 194; -pub const SYS_epoll_wait: ::c_long = 195; -pub const SYS_ioprio_set: ::c_long = 196; -pub const SYS_getppid: ::c_long = 197; -pub const SYS_sigaction: ::c_long = 198; -pub const SYS_sgetmask: ::c_long = 199; -pub const SYS_ssetmask: ::c_long = 200; -pub const SYS_sigsuspend: ::c_long = 201; -pub const SYS_oldlstat: ::c_long = 202; -pub const SYS_uselib: ::c_long = 203; -pub const SYS_readdir: ::c_long = 204; -pub const SYS_readahead: ::c_long = 205; -pub const SYS_socketcall: ::c_long = 206; -pub const SYS_syslog: ::c_long = 207; -pub const SYS_lookup_dcookie: ::c_long = 208; -pub const SYS_fadvise64: ::c_long = 209; -pub const SYS_fadvise64_64: ::c_long = 210; -pub const SYS_tgkill: ::c_long = 211; -pub const SYS_waitpid: ::c_long = 212; -pub const SYS_swapoff: ::c_long = 213; -pub const SYS_sysinfo: ::c_long = 214; -pub const SYS_ipc: ::c_long = 215; -pub const SYS_sigreturn: ::c_long = 216; -pub const SYS_clone: ::c_long = 217; -pub const SYS_ioprio_get: ::c_long = 218; -pub const SYS_adjtimex: ::c_long = 219; -pub const SYS_sigprocmask: ::c_long = 220; -pub const SYS_create_module: ::c_long = 221; -pub const SYS_delete_module: ::c_long = 222; -pub const SYS_get_kernel_syms: ::c_long = 223; -pub const SYS_getpgid: ::c_long = 224; -pub const SYS_bdflush: ::c_long = 225; -pub const SYS_sysfs: ::c_long = 226; -pub const SYS_afs_syscall: ::c_long = 227; -pub const SYS_setfsuid: ::c_long = 228; -pub const SYS_setfsgid: ::c_long = 229; -pub const SYS__newselect: ::c_long = 230; -pub const SYS_splice: ::c_long = 232; -pub const SYS_stime: ::c_long = 233; -pub const SYS_statfs64: ::c_long = 234; -pub const SYS_fstatfs64: ::c_long = 235; -pub const SYS__llseek: ::c_long = 236; -pub const SYS_mlock: ::c_long = 237; -pub const SYS_munlock: ::c_long = 238; -pub const SYS_mlockall: ::c_long = 239; -pub const SYS_munlockall: ::c_long = 240; -pub const SYS_sched_setparam: ::c_long = 241; -pub const SYS_sched_getparam: ::c_long = 242; -pub const SYS_sched_setscheduler: ::c_long = 243; -pub const SYS_sched_getscheduler: ::c_long = 244; -pub const SYS_sched_yield: ::c_long = 245; -pub const SYS_sched_get_priority_max: ::c_long = 246; -pub const SYS_sched_get_priority_min: ::c_long = 247; -pub const SYS_sched_rr_get_interval: ::c_long = 248; -pub const SYS_nanosleep: ::c_long = 249; -pub const SYS_mremap: ::c_long = 250; -pub const SYS__sysctl: ::c_long = 251; -pub const SYS_getsid: ::c_long = 252; -pub const SYS_fdatasync: ::c_long = 253; -pub const SYS_nfsservctl: ::c_long = 254; -pub const SYS_sync_file_range: ::c_long = 255; -pub const SYS_clock_settime: ::c_long = 256; -pub const SYS_clock_gettime: ::c_long = 257; -pub const SYS_clock_getres: ::c_long = 258; -pub const SYS_clock_nanosleep: ::c_long = 259; -pub const SYS_sched_getaffinity: ::c_long = 260; -pub const SYS_sched_setaffinity: ::c_long = 261; -pub const SYS_timer_settime: ::c_long = 262; -pub const SYS_timer_gettime: ::c_long = 263; -pub const SYS_timer_getoverrun: ::c_long = 264; -pub const SYS_timer_delete: ::c_long = 265; -pub const SYS_timer_create: ::c_long = 266; -pub const SYS_io_setup: ::c_long = 268; -pub const SYS_io_destroy: ::c_long = 269; -pub const SYS_io_submit: ::c_long = 270; -pub const SYS_io_cancel: ::c_long = 271; -pub const SYS_io_getevents: ::c_long = 272; -pub const SYS_mq_open: ::c_long = 273; -pub const SYS_mq_unlink: ::c_long = 274; -pub const SYS_mq_timedsend: ::c_long = 275; -pub const SYS_mq_timedreceive: ::c_long = 276; -pub const SYS_mq_notify: ::c_long = 277; -pub const SYS_mq_getsetattr: ::c_long = 278; -pub const SYS_waitid: ::c_long = 279; -pub const SYS_tee: ::c_long = 280; -pub const SYS_add_key: ::c_long = 281; -pub const SYS_request_key: ::c_long = 282; -pub const SYS_keyctl: ::c_long = 283; -pub const SYS_openat: ::c_long = 284; -pub const SYS_mkdirat: ::c_long = 285; -pub const SYS_mknodat: ::c_long = 286; -pub const SYS_fchownat: ::c_long = 287; -pub const SYS_futimesat: ::c_long = 288; -pub const SYS_fstatat64: ::c_long = 289; -pub const SYS_unlinkat: ::c_long = 290; -pub const SYS_renameat: ::c_long = 291; -pub const SYS_linkat: ::c_long = 292; -pub const SYS_symlinkat: ::c_long = 293; -pub const SYS_readlinkat: ::c_long = 294; -pub const SYS_fchmodat: ::c_long = 295; -pub const SYS_faccessat: ::c_long = 296; -pub const SYS_pselect6: ::c_long = 297; -pub const SYS_ppoll: ::c_long = 298; -pub const SYS_unshare: ::c_long = 299; -pub const SYS_set_robust_list: ::c_long = 300; -pub const SYS_get_robust_list: ::c_long = 301; -pub const SYS_migrate_pages: ::c_long = 302; -pub const SYS_mbind: ::c_long = 303; -pub const SYS_get_mempolicy: ::c_long = 304; -pub const SYS_set_mempolicy: ::c_long = 305; -pub const SYS_kexec_load: ::c_long = 306; -pub const SYS_move_pages: ::c_long = 307; -pub const SYS_getcpu: ::c_long = 308; -pub const SYS_epoll_pwait: ::c_long = 309; -pub const SYS_utimensat: ::c_long = 310; -pub const SYS_signalfd: ::c_long = 311; -pub const SYS_timerfd_create: ::c_long = 312; -pub const SYS_eventfd: ::c_long = 313; -pub const SYS_fallocate: ::c_long = 314; -pub const SYS_timerfd_settime: ::c_long = 315; -pub const SYS_timerfd_gettime: ::c_long = 316; -pub const SYS_signalfd4: ::c_long = 317; -pub const SYS_eventfd2: ::c_long = 318; -pub const SYS_epoll_create1: ::c_long = 319; -pub const SYS_dup3: ::c_long = 320; -pub const SYS_pipe2: ::c_long = 321; -pub const SYS_inotify_init1: ::c_long = 322; -pub const SYS_accept4: ::c_long = 323; -pub const SYS_preadv: ::c_long = 324; -pub const SYS_pwritev: ::c_long = 325; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 326; -pub const SYS_perf_event_open: ::c_long = 327; -pub const SYS_recvmmsg: ::c_long = 328; -pub const SYS_fanotify_init: ::c_long = 329; -pub const SYS_fanotify_mark: ::c_long = 330; -pub const SYS_prlimit64: ::c_long = 331; -pub const SYS_name_to_handle_at: ::c_long = 332; -pub const SYS_open_by_handle_at: ::c_long = 333; -pub const SYS_clock_adjtime: ::c_long = 334; -pub const SYS_syncfs: ::c_long = 335; -pub const SYS_sendmmsg: ::c_long = 336; -pub const SYS_setns: ::c_long = 337; -pub const SYS_process_vm_readv: ::c_long = 338; -pub const SYS_process_vm_writev: ::c_long = 339; -pub const SYS_kern_features: ::c_long = 340; -pub const SYS_kcmp: ::c_long = 341; -pub const SYS_finit_module: ::c_long = 342; -pub const SYS_sched_setattr: ::c_long = 343; -pub const SYS_sched_getattr: ::c_long = 344; -pub const SYS_renameat2: ::c_long = 345; -pub const SYS_seccomp: ::c_long = 346; -pub const SYS_getrandom: ::c_long = 347; -pub const SYS_memfd_create: ::c_long = 348; -pub const SYS_bpf: ::c_long = 349; -pub const SYS_execveat: ::c_long = 350; -pub const SYS_membarrier: ::c_long = 351; -pub const SYS_userfaultfd: ::c_long = 352; -pub const SYS_bind: ::c_long = 353; -pub const SYS_listen: ::c_long = 354; -pub const SYS_setsockopt: ::c_long = 355; -pub const SYS_mlock2: ::c_long = 356; -pub const SYS_copy_file_range: ::c_long = 357; -pub const SYS_preadv2: ::c_long = 358; -pub const SYS_pwritev2: ::c_long = 359; -pub const SYS_statx: ::c_long = 360; -pub const SYS_rseq: ::c_long = 365; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; +pub const IEXTEN: crate::tcflag_t = 0x8000; +pub const TOSTOP: crate::tcflag_t = 0x100; +pub const FLUSHO: crate::tcflag_t = 0x1000; +pub const EXTPROC: crate::tcflag_t = 0x10000; + +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_wait4: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execv: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_chown: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_brk: c_long = 17; +pub const SYS_perfctr: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_capget: c_long = 21; +pub const SYS_capset: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_vmsplice: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_sigaltstack: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_stat: c_long = 38; +pub const SYS_sendfile: c_long = 39; +pub const SYS_lstat: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_umount2: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_memory_ordering: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_reboot: c_long = 55; +pub const SYS_symlink: c_long = 57; +pub const SYS_readlink: c_long = 58; +pub const SYS_execve: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_fstat: c_long = 62; +pub const SYS_fstat64: c_long = 63; +pub const SYS_getpagesize: c_long = 64; +pub const SYS_msync: c_long = 65; +pub const SYS_vfork: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_mmap: c_long = 71; +pub const SYS_munmap: c_long = 73; +pub const SYS_mprotect: c_long = 74; +pub const SYS_madvise: c_long = 75; +pub const SYS_vhangup: c_long = 76; +pub const SYS_mincore: c_long = 78; +pub const SYS_getgroups: c_long = 79; +pub const SYS_setgroups: c_long = 80; +pub const SYS_getpgrp: c_long = 81; +pub const SYS_setitimer: c_long = 83; +pub const SYS_swapon: c_long = 85; +pub const SYS_getitimer: c_long = 86; +pub const SYS_sethostname: c_long = 88; +pub const SYS_dup2: c_long = 90; +pub const SYS_fcntl: c_long = 92; +pub const SYS_select: c_long = 93; +pub const SYS_fsync: c_long = 95; +pub const SYS_setpriority: c_long = 96; +pub const SYS_socket: c_long = 97; +pub const SYS_connect: c_long = 98; +pub const SYS_accept: c_long = 99; +pub const SYS_getpriority: c_long = 100; +pub const SYS_rt_sigreturn: c_long = 101; +pub const SYS_rt_sigaction: c_long = 102; +pub const SYS_rt_sigprocmask: c_long = 103; +pub const SYS_rt_sigpending: c_long = 104; +pub const SYS_rt_sigtimedwait: c_long = 105; +pub const SYS_rt_sigqueueinfo: c_long = 106; +pub const SYS_rt_sigsuspend: c_long = 107; +pub const SYS_setresuid: c_long = 108; +pub const SYS_getresuid: c_long = 109; +pub const SYS_setresgid: c_long = 110; +pub const SYS_getresgid: c_long = 111; +pub const SYS_recvmsg: c_long = 113; +pub const SYS_sendmsg: c_long = 114; +pub const SYS_gettimeofday: c_long = 116; +pub const SYS_getrusage: c_long = 117; +pub const SYS_getsockopt: c_long = 118; +pub const SYS_getcwd: c_long = 119; +pub const SYS_readv: c_long = 120; +pub const SYS_writev: c_long = 121; +pub const SYS_settimeofday: c_long = 122; +pub const SYS_fchown: c_long = 123; +pub const SYS_fchmod: c_long = 124; +pub const SYS_recvfrom: c_long = 125; +pub const SYS_setreuid: c_long = 126; +pub const SYS_setregid: c_long = 127; +pub const SYS_rename: c_long = 128; +pub const SYS_truncate: c_long = 129; +pub const SYS_ftruncate: c_long = 130; +pub const SYS_flock: c_long = 131; +pub const SYS_lstat64: c_long = 132; +pub const SYS_sendto: c_long = 133; +pub const SYS_shutdown: c_long = 134; +pub const SYS_socketpair: c_long = 135; +pub const SYS_mkdir: c_long = 136; +pub const SYS_rmdir: c_long = 137; +pub const SYS_utimes: c_long = 138; +pub const SYS_stat64: c_long = 139; +pub const SYS_sendfile64: c_long = 140; +pub const SYS_getpeername: c_long = 141; +pub const SYS_futex: c_long = 142; +pub const SYS_gettid: c_long = 143; +pub const SYS_getrlimit: c_long = 144; +pub const SYS_setrlimit: c_long = 145; +pub const SYS_pivot_root: c_long = 146; +pub const SYS_prctl: c_long = 147; +pub const SYS_pciconfig_read: c_long = 148; +pub const SYS_pciconfig_write: c_long = 149; +pub const SYS_getsockname: c_long = 150; +pub const SYS_inotify_init: c_long = 151; +pub const SYS_inotify_add_watch: c_long = 152; +pub const SYS_poll: c_long = 153; +pub const SYS_getdents64: c_long = 154; +pub const SYS_inotify_rm_watch: c_long = 156; +pub const SYS_statfs: c_long = 157; +pub const SYS_fstatfs: c_long = 158; +pub const SYS_umount: c_long = 159; +pub const SYS_sched_set_affinity: c_long = 160; +pub const SYS_sched_get_affinity: c_long = 161; +pub const SYS_getdomainname: c_long = 162; +pub const SYS_setdomainname: c_long = 163; +pub const SYS_utrap_install: c_long = 164; +pub const SYS_quotactl: c_long = 165; +pub const SYS_set_tid_address: c_long = 166; +pub const SYS_mount: c_long = 167; +pub const SYS_ustat: c_long = 168; +pub const SYS_setxattr: c_long = 169; +pub const SYS_lsetxattr: c_long = 170; +pub const SYS_fsetxattr: c_long = 171; +pub const SYS_getxattr: c_long = 172; +pub const SYS_lgetxattr: c_long = 173; +pub const SYS_getdents: c_long = 174; +pub const SYS_setsid: c_long = 175; +pub const SYS_fchdir: c_long = 176; +pub const SYS_fgetxattr: c_long = 177; +pub const SYS_listxattr: c_long = 178; +pub const SYS_llistxattr: c_long = 179; +pub const SYS_flistxattr: c_long = 180; +pub const SYS_removexattr: c_long = 181; +pub const SYS_lremovexattr: c_long = 182; +pub const SYS_sigpending: c_long = 183; +pub const SYS_query_module: c_long = 184; +pub const SYS_setpgid: c_long = 185; +pub const SYS_fremovexattr: c_long = 186; +pub const SYS_tkill: c_long = 187; +pub const SYS_exit_group: c_long = 188; +pub const SYS_uname: c_long = 189; +pub const SYS_init_module: c_long = 190; +pub const SYS_personality: c_long = 191; +pub const SYS_remap_file_pages: c_long = 192; +pub const SYS_epoll_create: c_long = 193; +pub const SYS_epoll_ctl: c_long = 194; +pub const SYS_epoll_wait: c_long = 195; +pub const SYS_ioprio_set: c_long = 196; +pub const SYS_getppid: c_long = 197; +pub const SYS_sigaction: c_long = 198; +pub const SYS_sgetmask: c_long = 199; +pub const SYS_ssetmask: c_long = 200; +pub const SYS_sigsuspend: c_long = 201; +pub const SYS_oldlstat: c_long = 202; +pub const SYS_uselib: c_long = 203; +pub const SYS_readdir: c_long = 204; +pub const SYS_readahead: c_long = 205; +pub const SYS_socketcall: c_long = 206; +pub const SYS_syslog: c_long = 207; +pub const SYS_lookup_dcookie: c_long = 208; +pub const SYS_fadvise64: c_long = 209; +pub const SYS_fadvise64_64: c_long = 210; +pub const SYS_tgkill: c_long = 211; +pub const SYS_waitpid: c_long = 212; +pub const SYS_swapoff: c_long = 213; +pub const SYS_sysinfo: c_long = 214; +pub const SYS_ipc: c_long = 215; +pub const SYS_sigreturn: c_long = 216; +pub const SYS_clone: c_long = 217; +pub const SYS_ioprio_get: c_long = 218; +pub const SYS_adjtimex: c_long = 219; +pub const SYS_sigprocmask: c_long = 220; +pub const SYS_create_module: c_long = 221; +pub const SYS_delete_module: c_long = 222; +pub const SYS_get_kernel_syms: c_long = 223; +pub const SYS_getpgid: c_long = 224; +pub const SYS_bdflush: c_long = 225; +pub const SYS_sysfs: c_long = 226; +pub const SYS_afs_syscall: c_long = 227; +pub const SYS_setfsuid: c_long = 228; +pub const SYS_setfsgid: c_long = 229; +pub const SYS__newselect: c_long = 230; +pub const SYS_splice: c_long = 232; +pub const SYS_stime: c_long = 233; +pub const SYS_statfs64: c_long = 234; +pub const SYS_fstatfs64: c_long = 235; +pub const SYS__llseek: c_long = 236; +pub const SYS_mlock: c_long = 237; +pub const SYS_munlock: c_long = 238; +pub const SYS_mlockall: c_long = 239; +pub const SYS_munlockall: c_long = 240; +pub const SYS_sched_setparam: c_long = 241; +pub const SYS_sched_getparam: c_long = 242; +pub const SYS_sched_setscheduler: c_long = 243; +pub const SYS_sched_getscheduler: c_long = 244; +pub const SYS_sched_yield: c_long = 245; +pub const SYS_sched_get_priority_max: c_long = 246; +pub const SYS_sched_get_priority_min: c_long = 247; +pub const SYS_sched_rr_get_interval: c_long = 248; +pub const SYS_nanosleep: c_long = 249; +pub const SYS_mremap: c_long = 250; +pub const SYS__sysctl: c_long = 251; +pub const SYS_getsid: c_long = 252; +pub const SYS_fdatasync: c_long = 253; +pub const SYS_nfsservctl: c_long = 254; +pub const SYS_sync_file_range: c_long = 255; +pub const SYS_clock_settime: c_long = 256; +pub const SYS_clock_gettime: c_long = 257; +pub const SYS_clock_getres: c_long = 258; +pub const SYS_clock_nanosleep: c_long = 259; +pub const SYS_sched_getaffinity: c_long = 260; +pub const SYS_sched_setaffinity: c_long = 261; +pub const SYS_timer_settime: c_long = 262; +pub const SYS_timer_gettime: c_long = 263; +pub const SYS_timer_getoverrun: c_long = 264; +pub const SYS_timer_delete: c_long = 265; +pub const SYS_timer_create: c_long = 266; +pub const SYS_io_setup: c_long = 268; +pub const SYS_io_destroy: c_long = 269; +pub const SYS_io_submit: c_long = 270; +pub const SYS_io_cancel: c_long = 271; +pub const SYS_io_getevents: c_long = 272; +pub const SYS_mq_open: c_long = 273; +pub const SYS_mq_unlink: c_long = 274; +pub const SYS_mq_timedsend: c_long = 275; +pub const SYS_mq_timedreceive: c_long = 276; +pub const SYS_mq_notify: c_long = 277; +pub const SYS_mq_getsetattr: c_long = 278; +pub const SYS_waitid: c_long = 279; +pub const SYS_tee: c_long = 280; +pub const SYS_add_key: c_long = 281; +pub const SYS_request_key: c_long = 282; +pub const SYS_keyctl: c_long = 283; +pub const SYS_openat: c_long = 284; +pub const SYS_mkdirat: c_long = 285; +pub const SYS_mknodat: c_long = 286; +pub const SYS_fchownat: c_long = 287; +pub const SYS_futimesat: c_long = 288; +pub const SYS_fstatat64: c_long = 289; +pub const SYS_unlinkat: c_long = 290; +pub const SYS_renameat: c_long = 291; +pub const SYS_linkat: c_long = 292; +pub const SYS_symlinkat: c_long = 293; +pub const SYS_readlinkat: c_long = 294; +pub const SYS_fchmodat: c_long = 295; +pub const SYS_faccessat: c_long = 296; +pub const SYS_pselect6: c_long = 297; +pub const SYS_ppoll: c_long = 298; +pub const SYS_unshare: c_long = 299; +pub const SYS_set_robust_list: c_long = 300; +pub const SYS_get_robust_list: c_long = 301; +pub const SYS_migrate_pages: c_long = 302; +pub const SYS_mbind: c_long = 303; +pub const SYS_get_mempolicy: c_long = 304; +pub const SYS_set_mempolicy: c_long = 305; +pub const SYS_kexec_load: c_long = 306; +pub const SYS_move_pages: c_long = 307; +pub const SYS_getcpu: c_long = 308; +pub const SYS_epoll_pwait: c_long = 309; +pub const SYS_utimensat: c_long = 310; +pub const SYS_signalfd: c_long = 311; +pub const SYS_timerfd_create: c_long = 312; +pub const SYS_eventfd: c_long = 313; +pub const SYS_fallocate: c_long = 314; +pub const SYS_timerfd_settime: c_long = 315; +pub const SYS_timerfd_gettime: c_long = 316; +pub const SYS_signalfd4: c_long = 317; +pub const SYS_eventfd2: c_long = 318; +pub const SYS_epoll_create1: c_long = 319; +pub const SYS_dup3: c_long = 320; +pub const SYS_pipe2: c_long = 321; +pub const SYS_inotify_init1: c_long = 322; +pub const SYS_accept4: c_long = 323; +pub const SYS_preadv: c_long = 324; +pub const SYS_pwritev: c_long = 325; +pub const SYS_rt_tgsigqueueinfo: c_long = 326; +pub const SYS_perf_event_open: c_long = 327; +pub const SYS_recvmmsg: c_long = 328; +pub const SYS_fanotify_init: c_long = 329; +pub const SYS_fanotify_mark: c_long = 330; +pub const SYS_prlimit64: c_long = 331; +pub const SYS_name_to_handle_at: c_long = 332; +pub const SYS_open_by_handle_at: c_long = 333; +pub const SYS_clock_adjtime: c_long = 334; +pub const SYS_syncfs: c_long = 335; +pub const SYS_sendmmsg: c_long = 336; +pub const SYS_setns: c_long = 337; +pub const SYS_process_vm_readv: c_long = 338; +pub const SYS_process_vm_writev: c_long = 339; +pub const SYS_kern_features: c_long = 340; +pub const SYS_kcmp: c_long = 341; +pub const SYS_finit_module: c_long = 342; +pub const SYS_sched_setattr: c_long = 343; +pub const SYS_sched_getattr: c_long = 344; +pub const SYS_renameat2: c_long = 345; +pub const SYS_seccomp: c_long = 346; +pub const SYS_getrandom: c_long = 347; +pub const SYS_memfd_create: c_long = 348; +pub const SYS_bpf: c_long = 349; +pub const SYS_execveat: c_long = 350; +pub const SYS_membarrier: c_long = 351; +pub const SYS_userfaultfd: c_long = 352; +pub const SYS_bind: c_long = 353; +pub const SYS_listen: c_long = 354; +pub const SYS_setsockopt: c_long = 355; +pub const SYS_mlock2: c_long = 356; +pub const SYS_copy_file_range: c_long = 357; +pub const SYS_preadv2: c_long = 358; +pub const SYS_pwritev2: c_long = 359; +pub const SYS_statx: c_long = 360; +pub const SYS_rseq: c_long = 365; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; // Reserved in the kernel, but not actually implemented yet -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; } diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs index fc0caf77d3e47..98838accea1b8 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/mod.rs @@ -1,60 +1,64 @@ //! x86_64-specific definitions for 64-bit linux-like values +use crate::{ + c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, off_t, size_t, +}; + pub type c_char = i8; pub type wchar_t = i32; pub type nlink_t = u64; pub type blksize_t = i64; pub type greg_t = i64; pub type suseconds_t = i64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, #[cfg(target_arch = "sparc64")] - __reserved0: ::c_int, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + __reserved0: c_int, + pub sa_flags: c_int, + pub sa_restorer: Option, } pub struct statfs { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - f_spare: [::__fsword_t; 5], + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + f_spare: [crate::__fsword_t; 5], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", @@ -62,86 +66,86 @@ s! { https://github.com/rust-lang/libc/pull/1316 if you're using \ this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [u64; 0], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, pub st_atime_nsec: i64, - pub st_mtime: ::time_t, + pub st_mtime: crate::time_t, pub st_mtime_nsec: i64, - pub st_ctime: ::time_t, + pub st_ctime: crate::time_t, pub st_ctime_nsec: i64, __unused: [i64; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, pub st_atime_nsec: i64, - pub st_mtime: ::time_t, + pub st_mtime: crate::time_t, pub st_mtime_nsec: i64, - pub st_ctime: ::time_t, + pub st_ctime: crate::time_t, pub st_ctime_nsec: i64, __reserved: [i64; 3], } pub struct statfs64 { - pub f_type: ::__fsword_t, - pub f_bsize: ::__fsword_t, + pub f_type: crate::__fsword_t, + pub f_bsize: crate::__fsword_t, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, - pub f_fsid: ::fsid_t, - pub f_namelen: ::__fsword_t, - pub f_frsize: ::__fsword_t, - pub f_flags: ::__fsword_t, - pub f_spare: [::__fsword_t; 4], + pub f_fsid: crate::fsid_t, + pub f_namelen: crate::__fsword_t, + pub f_frsize: crate::__fsword_t, + pub f_flags: crate::__fsword_t, + pub f_spare: [crate::__fsword_t; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct pthread_attr_t { @@ -176,55 +180,55 @@ s! { } pub struct user_regs_struct { - pub r15: ::c_ulonglong, - pub r14: ::c_ulonglong, - pub r13: ::c_ulonglong, - pub r12: ::c_ulonglong, - pub rbp: ::c_ulonglong, - pub rbx: ::c_ulonglong, - pub r11: ::c_ulonglong, - pub r10: ::c_ulonglong, - pub r9: ::c_ulonglong, - pub r8: ::c_ulonglong, - pub rax: ::c_ulonglong, - pub rcx: ::c_ulonglong, - pub rdx: ::c_ulonglong, - pub rsi: ::c_ulonglong, - pub rdi: ::c_ulonglong, - pub orig_rax: ::c_ulonglong, - pub rip: ::c_ulonglong, - pub cs: ::c_ulonglong, - pub eflags: ::c_ulonglong, - pub rsp: ::c_ulonglong, - pub ss: ::c_ulonglong, - pub fs_base: ::c_ulonglong, - pub gs_base: ::c_ulonglong, - pub ds: ::c_ulonglong, - pub es: ::c_ulonglong, - pub fs: ::c_ulonglong, - pub gs: ::c_ulonglong, + pub r15: c_ulonglong, + pub r14: c_ulonglong, + pub r13: c_ulonglong, + pub r12: c_ulonglong, + pub rbp: c_ulonglong, + pub rbx: c_ulonglong, + pub r11: c_ulonglong, + pub r10: c_ulonglong, + pub r9: c_ulonglong, + pub r8: c_ulonglong, + pub rax: c_ulonglong, + pub rcx: c_ulonglong, + pub rdx: c_ulonglong, + pub rsi: c_ulonglong, + pub rdi: c_ulonglong, + pub orig_rax: c_ulonglong, + pub rip: c_ulonglong, + pub cs: c_ulonglong, + pub eflags: c_ulonglong, + pub rsp: c_ulonglong, + pub ss: c_ulonglong, + pub fs_base: c_ulonglong, + pub gs_base: c_ulonglong, + pub ds: c_ulonglong, + pub es: c_ulonglong, + pub fs: c_ulonglong, + pub gs: c_ulonglong, } pub struct user { pub regs: user_regs_struct, - pub u_fpvalid: ::c_int, + pub u_fpvalid: c_int, pub i387: user_fpregs_struct, - pub u_tsize: ::c_ulonglong, - pub u_dsize: ::c_ulonglong, - pub u_ssize: ::c_ulonglong, - pub start_code: ::c_ulonglong, - pub start_stack: ::c_ulonglong, - pub signal: ::c_longlong, - __reserved: ::c_int, + pub u_tsize: c_ulonglong, + pub u_dsize: c_ulonglong, + pub u_ssize: c_ulonglong, + pub start_code: c_ulonglong, + pub start_stack: c_ulonglong, + pub signal: c_longlong, + __reserved: c_int, #[cfg(target_pointer_width = "32")] __pad1: u32, pub u_ar0: *mut user_regs_struct, #[cfg(target_pointer_width = "32")] __pad2: u32, pub u_fpstate: *mut user_fpregs_struct, - pub magic: ::c_ulonglong, - pub u_comm: [::c_char; 32], - pub u_debugreg: [::c_ulonglong; 8], + pub magic: c_ulonglong, + pub u_comm: [c_char; 32], + pub u_debugreg: [c_ulonglong; 8], } pub struct mcontext_t { @@ -234,83 +238,83 @@ s! { } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, __unused1: u64, __unused2: u64, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, __unused4: u64, __unused5: u64, } pub struct ptrace_rseq_configuration { - pub rseq_abi_pointer: ::__u64, - pub rseq_abi_size: ::__u32, - pub signature: ::__u32, - pub flags: ::__u32, - pub pad: ::__u32, + pub rseq_abi_pointer: crate::__u64, + pub rseq_abi_size: crate::__u32, + pub signature: crate::__u32, + pub flags: crate::__u32, + pub pad: crate::__u32, } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } s_no_extra_traits! { pub struct user_fpregs_struct { - pub cwd: ::c_ushort, - pub swd: ::c_ushort, - pub ftw: ::c_ushort, - pub fop: ::c_ushort, - pub rip: ::c_ulonglong, - pub rdp: ::c_ulonglong, - pub mxcsr: ::c_uint, - pub mxcr_mask: ::c_uint, - pub st_space: [::c_uint; 32], - pub xmm_space: [::c_uint; 64], - padding: [::c_uint; 24], + pub cwd: c_ushort, + pub swd: c_ushort, + pub ftw: c_ushort, + pub fop: c_ushort, + pub rip: c_ulonglong, + pub rdp: c_ulonglong, + pub mxcsr: c_uint, + pub mxcr_mask: c_uint, + pub st_space: [c_uint; 32], + pub xmm_space: [c_uint; 64], + padding: [c_uint; 24], } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, __private: [u8; 512], // FIXME: the shadow stack field requires glibc >= 2.28. // Re-add once we drop compatibility with glibc versions older than // 2.28. // - // __ssp: [::c_ulonglong; 4], + // __ssp: [c_ulonglong; 4], } #[allow(missing_debug_implementations)] @@ -344,8 +348,8 @@ cfg_if! { impl Eq for user_fpregs_struct {} - impl ::fmt::Debug for user_fpregs_struct { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for user_fpregs_struct { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("user_fpregs_struct") .field("cwd", &self.cwd) .field("ftw", &self.ftw) @@ -361,8 +365,8 @@ cfg_if! { } } - impl ::hash::Hash for user_fpregs_struct { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for user_fpregs_struct { + fn hash(&self, state: &mut H) { self.cwd.hash(state); self.ftw.hash(state); self.fop.hash(state); @@ -389,8 +393,8 @@ cfg_if! { impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -402,8 +406,8 @@ cfg_if! { } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -415,271 +419,271 @@ cfg_if! { } } -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; +pub const RTLD_DEEPBIND: c_int = 0x8; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; + +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_PATH: c_int = 0o10000000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0100; + +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = 31; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGUNUSED: c_int = 31; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x800; +pub const O_ASYNC: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x800; -pub const PTRACE_DETACH: ::c_uint = 17; -pub const PTRACE_GET_RSEQ_CONFIGURATION: ::c_uint = 0x420f; +pub const PTRACE_DETACH: c_uint = 17; +pub const PTRACE_GET_RSEQ_CONFIGURATION: c_uint = 0x420f; -pub const EFD_NONBLOCK: ::c_int = 0x800; +pub const EFD_NONBLOCK: c_int = 0x800; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; -pub const SFD_NONBLOCK: ::c_int = 0x0800; +pub const SFD_NONBLOCK: c_int = 0x0800; -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; +pub const O_TRUNC: c_int = 512; -pub const O_CLOEXEC: ::c_int = 0x80000; +pub const O_CLOEXEC: c_int = 0x80000; -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; +pub const EPOLL_CLOEXEC: c_int = 0x80000; -pub const EFD_CLOEXEC: ::c_int = 0x80000; +pub const EFD_CLOEXEC: c_int = 0x80000; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_32BIT: ::c_int = 0x0040; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; - -pub const PTRACE_GETFPREGS: ::c_uint = 14; -pub const PTRACE_SETFPREGS: ::c_uint = 15; -pub const PTRACE_GETFPXREGS: ::c_uint = 18; -pub const PTRACE_SETFPXREGS: ::c_uint = 19; -pub const PTRACE_GETREGS: ::c_uint = 12; -pub const PTRACE_SETREGS: ::c_uint = 13; -pub const PTRACE_PEEKSIGINFO_SHARED: ::c_uint = 1; -pub const PTRACE_SYSEMU: ::c_uint = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_uint = 32; - -pub const PR_GET_SPECULATION_CTRL: ::c_int = 52; -pub const PR_SET_SPECULATION_CTRL: ::c_int = 53; -pub const PR_SPEC_NOT_AFFECTED: ::c_uint = 0; -pub const PR_SPEC_PRCTL: ::c_uint = 1 << 0; -pub const PR_SPEC_ENABLE: ::c_uint = 1 << 1; -pub const PR_SPEC_DISABLE: ::c_uint = 1 << 2; -pub const PR_SPEC_FORCE_DISABLE: ::c_uint = 1 << 3; -pub const PR_SPEC_DISABLE_NOEXEC: ::c_uint = 1 << 4; -pub const PR_SPEC_STORE_BYPASS: ::c_int = 0; -pub const PR_SPEC_INDIRECT_BRANCH: ::c_int = 1; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; + +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_32BIT: c_int = 0x0040; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; + +pub const PTRACE_GETFPREGS: c_uint = 14; +pub const PTRACE_SETFPREGS: c_uint = 15; +pub const PTRACE_GETFPXREGS: c_uint = 18; +pub const PTRACE_SETFPXREGS: c_uint = 19; +pub const PTRACE_GETREGS: c_uint = 12; +pub const PTRACE_SETREGS: c_uint = 13; +pub const PTRACE_PEEKSIGINFO_SHARED: c_uint = 1; +pub const PTRACE_SYSEMU: c_uint = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_uint = 32; + +pub const PR_GET_SPECULATION_CTRL: c_int = 52; +pub const PR_SET_SPECULATION_CTRL: c_int = 53; +pub const PR_SPEC_NOT_AFFECTED: c_uint = 0; +pub const PR_SPEC_PRCTL: c_uint = 1 << 0; +pub const PR_SPEC_ENABLE: c_uint = 1 << 1; +pub const PR_SPEC_DISABLE: c_uint = 1 << 2; +pub const PR_SPEC_FORCE_DISABLE: c_uint = 1 << 3; +pub const PR_SPEC_DISABLE_NOEXEC: c_uint = 1 << 4; +pub const PR_SPEC_STORE_BYPASS: c_int = 0; +pub const PR_SPEC_INDIRECT_BRANCH: c_int = 1; // FIXME: perharps for later -//pub const PR_SPEC_L1D_FLUSH: ::c_int = 2; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; - -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +//pub const PR_SPEC_L1D_FLUSH: c_int = 2; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; + +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -687,142 +691,142 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; // offsets in user_regs_structs, from sys/reg.h -pub const R15: ::c_int = 0; -pub const R14: ::c_int = 1; -pub const R13: ::c_int = 2; -pub const R12: ::c_int = 3; -pub const RBP: ::c_int = 4; -pub const RBX: ::c_int = 5; -pub const R11: ::c_int = 6; -pub const R10: ::c_int = 7; -pub const R9: ::c_int = 8; -pub const R8: ::c_int = 9; -pub const RAX: ::c_int = 10; -pub const RCX: ::c_int = 11; -pub const RDX: ::c_int = 12; -pub const RSI: ::c_int = 13; -pub const RDI: ::c_int = 14; -pub const ORIG_RAX: ::c_int = 15; -pub const RIP: ::c_int = 16; -pub const CS: ::c_int = 17; -pub const EFLAGS: ::c_int = 18; -pub const RSP: ::c_int = 19; -pub const SS: ::c_int = 20; -pub const FS_BASE: ::c_int = 21; -pub const GS_BASE: ::c_int = 22; -pub const DS: ::c_int = 23; -pub const ES: ::c_int = 24; -pub const FS: ::c_int = 25; -pub const GS: ::c_int = 26; +pub const R15: c_int = 0; +pub const R14: c_int = 1; +pub const R13: c_int = 2; +pub const R12: c_int = 3; +pub const RBP: c_int = 4; +pub const RBX: c_int = 5; +pub const R11: c_int = 6; +pub const R10: c_int = 7; +pub const R9: c_int = 8; +pub const R8: c_int = 9; +pub const RAX: c_int = 10; +pub const RCX: c_int = 11; +pub const RDX: c_int = 12; +pub const RSI: c_int = 13; +pub const RDI: c_int = 14; +pub const ORIG_RAX: c_int = 15; +pub const RIP: c_int = 16; +pub const CS: c_int = 17; +pub const EFLAGS: c_int = 18; +pub const RSP: c_int = 19; +pub const SS: c_int = 20; +pub const FS_BASE: c_int = 21; +pub const GS_BASE: c_int = 22; +pub const DS: c_int = 23; +pub const ES: c_int = 24; +pub const FS: c_int = 25; +pub const GS: c_int = 26; // offsets in mcontext_t.gregs from sys/ucontext.h -pub const REG_R8: ::c_int = 0; -pub const REG_R9: ::c_int = 1; -pub const REG_R10: ::c_int = 2; -pub const REG_R11: ::c_int = 3; -pub const REG_R12: ::c_int = 4; -pub const REG_R13: ::c_int = 5; -pub const REG_R14: ::c_int = 6; -pub const REG_R15: ::c_int = 7; -pub const REG_RDI: ::c_int = 8; -pub const REG_RSI: ::c_int = 9; -pub const REG_RBP: ::c_int = 10; -pub const REG_RBX: ::c_int = 11; -pub const REG_RDX: ::c_int = 12; -pub const REG_RAX: ::c_int = 13; -pub const REG_RCX: ::c_int = 14; -pub const REG_RSP: ::c_int = 15; -pub const REG_RIP: ::c_int = 16; -pub const REG_EFL: ::c_int = 17; -pub const REG_CSGSFS: ::c_int = 18; -pub const REG_ERR: ::c_int = 19; -pub const REG_TRAPNO: ::c_int = 20; -pub const REG_OLDMASK: ::c_int = 21; -pub const REG_CR2: ::c_int = 22; +pub const REG_R8: c_int = 0; +pub const REG_R9: c_int = 1; +pub const REG_R10: c_int = 2; +pub const REG_R11: c_int = 3; +pub const REG_R12: c_int = 4; +pub const REG_R13: c_int = 5; +pub const REG_R14: c_int = 6; +pub const REG_R15: c_int = 7; +pub const REG_RDI: c_int = 8; +pub const REG_RSI: c_int = 9; +pub const REG_RBP: c_int = 10; +pub const REG_RBX: c_int = 11; +pub const REG_RDX: c_int = 12; +pub const REG_RAX: c_int = 13; +pub const REG_RCX: c_int = 14; +pub const REG_RSP: c_int = 15; +pub const REG_RIP: c_int = 16; +pub const REG_EFL: c_int = 17; +pub const REG_CSGSFS: c_int = 18; +pub const REG_ERR: c_int = 19; +pub const REG_TRAPNO: c_int = 20; +pub const REG_OLDMASK: c_int = 21; +pub const REG_CR2: c_int = 22; extern "C" { - pub fn getcontext(ucp: *mut ucontext_t) -> ::c_int; - pub fn setcontext(ucp: *const ucontext_t) -> ::c_int; - pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: ::c_int, ...); - pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> ::c_int; + pub fn getcontext(ucp: *mut ucontext_t) -> c_int; + pub fn setcontext(ucp: *const ucontext_t) -> c_int; + pub fn makecontext(ucp: *mut ucontext_t, func: extern "C" fn(), argc: c_int, ...); + pub fn swapcontext(uocp: *mut ucontext_t, ucp: *const ucontext_t) -> c_int; } cfg_if! { diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs index 0c83fa13b4e5e..2d256cd8a13db 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/not_x32.rs @@ -1,22 +1,22 @@ -use pthread_mutex_t; +use crate::{c_int, c_void, pthread_mutex_t, size_t}; pub type c_long = i64; pub type c_ulong = u64; s! { pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } } @@ -25,21 +25,21 @@ pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; #[cfg(target_endian = "little")] -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; #[cfg(target_endian = "little")] -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -69,377 +69,377 @@ pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mut // Syscall table -pub const SYS_read: ::c_long = 0; -pub const SYS_write: ::c_long = 1; -pub const SYS_open: ::c_long = 2; -pub const SYS_close: ::c_long = 3; -pub const SYS_stat: ::c_long = 4; -pub const SYS_fstat: ::c_long = 5; -pub const SYS_lstat: ::c_long = 6; -pub const SYS_poll: ::c_long = 7; -pub const SYS_lseek: ::c_long = 8; -pub const SYS_mmap: ::c_long = 9; -pub const SYS_mprotect: ::c_long = 10; -pub const SYS_munmap: ::c_long = 11; -pub const SYS_brk: ::c_long = 12; -pub const SYS_rt_sigaction: ::c_long = 13; -pub const SYS_rt_sigprocmask: ::c_long = 14; -pub const SYS_rt_sigreturn: ::c_long = 15; -pub const SYS_ioctl: ::c_long = 16; -pub const SYS_pread64: ::c_long = 17; -pub const SYS_pwrite64: ::c_long = 18; -pub const SYS_readv: ::c_long = 19; -pub const SYS_writev: ::c_long = 20; -pub const SYS_access: ::c_long = 21; -pub const SYS_pipe: ::c_long = 22; -pub const SYS_select: ::c_long = 23; -pub const SYS_sched_yield: ::c_long = 24; -pub const SYS_mremap: ::c_long = 25; -pub const SYS_msync: ::c_long = 26; -pub const SYS_mincore: ::c_long = 27; -pub const SYS_madvise: ::c_long = 28; -pub const SYS_shmget: ::c_long = 29; -pub const SYS_shmat: ::c_long = 30; -pub const SYS_shmctl: ::c_long = 31; -pub const SYS_dup: ::c_long = 32; -pub const SYS_dup2: ::c_long = 33; -pub const SYS_pause: ::c_long = 34; -pub const SYS_nanosleep: ::c_long = 35; -pub const SYS_getitimer: ::c_long = 36; -pub const SYS_alarm: ::c_long = 37; -pub const SYS_setitimer: ::c_long = 38; -pub const SYS_getpid: ::c_long = 39; -pub const SYS_sendfile: ::c_long = 40; -pub const SYS_socket: ::c_long = 41; -pub const SYS_connect: ::c_long = 42; -pub const SYS_accept: ::c_long = 43; -pub const SYS_sendto: ::c_long = 44; -pub const SYS_recvfrom: ::c_long = 45; -pub const SYS_sendmsg: ::c_long = 46; -pub const SYS_recvmsg: ::c_long = 47; -pub const SYS_shutdown: ::c_long = 48; -pub const SYS_bind: ::c_long = 49; -pub const SYS_listen: ::c_long = 50; -pub const SYS_getsockname: ::c_long = 51; -pub const SYS_getpeername: ::c_long = 52; -pub const SYS_socketpair: ::c_long = 53; -pub const SYS_setsockopt: ::c_long = 54; -pub const SYS_getsockopt: ::c_long = 55; -pub const SYS_clone: ::c_long = 56; -pub const SYS_fork: ::c_long = 57; -pub const SYS_vfork: ::c_long = 58; -pub const SYS_execve: ::c_long = 59; -pub const SYS_exit: ::c_long = 60; -pub const SYS_wait4: ::c_long = 61; -pub const SYS_kill: ::c_long = 62; -pub const SYS_uname: ::c_long = 63; -pub const SYS_semget: ::c_long = 64; -pub const SYS_semop: ::c_long = 65; -pub const SYS_semctl: ::c_long = 66; -pub const SYS_shmdt: ::c_long = 67; -pub const SYS_msgget: ::c_long = 68; -pub const SYS_msgsnd: ::c_long = 69; -pub const SYS_msgrcv: ::c_long = 70; -pub const SYS_msgctl: ::c_long = 71; -pub const SYS_fcntl: ::c_long = 72; -pub const SYS_flock: ::c_long = 73; -pub const SYS_fsync: ::c_long = 74; -pub const SYS_fdatasync: ::c_long = 75; -pub const SYS_truncate: ::c_long = 76; -pub const SYS_ftruncate: ::c_long = 77; -pub const SYS_getdents: ::c_long = 78; -pub const SYS_getcwd: ::c_long = 79; -pub const SYS_chdir: ::c_long = 80; -pub const SYS_fchdir: ::c_long = 81; -pub const SYS_rename: ::c_long = 82; -pub const SYS_mkdir: ::c_long = 83; -pub const SYS_rmdir: ::c_long = 84; -pub const SYS_creat: ::c_long = 85; -pub const SYS_link: ::c_long = 86; -pub const SYS_unlink: ::c_long = 87; -pub const SYS_symlink: ::c_long = 88; -pub const SYS_readlink: ::c_long = 89; -pub const SYS_chmod: ::c_long = 90; -pub const SYS_fchmod: ::c_long = 91; -pub const SYS_chown: ::c_long = 92; -pub const SYS_fchown: ::c_long = 93; -pub const SYS_lchown: ::c_long = 94; -pub const SYS_umask: ::c_long = 95; -pub const SYS_gettimeofday: ::c_long = 96; -pub const SYS_getrlimit: ::c_long = 97; -pub const SYS_getrusage: ::c_long = 98; -pub const SYS_sysinfo: ::c_long = 99; -pub const SYS_times: ::c_long = 100; -pub const SYS_ptrace: ::c_long = 101; -pub const SYS_getuid: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_getgid: ::c_long = 104; -pub const SYS_setuid: ::c_long = 105; -pub const SYS_setgid: ::c_long = 106; -pub const SYS_geteuid: ::c_long = 107; -pub const SYS_getegid: ::c_long = 108; -pub const SYS_setpgid: ::c_long = 109; -pub const SYS_getppid: ::c_long = 110; -pub const SYS_getpgrp: ::c_long = 111; -pub const SYS_setsid: ::c_long = 112; -pub const SYS_setreuid: ::c_long = 113; -pub const SYS_setregid: ::c_long = 114; -pub const SYS_getgroups: ::c_long = 115; -pub const SYS_setgroups: ::c_long = 116; -pub const SYS_setresuid: ::c_long = 117; -pub const SYS_getresuid: ::c_long = 118; -pub const SYS_setresgid: ::c_long = 119; -pub const SYS_getresgid: ::c_long = 120; -pub const SYS_getpgid: ::c_long = 121; -pub const SYS_setfsuid: ::c_long = 122; -pub const SYS_setfsgid: ::c_long = 123; -pub const SYS_getsid: ::c_long = 124; -pub const SYS_capget: ::c_long = 125; -pub const SYS_capset: ::c_long = 126; -pub const SYS_rt_sigpending: ::c_long = 127; -pub const SYS_rt_sigtimedwait: ::c_long = 128; -pub const SYS_rt_sigqueueinfo: ::c_long = 129; -pub const SYS_rt_sigsuspend: ::c_long = 130; -pub const SYS_sigaltstack: ::c_long = 131; -pub const SYS_utime: ::c_long = 132; -pub const SYS_mknod: ::c_long = 133; -pub const SYS_uselib: ::c_long = 134; -pub const SYS_personality: ::c_long = 135; -pub const SYS_ustat: ::c_long = 136; -pub const SYS_statfs: ::c_long = 137; -pub const SYS_fstatfs: ::c_long = 138; -pub const SYS_sysfs: ::c_long = 139; -pub const SYS_getpriority: ::c_long = 140; -pub const SYS_setpriority: ::c_long = 141; -pub const SYS_sched_setparam: ::c_long = 142; -pub const SYS_sched_getparam: ::c_long = 143; -pub const SYS_sched_setscheduler: ::c_long = 144; -pub const SYS_sched_getscheduler: ::c_long = 145; -pub const SYS_sched_get_priority_max: ::c_long = 146; -pub const SYS_sched_get_priority_min: ::c_long = 147; -pub const SYS_sched_rr_get_interval: ::c_long = 148; -pub const SYS_mlock: ::c_long = 149; -pub const SYS_munlock: ::c_long = 150; -pub const SYS_mlockall: ::c_long = 151; -pub const SYS_munlockall: ::c_long = 152; -pub const SYS_vhangup: ::c_long = 153; -pub const SYS_modify_ldt: ::c_long = 154; -pub const SYS_pivot_root: ::c_long = 155; -pub const SYS__sysctl: ::c_long = 156; -pub const SYS_prctl: ::c_long = 157; -pub const SYS_arch_prctl: ::c_long = 158; -pub const SYS_adjtimex: ::c_long = 159; -pub const SYS_setrlimit: ::c_long = 160; -pub const SYS_chroot: ::c_long = 161; -pub const SYS_sync: ::c_long = 162; -pub const SYS_acct: ::c_long = 163; -pub const SYS_settimeofday: ::c_long = 164; -pub const SYS_mount: ::c_long = 165; -pub const SYS_umount2: ::c_long = 166; -pub const SYS_swapon: ::c_long = 167; -pub const SYS_swapoff: ::c_long = 168; -pub const SYS_reboot: ::c_long = 169; -pub const SYS_sethostname: ::c_long = 170; -pub const SYS_setdomainname: ::c_long = 171; -pub const SYS_iopl: ::c_long = 172; -pub const SYS_ioperm: ::c_long = 173; -pub const SYS_create_module: ::c_long = 174; -pub const SYS_init_module: ::c_long = 175; -pub const SYS_delete_module: ::c_long = 176; -pub const SYS_get_kernel_syms: ::c_long = 177; -pub const SYS_query_module: ::c_long = 178; -pub const SYS_quotactl: ::c_long = 179; -pub const SYS_nfsservctl: ::c_long = 180; -pub const SYS_getpmsg: ::c_long = 181; -pub const SYS_putpmsg: ::c_long = 182; -pub const SYS_afs_syscall: ::c_long = 183; -pub const SYS_tuxcall: ::c_long = 184; -pub const SYS_security: ::c_long = 185; -pub const SYS_gettid: ::c_long = 186; -pub const SYS_readahead: ::c_long = 187; -pub const SYS_setxattr: ::c_long = 188; -pub const SYS_lsetxattr: ::c_long = 189; -pub const SYS_fsetxattr: ::c_long = 190; -pub const SYS_getxattr: ::c_long = 191; -pub const SYS_lgetxattr: ::c_long = 192; -pub const SYS_fgetxattr: ::c_long = 193; -pub const SYS_listxattr: ::c_long = 194; -pub const SYS_llistxattr: ::c_long = 195; -pub const SYS_flistxattr: ::c_long = 196; -pub const SYS_removexattr: ::c_long = 197; -pub const SYS_lremovexattr: ::c_long = 198; -pub const SYS_fremovexattr: ::c_long = 199; -pub const SYS_tkill: ::c_long = 200; -pub const SYS_time: ::c_long = 201; -pub const SYS_futex: ::c_long = 202; -pub const SYS_sched_setaffinity: ::c_long = 203; -pub const SYS_sched_getaffinity: ::c_long = 204; -pub const SYS_set_thread_area: ::c_long = 205; -pub const SYS_io_setup: ::c_long = 206; -pub const SYS_io_destroy: ::c_long = 207; -pub const SYS_io_getevents: ::c_long = 208; -pub const SYS_io_submit: ::c_long = 209; -pub const SYS_io_cancel: ::c_long = 210; -pub const SYS_get_thread_area: ::c_long = 211; -pub const SYS_lookup_dcookie: ::c_long = 212; -pub const SYS_epoll_create: ::c_long = 213; -pub const SYS_epoll_ctl_old: ::c_long = 214; -pub const SYS_epoll_wait_old: ::c_long = 215; -pub const SYS_remap_file_pages: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_set_tid_address: ::c_long = 218; -pub const SYS_restart_syscall: ::c_long = 219; -pub const SYS_semtimedop: ::c_long = 220; -pub const SYS_fadvise64: ::c_long = 221; -pub const SYS_timer_create: ::c_long = 222; -pub const SYS_timer_settime: ::c_long = 223; -pub const SYS_timer_gettime: ::c_long = 224; -pub const SYS_timer_getoverrun: ::c_long = 225; -pub const SYS_timer_delete: ::c_long = 226; -pub const SYS_clock_settime: ::c_long = 227; -pub const SYS_clock_gettime: ::c_long = 228; -pub const SYS_clock_getres: ::c_long = 229; -pub const SYS_clock_nanosleep: ::c_long = 230; -pub const SYS_exit_group: ::c_long = 231; -pub const SYS_epoll_wait: ::c_long = 232; -pub const SYS_epoll_ctl: ::c_long = 233; -pub const SYS_tgkill: ::c_long = 234; -pub const SYS_utimes: ::c_long = 235; -pub const SYS_vserver: ::c_long = 236; -pub const SYS_mbind: ::c_long = 237; -pub const SYS_set_mempolicy: ::c_long = 238; -pub const SYS_get_mempolicy: ::c_long = 239; -pub const SYS_mq_open: ::c_long = 240; -pub const SYS_mq_unlink: ::c_long = 241; -pub const SYS_mq_timedsend: ::c_long = 242; -pub const SYS_mq_timedreceive: ::c_long = 243; -pub const SYS_mq_notify: ::c_long = 244; -pub const SYS_mq_getsetattr: ::c_long = 245; -pub const SYS_kexec_load: ::c_long = 246; -pub const SYS_waitid: ::c_long = 247; -pub const SYS_add_key: ::c_long = 248; -pub const SYS_request_key: ::c_long = 249; -pub const SYS_keyctl: ::c_long = 250; -pub const SYS_ioprio_set: ::c_long = 251; -pub const SYS_ioprio_get: ::c_long = 252; -pub const SYS_inotify_init: ::c_long = 253; -pub const SYS_inotify_add_watch: ::c_long = 254; -pub const SYS_inotify_rm_watch: ::c_long = 255; -pub const SYS_migrate_pages: ::c_long = 256; -pub const SYS_openat: ::c_long = 257; -pub const SYS_mkdirat: ::c_long = 258; -pub const SYS_mknodat: ::c_long = 259; -pub const SYS_fchownat: ::c_long = 260; -pub const SYS_futimesat: ::c_long = 261; -pub const SYS_newfstatat: ::c_long = 262; -pub const SYS_unlinkat: ::c_long = 263; -pub const SYS_renameat: ::c_long = 264; -pub const SYS_linkat: ::c_long = 265; -pub const SYS_symlinkat: ::c_long = 266; -pub const SYS_readlinkat: ::c_long = 267; -pub const SYS_fchmodat: ::c_long = 268; -pub const SYS_faccessat: ::c_long = 269; -pub const SYS_pselect6: ::c_long = 270; -pub const SYS_ppoll: ::c_long = 271; -pub const SYS_unshare: ::c_long = 272; -pub const SYS_set_robust_list: ::c_long = 273; -pub const SYS_get_robust_list: ::c_long = 274; -pub const SYS_splice: ::c_long = 275; -pub const SYS_tee: ::c_long = 276; -pub const SYS_sync_file_range: ::c_long = 277; -pub const SYS_vmsplice: ::c_long = 278; -pub const SYS_move_pages: ::c_long = 279; -pub const SYS_utimensat: ::c_long = 280; -pub const SYS_epoll_pwait: ::c_long = 281; -pub const SYS_signalfd: ::c_long = 282; -pub const SYS_timerfd_create: ::c_long = 283; -pub const SYS_eventfd: ::c_long = 284; -pub const SYS_fallocate: ::c_long = 285; -pub const SYS_timerfd_settime: ::c_long = 286; -pub const SYS_timerfd_gettime: ::c_long = 287; -pub const SYS_accept4: ::c_long = 288; -pub const SYS_signalfd4: ::c_long = 289; -pub const SYS_eventfd2: ::c_long = 290; -pub const SYS_epoll_create1: ::c_long = 291; -pub const SYS_dup3: ::c_long = 292; -pub const SYS_pipe2: ::c_long = 293; -pub const SYS_inotify_init1: ::c_long = 294; -pub const SYS_preadv: ::c_long = 295; -pub const SYS_pwritev: ::c_long = 296; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 297; -pub const SYS_perf_event_open: ::c_long = 298; -pub const SYS_recvmmsg: ::c_long = 299; -pub const SYS_fanotify_init: ::c_long = 300; -pub const SYS_fanotify_mark: ::c_long = 301; -pub const SYS_prlimit64: ::c_long = 302; -pub const SYS_name_to_handle_at: ::c_long = 303; -pub const SYS_open_by_handle_at: ::c_long = 304; -pub const SYS_clock_adjtime: ::c_long = 305; -pub const SYS_syncfs: ::c_long = 306; -pub const SYS_sendmmsg: ::c_long = 307; -pub const SYS_setns: ::c_long = 308; -pub const SYS_getcpu: ::c_long = 309; -pub const SYS_process_vm_readv: ::c_long = 310; -pub const SYS_process_vm_writev: ::c_long = 311; -pub const SYS_kcmp: ::c_long = 312; -pub const SYS_finit_module: ::c_long = 313; -pub const SYS_sched_setattr: ::c_long = 314; -pub const SYS_sched_getattr: ::c_long = 315; -pub const SYS_renameat2: ::c_long = 316; -pub const SYS_seccomp: ::c_long = 317; -pub const SYS_getrandom: ::c_long = 318; -pub const SYS_memfd_create: ::c_long = 319; -pub const SYS_kexec_file_load: ::c_long = 320; -pub const SYS_bpf: ::c_long = 321; -pub const SYS_execveat: ::c_long = 322; -pub const SYS_userfaultfd: ::c_long = 323; -pub const SYS_membarrier: ::c_long = 324; -pub const SYS_mlock2: ::c_long = 325; -pub const SYS_copy_file_range: ::c_long = 326; -pub const SYS_preadv2: ::c_long = 327; -pub const SYS_pwritev2: ::c_long = 328; -pub const SYS_pkey_mprotect: ::c_long = 329; -pub const SYS_pkey_alloc: ::c_long = 330; -pub const SYS_pkey_free: ::c_long = 331; -pub const SYS_statx: ::c_long = 332; -pub const SYS_rseq: ::c_long = 334; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_fchmodat2: ::c_long = 452; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_read: c_long = 0; +pub const SYS_write: c_long = 1; +pub const SYS_open: c_long = 2; +pub const SYS_close: c_long = 3; +pub const SYS_stat: c_long = 4; +pub const SYS_fstat: c_long = 5; +pub const SYS_lstat: c_long = 6; +pub const SYS_poll: c_long = 7; +pub const SYS_lseek: c_long = 8; +pub const SYS_mmap: c_long = 9; +pub const SYS_mprotect: c_long = 10; +pub const SYS_munmap: c_long = 11; +pub const SYS_brk: c_long = 12; +pub const SYS_rt_sigaction: c_long = 13; +pub const SYS_rt_sigprocmask: c_long = 14; +pub const SYS_rt_sigreturn: c_long = 15; +pub const SYS_ioctl: c_long = 16; +pub const SYS_pread64: c_long = 17; +pub const SYS_pwrite64: c_long = 18; +pub const SYS_readv: c_long = 19; +pub const SYS_writev: c_long = 20; +pub const SYS_access: c_long = 21; +pub const SYS_pipe: c_long = 22; +pub const SYS_select: c_long = 23; +pub const SYS_sched_yield: c_long = 24; +pub const SYS_mremap: c_long = 25; +pub const SYS_msync: c_long = 26; +pub const SYS_mincore: c_long = 27; +pub const SYS_madvise: c_long = 28; +pub const SYS_shmget: c_long = 29; +pub const SYS_shmat: c_long = 30; +pub const SYS_shmctl: c_long = 31; +pub const SYS_dup: c_long = 32; +pub const SYS_dup2: c_long = 33; +pub const SYS_pause: c_long = 34; +pub const SYS_nanosleep: c_long = 35; +pub const SYS_getitimer: c_long = 36; +pub const SYS_alarm: c_long = 37; +pub const SYS_setitimer: c_long = 38; +pub const SYS_getpid: c_long = 39; +pub const SYS_sendfile: c_long = 40; +pub const SYS_socket: c_long = 41; +pub const SYS_connect: c_long = 42; +pub const SYS_accept: c_long = 43; +pub const SYS_sendto: c_long = 44; +pub const SYS_recvfrom: c_long = 45; +pub const SYS_sendmsg: c_long = 46; +pub const SYS_recvmsg: c_long = 47; +pub const SYS_shutdown: c_long = 48; +pub const SYS_bind: c_long = 49; +pub const SYS_listen: c_long = 50; +pub const SYS_getsockname: c_long = 51; +pub const SYS_getpeername: c_long = 52; +pub const SYS_socketpair: c_long = 53; +pub const SYS_setsockopt: c_long = 54; +pub const SYS_getsockopt: c_long = 55; +pub const SYS_clone: c_long = 56; +pub const SYS_fork: c_long = 57; +pub const SYS_vfork: c_long = 58; +pub const SYS_execve: c_long = 59; +pub const SYS_exit: c_long = 60; +pub const SYS_wait4: c_long = 61; +pub const SYS_kill: c_long = 62; +pub const SYS_uname: c_long = 63; +pub const SYS_semget: c_long = 64; +pub const SYS_semop: c_long = 65; +pub const SYS_semctl: c_long = 66; +pub const SYS_shmdt: c_long = 67; +pub const SYS_msgget: c_long = 68; +pub const SYS_msgsnd: c_long = 69; +pub const SYS_msgrcv: c_long = 70; +pub const SYS_msgctl: c_long = 71; +pub const SYS_fcntl: c_long = 72; +pub const SYS_flock: c_long = 73; +pub const SYS_fsync: c_long = 74; +pub const SYS_fdatasync: c_long = 75; +pub const SYS_truncate: c_long = 76; +pub const SYS_ftruncate: c_long = 77; +pub const SYS_getdents: c_long = 78; +pub const SYS_getcwd: c_long = 79; +pub const SYS_chdir: c_long = 80; +pub const SYS_fchdir: c_long = 81; +pub const SYS_rename: c_long = 82; +pub const SYS_mkdir: c_long = 83; +pub const SYS_rmdir: c_long = 84; +pub const SYS_creat: c_long = 85; +pub const SYS_link: c_long = 86; +pub const SYS_unlink: c_long = 87; +pub const SYS_symlink: c_long = 88; +pub const SYS_readlink: c_long = 89; +pub const SYS_chmod: c_long = 90; +pub const SYS_fchmod: c_long = 91; +pub const SYS_chown: c_long = 92; +pub const SYS_fchown: c_long = 93; +pub const SYS_lchown: c_long = 94; +pub const SYS_umask: c_long = 95; +pub const SYS_gettimeofday: c_long = 96; +pub const SYS_getrlimit: c_long = 97; +pub const SYS_getrusage: c_long = 98; +pub const SYS_sysinfo: c_long = 99; +pub const SYS_times: c_long = 100; +pub const SYS_ptrace: c_long = 101; +pub const SYS_getuid: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_getgid: c_long = 104; +pub const SYS_setuid: c_long = 105; +pub const SYS_setgid: c_long = 106; +pub const SYS_geteuid: c_long = 107; +pub const SYS_getegid: c_long = 108; +pub const SYS_setpgid: c_long = 109; +pub const SYS_getppid: c_long = 110; +pub const SYS_getpgrp: c_long = 111; +pub const SYS_setsid: c_long = 112; +pub const SYS_setreuid: c_long = 113; +pub const SYS_setregid: c_long = 114; +pub const SYS_getgroups: c_long = 115; +pub const SYS_setgroups: c_long = 116; +pub const SYS_setresuid: c_long = 117; +pub const SYS_getresuid: c_long = 118; +pub const SYS_setresgid: c_long = 119; +pub const SYS_getresgid: c_long = 120; +pub const SYS_getpgid: c_long = 121; +pub const SYS_setfsuid: c_long = 122; +pub const SYS_setfsgid: c_long = 123; +pub const SYS_getsid: c_long = 124; +pub const SYS_capget: c_long = 125; +pub const SYS_capset: c_long = 126; +pub const SYS_rt_sigpending: c_long = 127; +pub const SYS_rt_sigtimedwait: c_long = 128; +pub const SYS_rt_sigqueueinfo: c_long = 129; +pub const SYS_rt_sigsuspend: c_long = 130; +pub const SYS_sigaltstack: c_long = 131; +pub const SYS_utime: c_long = 132; +pub const SYS_mknod: c_long = 133; +pub const SYS_uselib: c_long = 134; +pub const SYS_personality: c_long = 135; +pub const SYS_ustat: c_long = 136; +pub const SYS_statfs: c_long = 137; +pub const SYS_fstatfs: c_long = 138; +pub const SYS_sysfs: c_long = 139; +pub const SYS_getpriority: c_long = 140; +pub const SYS_setpriority: c_long = 141; +pub const SYS_sched_setparam: c_long = 142; +pub const SYS_sched_getparam: c_long = 143; +pub const SYS_sched_setscheduler: c_long = 144; +pub const SYS_sched_getscheduler: c_long = 145; +pub const SYS_sched_get_priority_max: c_long = 146; +pub const SYS_sched_get_priority_min: c_long = 147; +pub const SYS_sched_rr_get_interval: c_long = 148; +pub const SYS_mlock: c_long = 149; +pub const SYS_munlock: c_long = 150; +pub const SYS_mlockall: c_long = 151; +pub const SYS_munlockall: c_long = 152; +pub const SYS_vhangup: c_long = 153; +pub const SYS_modify_ldt: c_long = 154; +pub const SYS_pivot_root: c_long = 155; +pub const SYS__sysctl: c_long = 156; +pub const SYS_prctl: c_long = 157; +pub const SYS_arch_prctl: c_long = 158; +pub const SYS_adjtimex: c_long = 159; +pub const SYS_setrlimit: c_long = 160; +pub const SYS_chroot: c_long = 161; +pub const SYS_sync: c_long = 162; +pub const SYS_acct: c_long = 163; +pub const SYS_settimeofday: c_long = 164; +pub const SYS_mount: c_long = 165; +pub const SYS_umount2: c_long = 166; +pub const SYS_swapon: c_long = 167; +pub const SYS_swapoff: c_long = 168; +pub const SYS_reboot: c_long = 169; +pub const SYS_sethostname: c_long = 170; +pub const SYS_setdomainname: c_long = 171; +pub const SYS_iopl: c_long = 172; +pub const SYS_ioperm: c_long = 173; +pub const SYS_create_module: c_long = 174; +pub const SYS_init_module: c_long = 175; +pub const SYS_delete_module: c_long = 176; +pub const SYS_get_kernel_syms: c_long = 177; +pub const SYS_query_module: c_long = 178; +pub const SYS_quotactl: c_long = 179; +pub const SYS_nfsservctl: c_long = 180; +pub const SYS_getpmsg: c_long = 181; +pub const SYS_putpmsg: c_long = 182; +pub const SYS_afs_syscall: c_long = 183; +pub const SYS_tuxcall: c_long = 184; +pub const SYS_security: c_long = 185; +pub const SYS_gettid: c_long = 186; +pub const SYS_readahead: c_long = 187; +pub const SYS_setxattr: c_long = 188; +pub const SYS_lsetxattr: c_long = 189; +pub const SYS_fsetxattr: c_long = 190; +pub const SYS_getxattr: c_long = 191; +pub const SYS_lgetxattr: c_long = 192; +pub const SYS_fgetxattr: c_long = 193; +pub const SYS_listxattr: c_long = 194; +pub const SYS_llistxattr: c_long = 195; +pub const SYS_flistxattr: c_long = 196; +pub const SYS_removexattr: c_long = 197; +pub const SYS_lremovexattr: c_long = 198; +pub const SYS_fremovexattr: c_long = 199; +pub const SYS_tkill: c_long = 200; +pub const SYS_time: c_long = 201; +pub const SYS_futex: c_long = 202; +pub const SYS_sched_setaffinity: c_long = 203; +pub const SYS_sched_getaffinity: c_long = 204; +pub const SYS_set_thread_area: c_long = 205; +pub const SYS_io_setup: c_long = 206; +pub const SYS_io_destroy: c_long = 207; +pub const SYS_io_getevents: c_long = 208; +pub const SYS_io_submit: c_long = 209; +pub const SYS_io_cancel: c_long = 210; +pub const SYS_get_thread_area: c_long = 211; +pub const SYS_lookup_dcookie: c_long = 212; +pub const SYS_epoll_create: c_long = 213; +pub const SYS_epoll_ctl_old: c_long = 214; +pub const SYS_epoll_wait_old: c_long = 215; +pub const SYS_remap_file_pages: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_set_tid_address: c_long = 218; +pub const SYS_restart_syscall: c_long = 219; +pub const SYS_semtimedop: c_long = 220; +pub const SYS_fadvise64: c_long = 221; +pub const SYS_timer_create: c_long = 222; +pub const SYS_timer_settime: c_long = 223; +pub const SYS_timer_gettime: c_long = 224; +pub const SYS_timer_getoverrun: c_long = 225; +pub const SYS_timer_delete: c_long = 226; +pub const SYS_clock_settime: c_long = 227; +pub const SYS_clock_gettime: c_long = 228; +pub const SYS_clock_getres: c_long = 229; +pub const SYS_clock_nanosleep: c_long = 230; +pub const SYS_exit_group: c_long = 231; +pub const SYS_epoll_wait: c_long = 232; +pub const SYS_epoll_ctl: c_long = 233; +pub const SYS_tgkill: c_long = 234; +pub const SYS_utimes: c_long = 235; +pub const SYS_vserver: c_long = 236; +pub const SYS_mbind: c_long = 237; +pub const SYS_set_mempolicy: c_long = 238; +pub const SYS_get_mempolicy: c_long = 239; +pub const SYS_mq_open: c_long = 240; +pub const SYS_mq_unlink: c_long = 241; +pub const SYS_mq_timedsend: c_long = 242; +pub const SYS_mq_timedreceive: c_long = 243; +pub const SYS_mq_notify: c_long = 244; +pub const SYS_mq_getsetattr: c_long = 245; +pub const SYS_kexec_load: c_long = 246; +pub const SYS_waitid: c_long = 247; +pub const SYS_add_key: c_long = 248; +pub const SYS_request_key: c_long = 249; +pub const SYS_keyctl: c_long = 250; +pub const SYS_ioprio_set: c_long = 251; +pub const SYS_ioprio_get: c_long = 252; +pub const SYS_inotify_init: c_long = 253; +pub const SYS_inotify_add_watch: c_long = 254; +pub const SYS_inotify_rm_watch: c_long = 255; +pub const SYS_migrate_pages: c_long = 256; +pub const SYS_openat: c_long = 257; +pub const SYS_mkdirat: c_long = 258; +pub const SYS_mknodat: c_long = 259; +pub const SYS_fchownat: c_long = 260; +pub const SYS_futimesat: c_long = 261; +pub const SYS_newfstatat: c_long = 262; +pub const SYS_unlinkat: c_long = 263; +pub const SYS_renameat: c_long = 264; +pub const SYS_linkat: c_long = 265; +pub const SYS_symlinkat: c_long = 266; +pub const SYS_readlinkat: c_long = 267; +pub const SYS_fchmodat: c_long = 268; +pub const SYS_faccessat: c_long = 269; +pub const SYS_pselect6: c_long = 270; +pub const SYS_ppoll: c_long = 271; +pub const SYS_unshare: c_long = 272; +pub const SYS_set_robust_list: c_long = 273; +pub const SYS_get_robust_list: c_long = 274; +pub const SYS_splice: c_long = 275; +pub const SYS_tee: c_long = 276; +pub const SYS_sync_file_range: c_long = 277; +pub const SYS_vmsplice: c_long = 278; +pub const SYS_move_pages: c_long = 279; +pub const SYS_utimensat: c_long = 280; +pub const SYS_epoll_pwait: c_long = 281; +pub const SYS_signalfd: c_long = 282; +pub const SYS_timerfd_create: c_long = 283; +pub const SYS_eventfd: c_long = 284; +pub const SYS_fallocate: c_long = 285; +pub const SYS_timerfd_settime: c_long = 286; +pub const SYS_timerfd_gettime: c_long = 287; +pub const SYS_accept4: c_long = 288; +pub const SYS_signalfd4: c_long = 289; +pub const SYS_eventfd2: c_long = 290; +pub const SYS_epoll_create1: c_long = 291; +pub const SYS_dup3: c_long = 292; +pub const SYS_pipe2: c_long = 293; +pub const SYS_inotify_init1: c_long = 294; +pub const SYS_preadv: c_long = 295; +pub const SYS_pwritev: c_long = 296; +pub const SYS_rt_tgsigqueueinfo: c_long = 297; +pub const SYS_perf_event_open: c_long = 298; +pub const SYS_recvmmsg: c_long = 299; +pub const SYS_fanotify_init: c_long = 300; +pub const SYS_fanotify_mark: c_long = 301; +pub const SYS_prlimit64: c_long = 302; +pub const SYS_name_to_handle_at: c_long = 303; +pub const SYS_open_by_handle_at: c_long = 304; +pub const SYS_clock_adjtime: c_long = 305; +pub const SYS_syncfs: c_long = 306; +pub const SYS_sendmmsg: c_long = 307; +pub const SYS_setns: c_long = 308; +pub const SYS_getcpu: c_long = 309; +pub const SYS_process_vm_readv: c_long = 310; +pub const SYS_process_vm_writev: c_long = 311; +pub const SYS_kcmp: c_long = 312; +pub const SYS_finit_module: c_long = 313; +pub const SYS_sched_setattr: c_long = 314; +pub const SYS_sched_getattr: c_long = 315; +pub const SYS_renameat2: c_long = 316; +pub const SYS_seccomp: c_long = 317; +pub const SYS_getrandom: c_long = 318; +pub const SYS_memfd_create: c_long = 319; +pub const SYS_kexec_file_load: c_long = 320; +pub const SYS_bpf: c_long = 321; +pub const SYS_execveat: c_long = 322; +pub const SYS_userfaultfd: c_long = 323; +pub const SYS_membarrier: c_long = 324; +pub const SYS_mlock2: c_long = 325; +pub const SYS_copy_file_range: c_long = 326; +pub const SYS_preadv2: c_long = 327; +pub const SYS_pwritev2: c_long = 328; +pub const SYS_pkey_mprotect: c_long = 329; +pub const SYS_pkey_alloc: c_long = 330; +pub const SYS_pkey_free: c_long = 331; +pub const SYS_statx: c_long = 332; +pub const SYS_rseq: c_long = 334; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_fchmodat2: c_long = 452; +pub const SYS_mseal: c_long = 462; extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; } diff --git a/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs index 55b85e9626807..74a4581b0bda4 100644 --- a/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs +++ b/src/unix/linux_like/linux/gnu/b64/x86_64/x32.rs @@ -1,22 +1,22 @@ -use pthread_mutex_t; +use crate::{c_int, pthread_mutex_t}; pub type c_long = i32; pub type c_ulong = u32; s! { pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } } @@ -24,19 +24,19 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 32; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 44; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 20; -pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_RECURSIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ERRORCHECK_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, ], }; -pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mutex_t { +pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: crate::pthread_mutex_t = pthread_mutex_t { size: [ 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 3, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, @@ -45,356 +45,356 @@ pub const PTHREAD_ADAPTIVE_MUTEX_INITIALIZER_NP: ::pthread_mutex_t = pthread_mut // Syscall table -pub const __X32_SYSCALL_BIT: ::c_long = 0x40000000; +pub const __X32_SYSCALL_BIT: c_long = 0x40000000; -pub const SYS_read: ::c_long = __X32_SYSCALL_BIT + 0; -pub const SYS_write: ::c_long = __X32_SYSCALL_BIT + 1; -pub const SYS_open: ::c_long = __X32_SYSCALL_BIT + 2; -pub const SYS_close: ::c_long = __X32_SYSCALL_BIT + 3; -pub const SYS_stat: ::c_long = __X32_SYSCALL_BIT + 4; -pub const SYS_fstat: ::c_long = __X32_SYSCALL_BIT + 5; -pub const SYS_lstat: ::c_long = __X32_SYSCALL_BIT + 6; -pub const SYS_poll: ::c_long = __X32_SYSCALL_BIT + 7; -pub const SYS_lseek: ::c_long = __X32_SYSCALL_BIT + 8; -pub const SYS_mmap: ::c_long = __X32_SYSCALL_BIT + 9; -pub const SYS_mprotect: ::c_long = __X32_SYSCALL_BIT + 10; -pub const SYS_munmap: ::c_long = __X32_SYSCALL_BIT + 11; -pub const SYS_brk: ::c_long = __X32_SYSCALL_BIT + 12; -pub const SYS_rt_sigprocmask: ::c_long = __X32_SYSCALL_BIT + 14; -pub const SYS_pread64: ::c_long = __X32_SYSCALL_BIT + 17; -pub const SYS_pwrite64: ::c_long = __X32_SYSCALL_BIT + 18; -pub const SYS_access: ::c_long = __X32_SYSCALL_BIT + 21; -pub const SYS_pipe: ::c_long = __X32_SYSCALL_BIT + 22; -pub const SYS_select: ::c_long = __X32_SYSCALL_BIT + 23; -pub const SYS_sched_yield: ::c_long = __X32_SYSCALL_BIT + 24; -pub const SYS_mremap: ::c_long = __X32_SYSCALL_BIT + 25; -pub const SYS_msync: ::c_long = __X32_SYSCALL_BIT + 26; -pub const SYS_mincore: ::c_long = __X32_SYSCALL_BIT + 27; -pub const SYS_madvise: ::c_long = __X32_SYSCALL_BIT + 28; -pub const SYS_shmget: ::c_long = __X32_SYSCALL_BIT + 29; -pub const SYS_shmat: ::c_long = __X32_SYSCALL_BIT + 30; -pub const SYS_shmctl: ::c_long = __X32_SYSCALL_BIT + 31; -pub const SYS_dup: ::c_long = __X32_SYSCALL_BIT + 32; -pub const SYS_dup2: ::c_long = __X32_SYSCALL_BIT + 33; -pub const SYS_pause: ::c_long = __X32_SYSCALL_BIT + 34; -pub const SYS_nanosleep: ::c_long = __X32_SYSCALL_BIT + 35; -pub const SYS_getitimer: ::c_long = __X32_SYSCALL_BIT + 36; -pub const SYS_alarm: ::c_long = __X32_SYSCALL_BIT + 37; -pub const SYS_setitimer: ::c_long = __X32_SYSCALL_BIT + 38; -pub const SYS_getpid: ::c_long = __X32_SYSCALL_BIT + 39; -pub const SYS_sendfile: ::c_long = __X32_SYSCALL_BIT + 40; -pub const SYS_socket: ::c_long = __X32_SYSCALL_BIT + 41; -pub const SYS_connect: ::c_long = __X32_SYSCALL_BIT + 42; -pub const SYS_accept: ::c_long = __X32_SYSCALL_BIT + 43; -pub const SYS_sendto: ::c_long = __X32_SYSCALL_BIT + 44; -pub const SYS_shutdown: ::c_long = __X32_SYSCALL_BIT + 48; -pub const SYS_bind: ::c_long = __X32_SYSCALL_BIT + 49; -pub const SYS_listen: ::c_long = __X32_SYSCALL_BIT + 50; -pub const SYS_getsockname: ::c_long = __X32_SYSCALL_BIT + 51; -pub const SYS_getpeername: ::c_long = __X32_SYSCALL_BIT + 52; -pub const SYS_socketpair: ::c_long = __X32_SYSCALL_BIT + 53; -pub const SYS_clone: ::c_long = __X32_SYSCALL_BIT + 56; -pub const SYS_fork: ::c_long = __X32_SYSCALL_BIT + 57; -pub const SYS_vfork: ::c_long = __X32_SYSCALL_BIT + 58; -pub const SYS_exit: ::c_long = __X32_SYSCALL_BIT + 60; -pub const SYS_wait4: ::c_long = __X32_SYSCALL_BIT + 61; -pub const SYS_kill: ::c_long = __X32_SYSCALL_BIT + 62; -pub const SYS_uname: ::c_long = __X32_SYSCALL_BIT + 63; -pub const SYS_semget: ::c_long = __X32_SYSCALL_BIT + 64; -pub const SYS_semop: ::c_long = __X32_SYSCALL_BIT + 65; -pub const SYS_semctl: ::c_long = __X32_SYSCALL_BIT + 66; -pub const SYS_shmdt: ::c_long = __X32_SYSCALL_BIT + 67; -pub const SYS_msgget: ::c_long = __X32_SYSCALL_BIT + 68; -pub const SYS_msgsnd: ::c_long = __X32_SYSCALL_BIT + 69; -pub const SYS_msgrcv: ::c_long = __X32_SYSCALL_BIT + 70; -pub const SYS_msgctl: ::c_long = __X32_SYSCALL_BIT + 71; -pub const SYS_fcntl: ::c_long = __X32_SYSCALL_BIT + 72; -pub const SYS_flock: ::c_long = __X32_SYSCALL_BIT + 73; -pub const SYS_fsync: ::c_long = __X32_SYSCALL_BIT + 74; -pub const SYS_fdatasync: ::c_long = __X32_SYSCALL_BIT + 75; -pub const SYS_truncate: ::c_long = __X32_SYSCALL_BIT + 76; -pub const SYS_ftruncate: ::c_long = __X32_SYSCALL_BIT + 77; -pub const SYS_getdents: ::c_long = __X32_SYSCALL_BIT + 78; -pub const SYS_getcwd: ::c_long = __X32_SYSCALL_BIT + 79; -pub const SYS_chdir: ::c_long = __X32_SYSCALL_BIT + 80; -pub const SYS_fchdir: ::c_long = __X32_SYSCALL_BIT + 81; -pub const SYS_rename: ::c_long = __X32_SYSCALL_BIT + 82; -pub const SYS_mkdir: ::c_long = __X32_SYSCALL_BIT + 83; -pub const SYS_rmdir: ::c_long = __X32_SYSCALL_BIT + 84; -pub const SYS_creat: ::c_long = __X32_SYSCALL_BIT + 85; -pub const SYS_link: ::c_long = __X32_SYSCALL_BIT + 86; -pub const SYS_unlink: ::c_long = __X32_SYSCALL_BIT + 87; -pub const SYS_symlink: ::c_long = __X32_SYSCALL_BIT + 88; -pub const SYS_readlink: ::c_long = __X32_SYSCALL_BIT + 89; -pub const SYS_chmod: ::c_long = __X32_SYSCALL_BIT + 90; -pub const SYS_fchmod: ::c_long = __X32_SYSCALL_BIT + 91; -pub const SYS_chown: ::c_long = __X32_SYSCALL_BIT + 92; -pub const SYS_fchown: ::c_long = __X32_SYSCALL_BIT + 93; -pub const SYS_lchown: ::c_long = __X32_SYSCALL_BIT + 94; -pub const SYS_umask: ::c_long = __X32_SYSCALL_BIT + 95; -pub const SYS_gettimeofday: ::c_long = __X32_SYSCALL_BIT + 96; -pub const SYS_getrlimit: ::c_long = __X32_SYSCALL_BIT + 97; -pub const SYS_getrusage: ::c_long = __X32_SYSCALL_BIT + 98; -pub const SYS_sysinfo: ::c_long = __X32_SYSCALL_BIT + 99; -pub const SYS_times: ::c_long = __X32_SYSCALL_BIT + 100; -pub const SYS_getuid: ::c_long = __X32_SYSCALL_BIT + 102; -pub const SYS_syslog: ::c_long = __X32_SYSCALL_BIT + 103; -pub const SYS_getgid: ::c_long = __X32_SYSCALL_BIT + 104; -pub const SYS_setuid: ::c_long = __X32_SYSCALL_BIT + 105; -pub const SYS_setgid: ::c_long = __X32_SYSCALL_BIT + 106; -pub const SYS_geteuid: ::c_long = __X32_SYSCALL_BIT + 107; -pub const SYS_getegid: ::c_long = __X32_SYSCALL_BIT + 108; -pub const SYS_setpgid: ::c_long = __X32_SYSCALL_BIT + 109; -pub const SYS_getppid: ::c_long = __X32_SYSCALL_BIT + 110; -pub const SYS_getpgrp: ::c_long = __X32_SYSCALL_BIT + 111; -pub const SYS_setsid: ::c_long = __X32_SYSCALL_BIT + 112; -pub const SYS_setreuid: ::c_long = __X32_SYSCALL_BIT + 113; -pub const SYS_setregid: ::c_long = __X32_SYSCALL_BIT + 114; -pub const SYS_getgroups: ::c_long = __X32_SYSCALL_BIT + 115; -pub const SYS_setgroups: ::c_long = __X32_SYSCALL_BIT + 116; -pub const SYS_setresuid: ::c_long = __X32_SYSCALL_BIT + 117; -pub const SYS_getresuid: ::c_long = __X32_SYSCALL_BIT + 118; -pub const SYS_setresgid: ::c_long = __X32_SYSCALL_BIT + 119; -pub const SYS_getresgid: ::c_long = __X32_SYSCALL_BIT + 120; -pub const SYS_getpgid: ::c_long = __X32_SYSCALL_BIT + 121; -pub const SYS_setfsuid: ::c_long = __X32_SYSCALL_BIT + 122; -pub const SYS_setfsgid: ::c_long = __X32_SYSCALL_BIT + 123; -pub const SYS_getsid: ::c_long = __X32_SYSCALL_BIT + 124; -pub const SYS_capget: ::c_long = __X32_SYSCALL_BIT + 125; -pub const SYS_capset: ::c_long = __X32_SYSCALL_BIT + 126; -pub const SYS_rt_sigsuspend: ::c_long = __X32_SYSCALL_BIT + 130; -pub const SYS_utime: ::c_long = __X32_SYSCALL_BIT + 132; -pub const SYS_mknod: ::c_long = __X32_SYSCALL_BIT + 133; -pub const SYS_personality: ::c_long = __X32_SYSCALL_BIT + 135; -pub const SYS_ustat: ::c_long = __X32_SYSCALL_BIT + 136; -pub const SYS_statfs: ::c_long = __X32_SYSCALL_BIT + 137; -pub const SYS_fstatfs: ::c_long = __X32_SYSCALL_BIT + 138; -pub const SYS_sysfs: ::c_long = __X32_SYSCALL_BIT + 139; -pub const SYS_getpriority: ::c_long = __X32_SYSCALL_BIT + 140; -pub const SYS_setpriority: ::c_long = __X32_SYSCALL_BIT + 141; -pub const SYS_sched_setparam: ::c_long = __X32_SYSCALL_BIT + 142; -pub const SYS_sched_getparam: ::c_long = __X32_SYSCALL_BIT + 143; -pub const SYS_sched_setscheduler: ::c_long = __X32_SYSCALL_BIT + 144; -pub const SYS_sched_getscheduler: ::c_long = __X32_SYSCALL_BIT + 145; -pub const SYS_sched_get_priority_max: ::c_long = __X32_SYSCALL_BIT + 146; -pub const SYS_sched_get_priority_min: ::c_long = __X32_SYSCALL_BIT + 147; -pub const SYS_sched_rr_get_interval: ::c_long = __X32_SYSCALL_BIT + 148; -pub const SYS_mlock: ::c_long = __X32_SYSCALL_BIT + 149; -pub const SYS_munlock: ::c_long = __X32_SYSCALL_BIT + 150; -pub const SYS_mlockall: ::c_long = __X32_SYSCALL_BIT + 151; -pub const SYS_munlockall: ::c_long = __X32_SYSCALL_BIT + 152; -pub const SYS_vhangup: ::c_long = __X32_SYSCALL_BIT + 153; -pub const SYS_modify_ldt: ::c_long = __X32_SYSCALL_BIT + 154; -pub const SYS_pivot_root: ::c_long = __X32_SYSCALL_BIT + 155; -pub const SYS_prctl: ::c_long = __X32_SYSCALL_BIT + 157; -pub const SYS_arch_prctl: ::c_long = __X32_SYSCALL_BIT + 158; -pub const SYS_adjtimex: ::c_long = __X32_SYSCALL_BIT + 159; -pub const SYS_setrlimit: ::c_long = __X32_SYSCALL_BIT + 160; -pub const SYS_chroot: ::c_long = __X32_SYSCALL_BIT + 161; -pub const SYS_sync: ::c_long = __X32_SYSCALL_BIT + 162; -pub const SYS_acct: ::c_long = __X32_SYSCALL_BIT + 163; -pub const SYS_settimeofday: ::c_long = __X32_SYSCALL_BIT + 164; -pub const SYS_mount: ::c_long = __X32_SYSCALL_BIT + 165; -pub const SYS_umount2: ::c_long = __X32_SYSCALL_BIT + 166; -pub const SYS_swapon: ::c_long = __X32_SYSCALL_BIT + 167; -pub const SYS_swapoff: ::c_long = __X32_SYSCALL_BIT + 168; -pub const SYS_reboot: ::c_long = __X32_SYSCALL_BIT + 169; -pub const SYS_sethostname: ::c_long = __X32_SYSCALL_BIT + 170; -pub const SYS_setdomainname: ::c_long = __X32_SYSCALL_BIT + 171; -pub const SYS_iopl: ::c_long = __X32_SYSCALL_BIT + 172; -pub const SYS_ioperm: ::c_long = __X32_SYSCALL_BIT + 173; -pub const SYS_init_module: ::c_long = __X32_SYSCALL_BIT + 175; -pub const SYS_delete_module: ::c_long = __X32_SYSCALL_BIT + 176; -pub const SYS_quotactl: ::c_long = __X32_SYSCALL_BIT + 179; -pub const SYS_getpmsg: ::c_long = __X32_SYSCALL_BIT + 181; -pub const SYS_putpmsg: ::c_long = __X32_SYSCALL_BIT + 182; -pub const SYS_afs_syscall: ::c_long = __X32_SYSCALL_BIT + 183; -pub const SYS_tuxcall: ::c_long = __X32_SYSCALL_BIT + 184; -pub const SYS_security: ::c_long = __X32_SYSCALL_BIT + 185; -pub const SYS_gettid: ::c_long = __X32_SYSCALL_BIT + 186; -pub const SYS_readahead: ::c_long = __X32_SYSCALL_BIT + 187; -pub const SYS_setxattr: ::c_long = __X32_SYSCALL_BIT + 188; -pub const SYS_lsetxattr: ::c_long = __X32_SYSCALL_BIT + 189; -pub const SYS_fsetxattr: ::c_long = __X32_SYSCALL_BIT + 190; -pub const SYS_getxattr: ::c_long = __X32_SYSCALL_BIT + 191; -pub const SYS_lgetxattr: ::c_long = __X32_SYSCALL_BIT + 192; -pub const SYS_fgetxattr: ::c_long = __X32_SYSCALL_BIT + 193; -pub const SYS_listxattr: ::c_long = __X32_SYSCALL_BIT + 194; -pub const SYS_llistxattr: ::c_long = __X32_SYSCALL_BIT + 195; -pub const SYS_flistxattr: ::c_long = __X32_SYSCALL_BIT + 196; -pub const SYS_removexattr: ::c_long = __X32_SYSCALL_BIT + 197; -pub const SYS_lremovexattr: ::c_long = __X32_SYSCALL_BIT + 198; -pub const SYS_fremovexattr: ::c_long = __X32_SYSCALL_BIT + 199; -pub const SYS_tkill: ::c_long = __X32_SYSCALL_BIT + 200; -pub const SYS_time: ::c_long = __X32_SYSCALL_BIT + 201; -pub const SYS_futex: ::c_long = __X32_SYSCALL_BIT + 202; -pub const SYS_sched_setaffinity: ::c_long = __X32_SYSCALL_BIT + 203; -pub const SYS_sched_getaffinity: ::c_long = __X32_SYSCALL_BIT + 204; -pub const SYS_io_destroy: ::c_long = __X32_SYSCALL_BIT + 207; -pub const SYS_io_getevents: ::c_long = __X32_SYSCALL_BIT + 208; -pub const SYS_io_cancel: ::c_long = __X32_SYSCALL_BIT + 210; -pub const SYS_lookup_dcookie: ::c_long = __X32_SYSCALL_BIT + 212; -pub const SYS_epoll_create: ::c_long = __X32_SYSCALL_BIT + 213; -pub const SYS_remap_file_pages: ::c_long = __X32_SYSCALL_BIT + 216; -pub const SYS_getdents64: ::c_long = __X32_SYSCALL_BIT + 217; -pub const SYS_set_tid_address: ::c_long = __X32_SYSCALL_BIT + 218; -pub const SYS_restart_syscall: ::c_long = __X32_SYSCALL_BIT + 219; -pub const SYS_semtimedop: ::c_long = __X32_SYSCALL_BIT + 220; -pub const SYS_fadvise64: ::c_long = __X32_SYSCALL_BIT + 221; -pub const SYS_timer_settime: ::c_long = __X32_SYSCALL_BIT + 223; -pub const SYS_timer_gettime: ::c_long = __X32_SYSCALL_BIT + 224; -pub const SYS_timer_getoverrun: ::c_long = __X32_SYSCALL_BIT + 225; -pub const SYS_timer_delete: ::c_long = __X32_SYSCALL_BIT + 226; -pub const SYS_clock_settime: ::c_long = __X32_SYSCALL_BIT + 227; -pub const SYS_clock_gettime: ::c_long = __X32_SYSCALL_BIT + 228; -pub const SYS_clock_getres: ::c_long = __X32_SYSCALL_BIT + 229; -pub const SYS_clock_nanosleep: ::c_long = __X32_SYSCALL_BIT + 230; -pub const SYS_exit_group: ::c_long = __X32_SYSCALL_BIT + 231; -pub const SYS_epoll_wait: ::c_long = __X32_SYSCALL_BIT + 232; -pub const SYS_epoll_ctl: ::c_long = __X32_SYSCALL_BIT + 233; -pub const SYS_tgkill: ::c_long = __X32_SYSCALL_BIT + 234; -pub const SYS_utimes: ::c_long = __X32_SYSCALL_BIT + 235; -pub const SYS_mbind: ::c_long = __X32_SYSCALL_BIT + 237; -pub const SYS_set_mempolicy: ::c_long = __X32_SYSCALL_BIT + 238; -pub const SYS_get_mempolicy: ::c_long = __X32_SYSCALL_BIT + 239; -pub const SYS_mq_open: ::c_long = __X32_SYSCALL_BIT + 240; -pub const SYS_mq_unlink: ::c_long = __X32_SYSCALL_BIT + 241; -pub const SYS_mq_timedsend: ::c_long = __X32_SYSCALL_BIT + 242; -pub const SYS_mq_timedreceive: ::c_long = __X32_SYSCALL_BIT + 243; -pub const SYS_mq_getsetattr: ::c_long = __X32_SYSCALL_BIT + 245; -pub const SYS_add_key: ::c_long = __X32_SYSCALL_BIT + 248; -pub const SYS_request_key: ::c_long = __X32_SYSCALL_BIT + 249; -pub const SYS_keyctl: ::c_long = __X32_SYSCALL_BIT + 250; -pub const SYS_ioprio_set: ::c_long = __X32_SYSCALL_BIT + 251; -pub const SYS_ioprio_get: ::c_long = __X32_SYSCALL_BIT + 252; -pub const SYS_inotify_init: ::c_long = __X32_SYSCALL_BIT + 253; -pub const SYS_inotify_add_watch: ::c_long = __X32_SYSCALL_BIT + 254; -pub const SYS_inotify_rm_watch: ::c_long = __X32_SYSCALL_BIT + 255; -pub const SYS_migrate_pages: ::c_long = __X32_SYSCALL_BIT + 256; -pub const SYS_openat: ::c_long = __X32_SYSCALL_BIT + 257; -pub const SYS_mkdirat: ::c_long = __X32_SYSCALL_BIT + 258; -pub const SYS_mknodat: ::c_long = __X32_SYSCALL_BIT + 259; -pub const SYS_fchownat: ::c_long = __X32_SYSCALL_BIT + 260; -pub const SYS_futimesat: ::c_long = __X32_SYSCALL_BIT + 261; -pub const SYS_newfstatat: ::c_long = __X32_SYSCALL_BIT + 262; -pub const SYS_unlinkat: ::c_long = __X32_SYSCALL_BIT + 263; -pub const SYS_renameat: ::c_long = __X32_SYSCALL_BIT + 264; -pub const SYS_linkat: ::c_long = __X32_SYSCALL_BIT + 265; -pub const SYS_symlinkat: ::c_long = __X32_SYSCALL_BIT + 266; -pub const SYS_readlinkat: ::c_long = __X32_SYSCALL_BIT + 267; -pub const SYS_fchmodat: ::c_long = __X32_SYSCALL_BIT + 268; -pub const SYS_faccessat: ::c_long = __X32_SYSCALL_BIT + 269; -pub const SYS_pselect6: ::c_long = __X32_SYSCALL_BIT + 270; -pub const SYS_ppoll: ::c_long = __X32_SYSCALL_BIT + 271; -pub const SYS_unshare: ::c_long = __X32_SYSCALL_BIT + 272; -pub const SYS_splice: ::c_long = __X32_SYSCALL_BIT + 275; -pub const SYS_tee: ::c_long = __X32_SYSCALL_BIT + 276; -pub const SYS_sync_file_range: ::c_long = __X32_SYSCALL_BIT + 277; -pub const SYS_utimensat: ::c_long = __X32_SYSCALL_BIT + 280; -pub const SYS_epoll_pwait: ::c_long = __X32_SYSCALL_BIT + 281; -pub const SYS_signalfd: ::c_long = __X32_SYSCALL_BIT + 282; -pub const SYS_timerfd_create: ::c_long = __X32_SYSCALL_BIT + 283; -pub const SYS_eventfd: ::c_long = __X32_SYSCALL_BIT + 284; -pub const SYS_fallocate: ::c_long = __X32_SYSCALL_BIT + 285; -pub const SYS_timerfd_settime: ::c_long = __X32_SYSCALL_BIT + 286; -pub const SYS_timerfd_gettime: ::c_long = __X32_SYSCALL_BIT + 287; -pub const SYS_accept4: ::c_long = __X32_SYSCALL_BIT + 288; -pub const SYS_signalfd4: ::c_long = __X32_SYSCALL_BIT + 289; -pub const SYS_eventfd2: ::c_long = __X32_SYSCALL_BIT + 290; -pub const SYS_epoll_create1: ::c_long = __X32_SYSCALL_BIT + 291; -pub const SYS_dup3: ::c_long = __X32_SYSCALL_BIT + 292; -pub const SYS_pipe2: ::c_long = __X32_SYSCALL_BIT + 293; -pub const SYS_inotify_init1: ::c_long = __X32_SYSCALL_BIT + 294; -pub const SYS_perf_event_open: ::c_long = __X32_SYSCALL_BIT + 298; -pub const SYS_fanotify_init: ::c_long = __X32_SYSCALL_BIT + 300; -pub const SYS_fanotify_mark: ::c_long = __X32_SYSCALL_BIT + 301; -pub const SYS_prlimit64: ::c_long = __X32_SYSCALL_BIT + 302; -pub const SYS_name_to_handle_at: ::c_long = __X32_SYSCALL_BIT + 303; -pub const SYS_open_by_handle_at: ::c_long = __X32_SYSCALL_BIT + 304; -pub const SYS_clock_adjtime: ::c_long = __X32_SYSCALL_BIT + 305; -pub const SYS_syncfs: ::c_long = __X32_SYSCALL_BIT + 306; -pub const SYS_setns: ::c_long = __X32_SYSCALL_BIT + 308; -pub const SYS_getcpu: ::c_long = __X32_SYSCALL_BIT + 309; -pub const SYS_kcmp: ::c_long = __X32_SYSCALL_BIT + 312; -pub const SYS_finit_module: ::c_long = __X32_SYSCALL_BIT + 313; -pub const SYS_sched_setattr: ::c_long = __X32_SYSCALL_BIT + 314; -pub const SYS_sched_getattr: ::c_long = __X32_SYSCALL_BIT + 315; -pub const SYS_renameat2: ::c_long = __X32_SYSCALL_BIT + 316; -pub const SYS_seccomp: ::c_long = __X32_SYSCALL_BIT + 317; -pub const SYS_getrandom: ::c_long = __X32_SYSCALL_BIT + 318; -pub const SYS_memfd_create: ::c_long = __X32_SYSCALL_BIT + 319; -pub const SYS_kexec_file_load: ::c_long = __X32_SYSCALL_BIT + 320; -pub const SYS_bpf: ::c_long = __X32_SYSCALL_BIT + 321; -pub const SYS_userfaultfd: ::c_long = __X32_SYSCALL_BIT + 323; -pub const SYS_membarrier: ::c_long = __X32_SYSCALL_BIT + 324; -pub const SYS_mlock2: ::c_long = __X32_SYSCALL_BIT + 325; -pub const SYS_copy_file_range: ::c_long = __X32_SYSCALL_BIT + 326; -pub const SYS_pkey_mprotect: ::c_long = __X32_SYSCALL_BIT + 329; -pub const SYS_pkey_alloc: ::c_long = __X32_SYSCALL_BIT + 330; -pub const SYS_pkey_free: ::c_long = __X32_SYSCALL_BIT + 331; -pub const SYS_statx: ::c_long = __X32_SYSCALL_BIT + 332; -pub const SYS_rseq: ::c_long = __X32_SYSCALL_BIT + 334; -pub const SYS_pidfd_send_signal: ::c_long = __X32_SYSCALL_BIT + 424; -pub const SYS_io_uring_setup: ::c_long = __X32_SYSCALL_BIT + 425; -pub const SYS_io_uring_enter: ::c_long = __X32_SYSCALL_BIT + 426; -pub const SYS_io_uring_register: ::c_long = __X32_SYSCALL_BIT + 427; -pub const SYS_open_tree: ::c_long = __X32_SYSCALL_BIT + 428; -pub const SYS_move_mount: ::c_long = __X32_SYSCALL_BIT + 429; -pub const SYS_fsopen: ::c_long = __X32_SYSCALL_BIT + 430; -pub const SYS_fsconfig: ::c_long = __X32_SYSCALL_BIT + 431; -pub const SYS_fsmount: ::c_long = __X32_SYSCALL_BIT + 432; -pub const SYS_fspick: ::c_long = __X32_SYSCALL_BIT + 433; -pub const SYS_pidfd_open: ::c_long = __X32_SYSCALL_BIT + 434; -pub const SYS_clone3: ::c_long = __X32_SYSCALL_BIT + 435; -pub const SYS_close_range: ::c_long = __X32_SYSCALL_BIT + 436; -pub const SYS_openat2: ::c_long = __X32_SYSCALL_BIT + 437; -pub const SYS_pidfd_getfd: ::c_long = __X32_SYSCALL_BIT + 438; -pub const SYS_faccessat2: ::c_long = __X32_SYSCALL_BIT + 439; -pub const SYS_process_madvise: ::c_long = __X32_SYSCALL_BIT + 440; -pub const SYS_epoll_pwait2: ::c_long = __X32_SYSCALL_BIT + 441; -pub const SYS_mount_setattr: ::c_long = __X32_SYSCALL_BIT + 442; -pub const SYS_quotactl_fd: ::c_long = __X32_SYSCALL_BIT + 443; -pub const SYS_landlock_create_ruleset: ::c_long = __X32_SYSCALL_BIT + 444; -pub const SYS_landlock_add_rule: ::c_long = __X32_SYSCALL_BIT + 445; -pub const SYS_landlock_restrict_self: ::c_long = __X32_SYSCALL_BIT + 446; -pub const SYS_memfd_secret: ::c_long = __X32_SYSCALL_BIT + 447; -pub const SYS_process_mrelease: ::c_long = __X32_SYSCALL_BIT + 448; -pub const SYS_futex_waitv: ::c_long = __X32_SYSCALL_BIT + 449; -pub const SYS_set_mempolicy_home_node: ::c_long = __X32_SYSCALL_BIT + 450; -pub const SYS_fchmodat2: ::c_long = __X32_SYSCALL_BIT + 452; -pub const SYS_rt_sigaction: ::c_long = __X32_SYSCALL_BIT + 512; -pub const SYS_rt_sigreturn: ::c_long = __X32_SYSCALL_BIT + 513; -pub const SYS_ioctl: ::c_long = __X32_SYSCALL_BIT + 514; -pub const SYS_readv: ::c_long = __X32_SYSCALL_BIT + 515; -pub const SYS_writev: ::c_long = __X32_SYSCALL_BIT + 516; -pub const SYS_recvfrom: ::c_long = __X32_SYSCALL_BIT + 517; -pub const SYS_sendmsg: ::c_long = __X32_SYSCALL_BIT + 518; -pub const SYS_recvmsg: ::c_long = __X32_SYSCALL_BIT + 519; -pub const SYS_execve: ::c_long = __X32_SYSCALL_BIT + 520; -pub const SYS_ptrace: ::c_long = __X32_SYSCALL_BIT + 521; -pub const SYS_rt_sigpending: ::c_long = __X32_SYSCALL_BIT + 522; -pub const SYS_rt_sigtimedwait: ::c_long = __X32_SYSCALL_BIT + 523; -pub const SYS_rt_sigqueueinfo: ::c_long = __X32_SYSCALL_BIT + 524; -pub const SYS_sigaltstack: ::c_long = __X32_SYSCALL_BIT + 525; -pub const SYS_timer_create: ::c_long = __X32_SYSCALL_BIT + 526; -pub const SYS_mq_notify: ::c_long = __X32_SYSCALL_BIT + 527; -pub const SYS_kexec_load: ::c_long = __X32_SYSCALL_BIT + 528; -pub const SYS_waitid: ::c_long = __X32_SYSCALL_BIT + 529; -pub const SYS_set_robust_list: ::c_long = __X32_SYSCALL_BIT + 530; -pub const SYS_get_robust_list: ::c_long = __X32_SYSCALL_BIT + 531; -pub const SYS_vmsplice: ::c_long = __X32_SYSCALL_BIT + 532; -pub const SYS_move_pages: ::c_long = __X32_SYSCALL_BIT + 533; -pub const SYS_preadv: ::c_long = __X32_SYSCALL_BIT + 534; -pub const SYS_pwritev: ::c_long = __X32_SYSCALL_BIT + 535; -pub const SYS_rt_tgsigqueueinfo: ::c_long = __X32_SYSCALL_BIT + 536; -pub const SYS_recvmmsg: ::c_long = __X32_SYSCALL_BIT + 537; -pub const SYS_sendmmsg: ::c_long = __X32_SYSCALL_BIT + 538; -pub const SYS_process_vm_readv: ::c_long = __X32_SYSCALL_BIT + 539; -pub const SYS_process_vm_writev: ::c_long = __X32_SYSCALL_BIT + 540; -pub const SYS_setsockopt: ::c_long = __X32_SYSCALL_BIT + 541; -pub const SYS_getsockopt: ::c_long = __X32_SYSCALL_BIT + 542; -pub const SYS_io_setup: ::c_long = __X32_SYSCALL_BIT + 543; -pub const SYS_io_submit: ::c_long = __X32_SYSCALL_BIT + 544; -pub const SYS_execveat: ::c_long = __X32_SYSCALL_BIT + 545; -pub const SYS_preadv2: ::c_long = __X32_SYSCALL_BIT + 546; -pub const SYS_pwritev2: ::c_long = __X32_SYSCALL_BIT + 547; +pub const SYS_read: c_long = __X32_SYSCALL_BIT + 0; +pub const SYS_write: c_long = __X32_SYSCALL_BIT + 1; +pub const SYS_open: c_long = __X32_SYSCALL_BIT + 2; +pub const SYS_close: c_long = __X32_SYSCALL_BIT + 3; +pub const SYS_stat: c_long = __X32_SYSCALL_BIT + 4; +pub const SYS_fstat: c_long = __X32_SYSCALL_BIT + 5; +pub const SYS_lstat: c_long = __X32_SYSCALL_BIT + 6; +pub const SYS_poll: c_long = __X32_SYSCALL_BIT + 7; +pub const SYS_lseek: c_long = __X32_SYSCALL_BIT + 8; +pub const SYS_mmap: c_long = __X32_SYSCALL_BIT + 9; +pub const SYS_mprotect: c_long = __X32_SYSCALL_BIT + 10; +pub const SYS_munmap: c_long = __X32_SYSCALL_BIT + 11; +pub const SYS_brk: c_long = __X32_SYSCALL_BIT + 12; +pub const SYS_rt_sigprocmask: c_long = __X32_SYSCALL_BIT + 14; +pub const SYS_pread64: c_long = __X32_SYSCALL_BIT + 17; +pub const SYS_pwrite64: c_long = __X32_SYSCALL_BIT + 18; +pub const SYS_access: c_long = __X32_SYSCALL_BIT + 21; +pub const SYS_pipe: c_long = __X32_SYSCALL_BIT + 22; +pub const SYS_select: c_long = __X32_SYSCALL_BIT + 23; +pub const SYS_sched_yield: c_long = __X32_SYSCALL_BIT + 24; +pub const SYS_mremap: c_long = __X32_SYSCALL_BIT + 25; +pub const SYS_msync: c_long = __X32_SYSCALL_BIT + 26; +pub const SYS_mincore: c_long = __X32_SYSCALL_BIT + 27; +pub const SYS_madvise: c_long = __X32_SYSCALL_BIT + 28; +pub const SYS_shmget: c_long = __X32_SYSCALL_BIT + 29; +pub const SYS_shmat: c_long = __X32_SYSCALL_BIT + 30; +pub const SYS_shmctl: c_long = __X32_SYSCALL_BIT + 31; +pub const SYS_dup: c_long = __X32_SYSCALL_BIT + 32; +pub const SYS_dup2: c_long = __X32_SYSCALL_BIT + 33; +pub const SYS_pause: c_long = __X32_SYSCALL_BIT + 34; +pub const SYS_nanosleep: c_long = __X32_SYSCALL_BIT + 35; +pub const SYS_getitimer: c_long = __X32_SYSCALL_BIT + 36; +pub const SYS_alarm: c_long = __X32_SYSCALL_BIT + 37; +pub const SYS_setitimer: c_long = __X32_SYSCALL_BIT + 38; +pub const SYS_getpid: c_long = __X32_SYSCALL_BIT + 39; +pub const SYS_sendfile: c_long = __X32_SYSCALL_BIT + 40; +pub const SYS_socket: c_long = __X32_SYSCALL_BIT + 41; +pub const SYS_connect: c_long = __X32_SYSCALL_BIT + 42; +pub const SYS_accept: c_long = __X32_SYSCALL_BIT + 43; +pub const SYS_sendto: c_long = __X32_SYSCALL_BIT + 44; +pub const SYS_shutdown: c_long = __X32_SYSCALL_BIT + 48; +pub const SYS_bind: c_long = __X32_SYSCALL_BIT + 49; +pub const SYS_listen: c_long = __X32_SYSCALL_BIT + 50; +pub const SYS_getsockname: c_long = __X32_SYSCALL_BIT + 51; +pub const SYS_getpeername: c_long = __X32_SYSCALL_BIT + 52; +pub const SYS_socketpair: c_long = __X32_SYSCALL_BIT + 53; +pub const SYS_clone: c_long = __X32_SYSCALL_BIT + 56; +pub const SYS_fork: c_long = __X32_SYSCALL_BIT + 57; +pub const SYS_vfork: c_long = __X32_SYSCALL_BIT + 58; +pub const SYS_exit: c_long = __X32_SYSCALL_BIT + 60; +pub const SYS_wait4: c_long = __X32_SYSCALL_BIT + 61; +pub const SYS_kill: c_long = __X32_SYSCALL_BIT + 62; +pub const SYS_uname: c_long = __X32_SYSCALL_BIT + 63; +pub const SYS_semget: c_long = __X32_SYSCALL_BIT + 64; +pub const SYS_semop: c_long = __X32_SYSCALL_BIT + 65; +pub const SYS_semctl: c_long = __X32_SYSCALL_BIT + 66; +pub const SYS_shmdt: c_long = __X32_SYSCALL_BIT + 67; +pub const SYS_msgget: c_long = __X32_SYSCALL_BIT + 68; +pub const SYS_msgsnd: c_long = __X32_SYSCALL_BIT + 69; +pub const SYS_msgrcv: c_long = __X32_SYSCALL_BIT + 70; +pub const SYS_msgctl: c_long = __X32_SYSCALL_BIT + 71; +pub const SYS_fcntl: c_long = __X32_SYSCALL_BIT + 72; +pub const SYS_flock: c_long = __X32_SYSCALL_BIT + 73; +pub const SYS_fsync: c_long = __X32_SYSCALL_BIT + 74; +pub const SYS_fdatasync: c_long = __X32_SYSCALL_BIT + 75; +pub const SYS_truncate: c_long = __X32_SYSCALL_BIT + 76; +pub const SYS_ftruncate: c_long = __X32_SYSCALL_BIT + 77; +pub const SYS_getdents: c_long = __X32_SYSCALL_BIT + 78; +pub const SYS_getcwd: c_long = __X32_SYSCALL_BIT + 79; +pub const SYS_chdir: c_long = __X32_SYSCALL_BIT + 80; +pub const SYS_fchdir: c_long = __X32_SYSCALL_BIT + 81; +pub const SYS_rename: c_long = __X32_SYSCALL_BIT + 82; +pub const SYS_mkdir: c_long = __X32_SYSCALL_BIT + 83; +pub const SYS_rmdir: c_long = __X32_SYSCALL_BIT + 84; +pub const SYS_creat: c_long = __X32_SYSCALL_BIT + 85; +pub const SYS_link: c_long = __X32_SYSCALL_BIT + 86; +pub const SYS_unlink: c_long = __X32_SYSCALL_BIT + 87; +pub const SYS_symlink: c_long = __X32_SYSCALL_BIT + 88; +pub const SYS_readlink: c_long = __X32_SYSCALL_BIT + 89; +pub const SYS_chmod: c_long = __X32_SYSCALL_BIT + 90; +pub const SYS_fchmod: c_long = __X32_SYSCALL_BIT + 91; +pub const SYS_chown: c_long = __X32_SYSCALL_BIT + 92; +pub const SYS_fchown: c_long = __X32_SYSCALL_BIT + 93; +pub const SYS_lchown: c_long = __X32_SYSCALL_BIT + 94; +pub const SYS_umask: c_long = __X32_SYSCALL_BIT + 95; +pub const SYS_gettimeofday: c_long = __X32_SYSCALL_BIT + 96; +pub const SYS_getrlimit: c_long = __X32_SYSCALL_BIT + 97; +pub const SYS_getrusage: c_long = __X32_SYSCALL_BIT + 98; +pub const SYS_sysinfo: c_long = __X32_SYSCALL_BIT + 99; +pub const SYS_times: c_long = __X32_SYSCALL_BIT + 100; +pub const SYS_getuid: c_long = __X32_SYSCALL_BIT + 102; +pub const SYS_syslog: c_long = __X32_SYSCALL_BIT + 103; +pub const SYS_getgid: c_long = __X32_SYSCALL_BIT + 104; +pub const SYS_setuid: c_long = __X32_SYSCALL_BIT + 105; +pub const SYS_setgid: c_long = __X32_SYSCALL_BIT + 106; +pub const SYS_geteuid: c_long = __X32_SYSCALL_BIT + 107; +pub const SYS_getegid: c_long = __X32_SYSCALL_BIT + 108; +pub const SYS_setpgid: c_long = __X32_SYSCALL_BIT + 109; +pub const SYS_getppid: c_long = __X32_SYSCALL_BIT + 110; +pub const SYS_getpgrp: c_long = __X32_SYSCALL_BIT + 111; +pub const SYS_setsid: c_long = __X32_SYSCALL_BIT + 112; +pub const SYS_setreuid: c_long = __X32_SYSCALL_BIT + 113; +pub const SYS_setregid: c_long = __X32_SYSCALL_BIT + 114; +pub const SYS_getgroups: c_long = __X32_SYSCALL_BIT + 115; +pub const SYS_setgroups: c_long = __X32_SYSCALL_BIT + 116; +pub const SYS_setresuid: c_long = __X32_SYSCALL_BIT + 117; +pub const SYS_getresuid: c_long = __X32_SYSCALL_BIT + 118; +pub const SYS_setresgid: c_long = __X32_SYSCALL_BIT + 119; +pub const SYS_getresgid: c_long = __X32_SYSCALL_BIT + 120; +pub const SYS_getpgid: c_long = __X32_SYSCALL_BIT + 121; +pub const SYS_setfsuid: c_long = __X32_SYSCALL_BIT + 122; +pub const SYS_setfsgid: c_long = __X32_SYSCALL_BIT + 123; +pub const SYS_getsid: c_long = __X32_SYSCALL_BIT + 124; +pub const SYS_capget: c_long = __X32_SYSCALL_BIT + 125; +pub const SYS_capset: c_long = __X32_SYSCALL_BIT + 126; +pub const SYS_rt_sigsuspend: c_long = __X32_SYSCALL_BIT + 130; +pub const SYS_utime: c_long = __X32_SYSCALL_BIT + 132; +pub const SYS_mknod: c_long = __X32_SYSCALL_BIT + 133; +pub const SYS_personality: c_long = __X32_SYSCALL_BIT + 135; +pub const SYS_ustat: c_long = __X32_SYSCALL_BIT + 136; +pub const SYS_statfs: c_long = __X32_SYSCALL_BIT + 137; +pub const SYS_fstatfs: c_long = __X32_SYSCALL_BIT + 138; +pub const SYS_sysfs: c_long = __X32_SYSCALL_BIT + 139; +pub const SYS_getpriority: c_long = __X32_SYSCALL_BIT + 140; +pub const SYS_setpriority: c_long = __X32_SYSCALL_BIT + 141; +pub const SYS_sched_setparam: c_long = __X32_SYSCALL_BIT + 142; +pub const SYS_sched_getparam: c_long = __X32_SYSCALL_BIT + 143; +pub const SYS_sched_setscheduler: c_long = __X32_SYSCALL_BIT + 144; +pub const SYS_sched_getscheduler: c_long = __X32_SYSCALL_BIT + 145; +pub const SYS_sched_get_priority_max: c_long = __X32_SYSCALL_BIT + 146; +pub const SYS_sched_get_priority_min: c_long = __X32_SYSCALL_BIT + 147; +pub const SYS_sched_rr_get_interval: c_long = __X32_SYSCALL_BIT + 148; +pub const SYS_mlock: c_long = __X32_SYSCALL_BIT + 149; +pub const SYS_munlock: c_long = __X32_SYSCALL_BIT + 150; +pub const SYS_mlockall: c_long = __X32_SYSCALL_BIT + 151; +pub const SYS_munlockall: c_long = __X32_SYSCALL_BIT + 152; +pub const SYS_vhangup: c_long = __X32_SYSCALL_BIT + 153; +pub const SYS_modify_ldt: c_long = __X32_SYSCALL_BIT + 154; +pub const SYS_pivot_root: c_long = __X32_SYSCALL_BIT + 155; +pub const SYS_prctl: c_long = __X32_SYSCALL_BIT + 157; +pub const SYS_arch_prctl: c_long = __X32_SYSCALL_BIT + 158; +pub const SYS_adjtimex: c_long = __X32_SYSCALL_BIT + 159; +pub const SYS_setrlimit: c_long = __X32_SYSCALL_BIT + 160; +pub const SYS_chroot: c_long = __X32_SYSCALL_BIT + 161; +pub const SYS_sync: c_long = __X32_SYSCALL_BIT + 162; +pub const SYS_acct: c_long = __X32_SYSCALL_BIT + 163; +pub const SYS_settimeofday: c_long = __X32_SYSCALL_BIT + 164; +pub const SYS_mount: c_long = __X32_SYSCALL_BIT + 165; +pub const SYS_umount2: c_long = __X32_SYSCALL_BIT + 166; +pub const SYS_swapon: c_long = __X32_SYSCALL_BIT + 167; +pub const SYS_swapoff: c_long = __X32_SYSCALL_BIT + 168; +pub const SYS_reboot: c_long = __X32_SYSCALL_BIT + 169; +pub const SYS_sethostname: c_long = __X32_SYSCALL_BIT + 170; +pub const SYS_setdomainname: c_long = __X32_SYSCALL_BIT + 171; +pub const SYS_iopl: c_long = __X32_SYSCALL_BIT + 172; +pub const SYS_ioperm: c_long = __X32_SYSCALL_BIT + 173; +pub const SYS_init_module: c_long = __X32_SYSCALL_BIT + 175; +pub const SYS_delete_module: c_long = __X32_SYSCALL_BIT + 176; +pub const SYS_quotactl: c_long = __X32_SYSCALL_BIT + 179; +pub const SYS_getpmsg: c_long = __X32_SYSCALL_BIT + 181; +pub const SYS_putpmsg: c_long = __X32_SYSCALL_BIT + 182; +pub const SYS_afs_syscall: c_long = __X32_SYSCALL_BIT + 183; +pub const SYS_tuxcall: c_long = __X32_SYSCALL_BIT + 184; +pub const SYS_security: c_long = __X32_SYSCALL_BIT + 185; +pub const SYS_gettid: c_long = __X32_SYSCALL_BIT + 186; +pub const SYS_readahead: c_long = __X32_SYSCALL_BIT + 187; +pub const SYS_setxattr: c_long = __X32_SYSCALL_BIT + 188; +pub const SYS_lsetxattr: c_long = __X32_SYSCALL_BIT + 189; +pub const SYS_fsetxattr: c_long = __X32_SYSCALL_BIT + 190; +pub const SYS_getxattr: c_long = __X32_SYSCALL_BIT + 191; +pub const SYS_lgetxattr: c_long = __X32_SYSCALL_BIT + 192; +pub const SYS_fgetxattr: c_long = __X32_SYSCALL_BIT + 193; +pub const SYS_listxattr: c_long = __X32_SYSCALL_BIT + 194; +pub const SYS_llistxattr: c_long = __X32_SYSCALL_BIT + 195; +pub const SYS_flistxattr: c_long = __X32_SYSCALL_BIT + 196; +pub const SYS_removexattr: c_long = __X32_SYSCALL_BIT + 197; +pub const SYS_lremovexattr: c_long = __X32_SYSCALL_BIT + 198; +pub const SYS_fremovexattr: c_long = __X32_SYSCALL_BIT + 199; +pub const SYS_tkill: c_long = __X32_SYSCALL_BIT + 200; +pub const SYS_time: c_long = __X32_SYSCALL_BIT + 201; +pub const SYS_futex: c_long = __X32_SYSCALL_BIT + 202; +pub const SYS_sched_setaffinity: c_long = __X32_SYSCALL_BIT + 203; +pub const SYS_sched_getaffinity: c_long = __X32_SYSCALL_BIT + 204; +pub const SYS_io_destroy: c_long = __X32_SYSCALL_BIT + 207; +pub const SYS_io_getevents: c_long = __X32_SYSCALL_BIT + 208; +pub const SYS_io_cancel: c_long = __X32_SYSCALL_BIT + 210; +pub const SYS_lookup_dcookie: c_long = __X32_SYSCALL_BIT + 212; +pub const SYS_epoll_create: c_long = __X32_SYSCALL_BIT + 213; +pub const SYS_remap_file_pages: c_long = __X32_SYSCALL_BIT + 216; +pub const SYS_getdents64: c_long = __X32_SYSCALL_BIT + 217; +pub const SYS_set_tid_address: c_long = __X32_SYSCALL_BIT + 218; +pub const SYS_restart_syscall: c_long = __X32_SYSCALL_BIT + 219; +pub const SYS_semtimedop: c_long = __X32_SYSCALL_BIT + 220; +pub const SYS_fadvise64: c_long = __X32_SYSCALL_BIT + 221; +pub const SYS_timer_settime: c_long = __X32_SYSCALL_BIT + 223; +pub const SYS_timer_gettime: c_long = __X32_SYSCALL_BIT + 224; +pub const SYS_timer_getoverrun: c_long = __X32_SYSCALL_BIT + 225; +pub const SYS_timer_delete: c_long = __X32_SYSCALL_BIT + 226; +pub const SYS_clock_settime: c_long = __X32_SYSCALL_BIT + 227; +pub const SYS_clock_gettime: c_long = __X32_SYSCALL_BIT + 228; +pub const SYS_clock_getres: c_long = __X32_SYSCALL_BIT + 229; +pub const SYS_clock_nanosleep: c_long = __X32_SYSCALL_BIT + 230; +pub const SYS_exit_group: c_long = __X32_SYSCALL_BIT + 231; +pub const SYS_epoll_wait: c_long = __X32_SYSCALL_BIT + 232; +pub const SYS_epoll_ctl: c_long = __X32_SYSCALL_BIT + 233; +pub const SYS_tgkill: c_long = __X32_SYSCALL_BIT + 234; +pub const SYS_utimes: c_long = __X32_SYSCALL_BIT + 235; +pub const SYS_mbind: c_long = __X32_SYSCALL_BIT + 237; +pub const SYS_set_mempolicy: c_long = __X32_SYSCALL_BIT + 238; +pub const SYS_get_mempolicy: c_long = __X32_SYSCALL_BIT + 239; +pub const SYS_mq_open: c_long = __X32_SYSCALL_BIT + 240; +pub const SYS_mq_unlink: c_long = __X32_SYSCALL_BIT + 241; +pub const SYS_mq_timedsend: c_long = __X32_SYSCALL_BIT + 242; +pub const SYS_mq_timedreceive: c_long = __X32_SYSCALL_BIT + 243; +pub const SYS_mq_getsetattr: c_long = __X32_SYSCALL_BIT + 245; +pub const SYS_add_key: c_long = __X32_SYSCALL_BIT + 248; +pub const SYS_request_key: c_long = __X32_SYSCALL_BIT + 249; +pub const SYS_keyctl: c_long = __X32_SYSCALL_BIT + 250; +pub const SYS_ioprio_set: c_long = __X32_SYSCALL_BIT + 251; +pub const SYS_ioprio_get: c_long = __X32_SYSCALL_BIT + 252; +pub const SYS_inotify_init: c_long = __X32_SYSCALL_BIT + 253; +pub const SYS_inotify_add_watch: c_long = __X32_SYSCALL_BIT + 254; +pub const SYS_inotify_rm_watch: c_long = __X32_SYSCALL_BIT + 255; +pub const SYS_migrate_pages: c_long = __X32_SYSCALL_BIT + 256; +pub const SYS_openat: c_long = __X32_SYSCALL_BIT + 257; +pub const SYS_mkdirat: c_long = __X32_SYSCALL_BIT + 258; +pub const SYS_mknodat: c_long = __X32_SYSCALL_BIT + 259; +pub const SYS_fchownat: c_long = __X32_SYSCALL_BIT + 260; +pub const SYS_futimesat: c_long = __X32_SYSCALL_BIT + 261; +pub const SYS_newfstatat: c_long = __X32_SYSCALL_BIT + 262; +pub const SYS_unlinkat: c_long = __X32_SYSCALL_BIT + 263; +pub const SYS_renameat: c_long = __X32_SYSCALL_BIT + 264; +pub const SYS_linkat: c_long = __X32_SYSCALL_BIT + 265; +pub const SYS_symlinkat: c_long = __X32_SYSCALL_BIT + 266; +pub const SYS_readlinkat: c_long = __X32_SYSCALL_BIT + 267; +pub const SYS_fchmodat: c_long = __X32_SYSCALL_BIT + 268; +pub const SYS_faccessat: c_long = __X32_SYSCALL_BIT + 269; +pub const SYS_pselect6: c_long = __X32_SYSCALL_BIT + 270; +pub const SYS_ppoll: c_long = __X32_SYSCALL_BIT + 271; +pub const SYS_unshare: c_long = __X32_SYSCALL_BIT + 272; +pub const SYS_splice: c_long = __X32_SYSCALL_BIT + 275; +pub const SYS_tee: c_long = __X32_SYSCALL_BIT + 276; +pub const SYS_sync_file_range: c_long = __X32_SYSCALL_BIT + 277; +pub const SYS_utimensat: c_long = __X32_SYSCALL_BIT + 280; +pub const SYS_epoll_pwait: c_long = __X32_SYSCALL_BIT + 281; +pub const SYS_signalfd: c_long = __X32_SYSCALL_BIT + 282; +pub const SYS_timerfd_create: c_long = __X32_SYSCALL_BIT + 283; +pub const SYS_eventfd: c_long = __X32_SYSCALL_BIT + 284; +pub const SYS_fallocate: c_long = __X32_SYSCALL_BIT + 285; +pub const SYS_timerfd_settime: c_long = __X32_SYSCALL_BIT + 286; +pub const SYS_timerfd_gettime: c_long = __X32_SYSCALL_BIT + 287; +pub const SYS_accept4: c_long = __X32_SYSCALL_BIT + 288; +pub const SYS_signalfd4: c_long = __X32_SYSCALL_BIT + 289; +pub const SYS_eventfd2: c_long = __X32_SYSCALL_BIT + 290; +pub const SYS_epoll_create1: c_long = __X32_SYSCALL_BIT + 291; +pub const SYS_dup3: c_long = __X32_SYSCALL_BIT + 292; +pub const SYS_pipe2: c_long = __X32_SYSCALL_BIT + 293; +pub const SYS_inotify_init1: c_long = __X32_SYSCALL_BIT + 294; +pub const SYS_perf_event_open: c_long = __X32_SYSCALL_BIT + 298; +pub const SYS_fanotify_init: c_long = __X32_SYSCALL_BIT + 300; +pub const SYS_fanotify_mark: c_long = __X32_SYSCALL_BIT + 301; +pub const SYS_prlimit64: c_long = __X32_SYSCALL_BIT + 302; +pub const SYS_name_to_handle_at: c_long = __X32_SYSCALL_BIT + 303; +pub const SYS_open_by_handle_at: c_long = __X32_SYSCALL_BIT + 304; +pub const SYS_clock_adjtime: c_long = __X32_SYSCALL_BIT + 305; +pub const SYS_syncfs: c_long = __X32_SYSCALL_BIT + 306; +pub const SYS_setns: c_long = __X32_SYSCALL_BIT + 308; +pub const SYS_getcpu: c_long = __X32_SYSCALL_BIT + 309; +pub const SYS_kcmp: c_long = __X32_SYSCALL_BIT + 312; +pub const SYS_finit_module: c_long = __X32_SYSCALL_BIT + 313; +pub const SYS_sched_setattr: c_long = __X32_SYSCALL_BIT + 314; +pub const SYS_sched_getattr: c_long = __X32_SYSCALL_BIT + 315; +pub const SYS_renameat2: c_long = __X32_SYSCALL_BIT + 316; +pub const SYS_seccomp: c_long = __X32_SYSCALL_BIT + 317; +pub const SYS_getrandom: c_long = __X32_SYSCALL_BIT + 318; +pub const SYS_memfd_create: c_long = __X32_SYSCALL_BIT + 319; +pub const SYS_kexec_file_load: c_long = __X32_SYSCALL_BIT + 320; +pub const SYS_bpf: c_long = __X32_SYSCALL_BIT + 321; +pub const SYS_userfaultfd: c_long = __X32_SYSCALL_BIT + 323; +pub const SYS_membarrier: c_long = __X32_SYSCALL_BIT + 324; +pub const SYS_mlock2: c_long = __X32_SYSCALL_BIT + 325; +pub const SYS_copy_file_range: c_long = __X32_SYSCALL_BIT + 326; +pub const SYS_pkey_mprotect: c_long = __X32_SYSCALL_BIT + 329; +pub const SYS_pkey_alloc: c_long = __X32_SYSCALL_BIT + 330; +pub const SYS_pkey_free: c_long = __X32_SYSCALL_BIT + 331; +pub const SYS_statx: c_long = __X32_SYSCALL_BIT + 332; +pub const SYS_rseq: c_long = __X32_SYSCALL_BIT + 334; +pub const SYS_pidfd_send_signal: c_long = __X32_SYSCALL_BIT + 424; +pub const SYS_io_uring_setup: c_long = __X32_SYSCALL_BIT + 425; +pub const SYS_io_uring_enter: c_long = __X32_SYSCALL_BIT + 426; +pub const SYS_io_uring_register: c_long = __X32_SYSCALL_BIT + 427; +pub const SYS_open_tree: c_long = __X32_SYSCALL_BIT + 428; +pub const SYS_move_mount: c_long = __X32_SYSCALL_BIT + 429; +pub const SYS_fsopen: c_long = __X32_SYSCALL_BIT + 430; +pub const SYS_fsconfig: c_long = __X32_SYSCALL_BIT + 431; +pub const SYS_fsmount: c_long = __X32_SYSCALL_BIT + 432; +pub const SYS_fspick: c_long = __X32_SYSCALL_BIT + 433; +pub const SYS_pidfd_open: c_long = __X32_SYSCALL_BIT + 434; +pub const SYS_clone3: c_long = __X32_SYSCALL_BIT + 435; +pub const SYS_close_range: c_long = __X32_SYSCALL_BIT + 436; +pub const SYS_openat2: c_long = __X32_SYSCALL_BIT + 437; +pub const SYS_pidfd_getfd: c_long = __X32_SYSCALL_BIT + 438; +pub const SYS_faccessat2: c_long = __X32_SYSCALL_BIT + 439; +pub const SYS_process_madvise: c_long = __X32_SYSCALL_BIT + 440; +pub const SYS_epoll_pwait2: c_long = __X32_SYSCALL_BIT + 441; +pub const SYS_mount_setattr: c_long = __X32_SYSCALL_BIT + 442; +pub const SYS_quotactl_fd: c_long = __X32_SYSCALL_BIT + 443; +pub const SYS_landlock_create_ruleset: c_long = __X32_SYSCALL_BIT + 444; +pub const SYS_landlock_add_rule: c_long = __X32_SYSCALL_BIT + 445; +pub const SYS_landlock_restrict_self: c_long = __X32_SYSCALL_BIT + 446; +pub const SYS_memfd_secret: c_long = __X32_SYSCALL_BIT + 447; +pub const SYS_process_mrelease: c_long = __X32_SYSCALL_BIT + 448; +pub const SYS_futex_waitv: c_long = __X32_SYSCALL_BIT + 449; +pub const SYS_set_mempolicy_home_node: c_long = __X32_SYSCALL_BIT + 450; +pub const SYS_fchmodat2: c_long = __X32_SYSCALL_BIT + 452; +pub const SYS_rt_sigaction: c_long = __X32_SYSCALL_BIT + 512; +pub const SYS_rt_sigreturn: c_long = __X32_SYSCALL_BIT + 513; +pub const SYS_ioctl: c_long = __X32_SYSCALL_BIT + 514; +pub const SYS_readv: c_long = __X32_SYSCALL_BIT + 515; +pub const SYS_writev: c_long = __X32_SYSCALL_BIT + 516; +pub const SYS_recvfrom: c_long = __X32_SYSCALL_BIT + 517; +pub const SYS_sendmsg: c_long = __X32_SYSCALL_BIT + 518; +pub const SYS_recvmsg: c_long = __X32_SYSCALL_BIT + 519; +pub const SYS_execve: c_long = __X32_SYSCALL_BIT + 520; +pub const SYS_ptrace: c_long = __X32_SYSCALL_BIT + 521; +pub const SYS_rt_sigpending: c_long = __X32_SYSCALL_BIT + 522; +pub const SYS_rt_sigtimedwait: c_long = __X32_SYSCALL_BIT + 523; +pub const SYS_rt_sigqueueinfo: c_long = __X32_SYSCALL_BIT + 524; +pub const SYS_sigaltstack: c_long = __X32_SYSCALL_BIT + 525; +pub const SYS_timer_create: c_long = __X32_SYSCALL_BIT + 526; +pub const SYS_mq_notify: c_long = __X32_SYSCALL_BIT + 527; +pub const SYS_kexec_load: c_long = __X32_SYSCALL_BIT + 528; +pub const SYS_waitid: c_long = __X32_SYSCALL_BIT + 529; +pub const SYS_set_robust_list: c_long = __X32_SYSCALL_BIT + 530; +pub const SYS_get_robust_list: c_long = __X32_SYSCALL_BIT + 531; +pub const SYS_vmsplice: c_long = __X32_SYSCALL_BIT + 532; +pub const SYS_move_pages: c_long = __X32_SYSCALL_BIT + 533; +pub const SYS_preadv: c_long = __X32_SYSCALL_BIT + 534; +pub const SYS_pwritev: c_long = __X32_SYSCALL_BIT + 535; +pub const SYS_rt_tgsigqueueinfo: c_long = __X32_SYSCALL_BIT + 536; +pub const SYS_recvmmsg: c_long = __X32_SYSCALL_BIT + 537; +pub const SYS_sendmmsg: c_long = __X32_SYSCALL_BIT + 538; +pub const SYS_process_vm_readv: c_long = __X32_SYSCALL_BIT + 539; +pub const SYS_process_vm_writev: c_long = __X32_SYSCALL_BIT + 540; +pub const SYS_setsockopt: c_long = __X32_SYSCALL_BIT + 541; +pub const SYS_getsockopt: c_long = __X32_SYSCALL_BIT + 542; +pub const SYS_io_setup: c_long = __X32_SYSCALL_BIT + 543; +pub const SYS_io_submit: c_long = __X32_SYSCALL_BIT + 544; +pub const SYS_execveat: c_long = __X32_SYSCALL_BIT + 545; +pub const SYS_preadv2: c_long = __X32_SYSCALL_BIT + 546; +pub const SYS_pwritev2: c_long = __X32_SYSCALL_BIT + 547; diff --git a/src/unix/linux_like/linux/gnu/mod.rs b/src/unix/linux_like/linux/gnu/mod.rs index 8fc197880a5d9..b1a60029c3cf7 100644 --- a/src/unix/linux_like/linux/gnu/mod.rs +++ b/src/unix/linux_like/linux/gnu/mod.rs @@ -1,24 +1,28 @@ +use crate::{ + c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t, ssize_t, +}; + pub type pthread_t = c_ulong; -pub type __priority_which_t = ::c_uint; -pub type __rlimit_resource_t = ::c_uint; -pub type Lmid_t = ::c_long; -pub type regoff_t = ::c_int; -pub type __kernel_rwf_t = ::c_int; +pub type __priority_which_t = c_uint; +pub type __rlimit_resource_t = c_uint; +pub type Lmid_t = c_long; +pub type regoff_t = c_int; +pub type __kernel_rwf_t = c_int; cfg_if! { if #[cfg(doc)] { // Used in `linux::arch` to define ioctl constants. - pub(crate) type Ioctl = ::c_ulong; + pub(crate) type Ioctl = c_ulong; } else { #[doc(hidden)] - pub type Ioctl = ::c_ulong; + pub type Ioctl = c_ulong; } } s! { pub struct __exit_status { - pub e_termination: ::c_short, - pub e_exit: ::c_short, + pub e_termination: c_short, + pub e_exit: c_short, } pub struct __timeval { @@ -27,41 +31,41 @@ s! { } pub struct glob64_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + pub gl_pathc: size_t, + pub gl_pathv: *mut *mut c_char, + pub gl_offs: size_t, + pub gl_flags: c_int, + + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: size_t, + pub msg_control: *mut c_void, + pub msg_controllen: size_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::size_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: size_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], #[cfg(not(any( target_arch = "sparc", target_arch = "sparc64", @@ -70,7 +74,7 @@ s! { target_arch = "mips64", target_arch = "mips64r6" )))] - pub c_ispeed: ::speed_t, + pub c_ispeed: crate::speed_t, #[cfg(not(any( target_arch = "sparc", target_arch = "sparc64", @@ -79,33 +83,33 @@ s! { target_arch = "mips64", target_arch = "mips64r6" )))] - pub c_ospeed: ::speed_t, + pub c_ospeed: crate::speed_t, } pub struct mallinfo { - pub arena: ::c_int, - pub ordblks: ::c_int, - pub smblks: ::c_int, - pub hblks: ::c_int, - pub hblkhd: ::c_int, - pub usmblks: ::c_int, - pub fsmblks: ::c_int, - pub uordblks: ::c_int, - pub fordblks: ::c_int, - pub keepcost: ::c_int, + pub arena: c_int, + pub ordblks: c_int, + pub smblks: c_int, + pub hblks: c_int, + pub hblkhd: c_int, + pub usmblks: c_int, + pub fsmblks: c_int, + pub uordblks: c_int, + pub fordblks: c_int, + pub keepcost: c_int, } pub struct mallinfo2 { - pub arena: ::size_t, - pub ordblks: ::size_t, - pub smblks: ::size_t, - pub hblks: ::size_t, - pub hblkhd: ::size_t, - pub usmblks: ::size_t, - pub fsmblks: ::size_t, - pub uordblks: ::size_t, - pub fordblks: ::size_t, - pub keepcost: ::size_t, + pub arena: size_t, + pub ordblks: size_t, + pub smblks: size_t, + pub hblks: size_t, + pub hblkhd: size_t, + pub usmblks: size_t, + pub fsmblks: size_t, + pub uordblks: size_t, + pub fordblks: size_t, + pub keepcost: size_t, } pub struct nl_pktinfo { @@ -113,15 +117,15 @@ s! { } pub struct nl_mmap_req { - pub nm_block_size: ::c_uint, - pub nm_block_nr: ::c_uint, - pub nm_frame_size: ::c_uint, - pub nm_frame_nr: ::c_uint, + pub nm_block_size: c_uint, + pub nm_block_nr: c_uint, + pub nm_frame_size: c_uint, + pub nm_frame_nr: c_uint, } pub struct nl_mmap_hdr { - pub nm_status: ::c_uint, - pub nm_len: ::c_uint, + pub nm_status: c_uint, + pub nm_len: c_uint, pub nm_group: u32, pub nm_pid: u32, pub nm_uid: u32, @@ -129,92 +133,92 @@ s! { } pub struct rtentry { - pub rt_pad1: ::c_ulong, - pub rt_dst: ::sockaddr, - pub rt_gateway: ::sockaddr, - pub rt_genmask: ::sockaddr, - pub rt_flags: ::c_ushort, - pub rt_pad2: ::c_short, - pub rt_pad3: ::c_ulong, - pub rt_tos: ::c_uchar, - pub rt_class: ::c_uchar, + pub rt_pad1: c_ulong, + pub rt_dst: crate::sockaddr, + pub rt_gateway: crate::sockaddr, + pub rt_genmask: crate::sockaddr, + pub rt_flags: c_ushort, + pub rt_pad2: c_short, + pub rt_pad3: c_ulong, + pub rt_tos: c_uchar, + pub rt_class: c_uchar, #[cfg(target_pointer_width = "64")] - pub rt_pad4: [::c_short; 3usize], + pub rt_pad4: [c_short; 3usize], #[cfg(not(target_pointer_width = "64"))] - pub rt_pad4: ::c_short, - pub rt_metric: ::c_short, - pub rt_dev: *mut ::c_char, - pub rt_mtu: ::c_ulong, - pub rt_window: ::c_ulong, - pub rt_irtt: ::c_ushort, + pub rt_pad4: c_short, + pub rt_metric: c_short, + pub rt_dev: *mut c_char, + pub rt_mtu: c_ulong, + pub rt_window: c_ulong, + pub rt_irtt: c_ushort, } pub struct timex { - pub modes: ::c_uint, + pub modes: c_uint, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub offset: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub offset: ::c_long, + pub offset: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub freq: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub freq: ::c_long, + pub freq: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub maxerror: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub maxerror: ::c_long, + pub maxerror: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub esterror: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub esterror: ::c_long, - pub status: ::c_int, + pub esterror: c_long, + pub status: c_int, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub constant: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub constant: ::c_long, + pub constant: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub precision: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub precision: ::c_long, + pub precision: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub tolerance: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub tolerance: ::c_long, - pub time: ::timeval, + pub tolerance: c_long, + pub time: crate::timeval, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub tick: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub tick: ::c_long, + pub tick: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub ppsfreq: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub ppsfreq: ::c_long, + pub ppsfreq: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub jitter: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub jitter: ::c_long, - pub shift: ::c_int, + pub jitter: c_long, + pub shift: c_int, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub stabil: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub stabil: ::c_long, + pub stabil: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub jitcnt: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub jitcnt: ::c_long, + pub jitcnt: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub calcnt: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub calcnt: ::c_long, + pub calcnt: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub errcnt: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub errcnt: ::c_long, + pub errcnt: c_long, #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub stbcnt: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub stbcnt: ::c_long, - pub tai: ::c_int, + pub stbcnt: c_long, + pub tai: c_int, pub __unused1: i32, pub __unused2: i32, pub __unused3: i32, @@ -229,99 +233,99 @@ s! { } pub struct ntptimeval { - pub time: ::timeval, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub tai: ::c_long, - pub __glibc_reserved1: ::c_long, - pub __glibc_reserved2: ::c_long, - pub __glibc_reserved3: ::c_long, - pub __glibc_reserved4: ::c_long, + pub time: crate::timeval, + pub maxerror: c_long, + pub esterror: c_long, + pub tai: c_long, + pub __glibc_reserved1: c_long, + pub __glibc_reserved2: c_long, + pub __glibc_reserved3: c_long, + pub __glibc_reserved4: c_long, } pub struct regex_t { - __buffer: *mut ::c_void, - __allocated: ::size_t, - __used: ::size_t, - __syntax: ::c_ulong, - __fastmap: *mut ::c_char, - __translate: *mut ::c_char, - __re_nsub: ::size_t, + __buffer: *mut c_void, + __allocated: size_t, + __used: size_t, + __syntax: c_ulong, + __fastmap: *mut c_char, + __translate: *mut c_char, + __re_nsub: size_t, __bitfield: u8, } pub struct Elf64_Chdr { - pub ch_type: ::Elf64_Word, - pub ch_reserved: ::Elf64_Word, - pub ch_size: ::Elf64_Xword, - pub ch_addralign: ::Elf64_Xword, + pub ch_type: crate::Elf64_Word, + pub ch_reserved: crate::Elf64_Word, + pub ch_size: crate::Elf64_Xword, + pub ch_addralign: crate::Elf64_Xword, } pub struct Elf32_Chdr { - pub ch_type: ::Elf32_Word, - pub ch_size: ::Elf32_Word, - pub ch_addralign: ::Elf32_Word, + pub ch_type: crate::Elf32_Word, + pub ch_size: crate::Elf32_Word, + pub ch_addralign: crate::Elf32_Word, } pub struct seminfo { - pub semmap: ::c_int, - pub semmni: ::c_int, - pub semmns: ::c_int, - pub semmnu: ::c_int, - pub semmsl: ::c_int, - pub semopm: ::c_int, - pub semume: ::c_int, - pub semusz: ::c_int, - pub semvmx: ::c_int, - pub semaem: ::c_int, + pub semmap: c_int, + pub semmni: c_int, + pub semmns: c_int, + pub semmnu: c_int, + pub semmsl: c_int, + pub semopm: c_int, + pub semume: c_int, + pub semusz: c_int, + pub semvmx: c_int, + pub semaem: c_int, } pub struct ptrace_peeksiginfo_args { - pub off: ::__u64, - pub flags: ::__u32, - pub nr: ::__s32, + pub off: crate::__u64, + pub flags: crate::__u32, + pub nr: crate::__s32, } pub struct __c_anonymous_ptrace_syscall_info_entry { - pub nr: ::__u64, - pub args: [::__u64; 6], + pub nr: crate::__u64, + pub args: [crate::__u64; 6], } pub struct __c_anonymous_ptrace_syscall_info_exit { - pub sval: ::__s64, - pub is_error: ::__u8, + pub sval: crate::__s64, + pub is_error: crate::__u8, } pub struct __c_anonymous_ptrace_syscall_info_seccomp { - pub nr: ::__u64, - pub args: [::__u64; 6], - pub ret_data: ::__u32, + pub nr: crate::__u64, + pub args: [crate::__u64; 6], + pub ret_data: crate::__u32, } pub struct ptrace_syscall_info { - pub op: ::__u8, - pub pad: [::__u8; 3], - pub arch: ::__u32, - pub instruction_pointer: ::__u64, - pub stack_pointer: ::__u64, + pub op: crate::__u8, + pub pad: [crate::__u8; 3], + pub arch: crate::__u32, + pub instruction_pointer: crate::__u64, + pub stack_pointer: crate::__u64, pub u: __c_anonymous_ptrace_syscall_info_data, } // linux/if_xdp.h pub struct sockaddr_xdp { - pub sxdp_family: ::__u16, - pub sxdp_flags: ::__u16, - pub sxdp_ifindex: ::__u32, - pub sxdp_queue_id: ::__u32, - pub sxdp_shared_umem_fd: ::__u32, + pub sxdp_family: crate::__u16, + pub sxdp_flags: crate::__u16, + pub sxdp_ifindex: crate::__u32, + pub sxdp_queue_id: crate::__u32, + pub sxdp_shared_umem_fd: crate::__u32, } pub struct xdp_ring_offset { - pub producer: ::__u64, - pub consumer: ::__u64, - pub desc: ::__u64, - pub flags: ::__u64, + pub producer: crate::__u64, + pub consumer: crate::__u64, + pub desc: crate::__u64, + pub flags: crate::__u64, } pub struct xdp_mmap_offsets { @@ -332,9 +336,9 @@ s! { } pub struct xdp_ring_offset_v1 { - pub producer: ::__u64, - pub consumer: ::__u64, - pub desc: ::__u64, + pub producer: crate::__u64, + pub consumer: crate::__u64, + pub desc: crate::__u64, } pub struct xdp_mmap_offsets_v1 { @@ -345,65 +349,65 @@ s! { } pub struct xdp_umem_reg { - pub addr: ::__u64, - pub len: ::__u64, - pub chunk_size: ::__u32, - pub headroom: ::__u32, - pub flags: ::__u32, - pub tx_metadata_len: ::__u32, + pub addr: crate::__u64, + pub len: crate::__u64, + pub chunk_size: crate::__u32, + pub headroom: crate::__u32, + pub flags: crate::__u32, + pub tx_metadata_len: crate::__u32, } pub struct xdp_umem_reg_v1 { - pub addr: ::__u64, - pub len: ::__u64, - pub chunk_size: ::__u32, - pub headroom: ::__u32, + pub addr: crate::__u64, + pub len: crate::__u64, + pub chunk_size: crate::__u32, + pub headroom: crate::__u32, } pub struct xdp_statistics { - pub rx_dropped: ::__u64, - pub rx_invalid_descs: ::__u64, - pub tx_invalid_descs: ::__u64, - pub rx_ring_full: ::__u64, - pub rx_fill_ring_empty_descs: ::__u64, - pub tx_ring_empty_descs: ::__u64, + pub rx_dropped: crate::__u64, + pub rx_invalid_descs: crate::__u64, + pub tx_invalid_descs: crate::__u64, + pub rx_ring_full: crate::__u64, + pub rx_fill_ring_empty_descs: crate::__u64, + pub tx_ring_empty_descs: crate::__u64, } pub struct xdp_statistics_v1 { - pub rx_dropped: ::__u64, - pub rx_invalid_descs: ::__u64, - pub tx_invalid_descs: ::__u64, + pub rx_dropped: crate::__u64, + pub rx_invalid_descs: crate::__u64, + pub tx_invalid_descs: crate::__u64, } pub struct xdp_options { - pub flags: ::__u32, + pub flags: crate::__u32, } pub struct xdp_desc { - pub addr: ::__u64, - pub len: ::__u32, - pub options: ::__u32, + pub addr: crate::__u64, + pub len: crate::__u32, + pub options: crate::__u32, } pub struct iocb { - pub aio_data: ::__u64, + pub aio_data: crate::__u64, #[cfg(target_endian = "little")] - pub aio_key: ::__u32, + pub aio_key: crate::__u32, #[cfg(target_endian = "little")] - pub aio_rw_flags: ::__kernel_rwf_t, + pub aio_rw_flags: crate::__kernel_rwf_t, #[cfg(target_endian = "big")] - pub aio_rw_flags: ::__kernel_rwf_t, + pub aio_rw_flags: crate::__kernel_rwf_t, #[cfg(target_endian = "big")] - pub aio_key: ::__u32, - pub aio_lio_opcode: ::__u16, - pub aio_reqprio: ::__s16, - pub aio_fildes: ::__u32, - pub aio_buf: ::__u64, - pub aio_nbytes: ::__u64, - pub aio_offset: ::__s64, - aio_reserved2: ::__u64, - pub aio_flags: ::__u32, - pub aio_resfd: ::__u32, + pub aio_key: crate::__u32, + pub aio_lio_opcode: crate::__u16, + pub aio_reqprio: crate::__s16, + pub aio_fildes: crate::__u32, + pub aio_buf: crate::__u64, + pub aio_nbytes: crate::__u64, + pub aio_offset: crate::__s64, + aio_reserved2: crate::__u64, + pub aio_flags: crate::__u32, + pub aio_resfd: crate::__u32, } // netinet/tcp.h @@ -445,14 +449,14 @@ s! { } pub struct fanotify_event_info_pidfd { - pub hdr: ::fanotify_event_info_header, - pub pidfd: ::__s32, + pub hdr: crate::fanotify_event_info_header, + pub pidfd: crate::__s32, } pub struct fanotify_event_info_error { - pub hdr: ::fanotify_event_info_header, - pub error: ::__s32, - pub error_count: ::__u32, + pub hdr: crate::fanotify_event_info_header, + pub error: crate::__s32, + pub error_count: crate::__u32, } // FIXME(1.0) this is actually a union @@ -460,33 +464,33 @@ s! { #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct sem_t { #[cfg(target_pointer_width = "32")] - __size: [::c_char; 16], + __size: [c_char; 16], #[cfg(target_pointer_width = "64")] - __size: [::c_char; 32], + __size: [c_char; 32], } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { #[repr(C)] struct siginfo_sigfault { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - si_addr: *mut ::c_void, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + si_addr: *mut c_void, } (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_timer { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - _si_tid: ::c_int, - _si_overrun: ::c_int, - si_sigval: ::sigval, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + _si_tid: c_int, + _si_overrun: c_int, + si_sigval: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_timer)).si_sigval } @@ -495,36 +499,36 @@ impl siginfo_t { s_no_extra_traits! { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_sigevent: ::sigevent, + pub aio_fildes: c_int, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_sigevent: crate::sigevent, __next_prio: *mut aiocb, - __abs_prio: ::c_int, - __policy: ::c_int, - __error_code: ::c_int, - __return_value: ::ssize_t, + __abs_prio: c_int, + __policy: c_int, + __error_code: c_int, + __return_value: ssize_t, // FIXME(off64): visible fields depend on __USE_FILE_OFFSET64 pub aio_offset: off_t, #[cfg(all(not(target_arch = "x86_64"), target_pointer_width = "32"))] - __pad: [::c_char; 4], - __glibc_reserved: [::c_char; 32], + __pad: [c_char; 4], + __glibc_reserved: [c_char; 32], } } // Internal, for casts to access union fields #[repr(C)] struct sifields_sigchld { - si_pid: ::pid_t, - si_uid: ::uid_t, - si_status: ::c_int, - si_utime: ::c_long, - si_stime: ::c_long, + si_pid: crate::pid_t, + si_uid: crate::uid_t, + si_status: c_int, + si_utime: c_long, + si_stime: c_long, } -impl ::Copy for sifields_sigchld {} -impl ::Clone for sifields_sigchld { +impl Copy for sifields_sigchld {} +impl Clone for sifields_sigchld { fn clone(&self) -> sifields_sigchld { *self } @@ -533,7 +537,7 @@ impl ::Clone for sifields_sigchld { // Internal, for casts to access union fields #[repr(C)] union sifields { - _align_pointer: *mut ::c_void, + _align_pointer: *mut c_void, sigchld: sifields_sigchld, } @@ -542,7 +546,7 @@ union sifields { // sifields vary on 32-bit and 64-bit architectures. #[repr(C)] struct siginfo_f { - _siginfo_base: [::c_int; 3], + _siginfo_base: [c_int; 3], sifields: sifields, } @@ -551,23 +555,23 @@ impl siginfo_t { &(*(self as *const siginfo_t as *const siginfo_f)).sifields } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.sifields().sigchld.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.sifields().sigchld.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.sifields().sigchld.si_status } - pub unsafe fn si_utime(&self) -> ::c_long { + pub unsafe fn si_utime(&self) -> c_long { self.sifields().sigchld.si_utime } - pub unsafe fn si_stime(&self) -> ::c_long { + pub unsafe fn si_stime(&self) -> c_long { self.sifields().sigchld.si_stime } } @@ -577,8 +581,8 @@ pub union __c_anonymous_ptrace_syscall_info_data { pub exit: __c_anonymous_ptrace_syscall_info_exit, pub seccomp: __c_anonymous_ptrace_syscall_info_seccomp, } -impl ::Copy for __c_anonymous_ptrace_syscall_info_data {} -impl ::Clone for __c_anonymous_ptrace_syscall_info_data { +impl Copy for __c_anonymous_ptrace_syscall_info_data {} +impl Clone for __c_anonymous_ptrace_syscall_info_data { fn clone(&self) -> __c_anonymous_ptrace_syscall_info_data { *self } @@ -586,13 +590,13 @@ impl ::Clone for __c_anonymous_ptrace_syscall_info_data { s_no_extra_traits! { pub struct utmpx { - pub ut_type: ::c_short, - pub ut_pid: ::pid_t, - pub ut_line: [::c_char; __UT_LINESIZE], - pub ut_id: [::c_char; 4], + pub ut_type: c_short, + pub ut_pid: crate::pid_t, + pub ut_line: [c_char; __UT_LINESIZE], + pub ut_id: [c_char; 4], - pub ut_user: [::c_char; __UT_NAMESIZE], - pub ut_host: [::c_char; __UT_HOSTSIZE], + pub ut_user: [c_char; __UT_NAMESIZE], + pub ut_host: [c_char; __UT_HOSTSIZE], pub ut_exit: __exit_status, #[cfg(any( @@ -601,14 +605,14 @@ s_no_extra_traits! { target_arch = "loongarch64", all(target_pointer_width = "32", not(target_arch = "x86_64")) ))] - pub ut_session: ::c_long, + pub ut_session: c_long, #[cfg(any( target_arch = "aarch64", target_arch = "s390x", target_arch = "loongarch64", all(target_pointer_width = "32", not(target_arch = "x86_64")) ))] - pub ut_tv: ::timeval, + pub ut_tv: crate::timeval, #[cfg(not(any( target_arch = "aarch64", @@ -626,7 +630,7 @@ s_no_extra_traits! { pub ut_tv: __timeval, pub ut_addr_v6: [i32; 4], - __glibc_reserved: [::c_char; 20], + __glibc_reserved: [c_char; 20], } } @@ -654,8 +658,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_type", &self.ut_type) .field("ut_pid", &self.ut_pid) @@ -672,8 +676,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_type.hash(state); self.ut_pid.hash(state); self.ut_line.hash(state); @@ -700,8 +704,8 @@ cfg_if! { impl Eq for __c_anonymous_ptrace_syscall_info_data {} - impl ::fmt::Debug for __c_anonymous_ptrace_syscall_info_data { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ptrace_syscall_info_data { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("__c_anonymous_ptrace_syscall_info_data") .field("entry", &self.entry) @@ -712,8 +716,8 @@ cfg_if! { } } - impl ::hash::Hash for __c_anonymous_ptrace_syscall_info_data { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for __c_anonymous_ptrace_syscall_info_data { + fn hash(&self, state: &mut H) { unsafe { self.entry.hash(state); self.exit.hash(state); @@ -725,21 +729,21 @@ cfg_if! { } // include/uapi/asm-generic/hugetlb_encode.h -pub const HUGETLB_FLAG_ENCODE_SHIFT: ::c_int = 26; -pub const HUGETLB_FLAG_ENCODE_MASK: ::c_int = 0x3f; - -pub const HUGETLB_FLAG_ENCODE_64KB: ::c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_512KB: ::c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_1MB: ::c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_2MB: ::c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_8MB: ::c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_16MB: ::c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_32MB: ::c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_256MB: ::c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_512MB: ::c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_1GB: ::c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_2GB: ::c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT; -pub const HUGETLB_FLAG_ENCODE_16GB: ::c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_SHIFT: c_int = 26; +pub const HUGETLB_FLAG_ENCODE_MASK: c_int = 0x3f; + +pub const HUGETLB_FLAG_ENCODE_64KB: c_int = 16 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_512KB: c_int = 19 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_1MB: c_int = 20 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_2MB: c_int = 21 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_8MB: c_int = 23 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_16MB: c_int = 24 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_32MB: c_int = 25 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_256MB: c_int = 28 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_512MB: c_int = 29 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_1GB: c_int = 30 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_2GB: c_int = 31 << HUGETLB_FLAG_ENCODE_SHIFT; +pub const HUGETLB_FLAG_ENCODE_16GB: c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT; // include/uapi/linux/mman.h /* @@ -749,89 +753,89 @@ pub const HUGETLB_FLAG_ENCODE_16GB: ::c_int = 34 << HUGETLB_FLAG_ENCODE_SHIFT; * responsibility of the application to know which sizes are supported on * the running system. See mmap(2) man page for details. */ -pub const MAP_HUGE_SHIFT: ::c_int = HUGETLB_FLAG_ENCODE_SHIFT; -pub const MAP_HUGE_MASK: ::c_int = HUGETLB_FLAG_ENCODE_MASK; - -pub const MAP_HUGE_64KB: ::c_int = HUGETLB_FLAG_ENCODE_64KB; -pub const MAP_HUGE_512KB: ::c_int = HUGETLB_FLAG_ENCODE_512KB; -pub const MAP_HUGE_1MB: ::c_int = HUGETLB_FLAG_ENCODE_1MB; -pub const MAP_HUGE_2MB: ::c_int = HUGETLB_FLAG_ENCODE_2MB; -pub const MAP_HUGE_8MB: ::c_int = HUGETLB_FLAG_ENCODE_8MB; -pub const MAP_HUGE_16MB: ::c_int = HUGETLB_FLAG_ENCODE_16MB; -pub const MAP_HUGE_32MB: ::c_int = HUGETLB_FLAG_ENCODE_32MB; -pub const MAP_HUGE_256MB: ::c_int = HUGETLB_FLAG_ENCODE_256MB; -pub const MAP_HUGE_512MB: ::c_int = HUGETLB_FLAG_ENCODE_512MB; -pub const MAP_HUGE_1GB: ::c_int = HUGETLB_FLAG_ENCODE_1GB; -pub const MAP_HUGE_2GB: ::c_int = HUGETLB_FLAG_ENCODE_2GB; -pub const MAP_HUGE_16GB: ::c_int = HUGETLB_FLAG_ENCODE_16GB; - -pub const PRIO_PROCESS: ::__priority_which_t = 0; -pub const PRIO_PGRP: ::__priority_which_t = 1; -pub const PRIO_USER: ::__priority_which_t = 2; - -pub const MS_RMT_MASK: ::c_ulong = 0x02800051; +pub const MAP_HUGE_SHIFT: c_int = HUGETLB_FLAG_ENCODE_SHIFT; +pub const MAP_HUGE_MASK: c_int = HUGETLB_FLAG_ENCODE_MASK; + +pub const MAP_HUGE_64KB: c_int = HUGETLB_FLAG_ENCODE_64KB; +pub const MAP_HUGE_512KB: c_int = HUGETLB_FLAG_ENCODE_512KB; +pub const MAP_HUGE_1MB: c_int = HUGETLB_FLAG_ENCODE_1MB; +pub const MAP_HUGE_2MB: c_int = HUGETLB_FLAG_ENCODE_2MB; +pub const MAP_HUGE_8MB: c_int = HUGETLB_FLAG_ENCODE_8MB; +pub const MAP_HUGE_16MB: c_int = HUGETLB_FLAG_ENCODE_16MB; +pub const MAP_HUGE_32MB: c_int = HUGETLB_FLAG_ENCODE_32MB; +pub const MAP_HUGE_256MB: c_int = HUGETLB_FLAG_ENCODE_256MB; +pub const MAP_HUGE_512MB: c_int = HUGETLB_FLAG_ENCODE_512MB; +pub const MAP_HUGE_1GB: c_int = HUGETLB_FLAG_ENCODE_1GB; +pub const MAP_HUGE_2GB: c_int = HUGETLB_FLAG_ENCODE_2GB; +pub const MAP_HUGE_16GB: c_int = HUGETLB_FLAG_ENCODE_16GB; + +pub const PRIO_PROCESS: crate::__priority_which_t = 0; +pub const PRIO_PGRP: crate::__priority_which_t = 1; +pub const PRIO_USER: crate::__priority_which_t = 2; + +pub const MS_RMT_MASK: c_ulong = 0x02800051; pub const __UT_LINESIZE: usize = 32; pub const __UT_NAMESIZE: usize = 32; pub const __UT_HOSTSIZE: usize = 256; -pub const EMPTY: ::c_short = 0; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const NEW_TIME: ::c_short = 3; -pub const OLD_TIME: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; -pub const ACCOUNTING: ::c_short = 9; +pub const EMPTY: c_short = 0; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const NEW_TIME: c_short = 3; +pub const OLD_TIME: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; +pub const ACCOUNTING: c_short = 9; // dlfcn.h -pub const LM_ID_BASE: ::c_long = 0; -pub const LM_ID_NEWLM: ::c_long = -1; - -pub const RTLD_DI_LMID: ::c_int = 1; -pub const RTLD_DI_LINKMAP: ::c_int = 2; -pub const RTLD_DI_CONFIGADDR: ::c_int = 3; -pub const RTLD_DI_SERINFO: ::c_int = 4; -pub const RTLD_DI_SERINFOSIZE: ::c_int = 5; -pub const RTLD_DI_ORIGIN: ::c_int = 6; -pub const RTLD_DI_PROFILENAME: ::c_int = 7; -pub const RTLD_DI_PROFILEOUT: ::c_int = 8; -pub const RTLD_DI_TLS_MODID: ::c_int = 9; -pub const RTLD_DI_TLS_DATA: ::c_int = 10; - -pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; -pub const PIDFD_NONBLOCK: ::c_uint = O_NONBLOCK as ::c_uint; - -pub const SOL_RXRPC: ::c_int = 272; -pub const SOL_PPPOL2TP: ::c_int = 273; -pub const SOL_PNPIPE: ::c_int = 275; -pub const SOL_RDS: ::c_int = 276; -pub const SOL_IUCV: ::c_int = 277; -pub const SOL_CAIF: ::c_int = 278; -pub const SOL_NFC: ::c_int = 280; -pub const SOL_XDP: ::c_int = 283; - -pub const MSG_TRYHARD: ::c_int = 4; - -pub const LC_PAPER: ::c_int = 7; -pub const LC_NAME: ::c_int = 8; -pub const LC_ADDRESS: ::c_int = 9; -pub const LC_TELEPHONE: ::c_int = 10; -pub const LC_MEASUREMENT: ::c_int = 11; -pub const LC_IDENTIFICATION: ::c_int = 12; -pub const LC_PAPER_MASK: ::c_int = 1 << LC_PAPER; -pub const LC_NAME_MASK: ::c_int = 1 << LC_NAME; -pub const LC_ADDRESS_MASK: ::c_int = 1 << LC_ADDRESS; -pub const LC_TELEPHONE_MASK: ::c_int = 1 << LC_TELEPHONE; -pub const LC_MEASUREMENT_MASK: ::c_int = 1 << LC_MEASUREMENT; -pub const LC_IDENTIFICATION_MASK: ::c_int = 1 << LC_IDENTIFICATION; -pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK - | ::LC_NUMERIC_MASK - | ::LC_TIME_MASK - | ::LC_COLLATE_MASK - | ::LC_MONETARY_MASK - | ::LC_MESSAGES_MASK +pub const LM_ID_BASE: c_long = 0; +pub const LM_ID_NEWLM: c_long = -1; + +pub const RTLD_DI_LMID: c_int = 1; +pub const RTLD_DI_LINKMAP: c_int = 2; +pub const RTLD_DI_CONFIGADDR: c_int = 3; +pub const RTLD_DI_SERINFO: c_int = 4; +pub const RTLD_DI_SERINFOSIZE: c_int = 5; +pub const RTLD_DI_ORIGIN: c_int = 6; +pub const RTLD_DI_PROFILENAME: c_int = 7; +pub const RTLD_DI_PROFILEOUT: c_int = 8; +pub const RTLD_DI_TLS_MODID: c_int = 9; +pub const RTLD_DI_TLS_DATA: c_int = 10; + +pub const SOCK_NONBLOCK: c_int = O_NONBLOCK; +pub const PIDFD_NONBLOCK: c_uint = O_NONBLOCK as c_uint; + +pub const SOL_RXRPC: c_int = 272; +pub const SOL_PPPOL2TP: c_int = 273; +pub const SOL_PNPIPE: c_int = 275; +pub const SOL_RDS: c_int = 276; +pub const SOL_IUCV: c_int = 277; +pub const SOL_CAIF: c_int = 278; +pub const SOL_NFC: c_int = 280; +pub const SOL_XDP: c_int = 283; + +pub const MSG_TRYHARD: c_int = 4; + +pub const LC_PAPER: c_int = 7; +pub const LC_NAME: c_int = 8; +pub const LC_ADDRESS: c_int = 9; +pub const LC_TELEPHONE: c_int = 10; +pub const LC_MEASUREMENT: c_int = 11; +pub const LC_IDENTIFICATION: c_int = 12; +pub const LC_PAPER_MASK: c_int = 1 << LC_PAPER; +pub const LC_NAME_MASK: c_int = 1 << LC_NAME; +pub const LC_ADDRESS_MASK: c_int = 1 << LC_ADDRESS; +pub const LC_TELEPHONE_MASK: c_int = 1 << LC_TELEPHONE; +pub const LC_MEASUREMENT_MASK: c_int = 1 << LC_MEASUREMENT; +pub const LC_IDENTIFICATION_MASK: c_int = 1 << LC_IDENTIFICATION; +pub const LC_ALL_MASK: c_int = crate::LC_CTYPE_MASK + | crate::LC_NUMERIC_MASK + | crate::LC_TIME_MASK + | crate::LC_COLLATE_MASK + | crate::LC_MONETARY_MASK + | crate::LC_MESSAGES_MASK | LC_PAPER_MASK | LC_NAME_MASK | LC_ADDRESS_MASK @@ -839,256 +843,256 @@ pub const LC_ALL_MASK: ::c_int = ::LC_CTYPE_MASK | LC_MEASUREMENT_MASK | LC_IDENTIFICATION_MASK; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; - -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_DCCP: ::c_int = 6; -pub const SOCK_PACKET: ::c_int = 10; - -pub const AF_IB: ::c_int = 27; -pub const AF_MPLS: ::c_int = 28; -pub const AF_NFC: ::c_int = 39; -pub const AF_VSOCK: ::c_int = 40; -pub const AF_XDP: ::c_int = 44; -pub const PF_IB: ::c_int = AF_IB; -pub const PF_MPLS: ::c_int = AF_MPLS; -pub const PF_NFC: ::c_int = AF_NFC; -pub const PF_VSOCK: ::c_int = AF_VSOCK; -pub const PF_XDP: ::c_int = AF_XDP; - -pub const SIGEV_THREAD_ID: ::c_int = 4; - -pub const BUFSIZ: ::c_uint = 8192; -pub const TMP_MAX: ::c_uint = 238328; -pub const FOPEN_MAX: ::c_uint = 16; -pub const FILENAME_MAX: ::c_uint = 4096; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; -pub const _CS_GNU_LIBC_VERSION: ::c_int = 2; -pub const _CS_GNU_LIBPTHREAD_VERSION: ::c_int = 3; -pub const _CS_V6_ENV: ::c_int = 1148; -pub const _CS_V7_ENV: ::c_int = 1149; -pub const _SC_EQUIV_CLASS_MAX: ::c_int = 41; -pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 45; -pub const _SC_PII: ::c_int = 53; -pub const _SC_PII_XTI: ::c_int = 54; -pub const _SC_PII_SOCKET: ::c_int = 55; -pub const _SC_PII_INTERNET: ::c_int = 56; -pub const _SC_PII_OSI: ::c_int = 57; -pub const _SC_POLL: ::c_int = 58; -pub const _SC_SELECT: ::c_int = 59; -pub const _SC_PII_INTERNET_STREAM: ::c_int = 61; -pub const _SC_PII_INTERNET_DGRAM: ::c_int = 62; -pub const _SC_PII_OSI_COTS: ::c_int = 63; -pub const _SC_PII_OSI_CLTS: ::c_int = 64; -pub const _SC_PII_OSI_M: ::c_int = 65; -pub const _SC_T_IOV_MAX: ::c_int = 66; -pub const _SC_2_C_VERSION: ::c_int = 96; -pub const _SC_CHAR_BIT: ::c_int = 101; -pub const _SC_CHAR_MAX: ::c_int = 102; -pub const _SC_CHAR_MIN: ::c_int = 103; -pub const _SC_INT_MAX: ::c_int = 104; -pub const _SC_INT_MIN: ::c_int = 105; -pub const _SC_LONG_BIT: ::c_int = 106; -pub const _SC_WORD_BIT: ::c_int = 107; -pub const _SC_MB_LEN_MAX: ::c_int = 108; -pub const _SC_SSIZE_MAX: ::c_int = 110; -pub const _SC_SCHAR_MAX: ::c_int = 111; -pub const _SC_SCHAR_MIN: ::c_int = 112; -pub const _SC_SHRT_MAX: ::c_int = 113; -pub const _SC_SHRT_MIN: ::c_int = 114; -pub const _SC_UCHAR_MAX: ::c_int = 115; -pub const _SC_UINT_MAX: ::c_int = 116; -pub const _SC_ULONG_MAX: ::c_int = 117; -pub const _SC_USHRT_MAX: ::c_int = 118; -pub const _SC_NL_ARGMAX: ::c_int = 119; -pub const _SC_NL_LANGMAX: ::c_int = 120; -pub const _SC_NL_MSGMAX: ::c_int = 121; -pub const _SC_NL_NMAX: ::c_int = 122; -pub const _SC_NL_SETMAX: ::c_int = 123; -pub const _SC_NL_TEXTMAX: ::c_int = 124; -pub const _SC_BASE: ::c_int = 134; -pub const _SC_C_LANG_SUPPORT: ::c_int = 135; -pub const _SC_C_LANG_SUPPORT_R: ::c_int = 136; -pub const _SC_DEVICE_IO: ::c_int = 140; -pub const _SC_DEVICE_SPECIFIC: ::c_int = 141; -pub const _SC_DEVICE_SPECIFIC_R: ::c_int = 142; -pub const _SC_FD_MGMT: ::c_int = 143; -pub const _SC_FIFO: ::c_int = 144; -pub const _SC_PIPE: ::c_int = 145; -pub const _SC_FILE_ATTRIBUTES: ::c_int = 146; -pub const _SC_FILE_LOCKING: ::c_int = 147; -pub const _SC_FILE_SYSTEM: ::c_int = 148; -pub const _SC_MULTI_PROCESS: ::c_int = 150; -pub const _SC_SINGLE_PROCESS: ::c_int = 151; -pub const _SC_NETWORKING: ::c_int = 152; -pub const _SC_REGEX_VERSION: ::c_int = 156; -pub const _SC_SIGNALS: ::c_int = 158; -pub const _SC_SYSTEM_DATABASE: ::c_int = 162; -pub const _SC_SYSTEM_DATABASE_R: ::c_int = 163; -pub const _SC_USER_GROUPS: ::c_int = 166; -pub const _SC_USER_GROUPS_R: ::c_int = 167; -pub const _SC_LEVEL1_ICACHE_SIZE: ::c_int = 185; -pub const _SC_LEVEL1_ICACHE_ASSOC: ::c_int = 186; -pub const _SC_LEVEL1_ICACHE_LINESIZE: ::c_int = 187; -pub const _SC_LEVEL1_DCACHE_SIZE: ::c_int = 188; -pub const _SC_LEVEL1_DCACHE_ASSOC: ::c_int = 189; -pub const _SC_LEVEL1_DCACHE_LINESIZE: ::c_int = 190; -pub const _SC_LEVEL2_CACHE_SIZE: ::c_int = 191; -pub const _SC_LEVEL2_CACHE_ASSOC: ::c_int = 192; -pub const _SC_LEVEL2_CACHE_LINESIZE: ::c_int = 193; -pub const _SC_LEVEL3_CACHE_SIZE: ::c_int = 194; -pub const _SC_LEVEL3_CACHE_ASSOC: ::c_int = 195; -pub const _SC_LEVEL3_CACHE_LINESIZE: ::c_int = 196; -pub const _SC_LEVEL4_CACHE_SIZE: ::c_int = 197; -pub const _SC_LEVEL4_CACHE_ASSOC: ::c_int = 198; -pub const _SC_LEVEL4_CACHE_LINESIZE: ::c_int = 199; -pub const O_ACCMODE: ::c_int = 3; -pub const ST_RELATIME: ::c_ulong = 4096; -pub const NI_MAXHOST: ::socklen_t = 1025; +pub const ENOTSUP: c_int = EOPNOTSUPP; + +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_DCCP: c_int = 6; +pub const SOCK_PACKET: c_int = 10; + +pub const AF_IB: c_int = 27; +pub const AF_MPLS: c_int = 28; +pub const AF_NFC: c_int = 39; +pub const AF_VSOCK: c_int = 40; +pub const AF_XDP: c_int = 44; +pub const PF_IB: c_int = AF_IB; +pub const PF_MPLS: c_int = AF_MPLS; +pub const PF_NFC: c_int = AF_NFC; +pub const PF_VSOCK: c_int = AF_VSOCK; +pub const PF_XDP: c_int = AF_XDP; + +pub const SIGEV_THREAD_ID: c_int = 4; + +pub const BUFSIZ: c_uint = 8192; +pub const TMP_MAX: c_uint = 238328; +pub const FOPEN_MAX: c_uint = 16; +pub const FILENAME_MAX: c_uint = 4096; +pub const POSIX_MADV_DONTNEED: c_int = 4; +pub const _CS_GNU_LIBC_VERSION: c_int = 2; +pub const _CS_GNU_LIBPTHREAD_VERSION: c_int = 3; +pub const _CS_V6_ENV: c_int = 1148; +pub const _CS_V7_ENV: c_int = 1149; +pub const _SC_EQUIV_CLASS_MAX: c_int = 41; +pub const _SC_CHARCLASS_NAME_MAX: c_int = 45; +pub const _SC_PII: c_int = 53; +pub const _SC_PII_XTI: c_int = 54; +pub const _SC_PII_SOCKET: c_int = 55; +pub const _SC_PII_INTERNET: c_int = 56; +pub const _SC_PII_OSI: c_int = 57; +pub const _SC_POLL: c_int = 58; +pub const _SC_SELECT: c_int = 59; +pub const _SC_PII_INTERNET_STREAM: c_int = 61; +pub const _SC_PII_INTERNET_DGRAM: c_int = 62; +pub const _SC_PII_OSI_COTS: c_int = 63; +pub const _SC_PII_OSI_CLTS: c_int = 64; +pub const _SC_PII_OSI_M: c_int = 65; +pub const _SC_T_IOV_MAX: c_int = 66; +pub const _SC_2_C_VERSION: c_int = 96; +pub const _SC_CHAR_BIT: c_int = 101; +pub const _SC_CHAR_MAX: c_int = 102; +pub const _SC_CHAR_MIN: c_int = 103; +pub const _SC_INT_MAX: c_int = 104; +pub const _SC_INT_MIN: c_int = 105; +pub const _SC_LONG_BIT: c_int = 106; +pub const _SC_WORD_BIT: c_int = 107; +pub const _SC_MB_LEN_MAX: c_int = 108; +pub const _SC_SSIZE_MAX: c_int = 110; +pub const _SC_SCHAR_MAX: c_int = 111; +pub const _SC_SCHAR_MIN: c_int = 112; +pub const _SC_SHRT_MAX: c_int = 113; +pub const _SC_SHRT_MIN: c_int = 114; +pub const _SC_UCHAR_MAX: c_int = 115; +pub const _SC_UINT_MAX: c_int = 116; +pub const _SC_ULONG_MAX: c_int = 117; +pub const _SC_USHRT_MAX: c_int = 118; +pub const _SC_NL_ARGMAX: c_int = 119; +pub const _SC_NL_LANGMAX: c_int = 120; +pub const _SC_NL_MSGMAX: c_int = 121; +pub const _SC_NL_NMAX: c_int = 122; +pub const _SC_NL_SETMAX: c_int = 123; +pub const _SC_NL_TEXTMAX: c_int = 124; +pub const _SC_BASE: c_int = 134; +pub const _SC_C_LANG_SUPPORT: c_int = 135; +pub const _SC_C_LANG_SUPPORT_R: c_int = 136; +pub const _SC_DEVICE_IO: c_int = 140; +pub const _SC_DEVICE_SPECIFIC: c_int = 141; +pub const _SC_DEVICE_SPECIFIC_R: c_int = 142; +pub const _SC_FD_MGMT: c_int = 143; +pub const _SC_FIFO: c_int = 144; +pub const _SC_PIPE: c_int = 145; +pub const _SC_FILE_ATTRIBUTES: c_int = 146; +pub const _SC_FILE_LOCKING: c_int = 147; +pub const _SC_FILE_SYSTEM: c_int = 148; +pub const _SC_MULTI_PROCESS: c_int = 150; +pub const _SC_SINGLE_PROCESS: c_int = 151; +pub const _SC_NETWORKING: c_int = 152; +pub const _SC_REGEX_VERSION: c_int = 156; +pub const _SC_SIGNALS: c_int = 158; +pub const _SC_SYSTEM_DATABASE: c_int = 162; +pub const _SC_SYSTEM_DATABASE_R: c_int = 163; +pub const _SC_USER_GROUPS: c_int = 166; +pub const _SC_USER_GROUPS_R: c_int = 167; +pub const _SC_LEVEL1_ICACHE_SIZE: c_int = 185; +pub const _SC_LEVEL1_ICACHE_ASSOC: c_int = 186; +pub const _SC_LEVEL1_ICACHE_LINESIZE: c_int = 187; +pub const _SC_LEVEL1_DCACHE_SIZE: c_int = 188; +pub const _SC_LEVEL1_DCACHE_ASSOC: c_int = 189; +pub const _SC_LEVEL1_DCACHE_LINESIZE: c_int = 190; +pub const _SC_LEVEL2_CACHE_SIZE: c_int = 191; +pub const _SC_LEVEL2_CACHE_ASSOC: c_int = 192; +pub const _SC_LEVEL2_CACHE_LINESIZE: c_int = 193; +pub const _SC_LEVEL3_CACHE_SIZE: c_int = 194; +pub const _SC_LEVEL3_CACHE_ASSOC: c_int = 195; +pub const _SC_LEVEL3_CACHE_LINESIZE: c_int = 196; +pub const _SC_LEVEL4_CACHE_SIZE: c_int = 197; +pub const _SC_LEVEL4_CACHE_ASSOC: c_int = 198; +pub const _SC_LEVEL4_CACHE_LINESIZE: c_int = 199; +pub const O_ACCMODE: c_int = 3; +pub const ST_RELATIME: c_ulong = 4096; +pub const NI_MAXHOST: crate::socklen_t = 1025; // Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the // following are only available on newer Linux versions than the versions // currently used in CI in some configurations, so we define them here. cfg_if! { if #[cfg(not(target_arch = "s390x"))] { - pub const BINDERFS_SUPER_MAGIC: ::c_long = 0x6c6f6f70; - pub const XFS_SUPER_MAGIC: ::c_long = 0x58465342; + pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70; + pub const XFS_SUPER_MAGIC: c_long = 0x58465342; } else if #[cfg(target_arch = "s390x")] { - pub const BINDERFS_SUPER_MAGIC: ::c_uint = 0x6c6f6f70; - pub const XFS_SUPER_MAGIC: ::c_uint = 0x58465342; + pub const BINDERFS_SUPER_MAGIC: c_uint = 0x6c6f6f70; + pub const XFS_SUPER_MAGIC: c_uint = 0x58465342; } } -pub const CPU_SETSIZE: ::c_int = 0x400; - -pub const PTRACE_TRACEME: ::c_uint = 0; -pub const PTRACE_PEEKTEXT: ::c_uint = 1; -pub const PTRACE_PEEKDATA: ::c_uint = 2; -pub const PTRACE_PEEKUSER: ::c_uint = 3; -pub const PTRACE_POKETEXT: ::c_uint = 4; -pub const PTRACE_POKEDATA: ::c_uint = 5; -pub const PTRACE_POKEUSER: ::c_uint = 6; -pub const PTRACE_CONT: ::c_uint = 7; -pub const PTRACE_KILL: ::c_uint = 8; -pub const PTRACE_SINGLESTEP: ::c_uint = 9; -pub const PTRACE_ATTACH: ::c_uint = 16; -pub const PTRACE_SYSCALL: ::c_uint = 24; -pub const PTRACE_SETOPTIONS: ::c_uint = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_uint = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_uint = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_uint = 0x4203; -pub const PTRACE_GETREGSET: ::c_uint = 0x4204; -pub const PTRACE_SETREGSET: ::c_uint = 0x4205; -pub const PTRACE_SEIZE: ::c_uint = 0x4206; -pub const PTRACE_INTERRUPT: ::c_uint = 0x4207; -pub const PTRACE_LISTEN: ::c_uint = 0x4208; -pub const PTRACE_PEEKSIGINFO: ::c_uint = 0x4209; -pub const PTRACE_GETSIGMASK: ::c_uint = 0x420a; -pub const PTRACE_SETSIGMASK: ::c_uint = 0x420b; -pub const PTRACE_GET_SYSCALL_INFO: ::c_uint = 0x420e; -pub const PTRACE_SYSCALL_INFO_NONE: ::__u8 = 0; -pub const PTRACE_SYSCALL_INFO_ENTRY: ::__u8 = 1; -pub const PTRACE_SYSCALL_INFO_EXIT: ::__u8 = 2; -pub const PTRACE_SYSCALL_INFO_SECCOMP: ::__u8 = 3; +pub const CPU_SETSIZE: c_int = 0x400; + +pub const PTRACE_TRACEME: c_uint = 0; +pub const PTRACE_PEEKTEXT: c_uint = 1; +pub const PTRACE_PEEKDATA: c_uint = 2; +pub const PTRACE_PEEKUSER: c_uint = 3; +pub const PTRACE_POKETEXT: c_uint = 4; +pub const PTRACE_POKEDATA: c_uint = 5; +pub const PTRACE_POKEUSER: c_uint = 6; +pub const PTRACE_CONT: c_uint = 7; +pub const PTRACE_KILL: c_uint = 8; +pub const PTRACE_SINGLESTEP: c_uint = 9; +pub const PTRACE_ATTACH: c_uint = 16; +pub const PTRACE_SYSCALL: c_uint = 24; +pub const PTRACE_SETOPTIONS: c_uint = 0x4200; +pub const PTRACE_GETEVENTMSG: c_uint = 0x4201; +pub const PTRACE_GETSIGINFO: c_uint = 0x4202; +pub const PTRACE_SETSIGINFO: c_uint = 0x4203; +pub const PTRACE_GETREGSET: c_uint = 0x4204; +pub const PTRACE_SETREGSET: c_uint = 0x4205; +pub const PTRACE_SEIZE: c_uint = 0x4206; +pub const PTRACE_INTERRUPT: c_uint = 0x4207; +pub const PTRACE_LISTEN: c_uint = 0x4208; +pub const PTRACE_PEEKSIGINFO: c_uint = 0x4209; +pub const PTRACE_GETSIGMASK: c_uint = 0x420a; +pub const PTRACE_SETSIGMASK: c_uint = 0x420b; +pub const PTRACE_GET_SYSCALL_INFO: c_uint = 0x420e; +pub const PTRACE_SYSCALL_INFO_NONE: crate::__u8 = 0; +pub const PTRACE_SYSCALL_INFO_ENTRY: crate::__u8 = 1; +pub const PTRACE_SYSCALL_INFO_EXIT: crate::__u8 = 2; +pub const PTRACE_SYSCALL_INFO_SECCOMP: crate::__u8 = 3; // linux/fs.h // Flags for preadv2/pwritev2 -pub const RWF_HIPRI: ::c_int = 0x00000001; -pub const RWF_DSYNC: ::c_int = 0x00000002; -pub const RWF_SYNC: ::c_int = 0x00000004; -pub const RWF_NOWAIT: ::c_int = 0x00000008; -pub const RWF_APPEND: ::c_int = 0x00000010; +pub const RWF_HIPRI: c_int = 0x00000001; +pub const RWF_DSYNC: c_int = 0x00000002; +pub const RWF_SYNC: c_int = 0x00000004; +pub const RWF_NOWAIT: c_int = 0x00000008; +pub const RWF_APPEND: c_int = 0x00000010; // linux/rtnetlink.h -pub const TCA_PAD: ::c_ushort = 9; -pub const TCA_DUMP_INVISIBLE: ::c_ushort = 10; -pub const TCA_CHAIN: ::c_ushort = 11; -pub const TCA_HW_OFFLOAD: ::c_ushort = 12; +pub const TCA_PAD: c_ushort = 9; +pub const TCA_DUMP_INVISIBLE: c_ushort = 10; +pub const TCA_CHAIN: c_ushort = 11; +pub const TCA_HW_OFFLOAD: c_ushort = 12; pub const RTM_DELNETCONF: u16 = 81; pub const RTM_NEWSTATS: u16 = 92; pub const RTM_GETSTATS: u16 = 94; pub const RTM_NEWCACHEREPORT: u16 = 96; -pub const RTM_F_LOOKUP_TABLE: ::c_uint = 0x1000; -pub const RTM_F_FIB_MATCH: ::c_uint = 0x2000; +pub const RTM_F_LOOKUP_TABLE: c_uint = 0x1000; +pub const RTM_F_FIB_MATCH: c_uint = 0x2000; -pub const RTA_VIA: ::c_ushort = 18; -pub const RTA_NEWDST: ::c_ushort = 19; -pub const RTA_PREF: ::c_ushort = 20; -pub const RTA_ENCAP_TYPE: ::c_ushort = 21; -pub const RTA_ENCAP: ::c_ushort = 22; -pub const RTA_EXPIRES: ::c_ushort = 23; -pub const RTA_PAD: ::c_ushort = 24; -pub const RTA_UID: ::c_ushort = 25; -pub const RTA_TTL_PROPAGATE: ::c_ushort = 26; +pub const RTA_VIA: c_ushort = 18; +pub const RTA_NEWDST: c_ushort = 19; +pub const RTA_PREF: c_ushort = 20; +pub const RTA_ENCAP_TYPE: c_ushort = 21; +pub const RTA_ENCAP: c_ushort = 22; +pub const RTA_EXPIRES: c_ushort = 23; +pub const RTA_PAD: c_ushort = 24; +pub const RTA_UID: c_ushort = 25; +pub const RTA_TTL_PROPAGATE: c_ushort = 26; // linux/neighbor.h pub const NTF_EXT_LEARNED: u8 = 0x10; pub const NTF_OFFLOADED: u8 = 0x20; -pub const NDA_MASTER: ::c_ushort = 9; -pub const NDA_LINK_NETNSID: ::c_ushort = 10; -pub const NDA_SRC_VNI: ::c_ushort = 11; +pub const NDA_MASTER: c_ushort = 9; +pub const NDA_LINK_NETNSID: c_ushort = 10; +pub const NDA_SRC_VNI: c_ushort = 11; // linux/personality.h -pub const UNAME26: ::c_int = 0x0020000; -pub const FDPIC_FUNCPTRS: ::c_int = 0x0080000; +pub const UNAME26: c_int = 0x0020000; +pub const FDPIC_FUNCPTRS: c_int = 0x0080000; // linux/if_addr.h -pub const IFA_FLAGS: ::c_ushort = 8; +pub const IFA_FLAGS: c_ushort = 8; pub const IFA_F_MANAGETEMPADDR: u32 = 0x100; pub const IFA_F_NOPREFIXROUTE: u32 = 0x200; pub const IFA_F_MCAUTOJOIN: u32 = 0x400; pub const IFA_F_STABLE_PRIVACY: u32 = 0x800; -pub const MAX_LINKS: ::c_int = 32; +pub const MAX_LINKS: c_int = 32; -pub const GENL_UNS_ADMIN_PERM: ::c_int = 0x10; +pub const GENL_UNS_ADMIN_PERM: c_int = 0x10; -pub const GENL_ID_VFS_DQUOT: ::c_int = ::NLMSG_MIN_TYPE + 1; -pub const GENL_ID_PMCRAID: ::c_int = ::NLMSG_MIN_TYPE + 2; +pub const GENL_ID_VFS_DQUOT: c_int = crate::NLMSG_MIN_TYPE + 1; +pub const GENL_ID_PMCRAID: c_int = crate::NLMSG_MIN_TYPE + 2; // linux/if_xdp.h -pub const XDP_SHARED_UMEM: ::__u16 = 1 << 0; -pub const XDP_COPY: ::__u16 = 1 << 1; -pub const XDP_ZEROCOPY: ::__u16 = 1 << 2; -pub const XDP_USE_NEED_WAKEUP: ::__u16 = 1 << 3; -pub const XDP_USE_SG: ::__u16 = 1 << 4; +pub const XDP_SHARED_UMEM: crate::__u16 = 1 << 0; +pub const XDP_COPY: crate::__u16 = 1 << 1; +pub const XDP_ZEROCOPY: crate::__u16 = 1 << 2; +pub const XDP_USE_NEED_WAKEUP: crate::__u16 = 1 << 3; +pub const XDP_USE_SG: crate::__u16 = 1 << 4; -pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: ::__u32 = 1 << 0; +pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: crate::__u32 = 1 << 0; -pub const XDP_RING_NEED_WAKEUP: ::__u32 = 1 << 0; +pub const XDP_RING_NEED_WAKEUP: crate::__u32 = 1 << 0; -pub const XDP_MMAP_OFFSETS: ::c_int = 1; -pub const XDP_RX_RING: ::c_int = 2; -pub const XDP_TX_RING: ::c_int = 3; -pub const XDP_UMEM_REG: ::c_int = 4; -pub const XDP_UMEM_FILL_RING: ::c_int = 5; -pub const XDP_UMEM_COMPLETION_RING: ::c_int = 6; -pub const XDP_STATISTICS: ::c_int = 7; -pub const XDP_OPTIONS: ::c_int = 8; +pub const XDP_MMAP_OFFSETS: c_int = 1; +pub const XDP_RX_RING: c_int = 2; +pub const XDP_TX_RING: c_int = 3; +pub const XDP_UMEM_REG: c_int = 4; +pub const XDP_UMEM_FILL_RING: c_int = 5; +pub const XDP_UMEM_COMPLETION_RING: c_int = 6; +pub const XDP_STATISTICS: c_int = 7; +pub const XDP_OPTIONS: c_int = 8; -pub const XDP_OPTIONS_ZEROCOPY: ::__u32 = 1 << 0; +pub const XDP_OPTIONS_ZEROCOPY: crate::__u32 = 1 << 0; -pub const XDP_PGOFF_RX_RING: ::off_t = 0; -pub const XDP_PGOFF_TX_RING: ::off_t = 0x80000000; -pub const XDP_UMEM_PGOFF_FILL_RING: ::c_ulonglong = 0x100000000; -pub const XDP_UMEM_PGOFF_COMPLETION_RING: ::c_ulonglong = 0x180000000; +pub const XDP_PGOFF_RX_RING: off_t = 0; +pub const XDP_PGOFF_TX_RING: off_t = 0x80000000; +pub const XDP_UMEM_PGOFF_FILL_RING: c_ulonglong = 0x100000000; +pub const XDP_UMEM_PGOFF_COMPLETION_RING: c_ulonglong = 0x180000000; -pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: ::c_int = 48; -pub const XSK_UNALIGNED_BUF_ADDR_MASK: ::c_ulonglong = (1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1; +pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: c_int = 48; +pub const XSK_UNALIGNED_BUF_ADDR_MASK: c_ulonglong = (1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1; -pub const XDP_PKT_CONTD: ::__u32 = 1 << 0; +pub const XDP_PKT_CONTD: crate::__u32 = 1 << 0; pub const ELFOSABI_ARM_AEABI: u8 = 64; // linux/sched.h -pub const CLONE_NEWTIME: ::c_int = 0x80; -pub const CLONE_CLEAR_SIGHAND: ::c_ulonglong = 0x100000000; -pub const CLONE_INTO_CGROUP: ::c_ulonglong = 0x200000000; +pub const CLONE_NEWTIME: c_int = 0x80; +pub const CLONE_CLEAR_SIGHAND: c_ulonglong = 0x100000000; +pub const CLONE_INTO_CGROUP: c_ulonglong = 0x200000000; // linux/keyctl.h pub const KEYCTL_DH_COMPUTE: u32 = 23; @@ -1126,73 +1130,73 @@ cfg_if! { } } -pub const M_MXFAST: ::c_int = 1; -pub const M_NLBLKS: ::c_int = 2; -pub const M_GRAIN: ::c_int = 3; -pub const M_KEEP: ::c_int = 4; -pub const M_TRIM_THRESHOLD: ::c_int = -1; -pub const M_TOP_PAD: ::c_int = -2; -pub const M_MMAP_THRESHOLD: ::c_int = -3; -pub const M_MMAP_MAX: ::c_int = -4; -pub const M_CHECK_ACTION: ::c_int = -5; -pub const M_PERTURB: ::c_int = -6; -pub const M_ARENA_TEST: ::c_int = -7; -pub const M_ARENA_MAX: ::c_int = -8; - -pub const SOMAXCONN: ::c_int = 4096; +pub const M_MXFAST: c_int = 1; +pub const M_NLBLKS: c_int = 2; +pub const M_GRAIN: c_int = 3; +pub const M_KEEP: c_int = 4; +pub const M_TRIM_THRESHOLD: c_int = -1; +pub const M_TOP_PAD: c_int = -2; +pub const M_MMAP_THRESHOLD: c_int = -3; +pub const M_MMAP_MAX: c_int = -4; +pub const M_CHECK_ACTION: c_int = -5; +pub const M_PERTURB: c_int = -6; +pub const M_ARENA_TEST: c_int = -7; +pub const M_ARENA_MAX: c_int = -8; + +pub const SOMAXCONN: c_int = 4096; // linux/mount.h -pub const MOVE_MOUNT_F_SYMLINKS: ::c_uint = 0x00000001; -pub const MOVE_MOUNT_F_AUTOMOUNTS: ::c_uint = 0x00000002; -pub const MOVE_MOUNT_F_EMPTY_PATH: ::c_uint = 0x00000004; -pub const MOVE_MOUNT_T_SYMLINKS: ::c_uint = 0x00000010; -pub const MOVE_MOUNT_T_AUTOMOUNTS: ::c_uint = 0x00000020; -pub const MOVE_MOUNT_T_EMPTY_PATH: ::c_uint = 0x00000040; -pub const MOVE_MOUNT_SET_GROUP: ::c_uint = 0x00000100; -pub const MOVE_MOUNT_BENEATH: ::c_uint = 0x00000200; +pub const MOVE_MOUNT_F_SYMLINKS: c_uint = 0x00000001; +pub const MOVE_MOUNT_F_AUTOMOUNTS: c_uint = 0x00000002; +pub const MOVE_MOUNT_F_EMPTY_PATH: c_uint = 0x00000004; +pub const MOVE_MOUNT_T_SYMLINKS: c_uint = 0x00000010; +pub const MOVE_MOUNT_T_AUTOMOUNTS: c_uint = 0x00000020; +pub const MOVE_MOUNT_T_EMPTY_PATH: c_uint = 0x00000040; +pub const MOVE_MOUNT_SET_GROUP: c_uint = 0x00000100; +pub const MOVE_MOUNT_BENEATH: c_uint = 0x00000200; // sys/timex.h -pub const ADJ_OFFSET: ::c_uint = 0x0001; -pub const ADJ_FREQUENCY: ::c_uint = 0x0002; -pub const ADJ_MAXERROR: ::c_uint = 0x0004; -pub const ADJ_ESTERROR: ::c_uint = 0x0008; -pub const ADJ_STATUS: ::c_uint = 0x0010; -pub const ADJ_TIMECONST: ::c_uint = 0x0020; -pub const ADJ_TAI: ::c_uint = 0x0080; -pub const ADJ_SETOFFSET: ::c_uint = 0x0100; -pub const ADJ_MICRO: ::c_uint = 0x1000; -pub const ADJ_NANO: ::c_uint = 0x2000; -pub const ADJ_TICK: ::c_uint = 0x4000; -pub const ADJ_OFFSET_SINGLESHOT: ::c_uint = 0x8001; -pub const ADJ_OFFSET_SS_READ: ::c_uint = 0xa001; -pub const MOD_OFFSET: ::c_uint = ADJ_OFFSET; -pub const MOD_FREQUENCY: ::c_uint = ADJ_FREQUENCY; -pub const MOD_MAXERROR: ::c_uint = ADJ_MAXERROR; -pub const MOD_ESTERROR: ::c_uint = ADJ_ESTERROR; -pub const MOD_STATUS: ::c_uint = ADJ_STATUS; -pub const MOD_TIMECONST: ::c_uint = ADJ_TIMECONST; -pub const MOD_CLKB: ::c_uint = ADJ_TICK; -pub const MOD_CLKA: ::c_uint = ADJ_OFFSET_SINGLESHOT; -pub const MOD_TAI: ::c_uint = ADJ_TAI; -pub const MOD_MICRO: ::c_uint = ADJ_MICRO; -pub const MOD_NANO: ::c_uint = ADJ_NANO; -pub const STA_PLL: ::c_int = 0x0001; -pub const STA_PPSFREQ: ::c_int = 0x0002; -pub const STA_PPSTIME: ::c_int = 0x0004; -pub const STA_FLL: ::c_int = 0x0008; -pub const STA_INS: ::c_int = 0x0010; -pub const STA_DEL: ::c_int = 0x0020; -pub const STA_UNSYNC: ::c_int = 0x0040; -pub const STA_FREQHOLD: ::c_int = 0x0080; -pub const STA_PPSSIGNAL: ::c_int = 0x0100; -pub const STA_PPSJITTER: ::c_int = 0x0200; -pub const STA_PPSWANDER: ::c_int = 0x0400; -pub const STA_PPSERROR: ::c_int = 0x0800; -pub const STA_CLOCKERR: ::c_int = 0x1000; -pub const STA_NANO: ::c_int = 0x2000; -pub const STA_MODE: ::c_int = 0x4000; -pub const STA_CLK: ::c_int = 0x8000; -pub const STA_RONLY: ::c_int = STA_PPSSIGNAL +pub const ADJ_OFFSET: c_uint = 0x0001; +pub const ADJ_FREQUENCY: c_uint = 0x0002; +pub const ADJ_MAXERROR: c_uint = 0x0004; +pub const ADJ_ESTERROR: c_uint = 0x0008; +pub const ADJ_STATUS: c_uint = 0x0010; +pub const ADJ_TIMECONST: c_uint = 0x0020; +pub const ADJ_TAI: c_uint = 0x0080; +pub const ADJ_SETOFFSET: c_uint = 0x0100; +pub const ADJ_MICRO: c_uint = 0x1000; +pub const ADJ_NANO: c_uint = 0x2000; +pub const ADJ_TICK: c_uint = 0x4000; +pub const ADJ_OFFSET_SINGLESHOT: c_uint = 0x8001; +pub const ADJ_OFFSET_SS_READ: c_uint = 0xa001; +pub const MOD_OFFSET: c_uint = ADJ_OFFSET; +pub const MOD_FREQUENCY: c_uint = ADJ_FREQUENCY; +pub const MOD_MAXERROR: c_uint = ADJ_MAXERROR; +pub const MOD_ESTERROR: c_uint = ADJ_ESTERROR; +pub const MOD_STATUS: c_uint = ADJ_STATUS; +pub const MOD_TIMECONST: c_uint = ADJ_TIMECONST; +pub const MOD_CLKB: c_uint = ADJ_TICK; +pub const MOD_CLKA: c_uint = ADJ_OFFSET_SINGLESHOT; +pub const MOD_TAI: c_uint = ADJ_TAI; +pub const MOD_MICRO: c_uint = ADJ_MICRO; +pub const MOD_NANO: c_uint = ADJ_NANO; +pub const STA_PLL: c_int = 0x0001; +pub const STA_PPSFREQ: c_int = 0x0002; +pub const STA_PPSTIME: c_int = 0x0004; +pub const STA_FLL: c_int = 0x0008; +pub const STA_INS: c_int = 0x0010; +pub const STA_DEL: c_int = 0x0020; +pub const STA_UNSYNC: c_int = 0x0040; +pub const STA_FREQHOLD: c_int = 0x0080; +pub const STA_PPSSIGNAL: c_int = 0x0100; +pub const STA_PPSJITTER: c_int = 0x0200; +pub const STA_PPSWANDER: c_int = 0x0400; +pub const STA_PPSERROR: c_int = 0x0800; +pub const STA_CLOCKERR: c_int = 0x1000; +pub const STA_NANO: c_int = 0x2000; +pub const STA_MODE: c_int = 0x4000; +pub const STA_CLK: c_int = 0x8000; +pub const STA_RONLY: c_int = STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR @@ -1200,27 +1204,27 @@ pub const STA_RONLY: ::c_int = STA_PPSSIGNAL | STA_NANO | STA_MODE | STA_CLK; -pub const NTP_API: ::c_int = 4; -pub const TIME_OK: ::c_int = 0; -pub const TIME_INS: ::c_int = 1; -pub const TIME_DEL: ::c_int = 2; -pub const TIME_OOP: ::c_int = 3; -pub const TIME_WAIT: ::c_int = 4; -pub const TIME_ERROR: ::c_int = 5; -pub const TIME_BAD: ::c_int = TIME_ERROR; -pub const MAXTC: ::c_long = 6; +pub const NTP_API: c_int = 4; +pub const TIME_OK: c_int = 0; +pub const TIME_INS: c_int = 1; +pub const TIME_DEL: c_int = 2; +pub const TIME_OOP: c_int = 3; +pub const TIME_WAIT: c_int = 4; +pub const TIME_ERROR: c_int = 5; +pub const TIME_BAD: c_int = TIME_ERROR; +pub const MAXTC: c_long = 6; // Portable GLOB_* flags are defined at the `linux_like` level. // The following are GNU extensions. -pub const GLOB_PERIOD: ::c_int = 1 << 7; -pub const GLOB_ALTDIRFUNC: ::c_int = 1 << 9; -pub const GLOB_BRACE: ::c_int = 1 << 10; -pub const GLOB_NOMAGIC: ::c_int = 1 << 11; -pub const GLOB_TILDE: ::c_int = 1 << 12; -pub const GLOB_ONLYDIR: ::c_int = 1 << 13; -pub const GLOB_TILDE_CHECK: ::c_int = 1 << 14; +pub const GLOB_PERIOD: c_int = 1 << 7; +pub const GLOB_ALTDIRFUNC: c_int = 1 << 9; +pub const GLOB_BRACE: c_int = 1 << 10; +pub const GLOB_NOMAGIC: c_int = 1 << 11; +pub const GLOB_TILDE: c_int = 1 << 12; +pub const GLOB_ONLYDIR: c_int = 1 << 13; +pub const GLOB_TILDE_CHECK: c_int = 1 << 14; -pub const MADV_COLLAPSE: ::c_int = 25; +pub const MADV_COLLAPSE: c_int = 25; cfg_if! { if #[cfg(any( @@ -1231,20 +1235,20 @@ cfg_if! { target_arch = "riscv64", target_arch = "riscv32" ))] { - pub const PTHREAD_STACK_MIN: ::size_t = 16384; + pub const PTHREAD_STACK_MIN: size_t = 16384; } else if #[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] { - pub const PTHREAD_STACK_MIN: ::size_t = 0x6000; + pub const PTHREAD_STACK_MIN: size_t = 0x6000; } else { - pub const PTHREAD_STACK_MIN: ::size_t = 131072; + pub const PTHREAD_STACK_MIN: size_t = 131072; } } -pub const PTHREAD_MUTEX_ADAPTIVE_NP: ::c_int = 3; +pub const PTHREAD_MUTEX_ADAPTIVE_NP: c_int = 3; -pub const REG_STARTEND: ::c_int = 4; +pub const REG_STARTEND: c_int = 4; -pub const REG_EEND: ::c_int = 14; -pub const REG_ESIZE: ::c_int = 15; -pub const REG_ERPAREN: ::c_int = 16; +pub const REG_EEND: c_int = 14; +pub const REG_ESIZE: c_int = 15; +pub const REG_ERPAREN: c_int = 16; cfg_if! { if #[cfg(any( @@ -1256,8 +1260,8 @@ cfg_if! { target_arch = "riscv64", target_arch = "s390x" ))] { - pub const TUNSETCARRIER: ::Ioctl = 0x400454e2; - pub const TUNGETDEVNETNS: ::Ioctl = 0x54e3; + pub const TUNSETCARRIER: Ioctl = 0x400454e2; + pub const TUNGETDEVNETNS: Ioctl = 0x54e3; } else if #[cfg(any( target_arch = "mips", target_arch = "mips64", @@ -1266,8 +1270,8 @@ cfg_if! { target_arch = "sparc", target_arch = "sparc64" ))] { - pub const TUNSETCARRIER: ::Ioctl = 0x800454e2; - pub const TUNGETDEVNETNS: ::Ioctl = 0x200054e3; + pub const TUNSETCARRIER: Ioctl = 0x800454e2; + pub const TUNGETDEVNETNS: Ioctl = 0x200054e3; } else { // Unknown target_arch } @@ -1275,279 +1279,278 @@ cfg_if! { extern "C" { pub fn fgetspent_r( - fp: *mut ::FILE, - spbuf: *mut ::spwd, - buf: *mut ::c_char, - buflen: ::size_t, - spbufp: *mut *mut ::spwd, - ) -> ::c_int; + fp: *mut crate::FILE, + spbuf: *mut crate::spwd, + buf: *mut c_char, + buflen: size_t, + spbufp: *mut *mut crate::spwd, + ) -> c_int; pub fn sgetspent_r( - s: *const ::c_char, - spbuf: *mut ::spwd, - buf: *mut ::c_char, - buflen: ::size_t, - spbufp: *mut *mut ::spwd, - ) -> ::c_int; + s: *const c_char, + spbuf: *mut crate::spwd, + buf: *mut c_char, + buflen: size_t, + spbufp: *mut *mut crate::spwd, + ) -> c_int; pub fn getspent_r( - spbuf: *mut ::spwd, - buf: *mut ::c_char, - buflen: ::size_t, - spbufp: *mut *mut ::spwd, - ) -> ::c_int; + spbuf: *mut crate::spwd, + buf: *mut c_char, + buflen: size_t, + spbufp: *mut *mut crate::spwd, + ) -> c_int; pub fn qsort_r( - base: *mut ::c_void, - num: ::size_t, - size: ::size_t, - compar: ::Option< - unsafe extern "C" fn(*const ::c_void, *const ::c_void, *mut ::c_void) -> ::c_int, - >, - arg: *mut ::c_void, + base: *mut c_void, + num: size_t, + size: size_t, + compar: Option c_int>, + arg: *mut c_void, ); pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + ) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - timeout: *mut ::timespec, - ) -> ::c_int; - - pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int; - pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int; - pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + timeout: *mut crate::timespec, + ) -> c_int; + + pub fn getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int; + pub fn setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64) + -> c_int; + pub fn getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit) -> c_int; pub fn prlimit( - pid: ::pid_t, - resource: ::__rlimit_resource_t, - new_limit: *const ::rlimit, - old_limit: *mut ::rlimit, - ) -> ::c_int; + pid: crate::pid_t, + resource: crate::__rlimit_resource_t, + new_limit: *const crate::rlimit, + old_limit: *mut crate::rlimit, + ) -> c_int; pub fn prlimit64( - pid: ::pid_t, - resource: ::__rlimit_resource_t, - new_limit: *const ::rlimit64, - old_limit: *mut ::rlimit64, - ) -> ::c_int; - pub fn utmpname(file: *const ::c_char) -> ::c_int; - pub fn utmpxname(file: *const ::c_char) -> ::c_int; + pid: crate::pid_t, + resource: crate::__rlimit_resource_t, + new_limit: *const crate::rlimit64, + old_limit: *mut crate::rlimit64, + ) -> c_int; + pub fn utmpname(file: *const c_char) -> c_int; + pub fn utmpxname(file: *const c_char) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; pub fn pututxline(ut: *const utmpx) -> *mut utmpx; pub fn setutxent(); pub fn endutxent(); - pub fn getpt() -> ::c_int; - pub fn mallopt(param: ::c_int, value: ::c_int) -> ::c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; - pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; - - pub fn adjtimex(buf: *mut timex) -> ::c_int; - pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; + pub fn getpt() -> c_int; + pub fn mallopt(param: c_int, value: c_int) -> c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; + pub fn getauxval(type_: c_ulong) -> c_ulong; + + pub fn adjtimex(buf: *mut timex) -> c_int; + pub fn ntp_adjtime(buf: *mut timex) -> c_int; #[link_name = "ntp_gettimex"] - pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; - pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int; + pub fn clock_adjtime(clk_id: crate::clockid_t, buf: *mut crate::timex) -> c_int; pub fn fanotify_mark( - fd: ::c_int, - flags: ::c_uint, + fd: c_int, + flags: c_uint, mask: u64, - dirfd: ::c_int, - path: *const ::c_char, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + ) -> c_int; pub fn preadv2( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t, - flags: ::c_int, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + flags: c_int, + ) -> ssize_t; pub fn pwritev2( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t, - flags: ::c_int, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + flags: c_int, + ) -> ssize_t; pub fn preadv64v2( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - flags: ::c_int, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, + flags: c_int, + ) -> ssize_t; pub fn pwritev64v2( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - flags: ::c_int, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, + flags: c_int, + ) -> ssize_t; pub fn renameat2( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - flags: ::c_uint, - ) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + flags: c_uint, + ) -> c_int; // Added in `glibc` 2.25 - pub fn explicit_bzero(s: *mut ::c_void, len: ::size_t); + pub fn explicit_bzero(s: *mut c_void, len: size_t); // Added in `glibc` 2.29 - pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; - pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; - pub fn backtrace(buf: *mut *mut ::c_void, sz: ::c_int) -> ::c_int; + pub fn ctermid(s: *mut c_char) -> *mut c_char; + pub fn backtrace(buf: *mut *mut c_void, sz: c_int) -> c_int; pub fn glob64( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, pglob: *mut glob64_t, - ) -> ::c_int; + ) -> c_int; pub fn globfree64(pglob: *mut glob64_t); - pub fn ptrace(request: ::c_uint, ...) -> ::c_long; + pub fn ptrace(request: c_uint, ...) -> c_long; pub fn pthread_attr_getaffinity_np( - attr: *const ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *mut ::cpu_set_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + cpusetsize: size_t, + cpuset: *mut crate::cpu_set_t, + ) -> c_int; pub fn pthread_attr_setaffinity_np( - attr: *mut ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *const ::cpu_set_t, - ) -> ::c_int; - pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::__priority_which_t, who: ::id_t, prio: ::c_int) -> ::c_int; + attr: *mut crate::pthread_attr_t, + cpusetsize: size_t, + cpuset: *const crate::cpu_set_t, + ) -> c_int; + pub fn getpriority(which: crate::__priority_which_t, who: crate::id_t) -> c_int; + pub fn setpriority(which: crate::__priority_which_t, who: crate::id_t, prio: c_int) -> c_int; pub fn pthread_rwlockattr_getkind_np( - attr: *const ::pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_rwlockattr_t, + val: *mut c_int, + ) -> c_int; pub fn pthread_rwlockattr_setkind_np( - attr: *mut ::pthread_rwlockattr_t, - val: ::c_int, - ) -> ::c_int; - pub fn pthread_sigqueue(thread: ::pthread_t, sig: ::c_int, value: ::sigval) -> ::c_int; - pub fn mallinfo() -> ::mallinfo; - pub fn mallinfo2() -> ::mallinfo2; + attr: *mut crate::pthread_rwlockattr_t, + val: c_int, + ) -> c_int; + pub fn pthread_sigqueue(thread: crate::pthread_t, sig: c_int, value: crate::sigval) -> c_int; + pub fn mallinfo() -> crate::mallinfo; + pub fn mallinfo2() -> crate::mallinfo2; pub fn malloc_stats(); - pub fn malloc_info(options: ::c_int, stream: *mut ::FILE) -> ::c_int; - pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; + pub fn malloc_info(options: c_int, stream: *mut crate::FILE) -> c_int; + pub fn malloc_usable_size(ptr: *mut c_void) -> size_t; pub fn getpwent_r( - pwd: *mut ::passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::passwd, - ) -> ::c_int; + pwd: *mut crate::passwd, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::passwd, + ) -> c_int; pub fn getgrent_r( - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn fgetpwent_r( - stream: *mut ::FILE, - pwd: *mut ::passwd, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::passwd, - ) -> ::c_int; + stream: *mut crate::FILE, + pwd: *mut crate::passwd, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::passwd, + ) -> c_int; pub fn fgetgrent_r( - stream: *mut ::FILE, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + stream: *mut crate::FILE, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; - pub fn putpwent(p: *const ::passwd, stream: *mut ::FILE) -> ::c_int; - pub fn putgrent(grp: *const ::group, stream: *mut ::FILE) -> ::c_int; + pub fn putpwent(p: *const crate::passwd, stream: *mut crate::FILE) -> c_int; + pub fn putgrent(grp: *const crate::group, stream: *mut crate::FILE) -> c_int; - pub fn sethostid(hostid: ::c_long) -> ::c_int; + pub fn sethostid(hostid: c_long) -> c_int; - pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int; - pub fn mlock2(addr: *const ::c_void, len: ::size_t, flags: ::c_uint) -> ::c_int; + pub fn memfd_create(name: *const c_char, flags: c_uint) -> c_int; + pub fn mlock2(addr: *const c_void, len: size_t, flags: c_uint) -> c_int; - pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; - pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; + pub fn euidaccess(pathname: *const c_char, mode: c_int) -> c_int; + pub fn eaccess(pathname: *const c_char, mode: c_int) -> c_int; - pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char; - pub fn ctime_r(timep: *const time_t, buf: *mut ::c_char) -> *mut ::c_char; + pub fn asctime_r(tm: *const crate::tm, buf: *mut c_char) -> *mut c_char; + pub fn ctime_r(timep: *const time_t, buf: *mut c_char) -> *mut c_char; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; + pub fn dirname(path: *mut c_char) -> *mut c_char; /// POSIX version of `basename(3)`, defined in `libgen.h`. #[link_name = "__xpg_basename"] - pub fn posix_basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn posix_basename(path: *mut c_char) -> *mut c_char; /// GNU version of `basename(3)`, defined in `string.h`. #[link_name = "basename"] - pub fn gnu_basename(path: *const ::c_char) -> *mut ::c_char; - pub fn dlmopen(lmid: Lmid_t, filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; - pub fn dlinfo(handle: *mut ::c_void, request: ::c_int, info: *mut ::c_void) -> ::c_int; + pub fn gnu_basename(path: *const c_char) -> *mut c_char; + pub fn dlmopen(lmid: Lmid_t, filename: *const c_char, flag: c_int) -> *mut c_void; + pub fn dlinfo(handle: *mut c_void, request: c_int, info: *mut c_void) -> c_int; pub fn dladdr1( - addr: *const ::c_void, - info: *mut ::Dl_info, - extra_info: *mut *mut ::c_void, - flags: ::c_int, - ) -> ::c_int; - pub fn malloc_trim(__pad: ::size_t) -> ::c_int; - pub fn gnu_get_libc_release() -> *const ::c_char; - pub fn gnu_get_libc_version() -> *const ::c_char; + addr: *const c_void, + info: *mut crate::Dl_info, + extra_info: *mut *mut c_void, + flags: c_int, + ) -> c_int; + pub fn malloc_trim(__pad: size_t) -> c_int; + pub fn gnu_get_libc_release() -> *const c_char; + pub fn gnu_get_libc_version() -> *const c_char; // posix/spawn.h // Added in `glibc` 2.29 pub fn posix_spawn_file_actions_addchdir_np( - actions: *mut ::posix_spawn_file_actions_t, - path: *const ::c_char, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + path: *const c_char, + ) -> c_int; // Added in `glibc` 2.29 pub fn posix_spawn_file_actions_addfchdir_np( - actions: *mut ::posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + fd: c_int, + ) -> c_int; // Added in `glibc` 2.34 pub fn posix_spawn_file_actions_addclosefrom_np( - actions: *mut ::posix_spawn_file_actions_t, - from: ::c_int, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + from: c_int, + ) -> c_int; // Added in `glibc` 2.35 pub fn posix_spawn_file_actions_addtcsetpgrp_np( - actions: *mut ::posix_spawn_file_actions_t, - tcfd: ::c_int, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + tcfd: c_int, + ) -> c_int; // mntent.h pub fn getmntent_r( - stream: *mut ::FILE, - mntbuf: *mut ::mntent, - buf: *mut ::c_char, - buflen: ::c_int, - ) -> *mut ::mntent; + stream: *mut crate::FILE, + mntbuf: *mut crate::mntent, + buf: *mut c_char, + buflen: c_int, + ) -> *mut crate::mntent; pub fn execveat( - dirfd: ::c_int, - pathname: *const ::c_char, + dirfd: c_int, + pathname: *const c_char, argv: *const *mut c_char, envp: *const *mut c_char, - flags: ::c_int, - ) -> ::c_int; + flags: c_int, + ) -> c_int; // Added in `glibc` 2.34 - pub fn close_range(first: ::c_uint, last: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn close_range(first: c_uint, last: c_uint, flags: c_int) -> c_int; - pub fn mq_notify(mqdes: ::mqd_t, sevp: *const ::sigevent) -> ::c_int; + pub fn mq_notify(mqdes: crate::mqd_t, sevp: *const crate::sigevent) -> c_int; pub fn epoll_pwait2( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: *const ::timespec, - sigmask: *const ::sigset_t, - ) -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: *const crate::timespec, + sigmask: *const crate::sigset_t, + ) -> c_int; } cfg_if! { diff --git a/src/unix/linux_like/linux/mod.rs b/src/unix/linux_like/linux/mod.rs index 572e5c5cf5c3c..280ffb59304c3 100644 --- a/src/unix/linux_like/linux/mod.rs +++ b/src/unix/linux_like/linux/mod.rs @@ -2,6 +2,10 @@ use core::mem::size_of; +use crate::{ + c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t, +}; + pub type useconds_t = u32; pub type dev_t = u64; pub type socklen_t = u32; @@ -10,22 +14,22 @@ pub type ino64_t = u64; pub type off64_t = i64; pub type blkcnt64_t = i64; pub type rlim64_t = u64; -pub type mqd_t = ::c_int; -pub type nfds_t = ::c_ulong; -pub type nl_item = ::c_int; -pub type idtype_t = ::c_uint; -pub type loff_t = ::c_longlong; -pub type pthread_key_t = ::c_uint; -pub type pthread_once_t = ::c_int; -pub type pthread_spinlock_t = ::c_int; +pub type mqd_t = c_int; +pub type nfds_t = c_ulong; +pub type nl_item = c_int; +pub type idtype_t = c_uint; +pub type loff_t = c_longlong; +pub type pthread_key_t = c_uint; +pub type pthread_once_t = c_int; +pub type pthread_spinlock_t = c_int; pub type __kernel_fsid_t = __c_anonymous__kernel_fsid_t; -pub type __kernel_clockid_t = ::c_int; +pub type __kernel_clockid_t = c_int; -pub type __u8 = ::c_uchar; -pub type __u16 = ::c_ushort; -pub type __s16 = ::c_short; -pub type __u32 = ::c_uint; -pub type __s32 = ::c_int; +pub type __u8 = c_uchar; +pub type __u16 = c_ushort; +pub type __s16 = c_short; +pub type __u32 = c_uint; +pub type __s32 = c_int; pub type Elf32_Half = u16; pub type Elf32_Word = u32; @@ -66,10 +70,10 @@ pub type pgn_t = u32; pub type priority_t = u8; pub type name_t = u64; -pub type iconv_t = *mut ::c_void; +pub type iconv_t = *mut c_void; // linux/sctp.h -pub type sctp_assoc_t = ::__s32; +pub type sctp_assoc_t = __s32; pub type eventfd_t = u64; missing! { @@ -87,38 +91,38 @@ e! { s! { pub struct glob_t { - pub gl_pathc: ::size_t, + pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, + pub gl_offs: size_t, + pub gl_flags: c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct spwd { - pub sp_namp: *mut ::c_char, - pub sp_pwdp: *mut ::c_char, - pub sp_lstchg: ::c_long, - pub sp_min: ::c_long, - pub sp_max: ::c_long, - pub sp_warn: ::c_long, - pub sp_inact: ::c_long, - pub sp_expire: ::c_long, - pub sp_flag: ::c_ulong, + pub sp_namp: *mut c_char, + pub sp_pwdp: *mut c_char, + pub sp_lstchg: c_long, + pub sp_min: c_long, + pub sp_max: c_long, + pub sp_warn: c_long, + pub sp_inact: c_long, + pub sp_expire: c_long, + pub sp_flag: c_ulong, } pub struct dqblk { @@ -159,138 +163,138 @@ s! { } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct fsid_t { - __val: [::c_int; 2], + __val: [c_int; 2], } pub struct fanout_args { #[cfg(target_endian = "little")] - pub id: ::__u16, - pub type_flags: ::__u16, + pub id: __u16, + pub type_flags: __u16, #[cfg(target_endian = "big")] - pub id: ::__u16, - pub max_num_members: ::__u32, + pub id: __u16, + pub max_num_members: __u32, } pub struct packet_mreq { - pub mr_ifindex: ::c_int, - pub mr_type: ::c_ushort, - pub mr_alen: ::c_ushort, - pub mr_address: [::c_uchar; 8], + pub mr_ifindex: c_int, + pub mr_type: c_ushort, + pub mr_alen: c_ushort, + pub mr_address: [c_uchar; 8], } pub struct sockaddr_pkt { - pub spkt_family: ::c_ushort, - pub spkt_device: [::c_uchar; 14], - pub spkt_protocol: ::c_ushort, + pub spkt_family: c_ushort, + pub spkt_device: [c_uchar; 14], + pub spkt_protocol: c_ushort, } pub struct tpacket_auxdata { - pub tp_status: ::__u32, - pub tp_len: ::__u32, - pub tp_snaplen: ::__u32, - pub tp_mac: ::__u16, - pub tp_net: ::__u16, - pub tp_vlan_tci: ::__u16, - pub tp_vlan_tpid: ::__u16, + pub tp_status: __u32, + pub tp_len: __u32, + pub tp_snaplen: __u32, + pub tp_mac: __u16, + pub tp_net: __u16, + pub tp_vlan_tci: __u16, + pub tp_vlan_tpid: __u16, } pub struct tpacket_hdr { - pub tp_status: ::c_ulong, - pub tp_len: ::c_uint, - pub tp_snaplen: ::c_uint, - pub tp_mac: ::c_ushort, - pub tp_net: ::c_ushort, - pub tp_sec: ::c_uint, - pub tp_usec: ::c_uint, + pub tp_status: c_ulong, + pub tp_len: c_uint, + pub tp_snaplen: c_uint, + pub tp_mac: c_ushort, + pub tp_net: c_ushort, + pub tp_sec: c_uint, + pub tp_usec: c_uint, } pub struct tpacket_hdr_variant1 { - pub tp_rxhash: ::__u32, - pub tp_vlan_tci: ::__u32, - pub tp_vlan_tpid: ::__u16, - pub tp_padding: ::__u16, + pub tp_rxhash: __u32, + pub tp_vlan_tci: __u32, + pub tp_vlan_tpid: __u16, + pub tp_padding: __u16, } pub struct tpacket2_hdr { - pub tp_status: ::__u32, - pub tp_len: ::__u32, - pub tp_snaplen: ::__u32, - pub tp_mac: ::__u16, - pub tp_net: ::__u16, - pub tp_sec: ::__u32, - pub tp_nsec: ::__u32, - pub tp_vlan_tci: ::__u16, - pub tp_vlan_tpid: ::__u16, - pub tp_padding: [::__u8; 4], + pub tp_status: __u32, + pub tp_len: __u32, + pub tp_snaplen: __u32, + pub tp_mac: __u16, + pub tp_net: __u16, + pub tp_sec: __u32, + pub tp_nsec: __u32, + pub tp_vlan_tci: __u16, + pub tp_vlan_tpid: __u16, + pub tp_padding: [__u8; 4], } pub struct tpacket_req { - pub tp_block_size: ::c_uint, - pub tp_block_nr: ::c_uint, - pub tp_frame_size: ::c_uint, - pub tp_frame_nr: ::c_uint, + pub tp_block_size: c_uint, + pub tp_block_nr: c_uint, + pub tp_frame_size: c_uint, + pub tp_frame_nr: c_uint, } pub struct tpacket_req3 { - pub tp_block_size: ::c_uint, - pub tp_block_nr: ::c_uint, - pub tp_frame_size: ::c_uint, - pub tp_frame_nr: ::c_uint, - pub tp_retire_blk_tov: ::c_uint, - pub tp_sizeof_priv: ::c_uint, - pub tp_feature_req_word: ::c_uint, + pub tp_block_size: c_uint, + pub tp_block_nr: c_uint, + pub tp_frame_size: c_uint, + pub tp_frame_nr: c_uint, + pub tp_retire_blk_tov: c_uint, + pub tp_sizeof_priv: c_uint, + pub tp_feature_req_word: c_uint, } #[repr(align(8))] pub struct tpacket_rollover_stats { - pub tp_all: ::__u64, - pub tp_huge: ::__u64, - pub tp_failed: ::__u64, + pub tp_all: crate::__u64, + pub tp_huge: crate::__u64, + pub tp_failed: crate::__u64, } pub struct tpacket_stats { - pub tp_packets: ::c_uint, - pub tp_drops: ::c_uint, + pub tp_packets: c_uint, + pub tp_drops: c_uint, } pub struct tpacket_stats_v3 { - pub tp_packets: ::c_uint, - pub tp_drops: ::c_uint, - pub tp_freeze_q_cnt: ::c_uint, + pub tp_packets: c_uint, + pub tp_drops: c_uint, + pub tp_freeze_q_cnt: c_uint, } pub struct tpacket3_hdr { - pub tp_next_offset: ::__u32, - pub tp_sec: ::__u32, - pub tp_nsec: ::__u32, - pub tp_snaplen: ::__u32, - pub tp_len: ::__u32, - pub tp_status: ::__u32, - pub tp_mac: ::__u16, - pub tp_net: ::__u16, - pub hv1: ::tpacket_hdr_variant1, - pub tp_padding: [::__u8; 8], + pub tp_next_offset: __u32, + pub tp_sec: __u32, + pub tp_nsec: __u32, + pub tp_snaplen: __u32, + pub tp_len: __u32, + pub tp_status: __u32, + pub tp_mac: __u16, + pub tp_net: __u16, + pub hv1: crate::tpacket_hdr_variant1, + pub tp_padding: [__u8; 8], } pub struct tpacket_bd_ts { - pub ts_sec: ::c_uint, - pub ts_usec: ::c_uint, + pub ts_sec: c_uint, + pub ts_usec: c_uint, } #[repr(align(8))] pub struct tpacket_hdr_v1 { - pub block_status: ::__u32, - pub num_pkts: ::__u32, - pub offset_to_first_pkt: ::__u32, - pub blk_len: ::__u32, - pub seq_num: ::__u64, - pub ts_first_pkt: ::tpacket_bd_ts, - pub ts_last_pkt: ::tpacket_bd_ts, + pub block_status: __u32, + pub num_pkts: __u32, + pub offset_to_first_pkt: __u32, + pub blk_len: __u32, + pub seq_num: crate::__u64, + pub ts_first_pkt: crate::tpacket_bd_ts, + pub ts_last_pkt: crate::tpacket_bd_ts, } pub struct cpu_set_t { @@ -301,126 +305,126 @@ s! { } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } // System V IPC pub struct msginfo { - pub msgpool: ::c_int, - pub msgmap: ::c_int, - pub msgmax: ::c_int, - pub msgmnb: ::c_int, - pub msgmni: ::c_int, - pub msgssz: ::c_int, - pub msgtql: ::c_int, - pub msgseg: ::c_ushort, + pub msgpool: c_int, + pub msgmap: c_int, + pub msgmax: c_int, + pub msgmnb: c_int, + pub msgmni: c_int, + pub msgssz: c_int, + pub msgtql: c_int, + pub msgseg: c_ushort, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct input_event { - pub time: ::timeval, - pub type_: ::__u16, - pub code: ::__u16, - pub value: ::__s32, + pub time: crate::timeval, + pub type_: __u16, + pub code: __u16, + pub value: __s32, } pub struct input_id { - pub bustype: ::__u16, - pub vendor: ::__u16, - pub product: ::__u16, - pub version: ::__u16, + pub bustype: __u16, + pub vendor: __u16, + pub product: __u16, + pub version: __u16, } pub struct input_absinfo { - pub value: ::__s32, - pub minimum: ::__s32, - pub maximum: ::__s32, - pub fuzz: ::__s32, - pub flat: ::__s32, - pub resolution: ::__s32, + pub value: __s32, + pub minimum: __s32, + pub maximum: __s32, + pub fuzz: __s32, + pub flat: __s32, + pub resolution: __s32, } pub struct input_keymap_entry { - pub flags: ::__u8, - pub len: ::__u8, - pub index: ::__u16, - pub keycode: ::__u32, - pub scancode: [::__u8; 32], + pub flags: __u8, + pub len: __u8, + pub index: __u16, + pub keycode: __u32, + pub scancode: [__u8; 32], } pub struct input_mask { - pub type_: ::__u32, - pub codes_size: ::__u32, - pub codes_ptr: ::__u64, + pub type_: __u32, + pub codes_size: __u32, + pub codes_ptr: crate::__u64, } pub struct ff_replay { - pub length: ::__u16, - pub delay: ::__u16, + pub length: __u16, + pub delay: __u16, } pub struct ff_trigger { - pub button: ::__u16, - pub interval: ::__u16, + pub button: __u16, + pub interval: __u16, } pub struct ff_envelope { - pub attack_length: ::__u16, - pub attack_level: ::__u16, - pub fade_length: ::__u16, - pub fade_level: ::__u16, + pub attack_length: __u16, + pub attack_level: __u16, + pub fade_length: __u16, + pub fade_level: __u16, } pub struct ff_constant_effect { - pub level: ::__s16, + pub level: __s16, pub envelope: ff_envelope, } pub struct ff_ramp_effect { - pub start_level: ::__s16, - pub end_level: ::__s16, + pub start_level: __s16, + pub end_level: __s16, pub envelope: ff_envelope, } pub struct ff_condition_effect { - pub right_saturation: ::__u16, - pub left_saturation: ::__u16, + pub right_saturation: __u16, + pub left_saturation: __u16, - pub right_coeff: ::__s16, - pub left_coeff: ::__s16, + pub right_coeff: __s16, + pub left_coeff: __s16, - pub deadband: ::__u16, - pub center: ::__s16, + pub deadband: __u16, + pub center: __s16, } pub struct ff_periodic_effect { - pub waveform: ::__u16, - pub period: ::__u16, - pub magnitude: ::__s16, - pub offset: ::__s16, - pub phase: ::__u16, + pub waveform: __u16, + pub period: __u16, + pub magnitude: __s16, + pub offset: __s16, + pub phase: __u16, pub envelope: ff_envelope, - pub custom_len: ::__u32, - pub custom_data: *mut ::__s16, + pub custom_len: __u32, + pub custom_data: *mut __s16, } pub struct ff_rumble_effect { - pub strong_magnitude: ::__u16, - pub weak_magnitude: ::__u16, + pub strong_magnitude: __u16, + pub weak_magnitude: __u16, } pub struct ff_effect { - pub type_: ::__u16, - pub id: ::__s16, - pub direction: ::__u16, + pub type_: __u16, + pub id: __s16, + pub direction: __u16, pub trigger: ff_trigger, pub replay: ff_replay, // FIXME(1.0): this is actually a union @@ -431,20 +435,20 @@ s! { } pub struct uinput_ff_upload { - pub request_id: ::__u32, - pub retval: ::__s32, + pub request_id: __u32, + pub retval: __s32, pub effect: ff_effect, pub old: ff_effect, } pub struct uinput_ff_erase { - pub request_id: ::__u32, - pub retval: ::__s32, - pub effect_id: ::__u32, + pub request_id: __u32, + pub retval: __s32, + pub effect_id: __u32, } pub struct uinput_abs_setup { - pub code: ::__u16, + pub code: __u16, pub absinfo: input_absinfo, } @@ -454,7 +458,7 @@ s! { #[cfg(target_pointer_width = "32")] pub dlpi_addr: Elf32_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, #[cfg(target_pointer_width = "64")] pub dlpi_phdr: *const Elf64_Phdr, @@ -473,17 +477,17 @@ s! { // will probably need including here. tsidea, skrap // QNX (NTO) platform does not define these fields #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] - pub dlpi_adds: ::c_ulonglong, + pub dlpi_adds: crate::c_ulonglong, #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] - pub dlpi_subs: ::c_ulonglong, + pub dlpi_subs: crate::c_ulonglong, #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] - pub dlpi_tls_modid: ::size_t, + pub dlpi_tls_modid: size_t, #[cfg(not(any(target_env = "uclibc", target_os = "nto")))] - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_tls_data: *mut c_void, } pub struct Elf32_Ehdr { - pub e_ident: [::c_uchar; 16], + pub e_ident: [c_uchar; 16], pub e_type: Elf32_Half, pub e_machine: Elf32_Half, pub e_version: Elf32_Word, @@ -500,7 +504,7 @@ s! { } pub struct Elf64_Ehdr { - pub e_ident: [::c_uchar; 16], + pub e_ident: [c_uchar; 16], pub e_type: Elf64_Half, pub e_machine: Elf64_Half, pub e_version: Elf64_Word, @@ -520,15 +524,15 @@ s! { pub st_name: Elf32_Word, pub st_value: Elf32_Addr, pub st_size: Elf32_Word, - pub st_info: ::c_uchar, - pub st_other: ::c_uchar, + pub st_info: c_uchar, + pub st_other: c_uchar, pub st_shndx: Elf32_Section, } pub struct Elf64_Sym { pub st_name: Elf64_Word, - pub st_info: ::c_uchar, - pub st_other: ::c_uchar, + pub st_info: c_uchar, + pub st_other: c_uchar, pub st_shndx: Elf64_Section, pub st_value: Elf64_Addr, pub st_size: Elf64_Xword, @@ -593,42 +597,42 @@ s! { } pub struct __c_anonymous__kernel_fsid_t { - pub val: [::c_int; 2], + pub val: [c_int; 2], } pub struct ucred { - pub pid: ::pid_t, - pub uid: ::uid_t, - pub gid: ::gid_t, + pub pid: crate::pid_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, } pub struct mntent { - pub mnt_fsname: *mut ::c_char, - pub mnt_dir: *mut ::c_char, - pub mnt_type: *mut ::c_char, - pub mnt_opts: *mut ::c_char, - pub mnt_freq: ::c_int, - pub mnt_passno: ::c_int, + pub mnt_fsname: *mut c_char, + pub mnt_dir: *mut c_char, + pub mnt_type: *mut c_char, + pub mnt_opts: *mut c_char, + pub mnt_freq: c_int, + pub mnt_passno: c_int, } pub struct posix_spawn_file_actions_t { - __allocated: ::c_int, - __used: ::c_int, - __actions: *mut ::c_int, - __pad: [::c_int; 16], + __allocated: c_int, + __used: c_int, + __actions: *mut c_int, + __pad: [c_int; 16], } pub struct posix_spawnattr_t { - __flags: ::c_short, - __pgrp: ::pid_t, - __sd: ::sigset_t, - __ss: ::sigset_t, + __flags: c_short, + __pgrp: crate::pid_t, + __sd: crate::sigset_t, + __ss: crate::sigset_t, #[cfg(any(target_env = "musl", target_env = "ohos"))] - __prio: ::c_int, + __prio: c_int, #[cfg(not(any(target_env = "musl", target_env = "ohos")))] - __sp: ::sched_param, - __policy: ::c_int, - __pad: [::c_int; 16], + __sp: crate::sched_param, + __policy: c_int, + __pad: [c_int; 16], } pub struct genlmsghdr { @@ -638,28 +642,28 @@ s! { } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } pub struct arpd_request { - pub req: ::c_ushort, + pub req: c_ushort, pub ip: u32, - pub dev: ::c_ulong, - pub stamp: ::c_ulong, - pub updated: ::c_ulong, - pub ha: [::c_uchar; ::MAX_ADDR_LEN], + pub dev: c_ulong, + pub stamp: c_ulong, + pub updated: c_ulong, + pub ha: [c_uchar; crate::MAX_ADDR_LEN], } pub struct inotify_event { - pub wd: ::c_int, + pub wd: c_int, pub mask: u32, pub cookie: u32, pub len: u32, } pub struct fanotify_response { - pub fd: ::c_int, + pub fd: c_int, pub response: __u32, } @@ -671,15 +675,15 @@ s! { pub struct fanotify_event_info_fid { pub hdr: fanotify_event_info_header, - pub fsid: ::__kernel_fsid_t, - pub handle: [::c_uchar; 0], + pub fsid: crate::__kernel_fsid_t, + pub handle: [c_uchar; 0], } pub struct sockaddr_vm { - pub svm_family: ::sa_family_t, - pub svm_reserved1: ::c_ushort, - pub svm_port: ::c_uint, - pub svm_cid: ::c_uint, + pub svm_family: crate::sa_family_t, + pub svm_reserved1: c_ushort, + pub svm_port: c_uint, + pub svm_cid: c_uint, pub svm_flags: u8, pub svm_zero: [u8; 3], } @@ -728,51 +732,51 @@ s! { // linux/filter.h pub struct sock_filter { - pub code: ::__u16, - pub jt: ::__u8, - pub jf: ::__u8, - pub k: ::__u32, + pub code: __u16, + pub jt: __u8, + pub jf: __u8, + pub k: __u32, } pub struct sock_fprog { - pub len: ::c_ushort, + pub len: c_ushort, pub filter: *mut sock_filter, } // linux/seccomp.h pub struct seccomp_data { - pub nr: ::c_int, - pub arch: ::__u32, - pub instruction_pointer: ::__u64, - pub args: [::__u64; 6], + pub nr: c_int, + pub arch: __u32, + pub instruction_pointer: crate::__u64, + pub args: [crate::__u64; 6], } pub struct seccomp_notif_sizes { - pub seccomp_notif: ::__u16, - pub seccomp_notif_resp: ::__u16, - pub seccomp_data: ::__u16, + pub seccomp_notif: __u16, + pub seccomp_notif_resp: __u16, + pub seccomp_data: __u16, } pub struct seccomp_notif { - pub id: ::__u64, - pub pid: ::__u32, - pub flags: ::__u32, + pub id: crate::__u64, + pub pid: __u32, + pub flags: __u32, pub data: seccomp_data, } pub struct seccomp_notif_resp { - pub id: ::__u64, - pub val: ::__s64, - pub error: ::__s32, - pub flags: ::__u32, + pub id: crate::__u64, + pub val: crate::__s64, + pub error: __s32, + pub flags: __u32, } pub struct seccomp_notif_addfd { - pub id: ::__u64, - pub flags: ::__u32, - pub srcfd: ::__u32, - pub newfd: ::__u32, - pub newfd_flags: ::__u32, + pub id: crate::__u64, + pub flags: __u32, + pub srcfd: __u32, + pub newfd: __u32, + pub newfd_flags: __u32, } pub struct nlmsghdr { @@ -784,7 +788,7 @@ s! { } pub struct nlmsgerr { - pub error: ::c_int, + pub error: c_int, pub msg: nlmsghdr, } @@ -794,59 +798,59 @@ s! { } pub struct file_clone_range { - pub src_fd: ::__s64, - pub src_offset: ::__u64, - pub src_length: ::__u64, - pub dest_offset: ::__u64, + pub src_fd: crate::__s64, + pub src_offset: crate::__u64, + pub src_length: crate::__u64, + pub dest_offset: crate::__u64, } pub struct __c_anonymous_ifru_map { - pub mem_start: ::c_ulong, - pub mem_end: ::c_ulong, - pub base_addr: ::c_ushort, - pub irq: ::c_uchar, - pub dma: ::c_uchar, - pub port: ::c_uchar, + pub mem_start: c_ulong, + pub mem_end: c_ulong, + pub base_addr: c_ushort, + pub irq: c_uchar, + pub dma: c_uchar, + pub port: c_uchar, } pub struct in6_ifreq { - pub ifr6_addr: ::in6_addr, + pub ifr6_addr: crate::in6_addr, pub ifr6_prefixlen: u32, - pub ifr6_ifindex: ::c_int, + pub ifr6_ifindex: c_int, } pub struct option { - pub name: *const ::c_char, - pub has_arg: ::c_int, - pub flag: *mut ::c_int, - pub val: ::c_int, + pub name: *const c_char, + pub has_arg: c_int, + pub flag: *mut c_int, + pub val: c_int, } // linux/openat2.h #[non_exhaustive] pub struct open_how { - pub flags: ::__u64, - pub mode: ::__u64, - pub resolve: ::__u64, + pub flags: crate::__u64, + pub mode: crate::__u64, + pub resolve: crate::__u64, } // linux/ptp_clock.h pub struct ptp_clock_time { - pub sec: ::__s64, - pub nsec: ::__u32, - pub reserved: ::__u32, + pub sec: crate::__s64, + pub nsec: __u32, + pub reserved: __u32, } pub struct ptp_extts_request { - pub index: ::c_uint, - pub flags: ::c_uint, - pub rsv: [::c_uint; 2], + pub index: c_uint, + pub flags: c_uint, + pub rsv: [c_uint; 2], } pub struct ptp_sys_offset_extended { - pub n_samples: ::c_uint, + pub n_samples: c_uint, pub clockid: __kernel_clockid_t, - pub rsv: [::c_uint; 2], + pub rsv: [c_uint; 2], pub ts: [[ptp_clock_time; 3]; PTP_MAX_SAMPLES as usize], } @@ -854,71 +858,71 @@ s! { pub device: ptp_clock_time, pub sys_realtime: ptp_clock_time, pub sys_monoraw: ptp_clock_time, - pub rsv: [::c_uint; 4], + pub rsv: [c_uint; 4], } pub struct ptp_extts_event { pub t: ptp_clock_time, - index: ::c_uint, - flags: ::c_uint, - rsv: [::c_uint; 2], + index: c_uint, + flags: c_uint, + rsv: [c_uint; 2], } // linux/sctp.h pub struct sctp_initmsg { - pub sinit_num_ostreams: ::__u16, - pub sinit_max_instreams: ::__u16, - pub sinit_max_attempts: ::__u16, - pub sinit_max_init_timeo: ::__u16, + pub sinit_num_ostreams: __u16, + pub sinit_max_instreams: __u16, + pub sinit_max_attempts: __u16, + pub sinit_max_init_timeo: __u16, } pub struct sctp_sndrcvinfo { - pub sinfo_stream: ::__u16, - pub sinfo_ssn: ::__u16, - pub sinfo_flags: ::__u16, - pub sinfo_ppid: ::__u32, - pub sinfo_context: ::__u32, - pub sinfo_timetolive: ::__u32, - pub sinfo_tsn: ::__u32, - pub sinfo_cumtsn: ::__u32, - pub sinfo_assoc_id: ::sctp_assoc_t, + pub sinfo_stream: __u16, + pub sinfo_ssn: __u16, + pub sinfo_flags: __u16, + pub sinfo_ppid: __u32, + pub sinfo_context: __u32, + pub sinfo_timetolive: __u32, + pub sinfo_tsn: __u32, + pub sinfo_cumtsn: __u32, + pub sinfo_assoc_id: crate::sctp_assoc_t, } pub struct sctp_sndinfo { - pub snd_sid: ::__u16, - pub snd_flags: ::__u16, - pub snd_ppid: ::__u32, - pub snd_context: ::__u32, - pub snd_assoc_id: ::sctp_assoc_t, + pub snd_sid: __u16, + pub snd_flags: __u16, + pub snd_ppid: __u32, + pub snd_context: __u32, + pub snd_assoc_id: crate::sctp_assoc_t, } pub struct sctp_rcvinfo { - pub rcv_sid: ::__u16, - pub rcv_ssn: ::__u16, - pub rcv_flags: ::__u16, - pub rcv_ppid: ::__u32, - pub rcv_tsn: ::__u32, - pub rcv_cumtsn: ::__u32, - pub rcv_context: ::__u32, - pub rcv_assoc_id: ::sctp_assoc_t, + pub rcv_sid: __u16, + pub rcv_ssn: __u16, + pub rcv_flags: __u16, + pub rcv_ppid: __u32, + pub rcv_tsn: __u32, + pub rcv_cumtsn: __u32, + pub rcv_context: __u32, + pub rcv_assoc_id: crate::sctp_assoc_t, } pub struct sctp_nxtinfo { - pub nxt_sid: ::__u16, - pub nxt_flags: ::__u16, - pub nxt_ppid: ::__u32, - pub nxt_length: ::__u32, - pub nxt_assoc_id: ::sctp_assoc_t, + pub nxt_sid: __u16, + pub nxt_flags: __u16, + pub nxt_ppid: __u32, + pub nxt_length: __u32, + pub nxt_assoc_id: crate::sctp_assoc_t, } pub struct sctp_prinfo { - pub pr_policy: ::__u16, - pub pr_value: ::__u32, + pub pr_policy: __u16, + pub pr_value: __u32, } pub struct sctp_authinfo { - pub auth_keynumber: ::__u16, + pub auth_keynumber: __u16, } pub struct rlimit64 { @@ -929,32 +933,32 @@ s! { // linux/tls.h pub struct tls_crypto_info { - pub version: ::__u16, - pub cipher_type: ::__u16, + pub version: __u16, + pub cipher_type: __u16, } pub struct tls12_crypto_info_aes_gcm_128 { pub info: tls_crypto_info, - pub iv: [::c_uchar; TLS_CIPHER_AES_GCM_128_IV_SIZE], - pub key: [::c_uchar; TLS_CIPHER_AES_GCM_128_KEY_SIZE], - pub salt: [::c_uchar; TLS_CIPHER_AES_GCM_128_SALT_SIZE], - pub rec_seq: [::c_uchar; TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE], + pub iv: [c_uchar; TLS_CIPHER_AES_GCM_128_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_AES_GCM_128_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_AES_GCM_128_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE], } pub struct tls12_crypto_info_aes_gcm_256 { pub info: tls_crypto_info, - pub iv: [::c_uchar; TLS_CIPHER_AES_GCM_256_IV_SIZE], - pub key: [::c_uchar; TLS_CIPHER_AES_GCM_256_KEY_SIZE], - pub salt: [::c_uchar; TLS_CIPHER_AES_GCM_256_SALT_SIZE], - pub rec_seq: [::c_uchar; TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE], + pub iv: [c_uchar; TLS_CIPHER_AES_GCM_256_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_AES_GCM_256_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_AES_GCM_256_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE], } pub struct tls12_crypto_info_chacha20_poly1305 { pub info: tls_crypto_info, - pub iv: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE], - pub key: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE], - pub salt: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE], - pub rec_seq: [::c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE], + pub iv: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE], + pub key: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE], + pub salt: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE], + pub rec_seq: [c_uchar; TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE], } // linux/wireless.h @@ -967,7 +971,7 @@ s! { } pub struct iw_point { - pub pointer: *mut ::c_void, + pub pointer: *mut c_void, pub length: __u16, pub flags: __u16, } @@ -1003,7 +1007,7 @@ s! { pub essid_len: __u8, pub num_channels: __u8, pub flags: __u8, - pub bssid: ::sockaddr, + pub bssid: crate::sockaddr, pub essid: [__u8; IW_ESSID_MAX_SIZE], pub min_channel_time: __u32, pub max_channel_time: __u32, @@ -1014,7 +1018,7 @@ s! { pub ext_flags: __u32, pub tx_seq: [__u8; IW_ENCODE_SEQ_MAX_SIZE], pub rx_seq: [__u8; IW_ENCODE_SEQ_MAX_SIZE], - pub addr: ::sockaddr, + pub addr: crate::sockaddr, pub alg: __u16, pub key_len: __u16, pub key: [__u8; 0], @@ -1022,14 +1026,14 @@ s! { pub struct iw_pmksa { pub cmd: __u32, - pub bssid: ::sockaddr, + pub bssid: crate::sockaddr, pub pmkid: [__u8; IW_PMKID_LEN], } pub struct iw_pmkid_cand { pub flags: __u32, pub index: __u32, - pub bssid: ::sockaddr, + pub bssid: crate::sockaddr, } pub struct iw_statistics { @@ -1089,7 +1093,7 @@ s! { pub cmd: __u32, pub set_args: __u16, pub get_args: __u16, - pub name: [c_char; ::IFNAMSIZ], + pub name: [c_char; crate::IFNAMSIZ], } // #include @@ -1135,7 +1139,7 @@ s! { )] pub struct pthread_mutexattr_t { #[doc(hidden)] - size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], } #[cfg_attr( @@ -1152,19 +1156,19 @@ s! { )] pub struct pthread_rwlockattr_t { #[doc(hidden)] - size: [u8; ::__SIZEOF_PTHREAD_RWLOCKATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCKATTR_T], } #[repr(align(4))] pub struct pthread_condattr_t { #[doc(hidden)] - size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], } #[repr(align(4))] pub struct pthread_barrierattr_t { #[doc(hidden)] - size: [u8; ::__SIZEOF_PTHREAD_BARRIERATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_BARRIERATTR_T], } #[repr(align(8))] @@ -1174,57 +1178,57 @@ s! { pub reserved: __u8, pub metadata_len: __u16, pub mask: __u64, - pub fd: ::c_int, - pub pid: ::c_int, + pub fd: c_int, + pub pid: c_int, } // linux/ptp_clock.h pub struct ptp_sys_offset { - pub n_samples: ::c_uint, - pub rsv: [::c_uint; 3], + pub n_samples: c_uint, + pub rsv: [c_uint; 3], // FIXME(garando): replace length with `2 * PTP_MAX_SAMPLES + 1` when supported pub ts: [ptp_clock_time; 51], } pub struct ptp_pin_desc { - pub name: [::c_char; 64], - pub index: ::c_uint, - pub func: ::c_uint, - pub chan: ::c_uint, - pub rsv: [::c_uint; 5], + pub name: [c_char; 64], + pub index: c_uint, + pub func: c_uint, + pub chan: c_uint, + pub rsv: [c_uint; 5], } pub struct ptp_clock_caps { - pub max_adj: ::c_int, - pub n_alarm: ::c_int, - pub n_ext_ts: ::c_int, - pub n_per_out: ::c_int, - pub pps: ::c_int, - pub n_pins: ::c_int, - pub cross_timestamping: ::c_int, - pub adjust_phase: ::c_int, - pub max_phase_adj: ::c_int, - pub rsv: [::c_int; 11], + pub max_adj: c_int, + pub n_alarm: c_int, + pub n_ext_ts: c_int, + pub n_per_out: c_int, + pub pps: c_int, + pub n_pins: c_int, + pub cross_timestamping: c_int, + pub adjust_phase: c_int, + pub max_phase_adj: c_int, + pub rsv: [c_int; 11], } // linux/if_xdp.h pub struct xsk_tx_metadata_completion { - pub tx_timestamp: ::__u64, + pub tx_timestamp: crate::__u64, } pub struct xsk_tx_metadata_request { - pub csum_start: ::__u16, - pub csum_offset: ::__u16, + pub csum_start: __u16, + pub csum_offset: __u16, } // linux/mount.h pub struct mount_attr { - pub attr_set: ::__u64, - pub attr_clr: ::__u64, - pub propagation: ::__u64, - pub userns_fd: ::__u64, + pub attr_set: crate::__u64, + pub attr_clr: crate::__u64, + pub propagation: crate::__u64, + pub userns_fd: crate::__u64, } } @@ -1232,7 +1236,7 @@ cfg_if! { if #[cfg(not(target_arch = "sparc64"))] { s! { pub struct iw_thrspy { - pub addr: ::sockaddr, + pub addr: crate::sockaddr, pub qual: iw_quality, pub low: iw_quality, pub high: iw_quality, @@ -1241,12 +1245,12 @@ cfg_if! { pub struct iw_mlme { pub cmd: __u16, pub reason_code: __u16, - pub addr: ::sockaddr, + pub addr: crate::sockaddr, } pub struct iw_michaelmicfailure { pub flags: __u32, - pub src_addr: ::sockaddr, + pub src_addr: crate::sockaddr, pub tsc: [__u8; IW_ENCODE_SEQ_MAX_SIZE], } @@ -1267,48 +1271,48 @@ cfg_if! { s_no_extra_traits! { pub struct sockaddr_nl { - pub nl_family: ::sa_family_t, - nl_pad: ::c_ushort, + pub nl_family: crate::sa_family_t, + nl_pad: c_ushort, pub nl_pid: u32, pub nl_groups: u32, } pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_ino: crate::ino_t, + pub d_off: off_t, + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct sockaddr_alg { - pub salg_family: ::sa_family_t, - pub salg_type: [::c_uchar; 14], + pub salg_family: crate::sa_family_t, + pub salg_type: [c_uchar; 14], pub salg_feat: u32, pub salg_mask: u32, - pub salg_name: [::c_uchar; 64], + pub salg_name: [c_uchar; 64], } pub struct uinput_setup { pub id: input_id, - pub name: [::c_char; UINPUT_MAX_NAME_SIZE], - pub ff_effects_max: ::__u32, + pub name: [c_char; UINPUT_MAX_NAME_SIZE], + pub ff_effects_max: __u32, } pub struct uinput_user_dev { - pub name: [::c_char; UINPUT_MAX_NAME_SIZE], + pub name: [c_char; UINPUT_MAX_NAME_SIZE], pub id: input_id, - pub ff_effects_max: ::__u32, - pub absmax: [::__s32; ABS_CNT], - pub absmin: [::__s32; ABS_CNT], - pub absfuzz: [::__s32; ABS_CNT], - pub absflat: [::__s32; ABS_CNT], + pub ff_effects_max: __u32, + pub absmax: [__s32; ABS_CNT], + pub absmin: [__s32; ABS_CNT], + pub absfuzz: [__s32; ABS_CNT], + pub absflat: [__s32; ABS_CNT], } #[allow(missing_debug_implementations)] pub struct af_alg_iv { pub ivlen: u32, - pub iv: [::c_uchar; 0], + pub iv: [c_uchar; 0], } // x32 compatibility @@ -1326,93 +1330,93 @@ s_no_extra_traits! { pad: [i64; 4], #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_flags: ::c_long, + pub mq_flags: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_maxmsg: ::c_long, + pub mq_maxmsg: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_msgsize: ::c_long, + pub mq_msgsize: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub mq_curmsgs: ::c_long, + pub mq_curmsgs: c_long, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pad: [::c_long; 4], + pad: [c_long; 4], } pub union __c_anonymous_ifr_ifru { - pub ifru_addr: ::sockaddr, - pub ifru_dstaddr: ::sockaddr, - pub ifru_broadaddr: ::sockaddr, - pub ifru_netmask: ::sockaddr, - pub ifru_hwaddr: ::sockaddr, - pub ifru_flags: ::c_short, - pub ifru_ifindex: ::c_int, - pub ifru_metric: ::c_int, - pub ifru_mtu: ::c_int, + pub ifru_addr: crate::sockaddr, + pub ifru_dstaddr: crate::sockaddr, + pub ifru_broadaddr: crate::sockaddr, + pub ifru_netmask: crate::sockaddr, + pub ifru_hwaddr: crate::sockaddr, + pub ifru_flags: c_short, + pub ifru_ifindex: c_int, + pub ifru_metric: c_int, + pub ifru_mtu: c_int, pub ifru_map: __c_anonymous_ifru_map, - pub ifru_slave: [::c_char; ::IFNAMSIZ], - pub ifru_newname: [::c_char; ::IFNAMSIZ], - pub ifru_data: *mut ::c_char, + pub ifru_slave: [c_char; crate::IFNAMSIZ], + pub ifru_newname: [c_char; crate::IFNAMSIZ], + pub ifru_data: *mut c_char, } pub struct ifreq { /// interface name, e.g. "en0" - pub ifr_name: [::c_char; ::IFNAMSIZ], + pub ifr_name: [c_char; crate::IFNAMSIZ], pub ifr_ifru: __c_anonymous_ifr_ifru, } pub union __c_anonymous_ifc_ifcu { - pub ifcu_buf: *mut ::c_char, - pub ifcu_req: *mut ::ifreq, + pub ifcu_buf: *mut c_char, + pub ifcu_req: *mut crate::ifreq, } /// Structure used in SIOCGIFCONF request. Used to retrieve interface configuration for /// machine (useful for programs which must know all networks accessible). pub struct ifconf { /// Size of buffer - pub ifc_len: ::c_int, + pub ifc_len: c_int, pub ifc_ifcu: __c_anonymous_ifc_ifcu, } pub struct hwtstamp_config { - pub flags: ::c_int, - pub tx_type: ::c_int, - pub rx_filter: ::c_int, + pub flags: c_int, + pub tx_type: c_int, + pub rx_filter: c_int, } pub struct dirent64 { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_ino: crate::ino64_t, + pub d_off: off64_t, + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct sched_attr { - pub size: ::__u32, - pub sched_policy: ::__u32, - pub sched_flags: ::__u64, - pub sched_nice: ::__s32, - pub sched_priority: ::__u32, - pub sched_runtime: ::__u64, - pub sched_deadline: ::__u64, - pub sched_period: ::__u64, + pub size: __u32, + pub sched_policy: __u32, + pub sched_flags: crate::__u64, + pub sched_nice: __s32, + pub sched_priority: __u32, + pub sched_runtime: crate::__u64, + pub sched_deadline: crate::__u64, + pub sched_period: crate::__u64, } #[allow(missing_debug_implementations)] pub union tpacket_req_u { - pub req: ::tpacket_req, - pub req3: ::tpacket_req3, + pub req: crate::tpacket_req, + pub req3: crate::tpacket_req3, } #[allow(missing_debug_implementations)] pub union tpacket_bd_header_u { - pub bh1: ::tpacket_hdr_v1, + pub bh1: crate::tpacket_hdr_v1, } #[allow(missing_debug_implementations)] pub struct tpacket_block_desc { - pub version: ::__u32, - pub offset_to_priv: ::__u32, - pub hdr: ::tpacket_bd_header_u, + pub version: __u32, + pub offset_to_priv: __u32, + pub hdr: crate::tpacket_bd_header_u, } #[cfg_attr( @@ -1445,7 +1449,7 @@ s_no_extra_traits! { )] pub struct pthread_cond_t { #[doc(hidden)] - size: [u8; ::__SIZEOF_PTHREAD_COND_T], + size: [u8; crate::__SIZEOF_PTHREAD_COND_T], } #[cfg_attr( @@ -1486,7 +1490,7 @@ s_no_extra_traits! { )] pub struct pthread_mutex_t { #[doc(hidden)] - size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEX_T], } #[cfg_attr( @@ -1525,7 +1529,7 @@ s_no_extra_traits! { repr(align(8)) )] pub struct pthread_rwlock_t { - size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T], } #[cfg_attr( @@ -1565,14 +1569,14 @@ s_no_extra_traits! { repr(align(8)) )] pub struct pthread_barrier_t { - size: [u8; ::__SIZEOF_PTHREAD_BARRIER_T], + size: [u8; crate::__SIZEOF_PTHREAD_BARRIER_T], } // linux/net_tstamp.h #[allow(missing_debug_implementations)] pub struct sock_txtime { - pub clockid: ::clockid_t, - pub flags: ::__u32, + pub clockid: crate::clockid_t, + pub flags: __u32, } // linux/can.h @@ -1618,14 +1622,14 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct sockaddr_can { - pub can_family: ::sa_family_t, - pub can_ifindex: ::c_int, + pub can_family: crate::sa_family_t, + pub can_ifindex: c_int, pub can_addr: __c_anonymous_sockaddr_can_can_addr, } // linux/wireless.h pub union iwreq_data { - pub name: [c_char; ::IFNAMSIZ], + pub name: [c_char; crate::IFNAMSIZ], pub essid: iw_point, pub nwid: iw_param, pub freq: iw_freq, @@ -1639,8 +1643,8 @@ s_no_extra_traits! { pub encoding: iw_point, pub power: iw_param, pub qual: iw_quality, - pub ap_addr: ::sockaddr, - pub addr: ::sockaddr, + pub ap_addr: crate::sockaddr, + pub addr: crate::sockaddr, pub param: iw_param, pub data: iw_point, } @@ -1652,7 +1656,7 @@ s_no_extra_traits! { } pub union __c_anonymous_iwreq { - pub ifrn_name: [c_char; ::IFNAMSIZ], + pub ifrn_name: [c_char; crate::IFNAMSIZ], } pub struct iwreq { @@ -1670,22 +1674,22 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] pub union __c_anonymous_ptp_perout_request_2 { pub on: ptp_clock_time, - pub rsv: [::c_uint; 4], + pub rsv: [c_uint; 4], } #[allow(missing_debug_implementations)] pub struct ptp_perout_request { pub anonymous_1: __c_anonymous_ptp_perout_request_1, pub period: ptp_clock_time, - pub index: ::c_uint, - pub flags: ::c_uint, + pub index: c_uint, + pub flags: c_uint, pub anonymous_2: __c_anonymous_ptp_perout_request_2, } // linux/if_xdp.h #[allow(missing_debug_implementations)] pub struct xsk_tx_metadata { - pub flags: ::__u64, + pub flags: crate::__u64, pub xsk_tx_metadata_union: __c_anonymous_xsk_tx_metadata_union, } @@ -1706,8 +1710,8 @@ cfg_if! { } } impl Eq for sockaddr_nl {} - impl ::fmt::Debug for sockaddr_nl { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_nl { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_nl") .field("nl_family", &self.nl_family) .field("nl_pid", &self.nl_pid) @@ -1715,8 +1719,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_nl { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_nl { + fn hash(&self, state: &mut H) { self.nl_family.hash(state); self.nl_pid.hash(state); self.nl_groups.hash(state); @@ -1739,8 +1743,8 @@ cfg_if! { impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -1751,8 +1755,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -1777,8 +1781,8 @@ cfg_if! { impl Eq for dirent64 {} - impl ::fmt::Debug for dirent64 { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent64 { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent64") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -1789,8 +1793,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent64 { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent64 { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -1807,16 +1811,16 @@ cfg_if! { impl Eq for pthread_cond_t {} - impl ::fmt::Debug for pthread_cond_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_cond_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_cond_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_cond_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_cond_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1829,16 +1833,16 @@ cfg_if! { impl Eq for pthread_mutex_t {} - impl ::fmt::Debug for pthread_mutex_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_mutex_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_mutex_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_mutex_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_mutex_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1851,16 +1855,16 @@ cfg_if! { impl Eq for pthread_rwlock_t {} - impl ::fmt::Debug for pthread_rwlock_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_rwlock_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_rwlock_t") // FIXME: .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_rwlock_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_rwlock_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1873,16 +1877,16 @@ cfg_if! { impl Eq for pthread_barrier_t {} - impl ::fmt::Debug for pthread_barrier_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_barrier_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_barrier_t") .field("size", &self.size) .finish() } } - impl ::hash::Hash for pthread_barrier_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pthread_barrier_t { + fn hash(&self, state: &mut H) { self.size.hash(state); } } @@ -1907,8 +1911,8 @@ cfg_if! { impl Eq for sockaddr_alg {} - impl ::fmt::Debug for sockaddr_alg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_alg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_alg") .field("salg_family", &self.salg_family) .field("salg_type", &self.salg_type) @@ -1919,8 +1923,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_alg { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_alg { + fn hash(&self, state: &mut H) { self.salg_family.hash(state); self.salg_type.hash(state); self.salg_feat.hash(state); @@ -1938,8 +1942,8 @@ cfg_if! { } impl Eq for uinput_setup {} - impl ::fmt::Debug for uinput_setup { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for uinput_setup { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uinput_setup") .field("id", &self.id) .field("name", &&self.name[..]) @@ -1948,8 +1952,8 @@ cfg_if! { } } - impl ::hash::Hash for uinput_setup { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for uinput_setup { + fn hash(&self, state: &mut H) { self.id.hash(state); self.name.hash(state); self.ff_effects_max.hash(state); @@ -1969,8 +1973,8 @@ cfg_if! { } impl Eq for uinput_user_dev {} - impl ::fmt::Debug for uinput_user_dev { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for uinput_user_dev { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("uinput_setup") .field("name", &&self.name[..]) .field("id", &self.id) @@ -1983,8 +1987,8 @@ cfg_if! { } } - impl ::hash::Hash for uinput_user_dev { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for uinput_user_dev { + fn hash(&self, state: &mut H) { self.name.hash(state); self.id.hash(state); self.ff_effects_max.hash(state); @@ -2004,8 +2008,8 @@ cfg_if! { } } impl Eq for mq_attr {} - impl ::fmt::Debug for mq_attr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mq_attr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mq_attr") .field("mq_flags", &self.mq_flags) .field("mq_maxmsg", &self.mq_maxmsg) @@ -2014,16 +2018,16 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mq_attr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mq_attr { + fn hash(&self, state: &mut H) { self.mq_flags.hash(state); self.mq_maxmsg.hash(state); self.mq_msgsize.hash(state); self.mq_curmsgs.hash(state); } } - impl ::fmt::Debug for __c_anonymous_ifr_ifru { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifr_ifru { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifr_ifru") .field("ifru_addr", unsafe { &self.ifru_addr }) .field("ifru_dstaddr", unsafe { &self.ifru_dstaddr }) @@ -2041,8 +2045,8 @@ cfg_if! { .finish() } } - impl ::fmt::Debug for ifreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifreq") .field("ifr_name", &self.ifr_name) .field("ifr_ifru", &self.ifr_ifru) @@ -2050,24 +2054,24 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_ifc_ifcu { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_ifc_ifcu { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifr_ifru") .field("ifcu_buf", unsafe { &self.ifcu_buf }) .field("ifcu_req", unsafe { &self.ifcu_req }) .finish() } } - impl ::fmt::Debug for ifconf { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ifconf { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ifconf") .field("ifc_len", &self.ifc_len) .field("ifc_ifcu", &self.ifc_ifcu) .finish() } } - impl ::fmt::Debug for hwtstamp_config { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for hwtstamp_config { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("hwtstamp_config") .field("flags", &self.flags) .field("tx_type", &self.tx_type) @@ -2083,16 +2087,16 @@ cfg_if! { } } impl Eq for hwtstamp_config {} - impl ::hash::Hash for hwtstamp_config { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for hwtstamp_config { + fn hash(&self, state: &mut H) { self.flags.hash(state); self.tx_type.hash(state); self.rx_filter.hash(state); } } - impl ::fmt::Debug for sched_attr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sched_attr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sched_attr") .field("size", &self.size) .field("sched_policy", &self.sched_policy) @@ -2118,8 +2122,8 @@ cfg_if! { } } impl Eq for sched_attr {} - impl ::hash::Hash for sched_attr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sched_attr { + fn hash(&self, state: &mut H) { self.size.hash(state); self.sched_policy.hash(state); self.sched_flags.hash(state); @@ -2131,8 +2135,8 @@ cfg_if! { } } - impl ::fmt::Debug for iwreq_data { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for iwreq_data { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("iwreq_data") .field("name", unsafe { &self.name }) .field("essid", unsafe { &self.essid }) @@ -2156,8 +2160,8 @@ cfg_if! { } } - impl ::fmt::Debug for iw_event { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for iw_event { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("iw_event") .field("len", &self.len) .field("cmd", &self.cmd) @@ -2166,16 +2170,16 @@ cfg_if! { } } - impl ::fmt::Debug for __c_anonymous_iwreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_iwreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("__c_anonymous_iwreq") .field("ifrn_name", unsafe { &self.ifrn_name }) .finish() } } - impl ::fmt::Debug for iwreq { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for iwreq { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("iwreq") .field("ifr_ifrn", &self.ifr_ifrn) .field("u", &self.u) @@ -2191,8 +2195,8 @@ cfg_if! { any(target_arch = "x86_64", target_arch = "x86") ))] { extern "C" { - pub fn iopl(level: ::c_int) -> ::c_int; - pub fn ioperm(from: ::c_ulong, num: ::c_ulong, turn_on: ::c_int) -> ::c_int; + pub fn iopl(level: c_int) -> c_int; + pub fn ioperm(from: c_ulong, num: c_ulong, turn_on: c_int) -> c_int; } } } @@ -2203,280 +2207,280 @@ cfg_if! { target_env = "musl", target_env = "ohos" ))] { - pub const ABDAY_1: ::nl_item = 0x20000; - pub const ABDAY_2: ::nl_item = 0x20001; - pub const ABDAY_3: ::nl_item = 0x20002; - pub const ABDAY_4: ::nl_item = 0x20003; - pub const ABDAY_5: ::nl_item = 0x20004; - pub const ABDAY_6: ::nl_item = 0x20005; - pub const ABDAY_7: ::nl_item = 0x20006; - - pub const DAY_1: ::nl_item = 0x20007; - pub const DAY_2: ::nl_item = 0x20008; - pub const DAY_3: ::nl_item = 0x20009; - pub const DAY_4: ::nl_item = 0x2000A; - pub const DAY_5: ::nl_item = 0x2000B; - pub const DAY_6: ::nl_item = 0x2000C; - pub const DAY_7: ::nl_item = 0x2000D; - - pub const ABMON_1: ::nl_item = 0x2000E; - pub const ABMON_2: ::nl_item = 0x2000F; - pub const ABMON_3: ::nl_item = 0x20010; - pub const ABMON_4: ::nl_item = 0x20011; - pub const ABMON_5: ::nl_item = 0x20012; - pub const ABMON_6: ::nl_item = 0x20013; - pub const ABMON_7: ::nl_item = 0x20014; - pub const ABMON_8: ::nl_item = 0x20015; - pub const ABMON_9: ::nl_item = 0x20016; - pub const ABMON_10: ::nl_item = 0x20017; - pub const ABMON_11: ::nl_item = 0x20018; - pub const ABMON_12: ::nl_item = 0x20019; - - pub const MON_1: ::nl_item = 0x2001A; - pub const MON_2: ::nl_item = 0x2001B; - pub const MON_3: ::nl_item = 0x2001C; - pub const MON_4: ::nl_item = 0x2001D; - pub const MON_5: ::nl_item = 0x2001E; - pub const MON_6: ::nl_item = 0x2001F; - pub const MON_7: ::nl_item = 0x20020; - pub const MON_8: ::nl_item = 0x20021; - pub const MON_9: ::nl_item = 0x20022; - pub const MON_10: ::nl_item = 0x20023; - pub const MON_11: ::nl_item = 0x20024; - pub const MON_12: ::nl_item = 0x20025; - - pub const AM_STR: ::nl_item = 0x20026; - pub const PM_STR: ::nl_item = 0x20027; - - pub const D_T_FMT: ::nl_item = 0x20028; - pub const D_FMT: ::nl_item = 0x20029; - pub const T_FMT: ::nl_item = 0x2002A; - pub const T_FMT_AMPM: ::nl_item = 0x2002B; - - pub const ERA: ::nl_item = 0x2002C; - pub const ERA_D_FMT: ::nl_item = 0x2002E; - pub const ALT_DIGITS: ::nl_item = 0x2002F; - pub const ERA_D_T_FMT: ::nl_item = 0x20030; - pub const ERA_T_FMT: ::nl_item = 0x20031; - - pub const CODESET: ::nl_item = 14; - pub const CRNCYSTR: ::nl_item = 0x4000F; - pub const RADIXCHAR: ::nl_item = 0x10000; - pub const THOUSEP: ::nl_item = 0x10001; - pub const YESEXPR: ::nl_item = 0x50000; - pub const NOEXPR: ::nl_item = 0x50001; - pub const YESSTR: ::nl_item = 0x50002; - pub const NOSTR: ::nl_item = 0x50003; + pub const ABDAY_1: crate::nl_item = 0x20000; + pub const ABDAY_2: crate::nl_item = 0x20001; + pub const ABDAY_3: crate::nl_item = 0x20002; + pub const ABDAY_4: crate::nl_item = 0x20003; + pub const ABDAY_5: crate::nl_item = 0x20004; + pub const ABDAY_6: crate::nl_item = 0x20005; + pub const ABDAY_7: crate::nl_item = 0x20006; + + pub const DAY_1: crate::nl_item = 0x20007; + pub const DAY_2: crate::nl_item = 0x20008; + pub const DAY_3: crate::nl_item = 0x20009; + pub const DAY_4: crate::nl_item = 0x2000A; + pub const DAY_5: crate::nl_item = 0x2000B; + pub const DAY_6: crate::nl_item = 0x2000C; + pub const DAY_7: crate::nl_item = 0x2000D; + + pub const ABMON_1: crate::nl_item = 0x2000E; + pub const ABMON_2: crate::nl_item = 0x2000F; + pub const ABMON_3: crate::nl_item = 0x20010; + pub const ABMON_4: crate::nl_item = 0x20011; + pub const ABMON_5: crate::nl_item = 0x20012; + pub const ABMON_6: crate::nl_item = 0x20013; + pub const ABMON_7: crate::nl_item = 0x20014; + pub const ABMON_8: crate::nl_item = 0x20015; + pub const ABMON_9: crate::nl_item = 0x20016; + pub const ABMON_10: crate::nl_item = 0x20017; + pub const ABMON_11: crate::nl_item = 0x20018; + pub const ABMON_12: crate::nl_item = 0x20019; + + pub const MON_1: crate::nl_item = 0x2001A; + pub const MON_2: crate::nl_item = 0x2001B; + pub const MON_3: crate::nl_item = 0x2001C; + pub const MON_4: crate::nl_item = 0x2001D; + pub const MON_5: crate::nl_item = 0x2001E; + pub const MON_6: crate::nl_item = 0x2001F; + pub const MON_7: crate::nl_item = 0x20020; + pub const MON_8: crate::nl_item = 0x20021; + pub const MON_9: crate::nl_item = 0x20022; + pub const MON_10: crate::nl_item = 0x20023; + pub const MON_11: crate::nl_item = 0x20024; + pub const MON_12: crate::nl_item = 0x20025; + + pub const AM_STR: crate::nl_item = 0x20026; + pub const PM_STR: crate::nl_item = 0x20027; + + pub const D_T_FMT: crate::nl_item = 0x20028; + pub const D_FMT: crate::nl_item = 0x20029; + pub const T_FMT: crate::nl_item = 0x2002A; + pub const T_FMT_AMPM: crate::nl_item = 0x2002B; + + pub const ERA: crate::nl_item = 0x2002C; + pub const ERA_D_FMT: crate::nl_item = 0x2002E; + pub const ALT_DIGITS: crate::nl_item = 0x2002F; + pub const ERA_D_T_FMT: crate::nl_item = 0x20030; + pub const ERA_T_FMT: crate::nl_item = 0x20031; + + pub const CODESET: crate::nl_item = 14; + pub const CRNCYSTR: crate::nl_item = 0x4000F; + pub const RADIXCHAR: crate::nl_item = 0x10000; + pub const THOUSEP: crate::nl_item = 0x10001; + pub const YESEXPR: crate::nl_item = 0x50000; + pub const NOEXPR: crate::nl_item = 0x50001; + pub const YESSTR: crate::nl_item = 0x50002; + pub const NOSTR: crate::nl_item = 0x50003; } } -pub const RUSAGE_CHILDREN: ::c_int = -1; -pub const L_tmpnam: ::c_uint = 20; -pub const _PC_LINK_MAX: ::c_int = 0; -pub const _PC_MAX_CANON: ::c_int = 1; -pub const _PC_MAX_INPUT: ::c_int = 2; -pub const _PC_NAME_MAX: ::c_int = 3; -pub const _PC_PATH_MAX: ::c_int = 4; -pub const _PC_PIPE_BUF: ::c_int = 5; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 6; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_SYNC_IO: ::c_int = 9; -pub const _PC_ASYNC_IO: ::c_int = 10; -pub const _PC_PRIO_IO: ::c_int = 11; -pub const _PC_SOCK_MAXBUF: ::c_int = 12; -pub const _PC_FILESIZEBITS: ::c_int = 13; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18; -pub const _PC_SYMLINK_MAX: ::c_int = 19; -pub const _PC_2_SYMLINKS: ::c_int = 20; - -pub const MS_NOUSER: ::c_ulong = 0xffffffff80000000; - -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; -pub const _SC_JOB_CONTROL: ::c_int = 7; -pub const _SC_SAVED_IDS: ::c_int = 8; -pub const _SC_REALTIME_SIGNALS: ::c_int = 9; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 10; -pub const _SC_TIMERS: ::c_int = 11; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 12; -pub const _SC_PRIORITIZED_IO: ::c_int = 13; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 14; -pub const _SC_FSYNC: ::c_int = 15; -pub const _SC_MAPPED_FILES: ::c_int = 16; -pub const _SC_MEMLOCK: ::c_int = 17; -pub const _SC_MEMLOCK_RANGE: ::c_int = 18; -pub const _SC_MEMORY_PROTECTION: ::c_int = 19; -pub const _SC_MESSAGE_PASSING: ::c_int = 20; -pub const _SC_SEMAPHORES: ::c_int = 21; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 22; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 23; -pub const _SC_AIO_MAX: ::c_int = 24; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 25; -pub const _SC_DELAYTIMER_MAX: ::c_int = 26; -pub const _SC_MQ_OPEN_MAX: ::c_int = 27; -pub const _SC_MQ_PRIO_MAX: ::c_int = 28; -pub const _SC_VERSION: ::c_int = 29; -pub const _SC_PAGESIZE: ::c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_RTSIG_MAX: ::c_int = 31; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 32; -pub const _SC_SEM_VALUE_MAX: ::c_int = 33; -pub const _SC_SIGQUEUE_MAX: ::c_int = 34; -pub const _SC_TIMER_MAX: ::c_int = 35; -pub const _SC_BC_BASE_MAX: ::c_int = 36; -pub const _SC_BC_DIM_MAX: ::c_int = 37; -pub const _SC_BC_SCALE_MAX: ::c_int = 38; -pub const _SC_BC_STRING_MAX: ::c_int = 39; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 40; -pub const _SC_EXPR_NEST_MAX: ::c_int = 42; -pub const _SC_LINE_MAX: ::c_int = 43; -pub const _SC_RE_DUP_MAX: ::c_int = 44; -pub const _SC_2_VERSION: ::c_int = 46; -pub const _SC_2_C_BIND: ::c_int = 47; -pub const _SC_2_C_DEV: ::c_int = 48; -pub const _SC_2_FORT_DEV: ::c_int = 49; -pub const _SC_2_FORT_RUN: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_LOCALEDEF: ::c_int = 52; -pub const _SC_UIO_MAXIOV: ::c_int = 60; -pub const _SC_IOV_MAX: ::c_int = 60; -pub const _SC_THREADS: ::c_int = 67; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 68; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 69; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 70; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; -pub const _SC_TTY_NAME_MAX: ::c_int = 72; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 73; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 74; -pub const _SC_THREAD_STACK_MIN: ::c_int = 75; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 76; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 77; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 78; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 79; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 80; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 81; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 82; -pub const _SC_NPROCESSORS_CONF: ::c_int = 83; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 84; -pub const _SC_PHYS_PAGES: ::c_int = 85; -pub const _SC_AVPHYS_PAGES: ::c_int = 86; -pub const _SC_ATEXIT_MAX: ::c_int = 87; -pub const _SC_PASS_MAX: ::c_int = 88; -pub const _SC_XOPEN_VERSION: ::c_int = 89; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 90; -pub const _SC_XOPEN_UNIX: ::c_int = 91; -pub const _SC_XOPEN_CRYPT: ::c_int = 92; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 93; -pub const _SC_XOPEN_SHM: ::c_int = 94; -pub const _SC_2_CHAR_TERM: ::c_int = 95; -pub const _SC_2_UPE: ::c_int = 97; -pub const _SC_XOPEN_XPG2: ::c_int = 98; -pub const _SC_XOPEN_XPG3: ::c_int = 99; -pub const _SC_XOPEN_XPG4: ::c_int = 100; -pub const _SC_NZERO: ::c_int = 109; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 125; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 126; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 127; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 128; -pub const _SC_XOPEN_LEGACY: ::c_int = 129; -pub const _SC_XOPEN_REALTIME: ::c_int = 130; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 131; -pub const _SC_ADVISORY_INFO: ::c_int = 132; -pub const _SC_BARRIERS: ::c_int = 133; -pub const _SC_CLOCK_SELECTION: ::c_int = 137; -pub const _SC_CPUTIME: ::c_int = 138; -pub const _SC_THREAD_CPUTIME: ::c_int = 139; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 149; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 153; -pub const _SC_SPIN_LOCKS: ::c_int = 154; -pub const _SC_REGEXP: ::c_int = 155; -pub const _SC_SHELL: ::c_int = 157; -pub const _SC_SPAWN: ::c_int = 159; -pub const _SC_SPORADIC_SERVER: ::c_int = 160; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 161; -pub const _SC_TIMEOUTS: ::c_int = 164; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 165; -pub const _SC_2_PBS: ::c_int = 168; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 169; -pub const _SC_2_PBS_LOCATE: ::c_int = 170; -pub const _SC_2_PBS_MESSAGE: ::c_int = 171; -pub const _SC_2_PBS_TRACK: ::c_int = 172; -pub const _SC_SYMLOOP_MAX: ::c_int = 173; -pub const _SC_STREAMS: ::c_int = 174; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 175; -pub const _SC_V6_ILP32_OFF32: ::c_int = 176; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 177; -pub const _SC_V6_LP64_OFF64: ::c_int = 178; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 179; -pub const _SC_HOST_NAME_MAX: ::c_int = 180; -pub const _SC_TRACE: ::c_int = 181; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 182; -pub const _SC_TRACE_INHERIT: ::c_int = 183; -pub const _SC_TRACE_LOG: ::c_int = 184; -pub const _SC_IPV6: ::c_int = 235; -pub const _SC_RAW_SOCKETS: ::c_int = 236; -pub const _SC_V7_ILP32_OFF32: ::c_int = 237; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 238; -pub const _SC_V7_LP64_OFF64: ::c_int = 239; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 240; -pub const _SC_SS_REPL_MAX: ::c_int = 241; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 242; -pub const _SC_TRACE_NAME_MAX: ::c_int = 243; -pub const _SC_TRACE_SYS_MAX: ::c_int = 244; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 245; -pub const _SC_XOPEN_STREAMS: ::c_int = 246; -pub const _SC_THREAD_ROBUST_PRIO_INHERIT: ::c_int = 247; -pub const _SC_THREAD_ROBUST_PRIO_PROTECT: ::c_int = 248; - -pub const _CS_PATH: ::c_int = 0; -pub const _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS: ::c_int = 1; -pub const _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS: ::c_int = 4; -pub const _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS: ::c_int = 5; -pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: ::c_int = 1116; -pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: ::c_int = 1117; -pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: ::c_int = 1118; -pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: ::c_int = 1119; -pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: ::c_int = 1120; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: ::c_int = 1121; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: ::c_int = 1122; -pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1123; -pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: ::c_int = 1124; -pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: ::c_int = 1125; -pub const _CS_POSIX_V6_LP64_OFF64_LIBS: ::c_int = 1126; -pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: ::c_int = 1127; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: ::c_int = 1128; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1129; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: ::c_int = 1130; -pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1131; -pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: ::c_int = 1132; -pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: ::c_int = 1133; -pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: ::c_int = 1134; -pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: ::c_int = 1135; -pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: ::c_int = 1136; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: ::c_int = 1137; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: ::c_int = 1138; -pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: ::c_int = 1139; -pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: ::c_int = 1140; -pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: ::c_int = 1141; -pub const _CS_POSIX_V7_LP64_OFF64_LIBS: ::c_int = 1142; -pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: ::c_int = 1143; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: ::c_int = 1144; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: ::c_int = 1145; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: ::c_int = 1146; -pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: ::c_int = 1147; - -pub const RLIM_SAVED_MAX: ::rlim_t = RLIM_INFINITY; -pub const RLIM_SAVED_CUR: ::rlim_t = RLIM_INFINITY; +pub const RUSAGE_CHILDREN: c_int = -1; +pub const L_tmpnam: c_uint = 20; +pub const _PC_LINK_MAX: c_int = 0; +pub const _PC_MAX_CANON: c_int = 1; +pub const _PC_MAX_INPUT: c_int = 2; +pub const _PC_NAME_MAX: c_int = 3; +pub const _PC_PATH_MAX: c_int = 4; +pub const _PC_PIPE_BUF: c_int = 5; +pub const _PC_CHOWN_RESTRICTED: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SOCK_MAXBUF: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_ALLOC_SIZE_MIN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_2_SYMLINKS: c_int = 20; + +pub const MS_NOUSER: c_ulong = 0xffffffff80000000; + +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; +pub const _SC_JOB_CONTROL: c_int = 7; +pub const _SC_SAVED_IDS: c_int = 8; +pub const _SC_REALTIME_SIGNALS: c_int = 9; +pub const _SC_PRIORITY_SCHEDULING: c_int = 10; +pub const _SC_TIMERS: c_int = 11; +pub const _SC_ASYNCHRONOUS_IO: c_int = 12; +pub const _SC_PRIORITIZED_IO: c_int = 13; +pub const _SC_SYNCHRONIZED_IO: c_int = 14; +pub const _SC_FSYNC: c_int = 15; +pub const _SC_MAPPED_FILES: c_int = 16; +pub const _SC_MEMLOCK: c_int = 17; +pub const _SC_MEMLOCK_RANGE: c_int = 18; +pub const _SC_MEMORY_PROTECTION: c_int = 19; +pub const _SC_MESSAGE_PASSING: c_int = 20; +pub const _SC_SEMAPHORES: c_int = 21; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 22; +pub const _SC_AIO_LISTIO_MAX: c_int = 23; +pub const _SC_AIO_MAX: c_int = 24; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 25; +pub const _SC_DELAYTIMER_MAX: c_int = 26; +pub const _SC_MQ_OPEN_MAX: c_int = 27; +pub const _SC_MQ_PRIO_MAX: c_int = 28; +pub const _SC_VERSION: c_int = 29; +pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_RTSIG_MAX: c_int = 31; +pub const _SC_SEM_NSEMS_MAX: c_int = 32; +pub const _SC_SEM_VALUE_MAX: c_int = 33; +pub const _SC_SIGQUEUE_MAX: c_int = 34; +pub const _SC_TIMER_MAX: c_int = 35; +pub const _SC_BC_BASE_MAX: c_int = 36; +pub const _SC_BC_DIM_MAX: c_int = 37; +pub const _SC_BC_SCALE_MAX: c_int = 38; +pub const _SC_BC_STRING_MAX: c_int = 39; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 40; +pub const _SC_EXPR_NEST_MAX: c_int = 42; +pub const _SC_LINE_MAX: c_int = 43; +pub const _SC_RE_DUP_MAX: c_int = 44; +pub const _SC_2_VERSION: c_int = 46; +pub const _SC_2_C_BIND: c_int = 47; +pub const _SC_2_C_DEV: c_int = 48; +pub const _SC_2_FORT_DEV: c_int = 49; +pub const _SC_2_FORT_RUN: c_int = 50; +pub const _SC_2_SW_DEV: c_int = 51; +pub const _SC_2_LOCALEDEF: c_int = 52; +pub const _SC_UIO_MAXIOV: c_int = 60; +pub const _SC_IOV_MAX: c_int = 60; +pub const _SC_THREADS: c_int = 67; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 68; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 69; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 70; +pub const _SC_LOGIN_NAME_MAX: c_int = 71; +pub const _SC_TTY_NAME_MAX: c_int = 72; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 73; +pub const _SC_THREAD_KEYS_MAX: c_int = 74; +pub const _SC_THREAD_STACK_MIN: c_int = 75; +pub const _SC_THREAD_THREADS_MAX: c_int = 76; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 77; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 78; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 79; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 80; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 81; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 82; +pub const _SC_NPROCESSORS_CONF: c_int = 83; +pub const _SC_NPROCESSORS_ONLN: c_int = 84; +pub const _SC_PHYS_PAGES: c_int = 85; +pub const _SC_AVPHYS_PAGES: c_int = 86; +pub const _SC_ATEXIT_MAX: c_int = 87; +pub const _SC_PASS_MAX: c_int = 88; +pub const _SC_XOPEN_VERSION: c_int = 89; +pub const _SC_XOPEN_XCU_VERSION: c_int = 90; +pub const _SC_XOPEN_UNIX: c_int = 91; +pub const _SC_XOPEN_CRYPT: c_int = 92; +pub const _SC_XOPEN_ENH_I18N: c_int = 93; +pub const _SC_XOPEN_SHM: c_int = 94; +pub const _SC_2_CHAR_TERM: c_int = 95; +pub const _SC_2_UPE: c_int = 97; +pub const _SC_XOPEN_XPG2: c_int = 98; +pub const _SC_XOPEN_XPG3: c_int = 99; +pub const _SC_XOPEN_XPG4: c_int = 100; +pub const _SC_NZERO: c_int = 109; +pub const _SC_XBS5_ILP32_OFF32: c_int = 125; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 126; +pub const _SC_XBS5_LP64_OFF64: c_int = 127; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 128; +pub const _SC_XOPEN_LEGACY: c_int = 129; +pub const _SC_XOPEN_REALTIME: c_int = 130; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 131; +pub const _SC_ADVISORY_INFO: c_int = 132; +pub const _SC_BARRIERS: c_int = 133; +pub const _SC_CLOCK_SELECTION: c_int = 137; +pub const _SC_CPUTIME: c_int = 138; +pub const _SC_THREAD_CPUTIME: c_int = 139; +pub const _SC_MONOTONIC_CLOCK: c_int = 149; +pub const _SC_READER_WRITER_LOCKS: c_int = 153; +pub const _SC_SPIN_LOCKS: c_int = 154; +pub const _SC_REGEXP: c_int = 155; +pub const _SC_SHELL: c_int = 157; +pub const _SC_SPAWN: c_int = 159; +pub const _SC_SPORADIC_SERVER: c_int = 160; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 161; +pub const _SC_TIMEOUTS: c_int = 164; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 165; +pub const _SC_2_PBS: c_int = 168; +pub const _SC_2_PBS_ACCOUNTING: c_int = 169; +pub const _SC_2_PBS_LOCATE: c_int = 170; +pub const _SC_2_PBS_MESSAGE: c_int = 171; +pub const _SC_2_PBS_TRACK: c_int = 172; +pub const _SC_SYMLOOP_MAX: c_int = 173; +pub const _SC_STREAMS: c_int = 174; +pub const _SC_2_PBS_CHECKPOINT: c_int = 175; +pub const _SC_V6_ILP32_OFF32: c_int = 176; +pub const _SC_V6_ILP32_OFFBIG: c_int = 177; +pub const _SC_V6_LP64_OFF64: c_int = 178; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 179; +pub const _SC_HOST_NAME_MAX: c_int = 180; +pub const _SC_TRACE: c_int = 181; +pub const _SC_TRACE_EVENT_FILTER: c_int = 182; +pub const _SC_TRACE_INHERIT: c_int = 183; +pub const _SC_TRACE_LOG: c_int = 184; +pub const _SC_IPV6: c_int = 235; +pub const _SC_RAW_SOCKETS: c_int = 236; +pub const _SC_V7_ILP32_OFF32: c_int = 237; +pub const _SC_V7_ILP32_OFFBIG: c_int = 238; +pub const _SC_V7_LP64_OFF64: c_int = 239; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 240; +pub const _SC_SS_REPL_MAX: c_int = 241; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 242; +pub const _SC_TRACE_NAME_MAX: c_int = 243; +pub const _SC_TRACE_SYS_MAX: c_int = 244; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 245; +pub const _SC_XOPEN_STREAMS: c_int = 246; +pub const _SC_THREAD_ROBUST_PRIO_INHERIT: c_int = 247; +pub const _SC_THREAD_ROBUST_PRIO_PROTECT: c_int = 248; + +pub const _CS_PATH: c_int = 0; +pub const _CS_POSIX_V6_WIDTH_RESTRICTED_ENVS: c_int = 1; +pub const _CS_POSIX_V5_WIDTH_RESTRICTED_ENVS: c_int = 4; +pub const _CS_POSIX_V7_WIDTH_RESTRICTED_ENVS: c_int = 5; +pub const _CS_POSIX_V6_ILP32_OFF32_CFLAGS: c_int = 1116; +pub const _CS_POSIX_V6_ILP32_OFF32_LDFLAGS: c_int = 1117; +pub const _CS_POSIX_V6_ILP32_OFF32_LIBS: c_int = 1118; +pub const _CS_POSIX_V6_ILP32_OFF32_LINTFLAGS: c_int = 1119; +pub const _CS_POSIX_V6_ILP32_OFFBIG_CFLAGS: c_int = 1120; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LDFLAGS: c_int = 1121; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LIBS: c_int = 1122; +pub const _CS_POSIX_V6_ILP32_OFFBIG_LINTFLAGS: c_int = 1123; +pub const _CS_POSIX_V6_LP64_OFF64_CFLAGS: c_int = 1124; +pub const _CS_POSIX_V6_LP64_OFF64_LDFLAGS: c_int = 1125; +pub const _CS_POSIX_V6_LP64_OFF64_LIBS: c_int = 1126; +pub const _CS_POSIX_V6_LP64_OFF64_LINTFLAGS: c_int = 1127; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_CFLAGS: c_int = 1128; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LDFLAGS: c_int = 1129; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LIBS: c_int = 1130; +pub const _CS_POSIX_V6_LPBIG_OFFBIG_LINTFLAGS: c_int = 1131; +pub const _CS_POSIX_V7_ILP32_OFF32_CFLAGS: c_int = 1132; +pub const _CS_POSIX_V7_ILP32_OFF32_LDFLAGS: c_int = 1133; +pub const _CS_POSIX_V7_ILP32_OFF32_LIBS: c_int = 1134; +pub const _CS_POSIX_V7_ILP32_OFF32_LINTFLAGS: c_int = 1135; +pub const _CS_POSIX_V7_ILP32_OFFBIG_CFLAGS: c_int = 1136; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LDFLAGS: c_int = 1137; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LIBS: c_int = 1138; +pub const _CS_POSIX_V7_ILP32_OFFBIG_LINTFLAGS: c_int = 1139; +pub const _CS_POSIX_V7_LP64_OFF64_CFLAGS: c_int = 1140; +pub const _CS_POSIX_V7_LP64_OFF64_LDFLAGS: c_int = 1141; +pub const _CS_POSIX_V7_LP64_OFF64_LIBS: c_int = 1142; +pub const _CS_POSIX_V7_LP64_OFF64_LINTFLAGS: c_int = 1143; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_CFLAGS: c_int = 1144; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LDFLAGS: c_int = 1145; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LIBS: c_int = 1146; +pub const _CS_POSIX_V7_LPBIG_OFFBIG_LINTFLAGS: c_int = 1147; + +pub const RLIM_SAVED_MAX: crate::rlim_t = RLIM_INFINITY; +pub const RLIM_SAVED_CUR: crate::rlim_t = RLIM_INFINITY; // elf.h - Fields in the e_ident array. pub const EI_NIDENT: usize = 16; @@ -2653,80 +2657,80 @@ pub const PF_MASKOS: u32 = 0x0ff00000; pub const PF_MASKPROC: u32 = 0xf0000000; // elf.h - Legal values for a_type (entry type). -pub const AT_NULL: ::c_ulong = 0; -pub const AT_IGNORE: ::c_ulong = 1; -pub const AT_EXECFD: ::c_ulong = 2; -pub const AT_PHDR: ::c_ulong = 3; -pub const AT_PHENT: ::c_ulong = 4; -pub const AT_PHNUM: ::c_ulong = 5; -pub const AT_PAGESZ: ::c_ulong = 6; -pub const AT_BASE: ::c_ulong = 7; -pub const AT_FLAGS: ::c_ulong = 8; -pub const AT_ENTRY: ::c_ulong = 9; -pub const AT_NOTELF: ::c_ulong = 10; -pub const AT_UID: ::c_ulong = 11; -pub const AT_EUID: ::c_ulong = 12; -pub const AT_GID: ::c_ulong = 13; -pub const AT_EGID: ::c_ulong = 14; -pub const AT_PLATFORM: ::c_ulong = 15; -pub const AT_HWCAP: ::c_ulong = 16; -pub const AT_CLKTCK: ::c_ulong = 17; - -pub const AT_SECURE: ::c_ulong = 23; -pub const AT_BASE_PLATFORM: ::c_ulong = 24; -pub const AT_RANDOM: ::c_ulong = 25; -pub const AT_HWCAP2: ::c_ulong = 26; - -pub const AT_EXECFN: ::c_ulong = 31; +pub const AT_NULL: c_ulong = 0; +pub const AT_IGNORE: c_ulong = 1; +pub const AT_EXECFD: c_ulong = 2; +pub const AT_PHDR: c_ulong = 3; +pub const AT_PHENT: c_ulong = 4; +pub const AT_PHNUM: c_ulong = 5; +pub const AT_PAGESZ: c_ulong = 6; +pub const AT_BASE: c_ulong = 7; +pub const AT_FLAGS: c_ulong = 8; +pub const AT_ENTRY: c_ulong = 9; +pub const AT_NOTELF: c_ulong = 10; +pub const AT_UID: c_ulong = 11; +pub const AT_EUID: c_ulong = 12; +pub const AT_GID: c_ulong = 13; +pub const AT_EGID: c_ulong = 14; +pub const AT_PLATFORM: c_ulong = 15; +pub const AT_HWCAP: c_ulong = 16; +pub const AT_CLKTCK: c_ulong = 17; + +pub const AT_SECURE: c_ulong = 23; +pub const AT_BASE_PLATFORM: c_ulong = 24; +pub const AT_RANDOM: c_ulong = 25; +pub const AT_HWCAP2: c_ulong = 26; + +pub const AT_EXECFN: c_ulong = 31; // defined in arch//include/uapi/asm/auxvec.h but has the same value // wherever it is defined. -pub const AT_SYSINFO_EHDR: ::c_ulong = 33; -pub const AT_MINSIGSTKSZ: ::c_ulong = 51; - -pub const GLOB_ERR: ::c_int = 1 << 0; -pub const GLOB_MARK: ::c_int = 1 << 1; -pub const GLOB_NOSORT: ::c_int = 1 << 2; -pub const GLOB_DOOFFS: ::c_int = 1 << 3; -pub const GLOB_NOCHECK: ::c_int = 1 << 4; -pub const GLOB_APPEND: ::c_int = 1 << 5; -pub const GLOB_NOESCAPE: ::c_int = 1 << 6; - -pub const GLOB_NOSPACE: ::c_int = 1; -pub const GLOB_ABORTED: ::c_int = 2; -pub const GLOB_NOMATCH: ::c_int = 3; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_SPAWN_USEVFORK: ::c_short = 64; -pub const POSIX_SPAWN_SETSID: ::c_short = 128; +pub const AT_SYSINFO_EHDR: c_ulong = 33; +pub const AT_MINSIGSTKSZ: c_ulong = 51; + +pub const GLOB_ERR: c_int = 1 << 0; +pub const GLOB_MARK: c_int = 1 << 1; +pub const GLOB_NOSORT: c_int = 1 << 2; +pub const GLOB_DOOFFS: c_int = 1 << 3; +pub const GLOB_NOCHECK: c_int = 1 << 4; +pub const GLOB_APPEND: c_int = 1 << 5; +pub const GLOB_NOESCAPE: c_int = 1 << 6; + +pub const GLOB_NOSPACE: c_int = 1; +pub const GLOB_ABORTED: c_int = 2; +pub const GLOB_NOMATCH: c_int = 3; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_SPAWN_USEVFORK: c_short = 64; +pub const POSIX_SPAWN_SETSID: c_short = 128; pub const S_IEXEC: mode_t = 0o0100; pub const S_IWRITE: mode_t = 0o0200; pub const S_IREAD: mode_t = 0o0400; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; -pub const F_SEAL_FUTURE_WRITE: ::c_int = 0x0010; +pub const F_SEAL_FUTURE_WRITE: c_int = 0x0010; -pub const IFF_LOWER_UP: ::c_int = 0x10000; -pub const IFF_DORMANT: ::c_int = 0x20000; -pub const IFF_ECHO: ::c_int = 0x40000; +pub const IFF_LOWER_UP: c_int = 0x10000; +pub const IFF_DORMANT: c_int = 0x20000; +pub const IFF_ECHO: c_int = 0x40000; // linux/if_addr.h -pub const IFA_UNSPEC: ::c_ushort = 0; -pub const IFA_ADDRESS: ::c_ushort = 1; -pub const IFA_LOCAL: ::c_ushort = 2; -pub const IFA_LABEL: ::c_ushort = 3; -pub const IFA_BROADCAST: ::c_ushort = 4; -pub const IFA_ANYCAST: ::c_ushort = 5; -pub const IFA_CACHEINFO: ::c_ushort = 6; -pub const IFA_MULTICAST: ::c_ushort = 7; +pub const IFA_UNSPEC: c_ushort = 0; +pub const IFA_ADDRESS: c_ushort = 1; +pub const IFA_LOCAL: c_ushort = 2; +pub const IFA_LABEL: c_ushort = 3; +pub const IFA_BROADCAST: c_ushort = 4; +pub const IFA_ANYCAST: c_ushort = 5; +pub const IFA_CACHEINFO: c_ushort = 6; +pub const IFA_MULTICAST: c_ushort = 7; pub const IFA_F_SECONDARY: u32 = 0x01; pub const IFA_F_TEMPORARY: u32 = 0x01; @@ -2739,161 +2743,161 @@ pub const IFA_F_TENTATIVE: u32 = 0x40; pub const IFA_F_PERMANENT: u32 = 0x80; // linux/if_link.h -pub const IFLA_UNSPEC: ::c_ushort = 0; -pub const IFLA_ADDRESS: ::c_ushort = 1; -pub const IFLA_BROADCAST: ::c_ushort = 2; -pub const IFLA_IFNAME: ::c_ushort = 3; -pub const IFLA_MTU: ::c_ushort = 4; -pub const IFLA_LINK: ::c_ushort = 5; -pub const IFLA_QDISC: ::c_ushort = 6; -pub const IFLA_STATS: ::c_ushort = 7; -pub const IFLA_COST: ::c_ushort = 8; -pub const IFLA_PRIORITY: ::c_ushort = 9; -pub const IFLA_MASTER: ::c_ushort = 10; -pub const IFLA_WIRELESS: ::c_ushort = 11; -pub const IFLA_PROTINFO: ::c_ushort = 12; -pub const IFLA_TXQLEN: ::c_ushort = 13; -pub const IFLA_MAP: ::c_ushort = 14; -pub const IFLA_WEIGHT: ::c_ushort = 15; -pub const IFLA_OPERSTATE: ::c_ushort = 16; -pub const IFLA_LINKMODE: ::c_ushort = 17; -pub const IFLA_LINKINFO: ::c_ushort = 18; -pub const IFLA_NET_NS_PID: ::c_ushort = 19; -pub const IFLA_IFALIAS: ::c_ushort = 20; -pub const IFLA_NUM_VF: ::c_ushort = 21; -pub const IFLA_VFINFO_LIST: ::c_ushort = 22; -pub const IFLA_STATS64: ::c_ushort = 23; -pub const IFLA_VF_PORTS: ::c_ushort = 24; -pub const IFLA_PORT_SELF: ::c_ushort = 25; -pub const IFLA_AF_SPEC: ::c_ushort = 26; -pub const IFLA_GROUP: ::c_ushort = 27; -pub const IFLA_NET_NS_FD: ::c_ushort = 28; -pub const IFLA_EXT_MASK: ::c_ushort = 29; -pub const IFLA_PROMISCUITY: ::c_ushort = 30; -pub const IFLA_NUM_TX_QUEUES: ::c_ushort = 31; -pub const IFLA_NUM_RX_QUEUES: ::c_ushort = 32; -pub const IFLA_CARRIER: ::c_ushort = 33; -pub const IFLA_PHYS_PORT_ID: ::c_ushort = 34; -pub const IFLA_CARRIER_CHANGES: ::c_ushort = 35; -pub const IFLA_PHYS_SWITCH_ID: ::c_ushort = 36; -pub const IFLA_LINK_NETNSID: ::c_ushort = 37; -pub const IFLA_PHYS_PORT_NAME: ::c_ushort = 38; -pub const IFLA_PROTO_DOWN: ::c_ushort = 39; -pub const IFLA_GSO_MAX_SEGS: ::c_ushort = 40; -pub const IFLA_GSO_MAX_SIZE: ::c_ushort = 41; -pub const IFLA_PAD: ::c_ushort = 42; -pub const IFLA_XDP: ::c_ushort = 43; -pub const IFLA_EVENT: ::c_ushort = 44; -pub const IFLA_NEW_NETNSID: ::c_ushort = 45; -pub const IFLA_IF_NETNSID: ::c_ushort = 46; -pub const IFLA_TARGET_NETNSID: ::c_ushort = IFLA_IF_NETNSID; -pub const IFLA_CARRIER_UP_COUNT: ::c_ushort = 47; -pub const IFLA_CARRIER_DOWN_COUNT: ::c_ushort = 48; -pub const IFLA_NEW_IFINDEX: ::c_ushort = 49; -pub const IFLA_MIN_MTU: ::c_ushort = 50; -pub const IFLA_MAX_MTU: ::c_ushort = 51; -pub const IFLA_PROP_LIST: ::c_ushort = 52; -pub const IFLA_ALT_IFNAME: ::c_ushort = 53; -pub const IFLA_PERM_ADDRESS: ::c_ushort = 54; -pub const IFLA_PROTO_DOWN_REASON: ::c_ushort = 55; -pub const IFLA_PARENT_DEV_NAME: ::c_ushort = 56; -pub const IFLA_PARENT_DEV_BUS_NAME: ::c_ushort = 57; -pub const IFLA_GRO_MAX_SIZE: ::c_ushort = 58; -pub const IFLA_TSO_MAX_SIZE: ::c_ushort = 59; -pub const IFLA_TSO_MAX_SEGS: ::c_ushort = 60; -pub const IFLA_ALLMULTI: ::c_ushort = 61; - -pub const IFLA_INFO_UNSPEC: ::c_ushort = 0; -pub const IFLA_INFO_KIND: ::c_ushort = 1; -pub const IFLA_INFO_DATA: ::c_ushort = 2; -pub const IFLA_INFO_XSTATS: ::c_ushort = 3; -pub const IFLA_INFO_SLAVE_KIND: ::c_ushort = 4; -pub const IFLA_INFO_SLAVE_DATA: ::c_ushort = 5; +pub const IFLA_UNSPEC: c_ushort = 0; +pub const IFLA_ADDRESS: c_ushort = 1; +pub const IFLA_BROADCAST: c_ushort = 2; +pub const IFLA_IFNAME: c_ushort = 3; +pub const IFLA_MTU: c_ushort = 4; +pub const IFLA_LINK: c_ushort = 5; +pub const IFLA_QDISC: c_ushort = 6; +pub const IFLA_STATS: c_ushort = 7; +pub const IFLA_COST: c_ushort = 8; +pub const IFLA_PRIORITY: c_ushort = 9; +pub const IFLA_MASTER: c_ushort = 10; +pub const IFLA_WIRELESS: c_ushort = 11; +pub const IFLA_PROTINFO: c_ushort = 12; +pub const IFLA_TXQLEN: c_ushort = 13; +pub const IFLA_MAP: c_ushort = 14; +pub const IFLA_WEIGHT: c_ushort = 15; +pub const IFLA_OPERSTATE: c_ushort = 16; +pub const IFLA_LINKMODE: c_ushort = 17; +pub const IFLA_LINKINFO: c_ushort = 18; +pub const IFLA_NET_NS_PID: c_ushort = 19; +pub const IFLA_IFALIAS: c_ushort = 20; +pub const IFLA_NUM_VF: c_ushort = 21; +pub const IFLA_VFINFO_LIST: c_ushort = 22; +pub const IFLA_STATS64: c_ushort = 23; +pub const IFLA_VF_PORTS: c_ushort = 24; +pub const IFLA_PORT_SELF: c_ushort = 25; +pub const IFLA_AF_SPEC: c_ushort = 26; +pub const IFLA_GROUP: c_ushort = 27; +pub const IFLA_NET_NS_FD: c_ushort = 28; +pub const IFLA_EXT_MASK: c_ushort = 29; +pub const IFLA_PROMISCUITY: c_ushort = 30; +pub const IFLA_NUM_TX_QUEUES: c_ushort = 31; +pub const IFLA_NUM_RX_QUEUES: c_ushort = 32; +pub const IFLA_CARRIER: c_ushort = 33; +pub const IFLA_PHYS_PORT_ID: c_ushort = 34; +pub const IFLA_CARRIER_CHANGES: c_ushort = 35; +pub const IFLA_PHYS_SWITCH_ID: c_ushort = 36; +pub const IFLA_LINK_NETNSID: c_ushort = 37; +pub const IFLA_PHYS_PORT_NAME: c_ushort = 38; +pub const IFLA_PROTO_DOWN: c_ushort = 39; +pub const IFLA_GSO_MAX_SEGS: c_ushort = 40; +pub const IFLA_GSO_MAX_SIZE: c_ushort = 41; +pub const IFLA_PAD: c_ushort = 42; +pub const IFLA_XDP: c_ushort = 43; +pub const IFLA_EVENT: c_ushort = 44; +pub const IFLA_NEW_NETNSID: c_ushort = 45; +pub const IFLA_IF_NETNSID: c_ushort = 46; +pub const IFLA_TARGET_NETNSID: c_ushort = IFLA_IF_NETNSID; +pub const IFLA_CARRIER_UP_COUNT: c_ushort = 47; +pub const IFLA_CARRIER_DOWN_COUNT: c_ushort = 48; +pub const IFLA_NEW_IFINDEX: c_ushort = 49; +pub const IFLA_MIN_MTU: c_ushort = 50; +pub const IFLA_MAX_MTU: c_ushort = 51; +pub const IFLA_PROP_LIST: c_ushort = 52; +pub const IFLA_ALT_IFNAME: c_ushort = 53; +pub const IFLA_PERM_ADDRESS: c_ushort = 54; +pub const IFLA_PROTO_DOWN_REASON: c_ushort = 55; +pub const IFLA_PARENT_DEV_NAME: c_ushort = 56; +pub const IFLA_PARENT_DEV_BUS_NAME: c_ushort = 57; +pub const IFLA_GRO_MAX_SIZE: c_ushort = 58; +pub const IFLA_TSO_MAX_SIZE: c_ushort = 59; +pub const IFLA_TSO_MAX_SEGS: c_ushort = 60; +pub const IFLA_ALLMULTI: c_ushort = 61; + +pub const IFLA_INFO_UNSPEC: c_ushort = 0; +pub const IFLA_INFO_KIND: c_ushort = 1; +pub const IFLA_INFO_DATA: c_ushort = 2; +pub const IFLA_INFO_XSTATS: c_ushort = 3; +pub const IFLA_INFO_SLAVE_KIND: c_ushort = 4; +pub const IFLA_INFO_SLAVE_DATA: c_ushort = 5; // linux/if_tun.h /* TUNSETIFF ifr flags */ -pub const IFF_TUN: ::c_int = 0x0001; -pub const IFF_TAP: ::c_int = 0x0002; -pub const IFF_NAPI: ::c_int = 0x0010; -pub const IFF_NAPI_FRAGS: ::c_int = 0x0020; +pub const IFF_TUN: c_int = 0x0001; +pub const IFF_TAP: c_int = 0x0002; +pub const IFF_NAPI: c_int = 0x0010; +pub const IFF_NAPI_FRAGS: c_int = 0x0020; // Used in TUNSETIFF to bring up tun/tap without carrier -pub const IFF_NO_CARRIER: ::c_int = 0x0040; -pub const IFF_NO_PI: ::c_int = 0x1000; +pub const IFF_NO_CARRIER: c_int = 0x0040; +pub const IFF_NO_PI: c_int = 0x1000; // Read queue size -pub const TUN_READQ_SIZE: ::c_short = 500; +pub const TUN_READQ_SIZE: c_short = 500; // TUN device type flags: deprecated. Use IFF_TUN/IFF_TAP instead. -pub const TUN_TUN_DEV: ::c_short = ::IFF_TUN as ::c_short; -pub const TUN_TAP_DEV: ::c_short = ::IFF_TAP as ::c_short; -pub const TUN_TYPE_MASK: ::c_short = 0x000f; +pub const TUN_TUN_DEV: c_short = crate::IFF_TUN as c_short; +pub const TUN_TAP_DEV: c_short = crate::IFF_TAP as c_short; +pub const TUN_TYPE_MASK: c_short = 0x000f; // This flag has no real effect -pub const IFF_ONE_QUEUE: ::c_int = 0x2000; -pub const IFF_VNET_HDR: ::c_int = 0x4000; -pub const IFF_TUN_EXCL: ::c_int = 0x8000; -pub const IFF_MULTI_QUEUE: ::c_int = 0x0100; -pub const IFF_ATTACH_QUEUE: ::c_int = 0x0200; -pub const IFF_DETACH_QUEUE: ::c_int = 0x0400; +pub const IFF_ONE_QUEUE: c_int = 0x2000; +pub const IFF_VNET_HDR: c_int = 0x4000; +pub const IFF_TUN_EXCL: c_int = 0x8000; +pub const IFF_MULTI_QUEUE: c_int = 0x0100; +pub const IFF_ATTACH_QUEUE: c_int = 0x0200; +pub const IFF_DETACH_QUEUE: c_int = 0x0400; // read-only flag -pub const IFF_PERSIST: ::c_int = 0x0800; -pub const IFF_NOFILTER: ::c_int = 0x1000; +pub const IFF_PERSIST: c_int = 0x0800; +pub const IFF_NOFILTER: c_int = 0x1000; // Socket options -pub const TUN_TX_TIMESTAMP: ::c_int = 1; +pub const TUN_TX_TIMESTAMP: c_int = 1; // Features for GSO (TUNSETOFFLOAD) -pub const TUN_F_CSUM: ::c_uint = 0x01; -pub const TUN_F_TSO4: ::c_uint = 0x02; -pub const TUN_F_TSO6: ::c_uint = 0x04; -pub const TUN_F_TSO_ECN: ::c_uint = 0x08; -pub const TUN_F_UFO: ::c_uint = 0x10; -pub const TUN_F_USO4: ::c_uint = 0x20; -pub const TUN_F_USO6: ::c_uint = 0x40; +pub const TUN_F_CSUM: c_uint = 0x01; +pub const TUN_F_TSO4: c_uint = 0x02; +pub const TUN_F_TSO6: c_uint = 0x04; +pub const TUN_F_TSO_ECN: c_uint = 0x08; +pub const TUN_F_UFO: c_uint = 0x10; +pub const TUN_F_USO4: c_uint = 0x20; +pub const TUN_F_USO6: c_uint = 0x40; // Protocol info prepended to the packets (when IFF_NO_PI is not set) -pub const TUN_PKT_STRIP: ::c_int = 0x0001; +pub const TUN_PKT_STRIP: c_int = 0x0001; // Accept all multicast packets -pub const TUN_FLT_ALLMULTI: ::c_int = 0x0001; +pub const TUN_FLT_ALLMULTI: c_int = 0x0001; // Since Linux 3.1 -pub const SEEK_DATA: ::c_int = 3; -pub const SEEK_HOLE: ::c_int = 4; - -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; -pub const ST_NODEV: ::c_ulong = 4; -pub const ST_NOEXEC: ::c_ulong = 8; -pub const ST_SYNCHRONOUS: ::c_ulong = 16; -pub const ST_MANDLOCK: ::c_ulong = 64; -pub const ST_WRITE: ::c_ulong = 128; -pub const ST_APPEND: ::c_ulong = 256; -pub const ST_IMMUTABLE: ::c_ulong = 512; -pub const ST_NOATIME: ::c_ulong = 1024; -pub const ST_NODIRATIME: ::c_ulong = 2048; - -pub const RTLD_NEXT: *mut ::c_void = -1i64 as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOW: ::c_int = 0x2; - -pub const AT_EACCESS: ::c_int = 0x200; +pub const SEEK_DATA: c_int = 3; +pub const SEEK_HOLE: c_int = 4; + +pub const ST_RDONLY: c_ulong = 1; +pub const ST_NOSUID: c_ulong = 2; +pub const ST_NODEV: c_ulong = 4; +pub const ST_NOEXEC: c_ulong = 8; +pub const ST_SYNCHRONOUS: c_ulong = 16; +pub const ST_MANDLOCK: c_ulong = 64; +pub const ST_WRITE: c_ulong = 128; +pub const ST_APPEND: c_ulong = 256; +pub const ST_IMMUTABLE: c_ulong = 512; +pub const ST_NOATIME: c_ulong = 1024; +pub const ST_NODIRATIME: c_ulong = 2048; + +pub const RTLD_NEXT: *mut c_void = -1i64 as *mut c_void; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; +pub const RTLD_NODELETE: c_int = 0x1000; +pub const RTLD_NOW: c_int = 0x2; + +pub const AT_EACCESS: c_int = 0x200; // linux/mempolicy.h -pub const MPOL_DEFAULT: ::c_int = 0; -pub const MPOL_PREFERRED: ::c_int = 1; -pub const MPOL_BIND: ::c_int = 2; -pub const MPOL_INTERLEAVE: ::c_int = 3; -pub const MPOL_LOCAL: ::c_int = 4; -pub const MPOL_F_NUMA_BALANCING: ::c_int = 1 << 13; -pub const MPOL_F_RELATIVE_NODES: ::c_int = 1 << 14; -pub const MPOL_F_STATIC_NODES: ::c_int = 1 << 15; +pub const MPOL_DEFAULT: c_int = 0; +pub const MPOL_PREFERRED: c_int = 1; +pub const MPOL_BIND: c_int = 2; +pub const MPOL_INTERLEAVE: c_int = 3; +pub const MPOL_LOCAL: c_int = 4; +pub const MPOL_F_NUMA_BALANCING: c_int = 1 << 13; +pub const MPOL_F_RELATIVE_NODES: c_int = 1 << 14; +pub const MPOL_F_STATIC_NODES: c_int = 1 << 15; // linux/membarrier.h -pub const MEMBARRIER_CMD_QUERY: ::c_int = 0; -pub const MEMBARRIER_CMD_GLOBAL: ::c_int = 1 << 0; -pub const MEMBARRIER_CMD_GLOBAL_EXPEDITED: ::c_int = 1 << 1; -pub const MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: ::c_int = 1 << 2; -pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED: ::c_int = 1 << 3; -pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: ::c_int = 1 << 4; -pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: ::c_int = 1 << 5; -pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: ::c_int = 1 << 6; -pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: ::c_int = 1 << 7; -pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ: ::c_int = 1 << 8; +pub const MEMBARRIER_CMD_QUERY: c_int = 0; +pub const MEMBARRIER_CMD_GLOBAL: c_int = 1 << 0; +pub const MEMBARRIER_CMD_GLOBAL_EXPEDITED: c_int = 1 << 1; +pub const MEMBARRIER_CMD_REGISTER_GLOBAL_EXPEDITED: c_int = 1 << 2; +pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED: c_int = 1 << 3; +pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED: c_int = 1 << 4; +pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_SYNC_CORE: c_int = 1 << 5; +pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_SYNC_CORE: c_int = 1 << 6; +pub const MEMBARRIER_CMD_PRIVATE_EXPEDITED_RSEQ: c_int = 1 << 7; +pub const MEMBARRIER_CMD_REGISTER_PRIVATE_EXPEDITED_RSEQ: c_int = 1 << 8; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { size: [0; __SIZEOF_PTHREAD_MUTEX_T], @@ -2905,26 +2909,26 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { size: [0; __SIZEOF_PTHREAD_RWLOCK_T], }; -pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; +pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1; pub const PTHREAD_ONCE_INIT: pthread_once_t = 0; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = PTHREAD_MUTEX_NORMAL; -pub const PTHREAD_MUTEX_STALLED: ::c_int = 0; -pub const PTHREAD_MUTEX_ROBUST: ::c_int = 1; -pub const PTHREAD_PRIO_NONE: ::c_int = 0; -pub const PTHREAD_PRIO_INHERIT: ::c_int = 1; -pub const PTHREAD_PRIO_PROTECT: ::c_int = 2; -pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; -pub const PTHREAD_INHERIT_SCHED: ::c_int = 0; -pub const PTHREAD_EXPLICIT_SCHED: ::c_int = 1; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; +pub const PTHREAD_MUTEX_DEFAULT: c_int = PTHREAD_MUTEX_NORMAL; +pub const PTHREAD_MUTEX_STALLED: c_int = 0; +pub const PTHREAD_MUTEX_ROBUST: c_int = 1; +pub const PTHREAD_PRIO_NONE: c_int = 0; +pub const PTHREAD_PRIO_INHERIT: c_int = 1; +pub const PTHREAD_PRIO_PROTECT: c_int = 2; +pub const PTHREAD_PROCESS_PRIVATE: c_int = 0; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; +pub const PTHREAD_INHERIT_SCHED: c_int = 0; +pub const PTHREAD_EXPLICIT_SCHED: c_int = 1; pub const __SIZEOF_PTHREAD_COND_T: usize = 48; -pub const RENAME_NOREPLACE: ::c_uint = 1; -pub const RENAME_EXCHANGE: ::c_uint = 2; -pub const RENAME_WHITEOUT: ::c_uint = 4; +pub const RENAME_NOREPLACE: c_uint = 1; +pub const RENAME_EXCHANGE: c_uint = 2; +pub const RENAME_WHITEOUT: c_uint = 4; // netinet/in.h // NOTE: These are in addition to the constants defined in src/unix/mod.rs @@ -2935,1078 +2939,1078 @@ pub const RENAME_WHITEOUT: ::c_uint = 4; and we'll change this following upstream in the future release. \ See #1896 for more info." )] -pub const IPPROTO_MAX: ::c_int = 256; +pub const IPPROTO_MAX: c_int = 256; // System V IPC -pub const IPC_PRIVATE: ::key_t = 0; +pub const IPC_PRIVATE: crate::key_t = 0; -pub const IPC_CREAT: ::c_int = 0o1000; -pub const IPC_EXCL: ::c_int = 0o2000; -pub const IPC_NOWAIT: ::c_int = 0o4000; +pub const IPC_CREAT: c_int = 0o1000; +pub const IPC_EXCL: c_int = 0o2000; +pub const IPC_NOWAIT: c_int = 0o4000; -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; -pub const IPC_INFO: ::c_int = 3; -pub const MSG_STAT: ::c_int = 11; -pub const MSG_INFO: ::c_int = 12; -pub const MSG_NOTIFICATION: ::c_int = 0x8000; +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; +pub const IPC_INFO: c_int = 3; +pub const MSG_STAT: c_int = 11; +pub const MSG_INFO: c_int = 12; +pub const MSG_NOTIFICATION: c_int = 0x8000; -pub const MSG_NOERROR: ::c_int = 0o10000; -pub const MSG_EXCEPT: ::c_int = 0o20000; -pub const MSG_ZEROCOPY: ::c_int = 0x4000000; +pub const MSG_NOERROR: c_int = 0o10000; +pub const MSG_EXCEPT: c_int = 0o20000; +pub const MSG_ZEROCOPY: c_int = 0x4000000; -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; +pub const SHM_R: c_int = 0o400; +pub const SHM_W: c_int = 0o200; -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_REMAP: ::c_int = 0o40000; +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_REMAP: c_int = 0o40000; -pub const SHM_LOCK: ::c_int = 11; -pub const SHM_UNLOCK: ::c_int = 12; +pub const SHM_LOCK: c_int = 11; +pub const SHM_UNLOCK: c_int = 12; -pub const SHM_HUGETLB: ::c_int = 0o4000; +pub const SHM_HUGETLB: c_int = 0o4000; #[cfg(not(all(target_env = "uclibc", target_arch = "mips")))] -pub const SHM_NORESERVE: ::c_int = 0o10000; - -pub const QFMT_VFS_OLD: ::c_int = 1; -pub const QFMT_VFS_V0: ::c_int = 2; -pub const QFMT_VFS_V1: ::c_int = 4; - -pub const EFD_SEMAPHORE: ::c_int = 0x1; - -pub const LOG_NFACILITIES: ::c_int = 24; - -pub const SEM_FAILED: *mut ::sem_t = 0 as *mut sem_t; - -pub const RB_AUTOBOOT: ::c_int = 0x01234567u32 as i32; -pub const RB_HALT_SYSTEM: ::c_int = 0xcdef0123u32 as i32; -pub const RB_ENABLE_CAD: ::c_int = 0x89abcdefu32 as i32; -pub const RB_DISABLE_CAD: ::c_int = 0x00000000u32 as i32; -pub const RB_POWER_OFF: ::c_int = 0x4321fedcu32 as i32; -pub const RB_SW_SUSPEND: ::c_int = 0xd000fce2u32 as i32; -pub const RB_KEXEC: ::c_int = 0x45584543u32 as i32; - -pub const AI_PASSIVE: ::c_int = 0x0001; -pub const AI_CANONNAME: ::c_int = 0x0002; -pub const AI_NUMERICHOST: ::c_int = 0x0004; -pub const AI_V4MAPPED: ::c_int = 0x0008; -pub const AI_ALL: ::c_int = 0x0010; -pub const AI_ADDRCONFIG: ::c_int = 0x0020; - -pub const AI_NUMERICSERV: ::c_int = 0x0400; - -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_NODATA: ::c_int = -5; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_SYSTEM: ::c_int = -11; -pub const EAI_OVERFLOW: ::c_int = -12; - -pub const NI_NUMERICHOST: ::c_int = 1; -pub const NI_NUMERICSERV: ::c_int = 2; -pub const NI_NOFQDN: ::c_int = 4; -pub const NI_NAMEREQD: ::c_int = 8; -pub const NI_DGRAM: ::c_int = 16; -pub const NI_IDN: ::c_int = 32; - -pub const SYNC_FILE_RANGE_WAIT_BEFORE: ::c_uint = 1; -pub const SYNC_FILE_RANGE_WRITE: ::c_uint = 2; -pub const SYNC_FILE_RANGE_WAIT_AFTER: ::c_uint = 4; +pub const SHM_NORESERVE: c_int = 0o10000; + +pub const QFMT_VFS_OLD: c_int = 1; +pub const QFMT_VFS_V0: c_int = 2; +pub const QFMT_VFS_V1: c_int = 4; + +pub const EFD_SEMAPHORE: c_int = 0x1; + +pub const LOG_NFACILITIES: c_int = 24; + +pub const SEM_FAILED: *mut crate::sem_t = 0 as *mut sem_t; + +pub const RB_AUTOBOOT: c_int = 0x01234567u32 as i32; +pub const RB_HALT_SYSTEM: c_int = 0xcdef0123u32 as i32; +pub const RB_ENABLE_CAD: c_int = 0x89abcdefu32 as i32; +pub const RB_DISABLE_CAD: c_int = 0x00000000u32 as i32; +pub const RB_POWER_OFF: c_int = 0x4321fedcu32 as i32; +pub const RB_SW_SUSPEND: c_int = 0xd000fce2u32 as i32; +pub const RB_KEXEC: c_int = 0x45584543u32 as i32; + +pub const AI_PASSIVE: c_int = 0x0001; +pub const AI_CANONNAME: c_int = 0x0002; +pub const AI_NUMERICHOST: c_int = 0x0004; +pub const AI_V4MAPPED: c_int = 0x0008; +pub const AI_ALL: c_int = 0x0010; +pub const AI_ADDRCONFIG: c_int = 0x0020; + +pub const AI_NUMERICSERV: c_int = 0x0400; + +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_NODATA: c_int = -5; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_SYSTEM: c_int = -11; +pub const EAI_OVERFLOW: c_int = -12; + +pub const NI_NUMERICHOST: c_int = 1; +pub const NI_NUMERICSERV: c_int = 2; +pub const NI_NOFQDN: c_int = 4; +pub const NI_NAMEREQD: c_int = 8; +pub const NI_DGRAM: c_int = 16; +pub const NI_IDN: c_int = 32; + +pub const SYNC_FILE_RANGE_WAIT_BEFORE: c_uint = 1; +pub const SYNC_FILE_RANGE_WRITE: c_uint = 2; +pub const SYNC_FILE_RANGE_WAIT_AFTER: c_uint = 4; cfg_if! { if #[cfg(not(target_env = "uclibc"))] { - pub const AIO_CANCELED: ::c_int = 0; - pub const AIO_NOTCANCELED: ::c_int = 1; - pub const AIO_ALLDONE: ::c_int = 2; - pub const LIO_READ: ::c_int = 0; - pub const LIO_WRITE: ::c_int = 1; - pub const LIO_NOP: ::c_int = 2; - pub const LIO_WAIT: ::c_int = 0; - pub const LIO_NOWAIT: ::c_int = 1; - pub const RUSAGE_THREAD: ::c_int = 1; - pub const MSG_COPY: ::c_int = 0o40000; - pub const SHM_EXEC: ::c_int = 0o100000; - pub const IPV6_MULTICAST_ALL: ::c_int = 29; - pub const IPV6_ROUTER_ALERT_ISOLATE: ::c_int = 30; - pub const PACKET_MR_UNICAST: ::c_int = 3; - pub const PTRACE_EVENT_STOP: ::c_int = 128; - pub const UDP_SEGMENT: ::c_int = 103; - pub const UDP_GRO: ::c_int = 104; + pub const AIO_CANCELED: c_int = 0; + pub const AIO_NOTCANCELED: c_int = 1; + pub const AIO_ALLDONE: c_int = 2; + pub const LIO_READ: c_int = 0; + pub const LIO_WRITE: c_int = 1; + pub const LIO_NOP: c_int = 2; + pub const LIO_WAIT: c_int = 0; + pub const LIO_NOWAIT: c_int = 1; + pub const RUSAGE_THREAD: c_int = 1; + pub const MSG_COPY: c_int = 0o40000; + pub const SHM_EXEC: c_int = 0o100000; + pub const IPV6_MULTICAST_ALL: c_int = 29; + pub const IPV6_ROUTER_ALERT_ISOLATE: c_int = 30; + pub const PACKET_MR_UNICAST: c_int = 3; + pub const PTRACE_EVENT_STOP: c_int = 128; + pub const UDP_SEGMENT: c_int = 103; + pub const UDP_GRO: c_int = 104; } } -pub const MREMAP_MAYMOVE: ::c_int = 1; -pub const MREMAP_FIXED: ::c_int = 2; -pub const MREMAP_DONTUNMAP: ::c_int = 4; - -pub const PR_SET_PDEATHSIG: ::c_int = 1; -pub const PR_GET_PDEATHSIG: ::c_int = 2; - -pub const PR_GET_DUMPABLE: ::c_int = 3; -pub const PR_SET_DUMPABLE: ::c_int = 4; - -pub const PR_GET_UNALIGN: ::c_int = 5; -pub const PR_SET_UNALIGN: ::c_int = 6; -pub const PR_UNALIGN_NOPRINT: ::c_int = 1; -pub const PR_UNALIGN_SIGBUS: ::c_int = 2; - -pub const PR_GET_KEEPCAPS: ::c_int = 7; -pub const PR_SET_KEEPCAPS: ::c_int = 8; - -pub const PR_GET_FPEMU: ::c_int = 9; -pub const PR_SET_FPEMU: ::c_int = 10; -pub const PR_FPEMU_NOPRINT: ::c_int = 1; -pub const PR_FPEMU_SIGFPE: ::c_int = 2; - -pub const PR_GET_FPEXC: ::c_int = 11; -pub const PR_SET_FPEXC: ::c_int = 12; -pub const PR_FP_EXC_SW_ENABLE: ::c_int = 0x80; -pub const PR_FP_EXC_DIV: ::c_int = 0x010000; -pub const PR_FP_EXC_OVF: ::c_int = 0x020000; -pub const PR_FP_EXC_UND: ::c_int = 0x040000; -pub const PR_FP_EXC_RES: ::c_int = 0x080000; -pub const PR_FP_EXC_INV: ::c_int = 0x100000; -pub const PR_FP_EXC_DISABLED: ::c_int = 0; -pub const PR_FP_EXC_NONRECOV: ::c_int = 1; -pub const PR_FP_EXC_ASYNC: ::c_int = 2; -pub const PR_FP_EXC_PRECISE: ::c_int = 3; - -pub const PR_GET_TIMING: ::c_int = 13; -pub const PR_SET_TIMING: ::c_int = 14; -pub const PR_TIMING_STATISTICAL: ::c_int = 0; -pub const PR_TIMING_TIMESTAMP: ::c_int = 1; - -pub const PR_SET_NAME: ::c_int = 15; -pub const PR_GET_NAME: ::c_int = 16; - -pub const PR_GET_ENDIAN: ::c_int = 19; -pub const PR_SET_ENDIAN: ::c_int = 20; -pub const PR_ENDIAN_BIG: ::c_int = 0; -pub const PR_ENDIAN_LITTLE: ::c_int = 1; -pub const PR_ENDIAN_PPC_LITTLE: ::c_int = 2; - -pub const PR_GET_SECCOMP: ::c_int = 21; -pub const PR_SET_SECCOMP: ::c_int = 22; - -pub const PR_CAPBSET_READ: ::c_int = 23; -pub const PR_CAPBSET_DROP: ::c_int = 24; - -pub const PR_GET_TSC: ::c_int = 25; -pub const PR_SET_TSC: ::c_int = 26; -pub const PR_TSC_ENABLE: ::c_int = 1; -pub const PR_TSC_SIGSEGV: ::c_int = 2; - -pub const PR_GET_SECUREBITS: ::c_int = 27; -pub const PR_SET_SECUREBITS: ::c_int = 28; - -pub const PR_SET_TIMERSLACK: ::c_int = 29; -pub const PR_GET_TIMERSLACK: ::c_int = 30; - -pub const PR_TASK_PERF_EVENTS_DISABLE: ::c_int = 31; -pub const PR_TASK_PERF_EVENTS_ENABLE: ::c_int = 32; - -pub const PR_MCE_KILL: ::c_int = 33; -pub const PR_MCE_KILL_CLEAR: ::c_int = 0; -pub const PR_MCE_KILL_SET: ::c_int = 1; - -pub const PR_MCE_KILL_LATE: ::c_int = 0; -pub const PR_MCE_KILL_EARLY: ::c_int = 1; -pub const PR_MCE_KILL_DEFAULT: ::c_int = 2; - -pub const PR_MCE_KILL_GET: ::c_int = 34; - -pub const PR_SET_MM: ::c_int = 35; -pub const PR_SET_MM_START_CODE: ::c_int = 1; -pub const PR_SET_MM_END_CODE: ::c_int = 2; -pub const PR_SET_MM_START_DATA: ::c_int = 3; -pub const PR_SET_MM_END_DATA: ::c_int = 4; -pub const PR_SET_MM_START_STACK: ::c_int = 5; -pub const PR_SET_MM_START_BRK: ::c_int = 6; -pub const PR_SET_MM_BRK: ::c_int = 7; -pub const PR_SET_MM_ARG_START: ::c_int = 8; -pub const PR_SET_MM_ARG_END: ::c_int = 9; -pub const PR_SET_MM_ENV_START: ::c_int = 10; -pub const PR_SET_MM_ENV_END: ::c_int = 11; -pub const PR_SET_MM_AUXV: ::c_int = 12; -pub const PR_SET_MM_EXE_FILE: ::c_int = 13; -pub const PR_SET_MM_MAP: ::c_int = 14; -pub const PR_SET_MM_MAP_SIZE: ::c_int = 15; - -pub const PR_SET_PTRACER: ::c_int = 0x59616d61; -pub const PR_SET_PTRACER_ANY: ::c_ulong = 0xffffffffffffffff; - -pub const PR_SET_CHILD_SUBREAPER: ::c_int = 36; -pub const PR_GET_CHILD_SUBREAPER: ::c_int = 37; - -pub const PR_SET_NO_NEW_PRIVS: ::c_int = 38; -pub const PR_GET_NO_NEW_PRIVS: ::c_int = 39; - -pub const PR_GET_TID_ADDRESS: ::c_int = 40; - -pub const PR_SET_THP_DISABLE: ::c_int = 41; -pub const PR_GET_THP_DISABLE: ::c_int = 42; - -pub const PR_MPX_ENABLE_MANAGEMENT: ::c_int = 43; -pub const PR_MPX_DISABLE_MANAGEMENT: ::c_int = 44; - -pub const PR_SET_FP_MODE: ::c_int = 45; -pub const PR_GET_FP_MODE: ::c_int = 46; -pub const PR_FP_MODE_FR: ::c_int = 1 << 0; -pub const PR_FP_MODE_FRE: ::c_int = 1 << 1; - -pub const PR_CAP_AMBIENT: ::c_int = 47; -pub const PR_CAP_AMBIENT_IS_SET: ::c_int = 1; -pub const PR_CAP_AMBIENT_RAISE: ::c_int = 2; -pub const PR_CAP_AMBIENT_LOWER: ::c_int = 3; -pub const PR_CAP_AMBIENT_CLEAR_ALL: ::c_int = 4; - -pub const PR_SET_VMA: ::c_int = 0x53564d41; -pub const PR_SET_VMA_ANON_NAME: ::c_int = 0; - -pub const PR_SCHED_CORE: ::c_int = 62; -pub const PR_SCHED_CORE_GET: ::c_int = 0; -pub const PR_SCHED_CORE_CREATE: ::c_int = 1; -pub const PR_SCHED_CORE_SHARE_TO: ::c_int = 2; -pub const PR_SCHED_CORE_SHARE_FROM: ::c_int = 3; -pub const PR_SCHED_CORE_MAX: ::c_int = 4; -pub const PR_SCHED_CORE_SCOPE_THREAD: ::c_int = 0; -pub const PR_SCHED_CORE_SCOPE_THREAD_GROUP: ::c_int = 1; -pub const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: ::c_int = 2; - -pub const GRND_NONBLOCK: ::c_uint = 0x0001; -pub const GRND_RANDOM: ::c_uint = 0x0002; -pub const GRND_INSECURE: ::c_uint = 0x0004; +pub const MREMAP_MAYMOVE: c_int = 1; +pub const MREMAP_FIXED: c_int = 2; +pub const MREMAP_DONTUNMAP: c_int = 4; + +pub const PR_SET_PDEATHSIG: c_int = 1; +pub const PR_GET_PDEATHSIG: c_int = 2; + +pub const PR_GET_DUMPABLE: c_int = 3; +pub const PR_SET_DUMPABLE: c_int = 4; + +pub const PR_GET_UNALIGN: c_int = 5; +pub const PR_SET_UNALIGN: c_int = 6; +pub const PR_UNALIGN_NOPRINT: c_int = 1; +pub const PR_UNALIGN_SIGBUS: c_int = 2; + +pub const PR_GET_KEEPCAPS: c_int = 7; +pub const PR_SET_KEEPCAPS: c_int = 8; + +pub const PR_GET_FPEMU: c_int = 9; +pub const PR_SET_FPEMU: c_int = 10; +pub const PR_FPEMU_NOPRINT: c_int = 1; +pub const PR_FPEMU_SIGFPE: c_int = 2; + +pub const PR_GET_FPEXC: c_int = 11; +pub const PR_SET_FPEXC: c_int = 12; +pub const PR_FP_EXC_SW_ENABLE: c_int = 0x80; +pub const PR_FP_EXC_DIV: c_int = 0x010000; +pub const PR_FP_EXC_OVF: c_int = 0x020000; +pub const PR_FP_EXC_UND: c_int = 0x040000; +pub const PR_FP_EXC_RES: c_int = 0x080000; +pub const PR_FP_EXC_INV: c_int = 0x100000; +pub const PR_FP_EXC_DISABLED: c_int = 0; +pub const PR_FP_EXC_NONRECOV: c_int = 1; +pub const PR_FP_EXC_ASYNC: c_int = 2; +pub const PR_FP_EXC_PRECISE: c_int = 3; + +pub const PR_GET_TIMING: c_int = 13; +pub const PR_SET_TIMING: c_int = 14; +pub const PR_TIMING_STATISTICAL: c_int = 0; +pub const PR_TIMING_TIMESTAMP: c_int = 1; + +pub const PR_SET_NAME: c_int = 15; +pub const PR_GET_NAME: c_int = 16; + +pub const PR_GET_ENDIAN: c_int = 19; +pub const PR_SET_ENDIAN: c_int = 20; +pub const PR_ENDIAN_BIG: c_int = 0; +pub const PR_ENDIAN_LITTLE: c_int = 1; +pub const PR_ENDIAN_PPC_LITTLE: c_int = 2; + +pub const PR_GET_SECCOMP: c_int = 21; +pub const PR_SET_SECCOMP: c_int = 22; + +pub const PR_CAPBSET_READ: c_int = 23; +pub const PR_CAPBSET_DROP: c_int = 24; + +pub const PR_GET_TSC: c_int = 25; +pub const PR_SET_TSC: c_int = 26; +pub const PR_TSC_ENABLE: c_int = 1; +pub const PR_TSC_SIGSEGV: c_int = 2; + +pub const PR_GET_SECUREBITS: c_int = 27; +pub const PR_SET_SECUREBITS: c_int = 28; + +pub const PR_SET_TIMERSLACK: c_int = 29; +pub const PR_GET_TIMERSLACK: c_int = 30; + +pub const PR_TASK_PERF_EVENTS_DISABLE: c_int = 31; +pub const PR_TASK_PERF_EVENTS_ENABLE: c_int = 32; + +pub const PR_MCE_KILL: c_int = 33; +pub const PR_MCE_KILL_CLEAR: c_int = 0; +pub const PR_MCE_KILL_SET: c_int = 1; + +pub const PR_MCE_KILL_LATE: c_int = 0; +pub const PR_MCE_KILL_EARLY: c_int = 1; +pub const PR_MCE_KILL_DEFAULT: c_int = 2; + +pub const PR_MCE_KILL_GET: c_int = 34; + +pub const PR_SET_MM: c_int = 35; +pub const PR_SET_MM_START_CODE: c_int = 1; +pub const PR_SET_MM_END_CODE: c_int = 2; +pub const PR_SET_MM_START_DATA: c_int = 3; +pub const PR_SET_MM_END_DATA: c_int = 4; +pub const PR_SET_MM_START_STACK: c_int = 5; +pub const PR_SET_MM_START_BRK: c_int = 6; +pub const PR_SET_MM_BRK: c_int = 7; +pub const PR_SET_MM_ARG_START: c_int = 8; +pub const PR_SET_MM_ARG_END: c_int = 9; +pub const PR_SET_MM_ENV_START: c_int = 10; +pub const PR_SET_MM_ENV_END: c_int = 11; +pub const PR_SET_MM_AUXV: c_int = 12; +pub const PR_SET_MM_EXE_FILE: c_int = 13; +pub const PR_SET_MM_MAP: c_int = 14; +pub const PR_SET_MM_MAP_SIZE: c_int = 15; + +pub const PR_SET_PTRACER: c_int = 0x59616d61; +pub const PR_SET_PTRACER_ANY: c_ulong = 0xffffffffffffffff; + +pub const PR_SET_CHILD_SUBREAPER: c_int = 36; +pub const PR_GET_CHILD_SUBREAPER: c_int = 37; + +pub const PR_SET_NO_NEW_PRIVS: c_int = 38; +pub const PR_GET_NO_NEW_PRIVS: c_int = 39; + +pub const PR_GET_TID_ADDRESS: c_int = 40; + +pub const PR_SET_THP_DISABLE: c_int = 41; +pub const PR_GET_THP_DISABLE: c_int = 42; + +pub const PR_MPX_ENABLE_MANAGEMENT: c_int = 43; +pub const PR_MPX_DISABLE_MANAGEMENT: c_int = 44; + +pub const PR_SET_FP_MODE: c_int = 45; +pub const PR_GET_FP_MODE: c_int = 46; +pub const PR_FP_MODE_FR: c_int = 1 << 0; +pub const PR_FP_MODE_FRE: c_int = 1 << 1; + +pub const PR_CAP_AMBIENT: c_int = 47; +pub const PR_CAP_AMBIENT_IS_SET: c_int = 1; +pub const PR_CAP_AMBIENT_RAISE: c_int = 2; +pub const PR_CAP_AMBIENT_LOWER: c_int = 3; +pub const PR_CAP_AMBIENT_CLEAR_ALL: c_int = 4; + +pub const PR_SET_VMA: c_int = 0x53564d41; +pub const PR_SET_VMA_ANON_NAME: c_int = 0; + +pub const PR_SCHED_CORE: c_int = 62; +pub const PR_SCHED_CORE_GET: c_int = 0; +pub const PR_SCHED_CORE_CREATE: c_int = 1; +pub const PR_SCHED_CORE_SHARE_TO: c_int = 2; +pub const PR_SCHED_CORE_SHARE_FROM: c_int = 3; +pub const PR_SCHED_CORE_MAX: c_int = 4; +pub const PR_SCHED_CORE_SCOPE_THREAD: c_int = 0; +pub const PR_SCHED_CORE_SCOPE_THREAD_GROUP: c_int = 1; +pub const PR_SCHED_CORE_SCOPE_PROCESS_GROUP: c_int = 2; + +pub const GRND_NONBLOCK: c_uint = 0x0001; +pub const GRND_RANDOM: c_uint = 0x0002; +pub const GRND_INSECURE: c_uint = 0x0004; // -pub const SECCOMP_MODE_DISABLED: ::c_uint = 0; -pub const SECCOMP_MODE_STRICT: ::c_uint = 1; -pub const SECCOMP_MODE_FILTER: ::c_uint = 2; - -pub const SECCOMP_SET_MODE_STRICT: ::c_uint = 0; -pub const SECCOMP_SET_MODE_FILTER: ::c_uint = 1; -pub const SECCOMP_GET_ACTION_AVAIL: ::c_uint = 2; -pub const SECCOMP_GET_NOTIF_SIZES: ::c_uint = 3; - -pub const SECCOMP_FILTER_FLAG_TSYNC: ::c_ulong = 1; -pub const SECCOMP_FILTER_FLAG_LOG: ::c_ulong = 2; -pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: ::c_ulong = 4; -pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: ::c_ulong = 8; -pub const SECCOMP_FILTER_FLAG_TSYNC_ESRCH: ::c_ulong = 16; -pub const SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV: ::c_ulong = 32; - -pub const SECCOMP_RET_KILL_PROCESS: ::c_uint = 0x80000000; -pub const SECCOMP_RET_KILL_THREAD: ::c_uint = 0x00000000; -pub const SECCOMP_RET_KILL: ::c_uint = SECCOMP_RET_KILL_THREAD; -pub const SECCOMP_RET_TRAP: ::c_uint = 0x00030000; -pub const SECCOMP_RET_ERRNO: ::c_uint = 0x00050000; -pub const SECCOMP_RET_TRACE: ::c_uint = 0x7ff00000; -pub const SECCOMP_RET_LOG: ::c_uint = 0x7ffc0000; -pub const SECCOMP_RET_ALLOW: ::c_uint = 0x7fff0000; - -pub const SECCOMP_RET_ACTION_FULL: ::c_uint = 0xffff0000; -pub const SECCOMP_RET_ACTION: ::c_uint = 0x7fff0000; -pub const SECCOMP_RET_DATA: ::c_uint = 0x0000ffff; - -pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: ::c_ulong = 1; - -pub const SECCOMP_ADDFD_FLAG_SETFD: ::c_ulong = 1; -pub const SECCOMP_ADDFD_FLAG_SEND: ::c_ulong = 2; - -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; - -pub const TFD_CLOEXEC: ::c_int = O_CLOEXEC; -pub const TFD_NONBLOCK: ::c_int = O_NONBLOCK; -pub const TFD_TIMER_ABSTIME: ::c_int = 1; -pub const TFD_TIMER_CANCEL_ON_SET: ::c_int = 2; - -pub const _POSIX_VDISABLE: ::cc_t = 0; - -pub const FALLOC_FL_KEEP_SIZE: ::c_int = 0x01; -pub const FALLOC_FL_PUNCH_HOLE: ::c_int = 0x02; -pub const FALLOC_FL_COLLAPSE_RANGE: ::c_int = 0x08; -pub const FALLOC_FL_ZERO_RANGE: ::c_int = 0x10; -pub const FALLOC_FL_INSERT_RANGE: ::c_int = 0x20; -pub const FALLOC_FL_UNSHARE_RANGE: ::c_int = 0x40; +pub const SECCOMP_MODE_DISABLED: c_uint = 0; +pub const SECCOMP_MODE_STRICT: c_uint = 1; +pub const SECCOMP_MODE_FILTER: c_uint = 2; + +pub const SECCOMP_SET_MODE_STRICT: c_uint = 0; +pub const SECCOMP_SET_MODE_FILTER: c_uint = 1; +pub const SECCOMP_GET_ACTION_AVAIL: c_uint = 2; +pub const SECCOMP_GET_NOTIF_SIZES: c_uint = 3; + +pub const SECCOMP_FILTER_FLAG_TSYNC: c_ulong = 1; +pub const SECCOMP_FILTER_FLAG_LOG: c_ulong = 2; +pub const SECCOMP_FILTER_FLAG_SPEC_ALLOW: c_ulong = 4; +pub const SECCOMP_FILTER_FLAG_NEW_LISTENER: c_ulong = 8; +pub const SECCOMP_FILTER_FLAG_TSYNC_ESRCH: c_ulong = 16; +pub const SECCOMP_FILTER_FLAG_WAIT_KILLABLE_RECV: c_ulong = 32; + +pub const SECCOMP_RET_KILL_PROCESS: c_uint = 0x80000000; +pub const SECCOMP_RET_KILL_THREAD: c_uint = 0x00000000; +pub const SECCOMP_RET_KILL: c_uint = SECCOMP_RET_KILL_THREAD; +pub const SECCOMP_RET_TRAP: c_uint = 0x00030000; +pub const SECCOMP_RET_ERRNO: c_uint = 0x00050000; +pub const SECCOMP_RET_TRACE: c_uint = 0x7ff00000; +pub const SECCOMP_RET_LOG: c_uint = 0x7ffc0000; +pub const SECCOMP_RET_ALLOW: c_uint = 0x7fff0000; + +pub const SECCOMP_RET_ACTION_FULL: c_uint = 0xffff0000; +pub const SECCOMP_RET_ACTION: c_uint = 0x7fff0000; +pub const SECCOMP_RET_DATA: c_uint = 0x0000ffff; + +pub const SECCOMP_USER_NOTIF_FLAG_CONTINUE: c_ulong = 1; + +pub const SECCOMP_ADDFD_FLAG_SETFD: c_ulong = 1; +pub const SECCOMP_ADDFD_FLAG_SEND: c_ulong = 2; + +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; + +pub const TFD_CLOEXEC: c_int = O_CLOEXEC; +pub const TFD_NONBLOCK: c_int = O_NONBLOCK; +pub const TFD_TIMER_ABSTIME: c_int = 1; +pub const TFD_TIMER_CANCEL_ON_SET: c_int = 2; + +pub const _POSIX_VDISABLE: crate::cc_t = 0; + +pub const FALLOC_FL_KEEP_SIZE: c_int = 0x01; +pub const FALLOC_FL_PUNCH_HOLE: c_int = 0x02; +pub const FALLOC_FL_COLLAPSE_RANGE: c_int = 0x08; +pub const FALLOC_FL_ZERO_RANGE: c_int = 0x10; +pub const FALLOC_FL_INSERT_RANGE: c_int = 0x20; +pub const FALLOC_FL_UNSHARE_RANGE: c_int = 0x40; #[deprecated( since = "0.2.55", note = "ENOATTR is not available on Linux; use ENODATA instead" )] -pub const ENOATTR: ::c_int = ::ENODATA; +pub const ENOATTR: c_int = crate::ENODATA; -pub const SO_ORIGINAL_DST: ::c_int = 80; +pub const SO_ORIGINAL_DST: c_int = 80; -pub const IP_RECVFRAGSIZE: ::c_int = 25; +pub const IP_RECVFRAGSIZE: c_int = 25; -pub const IPV6_FLOWINFO: ::c_int = 11; -pub const IPV6_FLOWLABEL_MGR: ::c_int = 32; -pub const IPV6_FLOWINFO_SEND: ::c_int = 33; -pub const IPV6_RECVFRAGSIZE: ::c_int = 77; -pub const IPV6_FREEBIND: ::c_int = 78; -pub const IPV6_FLOWINFO_FLOWLABEL: ::c_int = 0x000fffff; -pub const IPV6_FLOWINFO_PRIORITY: ::c_int = 0x0ff00000; +pub const IPV6_FLOWINFO: c_int = 11; +pub const IPV6_FLOWLABEL_MGR: c_int = 32; +pub const IPV6_FLOWINFO_SEND: c_int = 33; +pub const IPV6_RECVFRAGSIZE: c_int = 77; +pub const IPV6_FREEBIND: c_int = 78; +pub const IPV6_FLOWINFO_FLOWLABEL: c_int = 0x000fffff; +pub const IPV6_FLOWINFO_PRIORITY: c_int = 0x0ff00000; -pub const IPV6_RTHDR_LOOSE: ::c_int = 0; -pub const IPV6_RTHDR_STRICT: ::c_int = 1; +pub const IPV6_RTHDR_LOOSE: c_int = 0; +pub const IPV6_RTHDR_STRICT: c_int = 1; // SO_MEMINFO offsets -pub const SK_MEMINFO_RMEM_ALLOC: ::c_int = 0; -pub const SK_MEMINFO_RCVBUF: ::c_int = 1; -pub const SK_MEMINFO_WMEM_ALLOC: ::c_int = 2; -pub const SK_MEMINFO_SNDBUF: ::c_int = 3; -pub const SK_MEMINFO_FWD_ALLOC: ::c_int = 4; -pub const SK_MEMINFO_WMEM_QUEUED: ::c_int = 5; -pub const SK_MEMINFO_OPTMEM: ::c_int = 6; -pub const SK_MEMINFO_BACKLOG: ::c_int = 7; -pub const SK_MEMINFO_DROPS: ::c_int = 8; - -pub const IUTF8: ::tcflag_t = 0x00004000; +pub const SK_MEMINFO_RMEM_ALLOC: c_int = 0; +pub const SK_MEMINFO_RCVBUF: c_int = 1; +pub const SK_MEMINFO_WMEM_ALLOC: c_int = 2; +pub const SK_MEMINFO_SNDBUF: c_int = 3; +pub const SK_MEMINFO_FWD_ALLOC: c_int = 4; +pub const SK_MEMINFO_WMEM_QUEUED: c_int = 5; +pub const SK_MEMINFO_OPTMEM: c_int = 6; +pub const SK_MEMINFO_BACKLOG: c_int = 7; +pub const SK_MEMINFO_DROPS: c_int = 8; + +pub const IUTF8: crate::tcflag_t = 0x00004000; #[cfg(not(all(target_env = "uclibc", target_arch = "mips")))] -pub const CMSPAR: ::tcflag_t = 0o10000000000; - -pub const MFD_CLOEXEC: ::c_uint = 0x0001; -pub const MFD_ALLOW_SEALING: ::c_uint = 0x0002; -pub const MFD_HUGETLB: ::c_uint = 0x0004; -pub const MFD_NOEXEC_SEAL: ::c_uint = 0x0008; -pub const MFD_EXEC: ::c_uint = 0x0010; -pub const MFD_HUGE_64KB: ::c_uint = 0x40000000; -pub const MFD_HUGE_512KB: ::c_uint = 0x4c000000; -pub const MFD_HUGE_1MB: ::c_uint = 0x50000000; -pub const MFD_HUGE_2MB: ::c_uint = 0x54000000; -pub const MFD_HUGE_8MB: ::c_uint = 0x5c000000; -pub const MFD_HUGE_16MB: ::c_uint = 0x60000000; -pub const MFD_HUGE_32MB: ::c_uint = 0x64000000; -pub const MFD_HUGE_256MB: ::c_uint = 0x70000000; -pub const MFD_HUGE_512MB: ::c_uint = 0x74000000; -pub const MFD_HUGE_1GB: ::c_uint = 0x78000000; -pub const MFD_HUGE_2GB: ::c_uint = 0x7c000000; -pub const MFD_HUGE_16GB: ::c_uint = 0x88000000; -pub const MFD_HUGE_MASK: ::c_uint = 63; -pub const MFD_HUGE_SHIFT: ::c_uint = 26; +pub const CMSPAR: crate::tcflag_t = 0o10000000000; + +pub const MFD_CLOEXEC: c_uint = 0x0001; +pub const MFD_ALLOW_SEALING: c_uint = 0x0002; +pub const MFD_HUGETLB: c_uint = 0x0004; +pub const MFD_NOEXEC_SEAL: c_uint = 0x0008; +pub const MFD_EXEC: c_uint = 0x0010; +pub const MFD_HUGE_64KB: c_uint = 0x40000000; +pub const MFD_HUGE_512KB: c_uint = 0x4c000000; +pub const MFD_HUGE_1MB: c_uint = 0x50000000; +pub const MFD_HUGE_2MB: c_uint = 0x54000000; +pub const MFD_HUGE_8MB: c_uint = 0x5c000000; +pub const MFD_HUGE_16MB: c_uint = 0x60000000; +pub const MFD_HUGE_32MB: c_uint = 0x64000000; +pub const MFD_HUGE_256MB: c_uint = 0x70000000; +pub const MFD_HUGE_512MB: c_uint = 0x74000000; +pub const MFD_HUGE_1GB: c_uint = 0x78000000; +pub const MFD_HUGE_2GB: c_uint = 0x7c000000; +pub const MFD_HUGE_16GB: c_uint = 0x88000000; +pub const MFD_HUGE_MASK: c_uint = 63; +pub const MFD_HUGE_SHIFT: c_uint = 26; // linux/close_range.h -pub const CLOSE_RANGE_UNSHARE: ::c_uint = 1 << 1; -pub const CLOSE_RANGE_CLOEXEC: ::c_uint = 1 << 2; +pub const CLOSE_RANGE_UNSHARE: c_uint = 1 << 1; +pub const CLOSE_RANGE_CLOEXEC: c_uint = 1 << 2; // linux/filter.h -pub const SKF_AD_OFF: ::c_int = -0x1000; -pub const SKF_AD_PROTOCOL: ::c_int = 0; -pub const SKF_AD_PKTTYPE: ::c_int = 4; -pub const SKF_AD_IFINDEX: ::c_int = 8; -pub const SKF_AD_NLATTR: ::c_int = 12; -pub const SKF_AD_NLATTR_NEST: ::c_int = 16; -pub const SKF_AD_MARK: ::c_int = 20; -pub const SKF_AD_QUEUE: ::c_int = 24; -pub const SKF_AD_HATYPE: ::c_int = 28; -pub const SKF_AD_RXHASH: ::c_int = 32; -pub const SKF_AD_CPU: ::c_int = 36; -pub const SKF_AD_ALU_XOR_X: ::c_int = 40; -pub const SKF_AD_VLAN_TAG: ::c_int = 44; -pub const SKF_AD_VLAN_TAG_PRESENT: ::c_int = 48; -pub const SKF_AD_PAY_OFFSET: ::c_int = 52; -pub const SKF_AD_RANDOM: ::c_int = 56; -pub const SKF_AD_VLAN_TPID: ::c_int = 60; -pub const SKF_AD_MAX: ::c_int = 64; -pub const SKF_NET_OFF: ::c_int = -0x100000; -pub const SKF_LL_OFF: ::c_int = -0x200000; -pub const BPF_NET_OFF: ::c_int = SKF_NET_OFF; -pub const BPF_LL_OFF: ::c_int = SKF_LL_OFF; -pub const BPF_MEMWORDS: ::c_int = 16; -pub const BPF_MAXINSNS: ::c_int = 4096; +pub const SKF_AD_OFF: c_int = -0x1000; +pub const SKF_AD_PROTOCOL: c_int = 0; +pub const SKF_AD_PKTTYPE: c_int = 4; +pub const SKF_AD_IFINDEX: c_int = 8; +pub const SKF_AD_NLATTR: c_int = 12; +pub const SKF_AD_NLATTR_NEST: c_int = 16; +pub const SKF_AD_MARK: c_int = 20; +pub const SKF_AD_QUEUE: c_int = 24; +pub const SKF_AD_HATYPE: c_int = 28; +pub const SKF_AD_RXHASH: c_int = 32; +pub const SKF_AD_CPU: c_int = 36; +pub const SKF_AD_ALU_XOR_X: c_int = 40; +pub const SKF_AD_VLAN_TAG: c_int = 44; +pub const SKF_AD_VLAN_TAG_PRESENT: c_int = 48; +pub const SKF_AD_PAY_OFFSET: c_int = 52; +pub const SKF_AD_RANDOM: c_int = 56; +pub const SKF_AD_VLAN_TPID: c_int = 60; +pub const SKF_AD_MAX: c_int = 64; +pub const SKF_NET_OFF: c_int = -0x100000; +pub const SKF_LL_OFF: c_int = -0x200000; +pub const BPF_NET_OFF: c_int = SKF_NET_OFF; +pub const BPF_LL_OFF: c_int = SKF_LL_OFF; +pub const BPF_MEMWORDS: c_int = 16; +pub const BPF_MAXINSNS: c_int = 4096; // linux/bpf_common.h -pub const BPF_LD: ::__u32 = 0x00; -pub const BPF_LDX: ::__u32 = 0x01; -pub const BPF_ST: ::__u32 = 0x02; -pub const BPF_STX: ::__u32 = 0x03; -pub const BPF_ALU: ::__u32 = 0x04; -pub const BPF_JMP: ::__u32 = 0x05; -pub const BPF_RET: ::__u32 = 0x06; -pub const BPF_MISC: ::__u32 = 0x07; -pub const BPF_W: ::__u32 = 0x00; -pub const BPF_H: ::__u32 = 0x08; -pub const BPF_B: ::__u32 = 0x10; -pub const BPF_IMM: ::__u32 = 0x00; -pub const BPF_ABS: ::__u32 = 0x20; -pub const BPF_IND: ::__u32 = 0x40; -pub const BPF_MEM: ::__u32 = 0x60; -pub const BPF_LEN: ::__u32 = 0x80; -pub const BPF_MSH: ::__u32 = 0xa0; -pub const BPF_ADD: ::__u32 = 0x00; -pub const BPF_SUB: ::__u32 = 0x10; -pub const BPF_MUL: ::__u32 = 0x20; -pub const BPF_DIV: ::__u32 = 0x30; -pub const BPF_OR: ::__u32 = 0x40; -pub const BPF_AND: ::__u32 = 0x50; -pub const BPF_LSH: ::__u32 = 0x60; -pub const BPF_RSH: ::__u32 = 0x70; -pub const BPF_NEG: ::__u32 = 0x80; -pub const BPF_MOD: ::__u32 = 0x90; -pub const BPF_XOR: ::__u32 = 0xa0; -pub const BPF_JA: ::__u32 = 0x00; -pub const BPF_JEQ: ::__u32 = 0x10; -pub const BPF_JGT: ::__u32 = 0x20; -pub const BPF_JGE: ::__u32 = 0x30; -pub const BPF_JSET: ::__u32 = 0x40; -pub const BPF_K: ::__u32 = 0x00; -pub const BPF_X: ::__u32 = 0x08; +pub const BPF_LD: __u32 = 0x00; +pub const BPF_LDX: __u32 = 0x01; +pub const BPF_ST: __u32 = 0x02; +pub const BPF_STX: __u32 = 0x03; +pub const BPF_ALU: __u32 = 0x04; +pub const BPF_JMP: __u32 = 0x05; +pub const BPF_RET: __u32 = 0x06; +pub const BPF_MISC: __u32 = 0x07; +pub const BPF_W: __u32 = 0x00; +pub const BPF_H: __u32 = 0x08; +pub const BPF_B: __u32 = 0x10; +pub const BPF_IMM: __u32 = 0x00; +pub const BPF_ABS: __u32 = 0x20; +pub const BPF_IND: __u32 = 0x40; +pub const BPF_MEM: __u32 = 0x60; +pub const BPF_LEN: __u32 = 0x80; +pub const BPF_MSH: __u32 = 0xa0; +pub const BPF_ADD: __u32 = 0x00; +pub const BPF_SUB: __u32 = 0x10; +pub const BPF_MUL: __u32 = 0x20; +pub const BPF_DIV: __u32 = 0x30; +pub const BPF_OR: __u32 = 0x40; +pub const BPF_AND: __u32 = 0x50; +pub const BPF_LSH: __u32 = 0x60; +pub const BPF_RSH: __u32 = 0x70; +pub const BPF_NEG: __u32 = 0x80; +pub const BPF_MOD: __u32 = 0x90; +pub const BPF_XOR: __u32 = 0xa0; +pub const BPF_JA: __u32 = 0x00; +pub const BPF_JEQ: __u32 = 0x10; +pub const BPF_JGT: __u32 = 0x20; +pub const BPF_JGE: __u32 = 0x30; +pub const BPF_JSET: __u32 = 0x40; +pub const BPF_K: __u32 = 0x00; +pub const BPF_X: __u32 = 0x08; // linux/openat2.h -pub const RESOLVE_NO_XDEV: ::__u64 = 0x01; -pub const RESOLVE_NO_MAGICLINKS: ::__u64 = 0x02; -pub const RESOLVE_NO_SYMLINKS: ::__u64 = 0x04; -pub const RESOLVE_BENEATH: ::__u64 = 0x08; -pub const RESOLVE_IN_ROOT: ::__u64 = 0x10; -pub const RESOLVE_CACHED: ::__u64 = 0x20; +pub const RESOLVE_NO_XDEV: crate::__u64 = 0x01; +pub const RESOLVE_NO_MAGICLINKS: crate::__u64 = 0x02; +pub const RESOLVE_NO_SYMLINKS: crate::__u64 = 0x04; +pub const RESOLVE_BENEATH: crate::__u64 = 0x08; +pub const RESOLVE_IN_ROOT: crate::__u64 = 0x10; +pub const RESOLVE_CACHED: crate::__u64 = 0x20; // linux/if_ether.h -pub const ETH_ALEN: ::c_int = 6; -pub const ETH_HLEN: ::c_int = 14; -pub const ETH_ZLEN: ::c_int = 60; -pub const ETH_DATA_LEN: ::c_int = 1500; -pub const ETH_FRAME_LEN: ::c_int = 1514; -pub const ETH_FCS_LEN: ::c_int = 4; +pub const ETH_ALEN: c_int = 6; +pub const ETH_HLEN: c_int = 14; +pub const ETH_ZLEN: c_int = 60; +pub const ETH_DATA_LEN: c_int = 1500; +pub const ETH_FRAME_LEN: c_int = 1514; +pub const ETH_FCS_LEN: c_int = 4; // These are the defined Ethernet Protocol ID's. -pub const ETH_P_LOOP: ::c_int = 0x0060; -pub const ETH_P_PUP: ::c_int = 0x0200; -pub const ETH_P_PUPAT: ::c_int = 0x0201; -pub const ETH_P_IP: ::c_int = 0x0800; -pub const ETH_P_X25: ::c_int = 0x0805; -pub const ETH_P_ARP: ::c_int = 0x0806; -pub const ETH_P_BPQ: ::c_int = 0x08FF; -pub const ETH_P_IEEEPUP: ::c_int = 0x0a00; -pub const ETH_P_IEEEPUPAT: ::c_int = 0x0a01; -pub const ETH_P_BATMAN: ::c_int = 0x4305; -pub const ETH_P_DEC: ::c_int = 0x6000; -pub const ETH_P_DNA_DL: ::c_int = 0x6001; -pub const ETH_P_DNA_RC: ::c_int = 0x6002; -pub const ETH_P_DNA_RT: ::c_int = 0x6003; -pub const ETH_P_LAT: ::c_int = 0x6004; -pub const ETH_P_DIAG: ::c_int = 0x6005; -pub const ETH_P_CUST: ::c_int = 0x6006; -pub const ETH_P_SCA: ::c_int = 0x6007; -pub const ETH_P_TEB: ::c_int = 0x6558; -pub const ETH_P_RARP: ::c_int = 0x8035; -pub const ETH_P_ATALK: ::c_int = 0x809B; -pub const ETH_P_AARP: ::c_int = 0x80F3; -pub const ETH_P_8021Q: ::c_int = 0x8100; -pub const ETH_P_IPX: ::c_int = 0x8137; -pub const ETH_P_IPV6: ::c_int = 0x86DD; -pub const ETH_P_PAUSE: ::c_int = 0x8808; -pub const ETH_P_SLOW: ::c_int = 0x8809; -pub const ETH_P_WCCP: ::c_int = 0x883E; -pub const ETH_P_MPLS_UC: ::c_int = 0x8847; -pub const ETH_P_MPLS_MC: ::c_int = 0x8848; -pub const ETH_P_ATMMPOA: ::c_int = 0x884c; -pub const ETH_P_PPP_DISC: ::c_int = 0x8863; -pub const ETH_P_PPP_SES: ::c_int = 0x8864; -pub const ETH_P_LINK_CTL: ::c_int = 0x886c; -pub const ETH_P_ATMFATE: ::c_int = 0x8884; -pub const ETH_P_PAE: ::c_int = 0x888E; -pub const ETH_P_AOE: ::c_int = 0x88A2; -pub const ETH_P_8021AD: ::c_int = 0x88A8; -pub const ETH_P_802_EX1: ::c_int = 0x88B5; -pub const ETH_P_TIPC: ::c_int = 0x88CA; -pub const ETH_P_MACSEC: ::c_int = 0x88E5; -pub const ETH_P_8021AH: ::c_int = 0x88E7; -pub const ETH_P_MVRP: ::c_int = 0x88F5; -pub const ETH_P_1588: ::c_int = 0x88F7; -pub const ETH_P_PRP: ::c_int = 0x88FB; -pub const ETH_P_FCOE: ::c_int = 0x8906; -pub const ETH_P_TDLS: ::c_int = 0x890D; -pub const ETH_P_FIP: ::c_int = 0x8914; -pub const ETH_P_80221: ::c_int = 0x8917; -pub const ETH_P_LOOPBACK: ::c_int = 0x9000; -pub const ETH_P_QINQ1: ::c_int = 0x9100; -pub const ETH_P_QINQ2: ::c_int = 0x9200; -pub const ETH_P_QINQ3: ::c_int = 0x9300; -pub const ETH_P_EDSA: ::c_int = 0xDADA; -pub const ETH_P_AF_IUCV: ::c_int = 0xFBFB; - -pub const ETH_P_802_3_MIN: ::c_int = 0x0600; +pub const ETH_P_LOOP: c_int = 0x0060; +pub const ETH_P_PUP: c_int = 0x0200; +pub const ETH_P_PUPAT: c_int = 0x0201; +pub const ETH_P_IP: c_int = 0x0800; +pub const ETH_P_X25: c_int = 0x0805; +pub const ETH_P_ARP: c_int = 0x0806; +pub const ETH_P_BPQ: c_int = 0x08FF; +pub const ETH_P_IEEEPUP: c_int = 0x0a00; +pub const ETH_P_IEEEPUPAT: c_int = 0x0a01; +pub const ETH_P_BATMAN: c_int = 0x4305; +pub const ETH_P_DEC: c_int = 0x6000; +pub const ETH_P_DNA_DL: c_int = 0x6001; +pub const ETH_P_DNA_RC: c_int = 0x6002; +pub const ETH_P_DNA_RT: c_int = 0x6003; +pub const ETH_P_LAT: c_int = 0x6004; +pub const ETH_P_DIAG: c_int = 0x6005; +pub const ETH_P_CUST: c_int = 0x6006; +pub const ETH_P_SCA: c_int = 0x6007; +pub const ETH_P_TEB: c_int = 0x6558; +pub const ETH_P_RARP: c_int = 0x8035; +pub const ETH_P_ATALK: c_int = 0x809B; +pub const ETH_P_AARP: c_int = 0x80F3; +pub const ETH_P_8021Q: c_int = 0x8100; +pub const ETH_P_IPX: c_int = 0x8137; +pub const ETH_P_IPV6: c_int = 0x86DD; +pub const ETH_P_PAUSE: c_int = 0x8808; +pub const ETH_P_SLOW: c_int = 0x8809; +pub const ETH_P_WCCP: c_int = 0x883E; +pub const ETH_P_MPLS_UC: c_int = 0x8847; +pub const ETH_P_MPLS_MC: c_int = 0x8848; +pub const ETH_P_ATMMPOA: c_int = 0x884c; +pub const ETH_P_PPP_DISC: c_int = 0x8863; +pub const ETH_P_PPP_SES: c_int = 0x8864; +pub const ETH_P_LINK_CTL: c_int = 0x886c; +pub const ETH_P_ATMFATE: c_int = 0x8884; +pub const ETH_P_PAE: c_int = 0x888E; +pub const ETH_P_AOE: c_int = 0x88A2; +pub const ETH_P_8021AD: c_int = 0x88A8; +pub const ETH_P_802_EX1: c_int = 0x88B5; +pub const ETH_P_TIPC: c_int = 0x88CA; +pub const ETH_P_MACSEC: c_int = 0x88E5; +pub const ETH_P_8021AH: c_int = 0x88E7; +pub const ETH_P_MVRP: c_int = 0x88F5; +pub const ETH_P_1588: c_int = 0x88F7; +pub const ETH_P_PRP: c_int = 0x88FB; +pub const ETH_P_FCOE: c_int = 0x8906; +pub const ETH_P_TDLS: c_int = 0x890D; +pub const ETH_P_FIP: c_int = 0x8914; +pub const ETH_P_80221: c_int = 0x8917; +pub const ETH_P_LOOPBACK: c_int = 0x9000; +pub const ETH_P_QINQ1: c_int = 0x9100; +pub const ETH_P_QINQ2: c_int = 0x9200; +pub const ETH_P_QINQ3: c_int = 0x9300; +pub const ETH_P_EDSA: c_int = 0xDADA; +pub const ETH_P_AF_IUCV: c_int = 0xFBFB; + +pub const ETH_P_802_3_MIN: c_int = 0x0600; // Non DIX types. Won't clash for 1500 types. -pub const ETH_P_802_3: ::c_int = 0x0001; -pub const ETH_P_AX25: ::c_int = 0x0002; -pub const ETH_P_ALL: ::c_int = 0x0003; -pub const ETH_P_802_2: ::c_int = 0x0004; -pub const ETH_P_SNAP: ::c_int = 0x0005; -pub const ETH_P_DDCMP: ::c_int = 0x0006; -pub const ETH_P_WAN_PPP: ::c_int = 0x0007; -pub const ETH_P_PPP_MP: ::c_int = 0x0008; -pub const ETH_P_LOCALTALK: ::c_int = 0x0009; -pub const ETH_P_CANFD: ::c_int = 0x000D; -pub const ETH_P_PPPTALK: ::c_int = 0x0010; -pub const ETH_P_TR_802_2: ::c_int = 0x0011; -pub const ETH_P_MOBITEX: ::c_int = 0x0015; -pub const ETH_P_CONTROL: ::c_int = 0x0016; -pub const ETH_P_IRDA: ::c_int = 0x0017; -pub const ETH_P_ECONET: ::c_int = 0x0018; -pub const ETH_P_HDLC: ::c_int = 0x0019; -pub const ETH_P_ARCNET: ::c_int = 0x001A; -pub const ETH_P_DSA: ::c_int = 0x001B; -pub const ETH_P_TRAILER: ::c_int = 0x001C; -pub const ETH_P_PHONET: ::c_int = 0x00F5; -pub const ETH_P_IEEE802154: ::c_int = 0x00F6; -pub const ETH_P_CAIF: ::c_int = 0x00F7; - -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x01; -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x02; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x04; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x08; -pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_short = 0x10; -pub const POSIX_SPAWN_SETSCHEDULER: ::c_short = 0x20; - -pub const NLMSG_NOOP: ::c_int = 0x1; -pub const NLMSG_ERROR: ::c_int = 0x2; -pub const NLMSG_DONE: ::c_int = 0x3; -pub const NLMSG_OVERRUN: ::c_int = 0x4; -pub const NLMSG_MIN_TYPE: ::c_int = 0x10; +pub const ETH_P_802_3: c_int = 0x0001; +pub const ETH_P_AX25: c_int = 0x0002; +pub const ETH_P_ALL: c_int = 0x0003; +pub const ETH_P_802_2: c_int = 0x0004; +pub const ETH_P_SNAP: c_int = 0x0005; +pub const ETH_P_DDCMP: c_int = 0x0006; +pub const ETH_P_WAN_PPP: c_int = 0x0007; +pub const ETH_P_PPP_MP: c_int = 0x0008; +pub const ETH_P_LOCALTALK: c_int = 0x0009; +pub const ETH_P_CANFD: c_int = 0x000D; +pub const ETH_P_PPPTALK: c_int = 0x0010; +pub const ETH_P_TR_802_2: c_int = 0x0011; +pub const ETH_P_MOBITEX: c_int = 0x0015; +pub const ETH_P_CONTROL: c_int = 0x0016; +pub const ETH_P_IRDA: c_int = 0x0017; +pub const ETH_P_ECONET: c_int = 0x0018; +pub const ETH_P_HDLC: c_int = 0x0019; +pub const ETH_P_ARCNET: c_int = 0x001A; +pub const ETH_P_DSA: c_int = 0x001B; +pub const ETH_P_TRAILER: c_int = 0x001C; +pub const ETH_P_PHONET: c_int = 0x00F5; +pub const ETH_P_IEEE802154: c_int = 0x00F6; +pub const ETH_P_CAIF: c_int = 0x00F7; + +pub const POSIX_SPAWN_RESETIDS: c_short = 0x01; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x02; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x04; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x08; +pub const POSIX_SPAWN_SETSCHEDPARAM: c_short = 0x10; +pub const POSIX_SPAWN_SETSCHEDULER: c_short = 0x20; + +pub const NLMSG_NOOP: c_int = 0x1; +pub const NLMSG_ERROR: c_int = 0x2; +pub const NLMSG_DONE: c_int = 0x3; +pub const NLMSG_OVERRUN: c_int = 0x4; +pub const NLMSG_MIN_TYPE: c_int = 0x10; // linux/netfilter/nfnetlink.h -pub const NFNLGRP_NONE: ::c_int = 0; -pub const NFNLGRP_CONNTRACK_NEW: ::c_int = 1; -pub const NFNLGRP_CONNTRACK_UPDATE: ::c_int = 2; -pub const NFNLGRP_CONNTRACK_DESTROY: ::c_int = 3; -pub const NFNLGRP_CONNTRACK_EXP_NEW: ::c_int = 4; -pub const NFNLGRP_CONNTRACK_EXP_UPDATE: ::c_int = 5; -pub const NFNLGRP_CONNTRACK_EXP_DESTROY: ::c_int = 6; -pub const NFNLGRP_NFTABLES: ::c_int = 7; -pub const NFNLGRP_ACCT_QUOTA: ::c_int = 8; -pub const NFNLGRP_NFTRACE: ::c_int = 9; - -pub const NFNETLINK_V0: ::c_int = 0; - -pub const NFNL_SUBSYS_NONE: ::c_int = 0; -pub const NFNL_SUBSYS_CTNETLINK: ::c_int = 1; -pub const NFNL_SUBSYS_CTNETLINK_EXP: ::c_int = 2; -pub const NFNL_SUBSYS_QUEUE: ::c_int = 3; -pub const NFNL_SUBSYS_ULOG: ::c_int = 4; -pub const NFNL_SUBSYS_OSF: ::c_int = 5; -pub const NFNL_SUBSYS_IPSET: ::c_int = 6; -pub const NFNL_SUBSYS_ACCT: ::c_int = 7; -pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: ::c_int = 8; -pub const NFNL_SUBSYS_CTHELPER: ::c_int = 9; -pub const NFNL_SUBSYS_NFTABLES: ::c_int = 10; -pub const NFNL_SUBSYS_NFT_COMPAT: ::c_int = 11; -pub const NFNL_SUBSYS_HOOK: ::c_int = 12; -pub const NFNL_SUBSYS_COUNT: ::c_int = 13; - -pub const NFNL_MSG_BATCH_BEGIN: ::c_int = NLMSG_MIN_TYPE; -pub const NFNL_MSG_BATCH_END: ::c_int = NLMSG_MIN_TYPE + 1; - -pub const NFNL_BATCH_UNSPEC: ::c_int = 0; -pub const NFNL_BATCH_GENID: ::c_int = 1; +pub const NFNLGRP_NONE: c_int = 0; +pub const NFNLGRP_CONNTRACK_NEW: c_int = 1; +pub const NFNLGRP_CONNTRACK_UPDATE: c_int = 2; +pub const NFNLGRP_CONNTRACK_DESTROY: c_int = 3; +pub const NFNLGRP_CONNTRACK_EXP_NEW: c_int = 4; +pub const NFNLGRP_CONNTRACK_EXP_UPDATE: c_int = 5; +pub const NFNLGRP_CONNTRACK_EXP_DESTROY: c_int = 6; +pub const NFNLGRP_NFTABLES: c_int = 7; +pub const NFNLGRP_ACCT_QUOTA: c_int = 8; +pub const NFNLGRP_NFTRACE: c_int = 9; + +pub const NFNETLINK_V0: c_int = 0; + +pub const NFNL_SUBSYS_NONE: c_int = 0; +pub const NFNL_SUBSYS_CTNETLINK: c_int = 1; +pub const NFNL_SUBSYS_CTNETLINK_EXP: c_int = 2; +pub const NFNL_SUBSYS_QUEUE: c_int = 3; +pub const NFNL_SUBSYS_ULOG: c_int = 4; +pub const NFNL_SUBSYS_OSF: c_int = 5; +pub const NFNL_SUBSYS_IPSET: c_int = 6; +pub const NFNL_SUBSYS_ACCT: c_int = 7; +pub const NFNL_SUBSYS_CTNETLINK_TIMEOUT: c_int = 8; +pub const NFNL_SUBSYS_CTHELPER: c_int = 9; +pub const NFNL_SUBSYS_NFTABLES: c_int = 10; +pub const NFNL_SUBSYS_NFT_COMPAT: c_int = 11; +pub const NFNL_SUBSYS_HOOK: c_int = 12; +pub const NFNL_SUBSYS_COUNT: c_int = 13; + +pub const NFNL_MSG_BATCH_BEGIN: c_int = NLMSG_MIN_TYPE; +pub const NFNL_MSG_BATCH_END: c_int = NLMSG_MIN_TYPE + 1; + +pub const NFNL_BATCH_UNSPEC: c_int = 0; +pub const NFNL_BATCH_GENID: c_int = 1; // linux/netfilter/nfnetlink_log.h -pub const NFULNL_MSG_PACKET: ::c_int = 0; -pub const NFULNL_MSG_CONFIG: ::c_int = 1; - -pub const NFULA_VLAN_UNSPEC: ::c_int = 0; -pub const NFULA_VLAN_PROTO: ::c_int = 1; -pub const NFULA_VLAN_TCI: ::c_int = 2; - -pub const NFULA_UNSPEC: ::c_int = 0; -pub const NFULA_PACKET_HDR: ::c_int = 1; -pub const NFULA_MARK: ::c_int = 2; -pub const NFULA_TIMESTAMP: ::c_int = 3; -pub const NFULA_IFINDEX_INDEV: ::c_int = 4; -pub const NFULA_IFINDEX_OUTDEV: ::c_int = 5; -pub const NFULA_IFINDEX_PHYSINDEV: ::c_int = 6; -pub const NFULA_IFINDEX_PHYSOUTDEV: ::c_int = 7; -pub const NFULA_HWADDR: ::c_int = 8; -pub const NFULA_PAYLOAD: ::c_int = 9; -pub const NFULA_PREFIX: ::c_int = 10; -pub const NFULA_UID: ::c_int = 11; -pub const NFULA_SEQ: ::c_int = 12; -pub const NFULA_SEQ_GLOBAL: ::c_int = 13; -pub const NFULA_GID: ::c_int = 14; -pub const NFULA_HWTYPE: ::c_int = 15; -pub const NFULA_HWHEADER: ::c_int = 16; -pub const NFULA_HWLEN: ::c_int = 17; -pub const NFULA_CT: ::c_int = 18; -pub const NFULA_CT_INFO: ::c_int = 19; -pub const NFULA_VLAN: ::c_int = 20; -pub const NFULA_L2HDR: ::c_int = 21; - -pub const NFULNL_CFG_CMD_NONE: ::c_int = 0; -pub const NFULNL_CFG_CMD_BIND: ::c_int = 1; -pub const NFULNL_CFG_CMD_UNBIND: ::c_int = 2; -pub const NFULNL_CFG_CMD_PF_BIND: ::c_int = 3; -pub const NFULNL_CFG_CMD_PF_UNBIND: ::c_int = 4; - -pub const NFULA_CFG_UNSPEC: ::c_int = 0; -pub const NFULA_CFG_CMD: ::c_int = 1; -pub const NFULA_CFG_MODE: ::c_int = 2; -pub const NFULA_CFG_NLBUFSIZ: ::c_int = 3; -pub const NFULA_CFG_TIMEOUT: ::c_int = 4; -pub const NFULA_CFG_QTHRESH: ::c_int = 5; -pub const NFULA_CFG_FLAGS: ::c_int = 6; - -pub const NFULNL_COPY_NONE: ::c_int = 0x00; -pub const NFULNL_COPY_META: ::c_int = 0x01; -pub const NFULNL_COPY_PACKET: ::c_int = 0x02; - -pub const NFULNL_CFG_F_SEQ: ::c_int = 0x0001; -pub const NFULNL_CFG_F_SEQ_GLOBAL: ::c_int = 0x0002; -pub const NFULNL_CFG_F_CONNTRACK: ::c_int = 0x0004; +pub const NFULNL_MSG_PACKET: c_int = 0; +pub const NFULNL_MSG_CONFIG: c_int = 1; + +pub const NFULA_VLAN_UNSPEC: c_int = 0; +pub const NFULA_VLAN_PROTO: c_int = 1; +pub const NFULA_VLAN_TCI: c_int = 2; + +pub const NFULA_UNSPEC: c_int = 0; +pub const NFULA_PACKET_HDR: c_int = 1; +pub const NFULA_MARK: c_int = 2; +pub const NFULA_TIMESTAMP: c_int = 3; +pub const NFULA_IFINDEX_INDEV: c_int = 4; +pub const NFULA_IFINDEX_OUTDEV: c_int = 5; +pub const NFULA_IFINDEX_PHYSINDEV: c_int = 6; +pub const NFULA_IFINDEX_PHYSOUTDEV: c_int = 7; +pub const NFULA_HWADDR: c_int = 8; +pub const NFULA_PAYLOAD: c_int = 9; +pub const NFULA_PREFIX: c_int = 10; +pub const NFULA_UID: c_int = 11; +pub const NFULA_SEQ: c_int = 12; +pub const NFULA_SEQ_GLOBAL: c_int = 13; +pub const NFULA_GID: c_int = 14; +pub const NFULA_HWTYPE: c_int = 15; +pub const NFULA_HWHEADER: c_int = 16; +pub const NFULA_HWLEN: c_int = 17; +pub const NFULA_CT: c_int = 18; +pub const NFULA_CT_INFO: c_int = 19; +pub const NFULA_VLAN: c_int = 20; +pub const NFULA_L2HDR: c_int = 21; + +pub const NFULNL_CFG_CMD_NONE: c_int = 0; +pub const NFULNL_CFG_CMD_BIND: c_int = 1; +pub const NFULNL_CFG_CMD_UNBIND: c_int = 2; +pub const NFULNL_CFG_CMD_PF_BIND: c_int = 3; +pub const NFULNL_CFG_CMD_PF_UNBIND: c_int = 4; + +pub const NFULA_CFG_UNSPEC: c_int = 0; +pub const NFULA_CFG_CMD: c_int = 1; +pub const NFULA_CFG_MODE: c_int = 2; +pub const NFULA_CFG_NLBUFSIZ: c_int = 3; +pub const NFULA_CFG_TIMEOUT: c_int = 4; +pub const NFULA_CFG_QTHRESH: c_int = 5; +pub const NFULA_CFG_FLAGS: c_int = 6; + +pub const NFULNL_COPY_NONE: c_int = 0x00; +pub const NFULNL_COPY_META: c_int = 0x01; +pub const NFULNL_COPY_PACKET: c_int = 0x02; + +pub const NFULNL_CFG_F_SEQ: c_int = 0x0001; +pub const NFULNL_CFG_F_SEQ_GLOBAL: c_int = 0x0002; +pub const NFULNL_CFG_F_CONNTRACK: c_int = 0x0004; // linux/netfilter/nfnetlink_queue.h -pub const NFQNL_MSG_PACKET: ::c_int = 0; -pub const NFQNL_MSG_VERDICT: ::c_int = 1; -pub const NFQNL_MSG_CONFIG: ::c_int = 2; -pub const NFQNL_MSG_VERDICT_BATCH: ::c_int = 3; - -pub const NFQA_UNSPEC: ::c_int = 0; -pub const NFQA_PACKET_HDR: ::c_int = 1; -pub const NFQA_VERDICT_HDR: ::c_int = 2; -pub const NFQA_MARK: ::c_int = 3; -pub const NFQA_TIMESTAMP: ::c_int = 4; -pub const NFQA_IFINDEX_INDEV: ::c_int = 5; -pub const NFQA_IFINDEX_OUTDEV: ::c_int = 6; -pub const NFQA_IFINDEX_PHYSINDEV: ::c_int = 7; -pub const NFQA_IFINDEX_PHYSOUTDEV: ::c_int = 8; -pub const NFQA_HWADDR: ::c_int = 9; -pub const NFQA_PAYLOAD: ::c_int = 10; -pub const NFQA_CT: ::c_int = 11; -pub const NFQA_CT_INFO: ::c_int = 12; -pub const NFQA_CAP_LEN: ::c_int = 13; -pub const NFQA_SKB_INFO: ::c_int = 14; -pub const NFQA_EXP: ::c_int = 15; -pub const NFQA_UID: ::c_int = 16; -pub const NFQA_GID: ::c_int = 17; -pub const NFQA_SECCTX: ::c_int = 18; -pub const NFQA_VLAN: ::c_int = 19; -pub const NFQA_L2HDR: ::c_int = 20; -pub const NFQA_PRIORITY: ::c_int = 21; - -pub const NFQA_VLAN_UNSPEC: ::c_int = 0; -pub const NFQA_VLAN_PROTO: ::c_int = 1; -pub const NFQA_VLAN_TCI: ::c_int = 2; - -pub const NFQNL_CFG_CMD_NONE: ::c_int = 0; -pub const NFQNL_CFG_CMD_BIND: ::c_int = 1; -pub const NFQNL_CFG_CMD_UNBIND: ::c_int = 2; -pub const NFQNL_CFG_CMD_PF_BIND: ::c_int = 3; -pub const NFQNL_CFG_CMD_PF_UNBIND: ::c_int = 4; - -pub const NFQNL_COPY_NONE: ::c_int = 0; -pub const NFQNL_COPY_META: ::c_int = 1; -pub const NFQNL_COPY_PACKET: ::c_int = 2; - -pub const NFQA_CFG_UNSPEC: ::c_int = 0; -pub const NFQA_CFG_CMD: ::c_int = 1; -pub const NFQA_CFG_PARAMS: ::c_int = 2; -pub const NFQA_CFG_QUEUE_MAXLEN: ::c_int = 3; -pub const NFQA_CFG_MASK: ::c_int = 4; -pub const NFQA_CFG_FLAGS: ::c_int = 5; - -pub const NFQA_CFG_F_FAIL_OPEN: ::c_int = 0x0001; -pub const NFQA_CFG_F_CONNTRACK: ::c_int = 0x0002; -pub const NFQA_CFG_F_GSO: ::c_int = 0x0004; -pub const NFQA_CFG_F_UID_GID: ::c_int = 0x0008; -pub const NFQA_CFG_F_SECCTX: ::c_int = 0x0010; -pub const NFQA_CFG_F_MAX: ::c_int = 0x0020; - -pub const NFQA_SKB_CSUMNOTREADY: ::c_int = 0x0001; -pub const NFQA_SKB_GSO: ::c_int = 0x0002; -pub const NFQA_SKB_CSUM_NOTVERIFIED: ::c_int = 0x0004; +pub const NFQNL_MSG_PACKET: c_int = 0; +pub const NFQNL_MSG_VERDICT: c_int = 1; +pub const NFQNL_MSG_CONFIG: c_int = 2; +pub const NFQNL_MSG_VERDICT_BATCH: c_int = 3; + +pub const NFQA_UNSPEC: c_int = 0; +pub const NFQA_PACKET_HDR: c_int = 1; +pub const NFQA_VERDICT_HDR: c_int = 2; +pub const NFQA_MARK: c_int = 3; +pub const NFQA_TIMESTAMP: c_int = 4; +pub const NFQA_IFINDEX_INDEV: c_int = 5; +pub const NFQA_IFINDEX_OUTDEV: c_int = 6; +pub const NFQA_IFINDEX_PHYSINDEV: c_int = 7; +pub const NFQA_IFINDEX_PHYSOUTDEV: c_int = 8; +pub const NFQA_HWADDR: c_int = 9; +pub const NFQA_PAYLOAD: c_int = 10; +pub const NFQA_CT: c_int = 11; +pub const NFQA_CT_INFO: c_int = 12; +pub const NFQA_CAP_LEN: c_int = 13; +pub const NFQA_SKB_INFO: c_int = 14; +pub const NFQA_EXP: c_int = 15; +pub const NFQA_UID: c_int = 16; +pub const NFQA_GID: c_int = 17; +pub const NFQA_SECCTX: c_int = 18; +pub const NFQA_VLAN: c_int = 19; +pub const NFQA_L2HDR: c_int = 20; +pub const NFQA_PRIORITY: c_int = 21; + +pub const NFQA_VLAN_UNSPEC: c_int = 0; +pub const NFQA_VLAN_PROTO: c_int = 1; +pub const NFQA_VLAN_TCI: c_int = 2; + +pub const NFQNL_CFG_CMD_NONE: c_int = 0; +pub const NFQNL_CFG_CMD_BIND: c_int = 1; +pub const NFQNL_CFG_CMD_UNBIND: c_int = 2; +pub const NFQNL_CFG_CMD_PF_BIND: c_int = 3; +pub const NFQNL_CFG_CMD_PF_UNBIND: c_int = 4; + +pub const NFQNL_COPY_NONE: c_int = 0; +pub const NFQNL_COPY_META: c_int = 1; +pub const NFQNL_COPY_PACKET: c_int = 2; + +pub const NFQA_CFG_UNSPEC: c_int = 0; +pub const NFQA_CFG_CMD: c_int = 1; +pub const NFQA_CFG_PARAMS: c_int = 2; +pub const NFQA_CFG_QUEUE_MAXLEN: c_int = 3; +pub const NFQA_CFG_MASK: c_int = 4; +pub const NFQA_CFG_FLAGS: c_int = 5; + +pub const NFQA_CFG_F_FAIL_OPEN: c_int = 0x0001; +pub const NFQA_CFG_F_CONNTRACK: c_int = 0x0002; +pub const NFQA_CFG_F_GSO: c_int = 0x0004; +pub const NFQA_CFG_F_UID_GID: c_int = 0x0008; +pub const NFQA_CFG_F_SECCTX: c_int = 0x0010; +pub const NFQA_CFG_F_MAX: c_int = 0x0020; + +pub const NFQA_SKB_CSUMNOTREADY: c_int = 0x0001; +pub const NFQA_SKB_GSO: c_int = 0x0002; +pub const NFQA_SKB_CSUM_NOTVERIFIED: c_int = 0x0004; // linux/genetlink.h -pub const GENL_NAMSIZ: ::c_int = 16; - -pub const GENL_MIN_ID: ::c_int = NLMSG_MIN_TYPE; -pub const GENL_MAX_ID: ::c_int = 1023; - -pub const GENL_ADMIN_PERM: ::c_int = 0x01; -pub const GENL_CMD_CAP_DO: ::c_int = 0x02; -pub const GENL_CMD_CAP_DUMP: ::c_int = 0x04; -pub const GENL_CMD_CAP_HASPOL: ::c_int = 0x08; - -pub const GENL_ID_CTRL: ::c_int = NLMSG_MIN_TYPE; - -pub const CTRL_CMD_UNSPEC: ::c_int = 0; -pub const CTRL_CMD_NEWFAMILY: ::c_int = 1; -pub const CTRL_CMD_DELFAMILY: ::c_int = 2; -pub const CTRL_CMD_GETFAMILY: ::c_int = 3; -pub const CTRL_CMD_NEWOPS: ::c_int = 4; -pub const CTRL_CMD_DELOPS: ::c_int = 5; -pub const CTRL_CMD_GETOPS: ::c_int = 6; -pub const CTRL_CMD_NEWMCAST_GRP: ::c_int = 7; -pub const CTRL_CMD_DELMCAST_GRP: ::c_int = 8; -pub const CTRL_CMD_GETMCAST_GRP: ::c_int = 9; - -pub const CTRL_ATTR_UNSPEC: ::c_int = 0; -pub const CTRL_ATTR_FAMILY_ID: ::c_int = 1; -pub const CTRL_ATTR_FAMILY_NAME: ::c_int = 2; -pub const CTRL_ATTR_VERSION: ::c_int = 3; -pub const CTRL_ATTR_HDRSIZE: ::c_int = 4; -pub const CTRL_ATTR_MAXATTR: ::c_int = 5; -pub const CTRL_ATTR_OPS: ::c_int = 6; -pub const CTRL_ATTR_MCAST_GROUPS: ::c_int = 7; - -pub const CTRL_ATTR_OP_UNSPEC: ::c_int = 0; -pub const CTRL_ATTR_OP_ID: ::c_int = 1; -pub const CTRL_ATTR_OP_FLAGS: ::c_int = 2; - -pub const CTRL_ATTR_MCAST_GRP_UNSPEC: ::c_int = 0; -pub const CTRL_ATTR_MCAST_GRP_NAME: ::c_int = 1; -pub const CTRL_ATTR_MCAST_GRP_ID: ::c_int = 2; +pub const GENL_NAMSIZ: c_int = 16; + +pub const GENL_MIN_ID: c_int = NLMSG_MIN_TYPE; +pub const GENL_MAX_ID: c_int = 1023; + +pub const GENL_ADMIN_PERM: c_int = 0x01; +pub const GENL_CMD_CAP_DO: c_int = 0x02; +pub const GENL_CMD_CAP_DUMP: c_int = 0x04; +pub const GENL_CMD_CAP_HASPOL: c_int = 0x08; + +pub const GENL_ID_CTRL: c_int = NLMSG_MIN_TYPE; + +pub const CTRL_CMD_UNSPEC: c_int = 0; +pub const CTRL_CMD_NEWFAMILY: c_int = 1; +pub const CTRL_CMD_DELFAMILY: c_int = 2; +pub const CTRL_CMD_GETFAMILY: c_int = 3; +pub const CTRL_CMD_NEWOPS: c_int = 4; +pub const CTRL_CMD_DELOPS: c_int = 5; +pub const CTRL_CMD_GETOPS: c_int = 6; +pub const CTRL_CMD_NEWMCAST_GRP: c_int = 7; +pub const CTRL_CMD_DELMCAST_GRP: c_int = 8; +pub const CTRL_CMD_GETMCAST_GRP: c_int = 9; + +pub const CTRL_ATTR_UNSPEC: c_int = 0; +pub const CTRL_ATTR_FAMILY_ID: c_int = 1; +pub const CTRL_ATTR_FAMILY_NAME: c_int = 2; +pub const CTRL_ATTR_VERSION: c_int = 3; +pub const CTRL_ATTR_HDRSIZE: c_int = 4; +pub const CTRL_ATTR_MAXATTR: c_int = 5; +pub const CTRL_ATTR_OPS: c_int = 6; +pub const CTRL_ATTR_MCAST_GROUPS: c_int = 7; + +pub const CTRL_ATTR_OP_UNSPEC: c_int = 0; +pub const CTRL_ATTR_OP_ID: c_int = 1; +pub const CTRL_ATTR_OP_FLAGS: c_int = 2; + +pub const CTRL_ATTR_MCAST_GRP_UNSPEC: c_int = 0; +pub const CTRL_ATTR_MCAST_GRP_NAME: c_int = 1; +pub const CTRL_ATTR_MCAST_GRP_ID: c_int = 2; // linux/if_packet.h -pub const PACKET_HOST: ::c_uchar = 0; -pub const PACKET_BROADCAST: ::c_uchar = 1; -pub const PACKET_MULTICAST: ::c_uchar = 2; -pub const PACKET_OTHERHOST: ::c_uchar = 3; -pub const PACKET_OUTGOING: ::c_uchar = 4; -pub const PACKET_LOOPBACK: ::c_uchar = 5; -pub const PACKET_USER: ::c_uchar = 6; -pub const PACKET_KERNEL: ::c_uchar = 7; - -pub const PACKET_ADD_MEMBERSHIP: ::c_int = 1; -pub const PACKET_DROP_MEMBERSHIP: ::c_int = 2; -pub const PACKET_RX_RING: ::c_int = 5; -pub const PACKET_STATISTICS: ::c_int = 6; -pub const PACKET_AUXDATA: ::c_int = 8; -pub const PACKET_VERSION: ::c_int = 10; -pub const PACKET_RESERVE: ::c_int = 12; -pub const PACKET_TX_RING: ::c_int = 13; -pub const PACKET_LOSS: ::c_int = 14; -pub const PACKET_TIMESTAMP: ::c_int = 17; -pub const PACKET_FANOUT: ::c_int = 18; -pub const PACKET_QDISC_BYPASS: ::c_int = 20; - -pub const PACKET_FANOUT_HASH: ::c_uint = 0; -pub const PACKET_FANOUT_LB: ::c_uint = 1; -pub const PACKET_FANOUT_CPU: ::c_uint = 2; -pub const PACKET_FANOUT_ROLLOVER: ::c_uint = 3; -pub const PACKET_FANOUT_RND: ::c_uint = 4; -pub const PACKET_FANOUT_QM: ::c_uint = 5; -pub const PACKET_FANOUT_CBPF: ::c_uint = 6; -pub const PACKET_FANOUT_EBPF: ::c_uint = 7; -pub const PACKET_FANOUT_FLAG_ROLLOVER: ::c_uint = 0x1000; -pub const PACKET_FANOUT_FLAG_UNIQUEID: ::c_uint = 0x2000; -pub const PACKET_FANOUT_FLAG_DEFRAG: ::c_uint = 0x8000; - -pub const PACKET_MR_MULTICAST: ::c_int = 0; -pub const PACKET_MR_PROMISC: ::c_int = 1; -pub const PACKET_MR_ALLMULTI: ::c_int = 2; - -pub const TP_STATUS_KERNEL: ::__u32 = 0; -pub const TP_STATUS_USER: ::__u32 = 1 << 0; -pub const TP_STATUS_COPY: ::__u32 = 1 << 1; -pub const TP_STATUS_LOSING: ::__u32 = 1 << 2; -pub const TP_STATUS_CSUMNOTREADY: ::__u32 = 1 << 3; -pub const TP_STATUS_VLAN_VALID: ::__u32 = 1 << 4; -pub const TP_STATUS_BLK_TMO: ::__u32 = 1 << 5; -pub const TP_STATUS_VLAN_TPID_VALID: ::__u32 = 1 << 6; -pub const TP_STATUS_CSUM_VALID: ::__u32 = 1 << 7; - -pub const TP_STATUS_AVAILABLE: ::__u32 = 0; -pub const TP_STATUS_SEND_REQUEST: ::__u32 = 1 << 0; -pub const TP_STATUS_SENDING: ::__u32 = 1 << 1; -pub const TP_STATUS_WRONG_FORMAT: ::__u32 = 1 << 2; - -pub const TP_STATUS_TS_SOFTWARE: ::__u32 = 1 << 29; -pub const TP_STATUS_TS_SYS_HARDWARE: ::__u32 = 1 << 30; -pub const TP_STATUS_TS_RAW_HARDWARE: ::__u32 = 1 << 31; - -pub const TP_FT_REQ_FILL_RXHASH: ::__u32 = 1; +pub const PACKET_HOST: c_uchar = 0; +pub const PACKET_BROADCAST: c_uchar = 1; +pub const PACKET_MULTICAST: c_uchar = 2; +pub const PACKET_OTHERHOST: c_uchar = 3; +pub const PACKET_OUTGOING: c_uchar = 4; +pub const PACKET_LOOPBACK: c_uchar = 5; +pub const PACKET_USER: c_uchar = 6; +pub const PACKET_KERNEL: c_uchar = 7; + +pub const PACKET_ADD_MEMBERSHIP: c_int = 1; +pub const PACKET_DROP_MEMBERSHIP: c_int = 2; +pub const PACKET_RX_RING: c_int = 5; +pub const PACKET_STATISTICS: c_int = 6; +pub const PACKET_AUXDATA: c_int = 8; +pub const PACKET_VERSION: c_int = 10; +pub const PACKET_RESERVE: c_int = 12; +pub const PACKET_TX_RING: c_int = 13; +pub const PACKET_LOSS: c_int = 14; +pub const PACKET_TIMESTAMP: c_int = 17; +pub const PACKET_FANOUT: c_int = 18; +pub const PACKET_QDISC_BYPASS: c_int = 20; + +pub const PACKET_FANOUT_HASH: c_uint = 0; +pub const PACKET_FANOUT_LB: c_uint = 1; +pub const PACKET_FANOUT_CPU: c_uint = 2; +pub const PACKET_FANOUT_ROLLOVER: c_uint = 3; +pub const PACKET_FANOUT_RND: c_uint = 4; +pub const PACKET_FANOUT_QM: c_uint = 5; +pub const PACKET_FANOUT_CBPF: c_uint = 6; +pub const PACKET_FANOUT_EBPF: c_uint = 7; +pub const PACKET_FANOUT_FLAG_ROLLOVER: c_uint = 0x1000; +pub const PACKET_FANOUT_FLAG_UNIQUEID: c_uint = 0x2000; +pub const PACKET_FANOUT_FLAG_DEFRAG: c_uint = 0x8000; + +pub const PACKET_MR_MULTICAST: c_int = 0; +pub const PACKET_MR_PROMISC: c_int = 1; +pub const PACKET_MR_ALLMULTI: c_int = 2; + +pub const TP_STATUS_KERNEL: __u32 = 0; +pub const TP_STATUS_USER: __u32 = 1 << 0; +pub const TP_STATUS_COPY: __u32 = 1 << 1; +pub const TP_STATUS_LOSING: __u32 = 1 << 2; +pub const TP_STATUS_CSUMNOTREADY: __u32 = 1 << 3; +pub const TP_STATUS_VLAN_VALID: __u32 = 1 << 4; +pub const TP_STATUS_BLK_TMO: __u32 = 1 << 5; +pub const TP_STATUS_VLAN_TPID_VALID: __u32 = 1 << 6; +pub const TP_STATUS_CSUM_VALID: __u32 = 1 << 7; + +pub const TP_STATUS_AVAILABLE: __u32 = 0; +pub const TP_STATUS_SEND_REQUEST: __u32 = 1 << 0; +pub const TP_STATUS_SENDING: __u32 = 1 << 1; +pub const TP_STATUS_WRONG_FORMAT: __u32 = 1 << 2; + +pub const TP_STATUS_TS_SOFTWARE: __u32 = 1 << 29; +pub const TP_STATUS_TS_SYS_HARDWARE: __u32 = 1 << 30; +pub const TP_STATUS_TS_RAW_HARDWARE: __u32 = 1 << 31; + +pub const TP_FT_REQ_FILL_RXHASH: __u32 = 1; pub const TPACKET_ALIGNMENT: usize = 16; -pub const TPACKET_HDRLEN: usize = ((size_of::<::tpacket_hdr>() + TPACKET_ALIGNMENT - 1) +pub const TPACKET_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) & !(TPACKET_ALIGNMENT - 1)) - + size_of::<::sockaddr_ll>(); -pub const TPACKET2_HDRLEN: usize = ((size_of::<::tpacket2_hdr>() + TPACKET_ALIGNMENT - 1) + + size_of::(); +pub const TPACKET2_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) & !(TPACKET_ALIGNMENT - 1)) - + size_of::<::sockaddr_ll>(); -pub const TPACKET3_HDRLEN: usize = ((size_of::<::tpacket3_hdr>() + TPACKET_ALIGNMENT - 1) + + size_of::(); +pub const TPACKET3_HDRLEN: usize = ((size_of::() + TPACKET_ALIGNMENT - 1) & !(TPACKET_ALIGNMENT - 1)) - + size_of::<::sockaddr_ll>(); + + size_of::(); // linux/netfilter.h -pub const NF_DROP: ::c_int = 0; -pub const NF_ACCEPT: ::c_int = 1; -pub const NF_STOLEN: ::c_int = 2; -pub const NF_QUEUE: ::c_int = 3; -pub const NF_REPEAT: ::c_int = 4; -pub const NF_STOP: ::c_int = 5; -pub const NF_MAX_VERDICT: ::c_int = NF_STOP; - -pub const NF_VERDICT_MASK: ::c_int = 0x000000ff; -pub const NF_VERDICT_FLAG_QUEUE_BYPASS: ::c_int = 0x00008000; - -pub const NF_VERDICT_QMASK: ::c_int = 0xffff0000; -pub const NF_VERDICT_QBITS: ::c_int = 16; - -pub const NF_VERDICT_BITS: ::c_int = 16; - -pub const NF_INET_PRE_ROUTING: ::c_int = 0; -pub const NF_INET_LOCAL_IN: ::c_int = 1; -pub const NF_INET_FORWARD: ::c_int = 2; -pub const NF_INET_LOCAL_OUT: ::c_int = 3; -pub const NF_INET_POST_ROUTING: ::c_int = 4; -pub const NF_INET_NUMHOOKS: ::c_int = 5; -pub const NF_INET_INGRESS: ::c_int = NF_INET_NUMHOOKS; - -pub const NF_NETDEV_INGRESS: ::c_int = 0; -pub const NF_NETDEV_EGRESS: ::c_int = 1; -pub const NF_NETDEV_NUMHOOKS: ::c_int = 2; +pub const NF_DROP: c_int = 0; +pub const NF_ACCEPT: c_int = 1; +pub const NF_STOLEN: c_int = 2; +pub const NF_QUEUE: c_int = 3; +pub const NF_REPEAT: c_int = 4; +pub const NF_STOP: c_int = 5; +pub const NF_MAX_VERDICT: c_int = NF_STOP; + +pub const NF_VERDICT_MASK: c_int = 0x000000ff; +pub const NF_VERDICT_FLAG_QUEUE_BYPASS: c_int = 0x00008000; + +pub const NF_VERDICT_QMASK: c_int = 0xffff0000; +pub const NF_VERDICT_QBITS: c_int = 16; + +pub const NF_VERDICT_BITS: c_int = 16; + +pub const NF_INET_PRE_ROUTING: c_int = 0; +pub const NF_INET_LOCAL_IN: c_int = 1; +pub const NF_INET_FORWARD: c_int = 2; +pub const NF_INET_LOCAL_OUT: c_int = 3; +pub const NF_INET_POST_ROUTING: c_int = 4; +pub const NF_INET_NUMHOOKS: c_int = 5; +pub const NF_INET_INGRESS: c_int = NF_INET_NUMHOOKS; + +pub const NF_NETDEV_INGRESS: c_int = 0; +pub const NF_NETDEV_EGRESS: c_int = 1; +pub const NF_NETDEV_NUMHOOKS: c_int = 2; // Some NFPROTO are not compatible with musl and are defined in submodules. -pub const NFPROTO_UNSPEC: ::c_int = 0; -pub const NFPROTO_INET: ::c_int = 1; -pub const NFPROTO_IPV4: ::c_int = 2; -pub const NFPROTO_ARP: ::c_int = 3; -pub const NFPROTO_NETDEV: ::c_int = 5; -pub const NFPROTO_BRIDGE: ::c_int = 7; -pub const NFPROTO_IPV6: ::c_int = 10; -pub const NFPROTO_DECNET: ::c_int = 12; -pub const NFPROTO_NUMPROTO: ::c_int = 13; +pub const NFPROTO_UNSPEC: c_int = 0; +pub const NFPROTO_INET: c_int = 1; +pub const NFPROTO_IPV4: c_int = 2; +pub const NFPROTO_ARP: c_int = 3; +pub const NFPROTO_NETDEV: c_int = 5; +pub const NFPROTO_BRIDGE: c_int = 7; +pub const NFPROTO_IPV6: c_int = 10; +pub const NFPROTO_DECNET: c_int = 12; +pub const NFPROTO_NUMPROTO: c_int = 13; // linux/netfilter_arp.h -pub const NF_ARP: ::c_int = 0; -pub const NF_ARP_IN: ::c_int = 0; -pub const NF_ARP_OUT: ::c_int = 1; -pub const NF_ARP_FORWARD: ::c_int = 2; -pub const NF_ARP_NUMHOOKS: ::c_int = 3; +pub const NF_ARP: c_int = 0; +pub const NF_ARP_IN: c_int = 0; +pub const NF_ARP_OUT: c_int = 1; +pub const NF_ARP_FORWARD: c_int = 2; +pub const NF_ARP_NUMHOOKS: c_int = 3; // linux/netfilter_bridge.h -pub const NF_BR_PRE_ROUTING: ::c_int = 0; -pub const NF_BR_LOCAL_IN: ::c_int = 1; -pub const NF_BR_FORWARD: ::c_int = 2; -pub const NF_BR_LOCAL_OUT: ::c_int = 3; -pub const NF_BR_POST_ROUTING: ::c_int = 4; -pub const NF_BR_BROUTING: ::c_int = 5; -pub const NF_BR_NUMHOOKS: ::c_int = 6; - -pub const NF_BR_PRI_FIRST: ::c_int = ::INT_MIN; -pub const NF_BR_PRI_NAT_DST_BRIDGED: ::c_int = -300; -pub const NF_BR_PRI_FILTER_BRIDGED: ::c_int = -200; -pub const NF_BR_PRI_BRNF: ::c_int = 0; -pub const NF_BR_PRI_NAT_DST_OTHER: ::c_int = 100; -pub const NF_BR_PRI_FILTER_OTHER: ::c_int = 200; -pub const NF_BR_PRI_NAT_SRC: ::c_int = 300; -pub const NF_BR_PRI_LAST: ::c_int = ::INT_MAX; +pub const NF_BR_PRE_ROUTING: c_int = 0; +pub const NF_BR_LOCAL_IN: c_int = 1; +pub const NF_BR_FORWARD: c_int = 2; +pub const NF_BR_LOCAL_OUT: c_int = 3; +pub const NF_BR_POST_ROUTING: c_int = 4; +pub const NF_BR_BROUTING: c_int = 5; +pub const NF_BR_NUMHOOKS: c_int = 6; + +pub const NF_BR_PRI_FIRST: c_int = crate::INT_MIN; +pub const NF_BR_PRI_NAT_DST_BRIDGED: c_int = -300; +pub const NF_BR_PRI_FILTER_BRIDGED: c_int = -200; +pub const NF_BR_PRI_BRNF: c_int = 0; +pub const NF_BR_PRI_NAT_DST_OTHER: c_int = 100; +pub const NF_BR_PRI_FILTER_OTHER: c_int = 200; +pub const NF_BR_PRI_NAT_SRC: c_int = 300; +pub const NF_BR_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv4.h -pub const NF_IP_PRE_ROUTING: ::c_int = 0; -pub const NF_IP_LOCAL_IN: ::c_int = 1; -pub const NF_IP_FORWARD: ::c_int = 2; -pub const NF_IP_LOCAL_OUT: ::c_int = 3; -pub const NF_IP_POST_ROUTING: ::c_int = 4; -pub const NF_IP_NUMHOOKS: ::c_int = 5; - -pub const NF_IP_PRI_FIRST: ::c_int = ::INT_MIN; -pub const NF_IP_PRI_RAW_BEFORE_DEFRAG: ::c_int = -450; -pub const NF_IP_PRI_CONNTRACK_DEFRAG: ::c_int = -400; -pub const NF_IP_PRI_RAW: ::c_int = -300; -pub const NF_IP_PRI_SELINUX_FIRST: ::c_int = -225; -pub const NF_IP_PRI_CONNTRACK: ::c_int = -200; -pub const NF_IP_PRI_MANGLE: ::c_int = -150; -pub const NF_IP_PRI_NAT_DST: ::c_int = -100; -pub const NF_IP_PRI_FILTER: ::c_int = 0; -pub const NF_IP_PRI_SECURITY: ::c_int = 50; -pub const NF_IP_PRI_NAT_SRC: ::c_int = 100; -pub const NF_IP_PRI_SELINUX_LAST: ::c_int = 225; -pub const NF_IP_PRI_CONNTRACK_HELPER: ::c_int = 300; -pub const NF_IP_PRI_CONNTRACK_CONFIRM: ::c_int = ::INT_MAX; -pub const NF_IP_PRI_LAST: ::c_int = ::INT_MAX; +pub const NF_IP_PRE_ROUTING: c_int = 0; +pub const NF_IP_LOCAL_IN: c_int = 1; +pub const NF_IP_FORWARD: c_int = 2; +pub const NF_IP_LOCAL_OUT: c_int = 3; +pub const NF_IP_POST_ROUTING: c_int = 4; +pub const NF_IP_NUMHOOKS: c_int = 5; + +pub const NF_IP_PRI_FIRST: c_int = crate::INT_MIN; +pub const NF_IP_PRI_RAW_BEFORE_DEFRAG: c_int = -450; +pub const NF_IP_PRI_CONNTRACK_DEFRAG: c_int = -400; +pub const NF_IP_PRI_RAW: c_int = -300; +pub const NF_IP_PRI_SELINUX_FIRST: c_int = -225; +pub const NF_IP_PRI_CONNTRACK: c_int = -200; +pub const NF_IP_PRI_MANGLE: c_int = -150; +pub const NF_IP_PRI_NAT_DST: c_int = -100; +pub const NF_IP_PRI_FILTER: c_int = 0; +pub const NF_IP_PRI_SECURITY: c_int = 50; +pub const NF_IP_PRI_NAT_SRC: c_int = 100; +pub const NF_IP_PRI_SELINUX_LAST: c_int = 225; +pub const NF_IP_PRI_CONNTRACK_HELPER: c_int = 300; +pub const NF_IP_PRI_CONNTRACK_CONFIRM: c_int = crate::INT_MAX; +pub const NF_IP_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6.h -pub const NF_IP6_PRE_ROUTING: ::c_int = 0; -pub const NF_IP6_LOCAL_IN: ::c_int = 1; -pub const NF_IP6_FORWARD: ::c_int = 2; -pub const NF_IP6_LOCAL_OUT: ::c_int = 3; -pub const NF_IP6_POST_ROUTING: ::c_int = 4; -pub const NF_IP6_NUMHOOKS: ::c_int = 5; - -pub const NF_IP6_PRI_FIRST: ::c_int = ::INT_MIN; -pub const NF_IP6_PRI_RAW_BEFORE_DEFRAG: ::c_int = -450; -pub const NF_IP6_PRI_CONNTRACK_DEFRAG: ::c_int = -400; -pub const NF_IP6_PRI_RAW: ::c_int = -300; -pub const NF_IP6_PRI_SELINUX_FIRST: ::c_int = -225; -pub const NF_IP6_PRI_CONNTRACK: ::c_int = -200; -pub const NF_IP6_PRI_MANGLE: ::c_int = -150; -pub const NF_IP6_PRI_NAT_DST: ::c_int = -100; -pub const NF_IP6_PRI_FILTER: ::c_int = 0; -pub const NF_IP6_PRI_SECURITY: ::c_int = 50; -pub const NF_IP6_PRI_NAT_SRC: ::c_int = 100; -pub const NF_IP6_PRI_SELINUX_LAST: ::c_int = 225; -pub const NF_IP6_PRI_CONNTRACK_HELPER: ::c_int = 300; -pub const NF_IP6_PRI_LAST: ::c_int = ::INT_MAX; +pub const NF_IP6_PRE_ROUTING: c_int = 0; +pub const NF_IP6_LOCAL_IN: c_int = 1; +pub const NF_IP6_FORWARD: c_int = 2; +pub const NF_IP6_LOCAL_OUT: c_int = 3; +pub const NF_IP6_POST_ROUTING: c_int = 4; +pub const NF_IP6_NUMHOOKS: c_int = 5; + +pub const NF_IP6_PRI_FIRST: c_int = crate::INT_MIN; +pub const NF_IP6_PRI_RAW_BEFORE_DEFRAG: c_int = -450; +pub const NF_IP6_PRI_CONNTRACK_DEFRAG: c_int = -400; +pub const NF_IP6_PRI_RAW: c_int = -300; +pub const NF_IP6_PRI_SELINUX_FIRST: c_int = -225; +pub const NF_IP6_PRI_CONNTRACK: c_int = -200; +pub const NF_IP6_PRI_MANGLE: c_int = -150; +pub const NF_IP6_PRI_NAT_DST: c_int = -100; +pub const NF_IP6_PRI_FILTER: c_int = 0; +pub const NF_IP6_PRI_SECURITY: c_int = 50; +pub const NF_IP6_PRI_NAT_SRC: c_int = 100; +pub const NF_IP6_PRI_SELINUX_LAST: c_int = 225; +pub const NF_IP6_PRI_CONNTRACK_HELPER: c_int = 300; +pub const NF_IP6_PRI_LAST: c_int = crate::INT_MAX; // linux/netfilter_ipv6/ip6_tables.h -pub const IP6T_SO_ORIGINAL_DST: ::c_int = 80; - -pub const SIOCADDRT: ::c_ulong = 0x0000890B; -pub const SIOCDELRT: ::c_ulong = 0x0000890C; -pub const SIOCGIFNAME: ::c_ulong = 0x00008910; -pub const SIOCSIFLINK: ::c_ulong = 0x00008911; -pub const SIOCGIFCONF: ::c_ulong = 0x00008912; -pub const SIOCGIFFLAGS: ::c_ulong = 0x00008913; -pub const SIOCSIFFLAGS: ::c_ulong = 0x00008914; -pub const SIOCGIFADDR: ::c_ulong = 0x00008915; -pub const SIOCSIFADDR: ::c_ulong = 0x00008916; -pub const SIOCGIFDSTADDR: ::c_ulong = 0x00008917; -pub const SIOCSIFDSTADDR: ::c_ulong = 0x00008918; -pub const SIOCGIFBRDADDR: ::c_ulong = 0x00008919; -pub const SIOCSIFBRDADDR: ::c_ulong = 0x0000891A; -pub const SIOCGIFNETMASK: ::c_ulong = 0x0000891B; -pub const SIOCSIFNETMASK: ::c_ulong = 0x0000891C; -pub const SIOCGIFMETRIC: ::c_ulong = 0x0000891D; -pub const SIOCSIFMETRIC: ::c_ulong = 0x0000891E; -pub const SIOCGIFMEM: ::c_ulong = 0x0000891F; -pub const SIOCSIFMEM: ::c_ulong = 0x00008920; -pub const SIOCGIFMTU: ::c_ulong = 0x00008921; -pub const SIOCSIFMTU: ::c_ulong = 0x00008922; -pub const SIOCSIFNAME: ::c_ulong = 0x00008923; -pub const SIOCSIFHWADDR: ::c_ulong = 0x00008924; -pub const SIOCGIFENCAP: ::c_ulong = 0x00008925; -pub const SIOCSIFENCAP: ::c_ulong = 0x00008926; -pub const SIOCGIFHWADDR: ::c_ulong = 0x00008927; -pub const SIOCGIFSLAVE: ::c_ulong = 0x00008929; -pub const SIOCSIFSLAVE: ::c_ulong = 0x00008930; -pub const SIOCADDMULTI: ::c_ulong = 0x00008931; -pub const SIOCDELMULTI: ::c_ulong = 0x00008932; -pub const SIOCGIFINDEX: ::c_ulong = 0x00008933; -pub const SIOGIFINDEX: ::c_ulong = SIOCGIFINDEX; -pub const SIOCSIFPFLAGS: ::c_ulong = 0x00008934; -pub const SIOCGIFPFLAGS: ::c_ulong = 0x00008935; -pub const SIOCDIFADDR: ::c_ulong = 0x00008936; -pub const SIOCSIFHWBROADCAST: ::c_ulong = 0x00008937; -pub const SIOCGIFCOUNT: ::c_ulong = 0x00008938; -pub const SIOCGIFBR: ::c_ulong = 0x00008940; -pub const SIOCSIFBR: ::c_ulong = 0x00008941; -pub const SIOCGIFTXQLEN: ::c_ulong = 0x00008942; -pub const SIOCSIFTXQLEN: ::c_ulong = 0x00008943; -pub const SIOCETHTOOL: ::c_ulong = 0x00008946; -pub const SIOCGMIIPHY: ::c_ulong = 0x00008947; -pub const SIOCGMIIREG: ::c_ulong = 0x00008948; -pub const SIOCSMIIREG: ::c_ulong = 0x00008949; -pub const SIOCWANDEV: ::c_ulong = 0x0000894A; -pub const SIOCOUTQNSD: ::c_ulong = 0x0000894B; -pub const SIOCGSKNS: ::c_ulong = 0x0000894C; -pub const SIOCDARP: ::c_ulong = 0x00008953; -pub const SIOCGARP: ::c_ulong = 0x00008954; -pub const SIOCSARP: ::c_ulong = 0x00008955; -pub const SIOCDRARP: ::c_ulong = 0x00008960; -pub const SIOCGRARP: ::c_ulong = 0x00008961; -pub const SIOCSRARP: ::c_ulong = 0x00008962; -pub const SIOCGIFMAP: ::c_ulong = 0x00008970; -pub const SIOCSIFMAP: ::c_ulong = 0x00008971; -pub const SIOCSHWTSTAMP: ::c_ulong = 0x000089b0; -pub const SIOCGHWTSTAMP: ::c_ulong = 0x000089b1; +pub const IP6T_SO_ORIGINAL_DST: c_int = 80; + +pub const SIOCADDRT: c_ulong = 0x0000890B; +pub const SIOCDELRT: c_ulong = 0x0000890C; +pub const SIOCGIFNAME: c_ulong = 0x00008910; +pub const SIOCSIFLINK: c_ulong = 0x00008911; +pub const SIOCGIFCONF: c_ulong = 0x00008912; +pub const SIOCGIFFLAGS: c_ulong = 0x00008913; +pub const SIOCSIFFLAGS: c_ulong = 0x00008914; +pub const SIOCGIFADDR: c_ulong = 0x00008915; +pub const SIOCSIFADDR: c_ulong = 0x00008916; +pub const SIOCGIFDSTADDR: c_ulong = 0x00008917; +pub const SIOCSIFDSTADDR: c_ulong = 0x00008918; +pub const SIOCGIFBRDADDR: c_ulong = 0x00008919; +pub const SIOCSIFBRDADDR: c_ulong = 0x0000891A; +pub const SIOCGIFNETMASK: c_ulong = 0x0000891B; +pub const SIOCSIFNETMASK: c_ulong = 0x0000891C; +pub const SIOCGIFMETRIC: c_ulong = 0x0000891D; +pub const SIOCSIFMETRIC: c_ulong = 0x0000891E; +pub const SIOCGIFMEM: c_ulong = 0x0000891F; +pub const SIOCSIFMEM: c_ulong = 0x00008920; +pub const SIOCGIFMTU: c_ulong = 0x00008921; +pub const SIOCSIFMTU: c_ulong = 0x00008922; +pub const SIOCSIFNAME: c_ulong = 0x00008923; +pub const SIOCSIFHWADDR: c_ulong = 0x00008924; +pub const SIOCGIFENCAP: c_ulong = 0x00008925; +pub const SIOCSIFENCAP: c_ulong = 0x00008926; +pub const SIOCGIFHWADDR: c_ulong = 0x00008927; +pub const SIOCGIFSLAVE: c_ulong = 0x00008929; +pub const SIOCSIFSLAVE: c_ulong = 0x00008930; +pub const SIOCADDMULTI: c_ulong = 0x00008931; +pub const SIOCDELMULTI: c_ulong = 0x00008932; +pub const SIOCGIFINDEX: c_ulong = 0x00008933; +pub const SIOGIFINDEX: c_ulong = SIOCGIFINDEX; +pub const SIOCSIFPFLAGS: c_ulong = 0x00008934; +pub const SIOCGIFPFLAGS: c_ulong = 0x00008935; +pub const SIOCDIFADDR: c_ulong = 0x00008936; +pub const SIOCSIFHWBROADCAST: c_ulong = 0x00008937; +pub const SIOCGIFCOUNT: c_ulong = 0x00008938; +pub const SIOCGIFBR: c_ulong = 0x00008940; +pub const SIOCSIFBR: c_ulong = 0x00008941; +pub const SIOCGIFTXQLEN: c_ulong = 0x00008942; +pub const SIOCSIFTXQLEN: c_ulong = 0x00008943; +pub const SIOCETHTOOL: c_ulong = 0x00008946; +pub const SIOCGMIIPHY: c_ulong = 0x00008947; +pub const SIOCGMIIREG: c_ulong = 0x00008948; +pub const SIOCSMIIREG: c_ulong = 0x00008949; +pub const SIOCWANDEV: c_ulong = 0x0000894A; +pub const SIOCOUTQNSD: c_ulong = 0x0000894B; +pub const SIOCGSKNS: c_ulong = 0x0000894C; +pub const SIOCDARP: c_ulong = 0x00008953; +pub const SIOCGARP: c_ulong = 0x00008954; +pub const SIOCSARP: c_ulong = 0x00008955; +pub const SIOCDRARP: c_ulong = 0x00008960; +pub const SIOCGRARP: c_ulong = 0x00008961; +pub const SIOCSRARP: c_ulong = 0x00008962; +pub const SIOCGIFMAP: c_ulong = 0x00008970; +pub const SIOCSIFMAP: c_ulong = 0x00008971; +pub const SIOCSHWTSTAMP: c_ulong = 0x000089b0; +pub const SIOCGHWTSTAMP: c_ulong = 0x000089b1; // wireless.h -pub const WIRELESS_EXT: ::c_ulong = 0x16; - -pub const SIOCSIWCOMMIT: ::c_ulong = 0x8B00; -pub const SIOCGIWNAME: ::c_ulong = 0x8B01; - -pub const SIOCSIWNWID: ::c_ulong = 0x8B02; -pub const SIOCGIWNWID: ::c_ulong = 0x8B03; -pub const SIOCSIWFREQ: ::c_ulong = 0x8B04; -pub const SIOCGIWFREQ: ::c_ulong = 0x8B05; -pub const SIOCSIWMODE: ::c_ulong = 0x8B06; -pub const SIOCGIWMODE: ::c_ulong = 0x8B07; -pub const SIOCSIWSENS: ::c_ulong = 0x8B08; -pub const SIOCGIWSENS: ::c_ulong = 0x8B09; - -pub const SIOCSIWRANGE: ::c_ulong = 0x8B0A; -pub const SIOCGIWRANGE: ::c_ulong = 0x8B0B; -pub const SIOCSIWPRIV: ::c_ulong = 0x8B0C; -pub const SIOCGIWPRIV: ::c_ulong = 0x8B0D; -pub const SIOCSIWSTATS: ::c_ulong = 0x8B0E; -pub const SIOCGIWSTATS: ::c_ulong = 0x8B0F; - -pub const SIOCSIWSPY: ::c_ulong = 0x8B10; -pub const SIOCGIWSPY: ::c_ulong = 0x8B11; -pub const SIOCSIWTHRSPY: ::c_ulong = 0x8B12; -pub const SIOCGIWTHRSPY: ::c_ulong = 0x8B13; - -pub const SIOCSIWAP: ::c_ulong = 0x8B14; -pub const SIOCGIWAP: ::c_ulong = 0x8B15; -pub const SIOCGIWAPLIST: ::c_ulong = 0x8B17; -pub const SIOCSIWSCAN: ::c_ulong = 0x8B18; -pub const SIOCGIWSCAN: ::c_ulong = 0x8B19; - -pub const SIOCSIWESSID: ::c_ulong = 0x8B1A; -pub const SIOCGIWESSID: ::c_ulong = 0x8B1B; -pub const SIOCSIWNICKN: ::c_ulong = 0x8B1C; -pub const SIOCGIWNICKN: ::c_ulong = 0x8B1D; - -pub const SIOCSIWRATE: ::c_ulong = 0x8B20; -pub const SIOCGIWRATE: ::c_ulong = 0x8B21; -pub const SIOCSIWRTS: ::c_ulong = 0x8B22; -pub const SIOCGIWRTS: ::c_ulong = 0x8B23; -pub const SIOCSIWFRAG: ::c_ulong = 0x8B24; -pub const SIOCGIWFRAG: ::c_ulong = 0x8B25; -pub const SIOCSIWTXPOW: ::c_ulong = 0x8B26; -pub const SIOCGIWTXPOW: ::c_ulong = 0x8B27; -pub const SIOCSIWRETRY: ::c_ulong = 0x8B28; -pub const SIOCGIWRETRY: ::c_ulong = 0x8B29; - -pub const SIOCSIWENCODE: ::c_ulong = 0x8B2A; -pub const SIOCGIWENCODE: ::c_ulong = 0x8B2B; - -pub const SIOCSIWPOWER: ::c_ulong = 0x8B2C; -pub const SIOCGIWPOWER: ::c_ulong = 0x8B2D; - -pub const SIOCSIWGENIE: ::c_ulong = 0x8B30; -pub const SIOCGIWGENIE: ::c_ulong = 0x8B31; - -pub const SIOCSIWMLME: ::c_ulong = 0x8B16; - -pub const SIOCSIWAUTH: ::c_ulong = 0x8B32; -pub const SIOCGIWAUTH: ::c_ulong = 0x8B33; - -pub const SIOCSIWENCODEEXT: ::c_ulong = 0x8B34; -pub const SIOCGIWENCODEEXT: ::c_ulong = 0x8B35; - -pub const SIOCSIWPMKSA: ::c_ulong = 0x8B36; - -pub const SIOCIWFIRSTPRIV: ::c_ulong = 0x8BE0; -pub const SIOCIWLASTPRIV: ::c_ulong = 0x8BFF; - -pub const SIOCIWFIRST: ::c_ulong = 0x8B00; -pub const SIOCIWLAST: ::c_ulong = SIOCIWLASTPRIV; - -pub const IWEVTXDROP: ::c_ulong = 0x8C00; -pub const IWEVQUAL: ::c_ulong = 0x8C01; -pub const IWEVCUSTOM: ::c_ulong = 0x8C02; -pub const IWEVREGISTERED: ::c_ulong = 0x8C03; -pub const IWEVEXPIRED: ::c_ulong = 0x8C04; -pub const IWEVGENIE: ::c_ulong = 0x8C05; -pub const IWEVMICHAELMICFAILURE: ::c_ulong = 0x8C06; -pub const IWEVASSOCREQIE: ::c_ulong = 0x8C07; -pub const IWEVASSOCRESPIE: ::c_ulong = 0x8C08; -pub const IWEVPMKIDCAND: ::c_ulong = 0x8C09; -pub const IWEVFIRST: ::c_ulong = 0x8C00; - -pub const IW_PRIV_TYPE_MASK: ::c_ulong = 0x7000; -pub const IW_PRIV_TYPE_NONE: ::c_ulong = 0x0000; -pub const IW_PRIV_TYPE_BYTE: ::c_ulong = 0x1000; -pub const IW_PRIV_TYPE_CHAR: ::c_ulong = 0x2000; -pub const IW_PRIV_TYPE_INT: ::c_ulong = 0x4000; -pub const IW_PRIV_TYPE_FLOAT: ::c_ulong = 0x5000; -pub const IW_PRIV_TYPE_ADDR: ::c_ulong = 0x6000; - -pub const IW_PRIV_SIZE_FIXED: ::c_ulong = 0x0800; - -pub const IW_PRIV_SIZE_MASK: ::c_ulong = 0x07FF; +pub const WIRELESS_EXT: c_ulong = 0x16; + +pub const SIOCSIWCOMMIT: c_ulong = 0x8B00; +pub const SIOCGIWNAME: c_ulong = 0x8B01; + +pub const SIOCSIWNWID: c_ulong = 0x8B02; +pub const SIOCGIWNWID: c_ulong = 0x8B03; +pub const SIOCSIWFREQ: c_ulong = 0x8B04; +pub const SIOCGIWFREQ: c_ulong = 0x8B05; +pub const SIOCSIWMODE: c_ulong = 0x8B06; +pub const SIOCGIWMODE: c_ulong = 0x8B07; +pub const SIOCSIWSENS: c_ulong = 0x8B08; +pub const SIOCGIWSENS: c_ulong = 0x8B09; + +pub const SIOCSIWRANGE: c_ulong = 0x8B0A; +pub const SIOCGIWRANGE: c_ulong = 0x8B0B; +pub const SIOCSIWPRIV: c_ulong = 0x8B0C; +pub const SIOCGIWPRIV: c_ulong = 0x8B0D; +pub const SIOCSIWSTATS: c_ulong = 0x8B0E; +pub const SIOCGIWSTATS: c_ulong = 0x8B0F; + +pub const SIOCSIWSPY: c_ulong = 0x8B10; +pub const SIOCGIWSPY: c_ulong = 0x8B11; +pub const SIOCSIWTHRSPY: c_ulong = 0x8B12; +pub const SIOCGIWTHRSPY: c_ulong = 0x8B13; + +pub const SIOCSIWAP: c_ulong = 0x8B14; +pub const SIOCGIWAP: c_ulong = 0x8B15; +pub const SIOCGIWAPLIST: c_ulong = 0x8B17; +pub const SIOCSIWSCAN: c_ulong = 0x8B18; +pub const SIOCGIWSCAN: c_ulong = 0x8B19; + +pub const SIOCSIWESSID: c_ulong = 0x8B1A; +pub const SIOCGIWESSID: c_ulong = 0x8B1B; +pub const SIOCSIWNICKN: c_ulong = 0x8B1C; +pub const SIOCGIWNICKN: c_ulong = 0x8B1D; + +pub const SIOCSIWRATE: c_ulong = 0x8B20; +pub const SIOCGIWRATE: c_ulong = 0x8B21; +pub const SIOCSIWRTS: c_ulong = 0x8B22; +pub const SIOCGIWRTS: c_ulong = 0x8B23; +pub const SIOCSIWFRAG: c_ulong = 0x8B24; +pub const SIOCGIWFRAG: c_ulong = 0x8B25; +pub const SIOCSIWTXPOW: c_ulong = 0x8B26; +pub const SIOCGIWTXPOW: c_ulong = 0x8B27; +pub const SIOCSIWRETRY: c_ulong = 0x8B28; +pub const SIOCGIWRETRY: c_ulong = 0x8B29; + +pub const SIOCSIWENCODE: c_ulong = 0x8B2A; +pub const SIOCGIWENCODE: c_ulong = 0x8B2B; + +pub const SIOCSIWPOWER: c_ulong = 0x8B2C; +pub const SIOCGIWPOWER: c_ulong = 0x8B2D; + +pub const SIOCSIWGENIE: c_ulong = 0x8B30; +pub const SIOCGIWGENIE: c_ulong = 0x8B31; + +pub const SIOCSIWMLME: c_ulong = 0x8B16; + +pub const SIOCSIWAUTH: c_ulong = 0x8B32; +pub const SIOCGIWAUTH: c_ulong = 0x8B33; + +pub const SIOCSIWENCODEEXT: c_ulong = 0x8B34; +pub const SIOCGIWENCODEEXT: c_ulong = 0x8B35; + +pub const SIOCSIWPMKSA: c_ulong = 0x8B36; + +pub const SIOCIWFIRSTPRIV: c_ulong = 0x8BE0; +pub const SIOCIWLASTPRIV: c_ulong = 0x8BFF; + +pub const SIOCIWFIRST: c_ulong = 0x8B00; +pub const SIOCIWLAST: c_ulong = SIOCIWLASTPRIV; + +pub const IWEVTXDROP: c_ulong = 0x8C00; +pub const IWEVQUAL: c_ulong = 0x8C01; +pub const IWEVCUSTOM: c_ulong = 0x8C02; +pub const IWEVREGISTERED: c_ulong = 0x8C03; +pub const IWEVEXPIRED: c_ulong = 0x8C04; +pub const IWEVGENIE: c_ulong = 0x8C05; +pub const IWEVMICHAELMICFAILURE: c_ulong = 0x8C06; +pub const IWEVASSOCREQIE: c_ulong = 0x8C07; +pub const IWEVASSOCRESPIE: c_ulong = 0x8C08; +pub const IWEVPMKIDCAND: c_ulong = 0x8C09; +pub const IWEVFIRST: c_ulong = 0x8C00; + +pub const IW_PRIV_TYPE_MASK: c_ulong = 0x7000; +pub const IW_PRIV_TYPE_NONE: c_ulong = 0x0000; +pub const IW_PRIV_TYPE_BYTE: c_ulong = 0x1000; +pub const IW_PRIV_TYPE_CHAR: c_ulong = 0x2000; +pub const IW_PRIV_TYPE_INT: c_ulong = 0x4000; +pub const IW_PRIV_TYPE_FLOAT: c_ulong = 0x5000; +pub const IW_PRIV_TYPE_ADDR: c_ulong = 0x6000; + +pub const IW_PRIV_SIZE_FIXED: c_ulong = 0x0800; + +pub const IW_PRIV_SIZE_MASK: c_ulong = 0x07FF; pub const IW_MAX_FREQUENCIES: usize = 32; pub const IW_MAX_BITRATES: usize = 32; @@ -4024,100 +4028,100 @@ pub const IW_MODE_SECOND: usize = 5; pub const IW_MODE_MONITOR: usize = 6; pub const IW_MODE_MESH: usize = 7; -pub const IW_QUAL_QUAL_UPDATED: ::c_ulong = 0x01; -pub const IW_QUAL_LEVEL_UPDATED: ::c_ulong = 0x02; -pub const IW_QUAL_NOISE_UPDATED: ::c_ulong = 0x04; -pub const IW_QUAL_ALL_UPDATED: ::c_ulong = 0x07; -pub const IW_QUAL_DBM: ::c_ulong = 0x08; -pub const IW_QUAL_QUAL_INVALID: ::c_ulong = 0x10; -pub const IW_QUAL_LEVEL_INVALID: ::c_ulong = 0x20; -pub const IW_QUAL_NOISE_INVALID: ::c_ulong = 0x40; -pub const IW_QUAL_RCPI: ::c_ulong = 0x80; -pub const IW_QUAL_ALL_INVALID: ::c_ulong = 0x70; +pub const IW_QUAL_QUAL_UPDATED: c_ulong = 0x01; +pub const IW_QUAL_LEVEL_UPDATED: c_ulong = 0x02; +pub const IW_QUAL_NOISE_UPDATED: c_ulong = 0x04; +pub const IW_QUAL_ALL_UPDATED: c_ulong = 0x07; +pub const IW_QUAL_DBM: c_ulong = 0x08; +pub const IW_QUAL_QUAL_INVALID: c_ulong = 0x10; +pub const IW_QUAL_LEVEL_INVALID: c_ulong = 0x20; +pub const IW_QUAL_NOISE_INVALID: c_ulong = 0x40; +pub const IW_QUAL_RCPI: c_ulong = 0x80; +pub const IW_QUAL_ALL_INVALID: c_ulong = 0x70; -pub const IW_FREQ_AUTO: ::c_ulong = 0x00; -pub const IW_FREQ_FIXED: ::c_ulong = 0x01; +pub const IW_FREQ_AUTO: c_ulong = 0x00; +pub const IW_FREQ_FIXED: c_ulong = 0x01; pub const IW_MAX_ENCODING_SIZES: usize = 8; pub const IW_ENCODING_TOKEN_MAX: usize = 64; -pub const IW_ENCODE_INDEX: ::c_ulong = 0x00FF; -pub const IW_ENCODE_FLAGS: ::c_ulong = 0xFF00; -pub const IW_ENCODE_MODE: ::c_ulong = 0xF000; -pub const IW_ENCODE_DISABLED: ::c_ulong = 0x8000; -pub const IW_ENCODE_ENABLED: ::c_ulong = 0x0000; -pub const IW_ENCODE_RESTRICTED: ::c_ulong = 0x4000; -pub const IW_ENCODE_OPEN: ::c_ulong = 0x2000; -pub const IW_ENCODE_NOKEY: ::c_ulong = 0x0800; -pub const IW_ENCODE_TEMP: ::c_ulong = 0x0400; - -pub const IW_POWER_ON: ::c_ulong = 0x0000; -pub const IW_POWER_TYPE: ::c_ulong = 0xF000; -pub const IW_POWER_PERIOD: ::c_ulong = 0x1000; -pub const IW_POWER_TIMEOUT: ::c_ulong = 0x2000; -pub const IW_POWER_MODE: ::c_ulong = 0x0F00; -pub const IW_POWER_UNICAST_R: ::c_ulong = 0x0100; -pub const IW_POWER_MULTICAST_R: ::c_ulong = 0x0200; -pub const IW_POWER_ALL_R: ::c_ulong = 0x0300; -pub const IW_POWER_FORCE_S: ::c_ulong = 0x0400; -pub const IW_POWER_REPEATER: ::c_ulong = 0x0800; -pub const IW_POWER_MODIFIER: ::c_ulong = 0x000F; -pub const IW_POWER_MIN: ::c_ulong = 0x0001; -pub const IW_POWER_MAX: ::c_ulong = 0x0002; -pub const IW_POWER_RELATIVE: ::c_ulong = 0x0004; - -pub const IW_TXPOW_TYPE: ::c_ulong = 0x00FF; -pub const IW_TXPOW_DBM: ::c_ulong = 0x0000; -pub const IW_TXPOW_MWATT: ::c_ulong = 0x0001; -pub const IW_TXPOW_RELATIVE: ::c_ulong = 0x0002; -pub const IW_TXPOW_RANGE: ::c_ulong = 0x1000; - -pub const IW_RETRY_ON: ::c_ulong = 0x0000; -pub const IW_RETRY_TYPE: ::c_ulong = 0xF000; -pub const IW_RETRY_LIMIT: ::c_ulong = 0x1000; -pub const IW_RETRY_LIFETIME: ::c_ulong = 0x2000; -pub const IW_RETRY_MODIFIER: ::c_ulong = 0x00FF; -pub const IW_RETRY_MIN: ::c_ulong = 0x0001; -pub const IW_RETRY_MAX: ::c_ulong = 0x0002; -pub const IW_RETRY_RELATIVE: ::c_ulong = 0x0004; -pub const IW_RETRY_SHORT: ::c_ulong = 0x0010; -pub const IW_RETRY_LONG: ::c_ulong = 0x0020; - -pub const IW_SCAN_DEFAULT: ::c_ulong = 0x0000; -pub const IW_SCAN_ALL_ESSID: ::c_ulong = 0x0001; -pub const IW_SCAN_THIS_ESSID: ::c_ulong = 0x0002; -pub const IW_SCAN_ALL_FREQ: ::c_ulong = 0x0004; -pub const IW_SCAN_THIS_FREQ: ::c_ulong = 0x0008; -pub const IW_SCAN_ALL_MODE: ::c_ulong = 0x0010; -pub const IW_SCAN_THIS_MODE: ::c_ulong = 0x0020; -pub const IW_SCAN_ALL_RATE: ::c_ulong = 0x0040; -pub const IW_SCAN_THIS_RATE: ::c_ulong = 0x0080; +pub const IW_ENCODE_INDEX: c_ulong = 0x00FF; +pub const IW_ENCODE_FLAGS: c_ulong = 0xFF00; +pub const IW_ENCODE_MODE: c_ulong = 0xF000; +pub const IW_ENCODE_DISABLED: c_ulong = 0x8000; +pub const IW_ENCODE_ENABLED: c_ulong = 0x0000; +pub const IW_ENCODE_RESTRICTED: c_ulong = 0x4000; +pub const IW_ENCODE_OPEN: c_ulong = 0x2000; +pub const IW_ENCODE_NOKEY: c_ulong = 0x0800; +pub const IW_ENCODE_TEMP: c_ulong = 0x0400; + +pub const IW_POWER_ON: c_ulong = 0x0000; +pub const IW_POWER_TYPE: c_ulong = 0xF000; +pub const IW_POWER_PERIOD: c_ulong = 0x1000; +pub const IW_POWER_TIMEOUT: c_ulong = 0x2000; +pub const IW_POWER_MODE: c_ulong = 0x0F00; +pub const IW_POWER_UNICAST_R: c_ulong = 0x0100; +pub const IW_POWER_MULTICAST_R: c_ulong = 0x0200; +pub const IW_POWER_ALL_R: c_ulong = 0x0300; +pub const IW_POWER_FORCE_S: c_ulong = 0x0400; +pub const IW_POWER_REPEATER: c_ulong = 0x0800; +pub const IW_POWER_MODIFIER: c_ulong = 0x000F; +pub const IW_POWER_MIN: c_ulong = 0x0001; +pub const IW_POWER_MAX: c_ulong = 0x0002; +pub const IW_POWER_RELATIVE: c_ulong = 0x0004; + +pub const IW_TXPOW_TYPE: c_ulong = 0x00FF; +pub const IW_TXPOW_DBM: c_ulong = 0x0000; +pub const IW_TXPOW_MWATT: c_ulong = 0x0001; +pub const IW_TXPOW_RELATIVE: c_ulong = 0x0002; +pub const IW_TXPOW_RANGE: c_ulong = 0x1000; + +pub const IW_RETRY_ON: c_ulong = 0x0000; +pub const IW_RETRY_TYPE: c_ulong = 0xF000; +pub const IW_RETRY_LIMIT: c_ulong = 0x1000; +pub const IW_RETRY_LIFETIME: c_ulong = 0x2000; +pub const IW_RETRY_MODIFIER: c_ulong = 0x00FF; +pub const IW_RETRY_MIN: c_ulong = 0x0001; +pub const IW_RETRY_MAX: c_ulong = 0x0002; +pub const IW_RETRY_RELATIVE: c_ulong = 0x0004; +pub const IW_RETRY_SHORT: c_ulong = 0x0010; +pub const IW_RETRY_LONG: c_ulong = 0x0020; + +pub const IW_SCAN_DEFAULT: c_ulong = 0x0000; +pub const IW_SCAN_ALL_ESSID: c_ulong = 0x0001; +pub const IW_SCAN_THIS_ESSID: c_ulong = 0x0002; +pub const IW_SCAN_ALL_FREQ: c_ulong = 0x0004; +pub const IW_SCAN_THIS_FREQ: c_ulong = 0x0008; +pub const IW_SCAN_ALL_MODE: c_ulong = 0x0010; +pub const IW_SCAN_THIS_MODE: c_ulong = 0x0020; +pub const IW_SCAN_ALL_RATE: c_ulong = 0x0040; +pub const IW_SCAN_THIS_RATE: c_ulong = 0x0080; pub const IW_SCAN_TYPE_ACTIVE: usize = 0; pub const IW_SCAN_TYPE_PASSIVE: usize = 1; pub const IW_SCAN_MAX_DATA: usize = 4096; -pub const IW_SCAN_CAPA_NONE: ::c_ulong = 0x00; -pub const IW_SCAN_CAPA_ESSID: ::c_ulong = 0x01; -pub const IW_SCAN_CAPA_BSSID: ::c_ulong = 0x02; -pub const IW_SCAN_CAPA_CHANNEL: ::c_ulong = 0x04; -pub const IW_SCAN_CAPA_MODE: ::c_ulong = 0x08; -pub const IW_SCAN_CAPA_RATE: ::c_ulong = 0x10; -pub const IW_SCAN_CAPA_TYPE: ::c_ulong = 0x20; -pub const IW_SCAN_CAPA_TIME: ::c_ulong = 0x40; +pub const IW_SCAN_CAPA_NONE: c_ulong = 0x00; +pub const IW_SCAN_CAPA_ESSID: c_ulong = 0x01; +pub const IW_SCAN_CAPA_BSSID: c_ulong = 0x02; +pub const IW_SCAN_CAPA_CHANNEL: c_ulong = 0x04; +pub const IW_SCAN_CAPA_MODE: c_ulong = 0x08; +pub const IW_SCAN_CAPA_RATE: c_ulong = 0x10; +pub const IW_SCAN_CAPA_TYPE: c_ulong = 0x20; +pub const IW_SCAN_CAPA_TIME: c_ulong = 0x40; -pub const IW_CUSTOM_MAX: ::c_ulong = 256; +pub const IW_CUSTOM_MAX: c_ulong = 256; -pub const IW_GENERIC_IE_MAX: ::c_ulong = 1024; +pub const IW_GENERIC_IE_MAX: c_ulong = 1024; -pub const IW_MLME_DEAUTH: ::c_ulong = 0; -pub const IW_MLME_DISASSOC: ::c_ulong = 1; -pub const IW_MLME_AUTH: ::c_ulong = 2; -pub const IW_MLME_ASSOC: ::c_ulong = 3; +pub const IW_MLME_DEAUTH: c_ulong = 0; +pub const IW_MLME_DISASSOC: c_ulong = 1; +pub const IW_MLME_AUTH: c_ulong = 2; +pub const IW_MLME_ASSOC: c_ulong = 3; -pub const IW_AUTH_INDEX: ::c_ulong = 0x0FFF; -pub const IW_AUTH_FLAGS: ::c_ulong = 0xF000; +pub const IW_AUTH_INDEX: c_ulong = 0x0FFF; +pub const IW_AUTH_FLAGS: c_ulong = 0xF000; pub const IW_AUTH_WPA_VERSION: usize = 0; pub const IW_AUTH_CIPHER_PAIRWISE: usize = 1; @@ -4133,23 +4137,23 @@ pub const IW_AUTH_PRIVACY_INVOKED: usize = 10; pub const IW_AUTH_CIPHER_GROUP_MGMT: usize = 11; pub const IW_AUTH_MFP: usize = 12; -pub const IW_AUTH_WPA_VERSION_DISABLED: ::c_ulong = 0x00000001; -pub const IW_AUTH_WPA_VERSION_WPA: ::c_ulong = 0x00000002; -pub const IW_AUTH_WPA_VERSION_WPA2: ::c_ulong = 0x00000004; +pub const IW_AUTH_WPA_VERSION_DISABLED: c_ulong = 0x00000001; +pub const IW_AUTH_WPA_VERSION_WPA: c_ulong = 0x00000002; +pub const IW_AUTH_WPA_VERSION_WPA2: c_ulong = 0x00000004; -pub const IW_AUTH_CIPHER_NONE: ::c_ulong = 0x00000001; -pub const IW_AUTH_CIPHER_WEP40: ::c_ulong = 0x00000002; -pub const IW_AUTH_CIPHER_TKIP: ::c_ulong = 0x00000004; -pub const IW_AUTH_CIPHER_CCMP: ::c_ulong = 0x00000008; -pub const IW_AUTH_CIPHER_WEP104: ::c_ulong = 0x00000010; -pub const IW_AUTH_CIPHER_AES_CMAC: ::c_ulong = 0x00000020; +pub const IW_AUTH_CIPHER_NONE: c_ulong = 0x00000001; +pub const IW_AUTH_CIPHER_WEP40: c_ulong = 0x00000002; +pub const IW_AUTH_CIPHER_TKIP: c_ulong = 0x00000004; +pub const IW_AUTH_CIPHER_CCMP: c_ulong = 0x00000008; +pub const IW_AUTH_CIPHER_WEP104: c_ulong = 0x00000010; +pub const IW_AUTH_CIPHER_AES_CMAC: c_ulong = 0x00000020; pub const IW_AUTH_KEY_MGMT_802_1X: usize = 1; pub const IW_AUTH_KEY_MGMT_PSK: usize = 2; -pub const IW_AUTH_ALG_OPEN_SYSTEM: ::c_ulong = 0x00000001; -pub const IW_AUTH_ALG_SHARED_KEY: ::c_ulong = 0x00000002; -pub const IW_AUTH_ALG_LEAP: ::c_ulong = 0x00000004; +pub const IW_AUTH_ALG_OPEN_SYSTEM: c_ulong = 0x00000001; +pub const IW_AUTH_ALG_SHARED_KEY: c_ulong = 0x00000002; +pub const IW_AUTH_ALG_LEAP: c_ulong = 0x00000004; pub const IW_AUTH_ROAMING_ENABLE: usize = 0; pub const IW_AUTH_ROAMING_DISABLE: usize = 1; @@ -4167,22 +4171,22 @@ pub const IW_ENCODE_ALG_CCMP: usize = 3; pub const IW_ENCODE_ALG_PMK: usize = 4; pub const IW_ENCODE_ALG_AES_CMAC: usize = 5; -pub const IW_ENCODE_EXT_TX_SEQ_VALID: ::c_ulong = 0x00000001; -pub const IW_ENCODE_EXT_RX_SEQ_VALID: ::c_ulong = 0x00000002; -pub const IW_ENCODE_EXT_GROUP_KEY: ::c_ulong = 0x00000004; -pub const IW_ENCODE_EXT_SET_TX_KEY: ::c_ulong = 0x00000008; +pub const IW_ENCODE_EXT_TX_SEQ_VALID: c_ulong = 0x00000001; +pub const IW_ENCODE_EXT_RX_SEQ_VALID: c_ulong = 0x00000002; +pub const IW_ENCODE_EXT_GROUP_KEY: c_ulong = 0x00000004; +pub const IW_ENCODE_EXT_SET_TX_KEY: c_ulong = 0x00000008; -pub const IW_MICFAILURE_KEY_ID: ::c_ulong = 0x00000003; -pub const IW_MICFAILURE_GROUP: ::c_ulong = 0x00000004; -pub const IW_MICFAILURE_PAIRWISE: ::c_ulong = 0x00000008; -pub const IW_MICFAILURE_STAKEY: ::c_ulong = 0x00000010; -pub const IW_MICFAILURE_COUNT: ::c_ulong = 0x00000060; +pub const IW_MICFAILURE_KEY_ID: c_ulong = 0x00000003; +pub const IW_MICFAILURE_GROUP: c_ulong = 0x00000004; +pub const IW_MICFAILURE_PAIRWISE: c_ulong = 0x00000008; +pub const IW_MICFAILURE_STAKEY: c_ulong = 0x00000010; +pub const IW_MICFAILURE_COUNT: c_ulong = 0x00000060; -pub const IW_ENC_CAPA_WPA: ::c_ulong = 0x00000001; -pub const IW_ENC_CAPA_WPA2: ::c_ulong = 0x00000002; -pub const IW_ENC_CAPA_CIPHER_TKIP: ::c_ulong = 0x00000004; -pub const IW_ENC_CAPA_CIPHER_CCMP: ::c_ulong = 0x00000008; -pub const IW_ENC_CAPA_4WAY_HANDSHAKE: ::c_ulong = 0x00000010; +pub const IW_ENC_CAPA_WPA: c_ulong = 0x00000001; +pub const IW_ENC_CAPA_WPA2: c_ulong = 0x00000002; +pub const IW_ENC_CAPA_CIPHER_TKIP: c_ulong = 0x00000004; +pub const IW_ENC_CAPA_CIPHER_CCMP: c_ulong = 0x00000008; +pub const IW_ENC_CAPA_4WAY_HANDSHAKE: c_ulong = 0x00000010; pub const IW_EVENT_CAPA_K_0: c_ulong = 0x4000050; // IW_EVENT_CAPA_MASK(0x8B04) | IW_EVENT_CAPA_MASK(0x8B06) | IW_EVENT_CAPA_MASK(0x8B1A); pub const IW_EVENT_CAPA_K_1: c_ulong = 0x400; // W_EVENT_CAPA_MASK(0x8B2A); @@ -4193,7 +4197,7 @@ pub const IW_PMKSA_FLUSH: usize = 3; pub const IW_PMKID_LEN: usize = 16; -pub const IW_PMKID_CAND_PREAUTH: ::c_ulong = 0x00000001; +pub const IW_PMKID_CAND_PREAUTH: c_ulong = 0x00000001; pub const IW_EV_LCP_PK_LEN: usize = 4; @@ -4210,23 +4214,23 @@ pub const IPTOS_PREC_MASK: u8 = 0xE0; pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; -pub const RTF_UP: ::c_ushort = 0x0001; -pub const RTF_GATEWAY: ::c_ushort = 0x0002; - -pub const RTF_HOST: ::c_ushort = 0x0004; -pub const RTF_REINSTATE: ::c_ushort = 0x0008; -pub const RTF_DYNAMIC: ::c_ushort = 0x0010; -pub const RTF_MODIFIED: ::c_ushort = 0x0020; -pub const RTF_MTU: ::c_ushort = 0x0040; -pub const RTF_MSS: ::c_ushort = RTF_MTU; -pub const RTF_WINDOW: ::c_ushort = 0x0080; -pub const RTF_IRTT: ::c_ushort = 0x0100; -pub const RTF_REJECT: ::c_ushort = 0x0200; -pub const RTF_STATIC: ::c_ushort = 0x0400; -pub const RTF_XRESOLVE: ::c_ushort = 0x0800; -pub const RTF_NOFORWARD: ::c_ushort = 0x1000; -pub const RTF_THROW: ::c_ushort = 0x2000; -pub const RTF_NOPMTUDISC: ::c_ushort = 0x4000; +pub const RTF_UP: c_ushort = 0x0001; +pub const RTF_GATEWAY: c_ushort = 0x0002; + +pub const RTF_HOST: c_ushort = 0x0004; +pub const RTF_REINSTATE: c_ushort = 0x0008; +pub const RTF_DYNAMIC: c_ushort = 0x0010; +pub const RTF_MODIFIED: c_ushort = 0x0020; +pub const RTF_MTU: c_ushort = 0x0040; +pub const RTF_MSS: c_ushort = RTF_MTU; +pub const RTF_WINDOW: c_ushort = 0x0080; +pub const RTF_IRTT: c_ushort = 0x0100; +pub const RTF_REJECT: c_ushort = 0x0200; +pub const RTF_STATIC: c_ushort = 0x0400; +pub const RTF_XRESOLVE: c_ushort = 0x0800; +pub const RTF_NOFORWARD: c_ushort = 0x1000; +pub const RTF_THROW: c_ushort = 0x2000; +pub const RTF_NOPMTUDISC: c_ushort = 0x4000; pub const RTF_DEFAULT: u32 = 0x00010000; pub const RTF_ALLONLINK: u32 = 0x00020000; @@ -4274,86 +4278,86 @@ pub const NTF_MASTER: u8 = 0x04; pub const NTF_PROXY: u8 = 0x08; pub const NTF_ROUTER: u8 = 0x80; -pub const NDA_UNSPEC: ::c_ushort = 0; -pub const NDA_DST: ::c_ushort = 1; -pub const NDA_LLADDR: ::c_ushort = 2; -pub const NDA_CACHEINFO: ::c_ushort = 3; -pub const NDA_PROBES: ::c_ushort = 4; -pub const NDA_VLAN: ::c_ushort = 5; -pub const NDA_PORT: ::c_ushort = 6; -pub const NDA_VNI: ::c_ushort = 7; -pub const NDA_IFINDEX: ::c_ushort = 8; +pub const NDA_UNSPEC: c_ushort = 0; +pub const NDA_DST: c_ushort = 1; +pub const NDA_LLADDR: c_ushort = 2; +pub const NDA_CACHEINFO: c_ushort = 3; +pub const NDA_PROBES: c_ushort = 4; +pub const NDA_VLAN: c_ushort = 5; +pub const NDA_PORT: c_ushort = 6; +pub const NDA_VNI: c_ushort = 7; +pub const NDA_IFINDEX: c_ushort = 8; // linux/netlink.h -pub const NLA_ALIGNTO: ::c_int = 4; - -pub const NETLINK_ROUTE: ::c_int = 0; -pub const NETLINK_UNUSED: ::c_int = 1; -pub const NETLINK_USERSOCK: ::c_int = 2; -pub const NETLINK_FIREWALL: ::c_int = 3; -pub const NETLINK_SOCK_DIAG: ::c_int = 4; -pub const NETLINK_NFLOG: ::c_int = 5; -pub const NETLINK_XFRM: ::c_int = 6; -pub const NETLINK_SELINUX: ::c_int = 7; -pub const NETLINK_ISCSI: ::c_int = 8; -pub const NETLINK_AUDIT: ::c_int = 9; -pub const NETLINK_FIB_LOOKUP: ::c_int = 10; -pub const NETLINK_CONNECTOR: ::c_int = 11; -pub const NETLINK_NETFILTER: ::c_int = 12; -pub const NETLINK_IP6_FW: ::c_int = 13; -pub const NETLINK_DNRTMSG: ::c_int = 14; -pub const NETLINK_KOBJECT_UEVENT: ::c_int = 15; -pub const NETLINK_GENERIC: ::c_int = 16; -pub const NETLINK_SCSITRANSPORT: ::c_int = 18; -pub const NETLINK_ECRYPTFS: ::c_int = 19; -pub const NETLINK_RDMA: ::c_int = 20; -pub const NETLINK_CRYPTO: ::c_int = 21; -pub const NETLINK_INET_DIAG: ::c_int = NETLINK_SOCK_DIAG; - -pub const NLM_F_REQUEST: ::c_int = 1; -pub const NLM_F_MULTI: ::c_int = 2; -pub const NLM_F_ACK: ::c_int = 4; -pub const NLM_F_ECHO: ::c_int = 8; -pub const NLM_F_DUMP_INTR: ::c_int = 16; -pub const NLM_F_DUMP_FILTERED: ::c_int = 32; - -pub const NLM_F_ROOT: ::c_int = 0x100; -pub const NLM_F_MATCH: ::c_int = 0x200; -pub const NLM_F_ATOMIC: ::c_int = 0x400; -pub const NLM_F_DUMP: ::c_int = NLM_F_ROOT | NLM_F_MATCH; - -pub const NLM_F_REPLACE: ::c_int = 0x100; -pub const NLM_F_EXCL: ::c_int = 0x200; -pub const NLM_F_CREATE: ::c_int = 0x400; -pub const NLM_F_APPEND: ::c_int = 0x800; - -pub const NETLINK_ADD_MEMBERSHIP: ::c_int = 1; -pub const NETLINK_DROP_MEMBERSHIP: ::c_int = 2; -pub const NETLINK_PKTINFO: ::c_int = 3; -pub const NETLINK_BROADCAST_ERROR: ::c_int = 4; -pub const NETLINK_NO_ENOBUFS: ::c_int = 5; -pub const NETLINK_RX_RING: ::c_int = 6; -pub const NETLINK_TX_RING: ::c_int = 7; -pub const NETLINK_LISTEN_ALL_NSID: ::c_int = 8; -pub const NETLINK_LIST_MEMBERSHIPS: ::c_int = 9; -pub const NETLINK_CAP_ACK: ::c_int = 10; -pub const NETLINK_EXT_ACK: ::c_int = 11; -pub const NETLINK_GET_STRICT_CHK: ::c_int = 12; - -pub const NLA_F_NESTED: ::c_int = 1 << 15; -pub const NLA_F_NET_BYTEORDER: ::c_int = 1 << 14; -pub const NLA_TYPE_MASK: ::c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); +pub const NLA_ALIGNTO: c_int = 4; + +pub const NETLINK_ROUTE: c_int = 0; +pub const NETLINK_UNUSED: c_int = 1; +pub const NETLINK_USERSOCK: c_int = 2; +pub const NETLINK_FIREWALL: c_int = 3; +pub const NETLINK_SOCK_DIAG: c_int = 4; +pub const NETLINK_NFLOG: c_int = 5; +pub const NETLINK_XFRM: c_int = 6; +pub const NETLINK_SELINUX: c_int = 7; +pub const NETLINK_ISCSI: c_int = 8; +pub const NETLINK_AUDIT: c_int = 9; +pub const NETLINK_FIB_LOOKUP: c_int = 10; +pub const NETLINK_CONNECTOR: c_int = 11; +pub const NETLINK_NETFILTER: c_int = 12; +pub const NETLINK_IP6_FW: c_int = 13; +pub const NETLINK_DNRTMSG: c_int = 14; +pub const NETLINK_KOBJECT_UEVENT: c_int = 15; +pub const NETLINK_GENERIC: c_int = 16; +pub const NETLINK_SCSITRANSPORT: c_int = 18; +pub const NETLINK_ECRYPTFS: c_int = 19; +pub const NETLINK_RDMA: c_int = 20; +pub const NETLINK_CRYPTO: c_int = 21; +pub const NETLINK_INET_DIAG: c_int = NETLINK_SOCK_DIAG; + +pub const NLM_F_REQUEST: c_int = 1; +pub const NLM_F_MULTI: c_int = 2; +pub const NLM_F_ACK: c_int = 4; +pub const NLM_F_ECHO: c_int = 8; +pub const NLM_F_DUMP_INTR: c_int = 16; +pub const NLM_F_DUMP_FILTERED: c_int = 32; + +pub const NLM_F_ROOT: c_int = 0x100; +pub const NLM_F_MATCH: c_int = 0x200; +pub const NLM_F_ATOMIC: c_int = 0x400; +pub const NLM_F_DUMP: c_int = NLM_F_ROOT | NLM_F_MATCH; + +pub const NLM_F_REPLACE: c_int = 0x100; +pub const NLM_F_EXCL: c_int = 0x200; +pub const NLM_F_CREATE: c_int = 0x400; +pub const NLM_F_APPEND: c_int = 0x800; + +pub const NETLINK_ADD_MEMBERSHIP: c_int = 1; +pub const NETLINK_DROP_MEMBERSHIP: c_int = 2; +pub const NETLINK_PKTINFO: c_int = 3; +pub const NETLINK_BROADCAST_ERROR: c_int = 4; +pub const NETLINK_NO_ENOBUFS: c_int = 5; +pub const NETLINK_RX_RING: c_int = 6; +pub const NETLINK_TX_RING: c_int = 7; +pub const NETLINK_LISTEN_ALL_NSID: c_int = 8; +pub const NETLINK_LIST_MEMBERSHIPS: c_int = 9; +pub const NETLINK_CAP_ACK: c_int = 10; +pub const NETLINK_EXT_ACK: c_int = 11; +pub const NETLINK_GET_STRICT_CHK: c_int = 12; + +pub const NLA_F_NESTED: c_int = 1 << 15; +pub const NLA_F_NET_BYTEORDER: c_int = 1 << 14; +pub const NLA_TYPE_MASK: c_int = !(NLA_F_NESTED | NLA_F_NET_BYTEORDER); // linux/rtnetlink.h -pub const TCA_UNSPEC: ::c_ushort = 0; -pub const TCA_KIND: ::c_ushort = 1; -pub const TCA_OPTIONS: ::c_ushort = 2; -pub const TCA_STATS: ::c_ushort = 3; -pub const TCA_XSTATS: ::c_ushort = 4; -pub const TCA_RATE: ::c_ushort = 5; -pub const TCA_FCNT: ::c_ushort = 6; -pub const TCA_STATS2: ::c_ushort = 7; -pub const TCA_STAB: ::c_ushort = 8; +pub const TCA_UNSPEC: c_ushort = 0; +pub const TCA_KIND: c_ushort = 1; +pub const TCA_OPTIONS: c_ushort = 2; +pub const TCA_STATS: c_ushort = 3; +pub const TCA_XSTATS: c_ushort = 4; +pub const TCA_RATE: c_ushort = 5; +pub const TCA_FCNT: c_ushort = 6; +pub const TCA_STATS2: c_ushort = 7; +pub const TCA_STAB: c_ushort = 8; pub const RTM_NEWLINK: u16 = 16; pub const RTM_DELLINK: u16 = 17; @@ -4404,62 +4408,62 @@ pub const RTM_NEWNSID: u16 = 88; pub const RTM_DELNSID: u16 = 89; pub const RTM_GETNSID: u16 = 90; -pub const RTM_F_NOTIFY: ::c_uint = 0x100; -pub const RTM_F_CLONED: ::c_uint = 0x200; -pub const RTM_F_EQUALIZE: ::c_uint = 0x400; -pub const RTM_F_PREFIX: ::c_uint = 0x800; - -pub const RTA_UNSPEC: ::c_ushort = 0; -pub const RTA_DST: ::c_ushort = 1; -pub const RTA_SRC: ::c_ushort = 2; -pub const RTA_IIF: ::c_ushort = 3; -pub const RTA_OIF: ::c_ushort = 4; -pub const RTA_GATEWAY: ::c_ushort = 5; -pub const RTA_PRIORITY: ::c_ushort = 6; -pub const RTA_PREFSRC: ::c_ushort = 7; -pub const RTA_METRICS: ::c_ushort = 8; -pub const RTA_MULTIPATH: ::c_ushort = 9; -pub const RTA_PROTOINFO: ::c_ushort = 10; // No longer used -pub const RTA_FLOW: ::c_ushort = 11; -pub const RTA_CACHEINFO: ::c_ushort = 12; -pub const RTA_SESSION: ::c_ushort = 13; // No longer used -pub const RTA_MP_ALGO: ::c_ushort = 14; // No longer used -pub const RTA_TABLE: ::c_ushort = 15; -pub const RTA_MARK: ::c_ushort = 16; -pub const RTA_MFC_STATS: ::c_ushort = 17; - -pub const RTN_UNSPEC: ::c_uchar = 0; -pub const RTN_UNICAST: ::c_uchar = 1; -pub const RTN_LOCAL: ::c_uchar = 2; -pub const RTN_BROADCAST: ::c_uchar = 3; -pub const RTN_ANYCAST: ::c_uchar = 4; -pub const RTN_MULTICAST: ::c_uchar = 5; -pub const RTN_BLACKHOLE: ::c_uchar = 6; -pub const RTN_UNREACHABLE: ::c_uchar = 7; -pub const RTN_PROHIBIT: ::c_uchar = 8; -pub const RTN_THROW: ::c_uchar = 9; -pub const RTN_NAT: ::c_uchar = 10; -pub const RTN_XRESOLVE: ::c_uchar = 11; - -pub const RTPROT_UNSPEC: ::c_uchar = 0; -pub const RTPROT_REDIRECT: ::c_uchar = 1; -pub const RTPROT_KERNEL: ::c_uchar = 2; -pub const RTPROT_BOOT: ::c_uchar = 3; -pub const RTPROT_STATIC: ::c_uchar = 4; - -pub const RT_SCOPE_UNIVERSE: ::c_uchar = 0; -pub const RT_SCOPE_SITE: ::c_uchar = 200; -pub const RT_SCOPE_LINK: ::c_uchar = 253; -pub const RT_SCOPE_HOST: ::c_uchar = 254; -pub const RT_SCOPE_NOWHERE: ::c_uchar = 255; - -pub const RT_TABLE_UNSPEC: ::c_uchar = 0; -pub const RT_TABLE_COMPAT: ::c_uchar = 252; -pub const RT_TABLE_DEFAULT: ::c_uchar = 253; -pub const RT_TABLE_MAIN: ::c_uchar = 254; -pub const RT_TABLE_LOCAL: ::c_uchar = 255; - -pub const RTMSG_OVERRUN: u32 = ::NLMSG_OVERRUN as u32; +pub const RTM_F_NOTIFY: c_uint = 0x100; +pub const RTM_F_CLONED: c_uint = 0x200; +pub const RTM_F_EQUALIZE: c_uint = 0x400; +pub const RTM_F_PREFIX: c_uint = 0x800; + +pub const RTA_UNSPEC: c_ushort = 0; +pub const RTA_DST: c_ushort = 1; +pub const RTA_SRC: c_ushort = 2; +pub const RTA_IIF: c_ushort = 3; +pub const RTA_OIF: c_ushort = 4; +pub const RTA_GATEWAY: c_ushort = 5; +pub const RTA_PRIORITY: c_ushort = 6; +pub const RTA_PREFSRC: c_ushort = 7; +pub const RTA_METRICS: c_ushort = 8; +pub const RTA_MULTIPATH: c_ushort = 9; +pub const RTA_PROTOINFO: c_ushort = 10; // No longer used +pub const RTA_FLOW: c_ushort = 11; +pub const RTA_CACHEINFO: c_ushort = 12; +pub const RTA_SESSION: c_ushort = 13; // No longer used +pub const RTA_MP_ALGO: c_ushort = 14; // No longer used +pub const RTA_TABLE: c_ushort = 15; +pub const RTA_MARK: c_ushort = 16; +pub const RTA_MFC_STATS: c_ushort = 17; + +pub const RTN_UNSPEC: c_uchar = 0; +pub const RTN_UNICAST: c_uchar = 1; +pub const RTN_LOCAL: c_uchar = 2; +pub const RTN_BROADCAST: c_uchar = 3; +pub const RTN_ANYCAST: c_uchar = 4; +pub const RTN_MULTICAST: c_uchar = 5; +pub const RTN_BLACKHOLE: c_uchar = 6; +pub const RTN_UNREACHABLE: c_uchar = 7; +pub const RTN_PROHIBIT: c_uchar = 8; +pub const RTN_THROW: c_uchar = 9; +pub const RTN_NAT: c_uchar = 10; +pub const RTN_XRESOLVE: c_uchar = 11; + +pub const RTPROT_UNSPEC: c_uchar = 0; +pub const RTPROT_REDIRECT: c_uchar = 1; +pub const RTPROT_KERNEL: c_uchar = 2; +pub const RTPROT_BOOT: c_uchar = 3; +pub const RTPROT_STATIC: c_uchar = 4; + +pub const RT_SCOPE_UNIVERSE: c_uchar = 0; +pub const RT_SCOPE_SITE: c_uchar = 200; +pub const RT_SCOPE_LINK: c_uchar = 253; +pub const RT_SCOPE_HOST: c_uchar = 254; +pub const RT_SCOPE_NOWHERE: c_uchar = 255; + +pub const RT_TABLE_UNSPEC: c_uchar = 0; +pub const RT_TABLE_COMPAT: c_uchar = 252; +pub const RT_TABLE_DEFAULT: c_uchar = 253; +pub const RT_TABLE_MAIN: c_uchar = 254; +pub const RT_TABLE_LOCAL: c_uchar = 255; + +pub const RTMSG_OVERRUN: u32 = crate::NLMSG_OVERRUN as u32; pub const RTMSG_NEWDEVICE: u32 = 0x11; pub const RTMSG_DELDEVICE: u32 = 0x12; pub const RTMSG_NEWROUTE: u32 = 0x21; @@ -4470,241 +4474,241 @@ pub const RTMSG_CONTROL: u32 = 0x40; pub const RTMSG_AR_FAILED: u32 = 0x51; pub const MAX_ADDR_LEN: usize = 7; -pub const ARPD_UPDATE: ::c_ushort = 0x01; -pub const ARPD_LOOKUP: ::c_ushort = 0x02; -pub const ARPD_FLUSH: ::c_ushort = 0x03; -pub const ATF_MAGIC: ::c_int = 0x80; - -pub const RTEXT_FILTER_VF: ::c_int = 1 << 0; -pub const RTEXT_FILTER_BRVLAN: ::c_int = 1 << 1; -pub const RTEXT_FILTER_BRVLAN_COMPRESSED: ::c_int = 1 << 2; -pub const RTEXT_FILTER_SKIP_STATS: ::c_int = 1 << 3; -pub const RTEXT_FILTER_MRP: ::c_int = 1 << 4; -pub const RTEXT_FILTER_CFM_CONFIG: ::c_int = 1 << 5; -pub const RTEXT_FILTER_CFM_STATUS: ::c_int = 1 << 6; +pub const ARPD_UPDATE: c_ushort = 0x01; +pub const ARPD_LOOKUP: c_ushort = 0x02; +pub const ARPD_FLUSH: c_ushort = 0x03; +pub const ATF_MAGIC: c_int = 0x80; + +pub const RTEXT_FILTER_VF: c_int = 1 << 0; +pub const RTEXT_FILTER_BRVLAN: c_int = 1 << 1; +pub const RTEXT_FILTER_BRVLAN_COMPRESSED: c_int = 1 << 2; +pub const RTEXT_FILTER_SKIP_STATS: c_int = 1 << 3; +pub const RTEXT_FILTER_MRP: c_int = 1 << 4; +pub const RTEXT_FILTER_CFM_CONFIG: c_int = 1 << 5; +pub const RTEXT_FILTER_CFM_STATUS: c_int = 1 << 6; // userspace compat definitions for RTNLGRP_* -pub const RTMGRP_LINK: ::c_int = 0x00001; -pub const RTMGRP_NOTIFY: ::c_int = 0x00002; -pub const RTMGRP_NEIGH: ::c_int = 0x00004; -pub const RTMGRP_TC: ::c_int = 0x00008; -pub const RTMGRP_IPV4_IFADDR: ::c_int = 0x00010; -pub const RTMGRP_IPV4_MROUTE: ::c_int = 0x00020; -pub const RTMGRP_IPV4_ROUTE: ::c_int = 0x00040; -pub const RTMGRP_IPV4_RULE: ::c_int = 0x00080; -pub const RTMGRP_IPV6_IFADDR: ::c_int = 0x00100; -pub const RTMGRP_IPV6_MROUTE: ::c_int = 0x00200; -pub const RTMGRP_IPV6_ROUTE: ::c_int = 0x00400; -pub const RTMGRP_IPV6_IFINFO: ::c_int = 0x00800; -pub const RTMGRP_DECnet_IFADDR: ::c_int = 0x01000; -pub const RTMGRP_DECnet_ROUTE: ::c_int = 0x04000; -pub const RTMGRP_IPV6_PREFIX: ::c_int = 0x20000; +pub const RTMGRP_LINK: c_int = 0x00001; +pub const RTMGRP_NOTIFY: c_int = 0x00002; +pub const RTMGRP_NEIGH: c_int = 0x00004; +pub const RTMGRP_TC: c_int = 0x00008; +pub const RTMGRP_IPV4_IFADDR: c_int = 0x00010; +pub const RTMGRP_IPV4_MROUTE: c_int = 0x00020; +pub const RTMGRP_IPV4_ROUTE: c_int = 0x00040; +pub const RTMGRP_IPV4_RULE: c_int = 0x00080; +pub const RTMGRP_IPV6_IFADDR: c_int = 0x00100; +pub const RTMGRP_IPV6_MROUTE: c_int = 0x00200; +pub const RTMGRP_IPV6_ROUTE: c_int = 0x00400; +pub const RTMGRP_IPV6_IFINFO: c_int = 0x00800; +pub const RTMGRP_DECnet_IFADDR: c_int = 0x01000; +pub const RTMGRP_DECnet_ROUTE: c_int = 0x04000; +pub const RTMGRP_IPV6_PREFIX: c_int = 0x20000; // enum rtnetlink_groups -pub const RTNLGRP_NONE: ::c_uint = 0x00; -pub const RTNLGRP_LINK: ::c_uint = 0x01; -pub const RTNLGRP_NOTIFY: ::c_uint = 0x02; -pub const RTNLGRP_NEIGH: ::c_uint = 0x03; -pub const RTNLGRP_TC: ::c_uint = 0x04; -pub const RTNLGRP_IPV4_IFADDR: ::c_uint = 0x05; -pub const RTNLGRP_IPV4_MROUTE: ::c_uint = 0x06; -pub const RTNLGRP_IPV4_ROUTE: ::c_uint = 0x07; -pub const RTNLGRP_IPV4_RULE: ::c_uint = 0x08; -pub const RTNLGRP_IPV6_IFADDR: ::c_uint = 0x09; -pub const RTNLGRP_IPV6_MROUTE: ::c_uint = 0x0a; -pub const RTNLGRP_IPV6_ROUTE: ::c_uint = 0x0b; -pub const RTNLGRP_IPV6_IFINFO: ::c_uint = 0x0c; -pub const RTNLGRP_DECnet_IFADDR: ::c_uint = 0x0d; -pub const RTNLGRP_NOP2: ::c_uint = 0x0e; -pub const RTNLGRP_DECnet_ROUTE: ::c_uint = 0x0f; -pub const RTNLGRP_DECnet_RULE: ::c_uint = 0x10; -pub const RTNLGRP_NOP4: ::c_uint = 0x11; -pub const RTNLGRP_IPV6_PREFIX: ::c_uint = 0x12; -pub const RTNLGRP_IPV6_RULE: ::c_uint = 0x13; -pub const RTNLGRP_ND_USEROPT: ::c_uint = 0x14; -pub const RTNLGRP_PHONET_IFADDR: ::c_uint = 0x15; -pub const RTNLGRP_PHONET_ROUTE: ::c_uint = 0x16; -pub const RTNLGRP_DCB: ::c_uint = 0x17; -pub const RTNLGRP_IPV4_NETCONF: ::c_uint = 0x18; -pub const RTNLGRP_IPV6_NETCONF: ::c_uint = 0x19; -pub const RTNLGRP_MDB: ::c_uint = 0x1a; -pub const RTNLGRP_MPLS_ROUTE: ::c_uint = 0x1b; -pub const RTNLGRP_NSID: ::c_uint = 0x1c; -pub const RTNLGRP_MPLS_NETCONF: ::c_uint = 0x1d; -pub const RTNLGRP_IPV4_MROUTE_R: ::c_uint = 0x1e; -pub const RTNLGRP_IPV6_MROUTE_R: ::c_uint = 0x1f; -pub const RTNLGRP_NEXTHOP: ::c_uint = 0x20; -pub const RTNLGRP_BRVLAN: ::c_uint = 0x21; -pub const RTNLGRP_MCTP_IFADDR: ::c_uint = 0x22; -pub const RTNLGRP_TUNNEL: ::c_uint = 0x23; -pub const RTNLGRP_STATS: ::c_uint = 0x24; +pub const RTNLGRP_NONE: c_uint = 0x00; +pub const RTNLGRP_LINK: c_uint = 0x01; +pub const RTNLGRP_NOTIFY: c_uint = 0x02; +pub const RTNLGRP_NEIGH: c_uint = 0x03; +pub const RTNLGRP_TC: c_uint = 0x04; +pub const RTNLGRP_IPV4_IFADDR: c_uint = 0x05; +pub const RTNLGRP_IPV4_MROUTE: c_uint = 0x06; +pub const RTNLGRP_IPV4_ROUTE: c_uint = 0x07; +pub const RTNLGRP_IPV4_RULE: c_uint = 0x08; +pub const RTNLGRP_IPV6_IFADDR: c_uint = 0x09; +pub const RTNLGRP_IPV6_MROUTE: c_uint = 0x0a; +pub const RTNLGRP_IPV6_ROUTE: c_uint = 0x0b; +pub const RTNLGRP_IPV6_IFINFO: c_uint = 0x0c; +pub const RTNLGRP_DECnet_IFADDR: c_uint = 0x0d; +pub const RTNLGRP_NOP2: c_uint = 0x0e; +pub const RTNLGRP_DECnet_ROUTE: c_uint = 0x0f; +pub const RTNLGRP_DECnet_RULE: c_uint = 0x10; +pub const RTNLGRP_NOP4: c_uint = 0x11; +pub const RTNLGRP_IPV6_PREFIX: c_uint = 0x12; +pub const RTNLGRP_IPV6_RULE: c_uint = 0x13; +pub const RTNLGRP_ND_USEROPT: c_uint = 0x14; +pub const RTNLGRP_PHONET_IFADDR: c_uint = 0x15; +pub const RTNLGRP_PHONET_ROUTE: c_uint = 0x16; +pub const RTNLGRP_DCB: c_uint = 0x17; +pub const RTNLGRP_IPV4_NETCONF: c_uint = 0x18; +pub const RTNLGRP_IPV6_NETCONF: c_uint = 0x19; +pub const RTNLGRP_MDB: c_uint = 0x1a; +pub const RTNLGRP_MPLS_ROUTE: c_uint = 0x1b; +pub const RTNLGRP_NSID: c_uint = 0x1c; +pub const RTNLGRP_MPLS_NETCONF: c_uint = 0x1d; +pub const RTNLGRP_IPV4_MROUTE_R: c_uint = 0x1e; +pub const RTNLGRP_IPV6_MROUTE_R: c_uint = 0x1f; +pub const RTNLGRP_NEXTHOP: c_uint = 0x20; +pub const RTNLGRP_BRVLAN: c_uint = 0x21; +pub const RTNLGRP_MCTP_IFADDR: c_uint = 0x22; +pub const RTNLGRP_TUNNEL: c_uint = 0x23; +pub const RTNLGRP_STATS: c_uint = 0x24; // linux/module.h -pub const MODULE_INIT_IGNORE_MODVERSIONS: ::c_uint = 0x0001; -pub const MODULE_INIT_IGNORE_VERMAGIC: ::c_uint = 0x0002; +pub const MODULE_INIT_IGNORE_MODVERSIONS: c_uint = 0x0001; +pub const MODULE_INIT_IGNORE_VERMAGIC: c_uint = 0x0002; // linux/net_tstamp.h -pub const SOF_TIMESTAMPING_TX_HARDWARE: ::c_uint = 1 << 0; -pub const SOF_TIMESTAMPING_TX_SOFTWARE: ::c_uint = 1 << 1; -pub const SOF_TIMESTAMPING_RX_HARDWARE: ::c_uint = 1 << 2; -pub const SOF_TIMESTAMPING_RX_SOFTWARE: ::c_uint = 1 << 3; -pub const SOF_TIMESTAMPING_SOFTWARE: ::c_uint = 1 << 4; -pub const SOF_TIMESTAMPING_SYS_HARDWARE: ::c_uint = 1 << 5; -pub const SOF_TIMESTAMPING_RAW_HARDWARE: ::c_uint = 1 << 6; -pub const SOF_TIMESTAMPING_OPT_ID: ::c_uint = 1 << 7; -pub const SOF_TIMESTAMPING_TX_SCHED: ::c_uint = 1 << 8; -pub const SOF_TIMESTAMPING_TX_ACK: ::c_uint = 1 << 9; -pub const SOF_TIMESTAMPING_OPT_CMSG: ::c_uint = 1 << 10; -pub const SOF_TIMESTAMPING_OPT_TSONLY: ::c_uint = 1 << 11; -pub const SOF_TIMESTAMPING_OPT_STATS: ::c_uint = 1 << 12; -pub const SOF_TIMESTAMPING_OPT_PKTINFO: ::c_uint = 1 << 13; -pub const SOF_TIMESTAMPING_OPT_TX_SWHW: ::c_uint = 1 << 14; +pub const SOF_TIMESTAMPING_TX_HARDWARE: c_uint = 1 << 0; +pub const SOF_TIMESTAMPING_TX_SOFTWARE: c_uint = 1 << 1; +pub const SOF_TIMESTAMPING_RX_HARDWARE: c_uint = 1 << 2; +pub const SOF_TIMESTAMPING_RX_SOFTWARE: c_uint = 1 << 3; +pub const SOF_TIMESTAMPING_SOFTWARE: c_uint = 1 << 4; +pub const SOF_TIMESTAMPING_SYS_HARDWARE: c_uint = 1 << 5; +pub const SOF_TIMESTAMPING_RAW_HARDWARE: c_uint = 1 << 6; +pub const SOF_TIMESTAMPING_OPT_ID: c_uint = 1 << 7; +pub const SOF_TIMESTAMPING_TX_SCHED: c_uint = 1 << 8; +pub const SOF_TIMESTAMPING_TX_ACK: c_uint = 1 << 9; +pub const SOF_TIMESTAMPING_OPT_CMSG: c_uint = 1 << 10; +pub const SOF_TIMESTAMPING_OPT_TSONLY: c_uint = 1 << 11; +pub const SOF_TIMESTAMPING_OPT_STATS: c_uint = 1 << 12; +pub const SOF_TIMESTAMPING_OPT_PKTINFO: c_uint = 1 << 13; +pub const SOF_TIMESTAMPING_OPT_TX_SWHW: c_uint = 1 << 14; pub const SOF_TXTIME_DEADLINE_MODE: u32 = 1 << 0; pub const SOF_TXTIME_REPORT_ERRORS: u32 = 1 << 1; -pub const HWTSTAMP_TX_OFF: ::c_uint = 0; -pub const HWTSTAMP_TX_ON: ::c_uint = 1; -pub const HWTSTAMP_TX_ONESTEP_SYNC: ::c_uint = 2; -pub const HWTSTAMP_TX_ONESTEP_P2P: ::c_uint = 3; - -pub const HWTSTAMP_FILTER_NONE: ::c_uint = 0; -pub const HWTSTAMP_FILTER_ALL: ::c_uint = 1; -pub const HWTSTAMP_FILTER_SOME: ::c_uint = 2; -pub const HWTSTAMP_FILTER_PTP_V1_L4_EVENT: ::c_uint = 3; -pub const HWTSTAMP_FILTER_PTP_V1_L4_SYNC: ::c_uint = 4; -pub const HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ: ::c_uint = 5; -pub const HWTSTAMP_FILTER_PTP_V2_L4_EVENT: ::c_uint = 6; -pub const HWTSTAMP_FILTER_PTP_V2_L4_SYNC: ::c_uint = 7; -pub const HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ: ::c_uint = 8; -pub const HWTSTAMP_FILTER_PTP_V2_L2_EVENT: ::c_uint = 9; -pub const HWTSTAMP_FILTER_PTP_V2_L2_SYNC: ::c_uint = 10; -pub const HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ: ::c_uint = 11; -pub const HWTSTAMP_FILTER_PTP_V2_EVENT: ::c_uint = 12; -pub const HWTSTAMP_FILTER_PTP_V2_SYNC: ::c_uint = 13; -pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: ::c_uint = 14; -pub const HWTSTAMP_FILTER_NTP_ALL: ::c_uint = 15; +pub const HWTSTAMP_TX_OFF: c_uint = 0; +pub const HWTSTAMP_TX_ON: c_uint = 1; +pub const HWTSTAMP_TX_ONESTEP_SYNC: c_uint = 2; +pub const HWTSTAMP_TX_ONESTEP_P2P: c_uint = 3; + +pub const HWTSTAMP_FILTER_NONE: c_uint = 0; +pub const HWTSTAMP_FILTER_ALL: c_uint = 1; +pub const HWTSTAMP_FILTER_SOME: c_uint = 2; +pub const HWTSTAMP_FILTER_PTP_V1_L4_EVENT: c_uint = 3; +pub const HWTSTAMP_FILTER_PTP_V1_L4_SYNC: c_uint = 4; +pub const HWTSTAMP_FILTER_PTP_V1_L4_DELAY_REQ: c_uint = 5; +pub const HWTSTAMP_FILTER_PTP_V2_L4_EVENT: c_uint = 6; +pub const HWTSTAMP_FILTER_PTP_V2_L4_SYNC: c_uint = 7; +pub const HWTSTAMP_FILTER_PTP_V2_L4_DELAY_REQ: c_uint = 8; +pub const HWTSTAMP_FILTER_PTP_V2_L2_EVENT: c_uint = 9; +pub const HWTSTAMP_FILTER_PTP_V2_L2_SYNC: c_uint = 10; +pub const HWTSTAMP_FILTER_PTP_V2_L2_DELAY_REQ: c_uint = 11; +pub const HWTSTAMP_FILTER_PTP_V2_EVENT: c_uint = 12; +pub const HWTSTAMP_FILTER_PTP_V2_SYNC: c_uint = 13; +pub const HWTSTAMP_FILTER_PTP_V2_DELAY_REQ: c_uint = 14; +pub const HWTSTAMP_FILTER_NTP_ALL: c_uint = 15; // linux/ptp_clock.h -pub const PTP_MAX_SAMPLES: ::c_uint = 25; // Maximum allowed offset measurement samples. +pub const PTP_MAX_SAMPLES: c_uint = 25; // Maximum allowed offset measurement samples. const PTP_CLK_MAGIC: u32 = b'=' as u32; -pub const PTP_CLOCK_GETCAPS: ::c_uint = _IOR::(PTP_CLK_MAGIC, 1); -pub const PTP_EXTTS_REQUEST: ::c_uint = _IOW::(PTP_CLK_MAGIC, 2); -pub const PTP_PEROUT_REQUEST: ::c_uint = _IOW::(PTP_CLK_MAGIC, 3); -pub const PTP_ENABLE_PPS: ::c_uint = _IOW::<::c_int>(PTP_CLK_MAGIC, 4); -pub const PTP_SYS_OFFSET: ::c_uint = _IOW::(PTP_CLK_MAGIC, 5); -pub const PTP_PIN_GETFUNC: ::c_uint = _IOWR::(PTP_CLK_MAGIC, 6); -pub const PTP_PIN_SETFUNC: ::c_uint = _IOW::(PTP_CLK_MAGIC, 7); -pub const PTP_SYS_OFFSET_PRECISE: ::c_uint = _IOWR::(PTP_CLK_MAGIC, 8); -pub const PTP_SYS_OFFSET_EXTENDED: ::c_uint = _IOWR::(PTP_CLK_MAGIC, 9); - -pub const PTP_CLOCK_GETCAPS2: ::c_uint = _IOR::(PTP_CLK_MAGIC, 10); -pub const PTP_EXTTS_REQUEST2: ::c_uint = _IOW::(PTP_CLK_MAGIC, 11); -pub const PTP_PEROUT_REQUEST2: ::c_uint = _IOW::(PTP_CLK_MAGIC, 12); -pub const PTP_ENABLE_PPS2: ::c_uint = _IOW::<::c_int>(PTP_CLK_MAGIC, 13); -pub const PTP_SYS_OFFSET2: ::c_uint = _IOW::(PTP_CLK_MAGIC, 14); -pub const PTP_PIN_GETFUNC2: ::c_uint = _IOWR::(PTP_CLK_MAGIC, 15); -pub const PTP_PIN_SETFUNC2: ::c_uint = _IOW::(PTP_CLK_MAGIC, 16); -pub const PTP_SYS_OFFSET_PRECISE2: ::c_uint = _IOWR::(PTP_CLK_MAGIC, 17); -pub const PTP_SYS_OFFSET_EXTENDED2: ::c_uint = _IOWR::(PTP_CLK_MAGIC, 18); +pub const PTP_CLOCK_GETCAPS: c_uint = _IOR::(PTP_CLK_MAGIC, 1); +pub const PTP_EXTTS_REQUEST: c_uint = _IOW::(PTP_CLK_MAGIC, 2); +pub const PTP_PEROUT_REQUEST: c_uint = _IOW::(PTP_CLK_MAGIC, 3); +pub const PTP_ENABLE_PPS: c_uint = _IOW::(PTP_CLK_MAGIC, 4); +pub const PTP_SYS_OFFSET: c_uint = _IOW::(PTP_CLK_MAGIC, 5); +pub const PTP_PIN_GETFUNC: c_uint = _IOWR::(PTP_CLK_MAGIC, 6); +pub const PTP_PIN_SETFUNC: c_uint = _IOW::(PTP_CLK_MAGIC, 7); +pub const PTP_SYS_OFFSET_PRECISE: c_uint = _IOWR::(PTP_CLK_MAGIC, 8); +pub const PTP_SYS_OFFSET_EXTENDED: c_uint = _IOWR::(PTP_CLK_MAGIC, 9); + +pub const PTP_CLOCK_GETCAPS2: c_uint = _IOR::(PTP_CLK_MAGIC, 10); +pub const PTP_EXTTS_REQUEST2: c_uint = _IOW::(PTP_CLK_MAGIC, 11); +pub const PTP_PEROUT_REQUEST2: c_uint = _IOW::(PTP_CLK_MAGIC, 12); +pub const PTP_ENABLE_PPS2: c_uint = _IOW::(PTP_CLK_MAGIC, 13); +pub const PTP_SYS_OFFSET2: c_uint = _IOW::(PTP_CLK_MAGIC, 14); +pub const PTP_PIN_GETFUNC2: c_uint = _IOWR::(PTP_CLK_MAGIC, 15); +pub const PTP_PIN_SETFUNC2: c_uint = _IOW::(PTP_CLK_MAGIC, 16); +pub const PTP_SYS_OFFSET_PRECISE2: c_uint = _IOWR::(PTP_CLK_MAGIC, 17); +pub const PTP_SYS_OFFSET_EXTENDED2: c_uint = _IOWR::(PTP_CLK_MAGIC, 18); // enum ptp_pin_function -pub const PTP_PF_NONE: ::c_uint = 0; -pub const PTP_PF_EXTTS: ::c_uint = 1; -pub const PTP_PF_PEROUT: ::c_uint = 2; -pub const PTP_PF_PHYSYNC: ::c_uint = 3; +pub const PTP_PF_NONE: c_uint = 0; +pub const PTP_PF_EXTTS: c_uint = 1; +pub const PTP_PF_PEROUT: c_uint = 2; +pub const PTP_PF_PHYSYNC: c_uint = 3; // linux/tls.h -pub const TLS_TX: ::c_int = 1; -pub const TLS_RX: ::c_int = 2; +pub const TLS_TX: c_int = 1; +pub const TLS_RX: c_int = 2; -pub const TLS_1_2_VERSION_MAJOR: ::__u8 = 0x3; -pub const TLS_1_2_VERSION_MINOR: ::__u8 = 0x3; -pub const TLS_1_2_VERSION: ::__u16 = - ((TLS_1_2_VERSION_MAJOR as ::__u16) << 8) | (TLS_1_2_VERSION_MINOR as ::__u16); +pub const TLS_1_2_VERSION_MAJOR: __u8 = 0x3; +pub const TLS_1_2_VERSION_MINOR: __u8 = 0x3; +pub const TLS_1_2_VERSION: __u16 = + ((TLS_1_2_VERSION_MAJOR as __u16) << 8) | (TLS_1_2_VERSION_MINOR as __u16); -pub const TLS_1_3_VERSION_MAJOR: ::__u8 = 0x3; -pub const TLS_1_3_VERSION_MINOR: ::__u8 = 0x4; -pub const TLS_1_3_VERSION: ::__u16 = - ((TLS_1_3_VERSION_MAJOR as ::__u16) << 8) | (TLS_1_3_VERSION_MINOR as ::__u16); +pub const TLS_1_3_VERSION_MAJOR: __u8 = 0x3; +pub const TLS_1_3_VERSION_MINOR: __u8 = 0x4; +pub const TLS_1_3_VERSION: __u16 = + ((TLS_1_3_VERSION_MAJOR as __u16) << 8) | (TLS_1_3_VERSION_MINOR as __u16); -pub const TLS_CIPHER_AES_GCM_128: ::__u16 = 51; +pub const TLS_CIPHER_AES_GCM_128: __u16 = 51; pub const TLS_CIPHER_AES_GCM_128_IV_SIZE: usize = 8; pub const TLS_CIPHER_AES_GCM_128_KEY_SIZE: usize = 16; pub const TLS_CIPHER_AES_GCM_128_SALT_SIZE: usize = 4; pub const TLS_CIPHER_AES_GCM_128_TAG_SIZE: usize = 16; pub const TLS_CIPHER_AES_GCM_128_REC_SEQ_SIZE: usize = 8; -pub const TLS_CIPHER_AES_GCM_256: ::__u16 = 52; +pub const TLS_CIPHER_AES_GCM_256: __u16 = 52; pub const TLS_CIPHER_AES_GCM_256_IV_SIZE: usize = 8; pub const TLS_CIPHER_AES_GCM_256_KEY_SIZE: usize = 32; pub const TLS_CIPHER_AES_GCM_256_SALT_SIZE: usize = 4; pub const TLS_CIPHER_AES_GCM_256_TAG_SIZE: usize = 16; pub const TLS_CIPHER_AES_GCM_256_REC_SEQ_SIZE: usize = 8; -pub const TLS_CIPHER_CHACHA20_POLY1305: ::__u16 = 54; +pub const TLS_CIPHER_CHACHA20_POLY1305: __u16 = 54; pub const TLS_CIPHER_CHACHA20_POLY1305_IV_SIZE: usize = 12; pub const TLS_CIPHER_CHACHA20_POLY1305_KEY_SIZE: usize = 32; pub const TLS_CIPHER_CHACHA20_POLY1305_SALT_SIZE: usize = 0; pub const TLS_CIPHER_CHACHA20_POLY1305_TAG_SIZE: usize = 16; pub const TLS_CIPHER_CHACHA20_POLY1305_REC_SEQ_SIZE: usize = 8; -pub const TLS_SET_RECORD_TYPE: ::c_int = 1; -pub const TLS_GET_RECORD_TYPE: ::c_int = 2; +pub const TLS_SET_RECORD_TYPE: c_int = 1; +pub const TLS_GET_RECORD_TYPE: c_int = 2; -pub const SOL_TLS: ::c_int = 282; +pub const SOL_TLS: c_int = 282; // linux/if_alg.h -pub const ALG_SET_KEY: ::c_int = 1; -pub const ALG_SET_IV: ::c_int = 2; -pub const ALG_SET_OP: ::c_int = 3; -pub const ALG_SET_AEAD_ASSOCLEN: ::c_int = 4; -pub const ALG_SET_AEAD_AUTHSIZE: ::c_int = 5; -pub const ALG_SET_DRBG_ENTROPY: ::c_int = 6; -pub const ALG_SET_KEY_BY_KEY_SERIAL: ::c_int = 7; +pub const ALG_SET_KEY: c_int = 1; +pub const ALG_SET_IV: c_int = 2; +pub const ALG_SET_OP: c_int = 3; +pub const ALG_SET_AEAD_ASSOCLEN: c_int = 4; +pub const ALG_SET_AEAD_AUTHSIZE: c_int = 5; +pub const ALG_SET_DRBG_ENTROPY: c_int = 6; +pub const ALG_SET_KEY_BY_KEY_SERIAL: c_int = 7; -pub const ALG_OP_DECRYPT: ::c_int = 0; -pub const ALG_OP_ENCRYPT: ::c_int = 1; +pub const ALG_OP_DECRYPT: c_int = 0; +pub const ALG_OP_ENCRYPT: c_int = 1; // include/uapi/linux/if.h -pub const IF_OPER_UNKNOWN: ::c_int = 0; -pub const IF_OPER_NOTPRESENT: ::c_int = 1; -pub const IF_OPER_DOWN: ::c_int = 2; -pub const IF_OPER_LOWERLAYERDOWN: ::c_int = 3; -pub const IF_OPER_TESTING: ::c_int = 4; -pub const IF_OPER_DORMANT: ::c_int = 5; -pub const IF_OPER_UP: ::c_int = 6; - -pub const IF_LINK_MODE_DEFAULT: ::c_int = 0; -pub const IF_LINK_MODE_DORMANT: ::c_int = 1; -pub const IF_LINK_MODE_TESTING: ::c_int = 2; +pub const IF_OPER_UNKNOWN: c_int = 0; +pub const IF_OPER_NOTPRESENT: c_int = 1; +pub const IF_OPER_DOWN: c_int = 2; +pub const IF_OPER_LOWERLAYERDOWN: c_int = 3; +pub const IF_OPER_TESTING: c_int = 4; +pub const IF_OPER_DORMANT: c_int = 5; +pub const IF_OPER_UP: c_int = 6; + +pub const IF_LINK_MODE_DEFAULT: c_int = 0; +pub const IF_LINK_MODE_DORMANT: c_int = 1; +pub const IF_LINK_MODE_TESTING: c_int = 2; // include/uapi/linux/udp.h -pub const UDP_CORK: ::c_int = 1; -pub const UDP_ENCAP: ::c_int = 100; -pub const UDP_NO_CHECK6_TX: ::c_int = 101; -pub const UDP_NO_CHECK6_RX: ::c_int = 102; +pub const UDP_CORK: c_int = 1; +pub const UDP_ENCAP: c_int = 100; +pub const UDP_NO_CHECK6_TX: c_int = 101; +pub const UDP_NO_CHECK6_RX: c_int = 102; // include/uapi/linux/mman.h -pub const MAP_SHARED_VALIDATE: ::c_int = 0x3; +pub const MAP_SHARED_VALIDATE: c_int = 0x3; // include/uapi/asm-generic/mman-common.h -pub const MAP_FIXED_NOREPLACE: ::c_int = 0x100000; -pub const MLOCK_ONFAULT: ::c_uint = 0x01; +pub const MAP_FIXED_NOREPLACE: c_int = 0x100000; +pub const MLOCK_ONFAULT: c_uint = 0x01; // uapi/linux/vm_sockets.h -pub const VMADDR_CID_ANY: ::c_uint = 0xFFFFFFFF; -pub const VMADDR_CID_HYPERVISOR: ::c_uint = 0; +pub const VMADDR_CID_ANY: c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_HYPERVISOR: c_uint = 0; #[deprecated( since = "0.2.74", note = "VMADDR_CID_RESERVED is removed since Linux v5.6 and \ replaced with VMADDR_CID_LOCAL" )] -pub const VMADDR_CID_RESERVED: ::c_uint = 1; -pub const VMADDR_CID_LOCAL: ::c_uint = 1; -pub const VMADDR_CID_HOST: ::c_uint = 2; -pub const VMADDR_PORT_ANY: ::c_uint = 0xFFFFFFFF; +pub const VMADDR_CID_RESERVED: c_uint = 1; +pub const VMADDR_CID_LOCAL: c_uint = 1; +pub const VMADDR_CID_HOST: c_uint = 2; +pub const VMADDR_PORT_ANY: c_uint = 0xFFFFFFFF; // uapi/linux/inotify.h pub const IN_ACCESS: u32 = 0x0000_0001; @@ -4790,237 +4794,237 @@ pub const IN_ALL_EVENTS: u32 = IN_ACCESS | IN_DELETE_SELF | IN_MOVE_SELF; -pub const IN_CLOEXEC: ::c_int = O_CLOEXEC; -pub const IN_NONBLOCK: ::c_int = O_NONBLOCK; +pub const IN_CLOEXEC: c_int = O_CLOEXEC; +pub const IN_NONBLOCK: c_int = O_NONBLOCK; // uapi/linux/mount.h -pub const OPEN_TREE_CLONE: ::c_uint = 0x01; -pub const OPEN_TREE_CLOEXEC: ::c_uint = O_CLOEXEC as ::c_uint; +pub const OPEN_TREE_CLONE: c_uint = 0x01; +pub const OPEN_TREE_CLOEXEC: c_uint = O_CLOEXEC as c_uint; // uapi/linux/netfilter/nf_tables.h -pub const NFT_TABLE_MAXNAMELEN: ::c_int = 256; -pub const NFT_CHAIN_MAXNAMELEN: ::c_int = 256; -pub const NFT_SET_MAXNAMELEN: ::c_int = 256; -pub const NFT_OBJ_MAXNAMELEN: ::c_int = 256; -pub const NFT_USERDATA_MAXLEN: ::c_int = 256; - -pub const NFT_REG_VERDICT: ::c_int = 0; -pub const NFT_REG_1: ::c_int = 1; -pub const NFT_REG_2: ::c_int = 2; -pub const NFT_REG_3: ::c_int = 3; -pub const NFT_REG_4: ::c_int = 4; -pub const __NFT_REG_MAX: ::c_int = 5; -pub const NFT_REG32_00: ::c_int = 8; -pub const NFT_REG32_01: ::c_int = 9; -pub const NFT_REG32_02: ::c_int = 10; -pub const NFT_REG32_03: ::c_int = 11; -pub const NFT_REG32_04: ::c_int = 12; -pub const NFT_REG32_05: ::c_int = 13; -pub const NFT_REG32_06: ::c_int = 14; -pub const NFT_REG32_07: ::c_int = 15; -pub const NFT_REG32_08: ::c_int = 16; -pub const NFT_REG32_09: ::c_int = 17; -pub const NFT_REG32_10: ::c_int = 18; -pub const NFT_REG32_11: ::c_int = 19; -pub const NFT_REG32_12: ::c_int = 20; -pub const NFT_REG32_13: ::c_int = 21; -pub const NFT_REG32_14: ::c_int = 22; -pub const NFT_REG32_15: ::c_int = 23; - -pub const NFT_REG_SIZE: ::c_int = 16; -pub const NFT_REG32_SIZE: ::c_int = 4; - -pub const NFT_CONTINUE: ::c_int = -1; -pub const NFT_BREAK: ::c_int = -2; -pub const NFT_JUMP: ::c_int = -3; -pub const NFT_GOTO: ::c_int = -4; -pub const NFT_RETURN: ::c_int = -5; - -pub const NFT_MSG_NEWTABLE: ::c_int = 0; -pub const NFT_MSG_GETTABLE: ::c_int = 1; -pub const NFT_MSG_DELTABLE: ::c_int = 2; -pub const NFT_MSG_NEWCHAIN: ::c_int = 3; -pub const NFT_MSG_GETCHAIN: ::c_int = 4; -pub const NFT_MSG_DELCHAIN: ::c_int = 5; -pub const NFT_MSG_NEWRULE: ::c_int = 6; -pub const NFT_MSG_GETRULE: ::c_int = 7; -pub const NFT_MSG_DELRULE: ::c_int = 8; -pub const NFT_MSG_NEWSET: ::c_int = 9; -pub const NFT_MSG_GETSET: ::c_int = 10; -pub const NFT_MSG_DELSET: ::c_int = 11; -pub const NFT_MSG_NEWSETELEM: ::c_int = 12; -pub const NFT_MSG_GETSETELEM: ::c_int = 13; -pub const NFT_MSG_DELSETELEM: ::c_int = 14; -pub const NFT_MSG_NEWGEN: ::c_int = 15; -pub const NFT_MSG_GETGEN: ::c_int = 16; -pub const NFT_MSG_TRACE: ::c_int = 17; +pub const NFT_TABLE_MAXNAMELEN: c_int = 256; +pub const NFT_CHAIN_MAXNAMELEN: c_int = 256; +pub const NFT_SET_MAXNAMELEN: c_int = 256; +pub const NFT_OBJ_MAXNAMELEN: c_int = 256; +pub const NFT_USERDATA_MAXLEN: c_int = 256; + +pub const NFT_REG_VERDICT: c_int = 0; +pub const NFT_REG_1: c_int = 1; +pub const NFT_REG_2: c_int = 2; +pub const NFT_REG_3: c_int = 3; +pub const NFT_REG_4: c_int = 4; +pub const __NFT_REG_MAX: c_int = 5; +pub const NFT_REG32_00: c_int = 8; +pub const NFT_REG32_01: c_int = 9; +pub const NFT_REG32_02: c_int = 10; +pub const NFT_REG32_03: c_int = 11; +pub const NFT_REG32_04: c_int = 12; +pub const NFT_REG32_05: c_int = 13; +pub const NFT_REG32_06: c_int = 14; +pub const NFT_REG32_07: c_int = 15; +pub const NFT_REG32_08: c_int = 16; +pub const NFT_REG32_09: c_int = 17; +pub const NFT_REG32_10: c_int = 18; +pub const NFT_REG32_11: c_int = 19; +pub const NFT_REG32_12: c_int = 20; +pub const NFT_REG32_13: c_int = 21; +pub const NFT_REG32_14: c_int = 22; +pub const NFT_REG32_15: c_int = 23; + +pub const NFT_REG_SIZE: c_int = 16; +pub const NFT_REG32_SIZE: c_int = 4; + +pub const NFT_CONTINUE: c_int = -1; +pub const NFT_BREAK: c_int = -2; +pub const NFT_JUMP: c_int = -3; +pub const NFT_GOTO: c_int = -4; +pub const NFT_RETURN: c_int = -5; + +pub const NFT_MSG_NEWTABLE: c_int = 0; +pub const NFT_MSG_GETTABLE: c_int = 1; +pub const NFT_MSG_DELTABLE: c_int = 2; +pub const NFT_MSG_NEWCHAIN: c_int = 3; +pub const NFT_MSG_GETCHAIN: c_int = 4; +pub const NFT_MSG_DELCHAIN: c_int = 5; +pub const NFT_MSG_NEWRULE: c_int = 6; +pub const NFT_MSG_GETRULE: c_int = 7; +pub const NFT_MSG_DELRULE: c_int = 8; +pub const NFT_MSG_NEWSET: c_int = 9; +pub const NFT_MSG_GETSET: c_int = 10; +pub const NFT_MSG_DELSET: c_int = 11; +pub const NFT_MSG_NEWSETELEM: c_int = 12; +pub const NFT_MSG_GETSETELEM: c_int = 13; +pub const NFT_MSG_DELSETELEM: c_int = 14; +pub const NFT_MSG_NEWGEN: c_int = 15; +pub const NFT_MSG_GETGEN: c_int = 16; +pub const NFT_MSG_TRACE: c_int = 17; cfg_if! { if #[cfg(not(target_arch = "sparc64"))] { - pub const NFT_MSG_NEWOBJ: ::c_int = 18; - pub const NFT_MSG_GETOBJ: ::c_int = 19; - pub const NFT_MSG_DELOBJ: ::c_int = 20; - pub const NFT_MSG_GETOBJ_RESET: ::c_int = 21; + pub const NFT_MSG_NEWOBJ: c_int = 18; + pub const NFT_MSG_GETOBJ: c_int = 19; + pub const NFT_MSG_DELOBJ: c_int = 20; + pub const NFT_MSG_GETOBJ_RESET: c_int = 21; } } -pub const NFT_MSG_MAX: ::c_int = 25; - -pub const NFT_SET_ANONYMOUS: ::c_int = 0x1; -pub const NFT_SET_CONSTANT: ::c_int = 0x2; -pub const NFT_SET_INTERVAL: ::c_int = 0x4; -pub const NFT_SET_MAP: ::c_int = 0x8; -pub const NFT_SET_TIMEOUT: ::c_int = 0x10; -pub const NFT_SET_EVAL: ::c_int = 0x20; - -pub const NFT_SET_POL_PERFORMANCE: ::c_int = 0; -pub const NFT_SET_POL_MEMORY: ::c_int = 1; - -pub const NFT_SET_ELEM_INTERVAL_END: ::c_int = 0x1; - -pub const NFT_DATA_VALUE: ::c_uint = 0; -pub const NFT_DATA_VERDICT: ::c_uint = 0xffffff00; - -pub const NFT_DATA_RESERVED_MASK: ::c_uint = 0xffffff00; - -pub const NFT_DATA_VALUE_MAXLEN: ::c_int = 64; - -pub const NFT_BYTEORDER_NTOH: ::c_int = 0; -pub const NFT_BYTEORDER_HTON: ::c_int = 1; - -pub const NFT_CMP_EQ: ::c_int = 0; -pub const NFT_CMP_NEQ: ::c_int = 1; -pub const NFT_CMP_LT: ::c_int = 2; -pub const NFT_CMP_LTE: ::c_int = 3; -pub const NFT_CMP_GT: ::c_int = 4; -pub const NFT_CMP_GTE: ::c_int = 5; - -pub const NFT_RANGE_EQ: ::c_int = 0; -pub const NFT_RANGE_NEQ: ::c_int = 1; - -pub const NFT_LOOKUP_F_INV: ::c_int = 1 << 0; - -pub const NFT_DYNSET_OP_ADD: ::c_int = 0; -pub const NFT_DYNSET_OP_UPDATE: ::c_int = 1; - -pub const NFT_DYNSET_F_INV: ::c_int = 1 << 0; - -pub const NFT_PAYLOAD_LL_HEADER: ::c_int = 0; -pub const NFT_PAYLOAD_NETWORK_HEADER: ::c_int = 1; -pub const NFT_PAYLOAD_TRANSPORT_HEADER: ::c_int = 2; - -pub const NFT_PAYLOAD_CSUM_NONE: ::c_int = 0; -pub const NFT_PAYLOAD_CSUM_INET: ::c_int = 1; - -pub const NFT_META_LEN: ::c_int = 0; -pub const NFT_META_PROTOCOL: ::c_int = 1; -pub const NFT_META_PRIORITY: ::c_int = 2; -pub const NFT_META_MARK: ::c_int = 3; -pub const NFT_META_IIF: ::c_int = 4; -pub const NFT_META_OIF: ::c_int = 5; -pub const NFT_META_IIFNAME: ::c_int = 6; -pub const NFT_META_OIFNAME: ::c_int = 7; -pub const NFT_META_IIFTYPE: ::c_int = 8; -pub const NFT_META_OIFTYPE: ::c_int = 9; -pub const NFT_META_SKUID: ::c_int = 10; -pub const NFT_META_SKGID: ::c_int = 11; -pub const NFT_META_NFTRACE: ::c_int = 12; -pub const NFT_META_RTCLASSID: ::c_int = 13; -pub const NFT_META_SECMARK: ::c_int = 14; -pub const NFT_META_NFPROTO: ::c_int = 15; -pub const NFT_META_L4PROTO: ::c_int = 16; -pub const NFT_META_BRI_IIFNAME: ::c_int = 17; -pub const NFT_META_BRI_OIFNAME: ::c_int = 18; -pub const NFT_META_PKTTYPE: ::c_int = 19; -pub const NFT_META_CPU: ::c_int = 20; -pub const NFT_META_IIFGROUP: ::c_int = 21; -pub const NFT_META_OIFGROUP: ::c_int = 22; -pub const NFT_META_CGROUP: ::c_int = 23; -pub const NFT_META_PRANDOM: ::c_int = 24; - -pub const NFT_CT_STATE: ::c_int = 0; -pub const NFT_CT_DIRECTION: ::c_int = 1; -pub const NFT_CT_STATUS: ::c_int = 2; -pub const NFT_CT_MARK: ::c_int = 3; -pub const NFT_CT_SECMARK: ::c_int = 4; -pub const NFT_CT_EXPIRATION: ::c_int = 5; -pub const NFT_CT_HELPER: ::c_int = 6; -pub const NFT_CT_L3PROTOCOL: ::c_int = 7; -pub const NFT_CT_SRC: ::c_int = 8; -pub const NFT_CT_DST: ::c_int = 9; -pub const NFT_CT_PROTOCOL: ::c_int = 10; -pub const NFT_CT_PROTO_SRC: ::c_int = 11; -pub const NFT_CT_PROTO_DST: ::c_int = 12; -pub const NFT_CT_LABELS: ::c_int = 13; -pub const NFT_CT_PKTS: ::c_int = 14; -pub const NFT_CT_BYTES: ::c_int = 15; -pub const NFT_CT_AVGPKT: ::c_int = 16; -pub const NFT_CT_ZONE: ::c_int = 17; -pub const NFT_CT_EVENTMASK: ::c_int = 18; -pub const NFT_CT_SRC_IP: ::c_int = 19; -pub const NFT_CT_DST_IP: ::c_int = 20; -pub const NFT_CT_SRC_IP6: ::c_int = 21; -pub const NFT_CT_DST_IP6: ::c_int = 22; - -pub const NFT_LIMIT_PKTS: ::c_int = 0; -pub const NFT_LIMIT_PKT_BYTES: ::c_int = 1; - -pub const NFT_LIMIT_F_INV: ::c_int = 1 << 0; - -pub const NFT_QUEUE_FLAG_BYPASS: ::c_int = 0x01; -pub const NFT_QUEUE_FLAG_CPU_FANOUT: ::c_int = 0x02; -pub const NFT_QUEUE_FLAG_MASK: ::c_int = 0x03; - -pub const NFT_QUOTA_F_INV: ::c_int = 1 << 0; - -pub const NFT_REJECT_ICMP_UNREACH: ::c_int = 0; -pub const NFT_REJECT_TCP_RST: ::c_int = 1; -pub const NFT_REJECT_ICMPX_UNREACH: ::c_int = 2; - -pub const NFT_REJECT_ICMPX_NO_ROUTE: ::c_int = 0; -pub const NFT_REJECT_ICMPX_PORT_UNREACH: ::c_int = 1; -pub const NFT_REJECT_ICMPX_HOST_UNREACH: ::c_int = 2; -pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: ::c_int = 3; - -pub const NFT_NAT_SNAT: ::c_int = 0; -pub const NFT_NAT_DNAT: ::c_int = 1; - -pub const NFT_TRACETYPE_UNSPEC: ::c_int = 0; -pub const NFT_TRACETYPE_POLICY: ::c_int = 1; -pub const NFT_TRACETYPE_RETURN: ::c_int = 2; -pub const NFT_TRACETYPE_RULE: ::c_int = 3; - -pub const NFT_NG_INCREMENTAL: ::c_int = 0; -pub const NFT_NG_RANDOM: ::c_int = 1; +pub const NFT_MSG_MAX: c_int = 25; + +pub const NFT_SET_ANONYMOUS: c_int = 0x1; +pub const NFT_SET_CONSTANT: c_int = 0x2; +pub const NFT_SET_INTERVAL: c_int = 0x4; +pub const NFT_SET_MAP: c_int = 0x8; +pub const NFT_SET_TIMEOUT: c_int = 0x10; +pub const NFT_SET_EVAL: c_int = 0x20; + +pub const NFT_SET_POL_PERFORMANCE: c_int = 0; +pub const NFT_SET_POL_MEMORY: c_int = 1; + +pub const NFT_SET_ELEM_INTERVAL_END: c_int = 0x1; + +pub const NFT_DATA_VALUE: c_uint = 0; +pub const NFT_DATA_VERDICT: c_uint = 0xffffff00; + +pub const NFT_DATA_RESERVED_MASK: c_uint = 0xffffff00; + +pub const NFT_DATA_VALUE_MAXLEN: c_int = 64; + +pub const NFT_BYTEORDER_NTOH: c_int = 0; +pub const NFT_BYTEORDER_HTON: c_int = 1; + +pub const NFT_CMP_EQ: c_int = 0; +pub const NFT_CMP_NEQ: c_int = 1; +pub const NFT_CMP_LT: c_int = 2; +pub const NFT_CMP_LTE: c_int = 3; +pub const NFT_CMP_GT: c_int = 4; +pub const NFT_CMP_GTE: c_int = 5; + +pub const NFT_RANGE_EQ: c_int = 0; +pub const NFT_RANGE_NEQ: c_int = 1; + +pub const NFT_LOOKUP_F_INV: c_int = 1 << 0; + +pub const NFT_DYNSET_OP_ADD: c_int = 0; +pub const NFT_DYNSET_OP_UPDATE: c_int = 1; + +pub const NFT_DYNSET_F_INV: c_int = 1 << 0; + +pub const NFT_PAYLOAD_LL_HEADER: c_int = 0; +pub const NFT_PAYLOAD_NETWORK_HEADER: c_int = 1; +pub const NFT_PAYLOAD_TRANSPORT_HEADER: c_int = 2; + +pub const NFT_PAYLOAD_CSUM_NONE: c_int = 0; +pub const NFT_PAYLOAD_CSUM_INET: c_int = 1; + +pub const NFT_META_LEN: c_int = 0; +pub const NFT_META_PROTOCOL: c_int = 1; +pub const NFT_META_PRIORITY: c_int = 2; +pub const NFT_META_MARK: c_int = 3; +pub const NFT_META_IIF: c_int = 4; +pub const NFT_META_OIF: c_int = 5; +pub const NFT_META_IIFNAME: c_int = 6; +pub const NFT_META_OIFNAME: c_int = 7; +pub const NFT_META_IIFTYPE: c_int = 8; +pub const NFT_META_OIFTYPE: c_int = 9; +pub const NFT_META_SKUID: c_int = 10; +pub const NFT_META_SKGID: c_int = 11; +pub const NFT_META_NFTRACE: c_int = 12; +pub const NFT_META_RTCLASSID: c_int = 13; +pub const NFT_META_SECMARK: c_int = 14; +pub const NFT_META_NFPROTO: c_int = 15; +pub const NFT_META_L4PROTO: c_int = 16; +pub const NFT_META_BRI_IIFNAME: c_int = 17; +pub const NFT_META_BRI_OIFNAME: c_int = 18; +pub const NFT_META_PKTTYPE: c_int = 19; +pub const NFT_META_CPU: c_int = 20; +pub const NFT_META_IIFGROUP: c_int = 21; +pub const NFT_META_OIFGROUP: c_int = 22; +pub const NFT_META_CGROUP: c_int = 23; +pub const NFT_META_PRANDOM: c_int = 24; + +pub const NFT_CT_STATE: c_int = 0; +pub const NFT_CT_DIRECTION: c_int = 1; +pub const NFT_CT_STATUS: c_int = 2; +pub const NFT_CT_MARK: c_int = 3; +pub const NFT_CT_SECMARK: c_int = 4; +pub const NFT_CT_EXPIRATION: c_int = 5; +pub const NFT_CT_HELPER: c_int = 6; +pub const NFT_CT_L3PROTOCOL: c_int = 7; +pub const NFT_CT_SRC: c_int = 8; +pub const NFT_CT_DST: c_int = 9; +pub const NFT_CT_PROTOCOL: c_int = 10; +pub const NFT_CT_PROTO_SRC: c_int = 11; +pub const NFT_CT_PROTO_DST: c_int = 12; +pub const NFT_CT_LABELS: c_int = 13; +pub const NFT_CT_PKTS: c_int = 14; +pub const NFT_CT_BYTES: c_int = 15; +pub const NFT_CT_AVGPKT: c_int = 16; +pub const NFT_CT_ZONE: c_int = 17; +pub const NFT_CT_EVENTMASK: c_int = 18; +pub const NFT_CT_SRC_IP: c_int = 19; +pub const NFT_CT_DST_IP: c_int = 20; +pub const NFT_CT_SRC_IP6: c_int = 21; +pub const NFT_CT_DST_IP6: c_int = 22; + +pub const NFT_LIMIT_PKTS: c_int = 0; +pub const NFT_LIMIT_PKT_BYTES: c_int = 1; + +pub const NFT_LIMIT_F_INV: c_int = 1 << 0; + +pub const NFT_QUEUE_FLAG_BYPASS: c_int = 0x01; +pub const NFT_QUEUE_FLAG_CPU_FANOUT: c_int = 0x02; +pub const NFT_QUEUE_FLAG_MASK: c_int = 0x03; + +pub const NFT_QUOTA_F_INV: c_int = 1 << 0; + +pub const NFT_REJECT_ICMP_UNREACH: c_int = 0; +pub const NFT_REJECT_TCP_RST: c_int = 1; +pub const NFT_REJECT_ICMPX_UNREACH: c_int = 2; + +pub const NFT_REJECT_ICMPX_NO_ROUTE: c_int = 0; +pub const NFT_REJECT_ICMPX_PORT_UNREACH: c_int = 1; +pub const NFT_REJECT_ICMPX_HOST_UNREACH: c_int = 2; +pub const NFT_REJECT_ICMPX_ADMIN_PROHIBITED: c_int = 3; + +pub const NFT_NAT_SNAT: c_int = 0; +pub const NFT_NAT_DNAT: c_int = 1; + +pub const NFT_TRACETYPE_UNSPEC: c_int = 0; +pub const NFT_TRACETYPE_POLICY: c_int = 1; +pub const NFT_TRACETYPE_RETURN: c_int = 2; +pub const NFT_TRACETYPE_RULE: c_int = 3; + +pub const NFT_NG_INCREMENTAL: c_int = 0; +pub const NFT_NG_RANDOM: c_int = 1; // linux/input.h -pub const FF_MAX: ::__u16 = 0x7f; +pub const FF_MAX: __u16 = 0x7f; pub const FF_CNT: usize = FF_MAX as usize + 1; // linux/input-event-codes.h -pub const INPUT_PROP_MAX: ::__u16 = 0x1f; +pub const INPUT_PROP_MAX: __u16 = 0x1f; pub const INPUT_PROP_CNT: usize = INPUT_PROP_MAX as usize + 1; -pub const EV_MAX: ::__u16 = 0x1f; +pub const EV_MAX: __u16 = 0x1f; pub const EV_CNT: usize = EV_MAX as usize + 1; -pub const SYN_MAX: ::__u16 = 0xf; +pub const SYN_MAX: __u16 = 0xf; pub const SYN_CNT: usize = SYN_MAX as usize + 1; -pub const KEY_MAX: ::__u16 = 0x2ff; +pub const KEY_MAX: __u16 = 0x2ff; pub const KEY_CNT: usize = KEY_MAX as usize + 1; -pub const REL_MAX: ::__u16 = 0x0f; +pub const REL_MAX: __u16 = 0x0f; pub const REL_CNT: usize = REL_MAX as usize + 1; -pub const ABS_MAX: ::__u16 = 0x3f; +pub const ABS_MAX: __u16 = 0x3f; pub const ABS_CNT: usize = ABS_MAX as usize + 1; -pub const SW_MAX: ::__u16 = 0x10; +pub const SW_MAX: __u16 = 0x10; pub const SW_CNT: usize = SW_MAX as usize + 1; -pub const MSC_MAX: ::__u16 = 0x07; +pub const MSC_MAX: __u16 = 0x07; pub const MSC_CNT: usize = MSC_MAX as usize + 1; -pub const LED_MAX: ::__u16 = 0x0f; +pub const LED_MAX: __u16 = 0x0f; pub const LED_CNT: usize = LED_MAX as usize + 1; -pub const REP_MAX: ::__u16 = 0x01; +pub const REP_MAX: __u16 = 0x01; pub const REP_CNT: usize = REP_MAX as usize + 1; -pub const SND_MAX: ::__u16 = 0x07; +pub const SND_MAX: __u16 = 0x07; pub const SND_CNT: usize = SND_MAX as usize + 1; // linux/uinput.h -pub const UINPUT_VERSION: ::c_uint = 5; +pub const UINPUT_VERSION: c_uint = 5; pub const UINPUT_MAX_NAME_SIZE: usize = 80; // uapi/linux/fanotify.h @@ -5054,43 +5058,43 @@ pub const FAN_ONDIR: u64 = 0x4000_0000; pub const FAN_CLOSE: u64 = FAN_CLOSE_WRITE | FAN_CLOSE_NOWRITE; pub const FAN_MOVE: u64 = FAN_MOVED_FROM | FAN_MOVED_TO; -pub const FAN_CLOEXEC: ::c_uint = 0x0000_0001; -pub const FAN_NONBLOCK: ::c_uint = 0x0000_0002; +pub const FAN_CLOEXEC: c_uint = 0x0000_0001; +pub const FAN_NONBLOCK: c_uint = 0x0000_0002; -pub const FAN_CLASS_NOTIF: ::c_uint = 0x0000_0000; -pub const FAN_CLASS_CONTENT: ::c_uint = 0x0000_0004; -pub const FAN_CLASS_PRE_CONTENT: ::c_uint = 0x0000_0008; +pub const FAN_CLASS_NOTIF: c_uint = 0x0000_0000; +pub const FAN_CLASS_CONTENT: c_uint = 0x0000_0004; +pub const FAN_CLASS_PRE_CONTENT: c_uint = 0x0000_0008; -pub const FAN_UNLIMITED_QUEUE: ::c_uint = 0x0000_0010; -pub const FAN_UNLIMITED_MARKS: ::c_uint = 0x0000_0020; -pub const FAN_ENABLE_AUDIT: ::c_uint = 0x0000_0040; +pub const FAN_UNLIMITED_QUEUE: c_uint = 0x0000_0010; +pub const FAN_UNLIMITED_MARKS: c_uint = 0x0000_0020; +pub const FAN_ENABLE_AUDIT: c_uint = 0x0000_0040; -pub const FAN_REPORT_PIDFD: ::c_uint = 0x0000_0080; -pub const FAN_REPORT_TID: ::c_uint = 0x0000_0100; -pub const FAN_REPORT_FID: ::c_uint = 0x0000_0200; -pub const FAN_REPORT_DIR_FID: ::c_uint = 0x0000_0400; -pub const FAN_REPORT_NAME: ::c_uint = 0x0000_0800; -pub const FAN_REPORT_TARGET_FID: ::c_uint = 0x0000_1000; +pub const FAN_REPORT_PIDFD: c_uint = 0x0000_0080; +pub const FAN_REPORT_TID: c_uint = 0x0000_0100; +pub const FAN_REPORT_FID: c_uint = 0x0000_0200; +pub const FAN_REPORT_DIR_FID: c_uint = 0x0000_0400; +pub const FAN_REPORT_NAME: c_uint = 0x0000_0800; +pub const FAN_REPORT_TARGET_FID: c_uint = 0x0000_1000; -pub const FAN_REPORT_DFID_NAME: ::c_uint = FAN_REPORT_DIR_FID | FAN_REPORT_NAME; -pub const FAN_REPORT_DFID_NAME_TARGET: ::c_uint = +pub const FAN_REPORT_DFID_NAME: c_uint = FAN_REPORT_DIR_FID | FAN_REPORT_NAME; +pub const FAN_REPORT_DFID_NAME_TARGET: c_uint = FAN_REPORT_DFID_NAME | FAN_REPORT_FID | FAN_REPORT_TARGET_FID; -pub const FAN_MARK_ADD: ::c_uint = 0x0000_0001; -pub const FAN_MARK_REMOVE: ::c_uint = 0x0000_0002; -pub const FAN_MARK_DONT_FOLLOW: ::c_uint = 0x0000_0004; -pub const FAN_MARK_ONLYDIR: ::c_uint = 0x0000_0008; -pub const FAN_MARK_IGNORED_MASK: ::c_uint = 0x0000_0020; -pub const FAN_MARK_IGNORED_SURV_MODIFY: ::c_uint = 0x0000_0040; -pub const FAN_MARK_FLUSH: ::c_uint = 0x0000_0080; -pub const FAN_MARK_EVICTABLE: ::c_uint = 0x0000_0200; -pub const FAN_MARK_IGNORE: ::c_uint = 0x0000_0400; +pub const FAN_MARK_ADD: c_uint = 0x0000_0001; +pub const FAN_MARK_REMOVE: c_uint = 0x0000_0002; +pub const FAN_MARK_DONT_FOLLOW: c_uint = 0x0000_0004; +pub const FAN_MARK_ONLYDIR: c_uint = 0x0000_0008; +pub const FAN_MARK_IGNORED_MASK: c_uint = 0x0000_0020; +pub const FAN_MARK_IGNORED_SURV_MODIFY: c_uint = 0x0000_0040; +pub const FAN_MARK_FLUSH: c_uint = 0x0000_0080; +pub const FAN_MARK_EVICTABLE: c_uint = 0x0000_0200; +pub const FAN_MARK_IGNORE: c_uint = 0x0000_0400; -pub const FAN_MARK_INODE: ::c_uint = 0x0000_0000; -pub const FAN_MARK_MOUNT: ::c_uint = 0x0000_0010; -pub const FAN_MARK_FILESYSTEM: ::c_uint = 0x0000_0100; +pub const FAN_MARK_INODE: c_uint = 0x0000_0000; +pub const FAN_MARK_MOUNT: c_uint = 0x0000_0010; +pub const FAN_MARK_FILESYSTEM: c_uint = 0x0000_0100; -pub const FAN_MARK_IGNORE_SURV: ::c_uint = FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY; +pub const FAN_MARK_IGNORE_SURV: c_uint = FAN_MARK_IGNORE | FAN_MARK_IGNORED_SURV_MODIFY; pub const FANOTIFY_METADATA_VERSION: u8 = 3; @@ -5111,101 +5115,101 @@ pub const FAN_DENY: u32 = 0x02; pub const FAN_AUDIT: u32 = 0x10; pub const FAN_INFO: u32 = 0x20; -pub const FAN_NOFD: ::c_int = -1; -pub const FAN_NOPIDFD: ::c_int = FAN_NOFD; -pub const FAN_EPIDFD: ::c_int = -2; +pub const FAN_NOFD: c_int = -1; +pub const FAN_NOPIDFD: c_int = FAN_NOFD; +pub const FAN_EPIDFD: c_int = -2; // linux/futex.h -pub const FUTEX_WAIT: ::c_int = 0; -pub const FUTEX_WAKE: ::c_int = 1; -pub const FUTEX_FD: ::c_int = 2; -pub const FUTEX_REQUEUE: ::c_int = 3; -pub const FUTEX_CMP_REQUEUE: ::c_int = 4; -pub const FUTEX_WAKE_OP: ::c_int = 5; -pub const FUTEX_LOCK_PI: ::c_int = 6; -pub const FUTEX_UNLOCK_PI: ::c_int = 7; -pub const FUTEX_TRYLOCK_PI: ::c_int = 8; -pub const FUTEX_WAIT_BITSET: ::c_int = 9; -pub const FUTEX_WAKE_BITSET: ::c_int = 10; -pub const FUTEX_WAIT_REQUEUE_PI: ::c_int = 11; -pub const FUTEX_CMP_REQUEUE_PI: ::c_int = 12; -pub const FUTEX_LOCK_PI2: ::c_int = 13; - -pub const FUTEX_PRIVATE_FLAG: ::c_int = 128; -pub const FUTEX_CLOCK_REALTIME: ::c_int = 256; -pub const FUTEX_CMD_MASK: ::c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); +pub const FUTEX_WAIT: c_int = 0; +pub const FUTEX_WAKE: c_int = 1; +pub const FUTEX_FD: c_int = 2; +pub const FUTEX_REQUEUE: c_int = 3; +pub const FUTEX_CMP_REQUEUE: c_int = 4; +pub const FUTEX_WAKE_OP: c_int = 5; +pub const FUTEX_LOCK_PI: c_int = 6; +pub const FUTEX_UNLOCK_PI: c_int = 7; +pub const FUTEX_TRYLOCK_PI: c_int = 8; +pub const FUTEX_WAIT_BITSET: c_int = 9; +pub const FUTEX_WAKE_BITSET: c_int = 10; +pub const FUTEX_WAIT_REQUEUE_PI: c_int = 11; +pub const FUTEX_CMP_REQUEUE_PI: c_int = 12; +pub const FUTEX_LOCK_PI2: c_int = 13; + +pub const FUTEX_PRIVATE_FLAG: c_int = 128; +pub const FUTEX_CLOCK_REALTIME: c_int = 256; +pub const FUTEX_CMD_MASK: c_int = !(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME); pub const FUTEX_WAITERS: u32 = 0x80000000; pub const FUTEX_OWNER_DIED: u32 = 0x40000000; pub const FUTEX_TID_MASK: u32 = 0x3fffffff; -pub const FUTEX_BITSET_MATCH_ANY: ::c_int = 0xffffffff; +pub const FUTEX_BITSET_MATCH_ANY: c_int = 0xffffffff; -pub const FUTEX_OP_SET: ::c_int = 0; -pub const FUTEX_OP_ADD: ::c_int = 1; -pub const FUTEX_OP_OR: ::c_int = 2; -pub const FUTEX_OP_ANDN: ::c_int = 3; -pub const FUTEX_OP_XOR: ::c_int = 4; +pub const FUTEX_OP_SET: c_int = 0; +pub const FUTEX_OP_ADD: c_int = 1; +pub const FUTEX_OP_OR: c_int = 2; +pub const FUTEX_OP_ANDN: c_int = 3; +pub const FUTEX_OP_XOR: c_int = 4; -pub const FUTEX_OP_OPARG_SHIFT: ::c_int = 8; +pub const FUTEX_OP_OPARG_SHIFT: c_int = 8; -pub const FUTEX_OP_CMP_EQ: ::c_int = 0; -pub const FUTEX_OP_CMP_NE: ::c_int = 1; -pub const FUTEX_OP_CMP_LT: ::c_int = 2; -pub const FUTEX_OP_CMP_LE: ::c_int = 3; -pub const FUTEX_OP_CMP_GT: ::c_int = 4; -pub const FUTEX_OP_CMP_GE: ::c_int = 5; +pub const FUTEX_OP_CMP_EQ: c_int = 0; +pub const FUTEX_OP_CMP_NE: c_int = 1; +pub const FUTEX_OP_CMP_LT: c_int = 2; +pub const FUTEX_OP_CMP_LE: c_int = 3; +pub const FUTEX_OP_CMP_GT: c_int = 4; +pub const FUTEX_OP_CMP_GE: c_int = 5; -pub fn FUTEX_OP(op: ::c_int, oparg: ::c_int, cmp: ::c_int, cmparg: ::c_int) -> ::c_int { +pub fn FUTEX_OP(op: c_int, oparg: c_int, cmp: c_int, cmparg: c_int) -> c_int { ((op & 0xf) << 28) | ((cmp & 0xf) << 24) | ((oparg & 0xfff) << 12) | (cmparg & 0xfff) } // linux/kexec.h -pub const KEXEC_ON_CRASH: ::c_int = 0x00000001; -pub const KEXEC_PRESERVE_CONTEXT: ::c_int = 0x00000002; -pub const KEXEC_ARCH_MASK: ::c_int = 0xffff0000; -pub const KEXEC_FILE_UNLOAD: ::c_int = 0x00000001; -pub const KEXEC_FILE_ON_CRASH: ::c_int = 0x00000002; -pub const KEXEC_FILE_NO_INITRAMFS: ::c_int = 0x00000004; +pub const KEXEC_ON_CRASH: c_int = 0x00000001; +pub const KEXEC_PRESERVE_CONTEXT: c_int = 0x00000002; +pub const KEXEC_ARCH_MASK: c_int = 0xffff0000; +pub const KEXEC_FILE_UNLOAD: c_int = 0x00000001; +pub const KEXEC_FILE_ON_CRASH: c_int = 0x00000002; +pub const KEXEC_FILE_NO_INITRAMFS: c_int = 0x00000004; // linux/reboot.h -pub const LINUX_REBOOT_MAGIC1: ::c_int = 0xfee1dead; -pub const LINUX_REBOOT_MAGIC2: ::c_int = 672274793; -pub const LINUX_REBOOT_MAGIC2A: ::c_int = 85072278; -pub const LINUX_REBOOT_MAGIC2B: ::c_int = 369367448; -pub const LINUX_REBOOT_MAGIC2C: ::c_int = 537993216; - -pub const LINUX_REBOOT_CMD_RESTART: ::c_int = 0x01234567; -pub const LINUX_REBOOT_CMD_HALT: ::c_int = 0xCDEF0123; -pub const LINUX_REBOOT_CMD_CAD_ON: ::c_int = 0x89ABCDEF; -pub const LINUX_REBOOT_CMD_CAD_OFF: ::c_int = 0x00000000; -pub const LINUX_REBOOT_CMD_POWER_OFF: ::c_int = 0x4321FEDC; -pub const LINUX_REBOOT_CMD_RESTART2: ::c_int = 0xA1B2C3D4; -pub const LINUX_REBOOT_CMD_SW_SUSPEND: ::c_int = 0xD000FCE2; -pub const LINUX_REBOOT_CMD_KEXEC: ::c_int = 0x45584543; - -pub const REG_EXTENDED: ::c_int = 1; -pub const REG_ICASE: ::c_int = 2; -pub const REG_NEWLINE: ::c_int = 4; -pub const REG_NOSUB: ::c_int = 8; - -pub const REG_NOTBOL: ::c_int = 1; -pub const REG_NOTEOL: ::c_int = 2; - -pub const REG_ENOSYS: ::c_int = -1; -pub const REG_NOMATCH: ::c_int = 1; -pub const REG_BADPAT: ::c_int = 2; -pub const REG_ECOLLATE: ::c_int = 3; -pub const REG_ECTYPE: ::c_int = 4; -pub const REG_EESCAPE: ::c_int = 5; -pub const REG_ESUBREG: ::c_int = 6; -pub const REG_EBRACK: ::c_int = 7; -pub const REG_EPAREN: ::c_int = 8; -pub const REG_EBRACE: ::c_int = 9; -pub const REG_BADBR: ::c_int = 10; -pub const REG_ERANGE: ::c_int = 11; -pub const REG_ESPACE: ::c_int = 12; -pub const REG_BADRPT: ::c_int = 13; +pub const LINUX_REBOOT_MAGIC1: c_int = 0xfee1dead; +pub const LINUX_REBOOT_MAGIC2: c_int = 672274793; +pub const LINUX_REBOOT_MAGIC2A: c_int = 85072278; +pub const LINUX_REBOOT_MAGIC2B: c_int = 369367448; +pub const LINUX_REBOOT_MAGIC2C: c_int = 537993216; + +pub const LINUX_REBOOT_CMD_RESTART: c_int = 0x01234567; +pub const LINUX_REBOOT_CMD_HALT: c_int = 0xCDEF0123; +pub const LINUX_REBOOT_CMD_CAD_ON: c_int = 0x89ABCDEF; +pub const LINUX_REBOOT_CMD_CAD_OFF: c_int = 0x00000000; +pub const LINUX_REBOOT_CMD_POWER_OFF: c_int = 0x4321FEDC; +pub const LINUX_REBOOT_CMD_RESTART2: c_int = 0xA1B2C3D4; +pub const LINUX_REBOOT_CMD_SW_SUSPEND: c_int = 0xD000FCE2; +pub const LINUX_REBOOT_CMD_KEXEC: c_int = 0x45584543; + +pub const REG_EXTENDED: c_int = 1; +pub const REG_ICASE: c_int = 2; +pub const REG_NEWLINE: c_int = 4; +pub const REG_NOSUB: c_int = 8; + +pub const REG_NOTBOL: c_int = 1; +pub const REG_NOTEOL: c_int = 2; + +pub const REG_ENOSYS: c_int = -1; +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; // linux/errqueue.h pub const SO_EE_ORIGIN_NONE: u8 = 0; @@ -5216,41 +5220,41 @@ pub const SO_EE_ORIGIN_TXSTATUS: u8 = 4; pub const SO_EE_ORIGIN_TIMESTAMPING: u8 = SO_EE_ORIGIN_TXSTATUS; // errno.h -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EWOULDBLOCK: ::c_int = EAGAIN; +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EWOULDBLOCK: c_int = EAGAIN; // linux/can.h pub const CAN_EFF_FLAG: canid_t = 0x80000000; @@ -5259,28 +5263,28 @@ pub const CAN_ERR_FLAG: canid_t = 0x20000000; pub const CAN_SFF_MASK: canid_t = 0x000007FF; pub const CAN_EFF_MASK: canid_t = 0x1FFFFFFF; pub const CAN_ERR_MASK: canid_t = 0x1FFFFFFF; -pub const CANXL_PRIO_MASK: ::canid_t = CAN_SFF_MASK; +pub const CANXL_PRIO_MASK: crate::canid_t = CAN_SFF_MASK; -pub const CAN_SFF_ID_BITS: ::c_int = 11; -pub const CAN_EFF_ID_BITS: ::c_int = 29; -pub const CANXL_PRIO_BITS: ::c_int = CAN_SFF_ID_BITS; +pub const CAN_SFF_ID_BITS: c_int = 11; +pub const CAN_EFF_ID_BITS: c_int = 29; +pub const CANXL_PRIO_BITS: c_int = CAN_SFF_ID_BITS; -pub const CAN_MAX_DLC: ::c_int = 8; +pub const CAN_MAX_DLC: c_int = 8; pub const CAN_MAX_DLEN: usize = 8; -pub const CANFD_MAX_DLC: ::c_int = 15; +pub const CANFD_MAX_DLC: c_int = 15; pub const CANFD_MAX_DLEN: usize = 64; -pub const CANFD_BRS: ::c_int = 0x01; -pub const CANFD_ESI: ::c_int = 0x02; +pub const CANFD_BRS: c_int = 0x01; +pub const CANFD_ESI: c_int = 0x02; -pub const CANXL_MIN_DLC: ::c_int = 0; -pub const CANXL_MAX_DLC: ::c_int = 2047; -pub const CANXL_MAX_DLC_MASK: ::c_int = 0x07FF; +pub const CANXL_MIN_DLC: c_int = 0; +pub const CANXL_MAX_DLC: c_int = 2047; +pub const CANXL_MAX_DLC_MASK: c_int = 0x07FF; pub const CANXL_MIN_DLEN: usize = 1; pub const CANXL_MAX_DLEN: usize = 2048; -pub const CANXL_XLF: ::c_int = 0x80; -pub const CANXL_SEC: ::c_int = 0x01; +pub const CANXL_XLF: c_int = 0x80; +pub const CANXL_SEC: c_int = 0x01; pub const CAN_MTU: usize = size_of::(); pub const CANFD_MTU: usize = size_of::(); @@ -5292,406 +5296,406 @@ pub const CANXL_HDR_SIZE: usize = 12; pub const CANXL_MIN_MTU: usize = CANXL_HDR_SIZE + 64; pub const CANXL_MAX_MTU: usize = CANXL_MTU; -pub const CAN_RAW: ::c_int = 1; -pub const CAN_BCM: ::c_int = 2; -pub const CAN_TP16: ::c_int = 3; -pub const CAN_TP20: ::c_int = 4; -pub const CAN_MCNET: ::c_int = 5; -pub const CAN_ISOTP: ::c_int = 6; -pub const CAN_J1939: ::c_int = 7; -pub const CAN_NPROTO: ::c_int = 8; +pub const CAN_RAW: c_int = 1; +pub const CAN_BCM: c_int = 2; +pub const CAN_TP16: c_int = 3; +pub const CAN_TP20: c_int = 4; +pub const CAN_MCNET: c_int = 5; +pub const CAN_ISOTP: c_int = 6; +pub const CAN_J1939: c_int = 7; +pub const CAN_NPROTO: c_int = 8; -pub const SOL_CAN_BASE: ::c_int = 100; +pub const SOL_CAN_BASE: c_int = 100; pub const CAN_INV_FILTER: canid_t = 0x20000000; -pub const CAN_RAW_FILTER_MAX: ::c_int = 512; +pub const CAN_RAW_FILTER_MAX: c_int = 512; // linux/can/raw.h -pub const SOL_CAN_RAW: ::c_int = SOL_CAN_BASE + CAN_RAW; -pub const CAN_RAW_FILTER: ::c_int = 1; -pub const CAN_RAW_ERR_FILTER: ::c_int = 2; -pub const CAN_RAW_LOOPBACK: ::c_int = 3; -pub const CAN_RAW_RECV_OWN_MSGS: ::c_int = 4; -pub const CAN_RAW_FD_FRAMES: ::c_int = 5; -pub const CAN_RAW_JOIN_FILTERS: ::c_int = 6; -pub const CAN_RAW_XL_FRAMES: ::c_int = 7; +pub const SOL_CAN_RAW: c_int = SOL_CAN_BASE + CAN_RAW; +pub const CAN_RAW_FILTER: c_int = 1; +pub const CAN_RAW_ERR_FILTER: c_int = 2; +pub const CAN_RAW_LOOPBACK: c_int = 3; +pub const CAN_RAW_RECV_OWN_MSGS: c_int = 4; +pub const CAN_RAW_FD_FRAMES: c_int = 5; +pub const CAN_RAW_JOIN_FILTERS: c_int = 6; +pub const CAN_RAW_XL_FRAMES: c_int = 7; // linux/can/j1939.h -pub const SOL_CAN_J1939: ::c_int = SOL_CAN_BASE + CAN_J1939; - -pub const J1939_MAX_UNICAST_ADDR: ::c_uchar = 0xfd; -pub const J1939_IDLE_ADDR: ::c_uchar = 0xfe; -pub const J1939_NO_ADDR: ::c_uchar = 0xff; -pub const J1939_NO_NAME: ::c_ulong = 0; -pub const J1939_PGN_REQUEST: ::c_uint = 0x0ea00; -pub const J1939_PGN_ADDRESS_CLAIMED: ::c_uint = 0x0ee00; -pub const J1939_PGN_ADDRESS_COMMANDED: ::c_uint = 0x0fed8; -pub const J1939_PGN_PDU1_MAX: ::c_uint = 0x3ff00; -pub const J1939_PGN_MAX: ::c_uint = 0x3ffff; -pub const J1939_NO_PGN: ::c_uint = 0x40000; - -pub const SO_J1939_FILTER: ::c_int = 1; -pub const SO_J1939_PROMISC: ::c_int = 2; -pub const SO_J1939_SEND_PRIO: ::c_int = 3; -pub const SO_J1939_ERRQUEUE: ::c_int = 4; - -pub const SCM_J1939_DEST_ADDR: ::c_int = 1; -pub const SCM_J1939_DEST_NAME: ::c_int = 2; -pub const SCM_J1939_PRIO: ::c_int = 3; -pub const SCM_J1939_ERRQUEUE: ::c_int = 4; - -pub const J1939_NLA_PAD: ::c_int = 0; -pub const J1939_NLA_BYTES_ACKED: ::c_int = 1; -pub const J1939_NLA_TOTAL_SIZE: ::c_int = 2; -pub const J1939_NLA_PGN: ::c_int = 3; -pub const J1939_NLA_SRC_NAME: ::c_int = 4; -pub const J1939_NLA_DEST_NAME: ::c_int = 5; -pub const J1939_NLA_SRC_ADDR: ::c_int = 6; -pub const J1939_NLA_DEST_ADDR: ::c_int = 7; - -pub const J1939_EE_INFO_NONE: ::c_int = 0; -pub const J1939_EE_INFO_TX_ABORT: ::c_int = 1; -pub const J1939_EE_INFO_RX_RTS: ::c_int = 2; -pub const J1939_EE_INFO_RX_DPO: ::c_int = 3; -pub const J1939_EE_INFO_RX_ABORT: ::c_int = 4; - -pub const J1939_FILTER_MAX: ::c_int = 512; +pub const SOL_CAN_J1939: c_int = SOL_CAN_BASE + CAN_J1939; + +pub const J1939_MAX_UNICAST_ADDR: c_uchar = 0xfd; +pub const J1939_IDLE_ADDR: c_uchar = 0xfe; +pub const J1939_NO_ADDR: c_uchar = 0xff; +pub const J1939_NO_NAME: c_ulong = 0; +pub const J1939_PGN_REQUEST: c_uint = 0x0ea00; +pub const J1939_PGN_ADDRESS_CLAIMED: c_uint = 0x0ee00; +pub const J1939_PGN_ADDRESS_COMMANDED: c_uint = 0x0fed8; +pub const J1939_PGN_PDU1_MAX: c_uint = 0x3ff00; +pub const J1939_PGN_MAX: c_uint = 0x3ffff; +pub const J1939_NO_PGN: c_uint = 0x40000; + +pub const SO_J1939_FILTER: c_int = 1; +pub const SO_J1939_PROMISC: c_int = 2; +pub const SO_J1939_SEND_PRIO: c_int = 3; +pub const SO_J1939_ERRQUEUE: c_int = 4; + +pub const SCM_J1939_DEST_ADDR: c_int = 1; +pub const SCM_J1939_DEST_NAME: c_int = 2; +pub const SCM_J1939_PRIO: c_int = 3; +pub const SCM_J1939_ERRQUEUE: c_int = 4; + +pub const J1939_NLA_PAD: c_int = 0; +pub const J1939_NLA_BYTES_ACKED: c_int = 1; +pub const J1939_NLA_TOTAL_SIZE: c_int = 2; +pub const J1939_NLA_PGN: c_int = 3; +pub const J1939_NLA_SRC_NAME: c_int = 4; +pub const J1939_NLA_DEST_NAME: c_int = 5; +pub const J1939_NLA_SRC_ADDR: c_int = 6; +pub const J1939_NLA_DEST_ADDR: c_int = 7; + +pub const J1939_EE_INFO_NONE: c_int = 0; +pub const J1939_EE_INFO_TX_ABORT: c_int = 1; +pub const J1939_EE_INFO_RX_RTS: c_int = 2; +pub const J1939_EE_INFO_RX_DPO: c_int = 3; +pub const J1939_EE_INFO_RX_ABORT: c_int = 4; + +pub const J1939_FILTER_MAX: c_int = 512; // linux/sctp.h -pub const SCTP_FUTURE_ASSOC: ::c_int = 0; -pub const SCTP_CURRENT_ASSOC: ::c_int = 1; -pub const SCTP_ALL_ASSOC: ::c_int = 2; -pub const SCTP_RTOINFO: ::c_int = 0; -pub const SCTP_ASSOCINFO: ::c_int = 1; -pub const SCTP_INITMSG: ::c_int = 2; -pub const SCTP_NODELAY: ::c_int = 3; -pub const SCTP_AUTOCLOSE: ::c_int = 4; -pub const SCTP_SET_PEER_PRIMARY_ADDR: ::c_int = 5; -pub const SCTP_PRIMARY_ADDR: ::c_int = 6; -pub const SCTP_ADAPTATION_LAYER: ::c_int = 7; -pub const SCTP_DISABLE_FRAGMENTS: ::c_int = 8; -pub const SCTP_PEER_ADDR_PARAMS: ::c_int = 9; -pub const SCTP_DEFAULT_SEND_PARAM: ::c_int = 10; -pub const SCTP_EVENTS: ::c_int = 11; -pub const SCTP_I_WANT_MAPPED_V4_ADDR: ::c_int = 12; -pub const SCTP_MAXSEG: ::c_int = 13; -pub const SCTP_STATUS: ::c_int = 14; -pub const SCTP_GET_PEER_ADDR_INFO: ::c_int = 15; -pub const SCTP_DELAYED_ACK_TIME: ::c_int = 16; -pub const SCTP_DELAYED_ACK: ::c_int = SCTP_DELAYED_ACK_TIME; -pub const SCTP_DELAYED_SACK: ::c_int = SCTP_DELAYED_ACK_TIME; -pub const SCTP_CONTEXT: ::c_int = 17; -pub const SCTP_FRAGMENT_INTERLEAVE: ::c_int = 18; -pub const SCTP_PARTIAL_DELIVERY_POINT: ::c_int = 19; -pub const SCTP_MAX_BURST: ::c_int = 20; -pub const SCTP_AUTH_CHUNK: ::c_int = 21; -pub const SCTP_HMAC_IDENT: ::c_int = 22; -pub const SCTP_AUTH_KEY: ::c_int = 23; -pub const SCTP_AUTH_ACTIVE_KEY: ::c_int = 24; -pub const SCTP_AUTH_DELETE_KEY: ::c_int = 25; -pub const SCTP_PEER_AUTH_CHUNKS: ::c_int = 26; -pub const SCTP_LOCAL_AUTH_CHUNKS: ::c_int = 27; -pub const SCTP_GET_ASSOC_NUMBER: ::c_int = 28; -pub const SCTP_GET_ASSOC_ID_LIST: ::c_int = 29; -pub const SCTP_AUTO_ASCONF: ::c_int = 30; -pub const SCTP_PEER_ADDR_THLDS: ::c_int = 31; -pub const SCTP_RECVRCVINFO: ::c_int = 32; -pub const SCTP_RECVNXTINFO: ::c_int = 33; -pub const SCTP_DEFAULT_SNDINFO: ::c_int = 34; -pub const SCTP_AUTH_DEACTIVATE_KEY: ::c_int = 35; -pub const SCTP_REUSE_PORT: ::c_int = 36; -pub const SCTP_PEER_ADDR_THLDS_V2: ::c_int = 37; -pub const SCTP_PR_SCTP_NONE: ::c_int = 0x0000; -pub const SCTP_PR_SCTP_TTL: ::c_int = 0x0010; -pub const SCTP_PR_SCTP_RTX: ::c_int = 0x0020; -pub const SCTP_PR_SCTP_PRIO: ::c_int = 0x0030; -pub const SCTP_PR_SCTP_MAX: ::c_int = SCTP_PR_SCTP_PRIO; -pub const SCTP_PR_SCTP_MASK: ::c_int = 0x0030; -pub const SCTP_ENABLE_RESET_STREAM_REQ: ::c_int = 0x01; -pub const SCTP_ENABLE_RESET_ASSOC_REQ: ::c_int = 0x02; -pub const SCTP_ENABLE_CHANGE_ASSOC_REQ: ::c_int = 0x04; -pub const SCTP_ENABLE_STRRESET_MASK: ::c_int = 0x07; -pub const SCTP_STREAM_RESET_INCOMING: ::c_int = 0x01; -pub const SCTP_STREAM_RESET_OUTGOING: ::c_int = 0x02; - -pub const SCTP_INIT: ::c_int = 0; -pub const SCTP_SNDRCV: ::c_int = 1; -pub const SCTP_SNDINFO: ::c_int = 2; -pub const SCTP_RCVINFO: ::c_int = 3; -pub const SCTP_NXTINFO: ::c_int = 4; -pub const SCTP_PRINFO: ::c_int = 5; -pub const SCTP_AUTHINFO: ::c_int = 6; -pub const SCTP_DSTADDRV4: ::c_int = 7; -pub const SCTP_DSTADDRV6: ::c_int = 8; - -pub const SCTP_UNORDERED: ::c_int = 1 << 0; -pub const SCTP_ADDR_OVER: ::c_int = 1 << 1; -pub const SCTP_ABORT: ::c_int = 1 << 2; -pub const SCTP_SACK_IMMEDIATELY: ::c_int = 1 << 3; -pub const SCTP_SENDALL: ::c_int = 1 << 6; -pub const SCTP_PR_SCTP_ALL: ::c_int = 1 << 7; -pub const SCTP_NOTIFICATION: ::c_int = MSG_NOTIFICATION; -pub const SCTP_EOF: ::c_int = ::MSG_FIN; +pub const SCTP_FUTURE_ASSOC: c_int = 0; +pub const SCTP_CURRENT_ASSOC: c_int = 1; +pub const SCTP_ALL_ASSOC: c_int = 2; +pub const SCTP_RTOINFO: c_int = 0; +pub const SCTP_ASSOCINFO: c_int = 1; +pub const SCTP_INITMSG: c_int = 2; +pub const SCTP_NODELAY: c_int = 3; +pub const SCTP_AUTOCLOSE: c_int = 4; +pub const SCTP_SET_PEER_PRIMARY_ADDR: c_int = 5; +pub const SCTP_PRIMARY_ADDR: c_int = 6; +pub const SCTP_ADAPTATION_LAYER: c_int = 7; +pub const SCTP_DISABLE_FRAGMENTS: c_int = 8; +pub const SCTP_PEER_ADDR_PARAMS: c_int = 9; +pub const SCTP_DEFAULT_SEND_PARAM: c_int = 10; +pub const SCTP_EVENTS: c_int = 11; +pub const SCTP_I_WANT_MAPPED_V4_ADDR: c_int = 12; +pub const SCTP_MAXSEG: c_int = 13; +pub const SCTP_STATUS: c_int = 14; +pub const SCTP_GET_PEER_ADDR_INFO: c_int = 15; +pub const SCTP_DELAYED_ACK_TIME: c_int = 16; +pub const SCTP_DELAYED_ACK: c_int = SCTP_DELAYED_ACK_TIME; +pub const SCTP_DELAYED_SACK: c_int = SCTP_DELAYED_ACK_TIME; +pub const SCTP_CONTEXT: c_int = 17; +pub const SCTP_FRAGMENT_INTERLEAVE: c_int = 18; +pub const SCTP_PARTIAL_DELIVERY_POINT: c_int = 19; +pub const SCTP_MAX_BURST: c_int = 20; +pub const SCTP_AUTH_CHUNK: c_int = 21; +pub const SCTP_HMAC_IDENT: c_int = 22; +pub const SCTP_AUTH_KEY: c_int = 23; +pub const SCTP_AUTH_ACTIVE_KEY: c_int = 24; +pub const SCTP_AUTH_DELETE_KEY: c_int = 25; +pub const SCTP_PEER_AUTH_CHUNKS: c_int = 26; +pub const SCTP_LOCAL_AUTH_CHUNKS: c_int = 27; +pub const SCTP_GET_ASSOC_NUMBER: c_int = 28; +pub const SCTP_GET_ASSOC_ID_LIST: c_int = 29; +pub const SCTP_AUTO_ASCONF: c_int = 30; +pub const SCTP_PEER_ADDR_THLDS: c_int = 31; +pub const SCTP_RECVRCVINFO: c_int = 32; +pub const SCTP_RECVNXTINFO: c_int = 33; +pub const SCTP_DEFAULT_SNDINFO: c_int = 34; +pub const SCTP_AUTH_DEACTIVATE_KEY: c_int = 35; +pub const SCTP_REUSE_PORT: c_int = 36; +pub const SCTP_PEER_ADDR_THLDS_V2: c_int = 37; +pub const SCTP_PR_SCTP_NONE: c_int = 0x0000; +pub const SCTP_PR_SCTP_TTL: c_int = 0x0010; +pub const SCTP_PR_SCTP_RTX: c_int = 0x0020; +pub const SCTP_PR_SCTP_PRIO: c_int = 0x0030; +pub const SCTP_PR_SCTP_MAX: c_int = SCTP_PR_SCTP_PRIO; +pub const SCTP_PR_SCTP_MASK: c_int = 0x0030; +pub const SCTP_ENABLE_RESET_STREAM_REQ: c_int = 0x01; +pub const SCTP_ENABLE_RESET_ASSOC_REQ: c_int = 0x02; +pub const SCTP_ENABLE_CHANGE_ASSOC_REQ: c_int = 0x04; +pub const SCTP_ENABLE_STRRESET_MASK: c_int = 0x07; +pub const SCTP_STREAM_RESET_INCOMING: c_int = 0x01; +pub const SCTP_STREAM_RESET_OUTGOING: c_int = 0x02; + +pub const SCTP_INIT: c_int = 0; +pub const SCTP_SNDRCV: c_int = 1; +pub const SCTP_SNDINFO: c_int = 2; +pub const SCTP_RCVINFO: c_int = 3; +pub const SCTP_NXTINFO: c_int = 4; +pub const SCTP_PRINFO: c_int = 5; +pub const SCTP_AUTHINFO: c_int = 6; +pub const SCTP_DSTADDRV4: c_int = 7; +pub const SCTP_DSTADDRV6: c_int = 8; + +pub const SCTP_UNORDERED: c_int = 1 << 0; +pub const SCTP_ADDR_OVER: c_int = 1 << 1; +pub const SCTP_ABORT: c_int = 1 << 2; +pub const SCTP_SACK_IMMEDIATELY: c_int = 1 << 3; +pub const SCTP_SENDALL: c_int = 1 << 6; +pub const SCTP_PR_SCTP_ALL: c_int = 1 << 7; +pub const SCTP_NOTIFICATION: c_int = MSG_NOTIFICATION; +pub const SCTP_EOF: c_int = crate::MSG_FIN; /* DCCP socket options */ -pub const DCCP_SOCKOPT_PACKET_SIZE: ::c_int = 1; -pub const DCCP_SOCKOPT_SERVICE: ::c_int = 2; -pub const DCCP_SOCKOPT_CHANGE_L: ::c_int = 3; -pub const DCCP_SOCKOPT_CHANGE_R: ::c_int = 4; -pub const DCCP_SOCKOPT_GET_CUR_MPS: ::c_int = 5; -pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: ::c_int = 6; -pub const DCCP_SOCKOPT_SEND_CSCOV: ::c_int = 10; -pub const DCCP_SOCKOPT_RECV_CSCOV: ::c_int = 11; -pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: ::c_int = 12; -pub const DCCP_SOCKOPT_CCID: ::c_int = 13; -pub const DCCP_SOCKOPT_TX_CCID: ::c_int = 14; -pub const DCCP_SOCKOPT_RX_CCID: ::c_int = 15; -pub const DCCP_SOCKOPT_QPOLICY_ID: ::c_int = 16; -pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: ::c_int = 17; -pub const DCCP_SOCKOPT_CCID_RX_INFO: ::c_int = 128; -pub const DCCP_SOCKOPT_CCID_TX_INFO: ::c_int = 192; +pub const DCCP_SOCKOPT_PACKET_SIZE: c_int = 1; +pub const DCCP_SOCKOPT_SERVICE: c_int = 2; +pub const DCCP_SOCKOPT_CHANGE_L: c_int = 3; +pub const DCCP_SOCKOPT_CHANGE_R: c_int = 4; +pub const DCCP_SOCKOPT_GET_CUR_MPS: c_int = 5; +pub const DCCP_SOCKOPT_SERVER_TIMEWAIT: c_int = 6; +pub const DCCP_SOCKOPT_SEND_CSCOV: c_int = 10; +pub const DCCP_SOCKOPT_RECV_CSCOV: c_int = 11; +pub const DCCP_SOCKOPT_AVAILABLE_CCIDS: c_int = 12; +pub const DCCP_SOCKOPT_CCID: c_int = 13; +pub const DCCP_SOCKOPT_TX_CCID: c_int = 14; +pub const DCCP_SOCKOPT_RX_CCID: c_int = 15; +pub const DCCP_SOCKOPT_QPOLICY_ID: c_int = 16; +pub const DCCP_SOCKOPT_QPOLICY_TXQLEN: c_int = 17; +pub const DCCP_SOCKOPT_CCID_RX_INFO: c_int = 128; +pub const DCCP_SOCKOPT_CCID_TX_INFO: c_int = 192; /// maximum number of services provided on the same listening port -pub const DCCP_SERVICE_LIST_MAX_LEN: ::c_int = 32; - -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_NET: ::c_int = 3; -pub const CTL_FS: ::c_int = 5; -pub const CTL_DEBUG: ::c_int = 6; -pub const CTL_DEV: ::c_int = 7; -pub const CTL_BUS: ::c_int = 8; -pub const CTL_ABI: ::c_int = 9; -pub const CTL_CPU: ::c_int = 10; - -pub const CTL_BUS_ISA: ::c_int = 1; - -pub const INOTIFY_MAX_USER_INSTANCES: ::c_int = 1; -pub const INOTIFY_MAX_USER_WATCHES: ::c_int = 2; -pub const INOTIFY_MAX_QUEUED_EVENTS: ::c_int = 3; - -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_SECUREMASK: ::c_int = 5; -pub const KERN_PROF: ::c_int = 6; -pub const KERN_NODENAME: ::c_int = 7; -pub const KERN_DOMAINNAME: ::c_int = 8; -pub const KERN_PANIC: ::c_int = 15; -pub const KERN_REALROOTDEV: ::c_int = 16; -pub const KERN_SPARC_REBOOT: ::c_int = 21; -pub const KERN_CTLALTDEL: ::c_int = 22; -pub const KERN_PRINTK: ::c_int = 23; -pub const KERN_NAMETRANS: ::c_int = 24; -pub const KERN_PPC_HTABRECLAIM: ::c_int = 25; -pub const KERN_PPC_ZEROPAGED: ::c_int = 26; -pub const KERN_PPC_POWERSAVE_NAP: ::c_int = 27; -pub const KERN_MODPROBE: ::c_int = 28; -pub const KERN_SG_BIG_BUFF: ::c_int = 29; -pub const KERN_ACCT: ::c_int = 30; -pub const KERN_PPC_L2CR: ::c_int = 31; -pub const KERN_RTSIGNR: ::c_int = 32; -pub const KERN_RTSIGMAX: ::c_int = 33; -pub const KERN_SHMMAX: ::c_int = 34; -pub const KERN_MSGMAX: ::c_int = 35; -pub const KERN_MSGMNB: ::c_int = 36; -pub const KERN_MSGPOOL: ::c_int = 37; -pub const KERN_SYSRQ: ::c_int = 38; -pub const KERN_MAX_THREADS: ::c_int = 39; -pub const KERN_RANDOM: ::c_int = 40; -pub const KERN_SHMALL: ::c_int = 41; -pub const KERN_MSGMNI: ::c_int = 42; -pub const KERN_SEM: ::c_int = 43; -pub const KERN_SPARC_STOP_A: ::c_int = 44; -pub const KERN_SHMMNI: ::c_int = 45; -pub const KERN_OVERFLOWUID: ::c_int = 46; -pub const KERN_OVERFLOWGID: ::c_int = 47; -pub const KERN_SHMPATH: ::c_int = 48; -pub const KERN_HOTPLUG: ::c_int = 49; -pub const KERN_IEEE_EMULATION_WARNINGS: ::c_int = 50; -pub const KERN_S390_USER_DEBUG_LOGGING: ::c_int = 51; -pub const KERN_CORE_USES_PID: ::c_int = 52; -pub const KERN_TAINTED: ::c_int = 53; -pub const KERN_CADPID: ::c_int = 54; -pub const KERN_PIDMAX: ::c_int = 55; -pub const KERN_CORE_PATTERN: ::c_int = 56; -pub const KERN_PANIC_ON_OOPS: ::c_int = 57; -pub const KERN_HPPA_PWRSW: ::c_int = 58; -pub const KERN_HPPA_UNALIGNED: ::c_int = 59; -pub const KERN_PRINTK_RATELIMIT: ::c_int = 60; -pub const KERN_PRINTK_RATELIMIT_BURST: ::c_int = 61; -pub const KERN_PTY: ::c_int = 62; -pub const KERN_NGROUPS_MAX: ::c_int = 63; -pub const KERN_SPARC_SCONS_PWROFF: ::c_int = 64; -pub const KERN_HZ_TIMER: ::c_int = 65; -pub const KERN_UNKNOWN_NMI_PANIC: ::c_int = 66; -pub const KERN_BOOTLOADER_TYPE: ::c_int = 67; -pub const KERN_RANDOMIZE: ::c_int = 68; -pub const KERN_SETUID_DUMPABLE: ::c_int = 69; -pub const KERN_SPIN_RETRY: ::c_int = 70; -pub const KERN_ACPI_VIDEO_FLAGS: ::c_int = 71; -pub const KERN_IA64_UNALIGNED: ::c_int = 72; -pub const KERN_COMPAT_LOG: ::c_int = 73; -pub const KERN_MAX_LOCK_DEPTH: ::c_int = 74; -pub const KERN_NMI_WATCHDOG: ::c_int = 75; -pub const KERN_PANIC_ON_NMI: ::c_int = 76; - -pub const VM_OVERCOMMIT_MEMORY: ::c_int = 5; -pub const VM_PAGE_CLUSTER: ::c_int = 10; -pub const VM_DIRTY_BACKGROUND: ::c_int = 11; -pub const VM_DIRTY_RATIO: ::c_int = 12; -pub const VM_DIRTY_WB_CS: ::c_int = 13; -pub const VM_DIRTY_EXPIRE_CS: ::c_int = 14; -pub const VM_NR_PDFLUSH_THREADS: ::c_int = 15; -pub const VM_OVERCOMMIT_RATIO: ::c_int = 16; -pub const VM_PAGEBUF: ::c_int = 17; -pub const VM_HUGETLB_PAGES: ::c_int = 18; -pub const VM_SWAPPINESS: ::c_int = 19; -pub const VM_LOWMEM_RESERVE_RATIO: ::c_int = 20; -pub const VM_MIN_FREE_KBYTES: ::c_int = 21; -pub const VM_MAX_MAP_COUNT: ::c_int = 22; -pub const VM_LAPTOP_MODE: ::c_int = 23; -pub const VM_BLOCK_DUMP: ::c_int = 24; -pub const VM_HUGETLB_GROUP: ::c_int = 25; -pub const VM_VFS_CACHE_PRESSURE: ::c_int = 26; -pub const VM_LEGACY_VA_LAYOUT: ::c_int = 27; -pub const VM_SWAP_TOKEN_TIMEOUT: ::c_int = 28; -pub const VM_DROP_PAGECACHE: ::c_int = 29; -pub const VM_PERCPU_PAGELIST_FRACTION: ::c_int = 30; -pub const VM_ZONE_RECLAIM_MODE: ::c_int = 31; -pub const VM_MIN_UNMAPPED: ::c_int = 32; -pub const VM_PANIC_ON_OOM: ::c_int = 33; -pub const VM_VDSO_ENABLED: ::c_int = 34; -pub const VM_MIN_SLAB: ::c_int = 35; - -pub const NET_CORE: ::c_int = 1; -pub const NET_ETHER: ::c_int = 2; -pub const NET_802: ::c_int = 3; -pub const NET_UNIX: ::c_int = 4; -pub const NET_IPV4: ::c_int = 5; -pub const NET_IPX: ::c_int = 6; -pub const NET_ATALK: ::c_int = 7; -pub const NET_NETROM: ::c_int = 8; -pub const NET_AX25: ::c_int = 9; -pub const NET_BRIDGE: ::c_int = 10; -pub const NET_ROSE: ::c_int = 11; -pub const NET_IPV6: ::c_int = 12; -pub const NET_X25: ::c_int = 13; -pub const NET_TR: ::c_int = 14; -pub const NET_DECNET: ::c_int = 15; -pub const NET_ECONET: ::c_int = 16; -pub const NET_SCTP: ::c_int = 17; -pub const NET_LLC: ::c_int = 18; -pub const NET_NETFILTER: ::c_int = 19; -pub const NET_DCCP: ::c_int = 20; -pub const NET_IRDA: ::c_int = 412; +pub const DCCP_SERVICE_LIST_MAX_LEN: c_int = 32; + +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_NET: c_int = 3; +pub const CTL_FS: c_int = 5; +pub const CTL_DEBUG: c_int = 6; +pub const CTL_DEV: c_int = 7; +pub const CTL_BUS: c_int = 8; +pub const CTL_ABI: c_int = 9; +pub const CTL_CPU: c_int = 10; + +pub const CTL_BUS_ISA: c_int = 1; + +pub const INOTIFY_MAX_USER_INSTANCES: c_int = 1; +pub const INOTIFY_MAX_USER_WATCHES: c_int = 2; +pub const INOTIFY_MAX_QUEUED_EVENTS: c_int = 3; + +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_VERSION: c_int = 4; +pub const KERN_SECUREMASK: c_int = 5; +pub const KERN_PROF: c_int = 6; +pub const KERN_NODENAME: c_int = 7; +pub const KERN_DOMAINNAME: c_int = 8; +pub const KERN_PANIC: c_int = 15; +pub const KERN_REALROOTDEV: c_int = 16; +pub const KERN_SPARC_REBOOT: c_int = 21; +pub const KERN_CTLALTDEL: c_int = 22; +pub const KERN_PRINTK: c_int = 23; +pub const KERN_NAMETRANS: c_int = 24; +pub const KERN_PPC_HTABRECLAIM: c_int = 25; +pub const KERN_PPC_ZEROPAGED: c_int = 26; +pub const KERN_PPC_POWERSAVE_NAP: c_int = 27; +pub const KERN_MODPROBE: c_int = 28; +pub const KERN_SG_BIG_BUFF: c_int = 29; +pub const KERN_ACCT: c_int = 30; +pub const KERN_PPC_L2CR: c_int = 31; +pub const KERN_RTSIGNR: c_int = 32; +pub const KERN_RTSIGMAX: c_int = 33; +pub const KERN_SHMMAX: c_int = 34; +pub const KERN_MSGMAX: c_int = 35; +pub const KERN_MSGMNB: c_int = 36; +pub const KERN_MSGPOOL: c_int = 37; +pub const KERN_SYSRQ: c_int = 38; +pub const KERN_MAX_THREADS: c_int = 39; +pub const KERN_RANDOM: c_int = 40; +pub const KERN_SHMALL: c_int = 41; +pub const KERN_MSGMNI: c_int = 42; +pub const KERN_SEM: c_int = 43; +pub const KERN_SPARC_STOP_A: c_int = 44; +pub const KERN_SHMMNI: c_int = 45; +pub const KERN_OVERFLOWUID: c_int = 46; +pub const KERN_OVERFLOWGID: c_int = 47; +pub const KERN_SHMPATH: c_int = 48; +pub const KERN_HOTPLUG: c_int = 49; +pub const KERN_IEEE_EMULATION_WARNINGS: c_int = 50; +pub const KERN_S390_USER_DEBUG_LOGGING: c_int = 51; +pub const KERN_CORE_USES_PID: c_int = 52; +pub const KERN_TAINTED: c_int = 53; +pub const KERN_CADPID: c_int = 54; +pub const KERN_PIDMAX: c_int = 55; +pub const KERN_CORE_PATTERN: c_int = 56; +pub const KERN_PANIC_ON_OOPS: c_int = 57; +pub const KERN_HPPA_PWRSW: c_int = 58; +pub const KERN_HPPA_UNALIGNED: c_int = 59; +pub const KERN_PRINTK_RATELIMIT: c_int = 60; +pub const KERN_PRINTK_RATELIMIT_BURST: c_int = 61; +pub const KERN_PTY: c_int = 62; +pub const KERN_NGROUPS_MAX: c_int = 63; +pub const KERN_SPARC_SCONS_PWROFF: c_int = 64; +pub const KERN_HZ_TIMER: c_int = 65; +pub const KERN_UNKNOWN_NMI_PANIC: c_int = 66; +pub const KERN_BOOTLOADER_TYPE: c_int = 67; +pub const KERN_RANDOMIZE: c_int = 68; +pub const KERN_SETUID_DUMPABLE: c_int = 69; +pub const KERN_SPIN_RETRY: c_int = 70; +pub const KERN_ACPI_VIDEO_FLAGS: c_int = 71; +pub const KERN_IA64_UNALIGNED: c_int = 72; +pub const KERN_COMPAT_LOG: c_int = 73; +pub const KERN_MAX_LOCK_DEPTH: c_int = 74; +pub const KERN_NMI_WATCHDOG: c_int = 75; +pub const KERN_PANIC_ON_NMI: c_int = 76; + +pub const VM_OVERCOMMIT_MEMORY: c_int = 5; +pub const VM_PAGE_CLUSTER: c_int = 10; +pub const VM_DIRTY_BACKGROUND: c_int = 11; +pub const VM_DIRTY_RATIO: c_int = 12; +pub const VM_DIRTY_WB_CS: c_int = 13; +pub const VM_DIRTY_EXPIRE_CS: c_int = 14; +pub const VM_NR_PDFLUSH_THREADS: c_int = 15; +pub const VM_OVERCOMMIT_RATIO: c_int = 16; +pub const VM_PAGEBUF: c_int = 17; +pub const VM_HUGETLB_PAGES: c_int = 18; +pub const VM_SWAPPINESS: c_int = 19; +pub const VM_LOWMEM_RESERVE_RATIO: c_int = 20; +pub const VM_MIN_FREE_KBYTES: c_int = 21; +pub const VM_MAX_MAP_COUNT: c_int = 22; +pub const VM_LAPTOP_MODE: c_int = 23; +pub const VM_BLOCK_DUMP: c_int = 24; +pub const VM_HUGETLB_GROUP: c_int = 25; +pub const VM_VFS_CACHE_PRESSURE: c_int = 26; +pub const VM_LEGACY_VA_LAYOUT: c_int = 27; +pub const VM_SWAP_TOKEN_TIMEOUT: c_int = 28; +pub const VM_DROP_PAGECACHE: c_int = 29; +pub const VM_PERCPU_PAGELIST_FRACTION: c_int = 30; +pub const VM_ZONE_RECLAIM_MODE: c_int = 31; +pub const VM_MIN_UNMAPPED: c_int = 32; +pub const VM_PANIC_ON_OOM: c_int = 33; +pub const VM_VDSO_ENABLED: c_int = 34; +pub const VM_MIN_SLAB: c_int = 35; + +pub const NET_CORE: c_int = 1; +pub const NET_ETHER: c_int = 2; +pub const NET_802: c_int = 3; +pub const NET_UNIX: c_int = 4; +pub const NET_IPV4: c_int = 5; +pub const NET_IPX: c_int = 6; +pub const NET_ATALK: c_int = 7; +pub const NET_NETROM: c_int = 8; +pub const NET_AX25: c_int = 9; +pub const NET_BRIDGE: c_int = 10; +pub const NET_ROSE: c_int = 11; +pub const NET_IPV6: c_int = 12; +pub const NET_X25: c_int = 13; +pub const NET_TR: c_int = 14; +pub const NET_DECNET: c_int = 15; +pub const NET_ECONET: c_int = 16; +pub const NET_SCTP: c_int = 17; +pub const NET_LLC: c_int = 18; +pub const NET_NETFILTER: c_int = 19; +pub const NET_DCCP: c_int = 20; +pub const NET_IRDA: c_int = 412; // include/linux/sched.h -pub const PF_VCPU: ::c_int = 0x00000001; -pub const PF_IDLE: ::c_int = 0x00000002; -pub const PF_EXITING: ::c_int = 0x00000004; -pub const PF_POSTCOREDUMP: ::c_int = 0x00000008; -pub const PF_IO_WORKER: ::c_int = 0x00000010; -pub const PF_WQ_WORKER: ::c_int = 0x00000020; -pub const PF_FORKNOEXEC: ::c_int = 0x00000040; -pub const PF_MCE_PROCESS: ::c_int = 0x00000080; -pub const PF_SUPERPRIV: ::c_int = 0x00000100; -pub const PF_DUMPCORE: ::c_int = 0x00000200; -pub const PF_SIGNALED: ::c_int = 0x00000400; -pub const PF_MEMALLOC: ::c_int = 0x00000800; -pub const PF_NPROC_EXCEEDED: ::c_int = 0x00001000; -pub const PF_USED_MATH: ::c_int = 0x00002000; -pub const PF_USER_WORKER: ::c_int = 0x00004000; -pub const PF_NOFREEZE: ::c_int = 0x00008000; -pub const PF_KSWAPD: ::c_int = 0x00020000; -pub const PF_MEMALLOC_NOFS: ::c_int = 0x00040000; -pub const PF_MEMALLOC_NOIO: ::c_int = 0x00080000; -pub const PF_LOCAL_THROTTLE: ::c_int = 0x00100000; -pub const PF_KTHREAD: ::c_int = 0x00200000; -pub const PF_RANDOMIZE: ::c_int = 0x00400000; -pub const PF_NO_SETAFFINITY: ::c_int = 0x04000000; -pub const PF_MCE_EARLY: ::c_int = 0x08000000; -pub const PF_MEMALLOC_PIN: ::c_int = 0x10000000; - -pub const CSIGNAL: ::c_int = 0x000000ff; - -pub const SCHED_NORMAL: ::c_int = 0; -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_BATCH: ::c_int = 3; -pub const SCHED_IDLE: ::c_int = 5; -pub const SCHED_DEADLINE: ::c_int = 6; - -pub const SCHED_RESET_ON_FORK: ::c_int = 0x40000000; - -pub const CLONE_PIDFD: ::c_int = 0x1000; - -pub const SCHED_FLAG_RESET_ON_FORK: ::c_int = 0x01; -pub const SCHED_FLAG_RECLAIM: ::c_int = 0x02; -pub const SCHED_FLAG_DL_OVERRUN: ::c_int = 0x04; -pub const SCHED_FLAG_KEEP_POLICY: ::c_int = 0x08; -pub const SCHED_FLAG_KEEP_PARAMS: ::c_int = 0x10; -pub const SCHED_FLAG_UTIL_CLAMP_MIN: ::c_int = 0x20; -pub const SCHED_FLAG_UTIL_CLAMP_MAX: ::c_int = 0x40; +pub const PF_VCPU: c_int = 0x00000001; +pub const PF_IDLE: c_int = 0x00000002; +pub const PF_EXITING: c_int = 0x00000004; +pub const PF_POSTCOREDUMP: c_int = 0x00000008; +pub const PF_IO_WORKER: c_int = 0x00000010; +pub const PF_WQ_WORKER: c_int = 0x00000020; +pub const PF_FORKNOEXEC: c_int = 0x00000040; +pub const PF_MCE_PROCESS: c_int = 0x00000080; +pub const PF_SUPERPRIV: c_int = 0x00000100; +pub const PF_DUMPCORE: c_int = 0x00000200; +pub const PF_SIGNALED: c_int = 0x00000400; +pub const PF_MEMALLOC: c_int = 0x00000800; +pub const PF_NPROC_EXCEEDED: c_int = 0x00001000; +pub const PF_USED_MATH: c_int = 0x00002000; +pub const PF_USER_WORKER: c_int = 0x00004000; +pub const PF_NOFREEZE: c_int = 0x00008000; +pub const PF_KSWAPD: c_int = 0x00020000; +pub const PF_MEMALLOC_NOFS: c_int = 0x00040000; +pub const PF_MEMALLOC_NOIO: c_int = 0x00080000; +pub const PF_LOCAL_THROTTLE: c_int = 0x00100000; +pub const PF_KTHREAD: c_int = 0x00200000; +pub const PF_RANDOMIZE: c_int = 0x00400000; +pub const PF_NO_SETAFFINITY: c_int = 0x04000000; +pub const PF_MCE_EARLY: c_int = 0x08000000; +pub const PF_MEMALLOC_PIN: c_int = 0x10000000; + +pub const CSIGNAL: c_int = 0x000000ff; + +pub const SCHED_NORMAL: c_int = 0; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; +pub const SCHED_BATCH: c_int = 3; +pub const SCHED_IDLE: c_int = 5; +pub const SCHED_DEADLINE: c_int = 6; + +pub const SCHED_RESET_ON_FORK: c_int = 0x40000000; + +pub const CLONE_PIDFD: c_int = 0x1000; + +pub const SCHED_FLAG_RESET_ON_FORK: c_int = 0x01; +pub const SCHED_FLAG_RECLAIM: c_int = 0x02; +pub const SCHED_FLAG_DL_OVERRUN: c_int = 0x04; +pub const SCHED_FLAG_KEEP_POLICY: c_int = 0x08; +pub const SCHED_FLAG_KEEP_PARAMS: c_int = 0x10; +pub const SCHED_FLAG_UTIL_CLAMP_MIN: c_int = 0x20; +pub const SCHED_FLAG_UTIL_CLAMP_MAX: c_int = 0x40; // linux/if_xdp.h -pub const XDP_UMEM_TX_SW_CSUM: ::__u32 = 1 << 1; -pub const XDP_UMEM_TX_METADATA_LEN: ::__u32 = 1 << 2; +pub const XDP_UMEM_TX_SW_CSUM: __u32 = 1 << 1; +pub const XDP_UMEM_TX_METADATA_LEN: __u32 = 1 << 2; -pub const XDP_TXMD_FLAGS_TIMESTAMP: ::__u32 = 1 << 0; -pub const XDP_TXMD_FLAGS_CHECKSUM: ::__u32 = 1 << 1; +pub const XDP_TXMD_FLAGS_TIMESTAMP: __u32 = 1 << 0; +pub const XDP_TXMD_FLAGS_CHECKSUM: __u32 = 1 << 1; -pub const XDP_TX_METADATA: ::__u32 = 1 << 1; +pub const XDP_TX_METADATA: __u32 = 1 << 1; // linux/mount.h -pub const MOUNT_ATTR_RDONLY: ::__u64 = 0x00000001; -pub const MOUNT_ATTR_NOSUID: ::__u64 = 0x00000002; -pub const MOUNT_ATTR_NODEV: ::__u64 = 0x00000004; -pub const MOUNT_ATTR_NOEXEC: ::__u64 = 0x00000008; -pub const MOUNT_ATTR__ATIME: ::__u64 = 0x00000070; -pub const MOUNT_ATTR_RELATIME: ::__u64 = 0x00000000; -pub const MOUNT_ATTR_NOATIME: ::__u64 = 0x00000010; -pub const MOUNT_ATTR_STRICTATIME: ::__u64 = 0x00000020; -pub const MOUNT_ATTR_NODIRATIME: ::__u64 = 0x00000080; -pub const MOUNT_ATTR_IDMAP: ::__u64 = 0x00100000; -pub const MOUNT_ATTR_NOSYMFOLLOW: ::__u64 = 0x00200000; - -pub const MOUNT_ATTR_SIZE_VER0: ::c_int = 32; +pub const MOUNT_ATTR_RDONLY: crate::__u64 = 0x00000001; +pub const MOUNT_ATTR_NOSUID: crate::__u64 = 0x00000002; +pub const MOUNT_ATTR_NODEV: crate::__u64 = 0x00000004; +pub const MOUNT_ATTR_NOEXEC: crate::__u64 = 0x00000008; +pub const MOUNT_ATTR__ATIME: crate::__u64 = 0x00000070; +pub const MOUNT_ATTR_RELATIME: crate::__u64 = 0x00000000; +pub const MOUNT_ATTR_NOATIME: crate::__u64 = 0x00000010; +pub const MOUNT_ATTR_STRICTATIME: crate::__u64 = 0x00000020; +pub const MOUNT_ATTR_NODIRATIME: crate::__u64 = 0x00000080; +pub const MOUNT_ATTR_IDMAP: crate::__u64 = 0x00100000; +pub const MOUNT_ATTR_NOSYMFOLLOW: crate::__u64 = 0x00200000; + +pub const MOUNT_ATTR_SIZE_VER0: c_int = 32; // elf.h -pub const NT_PRSTATUS: ::c_int = 1; -pub const NT_PRFPREG: ::c_int = 2; -pub const NT_FPREGSET: ::c_int = 2; -pub const NT_PRPSINFO: ::c_int = 3; -pub const NT_PRXREG: ::c_int = 4; -pub const NT_TASKSTRUCT: ::c_int = 4; -pub const NT_PLATFORM: ::c_int = 5; -pub const NT_AUXV: ::c_int = 6; -pub const NT_GWINDOWS: ::c_int = 7; -pub const NT_ASRS: ::c_int = 8; -pub const NT_PSTATUS: ::c_int = 10; -pub const NT_PSINFO: ::c_int = 13; -pub const NT_PRCRED: ::c_int = 14; -pub const NT_UTSNAME: ::c_int = 15; -pub const NT_LWPSTATUS: ::c_int = 16; -pub const NT_LWPSINFO: ::c_int = 17; -pub const NT_PRFPXREG: ::c_int = 20; - -pub const SCHED_FLAG_KEEP_ALL: ::c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS; - -pub const SCHED_FLAG_UTIL_CLAMP: ::c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX; - -pub const SCHED_FLAG_ALL: ::c_int = SCHED_FLAG_RESET_ON_FORK +pub const NT_PRSTATUS: c_int = 1; +pub const NT_PRFPREG: c_int = 2; +pub const NT_FPREGSET: c_int = 2; +pub const NT_PRPSINFO: c_int = 3; +pub const NT_PRXREG: c_int = 4; +pub const NT_TASKSTRUCT: c_int = 4; +pub const NT_PLATFORM: c_int = 5; +pub const NT_AUXV: c_int = 6; +pub const NT_GWINDOWS: c_int = 7; +pub const NT_ASRS: c_int = 8; +pub const NT_PSTATUS: c_int = 10; +pub const NT_PSINFO: c_int = 13; +pub const NT_PRCRED: c_int = 14; +pub const NT_UTSNAME: c_int = 15; +pub const NT_LWPSTATUS: c_int = 16; +pub const NT_LWPSINFO: c_int = 17; +pub const NT_PRFPXREG: c_int = 20; + +pub const SCHED_FLAG_KEEP_ALL: c_int = SCHED_FLAG_KEEP_POLICY | SCHED_FLAG_KEEP_PARAMS; + +pub const SCHED_FLAG_UTIL_CLAMP: c_int = SCHED_FLAG_UTIL_CLAMP_MIN | SCHED_FLAG_UTIL_CLAMP_MAX; + +pub const SCHED_FLAG_ALL: c_int = SCHED_FLAG_RESET_ON_FORK | SCHED_FLAG_RECLAIM | SCHED_FLAG_DL_OVERRUN | SCHED_FLAG_KEEP_ALL | SCHED_FLAG_UTIL_CLAMP; // ioctl_eventpoll: added in Linux 6.9 -pub const EPIOCSPARAMS: ::Ioctl = 0x40088a01; -pub const EPIOCGPARAMS: ::Ioctl = 0x80088a02; +pub const EPIOCSPARAMS: Ioctl = 0x40088a01; +pub const EPIOCGPARAMS: Ioctl = 0x80088a02; const _IOC_NRBITS: u32 = 8; const _IOC_TYPEBITS: u32 = 8; @@ -5774,7 +5778,7 @@ pub(crate) const fn _IOWR(ty: u32, nr: u32) -> u32 { } f! { - pub fn NLA_ALIGN(len: ::c_int) -> ::c_int { + pub fn NLA_ALIGN(len: c_int) -> c_int { return ((len) + NLA_ALIGNTO - 1) & !(NLA_ALIGNTO - 1); } @@ -5793,10 +5797,10 @@ f! { } } - pub fn CPU_ALLOC_SIZE(count: ::c_int) -> ::size_t { - let _dummy: cpu_set_t = ::mem::zeroed(); - let size_in_bits = 8 * ::mem::size_of_val(&_dummy.bits[0]); - ((count as ::size_t + size_in_bits - 1) / 8) as ::size_t + pub fn CPU_ALLOC_SIZE(count: c_int) -> size_t { + let _dummy: cpu_set_t = crate::mem::zeroed(); + let size_in_bits = 8 * crate::mem::size_of_val(&_dummy.bits[0]); + ((count as size_t + size_in_bits - 1) / 8) as size_t } pub fn CPU_ZERO(cpuset: &mut cpu_set_t) -> () { @@ -5806,35 +5810,35 @@ f! { } pub fn CPU_SET(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] |= 1 << offset; () } pub fn CPU_CLR(cpu: usize, cpuset: &mut cpu_set_t) -> () { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); // 32, 64 etc let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); cpuset.bits[idx] &= !(1 << offset); () } pub fn CPU_ISSET(cpu: usize, cpuset: &cpu_set_t) -> bool { - let size_in_bits = 8 * ::mem::size_of_val(&cpuset.bits[0]); + let size_in_bits = 8 * crate::mem::size_of_val(&cpuset.bits[0]); let (idx, offset) = (cpu / size_in_bits, cpu % size_in_bits); 0 != (cpuset.bits[idx] & (1 << offset)) } - pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> ::c_int { + pub fn CPU_COUNT_S(size: usize, cpuset: &cpu_set_t) -> c_int { let mut s: u32 = 0; - let size_of_mask = ::mem::size_of_val(&cpuset.bits[0]); + let size_of_mask = crate::mem::size_of_val(&cpuset.bits[0]); for i in cpuset.bits[..(size / size_of_mask)].iter() { s += i.count_ones(); } - s as ::c_int + s as c_int } - pub fn CPU_COUNT(cpuset: &cpu_set_t) -> ::c_int { + pub fn CPU_COUNT(cpuset: &cpu_set_t) -> c_int { CPU_COUNT_S(size_of::(), cpuset) } @@ -5842,32 +5846,32 @@ f! { set1.bits == set2.bits } - pub fn SCTP_PR_INDEX(policy: ::c_int) -> ::c_int { + pub fn SCTP_PR_INDEX(policy: c_int) -> c_int { policy >> 4 - 1 } - pub fn SCTP_PR_POLICY(policy: ::c_int) -> ::c_int { + pub fn SCTP_PR_POLICY(policy: c_int) -> c_int { policy & SCTP_PR_SCTP_MASK } - pub fn SCTP_PR_SET_POLICY(flags: &mut ::c_int, policy: ::c_int) -> () { + pub fn SCTP_PR_SET_POLICY(flags: &mut c_int, policy: c_int) -> () { *flags &= !SCTP_PR_SCTP_MASK; *flags |= policy; () } - pub fn major(dev: ::dev_t) -> ::c_uint { + pub fn major(dev: crate::dev_t) -> c_uint { let mut major = 0; major |= (dev & 0x00000000000fff00) >> 8; major |= (dev & 0xfffff00000000000) >> 32; - major as ::c_uint + major as c_uint } - pub fn minor(dev: ::dev_t) -> ::c_uint { + pub fn minor(dev: crate::dev_t) -> c_uint { let mut minor = 0; minor |= (dev & 0x00000000000000ff) >> 0; minor |= (dev & 0x00000ffffff00000) >> 12; - minor as ::c_uint + minor as c_uint } pub fn IPTOS_TOS(tos: u8) -> u8 { @@ -5879,7 +5883,7 @@ f! { } pub fn RT_TOS(tos: u8) -> u8 { - tos & ::IPTOS_TOS_MASK + tos & crate::IPTOS_TOS_MASK } pub fn RT_ADDRCLASS(flags: u32) -> u32 { @@ -5890,23 +5894,23 @@ f! { (flags & RTF_ADDRCLASSMASK) == (RTF_LOCAL | RTF_INTERFACE) } - pub fn SO_EE_OFFENDER(ee: *const ::sock_extended_err) -> *mut ::sockaddr { - ee.offset(1) as *mut ::sockaddr + pub fn SO_EE_OFFENDER(ee: *const crate::sock_extended_err) -> *mut crate::sockaddr { + ee.offset(1) as *mut crate::sockaddr } pub fn TPACKET_ALIGN(x: usize) -> usize { (x + TPACKET_ALIGNMENT - 1) & !(TPACKET_ALIGNMENT - 1) } - pub fn BPF_RVAL(code: ::__u32) -> ::__u32 { + pub fn BPF_RVAL(code: __u32) -> __u32 { code & 0x18 } - pub fn BPF_MISCOP(code: ::__u32) -> ::__u32 { + pub fn BPF_MISCOP(code: __u32) -> __u32 { code & 0xf8 } - pub fn BPF_STMT(code: ::__u16, k: ::__u32) -> sock_filter { + pub fn BPF_STMT(code: __u16, k: __u32) -> sock_filter { sock_filter { code: code, jt: 0, @@ -5915,7 +5919,7 @@ f! { } } - pub fn BPF_JUMP(code: ::__u16, k: ::__u32, jt: ::__u8, jf: ::__u8) -> sock_filter { + pub fn BPF_JUMP(code: __u16, k: __u32, jt: __u8, jf: __u8) -> sock_filter { sock_filter { code: code, jt: jt, @@ -5950,9 +5954,9 @@ f! { } safe_f! { - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - let major = major as ::dev_t; - let minor = minor as ::dev_t; + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + let major = major as crate::dev_t; + let minor = minor as crate::dev_t; let mut dev = 0; dev |= (major & 0x00000fff) << 8; dev |= (major & 0xfffff000) << 32; @@ -5961,15 +5965,15 @@ safe_f! { dev } - pub {const} fn SCTP_PR_TTL_ENABLED(policy: ::c_int) -> bool { + pub {const} fn SCTP_PR_TTL_ENABLED(policy: c_int) -> bool { policy == SCTP_PR_SCTP_TTL } - pub {const} fn SCTP_PR_RTX_ENABLED(policy: ::c_int) -> bool { + pub {const} fn SCTP_PR_RTX_ENABLED(policy: c_int) -> bool { policy == SCTP_PR_SCTP_RTX } - pub {const} fn SCTP_PR_PRIO_ENABLED(policy: ::c_int) -> bool { + pub {const} fn SCTP_PR_PRIO_ENABLED(policy: c_int) -> bool { policy == SCTP_PR_SCTP_PRIO } } @@ -5977,23 +5981,23 @@ safe_f! { cfg_if! { if #[cfg(all(not(target_env = "uclibc"), not(target_env = "ohos")))] { extern "C" { - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, - sevp: *mut ::sigevent, - ) -> ::c_int; + nitems: c_int, + sevp: *mut crate::sigevent, + ) -> c_int; } } } @@ -6002,44 +6006,44 @@ cfg_if! { if #[cfg(not(target_env = "uclibc"))] { extern "C" { pub fn pwritev( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + ) -> ssize_t; pub fn preadv( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + ) -> ssize_t; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; + pub fn getloadavg(loadavg: *mut c_double, nelem: c_int) -> c_int; pub fn process_vm_readv( - pid: ::pid_t, - local_iov: *const ::iovec, - liovcnt: ::c_ulong, - remote_iov: *const ::iovec, - riovcnt: ::c_ulong, - flags: ::c_ulong, + pid: crate::pid_t, + local_iov: *const crate::iovec, + liovcnt: c_ulong, + remote_iov: *const crate::iovec, + riovcnt: c_ulong, + flags: c_ulong, ) -> isize; pub fn process_vm_writev( - pid: ::pid_t, - local_iov: *const ::iovec, - liovcnt: ::c_ulong, - remote_iov: *const ::iovec, - riovcnt: ::c_ulong, - flags: ::c_ulong, + pid: crate::pid_t, + local_iov: *const crate::iovec, + liovcnt: c_ulong, + remote_iov: *const crate::iovec, + riovcnt: c_ulong, + flags: c_ulong, ) -> isize; - pub fn futimes(fd: ::c_int, times: *const ::timeval) -> ::c_int; + pub fn futimes(fd: c_int, times: *const crate::timeval) -> c_int; } } } @@ -6052,59 +6056,59 @@ cfg_if! { // functions from `shadow.h`. // https://git.musl-libc.org/cgit/musl/tree/include/shadow.h pub fn getspnam_r( - name: *const ::c_char, + name: *const c_char, spbuf: *mut spwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, spbufp: *mut *mut spwd, - ) -> ::c_int; + ) -> c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; pub fn mq_setattr( - mqd: ::mqd_t, - newattr: *const ::mq_attr, - oldattr: *mut ::mq_attr, - ) -> ::c_int; + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; - pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; + pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> c_int; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; pub fn pthread_mutexattr_getrobust( attr: *const pthread_mutexattr_t, - robustness: *mut ::c_int, - ) -> ::c_int; + robustness: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_setrobust( attr: *mut pthread_mutexattr_t, - robustness: ::c_int, - ) -> ::c_int; + robustness: c_int, + ) -> c_int; } } } @@ -6114,650 +6118,617 @@ extern "C" { not(any(target_env = "musl", target_env = "ohos")), link_name = "__xpg_strerror_r" )] - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); - pub fn drand48() -> ::c_double; - pub fn erand48(xseed: *mut ::c_ushort) -> ::c_double; - pub fn lrand48() -> ::c_long; - pub fn nrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn mrand48() -> ::c_long; - pub fn jrand48(xseed: *mut ::c_ushort) -> ::c_long; - pub fn srand48(seed: ::c_long); - pub fn seed48(xseed: *mut ::c_ushort) -> *mut ::c_ushort; - pub fn lcong48(p: *mut ::c_ushort); + pub fn drand48() -> c_double; + pub fn erand48(xseed: *mut c_ushort) -> c_double; + pub fn lrand48() -> c_long; + pub fn nrand48(xseed: *mut c_ushort) -> c_long; + pub fn mrand48() -> c_long; + pub fn jrand48(xseed: *mut c_ushort) -> c_long; + pub fn srand48(seed: c_long); + pub fn seed48(xseed: *mut c_ushort) -> *mut c_ushort; + pub fn lcong48(p: *mut c_ushort); - pub fn lutimes(file: *const ::c_char, times: *const ::timeval) -> ::c_int; + pub fn lutimes(file: *const c_char, times: *const crate::timeval) -> c_int; pub fn setpwent(); pub fn endpwent(); pub fn getpwent() -> *mut passwd; pub fn setgrent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; pub fn setspent(); pub fn endspent(); pub fn getspent() -> *mut spwd; - pub fn getspnam(name: *const ::c_char) -> *mut spwd; + pub fn getspnam(name: *const c_char) -> *mut spwd; - pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; // System V IPC - pub fn shmget(key: ::key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; - pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t; - pub fn semget(key: ::key_t, nsems: ::c_int, semflag: ::c_int) -> ::c_int; - pub fn semop(semid: ::c_int, sops: *mut ::sembuf, nsops: ::size_t) -> ::c_int; - pub fn semctl(semid: ::c_int, semnum: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn msgctl(msqid: ::c_int, cmd: ::c_int, buf: *mut msqid_ds) -> ::c_int; - pub fn msgget(key: ::key_t, msgflg: ::c_int) -> ::c_int; + pub fn shmget(key: crate::key_t, size: size_t, shmflg: c_int) -> c_int; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; + pub fn shmdt(shmaddr: *const c_void) -> c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; + pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t; + pub fn semget(key: crate::key_t, nsems: c_int, semflag: c_int) -> c_int; + pub fn semop(semid: c_int, sops: *mut crate::sembuf, nsops: size_t) -> c_int; + pub fn semctl(semid: c_int, semnum: c_int, cmd: c_int, ...) -> c_int; + pub fn msgctl(msqid: c_int, cmd: c_int, buf: *mut msqid_ds) -> c_int; + pub fn msgget(key: crate::key_t, msgflg: c_int) -> c_int; pub fn msgrcv( - msqid: ::c_int, - msgp: *mut ::c_void, - msgsz: ::size_t, - msgtyp: ::c_long, - msgflg: ::c_int, - ) -> ::ssize_t; - pub fn msgsnd( - msqid: ::c_int, - msgp: *const ::c_void, - msgsz: ::size_t, - msgflg: ::c_int, - ) -> ::c_int; - - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn __errno_location() -> *mut ::c_int; - - pub fn fallocate(fd: ::c_int, mode: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn readahead(fd: ::c_int, offset: ::off64_t, count: ::size_t) -> ::ssize_t; + msqid: c_int, + msgp: *mut c_void, + msgsz: size_t, + msgtyp: c_long, + msgflg: c_int, + ) -> ssize_t; + pub fn msgsnd(msqid: c_int, msgp: *const c_void, msgsz: size_t, msgflg: c_int) -> c_int; + + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn __errno_location() -> *mut c_int; + + pub fn fallocate(fd: c_int, mode: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn readahead(fd: c_int, offset: off64_t, count: size_t) -> ssize_t; pub fn getxattr( path: *const c_char, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn lgetxattr( path: *const c_char, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn fgetxattr( - filedes: ::c_int, + filedes: c_int, name: *const c_char, - value: *mut ::c_void, - size: ::size_t, - ) -> ::ssize_t; + value: *mut c_void, + size: size_t, + ) -> ssize_t; pub fn setxattr( path: *const c_char, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn lsetxattr( path: *const c_char, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; pub fn fsetxattr( - filedes: ::c_int, + filedes: c_int, name: *const c_char, - value: *const ::c_void, - size: ::size_t, - flags: ::c_int, - ) -> ::c_int; - pub fn listxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn llistxattr(path: *const c_char, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn flistxattr(filedes: ::c_int, list: *mut c_char, size: ::size_t) -> ::ssize_t; - pub fn removexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn lremovexattr(path: *const c_char, name: *const c_char) -> ::c_int; - pub fn fremovexattr(filedes: ::c_int, name: *const c_char) -> ::c_int; - pub fn signalfd(fd: ::c_int, mask: *const ::sigset_t, flags: ::c_int) -> ::c_int; - pub fn timerfd_create(clockid: ::clockid_t, flags: ::c_int) -> ::c_int; - pub fn timerfd_gettime(fd: ::c_int, curr_value: *mut itimerspec) -> ::c_int; + value: *const c_void, + size: size_t, + flags: c_int, + ) -> c_int; + pub fn listxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn llistxattr(path: *const c_char, list: *mut c_char, size: size_t) -> ssize_t; + pub fn flistxattr(filedes: c_int, list: *mut c_char, size: size_t) -> ssize_t; + pub fn removexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn lremovexattr(path: *const c_char, name: *const c_char) -> c_int; + pub fn fremovexattr(filedes: c_int, name: *const c_char) -> c_int; + pub fn signalfd(fd: c_int, mask: *const crate::sigset_t, flags: c_int) -> c_int; + pub fn timerfd_create(clockid: crate::clockid_t, flags: c_int) -> c_int; + pub fn timerfd_gettime(fd: c_int, curr_value: *mut itimerspec) -> c_int; pub fn timerfd_settime( - fd: ::c_int, - flags: ::c_int, + fd: c_int, + flags: c_int, new_value: *const itimerspec, old_value: *mut itimerspec, - ) -> ::c_int; - pub fn quotactl( - cmd: ::c_int, - special: *const ::c_char, - id: ::c_int, - data: *mut ::c_char, - ) -> ::c_int; + ) -> c_int; + pub fn quotactl(cmd: c_int, special: *const c_char, id: c_int, data: *mut c_char) -> c_int; pub fn epoll_pwait( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - sigmask: *const ::sigset_t, - ) -> ::c_int; - pub fn dup3(oldfd: ::c_int, newfd: ::c_int, flags: ::c_int) -> ::c_int; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: c_int, + sigmask: *const crate::sigset_t, + ) -> c_int; + pub fn dup3(oldfd: c_int, newfd: c_int, flags: c_int) -> c_int; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; + pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char; pub fn accept4( - fd: ::c_int, - addr: *mut ::sockaddr, - len: *mut ::socklen_t, - flg: ::c_int, - ) -> ::c_int; + fd: c_int, + addr: *mut crate::sockaddr, + len: *mut crate::socklen_t, + flg: c_int, + ) -> c_int; pub fn pthread_getaffinity_np( - thread: ::pthread_t, - cpusetsize: ::size_t, - cpuset: *mut ::cpu_set_t, - ) -> ::c_int; + thread: crate::pthread_t, + cpusetsize: size_t, + cpuset: *mut crate::cpu_set_t, + ) -> c_int; pub fn pthread_setaffinity_np( - thread: ::pthread_t, - cpusetsize: ::size_t, - cpuset: *const ::cpu_set_t, - ) -> ::c_int; - pub fn pthread_setschedprio(native: ::pthread_t, priority: ::c_int) -> ::c_int; - pub fn reboot(how_to: ::c_int) -> ::c_int; - pub fn setfsgid(gid: ::gid_t) -> ::c_int; - pub fn setfsuid(uid: ::uid_t) -> ::c_int; + thread: crate::pthread_t, + cpusetsize: size_t, + cpuset: *const crate::cpu_set_t, + ) -> c_int; + pub fn pthread_setschedprio(native: crate::pthread_t, priority: c_int) -> c_int; + pub fn reboot(how_to: c_int) -> c_int; + pub fn setfsgid(gid: crate::gid_t) -> c_int; + pub fn setfsuid(uid: crate::uid_t) -> c_int; // Not available now on Android - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); - pub fn sync_file_range( - fd: ::c_int, - offset: ::off64_t, - nbytes: ::off64_t, - flags: ::c_uint, - ) -> ::c_int; + pub fn sync_file_range(fd: c_int, offset: off64_t, nbytes: off64_t, flags: c_uint) -> c_int; pub fn mremap( - addr: *mut ::c_void, - len: ::size_t, - new_len: ::size_t, - flags: ::c_int, + addr: *mut c_void, + len: size_t, + new_len: size_t, + flags: c_int, ... - ) -> *mut ::c_void; + ) -> *mut c_void; pub fn glob( pattern: *const c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; pub fn remap_file_pages( - addr: *mut ::c_void, - size: ::size_t, - prot: ::c_int, - pgoff: ::size_t, - flags: ::c_int, - ) -> ::c_int; + addr: *mut c_void, + size: size_t, + prot: c_int, + pgoff: size_t, + flags: c_int, + ) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - - pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn vhangup() -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; + pub fn vhangup() -> c_int; pub fn sync(); - pub fn syncfs(fd: ::c_int) -> ::c_int; - pub fn syscall(num: ::c_long, ...) -> ::c_long; - pub fn sched_getaffinity(pid: ::pid_t, cpusetsize: ::size_t, cpuset: *mut cpu_set_t) - -> ::c_int; + pub fn syncfs(fd: c_int) -> c_int; + pub fn syscall(num: c_long, ...) -> c_long; + pub fn sched_getaffinity( + pid: crate::pid_t, + cpusetsize: size_t, + cpuset: *mut cpu_set_t, + ) -> c_int; pub fn sched_setaffinity( - pid: ::pid_t, - cpusetsize: ::size_t, + pid: crate::pid_t, + cpusetsize: size_t, cpuset: *const cpu_set_t, - ) -> ::c_int; - pub fn epoll_create(size: ::c_int) -> ::c_int; - pub fn epoll_create1(flags: ::c_int) -> ::c_int; + ) -> c_int; + pub fn epoll_create(size: c_int) -> c_int; + pub fn epoll_create1(flags: c_int) -> c_int; pub fn epoll_wait( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - ) -> ::c_int; - pub fn epoll_ctl(epfd: ::c_int, op: ::c_int, fd: ::c_int, event: *mut ::epoll_event) - -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: c_int, + ) -> c_int; + pub fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut crate::epoll_event) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; - pub fn unshare(flags: ::c_int) -> ::c_int; - pub fn umount(target: *const ::c_char) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn tee(fd_in: ::c_int, fd_out: ::c_int, len: ::size_t, flags: ::c_uint) -> ::ssize_t; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::timezone) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; + pub fn unshare(flags: c_int) -> c_int; + pub fn umount(target: *const c_char) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn tee(fd_in: c_int, fd_out: c_int, len: size_t, flags: c_uint) -> ssize_t; + pub fn settimeofday(tv: *const crate::timeval, tz: *const crate::timezone) -> c_int; pub fn splice( - fd_in: ::c_int, - off_in: *mut ::loff_t, - fd_out: ::c_int, - off_out: *mut ::loff_t, - len: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; - pub fn eventfd_read(fd: ::c_int, value: *mut eventfd_t) -> ::c_int; - pub fn eventfd_write(fd: ::c_int, value: eventfd_t) -> ::c_int; - - pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; - pub fn setns(fd: ::c_int, nstype: ::c_int) -> ::c_int; - pub fn swapoff(path: *const ::c_char) -> ::c_int; - pub fn vmsplice( - fd: ::c_int, - iov: *const ::iovec, - nr_segs: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; + fd_in: c_int, + off_in: *mut crate::loff_t, + fd_out: c_int, + off_out: *mut crate::loff_t, + len: size_t, + flags: c_uint, + ) -> ssize_t; + pub fn eventfd(init: c_uint, flags: c_int) -> c_int; + pub fn eventfd_read(fd: c_int, value: *mut eventfd_t) -> c_int; + pub fn eventfd_write(fd: c_int, value: eventfd_t) -> c_int; + + pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; + pub fn setns(fd: c_int, nstype: c_int) -> c_int; + pub fn swapoff(path: *const c_char) -> c_int; + pub fn vmsplice(fd: c_int, iov: *const crate::iovec, nr_segs: size_t, flags: c_uint) + -> ssize_t; pub fn mount( - src: *const ::c_char, - target: *const ::c_char, - fstype: *const ::c_char, - flags: ::c_ulong, - data: *const ::c_void, - ) -> ::c_int; - pub fn personality(persona: ::c_ulong) -> ::c_int; - pub fn prctl(option: ::c_int, ...) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; + src: *const c_char, + target: *const c_char, + fstype: *const c_char, + flags: c_ulong, + data: *const c_void, + ) -> c_int; + pub fn personality(persona: c_ulong) -> c_int; + pub fn prctl(option: c_int, ...) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; pub fn ppoll( - fds: *mut ::pollfd, + fds: *mut crate::pollfd, nfds: nfds_t, - timeout: *const ::timespec, + timeout: *const crate::timespec, sigmask: *const sigset_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_mutexattr_getprotocol( attr: *const pthread_mutexattr_t, - protocol: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_mutexattr_setprotocol( - attr: *mut pthread_mutexattr_t, - protocol: ::c_int, - ) -> ::c_int; + protocol: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setprotocol(attr: *mut pthread_mutexattr_t, protocol: c_int) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_barrierattr_init(attr: *mut ::pthread_barrierattr_t) -> ::c_int; - pub fn pthread_barrierattr_destroy(attr: *mut ::pthread_barrierattr_t) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_barrierattr_init(attr: *mut crate::pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_destroy(attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_getpshared( - attr: *const ::pthread_barrierattr_t, - shared: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + shared: *mut c_int, + ) -> c_int; pub fn pthread_barrierattr_setpshared( - attr: *mut ::pthread_barrierattr_t, - shared: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_barrierattr_t, + shared: c_int, + ) -> c_int; pub fn pthread_barrier_init( barrier: *mut pthread_barrier_t, - attr: *const ::pthread_barrierattr_t, - count: ::c_uint, - ) -> ::c_int; - pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> ::c_int; - pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; + attr: *const crate::pthread_barrierattr_t, + count: c_uint, + ) -> c_int; + pub fn pthread_barrier_destroy(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_barrier_wait(barrier: *mut pthread_barrier_t) -> c_int; + pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; pub fn clone( - cb: extern "C" fn(*mut ::c_void) -> ::c_int, - child_stack: *mut ::c_void, - flags: ::c_int, - arg: *mut ::c_void, + cb: extern "C" fn(*mut c_void) -> c_int, + child_stack: *mut c_void, + flags: c_int, + arg: *mut c_void, ... - ) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + ) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; pub fn pthread_attr_getinheritsched( - attr: *const ::pthread_attr_t, - inheritsched: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + inheritsched: *mut c_int, + ) -> c_int; pub fn pthread_attr_setinheritsched( - attr: *mut ::pthread_attr_t, - inheritsched: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + inheritsched: c_int, + ) -> c_int; pub fn pthread_attr_getschedpolicy( - attr: *const ::pthread_attr_t, - policy: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_attr_setschedpolicy(attr: *mut ::pthread_attr_t, policy: ::c_int) -> ::c_int; + attr: *const crate::pthread_attr_t, + policy: *mut c_int, + ) -> c_int; + pub fn pthread_attr_setschedpolicy(attr: *mut crate::pthread_attr_t, policy: c_int) -> c_int; pub fn pthread_attr_getschedparam( - attr: *const ::pthread_attr_t, - param: *mut ::sched_param, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + param: *mut crate::sched_param, + ) -> c_int; pub fn pthread_attr_setschedparam( - attr: *mut ::pthread_attr_t, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; + attr: *mut crate::pthread_attr_t, + param: *const crate::sched_param, + ) -> c_int; + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn sysinfo(info: *mut ::sysinfo) -> ::c_int; - pub fn umount2(target: *const ::c_char, flags: ::c_int) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn sysinfo(info: *mut crate::sysinfo) -> c_int; + pub fn umount2(target: *const c_char, flags: c_int) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn swapon(path: *const ::c_char, swapflags: ::c_int) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn swapon(path: *const c_char, swapflags: c_int) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sendfile( - out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut off_t, - count: ::size_t, - ) -> ::ssize_t; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn sendfile(out_fd: c_int, in_fd: c_int, offset: *mut off_t, count: size_t) -> ssize_t; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrouplist( - user: *const ::c_char, - group: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; + user: *const c_char, + group: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn dl_iterate_phdr( - callback: ::Option< + callback: Option< unsafe extern "C" fn( - info: *mut ::dl_phdr_info, - size: ::size_t, - data: *mut ::c_void, - ) -> ::c_int, + info: *mut crate::dl_phdr_info, + size: size_t, + data: *mut c_void, + ) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; - pub fn setmntent(filename: *const ::c_char, ty: *const ::c_char) -> *mut ::FILE; - pub fn getmntent(stream: *mut ::FILE) -> *mut ::mntent; - pub fn addmntent(stream: *mut ::FILE, mnt: *const ::mntent) -> ::c_int; - pub fn endmntent(streamp: *mut ::FILE) -> ::c_int; - pub fn hasmntopt(mnt: *const ::mntent, opt: *const ::c_char) -> *mut ::c_char; + pub fn setmntent(filename: *const c_char, ty: *const c_char) -> *mut crate::FILE; + pub fn getmntent(stream: *mut crate::FILE) -> *mut crate::mntent; + pub fn addmntent(stream: *mut crate::FILE, mnt: *const crate::mntent) -> c_int; + pub fn endmntent(streamp: *mut crate::FILE) -> c_int; + pub fn hasmntopt(mnt: *const crate::mntent, opt: *const c_char) -> *mut c_char; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, - flags: *mut ::c_int, - ) -> ::c_int; - pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; + flags: *mut c_int, + ) -> c_int; + pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int; pub fn posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, - param: *mut ::sched_param, - ) -> ::c_int; + param: *mut crate::sched_param, + ) -> c_int; pub fn posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, - param: *const ::sched_param, - ) -> ::c_int; + param: *const crate::sched_param, + ) -> c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; pub fn fread_unlocked( - buf: *mut ::c_void, - size: ::size_t, - nobj: ::size_t, - stream: *mut ::FILE, - ) -> ::size_t; - pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int; - pub fn inotify_init() -> ::c_int; - pub fn inotify_init1(flags: ::c_int) -> ::c_int; - pub fn inotify_add_watch(fd: ::c_int, path: *const ::c_char, mask: u32) -> ::c_int; - pub fn fanotify_init(flags: ::c_uint, event_f_flags: ::c_uint) -> ::c_int; - - pub fn regcomp(preg: *mut ::regex_t, pattern: *const ::c_char, cflags: ::c_int) -> ::c_int; + buf: *mut c_void, + size: size_t, + nobj: size_t, + stream: *mut crate::FILE, + ) -> size_t; + pub fn inotify_rm_watch(fd: c_int, wd: c_int) -> c_int; + pub fn inotify_init() -> c_int; + pub fn inotify_init1(flags: c_int) -> c_int; + pub fn inotify_add_watch(fd: c_int, path: *const c_char, mask: u32) -> c_int; + pub fn fanotify_init(flags: c_uint, event_f_flags: c_uint) -> c_int; + + pub fn regcomp(preg: *mut crate::regex_t, pattern: *const c_char, cflags: c_int) -> c_int; pub fn regexec( - preg: *const ::regex_t, - input: *const ::c_char, - nmatch: ::size_t, + preg: *const crate::regex_t, + input: *const c_char, + nmatch: size_t, pmatch: *mut regmatch_t, - eflags: ::c_int, - ) -> ::c_int; + eflags: c_int, + ) -> c_int; pub fn regerror( - errcode: ::c_int, - preg: *const ::regex_t, - errbuf: *mut ::c_char, - errbuf_size: ::size_t, - ) -> ::size_t; + errcode: c_int, + preg: *const crate::regex_t, + errbuf: *mut c_char, + errbuf_size: size_t, + ) -> size_t; - pub fn regfree(preg: *mut ::regex_t); + pub fn regfree(preg: *mut crate::regex_t); - pub fn iconv_open(tocode: *const ::c_char, fromcode: *const ::c_char) -> iconv_t; + pub fn iconv_open(tocode: *const c_char, fromcode: *const c_char) -> iconv_t; pub fn iconv( cd: iconv_t, - inbuf: *mut *mut ::c_char, - inbytesleft: *mut ::size_t, - outbuf: *mut *mut ::c_char, - outbytesleft: *mut ::size_t, - ) -> ::size_t; - pub fn iconv_close(cd: iconv_t) -> ::c_int; + inbuf: *mut *mut c_char, + inbytesleft: *mut size_t, + outbuf: *mut *mut c_char, + outbytesleft: *mut size_t, + ) -> size_t; + pub fn iconv_close(cd: iconv_t) -> c_int; - pub fn gettid() -> ::pid_t; + pub fn gettid() -> crate::pid_t; pub fn timer_create( - clockid: ::clockid_t, - sevp: *mut ::sigevent, - timerid: *mut ::timer_t, - ) -> ::c_int; - pub fn timer_delete(timerid: ::timer_t) -> ::c_int; - pub fn timer_getoverrun(timerid: ::timer_t) -> ::c_int; - pub fn timer_gettime(timerid: ::timer_t, curr_value: *mut ::itimerspec) -> ::c_int; + clockid: crate::clockid_t, + sevp: *mut crate::sigevent, + timerid: *mut crate::timer_t, + ) -> c_int; + pub fn timer_delete(timerid: crate::timer_t) -> c_int; + pub fn timer_getoverrun(timerid: crate::timer_t) -> c_int; + pub fn timer_gettime(timerid: crate::timer_t, curr_value: *mut crate::itimerspec) -> c_int; pub fn timer_settime( - timerid: ::timer_t, - flags: ::c_int, - new_value: *const ::itimerspec, - old_value: *mut ::itimerspec, - ) -> ::c_int; + timerid: crate::timer_t, + flags: c_int, + new_value: *const crate::itimerspec, + old_value: *mut crate::itimerspec, + ) -> c_int; - pub fn gethostid() -> ::c_long; + pub fn gethostid() -> c_long; - pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn memmem( - haystack: *const ::c_void, - haystacklen: ::size_t, - needle: *const ::c_void, - needlelen: ::size_t, - ) -> *mut ::c_void; - pub fn sched_getcpu() -> ::c_int; - - pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int; + haystack: *const c_void, + haystacklen: size_t, + needle: *const c_void, + needlelen: size_t, + ) -> *mut c_void; + pub fn sched_getcpu() -> c_int; + + pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; pub fn getopt_long( - argc: ::c_int, + argc: c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, - longindex: *mut ::c_int, - ) -> ::c_int; + longindex: *mut c_int, + ) -> c_int; - pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> ::c_int; + pub fn pthread_once(control: *mut pthread_once_t, routine: extern "C" fn()) -> c_int; pub fn copy_file_range( - fd_in: ::c_int, - off_in: *mut ::off64_t, - fd_out: ::c_int, - off_out: *mut ::off64_t, - len: ::size_t, - flags: ::c_uint, - ) -> ::ssize_t; + fd_in: c_int, + off_in: *mut off64_t, + fd_out: c_int, + off_out: *mut off64_t, + len: size_t, + flags: c_uint, + ) -> ssize_t; - pub fn klogctl(syslog_type: ::c_int, bufp: *mut ::c_char, len: ::c_int) -> ::c_int; + pub fn klogctl(syslog_type: c_int, bufp: *mut c_char, len: c_int) -> c_int; - pub fn ioctl(fd: ::c_int, request: ::Ioctl, ...) -> ::c_int; + pub fn ioctl(fd: c_int, request: Ioctl, ...) -> c_int; } // LFS64 extensions @@ -6766,30 +6737,25 @@ extern "C" { cfg_if! { if #[cfg(not(target_env = "musl"))] { extern "C" { - pub fn fallocate64( - fd: ::c_int, - mode: ::c_int, - offset: ::off64_t, - len: ::off64_t, - ) -> ::c_int; - pub fn fgetpos64(stream: *mut ::FILE, ptr: *mut fpos64_t) -> ::c_int; - pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn fallocate64(fd: c_int, mode: c_int, offset: off64_t, len: off64_t) -> c_int; + pub fn fgetpos64(stream: *mut crate::FILE, ptr: *mut fpos64_t) -> c_int; + pub fn fopen64(filename: *const c_char, mode: *const c_char) -> *mut crate::FILE; pub fn freopen64( filename: *const c_char, mode: *const c_char, - file: *mut ::FILE, - ) -> *mut ::FILE; - pub fn fseeko64(stream: *mut ::FILE, offset: ::off64_t, whence: ::c_int) -> ::c_int; - pub fn fsetpos64(stream: *mut ::FILE, ptr: *const fpos64_t) -> ::c_int; - pub fn ftello64(stream: *mut ::FILE) -> ::off64_t; - pub fn posix_fallocate64(fd: ::c_int, offset: ::off64_t, len: ::off64_t) -> ::c_int; + file: *mut crate::FILE, + ) -> *mut crate::FILE; + pub fn fseeko64(stream: *mut crate::FILE, offset: off64_t, whence: c_int) -> c_int; + pub fn fsetpos64(stream: *mut crate::FILE, ptr: *const fpos64_t) -> c_int; + pub fn ftello64(stream: *mut crate::FILE) -> off64_t; + pub fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int; pub fn sendfile64( - out_fd: ::c_int, - in_fd: ::c_int, + out_fd: c_int, + in_fd: c_int, offset: *mut off64_t, - count: ::size_t, - ) -> ::ssize_t; - pub fn tmpfile64() -> *mut ::FILE; + count: size_t, + ) -> ssize_t; + pub fn tmpfile64() -> *mut crate::FILE; } } } diff --git a/src/unix/linux_like/linux/musl/b32/arm/mod.rs b/src/unix/linux_like/linux/musl/b32/arm/mod.rs index 07aabbe1c5824..789a35548d702 100644 --- a/src/unix/linux_like/linux/musl/b32/arm/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/arm/mod.rs @@ -1,136 +1,138 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ulonglong, c_void, off_t, size_t, ssize_t}; + pub type c_char = u8; pub type wchar_t = u32; s! { pub struct stat { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino_t, + pub st_dev: crate::dev_t, + __st_dev_padding: c_int, + __st_ino_truncated: c_long, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_rdev_padding: c_int, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino_t, } pub struct stat64 { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino_t, + pub st_dev: crate::dev_t, + __st_dev_padding: c_int, + __st_ino_truncated: c_long, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_rdev_padding: c_int, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino_t, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_int, - pub shm_dtime: ::time_t, - __unused2: ::c_int, - pub shm_ctime: ::time_t, - __unused3: ::c_int, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_int, + pub shm_dtime: crate::time_t, + __unused2: c_int, + pub shm_ctime: crate::time_t, + __unused3: c_int, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __unused1: ::c_int, - pub msg_rtime: ::time_t, - __unused2: ::c_int, - pub msg_ctime: ::time_t, - __unused3: ::c_int, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __unused1: c_int, + pub msg_rtime: crate::time_t, + __unused2: c_int, + pub msg_ctime: crate::time_t, + __unused3: c_int, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct mcontext_t { - pub trap_no: ::c_ulong, - pub error_code: ::c_ulong, - pub oldmask: ::c_ulong, - pub arm_r0: ::c_ulong, - pub arm_r1: ::c_ulong, - pub arm_r2: ::c_ulong, - pub arm_r3: ::c_ulong, - pub arm_r4: ::c_ulong, - pub arm_r5: ::c_ulong, - pub arm_r6: ::c_ulong, - pub arm_r7: ::c_ulong, - pub arm_r8: ::c_ulong, - pub arm_r9: ::c_ulong, - pub arm_r10: ::c_ulong, - pub arm_fp: ::c_ulong, - pub arm_ip: ::c_ulong, - pub arm_sp: ::c_ulong, - pub arm_lr: ::c_ulong, - pub arm_pc: ::c_ulong, - pub arm_cpsr: ::c_ulong, - pub fault_address: ::c_ulong, + pub trap_no: c_ulong, + pub error_code: c_ulong, + pub oldmask: c_ulong, + pub arm_r0: c_ulong, + pub arm_r1: c_ulong, + pub arm_r2: c_ulong, + pub arm_r3: c_ulong, + pub arm_r4: c_ulong, + pub arm_r5: c_ulong, + pub arm_r6: c_ulong, + pub arm_r7: c_ulong, + pub arm_r8: c_ulong, + pub arm_r9: c_ulong, + pub arm_r10: c_ulong, + pub arm_fp: c_ulong, + pub arm_ip: c_ulong, + pub arm_sp: c_ulong, + pub arm_lr: c_ulong, + pub arm_pc: c_ulong, + pub arm_cpsr: c_ulong, + pub fault_address: c_ulong, } } s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, - pub uc_regspace: [::c_ulonglong; 64], + pub uc_sigmask: crate::sigset_t, + pub uc_regspace: [c_ulonglong; 64], } #[allow(missing_debug_implementations)] @@ -152,8 +154,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_link) .field("uc_link", &self.uc_link) @@ -163,8 +165,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -175,29 +177,29 @@ cfg_if! { } } -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_LARGEFILE: ::c_int = 0o400000; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_LARGEFILE: c_int = 0o400000; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -205,595 +207,595 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_SYNC: c_int = 0x080000; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EDEADLOCK: c_int = EDEADLK; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const MAP_HUGETLB: ::c_int = 0x040000; +pub const MAP_HUGETLB: c_int = 0x040000; -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 12; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 13; +pub const F_SETLKW: c_int = 14; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_pause: ::c_long = 29; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_pivot_root: ::c_long = 218; -pub const SYS_mincore: ::c_long = 219; -pub const SYS_madvise: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_io_setup: ::c_long = 243; -pub const SYS_io_destroy: ::c_long = 244; -pub const SYS_io_getevents: ::c_long = 245; -pub const SYS_io_submit: ::c_long = 246; -pub const SYS_io_cancel: ::c_long = 247; -pub const SYS_exit_group: ::c_long = 248; -pub const SYS_lookup_dcookie: ::c_long = 249; -pub const SYS_epoll_create: ::c_long = 250; -pub const SYS_epoll_ctl: ::c_long = 251; -pub const SYS_epoll_wait: ::c_long = 252; -pub const SYS_remap_file_pages: ::c_long = 253; -pub const SYS_set_tid_address: ::c_long = 256; -pub const SYS_timer_create: ::c_long = 257; -pub const SYS_timer_settime: ::c_long = 258; -pub const SYS_timer_gettime: ::c_long = 259; -pub const SYS_timer_getoverrun: ::c_long = 260; -pub const SYS_timer_delete: ::c_long = 261; -pub const SYS_clock_settime: ::c_long = 262; -pub const SYS_clock_gettime: ::c_long = 263; -pub const SYS_clock_getres: ::c_long = 264; -pub const SYS_clock_nanosleep: ::c_long = 265; -pub const SYS_statfs64: ::c_long = 266; -pub const SYS_fstatfs64: ::c_long = 267; -pub const SYS_tgkill: ::c_long = 268; -pub const SYS_utimes: ::c_long = 269; -pub const SYS_pciconfig_iobase: ::c_long = 271; -pub const SYS_pciconfig_read: ::c_long = 272; -pub const SYS_pciconfig_write: ::c_long = 273; -pub const SYS_mq_open: ::c_long = 274; -pub const SYS_mq_unlink: ::c_long = 275; -pub const SYS_mq_timedsend: ::c_long = 276; -pub const SYS_mq_timedreceive: ::c_long = 277; -pub const SYS_mq_notify: ::c_long = 278; -pub const SYS_mq_getsetattr: ::c_long = 279; -pub const SYS_waitid: ::c_long = 280; -pub const SYS_socket: ::c_long = 281; -pub const SYS_bind: ::c_long = 282; -pub const SYS_connect: ::c_long = 283; -pub const SYS_listen: ::c_long = 284; -pub const SYS_accept: ::c_long = 285; -pub const SYS_getsockname: ::c_long = 286; -pub const SYS_getpeername: ::c_long = 287; -pub const SYS_socketpair: ::c_long = 288; -pub const SYS_send: ::c_long = 289; -pub const SYS_sendto: ::c_long = 290; -pub const SYS_recv: ::c_long = 291; -pub const SYS_recvfrom: ::c_long = 292; -pub const SYS_shutdown: ::c_long = 293; -pub const SYS_setsockopt: ::c_long = 294; -pub const SYS_getsockopt: ::c_long = 295; -pub const SYS_sendmsg: ::c_long = 296; -pub const SYS_recvmsg: ::c_long = 297; -pub const SYS_semop: ::c_long = 298; -pub const SYS_semget: ::c_long = 299; -pub const SYS_semctl: ::c_long = 300; -pub const SYS_msgsnd: ::c_long = 301; -pub const SYS_msgrcv: ::c_long = 302; -pub const SYS_msgget: ::c_long = 303; -pub const SYS_msgctl: ::c_long = 304; -pub const SYS_shmat: ::c_long = 305; -pub const SYS_shmdt: ::c_long = 306; -pub const SYS_shmget: ::c_long = 307; -pub const SYS_shmctl: ::c_long = 308; -pub const SYS_add_key: ::c_long = 309; -pub const SYS_request_key: ::c_long = 310; -pub const SYS_keyctl: ::c_long = 311; -pub const SYS_semtimedop: ::c_long = 312; -pub const SYS_vserver: ::c_long = 313; -pub const SYS_ioprio_set: ::c_long = 314; -pub const SYS_ioprio_get: ::c_long = 315; -pub const SYS_inotify_init: ::c_long = 316; -pub const SYS_inotify_add_watch: ::c_long = 317; -pub const SYS_inotify_rm_watch: ::c_long = 318; -pub const SYS_mbind: ::c_long = 319; -pub const SYS_get_mempolicy: ::c_long = 320; -pub const SYS_set_mempolicy: ::c_long = 321; -pub const SYS_openat: ::c_long = 322; -pub const SYS_mkdirat: ::c_long = 323; -pub const SYS_mknodat: ::c_long = 324; -pub const SYS_fchownat: ::c_long = 325; -pub const SYS_futimesat: ::c_long = 326; -pub const SYS_fstatat64: ::c_long = 327; -pub const SYS_unlinkat: ::c_long = 328; -pub const SYS_renameat: ::c_long = 329; -pub const SYS_linkat: ::c_long = 330; -pub const SYS_symlinkat: ::c_long = 331; -pub const SYS_readlinkat: ::c_long = 332; -pub const SYS_fchmodat: ::c_long = 333; -pub const SYS_faccessat: ::c_long = 334; -pub const SYS_pselect6: ::c_long = 335; -pub const SYS_ppoll: ::c_long = 336; -pub const SYS_unshare: ::c_long = 337; -pub const SYS_set_robust_list: ::c_long = 338; -pub const SYS_get_robust_list: ::c_long = 339; -pub const SYS_splice: ::c_long = 340; -pub const SYS_tee: ::c_long = 342; -pub const SYS_vmsplice: ::c_long = 343; -pub const SYS_move_pages: ::c_long = 344; -pub const SYS_getcpu: ::c_long = 345; -pub const SYS_epoll_pwait: ::c_long = 346; -pub const SYS_kexec_load: ::c_long = 347; -pub const SYS_utimensat: ::c_long = 348; -pub const SYS_signalfd: ::c_long = 349; -pub const SYS_timerfd_create: ::c_long = 350; -pub const SYS_eventfd: ::c_long = 351; -pub const SYS_fallocate: ::c_long = 352; -pub const SYS_timerfd_settime: ::c_long = 353; -pub const SYS_timerfd_gettime: ::c_long = 354; -pub const SYS_signalfd4: ::c_long = 355; -pub const SYS_eventfd2: ::c_long = 356; -pub const SYS_epoll_create1: ::c_long = 357; -pub const SYS_dup3: ::c_long = 358; -pub const SYS_pipe2: ::c_long = 359; -pub const SYS_inotify_init1: ::c_long = 360; -pub const SYS_preadv: ::c_long = 361; -pub const SYS_pwritev: ::c_long = 362; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 363; -pub const SYS_perf_event_open: ::c_long = 364; -pub const SYS_recvmmsg: ::c_long = 365; -pub const SYS_accept4: ::c_long = 366; -pub const SYS_fanotify_init: ::c_long = 367; -pub const SYS_fanotify_mark: ::c_long = 368; -pub const SYS_prlimit64: ::c_long = 369; -pub const SYS_name_to_handle_at: ::c_long = 370; -pub const SYS_open_by_handle_at: ::c_long = 371; -pub const SYS_clock_adjtime: ::c_long = 372; -pub const SYS_syncfs: ::c_long = 373; -pub const SYS_sendmmsg: ::c_long = 374; -pub const SYS_setns: ::c_long = 375; -pub const SYS_process_vm_readv: ::c_long = 376; -pub const SYS_process_vm_writev: ::c_long = 377; -pub const SYS_kcmp: ::c_long = 378; -pub const SYS_finit_module: ::c_long = 379; -pub const SYS_sched_setattr: ::c_long = 380; -pub const SYS_sched_getattr: ::c_long = 381; -pub const SYS_renameat2: ::c_long = 382; -pub const SYS_seccomp: ::c_long = 383; -pub const SYS_getrandom: ::c_long = 384; -pub const SYS_memfd_create: ::c_long = 385; -pub const SYS_bpf: ::c_long = 386; -pub const SYS_execveat: ::c_long = 387; -pub const SYS_userfaultfd: ::c_long = 388; -pub const SYS_membarrier: ::c_long = 389; -pub const SYS_mlock2: ::c_long = 390; -pub const SYS_copy_file_range: ::c_long = 391; -pub const SYS_preadv2: ::c_long = 392; -pub const SYS_pwritev2: ::c_long = 393; -pub const SYS_pkey_mprotect: ::c_long = 394; -pub const SYS_pkey_alloc: ::c_long = 395; -pub const SYS_pkey_free: ::c_long = 396; -pub const SYS_statx: ::c_long = 397; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_ptrace: c_long = 26; +pub const SYS_pause: c_long = 29; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_symlink: c_long = 83; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_vhangup: c_long = 111; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_pivot_root: c_long = 218; +pub const SYS_mincore: c_long = 219; +pub const SYS_madvise: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_io_setup: c_long = 243; +pub const SYS_io_destroy: c_long = 244; +pub const SYS_io_getevents: c_long = 245; +pub const SYS_io_submit: c_long = 246; +pub const SYS_io_cancel: c_long = 247; +pub const SYS_exit_group: c_long = 248; +pub const SYS_lookup_dcookie: c_long = 249; +pub const SYS_epoll_create: c_long = 250; +pub const SYS_epoll_ctl: c_long = 251; +pub const SYS_epoll_wait: c_long = 252; +pub const SYS_remap_file_pages: c_long = 253; +pub const SYS_set_tid_address: c_long = 256; +pub const SYS_timer_create: c_long = 257; +pub const SYS_timer_settime: c_long = 258; +pub const SYS_timer_gettime: c_long = 259; +pub const SYS_timer_getoverrun: c_long = 260; +pub const SYS_timer_delete: c_long = 261; +pub const SYS_clock_settime: c_long = 262; +pub const SYS_clock_gettime: c_long = 263; +pub const SYS_clock_getres: c_long = 264; +pub const SYS_clock_nanosleep: c_long = 265; +pub const SYS_statfs64: c_long = 266; +pub const SYS_fstatfs64: c_long = 267; +pub const SYS_tgkill: c_long = 268; +pub const SYS_utimes: c_long = 269; +pub const SYS_pciconfig_iobase: c_long = 271; +pub const SYS_pciconfig_read: c_long = 272; +pub const SYS_pciconfig_write: c_long = 273; +pub const SYS_mq_open: c_long = 274; +pub const SYS_mq_unlink: c_long = 275; +pub const SYS_mq_timedsend: c_long = 276; +pub const SYS_mq_timedreceive: c_long = 277; +pub const SYS_mq_notify: c_long = 278; +pub const SYS_mq_getsetattr: c_long = 279; +pub const SYS_waitid: c_long = 280; +pub const SYS_socket: c_long = 281; +pub const SYS_bind: c_long = 282; +pub const SYS_connect: c_long = 283; +pub const SYS_listen: c_long = 284; +pub const SYS_accept: c_long = 285; +pub const SYS_getsockname: c_long = 286; +pub const SYS_getpeername: c_long = 287; +pub const SYS_socketpair: c_long = 288; +pub const SYS_send: c_long = 289; +pub const SYS_sendto: c_long = 290; +pub const SYS_recv: c_long = 291; +pub const SYS_recvfrom: c_long = 292; +pub const SYS_shutdown: c_long = 293; +pub const SYS_setsockopt: c_long = 294; +pub const SYS_getsockopt: c_long = 295; +pub const SYS_sendmsg: c_long = 296; +pub const SYS_recvmsg: c_long = 297; +pub const SYS_semop: c_long = 298; +pub const SYS_semget: c_long = 299; +pub const SYS_semctl: c_long = 300; +pub const SYS_msgsnd: c_long = 301; +pub const SYS_msgrcv: c_long = 302; +pub const SYS_msgget: c_long = 303; +pub const SYS_msgctl: c_long = 304; +pub const SYS_shmat: c_long = 305; +pub const SYS_shmdt: c_long = 306; +pub const SYS_shmget: c_long = 307; +pub const SYS_shmctl: c_long = 308; +pub const SYS_add_key: c_long = 309; +pub const SYS_request_key: c_long = 310; +pub const SYS_keyctl: c_long = 311; +pub const SYS_semtimedop: c_long = 312; +pub const SYS_vserver: c_long = 313; +pub const SYS_ioprio_set: c_long = 314; +pub const SYS_ioprio_get: c_long = 315; +pub const SYS_inotify_init: c_long = 316; +pub const SYS_inotify_add_watch: c_long = 317; +pub const SYS_inotify_rm_watch: c_long = 318; +pub const SYS_mbind: c_long = 319; +pub const SYS_get_mempolicy: c_long = 320; +pub const SYS_set_mempolicy: c_long = 321; +pub const SYS_openat: c_long = 322; +pub const SYS_mkdirat: c_long = 323; +pub const SYS_mknodat: c_long = 324; +pub const SYS_fchownat: c_long = 325; +pub const SYS_futimesat: c_long = 326; +pub const SYS_fstatat64: c_long = 327; +pub const SYS_unlinkat: c_long = 328; +pub const SYS_renameat: c_long = 329; +pub const SYS_linkat: c_long = 330; +pub const SYS_symlinkat: c_long = 331; +pub const SYS_readlinkat: c_long = 332; +pub const SYS_fchmodat: c_long = 333; +pub const SYS_faccessat: c_long = 334; +pub const SYS_pselect6: c_long = 335; +pub const SYS_ppoll: c_long = 336; +pub const SYS_unshare: c_long = 337; +pub const SYS_set_robust_list: c_long = 338; +pub const SYS_get_robust_list: c_long = 339; +pub const SYS_splice: c_long = 340; +pub const SYS_tee: c_long = 342; +pub const SYS_vmsplice: c_long = 343; +pub const SYS_move_pages: c_long = 344; +pub const SYS_getcpu: c_long = 345; +pub const SYS_epoll_pwait: c_long = 346; +pub const SYS_kexec_load: c_long = 347; +pub const SYS_utimensat: c_long = 348; +pub const SYS_signalfd: c_long = 349; +pub const SYS_timerfd_create: c_long = 350; +pub const SYS_eventfd: c_long = 351; +pub const SYS_fallocate: c_long = 352; +pub const SYS_timerfd_settime: c_long = 353; +pub const SYS_timerfd_gettime: c_long = 354; +pub const SYS_signalfd4: c_long = 355; +pub const SYS_eventfd2: c_long = 356; +pub const SYS_epoll_create1: c_long = 357; +pub const SYS_dup3: c_long = 358; +pub const SYS_pipe2: c_long = 359; +pub const SYS_inotify_init1: c_long = 360; +pub const SYS_preadv: c_long = 361; +pub const SYS_pwritev: c_long = 362; +pub const SYS_rt_tgsigqueueinfo: c_long = 363; +pub const SYS_perf_event_open: c_long = 364; +pub const SYS_recvmmsg: c_long = 365; +pub const SYS_accept4: c_long = 366; +pub const SYS_fanotify_init: c_long = 367; +pub const SYS_fanotify_mark: c_long = 368; +pub const SYS_prlimit64: c_long = 369; +pub const SYS_name_to_handle_at: c_long = 370; +pub const SYS_open_by_handle_at: c_long = 371; +pub const SYS_clock_adjtime: c_long = 372; +pub const SYS_syncfs: c_long = 373; +pub const SYS_sendmmsg: c_long = 374; +pub const SYS_setns: c_long = 375; +pub const SYS_process_vm_readv: c_long = 376; +pub const SYS_process_vm_writev: c_long = 377; +pub const SYS_kcmp: c_long = 378; +pub const SYS_finit_module: c_long = 379; +pub const SYS_sched_setattr: c_long = 380; +pub const SYS_sched_getattr: c_long = 381; +pub const SYS_renameat2: c_long = 382; +pub const SYS_seccomp: c_long = 383; +pub const SYS_getrandom: c_long = 384; +pub const SYS_memfd_create: c_long = 385; +pub const SYS_bpf: c_long = 386; +pub const SYS_execveat: c_long = 387; +pub const SYS_userfaultfd: c_long = 388; +pub const SYS_membarrier: c_long = 389; +pub const SYS_mlock2: c_long = 390; +pub const SYS_copy_file_range: c_long = 391; +pub const SYS_preadv2: c_long = 392; +pub const SYS_pwritev2: c_long = 393; +pub const SYS_pkey_mprotect: c_long = 394; +pub const SYS_pkey_alloc: c_long = 395; +pub const SYS_pkey_free: c_long = 396; +pub const SYS_statx: c_long = 397; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; extern "C" { - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; } diff --git a/src/unix/linux_like/linux/musl/b32/hexagon.rs b/src/unix/linux_like/linux/musl/b32/hexagon.rs index 8678e19dff176..720464b79f441 100644 --- a/src/unix/linux_like/linux/musl/b32/hexagon.rs +++ b/src/unix/linux_like/linux/musl/b32/hexagon.rs @@ -1,612 +1,614 @@ +use crate::{c_int, c_long, c_longlong, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, size_t}; + pub type c_char = u8; pub type wchar_t = u32; -pub type stat64 = ::stat; +pub type stat64 = crate::stat; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::c_ulonglong, - pub st_mode: ::c_uint, - pub st_nlink: ::c_uint, - pub st_uid: ::c_uint, - pub st_gid: ::c_uint, - pub st_rdev: ::c_ulonglong, - __st_rdev_padding: ::c_ulong, - pub st_size: ::c_longlong, - pub st_blksize: ::blksize_t, - __st_blksize_padding: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_dev: crate::dev_t, + pub st_ino: c_ulonglong, + pub st_mode: c_uint, + pub st_nlink: c_uint, + pub st_uid: c_uint, + pub st_gid: c_uint, + pub st_rdev: c_ulonglong, + __st_rdev_padding: c_ulong, + pub st_size: c_longlong, + pub st_blksize: crate::blksize_t, + __st_blksize_padding: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, - __unused: [::c_int; 2], + __unused: [c_int; 2], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_ushort, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_ushort, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_int, - pub shm_dtime: ::time_t, - __unused2: ::c_int, - pub shm_ctime: ::time_t, - __unused3: ::c_int, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_int, + pub shm_dtime: crate::time_t, + __unused2: c_int, + pub shm_ctime: crate::time_t, + __unused3: c_int, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __unused1: ::c_int, - pub msg_rtime: ::time_t, - __unused2: ::c_int, - pub msg_ctime: ::time_t, - __unused3: ::c_int, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __unused1: c_int, + pub msg_rtime: crate::time_t, + __unused2: c_int, + pub msg_ctime: crate::time_t, + __unused3: c_int, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } } -pub const AF_FILE: ::c_int = 1; -pub const AF_KCM: ::c_int = 41; -pub const AF_MAX: ::c_int = 43; -pub const AF_QIPCRTR: ::c_int = 42; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EALREADY: ::c_int = 114; -pub const EBADE: ::c_int = 52; -pub const EBADMSG: ::c_int = 74; -pub const EBADR: ::c_int = 53; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const ECANCELED: ::c_int = 125; -pub const ECHRNG: ::c_int = 44; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNREFUSED: ::c_int = 111; -pub const ECONNRESET: ::c_int = 104; -pub const EDEADLK: ::c_int = 35; -pub const EDEADLOCK: ::c_int = 35; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EDQUOT: ::c_int = 122; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EHWPOISON: ::c_int = 133; -pub const EIDRM: ::c_int = 43; -pub const EILSEQ: ::c_int = 84; -pub const EINPROGRESS: ::c_int = 115; -pub const EISCONN: ::c_int = 106; -pub const EISNAM: ::c_int = 120; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREJECTED: ::c_int = 129; -pub const EKEYREVOKED: ::c_int = 128; -pub const EL2HLT: ::c_int = 51; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBEXEC: ::c_int = 83; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBSCN: ::c_int = 81; -pub const ELNRNG: ::c_int = 48; -pub const ELOOP: ::c_int = 40; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const EMSGSIZE: ::c_int = 90; -pub const EMULTIHOP: ::c_int = 72; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENAVAIL: ::c_int = 119; -pub const ENETDOWN: ::c_int = 100; -pub const ENETRESET: ::c_int = 102; -pub const ENETUNREACH: ::c_int = 101; -pub const ENOANO: ::c_int = 55; -pub const ENOBUFS: ::c_int = 105; -pub const ENOCSI: ::c_int = 50; -pub const ENOKEY: ::c_int = 126; -pub const ENOLCK: ::c_int = 37; -pub const ENOMEDIUM: ::c_int = 123; -pub const ENOMSG: ::c_int = 42; -pub const ENOPROTOOPT: ::c_int = 92; -pub const ENOSYS: ::c_int = 38; -pub const ENOTCONN: ::c_int = 107; -pub const ENOTEMPTY: ::c_int = 39; -pub const ENOTNAM: ::c_int = 118; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ENOTSOCK: ::c_int = 88; -pub const ENOTSUP: ::c_int = 95; -pub const ENOTUNIQ: ::c_int = 76; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EOVERFLOW: ::c_int = 75; -pub const EOWNERDEAD: ::c_int = 130; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EREMCHG: ::c_int = 78; -pub const ERESTART: ::c_int = 85; -pub const ERFKILL: ::c_int = 132; -pub const ESHUTDOWN: ::c_int = 108; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const ESTALE: ::c_int = 116; -pub const ESTRPIPE: ::c_int = 86; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const EUCLEAN: ::c_int = 117; -pub const EUNATCH: ::c_int = 49; -pub const EUSERS: ::c_int = 87; -pub const EXFULL: ::c_int = 54; -pub const EXTPROC: ::c_int = 65536; -pub const F_EXLCK: ::c_int = 4; -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_GETOWNER_UIDS: ::c_int = 17; -pub const F_GETOWN_EX: ::c_int = 16; -pub const F_GETSIG: ::c_int = 11; -pub const F_LINUX_SPECIFIC_BASE: ::c_int = 1024; -pub const FLUSHO: ::c_int = 4096; -pub const F_OWNER_PGRP: ::c_int = 2; -pub const F_OWNER_PID: ::c_int = 1; -pub const F_OWNER_TID: ::c_int = 0; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETOWN_EX: ::c_int = 15; -pub const F_SETSIG: ::c_int = 10; -pub const F_SHLCK: ::c_int = 8; -pub const IEXTEN: ::c_int = 32768; -pub const MAP_ANON: ::c_int = 32; -pub const MAP_DENYWRITE: ::c_int = 2048; -pub const MAP_EXECUTABLE: ::c_int = 4096; -pub const MAP_GROWSDOWN: ::c_int = 256; -pub const MAP_HUGETLB: ::c_int = 262144; -pub const MAP_LOCKED: ::c_int = 8192; -pub const MAP_NONBLOCK: ::c_int = 65536; -pub const MAP_NORESERVE: ::c_int = 16384; -pub const MAP_POPULATE: ::c_int = 32768; -pub const MAP_STACK: ::c_int = 131072; -pub const MAP_UNINITIALIZED: ::c_int = 0; -pub const O_APPEND: ::c_int = 1024; -pub const O_ASYNC: ::c_int = 8192; -pub const O_CREAT: ::c_int = 64; -pub const O_DIRECT: ::c_int = 16384; -pub const O_DIRECTORY: ::c_int = 65536; -pub const O_DSYNC: ::c_int = 4096; -pub const O_EXCL: ::c_int = 128; -pub const O_LARGEFILE: ::c_int = 32768; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NOFOLLOW: ::c_int = 131072; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const PF_FILE: ::c_int = 1; -pub const PF_KCM: ::c_int = 41; -pub const PF_MAX: ::c_int = 43; -pub const PF_QIPCRTR: ::c_int = 42; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; -pub const SIGBUS: ::c_int = 7; -pub const SIGCHLD: ::c_int = 17; -pub const SIGCONT: ::c_int = 18; -pub const SIGIO: ::c_int = 29; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPROF: ::c_int = 27; -pub const SIGPWR: ::c_int = 30; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const SIGSTOP: ::c_int = 19; -pub const SIGSYS: ::c_int = 31; -pub const SIGTSTP: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGURG: ::c_int = 23; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGWINCH: ::c_int = 28; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIG_SETMASK: ::c_int = 2; // FIXME check these -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOL_CAIF: ::c_int = 278; -pub const SOL_IUCV: ::c_int = 277; -pub const SOL_KCM: ::c_int = 281; -pub const SOL_NFC: ::c_int = 280; -pub const SOL_PNPIPE: ::c_int = 275; -pub const SOL_PPPOL2TP: ::c_int = 273; -pub const SOL_RDS: ::c_int = 276; -pub const SOL_RXRPC: ::c_int = 272; +pub const AF_FILE: c_int = 1; +pub const AF_KCM: c_int = 41; +pub const AF_MAX: c_int = 43; +pub const AF_QIPCRTR: c_int = 42; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const EAFNOSUPPORT: c_int = 97; +pub const EALREADY: c_int = 114; +pub const EBADE: c_int = 52; +pub const EBADMSG: c_int = 74; +pub const EBADR: c_int = 53; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const ECANCELED: c_int = 125; +pub const ECHRNG: c_int = 44; +pub const ECONNABORTED: c_int = 103; +pub const ECONNREFUSED: c_int = 111; +pub const ECONNRESET: c_int = 104; +pub const EDEADLK: c_int = 35; +pub const EDEADLOCK: c_int = 35; +pub const EDESTADDRREQ: c_int = 89; +pub const EDQUOT: c_int = 122; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EHWPOISON: c_int = 133; +pub const EIDRM: c_int = 43; +pub const EILSEQ: c_int = 84; +pub const EINPROGRESS: c_int = 115; +pub const EISCONN: c_int = 106; +pub const EISNAM: c_int = 120; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREJECTED: c_int = 129; +pub const EKEYREVOKED: c_int = 128; +pub const EL2HLT: c_int = 51; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBEXEC: c_int = 83; +pub const ELIBMAX: c_int = 82; +pub const ELIBSCN: c_int = 81; +pub const ELNRNG: c_int = 48; +pub const ELOOP: c_int = 40; +pub const EMEDIUMTYPE: c_int = 124; +pub const EMSGSIZE: c_int = 90; +pub const EMULTIHOP: c_int = 72; +pub const ENAMETOOLONG: c_int = 36; +pub const ENAVAIL: c_int = 119; +pub const ENETDOWN: c_int = 100; +pub const ENETRESET: c_int = 102; +pub const ENETUNREACH: c_int = 101; +pub const ENOANO: c_int = 55; +pub const ENOBUFS: c_int = 105; +pub const ENOCSI: c_int = 50; +pub const ENOKEY: c_int = 126; +pub const ENOLCK: c_int = 37; +pub const ENOMEDIUM: c_int = 123; +pub const ENOMSG: c_int = 42; +pub const ENOPROTOOPT: c_int = 92; +pub const ENOSYS: c_int = 38; +pub const ENOTCONN: c_int = 107; +pub const ENOTEMPTY: c_int = 39; +pub const ENOTNAM: c_int = 118; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ENOTSOCK: c_int = 88; +pub const ENOTSUP: c_int = 95; +pub const ENOTUNIQ: c_int = 76; +pub const EOPNOTSUPP: c_int = 95; +pub const EOVERFLOW: c_int = 75; +pub const EOWNERDEAD: c_int = 130; +pub const EPFNOSUPPORT: c_int = 96; +pub const EREMCHG: c_int = 78; +pub const ERESTART: c_int = 85; +pub const ERFKILL: c_int = 132; +pub const ESHUTDOWN: c_int = 108; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const ESTALE: c_int = 116; +pub const ESTRPIPE: c_int = 86; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const EUCLEAN: c_int = 117; +pub const EUNATCH: c_int = 49; +pub const EUSERS: c_int = 87; +pub const EXFULL: c_int = 54; +pub const EXTPROC: c_int = 65536; +pub const F_EXLCK: c_int = 4; +pub const F_GETLK: c_int = 12; +pub const F_GETOWN: c_int = 9; +pub const F_GETOWNER_UIDS: c_int = 17; +pub const F_GETOWN_EX: c_int = 16; +pub const F_GETSIG: c_int = 11; +pub const F_LINUX_SPECIFIC_BASE: c_int = 1024; +pub const FLUSHO: c_int = 4096; +pub const F_OWNER_PGRP: c_int = 2; +pub const F_OWNER_PID: c_int = 1; +pub const F_OWNER_TID: c_int = 0; +pub const F_SETLK: c_int = 13; +pub const F_SETLKW: c_int = 14; +pub const F_SETOWN: c_int = 8; +pub const F_SETOWN_EX: c_int = 15; +pub const F_SETSIG: c_int = 10; +pub const F_SHLCK: c_int = 8; +pub const IEXTEN: c_int = 32768; +pub const MAP_ANON: c_int = 32; +pub const MAP_DENYWRITE: c_int = 2048; +pub const MAP_EXECUTABLE: c_int = 4096; +pub const MAP_GROWSDOWN: c_int = 256; +pub const MAP_HUGETLB: c_int = 262144; +pub const MAP_LOCKED: c_int = 8192; +pub const MAP_NONBLOCK: c_int = 65536; +pub const MAP_NORESERVE: c_int = 16384; +pub const MAP_POPULATE: c_int = 32768; +pub const MAP_STACK: c_int = 131072; +pub const MAP_UNINITIALIZED: c_int = 0; +pub const O_APPEND: c_int = 1024; +pub const O_ASYNC: c_int = 8192; +pub const O_CREAT: c_int = 64; +pub const O_DIRECT: c_int = 16384; +pub const O_DIRECTORY: c_int = 65536; +pub const O_DSYNC: c_int = 4096; +pub const O_EXCL: c_int = 128; +pub const O_LARGEFILE: c_int = 32768; +pub const O_NOCTTY: c_int = 256; +pub const O_NOFOLLOW: c_int = 131072; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const PF_FILE: c_int = 1; +pub const PF_KCM: c_int = 41; +pub const PF_MAX: c_int = 43; +pub const PF_QIPCRTR: c_int = 42; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; +pub const SIGBUS: c_int = 7; +pub const SIGCHLD: c_int = 17; +pub const SIGCONT: c_int = 18; +pub const SIGIO: c_int = 29; +pub const SIGPOLL: c_int = 29; +pub const SIGPROF: c_int = 27; +pub const SIGPWR: c_int = 30; +pub const SIGSTKFLT: c_int = 16; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const SIGSTOP: c_int = 19; +pub const SIGSYS: c_int = 31; +pub const SIGTSTP: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGURG: c_int = 23; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGVTALRM: c_int = 26; +pub const SIGWINCH: c_int = 28; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIG_SETMASK: c_int = 2; // FIXME check these +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOL_CAIF: c_int = 278; +pub const SOL_IUCV: c_int = 277; +pub const SOL_KCM: c_int = 281; +pub const SOL_NFC: c_int = 280; +pub const SOL_PNPIPE: c_int = 275; +pub const SOL_PPPOL2TP: c_int = 273; +pub const SOL_RDS: c_int = 276; +pub const SOL_RXRPC: c_int = 272; -pub const SYS3264_fadvise64: ::c_int = 223; -pub const SYS3264_fcntl: ::c_int = 25; -pub const SYS3264_fstatat: ::c_int = 79; -pub const SYS3264_fstat: ::c_int = 80; -pub const SYS3264_fstatfs: ::c_int = 44; -pub const SYS3264_ftruncate: ::c_int = 46; -pub const SYS3264_lseek: ::c_int = 62; -pub const SYS3264_lstat: ::c_int = 1039; -pub const SYS3264_mmap: ::c_int = 222; -pub const SYS3264_sendfile: ::c_int = 71; -pub const SYS3264_stat: ::c_int = 1038; -pub const SYS3264_statfs: ::c_int = 43; -pub const SYS3264_truncate: ::c_int = 45; -pub const SYS_accept4: ::c_int = 242; -pub const SYS_accept: ::c_int = 202; -pub const SYS_access: ::c_int = 1033; -pub const SYS_acct: ::c_int = 89; -pub const SYS_add_key: ::c_int = 217; -pub const SYS_adjtimex: ::c_int = 171; -pub const SYS_alarm: ::c_int = 1059; -pub const SYS_arch_specific_syscall: ::c_int = 244; -pub const SYS_bdflush: ::c_int = 1075; -pub const SYS_bind: ::c_int = 200; -pub const SYS_bpf: ::c_int = 280; -pub const SYS_brk: ::c_int = 214; -pub const SYS_capget: ::c_int = 90; -pub const SYS_capset: ::c_int = 91; -pub const SYS_chdir: ::c_int = 49; -pub const SYS_chmod: ::c_int = 1028; -pub const SYS_chown: ::c_int = 1029; -pub const SYS_chroot: ::c_int = 51; -pub const SYS_clock_adjtime: ::c_int = 266; -pub const SYS_clock_getres: ::c_int = 114; -pub const SYS_clock_gettime: ::c_int = 113; -pub const SYS_clock_nanosleep: ::c_int = 115; -pub const SYS_clock_settime: ::c_int = 112; -pub const SYS_clone: ::c_int = 220; -pub const SYS_close: ::c_int = 57; -pub const SYS_connect: ::c_int = 203; -pub const SYS_copy_file_range: ::c_int = -1; // FIXME -pub const SYS_creat: ::c_int = 1064; -pub const SYS_delete_module: ::c_int = 106; -pub const SYS_dup2: ::c_int = 1041; -pub const SYS_dup3: ::c_int = 24; -pub const SYS_dup: ::c_int = 23; -pub const SYS_epoll_create1: ::c_int = 20; -pub const SYS_epoll_create: ::c_int = 1042; -pub const SYS_epoll_ctl: ::c_int = 21; -pub const SYS_epoll_pwait: ::c_int = 22; -pub const SYS_epoll_wait: ::c_int = 1069; -pub const SYS_eventfd2: ::c_int = 19; -pub const SYS_eventfd: ::c_int = 1044; -pub const SYS_execveat: ::c_int = 281; -pub const SYS_execve: ::c_int = 221; -pub const SYS_exit: ::c_int = 93; -pub const SYS_exit_group: ::c_int = 94; -pub const SYS_faccessat: ::c_int = 48; -pub const SYS_fadvise64_64: ::c_int = 223; -pub const SYS_fallocate: ::c_int = 47; -pub const SYS_fanotify_init: ::c_int = 262; -pub const SYS_fanotify_mark: ::c_int = 263; -pub const SYS_fchdir: ::c_int = 50; -pub const SYS_fchmodat: ::c_int = 53; -pub const SYS_fchmod: ::c_int = 52; -pub const SYS_fchownat: ::c_int = 54; -pub const SYS_fchown: ::c_int = 55; -pub const SYS_fcntl64: ::c_int = 25; -pub const SYS_fcntl: ::c_int = 25; -pub const SYS_fdatasync: ::c_int = 83; -pub const SYS_fgetxattr: ::c_int = 10; -pub const SYS_finit_module: ::c_int = 273; -pub const SYS_flistxattr: ::c_int = 13; -pub const SYS_flock: ::c_int = 32; -pub const SYS_fork: ::c_int = 1079; -pub const SYS_fremovexattr: ::c_int = 16; -pub const SYS_fsetxattr: ::c_int = 7; -pub const SYS_fstat64: ::c_int = 80; -pub const SYS_fstatat64: ::c_int = 79; -pub const SYS_fstatfs64: ::c_int = 44; -pub const SYS_fstatfs: ::c_int = 44; -pub const SYS_fsync: ::c_int = 82; -pub const SYS_ftruncate64: ::c_int = 46; -pub const SYS_ftruncate: ::c_int = 46; -pub const SYS_futex: ::c_int = 98; -pub const SYS_futimesat: ::c_int = 1066; -pub const SYS_getcpu: ::c_int = 168; -pub const SYS_getcwd: ::c_int = 17; -pub const SYS_getdents64: ::c_int = 61; -pub const SYS_getdents: ::c_int = 1065; -pub const SYS_getegid: ::c_int = 177; -pub const SYS_geteuid: ::c_int = 175; -pub const SYS_getgid: ::c_int = 176; -pub const SYS_getgroups: ::c_int = 158; -pub const SYS_getitimer: ::c_int = 102; -pub const SYS_get_mempolicy: ::c_int = 236; -pub const SYS_getpeername: ::c_int = 205; -pub const SYS_getpgid: ::c_int = 155; -pub const SYS_getpgrp: ::c_int = 1060; -pub const SYS_getpid: ::c_int = 172; -pub const SYS_getppid: ::c_int = 173; -pub const SYS_getpriority: ::c_int = 141; -pub const SYS_getrandom: ::c_int = 278; -pub const SYS_getresgid: ::c_int = 150; -pub const SYS_getresuid: ::c_int = 148; -pub const SYS_getrlimit: ::c_int = 163; -pub const SYS_get_robust_list: ::c_int = 100; -pub const SYS_getrusage: ::c_int = 165; -pub const SYS_getsid: ::c_int = 156; -pub const SYS_getsockname: ::c_int = 204; -pub const SYS_getsockopt: ::c_int = 209; -pub const SYS_gettid: ::c_int = 178; -pub const SYS_gettimeofday: ::c_int = 169; -pub const SYS_getuid: ::c_int = 174; -pub const SYS_getxattr: ::c_int = 8; -pub const SYS_init_module: ::c_int = 105; -pub const SYS_inotify_add_watch: ::c_int = 27; -pub const SYS_inotify_init1: ::c_int = 26; -pub const SYS_inotify_init: ::c_int = 1043; -pub const SYS_inotify_rm_watch: ::c_int = 28; -pub const SYS_io_cancel: ::c_int = 3; -pub const SYS_ioctl: ::c_int = 29; -pub const SYS_io_destroy: ::c_int = 1; -pub const SYS_io_getevents: ::c_int = 4; -pub const SYS_ioprio_get: ::c_int = 31; -pub const SYS_ioprio_set: ::c_int = 30; -pub const SYS_io_setup: ::c_int = 0; -pub const SYS_io_submit: ::c_int = 2; -pub const SYS_kcmp: ::c_int = 272; -pub const SYS_kexec_load: ::c_int = 104; -pub const SYS_keyctl: ::c_int = 219; -pub const SYS_kill: ::c_int = 129; -pub const SYS_lchown: ::c_int = 1032; -pub const SYS_lgetxattr: ::c_int = 9; -pub const SYS_linkat: ::c_int = 37; -pub const SYS_link: ::c_int = 1025; -pub const SYS_listen: ::c_int = 201; -pub const SYS_listxattr: ::c_int = 11; -pub const SYS_llistxattr: ::c_int = 12; -pub const SYS__llseek: ::c_int = 62; -pub const SYS_lookup_dcookie: ::c_int = 18; -pub const SYS_lremovexattr: ::c_int = 15; -pub const SYS_lseek: ::c_int = 62; -pub const SYS_lsetxattr: ::c_int = 6; -pub const SYS_lstat64: ::c_int = 1039; -pub const SYS_lstat: ::c_int = 1039; -pub const SYS_madvise: ::c_int = 233; -pub const SYS_mbind: ::c_int = 235; -pub const SYS_memfd_create: ::c_int = 279; -pub const SYS_migrate_pages: ::c_int = 238; -pub const SYS_mincore: ::c_int = 232; -pub const SYS_mkdirat: ::c_int = 34; -pub const SYS_mkdir: ::c_int = 1030; -pub const SYS_mknodat: ::c_int = 33; -pub const SYS_mknod: ::c_int = 1027; -pub const SYS_mlockall: ::c_int = 230; -pub const SYS_mlock: ::c_int = 228; -pub const SYS_mmap2: ::c_int = 222; -pub const SYS_mount: ::c_int = 40; -pub const SYS_move_pages: ::c_int = 239; -pub const SYS_mprotect: ::c_int = 226; -pub const SYS_mq_getsetattr: ::c_int = 185; -pub const SYS_mq_notify: ::c_int = 184; -pub const SYS_mq_open: ::c_int = 180; -pub const SYS_mq_timedreceive: ::c_int = 183; -pub const SYS_mq_timedsend: ::c_int = 182; -pub const SYS_mq_unlink: ::c_int = 181; -pub const SYS_mremap: ::c_int = 216; -pub const SYS_msgctl: ::c_int = 187; -pub const SYS_msgget: ::c_int = 186; -pub const SYS_msgrcv: ::c_int = 188; -pub const SYS_msgsnd: ::c_int = 189; -pub const SYS_msync: ::c_int = 227; -pub const SYS_munlockall: ::c_int = 231; -pub const SYS_munlock: ::c_int = 229; -pub const SYS_munmap: ::c_int = 215; -pub const SYS_name_to_handle_at: ::c_int = 264; -pub const SYS_nanosleep: ::c_int = 101; -pub const SYS_newfstatat: ::c_int = 79; -pub const SYS_nfsservctl: ::c_int = 42; -pub const SYS_oldwait4: ::c_int = 1072; -pub const SYS_openat: ::c_int = 56; -pub const SYS_open_by_handle_at: ::c_int = 265; -pub const SYS_open: ::c_int = 1024; -pub const SYS_pause: ::c_int = 1061; -pub const SYS_perf_event_open: ::c_int = 241; -pub const SYS_personality: ::c_int = 92; -pub const SYS_pipe2: ::c_int = 59; -pub const SYS_pipe: ::c_int = 1040; -pub const SYS_pivot_root: ::c_int = 41; -pub const SYS_poll: ::c_int = 1068; -pub const SYS_ppoll: ::c_int = 73; -pub const SYS_prctl: ::c_int = 167; -pub const SYS_pread64: ::c_int = 67; -pub const SYS_preadv: ::c_int = 69; -pub const SYS_prlimit64: ::c_int = 261; -pub const SYS_process_vm_readv: ::c_int = 270; -pub const SYS_process_vm_writev: ::c_int = 271; -pub const SYS_pselect6: ::c_int = 72; -pub const SYS_ptrace: ::c_int = 117; -pub const SYS_pwrite64: ::c_int = 68; -pub const SYS_pwritev: ::c_int = 70; -pub const SYS_quotactl: ::c_int = 60; -pub const SYS_readahead: ::c_int = 213; -pub const SYS_read: ::c_int = 63; -pub const SYS_readlinkat: ::c_int = 78; -pub const SYS_readlink: ::c_int = 1035; -pub const SYS_readv: ::c_int = 65; -pub const SYS_reboot: ::c_int = 142; -pub const SYS_recv: ::c_int = 1073; -pub const SYS_recvfrom: ::c_int = 207; -pub const SYS_recvmmsg: ::c_int = 243; -pub const SYS_recvmsg: ::c_int = 212; -pub const SYS_remap_file_pages: ::c_int = 234; -pub const SYS_removexattr: ::c_int = 14; -pub const SYS_renameat2: ::c_int = 276; -pub const SYS_renameat: ::c_int = 38; -pub const SYS_rename: ::c_int = 1034; -pub const SYS_request_key: ::c_int = 218; -pub const SYS_restart_syscall: ::c_int = 128; -pub const SYS_rmdir: ::c_int = 1031; -pub const SYS_rt_sigaction: ::c_int = 134; -pub const SYS_rt_sigpending: ::c_int = 136; -pub const SYS_rt_sigprocmask: ::c_int = 135; -pub const SYS_rt_sigqueueinfo: ::c_int = 138; -pub const SYS_rt_sigreturn: ::c_int = 139; -pub const SYS_rt_sigsuspend: ::c_int = 133; -pub const SYS_rt_sigtimedwait: ::c_int = 137; -pub const SYS_rt_tgsigqueueinfo: ::c_int = 240; -pub const SYS_sched_getaffinity: ::c_int = 123; -pub const SYS_sched_getattr: ::c_int = 275; -pub const SYS_sched_getparam: ::c_int = 121; -pub const SYS_sched_get_priority_max: ::c_int = 125; -pub const SYS_sched_get_priority_min: ::c_int = 126; -pub const SYS_sched_getscheduler: ::c_int = 120; -pub const SYS_sched_rr_get_interval: ::c_int = 127; -pub const SYS_sched_setaffinity: ::c_int = 122; -pub const SYS_sched_setattr: ::c_int = 274; -pub const SYS_sched_setparam: ::c_int = 118; -pub const SYS_sched_setscheduler: ::c_int = 119; -pub const SYS_sched_yield: ::c_int = 124; -pub const SYS_seccomp: ::c_int = 277; -pub const SYS_select: ::c_int = 1067; -pub const SYS_semctl: ::c_int = 191; -pub const SYS_semget: ::c_int = 190; -pub const SYS_semop: ::c_int = 193; -pub const SYS_semtimedop: ::c_int = 192; -pub const SYS_send: ::c_int = 1074; -pub const SYS_sendfile64: ::c_int = 71; -pub const SYS_sendfile: ::c_int = 71; -pub const SYS_sendmmsg: ::c_int = 269; -pub const SYS_sendmsg: ::c_int = 211; -pub const SYS_sendto: ::c_int = 206; -pub const SYS_setdomainname: ::c_int = 162; -pub const SYS_setfsgid: ::c_int = 152; -pub const SYS_setfsuid: ::c_int = 151; -pub const SYS_setgid: ::c_int = 144; -pub const SYS_setgroups: ::c_int = 159; -pub const SYS_sethostname: ::c_int = 161; -pub const SYS_setitimer: ::c_int = 103; -pub const SYS_set_mempolicy: ::c_int = 237; -pub const SYS_setns: ::c_int = 268; -pub const SYS_setpgid: ::c_int = 154; -pub const SYS_setpriority: ::c_int = 140; -pub const SYS_setregid: ::c_int = 143; -pub const SYS_setresgid: ::c_int = 149; -pub const SYS_setresuid: ::c_int = 147; -pub const SYS_setreuid: ::c_int = 145; -pub const SYS_setrlimit: ::c_int = 164; -pub const SYS_set_robust_list: ::c_int = 99; -pub const SYS_setsid: ::c_int = 157; -pub const SYS_setsockopt: ::c_int = 208; -pub const SYS_set_tid_address: ::c_int = 96; -pub const SYS_settimeofday: ::c_int = 170; -pub const SYS_setuid: ::c_int = 146; -pub const SYS_setxattr: ::c_int = 5; -pub const SYS_shmat: ::c_int = 196; -pub const SYS_shmctl: ::c_int = 195; -pub const SYS_shmdt: ::c_int = 197; -pub const SYS_shmget: ::c_int = 194; -pub const SYS_shutdown: ::c_int = 210; -pub const SYS_sigaltstack: ::c_int = 132; -pub const SYS_signalfd4: ::c_int = 74; -pub const SYS_signalfd: ::c_int = 1045; -pub const SYS_socket: ::c_int = 198; -pub const SYS_socketpair: ::c_int = 199; -pub const SYS_splice: ::c_int = 76; -pub const SYS_stat64: ::c_int = 1038; -pub const SYS_stat: ::c_int = 1038; -pub const SYS_statfs64: ::c_int = 43; -pub const SYS_swapoff: ::c_int = 225; -pub const SYS_swapon: ::c_int = 224; -pub const SYS_symlinkat: ::c_int = 36; -pub const SYS_symlink: ::c_int = 1036; -pub const SYS_sync: ::c_int = 81; -pub const SYS_sync_file_range2: ::c_int = 84; -pub const SYS_sync_file_range: ::c_int = 84; -pub const SYS_syncfs: ::c_int = 267; -pub const SYS_syscalls: ::c_int = 1080; -pub const SYS__sysctl: ::c_int = 1078; -pub const SYS_sysinfo: ::c_int = 179; -pub const SYS_syslog: ::c_int = 116; -pub const SYS_tee: ::c_int = 77; -pub const SYS_tgkill: ::c_int = 131; -pub const SYS_time: ::c_int = 1062; -pub const SYS_timer_create: ::c_int = 107; -pub const SYS_timer_delete: ::c_int = 111; -pub const SYS_timerfd_create: ::c_int = 85; -pub const SYS_timerfd_gettime: ::c_int = 87; -pub const SYS_timerfd_settime: ::c_int = 86; -pub const SYS_timer_getoverrun: ::c_int = 109; -pub const SYS_timer_gettime: ::c_int = 108; -pub const SYS_timer_settime: ::c_int = 110; -pub const SYS_times: ::c_int = 153; -pub const SYS_tkill: ::c_int = 130; -pub const SYS_truncate64: ::c_int = 45; -pub const SYS_truncate: ::c_int = 45; -pub const SYS_umask: ::c_int = 166; -pub const SYS_umount2: ::c_int = 39; -pub const SYS_umount: ::c_int = 1076; -pub const SYS_uname: ::c_int = 160; -pub const SYS_unlinkat: ::c_int = 35; -pub const SYS_unlink: ::c_int = 1026; -pub const SYS_unshare: ::c_int = 97; -pub const SYS_uselib: ::c_int = 1077; -pub const SYS_ustat: ::c_int = 1070; -pub const SYS_utime: ::c_int = 1063; -pub const SYS_utimensat: ::c_int = 88; -pub const SYS_utimes: ::c_int = 1037; -pub const SYS_vfork: ::c_int = 1071; -pub const SYS_vhangup: ::c_int = 58; -pub const SYS_vmsplice: ::c_int = 75; -pub const SYS_wait4: ::c_int = 260; -pub const SYS_waitid: ::c_int = 95; -pub const SYS_write: ::c_int = 64; -pub const SYS_writev: ::c_int = 66; -pub const SYS_statx: ::c_int = 291; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const TIOCM_LOOP: ::c_int = 32768; -pub const TIOCM_OUT1: ::c_int = 8192; -pub const TIOCM_OUT2: ::c_int = 16384; -pub const TIOCSER_TEMT: ::c_int = 1; -pub const TOSTOP: ::c_int = 256; -pub const VEOF: ::c_int = 4; -pub const VEOL2: ::c_int = 16; -pub const VEOL: ::c_int = 11; -pub const VMIN: ::c_int = 6; +pub const SYS3264_fadvise64: c_int = 223; +pub const SYS3264_fcntl: c_int = 25; +pub const SYS3264_fstatat: c_int = 79; +pub const SYS3264_fstat: c_int = 80; +pub const SYS3264_fstatfs: c_int = 44; +pub const SYS3264_ftruncate: c_int = 46; +pub const SYS3264_lseek: c_int = 62; +pub const SYS3264_lstat: c_int = 1039; +pub const SYS3264_mmap: c_int = 222; +pub const SYS3264_sendfile: c_int = 71; +pub const SYS3264_stat: c_int = 1038; +pub const SYS3264_statfs: c_int = 43; +pub const SYS3264_truncate: c_int = 45; +pub const SYS_accept4: c_int = 242; +pub const SYS_accept: c_int = 202; +pub const SYS_access: c_int = 1033; +pub const SYS_acct: c_int = 89; +pub const SYS_add_key: c_int = 217; +pub const SYS_adjtimex: c_int = 171; +pub const SYS_alarm: c_int = 1059; +pub const SYS_arch_specific_syscall: c_int = 244; +pub const SYS_bdflush: c_int = 1075; +pub const SYS_bind: c_int = 200; +pub const SYS_bpf: c_int = 280; +pub const SYS_brk: c_int = 214; +pub const SYS_capget: c_int = 90; +pub const SYS_capset: c_int = 91; +pub const SYS_chdir: c_int = 49; +pub const SYS_chmod: c_int = 1028; +pub const SYS_chown: c_int = 1029; +pub const SYS_chroot: c_int = 51; +pub const SYS_clock_adjtime: c_int = 266; +pub const SYS_clock_getres: c_int = 114; +pub const SYS_clock_gettime: c_int = 113; +pub const SYS_clock_nanosleep: c_int = 115; +pub const SYS_clock_settime: c_int = 112; +pub const SYS_clone: c_int = 220; +pub const SYS_close: c_int = 57; +pub const SYS_connect: c_int = 203; +pub const SYS_copy_file_range: c_int = -1; // FIXME +pub const SYS_creat: c_int = 1064; +pub const SYS_delete_module: c_int = 106; +pub const SYS_dup2: c_int = 1041; +pub const SYS_dup3: c_int = 24; +pub const SYS_dup: c_int = 23; +pub const SYS_epoll_create1: c_int = 20; +pub const SYS_epoll_create: c_int = 1042; +pub const SYS_epoll_ctl: c_int = 21; +pub const SYS_epoll_pwait: c_int = 22; +pub const SYS_epoll_wait: c_int = 1069; +pub const SYS_eventfd2: c_int = 19; +pub const SYS_eventfd: c_int = 1044; +pub const SYS_execveat: c_int = 281; +pub const SYS_execve: c_int = 221; +pub const SYS_exit: c_int = 93; +pub const SYS_exit_group: c_int = 94; +pub const SYS_faccessat: c_int = 48; +pub const SYS_fadvise64_64: c_int = 223; +pub const SYS_fallocate: c_int = 47; +pub const SYS_fanotify_init: c_int = 262; +pub const SYS_fanotify_mark: c_int = 263; +pub const SYS_fchdir: c_int = 50; +pub const SYS_fchmodat: c_int = 53; +pub const SYS_fchmod: c_int = 52; +pub const SYS_fchownat: c_int = 54; +pub const SYS_fchown: c_int = 55; +pub const SYS_fcntl64: c_int = 25; +pub const SYS_fcntl: c_int = 25; +pub const SYS_fdatasync: c_int = 83; +pub const SYS_fgetxattr: c_int = 10; +pub const SYS_finit_module: c_int = 273; +pub const SYS_flistxattr: c_int = 13; +pub const SYS_flock: c_int = 32; +pub const SYS_fork: c_int = 1079; +pub const SYS_fremovexattr: c_int = 16; +pub const SYS_fsetxattr: c_int = 7; +pub const SYS_fstat64: c_int = 80; +pub const SYS_fstatat64: c_int = 79; +pub const SYS_fstatfs64: c_int = 44; +pub const SYS_fstatfs: c_int = 44; +pub const SYS_fsync: c_int = 82; +pub const SYS_ftruncate64: c_int = 46; +pub const SYS_ftruncate: c_int = 46; +pub const SYS_futex: c_int = 98; +pub const SYS_futimesat: c_int = 1066; +pub const SYS_getcpu: c_int = 168; +pub const SYS_getcwd: c_int = 17; +pub const SYS_getdents64: c_int = 61; +pub const SYS_getdents: c_int = 1065; +pub const SYS_getegid: c_int = 177; +pub const SYS_geteuid: c_int = 175; +pub const SYS_getgid: c_int = 176; +pub const SYS_getgroups: c_int = 158; +pub const SYS_getitimer: c_int = 102; +pub const SYS_get_mempolicy: c_int = 236; +pub const SYS_getpeername: c_int = 205; +pub const SYS_getpgid: c_int = 155; +pub const SYS_getpgrp: c_int = 1060; +pub const SYS_getpid: c_int = 172; +pub const SYS_getppid: c_int = 173; +pub const SYS_getpriority: c_int = 141; +pub const SYS_getrandom: c_int = 278; +pub const SYS_getresgid: c_int = 150; +pub const SYS_getresuid: c_int = 148; +pub const SYS_getrlimit: c_int = 163; +pub const SYS_get_robust_list: c_int = 100; +pub const SYS_getrusage: c_int = 165; +pub const SYS_getsid: c_int = 156; +pub const SYS_getsockname: c_int = 204; +pub const SYS_getsockopt: c_int = 209; +pub const SYS_gettid: c_int = 178; +pub const SYS_gettimeofday: c_int = 169; +pub const SYS_getuid: c_int = 174; +pub const SYS_getxattr: c_int = 8; +pub const SYS_init_module: c_int = 105; +pub const SYS_inotify_add_watch: c_int = 27; +pub const SYS_inotify_init1: c_int = 26; +pub const SYS_inotify_init: c_int = 1043; +pub const SYS_inotify_rm_watch: c_int = 28; +pub const SYS_io_cancel: c_int = 3; +pub const SYS_ioctl: c_int = 29; +pub const SYS_io_destroy: c_int = 1; +pub const SYS_io_getevents: c_int = 4; +pub const SYS_ioprio_get: c_int = 31; +pub const SYS_ioprio_set: c_int = 30; +pub const SYS_io_setup: c_int = 0; +pub const SYS_io_submit: c_int = 2; +pub const SYS_kcmp: c_int = 272; +pub const SYS_kexec_load: c_int = 104; +pub const SYS_keyctl: c_int = 219; +pub const SYS_kill: c_int = 129; +pub const SYS_lchown: c_int = 1032; +pub const SYS_lgetxattr: c_int = 9; +pub const SYS_linkat: c_int = 37; +pub const SYS_link: c_int = 1025; +pub const SYS_listen: c_int = 201; +pub const SYS_listxattr: c_int = 11; +pub const SYS_llistxattr: c_int = 12; +pub const SYS__llseek: c_int = 62; +pub const SYS_lookup_dcookie: c_int = 18; +pub const SYS_lremovexattr: c_int = 15; +pub const SYS_lseek: c_int = 62; +pub const SYS_lsetxattr: c_int = 6; +pub const SYS_lstat64: c_int = 1039; +pub const SYS_lstat: c_int = 1039; +pub const SYS_madvise: c_int = 233; +pub const SYS_mbind: c_int = 235; +pub const SYS_memfd_create: c_int = 279; +pub const SYS_migrate_pages: c_int = 238; +pub const SYS_mincore: c_int = 232; +pub const SYS_mkdirat: c_int = 34; +pub const SYS_mkdir: c_int = 1030; +pub const SYS_mknodat: c_int = 33; +pub const SYS_mknod: c_int = 1027; +pub const SYS_mlockall: c_int = 230; +pub const SYS_mlock: c_int = 228; +pub const SYS_mmap2: c_int = 222; +pub const SYS_mount: c_int = 40; +pub const SYS_move_pages: c_int = 239; +pub const SYS_mprotect: c_int = 226; +pub const SYS_mq_getsetattr: c_int = 185; +pub const SYS_mq_notify: c_int = 184; +pub const SYS_mq_open: c_int = 180; +pub const SYS_mq_timedreceive: c_int = 183; +pub const SYS_mq_timedsend: c_int = 182; +pub const SYS_mq_unlink: c_int = 181; +pub const SYS_mremap: c_int = 216; +pub const SYS_msgctl: c_int = 187; +pub const SYS_msgget: c_int = 186; +pub const SYS_msgrcv: c_int = 188; +pub const SYS_msgsnd: c_int = 189; +pub const SYS_msync: c_int = 227; +pub const SYS_munlockall: c_int = 231; +pub const SYS_munlock: c_int = 229; +pub const SYS_munmap: c_int = 215; +pub const SYS_name_to_handle_at: c_int = 264; +pub const SYS_nanosleep: c_int = 101; +pub const SYS_newfstatat: c_int = 79; +pub const SYS_nfsservctl: c_int = 42; +pub const SYS_oldwait4: c_int = 1072; +pub const SYS_openat: c_int = 56; +pub const SYS_open_by_handle_at: c_int = 265; +pub const SYS_open: c_int = 1024; +pub const SYS_pause: c_int = 1061; +pub const SYS_perf_event_open: c_int = 241; +pub const SYS_personality: c_int = 92; +pub const SYS_pipe2: c_int = 59; +pub const SYS_pipe: c_int = 1040; +pub const SYS_pivot_root: c_int = 41; +pub const SYS_poll: c_int = 1068; +pub const SYS_ppoll: c_int = 73; +pub const SYS_prctl: c_int = 167; +pub const SYS_pread64: c_int = 67; +pub const SYS_preadv: c_int = 69; +pub const SYS_prlimit64: c_int = 261; +pub const SYS_process_vm_readv: c_int = 270; +pub const SYS_process_vm_writev: c_int = 271; +pub const SYS_pselect6: c_int = 72; +pub const SYS_ptrace: c_int = 117; +pub const SYS_pwrite64: c_int = 68; +pub const SYS_pwritev: c_int = 70; +pub const SYS_quotactl: c_int = 60; +pub const SYS_readahead: c_int = 213; +pub const SYS_read: c_int = 63; +pub const SYS_readlinkat: c_int = 78; +pub const SYS_readlink: c_int = 1035; +pub const SYS_readv: c_int = 65; +pub const SYS_reboot: c_int = 142; +pub const SYS_recv: c_int = 1073; +pub const SYS_recvfrom: c_int = 207; +pub const SYS_recvmmsg: c_int = 243; +pub const SYS_recvmsg: c_int = 212; +pub const SYS_remap_file_pages: c_int = 234; +pub const SYS_removexattr: c_int = 14; +pub const SYS_renameat2: c_int = 276; +pub const SYS_renameat: c_int = 38; +pub const SYS_rename: c_int = 1034; +pub const SYS_request_key: c_int = 218; +pub const SYS_restart_syscall: c_int = 128; +pub const SYS_rmdir: c_int = 1031; +pub const SYS_rt_sigaction: c_int = 134; +pub const SYS_rt_sigpending: c_int = 136; +pub const SYS_rt_sigprocmask: c_int = 135; +pub const SYS_rt_sigqueueinfo: c_int = 138; +pub const SYS_rt_sigreturn: c_int = 139; +pub const SYS_rt_sigsuspend: c_int = 133; +pub const SYS_rt_sigtimedwait: c_int = 137; +pub const SYS_rt_tgsigqueueinfo: c_int = 240; +pub const SYS_sched_getaffinity: c_int = 123; +pub const SYS_sched_getattr: c_int = 275; +pub const SYS_sched_getparam: c_int = 121; +pub const SYS_sched_get_priority_max: c_int = 125; +pub const SYS_sched_get_priority_min: c_int = 126; +pub const SYS_sched_getscheduler: c_int = 120; +pub const SYS_sched_rr_get_interval: c_int = 127; +pub const SYS_sched_setaffinity: c_int = 122; +pub const SYS_sched_setattr: c_int = 274; +pub const SYS_sched_setparam: c_int = 118; +pub const SYS_sched_setscheduler: c_int = 119; +pub const SYS_sched_yield: c_int = 124; +pub const SYS_seccomp: c_int = 277; +pub const SYS_select: c_int = 1067; +pub const SYS_semctl: c_int = 191; +pub const SYS_semget: c_int = 190; +pub const SYS_semop: c_int = 193; +pub const SYS_semtimedop: c_int = 192; +pub const SYS_send: c_int = 1074; +pub const SYS_sendfile64: c_int = 71; +pub const SYS_sendfile: c_int = 71; +pub const SYS_sendmmsg: c_int = 269; +pub const SYS_sendmsg: c_int = 211; +pub const SYS_sendto: c_int = 206; +pub const SYS_setdomainname: c_int = 162; +pub const SYS_setfsgid: c_int = 152; +pub const SYS_setfsuid: c_int = 151; +pub const SYS_setgid: c_int = 144; +pub const SYS_setgroups: c_int = 159; +pub const SYS_sethostname: c_int = 161; +pub const SYS_setitimer: c_int = 103; +pub const SYS_set_mempolicy: c_int = 237; +pub const SYS_setns: c_int = 268; +pub const SYS_setpgid: c_int = 154; +pub const SYS_setpriority: c_int = 140; +pub const SYS_setregid: c_int = 143; +pub const SYS_setresgid: c_int = 149; +pub const SYS_setresuid: c_int = 147; +pub const SYS_setreuid: c_int = 145; +pub const SYS_setrlimit: c_int = 164; +pub const SYS_set_robust_list: c_int = 99; +pub const SYS_setsid: c_int = 157; +pub const SYS_setsockopt: c_int = 208; +pub const SYS_set_tid_address: c_int = 96; +pub const SYS_settimeofday: c_int = 170; +pub const SYS_setuid: c_int = 146; +pub const SYS_setxattr: c_int = 5; +pub const SYS_shmat: c_int = 196; +pub const SYS_shmctl: c_int = 195; +pub const SYS_shmdt: c_int = 197; +pub const SYS_shmget: c_int = 194; +pub const SYS_shutdown: c_int = 210; +pub const SYS_sigaltstack: c_int = 132; +pub const SYS_signalfd4: c_int = 74; +pub const SYS_signalfd: c_int = 1045; +pub const SYS_socket: c_int = 198; +pub const SYS_socketpair: c_int = 199; +pub const SYS_splice: c_int = 76; +pub const SYS_stat64: c_int = 1038; +pub const SYS_stat: c_int = 1038; +pub const SYS_statfs64: c_int = 43; +pub const SYS_swapoff: c_int = 225; +pub const SYS_swapon: c_int = 224; +pub const SYS_symlinkat: c_int = 36; +pub const SYS_symlink: c_int = 1036; +pub const SYS_sync: c_int = 81; +pub const SYS_sync_file_range2: c_int = 84; +pub const SYS_sync_file_range: c_int = 84; +pub const SYS_syncfs: c_int = 267; +pub const SYS_syscalls: c_int = 1080; +pub const SYS__sysctl: c_int = 1078; +pub const SYS_sysinfo: c_int = 179; +pub const SYS_syslog: c_int = 116; +pub const SYS_tee: c_int = 77; +pub const SYS_tgkill: c_int = 131; +pub const SYS_time: c_int = 1062; +pub const SYS_timer_create: c_int = 107; +pub const SYS_timer_delete: c_int = 111; +pub const SYS_timerfd_create: c_int = 85; +pub const SYS_timerfd_gettime: c_int = 87; +pub const SYS_timerfd_settime: c_int = 86; +pub const SYS_timer_getoverrun: c_int = 109; +pub const SYS_timer_gettime: c_int = 108; +pub const SYS_timer_settime: c_int = 110; +pub const SYS_times: c_int = 153; +pub const SYS_tkill: c_int = 130; +pub const SYS_truncate64: c_int = 45; +pub const SYS_truncate: c_int = 45; +pub const SYS_umask: c_int = 166; +pub const SYS_umount2: c_int = 39; +pub const SYS_umount: c_int = 1076; +pub const SYS_uname: c_int = 160; +pub const SYS_unlinkat: c_int = 35; +pub const SYS_unlink: c_int = 1026; +pub const SYS_unshare: c_int = 97; +pub const SYS_uselib: c_int = 1077; +pub const SYS_ustat: c_int = 1070; +pub const SYS_utime: c_int = 1063; +pub const SYS_utimensat: c_int = 88; +pub const SYS_utimes: c_int = 1037; +pub const SYS_vfork: c_int = 1071; +pub const SYS_vhangup: c_int = 58; +pub const SYS_vmsplice: c_int = 75; +pub const SYS_wait4: c_int = 260; +pub const SYS_waitid: c_int = 95; +pub const SYS_write: c_int = 64; +pub const SYS_writev: c_int = 66; +pub const SYS_statx: c_int = 291; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const TIOCM_LOOP: c_int = 32768; +pub const TIOCM_OUT1: c_int = 8192; +pub const TIOCM_OUT2: c_int = 16384; +pub const TIOCSER_TEMT: c_int = 1; +pub const TOSTOP: c_int = 256; +pub const VEOF: c_int = 4; +pub const VEOL2: c_int = 16; +pub const VEOL: c_int = 11; +pub const VMIN: c_int = 6; diff --git a/src/unix/linux_like/linux/musl/b32/mips/mod.rs b/src/unix/linux_like/linux/musl/b32/mips/mod.rs index 39af8372d54e8..af64d4d462324 100644 --- a/src/unix/linux_like/linux/musl/b32/mips/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mips/mod.rs @@ -1,138 +1,140 @@ +use crate::{c_int, c_long, c_short, c_ulong, c_void, off_t, size_t}; + pub type c_char = i8; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; s! { pub struct stat { - pub st_dev: ::dev_t, - __st_padding1: [::c_long; 2], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_padding2: [::c_long; 2], - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - __st_padding3: ::c_long, - pub st_blocks: ::blkcnt_t, - __st_padding4: [::c_long; 14], + pub st_dev: crate::dev_t, + __st_padding1: [c_long; 2], + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_padding2: [c_long; 2], + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + __st_padding3: c_long, + pub st_blocks: crate::blkcnt_t, + __st_padding4: [c_long; 14], } pub struct stat64 { - pub st_dev: ::dev_t, - __st_padding1: [::c_long; 2], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_padding2: [::c_long; 2], - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - __st_padding3: ::c_long, - pub st_blocks: ::blkcnt64_t, - __st_padding4: [::c_long; 14], + pub st_dev: crate::dev_t, + __st_padding1: [c_long; 2], + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_padding2: [c_long; 2], + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + __st_padding3: c_long, + pub st_blocks: crate::blkcnt64_t, + __st_padding4: [c_long; 14], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, + pub msg_perm: crate::ipc_perm, #[cfg(target_endian = "big")] - __unused1: ::c_int, - pub msg_stime: ::time_t, + __unused1: c_int, + pub msg_stime: crate::time_t, #[cfg(target_endian = "little")] - __unused1: ::c_int, + __unused1: c_int, #[cfg(target_endian = "big")] - __unused2: ::c_int, - pub msg_rtime: ::time_t, + __unused2: c_int, + pub msg_rtime: crate::time_t, #[cfg(target_endian = "little")] - __unused2: ::c_int, + __unused2: c_int, #[cfg(target_endian = "big")] - __unused3: ::c_int, - pub msg_ctime: ::time_t, + __unused3: c_int, + pub msg_ctime: crate::time_t, #[cfg(target_endian = "little")] - __unused3: ::c_int, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + __unused3: c_int, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 5], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 5], } pub struct statfs64 { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 5], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 5], } } @@ -144,28 +146,28 @@ s_no_extra_traits! { } } -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; -pub const O_DIRECT: ::c_int = 0o100000; -pub const O_DIRECTORY: ::c_int = 0o200000; -pub const O_NOFOLLOW: ::c_int = 0o400000; -pub const O_ASYNC: ::c_int = 0o10000; -pub const O_LARGEFILE: ::c_int = 0x2000; +pub const O_DIRECT: c_int = 0o100000; +pub const O_DIRECTORY: c_int = 0o200000; +pub const O_NOFOLLOW: c_int = 0o400000; +pub const O_ASYNC: c_int = 0o10000; +pub const O_LARGEFILE: c_int = 0x2000; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -173,590 +175,590 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; -pub const O_APPEND: ::c_int = 0o010; -pub const O_CREAT: ::c_int = 0o400; -pub const O_EXCL: ::c_int = 0o2000; -pub const O_NOCTTY: ::c_int = 0o4000; -pub const O_NONBLOCK: ::c_int = 0o200; -pub const O_SYNC: ::c_int = 0o40020; -pub const O_RSYNC: ::c_int = 0o40020; -pub const O_DSYNC: ::c_int = 0o020; +pub const O_APPEND: c_int = 0o010; +pub const O_CREAT: c_int = 0o400; +pub const O_EXCL: c_int = 0o2000; +pub const O_NOCTTY: c_int = 0o4000; +pub const O_NONBLOCK: c_int = 0o200; +pub const O_SYNC: c_int = 0o40020; +pub const O_RSYNC: c_int = 0o40020; +pub const O_DSYNC: c_int = 0o020; -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_NORESERVE: ::c_int = 0x0400; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; -pub const MAP_STACK: ::c_int = 0x40000; -pub const MAP_HUGETLB: ::c_int = 0x80000; +pub const MAP_ANON: c_int = 0x800; +pub const MAP_GROWSDOWN: c_int = 0x1000; +pub const MAP_DENYWRITE: c_int = 0x2000; +pub const MAP_EXECUTABLE: c_int = 0x4000; +pub const MAP_LOCKED: c_int = 0x8000; +pub const MAP_NORESERVE: c_int = 0x0400; +pub const MAP_POPULATE: c_int = 0x10000; +pub const MAP_NONBLOCK: c_int = 0x20000; +pub const MAP_STACK: c_int = 0x40000; +pub const MAP_HUGETLB: c_int = 0x80000; -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const EHWPOISON: ::c_int = 168; -pub const ERFKILL: ::c_int = 167; +pub const EDEADLK: c_int = 45; +pub const ENAMETOOLONG: c_int = 78; +pub const ENOLCK: c_int = 46; +pub const ENOSYS: c_int = 89; +pub const ENOTEMPTY: c_int = 93; +pub const ELOOP: c_int = 90; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EDEADLOCK: c_int = 56; +pub const EMULTIHOP: c_int = 74; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EBADMSG: c_int = 77; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const EUSERS: c_int = 94; +pub const ENOTSOCK: c_int = 95; +pub const EDESTADDRREQ: c_int = 96; +pub const EMSGSIZE: c_int = 97; +pub const EPROTOTYPE: c_int = 98; +pub const ENOPROTOOPT: c_int = 99; +pub const EPROTONOSUPPORT: c_int = 120; +pub const ESOCKTNOSUPPORT: c_int = 121; +pub const EOPNOTSUPP: c_int = 122; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 123; +pub const EAFNOSUPPORT: c_int = 124; +pub const EADDRINUSE: c_int = 125; +pub const EADDRNOTAVAIL: c_int = 126; +pub const ENETDOWN: c_int = 127; +pub const ENETUNREACH: c_int = 128; +pub const ENETRESET: c_int = 129; +pub const ECONNABORTED: c_int = 130; +pub const ECONNRESET: c_int = 131; +pub const ENOBUFS: c_int = 132; +pub const EISCONN: c_int = 133; +pub const ENOTCONN: c_int = 134; +pub const ESHUTDOWN: c_int = 143; +pub const ETOOMANYREFS: c_int = 144; +pub const ETIMEDOUT: c_int = 145; +pub const ECONNREFUSED: c_int = 146; +pub const EHOSTDOWN: c_int = 147; +pub const EHOSTUNREACH: c_int = 148; +pub const EALREADY: c_int = 149; +pub const EINPROGRESS: c_int = 150; +pub const ESTALE: c_int = 151; +pub const EUCLEAN: c_int = 135; +pub const ENOTNAM: c_int = 137; +pub const ENAVAIL: c_int = 138; +pub const EISNAM: c_int = 139; +pub const EREMOTEIO: c_int = 140; +pub const EDQUOT: c_int = 1133; +pub const ENOMEDIUM: c_int = 159; +pub const EMEDIUMTYPE: c_int = 160; +pub const ECANCELED: c_int = 158; +pub const ENOKEY: c_int = 161; +pub const EKEYEXPIRED: c_int = 162; +pub const EKEYREVOKED: c_int = 163; +pub const EKEYREJECTED: c_int = 164; +pub const EOWNERDEAD: c_int = 165; +pub const ENOTRECOVERABLE: c_int = 166; +pub const EHWPOISON: c_int = 168; +pub const ERFKILL: c_int = 167; -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; +pub const SOCK_STREAM: c_int = 2; +pub const SOCK_DGRAM: c_int = 1; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 8; -pub const SA_NOCLDWAIT: ::c_int = 0x10000; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 8; +pub const SA_NOCLDWAIT: c_int = 0x10000; -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGSTKFLT: ::c_int = 7; -pub const SIGPOLL: ::c_int = ::SIGIO; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; +pub const SIGCHLD: c_int = 18; +pub const SIGBUS: c_int = 10; +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGWINCH: c_int = 20; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGCONT: c_int = 25; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGURG: c_int = 21; +pub const SIGIO: c_int = 22; +pub const SIGSYS: c_int = 12; +pub const SIGSTKFLT: c_int = 7; +pub const SIGPOLL: c_int = crate::SIGIO; +pub const SIGPWR: c_int = 19; +pub const SIG_SETMASK: c_int = 3; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; -pub const EXTPROC: ::tcflag_t = 0o200000; +pub const EXTPROC: crate::tcflag_t = 0o200000; -pub const F_GETLK: ::c_int = 33; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETLK: ::c_int = 34; -pub const F_SETLKW: ::c_int = 35; -pub const F_SETOWN: ::c_int = 24; +pub const F_GETLK: c_int = 33; +pub const F_GETOWN: c_int = 23; +pub const F_SETLK: c_int = 34; +pub const F_SETLKW: c_int = 35; +pub const F_SETOWN: c_int = 24; pub const VEOF: usize = 16; pub const VEOL: usize = 17; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0o000400; -pub const TOSTOP: ::tcflag_t = 0o100000; -pub const FLUSHO: ::tcflag_t = 0o020000; +pub const IEXTEN: crate::tcflag_t = 0o000400; +pub const TOSTOP: crate::tcflag_t = 0o100000; +pub const FLUSHO: crate::tcflag_t = 0o020000; -pub const POLLWRNORM: ::c_short = 0x4; -pub const POLLWRBAND: ::c_short = 0x100; +pub const POLLWRNORM: c_short = 0x4; +pub const POLLWRBAND: c_short = 0x100; -pub const SYS_syscall: ::c_long = 4000 + 0; -pub const SYS_exit: ::c_long = 4000 + 1; -pub const SYS_fork: ::c_long = 4000 + 2; -pub const SYS_read: ::c_long = 4000 + 3; -pub const SYS_write: ::c_long = 4000 + 4; -pub const SYS_open: ::c_long = 4000 + 5; -pub const SYS_close: ::c_long = 4000 + 6; -pub const SYS_waitpid: ::c_long = 4000 + 7; -pub const SYS_creat: ::c_long = 4000 + 8; -pub const SYS_link: ::c_long = 4000 + 9; -pub const SYS_unlink: ::c_long = 4000 + 10; -pub const SYS_execve: ::c_long = 4000 + 11; -pub const SYS_chdir: ::c_long = 4000 + 12; -pub const SYS_time: ::c_long = 4000 + 13; -pub const SYS_mknod: ::c_long = 4000 + 14; -pub const SYS_chmod: ::c_long = 4000 + 15; -pub const SYS_lchown: ::c_long = 4000 + 16; -pub const SYS_break: ::c_long = 4000 + 17; -pub const SYS_lseek: ::c_long = 4000 + 19; -pub const SYS_getpid: ::c_long = 4000 + 20; -pub const SYS_mount: ::c_long = 4000 + 21; -pub const SYS_umount: ::c_long = 4000 + 22; -pub const SYS_setuid: ::c_long = 4000 + 23; -pub const SYS_getuid: ::c_long = 4000 + 24; -pub const SYS_stime: ::c_long = 4000 + 25; -pub const SYS_ptrace: ::c_long = 4000 + 26; -pub const SYS_alarm: ::c_long = 4000 + 27; -pub const SYS_pause: ::c_long = 4000 + 29; -pub const SYS_utime: ::c_long = 4000 + 30; -pub const SYS_stty: ::c_long = 4000 + 31; -pub const SYS_gtty: ::c_long = 4000 + 32; -pub const SYS_access: ::c_long = 4000 + 33; -pub const SYS_nice: ::c_long = 4000 + 34; -pub const SYS_ftime: ::c_long = 4000 + 35; -pub const SYS_sync: ::c_long = 4000 + 36; -pub const SYS_kill: ::c_long = 4000 + 37; -pub const SYS_rename: ::c_long = 4000 + 38; -pub const SYS_mkdir: ::c_long = 4000 + 39; -pub const SYS_rmdir: ::c_long = 4000 + 40; -pub const SYS_dup: ::c_long = 4000 + 41; -pub const SYS_pipe: ::c_long = 4000 + 42; -pub const SYS_times: ::c_long = 4000 + 43; -pub const SYS_prof: ::c_long = 4000 + 44; -pub const SYS_brk: ::c_long = 4000 + 45; -pub const SYS_setgid: ::c_long = 4000 + 46; -pub const SYS_getgid: ::c_long = 4000 + 47; -pub const SYS_signal: ::c_long = 4000 + 48; -pub const SYS_geteuid: ::c_long = 4000 + 49; -pub const SYS_getegid: ::c_long = 4000 + 50; -pub const SYS_acct: ::c_long = 4000 + 51; -pub const SYS_umount2: ::c_long = 4000 + 52; -pub const SYS_lock: ::c_long = 4000 + 53; -pub const SYS_ioctl: ::c_long = 4000 + 54; -pub const SYS_fcntl: ::c_long = 4000 + 55; -pub const SYS_mpx: ::c_long = 4000 + 56; -pub const SYS_setpgid: ::c_long = 4000 + 57; -pub const SYS_ulimit: ::c_long = 4000 + 58; -pub const SYS_umask: ::c_long = 4000 + 60; -pub const SYS_chroot: ::c_long = 4000 + 61; -pub const SYS_ustat: ::c_long = 4000 + 62; -pub const SYS_dup2: ::c_long = 4000 + 63; -pub const SYS_getppid: ::c_long = 4000 + 64; -pub const SYS_getpgrp: ::c_long = 4000 + 65; -pub const SYS_setsid: ::c_long = 4000 + 66; -pub const SYS_sigaction: ::c_long = 4000 + 67; -pub const SYS_sgetmask: ::c_long = 4000 + 68; -pub const SYS_ssetmask: ::c_long = 4000 + 69; -pub const SYS_setreuid: ::c_long = 4000 + 70; -pub const SYS_setregid: ::c_long = 4000 + 71; -pub const SYS_sigsuspend: ::c_long = 4000 + 72; -pub const SYS_sigpending: ::c_long = 4000 + 73; -pub const SYS_sethostname: ::c_long = 4000 + 74; -pub const SYS_setrlimit: ::c_long = 4000 + 75; -pub const SYS_getrlimit: ::c_long = 4000 + 76; -pub const SYS_getrusage: ::c_long = 4000 + 77; -pub const SYS_gettimeofday: ::c_long = 4000 + 78; -pub const SYS_settimeofday: ::c_long = 4000 + 79; -pub const SYS_getgroups: ::c_long = 4000 + 80; -pub const SYS_setgroups: ::c_long = 4000 + 81; -pub const SYS_symlink: ::c_long = 4000 + 83; -pub const SYS_readlink: ::c_long = 4000 + 85; -pub const SYS_uselib: ::c_long = 4000 + 86; -pub const SYS_swapon: ::c_long = 4000 + 87; -pub const SYS_reboot: ::c_long = 4000 + 88; -pub const SYS_readdir: ::c_long = 4000 + 89; -pub const SYS_mmap: ::c_long = 4000 + 90; -pub const SYS_munmap: ::c_long = 4000 + 91; -pub const SYS_truncate: ::c_long = 4000 + 92; -pub const SYS_ftruncate: ::c_long = 4000 + 93; -pub const SYS_fchmod: ::c_long = 4000 + 94; -pub const SYS_fchown: ::c_long = 4000 + 95; -pub const SYS_getpriority: ::c_long = 4000 + 96; -pub const SYS_setpriority: ::c_long = 4000 + 97; -pub const SYS_profil: ::c_long = 4000 + 98; -pub const SYS_statfs: ::c_long = 4000 + 99; -pub const SYS_fstatfs: ::c_long = 4000 + 100; -pub const SYS_ioperm: ::c_long = 4000 + 101; -pub const SYS_socketcall: ::c_long = 4000 + 102; -pub const SYS_syslog: ::c_long = 4000 + 103; -pub const SYS_setitimer: ::c_long = 4000 + 104; -pub const SYS_getitimer: ::c_long = 4000 + 105; -pub const SYS_stat: ::c_long = 4000 + 106; -pub const SYS_lstat: ::c_long = 4000 + 107; -pub const SYS_fstat: ::c_long = 4000 + 108; -pub const SYS_iopl: ::c_long = 4000 + 110; -pub const SYS_vhangup: ::c_long = 4000 + 111; -pub const SYS_idle: ::c_long = 4000 + 112; -pub const SYS_vm86: ::c_long = 4000 + 113; -pub const SYS_wait4: ::c_long = 4000 + 114; -pub const SYS_swapoff: ::c_long = 4000 + 115; -pub const SYS_sysinfo: ::c_long = 4000 + 116; -pub const SYS_ipc: ::c_long = 4000 + 117; -pub const SYS_fsync: ::c_long = 4000 + 118; -pub const SYS_sigreturn: ::c_long = 4000 + 119; -pub const SYS_clone: ::c_long = 4000 + 120; -pub const SYS_setdomainname: ::c_long = 4000 + 121; -pub const SYS_uname: ::c_long = 4000 + 122; -pub const SYS_modify_ldt: ::c_long = 4000 + 123; -pub const SYS_adjtimex: ::c_long = 4000 + 124; -pub const SYS_mprotect: ::c_long = 4000 + 125; -pub const SYS_sigprocmask: ::c_long = 4000 + 126; -pub const SYS_create_module: ::c_long = 4000 + 127; -pub const SYS_init_module: ::c_long = 4000 + 128; -pub const SYS_delete_module: ::c_long = 4000 + 129; -pub const SYS_get_kernel_syms: ::c_long = 4000 + 130; -pub const SYS_quotactl: ::c_long = 4000 + 131; -pub const SYS_getpgid: ::c_long = 4000 + 132; -pub const SYS_fchdir: ::c_long = 4000 + 133; -pub const SYS_bdflush: ::c_long = 4000 + 134; -pub const SYS_sysfs: ::c_long = 4000 + 135; -pub const SYS_personality: ::c_long = 4000 + 136; -pub const SYS_afs_syscall: ::c_long = 4000 + 137; -pub const SYS_setfsuid: ::c_long = 4000 + 138; -pub const SYS_setfsgid: ::c_long = 4000 + 139; -pub const SYS__llseek: ::c_long = 4000 + 140; -pub const SYS_getdents: ::c_long = 4000 + 141; -pub const SYS_flock: ::c_long = 4000 + 143; -pub const SYS_msync: ::c_long = 4000 + 144; -pub const SYS_readv: ::c_long = 4000 + 145; -pub const SYS_writev: ::c_long = 4000 + 146; -pub const SYS_cacheflush: ::c_long = 4000 + 147; -pub const SYS_cachectl: ::c_long = 4000 + 148; -pub const SYS_sysmips: ::c_long = 4000 + 149; -pub const SYS_getsid: ::c_long = 4000 + 151; -pub const SYS_fdatasync: ::c_long = 4000 + 152; -pub const SYS__sysctl: ::c_long = 4000 + 153; -pub const SYS_mlock: ::c_long = 4000 + 154; -pub const SYS_munlock: ::c_long = 4000 + 155; -pub const SYS_mlockall: ::c_long = 4000 + 156; -pub const SYS_munlockall: ::c_long = 4000 + 157; -pub const SYS_sched_setparam: ::c_long = 4000 + 158; -pub const SYS_sched_getparam: ::c_long = 4000 + 159; -pub const SYS_sched_setscheduler: ::c_long = 4000 + 160; -pub const SYS_sched_getscheduler: ::c_long = 4000 + 161; -pub const SYS_sched_yield: ::c_long = 4000 + 162; -pub const SYS_sched_get_priority_max: ::c_long = 4000 + 163; -pub const SYS_sched_get_priority_min: ::c_long = 4000 + 164; -pub const SYS_sched_rr_get_interval: ::c_long = 4000 + 165; -pub const SYS_nanosleep: ::c_long = 4000 + 166; -pub const SYS_mremap: ::c_long = 4000 + 167; -pub const SYS_accept: ::c_long = 4000 + 168; -pub const SYS_bind: ::c_long = 4000 + 169; -pub const SYS_connect: ::c_long = 4000 + 170; -pub const SYS_getpeername: ::c_long = 4000 + 171; -pub const SYS_getsockname: ::c_long = 4000 + 172; -pub const SYS_getsockopt: ::c_long = 4000 + 173; -pub const SYS_listen: ::c_long = 4000 + 174; -pub const SYS_recv: ::c_long = 4000 + 175; -pub const SYS_recvfrom: ::c_long = 4000 + 176; -pub const SYS_recvmsg: ::c_long = 4000 + 177; -pub const SYS_send: ::c_long = 4000 + 178; -pub const SYS_sendmsg: ::c_long = 4000 + 179; -pub const SYS_sendto: ::c_long = 4000 + 180; -pub const SYS_setsockopt: ::c_long = 4000 + 181; -pub const SYS_shutdown: ::c_long = 4000 + 182; -pub const SYS_socket: ::c_long = 4000 + 183; -pub const SYS_socketpair: ::c_long = 4000 + 184; -pub const SYS_setresuid: ::c_long = 4000 + 185; -pub const SYS_getresuid: ::c_long = 4000 + 186; -pub const SYS_query_module: ::c_long = 4000 + 187; -pub const SYS_poll: ::c_long = 4000 + 188; -pub const SYS_nfsservctl: ::c_long = 4000 + 189; -pub const SYS_setresgid: ::c_long = 4000 + 190; -pub const SYS_getresgid: ::c_long = 4000 + 191; -pub const SYS_prctl: ::c_long = 4000 + 192; -pub const SYS_rt_sigreturn: ::c_long = 4000 + 193; -pub const SYS_rt_sigaction: ::c_long = 4000 + 194; -pub const SYS_rt_sigprocmask: ::c_long = 4000 + 195; -pub const SYS_rt_sigpending: ::c_long = 4000 + 196; -pub const SYS_rt_sigtimedwait: ::c_long = 4000 + 197; -pub const SYS_rt_sigqueueinfo: ::c_long = 4000 + 198; -pub const SYS_rt_sigsuspend: ::c_long = 4000 + 199; -pub const SYS_chown: ::c_long = 4000 + 202; -pub const SYS_getcwd: ::c_long = 4000 + 203; -pub const SYS_capget: ::c_long = 4000 + 204; -pub const SYS_capset: ::c_long = 4000 + 205; -pub const SYS_sigaltstack: ::c_long = 4000 + 206; -pub const SYS_sendfile: ::c_long = 4000 + 207; -pub const SYS_getpmsg: ::c_long = 4000 + 208; -pub const SYS_putpmsg: ::c_long = 4000 + 209; -pub const SYS_mmap2: ::c_long = 4000 + 210; -pub const SYS_truncate64: ::c_long = 4000 + 211; -pub const SYS_ftruncate64: ::c_long = 4000 + 212; -pub const SYS_stat64: ::c_long = 4000 + 213; -pub const SYS_lstat64: ::c_long = 4000 + 214; -pub const SYS_fstat64: ::c_long = 4000 + 215; -pub const SYS_pivot_root: ::c_long = 4000 + 216; -pub const SYS_mincore: ::c_long = 4000 + 217; -pub const SYS_madvise: ::c_long = 4000 + 218; -pub const SYS_getdents64: ::c_long = 4000 + 219; -pub const SYS_fcntl64: ::c_long = 4000 + 220; -pub const SYS_gettid: ::c_long = 4000 + 222; -pub const SYS_readahead: ::c_long = 4000 + 223; -pub const SYS_setxattr: ::c_long = 4000 + 224; -pub const SYS_lsetxattr: ::c_long = 4000 + 225; -pub const SYS_fsetxattr: ::c_long = 4000 + 226; -pub const SYS_getxattr: ::c_long = 4000 + 227; -pub const SYS_lgetxattr: ::c_long = 4000 + 228; -pub const SYS_fgetxattr: ::c_long = 4000 + 229; -pub const SYS_listxattr: ::c_long = 4000 + 230; -pub const SYS_llistxattr: ::c_long = 4000 + 231; -pub const SYS_flistxattr: ::c_long = 4000 + 232; -pub const SYS_removexattr: ::c_long = 4000 + 233; -pub const SYS_lremovexattr: ::c_long = 4000 + 234; -pub const SYS_fremovexattr: ::c_long = 4000 + 235; -pub const SYS_tkill: ::c_long = 4000 + 236; -pub const SYS_sendfile64: ::c_long = 4000 + 237; -pub const SYS_futex: ::c_long = 4000 + 238; -pub const SYS_sched_setaffinity: ::c_long = 4000 + 239; -pub const SYS_sched_getaffinity: ::c_long = 4000 + 240; -pub const SYS_io_setup: ::c_long = 4000 + 241; -pub const SYS_io_destroy: ::c_long = 4000 + 242; -pub const SYS_io_getevents: ::c_long = 4000 + 243; -pub const SYS_io_submit: ::c_long = 4000 + 244; -pub const SYS_io_cancel: ::c_long = 4000 + 245; -pub const SYS_exit_group: ::c_long = 4000 + 246; -pub const SYS_lookup_dcookie: ::c_long = 4000 + 247; -pub const SYS_epoll_create: ::c_long = 4000 + 248; -pub const SYS_epoll_ctl: ::c_long = 4000 + 249; -pub const SYS_epoll_wait: ::c_long = 4000 + 250; -pub const SYS_remap_file_pages: ::c_long = 4000 + 251; -pub const SYS_set_tid_address: ::c_long = 4000 + 252; -pub const SYS_restart_syscall: ::c_long = 4000 + 253; -pub const SYS_statfs64: ::c_long = 4000 + 255; -pub const SYS_fstatfs64: ::c_long = 4000 + 256; -pub const SYS_timer_create: ::c_long = 4000 + 257; -pub const SYS_timer_settime: ::c_long = 4000 + 258; -pub const SYS_timer_gettime: ::c_long = 4000 + 259; -pub const SYS_timer_getoverrun: ::c_long = 4000 + 260; -pub const SYS_timer_delete: ::c_long = 4000 + 261; -pub const SYS_clock_settime: ::c_long = 4000 + 262; -pub const SYS_clock_gettime: ::c_long = 4000 + 263; -pub const SYS_clock_getres: ::c_long = 4000 + 264; -pub const SYS_clock_nanosleep: ::c_long = 4000 + 265; -pub const SYS_tgkill: ::c_long = 4000 + 266; -pub const SYS_utimes: ::c_long = 4000 + 267; -pub const SYS_mbind: ::c_long = 4000 + 268; -pub const SYS_get_mempolicy: ::c_long = 4000 + 269; -pub const SYS_set_mempolicy: ::c_long = 4000 + 270; -pub const SYS_mq_open: ::c_long = 4000 + 271; -pub const SYS_mq_unlink: ::c_long = 4000 + 272; -pub const SYS_mq_timedsend: ::c_long = 4000 + 273; -pub const SYS_mq_timedreceive: ::c_long = 4000 + 274; -pub const SYS_mq_notify: ::c_long = 4000 + 275; -pub const SYS_mq_getsetattr: ::c_long = 4000 + 276; -pub const SYS_vserver: ::c_long = 4000 + 277; -pub const SYS_waitid: ::c_long = 4000 + 278; -/* pub const SYS_sys_setaltroot: ::c_long = 4000 + 279; */ -pub const SYS_add_key: ::c_long = 4000 + 280; -pub const SYS_request_key: ::c_long = 4000 + 281; -pub const SYS_keyctl: ::c_long = 4000 + 282; -pub const SYS_set_thread_area: ::c_long = 4000 + 283; -pub const SYS_inotify_init: ::c_long = 4000 + 284; -pub const SYS_inotify_add_watch: ::c_long = 4000 + 285; -pub const SYS_inotify_rm_watch: ::c_long = 4000 + 286; -pub const SYS_migrate_pages: ::c_long = 4000 + 287; -pub const SYS_openat: ::c_long = 4000 + 288; -pub const SYS_mkdirat: ::c_long = 4000 + 289; -pub const SYS_mknodat: ::c_long = 4000 + 290; -pub const SYS_fchownat: ::c_long = 4000 + 291; -pub const SYS_futimesat: ::c_long = 4000 + 292; -pub const SYS_unlinkat: ::c_long = 4000 + 294; -pub const SYS_renameat: ::c_long = 4000 + 295; -pub const SYS_linkat: ::c_long = 4000 + 296; -pub const SYS_symlinkat: ::c_long = 4000 + 297; -pub const SYS_readlinkat: ::c_long = 4000 + 298; -pub const SYS_fchmodat: ::c_long = 4000 + 299; -pub const SYS_faccessat: ::c_long = 4000 + 300; -pub const SYS_pselect6: ::c_long = 4000 + 301; -pub const SYS_ppoll: ::c_long = 4000 + 302; -pub const SYS_unshare: ::c_long = 4000 + 303; -pub const SYS_splice: ::c_long = 4000 + 304; -pub const SYS_sync_file_range: ::c_long = 4000 + 305; -pub const SYS_tee: ::c_long = 4000 + 306; -pub const SYS_vmsplice: ::c_long = 4000 + 307; -pub const SYS_move_pages: ::c_long = 4000 + 308; -pub const SYS_set_robust_list: ::c_long = 4000 + 309; -pub const SYS_get_robust_list: ::c_long = 4000 + 310; -pub const SYS_kexec_load: ::c_long = 4000 + 311; -pub const SYS_getcpu: ::c_long = 4000 + 312; -pub const SYS_epoll_pwait: ::c_long = 4000 + 313; -pub const SYS_ioprio_set: ::c_long = 4000 + 314; -pub const SYS_ioprio_get: ::c_long = 4000 + 315; -pub const SYS_utimensat: ::c_long = 4000 + 316; -pub const SYS_signalfd: ::c_long = 4000 + 317; -pub const SYS_timerfd: ::c_long = 4000 + 318; -pub const SYS_eventfd: ::c_long = 4000 + 319; -pub const SYS_fallocate: ::c_long = 4000 + 320; -pub const SYS_timerfd_create: ::c_long = 4000 + 321; -pub const SYS_timerfd_gettime: ::c_long = 4000 + 322; -pub const SYS_timerfd_settime: ::c_long = 4000 + 323; -pub const SYS_signalfd4: ::c_long = 4000 + 324; -pub const SYS_eventfd2: ::c_long = 4000 + 325; -pub const SYS_epoll_create1: ::c_long = 4000 + 326; -pub const SYS_dup3: ::c_long = 4000 + 327; -pub const SYS_pipe2: ::c_long = 4000 + 328; -pub const SYS_inotify_init1: ::c_long = 4000 + 329; -pub const SYS_preadv: ::c_long = 4000 + 330; -pub const SYS_pwritev: ::c_long = 4000 + 331; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 4000 + 332; -pub const SYS_perf_event_open: ::c_long = 4000 + 333; -pub const SYS_accept4: ::c_long = 4000 + 334; -pub const SYS_recvmmsg: ::c_long = 4000 + 335; -pub const SYS_fanotify_init: ::c_long = 4000 + 336; -pub const SYS_fanotify_mark: ::c_long = 4000 + 337; -pub const SYS_prlimit64: ::c_long = 4000 + 338; -pub const SYS_name_to_handle_at: ::c_long = 4000 + 339; -pub const SYS_open_by_handle_at: ::c_long = 4000 + 340; -pub const SYS_clock_adjtime: ::c_long = 4000 + 341; -pub const SYS_syncfs: ::c_long = 4000 + 342; -pub const SYS_sendmmsg: ::c_long = 4000 + 343; -pub const SYS_setns: ::c_long = 4000 + 344; -pub const SYS_process_vm_readv: ::c_long = 4000 + 345; -pub const SYS_process_vm_writev: ::c_long = 4000 + 346; -pub const SYS_kcmp: ::c_long = 4000 + 347; -pub const SYS_finit_module: ::c_long = 4000 + 348; -pub const SYS_sched_setattr: ::c_long = 4000 + 349; -pub const SYS_sched_getattr: ::c_long = 4000 + 350; -pub const SYS_renameat2: ::c_long = 4000 + 351; -pub const SYS_seccomp: ::c_long = 4000 + 352; -pub const SYS_getrandom: ::c_long = 4000 + 353; -pub const SYS_memfd_create: ::c_long = 4000 + 354; -pub const SYS_bpf: ::c_long = 4000 + 355; -pub const SYS_execveat: ::c_long = 4000 + 356; -pub const SYS_userfaultfd: ::c_long = 4000 + 357; -pub const SYS_membarrier: ::c_long = 4000 + 358; -pub const SYS_mlock2: ::c_long = 4000 + 359; -pub const SYS_copy_file_range: ::c_long = 4000 + 360; -pub const SYS_preadv2: ::c_long = 4000 + 361; -pub const SYS_pwritev2: ::c_long = 4000 + 362; -pub const SYS_pkey_mprotect: ::c_long = 4000 + 363; -pub const SYS_pkey_alloc: ::c_long = 4000 + 364; -pub const SYS_pkey_free: ::c_long = 4000 + 365; -pub const SYS_statx: ::c_long = 4000 + 366; -pub const SYS_pidfd_send_signal: ::c_long = 4000 + 424; -pub const SYS_io_uring_setup: ::c_long = 4000 + 425; -pub const SYS_io_uring_enter: ::c_long = 4000 + 426; -pub const SYS_io_uring_register: ::c_long = 4000 + 427; -pub const SYS_open_tree: ::c_long = 4000 + 428; -pub const SYS_move_mount: ::c_long = 4000 + 429; -pub const SYS_fsopen: ::c_long = 4000 + 430; -pub const SYS_fsconfig: ::c_long = 4000 + 431; -pub const SYS_fsmount: ::c_long = 4000 + 432; -pub const SYS_fspick: ::c_long = 4000 + 433; -pub const SYS_pidfd_open: ::c_long = 4000 + 434; -pub const SYS_clone3: ::c_long = 4000 + 435; -pub const SYS_close_range: ::c_long = 4000 + 436; -pub const SYS_openat2: ::c_long = 4000 + 437; -pub const SYS_pidfd_getfd: ::c_long = 4000 + 438; -pub const SYS_faccessat2: ::c_long = 4000 + 439; -pub const SYS_process_madvise: ::c_long = 4000 + 440; -pub const SYS_epoll_pwait2: ::c_long = 4000 + 441; -pub const SYS_mount_setattr: ::c_long = 4000 + 442; -pub const SYS_quotactl_fd: ::c_long = 4000 + 443; -pub const SYS_landlock_create_ruleset: ::c_long = 4000 + 444; -pub const SYS_landlock_add_rule: ::c_long = 4000 + 445; -pub const SYS_landlock_restrict_self: ::c_long = 4000 + 446; -pub const SYS_memfd_secret: ::c_long = 4000 + 447; -pub const SYS_process_mrelease: ::c_long = 4000 + 448; -pub const SYS_futex_waitv: ::c_long = 4000 + 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 4000 + 450; +pub const SYS_syscall: c_long = 4000 + 0; +pub const SYS_exit: c_long = 4000 + 1; +pub const SYS_fork: c_long = 4000 + 2; +pub const SYS_read: c_long = 4000 + 3; +pub const SYS_write: c_long = 4000 + 4; +pub const SYS_open: c_long = 4000 + 5; +pub const SYS_close: c_long = 4000 + 6; +pub const SYS_waitpid: c_long = 4000 + 7; +pub const SYS_creat: c_long = 4000 + 8; +pub const SYS_link: c_long = 4000 + 9; +pub const SYS_unlink: c_long = 4000 + 10; +pub const SYS_execve: c_long = 4000 + 11; +pub const SYS_chdir: c_long = 4000 + 12; +pub const SYS_time: c_long = 4000 + 13; +pub const SYS_mknod: c_long = 4000 + 14; +pub const SYS_chmod: c_long = 4000 + 15; +pub const SYS_lchown: c_long = 4000 + 16; +pub const SYS_break: c_long = 4000 + 17; +pub const SYS_lseek: c_long = 4000 + 19; +pub const SYS_getpid: c_long = 4000 + 20; +pub const SYS_mount: c_long = 4000 + 21; +pub const SYS_umount: c_long = 4000 + 22; +pub const SYS_setuid: c_long = 4000 + 23; +pub const SYS_getuid: c_long = 4000 + 24; +pub const SYS_stime: c_long = 4000 + 25; +pub const SYS_ptrace: c_long = 4000 + 26; +pub const SYS_alarm: c_long = 4000 + 27; +pub const SYS_pause: c_long = 4000 + 29; +pub const SYS_utime: c_long = 4000 + 30; +pub const SYS_stty: c_long = 4000 + 31; +pub const SYS_gtty: c_long = 4000 + 32; +pub const SYS_access: c_long = 4000 + 33; +pub const SYS_nice: c_long = 4000 + 34; +pub const SYS_ftime: c_long = 4000 + 35; +pub const SYS_sync: c_long = 4000 + 36; +pub const SYS_kill: c_long = 4000 + 37; +pub const SYS_rename: c_long = 4000 + 38; +pub const SYS_mkdir: c_long = 4000 + 39; +pub const SYS_rmdir: c_long = 4000 + 40; +pub const SYS_dup: c_long = 4000 + 41; +pub const SYS_pipe: c_long = 4000 + 42; +pub const SYS_times: c_long = 4000 + 43; +pub const SYS_prof: c_long = 4000 + 44; +pub const SYS_brk: c_long = 4000 + 45; +pub const SYS_setgid: c_long = 4000 + 46; +pub const SYS_getgid: c_long = 4000 + 47; +pub const SYS_signal: c_long = 4000 + 48; +pub const SYS_geteuid: c_long = 4000 + 49; +pub const SYS_getegid: c_long = 4000 + 50; +pub const SYS_acct: c_long = 4000 + 51; +pub const SYS_umount2: c_long = 4000 + 52; +pub const SYS_lock: c_long = 4000 + 53; +pub const SYS_ioctl: c_long = 4000 + 54; +pub const SYS_fcntl: c_long = 4000 + 55; +pub const SYS_mpx: c_long = 4000 + 56; +pub const SYS_setpgid: c_long = 4000 + 57; +pub const SYS_ulimit: c_long = 4000 + 58; +pub const SYS_umask: c_long = 4000 + 60; +pub const SYS_chroot: c_long = 4000 + 61; +pub const SYS_ustat: c_long = 4000 + 62; +pub const SYS_dup2: c_long = 4000 + 63; +pub const SYS_getppid: c_long = 4000 + 64; +pub const SYS_getpgrp: c_long = 4000 + 65; +pub const SYS_setsid: c_long = 4000 + 66; +pub const SYS_sigaction: c_long = 4000 + 67; +pub const SYS_sgetmask: c_long = 4000 + 68; +pub const SYS_ssetmask: c_long = 4000 + 69; +pub const SYS_setreuid: c_long = 4000 + 70; +pub const SYS_setregid: c_long = 4000 + 71; +pub const SYS_sigsuspend: c_long = 4000 + 72; +pub const SYS_sigpending: c_long = 4000 + 73; +pub const SYS_sethostname: c_long = 4000 + 74; +pub const SYS_setrlimit: c_long = 4000 + 75; +pub const SYS_getrlimit: c_long = 4000 + 76; +pub const SYS_getrusage: c_long = 4000 + 77; +pub const SYS_gettimeofday: c_long = 4000 + 78; +pub const SYS_settimeofday: c_long = 4000 + 79; +pub const SYS_getgroups: c_long = 4000 + 80; +pub const SYS_setgroups: c_long = 4000 + 81; +pub const SYS_symlink: c_long = 4000 + 83; +pub const SYS_readlink: c_long = 4000 + 85; +pub const SYS_uselib: c_long = 4000 + 86; +pub const SYS_swapon: c_long = 4000 + 87; +pub const SYS_reboot: c_long = 4000 + 88; +pub const SYS_readdir: c_long = 4000 + 89; +pub const SYS_mmap: c_long = 4000 + 90; +pub const SYS_munmap: c_long = 4000 + 91; +pub const SYS_truncate: c_long = 4000 + 92; +pub const SYS_ftruncate: c_long = 4000 + 93; +pub const SYS_fchmod: c_long = 4000 + 94; +pub const SYS_fchown: c_long = 4000 + 95; +pub const SYS_getpriority: c_long = 4000 + 96; +pub const SYS_setpriority: c_long = 4000 + 97; +pub const SYS_profil: c_long = 4000 + 98; +pub const SYS_statfs: c_long = 4000 + 99; +pub const SYS_fstatfs: c_long = 4000 + 100; +pub const SYS_ioperm: c_long = 4000 + 101; +pub const SYS_socketcall: c_long = 4000 + 102; +pub const SYS_syslog: c_long = 4000 + 103; +pub const SYS_setitimer: c_long = 4000 + 104; +pub const SYS_getitimer: c_long = 4000 + 105; +pub const SYS_stat: c_long = 4000 + 106; +pub const SYS_lstat: c_long = 4000 + 107; +pub const SYS_fstat: c_long = 4000 + 108; +pub const SYS_iopl: c_long = 4000 + 110; +pub const SYS_vhangup: c_long = 4000 + 111; +pub const SYS_idle: c_long = 4000 + 112; +pub const SYS_vm86: c_long = 4000 + 113; +pub const SYS_wait4: c_long = 4000 + 114; +pub const SYS_swapoff: c_long = 4000 + 115; +pub const SYS_sysinfo: c_long = 4000 + 116; +pub const SYS_ipc: c_long = 4000 + 117; +pub const SYS_fsync: c_long = 4000 + 118; +pub const SYS_sigreturn: c_long = 4000 + 119; +pub const SYS_clone: c_long = 4000 + 120; +pub const SYS_setdomainname: c_long = 4000 + 121; +pub const SYS_uname: c_long = 4000 + 122; +pub const SYS_modify_ldt: c_long = 4000 + 123; +pub const SYS_adjtimex: c_long = 4000 + 124; +pub const SYS_mprotect: c_long = 4000 + 125; +pub const SYS_sigprocmask: c_long = 4000 + 126; +pub const SYS_create_module: c_long = 4000 + 127; +pub const SYS_init_module: c_long = 4000 + 128; +pub const SYS_delete_module: c_long = 4000 + 129; +pub const SYS_get_kernel_syms: c_long = 4000 + 130; +pub const SYS_quotactl: c_long = 4000 + 131; +pub const SYS_getpgid: c_long = 4000 + 132; +pub const SYS_fchdir: c_long = 4000 + 133; +pub const SYS_bdflush: c_long = 4000 + 134; +pub const SYS_sysfs: c_long = 4000 + 135; +pub const SYS_personality: c_long = 4000 + 136; +pub const SYS_afs_syscall: c_long = 4000 + 137; +pub const SYS_setfsuid: c_long = 4000 + 138; +pub const SYS_setfsgid: c_long = 4000 + 139; +pub const SYS__llseek: c_long = 4000 + 140; +pub const SYS_getdents: c_long = 4000 + 141; +pub const SYS_flock: c_long = 4000 + 143; +pub const SYS_msync: c_long = 4000 + 144; +pub const SYS_readv: c_long = 4000 + 145; +pub const SYS_writev: c_long = 4000 + 146; +pub const SYS_cacheflush: c_long = 4000 + 147; +pub const SYS_cachectl: c_long = 4000 + 148; +pub const SYS_sysmips: c_long = 4000 + 149; +pub const SYS_getsid: c_long = 4000 + 151; +pub const SYS_fdatasync: c_long = 4000 + 152; +pub const SYS__sysctl: c_long = 4000 + 153; +pub const SYS_mlock: c_long = 4000 + 154; +pub const SYS_munlock: c_long = 4000 + 155; +pub const SYS_mlockall: c_long = 4000 + 156; +pub const SYS_munlockall: c_long = 4000 + 157; +pub const SYS_sched_setparam: c_long = 4000 + 158; +pub const SYS_sched_getparam: c_long = 4000 + 159; +pub const SYS_sched_setscheduler: c_long = 4000 + 160; +pub const SYS_sched_getscheduler: c_long = 4000 + 161; +pub const SYS_sched_yield: c_long = 4000 + 162; +pub const SYS_sched_get_priority_max: c_long = 4000 + 163; +pub const SYS_sched_get_priority_min: c_long = 4000 + 164; +pub const SYS_sched_rr_get_interval: c_long = 4000 + 165; +pub const SYS_nanosleep: c_long = 4000 + 166; +pub const SYS_mremap: c_long = 4000 + 167; +pub const SYS_accept: c_long = 4000 + 168; +pub const SYS_bind: c_long = 4000 + 169; +pub const SYS_connect: c_long = 4000 + 170; +pub const SYS_getpeername: c_long = 4000 + 171; +pub const SYS_getsockname: c_long = 4000 + 172; +pub const SYS_getsockopt: c_long = 4000 + 173; +pub const SYS_listen: c_long = 4000 + 174; +pub const SYS_recv: c_long = 4000 + 175; +pub const SYS_recvfrom: c_long = 4000 + 176; +pub const SYS_recvmsg: c_long = 4000 + 177; +pub const SYS_send: c_long = 4000 + 178; +pub const SYS_sendmsg: c_long = 4000 + 179; +pub const SYS_sendto: c_long = 4000 + 180; +pub const SYS_setsockopt: c_long = 4000 + 181; +pub const SYS_shutdown: c_long = 4000 + 182; +pub const SYS_socket: c_long = 4000 + 183; +pub const SYS_socketpair: c_long = 4000 + 184; +pub const SYS_setresuid: c_long = 4000 + 185; +pub const SYS_getresuid: c_long = 4000 + 186; +pub const SYS_query_module: c_long = 4000 + 187; +pub const SYS_poll: c_long = 4000 + 188; +pub const SYS_nfsservctl: c_long = 4000 + 189; +pub const SYS_setresgid: c_long = 4000 + 190; +pub const SYS_getresgid: c_long = 4000 + 191; +pub const SYS_prctl: c_long = 4000 + 192; +pub const SYS_rt_sigreturn: c_long = 4000 + 193; +pub const SYS_rt_sigaction: c_long = 4000 + 194; +pub const SYS_rt_sigprocmask: c_long = 4000 + 195; +pub const SYS_rt_sigpending: c_long = 4000 + 196; +pub const SYS_rt_sigtimedwait: c_long = 4000 + 197; +pub const SYS_rt_sigqueueinfo: c_long = 4000 + 198; +pub const SYS_rt_sigsuspend: c_long = 4000 + 199; +pub const SYS_chown: c_long = 4000 + 202; +pub const SYS_getcwd: c_long = 4000 + 203; +pub const SYS_capget: c_long = 4000 + 204; +pub const SYS_capset: c_long = 4000 + 205; +pub const SYS_sigaltstack: c_long = 4000 + 206; +pub const SYS_sendfile: c_long = 4000 + 207; +pub const SYS_getpmsg: c_long = 4000 + 208; +pub const SYS_putpmsg: c_long = 4000 + 209; +pub const SYS_mmap2: c_long = 4000 + 210; +pub const SYS_truncate64: c_long = 4000 + 211; +pub const SYS_ftruncate64: c_long = 4000 + 212; +pub const SYS_stat64: c_long = 4000 + 213; +pub const SYS_lstat64: c_long = 4000 + 214; +pub const SYS_fstat64: c_long = 4000 + 215; +pub const SYS_pivot_root: c_long = 4000 + 216; +pub const SYS_mincore: c_long = 4000 + 217; +pub const SYS_madvise: c_long = 4000 + 218; +pub const SYS_getdents64: c_long = 4000 + 219; +pub const SYS_fcntl64: c_long = 4000 + 220; +pub const SYS_gettid: c_long = 4000 + 222; +pub const SYS_readahead: c_long = 4000 + 223; +pub const SYS_setxattr: c_long = 4000 + 224; +pub const SYS_lsetxattr: c_long = 4000 + 225; +pub const SYS_fsetxattr: c_long = 4000 + 226; +pub const SYS_getxattr: c_long = 4000 + 227; +pub const SYS_lgetxattr: c_long = 4000 + 228; +pub const SYS_fgetxattr: c_long = 4000 + 229; +pub const SYS_listxattr: c_long = 4000 + 230; +pub const SYS_llistxattr: c_long = 4000 + 231; +pub const SYS_flistxattr: c_long = 4000 + 232; +pub const SYS_removexattr: c_long = 4000 + 233; +pub const SYS_lremovexattr: c_long = 4000 + 234; +pub const SYS_fremovexattr: c_long = 4000 + 235; +pub const SYS_tkill: c_long = 4000 + 236; +pub const SYS_sendfile64: c_long = 4000 + 237; +pub const SYS_futex: c_long = 4000 + 238; +pub const SYS_sched_setaffinity: c_long = 4000 + 239; +pub const SYS_sched_getaffinity: c_long = 4000 + 240; +pub const SYS_io_setup: c_long = 4000 + 241; +pub const SYS_io_destroy: c_long = 4000 + 242; +pub const SYS_io_getevents: c_long = 4000 + 243; +pub const SYS_io_submit: c_long = 4000 + 244; +pub const SYS_io_cancel: c_long = 4000 + 245; +pub const SYS_exit_group: c_long = 4000 + 246; +pub const SYS_lookup_dcookie: c_long = 4000 + 247; +pub const SYS_epoll_create: c_long = 4000 + 248; +pub const SYS_epoll_ctl: c_long = 4000 + 249; +pub const SYS_epoll_wait: c_long = 4000 + 250; +pub const SYS_remap_file_pages: c_long = 4000 + 251; +pub const SYS_set_tid_address: c_long = 4000 + 252; +pub const SYS_restart_syscall: c_long = 4000 + 253; +pub const SYS_statfs64: c_long = 4000 + 255; +pub const SYS_fstatfs64: c_long = 4000 + 256; +pub const SYS_timer_create: c_long = 4000 + 257; +pub const SYS_timer_settime: c_long = 4000 + 258; +pub const SYS_timer_gettime: c_long = 4000 + 259; +pub const SYS_timer_getoverrun: c_long = 4000 + 260; +pub const SYS_timer_delete: c_long = 4000 + 261; +pub const SYS_clock_settime: c_long = 4000 + 262; +pub const SYS_clock_gettime: c_long = 4000 + 263; +pub const SYS_clock_getres: c_long = 4000 + 264; +pub const SYS_clock_nanosleep: c_long = 4000 + 265; +pub const SYS_tgkill: c_long = 4000 + 266; +pub const SYS_utimes: c_long = 4000 + 267; +pub const SYS_mbind: c_long = 4000 + 268; +pub const SYS_get_mempolicy: c_long = 4000 + 269; +pub const SYS_set_mempolicy: c_long = 4000 + 270; +pub const SYS_mq_open: c_long = 4000 + 271; +pub const SYS_mq_unlink: c_long = 4000 + 272; +pub const SYS_mq_timedsend: c_long = 4000 + 273; +pub const SYS_mq_timedreceive: c_long = 4000 + 274; +pub const SYS_mq_notify: c_long = 4000 + 275; +pub const SYS_mq_getsetattr: c_long = 4000 + 276; +pub const SYS_vserver: c_long = 4000 + 277; +pub const SYS_waitid: c_long = 4000 + 278; +/* pub const SYS_sys_setaltroot: c_long = 4000 + 279; */ +pub const SYS_add_key: c_long = 4000 + 280; +pub const SYS_request_key: c_long = 4000 + 281; +pub const SYS_keyctl: c_long = 4000 + 282; +pub const SYS_set_thread_area: c_long = 4000 + 283; +pub const SYS_inotify_init: c_long = 4000 + 284; +pub const SYS_inotify_add_watch: c_long = 4000 + 285; +pub const SYS_inotify_rm_watch: c_long = 4000 + 286; +pub const SYS_migrate_pages: c_long = 4000 + 287; +pub const SYS_openat: c_long = 4000 + 288; +pub const SYS_mkdirat: c_long = 4000 + 289; +pub const SYS_mknodat: c_long = 4000 + 290; +pub const SYS_fchownat: c_long = 4000 + 291; +pub const SYS_futimesat: c_long = 4000 + 292; +pub const SYS_unlinkat: c_long = 4000 + 294; +pub const SYS_renameat: c_long = 4000 + 295; +pub const SYS_linkat: c_long = 4000 + 296; +pub const SYS_symlinkat: c_long = 4000 + 297; +pub const SYS_readlinkat: c_long = 4000 + 298; +pub const SYS_fchmodat: c_long = 4000 + 299; +pub const SYS_faccessat: c_long = 4000 + 300; +pub const SYS_pselect6: c_long = 4000 + 301; +pub const SYS_ppoll: c_long = 4000 + 302; +pub const SYS_unshare: c_long = 4000 + 303; +pub const SYS_splice: c_long = 4000 + 304; +pub const SYS_sync_file_range: c_long = 4000 + 305; +pub const SYS_tee: c_long = 4000 + 306; +pub const SYS_vmsplice: c_long = 4000 + 307; +pub const SYS_move_pages: c_long = 4000 + 308; +pub const SYS_set_robust_list: c_long = 4000 + 309; +pub const SYS_get_robust_list: c_long = 4000 + 310; +pub const SYS_kexec_load: c_long = 4000 + 311; +pub const SYS_getcpu: c_long = 4000 + 312; +pub const SYS_epoll_pwait: c_long = 4000 + 313; +pub const SYS_ioprio_set: c_long = 4000 + 314; +pub const SYS_ioprio_get: c_long = 4000 + 315; +pub const SYS_utimensat: c_long = 4000 + 316; +pub const SYS_signalfd: c_long = 4000 + 317; +pub const SYS_timerfd: c_long = 4000 + 318; +pub const SYS_eventfd: c_long = 4000 + 319; +pub const SYS_fallocate: c_long = 4000 + 320; +pub const SYS_timerfd_create: c_long = 4000 + 321; +pub const SYS_timerfd_gettime: c_long = 4000 + 322; +pub const SYS_timerfd_settime: c_long = 4000 + 323; +pub const SYS_signalfd4: c_long = 4000 + 324; +pub const SYS_eventfd2: c_long = 4000 + 325; +pub const SYS_epoll_create1: c_long = 4000 + 326; +pub const SYS_dup3: c_long = 4000 + 327; +pub const SYS_pipe2: c_long = 4000 + 328; +pub const SYS_inotify_init1: c_long = 4000 + 329; +pub const SYS_preadv: c_long = 4000 + 330; +pub const SYS_pwritev: c_long = 4000 + 331; +pub const SYS_rt_tgsigqueueinfo: c_long = 4000 + 332; +pub const SYS_perf_event_open: c_long = 4000 + 333; +pub const SYS_accept4: c_long = 4000 + 334; +pub const SYS_recvmmsg: c_long = 4000 + 335; +pub const SYS_fanotify_init: c_long = 4000 + 336; +pub const SYS_fanotify_mark: c_long = 4000 + 337; +pub const SYS_prlimit64: c_long = 4000 + 338; +pub const SYS_name_to_handle_at: c_long = 4000 + 339; +pub const SYS_open_by_handle_at: c_long = 4000 + 340; +pub const SYS_clock_adjtime: c_long = 4000 + 341; +pub const SYS_syncfs: c_long = 4000 + 342; +pub const SYS_sendmmsg: c_long = 4000 + 343; +pub const SYS_setns: c_long = 4000 + 344; +pub const SYS_process_vm_readv: c_long = 4000 + 345; +pub const SYS_process_vm_writev: c_long = 4000 + 346; +pub const SYS_kcmp: c_long = 4000 + 347; +pub const SYS_finit_module: c_long = 4000 + 348; +pub const SYS_sched_setattr: c_long = 4000 + 349; +pub const SYS_sched_getattr: c_long = 4000 + 350; +pub const SYS_renameat2: c_long = 4000 + 351; +pub const SYS_seccomp: c_long = 4000 + 352; +pub const SYS_getrandom: c_long = 4000 + 353; +pub const SYS_memfd_create: c_long = 4000 + 354; +pub const SYS_bpf: c_long = 4000 + 355; +pub const SYS_execveat: c_long = 4000 + 356; +pub const SYS_userfaultfd: c_long = 4000 + 357; +pub const SYS_membarrier: c_long = 4000 + 358; +pub const SYS_mlock2: c_long = 4000 + 359; +pub const SYS_copy_file_range: c_long = 4000 + 360; +pub const SYS_preadv2: c_long = 4000 + 361; +pub const SYS_pwritev2: c_long = 4000 + 362; +pub const SYS_pkey_mprotect: c_long = 4000 + 363; +pub const SYS_pkey_alloc: c_long = 4000 + 364; +pub const SYS_pkey_free: c_long = 4000 + 365; +pub const SYS_statx: c_long = 4000 + 366; +pub const SYS_pidfd_send_signal: c_long = 4000 + 424; +pub const SYS_io_uring_setup: c_long = 4000 + 425; +pub const SYS_io_uring_enter: c_long = 4000 + 426; +pub const SYS_io_uring_register: c_long = 4000 + 427; +pub const SYS_open_tree: c_long = 4000 + 428; +pub const SYS_move_mount: c_long = 4000 + 429; +pub const SYS_fsopen: c_long = 4000 + 430; +pub const SYS_fsconfig: c_long = 4000 + 431; +pub const SYS_fsmount: c_long = 4000 + 432; +pub const SYS_fspick: c_long = 4000 + 433; +pub const SYS_pidfd_open: c_long = 4000 + 434; +pub const SYS_clone3: c_long = 4000 + 435; +pub const SYS_close_range: c_long = 4000 + 436; +pub const SYS_openat2: c_long = 4000 + 437; +pub const SYS_pidfd_getfd: c_long = 4000 + 438; +pub const SYS_faccessat2: c_long = 4000 + 439; +pub const SYS_process_madvise: c_long = 4000 + 440; +pub const SYS_epoll_pwait2: c_long = 4000 + 441; +pub const SYS_mount_setattr: c_long = 4000 + 442; +pub const SYS_quotactl_fd: c_long = 4000 + 443; +pub const SYS_landlock_create_ruleset: c_long = 4000 + 444; +pub const SYS_landlock_add_rule: c_long = 4000 + 445; +pub const SYS_landlock_restrict_self: c_long = 4000 + 446; +pub const SYS_memfd_secret: c_long = 4000 + 447; +pub const SYS_process_mrelease: c_long = 4000 + 448; +pub const SYS_futex_waitv: c_long = 4000 + 449; +pub const SYS_set_mempolicy_home_node: c_long = 4000 + 450; diff --git a/src/unix/linux_like/linux/musl/b32/mod.rs b/src/unix/linux_like/linux/musl/b32/mod.rs index b346d48aaa8b4..37f9c3ab2c24a 100644 --- a/src/unix/linux_like/linux/musl/b32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/mod.rs @@ -1,10 +1,12 @@ +use crate::{c_int, c_longlong, c_ulonglong, c_void}; + pub type c_long = i32; pub type c_ulong = u32; pub type nlink_t = u32; -pub type blksize_t = ::c_long; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; -pub type regoff_t = ::c_int; +pub type blksize_t = c_long; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; +pub type regoff_t = c_int; s! { pub struct pthread_attr_t { @@ -12,27 +14,27 @@ s! { } pub struct sigset_t { - __val: [::c_ulong; 32], + __val: [c_ulong; 32], } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct sem_t { - __val: [::c_int; 4], + __val: [c_int; 4], } } diff --git a/src/unix/linux_like/linux/musl/b32/powerpc.rs b/src/unix/linux_like/linux/musl/b32/powerpc.rs index 1f8ee80113e16..2fff41545ee56 100644 --- a/src/unix/linux_like/linux/musl/b32/powerpc.rs +++ b/src/unix/linux_like/linux/musl/b32/powerpc.rs @@ -1,126 +1,128 @@ +use crate::{c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_void, off_t, size_t, ssize_t}; + pub type c_char = u8; pub type wchar_t = i32; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_short, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_rdev_padding: c_short, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 2], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_short, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_rdev_padding: c_short, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 2], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __pad1: ::c_int, - __pad2: ::c_longlong, - __pad3: ::c_longlong, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __pad1: c_int, + __pad2: c_longlong, + __pad3: c_longlong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - __unused1: ::c_int, - pub shm_atime: ::time_t, - __unused2: ::c_int, - pub shm_dtime: ::time_t, - __unused3: ::c_int, - pub shm_ctime: ::time_t, - __unused4: ::c_int, - pub shm_segsz: ::size_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + __unused1: c_int, + pub shm_atime: crate::time_t, + __unused2: c_int, + pub shm_dtime: crate::time_t, + __unused3: c_int, + pub shm_ctime: crate::time_t, + __unused4: c_int, + pub shm_segsz: size_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - __unused1: ::c_int, - pub msg_stime: ::time_t, - __unused2: ::c_int, - pub msg_rtime: ::time_t, - __unused3: ::c_int, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + __unused1: c_int, + pub msg_stime: crate::time_t, + __unused2: c_int, + pub msg_rtime: crate::time_t, + __unused3: c_int, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } } -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const SIGSTKSZ: ::size_t = 10240; -pub const MINSIGSTKSZ: ::size_t = 4096; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const SIGSTKSZ: size_t = 10240; +pub const MINSIGSTKSZ: size_t = 4096; -pub const O_DIRECT: ::c_int = 0x20000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_LARGEFILE: ::c_int = 0x10000; +pub const O_DIRECT: c_int = 0x20000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_LARGEFILE: c_int = 0x10000; -pub const MCL_CURRENT: ::c_int = 0x2000; -pub const MCL_FUTURE: ::c_int = 0x4000; -pub const MCL_ONFAULT: ::c_int = 0x8000; -pub const CBAUD: ::tcflag_t = 0o0000377; -pub const TAB1: ::c_int = 0x00000400; -pub const TAB2: ::c_int = 0x00000800; -pub const TAB3: ::c_int = 0x00000C00; -pub const CR1: ::c_int = 0x00001000; -pub const CR2: ::c_int = 0x00002000; -pub const CR3: ::c_int = 0x00003000; -pub const FF1: ::c_int = 0x00004000; -pub const BS1: ::c_int = 0x00008000; -pub const VT1: ::c_int = 0x00010000; +pub const MCL_CURRENT: c_int = 0x2000; +pub const MCL_FUTURE: c_int = 0x4000; +pub const MCL_ONFAULT: c_int = 0x8000; +pub const CBAUD: crate::tcflag_t = 0o0000377; +pub const TAB1: c_int = 0x00000400; +pub const TAB2: c_int = 0x00000800; +pub const TAB3: c_int = 0x00000C00; +pub const CR1: c_int = 0x00001000; +pub const CR2: c_int = 0x00002000; +pub const CR3: c_int = 0x00003000; +pub const FF1: c_int = 0x00004000; +pub const BS1: c_int = 0x00008000; +pub const VT1: c_int = 0x00010000; pub const VWERASE: usize = 10; pub const VREPRINT: usize = 11; pub const VSUSP: usize = 12; @@ -128,619 +130,619 @@ pub const VSTART: usize = 13; pub const VSTOP: usize = 14; pub const VDISCARD: usize = 16; pub const VTIME: usize = 7; -pub const IXON: ::tcflag_t = 0x00000200; -pub const IXOFF: ::tcflag_t = 0x00000400; -pub const ONLCR: ::tcflag_t = 0x00000002; -pub const CSIZE: ::tcflag_t = 0x00000300; -pub const CS6: ::tcflag_t = 0x00000100; -pub const CS7: ::tcflag_t = 0x00000200; -pub const CS8: ::tcflag_t = 0x00000300; -pub const CSTOPB: ::tcflag_t = 0x00000400; -pub const CREAD: ::tcflag_t = 0x00000800; -pub const PARENB: ::tcflag_t = 0x00001000; -pub const PARODD: ::tcflag_t = 0x00002000; -pub const HUPCL: ::tcflag_t = 0x00004000; -pub const CLOCAL: ::tcflag_t = 0x00008000; -pub const ECHOKE: ::tcflag_t = 0x00000001; -pub const ECHOE: ::tcflag_t = 0x00000002; -pub const ECHOK: ::tcflag_t = 0x00000004; -pub const ECHONL: ::tcflag_t = 0x00000010; -pub const ECHOPRT: ::tcflag_t = 0x00000020; -pub const ECHOCTL: ::tcflag_t = 0x00000040; -pub const ISIG: ::tcflag_t = 0x00000080; -pub const ICANON: ::tcflag_t = 0x00000100; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x80000000; -pub const CIBAUD: ::tcflag_t = 0o00077600000; -pub const CBAUDEX: ::tcflag_t = 0o000020; +pub const IXON: crate::tcflag_t = 0x00000200; +pub const IXOFF: crate::tcflag_t = 0x00000400; +pub const ONLCR: crate::tcflag_t = 0x00000002; +pub const CSIZE: crate::tcflag_t = 0x00000300; +pub const CS6: crate::tcflag_t = 0x00000100; +pub const CS7: crate::tcflag_t = 0x00000200; +pub const CS8: crate::tcflag_t = 0x00000300; +pub const CSTOPB: crate::tcflag_t = 0x00000400; +pub const CREAD: crate::tcflag_t = 0x00000800; +pub const PARENB: crate::tcflag_t = 0x00001000; +pub const PARODD: crate::tcflag_t = 0x00002000; +pub const HUPCL: crate::tcflag_t = 0x00004000; +pub const CLOCAL: crate::tcflag_t = 0x00008000; +pub const ECHOKE: crate::tcflag_t = 0x00000001; +pub const ECHOE: crate::tcflag_t = 0x00000002; +pub const ECHOK: crate::tcflag_t = 0x00000004; +pub const ECHONL: crate::tcflag_t = 0x00000010; +pub const ECHOPRT: crate::tcflag_t = 0x00000020; +pub const ECHOCTL: crate::tcflag_t = 0x00000040; +pub const ISIG: crate::tcflag_t = 0x00000080; +pub const ICANON: crate::tcflag_t = 0x00000100; +pub const PENDIN: crate::tcflag_t = 0x20000000; +pub const NOFLSH: crate::tcflag_t = 0x80000000; +pub const CIBAUD: crate::tcflag_t = 0o00077600000; +pub const CBAUDEX: crate::tcflag_t = 0o000020; pub const VSWTC: usize = 9; -pub const OLCUC: ::tcflag_t = 0o000004; -pub const NLDLY: ::tcflag_t = 0o001400; -pub const CRDLY: ::tcflag_t = 0o030000; -pub const TABDLY: ::tcflag_t = 0o006000; -pub const BSDLY: ::tcflag_t = 0o100000; -pub const FFDLY: ::tcflag_t = 0o040000; -pub const VTDLY: ::tcflag_t = 0o200000; -pub const XTABS: ::tcflag_t = 0o006000; -pub const B57600: ::speed_t = 0o000020; -pub const B115200: ::speed_t = 0o000021; -pub const B230400: ::speed_t = 0o000022; -pub const B460800: ::speed_t = 0o000023; -pub const B500000: ::speed_t = 0o000024; -pub const B576000: ::speed_t = 0o000025; -pub const B921600: ::speed_t = 0o000026; -pub const B1000000: ::speed_t = 0o000027; -pub const B1152000: ::speed_t = 0o000030; -pub const B1500000: ::speed_t = 0o000031; -pub const B2000000: ::speed_t = 0o000032; -pub const B2500000: ::speed_t = 0o000033; -pub const B3000000: ::speed_t = 0o000034; -pub const B3500000: ::speed_t = 0o000035; -pub const B4000000: ::speed_t = 0o000036; +pub const OLCUC: crate::tcflag_t = 0o000004; +pub const NLDLY: crate::tcflag_t = 0o001400; +pub const CRDLY: crate::tcflag_t = 0o030000; +pub const TABDLY: crate::tcflag_t = 0o006000; +pub const BSDLY: crate::tcflag_t = 0o100000; +pub const FFDLY: crate::tcflag_t = 0o040000; +pub const VTDLY: crate::tcflag_t = 0o200000; +pub const XTABS: crate::tcflag_t = 0o006000; +pub const B57600: crate::speed_t = 0o000020; +pub const B115200: crate::speed_t = 0o000021; +pub const B230400: crate::speed_t = 0o000022; +pub const B460800: crate::speed_t = 0o000023; +pub const B500000: crate::speed_t = 0o000024; +pub const B576000: crate::speed_t = 0o000025; +pub const B921600: crate::speed_t = 0o000026; +pub const B1000000: crate::speed_t = 0o000027; +pub const B1152000: crate::speed_t = 0o000030; +pub const B1500000: crate::speed_t = 0o000031; +pub const B2000000: crate::speed_t = 0o000032; +pub const B2500000: crate::speed_t = 0o000033; +pub const B3000000: crate::speed_t = 0o000034; +pub const B3500000: crate::speed_t = 0o000035; +pub const B4000000: crate::speed_t = 0o000036; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x00080; -pub const MAP_NORESERVE: ::c_int = 0x00040; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x00080; +pub const MAP_NORESERVE: c_int = 0x00040; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; -pub const PTRACE_SYSEMU: ::c_int = 0x1d; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e; +pub const PTRACE_SYSEMU: c_int = 0x1d; +pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 0x1e; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = 58; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EDEADLOCK: c_int = 58; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const EXTPROC: ::tcflag_t = 0x10000000; +pub const EXTPROC: crate::tcflag_t = 0x10000000; -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 12; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 13; +pub const F_SETLKW: c_int = 14; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; pub const VMIN: usize = 5; -pub const IEXTEN: ::tcflag_t = 0x00000400; -pub const TOSTOP: ::tcflag_t = 0x00400000; -pub const FLUSHO: ::tcflag_t = 0x00800000; +pub const IEXTEN: crate::tcflag_t = 0x00000400; +pub const TOSTOP: crate::tcflag_t = 0x00400000; +pub const FLUSHO: crate::tcflag_t = 0x00800000; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_query_module: ::c_long = 166; -pub const SYS_poll: ::c_long = 167; -pub const SYS_nfsservctl: ::c_long = 168; -pub const SYS_setresgid: ::c_long = 169; -pub const SYS_getresgid: ::c_long = 170; -pub const SYS_prctl: ::c_long = 171; -pub const SYS_rt_sigreturn: ::c_long = 172; -pub const SYS_rt_sigaction: ::c_long = 173; -pub const SYS_rt_sigprocmask: ::c_long = 174; -pub const SYS_rt_sigpending: ::c_long = 175; -pub const SYS_rt_sigtimedwait: ::c_long = 176; -pub const SYS_rt_sigqueueinfo: ::c_long = 177; -pub const SYS_rt_sigsuspend: ::c_long = 178; -pub const SYS_pread64: ::c_long = 179; -pub const SYS_pwrite64: ::c_long = 180; -pub const SYS_chown: ::c_long = 181; -pub const SYS_getcwd: ::c_long = 182; -pub const SYS_capget: ::c_long = 183; -pub const SYS_capset: ::c_long = 184; -pub const SYS_sigaltstack: ::c_long = 185; -pub const SYS_sendfile: ::c_long = 186; -pub const SYS_getpmsg: ::c_long = 187; -pub const SYS_putpmsg: ::c_long = 188; -pub const SYS_vfork: ::c_long = 189; -pub const SYS_ugetrlimit: ::c_long = 190; -pub const SYS_readahead: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_pciconfig_read: ::c_long = 198; -pub const SYS_pciconfig_write: ::c_long = 199; -pub const SYS_pciconfig_iobase: ::c_long = 200; -pub const SYS_multiplexer: ::c_long = 201; -pub const SYS_getdents64: ::c_long = 202; -pub const SYS_pivot_root: ::c_long = 203; -pub const SYS_fcntl64: ::c_long = 204; -pub const SYS_madvise: ::c_long = 205; -pub const SYS_mincore: ::c_long = 206; -pub const SYS_gettid: ::c_long = 207; -pub const SYS_tkill: ::c_long = 208; -pub const SYS_setxattr: ::c_long = 209; -pub const SYS_lsetxattr: ::c_long = 210; -pub const SYS_fsetxattr: ::c_long = 211; -pub const SYS_getxattr: ::c_long = 212; -pub const SYS_lgetxattr: ::c_long = 213; -pub const SYS_fgetxattr: ::c_long = 214; -pub const SYS_listxattr: ::c_long = 215; -pub const SYS_llistxattr: ::c_long = 216; -pub const SYS_flistxattr: ::c_long = 217; -pub const SYS_removexattr: ::c_long = 218; -pub const SYS_lremovexattr: ::c_long = 219; -pub const SYS_fremovexattr: ::c_long = 220; -pub const SYS_futex: ::c_long = 221; -pub const SYS_sched_setaffinity: ::c_long = 222; -pub const SYS_sched_getaffinity: ::c_long = 223; -pub const SYS_tuxcall: ::c_long = 225; -pub const SYS_sendfile64: ::c_long = 226; -pub const SYS_io_setup: ::c_long = 227; -pub const SYS_io_destroy: ::c_long = 228; -pub const SYS_io_getevents: ::c_long = 229; -pub const SYS_io_submit: ::c_long = 230; -pub const SYS_io_cancel: ::c_long = 231; -pub const SYS_set_tid_address: ::c_long = 232; -pub const SYS_fadvise64: ::c_long = 233; -pub const SYS_exit_group: ::c_long = 234; -pub const SYS_lookup_dcookie: ::c_long = 235; -pub const SYS_epoll_create: ::c_long = 236; -pub const SYS_epoll_ctl: ::c_long = 237; -pub const SYS_epoll_wait: ::c_long = 238; -pub const SYS_remap_file_pages: ::c_long = 239; -pub const SYS_timer_create: ::c_long = 240; -pub const SYS_timer_settime: ::c_long = 241; -pub const SYS_timer_gettime: ::c_long = 242; -pub const SYS_timer_getoverrun: ::c_long = 243; -pub const SYS_timer_delete: ::c_long = 244; -pub const SYS_clock_settime: ::c_long = 245; -pub const SYS_clock_gettime: ::c_long = 246; -pub const SYS_clock_getres: ::c_long = 247; -pub const SYS_clock_nanosleep: ::c_long = 248; -pub const SYS_swapcontext: ::c_long = 249; -pub const SYS_tgkill: ::c_long = 250; -pub const SYS_utimes: ::c_long = 251; -pub const SYS_statfs64: ::c_long = 252; -pub const SYS_fstatfs64: ::c_long = 253; -pub const SYS_fadvise64_64: ::c_long = 254; -pub const SYS_rtas: ::c_long = 255; -pub const SYS_sys_debug_setcontext: ::c_long = 256; -pub const SYS_migrate_pages: ::c_long = 258; -pub const SYS_mbind: ::c_long = 259; -pub const SYS_get_mempolicy: ::c_long = 260; -pub const SYS_set_mempolicy: ::c_long = 261; -pub const SYS_mq_open: ::c_long = 262; -pub const SYS_mq_unlink: ::c_long = 263; -pub const SYS_mq_timedsend: ::c_long = 264; -pub const SYS_mq_timedreceive: ::c_long = 265; -pub const SYS_mq_notify: ::c_long = 266; -pub const SYS_mq_getsetattr: ::c_long = 267; -pub const SYS_kexec_load: ::c_long = 268; -pub const SYS_add_key: ::c_long = 269; -pub const SYS_request_key: ::c_long = 270; -pub const SYS_keyctl: ::c_long = 271; -pub const SYS_waitid: ::c_long = 272; -pub const SYS_ioprio_set: ::c_long = 273; -pub const SYS_ioprio_get: ::c_long = 274; -pub const SYS_inotify_init: ::c_long = 275; -pub const SYS_inotify_add_watch: ::c_long = 276; -pub const SYS_inotify_rm_watch: ::c_long = 277; -pub const SYS_spu_run: ::c_long = 278; -pub const SYS_spu_create: ::c_long = 279; -pub const SYS_pselect6: ::c_long = 280; -pub const SYS_ppoll: ::c_long = 281; -pub const SYS_unshare: ::c_long = 282; -pub const SYS_splice: ::c_long = 283; -pub const SYS_tee: ::c_long = 284; -pub const SYS_vmsplice: ::c_long = 285; -pub const SYS_openat: ::c_long = 286; -pub const SYS_mkdirat: ::c_long = 287; -pub const SYS_mknodat: ::c_long = 288; -pub const SYS_fchownat: ::c_long = 289; -pub const SYS_futimesat: ::c_long = 290; -pub const SYS_fstatat64: ::c_long = 291; -pub const SYS_unlinkat: ::c_long = 292; -pub const SYS_renameat: ::c_long = 293; -pub const SYS_linkat: ::c_long = 294; -pub const SYS_symlinkat: ::c_long = 295; -pub const SYS_readlinkat: ::c_long = 296; -pub const SYS_fchmodat: ::c_long = 297; -pub const SYS_faccessat: ::c_long = 298; -pub const SYS_get_robust_list: ::c_long = 299; -pub const SYS_set_robust_list: ::c_long = 300; -pub const SYS_move_pages: ::c_long = 301; -pub const SYS_getcpu: ::c_long = 302; -pub const SYS_epoll_pwait: ::c_long = 303; -pub const SYS_utimensat: ::c_long = 304; -pub const SYS_signalfd: ::c_long = 305; -pub const SYS_timerfd_create: ::c_long = 306; -pub const SYS_eventfd: ::c_long = 307; -pub const SYS_sync_file_range2: ::c_long = 308; -pub const SYS_fallocate: ::c_long = 309; -pub const SYS_subpage_prot: ::c_long = 310; -pub const SYS_timerfd_settime: ::c_long = 311; -pub const SYS_timerfd_gettime: ::c_long = 312; -pub const SYS_signalfd4: ::c_long = 313; -pub const SYS_eventfd2: ::c_long = 314; -pub const SYS_epoll_create1: ::c_long = 315; -pub const SYS_dup3: ::c_long = 316; -pub const SYS_pipe2: ::c_long = 317; -pub const SYS_inotify_init1: ::c_long = 318; -pub const SYS_perf_event_open: ::c_long = 319; -pub const SYS_preadv: ::c_long = 320; -pub const SYS_pwritev: ::c_long = 321; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 322; -pub const SYS_fanotify_init: ::c_long = 323; -pub const SYS_fanotify_mark: ::c_long = 324; -pub const SYS_prlimit64: ::c_long = 325; -pub const SYS_socket: ::c_long = 326; -pub const SYS_bind: ::c_long = 327; -pub const SYS_connect: ::c_long = 328; -pub const SYS_listen: ::c_long = 329; -pub const SYS_accept: ::c_long = 330; -pub const SYS_getsockname: ::c_long = 331; -pub const SYS_getpeername: ::c_long = 332; -pub const SYS_socketpair: ::c_long = 333; -pub const SYS_send: ::c_long = 334; -pub const SYS_sendto: ::c_long = 335; -pub const SYS_recv: ::c_long = 336; -pub const SYS_recvfrom: ::c_long = 337; -pub const SYS_shutdown: ::c_long = 338; -pub const SYS_setsockopt: ::c_long = 339; -pub const SYS_getsockopt: ::c_long = 340; -pub const SYS_sendmsg: ::c_long = 341; -pub const SYS_recvmsg: ::c_long = 342; -pub const SYS_recvmmsg: ::c_long = 343; -pub const SYS_accept4: ::c_long = 344; -pub const SYS_name_to_handle_at: ::c_long = 345; -pub const SYS_open_by_handle_at: ::c_long = 346; -pub const SYS_clock_adjtime: ::c_long = 347; -pub const SYS_syncfs: ::c_long = 348; -pub const SYS_sendmmsg: ::c_long = 349; -pub const SYS_setns: ::c_long = 350; -pub const SYS_process_vm_readv: ::c_long = 351; -pub const SYS_process_vm_writev: ::c_long = 352; -pub const SYS_finit_module: ::c_long = 353; -pub const SYS_kcmp: ::c_long = 354; -pub const SYS_sched_setattr: ::c_long = 355; -pub const SYS_sched_getattr: ::c_long = 356; -pub const SYS_renameat2: ::c_long = 357; -pub const SYS_seccomp: ::c_long = 358; -pub const SYS_getrandom: ::c_long = 359; -pub const SYS_memfd_create: ::c_long = 360; -pub const SYS_bpf: ::c_long = 361; -pub const SYS_execveat: ::c_long = 362; -pub const SYS_switch_endian: ::c_long = 363; -pub const SYS_userfaultfd: ::c_long = 364; -pub const SYS_membarrier: ::c_long = 365; -pub const SYS_mlock2: ::c_long = 378; -pub const SYS_copy_file_range: ::c_long = 379; -pub const SYS_preadv2: ::c_long = 380; -pub const SYS_pwritev2: ::c_long = 381; -pub const SYS_kexec_file_load: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_pkey_alloc: ::c_long = 384; -pub const SYS_pkey_free: ::c_long = 385; -pub const SYS_pkey_mprotect: ::c_long = 386; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_query_module: c_long = 166; +pub const SYS_poll: c_long = 167; +pub const SYS_nfsservctl: c_long = 168; +pub const SYS_setresgid: c_long = 169; +pub const SYS_getresgid: c_long = 170; +pub const SYS_prctl: c_long = 171; +pub const SYS_rt_sigreturn: c_long = 172; +pub const SYS_rt_sigaction: c_long = 173; +pub const SYS_rt_sigprocmask: c_long = 174; +pub const SYS_rt_sigpending: c_long = 175; +pub const SYS_rt_sigtimedwait: c_long = 176; +pub const SYS_rt_sigqueueinfo: c_long = 177; +pub const SYS_rt_sigsuspend: c_long = 178; +pub const SYS_pread64: c_long = 179; +pub const SYS_pwrite64: c_long = 180; +pub const SYS_chown: c_long = 181; +pub const SYS_getcwd: c_long = 182; +pub const SYS_capget: c_long = 183; +pub const SYS_capset: c_long = 184; +pub const SYS_sigaltstack: c_long = 185; +pub const SYS_sendfile: c_long = 186; +pub const SYS_getpmsg: c_long = 187; +pub const SYS_putpmsg: c_long = 188; +pub const SYS_vfork: c_long = 189; +pub const SYS_ugetrlimit: c_long = 190; +pub const SYS_readahead: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_pciconfig_read: c_long = 198; +pub const SYS_pciconfig_write: c_long = 199; +pub const SYS_pciconfig_iobase: c_long = 200; +pub const SYS_multiplexer: c_long = 201; +pub const SYS_getdents64: c_long = 202; +pub const SYS_pivot_root: c_long = 203; +pub const SYS_fcntl64: c_long = 204; +pub const SYS_madvise: c_long = 205; +pub const SYS_mincore: c_long = 206; +pub const SYS_gettid: c_long = 207; +pub const SYS_tkill: c_long = 208; +pub const SYS_setxattr: c_long = 209; +pub const SYS_lsetxattr: c_long = 210; +pub const SYS_fsetxattr: c_long = 211; +pub const SYS_getxattr: c_long = 212; +pub const SYS_lgetxattr: c_long = 213; +pub const SYS_fgetxattr: c_long = 214; +pub const SYS_listxattr: c_long = 215; +pub const SYS_llistxattr: c_long = 216; +pub const SYS_flistxattr: c_long = 217; +pub const SYS_removexattr: c_long = 218; +pub const SYS_lremovexattr: c_long = 219; +pub const SYS_fremovexattr: c_long = 220; +pub const SYS_futex: c_long = 221; +pub const SYS_sched_setaffinity: c_long = 222; +pub const SYS_sched_getaffinity: c_long = 223; +pub const SYS_tuxcall: c_long = 225; +pub const SYS_sendfile64: c_long = 226; +pub const SYS_io_setup: c_long = 227; +pub const SYS_io_destroy: c_long = 228; +pub const SYS_io_getevents: c_long = 229; +pub const SYS_io_submit: c_long = 230; +pub const SYS_io_cancel: c_long = 231; +pub const SYS_set_tid_address: c_long = 232; +pub const SYS_fadvise64: c_long = 233; +pub const SYS_exit_group: c_long = 234; +pub const SYS_lookup_dcookie: c_long = 235; +pub const SYS_epoll_create: c_long = 236; +pub const SYS_epoll_ctl: c_long = 237; +pub const SYS_epoll_wait: c_long = 238; +pub const SYS_remap_file_pages: c_long = 239; +pub const SYS_timer_create: c_long = 240; +pub const SYS_timer_settime: c_long = 241; +pub const SYS_timer_gettime: c_long = 242; +pub const SYS_timer_getoverrun: c_long = 243; +pub const SYS_timer_delete: c_long = 244; +pub const SYS_clock_settime: c_long = 245; +pub const SYS_clock_gettime: c_long = 246; +pub const SYS_clock_getres: c_long = 247; +pub const SYS_clock_nanosleep: c_long = 248; +pub const SYS_swapcontext: c_long = 249; +pub const SYS_tgkill: c_long = 250; +pub const SYS_utimes: c_long = 251; +pub const SYS_statfs64: c_long = 252; +pub const SYS_fstatfs64: c_long = 253; +pub const SYS_fadvise64_64: c_long = 254; +pub const SYS_rtas: c_long = 255; +pub const SYS_sys_debug_setcontext: c_long = 256; +pub const SYS_migrate_pages: c_long = 258; +pub const SYS_mbind: c_long = 259; +pub const SYS_get_mempolicy: c_long = 260; +pub const SYS_set_mempolicy: c_long = 261; +pub const SYS_mq_open: c_long = 262; +pub const SYS_mq_unlink: c_long = 263; +pub const SYS_mq_timedsend: c_long = 264; +pub const SYS_mq_timedreceive: c_long = 265; +pub const SYS_mq_notify: c_long = 266; +pub const SYS_mq_getsetattr: c_long = 267; +pub const SYS_kexec_load: c_long = 268; +pub const SYS_add_key: c_long = 269; +pub const SYS_request_key: c_long = 270; +pub const SYS_keyctl: c_long = 271; +pub const SYS_waitid: c_long = 272; +pub const SYS_ioprio_set: c_long = 273; +pub const SYS_ioprio_get: c_long = 274; +pub const SYS_inotify_init: c_long = 275; +pub const SYS_inotify_add_watch: c_long = 276; +pub const SYS_inotify_rm_watch: c_long = 277; +pub const SYS_spu_run: c_long = 278; +pub const SYS_spu_create: c_long = 279; +pub const SYS_pselect6: c_long = 280; +pub const SYS_ppoll: c_long = 281; +pub const SYS_unshare: c_long = 282; +pub const SYS_splice: c_long = 283; +pub const SYS_tee: c_long = 284; +pub const SYS_vmsplice: c_long = 285; +pub const SYS_openat: c_long = 286; +pub const SYS_mkdirat: c_long = 287; +pub const SYS_mknodat: c_long = 288; +pub const SYS_fchownat: c_long = 289; +pub const SYS_futimesat: c_long = 290; +pub const SYS_fstatat64: c_long = 291; +pub const SYS_unlinkat: c_long = 292; +pub const SYS_renameat: c_long = 293; +pub const SYS_linkat: c_long = 294; +pub const SYS_symlinkat: c_long = 295; +pub const SYS_readlinkat: c_long = 296; +pub const SYS_fchmodat: c_long = 297; +pub const SYS_faccessat: c_long = 298; +pub const SYS_get_robust_list: c_long = 299; +pub const SYS_set_robust_list: c_long = 300; +pub const SYS_move_pages: c_long = 301; +pub const SYS_getcpu: c_long = 302; +pub const SYS_epoll_pwait: c_long = 303; +pub const SYS_utimensat: c_long = 304; +pub const SYS_signalfd: c_long = 305; +pub const SYS_timerfd_create: c_long = 306; +pub const SYS_eventfd: c_long = 307; +pub const SYS_sync_file_range2: c_long = 308; +pub const SYS_fallocate: c_long = 309; +pub const SYS_subpage_prot: c_long = 310; +pub const SYS_timerfd_settime: c_long = 311; +pub const SYS_timerfd_gettime: c_long = 312; +pub const SYS_signalfd4: c_long = 313; +pub const SYS_eventfd2: c_long = 314; +pub const SYS_epoll_create1: c_long = 315; +pub const SYS_dup3: c_long = 316; +pub const SYS_pipe2: c_long = 317; +pub const SYS_inotify_init1: c_long = 318; +pub const SYS_perf_event_open: c_long = 319; +pub const SYS_preadv: c_long = 320; +pub const SYS_pwritev: c_long = 321; +pub const SYS_rt_tgsigqueueinfo: c_long = 322; +pub const SYS_fanotify_init: c_long = 323; +pub const SYS_fanotify_mark: c_long = 324; +pub const SYS_prlimit64: c_long = 325; +pub const SYS_socket: c_long = 326; +pub const SYS_bind: c_long = 327; +pub const SYS_connect: c_long = 328; +pub const SYS_listen: c_long = 329; +pub const SYS_accept: c_long = 330; +pub const SYS_getsockname: c_long = 331; +pub const SYS_getpeername: c_long = 332; +pub const SYS_socketpair: c_long = 333; +pub const SYS_send: c_long = 334; +pub const SYS_sendto: c_long = 335; +pub const SYS_recv: c_long = 336; +pub const SYS_recvfrom: c_long = 337; +pub const SYS_shutdown: c_long = 338; +pub const SYS_setsockopt: c_long = 339; +pub const SYS_getsockopt: c_long = 340; +pub const SYS_sendmsg: c_long = 341; +pub const SYS_recvmsg: c_long = 342; +pub const SYS_recvmmsg: c_long = 343; +pub const SYS_accept4: c_long = 344; +pub const SYS_name_to_handle_at: c_long = 345; +pub const SYS_open_by_handle_at: c_long = 346; +pub const SYS_clock_adjtime: c_long = 347; +pub const SYS_syncfs: c_long = 348; +pub const SYS_sendmmsg: c_long = 349; +pub const SYS_setns: c_long = 350; +pub const SYS_process_vm_readv: c_long = 351; +pub const SYS_process_vm_writev: c_long = 352; +pub const SYS_finit_module: c_long = 353; +pub const SYS_kcmp: c_long = 354; +pub const SYS_sched_setattr: c_long = 355; +pub const SYS_sched_getattr: c_long = 356; +pub const SYS_renameat2: c_long = 357; +pub const SYS_seccomp: c_long = 358; +pub const SYS_getrandom: c_long = 359; +pub const SYS_memfd_create: c_long = 360; +pub const SYS_bpf: c_long = 361; +pub const SYS_execveat: c_long = 362; +pub const SYS_switch_endian: c_long = 363; +pub const SYS_userfaultfd: c_long = 364; +pub const SYS_membarrier: c_long = 365; +pub const SYS_mlock2: c_long = 378; +pub const SYS_copy_file_range: c_long = 379; +pub const SYS_preadv2: c_long = 380; +pub const SYS_pwritev2: c_long = 381; +pub const SYS_kexec_file_load: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_pkey_alloc: c_long = 384; +pub const SYS_pkey_free: c_long = 385; +pub const SYS_pkey_mprotect: c_long = 386; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; extern "C" { - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; } diff --git a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs index aa8ba42205636..68cdc45de4df6 100644 --- a/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/riscv32/mod.rs @@ -1,101 +1,103 @@ //! RISC-V-specific definitions for 32-bit linux-like values +use crate::{c_int, c_long, c_short, c_ulong, c_ushort, c_void, off64_t, off_t, size_t}; + pub type c_char = u8; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2usize], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused5: ::c_ulong, - __unused6: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused5: c_ulong, + __unused6: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __unused1: ::c_int, - pub msg_rtime: ::time_t, - __unused2: ::c_int, - pub msg_ctime: ::time_t, - __unused3: ::c_int, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __unused1: c_int, + pub msg_rtime: crate::time_t, + __unused2: c_int, + pub msg_ctime: crate::time_t, + __unused3: c_int, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } } @@ -109,174 +111,174 @@ s_no_extra_traits! { //pub const RLIM_INFINITY: ::rlim_t = !0; pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; +pub const RTLD_DEEPBIND: c_int = 0x8; //pub const RLIMIT_RSS: ::__rlimit_resource_t = 5; //pub const RLIMIT_AS: ::__rlimit_resource_t = 9; //pub const RLIMIT_MEMLOCK: ::__rlimit_resource_t = 8; //pub const RLIMIT_NOFILE: ::__rlimit_resource_t = 7; //pub const RLIMIT_NPROC: ::__rlimit_resource_t = 6; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 1052672; -pub const MAP_GROWSDOWN: ::c_int = 256; -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 1052672; +pub const MAP_GROWSDOWN: c_int = 256; +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SA_ONSTACK: ::c_int = 8; -pub const SA_SIGINFO: ::c_int = 4; -pub const SA_NOCLDWAIT: ::c_int = 2; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; -pub const POLLWRNORM: ::c_short = 256; -pub const POLLWRBAND: ::c_short = 512; -pub const O_ASYNC: ::c_int = 8192; -pub const F_SETOWN: ::c_int = 8; -pub const F_GETOWN: ::c_int = 9; -pub const F_GETLK: ::c_int = 12; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SA_ONSTACK: c_int = 8; +pub const SA_SIGINFO: c_int = 4; +pub const SA_NOCLDWAIT: c_int = 2; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; +pub const POLLWRNORM: c_short = 256; +pub const POLLWRBAND: c_short = 512; +pub const O_ASYNC: c_int = 8192; +pub const F_SETOWN: c_int = 8; +pub const F_GETOWN: c_int = 9; +pub const F_GETLK: c_int = 12; +pub const F_SETLK: c_int = 13; +pub const F_SETLKW: c_int = 14; -pub const O_DIRECT: ::c_int = 16384; -pub const O_DIRECTORY: ::c_int = 65536; -pub const O_LARGEFILE: ::c_int = 0o0100000; -pub const O_NOFOLLOW: ::c_int = 131072; -pub const MAP_HUGETLB: ::c_int = 262144; -pub const MAP_LOCKED: ::c_int = 8192; -pub const MAP_NORESERVE: ::c_int = 16384; -pub const MAP_ANON: ::c_int = 32; -pub const MAP_DENYWRITE: ::c_int = 2048; -pub const MAP_EXECUTABLE: ::c_int = 4096; -pub const MAP_POPULATE: ::c_int = 32768; -pub const MAP_NONBLOCK: ::c_int = 65536; -pub const MAP_STACK: ::c_int = 131072; -pub const MAP_SYNC: ::c_int = 0x080000; -pub const EDEADLOCK: ::c_int = 35; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const MCL_CURRENT: ::c_int = 1; -pub const MCL_FUTURE: ::c_int = 2; -pub const MCL_ONFAULT: ::c_int = 4; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const CBAUD: ::tcflag_t = 4111; -pub const TAB1: ::tcflag_t = 2048; -pub const TAB2: ::tcflag_t = 4096; -pub const TAB3: ::tcflag_t = 6144; -pub const CR1: ::tcflag_t = 512; -pub const CR2: ::tcflag_t = 1024; -pub const CR3: ::tcflag_t = 1536; -pub const FF1: ::tcflag_t = 32768; -pub const BS1: ::tcflag_t = 8192; -pub const VT1: ::tcflag_t = 16384; +pub const O_DIRECT: c_int = 16384; +pub const O_DIRECTORY: c_int = 65536; +pub const O_LARGEFILE: c_int = 0o0100000; +pub const O_NOFOLLOW: c_int = 131072; +pub const MAP_HUGETLB: c_int = 262144; +pub const MAP_LOCKED: c_int = 8192; +pub const MAP_NORESERVE: c_int = 16384; +pub const MAP_ANON: c_int = 32; +pub const MAP_DENYWRITE: c_int = 2048; +pub const MAP_EXECUTABLE: c_int = 4096; +pub const MAP_POPULATE: c_int = 32768; +pub const MAP_NONBLOCK: c_int = 65536; +pub const MAP_STACK: c_int = 131072; +pub const MAP_SYNC: c_int = 0x080000; +pub const EDEADLOCK: c_int = 35; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const MCL_CURRENT: c_int = 1; +pub const MCL_FUTURE: c_int = 2; +pub const MCL_ONFAULT: c_int = 4; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; +pub const CBAUD: crate::tcflag_t = 4111; +pub const TAB1: crate::tcflag_t = 2048; +pub const TAB2: crate::tcflag_t = 4096; +pub const TAB3: crate::tcflag_t = 6144; +pub const CR1: crate::tcflag_t = 512; +pub const CR2: crate::tcflag_t = 1024; +pub const CR3: crate::tcflag_t = 1536; +pub const FF1: crate::tcflag_t = 32768; +pub const BS1: crate::tcflag_t = 8192; +pub const VT1: crate::tcflag_t = 16384; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -284,354 +286,354 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 1024; -pub const IXOFF: ::tcflag_t = 4096; -pub const ONLCR: ::tcflag_t = 4; -pub const CSIZE: ::tcflag_t = 48; -pub const CS6: ::tcflag_t = 16; -pub const CS7: ::tcflag_t = 32; -pub const CS8: ::tcflag_t = 48; -pub const CSTOPB: ::tcflag_t = 64; -pub const CREAD: ::tcflag_t = 128; -pub const PARENB: ::tcflag_t = 256; -pub const PARODD: ::tcflag_t = 512; -pub const HUPCL: ::tcflag_t = 1024; -pub const CLOCAL: ::tcflag_t = 2048; -pub const ECHOKE: ::tcflag_t = 2048; -pub const ECHOE: ::tcflag_t = 16; -pub const ECHOK: ::tcflag_t = 32; -pub const ECHONL: ::tcflag_t = 64; -pub const ECHOPRT: ::tcflag_t = 1024; -pub const ECHOCTL: ::tcflag_t = 512; -pub const ISIG: ::tcflag_t = 1; -pub const ICANON: ::tcflag_t = 2; -pub const PENDIN: ::tcflag_t = 16384; -pub const NOFLSH: ::tcflag_t = 128; -pub const CIBAUD: ::tcflag_t = 269418496; -pub const CBAUDEX: ::tcflag_t = 4096; +pub const IXON: crate::tcflag_t = 1024; +pub const IXOFF: crate::tcflag_t = 4096; +pub const ONLCR: crate::tcflag_t = 4; +pub const CSIZE: crate::tcflag_t = 48; +pub const CS6: crate::tcflag_t = 16; +pub const CS7: crate::tcflag_t = 32; +pub const CS8: crate::tcflag_t = 48; +pub const CSTOPB: crate::tcflag_t = 64; +pub const CREAD: crate::tcflag_t = 128; +pub const PARENB: crate::tcflag_t = 256; +pub const PARODD: crate::tcflag_t = 512; +pub const HUPCL: crate::tcflag_t = 1024; +pub const CLOCAL: crate::tcflag_t = 2048; +pub const ECHOKE: crate::tcflag_t = 2048; +pub const ECHOE: crate::tcflag_t = 16; +pub const ECHOK: crate::tcflag_t = 32; +pub const ECHONL: crate::tcflag_t = 64; +pub const ECHOPRT: crate::tcflag_t = 1024; +pub const ECHOCTL: crate::tcflag_t = 512; +pub const ISIG: crate::tcflag_t = 1; +pub const ICANON: crate::tcflag_t = 2; +pub const PENDIN: crate::tcflag_t = 16384; +pub const NOFLSH: crate::tcflag_t = 128; +pub const CIBAUD: crate::tcflag_t = 269418496; +pub const CBAUDEX: crate::tcflag_t = 4096; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 2; -pub const NLDLY: ::tcflag_t = 256; -pub const CRDLY: ::tcflag_t = 1536; -pub const TABDLY: ::tcflag_t = 6144; -pub const BSDLY: ::tcflag_t = 8192; -pub const FFDLY: ::tcflag_t = 32768; -pub const VTDLY: ::tcflag_t = 16384; -pub const XTABS: ::tcflag_t = 6144; -pub const B57600: ::speed_t = 4097; -pub const B115200: ::speed_t = 4098; -pub const B230400: ::speed_t = 4099; -pub const B460800: ::speed_t = 4100; -pub const B500000: ::speed_t = 4101; -pub const B576000: ::speed_t = 4102; -pub const B921600: ::speed_t = 4103; -pub const B1000000: ::speed_t = 4104; -pub const B1152000: ::speed_t = 4105; -pub const B1500000: ::speed_t = 4106; -pub const B2000000: ::speed_t = 4107; -pub const B2500000: ::speed_t = 4108; -pub const B3000000: ::speed_t = 4109; -pub const B3500000: ::speed_t = 4110; -pub const B4000000: ::speed_t = 4111; +pub const OLCUC: crate::tcflag_t = 2; +pub const NLDLY: crate::tcflag_t = 256; +pub const CRDLY: crate::tcflag_t = 1536; +pub const TABDLY: crate::tcflag_t = 6144; +pub const BSDLY: crate::tcflag_t = 8192; +pub const FFDLY: crate::tcflag_t = 32768; +pub const VTDLY: crate::tcflag_t = 16384; +pub const XTABS: crate::tcflag_t = 6144; +pub const B57600: crate::speed_t = 4097; +pub const B115200: crate::speed_t = 4098; +pub const B230400: crate::speed_t = 4099; +pub const B460800: crate::speed_t = 4100; +pub const B500000: crate::speed_t = 4101; +pub const B576000: crate::speed_t = 4102; +pub const B921600: crate::speed_t = 4103; +pub const B1000000: crate::speed_t = 4104; +pub const B1152000: crate::speed_t = 4105; +pub const B1500000: crate::speed_t = 4106; +pub const B2000000: crate::speed_t = 4107; +pub const B2500000: crate::speed_t = 4108; +pub const B3000000: crate::speed_t = 4109; +pub const B3500000: crate::speed_t = 4110; +pub const B4000000: crate::speed_t = 4111; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 32768; -pub const TOSTOP: ::tcflag_t = 256; -pub const FLUSHO: ::tcflag_t = 4096; -pub const EXTPROC: ::tcflag_t = 65536; +pub const IEXTEN: crate::tcflag_t = 32768; +pub const TOSTOP: crate::tcflag_t = 256; +pub const FLUSHO: crate::tcflag_t = 4096; +pub const EXTPROC: crate::tcflag_t = 65536; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_close: ::c_long = 57; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_brk: ::c_long = 214; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_dup: ::c_long = 23; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_socket: ::c_long = 198; -pub const SYS_connect: ::c_long = 203; -pub const SYS_accept: ::c_long = 202; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_exit: ::c_long = 93; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_kill: ::c_long = 129; -pub const SYS_uname: ::c_long = 160; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semop: ::c_long = 193; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_flock: ::c_long = 32; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_umask: ::c_long = 166; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_times: ::c_long = 153; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_personality: ::c_long = 92; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_sync: ::c_long = 81; -pub const SYS_acct: ::c_long = 89; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_mount: ::c_long = 40; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_futex: ::c_long = 98; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_openat: ::c_long = 56; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_setns: ::c_long = 268; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_close: c_long = 57; +pub const SYS_fstat: c_long = 80; +pub const SYS_lseek: c_long = 62; +pub const SYS_mmap: c_long = 222; +pub const SYS_mprotect: c_long = 226; +pub const SYS_munmap: c_long = 215; +pub const SYS_brk: c_long = 214; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_ioctl: c_long = 29; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_mremap: c_long = 216; +pub const SYS_msync: c_long = 227; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmctl: c_long = 195; +pub const SYS_dup: c_long = 23; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_getpid: c_long = 172; +pub const SYS_sendfile: c_long = 71; +pub const SYS_socket: c_long = 198; +pub const SYS_connect: c_long = 203; +pub const SYS_accept: c_long = 202; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_shutdown: c_long = 210; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_socketpair: c_long = 199; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_exit: c_long = 93; +pub const SYS_wait4: c_long = 260; +pub const SYS_kill: c_long = 129; +pub const SYS_uname: c_long = 160; +pub const SYS_semget: c_long = 190; +pub const SYS_semop: c_long = 193; +pub const SYS_semctl: c_long = 191; +pub const SYS_shmdt: c_long = 197; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgctl: c_long = 187; +pub const SYS_fcntl: c_long = 25; +pub const SYS_flock: c_long = 32; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_getcwd: c_long = 17; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchown: c_long = 55; +pub const SYS_umask: c_long = 166; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_getrusage: c_long = 165; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_times: c_long = 153; +pub const SYS_ptrace: c_long = 117; +pub const SYS_getuid: c_long = 174; +pub const SYS_syslog: c_long = 116; +pub const SYS_getgid: c_long = 176; +pub const SYS_setuid: c_long = 146; +pub const SYS_setgid: c_long = 144; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getegid: c_long = 177; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getppid: c_long = 173; +pub const SYS_setsid: c_long = 157; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setregid: c_long = 143; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_getpgid: c_long = 155; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_getsid: c_long = 156; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_personality: c_long = 92; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_getpriority: c_long = 141; +pub const SYS_setpriority: c_long = 140; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_prctl: c_long = 167; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_chroot: c_long = 51; +pub const SYS_sync: c_long = 81; +pub const SYS_acct: c_long = 89; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_mount: c_long = 40; +pub const SYS_umount2: c_long = 39; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_reboot: c_long = 142; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_quotactl: c_long = 60; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_gettid: c_long = 178; +pub const SYS_readahead: c_long = 213; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_tkill: c_long = 130; +pub const SYS_futex: c_long = 98; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_getdents64: c_long = 61; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_exit_group: c_long = 94; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_tgkill: c_long = 131; +pub const SYS_mbind: c_long = 235; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_waitid: c_long = 95; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_openat: c_long = 56; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_mknodat: c_long = 33; +pub const SYS_fchownat: c_long = 54; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_linkat: c_long = 37; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_faccessat: c_long = 48; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_unshare: c_long = 97; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_move_pages: c_long = 239; +pub const SYS_utimensat: c_long = 88; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_fallocate: c_long = 47; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_accept4: c_long = 242; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_dup3: c_long = 24; +pub const SYS_pipe2: c_long = 59; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_setns: c_long = 268; +pub const SYS_getcpu: c_long = 168; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; diff --git a/src/unix/linux_like/linux/musl/b32/x86/mod.rs b/src/unix/linux_like/linux/musl/b32/x86/mod.rs index 769077c465a62..6c68c3406cbe2 100644 --- a/src/unix/linux_like/linux/musl/b32/x86/mod.rs +++ b/src/unix/linux_like/linux/musl/b32/x86/mod.rs @@ -1,49 +1,51 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, c_ushort, c_void, off_t, size_t, ssize_t}; + pub type c_char = i8; pub type wchar_t = i32; s! { pub struct stat { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino_t, + pub st_dev: crate::dev_t, + __st_dev_padding: c_int, + __st_ino_truncated: c_long, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_rdev_padding: c_int, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino_t, } pub struct stat64 { - pub st_dev: ::dev_t, - __st_dev_padding: ::c_int, - __st_ino_truncated: ::c_long, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __st_rdev_padding: ::c_int, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino_t, + pub st_dev: crate::dev_t, + __st_dev_padding: c_int, + __st_ino_truncated: c_long, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __st_rdev_padding: c_int, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino_t, } pub struct mcontext_t { @@ -51,80 +53,80 @@ s! { } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_int, - pub shm_dtime: ::time_t, - __unused2: ::c_int, - pub shm_ctime: ::time_t, - __unused3: ::c_int, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_int, + pub shm_dtime: crate::time_t, + __unused2: c_int, + pub shm_ctime: crate::time_t, + __unused3: c_int, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __unused1: ::c_int, - pub msg_rtime: ::time_t, - __unused2: ::c_int, - pub msg_ctime: ::time_t, - __unused3: ::c_int, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __unused1: c_int, + pub msg_rtime: crate::time_t, + __unused2: c_int, + pub msg_ctime: crate::time_t, + __unused3: c_int, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } } s_no_extra_traits! { pub struct user_fpxregs_struct { - pub cwd: ::c_ushort, - pub swd: ::c_ushort, - pub twd: ::c_ushort, - pub fop: ::c_ushort, - pub fip: ::c_long, - pub fcs: ::c_long, - pub foo: ::c_long, - pub fos: ::c_long, - pub mxcsr: ::c_long, - __reserved: ::c_long, - pub st_space: [::c_long; 32], - pub xmm_space: [::c_long; 32], - padding: [::c_long; 56], + pub cwd: c_ushort, + pub swd: c_ushort, + pub twd: c_ushort, + pub fop: c_ushort, + pub fip: c_long, + pub fcs: c_long, + pub foo: c_long, + pub fos: c_long, + pub mxcsr: c_long, + __reserved: c_long, + pub st_space: [c_long; 32], + pub xmm_space: [c_long; 32], + padding: [c_long; 56], } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, __private: [u8; 112], } @@ -157,8 +159,8 @@ cfg_if! { impl Eq for user_fpxregs_struct {} - impl ::fmt::Debug for user_fpxregs_struct { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for user_fpxregs_struct { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("user_fpxregs_struct") .field("cwd", &self.cwd) .field("swd", &self.swd) @@ -177,8 +179,8 @@ cfg_if! { } } - impl ::hash::Hash for user_fpxregs_struct { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for user_fpxregs_struct { + fn hash(&self, state: &mut H) { self.cwd.hash(state); self.swd.hash(state); self.twd.hash(state); @@ -212,8 +214,8 @@ cfg_if! { impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -225,8 +227,8 @@ cfg_if! { } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -238,29 +240,29 @@ cfg_if! { } } -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; - -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_ASYNC: ::c_int = 0x2000; -pub const O_LARGEFILE: ::c_int = 0o0100000; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; + +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_ASYNC: c_int = 0x2000; +pub const O_LARGEFILE: c_int = 0o0100000; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -268,647 +270,647 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; - -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const EDEADLK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const EXTPROC: ::tcflag_t = 0x00010000; - -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_32BIT: ::c_int = 0x0040; - -pub const F_GETLK: ::c_int = 12; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 13; -pub const F_SETLKW: ::c_int = 14; -pub const F_SETOWN: ::c_int = 8; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; + +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; + +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const EDEADLK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EDEADLOCK: c_int = EDEADLK; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; + +pub const EXTPROC: crate::tcflag_t = 0x00010000; + +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_32BIT: c_int = 0x0040; + +pub const F_GETLK: c_int = 12; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 13; +pub const F_SETLKW: c_int = 14; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const PTRACE_SYSEMU: ::c_int = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32; +pub const PTRACE_SYSEMU: c_int = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 32; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86old: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_vm86: ::c_long = 166; -pub const SYS_query_module: ::c_long = 167; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_getpmsg: ::c_long = 188; -pub const SYS_putpmsg: ::c_long = 189; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_pivot_root: ::c_long = 217; -pub const SYS_mincore: ::c_long = 218; -pub const SYS_madvise: ::c_long = 219; -pub const SYS_getdents64: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_set_thread_area: ::c_long = 243; -pub const SYS_get_thread_area: ::c_long = 244; -pub const SYS_io_setup: ::c_long = 245; -pub const SYS_io_destroy: ::c_long = 246; -pub const SYS_io_getevents: ::c_long = 247; -pub const SYS_io_submit: ::c_long = 248; -pub const SYS_io_cancel: ::c_long = 249; -pub const SYS_fadvise64: ::c_long = 250; -pub const SYS_exit_group: ::c_long = 252; -pub const SYS_lookup_dcookie: ::c_long = 253; -pub const SYS_epoll_create: ::c_long = 254; -pub const SYS_epoll_ctl: ::c_long = 255; -pub const SYS_epoll_wait: ::c_long = 256; -pub const SYS_remap_file_pages: ::c_long = 257; -pub const SYS_set_tid_address: ::c_long = 258; -pub const SYS_timer_create: ::c_long = 259; -pub const SYS_timer_settime: ::c_long = 260; -pub const SYS_timer_gettime: ::c_long = 261; -pub const SYS_timer_getoverrun: ::c_long = 262; -pub const SYS_timer_delete: ::c_long = 263; -pub const SYS_clock_settime: ::c_long = 264; -pub const SYS_clock_gettime: ::c_long = 265; -pub const SYS_clock_getres: ::c_long = 266; -pub const SYS_clock_nanosleep: ::c_long = 267; -pub const SYS_statfs64: ::c_long = 268; -pub const SYS_fstatfs64: ::c_long = 269; -pub const SYS_tgkill: ::c_long = 270; -pub const SYS_utimes: ::c_long = 271; -pub const SYS_fadvise64_64: ::c_long = 272; -pub const SYS_vserver: ::c_long = 273; -pub const SYS_mbind: ::c_long = 274; -pub const SYS_get_mempolicy: ::c_long = 275; -pub const SYS_set_mempolicy: ::c_long = 276; -pub const SYS_mq_open: ::c_long = 277; -pub const SYS_mq_unlink: ::c_long = 278; -pub const SYS_mq_timedsend: ::c_long = 279; -pub const SYS_mq_timedreceive: ::c_long = 280; -pub const SYS_mq_notify: ::c_long = 281; -pub const SYS_mq_getsetattr: ::c_long = 282; -pub const SYS_kexec_load: ::c_long = 283; -pub const SYS_waitid: ::c_long = 284; -pub const SYS_add_key: ::c_long = 286; -pub const SYS_request_key: ::c_long = 287; -pub const SYS_keyctl: ::c_long = 288; -pub const SYS_ioprio_set: ::c_long = 289; -pub const SYS_ioprio_get: ::c_long = 290; -pub const SYS_inotify_init: ::c_long = 291; -pub const SYS_inotify_add_watch: ::c_long = 292; -pub const SYS_inotify_rm_watch: ::c_long = 293; -pub const SYS_migrate_pages: ::c_long = 294; -pub const SYS_openat: ::c_long = 295; -pub const SYS_mkdirat: ::c_long = 296; -pub const SYS_mknodat: ::c_long = 297; -pub const SYS_fchownat: ::c_long = 298; -pub const SYS_futimesat: ::c_long = 299; -pub const SYS_fstatat64: ::c_long = 300; -pub const SYS_unlinkat: ::c_long = 301; -pub const SYS_renameat: ::c_long = 302; -pub const SYS_linkat: ::c_long = 303; -pub const SYS_symlinkat: ::c_long = 304; -pub const SYS_readlinkat: ::c_long = 305; -pub const SYS_fchmodat: ::c_long = 306; -pub const SYS_faccessat: ::c_long = 307; -pub const SYS_pselect6: ::c_long = 308; -pub const SYS_ppoll: ::c_long = 309; -pub const SYS_unshare: ::c_long = 310; -pub const SYS_set_robust_list: ::c_long = 311; -pub const SYS_get_robust_list: ::c_long = 312; -pub const SYS_splice: ::c_long = 313; -pub const SYS_sync_file_range: ::c_long = 314; -pub const SYS_tee: ::c_long = 315; -pub const SYS_vmsplice: ::c_long = 316; -pub const SYS_move_pages: ::c_long = 317; -pub const SYS_getcpu: ::c_long = 318; -pub const SYS_epoll_pwait: ::c_long = 319; -pub const SYS_utimensat: ::c_long = 320; -pub const SYS_signalfd: ::c_long = 321; -pub const SYS_timerfd_create: ::c_long = 322; -pub const SYS_eventfd: ::c_long = 323; -pub const SYS_fallocate: ::c_long = 324; -pub const SYS_timerfd_settime: ::c_long = 325; -pub const SYS_timerfd_gettime: ::c_long = 326; -pub const SYS_signalfd4: ::c_long = 327; -pub const SYS_eventfd2: ::c_long = 328; -pub const SYS_epoll_create1: ::c_long = 329; -pub const SYS_dup3: ::c_long = 330; -pub const SYS_pipe2: ::c_long = 331; -pub const SYS_inotify_init1: ::c_long = 332; -pub const SYS_preadv: ::c_long = 333; -pub const SYS_pwritev: ::c_long = 334; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 335; -pub const SYS_perf_event_open: ::c_long = 336; -pub const SYS_recvmmsg: ::c_long = 337; -pub const SYS_fanotify_init: ::c_long = 338; -pub const SYS_fanotify_mark: ::c_long = 339; -pub const SYS_prlimit64: ::c_long = 340; -pub const SYS_name_to_handle_at: ::c_long = 341; -pub const SYS_open_by_handle_at: ::c_long = 342; -pub const SYS_clock_adjtime: ::c_long = 343; -pub const SYS_syncfs: ::c_long = 344; -pub const SYS_sendmmsg: ::c_long = 345; -pub const SYS_setns: ::c_long = 346; -pub const SYS_process_vm_readv: ::c_long = 347; -pub const SYS_process_vm_writev: ::c_long = 348; -pub const SYS_kcmp: ::c_long = 349; -pub const SYS_finit_module: ::c_long = 350; -pub const SYS_sched_setattr: ::c_long = 351; -pub const SYS_sched_getattr: ::c_long = 352; -pub const SYS_renameat2: ::c_long = 353; -pub const SYS_seccomp: ::c_long = 354; -pub const SYS_getrandom: ::c_long = 355; -pub const SYS_memfd_create: ::c_long = 356; -pub const SYS_bpf: ::c_long = 357; -pub const SYS_execveat: ::c_long = 358; -pub const SYS_socket: ::c_long = 359; -pub const SYS_socketpair: ::c_long = 360; -pub const SYS_bind: ::c_long = 361; -pub const SYS_connect: ::c_long = 362; -pub const SYS_listen: ::c_long = 363; -pub const SYS_accept4: ::c_long = 364; -pub const SYS_getsockopt: ::c_long = 365; -pub const SYS_setsockopt: ::c_long = 366; -pub const SYS_getsockname: ::c_long = 367; -pub const SYS_getpeername: ::c_long = 368; -pub const SYS_sendto: ::c_long = 369; -pub const SYS_sendmsg: ::c_long = 370; -pub const SYS_recvfrom: ::c_long = 371; -pub const SYS_recvmsg: ::c_long = 372; -pub const SYS_shutdown: ::c_long = 373; -pub const SYS_userfaultfd: ::c_long = 374; -pub const SYS_membarrier: ::c_long = 375; -pub const SYS_mlock2: ::c_long = 376; -pub const SYS_copy_file_range: ::c_long = 377; -pub const SYS_preadv2: ::c_long = 378; -pub const SYS_pwritev2: ::c_long = 379; -pub const SYS_pkey_mprotect: ::c_long = 380; -pub const SYS_pkey_alloc: ::c_long = 381; -pub const SYS_pkey_free: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_fchmodat2: ::c_long = 452; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86old: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_vm86: c_long = 166; +pub const SYS_query_module: c_long = 167; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_getpmsg: c_long = 188; +pub const SYS_putpmsg: c_long = 189; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_pivot_root: c_long = 217; +pub const SYS_mincore: c_long = 218; +pub const SYS_madvise: c_long = 219; +pub const SYS_getdents64: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_set_thread_area: c_long = 243; +pub const SYS_get_thread_area: c_long = 244; +pub const SYS_io_setup: c_long = 245; +pub const SYS_io_destroy: c_long = 246; +pub const SYS_io_getevents: c_long = 247; +pub const SYS_io_submit: c_long = 248; +pub const SYS_io_cancel: c_long = 249; +pub const SYS_fadvise64: c_long = 250; +pub const SYS_exit_group: c_long = 252; +pub const SYS_lookup_dcookie: c_long = 253; +pub const SYS_epoll_create: c_long = 254; +pub const SYS_epoll_ctl: c_long = 255; +pub const SYS_epoll_wait: c_long = 256; +pub const SYS_remap_file_pages: c_long = 257; +pub const SYS_set_tid_address: c_long = 258; +pub const SYS_timer_create: c_long = 259; +pub const SYS_timer_settime: c_long = 260; +pub const SYS_timer_gettime: c_long = 261; +pub const SYS_timer_getoverrun: c_long = 262; +pub const SYS_timer_delete: c_long = 263; +pub const SYS_clock_settime: c_long = 264; +pub const SYS_clock_gettime: c_long = 265; +pub const SYS_clock_getres: c_long = 266; +pub const SYS_clock_nanosleep: c_long = 267; +pub const SYS_statfs64: c_long = 268; +pub const SYS_fstatfs64: c_long = 269; +pub const SYS_tgkill: c_long = 270; +pub const SYS_utimes: c_long = 271; +pub const SYS_fadvise64_64: c_long = 272; +pub const SYS_vserver: c_long = 273; +pub const SYS_mbind: c_long = 274; +pub const SYS_get_mempolicy: c_long = 275; +pub const SYS_set_mempolicy: c_long = 276; +pub const SYS_mq_open: c_long = 277; +pub const SYS_mq_unlink: c_long = 278; +pub const SYS_mq_timedsend: c_long = 279; +pub const SYS_mq_timedreceive: c_long = 280; +pub const SYS_mq_notify: c_long = 281; +pub const SYS_mq_getsetattr: c_long = 282; +pub const SYS_kexec_load: c_long = 283; +pub const SYS_waitid: c_long = 284; +pub const SYS_add_key: c_long = 286; +pub const SYS_request_key: c_long = 287; +pub const SYS_keyctl: c_long = 288; +pub const SYS_ioprio_set: c_long = 289; +pub const SYS_ioprio_get: c_long = 290; +pub const SYS_inotify_init: c_long = 291; +pub const SYS_inotify_add_watch: c_long = 292; +pub const SYS_inotify_rm_watch: c_long = 293; +pub const SYS_migrate_pages: c_long = 294; +pub const SYS_openat: c_long = 295; +pub const SYS_mkdirat: c_long = 296; +pub const SYS_mknodat: c_long = 297; +pub const SYS_fchownat: c_long = 298; +pub const SYS_futimesat: c_long = 299; +pub const SYS_fstatat64: c_long = 300; +pub const SYS_unlinkat: c_long = 301; +pub const SYS_renameat: c_long = 302; +pub const SYS_linkat: c_long = 303; +pub const SYS_symlinkat: c_long = 304; +pub const SYS_readlinkat: c_long = 305; +pub const SYS_fchmodat: c_long = 306; +pub const SYS_faccessat: c_long = 307; +pub const SYS_pselect6: c_long = 308; +pub const SYS_ppoll: c_long = 309; +pub const SYS_unshare: c_long = 310; +pub const SYS_set_robust_list: c_long = 311; +pub const SYS_get_robust_list: c_long = 312; +pub const SYS_splice: c_long = 313; +pub const SYS_sync_file_range: c_long = 314; +pub const SYS_tee: c_long = 315; +pub const SYS_vmsplice: c_long = 316; +pub const SYS_move_pages: c_long = 317; +pub const SYS_getcpu: c_long = 318; +pub const SYS_epoll_pwait: c_long = 319; +pub const SYS_utimensat: c_long = 320; +pub const SYS_signalfd: c_long = 321; +pub const SYS_timerfd_create: c_long = 322; +pub const SYS_eventfd: c_long = 323; +pub const SYS_fallocate: c_long = 324; +pub const SYS_timerfd_settime: c_long = 325; +pub const SYS_timerfd_gettime: c_long = 326; +pub const SYS_signalfd4: c_long = 327; +pub const SYS_eventfd2: c_long = 328; +pub const SYS_epoll_create1: c_long = 329; +pub const SYS_dup3: c_long = 330; +pub const SYS_pipe2: c_long = 331; +pub const SYS_inotify_init1: c_long = 332; +pub const SYS_preadv: c_long = 333; +pub const SYS_pwritev: c_long = 334; +pub const SYS_rt_tgsigqueueinfo: c_long = 335; +pub const SYS_perf_event_open: c_long = 336; +pub const SYS_recvmmsg: c_long = 337; +pub const SYS_fanotify_init: c_long = 338; +pub const SYS_fanotify_mark: c_long = 339; +pub const SYS_prlimit64: c_long = 340; +pub const SYS_name_to_handle_at: c_long = 341; +pub const SYS_open_by_handle_at: c_long = 342; +pub const SYS_clock_adjtime: c_long = 343; +pub const SYS_syncfs: c_long = 344; +pub const SYS_sendmmsg: c_long = 345; +pub const SYS_setns: c_long = 346; +pub const SYS_process_vm_readv: c_long = 347; +pub const SYS_process_vm_writev: c_long = 348; +pub const SYS_kcmp: c_long = 349; +pub const SYS_finit_module: c_long = 350; +pub const SYS_sched_setattr: c_long = 351; +pub const SYS_sched_getattr: c_long = 352; +pub const SYS_renameat2: c_long = 353; +pub const SYS_seccomp: c_long = 354; +pub const SYS_getrandom: c_long = 355; +pub const SYS_memfd_create: c_long = 356; +pub const SYS_bpf: c_long = 357; +pub const SYS_execveat: c_long = 358; +pub const SYS_socket: c_long = 359; +pub const SYS_socketpair: c_long = 360; +pub const SYS_bind: c_long = 361; +pub const SYS_connect: c_long = 362; +pub const SYS_listen: c_long = 363; +pub const SYS_accept4: c_long = 364; +pub const SYS_getsockopt: c_long = 365; +pub const SYS_setsockopt: c_long = 366; +pub const SYS_getsockname: c_long = 367; +pub const SYS_getpeername: c_long = 368; +pub const SYS_sendto: c_long = 369; +pub const SYS_sendmsg: c_long = 370; +pub const SYS_recvfrom: c_long = 371; +pub const SYS_recvmsg: c_long = 372; +pub const SYS_shutdown: c_long = 373; +pub const SYS_userfaultfd: c_long = 374; +pub const SYS_membarrier: c_long = 375; +pub const SYS_mlock2: c_long = 376; +pub const SYS_copy_file_range: c_long = 377; +pub const SYS_preadv2: c_long = 378; +pub const SYS_pwritev2: c_long = 379; +pub const SYS_pkey_mprotect: c_long = 380; +pub const SYS_pkey_alloc: c_long = 381; +pub const SYS_pkey_free: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_fchmodat2: c_long = 452; // offsets in user_regs_structs, from sys/reg.h -pub const EBX: ::c_int = 0; -pub const ECX: ::c_int = 1; -pub const EDX: ::c_int = 2; -pub const ESI: ::c_int = 3; -pub const EDI: ::c_int = 4; -pub const EBP: ::c_int = 5; -pub const EAX: ::c_int = 6; -pub const DS: ::c_int = 7; -pub const ES: ::c_int = 8; -pub const FS: ::c_int = 9; -pub const GS: ::c_int = 10; -pub const ORIG_EAX: ::c_int = 11; -pub const EIP: ::c_int = 12; -pub const CS: ::c_int = 13; -pub const EFL: ::c_int = 14; -pub const UESP: ::c_int = 15; -pub const SS: ::c_int = 16; +pub const EBX: c_int = 0; +pub const ECX: c_int = 1; +pub const EDX: c_int = 2; +pub const ESI: c_int = 3; +pub const EDI: c_int = 4; +pub const EBP: c_int = 5; +pub const EAX: c_int = 6; +pub const DS: c_int = 7; +pub const ES: c_int = 8; +pub const FS: c_int = 9; +pub const GS: c_int = 10; +pub const ORIG_EAX: c_int = 11; +pub const EIP: c_int = 12; +pub const CS: c_int = 13; +pub const EFL: c_int = 14; +pub const UESP: c_int = 15; +pub const SS: c_int = 16; extern "C" { - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; } diff --git a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 6528fa2d84e3e..7c5ecc6a2453e 100644 --- a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -1,109 +1,113 @@ +use crate::{ + c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off_t, size_t, +}; + pub type c_char = u8; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; pub type wchar_t = u32; pub type nlink_t = u32; -pub type blksize_t = ::c_int; +pub type blksize_t = c_int; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad0: ::c_ulong, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad1: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_uint; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad0: c_ulong, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad1: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_uint; 2], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad0: ::c_ulong, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad1: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_uint; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad0: c_ulong, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad1: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_uint; 2], } pub struct user_regs_struct { - pub regs: [::c_ulonglong; 31], - pub sp: ::c_ulonglong, - pub pc: ::c_ulonglong, - pub pstate: ::c_ulonglong, + pub regs: [c_ulonglong; 31], + pub sp: c_ulonglong, + pub pc: c_ulonglong, + pub pstate: c_ulonglong, } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[repr(align(16))] pub struct mcontext_t { - pub fault_address: ::c_ulong, - pub regs: [::c_ulong; 31], - pub sp: ::c_ulong, - pub pc: ::c_ulong, - pub pstate: ::c_ulong, + pub fault_address: c_ulong, + pub regs: [c_ulong; 31], + pub sp: c_ulong, + pub pc: c_ulong, + pub pstate: c_ulong, __reserved: [u64; 512], } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } pub struct user_fpsimd_struct { - pub vregs: [::__uint128_t; 32], + pub vregs: [crate::__uint128_t; 32], pub fpsr: u32, pub fpcr: u32, } @@ -117,514 +121,514 @@ s_no_extra_traits! { } } -pub const O_APPEND: ::c_int = 1024; -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_LARGEFILE: ::c_int = 0x20000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_ASYNC: ::c_int = 0x2000; +pub const O_APPEND: c_int = 1024; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_LARGEFILE: c_int = 0x20000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_ASYNC: c_int = 0x2000; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; // bits/hwcap.h -pub const HWCAP_FP: ::c_ulong = 1 << 0; -pub const HWCAP_ASIMD: ::c_ulong = 1 << 1; -pub const HWCAP_EVTSTRM: ::c_ulong = 1 << 2; -pub const HWCAP_AES: ::c_ulong = 1 << 3; -pub const HWCAP_PMULL: ::c_ulong = 1 << 4; -pub const HWCAP_SHA1: ::c_ulong = 1 << 5; -pub const HWCAP_SHA2: ::c_ulong = 1 << 6; -pub const HWCAP_CRC32: ::c_ulong = 1 << 7; -pub const HWCAP_ATOMICS: ::c_ulong = 1 << 8; -pub const HWCAP_FPHP: ::c_ulong = 1 << 9; -pub const HWCAP_ASIMDHP: ::c_ulong = 1 << 10; -pub const HWCAP_CPUID: ::c_ulong = 1 << 11; -pub const HWCAP_ASIMDRDM: ::c_ulong = 1 << 12; -pub const HWCAP_JSCVT: ::c_ulong = 1 << 13; -pub const HWCAP_FCMA: ::c_ulong = 1 << 14; -pub const HWCAP_LRCPC: ::c_ulong = 1 << 15; -pub const HWCAP_DCPOP: ::c_ulong = 1 << 16; -pub const HWCAP_SHA3: ::c_ulong = 1 << 17; -pub const HWCAP_SM3: ::c_ulong = 1 << 18; -pub const HWCAP_SM4: ::c_ulong = 1 << 19; -pub const HWCAP_ASIMDDP: ::c_ulong = 1 << 20; -pub const HWCAP_SHA512: ::c_ulong = 1 << 21; -pub const HWCAP_SVE: ::c_ulong = 1 << 22; -pub const HWCAP_ASIMDFHM: ::c_ulong = 1 << 23; -pub const HWCAP_DIT: ::c_ulong = 1 << 24; -pub const HWCAP_USCAT: ::c_ulong = 1 << 25; -pub const HWCAP_ILRCPC: ::c_ulong = 1 << 26; -pub const HWCAP_FLAGM: ::c_ulong = 1 << 27; -pub const HWCAP_SSBS: ::c_ulong = 1 << 28; -pub const HWCAP_SB: ::c_ulong = 1 << 29; -pub const HWCAP_PACA: ::c_ulong = 1 << 30; -pub const HWCAP_PACG: ::c_ulong = 1 << 31; +pub const HWCAP_FP: c_ulong = 1 << 0; +pub const HWCAP_ASIMD: c_ulong = 1 << 1; +pub const HWCAP_EVTSTRM: c_ulong = 1 << 2; +pub const HWCAP_AES: c_ulong = 1 << 3; +pub const HWCAP_PMULL: c_ulong = 1 << 4; +pub const HWCAP_SHA1: c_ulong = 1 << 5; +pub const HWCAP_SHA2: c_ulong = 1 << 6; +pub const HWCAP_CRC32: c_ulong = 1 << 7; +pub const HWCAP_ATOMICS: c_ulong = 1 << 8; +pub const HWCAP_FPHP: c_ulong = 1 << 9; +pub const HWCAP_ASIMDHP: c_ulong = 1 << 10; +pub const HWCAP_CPUID: c_ulong = 1 << 11; +pub const HWCAP_ASIMDRDM: c_ulong = 1 << 12; +pub const HWCAP_JSCVT: c_ulong = 1 << 13; +pub const HWCAP_FCMA: c_ulong = 1 << 14; +pub const HWCAP_LRCPC: c_ulong = 1 << 15; +pub const HWCAP_DCPOP: c_ulong = 1 << 16; +pub const HWCAP_SHA3: c_ulong = 1 << 17; +pub const HWCAP_SM3: c_ulong = 1 << 18; +pub const HWCAP_SM4: c_ulong = 1 << 19; +pub const HWCAP_ASIMDDP: c_ulong = 1 << 20; +pub const HWCAP_SHA512: c_ulong = 1 << 21; +pub const HWCAP_SVE: c_ulong = 1 << 22; +pub const HWCAP_ASIMDFHM: c_ulong = 1 << 23; +pub const HWCAP_DIT: c_ulong = 1 << 24; +pub const HWCAP_USCAT: c_ulong = 1 << 25; +pub const HWCAP_ILRCPC: c_ulong = 1 << 26; +pub const HWCAP_FLAGM: c_ulong = 1 << 27; +pub const HWCAP_SSBS: c_ulong = 1 << 28; +pub const HWCAP_SB: c_ulong = 1 << 29; +pub const HWCAP_PACA: c_ulong = 1 << 30; +pub const HWCAP_PACG: c_ulong = 1 << 31; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const MINSIGSTKSZ: ::size_t = 6144; -pub const SIGSTKSZ: ::size_t = 12288; +pub const MINSIGSTKSZ: size_t = 6144; +pub const SIGSTKSZ: size_t = 12288; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_dup: ::c_long = 23; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_flock: ::c_long = 32; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_renameat: ::c_long = 38; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_mount: ::c_long = 40; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_openat: ::c_long = 56; -pub const SYS_close: ::c_long = 57; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_sync: ::c_long = 81; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_acct: ::c_long = 89; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_personality: ::c_long = 92; -pub const SYS_exit: ::c_long = 93; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_futex: ::c_long = 98; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_kill: ::c_long = 129; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_times: ::c_long = 153; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_uname: ::c_long = 160; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_umask: ::c_long = 166; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_semop: ::c_long = 193; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_socket: ::c_long = 198; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_accept: ::c_long = 202; -pub const SYS_connect: ::c_long = 203; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_brk: ::c_long = 214; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_setns: ::c_long = 268; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_io_pgetevents: ::c_long = 292; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_mseal: ::c_long = 462; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_getcwd: c_long = 17; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_dup: c_long = 23; +pub const SYS_dup3: c_long = 24; +pub const SYS_fcntl: c_long = 25; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_ioctl: c_long = 29; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_flock: c_long = 32; +pub const SYS_mknodat: c_long = 33; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_linkat: c_long = 37; +pub const SYS_renameat: c_long = 38; +pub const SYS_umount2: c_long = 39; +pub const SYS_mount: c_long = 40; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_fallocate: c_long = 47; +pub const SYS_faccessat: c_long = 48; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_chroot: c_long = 51; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_fchownat: c_long = 54; +pub const SYS_fchown: c_long = 55; +pub const SYS_openat: c_long = 56; +pub const SYS_close: c_long = 57; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pipe2: c_long = 59; +pub const SYS_quotactl: c_long = 60; +pub const SYS_getdents64: c_long = 61; +pub const SYS_lseek: c_long = 62; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_fstat: c_long = 80; +pub const SYS_sync: c_long = 81; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_utimensat: c_long = 88; +pub const SYS_acct: c_long = 89; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_personality: c_long = 92; +pub const SYS_exit: c_long = 93; +pub const SYS_exit_group: c_long = 94; +pub const SYS_waitid: c_long = 95; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_unshare: c_long = 97; +pub const SYS_futex: c_long = 98; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_syslog: c_long = 116; +pub const SYS_ptrace: c_long = 117; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_kill: c_long = 129; +pub const SYS_tkill: c_long = 130; +pub const SYS_tgkill: c_long = 131; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_setpriority: c_long = 140; +pub const SYS_getpriority: c_long = 141; +pub const SYS_reboot: c_long = 142; +pub const SYS_setregid: c_long = 143; +pub const SYS_setgid: c_long = 144; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setuid: c_long = 146; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_times: c_long = 153; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getpgid: c_long = 155; +pub const SYS_getsid: c_long = 156; +pub const SYS_setsid: c_long = 157; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_uname: c_long = 160; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_getrusage: c_long = 165; +pub const SYS_umask: c_long = 166; +pub const SYS_prctl: c_long = 167; +pub const SYS_getcpu: c_long = 168; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_getpid: c_long = 172; +pub const SYS_getppid: c_long = 173; +pub const SYS_getuid: c_long = 174; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getgid: c_long = 176; +pub const SYS_getegid: c_long = 177; +pub const SYS_gettid: c_long = 178; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgctl: c_long = 187; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_semget: c_long = 190; +pub const SYS_semctl: c_long = 191; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_semop: c_long = 193; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmctl: c_long = 195; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmdt: c_long = 197; +pub const SYS_socket: c_long = 198; +pub const SYS_socketpair: c_long = 199; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_accept: c_long = 202; +pub const SYS_connect: c_long = 203; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_shutdown: c_long = 210; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_readahead: c_long = 213; +pub const SYS_brk: c_long = 214; +pub const SYS_munmap: c_long = 215; +pub const SYS_mremap: c_long = 216; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_mmap: c_long = 222; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_mprotect: c_long = 226; +pub const SYS_msync: c_long = 227; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_mbind: c_long = 235; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_move_pages: c_long = 239; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_accept4: c_long = 242; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_wait4: c_long = 260; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_setns: c_long = 268; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_io_pgetevents: c_long = 292; +pub const SYS_rseq: c_long = 293; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_mseal: c_long = 462; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -632,63 +636,63 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; -pub const EDEADLK: ::c_int = 35; -pub const EDEADLOCK: ::c_int = EDEADLK; +pub const EDEADLK: c_int = 35; +pub const EDEADLOCK: c_int = EDEADLK; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; diff --git a/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs index f2fe5fe1a23d2..1de3fdb123ac6 100644 --- a/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/loongarch64/mod.rs @@ -1,71 +1,76 @@ //! LoongArch-specific definitions for 64-bit linux-like values +use crate::{ + c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off64_t, off_t, + size_t, +}; + pub type c_char = i8; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; -pub type nlink_t = ::c_uint; -pub type blksize_t = ::c_int; -pub type fsblkcnt64_t = ::c_ulong; -pub type fsfilcnt64_t = ::c_ulong; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type nlink_t = c_uint; +pub type blksize_t = c_int; +pub type fsblkcnt64_t = c_ulong; +pub type fsfilcnt64_t = c_ulong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad1: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2usize], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_int, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_uint, + pub __seq: c_int, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct user_regs_struct { @@ -83,34 +88,34 @@ s! { } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[repr(align(16))] pub struct mcontext_t { - pub __pc: ::c_ulong, - pub __gregs: [::c_ulong; 32], - pub __flags: ::c_uint, - pub __extcontext: [::c_ulong; 0], + pub __pc: c_ulong, + pub __gregs: [c_ulong; 32], + pub __flags: c_uint, + pub __extcontext: [c_ulong; 0], } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } @@ -122,482 +127,482 @@ s_no_extra_traits! { } } -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_dup: ::c_long = 23; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_flock: ::c_long = 32; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_mount: ::c_long = 40; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_openat: ::c_long = 56; -pub const SYS_close: ::c_long = 57; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_sync: ::c_long = 81; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_acct: ::c_long = 89; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_personality: ::c_long = 92; -pub const SYS_exit: ::c_long = 93; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_futex: ::c_long = 98; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_kill: ::c_long = 129; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_times: ::c_long = 153; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_uname: ::c_long = 160; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_umask: ::c_long = 166; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_semop: ::c_long = 193; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_socket: ::c_long = 198; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_accept: ::c_long = 202; -pub const SYS_connect: ::c_long = 203; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_brk: ::c_long = 214; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_arch_specific_syscall: ::c_long = 244; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_setns: ::c_long = 268; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_io_pgetevents: ::c_long = 292; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_kexec_file_load: ::c_long = 294; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_cachestat: ::c_long = 451; -pub const SYS_fchmodat2: ::c_long = 452; -pub const SYS_map_shadow_stack: ::c_long = 453; -pub const SYS_futex_wake: ::c_long = 454; -pub const SYS_futex_wait: ::c_long = 455; -pub const SYS_futex_requeue: ::c_long = 456; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_getcwd: c_long = 17; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_dup: c_long = 23; +pub const SYS_dup3: c_long = 24; +pub const SYS_fcntl: c_long = 25; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_ioctl: c_long = 29; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_flock: c_long = 32; +pub const SYS_mknodat: c_long = 33; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_linkat: c_long = 37; +pub const SYS_umount2: c_long = 39; +pub const SYS_mount: c_long = 40; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_fallocate: c_long = 47; +pub const SYS_faccessat: c_long = 48; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_chroot: c_long = 51; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_fchownat: c_long = 54; +pub const SYS_fchown: c_long = 55; +pub const SYS_openat: c_long = 56; +pub const SYS_close: c_long = 57; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pipe2: c_long = 59; +pub const SYS_quotactl: c_long = 60; +pub const SYS_getdents64: c_long = 61; +pub const SYS_lseek: c_long = 62; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_sendfile: c_long = 71; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_sync: c_long = 81; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_utimensat: c_long = 88; +pub const SYS_acct: c_long = 89; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_personality: c_long = 92; +pub const SYS_exit: c_long = 93; +pub const SYS_exit_group: c_long = 94; +pub const SYS_waitid: c_long = 95; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_unshare: c_long = 97; +pub const SYS_futex: c_long = 98; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_syslog: c_long = 116; +pub const SYS_ptrace: c_long = 117; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_kill: c_long = 129; +pub const SYS_tkill: c_long = 130; +pub const SYS_tgkill: c_long = 131; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_setpriority: c_long = 140; +pub const SYS_getpriority: c_long = 141; +pub const SYS_reboot: c_long = 142; +pub const SYS_setregid: c_long = 143; +pub const SYS_setgid: c_long = 144; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setuid: c_long = 146; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_times: c_long = 153; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getpgid: c_long = 155; +pub const SYS_getsid: c_long = 156; +pub const SYS_setsid: c_long = 157; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_uname: c_long = 160; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_getrusage: c_long = 165; +pub const SYS_umask: c_long = 166; +pub const SYS_prctl: c_long = 167; +pub const SYS_getcpu: c_long = 168; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_getpid: c_long = 172; +pub const SYS_getppid: c_long = 173; +pub const SYS_getuid: c_long = 174; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getgid: c_long = 176; +pub const SYS_getegid: c_long = 177; +pub const SYS_gettid: c_long = 178; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgctl: c_long = 187; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_semget: c_long = 190; +pub const SYS_semctl: c_long = 191; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_semop: c_long = 193; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmctl: c_long = 195; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmdt: c_long = 197; +pub const SYS_socket: c_long = 198; +pub const SYS_socketpair: c_long = 199; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_accept: c_long = 202; +pub const SYS_connect: c_long = 203; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_shutdown: c_long = 210; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_readahead: c_long = 213; +pub const SYS_brk: c_long = 214; +pub const SYS_munmap: c_long = 215; +pub const SYS_mremap: c_long = 216; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_mmap: c_long = 222; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_mprotect: c_long = 226; +pub const SYS_msync: c_long = 227; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_mbind: c_long = 235; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_move_pages: c_long = 239; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_accept4: c_long = 242; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_arch_specific_syscall: c_long = 244; +pub const SYS_wait4: c_long = 260; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_setns: c_long = 268; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_io_pgetevents: c_long = 292; +pub const SYS_rseq: c_long = 293; +pub const SYS_kexec_file_load: c_long = 294; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_cachestat: c_long = 451; +pub const SYS_fchmodat2: c_long = 452; +pub const SYS_map_shadow_stack: c_long = 453; +pub const SYS_futex_wake: c_long = 454; +pub const SYS_futex_wait: c_long = 455; +pub const SYS_futex_requeue: c_long = 456; -pub const O_APPEND: ::c_int = 1024; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_LARGEFILE: ::c_int = 0o0100000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_ASYNC: ::c_int = 0o20000; +pub const O_APPEND: c_int = 1024; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_LARGEFILE: c_int = 0o0100000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_ASYNC: c_int = 0o20000; -pub const SIGSTKSZ: ::size_t = 16384; -pub const MINSIGSTKSZ: ::size_t = 4096; +pub const SIGSTKSZ: size_t = 16384; +pub const MINSIGSTKSZ: size_t = 4096; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -605,63 +610,63 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const XCASE: ::tcflag_t = 0x00000004; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const XCASE: crate::tcflag_t = 0x00000004; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; -pub const EDEADLK: ::c_int = 35; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const EDEADLK: c_int = 35; +pub const EDEADLOCK: c_int = EDEADLK; +pub const EXTPROC: crate::tcflag_t = 0x00010000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; diff --git a/src/unix/linux_like/linux/musl/b64/mips64.rs b/src/unix/linux_like/linux/musl/b64/mips64.rs index 63a47af041487..b3f660931c44f 100644 --- a/src/unix/linux_like/linux/musl/b64/mips64.rs +++ b/src/unix/linux_like/linux/musl/b64/mips64.rs @@ -1,602 +1,604 @@ +use crate::{c_int, c_long, c_short, c_uint, c_ulong, off_t, size_t}; + pub type c_char = i8; pub type wchar_t = i32; -pub type __u64 = ::c_ulong; -pub type __s64 = ::c_long; +pub type __u64 = c_ulong; +pub type __s64 = c_long; pub type nlink_t = u64; pub type blksize_t = i64; s! { pub struct stat { - pub st_dev: ::dev_t, - __pad1: [::c_int; 3], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: [::c_uint; 2], - pub st_size: ::off_t, - __pad3: ::c_int, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - __pad4: ::c_uint, - pub st_blocks: ::blkcnt_t, - __pad5: [::c_int; 14], + pub st_dev: crate::dev_t, + __pad1: [c_int; 3], + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: [c_uint; 2], + pub st_size: off_t, + __pad3: c_int, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + __pad4: c_uint, + pub st_blocks: crate::blkcnt_t, + __pad5: [c_int; 14], } pub struct stat64 { - pub st_dev: ::dev_t, - __pad1: [::c_int; 3], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - __pad2: [::c_uint; 2], - pub st_size: ::off_t, - __pad3: ::c_int, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - __pad4: ::c_uint, - pub st_blocks: ::blkcnt_t, - __pad5: [::c_int; 14], + pub st_dev: crate::dev_t, + __pad1: [c_int; 3], + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + __pad2: [c_uint; 2], + pub st_size: off_t, + __pad3: c_int, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + __pad4: c_uint, + pub st_blocks: crate::blkcnt_t, + __pad5: [c_int; 14], } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __pad1: ::c_int, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __pad1: c_int, + __unused1: c_ulong, + __unused2: c_ulong, } } -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; -pub const SYS_read: ::c_long = 5000 + 0; -pub const SYS_write: ::c_long = 5000 + 1; -pub const SYS_open: ::c_long = 5000 + 2; -pub const SYS_close: ::c_long = 5000 + 3; -pub const SYS_stat: ::c_long = 5000 + 4; -pub const SYS_fstat: ::c_long = 5000 + 5; -pub const SYS_lstat: ::c_long = 5000 + 6; -pub const SYS_poll: ::c_long = 5000 + 7; -pub const SYS_lseek: ::c_long = 5000 + 8; -pub const SYS_mmap: ::c_long = 5000 + 9; -pub const SYS_mprotect: ::c_long = 5000 + 10; -pub const SYS_munmap: ::c_long = 5000 + 11; -pub const SYS_brk: ::c_long = 5000 + 12; -pub const SYS_rt_sigaction: ::c_long = 5000 + 13; -pub const SYS_rt_sigprocmask: ::c_long = 5000 + 14; -pub const SYS_ioctl: ::c_long = 5000 + 15; -pub const SYS_pread64: ::c_long = 5000 + 16; -pub const SYS_pwrite64: ::c_long = 5000 + 17; -pub const SYS_readv: ::c_long = 5000 + 18; -pub const SYS_writev: ::c_long = 5000 + 19; -pub const SYS_access: ::c_long = 5000 + 20; -pub const SYS_pipe: ::c_long = 5000 + 21; -pub const SYS__newselect: ::c_long = 5000 + 22; -pub const SYS_sched_yield: ::c_long = 5000 + 23; -pub const SYS_mremap: ::c_long = 5000 + 24; -pub const SYS_msync: ::c_long = 5000 + 25; -pub const SYS_mincore: ::c_long = 5000 + 26; -pub const SYS_madvise: ::c_long = 5000 + 27; -pub const SYS_shmget: ::c_long = 5000 + 28; -pub const SYS_shmat: ::c_long = 5000 + 29; -pub const SYS_shmctl: ::c_long = 5000 + 30; -pub const SYS_dup: ::c_long = 5000 + 31; -pub const SYS_dup2: ::c_long = 5000 + 32; -pub const SYS_pause: ::c_long = 5000 + 33; -pub const SYS_nanosleep: ::c_long = 5000 + 34; -pub const SYS_getitimer: ::c_long = 5000 + 35; -pub const SYS_setitimer: ::c_long = 5000 + 36; -pub const SYS_alarm: ::c_long = 5000 + 37; -pub const SYS_getpid: ::c_long = 5000 + 38; -pub const SYS_sendfile: ::c_long = 5000 + 39; -pub const SYS_socket: ::c_long = 5000 + 40; -pub const SYS_connect: ::c_long = 5000 + 41; -pub const SYS_accept: ::c_long = 5000 + 42; -pub const SYS_sendto: ::c_long = 5000 + 43; -pub const SYS_recvfrom: ::c_long = 5000 + 44; -pub const SYS_sendmsg: ::c_long = 5000 + 45; -pub const SYS_recvmsg: ::c_long = 5000 + 46; -pub const SYS_shutdown: ::c_long = 5000 + 47; -pub const SYS_bind: ::c_long = 5000 + 48; -pub const SYS_listen: ::c_long = 5000 + 49; -pub const SYS_getsockname: ::c_long = 5000 + 50; -pub const SYS_getpeername: ::c_long = 5000 + 51; -pub const SYS_socketpair: ::c_long = 5000 + 52; -pub const SYS_setsockopt: ::c_long = 5000 + 53; -pub const SYS_getsockopt: ::c_long = 5000 + 54; -pub const SYS_clone: ::c_long = 5000 + 55; -pub const SYS_fork: ::c_long = 5000 + 56; -pub const SYS_execve: ::c_long = 5000 + 57; -pub const SYS_exit: ::c_long = 5000 + 58; -pub const SYS_wait4: ::c_long = 5000 + 59; -pub const SYS_kill: ::c_long = 5000 + 60; -pub const SYS_uname: ::c_long = 5000 + 61; -pub const SYS_semget: ::c_long = 5000 + 62; -pub const SYS_semop: ::c_long = 5000 + 63; -pub const SYS_semctl: ::c_long = 5000 + 64; -pub const SYS_shmdt: ::c_long = 5000 + 65; -pub const SYS_msgget: ::c_long = 5000 + 66; -pub const SYS_msgsnd: ::c_long = 5000 + 67; -pub const SYS_msgrcv: ::c_long = 5000 + 68; -pub const SYS_msgctl: ::c_long = 5000 + 69; -pub const SYS_fcntl: ::c_long = 5000 + 70; -pub const SYS_flock: ::c_long = 5000 + 71; -pub const SYS_fsync: ::c_long = 5000 + 72; -pub const SYS_fdatasync: ::c_long = 5000 + 73; -pub const SYS_truncate: ::c_long = 5000 + 74; -pub const SYS_ftruncate: ::c_long = 5000 + 75; -pub const SYS_getdents: ::c_long = 5000 + 76; -pub const SYS_getcwd: ::c_long = 5000 + 77; -pub const SYS_chdir: ::c_long = 5000 + 78; -pub const SYS_fchdir: ::c_long = 5000 + 79; -pub const SYS_rename: ::c_long = 5000 + 80; -pub const SYS_mkdir: ::c_long = 5000 + 81; -pub const SYS_rmdir: ::c_long = 5000 + 82; -pub const SYS_creat: ::c_long = 5000 + 83; -pub const SYS_link: ::c_long = 5000 + 84; -pub const SYS_unlink: ::c_long = 5000 + 85; -pub const SYS_symlink: ::c_long = 5000 + 86; -pub const SYS_readlink: ::c_long = 5000 + 87; -pub const SYS_chmod: ::c_long = 5000 + 88; -pub const SYS_fchmod: ::c_long = 5000 + 89; -pub const SYS_chown: ::c_long = 5000 + 90; -pub const SYS_fchown: ::c_long = 5000 + 91; -pub const SYS_lchown: ::c_long = 5000 + 92; -pub const SYS_umask: ::c_long = 5000 + 93; -pub const SYS_gettimeofday: ::c_long = 5000 + 94; -pub const SYS_getrlimit: ::c_long = 5000 + 95; -pub const SYS_getrusage: ::c_long = 5000 + 96; -pub const SYS_sysinfo: ::c_long = 5000 + 97; -pub const SYS_times: ::c_long = 5000 + 98; -pub const SYS_ptrace: ::c_long = 5000 + 99; -pub const SYS_getuid: ::c_long = 5000 + 100; -pub const SYS_syslog: ::c_long = 5000 + 101; -pub const SYS_getgid: ::c_long = 5000 + 102; -pub const SYS_setuid: ::c_long = 5000 + 103; -pub const SYS_setgid: ::c_long = 5000 + 104; -pub const SYS_geteuid: ::c_long = 5000 + 105; -pub const SYS_getegid: ::c_long = 5000 + 106; -pub const SYS_setpgid: ::c_long = 5000 + 107; -pub const SYS_getppid: ::c_long = 5000 + 108; -pub const SYS_getpgrp: ::c_long = 5000 + 109; -pub const SYS_setsid: ::c_long = 5000 + 110; -pub const SYS_setreuid: ::c_long = 5000 + 111; -pub const SYS_setregid: ::c_long = 5000 + 112; -pub const SYS_getgroups: ::c_long = 5000 + 113; -pub const SYS_setgroups: ::c_long = 5000 + 114; -pub const SYS_setresuid: ::c_long = 5000 + 115; -pub const SYS_getresuid: ::c_long = 5000 + 116; -pub const SYS_setresgid: ::c_long = 5000 + 117; -pub const SYS_getresgid: ::c_long = 5000 + 118; -pub const SYS_getpgid: ::c_long = 5000 + 119; -pub const SYS_setfsuid: ::c_long = 5000 + 120; -pub const SYS_setfsgid: ::c_long = 5000 + 121; -pub const SYS_getsid: ::c_long = 5000 + 122; -pub const SYS_capget: ::c_long = 5000 + 123; -pub const SYS_capset: ::c_long = 5000 + 124; -pub const SYS_rt_sigpending: ::c_long = 5000 + 125; -pub const SYS_rt_sigtimedwait: ::c_long = 5000 + 126; -pub const SYS_rt_sigqueueinfo: ::c_long = 5000 + 127; -pub const SYS_rt_sigsuspend: ::c_long = 5000 + 128; -pub const SYS_sigaltstack: ::c_long = 5000 + 129; -pub const SYS_utime: ::c_long = 5000 + 130; -pub const SYS_mknod: ::c_long = 5000 + 131; -pub const SYS_personality: ::c_long = 5000 + 132; -pub const SYS_ustat: ::c_long = 5000 + 133; -pub const SYS_statfs: ::c_long = 5000 + 134; -pub const SYS_fstatfs: ::c_long = 5000 + 135; -pub const SYS_sysfs: ::c_long = 5000 + 136; -pub const SYS_getpriority: ::c_long = 5000 + 137; -pub const SYS_setpriority: ::c_long = 5000 + 138; -pub const SYS_sched_setparam: ::c_long = 5000 + 139; -pub const SYS_sched_getparam: ::c_long = 5000 + 140; -pub const SYS_sched_setscheduler: ::c_long = 5000 + 141; -pub const SYS_sched_getscheduler: ::c_long = 5000 + 142; -pub const SYS_sched_get_priority_max: ::c_long = 5000 + 143; -pub const SYS_sched_get_priority_min: ::c_long = 5000 + 144; -pub const SYS_sched_rr_get_interval: ::c_long = 5000 + 145; -pub const SYS_mlock: ::c_long = 5000 + 146; -pub const SYS_munlock: ::c_long = 5000 + 147; -pub const SYS_mlockall: ::c_long = 5000 + 148; -pub const SYS_munlockall: ::c_long = 5000 + 149; -pub const SYS_vhangup: ::c_long = 5000 + 150; -pub const SYS_pivot_root: ::c_long = 5000 + 151; -pub const SYS__sysctl: ::c_long = 5000 + 152; -pub const SYS_prctl: ::c_long = 5000 + 153; -pub const SYS_adjtimex: ::c_long = 5000 + 154; -pub const SYS_setrlimit: ::c_long = 5000 + 155; -pub const SYS_chroot: ::c_long = 5000 + 156; -pub const SYS_sync: ::c_long = 5000 + 157; -pub const SYS_acct: ::c_long = 5000 + 158; -pub const SYS_settimeofday: ::c_long = 5000 + 159; -pub const SYS_mount: ::c_long = 5000 + 160; -pub const SYS_umount2: ::c_long = 5000 + 161; -pub const SYS_swapon: ::c_long = 5000 + 162; -pub const SYS_swapoff: ::c_long = 5000 + 163; -pub const SYS_reboot: ::c_long = 5000 + 164; -pub const SYS_sethostname: ::c_long = 5000 + 165; -pub const SYS_setdomainname: ::c_long = 5000 + 166; -pub const SYS_create_module: ::c_long = 5000 + 167; -pub const SYS_init_module: ::c_long = 5000 + 168; -pub const SYS_delete_module: ::c_long = 5000 + 169; -pub const SYS_get_kernel_syms: ::c_long = 5000 + 170; -pub const SYS_query_module: ::c_long = 5000 + 171; -pub const SYS_quotactl: ::c_long = 5000 + 172; -pub const SYS_nfsservctl: ::c_long = 5000 + 173; -pub const SYS_getpmsg: ::c_long = 5000 + 174; -pub const SYS_putpmsg: ::c_long = 5000 + 175; -pub const SYS_afs_syscall: ::c_long = 5000 + 176; -pub const SYS_gettid: ::c_long = 5000 + 178; -pub const SYS_readahead: ::c_long = 5000 + 179; -pub const SYS_setxattr: ::c_long = 5000 + 180; -pub const SYS_lsetxattr: ::c_long = 5000 + 181; -pub const SYS_fsetxattr: ::c_long = 5000 + 182; -pub const SYS_getxattr: ::c_long = 5000 + 183; -pub const SYS_lgetxattr: ::c_long = 5000 + 184; -pub const SYS_fgetxattr: ::c_long = 5000 + 185; -pub const SYS_listxattr: ::c_long = 5000 + 186; -pub const SYS_llistxattr: ::c_long = 5000 + 187; -pub const SYS_flistxattr: ::c_long = 5000 + 188; -pub const SYS_removexattr: ::c_long = 5000 + 189; -pub const SYS_lremovexattr: ::c_long = 5000 + 190; -pub const SYS_fremovexattr: ::c_long = 5000 + 191; -pub const SYS_tkill: ::c_long = 5000 + 192; -pub const SYS_futex: ::c_long = 5000 + 194; -pub const SYS_sched_setaffinity: ::c_long = 5000 + 195; -pub const SYS_sched_getaffinity: ::c_long = 5000 + 196; -pub const SYS_cacheflush: ::c_long = 5000 + 197; -pub const SYS_cachectl: ::c_long = 5000 + 198; -pub const SYS_sysmips: ::c_long = 5000 + 199; -pub const SYS_io_setup: ::c_long = 5000 + 200; -pub const SYS_io_destroy: ::c_long = 5000 + 201; -pub const SYS_io_getevents: ::c_long = 5000 + 202; -pub const SYS_io_submit: ::c_long = 5000 + 203; -pub const SYS_io_cancel: ::c_long = 5000 + 204; -pub const SYS_exit_group: ::c_long = 5000 + 205; -pub const SYS_lookup_dcookie: ::c_long = 5000 + 206; -pub const SYS_epoll_create: ::c_long = 5000 + 207; -pub const SYS_epoll_ctl: ::c_long = 5000 + 208; -pub const SYS_epoll_wait: ::c_long = 5000 + 209; -pub const SYS_remap_file_pages: ::c_long = 5000 + 210; -pub const SYS_rt_sigreturn: ::c_long = 5000 + 211; -pub const SYS_set_tid_address: ::c_long = 5000 + 212; -pub const SYS_restart_syscall: ::c_long = 5000 + 213; -pub const SYS_semtimedop: ::c_long = 5000 + 214; -pub const SYS_fadvise64: ::c_long = 5000 + 215; -pub const SYS_timer_create: ::c_long = 5000 + 216; -pub const SYS_timer_settime: ::c_long = 5000 + 217; -pub const SYS_timer_gettime: ::c_long = 5000 + 218; -pub const SYS_timer_getoverrun: ::c_long = 5000 + 219; -pub const SYS_timer_delete: ::c_long = 5000 + 220; -pub const SYS_clock_settime: ::c_long = 5000 + 221; -pub const SYS_clock_gettime: ::c_long = 5000 + 222; -pub const SYS_clock_getres: ::c_long = 5000 + 223; -pub const SYS_clock_nanosleep: ::c_long = 5000 + 224; -pub const SYS_tgkill: ::c_long = 5000 + 225; -pub const SYS_utimes: ::c_long = 5000 + 226; -pub const SYS_mbind: ::c_long = 5000 + 227; -pub const SYS_get_mempolicy: ::c_long = 5000 + 228; -pub const SYS_set_mempolicy: ::c_long = 5000 + 229; -pub const SYS_mq_open: ::c_long = 5000 + 230; -pub const SYS_mq_unlink: ::c_long = 5000 + 231; -pub const SYS_mq_timedsend: ::c_long = 5000 + 232; -pub const SYS_mq_timedreceive: ::c_long = 5000 + 233; -pub const SYS_mq_notify: ::c_long = 5000 + 234; -pub const SYS_mq_getsetattr: ::c_long = 5000 + 235; -pub const SYS_vserver: ::c_long = 5000 + 236; -pub const SYS_waitid: ::c_long = 5000 + 237; -/* pub const SYS_sys_setaltroot: ::c_long = 5000 + 238; */ -pub const SYS_add_key: ::c_long = 5000 + 239; -pub const SYS_request_key: ::c_long = 5000 + 240; -pub const SYS_keyctl: ::c_long = 5000 + 241; -pub const SYS_set_thread_area: ::c_long = 5000 + 242; -pub const SYS_inotify_init: ::c_long = 5000 + 243; -pub const SYS_inotify_add_watch: ::c_long = 5000 + 244; -pub const SYS_inotify_rm_watch: ::c_long = 5000 + 245; -pub const SYS_migrate_pages: ::c_long = 5000 + 246; -pub const SYS_openat: ::c_long = 5000 + 247; -pub const SYS_mkdirat: ::c_long = 5000 + 248; -pub const SYS_mknodat: ::c_long = 5000 + 249; -pub const SYS_fchownat: ::c_long = 5000 + 250; -pub const SYS_futimesat: ::c_long = 5000 + 251; -pub const SYS_newfstatat: ::c_long = 5000 + 252; -pub const SYS_unlinkat: ::c_long = 5000 + 253; -pub const SYS_renameat: ::c_long = 5000 + 254; -pub const SYS_linkat: ::c_long = 5000 + 255; -pub const SYS_symlinkat: ::c_long = 5000 + 256; -pub const SYS_readlinkat: ::c_long = 5000 + 257; -pub const SYS_fchmodat: ::c_long = 5000 + 258; -pub const SYS_faccessat: ::c_long = 5000 + 259; -pub const SYS_pselect6: ::c_long = 5000 + 260; -pub const SYS_ppoll: ::c_long = 5000 + 261; -pub const SYS_unshare: ::c_long = 5000 + 262; -pub const SYS_splice: ::c_long = 5000 + 263; -pub const SYS_sync_file_range: ::c_long = 5000 + 264; -pub const SYS_tee: ::c_long = 5000 + 265; -pub const SYS_vmsplice: ::c_long = 5000 + 266; -pub const SYS_move_pages: ::c_long = 5000 + 267; -pub const SYS_set_robust_list: ::c_long = 5000 + 268; -pub const SYS_get_robust_list: ::c_long = 5000 + 269; -pub const SYS_kexec_load: ::c_long = 5000 + 270; -pub const SYS_getcpu: ::c_long = 5000 + 271; -pub const SYS_epoll_pwait: ::c_long = 5000 + 272; -pub const SYS_ioprio_set: ::c_long = 5000 + 273; -pub const SYS_ioprio_get: ::c_long = 5000 + 274; -pub const SYS_utimensat: ::c_long = 5000 + 275; -pub const SYS_signalfd: ::c_long = 5000 + 276; -pub const SYS_timerfd: ::c_long = 5000 + 277; -pub const SYS_eventfd: ::c_long = 5000 + 278; -pub const SYS_fallocate: ::c_long = 5000 + 279; -pub const SYS_timerfd_create: ::c_long = 5000 + 280; -pub const SYS_timerfd_gettime: ::c_long = 5000 + 281; -pub const SYS_timerfd_settime: ::c_long = 5000 + 282; -pub const SYS_signalfd4: ::c_long = 5000 + 283; -pub const SYS_eventfd2: ::c_long = 5000 + 284; -pub const SYS_epoll_create1: ::c_long = 5000 + 285; -pub const SYS_dup3: ::c_long = 5000 + 286; -pub const SYS_pipe2: ::c_long = 5000 + 287; -pub const SYS_inotify_init1: ::c_long = 5000 + 288; -pub const SYS_preadv: ::c_long = 5000 + 289; -pub const SYS_pwritev: ::c_long = 5000 + 290; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 5000 + 291; -pub const SYS_perf_event_open: ::c_long = 5000 + 292; -pub const SYS_accept4: ::c_long = 5000 + 293; -pub const SYS_recvmmsg: ::c_long = 5000 + 294; -pub const SYS_fanotify_init: ::c_long = 5000 + 295; -pub const SYS_fanotify_mark: ::c_long = 5000 + 296; -pub const SYS_prlimit64: ::c_long = 5000 + 297; -pub const SYS_name_to_handle_at: ::c_long = 5000 + 298; -pub const SYS_open_by_handle_at: ::c_long = 5000 + 299; -pub const SYS_clock_adjtime: ::c_long = 5000 + 300; -pub const SYS_syncfs: ::c_long = 5000 + 301; -pub const SYS_sendmmsg: ::c_long = 5000 + 302; -pub const SYS_setns: ::c_long = 5000 + 303; -pub const SYS_process_vm_readv: ::c_long = 5000 + 304; -pub const SYS_process_vm_writev: ::c_long = 5000 + 305; -pub const SYS_kcmp: ::c_long = 5000 + 306; -pub const SYS_finit_module: ::c_long = 5000 + 307; -pub const SYS_getdents64: ::c_long = 5000 + 308; -pub const SYS_sched_setattr: ::c_long = 5000 + 309; -pub const SYS_sched_getattr: ::c_long = 5000 + 310; -pub const SYS_renameat2: ::c_long = 5000 + 311; -pub const SYS_seccomp: ::c_long = 5000 + 312; -pub const SYS_getrandom: ::c_long = 5000 + 313; -pub const SYS_memfd_create: ::c_long = 5000 + 314; -pub const SYS_bpf: ::c_long = 5000 + 315; -pub const SYS_execveat: ::c_long = 5000 + 316; -pub const SYS_userfaultfd: ::c_long = 5000 + 317; -pub const SYS_membarrier: ::c_long = 5000 + 318; -pub const SYS_mlock2: ::c_long = 5000 + 319; -pub const SYS_copy_file_range: ::c_long = 5000 + 320; -pub const SYS_preadv2: ::c_long = 5000 + 321; -pub const SYS_pwritev2: ::c_long = 5000 + 322; -pub const SYS_pkey_mprotect: ::c_long = 5000 + 323; -pub const SYS_pkey_alloc: ::c_long = 5000 + 324; -pub const SYS_pkey_free: ::c_long = 5000 + 325; -pub const SYS_statx: ::c_long = 5000 + 326; -pub const SYS_pidfd_send_signal: ::c_long = 5000 + 424; -pub const SYS_io_uring_setup: ::c_long = 5000 + 425; -pub const SYS_io_uring_enter: ::c_long = 5000 + 426; -pub const SYS_io_uring_register: ::c_long = 5000 + 427; -pub const SYS_open_tree: ::c_long = 5000 + 428; -pub const SYS_move_mount: ::c_long = 5000 + 429; -pub const SYS_fsopen: ::c_long = 5000 + 430; -pub const SYS_fsconfig: ::c_long = 5000 + 431; -pub const SYS_fsmount: ::c_long = 5000 + 432; -pub const SYS_fspick: ::c_long = 5000 + 433; -pub const SYS_pidfd_open: ::c_long = 5000 + 434; -pub const SYS_clone3: ::c_long = 5000 + 435; -pub const SYS_close_range: ::c_long = 5000 + 436; -pub const SYS_openat2: ::c_long = 5000 + 437; -pub const SYS_pidfd_getfd: ::c_long = 5000 + 438; -pub const SYS_faccessat2: ::c_long = 5000 + 439; -pub const SYS_process_madvise: ::c_long = 5000 + 440; -pub const SYS_epoll_pwait2: ::c_long = 5000 + 441; -pub const SYS_mount_setattr: ::c_long = 5000 + 442; -pub const SYS_quotactl_fd: ::c_long = 5000 + 443; -pub const SYS_landlock_create_ruleset: ::c_long = 5000 + 444; -pub const SYS_landlock_add_rule: ::c_long = 5000 + 445; -pub const SYS_landlock_restrict_self: ::c_long = 5000 + 446; -pub const SYS_memfd_secret: ::c_long = 5000 + 447; -pub const SYS_process_mrelease: ::c_long = 5000 + 448; -pub const SYS_futex_waitv: ::c_long = 5000 + 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 5000 + 450; +pub const SYS_read: c_long = 5000 + 0; +pub const SYS_write: c_long = 5000 + 1; +pub const SYS_open: c_long = 5000 + 2; +pub const SYS_close: c_long = 5000 + 3; +pub const SYS_stat: c_long = 5000 + 4; +pub const SYS_fstat: c_long = 5000 + 5; +pub const SYS_lstat: c_long = 5000 + 6; +pub const SYS_poll: c_long = 5000 + 7; +pub const SYS_lseek: c_long = 5000 + 8; +pub const SYS_mmap: c_long = 5000 + 9; +pub const SYS_mprotect: c_long = 5000 + 10; +pub const SYS_munmap: c_long = 5000 + 11; +pub const SYS_brk: c_long = 5000 + 12; +pub const SYS_rt_sigaction: c_long = 5000 + 13; +pub const SYS_rt_sigprocmask: c_long = 5000 + 14; +pub const SYS_ioctl: c_long = 5000 + 15; +pub const SYS_pread64: c_long = 5000 + 16; +pub const SYS_pwrite64: c_long = 5000 + 17; +pub const SYS_readv: c_long = 5000 + 18; +pub const SYS_writev: c_long = 5000 + 19; +pub const SYS_access: c_long = 5000 + 20; +pub const SYS_pipe: c_long = 5000 + 21; +pub const SYS__newselect: c_long = 5000 + 22; +pub const SYS_sched_yield: c_long = 5000 + 23; +pub const SYS_mremap: c_long = 5000 + 24; +pub const SYS_msync: c_long = 5000 + 25; +pub const SYS_mincore: c_long = 5000 + 26; +pub const SYS_madvise: c_long = 5000 + 27; +pub const SYS_shmget: c_long = 5000 + 28; +pub const SYS_shmat: c_long = 5000 + 29; +pub const SYS_shmctl: c_long = 5000 + 30; +pub const SYS_dup: c_long = 5000 + 31; +pub const SYS_dup2: c_long = 5000 + 32; +pub const SYS_pause: c_long = 5000 + 33; +pub const SYS_nanosleep: c_long = 5000 + 34; +pub const SYS_getitimer: c_long = 5000 + 35; +pub const SYS_setitimer: c_long = 5000 + 36; +pub const SYS_alarm: c_long = 5000 + 37; +pub const SYS_getpid: c_long = 5000 + 38; +pub const SYS_sendfile: c_long = 5000 + 39; +pub const SYS_socket: c_long = 5000 + 40; +pub const SYS_connect: c_long = 5000 + 41; +pub const SYS_accept: c_long = 5000 + 42; +pub const SYS_sendto: c_long = 5000 + 43; +pub const SYS_recvfrom: c_long = 5000 + 44; +pub const SYS_sendmsg: c_long = 5000 + 45; +pub const SYS_recvmsg: c_long = 5000 + 46; +pub const SYS_shutdown: c_long = 5000 + 47; +pub const SYS_bind: c_long = 5000 + 48; +pub const SYS_listen: c_long = 5000 + 49; +pub const SYS_getsockname: c_long = 5000 + 50; +pub const SYS_getpeername: c_long = 5000 + 51; +pub const SYS_socketpair: c_long = 5000 + 52; +pub const SYS_setsockopt: c_long = 5000 + 53; +pub const SYS_getsockopt: c_long = 5000 + 54; +pub const SYS_clone: c_long = 5000 + 55; +pub const SYS_fork: c_long = 5000 + 56; +pub const SYS_execve: c_long = 5000 + 57; +pub const SYS_exit: c_long = 5000 + 58; +pub const SYS_wait4: c_long = 5000 + 59; +pub const SYS_kill: c_long = 5000 + 60; +pub const SYS_uname: c_long = 5000 + 61; +pub const SYS_semget: c_long = 5000 + 62; +pub const SYS_semop: c_long = 5000 + 63; +pub const SYS_semctl: c_long = 5000 + 64; +pub const SYS_shmdt: c_long = 5000 + 65; +pub const SYS_msgget: c_long = 5000 + 66; +pub const SYS_msgsnd: c_long = 5000 + 67; +pub const SYS_msgrcv: c_long = 5000 + 68; +pub const SYS_msgctl: c_long = 5000 + 69; +pub const SYS_fcntl: c_long = 5000 + 70; +pub const SYS_flock: c_long = 5000 + 71; +pub const SYS_fsync: c_long = 5000 + 72; +pub const SYS_fdatasync: c_long = 5000 + 73; +pub const SYS_truncate: c_long = 5000 + 74; +pub const SYS_ftruncate: c_long = 5000 + 75; +pub const SYS_getdents: c_long = 5000 + 76; +pub const SYS_getcwd: c_long = 5000 + 77; +pub const SYS_chdir: c_long = 5000 + 78; +pub const SYS_fchdir: c_long = 5000 + 79; +pub const SYS_rename: c_long = 5000 + 80; +pub const SYS_mkdir: c_long = 5000 + 81; +pub const SYS_rmdir: c_long = 5000 + 82; +pub const SYS_creat: c_long = 5000 + 83; +pub const SYS_link: c_long = 5000 + 84; +pub const SYS_unlink: c_long = 5000 + 85; +pub const SYS_symlink: c_long = 5000 + 86; +pub const SYS_readlink: c_long = 5000 + 87; +pub const SYS_chmod: c_long = 5000 + 88; +pub const SYS_fchmod: c_long = 5000 + 89; +pub const SYS_chown: c_long = 5000 + 90; +pub const SYS_fchown: c_long = 5000 + 91; +pub const SYS_lchown: c_long = 5000 + 92; +pub const SYS_umask: c_long = 5000 + 93; +pub const SYS_gettimeofday: c_long = 5000 + 94; +pub const SYS_getrlimit: c_long = 5000 + 95; +pub const SYS_getrusage: c_long = 5000 + 96; +pub const SYS_sysinfo: c_long = 5000 + 97; +pub const SYS_times: c_long = 5000 + 98; +pub const SYS_ptrace: c_long = 5000 + 99; +pub const SYS_getuid: c_long = 5000 + 100; +pub const SYS_syslog: c_long = 5000 + 101; +pub const SYS_getgid: c_long = 5000 + 102; +pub const SYS_setuid: c_long = 5000 + 103; +pub const SYS_setgid: c_long = 5000 + 104; +pub const SYS_geteuid: c_long = 5000 + 105; +pub const SYS_getegid: c_long = 5000 + 106; +pub const SYS_setpgid: c_long = 5000 + 107; +pub const SYS_getppid: c_long = 5000 + 108; +pub const SYS_getpgrp: c_long = 5000 + 109; +pub const SYS_setsid: c_long = 5000 + 110; +pub const SYS_setreuid: c_long = 5000 + 111; +pub const SYS_setregid: c_long = 5000 + 112; +pub const SYS_getgroups: c_long = 5000 + 113; +pub const SYS_setgroups: c_long = 5000 + 114; +pub const SYS_setresuid: c_long = 5000 + 115; +pub const SYS_getresuid: c_long = 5000 + 116; +pub const SYS_setresgid: c_long = 5000 + 117; +pub const SYS_getresgid: c_long = 5000 + 118; +pub const SYS_getpgid: c_long = 5000 + 119; +pub const SYS_setfsuid: c_long = 5000 + 120; +pub const SYS_setfsgid: c_long = 5000 + 121; +pub const SYS_getsid: c_long = 5000 + 122; +pub const SYS_capget: c_long = 5000 + 123; +pub const SYS_capset: c_long = 5000 + 124; +pub const SYS_rt_sigpending: c_long = 5000 + 125; +pub const SYS_rt_sigtimedwait: c_long = 5000 + 126; +pub const SYS_rt_sigqueueinfo: c_long = 5000 + 127; +pub const SYS_rt_sigsuspend: c_long = 5000 + 128; +pub const SYS_sigaltstack: c_long = 5000 + 129; +pub const SYS_utime: c_long = 5000 + 130; +pub const SYS_mknod: c_long = 5000 + 131; +pub const SYS_personality: c_long = 5000 + 132; +pub const SYS_ustat: c_long = 5000 + 133; +pub const SYS_statfs: c_long = 5000 + 134; +pub const SYS_fstatfs: c_long = 5000 + 135; +pub const SYS_sysfs: c_long = 5000 + 136; +pub const SYS_getpriority: c_long = 5000 + 137; +pub const SYS_setpriority: c_long = 5000 + 138; +pub const SYS_sched_setparam: c_long = 5000 + 139; +pub const SYS_sched_getparam: c_long = 5000 + 140; +pub const SYS_sched_setscheduler: c_long = 5000 + 141; +pub const SYS_sched_getscheduler: c_long = 5000 + 142; +pub const SYS_sched_get_priority_max: c_long = 5000 + 143; +pub const SYS_sched_get_priority_min: c_long = 5000 + 144; +pub const SYS_sched_rr_get_interval: c_long = 5000 + 145; +pub const SYS_mlock: c_long = 5000 + 146; +pub const SYS_munlock: c_long = 5000 + 147; +pub const SYS_mlockall: c_long = 5000 + 148; +pub const SYS_munlockall: c_long = 5000 + 149; +pub const SYS_vhangup: c_long = 5000 + 150; +pub const SYS_pivot_root: c_long = 5000 + 151; +pub const SYS__sysctl: c_long = 5000 + 152; +pub const SYS_prctl: c_long = 5000 + 153; +pub const SYS_adjtimex: c_long = 5000 + 154; +pub const SYS_setrlimit: c_long = 5000 + 155; +pub const SYS_chroot: c_long = 5000 + 156; +pub const SYS_sync: c_long = 5000 + 157; +pub const SYS_acct: c_long = 5000 + 158; +pub const SYS_settimeofday: c_long = 5000 + 159; +pub const SYS_mount: c_long = 5000 + 160; +pub const SYS_umount2: c_long = 5000 + 161; +pub const SYS_swapon: c_long = 5000 + 162; +pub const SYS_swapoff: c_long = 5000 + 163; +pub const SYS_reboot: c_long = 5000 + 164; +pub const SYS_sethostname: c_long = 5000 + 165; +pub const SYS_setdomainname: c_long = 5000 + 166; +pub const SYS_create_module: c_long = 5000 + 167; +pub const SYS_init_module: c_long = 5000 + 168; +pub const SYS_delete_module: c_long = 5000 + 169; +pub const SYS_get_kernel_syms: c_long = 5000 + 170; +pub const SYS_query_module: c_long = 5000 + 171; +pub const SYS_quotactl: c_long = 5000 + 172; +pub const SYS_nfsservctl: c_long = 5000 + 173; +pub const SYS_getpmsg: c_long = 5000 + 174; +pub const SYS_putpmsg: c_long = 5000 + 175; +pub const SYS_afs_syscall: c_long = 5000 + 176; +pub const SYS_gettid: c_long = 5000 + 178; +pub const SYS_readahead: c_long = 5000 + 179; +pub const SYS_setxattr: c_long = 5000 + 180; +pub const SYS_lsetxattr: c_long = 5000 + 181; +pub const SYS_fsetxattr: c_long = 5000 + 182; +pub const SYS_getxattr: c_long = 5000 + 183; +pub const SYS_lgetxattr: c_long = 5000 + 184; +pub const SYS_fgetxattr: c_long = 5000 + 185; +pub const SYS_listxattr: c_long = 5000 + 186; +pub const SYS_llistxattr: c_long = 5000 + 187; +pub const SYS_flistxattr: c_long = 5000 + 188; +pub const SYS_removexattr: c_long = 5000 + 189; +pub const SYS_lremovexattr: c_long = 5000 + 190; +pub const SYS_fremovexattr: c_long = 5000 + 191; +pub const SYS_tkill: c_long = 5000 + 192; +pub const SYS_futex: c_long = 5000 + 194; +pub const SYS_sched_setaffinity: c_long = 5000 + 195; +pub const SYS_sched_getaffinity: c_long = 5000 + 196; +pub const SYS_cacheflush: c_long = 5000 + 197; +pub const SYS_cachectl: c_long = 5000 + 198; +pub const SYS_sysmips: c_long = 5000 + 199; +pub const SYS_io_setup: c_long = 5000 + 200; +pub const SYS_io_destroy: c_long = 5000 + 201; +pub const SYS_io_getevents: c_long = 5000 + 202; +pub const SYS_io_submit: c_long = 5000 + 203; +pub const SYS_io_cancel: c_long = 5000 + 204; +pub const SYS_exit_group: c_long = 5000 + 205; +pub const SYS_lookup_dcookie: c_long = 5000 + 206; +pub const SYS_epoll_create: c_long = 5000 + 207; +pub const SYS_epoll_ctl: c_long = 5000 + 208; +pub const SYS_epoll_wait: c_long = 5000 + 209; +pub const SYS_remap_file_pages: c_long = 5000 + 210; +pub const SYS_rt_sigreturn: c_long = 5000 + 211; +pub const SYS_set_tid_address: c_long = 5000 + 212; +pub const SYS_restart_syscall: c_long = 5000 + 213; +pub const SYS_semtimedop: c_long = 5000 + 214; +pub const SYS_fadvise64: c_long = 5000 + 215; +pub const SYS_timer_create: c_long = 5000 + 216; +pub const SYS_timer_settime: c_long = 5000 + 217; +pub const SYS_timer_gettime: c_long = 5000 + 218; +pub const SYS_timer_getoverrun: c_long = 5000 + 219; +pub const SYS_timer_delete: c_long = 5000 + 220; +pub const SYS_clock_settime: c_long = 5000 + 221; +pub const SYS_clock_gettime: c_long = 5000 + 222; +pub const SYS_clock_getres: c_long = 5000 + 223; +pub const SYS_clock_nanosleep: c_long = 5000 + 224; +pub const SYS_tgkill: c_long = 5000 + 225; +pub const SYS_utimes: c_long = 5000 + 226; +pub const SYS_mbind: c_long = 5000 + 227; +pub const SYS_get_mempolicy: c_long = 5000 + 228; +pub const SYS_set_mempolicy: c_long = 5000 + 229; +pub const SYS_mq_open: c_long = 5000 + 230; +pub const SYS_mq_unlink: c_long = 5000 + 231; +pub const SYS_mq_timedsend: c_long = 5000 + 232; +pub const SYS_mq_timedreceive: c_long = 5000 + 233; +pub const SYS_mq_notify: c_long = 5000 + 234; +pub const SYS_mq_getsetattr: c_long = 5000 + 235; +pub const SYS_vserver: c_long = 5000 + 236; +pub const SYS_waitid: c_long = 5000 + 237; +/* pub const SYS_sys_setaltroot: c_long = 5000 + 238; */ +pub const SYS_add_key: c_long = 5000 + 239; +pub const SYS_request_key: c_long = 5000 + 240; +pub const SYS_keyctl: c_long = 5000 + 241; +pub const SYS_set_thread_area: c_long = 5000 + 242; +pub const SYS_inotify_init: c_long = 5000 + 243; +pub const SYS_inotify_add_watch: c_long = 5000 + 244; +pub const SYS_inotify_rm_watch: c_long = 5000 + 245; +pub const SYS_migrate_pages: c_long = 5000 + 246; +pub const SYS_openat: c_long = 5000 + 247; +pub const SYS_mkdirat: c_long = 5000 + 248; +pub const SYS_mknodat: c_long = 5000 + 249; +pub const SYS_fchownat: c_long = 5000 + 250; +pub const SYS_futimesat: c_long = 5000 + 251; +pub const SYS_newfstatat: c_long = 5000 + 252; +pub const SYS_unlinkat: c_long = 5000 + 253; +pub const SYS_renameat: c_long = 5000 + 254; +pub const SYS_linkat: c_long = 5000 + 255; +pub const SYS_symlinkat: c_long = 5000 + 256; +pub const SYS_readlinkat: c_long = 5000 + 257; +pub const SYS_fchmodat: c_long = 5000 + 258; +pub const SYS_faccessat: c_long = 5000 + 259; +pub const SYS_pselect6: c_long = 5000 + 260; +pub const SYS_ppoll: c_long = 5000 + 261; +pub const SYS_unshare: c_long = 5000 + 262; +pub const SYS_splice: c_long = 5000 + 263; +pub const SYS_sync_file_range: c_long = 5000 + 264; +pub const SYS_tee: c_long = 5000 + 265; +pub const SYS_vmsplice: c_long = 5000 + 266; +pub const SYS_move_pages: c_long = 5000 + 267; +pub const SYS_set_robust_list: c_long = 5000 + 268; +pub const SYS_get_robust_list: c_long = 5000 + 269; +pub const SYS_kexec_load: c_long = 5000 + 270; +pub const SYS_getcpu: c_long = 5000 + 271; +pub const SYS_epoll_pwait: c_long = 5000 + 272; +pub const SYS_ioprio_set: c_long = 5000 + 273; +pub const SYS_ioprio_get: c_long = 5000 + 274; +pub const SYS_utimensat: c_long = 5000 + 275; +pub const SYS_signalfd: c_long = 5000 + 276; +pub const SYS_timerfd: c_long = 5000 + 277; +pub const SYS_eventfd: c_long = 5000 + 278; +pub const SYS_fallocate: c_long = 5000 + 279; +pub const SYS_timerfd_create: c_long = 5000 + 280; +pub const SYS_timerfd_gettime: c_long = 5000 + 281; +pub const SYS_timerfd_settime: c_long = 5000 + 282; +pub const SYS_signalfd4: c_long = 5000 + 283; +pub const SYS_eventfd2: c_long = 5000 + 284; +pub const SYS_epoll_create1: c_long = 5000 + 285; +pub const SYS_dup3: c_long = 5000 + 286; +pub const SYS_pipe2: c_long = 5000 + 287; +pub const SYS_inotify_init1: c_long = 5000 + 288; +pub const SYS_preadv: c_long = 5000 + 289; +pub const SYS_pwritev: c_long = 5000 + 290; +pub const SYS_rt_tgsigqueueinfo: c_long = 5000 + 291; +pub const SYS_perf_event_open: c_long = 5000 + 292; +pub const SYS_accept4: c_long = 5000 + 293; +pub const SYS_recvmmsg: c_long = 5000 + 294; +pub const SYS_fanotify_init: c_long = 5000 + 295; +pub const SYS_fanotify_mark: c_long = 5000 + 296; +pub const SYS_prlimit64: c_long = 5000 + 297; +pub const SYS_name_to_handle_at: c_long = 5000 + 298; +pub const SYS_open_by_handle_at: c_long = 5000 + 299; +pub const SYS_clock_adjtime: c_long = 5000 + 300; +pub const SYS_syncfs: c_long = 5000 + 301; +pub const SYS_sendmmsg: c_long = 5000 + 302; +pub const SYS_setns: c_long = 5000 + 303; +pub const SYS_process_vm_readv: c_long = 5000 + 304; +pub const SYS_process_vm_writev: c_long = 5000 + 305; +pub const SYS_kcmp: c_long = 5000 + 306; +pub const SYS_finit_module: c_long = 5000 + 307; +pub const SYS_getdents64: c_long = 5000 + 308; +pub const SYS_sched_setattr: c_long = 5000 + 309; +pub const SYS_sched_getattr: c_long = 5000 + 310; +pub const SYS_renameat2: c_long = 5000 + 311; +pub const SYS_seccomp: c_long = 5000 + 312; +pub const SYS_getrandom: c_long = 5000 + 313; +pub const SYS_memfd_create: c_long = 5000 + 314; +pub const SYS_bpf: c_long = 5000 + 315; +pub const SYS_execveat: c_long = 5000 + 316; +pub const SYS_userfaultfd: c_long = 5000 + 317; +pub const SYS_membarrier: c_long = 5000 + 318; +pub const SYS_mlock2: c_long = 5000 + 319; +pub const SYS_copy_file_range: c_long = 5000 + 320; +pub const SYS_preadv2: c_long = 5000 + 321; +pub const SYS_pwritev2: c_long = 5000 + 322; +pub const SYS_pkey_mprotect: c_long = 5000 + 323; +pub const SYS_pkey_alloc: c_long = 5000 + 324; +pub const SYS_pkey_free: c_long = 5000 + 325; +pub const SYS_statx: c_long = 5000 + 326; +pub const SYS_pidfd_send_signal: c_long = 5000 + 424; +pub const SYS_io_uring_setup: c_long = 5000 + 425; +pub const SYS_io_uring_enter: c_long = 5000 + 426; +pub const SYS_io_uring_register: c_long = 5000 + 427; +pub const SYS_open_tree: c_long = 5000 + 428; +pub const SYS_move_mount: c_long = 5000 + 429; +pub const SYS_fsopen: c_long = 5000 + 430; +pub const SYS_fsconfig: c_long = 5000 + 431; +pub const SYS_fsmount: c_long = 5000 + 432; +pub const SYS_fspick: c_long = 5000 + 433; +pub const SYS_pidfd_open: c_long = 5000 + 434; +pub const SYS_clone3: c_long = 5000 + 435; +pub const SYS_close_range: c_long = 5000 + 436; +pub const SYS_openat2: c_long = 5000 + 437; +pub const SYS_pidfd_getfd: c_long = 5000 + 438; +pub const SYS_faccessat2: c_long = 5000 + 439; +pub const SYS_process_madvise: c_long = 5000 + 440; +pub const SYS_epoll_pwait2: c_long = 5000 + 441; +pub const SYS_mount_setattr: c_long = 5000 + 442; +pub const SYS_quotactl_fd: c_long = 5000 + 443; +pub const SYS_landlock_create_ruleset: c_long = 5000 + 444; +pub const SYS_landlock_add_rule: c_long = 5000 + 445; +pub const SYS_landlock_restrict_self: c_long = 5000 + 446; +pub const SYS_memfd_secret: c_long = 5000 + 447; +pub const SYS_process_mrelease: c_long = 5000 + 448; +pub const SYS_futex_waitv: c_long = 5000 + 449; +pub const SYS_set_mempolicy_home_node: c_long = 5000 + 450; -pub const O_DIRECT: ::c_int = 0x8000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const O_DIRECT: c_int = 0x8000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_NONBLOCK: ::c_int = 128; -pub const O_SYNC: ::c_int = 0x4010; -pub const O_RSYNC: ::c_int = 0x4010; -pub const O_DSYNC: ::c_int = 0x10; -pub const O_ASYNC: ::c_int = 0x1000; -pub const O_LARGEFILE: ::c_int = 0x2000; +pub const O_APPEND: c_int = 8; +pub const O_CREAT: c_int = 256; +pub const O_EXCL: c_int = 1024; +pub const O_NOCTTY: c_int = 2048; +pub const O_NONBLOCK: c_int = 128; +pub const O_SYNC: c_int = 0x4010; +pub const O_RSYNC: c_int = 0x4010; +pub const O_DSYNC: c_int = 0x10; +pub const O_ASYNC: c_int = 0x1000; +pub const O_LARGEFILE: c_int = 0x2000; -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const ERFKILL: ::c_int = 167; +pub const EDEADLK: c_int = 45; +pub const ENAMETOOLONG: c_int = 78; +pub const ENOLCK: c_int = 46; +pub const ENOSYS: c_int = 89; +pub const ENOTEMPTY: c_int = 93; +pub const ELOOP: c_int = 90; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EDEADLOCK: c_int = 56; +pub const EMULTIHOP: c_int = 74; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EBADMSG: c_int = 77; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const EUSERS: c_int = 94; +pub const ENOTSOCK: c_int = 95; +pub const EDESTADDRREQ: c_int = 96; +pub const EMSGSIZE: c_int = 97; +pub const EPROTOTYPE: c_int = 98; +pub const ENOPROTOOPT: c_int = 99; +pub const EPROTONOSUPPORT: c_int = 120; +pub const ESOCKTNOSUPPORT: c_int = 121; +pub const EOPNOTSUPP: c_int = 122; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 123; +pub const EAFNOSUPPORT: c_int = 124; +pub const EADDRINUSE: c_int = 125; +pub const EADDRNOTAVAIL: c_int = 126; +pub const ENETDOWN: c_int = 127; +pub const ENETUNREACH: c_int = 128; +pub const ENETRESET: c_int = 129; +pub const ECONNABORTED: c_int = 130; +pub const ECONNRESET: c_int = 131; +pub const ENOBUFS: c_int = 132; +pub const EISCONN: c_int = 133; +pub const ENOTCONN: c_int = 134; +pub const ESHUTDOWN: c_int = 143; +pub const ETOOMANYREFS: c_int = 144; +pub const ETIMEDOUT: c_int = 145; +pub const ECONNREFUSED: c_int = 146; +pub const EHOSTDOWN: c_int = 147; +pub const EHOSTUNREACH: c_int = 148; +pub const EALREADY: c_int = 149; +pub const EINPROGRESS: c_int = 150; +pub const ESTALE: c_int = 151; +pub const EUCLEAN: c_int = 135; +pub const ENOTNAM: c_int = 137; +pub const ENAVAIL: c_int = 138; +pub const EISNAM: c_int = 139; +pub const EREMOTEIO: c_int = 140; +pub const EDQUOT: c_int = 1133; +pub const ENOMEDIUM: c_int = 159; +pub const EMEDIUMTYPE: c_int = 160; +pub const ECANCELED: c_int = 158; +pub const ENOKEY: c_int = 161; +pub const EKEYEXPIRED: c_int = 162; +pub const EKEYREVOKED: c_int = 163; +pub const EKEYREJECTED: c_int = 164; +pub const EOWNERDEAD: c_int = 165; +pub const ENOTRECOVERABLE: c_int = 166; +pub const ERFKILL: c_int = 167; -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_NORESERVE: ::c_int = 0x400; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; -pub const MAP_STACK: ::c_int = 0x40000; -pub const MAP_HUGETLB: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x800; +pub const MAP_GROWSDOWN: c_int = 0x1000; +pub const MAP_DENYWRITE: c_int = 0x2000; +pub const MAP_EXECUTABLE: c_int = 0x4000; +pub const MAP_LOCKED: c_int = 0x8000; +pub const MAP_NORESERVE: c_int = 0x400; +pub const MAP_POPULATE: c_int = 0x10000; +pub const MAP_NONBLOCK: c_int = 0x20000; +pub const MAP_STACK: c_int = 0x40000; +pub const MAP_HUGETLB: c_int = 0x080000; -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; +pub const SOCK_STREAM: c_int = 2; +pub const SOCK_DGRAM: c_int = 1; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000008; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000008; +pub const SA_NOCLDWAIT: c_int = 0x00010000; -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 22; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; +pub const SIGCHLD: c_int = 18; +pub const SIGBUS: c_int = 10; +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGWINCH: c_int = 20; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGCONT: c_int = 25; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGURG: c_int = 21; +pub const SIGIO: c_int = 22; +pub const SIGSYS: c_int = 12; +pub const SIGPOLL: c_int = 22; +pub const SIGPWR: c_int = 19; +pub const SIG_SETMASK: c_int = 3; +pub const SIG_BLOCK: c_int = 0x1; +pub const SIG_UNBLOCK: c_int = 0x2; -pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLWRBAND: ::c_short = 0x100; +pub const POLLWRNORM: c_short = 0x004; +pub const POLLWRBAND: c_short = 0x100; pub const VEOF: usize = 16; pub const VEOL: usize = 17; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x00000100; -pub const TOSTOP: ::tcflag_t = 0x00008000; -pub const FLUSHO: ::tcflag_t = 0x00002000; -pub const EXTPROC: ::tcflag_t = 0o200000; +pub const IEXTEN: crate::tcflag_t = 0x00000100; +pub const TOSTOP: crate::tcflag_t = 0x00008000; +pub const FLUSHO: crate::tcflag_t = 0x00002000; +pub const EXTPROC: crate::tcflag_t = 0o200000; -pub const F_GETLK: ::c_int = 14; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETOWN: ::c_int = 24; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; +pub const F_GETLK: c_int = 14; +pub const F_GETOWN: c_int = 23; +pub const F_SETOWN: c_int = 24; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -604,55 +606,55 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; -pub const EHWPOISON: ::c_int = 168; +pub const EHWPOISON: c_int = 168; diff --git a/src/unix/linux_like/linux/musl/b64/mod.rs b/src/unix/linux_like/linux/musl/b64/mod.rs index 9e893a36f8068..eaab68d565399 100644 --- a/src/unix/linux_like/linux/musl/b64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/mod.rs @@ -1,12 +1,14 @@ +use crate::{c_int, c_uint, c_void, size_t, ssize_t}; + pub type c_long = i64; pub type c_ulong = u64; -pub type regoff_t = ::c_long; +pub type regoff_t = c_long; s! { pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct pthread_attr_t { @@ -14,66 +16,66 @@ s! { } pub struct sigset_t { - __val: [::c_ulong; 16], + __val: [c_ulong; 16], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::c_ulong, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: c_ulong, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __pad1: ::c_ulong, - __pad2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __pad1: c_ulong, + __pad2: c_ulong, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, #[cfg(target_endian = "big")] - __pad1: ::c_int, - pub msg_iovlen: ::c_int, + __pad1: c_int, + pub msg_iovlen: c_int, #[cfg(target_endian = "little")] - __pad1: ::c_int, - pub msg_control: *mut ::c_void, + __pad1: c_int, + pub msg_control: *mut c_void, #[cfg(target_endian = "big")] - __pad2: ::c_int, - pub msg_controllen: ::socklen_t, + __pad2: c_int, + pub msg_controllen: crate::socklen_t, #[cfg(target_endian = "little")] - __pad2: ::c_int, - pub msg_flags: ::c_int, + __pad2: c_int, + pub msg_flags: c_int, } pub struct cmsghdr { #[cfg(target_endian = "big")] - pub __pad1: ::c_int, - pub cmsg_len: ::socklen_t, + pub __pad1: c_int, + pub cmsg_len: crate::socklen_t, #[cfg(target_endian = "little")] - pub __pad1: ::c_int, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub __pad1: c_int, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct sem_t { - __val: [::c_int; 8], + __val: [c_int; 8], } } @@ -82,7 +84,7 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; extern "C" { - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; } cfg_if! { diff --git a/src/unix/linux_like/linux/musl/b64/powerpc64.rs b/src/unix/linux_like/linux/musl/b64/powerpc64.rs index 6d20733faaa7b..13d2fbb690e74 100644 --- a/src/unix/linux_like/linux/musl/b64/powerpc64.rs +++ b/src/unix/linux_like/linux/musl/b64/powerpc64.rs @@ -1,655 +1,657 @@ +use crate::{c_int, c_long, c_short, c_ulong, off_t, size_t}; + pub type c_char = u8; pub type wchar_t = i32; -pub type __u64 = ::c_ulong; -pub type __s64 = ::c_long; +pub type __u64 = c_ulong; +pub type __s64 = c_long; pub type nlink_t = u64; -pub type blksize_t = ::c_long; +pub type blksize_t = c_long; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __reserved: [c_long; 3], } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } } -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_32BIT: ::c_int = 0x0040; -pub const O_APPEND: ::c_int = 1024; -pub const O_DIRECT: ::c_int = 0x20000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_LARGEFILE: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_ASYNC: ::c_int = 0x2000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_32BIT: c_int = 0x0040; +pub const O_APPEND: c_int = 1024; +pub const O_DIRECT: c_int = 0x20000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_LARGEFILE: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_ASYNC: c_int = 0x2000; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; -pub const PTRACE_SYSEMU: ::c_int = 0x1d; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 0x1e; +pub const PTRACE_SYSEMU: c_int = 0x1d; +pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 0x1e; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const SIGSTKSZ: ::size_t = 10240; -pub const MINSIGSTKSZ: ::size_t = 4096; +pub const SIGSTKSZ: size_t = 10240; +pub const MINSIGSTKSZ: size_t = 4096; // Syscall table -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_waitpid: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_time: ::c_long = 13; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_break: ::c_long = 17; -pub const SYS_oldstat: ::c_long = 18; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_stime: ::c_long = 25; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_oldfstat: ::c_long = 28; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_stty: ::c_long = 31; -pub const SYS_gtty: ::c_long = 32; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_ftime: ::c_long = 35; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_prof: ::c_long = 44; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_signal: ::c_long = 48; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_lock: ::c_long = 53; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_mpx: ::c_long = 56; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_ulimit: ::c_long = 58; -pub const SYS_oldolduname: ::c_long = 59; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sgetmask: ::c_long = 68; -pub const SYS_ssetmask: ::c_long = 69; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrlimit: ::c_long = 76; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_select: ::c_long = 82; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_oldlstat: ::c_long = 84; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_profil: ::c_long = 98; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_ioperm: ::c_long = 101; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_olduname: ::c_long = 109; -pub const SYS_iopl: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_vm86: ::c_long = 113; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_modify_ldt: ::c_long = 123; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */ -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_query_module: ::c_long = 166; -pub const SYS_poll: ::c_long = 167; -pub const SYS_nfsservctl: ::c_long = 168; -pub const SYS_setresgid: ::c_long = 169; -pub const SYS_getresgid: ::c_long = 170; -pub const SYS_prctl: ::c_long = 171; -pub const SYS_rt_sigreturn: ::c_long = 172; -pub const SYS_rt_sigaction: ::c_long = 173; -pub const SYS_rt_sigprocmask: ::c_long = 174; -pub const SYS_rt_sigpending: ::c_long = 175; -pub const SYS_rt_sigtimedwait: ::c_long = 176; -pub const SYS_rt_sigqueueinfo: ::c_long = 177; -pub const SYS_rt_sigsuspend: ::c_long = 178; -pub const SYS_pread64: ::c_long = 179; -pub const SYS_pwrite64: ::c_long = 180; -pub const SYS_chown: ::c_long = 181; -pub const SYS_getcwd: ::c_long = 182; -pub const SYS_capget: ::c_long = 183; -pub const SYS_capset: ::c_long = 184; -pub const SYS_sigaltstack: ::c_long = 185; -pub const SYS_sendfile: ::c_long = 186; -pub const SYS_getpmsg: ::c_long = 187; /* some people actually want streams */ -pub const SYS_putpmsg: ::c_long = 188; /* some people actually want streams */ -pub const SYS_vfork: ::c_long = 189; -pub const SYS_ugetrlimit: ::c_long = 190; /* SuS compliant getrlimit */ -pub const SYS_readahead: ::c_long = 191; -pub const SYS_pciconfig_read: ::c_long = 198; -pub const SYS_pciconfig_write: ::c_long = 199; -pub const SYS_pciconfig_iobase: ::c_long = 200; -pub const SYS_multiplexer: ::c_long = 201; -pub const SYS_getdents64: ::c_long = 202; -pub const SYS_pivot_root: ::c_long = 203; -pub const SYS_madvise: ::c_long = 205; -pub const SYS_mincore: ::c_long = 206; -pub const SYS_gettid: ::c_long = 207; -pub const SYS_tkill: ::c_long = 208; -pub const SYS_setxattr: ::c_long = 209; -pub const SYS_lsetxattr: ::c_long = 210; -pub const SYS_fsetxattr: ::c_long = 211; -pub const SYS_getxattr: ::c_long = 212; -pub const SYS_lgetxattr: ::c_long = 213; -pub const SYS_fgetxattr: ::c_long = 214; -pub const SYS_listxattr: ::c_long = 215; -pub const SYS_llistxattr: ::c_long = 216; -pub const SYS_flistxattr: ::c_long = 217; -pub const SYS_removexattr: ::c_long = 218; -pub const SYS_lremovexattr: ::c_long = 219; -pub const SYS_fremovexattr: ::c_long = 220; -pub const SYS_futex: ::c_long = 221; -pub const SYS_sched_setaffinity: ::c_long = 222; -pub const SYS_sched_getaffinity: ::c_long = 223; -pub const SYS_tuxcall: ::c_long = 225; -pub const SYS_io_setup: ::c_long = 227; -pub const SYS_io_destroy: ::c_long = 228; -pub const SYS_io_getevents: ::c_long = 229; -pub const SYS_io_submit: ::c_long = 230; -pub const SYS_io_cancel: ::c_long = 231; -pub const SYS_set_tid_address: ::c_long = 232; -pub const SYS_exit_group: ::c_long = 234; -pub const SYS_lookup_dcookie: ::c_long = 235; -pub const SYS_epoll_create: ::c_long = 236; -pub const SYS_epoll_ctl: ::c_long = 237; -pub const SYS_epoll_wait: ::c_long = 238; -pub const SYS_remap_file_pages: ::c_long = 239; -pub const SYS_timer_create: ::c_long = 240; -pub const SYS_timer_settime: ::c_long = 241; -pub const SYS_timer_gettime: ::c_long = 242; -pub const SYS_timer_getoverrun: ::c_long = 243; -pub const SYS_timer_delete: ::c_long = 244; -pub const SYS_clock_settime: ::c_long = 245; -pub const SYS_clock_gettime: ::c_long = 246; -pub const SYS_clock_getres: ::c_long = 247; -pub const SYS_clock_nanosleep: ::c_long = 248; -pub const SYS_swapcontext: ::c_long = 249; -pub const SYS_tgkill: ::c_long = 250; -pub const SYS_utimes: ::c_long = 251; -pub const SYS_statfs64: ::c_long = 252; -pub const SYS_fstatfs64: ::c_long = 253; -pub const SYS_rtas: ::c_long = 255; -pub const SYS_sys_debug_setcontext: ::c_long = 256; -pub const SYS_migrate_pages: ::c_long = 258; -pub const SYS_mbind: ::c_long = 259; -pub const SYS_get_mempolicy: ::c_long = 260; -pub const SYS_set_mempolicy: ::c_long = 261; -pub const SYS_mq_open: ::c_long = 262; -pub const SYS_mq_unlink: ::c_long = 263; -pub const SYS_mq_timedsend: ::c_long = 264; -pub const SYS_mq_timedreceive: ::c_long = 265; -pub const SYS_mq_notify: ::c_long = 266; -pub const SYS_mq_getsetattr: ::c_long = 267; -pub const SYS_kexec_load: ::c_long = 268; -pub const SYS_add_key: ::c_long = 269; -pub const SYS_request_key: ::c_long = 270; -pub const SYS_keyctl: ::c_long = 271; -pub const SYS_waitid: ::c_long = 272; -pub const SYS_ioprio_set: ::c_long = 273; -pub const SYS_ioprio_get: ::c_long = 274; -pub const SYS_inotify_init: ::c_long = 275; -pub const SYS_inotify_add_watch: ::c_long = 276; -pub const SYS_inotify_rm_watch: ::c_long = 277; -pub const SYS_spu_run: ::c_long = 278; -pub const SYS_spu_create: ::c_long = 279; -pub const SYS_pselect6: ::c_long = 280; -pub const SYS_ppoll: ::c_long = 281; -pub const SYS_unshare: ::c_long = 282; -pub const SYS_splice: ::c_long = 283; -pub const SYS_tee: ::c_long = 284; -pub const SYS_vmsplice: ::c_long = 285; -pub const SYS_openat: ::c_long = 286; -pub const SYS_mkdirat: ::c_long = 287; -pub const SYS_mknodat: ::c_long = 288; -pub const SYS_fchownat: ::c_long = 289; -pub const SYS_futimesat: ::c_long = 290; -pub const SYS_newfstatat: ::c_long = 291; -pub const SYS_unlinkat: ::c_long = 292; -pub const SYS_renameat: ::c_long = 293; -pub const SYS_linkat: ::c_long = 294; -pub const SYS_symlinkat: ::c_long = 295; -pub const SYS_readlinkat: ::c_long = 296; -pub const SYS_fchmodat: ::c_long = 297; -pub const SYS_faccessat: ::c_long = 298; -pub const SYS_get_robust_list: ::c_long = 299; -pub const SYS_set_robust_list: ::c_long = 300; -pub const SYS_move_pages: ::c_long = 301; -pub const SYS_getcpu: ::c_long = 302; -pub const SYS_epoll_pwait: ::c_long = 303; -pub const SYS_utimensat: ::c_long = 304; -pub const SYS_signalfd: ::c_long = 305; -pub const SYS_timerfd_create: ::c_long = 306; -pub const SYS_eventfd: ::c_long = 307; -pub const SYS_sync_file_range2: ::c_long = 308; -pub const SYS_fallocate: ::c_long = 309; -pub const SYS_subpage_prot: ::c_long = 310; -pub const SYS_timerfd_settime: ::c_long = 311; -pub const SYS_timerfd_gettime: ::c_long = 312; -pub const SYS_signalfd4: ::c_long = 313; -pub const SYS_eventfd2: ::c_long = 314; -pub const SYS_epoll_create1: ::c_long = 315; -pub const SYS_dup3: ::c_long = 316; -pub const SYS_pipe2: ::c_long = 317; -pub const SYS_inotify_init1: ::c_long = 318; -pub const SYS_perf_event_open: ::c_long = 319; -pub const SYS_preadv: ::c_long = 320; -pub const SYS_pwritev: ::c_long = 321; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 322; -pub const SYS_fanotify_init: ::c_long = 323; -pub const SYS_fanotify_mark: ::c_long = 324; -pub const SYS_prlimit64: ::c_long = 325; -pub const SYS_socket: ::c_long = 326; -pub const SYS_bind: ::c_long = 327; -pub const SYS_connect: ::c_long = 328; -pub const SYS_listen: ::c_long = 329; -pub const SYS_accept: ::c_long = 330; -pub const SYS_getsockname: ::c_long = 331; -pub const SYS_getpeername: ::c_long = 332; -pub const SYS_socketpair: ::c_long = 333; -pub const SYS_send: ::c_long = 334; -pub const SYS_sendto: ::c_long = 335; -pub const SYS_recv: ::c_long = 336; -pub const SYS_recvfrom: ::c_long = 337; -pub const SYS_shutdown: ::c_long = 338; -pub const SYS_setsockopt: ::c_long = 339; -pub const SYS_getsockopt: ::c_long = 340; -pub const SYS_sendmsg: ::c_long = 341; -pub const SYS_recvmsg: ::c_long = 342; -pub const SYS_recvmmsg: ::c_long = 343; -pub const SYS_accept4: ::c_long = 344; -pub const SYS_name_to_handle_at: ::c_long = 345; -pub const SYS_open_by_handle_at: ::c_long = 346; -pub const SYS_clock_adjtime: ::c_long = 347; -pub const SYS_syncfs: ::c_long = 348; -pub const SYS_sendmmsg: ::c_long = 349; -pub const SYS_setns: ::c_long = 350; -pub const SYS_process_vm_readv: ::c_long = 351; -pub const SYS_process_vm_writev: ::c_long = 352; -pub const SYS_finit_module: ::c_long = 353; -pub const SYS_kcmp: ::c_long = 354; -pub const SYS_sched_setattr: ::c_long = 355; -pub const SYS_sched_getattr: ::c_long = 356; -pub const SYS_renameat2: ::c_long = 357; -pub const SYS_seccomp: ::c_long = 358; -pub const SYS_getrandom: ::c_long = 359; -pub const SYS_memfd_create: ::c_long = 360; -pub const SYS_bpf: ::c_long = 361; -pub const SYS_execveat: ::c_long = 362; -pub const SYS_switch_endian: ::c_long = 363; -pub const SYS_userfaultfd: ::c_long = 364; -pub const SYS_membarrier: ::c_long = 365; -pub const SYS_mlock2: ::c_long = 378; -pub const SYS_copy_file_range: ::c_long = 379; -pub const SYS_preadv2: ::c_long = 380; -pub const SYS_pwritev2: ::c_long = 381; -pub const SYS_kexec_file_load: ::c_long = 382; -pub const SYS_statx: ::c_long = 383; -pub const SYS_pkey_alloc: ::c_long = 384; -pub const SYS_pkey_free: ::c_long = 385; -pub const SYS_pkey_mprotect: ::c_long = 386; -pub const SYS_rseq: ::c_long = 387; -pub const SYS_io_pgetevents: ::c_long = 388; -pub const SYS_semtimedop: ::c_long = 392; -pub const SYS_semget: ::c_long = 393; -pub const SYS_semctl: ::c_long = 394; -pub const SYS_shmget: ::c_long = 395; -pub const SYS_shmctl: ::c_long = 396; -pub const SYS_shmat: ::c_long = 397; -pub const SYS_shmdt: ::c_long = 398; -pub const SYS_msgget: ::c_long = 399; -pub const SYS_msgsnd: ::c_long = 400; -pub const SYS_msgrcv: ::c_long = 401; -pub const SYS_msgctl: ::c_long = 402; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_waitpid: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_time: c_long = 13; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_break: c_long = 17; +pub const SYS_oldstat: c_long = 18; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_stime: c_long = 25; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_oldfstat: c_long = 28; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_stty: c_long = 31; +pub const SYS_gtty: c_long = 32; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_ftime: c_long = 35; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_prof: c_long = 44; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_signal: c_long = 48; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_lock: c_long = 53; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_mpx: c_long = 56; +pub const SYS_setpgid: c_long = 57; +pub const SYS_ulimit: c_long = 58; +pub const SYS_oldolduname: c_long = 59; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sgetmask: c_long = 68; +pub const SYS_ssetmask: c_long = 69; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrlimit: c_long = 76; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_select: c_long = 82; +pub const SYS_symlink: c_long = 83; +pub const SYS_oldlstat: c_long = 84; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_profil: c_long = 98; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_ioperm: c_long = 101; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_olduname: c_long = 109; +pub const SYS_iopl: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_vm86: c_long = 113; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_modify_ldt: c_long = 123; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; /* Syscall for Andrew File System */ +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_query_module: c_long = 166; +pub const SYS_poll: c_long = 167; +pub const SYS_nfsservctl: c_long = 168; +pub const SYS_setresgid: c_long = 169; +pub const SYS_getresgid: c_long = 170; +pub const SYS_prctl: c_long = 171; +pub const SYS_rt_sigreturn: c_long = 172; +pub const SYS_rt_sigaction: c_long = 173; +pub const SYS_rt_sigprocmask: c_long = 174; +pub const SYS_rt_sigpending: c_long = 175; +pub const SYS_rt_sigtimedwait: c_long = 176; +pub const SYS_rt_sigqueueinfo: c_long = 177; +pub const SYS_rt_sigsuspend: c_long = 178; +pub const SYS_pread64: c_long = 179; +pub const SYS_pwrite64: c_long = 180; +pub const SYS_chown: c_long = 181; +pub const SYS_getcwd: c_long = 182; +pub const SYS_capget: c_long = 183; +pub const SYS_capset: c_long = 184; +pub const SYS_sigaltstack: c_long = 185; +pub const SYS_sendfile: c_long = 186; +pub const SYS_getpmsg: c_long = 187; /* some people actually want streams */ +pub const SYS_putpmsg: c_long = 188; /* some people actually want streams */ +pub const SYS_vfork: c_long = 189; +pub const SYS_ugetrlimit: c_long = 190; /* SuS compliant getrlimit */ +pub const SYS_readahead: c_long = 191; +pub const SYS_pciconfig_read: c_long = 198; +pub const SYS_pciconfig_write: c_long = 199; +pub const SYS_pciconfig_iobase: c_long = 200; +pub const SYS_multiplexer: c_long = 201; +pub const SYS_getdents64: c_long = 202; +pub const SYS_pivot_root: c_long = 203; +pub const SYS_madvise: c_long = 205; +pub const SYS_mincore: c_long = 206; +pub const SYS_gettid: c_long = 207; +pub const SYS_tkill: c_long = 208; +pub const SYS_setxattr: c_long = 209; +pub const SYS_lsetxattr: c_long = 210; +pub const SYS_fsetxattr: c_long = 211; +pub const SYS_getxattr: c_long = 212; +pub const SYS_lgetxattr: c_long = 213; +pub const SYS_fgetxattr: c_long = 214; +pub const SYS_listxattr: c_long = 215; +pub const SYS_llistxattr: c_long = 216; +pub const SYS_flistxattr: c_long = 217; +pub const SYS_removexattr: c_long = 218; +pub const SYS_lremovexattr: c_long = 219; +pub const SYS_fremovexattr: c_long = 220; +pub const SYS_futex: c_long = 221; +pub const SYS_sched_setaffinity: c_long = 222; +pub const SYS_sched_getaffinity: c_long = 223; +pub const SYS_tuxcall: c_long = 225; +pub const SYS_io_setup: c_long = 227; +pub const SYS_io_destroy: c_long = 228; +pub const SYS_io_getevents: c_long = 229; +pub const SYS_io_submit: c_long = 230; +pub const SYS_io_cancel: c_long = 231; +pub const SYS_set_tid_address: c_long = 232; +pub const SYS_exit_group: c_long = 234; +pub const SYS_lookup_dcookie: c_long = 235; +pub const SYS_epoll_create: c_long = 236; +pub const SYS_epoll_ctl: c_long = 237; +pub const SYS_epoll_wait: c_long = 238; +pub const SYS_remap_file_pages: c_long = 239; +pub const SYS_timer_create: c_long = 240; +pub const SYS_timer_settime: c_long = 241; +pub const SYS_timer_gettime: c_long = 242; +pub const SYS_timer_getoverrun: c_long = 243; +pub const SYS_timer_delete: c_long = 244; +pub const SYS_clock_settime: c_long = 245; +pub const SYS_clock_gettime: c_long = 246; +pub const SYS_clock_getres: c_long = 247; +pub const SYS_clock_nanosleep: c_long = 248; +pub const SYS_swapcontext: c_long = 249; +pub const SYS_tgkill: c_long = 250; +pub const SYS_utimes: c_long = 251; +pub const SYS_statfs64: c_long = 252; +pub const SYS_fstatfs64: c_long = 253; +pub const SYS_rtas: c_long = 255; +pub const SYS_sys_debug_setcontext: c_long = 256; +pub const SYS_migrate_pages: c_long = 258; +pub const SYS_mbind: c_long = 259; +pub const SYS_get_mempolicy: c_long = 260; +pub const SYS_set_mempolicy: c_long = 261; +pub const SYS_mq_open: c_long = 262; +pub const SYS_mq_unlink: c_long = 263; +pub const SYS_mq_timedsend: c_long = 264; +pub const SYS_mq_timedreceive: c_long = 265; +pub const SYS_mq_notify: c_long = 266; +pub const SYS_mq_getsetattr: c_long = 267; +pub const SYS_kexec_load: c_long = 268; +pub const SYS_add_key: c_long = 269; +pub const SYS_request_key: c_long = 270; +pub const SYS_keyctl: c_long = 271; +pub const SYS_waitid: c_long = 272; +pub const SYS_ioprio_set: c_long = 273; +pub const SYS_ioprio_get: c_long = 274; +pub const SYS_inotify_init: c_long = 275; +pub const SYS_inotify_add_watch: c_long = 276; +pub const SYS_inotify_rm_watch: c_long = 277; +pub const SYS_spu_run: c_long = 278; +pub const SYS_spu_create: c_long = 279; +pub const SYS_pselect6: c_long = 280; +pub const SYS_ppoll: c_long = 281; +pub const SYS_unshare: c_long = 282; +pub const SYS_splice: c_long = 283; +pub const SYS_tee: c_long = 284; +pub const SYS_vmsplice: c_long = 285; +pub const SYS_openat: c_long = 286; +pub const SYS_mkdirat: c_long = 287; +pub const SYS_mknodat: c_long = 288; +pub const SYS_fchownat: c_long = 289; +pub const SYS_futimesat: c_long = 290; +pub const SYS_newfstatat: c_long = 291; +pub const SYS_unlinkat: c_long = 292; +pub const SYS_renameat: c_long = 293; +pub const SYS_linkat: c_long = 294; +pub const SYS_symlinkat: c_long = 295; +pub const SYS_readlinkat: c_long = 296; +pub const SYS_fchmodat: c_long = 297; +pub const SYS_faccessat: c_long = 298; +pub const SYS_get_robust_list: c_long = 299; +pub const SYS_set_robust_list: c_long = 300; +pub const SYS_move_pages: c_long = 301; +pub const SYS_getcpu: c_long = 302; +pub const SYS_epoll_pwait: c_long = 303; +pub const SYS_utimensat: c_long = 304; +pub const SYS_signalfd: c_long = 305; +pub const SYS_timerfd_create: c_long = 306; +pub const SYS_eventfd: c_long = 307; +pub const SYS_sync_file_range2: c_long = 308; +pub const SYS_fallocate: c_long = 309; +pub const SYS_subpage_prot: c_long = 310; +pub const SYS_timerfd_settime: c_long = 311; +pub const SYS_timerfd_gettime: c_long = 312; +pub const SYS_signalfd4: c_long = 313; +pub const SYS_eventfd2: c_long = 314; +pub const SYS_epoll_create1: c_long = 315; +pub const SYS_dup3: c_long = 316; +pub const SYS_pipe2: c_long = 317; +pub const SYS_inotify_init1: c_long = 318; +pub const SYS_perf_event_open: c_long = 319; +pub const SYS_preadv: c_long = 320; +pub const SYS_pwritev: c_long = 321; +pub const SYS_rt_tgsigqueueinfo: c_long = 322; +pub const SYS_fanotify_init: c_long = 323; +pub const SYS_fanotify_mark: c_long = 324; +pub const SYS_prlimit64: c_long = 325; +pub const SYS_socket: c_long = 326; +pub const SYS_bind: c_long = 327; +pub const SYS_connect: c_long = 328; +pub const SYS_listen: c_long = 329; +pub const SYS_accept: c_long = 330; +pub const SYS_getsockname: c_long = 331; +pub const SYS_getpeername: c_long = 332; +pub const SYS_socketpair: c_long = 333; +pub const SYS_send: c_long = 334; +pub const SYS_sendto: c_long = 335; +pub const SYS_recv: c_long = 336; +pub const SYS_recvfrom: c_long = 337; +pub const SYS_shutdown: c_long = 338; +pub const SYS_setsockopt: c_long = 339; +pub const SYS_getsockopt: c_long = 340; +pub const SYS_sendmsg: c_long = 341; +pub const SYS_recvmsg: c_long = 342; +pub const SYS_recvmmsg: c_long = 343; +pub const SYS_accept4: c_long = 344; +pub const SYS_name_to_handle_at: c_long = 345; +pub const SYS_open_by_handle_at: c_long = 346; +pub const SYS_clock_adjtime: c_long = 347; +pub const SYS_syncfs: c_long = 348; +pub const SYS_sendmmsg: c_long = 349; +pub const SYS_setns: c_long = 350; +pub const SYS_process_vm_readv: c_long = 351; +pub const SYS_process_vm_writev: c_long = 352; +pub const SYS_finit_module: c_long = 353; +pub const SYS_kcmp: c_long = 354; +pub const SYS_sched_setattr: c_long = 355; +pub const SYS_sched_getattr: c_long = 356; +pub const SYS_renameat2: c_long = 357; +pub const SYS_seccomp: c_long = 358; +pub const SYS_getrandom: c_long = 359; +pub const SYS_memfd_create: c_long = 360; +pub const SYS_bpf: c_long = 361; +pub const SYS_execveat: c_long = 362; +pub const SYS_switch_endian: c_long = 363; +pub const SYS_userfaultfd: c_long = 364; +pub const SYS_membarrier: c_long = 365; +pub const SYS_mlock2: c_long = 378; +pub const SYS_copy_file_range: c_long = 379; +pub const SYS_preadv2: c_long = 380; +pub const SYS_pwritev2: c_long = 381; +pub const SYS_kexec_file_load: c_long = 382; +pub const SYS_statx: c_long = 383; +pub const SYS_pkey_alloc: c_long = 384; +pub const SYS_pkey_free: c_long = 385; +pub const SYS_pkey_mprotect: c_long = 386; +pub const SYS_rseq: c_long = 387; +pub const SYS_io_pgetevents: c_long = 388; +pub const SYS_semtimedop: c_long = 392; +pub const SYS_semget: c_long = 393; +pub const SYS_semctl: c_long = 394; +pub const SYS_shmget: c_long = 395; +pub const SYS_shmctl: c_long = 396; +pub const SYS_shmat: c_long = 397; +pub const SYS_shmdt: c_long = 398; +pub const SYS_msgget: c_long = 399; +pub const SYS_msgsnd: c_long = 400; +pub const SYS_msgrcv: c_long = 401; +pub const SYS_msgctl: c_long = 402; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; -pub const EDEADLK: ::c_int = 58; -pub const EDEADLOCK: ::c_int = EDEADLK; +pub const EDEADLK: c_int = 58; +pub const EDEADLOCK: c_int = EDEADLK; -pub const EXTPROC: ::tcflag_t = 0x10000000; +pub const EXTPROC: crate::tcflag_t = 0x10000000; pub const VEOL: usize = 6; pub const VEOL2: usize = 8; pub const VMIN: usize = 5; -pub const IEXTEN: ::tcflag_t = 0x00000400; -pub const TOSTOP: ::tcflag_t = 0x00400000; -pub const FLUSHO: ::tcflag_t = 0x00800000; +pub const IEXTEN: crate::tcflag_t = 0x00000400; +pub const TOSTOP: crate::tcflag_t = 0x00400000; +pub const FLUSHO: crate::tcflag_t = 0x00800000; -pub const MCL_CURRENT: ::c_int = 0x2000; -pub const MCL_FUTURE: ::c_int = 0x4000; -pub const MCL_ONFAULT: ::c_int = 0x8000; -pub const CBAUD: ::tcflag_t = 0xff; -pub const TAB1: ::c_int = 0x400; -pub const TAB2: ::c_int = 0x800; -pub const TAB3: ::c_int = 0xc00; -pub const CR1: ::c_int = 0x1000; -pub const CR2: ::c_int = 0x2000; -pub const CR3: ::c_int = 0x3000; -pub const FF1: ::c_int = 0x4000; -pub const BS1: ::c_int = 0x8000; -pub const VT1: ::c_int = 0x10000; +pub const MCL_CURRENT: c_int = 0x2000; +pub const MCL_FUTURE: c_int = 0x4000; +pub const MCL_ONFAULT: c_int = 0x8000; +pub const CBAUD: crate::tcflag_t = 0xff; +pub const TAB1: c_int = 0x400; +pub const TAB2: c_int = 0x800; +pub const TAB3: c_int = 0xc00; +pub const CR1: c_int = 0x1000; +pub const CR2: c_int = 0x2000; +pub const CR3: c_int = 0x3000; +pub const FF1: c_int = 0x4000; +pub const BS1: c_int = 0x8000; +pub const VT1: c_int = 0x10000; pub const VWERASE: usize = 10; pub const VREPRINT: usize = 11; pub const VSUSP: usize = 12; @@ -657,55 +659,55 @@ pub const VSTART: usize = 13; pub const VSTOP: usize = 14; pub const VDISCARD: usize = 16; pub const VTIME: usize = 7; -pub const IXON: ::tcflag_t = 0x00000200; -pub const IXOFF: ::tcflag_t = 0x00000400; -pub const ONLCR: ::tcflag_t = 0x2; -pub const CSIZE: ::tcflag_t = 0x00000300; +pub const IXON: crate::tcflag_t = 0x00000200; +pub const IXOFF: crate::tcflag_t = 0x00000400; +pub const ONLCR: crate::tcflag_t = 0x2; +pub const CSIZE: crate::tcflag_t = 0x00000300; -pub const CS6: ::tcflag_t = 0x00000100; -pub const CS7: ::tcflag_t = 0x00000200; -pub const CS8: ::tcflag_t = 0x00000300; -pub const CSTOPB: ::tcflag_t = 0x00000400; -pub const CREAD: ::tcflag_t = 0x00000800; -pub const PARENB: ::tcflag_t = 0x00001000; -pub const PARODD: ::tcflag_t = 0x00002000; -pub const HUPCL: ::tcflag_t = 0x00004000; -pub const CLOCAL: ::tcflag_t = 0x00008000; -pub const ECHOKE: ::tcflag_t = 0x00000001; -pub const ECHOE: ::tcflag_t = 0x00000002; -pub const ECHOK: ::tcflag_t = 0x00000004; -pub const ECHONL: ::tcflag_t = 0x00000010; -pub const ECHOPRT: ::tcflag_t = 0x00000020; -pub const ECHOCTL: ::tcflag_t = 0x00000040; -pub const ISIG: ::tcflag_t = 0x00000080; -pub const ICANON: ::tcflag_t = 0x00000100; -pub const PENDIN: ::tcflag_t = 0x20000000; -pub const NOFLSH: ::tcflag_t = 0x80000000; +pub const CS6: crate::tcflag_t = 0x00000100; +pub const CS7: crate::tcflag_t = 0x00000200; +pub const CS8: crate::tcflag_t = 0x00000300; +pub const CSTOPB: crate::tcflag_t = 0x00000400; +pub const CREAD: crate::tcflag_t = 0x00000800; +pub const PARENB: crate::tcflag_t = 0x00001000; +pub const PARODD: crate::tcflag_t = 0x00002000; +pub const HUPCL: crate::tcflag_t = 0x00004000; +pub const CLOCAL: crate::tcflag_t = 0x00008000; +pub const ECHOKE: crate::tcflag_t = 0x00000001; +pub const ECHOE: crate::tcflag_t = 0x00000002; +pub const ECHOK: crate::tcflag_t = 0x00000004; +pub const ECHONL: crate::tcflag_t = 0x00000010; +pub const ECHOPRT: crate::tcflag_t = 0x00000020; +pub const ECHOCTL: crate::tcflag_t = 0x00000040; +pub const ISIG: crate::tcflag_t = 0x00000080; +pub const ICANON: crate::tcflag_t = 0x00000100; +pub const PENDIN: crate::tcflag_t = 0x20000000; +pub const NOFLSH: crate::tcflag_t = 0x80000000; -pub const CIBAUD: ::tcflag_t = 0o77600000; -pub const CBAUDEX: ::tcflag_t = 0o0000020; +pub const CIBAUD: crate::tcflag_t = 0o77600000; +pub const CBAUDEX: crate::tcflag_t = 0o0000020; pub const VSWTC: usize = 9; -pub const OLCUC: ::tcflag_t = 0o000004; -pub const NLDLY: ::tcflag_t = 0o0001400; -pub const CRDLY: ::tcflag_t = 0o0030000; -pub const TABDLY: ::tcflag_t = 0o0006000; -pub const BSDLY: ::tcflag_t = 0o0100000; -pub const FFDLY: ::tcflag_t = 0o0040000; -pub const VTDLY: ::tcflag_t = 0o0200000; -pub const XTABS: ::tcflag_t = 0o00006000; +pub const OLCUC: crate::tcflag_t = 0o000004; +pub const NLDLY: crate::tcflag_t = 0o0001400; +pub const CRDLY: crate::tcflag_t = 0o0030000; +pub const TABDLY: crate::tcflag_t = 0o0006000; +pub const BSDLY: crate::tcflag_t = 0o0100000; +pub const FFDLY: crate::tcflag_t = 0o0040000; +pub const VTDLY: crate::tcflag_t = 0o0200000; +pub const XTABS: crate::tcflag_t = 0o00006000; -pub const B57600: ::speed_t = 0o00020; -pub const B115200: ::speed_t = 0o00021; -pub const B230400: ::speed_t = 0o00022; -pub const B460800: ::speed_t = 0o00023; -pub const B500000: ::speed_t = 0o00024; -pub const B576000: ::speed_t = 0o00025; -pub const B921600: ::speed_t = 0o00026; -pub const B1000000: ::speed_t = 0o00027; -pub const B1152000: ::speed_t = 0o00030; -pub const B1500000: ::speed_t = 0o00031; -pub const B2000000: ::speed_t = 0o00032; -pub const B2500000: ::speed_t = 0o00033; -pub const B3000000: ::speed_t = 0o00034; -pub const B3500000: ::speed_t = 0o00035; -pub const B4000000: ::speed_t = 0o00036; +pub const B57600: crate::speed_t = 0o00020; +pub const B115200: crate::speed_t = 0o00021; +pub const B230400: crate::speed_t = 0o00022; +pub const B460800: crate::speed_t = 0o00023; +pub const B500000: crate::speed_t = 0o00024; +pub const B576000: crate::speed_t = 0o00025; +pub const B921600: crate::speed_t = 0o00026; +pub const B1000000: crate::speed_t = 0o00027; +pub const B1152000: crate::speed_t = 0o00030; +pub const B1500000: crate::speed_t = 0o00031; +pub const B2000000: crate::speed_t = 0o00032; +pub const B2500000: crate::speed_t = 0o00033; +pub const B3000000: crate::speed_t = 0o00034; +pub const B3500000: crate::speed_t = 0o00035; +pub const B4000000: crate::speed_t = 0o00036; diff --git a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs index e783589d2c0f3..53ae3d64c25b9 100644 --- a/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/riscv64/mod.rs @@ -1,102 +1,107 @@ //! RISC-V-specific definitions for 64-bit linux-like values +use crate::{ + c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off64_t, off_t, + size_t, +}; + pub type c_char = u8; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; -pub type nlink_t = ::c_uint; -pub type blksize_t = ::c_int; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type nlink_t = c_uint; +pub type blksize_t = c_int; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2usize], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub __pad1: ::dev_t, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub __pad2: ::c_int, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_int; 2], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub __pad1: crate::dev_t, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub __pad2: c_int, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_int; 2], } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct ucontext_t { - pub __uc_flags: ::c_ulong, + pub __uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, - pub uc_sigmask: ::sigset_t, + pub uc_stack: crate::stack_t, + pub uc_sigmask: crate::sigset_t, pub uc_mcontext: mcontext_t, } #[allow(missing_debug_implementations)] #[repr(align(16))] pub struct mcontext_t { - pub __gregs: [::c_ulong; 32], + pub __gregs: [c_ulong; 32], pub __fpregs: __riscv_mc_fp_state, } @@ -109,493 +114,493 @@ s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct __riscv_mc_f_ext_state { - pub __f: [::c_uint; 32], - pub __fcsr: ::c_uint, + pub __f: [c_uint; 32], + pub __fcsr: c_uint, } #[allow(missing_debug_implementations)] pub struct __riscv_mc_d_ext_state { - pub __f: [::c_ulonglong; 32], - pub __fcsr: ::c_uint, + pub __f: [c_ulonglong; 32], + pub __fcsr: c_uint, } #[allow(missing_debug_implementations)] #[repr(align(16))] pub struct __riscv_mc_q_ext_state { - pub __f: [::c_ulonglong; 64], - pub __fcsr: ::c_uint, - pub __glibc_reserved: [::c_uint; 3], + pub __f: [c_ulonglong; 64], + pub __fcsr: c_uint, + pub __glibc_reserved: [c_uint; 3], } } -pub const SYS_read: ::c_long = 63; -pub const SYS_write: ::c_long = 64; -pub const SYS_close: ::c_long = 57; -pub const SYS_fstat: ::c_long = 80; -pub const SYS_lseek: ::c_long = 62; -pub const SYS_mmap: ::c_long = 222; -pub const SYS_mprotect: ::c_long = 226; -pub const SYS_munmap: ::c_long = 215; -pub const SYS_brk: ::c_long = 214; -pub const SYS_rt_sigaction: ::c_long = 134; -pub const SYS_rt_sigprocmask: ::c_long = 135; -pub const SYS_rt_sigreturn: ::c_long = 139; -pub const SYS_ioctl: ::c_long = 29; -pub const SYS_pread64: ::c_long = 67; -pub const SYS_pwrite64: ::c_long = 68; -pub const SYS_readv: ::c_long = 65; -pub const SYS_writev: ::c_long = 66; -pub const SYS_sched_yield: ::c_long = 124; -pub const SYS_mremap: ::c_long = 216; -pub const SYS_msync: ::c_long = 227; -pub const SYS_mincore: ::c_long = 232; -pub const SYS_madvise: ::c_long = 233; -pub const SYS_shmget: ::c_long = 194; -pub const SYS_shmat: ::c_long = 196; -pub const SYS_shmctl: ::c_long = 195; -pub const SYS_dup: ::c_long = 23; -pub const SYS_nanosleep: ::c_long = 101; -pub const SYS_getitimer: ::c_long = 102; -pub const SYS_setitimer: ::c_long = 103; -pub const SYS_getpid: ::c_long = 172; -pub const SYS_sendfile: ::c_long = 71; -pub const SYS_socket: ::c_long = 198; -pub const SYS_connect: ::c_long = 203; -pub const SYS_accept: ::c_long = 202; -pub const SYS_sendto: ::c_long = 206; -pub const SYS_recvfrom: ::c_long = 207; -pub const SYS_sendmsg: ::c_long = 211; -pub const SYS_recvmsg: ::c_long = 212; -pub const SYS_shutdown: ::c_long = 210; -pub const SYS_bind: ::c_long = 200; -pub const SYS_listen: ::c_long = 201; -pub const SYS_getsockname: ::c_long = 204; -pub const SYS_getpeername: ::c_long = 205; -pub const SYS_socketpair: ::c_long = 199; -pub const SYS_setsockopt: ::c_long = 208; -pub const SYS_getsockopt: ::c_long = 209; -pub const SYS_clone: ::c_long = 220; -pub const SYS_execve: ::c_long = 221; -pub const SYS_exit: ::c_long = 93; -pub const SYS_wait4: ::c_long = 260; -pub const SYS_kill: ::c_long = 129; -pub const SYS_uname: ::c_long = 160; -pub const SYS_semget: ::c_long = 190; -pub const SYS_semop: ::c_long = 193; -pub const SYS_semctl: ::c_long = 191; -pub const SYS_shmdt: ::c_long = 197; -pub const SYS_msgget: ::c_long = 186; -pub const SYS_msgsnd: ::c_long = 189; -pub const SYS_msgrcv: ::c_long = 188; -pub const SYS_msgctl: ::c_long = 187; -pub const SYS_fcntl: ::c_long = 25; -pub const SYS_flock: ::c_long = 32; -pub const SYS_fsync: ::c_long = 82; -pub const SYS_fdatasync: ::c_long = 83; -pub const SYS_truncate: ::c_long = 45; -pub const SYS_ftruncate: ::c_long = 46; -pub const SYS_getcwd: ::c_long = 17; -pub const SYS_chdir: ::c_long = 49; -pub const SYS_fchdir: ::c_long = 50; -pub const SYS_fchmod: ::c_long = 52; -pub const SYS_fchown: ::c_long = 55; -pub const SYS_umask: ::c_long = 166; -pub const SYS_gettimeofday: ::c_long = 169; -pub const SYS_getrlimit: ::c_long = 163; -pub const SYS_getrusage: ::c_long = 165; -pub const SYS_sysinfo: ::c_long = 179; -pub const SYS_times: ::c_long = 153; -pub const SYS_ptrace: ::c_long = 117; -pub const SYS_getuid: ::c_long = 174; -pub const SYS_syslog: ::c_long = 116; -pub const SYS_getgid: ::c_long = 176; -pub const SYS_setuid: ::c_long = 146; -pub const SYS_setgid: ::c_long = 144; -pub const SYS_geteuid: ::c_long = 175; -pub const SYS_getegid: ::c_long = 177; -pub const SYS_setpgid: ::c_long = 154; -pub const SYS_getppid: ::c_long = 173; -pub const SYS_setsid: ::c_long = 157; -pub const SYS_setreuid: ::c_long = 145; -pub const SYS_setregid: ::c_long = 143; -pub const SYS_getgroups: ::c_long = 158; -pub const SYS_setgroups: ::c_long = 159; -pub const SYS_setresuid: ::c_long = 147; -pub const SYS_getresuid: ::c_long = 148; -pub const SYS_setresgid: ::c_long = 149; -pub const SYS_getresgid: ::c_long = 150; -pub const SYS_getpgid: ::c_long = 155; -pub const SYS_setfsuid: ::c_long = 151; -pub const SYS_setfsgid: ::c_long = 152; -pub const SYS_getsid: ::c_long = 156; -pub const SYS_capget: ::c_long = 90; -pub const SYS_capset: ::c_long = 91; -pub const SYS_rt_sigpending: ::c_long = 136; -pub const SYS_rt_sigtimedwait: ::c_long = 137; -pub const SYS_rt_sigqueueinfo: ::c_long = 138; -pub const SYS_rt_sigsuspend: ::c_long = 133; -pub const SYS_sigaltstack: ::c_long = 132; -pub const SYS_personality: ::c_long = 92; -pub const SYS_statfs: ::c_long = 43; -pub const SYS_fstatfs: ::c_long = 44; -pub const SYS_getpriority: ::c_long = 141; -pub const SYS_setpriority: ::c_long = 140; -pub const SYS_sched_setparam: ::c_long = 118; -pub const SYS_sched_getparam: ::c_long = 121; -pub const SYS_sched_setscheduler: ::c_long = 119; -pub const SYS_sched_getscheduler: ::c_long = 120; -pub const SYS_sched_get_priority_max: ::c_long = 125; -pub const SYS_sched_get_priority_min: ::c_long = 126; -pub const SYS_sched_rr_get_interval: ::c_long = 127; -pub const SYS_mlock: ::c_long = 228; -pub const SYS_munlock: ::c_long = 229; -pub const SYS_mlockall: ::c_long = 230; -pub const SYS_munlockall: ::c_long = 231; -pub const SYS_vhangup: ::c_long = 58; -pub const SYS_pivot_root: ::c_long = 41; -pub const SYS_prctl: ::c_long = 167; -pub const SYS_adjtimex: ::c_long = 171; -pub const SYS_setrlimit: ::c_long = 164; -pub const SYS_chroot: ::c_long = 51; -pub const SYS_sync: ::c_long = 81; -pub const SYS_acct: ::c_long = 89; -pub const SYS_settimeofday: ::c_long = 170; -pub const SYS_mount: ::c_long = 40; -pub const SYS_umount2: ::c_long = 39; -pub const SYS_swapon: ::c_long = 224; -pub const SYS_swapoff: ::c_long = 225; -pub const SYS_reboot: ::c_long = 142; -pub const SYS_sethostname: ::c_long = 161; -pub const SYS_setdomainname: ::c_long = 162; -pub const SYS_init_module: ::c_long = 105; -pub const SYS_delete_module: ::c_long = 106; -pub const SYS_quotactl: ::c_long = 60; -pub const SYS_nfsservctl: ::c_long = 42; -pub const SYS_gettid: ::c_long = 178; -pub const SYS_readahead: ::c_long = 213; -pub const SYS_setxattr: ::c_long = 5; -pub const SYS_lsetxattr: ::c_long = 6; -pub const SYS_fsetxattr: ::c_long = 7; -pub const SYS_getxattr: ::c_long = 8; -pub const SYS_lgetxattr: ::c_long = 9; -pub const SYS_fgetxattr: ::c_long = 10; -pub const SYS_listxattr: ::c_long = 11; -pub const SYS_llistxattr: ::c_long = 12; -pub const SYS_flistxattr: ::c_long = 13; -pub const SYS_removexattr: ::c_long = 14; -pub const SYS_lremovexattr: ::c_long = 15; -pub const SYS_fremovexattr: ::c_long = 16; -pub const SYS_tkill: ::c_long = 130; -pub const SYS_futex: ::c_long = 98; -pub const SYS_sched_setaffinity: ::c_long = 122; -pub const SYS_sched_getaffinity: ::c_long = 123; -pub const SYS_io_setup: ::c_long = 0; -pub const SYS_io_destroy: ::c_long = 1; -pub const SYS_io_getevents: ::c_long = 4; -pub const SYS_io_submit: ::c_long = 2; -pub const SYS_io_cancel: ::c_long = 3; -pub const SYS_lookup_dcookie: ::c_long = 18; -pub const SYS_remap_file_pages: ::c_long = 234; -pub const SYS_getdents64: ::c_long = 61; -pub const SYS_set_tid_address: ::c_long = 96; -pub const SYS_restart_syscall: ::c_long = 128; -pub const SYS_semtimedop: ::c_long = 192; -pub const SYS_fadvise64: ::c_long = 223; -pub const SYS_timer_create: ::c_long = 107; -pub const SYS_timer_settime: ::c_long = 110; -pub const SYS_timer_gettime: ::c_long = 108; -pub const SYS_timer_getoverrun: ::c_long = 109; -pub const SYS_timer_delete: ::c_long = 111; -pub const SYS_clock_settime: ::c_long = 112; -pub const SYS_clock_gettime: ::c_long = 113; -pub const SYS_clock_getres: ::c_long = 114; -pub const SYS_clock_nanosleep: ::c_long = 115; -pub const SYS_exit_group: ::c_long = 94; -pub const SYS_epoll_ctl: ::c_long = 21; -pub const SYS_tgkill: ::c_long = 131; -pub const SYS_mbind: ::c_long = 235; -pub const SYS_set_mempolicy: ::c_long = 237; -pub const SYS_get_mempolicy: ::c_long = 236; -pub const SYS_mq_open: ::c_long = 180; -pub const SYS_mq_unlink: ::c_long = 181; -pub const SYS_mq_timedsend: ::c_long = 182; -pub const SYS_mq_timedreceive: ::c_long = 183; -pub const SYS_mq_notify: ::c_long = 184; -pub const SYS_mq_getsetattr: ::c_long = 185; -pub const SYS_kexec_load: ::c_long = 104; -pub const SYS_waitid: ::c_long = 95; -pub const SYS_add_key: ::c_long = 217; -pub const SYS_request_key: ::c_long = 218; -pub const SYS_keyctl: ::c_long = 219; -pub const SYS_ioprio_set: ::c_long = 30; -pub const SYS_ioprio_get: ::c_long = 31; -pub const SYS_inotify_add_watch: ::c_long = 27; -pub const SYS_inotify_rm_watch: ::c_long = 28; -pub const SYS_migrate_pages: ::c_long = 238; -pub const SYS_openat: ::c_long = 56; -pub const SYS_mkdirat: ::c_long = 34; -pub const SYS_mknodat: ::c_long = 33; -pub const SYS_fchownat: ::c_long = 54; -pub const SYS_newfstatat: ::c_long = 79; -pub const SYS_unlinkat: ::c_long = 35; -pub const SYS_linkat: ::c_long = 37; -pub const SYS_symlinkat: ::c_long = 36; -pub const SYS_readlinkat: ::c_long = 78; -pub const SYS_fchmodat: ::c_long = 53; -pub const SYS_faccessat: ::c_long = 48; -pub const SYS_pselect6: ::c_long = 72; -pub const SYS_ppoll: ::c_long = 73; -pub const SYS_unshare: ::c_long = 97; -pub const SYS_set_robust_list: ::c_long = 99; -pub const SYS_get_robust_list: ::c_long = 100; -pub const SYS_splice: ::c_long = 76; -pub const SYS_tee: ::c_long = 77; -pub const SYS_sync_file_range: ::c_long = 84; -pub const SYS_vmsplice: ::c_long = 75; -pub const SYS_move_pages: ::c_long = 239; -pub const SYS_utimensat: ::c_long = 88; -pub const SYS_epoll_pwait: ::c_long = 22; -pub const SYS_timerfd_create: ::c_long = 85; -pub const SYS_fallocate: ::c_long = 47; -pub const SYS_timerfd_settime: ::c_long = 86; -pub const SYS_timerfd_gettime: ::c_long = 87; -pub const SYS_accept4: ::c_long = 242; -pub const SYS_signalfd4: ::c_long = 74; -pub const SYS_eventfd2: ::c_long = 19; -pub const SYS_epoll_create1: ::c_long = 20; -pub const SYS_dup3: ::c_long = 24; -pub const SYS_pipe2: ::c_long = 59; -pub const SYS_inotify_init1: ::c_long = 26; -pub const SYS_preadv: ::c_long = 69; -pub const SYS_pwritev: ::c_long = 70; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 240; -pub const SYS_perf_event_open: ::c_long = 241; -pub const SYS_recvmmsg: ::c_long = 243; -pub const SYS_fanotify_init: ::c_long = 262; -pub const SYS_fanotify_mark: ::c_long = 263; -pub const SYS_prlimit64: ::c_long = 261; -pub const SYS_name_to_handle_at: ::c_long = 264; -pub const SYS_open_by_handle_at: ::c_long = 265; -pub const SYS_clock_adjtime: ::c_long = 266; -pub const SYS_syncfs: ::c_long = 267; -pub const SYS_sendmmsg: ::c_long = 269; -pub const SYS_setns: ::c_long = 268; -pub const SYS_getcpu: ::c_long = 168; -pub const SYS_process_vm_readv: ::c_long = 270; -pub const SYS_process_vm_writev: ::c_long = 271; -pub const SYS_kcmp: ::c_long = 272; -pub const SYS_finit_module: ::c_long = 273; -pub const SYS_sched_setattr: ::c_long = 274; -pub const SYS_sched_getattr: ::c_long = 275; -pub const SYS_renameat2: ::c_long = 276; -pub const SYS_seccomp: ::c_long = 277; -pub const SYS_getrandom: ::c_long = 278; -pub const SYS_memfd_create: ::c_long = 279; -pub const SYS_bpf: ::c_long = 280; -pub const SYS_execveat: ::c_long = 281; -pub const SYS_userfaultfd: ::c_long = 282; -pub const SYS_membarrier: ::c_long = 283; -pub const SYS_mlock2: ::c_long = 284; -pub const SYS_copy_file_range: ::c_long = 285; -pub const SYS_preadv2: ::c_long = 286; -pub const SYS_pwritev2: ::c_long = 287; -pub const SYS_pkey_mprotect: ::c_long = 288; -pub const SYS_pkey_alloc: ::c_long = 289; -pub const SYS_pkey_free: ::c_long = 290; -pub const SYS_statx: ::c_long = 291; -pub const SYS_io_pgetevents: ::c_long = 292; -pub const SYS_rseq: ::c_long = 293; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; +pub const SYS_read: c_long = 63; +pub const SYS_write: c_long = 64; +pub const SYS_close: c_long = 57; +pub const SYS_fstat: c_long = 80; +pub const SYS_lseek: c_long = 62; +pub const SYS_mmap: c_long = 222; +pub const SYS_mprotect: c_long = 226; +pub const SYS_munmap: c_long = 215; +pub const SYS_brk: c_long = 214; +pub const SYS_rt_sigaction: c_long = 134; +pub const SYS_rt_sigprocmask: c_long = 135; +pub const SYS_rt_sigreturn: c_long = 139; +pub const SYS_ioctl: c_long = 29; +pub const SYS_pread64: c_long = 67; +pub const SYS_pwrite64: c_long = 68; +pub const SYS_readv: c_long = 65; +pub const SYS_writev: c_long = 66; +pub const SYS_sched_yield: c_long = 124; +pub const SYS_mremap: c_long = 216; +pub const SYS_msync: c_long = 227; +pub const SYS_mincore: c_long = 232; +pub const SYS_madvise: c_long = 233; +pub const SYS_shmget: c_long = 194; +pub const SYS_shmat: c_long = 196; +pub const SYS_shmctl: c_long = 195; +pub const SYS_dup: c_long = 23; +pub const SYS_nanosleep: c_long = 101; +pub const SYS_getitimer: c_long = 102; +pub const SYS_setitimer: c_long = 103; +pub const SYS_getpid: c_long = 172; +pub const SYS_sendfile: c_long = 71; +pub const SYS_socket: c_long = 198; +pub const SYS_connect: c_long = 203; +pub const SYS_accept: c_long = 202; +pub const SYS_sendto: c_long = 206; +pub const SYS_recvfrom: c_long = 207; +pub const SYS_sendmsg: c_long = 211; +pub const SYS_recvmsg: c_long = 212; +pub const SYS_shutdown: c_long = 210; +pub const SYS_bind: c_long = 200; +pub const SYS_listen: c_long = 201; +pub const SYS_getsockname: c_long = 204; +pub const SYS_getpeername: c_long = 205; +pub const SYS_socketpair: c_long = 199; +pub const SYS_setsockopt: c_long = 208; +pub const SYS_getsockopt: c_long = 209; +pub const SYS_clone: c_long = 220; +pub const SYS_execve: c_long = 221; +pub const SYS_exit: c_long = 93; +pub const SYS_wait4: c_long = 260; +pub const SYS_kill: c_long = 129; +pub const SYS_uname: c_long = 160; +pub const SYS_semget: c_long = 190; +pub const SYS_semop: c_long = 193; +pub const SYS_semctl: c_long = 191; +pub const SYS_shmdt: c_long = 197; +pub const SYS_msgget: c_long = 186; +pub const SYS_msgsnd: c_long = 189; +pub const SYS_msgrcv: c_long = 188; +pub const SYS_msgctl: c_long = 187; +pub const SYS_fcntl: c_long = 25; +pub const SYS_flock: c_long = 32; +pub const SYS_fsync: c_long = 82; +pub const SYS_fdatasync: c_long = 83; +pub const SYS_truncate: c_long = 45; +pub const SYS_ftruncate: c_long = 46; +pub const SYS_getcwd: c_long = 17; +pub const SYS_chdir: c_long = 49; +pub const SYS_fchdir: c_long = 50; +pub const SYS_fchmod: c_long = 52; +pub const SYS_fchown: c_long = 55; +pub const SYS_umask: c_long = 166; +pub const SYS_gettimeofday: c_long = 169; +pub const SYS_getrlimit: c_long = 163; +pub const SYS_getrusage: c_long = 165; +pub const SYS_sysinfo: c_long = 179; +pub const SYS_times: c_long = 153; +pub const SYS_ptrace: c_long = 117; +pub const SYS_getuid: c_long = 174; +pub const SYS_syslog: c_long = 116; +pub const SYS_getgid: c_long = 176; +pub const SYS_setuid: c_long = 146; +pub const SYS_setgid: c_long = 144; +pub const SYS_geteuid: c_long = 175; +pub const SYS_getegid: c_long = 177; +pub const SYS_setpgid: c_long = 154; +pub const SYS_getppid: c_long = 173; +pub const SYS_setsid: c_long = 157; +pub const SYS_setreuid: c_long = 145; +pub const SYS_setregid: c_long = 143; +pub const SYS_getgroups: c_long = 158; +pub const SYS_setgroups: c_long = 159; +pub const SYS_setresuid: c_long = 147; +pub const SYS_getresuid: c_long = 148; +pub const SYS_setresgid: c_long = 149; +pub const SYS_getresgid: c_long = 150; +pub const SYS_getpgid: c_long = 155; +pub const SYS_setfsuid: c_long = 151; +pub const SYS_setfsgid: c_long = 152; +pub const SYS_getsid: c_long = 156; +pub const SYS_capget: c_long = 90; +pub const SYS_capset: c_long = 91; +pub const SYS_rt_sigpending: c_long = 136; +pub const SYS_rt_sigtimedwait: c_long = 137; +pub const SYS_rt_sigqueueinfo: c_long = 138; +pub const SYS_rt_sigsuspend: c_long = 133; +pub const SYS_sigaltstack: c_long = 132; +pub const SYS_personality: c_long = 92; +pub const SYS_statfs: c_long = 43; +pub const SYS_fstatfs: c_long = 44; +pub const SYS_getpriority: c_long = 141; +pub const SYS_setpriority: c_long = 140; +pub const SYS_sched_setparam: c_long = 118; +pub const SYS_sched_getparam: c_long = 121; +pub const SYS_sched_setscheduler: c_long = 119; +pub const SYS_sched_getscheduler: c_long = 120; +pub const SYS_sched_get_priority_max: c_long = 125; +pub const SYS_sched_get_priority_min: c_long = 126; +pub const SYS_sched_rr_get_interval: c_long = 127; +pub const SYS_mlock: c_long = 228; +pub const SYS_munlock: c_long = 229; +pub const SYS_mlockall: c_long = 230; +pub const SYS_munlockall: c_long = 231; +pub const SYS_vhangup: c_long = 58; +pub const SYS_pivot_root: c_long = 41; +pub const SYS_prctl: c_long = 167; +pub const SYS_adjtimex: c_long = 171; +pub const SYS_setrlimit: c_long = 164; +pub const SYS_chroot: c_long = 51; +pub const SYS_sync: c_long = 81; +pub const SYS_acct: c_long = 89; +pub const SYS_settimeofday: c_long = 170; +pub const SYS_mount: c_long = 40; +pub const SYS_umount2: c_long = 39; +pub const SYS_swapon: c_long = 224; +pub const SYS_swapoff: c_long = 225; +pub const SYS_reboot: c_long = 142; +pub const SYS_sethostname: c_long = 161; +pub const SYS_setdomainname: c_long = 162; +pub const SYS_init_module: c_long = 105; +pub const SYS_delete_module: c_long = 106; +pub const SYS_quotactl: c_long = 60; +pub const SYS_nfsservctl: c_long = 42; +pub const SYS_gettid: c_long = 178; +pub const SYS_readahead: c_long = 213; +pub const SYS_setxattr: c_long = 5; +pub const SYS_lsetxattr: c_long = 6; +pub const SYS_fsetxattr: c_long = 7; +pub const SYS_getxattr: c_long = 8; +pub const SYS_lgetxattr: c_long = 9; +pub const SYS_fgetxattr: c_long = 10; +pub const SYS_listxattr: c_long = 11; +pub const SYS_llistxattr: c_long = 12; +pub const SYS_flistxattr: c_long = 13; +pub const SYS_removexattr: c_long = 14; +pub const SYS_lremovexattr: c_long = 15; +pub const SYS_fremovexattr: c_long = 16; +pub const SYS_tkill: c_long = 130; +pub const SYS_futex: c_long = 98; +pub const SYS_sched_setaffinity: c_long = 122; +pub const SYS_sched_getaffinity: c_long = 123; +pub const SYS_io_setup: c_long = 0; +pub const SYS_io_destroy: c_long = 1; +pub const SYS_io_getevents: c_long = 4; +pub const SYS_io_submit: c_long = 2; +pub const SYS_io_cancel: c_long = 3; +pub const SYS_lookup_dcookie: c_long = 18; +pub const SYS_remap_file_pages: c_long = 234; +pub const SYS_getdents64: c_long = 61; +pub const SYS_set_tid_address: c_long = 96; +pub const SYS_restart_syscall: c_long = 128; +pub const SYS_semtimedop: c_long = 192; +pub const SYS_fadvise64: c_long = 223; +pub const SYS_timer_create: c_long = 107; +pub const SYS_timer_settime: c_long = 110; +pub const SYS_timer_gettime: c_long = 108; +pub const SYS_timer_getoverrun: c_long = 109; +pub const SYS_timer_delete: c_long = 111; +pub const SYS_clock_settime: c_long = 112; +pub const SYS_clock_gettime: c_long = 113; +pub const SYS_clock_getres: c_long = 114; +pub const SYS_clock_nanosleep: c_long = 115; +pub const SYS_exit_group: c_long = 94; +pub const SYS_epoll_ctl: c_long = 21; +pub const SYS_tgkill: c_long = 131; +pub const SYS_mbind: c_long = 235; +pub const SYS_set_mempolicy: c_long = 237; +pub const SYS_get_mempolicy: c_long = 236; +pub const SYS_mq_open: c_long = 180; +pub const SYS_mq_unlink: c_long = 181; +pub const SYS_mq_timedsend: c_long = 182; +pub const SYS_mq_timedreceive: c_long = 183; +pub const SYS_mq_notify: c_long = 184; +pub const SYS_mq_getsetattr: c_long = 185; +pub const SYS_kexec_load: c_long = 104; +pub const SYS_waitid: c_long = 95; +pub const SYS_add_key: c_long = 217; +pub const SYS_request_key: c_long = 218; +pub const SYS_keyctl: c_long = 219; +pub const SYS_ioprio_set: c_long = 30; +pub const SYS_ioprio_get: c_long = 31; +pub const SYS_inotify_add_watch: c_long = 27; +pub const SYS_inotify_rm_watch: c_long = 28; +pub const SYS_migrate_pages: c_long = 238; +pub const SYS_openat: c_long = 56; +pub const SYS_mkdirat: c_long = 34; +pub const SYS_mknodat: c_long = 33; +pub const SYS_fchownat: c_long = 54; +pub const SYS_newfstatat: c_long = 79; +pub const SYS_unlinkat: c_long = 35; +pub const SYS_linkat: c_long = 37; +pub const SYS_symlinkat: c_long = 36; +pub const SYS_readlinkat: c_long = 78; +pub const SYS_fchmodat: c_long = 53; +pub const SYS_faccessat: c_long = 48; +pub const SYS_pselect6: c_long = 72; +pub const SYS_ppoll: c_long = 73; +pub const SYS_unshare: c_long = 97; +pub const SYS_set_robust_list: c_long = 99; +pub const SYS_get_robust_list: c_long = 100; +pub const SYS_splice: c_long = 76; +pub const SYS_tee: c_long = 77; +pub const SYS_sync_file_range: c_long = 84; +pub const SYS_vmsplice: c_long = 75; +pub const SYS_move_pages: c_long = 239; +pub const SYS_utimensat: c_long = 88; +pub const SYS_epoll_pwait: c_long = 22; +pub const SYS_timerfd_create: c_long = 85; +pub const SYS_fallocate: c_long = 47; +pub const SYS_timerfd_settime: c_long = 86; +pub const SYS_timerfd_gettime: c_long = 87; +pub const SYS_accept4: c_long = 242; +pub const SYS_signalfd4: c_long = 74; +pub const SYS_eventfd2: c_long = 19; +pub const SYS_epoll_create1: c_long = 20; +pub const SYS_dup3: c_long = 24; +pub const SYS_pipe2: c_long = 59; +pub const SYS_inotify_init1: c_long = 26; +pub const SYS_preadv: c_long = 69; +pub const SYS_pwritev: c_long = 70; +pub const SYS_rt_tgsigqueueinfo: c_long = 240; +pub const SYS_perf_event_open: c_long = 241; +pub const SYS_recvmmsg: c_long = 243; +pub const SYS_fanotify_init: c_long = 262; +pub const SYS_fanotify_mark: c_long = 263; +pub const SYS_prlimit64: c_long = 261; +pub const SYS_name_to_handle_at: c_long = 264; +pub const SYS_open_by_handle_at: c_long = 265; +pub const SYS_clock_adjtime: c_long = 266; +pub const SYS_syncfs: c_long = 267; +pub const SYS_sendmmsg: c_long = 269; +pub const SYS_setns: c_long = 268; +pub const SYS_getcpu: c_long = 168; +pub const SYS_process_vm_readv: c_long = 270; +pub const SYS_process_vm_writev: c_long = 271; +pub const SYS_kcmp: c_long = 272; +pub const SYS_finit_module: c_long = 273; +pub const SYS_sched_setattr: c_long = 274; +pub const SYS_sched_getattr: c_long = 275; +pub const SYS_renameat2: c_long = 276; +pub const SYS_seccomp: c_long = 277; +pub const SYS_getrandom: c_long = 278; +pub const SYS_memfd_create: c_long = 279; +pub const SYS_bpf: c_long = 280; +pub const SYS_execveat: c_long = 281; +pub const SYS_userfaultfd: c_long = 282; +pub const SYS_membarrier: c_long = 283; +pub const SYS_mlock2: c_long = 284; +pub const SYS_copy_file_range: c_long = 285; +pub const SYS_preadv2: c_long = 286; +pub const SYS_pwritev2: c_long = 287; +pub const SYS_pkey_mprotect: c_long = 288; +pub const SYS_pkey_alloc: c_long = 289; +pub const SYS_pkey_free: c_long = 290; +pub const SYS_statx: c_long = 291; +pub const SYS_io_pgetevents: c_long = 292; +pub const SYS_rseq: c_long = 293; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; -pub const O_APPEND: ::c_int = 1024; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_LARGEFILE: ::c_int = 0; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_ASYNC: ::c_int = 0x2000; +pub const O_APPEND: c_int = 1024; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_LARGEFILE: c_int = 0; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_ASYNC: c_int = 0x2000; -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -603,65 +608,65 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; -pub const EDEADLK: ::c_int = 35; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const EDEADLK: c_int = 35; +pub const EDEADLOCK: c_int = EDEADLK; +pub const EXTPROC: crate::tcflag_t = 0x00010000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; pub const NGREG: usize = 32; pub const REG_PC: usize = 0; diff --git a/src/unix/linux_like/linux/musl/b64/s390x.rs b/src/unix/linux_like/linux/musl/b64/s390x.rs index 67183e8d55177..ad8ba3bb26e18 100644 --- a/src/unix/linux_like/linux/musl/b64/s390x.rs +++ b/src/unix/linux_like/linux/musl/b64/s390x.rs @@ -1,3 +1,5 @@ +use crate::{c_double, c_int, c_long, c_short, off_t, size_t}; + pub type blksize_t = i64; pub type c_char = u8; pub type nlink_t = u64; @@ -8,63 +10,63 @@ pub type __s64 = i64; s! { pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __pad1: ::c_long, - __pad2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __pad1: c_long, + __pad2: c_long, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + __unused: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + __unused: [c_long; 3], } } s_no_extra_traits! { // FIXME: This is actually a union. pub struct fpreg_t { - pub d: ::c_double, - // f: ::c_float, + pub d: c_double, + // f: c_float, } } @@ -78,15 +80,15 @@ cfg_if! { impl Eq for fpreg_t {} - impl ::fmt::Debug for fpreg_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpreg_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpreg_t").field("d", &self.d).finish() } } - impl ::hash::Hash for fpreg_t { - fn hash(&self, state: &mut H) { - let d: u64 = unsafe { ::mem::transmute(self.d) }; + impl crate::hash::Hash for fpreg_t { + fn hash(&self, state: &mut H) { + let d: u64 = unsafe { crate::mem::transmute(self.d) }; d.hash(state); } } @@ -94,177 +96,177 @@ cfg_if! { } pub const VEOF: usize = 4; -pub const RTLD_DEEPBIND: ::c_int = 0x8; +pub const RTLD_DEEPBIND: c_int = 0x8; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNREFUSED: ::c_int = 111; -pub const ECONNRESET: ::c_int = 104; -pub const EDEADLK: ::c_int = 35; -pub const ENOSYS: ::c_int = 38; -pub const ENOTCONN: ::c_int = 107; -pub const ETIMEDOUT: ::c_int = 110; -pub const O_APPEND: ::c_int = 1024; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_LARGEFILE: ::c_int = 0x8000; -pub const O_NONBLOCK: ::c_int = 2048; -pub const SA_NOCLDWAIT: ::c_int = 2; -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 4; -pub const SIGBUS: ::c_int = 7; -pub const SIGSTKSZ: ::size_t = 0x2000; -pub const MINSIGSTKSZ: ::size_t = 2048; -pub const SIG_SETMASK: ::c_int = 2; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ECONNABORTED: c_int = 103; +pub const ECONNREFUSED: c_int = 111; +pub const ECONNRESET: c_int = 104; +pub const EDEADLK: c_int = 35; +pub const ENOSYS: c_int = 38; +pub const ENOTCONN: c_int = 107; +pub const ETIMEDOUT: c_int = 110; +pub const O_APPEND: c_int = 1024; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_LARGEFILE: c_int = 0x8000; +pub const O_NONBLOCK: c_int = 2048; +pub const SA_NOCLDWAIT: c_int = 2; +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 4; +pub const SIGBUS: c_int = 7; +pub const SIGSTKSZ: size_t = 0x2000; +pub const MINSIGSTKSZ: size_t = 2048; +pub const SIG_SETMASK: c_int = 2; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; -pub const O_NOCTTY: ::c_int = 256; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_FSYNC: ::c_int = 0x101000; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; +pub const O_NOCTTY: c_int = 256; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_FSYNC: c_int = 0x101000; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; -pub const PTRACE_SYSEMU: ::c_int = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32; +pub const PTRACE_SYSEMU: c_int = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 32; -pub const EDEADLOCK: ::c_int = 35; -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EBADMSG: ::c_int = 74; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const EHWPOISON: ::c_int = 133; -pub const ERFKILL: ::c_int = 132; +pub const EDEADLOCK: c_int = 35; +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EBADMSG: c_int = 74; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const EHWPOISON: c_int = 133; +pub const ERFKILL: c_int = 132; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGCHLD: ::c_int = 17; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGCHLD: c_int = 17; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; -pub const O_ASYNC: ::c_int = 0x2000; +pub const O_ASYNC: c_int = 0x2000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const EXTPROC: crate::tcflag_t = 0x00010000; -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETOWN: ::c_int = 8; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETOWN: c_int = 8; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; pub const VTIME: usize = 5; pub const VSWTC: usize = 7; @@ -274,439 +276,439 @@ pub const VSUSP: usize = 10; pub const VREPRINT: usize = 12; pub const VDISCARD: usize = 13; pub const VWERASE: usize = 14; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const ONLCR: ::tcflag_t = 0o000004; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const FF1: ::tcflag_t = 0x00008000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const VT1: ::tcflag_t = 0x00004000; -pub const XTABS: ::tcflag_t = 0o014000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const ONLCR: crate::tcflag_t = 0o000004; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const VT1: crate::tcflag_t = 0x00004000; +pub const XTABS: crate::tcflag_t = 0o014000; -pub const CBAUD: ::speed_t = 0o010017; -pub const CSIZE: ::tcflag_t = 0o000060; -pub const CS6: ::tcflag_t = 0o000020; -pub const CS7: ::tcflag_t = 0o000040; -pub const CS8: ::tcflag_t = 0o000060; -pub const CSTOPB: ::tcflag_t = 0o000100; -pub const CREAD: ::tcflag_t = 0o000200; -pub const PARENB: ::tcflag_t = 0o000400; -pub const PARODD: ::tcflag_t = 0o001000; -pub const HUPCL: ::tcflag_t = 0o002000; -pub const CLOCAL: ::tcflag_t = 0o004000; -pub const CBAUDEX: ::tcflag_t = 0o010000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; -pub const CIBAUD: ::tcflag_t = 0o02003600000; +pub const CBAUD: crate::speed_t = 0o010017; +pub const CSIZE: crate::tcflag_t = 0o000060; +pub const CS6: crate::tcflag_t = 0o000020; +pub const CS7: crate::tcflag_t = 0o000040; +pub const CS8: crate::tcflag_t = 0o000060; +pub const CSTOPB: crate::tcflag_t = 0o000100; +pub const CREAD: crate::tcflag_t = 0o000200; +pub const PARENB: crate::tcflag_t = 0o000400; +pub const PARODD: crate::tcflag_t = 0o001000; +pub const HUPCL: crate::tcflag_t = 0o002000; +pub const CLOCAL: crate::tcflag_t = 0o004000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; -pub const ISIG: ::tcflag_t = 0o000001; -pub const ICANON: ::tcflag_t = 0o000002; -pub const XCASE: ::tcflag_t = 0o000004; -pub const ECHOE: ::tcflag_t = 0o000020; -pub const ECHOK: ::tcflag_t = 0o000040; -pub const ECHONL: ::tcflag_t = 0o000100; -pub const NOFLSH: ::tcflag_t = 0o000200; -pub const ECHOCTL: ::tcflag_t = 0o001000; -pub const ECHOPRT: ::tcflag_t = 0o002000; -pub const ECHOKE: ::tcflag_t = 0o004000; -pub const PENDIN: ::tcflag_t = 0o040000; +pub const ISIG: crate::tcflag_t = 0o000001; +pub const ICANON: crate::tcflag_t = 0o000002; +pub const XCASE: crate::tcflag_t = 0o000004; +pub const ECHOE: crate::tcflag_t = 0o000020; +pub const ECHOK: crate::tcflag_t = 0o000040; +pub const ECHONL: crate::tcflag_t = 0o000100; +pub const NOFLSH: crate::tcflag_t = 0o000200; +pub const ECHOCTL: crate::tcflag_t = 0o001000; +pub const ECHOPRT: crate::tcflag_t = 0o002000; +pub const ECHOKE: crate::tcflag_t = 0o004000; +pub const PENDIN: crate::tcflag_t = 0o040000; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; -pub const IXON: ::tcflag_t = 0o002000; -pub const IXOFF: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0o002000; +pub const IXOFF: crate::tcflag_t = 0o010000; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_restart_syscall: ::c_long = 7; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_umount: ::c_long = 22; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_alarm: ::c_long = 27; -pub const SYS_pause: ::c_long = 29; -pub const SYS_utime: ::c_long = 30; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_signal: ::c_long = 48; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_readdir: ::c_long = 89; -pub const SYS_mmap: ::c_long = 90; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_socketcall: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_lookup_dcookie: ::c_long = 110; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_idle: ::c_long = 112; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_ipc: ::c_long = 117; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_create_module: ::c_long = 127; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_get_kernel_syms: ::c_long = 130; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_afs_syscall: ::c_long = 137; /* Syscall for Andrew File System */ -pub const SYS_getdents: ::c_long = 141; -pub const SYS_select: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_query_module: ::c_long = 167; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_getpmsg: ::c_long = 188; -pub const SYS_putpmsg: ::c_long = 189; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_getrlimit: ::c_long = 191; -pub const SYS_lchown: ::c_long = 198; -pub const SYS_getuid: ::c_long = 199; -pub const SYS_getgid: ::c_long = 200; -pub const SYS_geteuid: ::c_long = 201; -pub const SYS_getegid: ::c_long = 202; -pub const SYS_setreuid: ::c_long = 203; -pub const SYS_setregid: ::c_long = 204; -pub const SYS_getgroups: ::c_long = 205; -pub const SYS_setgroups: ::c_long = 206; -pub const SYS_fchown: ::c_long = 207; -pub const SYS_setresuid: ::c_long = 208; -pub const SYS_getresuid: ::c_long = 209; -pub const SYS_setresgid: ::c_long = 210; -pub const SYS_getresgid: ::c_long = 211; -pub const SYS_chown: ::c_long = 212; -pub const SYS_setuid: ::c_long = 213; -pub const SYS_setgid: ::c_long = 214; -pub const SYS_setfsuid: ::c_long = 215; -pub const SYS_setfsgid: ::c_long = 216; -pub const SYS_pivot_root: ::c_long = 217; -pub const SYS_mincore: ::c_long = 218; -pub const SYS_madvise: ::c_long = 219; -pub const SYS_getdents64: ::c_long = 220; -pub const SYS_readahead: ::c_long = 222; -pub const SYS_setxattr: ::c_long = 224; -pub const SYS_lsetxattr: ::c_long = 225; -pub const SYS_fsetxattr: ::c_long = 226; -pub const SYS_getxattr: ::c_long = 227; -pub const SYS_lgetxattr: ::c_long = 228; -pub const SYS_fgetxattr: ::c_long = 229; -pub const SYS_listxattr: ::c_long = 230; -pub const SYS_llistxattr: ::c_long = 231; -pub const SYS_flistxattr: ::c_long = 232; -pub const SYS_removexattr: ::c_long = 233; -pub const SYS_lremovexattr: ::c_long = 234; -pub const SYS_fremovexattr: ::c_long = 235; -pub const SYS_gettid: ::c_long = 236; -pub const SYS_tkill: ::c_long = 237; -pub const SYS_futex: ::c_long = 238; -pub const SYS_sched_setaffinity: ::c_long = 239; -pub const SYS_sched_getaffinity: ::c_long = 240; -pub const SYS_tgkill: ::c_long = 241; -pub const SYS_io_setup: ::c_long = 243; -pub const SYS_io_destroy: ::c_long = 244; -pub const SYS_io_getevents: ::c_long = 245; -pub const SYS_io_submit: ::c_long = 246; -pub const SYS_io_cancel: ::c_long = 247; -pub const SYS_exit_group: ::c_long = 248; -pub const SYS_epoll_create: ::c_long = 249; -pub const SYS_epoll_ctl: ::c_long = 250; -pub const SYS_epoll_wait: ::c_long = 251; -pub const SYS_set_tid_address: ::c_long = 252; -pub const SYS_fadvise64: ::c_long = 253; -pub const SYS_timer_create: ::c_long = 254; -pub const SYS_timer_settime: ::c_long = 255; -pub const SYS_timer_gettime: ::c_long = 256; -pub const SYS_timer_getoverrun: ::c_long = 257; -pub const SYS_timer_delete: ::c_long = 258; -pub const SYS_clock_settime: ::c_long = 259; -pub const SYS_clock_gettime: ::c_long = 260; -pub const SYS_clock_getres: ::c_long = 261; -pub const SYS_clock_nanosleep: ::c_long = 262; -pub const SYS_statfs64: ::c_long = 265; -pub const SYS_fstatfs64: ::c_long = 266; -pub const SYS_remap_file_pages: ::c_long = 267; -pub const SYS_mbind: ::c_long = 268; -pub const SYS_get_mempolicy: ::c_long = 269; -pub const SYS_set_mempolicy: ::c_long = 270; -pub const SYS_mq_open: ::c_long = 271; -pub const SYS_mq_unlink: ::c_long = 272; -pub const SYS_mq_timedsend: ::c_long = 273; -pub const SYS_mq_timedreceive: ::c_long = 274; -pub const SYS_mq_notify: ::c_long = 275; -pub const SYS_mq_getsetattr: ::c_long = 276; -pub const SYS_kexec_load: ::c_long = 277; -pub const SYS_add_key: ::c_long = 278; -pub const SYS_request_key: ::c_long = 279; -pub const SYS_keyctl: ::c_long = 280; -pub const SYS_waitid: ::c_long = 281; -pub const SYS_ioprio_set: ::c_long = 282; -pub const SYS_ioprio_get: ::c_long = 283; -pub const SYS_inotify_init: ::c_long = 284; -pub const SYS_inotify_add_watch: ::c_long = 285; -pub const SYS_inotify_rm_watch: ::c_long = 286; -pub const SYS_migrate_pages: ::c_long = 287; -pub const SYS_openat: ::c_long = 288; -pub const SYS_mkdirat: ::c_long = 289; -pub const SYS_mknodat: ::c_long = 290; -pub const SYS_fchownat: ::c_long = 291; -pub const SYS_futimesat: ::c_long = 292; -pub const SYS_newfstatat: ::c_long = 293; -pub const SYS_unlinkat: ::c_long = 294; -pub const SYS_renameat: ::c_long = 295; -pub const SYS_linkat: ::c_long = 296; -pub const SYS_symlinkat: ::c_long = 297; -pub const SYS_readlinkat: ::c_long = 298; -pub const SYS_fchmodat: ::c_long = 299; -pub const SYS_faccessat: ::c_long = 300; -pub const SYS_pselect6: ::c_long = 301; -pub const SYS_ppoll: ::c_long = 302; -pub const SYS_unshare: ::c_long = 303; -pub const SYS_set_robust_list: ::c_long = 304; -pub const SYS_get_robust_list: ::c_long = 305; -pub const SYS_splice: ::c_long = 306; -pub const SYS_sync_file_range: ::c_long = 307; -pub const SYS_tee: ::c_long = 308; -pub const SYS_vmsplice: ::c_long = 309; -pub const SYS_move_pages: ::c_long = 310; -pub const SYS_getcpu: ::c_long = 311; -pub const SYS_epoll_pwait: ::c_long = 312; -pub const SYS_utimes: ::c_long = 313; -pub const SYS_fallocate: ::c_long = 314; -pub const SYS_utimensat: ::c_long = 315; -pub const SYS_signalfd: ::c_long = 316; -pub const SYS_timerfd: ::c_long = 317; -pub const SYS_eventfd: ::c_long = 318; -pub const SYS_timerfd_create: ::c_long = 319; -pub const SYS_timerfd_settime: ::c_long = 320; -pub const SYS_timerfd_gettime: ::c_long = 321; -pub const SYS_signalfd4: ::c_long = 322; -pub const SYS_eventfd2: ::c_long = 323; -pub const SYS_inotify_init1: ::c_long = 324; -pub const SYS_pipe2: ::c_long = 325; -pub const SYS_dup3: ::c_long = 326; -pub const SYS_epoll_create1: ::c_long = 327; -pub const SYS_preadv: ::c_long = 328; -pub const SYS_pwritev: ::c_long = 329; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 330; -pub const SYS_perf_event_open: ::c_long = 331; -pub const SYS_fanotify_init: ::c_long = 332; -pub const SYS_fanotify_mark: ::c_long = 333; -pub const SYS_prlimit64: ::c_long = 334; -pub const SYS_name_to_handle_at: ::c_long = 335; -pub const SYS_open_by_handle_at: ::c_long = 336; -pub const SYS_clock_adjtime: ::c_long = 337; -pub const SYS_syncfs: ::c_long = 338; -pub const SYS_setns: ::c_long = 339; -pub const SYS_process_vm_readv: ::c_long = 340; -pub const SYS_process_vm_writev: ::c_long = 341; -pub const SYS_s390_runtime_instr: ::c_long = 342; -pub const SYS_kcmp: ::c_long = 343; -pub const SYS_finit_module: ::c_long = 344; -pub const SYS_sched_setattr: ::c_long = 345; -pub const SYS_sched_getattr: ::c_long = 346; -pub const SYS_renameat2: ::c_long = 347; -pub const SYS_seccomp: ::c_long = 348; -pub const SYS_getrandom: ::c_long = 349; -pub const SYS_memfd_create: ::c_long = 350; -pub const SYS_bpf: ::c_long = 351; -pub const SYS_s390_pci_mmio_write: ::c_long = 352; -pub const SYS_s390_pci_mmio_read: ::c_long = 353; -pub const SYS_execveat: ::c_long = 354; -pub const SYS_userfaultfd: ::c_long = 355; -pub const SYS_membarrier: ::c_long = 356; -pub const SYS_recvmmsg: ::c_long = 357; -pub const SYS_sendmmsg: ::c_long = 358; -pub const SYS_socket: ::c_long = 359; -pub const SYS_socketpair: ::c_long = 360; -pub const SYS_bind: ::c_long = 361; -pub const SYS_connect: ::c_long = 362; -pub const SYS_listen: ::c_long = 363; -pub const SYS_accept4: ::c_long = 364; -pub const SYS_getsockopt: ::c_long = 365; -pub const SYS_setsockopt: ::c_long = 366; -pub const SYS_getsockname: ::c_long = 367; -pub const SYS_getpeername: ::c_long = 368; -pub const SYS_sendto: ::c_long = 369; -pub const SYS_sendmsg: ::c_long = 370; -pub const SYS_recvfrom: ::c_long = 371; -pub const SYS_recvmsg: ::c_long = 372; -pub const SYS_shutdown: ::c_long = 373; -pub const SYS_mlock2: ::c_long = 374; -pub const SYS_copy_file_range: ::c_long = 375; -pub const SYS_preadv2: ::c_long = 376; -pub const SYS_pwritev2: ::c_long = 377; -pub const SYS_s390_guarded_storage: ::c_long = 378; -pub const SYS_statx: ::c_long = 379; -pub const SYS_s390_sthyi: ::c_long = 380; -pub const SYS_kexec_file_load: ::c_long = 381; -pub const SYS_io_pgetevents: ::c_long = 382; -pub const SYS_rseq: ::c_long = 383; -pub const SYS_pkey_mprotect: ::c_long = 384; -pub const SYS_pkey_alloc: ::c_long = 385; -pub const SYS_pkey_free: ::c_long = 386; -pub const SYS_semtimedop: ::c_long = 392; -pub const SYS_semget: ::c_long = 393; -pub const SYS_semctl: ::c_long = 394; -pub const SYS_shmget: ::c_long = 395; -pub const SYS_shmctl: ::c_long = 396; -pub const SYS_shmat: ::c_long = 397; -pub const SYS_shmdt: ::c_long = 398; -pub const SYS_msgget: ::c_long = 399; -pub const SYS_msgsnd: ::c_long = 400; -pub const SYS_msgrcv: ::c_long = 401; -pub const SYS_msgctl: ::c_long = 402; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_cachestat: ::c_long = 451; -pub const SYS_fchmodat2: ::c_long = 452; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_restart_syscall: c_long = 7; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_umount: c_long = 22; +pub const SYS_ptrace: c_long = 26; +pub const SYS_alarm: c_long = 27; +pub const SYS_pause: c_long = 29; +pub const SYS_utime: c_long = 30; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_signal: c_long = 48; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_symlink: c_long = 83; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_readdir: c_long = 89; +pub const SYS_mmap: c_long = 90; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_socketcall: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_lookup_dcookie: c_long = 110; +pub const SYS_vhangup: c_long = 111; +pub const SYS_idle: c_long = 112; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_ipc: c_long = 117; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_create_module: c_long = 127; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_get_kernel_syms: c_long = 130; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_afs_syscall: c_long = 137; /* Syscall for Andrew File System */ +pub const SYS_getdents: c_long = 141; +pub const SYS_select: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_query_module: c_long = 167; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_getpmsg: c_long = 188; +pub const SYS_putpmsg: c_long = 189; +pub const SYS_vfork: c_long = 190; +pub const SYS_getrlimit: c_long = 191; +pub const SYS_lchown: c_long = 198; +pub const SYS_getuid: c_long = 199; +pub const SYS_getgid: c_long = 200; +pub const SYS_geteuid: c_long = 201; +pub const SYS_getegid: c_long = 202; +pub const SYS_setreuid: c_long = 203; +pub const SYS_setregid: c_long = 204; +pub const SYS_getgroups: c_long = 205; +pub const SYS_setgroups: c_long = 206; +pub const SYS_fchown: c_long = 207; +pub const SYS_setresuid: c_long = 208; +pub const SYS_getresuid: c_long = 209; +pub const SYS_setresgid: c_long = 210; +pub const SYS_getresgid: c_long = 211; +pub const SYS_chown: c_long = 212; +pub const SYS_setuid: c_long = 213; +pub const SYS_setgid: c_long = 214; +pub const SYS_setfsuid: c_long = 215; +pub const SYS_setfsgid: c_long = 216; +pub const SYS_pivot_root: c_long = 217; +pub const SYS_mincore: c_long = 218; +pub const SYS_madvise: c_long = 219; +pub const SYS_getdents64: c_long = 220; +pub const SYS_readahead: c_long = 222; +pub const SYS_setxattr: c_long = 224; +pub const SYS_lsetxattr: c_long = 225; +pub const SYS_fsetxattr: c_long = 226; +pub const SYS_getxattr: c_long = 227; +pub const SYS_lgetxattr: c_long = 228; +pub const SYS_fgetxattr: c_long = 229; +pub const SYS_listxattr: c_long = 230; +pub const SYS_llistxattr: c_long = 231; +pub const SYS_flistxattr: c_long = 232; +pub const SYS_removexattr: c_long = 233; +pub const SYS_lremovexattr: c_long = 234; +pub const SYS_fremovexattr: c_long = 235; +pub const SYS_gettid: c_long = 236; +pub const SYS_tkill: c_long = 237; +pub const SYS_futex: c_long = 238; +pub const SYS_sched_setaffinity: c_long = 239; +pub const SYS_sched_getaffinity: c_long = 240; +pub const SYS_tgkill: c_long = 241; +pub const SYS_io_setup: c_long = 243; +pub const SYS_io_destroy: c_long = 244; +pub const SYS_io_getevents: c_long = 245; +pub const SYS_io_submit: c_long = 246; +pub const SYS_io_cancel: c_long = 247; +pub const SYS_exit_group: c_long = 248; +pub const SYS_epoll_create: c_long = 249; +pub const SYS_epoll_ctl: c_long = 250; +pub const SYS_epoll_wait: c_long = 251; +pub const SYS_set_tid_address: c_long = 252; +pub const SYS_fadvise64: c_long = 253; +pub const SYS_timer_create: c_long = 254; +pub const SYS_timer_settime: c_long = 255; +pub const SYS_timer_gettime: c_long = 256; +pub const SYS_timer_getoverrun: c_long = 257; +pub const SYS_timer_delete: c_long = 258; +pub const SYS_clock_settime: c_long = 259; +pub const SYS_clock_gettime: c_long = 260; +pub const SYS_clock_getres: c_long = 261; +pub const SYS_clock_nanosleep: c_long = 262; +pub const SYS_statfs64: c_long = 265; +pub const SYS_fstatfs64: c_long = 266; +pub const SYS_remap_file_pages: c_long = 267; +pub const SYS_mbind: c_long = 268; +pub const SYS_get_mempolicy: c_long = 269; +pub const SYS_set_mempolicy: c_long = 270; +pub const SYS_mq_open: c_long = 271; +pub const SYS_mq_unlink: c_long = 272; +pub const SYS_mq_timedsend: c_long = 273; +pub const SYS_mq_timedreceive: c_long = 274; +pub const SYS_mq_notify: c_long = 275; +pub const SYS_mq_getsetattr: c_long = 276; +pub const SYS_kexec_load: c_long = 277; +pub const SYS_add_key: c_long = 278; +pub const SYS_request_key: c_long = 279; +pub const SYS_keyctl: c_long = 280; +pub const SYS_waitid: c_long = 281; +pub const SYS_ioprio_set: c_long = 282; +pub const SYS_ioprio_get: c_long = 283; +pub const SYS_inotify_init: c_long = 284; +pub const SYS_inotify_add_watch: c_long = 285; +pub const SYS_inotify_rm_watch: c_long = 286; +pub const SYS_migrate_pages: c_long = 287; +pub const SYS_openat: c_long = 288; +pub const SYS_mkdirat: c_long = 289; +pub const SYS_mknodat: c_long = 290; +pub const SYS_fchownat: c_long = 291; +pub const SYS_futimesat: c_long = 292; +pub const SYS_newfstatat: c_long = 293; +pub const SYS_unlinkat: c_long = 294; +pub const SYS_renameat: c_long = 295; +pub const SYS_linkat: c_long = 296; +pub const SYS_symlinkat: c_long = 297; +pub const SYS_readlinkat: c_long = 298; +pub const SYS_fchmodat: c_long = 299; +pub const SYS_faccessat: c_long = 300; +pub const SYS_pselect6: c_long = 301; +pub const SYS_ppoll: c_long = 302; +pub const SYS_unshare: c_long = 303; +pub const SYS_set_robust_list: c_long = 304; +pub const SYS_get_robust_list: c_long = 305; +pub const SYS_splice: c_long = 306; +pub const SYS_sync_file_range: c_long = 307; +pub const SYS_tee: c_long = 308; +pub const SYS_vmsplice: c_long = 309; +pub const SYS_move_pages: c_long = 310; +pub const SYS_getcpu: c_long = 311; +pub const SYS_epoll_pwait: c_long = 312; +pub const SYS_utimes: c_long = 313; +pub const SYS_fallocate: c_long = 314; +pub const SYS_utimensat: c_long = 315; +pub const SYS_signalfd: c_long = 316; +pub const SYS_timerfd: c_long = 317; +pub const SYS_eventfd: c_long = 318; +pub const SYS_timerfd_create: c_long = 319; +pub const SYS_timerfd_settime: c_long = 320; +pub const SYS_timerfd_gettime: c_long = 321; +pub const SYS_signalfd4: c_long = 322; +pub const SYS_eventfd2: c_long = 323; +pub const SYS_inotify_init1: c_long = 324; +pub const SYS_pipe2: c_long = 325; +pub const SYS_dup3: c_long = 326; +pub const SYS_epoll_create1: c_long = 327; +pub const SYS_preadv: c_long = 328; +pub const SYS_pwritev: c_long = 329; +pub const SYS_rt_tgsigqueueinfo: c_long = 330; +pub const SYS_perf_event_open: c_long = 331; +pub const SYS_fanotify_init: c_long = 332; +pub const SYS_fanotify_mark: c_long = 333; +pub const SYS_prlimit64: c_long = 334; +pub const SYS_name_to_handle_at: c_long = 335; +pub const SYS_open_by_handle_at: c_long = 336; +pub const SYS_clock_adjtime: c_long = 337; +pub const SYS_syncfs: c_long = 338; +pub const SYS_setns: c_long = 339; +pub const SYS_process_vm_readv: c_long = 340; +pub const SYS_process_vm_writev: c_long = 341; +pub const SYS_s390_runtime_instr: c_long = 342; +pub const SYS_kcmp: c_long = 343; +pub const SYS_finit_module: c_long = 344; +pub const SYS_sched_setattr: c_long = 345; +pub const SYS_sched_getattr: c_long = 346; +pub const SYS_renameat2: c_long = 347; +pub const SYS_seccomp: c_long = 348; +pub const SYS_getrandom: c_long = 349; +pub const SYS_memfd_create: c_long = 350; +pub const SYS_bpf: c_long = 351; +pub const SYS_s390_pci_mmio_write: c_long = 352; +pub const SYS_s390_pci_mmio_read: c_long = 353; +pub const SYS_execveat: c_long = 354; +pub const SYS_userfaultfd: c_long = 355; +pub const SYS_membarrier: c_long = 356; +pub const SYS_recvmmsg: c_long = 357; +pub const SYS_sendmmsg: c_long = 358; +pub const SYS_socket: c_long = 359; +pub const SYS_socketpair: c_long = 360; +pub const SYS_bind: c_long = 361; +pub const SYS_connect: c_long = 362; +pub const SYS_listen: c_long = 363; +pub const SYS_accept4: c_long = 364; +pub const SYS_getsockopt: c_long = 365; +pub const SYS_setsockopt: c_long = 366; +pub const SYS_getsockname: c_long = 367; +pub const SYS_getpeername: c_long = 368; +pub const SYS_sendto: c_long = 369; +pub const SYS_sendmsg: c_long = 370; +pub const SYS_recvfrom: c_long = 371; +pub const SYS_recvmsg: c_long = 372; +pub const SYS_shutdown: c_long = 373; +pub const SYS_mlock2: c_long = 374; +pub const SYS_copy_file_range: c_long = 375; +pub const SYS_preadv2: c_long = 376; +pub const SYS_pwritev2: c_long = 377; +pub const SYS_s390_guarded_storage: c_long = 378; +pub const SYS_statx: c_long = 379; +pub const SYS_s390_sthyi: c_long = 380; +pub const SYS_kexec_file_load: c_long = 381; +pub const SYS_io_pgetevents: c_long = 382; +pub const SYS_rseq: c_long = 383; +pub const SYS_pkey_mprotect: c_long = 384; +pub const SYS_pkey_alloc: c_long = 385; +pub const SYS_pkey_free: c_long = 386; +pub const SYS_semtimedop: c_long = 392; +pub const SYS_semget: c_long = 393; +pub const SYS_semctl: c_long = 394; +pub const SYS_shmget: c_long = 395; +pub const SYS_shmctl: c_long = 396; +pub const SYS_shmat: c_long = 397; +pub const SYS_shmdt: c_long = 398; +pub const SYS_msgget: c_long = 399; +pub const SYS_msgsnd: c_long = 400; +pub const SYS_msgrcv: c_long = 401; +pub const SYS_msgctl: c_long = 402; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_cachestat: c_long = 451; +pub const SYS_fchmodat2: c_long = 452; diff --git a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs index d3bb14d4929c3..62ce8aadc7443 100644 --- a/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/x86_64/mod.rs @@ -1,104 +1,108 @@ +use crate::{ + c_int, c_long, c_longlong, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, off_t, size_t, +}; + pub type c_char = i8; pub type wchar_t = i32; pub type nlink_t = u64; -pub type blksize_t = ::c_long; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type blksize_t = c_long; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; pub type greg_t = i64; s! { pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused: [c_long; 3], } pub struct stat64 { - pub st_dev: ::dev_t, - pub st_ino: ::ino64_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - __pad0: ::c_int, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __reserved: [::c_long; 3], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino64_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + __pad0: c_int, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __reserved: [c_long; 3], } pub struct user_regs_struct { - pub r15: ::c_ulong, - pub r14: ::c_ulong, - pub r13: ::c_ulong, - pub r12: ::c_ulong, - pub rbp: ::c_ulong, - pub rbx: ::c_ulong, - pub r11: ::c_ulong, - pub r10: ::c_ulong, - pub r9: ::c_ulong, - pub r8: ::c_ulong, - pub rax: ::c_ulong, - pub rcx: ::c_ulong, - pub rdx: ::c_ulong, - pub rsi: ::c_ulong, - pub rdi: ::c_ulong, - pub orig_rax: ::c_ulong, - pub rip: ::c_ulong, - pub cs: ::c_ulong, - pub eflags: ::c_ulong, - pub rsp: ::c_ulong, - pub ss: ::c_ulong, - pub fs_base: ::c_ulong, - pub gs_base: ::c_ulong, - pub ds: ::c_ulong, - pub es: ::c_ulong, - pub fs: ::c_ulong, - pub gs: ::c_ulong, + pub r15: c_ulong, + pub r14: c_ulong, + pub r13: c_ulong, + pub r12: c_ulong, + pub rbp: c_ulong, + pub rbx: c_ulong, + pub r11: c_ulong, + pub r10: c_ulong, + pub r9: c_ulong, + pub r8: c_ulong, + pub rax: c_ulong, + pub rcx: c_ulong, + pub rdx: c_ulong, + pub rsi: c_ulong, + pub rdi: c_ulong, + pub orig_rax: c_ulong, + pub rip: c_ulong, + pub cs: c_ulong, + pub eflags: c_ulong, + pub rsp: c_ulong, + pub ss: c_ulong, + pub fs_base: c_ulong, + pub gs_base: c_ulong, + pub ds: c_ulong, + pub es: c_ulong, + pub fs: c_ulong, + pub gs: c_ulong, } pub struct user { pub regs: user_regs_struct, - pub u_fpvalid: ::c_int, + pub u_fpvalid: c_int, pub i387: user_fpregs_struct, - pub u_tsize: ::c_ulong, - pub u_dsize: ::c_ulong, - pub u_ssize: ::c_ulong, - pub start_code: ::c_ulong, - pub start_stack: ::c_ulong, - pub signal: ::c_long, - __reserved: ::c_int, + pub u_tsize: c_ulong, + pub u_dsize: c_ulong, + pub u_ssize: c_ulong, + pub start_code: c_ulong, + pub start_stack: c_ulong, + pub signal: c_long, + __reserved: c_int, #[cfg(target_pointer_width = "32")] __pad1: u32, pub u_ar0: *mut user_regs_struct, #[cfg(target_pointer_width = "32")] __pad2: u32, pub u_fpstate: *mut user_fpregs_struct, - pub magic: ::c_ulong, - pub u_comm: [::c_char; 32], - pub u_debugreg: [::c_ulong; 8], + pub magic: c_ulong, + pub u_comm: [c_char; 32], + pub u_debugreg: [c_ulong; 8], } // GitHub repo: ifduyue/musl/ @@ -110,54 +114,54 @@ s! { } pub struct ipc_perm { - pub __ipc_perm_key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub __seq: ::c_int, - __unused1: ::c_long, - __unused2: ::c_long, + pub __ipc_perm_key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub __seq: c_int, + __unused1: c_long, + __unused2: c_long, } #[repr(align(8))] pub struct clone_args { - pub flags: ::c_ulonglong, - pub pidfd: ::c_ulonglong, - pub child_tid: ::c_ulonglong, - pub parent_tid: ::c_ulonglong, - pub exit_signal: ::c_ulonglong, - pub stack: ::c_ulonglong, - pub stack_size: ::c_ulonglong, - pub tls: ::c_ulonglong, - pub set_tid: ::c_ulonglong, - pub set_tid_size: ::c_ulonglong, - pub cgroup: ::c_ulonglong, + pub flags: c_ulonglong, + pub pidfd: c_ulonglong, + pub child_tid: c_ulonglong, + pub parent_tid: c_ulonglong, + pub exit_signal: c_ulonglong, + pub stack: c_ulonglong, + pub stack_size: c_ulonglong, + pub tls: c_ulonglong, + pub set_tid: c_ulonglong, + pub set_tid_size: c_ulonglong, + pub cgroup: c_ulonglong, } } s_no_extra_traits! { pub struct user_fpregs_struct { - pub cwd: ::c_ushort, - pub swd: ::c_ushort, - pub ftw: ::c_ushort, - pub fop: ::c_ushort, - pub rip: ::c_ulong, - pub rdp: ::c_ulong, - pub mxcsr: ::c_uint, - pub mxcr_mask: ::c_uint, - pub st_space: [::c_uint; 32], - pub xmm_space: [::c_uint; 64], - padding: [::c_uint; 24], + pub cwd: c_ushort, + pub swd: c_ushort, + pub ftw: c_ushort, + pub fop: c_ushort, + pub rip: c_ulong, + pub rdp: c_ulong, + pub mxcsr: c_uint, + pub mxcr_mask: c_uint, + pub st_space: [c_uint; 32], + pub xmm_space: [c_uint; 64], + padding: [c_uint; 24], } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_stack: ::stack_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, __private: [u8; 512], } @@ -192,8 +196,8 @@ cfg_if! { impl Eq for user_fpregs_struct {} - impl ::fmt::Debug for user_fpregs_struct { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for user_fpregs_struct { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("user_fpregs_struct") .field("cwd", &self.cwd) .field("ftw", &self.ftw) @@ -209,8 +213,8 @@ cfg_if! { } } - impl ::hash::Hash for user_fpregs_struct { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for user_fpregs_struct { + fn hash(&self, state: &mut H) { self.cwd.hash(state); self.ftw.hash(state); self.fop.hash(state); @@ -241,8 +245,8 @@ cfg_if! { impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -254,8 +258,8 @@ cfg_if! { } } - impl ::hash::Hash for ucontext_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for ucontext_t { + fn hash(&self, state: &mut H) { self.uc_flags.hash(state); self.uc_link.hash(state); self.uc_stack.hash(state); @@ -269,601 +273,601 @@ cfg_if! { // Syscall table -pub const SYS_read: ::c_long = 0; -pub const SYS_write: ::c_long = 1; -pub const SYS_open: ::c_long = 2; -pub const SYS_close: ::c_long = 3; -pub const SYS_stat: ::c_long = 4; -pub const SYS_fstat: ::c_long = 5; -pub const SYS_lstat: ::c_long = 6; -pub const SYS_poll: ::c_long = 7; -pub const SYS_lseek: ::c_long = 8; -pub const SYS_mmap: ::c_long = 9; -pub const SYS_mprotect: ::c_long = 10; -pub const SYS_munmap: ::c_long = 11; -pub const SYS_brk: ::c_long = 12; -pub const SYS_rt_sigaction: ::c_long = 13; -pub const SYS_rt_sigprocmask: ::c_long = 14; -pub const SYS_rt_sigreturn: ::c_long = 15; -pub const SYS_ioctl: ::c_long = 16; -pub const SYS_pread64: ::c_long = 17; -pub const SYS_pwrite64: ::c_long = 18; -pub const SYS_readv: ::c_long = 19; -pub const SYS_writev: ::c_long = 20; -pub const SYS_access: ::c_long = 21; -pub const SYS_pipe: ::c_long = 22; -pub const SYS_select: ::c_long = 23; -pub const SYS_sched_yield: ::c_long = 24; -pub const SYS_mremap: ::c_long = 25; -pub const SYS_msync: ::c_long = 26; -pub const SYS_mincore: ::c_long = 27; -pub const SYS_madvise: ::c_long = 28; -pub const SYS_shmget: ::c_long = 29; -pub const SYS_shmat: ::c_long = 30; -pub const SYS_shmctl: ::c_long = 31; -pub const SYS_dup: ::c_long = 32; -pub const SYS_dup2: ::c_long = 33; -pub const SYS_pause: ::c_long = 34; -pub const SYS_nanosleep: ::c_long = 35; -pub const SYS_getitimer: ::c_long = 36; -pub const SYS_alarm: ::c_long = 37; -pub const SYS_setitimer: ::c_long = 38; -pub const SYS_getpid: ::c_long = 39; -pub const SYS_sendfile: ::c_long = 40; -pub const SYS_socket: ::c_long = 41; -pub const SYS_connect: ::c_long = 42; -pub const SYS_accept: ::c_long = 43; -pub const SYS_sendto: ::c_long = 44; -pub const SYS_recvfrom: ::c_long = 45; -pub const SYS_sendmsg: ::c_long = 46; -pub const SYS_recvmsg: ::c_long = 47; -pub const SYS_shutdown: ::c_long = 48; -pub const SYS_bind: ::c_long = 49; -pub const SYS_listen: ::c_long = 50; -pub const SYS_getsockname: ::c_long = 51; -pub const SYS_getpeername: ::c_long = 52; -pub const SYS_socketpair: ::c_long = 53; -pub const SYS_setsockopt: ::c_long = 54; -pub const SYS_getsockopt: ::c_long = 55; -pub const SYS_clone: ::c_long = 56; -pub const SYS_fork: ::c_long = 57; -pub const SYS_vfork: ::c_long = 58; -pub const SYS_execve: ::c_long = 59; -pub const SYS_exit: ::c_long = 60; -pub const SYS_wait4: ::c_long = 61; -pub const SYS_kill: ::c_long = 62; -pub const SYS_uname: ::c_long = 63; -pub const SYS_semget: ::c_long = 64; -pub const SYS_semop: ::c_long = 65; -pub const SYS_semctl: ::c_long = 66; -pub const SYS_shmdt: ::c_long = 67; -pub const SYS_msgget: ::c_long = 68; -pub const SYS_msgsnd: ::c_long = 69; -pub const SYS_msgrcv: ::c_long = 70; -pub const SYS_msgctl: ::c_long = 71; -pub const SYS_fcntl: ::c_long = 72; -pub const SYS_flock: ::c_long = 73; -pub const SYS_fsync: ::c_long = 74; -pub const SYS_fdatasync: ::c_long = 75; -pub const SYS_truncate: ::c_long = 76; -pub const SYS_ftruncate: ::c_long = 77; -pub const SYS_getdents: ::c_long = 78; -pub const SYS_getcwd: ::c_long = 79; -pub const SYS_chdir: ::c_long = 80; -pub const SYS_fchdir: ::c_long = 81; -pub const SYS_rename: ::c_long = 82; -pub const SYS_mkdir: ::c_long = 83; -pub const SYS_rmdir: ::c_long = 84; -pub const SYS_creat: ::c_long = 85; -pub const SYS_link: ::c_long = 86; -pub const SYS_unlink: ::c_long = 87; -pub const SYS_symlink: ::c_long = 88; -pub const SYS_readlink: ::c_long = 89; -pub const SYS_chmod: ::c_long = 90; -pub const SYS_fchmod: ::c_long = 91; -pub const SYS_chown: ::c_long = 92; -pub const SYS_fchown: ::c_long = 93; -pub const SYS_lchown: ::c_long = 94; -pub const SYS_umask: ::c_long = 95; -pub const SYS_gettimeofday: ::c_long = 96; -pub const SYS_getrlimit: ::c_long = 97; -pub const SYS_getrusage: ::c_long = 98; -pub const SYS_sysinfo: ::c_long = 99; -pub const SYS_times: ::c_long = 100; -pub const SYS_ptrace: ::c_long = 101; -pub const SYS_getuid: ::c_long = 102; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_getgid: ::c_long = 104; -pub const SYS_setuid: ::c_long = 105; -pub const SYS_setgid: ::c_long = 106; -pub const SYS_geteuid: ::c_long = 107; -pub const SYS_getegid: ::c_long = 108; -pub const SYS_setpgid: ::c_long = 109; -pub const SYS_getppid: ::c_long = 110; -pub const SYS_getpgrp: ::c_long = 111; -pub const SYS_setsid: ::c_long = 112; -pub const SYS_setreuid: ::c_long = 113; -pub const SYS_setregid: ::c_long = 114; -pub const SYS_getgroups: ::c_long = 115; -pub const SYS_setgroups: ::c_long = 116; -pub const SYS_setresuid: ::c_long = 117; -pub const SYS_getresuid: ::c_long = 118; -pub const SYS_setresgid: ::c_long = 119; -pub const SYS_getresgid: ::c_long = 120; -pub const SYS_getpgid: ::c_long = 121; -pub const SYS_setfsuid: ::c_long = 122; -pub const SYS_setfsgid: ::c_long = 123; -pub const SYS_getsid: ::c_long = 124; -pub const SYS_capget: ::c_long = 125; -pub const SYS_capset: ::c_long = 126; -pub const SYS_rt_sigpending: ::c_long = 127; -pub const SYS_rt_sigtimedwait: ::c_long = 128; -pub const SYS_rt_sigqueueinfo: ::c_long = 129; -pub const SYS_rt_sigsuspend: ::c_long = 130; -pub const SYS_sigaltstack: ::c_long = 131; -pub const SYS_utime: ::c_long = 132; -pub const SYS_mknod: ::c_long = 133; -pub const SYS_uselib: ::c_long = 134; -pub const SYS_personality: ::c_long = 135; -pub const SYS_ustat: ::c_long = 136; -pub const SYS_statfs: ::c_long = 137; -pub const SYS_fstatfs: ::c_long = 138; -pub const SYS_sysfs: ::c_long = 139; -pub const SYS_getpriority: ::c_long = 140; -pub const SYS_setpriority: ::c_long = 141; -pub const SYS_sched_setparam: ::c_long = 142; -pub const SYS_sched_getparam: ::c_long = 143; -pub const SYS_sched_setscheduler: ::c_long = 144; -pub const SYS_sched_getscheduler: ::c_long = 145; -pub const SYS_sched_get_priority_max: ::c_long = 146; -pub const SYS_sched_get_priority_min: ::c_long = 147; -pub const SYS_sched_rr_get_interval: ::c_long = 148; -pub const SYS_mlock: ::c_long = 149; -pub const SYS_munlock: ::c_long = 150; -pub const SYS_mlockall: ::c_long = 151; -pub const SYS_munlockall: ::c_long = 152; -pub const SYS_vhangup: ::c_long = 153; -pub const SYS_modify_ldt: ::c_long = 154; -pub const SYS_pivot_root: ::c_long = 155; -pub const SYS__sysctl: ::c_long = 156; -pub const SYS_prctl: ::c_long = 157; -pub const SYS_arch_prctl: ::c_long = 158; -pub const SYS_adjtimex: ::c_long = 159; -pub const SYS_setrlimit: ::c_long = 160; -pub const SYS_chroot: ::c_long = 161; -pub const SYS_sync: ::c_long = 162; -pub const SYS_acct: ::c_long = 163; -pub const SYS_settimeofday: ::c_long = 164; -pub const SYS_mount: ::c_long = 165; -pub const SYS_umount2: ::c_long = 166; -pub const SYS_swapon: ::c_long = 167; -pub const SYS_swapoff: ::c_long = 168; -pub const SYS_reboot: ::c_long = 169; -pub const SYS_sethostname: ::c_long = 170; -pub const SYS_setdomainname: ::c_long = 171; -pub const SYS_iopl: ::c_long = 172; -pub const SYS_ioperm: ::c_long = 173; -pub const SYS_create_module: ::c_long = 174; -pub const SYS_init_module: ::c_long = 175; -pub const SYS_delete_module: ::c_long = 176; -pub const SYS_get_kernel_syms: ::c_long = 177; -pub const SYS_query_module: ::c_long = 178; -pub const SYS_quotactl: ::c_long = 179; -pub const SYS_nfsservctl: ::c_long = 180; -pub const SYS_getpmsg: ::c_long = 181; -pub const SYS_putpmsg: ::c_long = 182; -pub const SYS_afs_syscall: ::c_long = 183; -pub const SYS_tuxcall: ::c_long = 184; -pub const SYS_security: ::c_long = 185; -pub const SYS_gettid: ::c_long = 186; -pub const SYS_readahead: ::c_long = 187; -pub const SYS_setxattr: ::c_long = 188; -pub const SYS_lsetxattr: ::c_long = 189; -pub const SYS_fsetxattr: ::c_long = 190; -pub const SYS_getxattr: ::c_long = 191; -pub const SYS_lgetxattr: ::c_long = 192; -pub const SYS_fgetxattr: ::c_long = 193; -pub const SYS_listxattr: ::c_long = 194; -pub const SYS_llistxattr: ::c_long = 195; -pub const SYS_flistxattr: ::c_long = 196; -pub const SYS_removexattr: ::c_long = 197; -pub const SYS_lremovexattr: ::c_long = 198; -pub const SYS_fremovexattr: ::c_long = 199; -pub const SYS_tkill: ::c_long = 200; -pub const SYS_time: ::c_long = 201; -pub const SYS_futex: ::c_long = 202; -pub const SYS_sched_setaffinity: ::c_long = 203; -pub const SYS_sched_getaffinity: ::c_long = 204; -pub const SYS_set_thread_area: ::c_long = 205; -pub const SYS_io_setup: ::c_long = 206; -pub const SYS_io_destroy: ::c_long = 207; -pub const SYS_io_getevents: ::c_long = 208; -pub const SYS_io_submit: ::c_long = 209; -pub const SYS_io_cancel: ::c_long = 210; -pub const SYS_get_thread_area: ::c_long = 211; -pub const SYS_lookup_dcookie: ::c_long = 212; -pub const SYS_epoll_create: ::c_long = 213; -pub const SYS_epoll_ctl_old: ::c_long = 214; -pub const SYS_epoll_wait_old: ::c_long = 215; -pub const SYS_remap_file_pages: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_set_tid_address: ::c_long = 218; -pub const SYS_restart_syscall: ::c_long = 219; -pub const SYS_semtimedop: ::c_long = 220; -pub const SYS_fadvise64: ::c_long = 221; -pub const SYS_timer_create: ::c_long = 222; -pub const SYS_timer_settime: ::c_long = 223; -pub const SYS_timer_gettime: ::c_long = 224; -pub const SYS_timer_getoverrun: ::c_long = 225; -pub const SYS_timer_delete: ::c_long = 226; -pub const SYS_clock_settime: ::c_long = 227; -pub const SYS_clock_gettime: ::c_long = 228; -pub const SYS_clock_getres: ::c_long = 229; -pub const SYS_clock_nanosleep: ::c_long = 230; -pub const SYS_exit_group: ::c_long = 231; -pub const SYS_epoll_wait: ::c_long = 232; -pub const SYS_epoll_ctl: ::c_long = 233; -pub const SYS_tgkill: ::c_long = 234; -pub const SYS_utimes: ::c_long = 235; -pub const SYS_vserver: ::c_long = 236; -pub const SYS_mbind: ::c_long = 237; -pub const SYS_set_mempolicy: ::c_long = 238; -pub const SYS_get_mempolicy: ::c_long = 239; -pub const SYS_mq_open: ::c_long = 240; -pub const SYS_mq_unlink: ::c_long = 241; -pub const SYS_mq_timedsend: ::c_long = 242; -pub const SYS_mq_timedreceive: ::c_long = 243; -pub const SYS_mq_notify: ::c_long = 244; -pub const SYS_mq_getsetattr: ::c_long = 245; -pub const SYS_kexec_load: ::c_long = 246; -pub const SYS_waitid: ::c_long = 247; -pub const SYS_add_key: ::c_long = 248; -pub const SYS_request_key: ::c_long = 249; -pub const SYS_keyctl: ::c_long = 250; -pub const SYS_ioprio_set: ::c_long = 251; -pub const SYS_ioprio_get: ::c_long = 252; -pub const SYS_inotify_init: ::c_long = 253; -pub const SYS_inotify_add_watch: ::c_long = 254; -pub const SYS_inotify_rm_watch: ::c_long = 255; -pub const SYS_migrate_pages: ::c_long = 256; -pub const SYS_openat: ::c_long = 257; -pub const SYS_mkdirat: ::c_long = 258; -pub const SYS_mknodat: ::c_long = 259; -pub const SYS_fchownat: ::c_long = 260; -pub const SYS_futimesat: ::c_long = 261; -pub const SYS_newfstatat: ::c_long = 262; -pub const SYS_unlinkat: ::c_long = 263; -pub const SYS_renameat: ::c_long = 264; -pub const SYS_linkat: ::c_long = 265; -pub const SYS_symlinkat: ::c_long = 266; -pub const SYS_readlinkat: ::c_long = 267; -pub const SYS_fchmodat: ::c_long = 268; -pub const SYS_faccessat: ::c_long = 269; -pub const SYS_pselect6: ::c_long = 270; -pub const SYS_ppoll: ::c_long = 271; -pub const SYS_unshare: ::c_long = 272; -pub const SYS_set_robust_list: ::c_long = 273; -pub const SYS_get_robust_list: ::c_long = 274; -pub const SYS_splice: ::c_long = 275; -pub const SYS_tee: ::c_long = 276; -pub const SYS_sync_file_range: ::c_long = 277; -pub const SYS_vmsplice: ::c_long = 278; -pub const SYS_move_pages: ::c_long = 279; -pub const SYS_utimensat: ::c_long = 280; -pub const SYS_epoll_pwait: ::c_long = 281; -pub const SYS_signalfd: ::c_long = 282; -pub const SYS_timerfd_create: ::c_long = 283; -pub const SYS_eventfd: ::c_long = 284; -pub const SYS_fallocate: ::c_long = 285; -pub const SYS_timerfd_settime: ::c_long = 286; -pub const SYS_timerfd_gettime: ::c_long = 287; -pub const SYS_accept4: ::c_long = 288; -pub const SYS_signalfd4: ::c_long = 289; -pub const SYS_eventfd2: ::c_long = 290; -pub const SYS_epoll_create1: ::c_long = 291; -pub const SYS_dup3: ::c_long = 292; -pub const SYS_pipe2: ::c_long = 293; -pub const SYS_inotify_init1: ::c_long = 294; -pub const SYS_preadv: ::c_long = 295; -pub const SYS_pwritev: ::c_long = 296; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 297; -pub const SYS_perf_event_open: ::c_long = 298; -pub const SYS_recvmmsg: ::c_long = 299; -pub const SYS_fanotify_init: ::c_long = 300; -pub const SYS_fanotify_mark: ::c_long = 301; -pub const SYS_prlimit64: ::c_long = 302; -pub const SYS_name_to_handle_at: ::c_long = 303; -pub const SYS_open_by_handle_at: ::c_long = 304; -pub const SYS_clock_adjtime: ::c_long = 305; -pub const SYS_syncfs: ::c_long = 306; -pub const SYS_sendmmsg: ::c_long = 307; -pub const SYS_setns: ::c_long = 308; -pub const SYS_getcpu: ::c_long = 309; -pub const SYS_process_vm_readv: ::c_long = 310; -pub const SYS_process_vm_writev: ::c_long = 311; -pub const SYS_kcmp: ::c_long = 312; -pub const SYS_finit_module: ::c_long = 313; -pub const SYS_sched_setattr: ::c_long = 314; -pub const SYS_sched_getattr: ::c_long = 315; -pub const SYS_renameat2: ::c_long = 316; -pub const SYS_seccomp: ::c_long = 317; -pub const SYS_getrandom: ::c_long = 318; -pub const SYS_memfd_create: ::c_long = 319; -pub const SYS_kexec_file_load: ::c_long = 320; -pub const SYS_bpf: ::c_long = 321; -pub const SYS_execveat: ::c_long = 322; -pub const SYS_userfaultfd: ::c_long = 323; -pub const SYS_membarrier: ::c_long = 324; -pub const SYS_mlock2: ::c_long = 325; -pub const SYS_copy_file_range: ::c_long = 326; -pub const SYS_preadv2: ::c_long = 327; -pub const SYS_pwritev2: ::c_long = 328; -pub const SYS_pkey_mprotect: ::c_long = 329; -pub const SYS_pkey_alloc: ::c_long = 330; -pub const SYS_pkey_free: ::c_long = 331; -pub const SYS_statx: ::c_long = 332; -pub const SYS_io_pgetevents: ::c_long = 333; -pub const SYS_rseq: ::c_long = 334; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; -pub const SYS_fchmodat2: ::c_long = 452; -pub const SYS_mseal: ::c_long = 462; +pub const SYS_read: c_long = 0; +pub const SYS_write: c_long = 1; +pub const SYS_open: c_long = 2; +pub const SYS_close: c_long = 3; +pub const SYS_stat: c_long = 4; +pub const SYS_fstat: c_long = 5; +pub const SYS_lstat: c_long = 6; +pub const SYS_poll: c_long = 7; +pub const SYS_lseek: c_long = 8; +pub const SYS_mmap: c_long = 9; +pub const SYS_mprotect: c_long = 10; +pub const SYS_munmap: c_long = 11; +pub const SYS_brk: c_long = 12; +pub const SYS_rt_sigaction: c_long = 13; +pub const SYS_rt_sigprocmask: c_long = 14; +pub const SYS_rt_sigreturn: c_long = 15; +pub const SYS_ioctl: c_long = 16; +pub const SYS_pread64: c_long = 17; +pub const SYS_pwrite64: c_long = 18; +pub const SYS_readv: c_long = 19; +pub const SYS_writev: c_long = 20; +pub const SYS_access: c_long = 21; +pub const SYS_pipe: c_long = 22; +pub const SYS_select: c_long = 23; +pub const SYS_sched_yield: c_long = 24; +pub const SYS_mremap: c_long = 25; +pub const SYS_msync: c_long = 26; +pub const SYS_mincore: c_long = 27; +pub const SYS_madvise: c_long = 28; +pub const SYS_shmget: c_long = 29; +pub const SYS_shmat: c_long = 30; +pub const SYS_shmctl: c_long = 31; +pub const SYS_dup: c_long = 32; +pub const SYS_dup2: c_long = 33; +pub const SYS_pause: c_long = 34; +pub const SYS_nanosleep: c_long = 35; +pub const SYS_getitimer: c_long = 36; +pub const SYS_alarm: c_long = 37; +pub const SYS_setitimer: c_long = 38; +pub const SYS_getpid: c_long = 39; +pub const SYS_sendfile: c_long = 40; +pub const SYS_socket: c_long = 41; +pub const SYS_connect: c_long = 42; +pub const SYS_accept: c_long = 43; +pub const SYS_sendto: c_long = 44; +pub const SYS_recvfrom: c_long = 45; +pub const SYS_sendmsg: c_long = 46; +pub const SYS_recvmsg: c_long = 47; +pub const SYS_shutdown: c_long = 48; +pub const SYS_bind: c_long = 49; +pub const SYS_listen: c_long = 50; +pub const SYS_getsockname: c_long = 51; +pub const SYS_getpeername: c_long = 52; +pub const SYS_socketpair: c_long = 53; +pub const SYS_setsockopt: c_long = 54; +pub const SYS_getsockopt: c_long = 55; +pub const SYS_clone: c_long = 56; +pub const SYS_fork: c_long = 57; +pub const SYS_vfork: c_long = 58; +pub const SYS_execve: c_long = 59; +pub const SYS_exit: c_long = 60; +pub const SYS_wait4: c_long = 61; +pub const SYS_kill: c_long = 62; +pub const SYS_uname: c_long = 63; +pub const SYS_semget: c_long = 64; +pub const SYS_semop: c_long = 65; +pub const SYS_semctl: c_long = 66; +pub const SYS_shmdt: c_long = 67; +pub const SYS_msgget: c_long = 68; +pub const SYS_msgsnd: c_long = 69; +pub const SYS_msgrcv: c_long = 70; +pub const SYS_msgctl: c_long = 71; +pub const SYS_fcntl: c_long = 72; +pub const SYS_flock: c_long = 73; +pub const SYS_fsync: c_long = 74; +pub const SYS_fdatasync: c_long = 75; +pub const SYS_truncate: c_long = 76; +pub const SYS_ftruncate: c_long = 77; +pub const SYS_getdents: c_long = 78; +pub const SYS_getcwd: c_long = 79; +pub const SYS_chdir: c_long = 80; +pub const SYS_fchdir: c_long = 81; +pub const SYS_rename: c_long = 82; +pub const SYS_mkdir: c_long = 83; +pub const SYS_rmdir: c_long = 84; +pub const SYS_creat: c_long = 85; +pub const SYS_link: c_long = 86; +pub const SYS_unlink: c_long = 87; +pub const SYS_symlink: c_long = 88; +pub const SYS_readlink: c_long = 89; +pub const SYS_chmod: c_long = 90; +pub const SYS_fchmod: c_long = 91; +pub const SYS_chown: c_long = 92; +pub const SYS_fchown: c_long = 93; +pub const SYS_lchown: c_long = 94; +pub const SYS_umask: c_long = 95; +pub const SYS_gettimeofday: c_long = 96; +pub const SYS_getrlimit: c_long = 97; +pub const SYS_getrusage: c_long = 98; +pub const SYS_sysinfo: c_long = 99; +pub const SYS_times: c_long = 100; +pub const SYS_ptrace: c_long = 101; +pub const SYS_getuid: c_long = 102; +pub const SYS_syslog: c_long = 103; +pub const SYS_getgid: c_long = 104; +pub const SYS_setuid: c_long = 105; +pub const SYS_setgid: c_long = 106; +pub const SYS_geteuid: c_long = 107; +pub const SYS_getegid: c_long = 108; +pub const SYS_setpgid: c_long = 109; +pub const SYS_getppid: c_long = 110; +pub const SYS_getpgrp: c_long = 111; +pub const SYS_setsid: c_long = 112; +pub const SYS_setreuid: c_long = 113; +pub const SYS_setregid: c_long = 114; +pub const SYS_getgroups: c_long = 115; +pub const SYS_setgroups: c_long = 116; +pub const SYS_setresuid: c_long = 117; +pub const SYS_getresuid: c_long = 118; +pub const SYS_setresgid: c_long = 119; +pub const SYS_getresgid: c_long = 120; +pub const SYS_getpgid: c_long = 121; +pub const SYS_setfsuid: c_long = 122; +pub const SYS_setfsgid: c_long = 123; +pub const SYS_getsid: c_long = 124; +pub const SYS_capget: c_long = 125; +pub const SYS_capset: c_long = 126; +pub const SYS_rt_sigpending: c_long = 127; +pub const SYS_rt_sigtimedwait: c_long = 128; +pub const SYS_rt_sigqueueinfo: c_long = 129; +pub const SYS_rt_sigsuspend: c_long = 130; +pub const SYS_sigaltstack: c_long = 131; +pub const SYS_utime: c_long = 132; +pub const SYS_mknod: c_long = 133; +pub const SYS_uselib: c_long = 134; +pub const SYS_personality: c_long = 135; +pub const SYS_ustat: c_long = 136; +pub const SYS_statfs: c_long = 137; +pub const SYS_fstatfs: c_long = 138; +pub const SYS_sysfs: c_long = 139; +pub const SYS_getpriority: c_long = 140; +pub const SYS_setpriority: c_long = 141; +pub const SYS_sched_setparam: c_long = 142; +pub const SYS_sched_getparam: c_long = 143; +pub const SYS_sched_setscheduler: c_long = 144; +pub const SYS_sched_getscheduler: c_long = 145; +pub const SYS_sched_get_priority_max: c_long = 146; +pub const SYS_sched_get_priority_min: c_long = 147; +pub const SYS_sched_rr_get_interval: c_long = 148; +pub const SYS_mlock: c_long = 149; +pub const SYS_munlock: c_long = 150; +pub const SYS_mlockall: c_long = 151; +pub const SYS_munlockall: c_long = 152; +pub const SYS_vhangup: c_long = 153; +pub const SYS_modify_ldt: c_long = 154; +pub const SYS_pivot_root: c_long = 155; +pub const SYS__sysctl: c_long = 156; +pub const SYS_prctl: c_long = 157; +pub const SYS_arch_prctl: c_long = 158; +pub const SYS_adjtimex: c_long = 159; +pub const SYS_setrlimit: c_long = 160; +pub const SYS_chroot: c_long = 161; +pub const SYS_sync: c_long = 162; +pub const SYS_acct: c_long = 163; +pub const SYS_settimeofday: c_long = 164; +pub const SYS_mount: c_long = 165; +pub const SYS_umount2: c_long = 166; +pub const SYS_swapon: c_long = 167; +pub const SYS_swapoff: c_long = 168; +pub const SYS_reboot: c_long = 169; +pub const SYS_sethostname: c_long = 170; +pub const SYS_setdomainname: c_long = 171; +pub const SYS_iopl: c_long = 172; +pub const SYS_ioperm: c_long = 173; +pub const SYS_create_module: c_long = 174; +pub const SYS_init_module: c_long = 175; +pub const SYS_delete_module: c_long = 176; +pub const SYS_get_kernel_syms: c_long = 177; +pub const SYS_query_module: c_long = 178; +pub const SYS_quotactl: c_long = 179; +pub const SYS_nfsservctl: c_long = 180; +pub const SYS_getpmsg: c_long = 181; +pub const SYS_putpmsg: c_long = 182; +pub const SYS_afs_syscall: c_long = 183; +pub const SYS_tuxcall: c_long = 184; +pub const SYS_security: c_long = 185; +pub const SYS_gettid: c_long = 186; +pub const SYS_readahead: c_long = 187; +pub const SYS_setxattr: c_long = 188; +pub const SYS_lsetxattr: c_long = 189; +pub const SYS_fsetxattr: c_long = 190; +pub const SYS_getxattr: c_long = 191; +pub const SYS_lgetxattr: c_long = 192; +pub const SYS_fgetxattr: c_long = 193; +pub const SYS_listxattr: c_long = 194; +pub const SYS_llistxattr: c_long = 195; +pub const SYS_flistxattr: c_long = 196; +pub const SYS_removexattr: c_long = 197; +pub const SYS_lremovexattr: c_long = 198; +pub const SYS_fremovexattr: c_long = 199; +pub const SYS_tkill: c_long = 200; +pub const SYS_time: c_long = 201; +pub const SYS_futex: c_long = 202; +pub const SYS_sched_setaffinity: c_long = 203; +pub const SYS_sched_getaffinity: c_long = 204; +pub const SYS_set_thread_area: c_long = 205; +pub const SYS_io_setup: c_long = 206; +pub const SYS_io_destroy: c_long = 207; +pub const SYS_io_getevents: c_long = 208; +pub const SYS_io_submit: c_long = 209; +pub const SYS_io_cancel: c_long = 210; +pub const SYS_get_thread_area: c_long = 211; +pub const SYS_lookup_dcookie: c_long = 212; +pub const SYS_epoll_create: c_long = 213; +pub const SYS_epoll_ctl_old: c_long = 214; +pub const SYS_epoll_wait_old: c_long = 215; +pub const SYS_remap_file_pages: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_set_tid_address: c_long = 218; +pub const SYS_restart_syscall: c_long = 219; +pub const SYS_semtimedop: c_long = 220; +pub const SYS_fadvise64: c_long = 221; +pub const SYS_timer_create: c_long = 222; +pub const SYS_timer_settime: c_long = 223; +pub const SYS_timer_gettime: c_long = 224; +pub const SYS_timer_getoverrun: c_long = 225; +pub const SYS_timer_delete: c_long = 226; +pub const SYS_clock_settime: c_long = 227; +pub const SYS_clock_gettime: c_long = 228; +pub const SYS_clock_getres: c_long = 229; +pub const SYS_clock_nanosleep: c_long = 230; +pub const SYS_exit_group: c_long = 231; +pub const SYS_epoll_wait: c_long = 232; +pub const SYS_epoll_ctl: c_long = 233; +pub const SYS_tgkill: c_long = 234; +pub const SYS_utimes: c_long = 235; +pub const SYS_vserver: c_long = 236; +pub const SYS_mbind: c_long = 237; +pub const SYS_set_mempolicy: c_long = 238; +pub const SYS_get_mempolicy: c_long = 239; +pub const SYS_mq_open: c_long = 240; +pub const SYS_mq_unlink: c_long = 241; +pub const SYS_mq_timedsend: c_long = 242; +pub const SYS_mq_timedreceive: c_long = 243; +pub const SYS_mq_notify: c_long = 244; +pub const SYS_mq_getsetattr: c_long = 245; +pub const SYS_kexec_load: c_long = 246; +pub const SYS_waitid: c_long = 247; +pub const SYS_add_key: c_long = 248; +pub const SYS_request_key: c_long = 249; +pub const SYS_keyctl: c_long = 250; +pub const SYS_ioprio_set: c_long = 251; +pub const SYS_ioprio_get: c_long = 252; +pub const SYS_inotify_init: c_long = 253; +pub const SYS_inotify_add_watch: c_long = 254; +pub const SYS_inotify_rm_watch: c_long = 255; +pub const SYS_migrate_pages: c_long = 256; +pub const SYS_openat: c_long = 257; +pub const SYS_mkdirat: c_long = 258; +pub const SYS_mknodat: c_long = 259; +pub const SYS_fchownat: c_long = 260; +pub const SYS_futimesat: c_long = 261; +pub const SYS_newfstatat: c_long = 262; +pub const SYS_unlinkat: c_long = 263; +pub const SYS_renameat: c_long = 264; +pub const SYS_linkat: c_long = 265; +pub const SYS_symlinkat: c_long = 266; +pub const SYS_readlinkat: c_long = 267; +pub const SYS_fchmodat: c_long = 268; +pub const SYS_faccessat: c_long = 269; +pub const SYS_pselect6: c_long = 270; +pub const SYS_ppoll: c_long = 271; +pub const SYS_unshare: c_long = 272; +pub const SYS_set_robust_list: c_long = 273; +pub const SYS_get_robust_list: c_long = 274; +pub const SYS_splice: c_long = 275; +pub const SYS_tee: c_long = 276; +pub const SYS_sync_file_range: c_long = 277; +pub const SYS_vmsplice: c_long = 278; +pub const SYS_move_pages: c_long = 279; +pub const SYS_utimensat: c_long = 280; +pub const SYS_epoll_pwait: c_long = 281; +pub const SYS_signalfd: c_long = 282; +pub const SYS_timerfd_create: c_long = 283; +pub const SYS_eventfd: c_long = 284; +pub const SYS_fallocate: c_long = 285; +pub const SYS_timerfd_settime: c_long = 286; +pub const SYS_timerfd_gettime: c_long = 287; +pub const SYS_accept4: c_long = 288; +pub const SYS_signalfd4: c_long = 289; +pub const SYS_eventfd2: c_long = 290; +pub const SYS_epoll_create1: c_long = 291; +pub const SYS_dup3: c_long = 292; +pub const SYS_pipe2: c_long = 293; +pub const SYS_inotify_init1: c_long = 294; +pub const SYS_preadv: c_long = 295; +pub const SYS_pwritev: c_long = 296; +pub const SYS_rt_tgsigqueueinfo: c_long = 297; +pub const SYS_perf_event_open: c_long = 298; +pub const SYS_recvmmsg: c_long = 299; +pub const SYS_fanotify_init: c_long = 300; +pub const SYS_fanotify_mark: c_long = 301; +pub const SYS_prlimit64: c_long = 302; +pub const SYS_name_to_handle_at: c_long = 303; +pub const SYS_open_by_handle_at: c_long = 304; +pub const SYS_clock_adjtime: c_long = 305; +pub const SYS_syncfs: c_long = 306; +pub const SYS_sendmmsg: c_long = 307; +pub const SYS_setns: c_long = 308; +pub const SYS_getcpu: c_long = 309; +pub const SYS_process_vm_readv: c_long = 310; +pub const SYS_process_vm_writev: c_long = 311; +pub const SYS_kcmp: c_long = 312; +pub const SYS_finit_module: c_long = 313; +pub const SYS_sched_setattr: c_long = 314; +pub const SYS_sched_getattr: c_long = 315; +pub const SYS_renameat2: c_long = 316; +pub const SYS_seccomp: c_long = 317; +pub const SYS_getrandom: c_long = 318; +pub const SYS_memfd_create: c_long = 319; +pub const SYS_kexec_file_load: c_long = 320; +pub const SYS_bpf: c_long = 321; +pub const SYS_execveat: c_long = 322; +pub const SYS_userfaultfd: c_long = 323; +pub const SYS_membarrier: c_long = 324; +pub const SYS_mlock2: c_long = 325; +pub const SYS_copy_file_range: c_long = 326; +pub const SYS_preadv2: c_long = 327; +pub const SYS_pwritev2: c_long = 328; +pub const SYS_pkey_mprotect: c_long = 329; +pub const SYS_pkey_alloc: c_long = 330; +pub const SYS_pkey_free: c_long = 331; +pub const SYS_statx: c_long = 332; +pub const SYS_io_pgetevents: c_long = 333; +pub const SYS_rseq: c_long = 334; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; +pub const SYS_fchmodat2: c_long = 452; +pub const SYS_mseal: c_long = 462; // offsets in user_regs_structs, from sys/reg.h -pub const R15: ::c_int = 0; -pub const R14: ::c_int = 1; -pub const R13: ::c_int = 2; -pub const R12: ::c_int = 3; -pub const RBP: ::c_int = 4; -pub const RBX: ::c_int = 5; -pub const R11: ::c_int = 6; -pub const R10: ::c_int = 7; -pub const R9: ::c_int = 8; -pub const R8: ::c_int = 9; -pub const RAX: ::c_int = 10; -pub const RCX: ::c_int = 11; -pub const RDX: ::c_int = 12; -pub const RSI: ::c_int = 13; -pub const RDI: ::c_int = 14; -pub const ORIG_RAX: ::c_int = 15; -pub const RIP: ::c_int = 16; -pub const CS: ::c_int = 17; -pub const EFLAGS: ::c_int = 18; -pub const RSP: ::c_int = 19; -pub const SS: ::c_int = 20; -pub const FS_BASE: ::c_int = 21; -pub const GS_BASE: ::c_int = 22; -pub const DS: ::c_int = 23; -pub const ES: ::c_int = 24; -pub const FS: ::c_int = 25; -pub const GS: ::c_int = 26; +pub const R15: c_int = 0; +pub const R14: c_int = 1; +pub const R13: c_int = 2; +pub const R12: c_int = 3; +pub const RBP: c_int = 4; +pub const RBX: c_int = 5; +pub const R11: c_int = 6; +pub const R10: c_int = 7; +pub const R9: c_int = 8; +pub const R8: c_int = 9; +pub const RAX: c_int = 10; +pub const RCX: c_int = 11; +pub const RDX: c_int = 12; +pub const RSI: c_int = 13; +pub const RDI: c_int = 14; +pub const ORIG_RAX: c_int = 15; +pub const RIP: c_int = 16; +pub const CS: c_int = 17; +pub const EFLAGS: c_int = 18; +pub const RSP: c_int = 19; +pub const SS: c_int = 20; +pub const FS_BASE: c_int = 21; +pub const GS_BASE: c_int = 22; +pub const DS: c_int = 23; +pub const ES: c_int = 24; +pub const FS: c_int = 25; +pub const GS: c_int = 26; // offsets in mcontext_t.gregs from bits/signal.h // GitHub repo: ifduyue/musl/ // commit: b4b1e10364c8737a632be61582e05a8d3acf5690 // file: arch/x86_64/bits/signal.h#L9-L56 -pub const REG_R8: ::c_int = 0; -pub const REG_R9: ::c_int = 1; -pub const REG_R10: ::c_int = 2; -pub const REG_R11: ::c_int = 3; -pub const REG_R12: ::c_int = 4; -pub const REG_R13: ::c_int = 5; -pub const REG_R14: ::c_int = 6; -pub const REG_R15: ::c_int = 7; -pub const REG_RDI: ::c_int = 8; -pub const REG_RSI: ::c_int = 9; -pub const REG_RBP: ::c_int = 10; -pub const REG_RBX: ::c_int = 11; -pub const REG_RDX: ::c_int = 12; -pub const REG_RAX: ::c_int = 13; -pub const REG_RCX: ::c_int = 14; -pub const REG_RSP: ::c_int = 15; -pub const REG_RIP: ::c_int = 16; -pub const REG_EFL: ::c_int = 17; -pub const REG_CSGSFS: ::c_int = 18; -pub const REG_ERR: ::c_int = 19; -pub const REG_TRAPNO: ::c_int = 20; -pub const REG_OLDMASK: ::c_int = 21; -pub const REG_CR2: ::c_int = 22; - -pub const MADV_SOFT_OFFLINE: ::c_int = 101; -pub const MAP_32BIT: ::c_int = 0x0040; -pub const O_APPEND: ::c_int = 1024; -pub const O_DIRECT: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_LARGEFILE: ::c_int = 0; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_CREAT: ::c_int = 64; -pub const O_EXCL: ::c_int = 128; -pub const O_NOCTTY: ::c_int = 256; -pub const O_NONBLOCK: ::c_int = 2048; -pub const O_SYNC: ::c_int = 1052672; -pub const O_RSYNC: ::c_int = 1052672; -pub const O_DSYNC: ::c_int = 4096; -pub const O_ASYNC: ::c_int = 0x2000; - -pub const PTRACE_SYSEMU: ::c_int = 31; -pub const PTRACE_SYSEMU_SINGLESTEP: ::c_int = 32; - -pub const SIGSTKSZ: ::size_t = 8192; -pub const MINSIGSTKSZ: ::size_t = 2048; - -pub const ENAMETOOLONG: ::c_int = 36; -pub const ENOLCK: ::c_int = 37; -pub const ENOSYS: ::c_int = 38; -pub const ENOTEMPTY: ::c_int = 39; -pub const ELOOP: ::c_int = 40; -pub const ENOMSG: ::c_int = 42; -pub const EIDRM: ::c_int = 43; -pub const ECHRNG: ::c_int = 44; -pub const EL2NSYNC: ::c_int = 45; -pub const EL3HLT: ::c_int = 46; -pub const EL3RST: ::c_int = 47; -pub const ELNRNG: ::c_int = 48; -pub const EUNATCH: ::c_int = 49; -pub const ENOCSI: ::c_int = 50; -pub const EL2HLT: ::c_int = 51; -pub const EBADE: ::c_int = 52; -pub const EBADR: ::c_int = 53; -pub const EXFULL: ::c_int = 54; -pub const ENOANO: ::c_int = 55; -pub const EBADRQC: ::c_int = 56; -pub const EBADSLT: ::c_int = 57; -pub const EMULTIHOP: ::c_int = 72; -pub const EBADMSG: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 75; -pub const ENOTUNIQ: ::c_int = 76; -pub const EBADFD: ::c_int = 77; -pub const EREMCHG: ::c_int = 78; -pub const ELIBACC: ::c_int = 79; -pub const ELIBBAD: ::c_int = 80; -pub const ELIBSCN: ::c_int = 81; -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; -pub const EILSEQ: ::c_int = 84; -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; -pub const EUSERS: ::c_int = 87; -pub const ENOTSOCK: ::c_int = 88; -pub const EDESTADDRREQ: ::c_int = 89; -pub const EMSGSIZE: ::c_int = 90; -pub const EPROTOTYPE: ::c_int = 91; -pub const ENOPROTOOPT: ::c_int = 92; -pub const EPROTONOSUPPORT: ::c_int = 93; -pub const ESOCKTNOSUPPORT: ::c_int = 94; -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; -pub const EADDRNOTAVAIL: ::c_int = 99; -pub const ENETDOWN: ::c_int = 100; -pub const ENETUNREACH: ::c_int = 101; -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EISCONN: ::c_int = 106; -pub const ENOTCONN: ::c_int = 107; -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; -pub const ETIMEDOUT: ::c_int = 110; -pub const ECONNREFUSED: ::c_int = 111; -pub const EHOSTDOWN: ::c_int = 112; -pub const EHOSTUNREACH: ::c_int = 113; -pub const EALREADY: ::c_int = 114; -pub const EINPROGRESS: ::c_int = 115; -pub const ESTALE: ::c_int = 116; -pub const EUCLEAN: ::c_int = 117; -pub const ENOTNAM: ::c_int = 118; -pub const ENAVAIL: ::c_int = 119; -pub const EISNAM: ::c_int = 120; -pub const EREMOTEIO: ::c_int = 121; -pub const EDQUOT: ::c_int = 122; -pub const ENOMEDIUM: ::c_int = 123; -pub const EMEDIUMTYPE: ::c_int = 124; -pub const ECANCELED: ::c_int = 125; -pub const ENOKEY: ::c_int = 126; -pub const EKEYEXPIRED: ::c_int = 127; -pub const EKEYREVOKED: ::c_int = 128; -pub const EKEYREJECTED: ::c_int = 129; -pub const EOWNERDEAD: ::c_int = 130; -pub const ENOTRECOVERABLE: ::c_int = 131; -pub const ERFKILL: ::c_int = 132; -pub const EHWPOISON: ::c_int = 133; - -pub const SA_ONSTACK: ::c_int = 0x08000000; -pub const SA_SIGINFO: ::c_int = 0x00000004; -pub const SA_NOCLDWAIT: ::c_int = 0x00000002; - -pub const SIGCHLD: ::c_int = 17; -pub const SIGBUS: ::c_int = 7; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGUSR1: ::c_int = 10; -pub const SIGUSR2: ::c_int = 12; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGURG: ::c_int = 23; -pub const SIGIO: ::c_int = 29; -pub const SIGSYS: ::c_int = 31; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGPOLL: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0x000000; -pub const SIG_UNBLOCK: ::c_int = 0x01; - -pub const F_GETLK: ::c_int = 5; -pub const F_GETOWN: ::c_int = 9; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_SETOWN: ::c_int = 8; +pub const REG_R8: c_int = 0; +pub const REG_R9: c_int = 1; +pub const REG_R10: c_int = 2; +pub const REG_R11: c_int = 3; +pub const REG_R12: c_int = 4; +pub const REG_R13: c_int = 5; +pub const REG_R14: c_int = 6; +pub const REG_R15: c_int = 7; +pub const REG_RDI: c_int = 8; +pub const REG_RSI: c_int = 9; +pub const REG_RBP: c_int = 10; +pub const REG_RBX: c_int = 11; +pub const REG_RDX: c_int = 12; +pub const REG_RAX: c_int = 13; +pub const REG_RCX: c_int = 14; +pub const REG_RSP: c_int = 15; +pub const REG_RIP: c_int = 16; +pub const REG_EFL: c_int = 17; +pub const REG_CSGSFS: c_int = 18; +pub const REG_ERR: c_int = 19; +pub const REG_TRAPNO: c_int = 20; +pub const REG_OLDMASK: c_int = 21; +pub const REG_CR2: c_int = 22; + +pub const MADV_SOFT_OFFLINE: c_int = 101; +pub const MAP_32BIT: c_int = 0x0040; +pub const O_APPEND: c_int = 1024; +pub const O_DIRECT: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_LARGEFILE: c_int = 0; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_CREAT: c_int = 64; +pub const O_EXCL: c_int = 128; +pub const O_NOCTTY: c_int = 256; +pub const O_NONBLOCK: c_int = 2048; +pub const O_SYNC: c_int = 1052672; +pub const O_RSYNC: c_int = 1052672; +pub const O_DSYNC: c_int = 4096; +pub const O_ASYNC: c_int = 0x2000; + +pub const PTRACE_SYSEMU: c_int = 31; +pub const PTRACE_SYSEMU_SINGLESTEP: c_int = 32; + +pub const SIGSTKSZ: size_t = 8192; +pub const MINSIGSTKSZ: size_t = 2048; + +pub const ENAMETOOLONG: c_int = 36; +pub const ENOLCK: c_int = 37; +pub const ENOSYS: c_int = 38; +pub const ENOTEMPTY: c_int = 39; +pub const ELOOP: c_int = 40; +pub const ENOMSG: c_int = 42; +pub const EIDRM: c_int = 43; +pub const ECHRNG: c_int = 44; +pub const EL2NSYNC: c_int = 45; +pub const EL3HLT: c_int = 46; +pub const EL3RST: c_int = 47; +pub const ELNRNG: c_int = 48; +pub const EUNATCH: c_int = 49; +pub const ENOCSI: c_int = 50; +pub const EL2HLT: c_int = 51; +pub const EBADE: c_int = 52; +pub const EBADR: c_int = 53; +pub const EXFULL: c_int = 54; +pub const ENOANO: c_int = 55; +pub const EBADRQC: c_int = 56; +pub const EBADSLT: c_int = 57; +pub const EMULTIHOP: c_int = 72; +pub const EBADMSG: c_int = 74; +pub const EOVERFLOW: c_int = 75; +pub const ENOTUNIQ: c_int = 76; +pub const EBADFD: c_int = 77; +pub const EREMCHG: c_int = 78; +pub const ELIBACC: c_int = 79; +pub const ELIBBAD: c_int = 80; +pub const ELIBSCN: c_int = 81; +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; +pub const EILSEQ: c_int = 84; +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; +pub const EUSERS: c_int = 87; +pub const ENOTSOCK: c_int = 88; +pub const EDESTADDRREQ: c_int = 89; +pub const EMSGSIZE: c_int = 90; +pub const EPROTOTYPE: c_int = 91; +pub const ENOPROTOOPT: c_int = 92; +pub const EPROTONOSUPPORT: c_int = 93; +pub const ESOCKTNOSUPPORT: c_int = 94; +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; +pub const EADDRNOTAVAIL: c_int = 99; +pub const ENETDOWN: c_int = 100; +pub const ENETUNREACH: c_int = 101; +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EISCONN: c_int = 106; +pub const ENOTCONN: c_int = 107; +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; +pub const ETIMEDOUT: c_int = 110; +pub const ECONNREFUSED: c_int = 111; +pub const EHOSTDOWN: c_int = 112; +pub const EHOSTUNREACH: c_int = 113; +pub const EALREADY: c_int = 114; +pub const EINPROGRESS: c_int = 115; +pub const ESTALE: c_int = 116; +pub const EUCLEAN: c_int = 117; +pub const ENOTNAM: c_int = 118; +pub const ENAVAIL: c_int = 119; +pub const EISNAM: c_int = 120; +pub const EREMOTEIO: c_int = 121; +pub const EDQUOT: c_int = 122; +pub const ENOMEDIUM: c_int = 123; +pub const EMEDIUMTYPE: c_int = 124; +pub const ECANCELED: c_int = 125; +pub const ENOKEY: c_int = 126; +pub const EKEYEXPIRED: c_int = 127; +pub const EKEYREVOKED: c_int = 128; +pub const EKEYREJECTED: c_int = 129; +pub const EOWNERDEAD: c_int = 130; +pub const ENOTRECOVERABLE: c_int = 131; +pub const ERFKILL: c_int = 132; +pub const EHWPOISON: c_int = 133; + +pub const SA_ONSTACK: c_int = 0x08000000; +pub const SA_SIGINFO: c_int = 0x00000004; +pub const SA_NOCLDWAIT: c_int = 0x00000002; + +pub const SIGCHLD: c_int = 17; +pub const SIGBUS: c_int = 7; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGUSR1: c_int = 10; +pub const SIGUSR2: c_int = 12; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGURG: c_int = 23; +pub const SIGIO: c_int = 29; +pub const SIGSYS: c_int = 31; +pub const SIGSTKFLT: c_int = 16; +pub const SIGPOLL: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0x000000; +pub const SIG_UNBLOCK: c_int = 0x01; + +pub const F_GETLK: c_int = 5; +pub const F_GETOWN: c_int = 9; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_SETOWN: c_int = 8; pub const VEOF: usize = 4; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_GROWSDOWN: ::c_int = 0x0100; -pub const MAP_DENYWRITE: ::c_int = 0x0800; -pub const MAP_EXECUTABLE: ::c_int = 0x01000; -pub const MAP_LOCKED: ::c_int = 0x02000; -pub const MAP_NORESERVE: ::c_int = 0x04000; -pub const MAP_POPULATE: ::c_int = 0x08000; -pub const MAP_NONBLOCK: ::c_int = 0x010000; -pub const MAP_STACK: ::c_int = 0x020000; -pub const MAP_HUGETLB: ::c_int = 0x040000; -pub const MAP_SYNC: ::c_int = 0x080000; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const TAB1: ::c_int = 0x00000800; -pub const TAB2: ::c_int = 0x00001000; -pub const TAB3: ::c_int = 0x00001800; -pub const CR1: ::c_int = 0x00000200; -pub const CR2: ::c_int = 0x00000400; -pub const CR3: ::c_int = 0x00000600; -pub const FF1: ::c_int = 0x00008000; -pub const BS1: ::c_int = 0x00002000; -pub const VT1: ::c_int = 0x00004000; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_GROWSDOWN: c_int = 0x0100; +pub const MAP_DENYWRITE: c_int = 0x0800; +pub const MAP_EXECUTABLE: c_int = 0x01000; +pub const MAP_LOCKED: c_int = 0x02000; +pub const MAP_NORESERVE: c_int = 0x04000; +pub const MAP_POPULATE: c_int = 0x08000; +pub const MAP_NONBLOCK: c_int = 0x010000; +pub const MAP_STACK: c_int = 0x020000; +pub const MAP_HUGETLB: c_int = 0x040000; +pub const MAP_SYNC: c_int = 0x080000; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const TAB1: c_int = 0x00000800; +pub const TAB2: c_int = 0x00001000; +pub const TAB3: c_int = 0x00001800; +pub const CR1: c_int = 0x00000200; +pub const CR2: c_int = 0x00000400; +pub const CR3: c_int = 0x00000600; +pub const FF1: c_int = 0x00008000; +pub const BS1: c_int = 0x00002000; +pub const VT1: c_int = 0x00004000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -871,63 +875,63 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const CIBAUD: ::tcflag_t = 0o02003600000; -pub const CBAUDEX: ::tcflag_t = 0o010000; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const CIBAUD: crate::tcflag_t = 0o02003600000; +pub const CBAUDEX: crate::tcflag_t = 0o010000; pub const VSWTC: usize = 7; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const NLDLY: ::tcflag_t = 0o000400; -pub const CRDLY: ::tcflag_t = 0o003000; -pub const TABDLY: ::tcflag_t = 0o014000; -pub const BSDLY: ::tcflag_t = 0o020000; -pub const FFDLY: ::tcflag_t = 0o100000; -pub const VTDLY: ::tcflag_t = 0o040000; -pub const XTABS: ::tcflag_t = 0o014000; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; - -pub const EDEADLK: ::c_int = 35; -pub const EDEADLOCK: ::c_int = EDEADLK; - -pub const EXTPROC: ::tcflag_t = 0x00010000; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const NLDLY: crate::tcflag_t = 0o000400; +pub const CRDLY: crate::tcflag_t = 0o003000; +pub const TABDLY: crate::tcflag_t = 0o014000; +pub const BSDLY: crate::tcflag_t = 0o020000; +pub const FFDLY: crate::tcflag_t = 0o100000; +pub const VTDLY: crate::tcflag_t = 0o040000; +pub const XTABS: crate::tcflag_t = 0o014000; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; + +pub const EDEADLK: c_int = 35; +pub const EDEADLOCK: c_int = EDEADLK; + +pub const EXTPROC: crate::tcflag_t = 0x00010000; pub const VEOL: usize = 11; pub const VEOL2: usize = 16; pub const VMIN: usize = 6; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; -pub const FLUSHO: ::tcflag_t = 0x00001000; +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; +pub const FLUSHO: crate::tcflag_t = 0x00001000; diff --git a/src/unix/linux_like/linux/musl/lfs64.rs b/src/unix/linux_like/linux/musl/lfs64.rs index 6d1f368695a6b..582e20a45545e 100644 --- a/src/unix/linux_like/linux/musl/lfs64.rs +++ b/src/unix/linux_like/linux/musl/lfs64.rs @@ -1,111 +1,113 @@ +use crate::{c_char, c_int, c_void, off64_t, size_t, ssize_t}; + #[inline] -pub unsafe extern "C" fn creat64(path: *const ::c_char, mode: ::mode_t) -> ::c_int { - ::creat(path, mode) +pub unsafe extern "C" fn creat64(path: *const c_char, mode: crate::mode_t) -> c_int { + crate::creat(path, mode) } #[inline] pub unsafe extern "C" fn fallocate64( - fd: ::c_int, - mode: ::c_int, - offset: ::off64_t, - len: ::off64_t, -) -> ::c_int { - ::fallocate(fd, mode, offset, len) + fd: c_int, + mode: c_int, + offset: off64_t, + len: off64_t, +) -> c_int { + crate::fallocate(fd, mode, offset, len) } #[inline] -pub unsafe extern "C" fn fgetpos64(stream: *mut ::FILE, pos: *mut ::fpos64_t) -> ::c_int { - ::fgetpos(stream, pos as *mut _) +pub unsafe extern "C" fn fgetpos64(stream: *mut crate::FILE, pos: *mut crate::fpos64_t) -> c_int { + crate::fgetpos(stream, pos as *mut _) } #[inline] -pub unsafe extern "C" fn fopen64(pathname: *const ::c_char, mode: *const ::c_char) -> *mut ::FILE { - ::fopen(pathname, mode) +pub unsafe extern "C" fn fopen64(pathname: *const c_char, mode: *const c_char) -> *mut crate::FILE { + crate::fopen(pathname, mode) } #[inline] pub unsafe extern "C" fn freopen64( - pathname: *const ::c_char, - mode: *const ::c_char, - stream: *mut ::FILE, -) -> *mut ::FILE { - ::freopen(pathname, mode, stream) + pathname: *const c_char, + mode: *const c_char, + stream: *mut crate::FILE, +) -> *mut crate::FILE { + crate::freopen(pathname, mode, stream) } #[inline] pub unsafe extern "C" fn fseeko64( - stream: *mut ::FILE, - offset: ::off64_t, - whence: ::c_int, -) -> ::c_int { - ::fseeko(stream, offset, whence) + stream: *mut crate::FILE, + offset: off64_t, + whence: c_int, +) -> c_int { + crate::fseeko(stream, offset, whence) } #[inline] -pub unsafe extern "C" fn fsetpos64(stream: *mut ::FILE, pos: *const ::fpos64_t) -> ::c_int { - ::fsetpos(stream, pos as *mut _) +pub unsafe extern "C" fn fsetpos64(stream: *mut crate::FILE, pos: *const crate::fpos64_t) -> c_int { + crate::fsetpos(stream, pos as *mut _) } #[inline] -pub unsafe extern "C" fn fstat64(fildes: ::c_int, buf: *mut ::stat64) -> ::c_int { - ::fstat(fildes, buf as *mut _) +pub unsafe extern "C" fn fstat64(fildes: c_int, buf: *mut crate::stat64) -> c_int { + crate::fstat(fildes, buf as *mut _) } #[inline] pub unsafe extern "C" fn fstatat64( - fd: ::c_int, - path: *const ::c_char, - buf: *mut ::stat64, - flag: ::c_int, -) -> ::c_int { - ::fstatat(fd, path, buf as *mut _, flag) + fd: c_int, + path: *const c_char, + buf: *mut crate::stat64, + flag: c_int, +) -> c_int { + crate::fstatat(fd, path, buf as *mut _, flag) } #[inline] -pub unsafe extern "C" fn fstatfs64(fd: ::c_int, buf: *mut ::statfs64) -> ::c_int { - ::fstatfs(fd, buf as *mut _) +pub unsafe extern "C" fn fstatfs64(fd: c_int, buf: *mut crate::statfs64) -> c_int { + crate::fstatfs(fd, buf as *mut _) } #[inline] -pub unsafe extern "C" fn fstatvfs64(fd: ::c_int, buf: *mut ::statvfs64) -> ::c_int { - ::fstatvfs(fd, buf as *mut _) +pub unsafe extern "C" fn fstatvfs64(fd: c_int, buf: *mut crate::statvfs64) -> c_int { + crate::fstatvfs(fd, buf as *mut _) } #[inline] -pub unsafe extern "C" fn ftello64(stream: *mut ::FILE) -> ::off64_t { - ::ftello(stream) +pub unsafe extern "C" fn ftello64(stream: *mut crate::FILE) -> off64_t { + crate::ftello(stream) } #[inline] -pub unsafe extern "C" fn ftruncate64(fd: ::c_int, length: ::off64_t) -> ::c_int { - ::ftruncate(fd, length) +pub unsafe extern "C" fn ftruncate64(fd: c_int, length: off64_t) -> c_int { + crate::ftruncate(fd, length) } #[inline] -pub unsafe extern "C" fn getrlimit64(resource: ::c_int, rlim: *mut ::rlimit64) -> ::c_int { - ::getrlimit(resource, rlim as *mut _) +pub unsafe extern "C" fn getrlimit64(resource: c_int, rlim: *mut crate::rlimit64) -> c_int { + crate::getrlimit(resource, rlim as *mut _) } #[inline] -pub unsafe extern "C" fn lseek64(fd: ::c_int, offset: ::off64_t, whence: ::c_int) -> ::off64_t { - ::lseek(fd, offset, whence) +pub unsafe extern "C" fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> off64_t { + crate::lseek(fd, offset, whence) } #[inline] -pub unsafe extern "C" fn lstat64(path: *const ::c_char, buf: *mut ::stat64) -> ::c_int { - ::lstat(path, buf as *mut _) +pub unsafe extern "C" fn lstat64(path: *const c_char, buf: *mut crate::stat64) -> c_int { + crate::lstat(path, buf as *mut _) } #[inline] pub unsafe extern "C" fn mmap64( - addr: *mut ::c_void, - length: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, - offset: ::off64_t, -) -> *mut ::c_void { - ::mmap(addr, length, prot, flags, fd, offset) + addr: *mut c_void, + length: size_t, + prot: c_int, + flags: c_int, + fd: c_int, + offset: off64_t, +) -> *mut c_void { + crate::mmap(addr, length, prot, flags, fd, offset) } // These functions are variadic in the C ABI since the `mode` argument is "optional". Variadic @@ -114,127 +116,123 @@ pub unsafe extern "C" fn mmap64( // // These aliases are mostly fine though, neither function takes a LFS64-namespaced type as an // argument, nor do their names clash with any declared types. -pub use {open as open64, openat as openat64}; +pub use crate::{open as open64, openat as openat64}; #[inline] pub unsafe extern "C" fn posix_fadvise64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, - advice: ::c_int, -) -> ::c_int { - ::posix_fadvise(fd, offset, len, advice) + fd: c_int, + offset: off64_t, + len: off64_t, + advice: c_int, +) -> c_int { + crate::posix_fadvise(fd, offset, len, advice) } #[inline] -pub unsafe extern "C" fn posix_fallocate64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, -) -> ::c_int { - ::posix_fallocate(fd, offset, len) +pub unsafe extern "C" fn posix_fallocate64(fd: c_int, offset: off64_t, len: off64_t) -> c_int { + crate::posix_fallocate(fd, offset, len) } #[inline] pub unsafe extern "C" fn pread64( - fd: ::c_int, - buf: *mut ::c_void, - count: ::size_t, - offset: ::off64_t, -) -> ::ssize_t { - ::pread(fd, buf, count, offset) + fd: c_int, + buf: *mut c_void, + count: size_t, + offset: off64_t, +) -> ssize_t { + crate::pread(fd, buf, count, offset) } #[inline] pub unsafe extern "C" fn preadv64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, -) -> ::ssize_t { - ::preadv(fd, iov, iovcnt, offset) + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, +) -> ssize_t { + crate::preadv(fd, iov, iovcnt, offset) } #[inline] pub unsafe extern "C" fn prlimit64( - pid: ::pid_t, - resource: ::c_int, - new_limit: *const ::rlimit64, - old_limit: *mut ::rlimit64, -) -> ::c_int { - ::prlimit(pid, resource, new_limit as *mut _, old_limit as *mut _) + pid: crate::pid_t, + resource: c_int, + new_limit: *const crate::rlimit64, + old_limit: *mut crate::rlimit64, +) -> c_int { + crate::prlimit(pid, resource, new_limit as *mut _, old_limit as *mut _) } #[inline] pub unsafe extern "C" fn pwrite64( - fd: ::c_int, - buf: *const ::c_void, - count: ::size_t, - offset: ::off64_t, -) -> ::ssize_t { - ::pwrite(fd, buf, count, offset) + fd: c_int, + buf: *const c_void, + count: size_t, + offset: off64_t, +) -> ssize_t { + crate::pwrite(fd, buf, count, offset) } #[inline] pub unsafe extern "C" fn pwritev64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, -) -> ::ssize_t { - ::pwritev(fd, iov, iovcnt, offset) + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, +) -> ssize_t { + crate::pwritev(fd, iov, iovcnt, offset) } #[inline] -pub unsafe extern "C" fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64 { - ::readdir(dirp) as *mut _ +pub unsafe extern "C" fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64 { + crate::readdir(dirp) as *mut _ } #[inline] pub unsafe extern "C" fn readdir64_r( - dirp: *mut ::DIR, - entry: *mut ::dirent64, - result: *mut *mut ::dirent64, -) -> ::c_int { - ::readdir_r(dirp, entry as *mut _, result as *mut _) + dirp: *mut crate::DIR, + entry: *mut crate::dirent64, + result: *mut *mut crate::dirent64, +) -> c_int { + crate::readdir_r(dirp, entry as *mut _, result as *mut _) } #[inline] pub unsafe extern "C" fn sendfile64( - out_fd: ::c_int, - in_fd: ::c_int, - offset: *mut ::off64_t, - count: ::size_t, -) -> ::ssize_t { - ::sendfile(out_fd, in_fd, offset, count) + out_fd: c_int, + in_fd: c_int, + offset: *mut off64_t, + count: size_t, +) -> ssize_t { + crate::sendfile(out_fd, in_fd, offset, count) } #[inline] -pub unsafe extern "C" fn setrlimit64(resource: ::c_int, rlim: *const ::rlimit64) -> ::c_int { - ::setrlimit(resource, rlim as *mut _) +pub unsafe extern "C" fn setrlimit64(resource: c_int, rlim: *const crate::rlimit64) -> c_int { + crate::setrlimit(resource, rlim as *mut _) } #[inline] -pub unsafe extern "C" fn stat64(pathname: *const ::c_char, statbuf: *mut ::stat64) -> ::c_int { - ::stat(pathname, statbuf as *mut _) +pub unsafe extern "C" fn stat64(pathname: *const c_char, statbuf: *mut crate::stat64) -> c_int { + crate::stat(pathname, statbuf as *mut _) } #[inline] -pub unsafe extern "C" fn statfs64(pathname: *const ::c_char, buf: *mut ::statfs64) -> ::c_int { - ::statfs(pathname, buf as *mut _) +pub unsafe extern "C" fn statfs64(pathname: *const c_char, buf: *mut crate::statfs64) -> c_int { + crate::statfs(pathname, buf as *mut _) } #[inline] -pub unsafe extern "C" fn statvfs64(path: *const ::c_char, buf: *mut ::statvfs64) -> ::c_int { - ::statvfs(path, buf as *mut _) +pub unsafe extern "C" fn statvfs64(path: *const c_char, buf: *mut crate::statvfs64) -> c_int { + crate::statvfs(path, buf as *mut _) } #[inline] -pub unsafe extern "C" fn tmpfile64() -> *mut ::FILE { - ::tmpfile() +pub unsafe extern "C" fn tmpfile64() -> *mut crate::FILE { + crate::tmpfile() } #[inline] -pub unsafe extern "C" fn truncate64(path: *const ::c_char, length: ::off64_t) -> ::c_int { - ::truncate(path, length) +pub unsafe extern "C" fn truncate64(path: *const c_char, length: off64_t) -> c_int { + crate::truncate(path, length) } diff --git a/src/unix/linux_like/linux/musl/mod.rs b/src/unix/linux_like/linux/musl/mod.rs index 0708ba745c5ab..8b750d0cf4a61 100644 --- a/src/unix/linux_like/linux/musl/mod.rs +++ b/src/unix/linux_like/linux/musl/mod.rs @@ -1,4 +1,8 @@ -pub type pthread_t = *mut ::c_void; +use crate::{ + c_int, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t, ssize_t, +}; + +pub type pthread_t = *mut c_void; pub type clock_t = c_long; #[cfg_attr( not(feature = "rustc-dep-of-std"), @@ -15,46 +19,46 @@ pub type ino_t = u64; pub type off_t = i64; pub type blkcnt_t = i64; -pub type shmatt_t = ::c_ulong; -pub type msgqnum_t = ::c_ulong; -pub type msglen_t = ::c_ulong; -pub type fsblkcnt_t = ::c_ulonglong; -pub type fsblkcnt64_t = ::c_ulonglong; -pub type fsfilcnt_t = ::c_ulonglong; -pub type fsfilcnt64_t = ::c_ulonglong; -pub type rlim_t = ::c_ulonglong; +pub type shmatt_t = c_ulong; +pub type msgqnum_t = c_ulong; +pub type msglen_t = c_ulong; +pub type fsblkcnt_t = c_ulonglong; +pub type fsblkcnt64_t = c_ulonglong; +pub type fsfilcnt_t = c_ulonglong; +pub type fsfilcnt64_t = c_ulonglong; +pub type rlim_t = c_ulonglong; cfg_if! { if #[cfg(doc)] { // Used in `linux::arch` to define ioctl constants. - pub(crate) type Ioctl = ::c_int; + pub(crate) type Ioctl = c_int; } else { #[doc(hidden)] - pub type Ioctl = ::c_int; + pub type Ioctl = c_int; } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { #[repr(C)] struct siginfo_sigfault { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - si_addr: *mut ::c_void, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + si_addr: *mut c_void, } (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_si_value { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - _si_timerid: ::c_int, - _si_overrun: ::c_int, - si_value: ::sigval, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + _si_timerid: c_int, + _si_overrun: c_int, + si_value: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_si_value)).si_value } @@ -63,14 +67,14 @@ impl siginfo_t { // Internal, for casts to access union fields #[repr(C)] struct sifields_sigchld { - si_pid: ::pid_t, - si_uid: ::uid_t, - si_status: ::c_int, - si_utime: ::c_long, - si_stime: ::c_long, + si_pid: crate::pid_t, + si_uid: crate::uid_t, + si_status: c_int, + si_utime: c_long, + si_stime: c_long, } -impl ::Copy for sifields_sigchld {} -impl ::Clone for sifields_sigchld { +impl Copy for sifields_sigchld {} +impl Clone for sifields_sigchld { fn clone(&self) -> sifields_sigchld { *self } @@ -79,7 +83,7 @@ impl ::Clone for sifields_sigchld { // Internal, for casts to access union fields #[repr(C)] union sifields { - _align_pointer: *mut ::c_void, + _align_pointer: *mut c_void, sigchld: sifields_sigchld, } @@ -88,7 +92,7 @@ union sifields { // sifields vary on 32-bit and 64-bit architectures. #[repr(C)] struct siginfo_f { - _siginfo_base: [::c_int; 3], + _siginfo_base: [c_int; 3], sifields: sifields, } @@ -97,33 +101,33 @@ impl siginfo_t { &(*(self as *const siginfo_t as *const siginfo_f)).sifields } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.sifields().sigchld.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.sifields().sigchld.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.sifields().sigchld.si_status } - pub unsafe fn si_utime(&self) -> ::c_long { + pub unsafe fn si_utime(&self) -> c_long { self.sifields().sigchld.si_utime } - pub unsafe fn si_stime(&self) -> ::c_long { + pub unsafe fn si_stime(&self) -> c_long { self.sifields().sigchld.si_stime } } s! { pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, + pub sa_restorer: Option, } // `mips*` targets swap the `s_errno` and `s_code` fields otherwise this struct is @@ -131,181 +135,181 @@ s! { // // FIXME(union): C implementation uses unions pub struct siginfo_t { - pub si_signo: ::c_int, + pub si_signo: c_int, #[cfg(not(target_arch = "mips"))] - pub si_errno: ::c_int, - pub si_code: ::c_int, + pub si_errno: c_int, + pub si_code: c_int, #[cfg(target_arch = "mips")] - pub si_errno: ::c_int, + pub si_errno: c_int, #[doc(hidden)] #[deprecated( since = "0.2.54", note = "Please leave a comment on https://github.com/rust-lang/libc/pull/1316 \ if you're using this field" )] - pub _pad: [::c_int; 29], + pub _pad: [c_int; 29], _align: [usize; 0], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, #[cfg(target_endian = "little")] - pub f_fsid: ::c_ulong, + pub f_fsid: c_ulong, #[cfg(target_pointer_width = "32")] - __pad: ::c_int, + __pad: c_int, #[cfg(target_endian = "big")] - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_reserved: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_reserved: [c_int; 6], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_favail: ::fsfilcnt64_t, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_favail: crate::fsfilcnt64_t, #[cfg(target_endian = "little")] - pub f_fsid: ::c_ulong, + pub f_fsid: c_ulong, #[cfg(target_pointer_width = "32")] - __pad: ::c_int, + __pad: c_int, #[cfg(target_endian = "big")] - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_reserved: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_reserved: [c_int; 6], } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - pub __c_ispeed: ::speed_t, - pub __c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub __c_ispeed: crate::speed_t, + pub __c_ospeed: crate::speed_t, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct flock64 { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off64_t, - pub l_len: ::off64_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off64_t, + pub l_len: off64_t, + pub l_pid: crate::pid_t, } pub struct regex_t { - __re_nsub: ::size_t, - __opaque: *mut ::c_void, - __padding: [*mut ::c_void; 4usize], - __nsub2: ::size_t, - __padding2: ::c_char, + __re_nsub: size_t, + __opaque: *mut c_void, + __padding: [*mut c_void; 4usize], + __nsub2: size_t, + __padding2: c_char, } pub struct rtentry { - pub rt_pad1: ::c_ulong, - pub rt_dst: ::sockaddr, - pub rt_gateway: ::sockaddr, - pub rt_genmask: ::sockaddr, - pub rt_flags: ::c_ushort, - pub rt_pad2: ::c_short, - pub rt_pad3: ::c_ulong, - pub rt_tos: ::c_uchar, - pub rt_class: ::c_uchar, + pub rt_pad1: c_ulong, + pub rt_dst: crate::sockaddr, + pub rt_gateway: crate::sockaddr, + pub rt_genmask: crate::sockaddr, + pub rt_flags: c_ushort, + pub rt_pad2: c_short, + pub rt_pad3: c_ulong, + pub rt_tos: c_uchar, + pub rt_class: c_uchar, #[cfg(target_pointer_width = "64")] - pub rt_pad4: [::c_short; 3usize], + pub rt_pad4: [c_short; 3usize], #[cfg(not(target_pointer_width = "64"))] - pub rt_pad4: [::c_short; 1usize], - pub rt_metric: ::c_short, - pub rt_dev: *mut ::c_char, - pub rt_mtu: ::c_ulong, - pub rt_window: ::c_ulong, - pub rt_irtt: ::c_ushort, + pub rt_pad4: [c_short; 1usize], + pub rt_metric: c_short, + pub rt_dev: *mut c_char, + pub rt_mtu: c_ulong, + pub rt_window: c_ulong, + pub rt_irtt: c_ushort, } pub struct __exit_status { - pub e_termination: ::c_short, - pub e_exit: ::c_short, + pub e_termination: c_short, + pub e_exit: c_short, } pub struct Elf64_Chdr { - pub ch_type: ::Elf64_Word, - pub ch_reserved: ::Elf64_Word, - pub ch_size: ::Elf64_Xword, - pub ch_addralign: ::Elf64_Xword, + pub ch_type: crate::Elf64_Word, + pub ch_reserved: crate::Elf64_Word, + pub ch_size: crate::Elf64_Xword, + pub ch_addralign: crate::Elf64_Xword, } pub struct Elf32_Chdr { - pub ch_type: ::Elf32_Word, - pub ch_size: ::Elf32_Word, - pub ch_addralign: ::Elf32_Word, + pub ch_type: crate::Elf32_Word, + pub ch_size: crate::Elf32_Word, + pub ch_addralign: crate::Elf32_Word, } pub struct timex { - pub modes: ::c_uint, - pub offset: ::c_long, - pub freq: ::c_long, - pub maxerror: ::c_long, - pub esterror: ::c_long, - pub status: ::c_int, - pub constant: ::c_long, - pub precision: ::c_long, - pub tolerance: ::c_long, - pub time: ::timeval, - pub tick: ::c_long, - pub ppsfreq: ::c_long, - pub jitter: ::c_long, - pub shift: ::c_int, - pub stabil: ::c_long, - pub jitcnt: ::c_long, - pub calcnt: ::c_long, - pub errcnt: ::c_long, - pub stbcnt: ::c_long, - pub tai: ::c_int, - pub __padding: [::c_int; 11], + pub modes: c_uint, + pub offset: c_long, + pub freq: c_long, + pub maxerror: c_long, + pub esterror: c_long, + pub status: c_int, + pub constant: c_long, + pub precision: c_long, + pub tolerance: c_long, + pub time: crate::timeval, + pub tick: c_long, + pub ppsfreq: c_long, + pub jitter: c_long, + pub shift: c_int, + pub stabil: c_long, + pub jitcnt: c_long, + pub calcnt: c_long, + pub errcnt: c_long, + pub stbcnt: c_long, + pub tai: c_int, + pub __padding: [c_int; 11], } pub struct ntptimeval { - pub time: ::timeval, - pub maxerror: ::c_long, - pub esterror: ::c_long, + pub time: crate::timeval, + pub maxerror: c_long, + pub esterror: c_long, } // linux/if_xdp.h pub struct sockaddr_xdp { - pub sxdp_family: ::__u16, - pub sxdp_flags: ::__u16, - pub sxdp_ifindex: ::__u32, - pub sxdp_queue_id: ::__u32, - pub sxdp_shared_umem_fd: ::__u32, + pub sxdp_family: crate::__u16, + pub sxdp_flags: crate::__u16, + pub sxdp_ifindex: crate::__u32, + pub sxdp_queue_id: crate::__u32, + pub sxdp_shared_umem_fd: crate::__u32, } pub struct xdp_ring_offset { - pub producer: ::__u64, - pub consumer: ::__u64, - pub desc: ::__u64, - pub flags: ::__u64, + pub producer: crate::__u64, + pub consumer: crate::__u64, + pub desc: crate::__u64, + pub flags: crate::__u64, } pub struct xdp_mmap_offsets { @@ -316,9 +320,9 @@ s! { } pub struct xdp_ring_offset_v1 { - pub producer: ::__u64, - pub consumer: ::__u64, - pub desc: ::__u64, + pub producer: crate::__u64, + pub consumer: crate::__u64, + pub desc: crate::__u64, } pub struct xdp_mmap_offsets_v1 { @@ -329,44 +333,44 @@ s! { } pub struct xdp_umem_reg { - pub addr: ::__u64, - pub len: ::__u64, - pub chunk_size: ::__u32, - pub headroom: ::__u32, - pub flags: ::__u32, - pub tx_metadata_len: ::__u32, + pub addr: crate::__u64, + pub len: crate::__u64, + pub chunk_size: crate::__u32, + pub headroom: crate::__u32, + pub flags: crate::__u32, + pub tx_metadata_len: crate::__u32, } pub struct xdp_umem_reg_v1 { - pub addr: ::__u64, - pub len: ::__u64, - pub chunk_size: ::__u32, - pub headroom: ::__u32, + pub addr: crate::__u64, + pub len: crate::__u64, + pub chunk_size: crate::__u32, + pub headroom: crate::__u32, } pub struct xdp_statistics { - pub rx_dropped: ::__u64, - pub rx_invalid_descs: ::__u64, - pub tx_invalid_descs: ::__u64, - pub rx_ring_full: ::__u64, - pub rx_fill_ring_empty_descs: ::__u64, - pub tx_ring_empty_descs: ::__u64, + pub rx_dropped: crate::__u64, + pub rx_invalid_descs: crate::__u64, + pub tx_invalid_descs: crate::__u64, + pub rx_ring_full: crate::__u64, + pub rx_fill_ring_empty_descs: crate::__u64, + pub tx_ring_empty_descs: crate::__u64, } pub struct xdp_statistics_v1 { - pub rx_dropped: ::__u64, - pub rx_invalid_descs: ::__u64, - pub tx_invalid_descs: ::__u64, + pub rx_dropped: crate::__u64, + pub rx_invalid_descs: crate::__u64, + pub tx_invalid_descs: crate::__u64, } pub struct xdp_options { - pub flags: ::__u32, + pub flags: crate::__u32, } pub struct xdp_desc { - pub addr: ::__u64, - pub len: ::__u32, - pub options: ::__u32, + pub addr: crate::__u64, + pub len: crate::__u32, + pub options: crate::__u32, } // netinet/tcp.h @@ -443,76 +447,76 @@ s! { // MIPS implementation is special (see mips arch folders) #[cfg(not(target_arch = "mips"))] pub struct statfs { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_frsize: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 4], } // MIPS implementation is special (see mips arch folders) #[cfg(not(target_arch = "mips"))] pub struct statfs64 { - pub f_type: ::c_ulong, - pub f_bsize: ::c_ulong, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_flags: ::c_ulong, - pub f_spare: [::c_ulong; 4], + pub f_type: c_ulong, + pub f_bsize: c_ulong, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_ulong, + pub f_frsize: c_ulong, + pub f_flags: c_ulong, + pub f_spare: [c_ulong; 4], } } s_no_extra_traits! { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_lio_opcode: ::c_int, - pub aio_reqprio: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_sigevent: ::sigevent, - __td: *mut ::c_void, - __lock: [::c_int; 2], - __err: ::c_int, - __ret: ::ssize_t, + pub aio_fildes: c_int, + pub aio_lio_opcode: c_int, + pub aio_reqprio: c_int, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_sigevent: crate::sigevent, + __td: *mut c_void, + __lock: [c_int; 2], + __err: c_int, + __ret: ssize_t, pub aio_offset: off_t, - __next: *mut ::c_void, - __prev: *mut ::c_void, + __next: *mut c_void, + __prev: *mut c_void, // FIXME(ctest): length should be `32 - 2 * core::mem::size_of::<*const ()>()` #[cfg(target_pointer_width = "32")] - __dummy4: [::c_char; 24], + __dummy4: [c_char; 24], #[cfg(target_pointer_width = "64")] - __dummy4: [::c_char; 16], + __dummy4: [c_char; 16], } pub struct sysinfo { - pub uptime: ::c_ulong, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub __reserved: [::c_char; 256], + pub uptime: c_ulong, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub __reserved: [c_char; 256], } // FIXME: musl added paddings and adjusted @@ -523,44 +527,44 @@ s_no_extra_traits! { // // OpenHarmony uses the musl 1.2 layout. pub struct utmpx { - pub ut_type: ::c_short, - __ut_pad1: ::c_short, - pub ut_pid: ::pid_t, - pub ut_line: [::c_char; 32], - pub ut_id: [::c_char; 4], - pub ut_user: [::c_char; 32], - pub ut_host: [::c_char; 256], + pub ut_type: c_short, + __ut_pad1: c_short, + pub ut_pid: crate::pid_t, + pub ut_line: [c_char; 32], + pub ut_id: [c_char; 4], + pub ut_user: [c_char; 32], + pub ut_host: [c_char; 256], pub ut_exit: __exit_status, #[cfg(target_env = "musl")] #[cfg(not(target_arch = "loongarch64"))] - pub ut_session: ::c_long, + pub ut_session: c_long, #[cfg(target_env = "musl")] #[cfg(target_arch = "loongarch64")] - pub ut_session: ::c_int, + pub ut_session: c_int, #[cfg(target_env = "musl")] #[cfg(target_arch = "loongarch64")] - __ut_pad2: ::c_int, + __ut_pad2: c_int, #[cfg(target_env = "ohos")] #[cfg(target_endian = "little")] - pub ut_session: ::c_int, + pub ut_session: c_int, #[cfg(target_env = "ohos")] #[cfg(target_endian = "little")] - __ut_pad2: ::c_int, + __ut_pad2: c_int, #[cfg(target_env = "ohos")] #[cfg(not(target_endian = "little"))] - __ut_pad2: ::c_int, + __ut_pad2: c_int, #[cfg(target_env = "ohos")] #[cfg(not(target_endian = "little"))] - pub ut_session: ::c_int, + pub ut_session: c_int, - pub ut_tv: ::timeval, - pub ut_addr_v6: [::c_uint; 4], - __unused: [::c_char; 20], + pub ut_tv: crate::timeval, + pub ut_addr_v6: [c_uint; 4], + __unused: [c_char; 20], } } @@ -591,8 +595,8 @@ cfg_if! { impl Eq for sysinfo {} - impl ::fmt::Debug for sysinfo { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sysinfo { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sysinfo") .field("uptime", &self.uptime) .field("loads", &self.loads) @@ -612,8 +616,8 @@ cfg_if! { } } - impl ::hash::Hash for sysinfo { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sysinfo { + fn hash(&self, state: &mut H) { self.uptime.hash(state); self.loads.hash(state); self.totalram.hash(state); @@ -655,8 +659,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_type", &self.ut_type) //.field("__ut_pad1", &self.__ut_pad1) @@ -675,8 +679,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_type.hash(state); //self.__ut_pad1.hash(state); self.ut_pid.hash(state); @@ -703,102 +707,102 @@ cfg_if! { * responsibility of the application to know which sizes are supported on * the running system. See mmap(2) man page for details. */ -pub const MAP_HUGE_SHIFT: ::c_int = 26; -pub const MAP_HUGE_MASK: ::c_int = 0x3f; - -pub const MAP_HUGE_64KB: ::c_int = 16 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_512KB: ::c_int = 19 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_1MB: ::c_int = 20 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_2MB: ::c_int = 21 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_8MB: ::c_int = 23 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_16MB: ::c_int = 24 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_32MB: ::c_int = 25 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_256MB: ::c_int = 28 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_512MB: ::c_int = 29 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_1GB: ::c_int = 30 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_2GB: ::c_int = 31 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT; - -pub const MS_RMT_MASK: ::c_ulong = 0x02800051; +pub const MAP_HUGE_SHIFT: c_int = 26; +pub const MAP_HUGE_MASK: c_int = 0x3f; + +pub const MAP_HUGE_64KB: c_int = 16 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_512KB: c_int = 19 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_1MB: c_int = 20 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_2MB: c_int = 21 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_8MB: c_int = 23 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_16MB: c_int = 24 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_32MB: c_int = 25 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_256MB: c_int = 28 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_512MB: c_int = 29 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_1GB: c_int = 30 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_2GB: c_int = 31 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_16GB: c_int = 34 << MAP_HUGE_SHIFT; + +pub const MS_RMT_MASK: c_ulong = 0x02800051; // include/utmpx.h -pub const EMPTY: ::c_short = 0; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const NEW_TIME: ::c_short = 3; -pub const OLD_TIME: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; +pub const EMPTY: c_short = 0; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const NEW_TIME: c_short = 3; +pub const OLD_TIME: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; // musl does not define ACCOUNTING -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_CLOEXEC: ::c_int = 0x80000; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; - -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; - -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; - -pub const F_RDLCK: ::c_int = 0; -pub const F_WRLCK: ::c_int = 1; -pub const F_UNLCK: ::c_int = 2; - -pub const SA_NODEFER: ::c_int = 0x40000000; -pub const SA_RESETHAND: ::c_int = 0x80000000; -pub const SA_RESTART: ::c_int = 0x10000000; -pub const SA_NOCLDSTOP: ::c_int = 0x00000001; - -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; - -pub const EFD_CLOEXEC: ::c_int = 0x80000; - -pub const BUFSIZ: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 10000; -pub const FOPEN_MAX: ::c_uint = 1000; -pub const FILENAME_MAX: ::c_uint = 4096; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_EXEC: ::c_int = 0o10000000; -pub const O_SEARCH: ::c_int = 0o10000000; -pub const O_ACCMODE: ::c_int = 0o10000003; -pub const O_NDELAY: ::c_int = O_NONBLOCK; -pub const NI_MAXHOST: ::socklen_t = 255; -pub const PTHREAD_STACK_MIN: ::size_t = 2048; - -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; - -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_DCCP: ::c_int = 6; -pub const SOCK_NONBLOCK: ::c_int = O_NONBLOCK; -pub const SOCK_PACKET: ::c_int = 10; - -pub const SOMAXCONN: ::c_int = 128; +pub const O_TRUNC: c_int = 512; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_CLOEXEC: c_int = 0x80000; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; + +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; + +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; + +pub const F_RDLCK: c_int = 0; +pub const F_WRLCK: c_int = 1; +pub const F_UNLCK: c_int = 2; + +pub const SA_NODEFER: c_int = 0x40000000; +pub const SA_RESETHAND: c_int = 0x80000000; +pub const SA_RESTART: c_int = 0x10000000; +pub const SA_NOCLDSTOP: c_int = 0x00000001; + +pub const EPOLL_CLOEXEC: c_int = 0x80000; + +pub const EFD_CLOEXEC: c_int = 0x80000; + +pub const BUFSIZ: c_uint = 1024; +pub const TMP_MAX: c_uint = 10000; +pub const FOPEN_MAX: c_uint = 1000; +pub const FILENAME_MAX: c_uint = 4096; +pub const O_PATH: c_int = 0o10000000; +pub const O_EXEC: c_int = 0o10000000; +pub const O_SEARCH: c_int = 0o10000000; +pub const O_ACCMODE: c_int = 0o10000003; +pub const O_NDELAY: c_int = O_NONBLOCK; +pub const NI_MAXHOST: crate::socklen_t = 255; +pub const PTHREAD_STACK_MIN: size_t = 2048; + +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const MAP_ANONYMOUS: c_int = MAP_ANON; + +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_DCCP: c_int = 6; +pub const SOCK_NONBLOCK: c_int = O_NONBLOCK; +pub const SOCK_PACKET: c_int = 10; + +pub const SOMAXCONN: c_int = 128; #[deprecated(since = "0.2.55", note = "Use SIGSYS instead")] -pub const SIGUNUSED: ::c_int = ::SIGSYS; +pub const SIGUNUSED: c_int = crate::SIGSYS; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; @@ -806,140 +810,140 @@ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; #[cfg(not(target_arch = "loongarch64"))] -pub const CPU_SETSIZE: ::c_int = 128; +pub const CPU_SETSIZE: c_int = 128; #[cfg(target_arch = "loongarch64")] -pub const CPU_SETSIZE: ::c_int = 1024; - -pub const PTRACE_TRACEME: ::c_int = 0; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_GETREGS: ::c_int = 12; -pub const PTRACE_SETREGS: ::c_int = 13; -pub const PTRACE_GETFPREGS: ::c_int = 14; -pub const PTRACE_SETFPREGS: ::c_int = 15; -pub const PTRACE_ATTACH: ::c_int = 16; -pub const PTRACE_DETACH: ::c_int = 17; -pub const PTRACE_GETFPXREGS: ::c_int = 18; -pub const PTRACE_SETFPXREGS: ::c_int = 19; -pub const PTRACE_SYSCALL: ::c_int = 24; -pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; -pub const PTRACE_GETREGSET: ::c_int = 0x4204; -pub const PTRACE_SETREGSET: ::c_int = 0x4205; -pub const PTRACE_SEIZE: ::c_int = 0x4206; -pub const PTRACE_INTERRUPT: ::c_int = 0x4207; -pub const PTRACE_LISTEN: ::c_int = 0x4208; -pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209; -pub const PTRACE_GETSIGMASK: ::c_uint = 0x420a; -pub const PTRACE_SETSIGMASK: ::c_uint = 0x420b; - -pub const RWF_HIPRI: ::c_int = 0x00000001; -pub const RWF_DSYNC: ::c_int = 0x00000002; -pub const RWF_SYNC: ::c_int = 0x00000004; -pub const RWF_NOWAIT: ::c_int = 0x00000008; -pub const RWF_APPEND: ::c_int = 0x00000010; - -pub const AF_IB: ::c_int = 27; -pub const AF_MPLS: ::c_int = 28; -pub const AF_NFC: ::c_int = 39; -pub const AF_VSOCK: ::c_int = 40; -pub const AF_XDP: ::c_int = 44; -pub const PF_IB: ::c_int = AF_IB; -pub const PF_MPLS: ::c_int = AF_MPLS; -pub const PF_NFC: ::c_int = AF_NFC; -pub const PF_VSOCK: ::c_int = AF_VSOCK; -pub const PF_XDP: ::c_int = AF_XDP; - -pub const EFD_NONBLOCK: ::c_int = ::O_NONBLOCK; - -pub const SFD_NONBLOCK: ::c_int = ::O_NONBLOCK; - -pub const PIDFD_NONBLOCK: ::c_uint = O_NONBLOCK as ::c_uint; - -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; - -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_NOLOAD: ::c_int = 0x4; - -pub const CLOCK_SGI_CYCLE: ::clockid_t = 10; - -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const EXTA: ::speed_t = B19200; -pub const EXTB: ::speed_t = B38400; - -pub const REG_OK: ::c_int = 0; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; - -pub const ADJ_OFFSET: ::c_uint = 0x0001; -pub const ADJ_FREQUENCY: ::c_uint = 0x0002; -pub const ADJ_MAXERROR: ::c_uint = 0x0004; -pub const ADJ_ESTERROR: ::c_uint = 0x0008; -pub const ADJ_STATUS: ::c_uint = 0x0010; -pub const ADJ_TIMECONST: ::c_uint = 0x0020; -pub const ADJ_TAI: ::c_uint = 0x0080; -pub const ADJ_SETOFFSET: ::c_uint = 0x0100; -pub const ADJ_MICRO: ::c_uint = 0x1000; -pub const ADJ_NANO: ::c_uint = 0x2000; -pub const ADJ_TICK: ::c_uint = 0x4000; -pub const ADJ_OFFSET_SINGLESHOT: ::c_uint = 0x8001; -pub const ADJ_OFFSET_SS_READ: ::c_uint = 0xa001; -pub const MOD_OFFSET: ::c_uint = ADJ_OFFSET; -pub const MOD_FREQUENCY: ::c_uint = ADJ_FREQUENCY; -pub const MOD_MAXERROR: ::c_uint = ADJ_MAXERROR; -pub const MOD_ESTERROR: ::c_uint = ADJ_ESTERROR; -pub const MOD_STATUS: ::c_uint = ADJ_STATUS; -pub const MOD_TIMECONST: ::c_uint = ADJ_TIMECONST; -pub const MOD_CLKB: ::c_uint = ADJ_TICK; -pub const MOD_CLKA: ::c_uint = ADJ_OFFSET_SINGLESHOT; -pub const MOD_TAI: ::c_uint = ADJ_TAI; -pub const MOD_MICRO: ::c_uint = ADJ_MICRO; -pub const MOD_NANO: ::c_uint = ADJ_NANO; -pub const STA_PLL: ::c_int = 0x0001; -pub const STA_PPSFREQ: ::c_int = 0x0002; -pub const STA_PPSTIME: ::c_int = 0x0004; -pub const STA_FLL: ::c_int = 0x0008; -pub const STA_INS: ::c_int = 0x0010; -pub const STA_DEL: ::c_int = 0x0020; -pub const STA_UNSYNC: ::c_int = 0x0040; -pub const STA_FREQHOLD: ::c_int = 0x0080; -pub const STA_PPSSIGNAL: ::c_int = 0x0100; -pub const STA_PPSJITTER: ::c_int = 0x0200; -pub const STA_PPSWANDER: ::c_int = 0x0400; -pub const STA_PPSERROR: ::c_int = 0x0800; -pub const STA_CLOCKERR: ::c_int = 0x1000; -pub const STA_NANO: ::c_int = 0x2000; -pub const STA_MODE: ::c_int = 0x4000; -pub const STA_CLK: ::c_int = 0x8000; -pub const STA_RONLY: ::c_int = STA_PPSSIGNAL +pub const CPU_SETSIZE: c_int = 1024; + +pub const PTRACE_TRACEME: c_int = 0; +pub const PTRACE_PEEKTEXT: c_int = 1; +pub const PTRACE_PEEKDATA: c_int = 2; +pub const PTRACE_PEEKUSER: c_int = 3; +pub const PTRACE_POKETEXT: c_int = 4; +pub const PTRACE_POKEDATA: c_int = 5; +pub const PTRACE_POKEUSER: c_int = 6; +pub const PTRACE_CONT: c_int = 7; +pub const PTRACE_KILL: c_int = 8; +pub const PTRACE_SINGLESTEP: c_int = 9; +pub const PTRACE_GETREGS: c_int = 12; +pub const PTRACE_SETREGS: c_int = 13; +pub const PTRACE_GETFPREGS: c_int = 14; +pub const PTRACE_SETFPREGS: c_int = 15; +pub const PTRACE_ATTACH: c_int = 16; +pub const PTRACE_DETACH: c_int = 17; +pub const PTRACE_GETFPXREGS: c_int = 18; +pub const PTRACE_SETFPXREGS: c_int = 19; +pub const PTRACE_SYSCALL: c_int = 24; +pub const PTRACE_SETOPTIONS: c_int = 0x4200; +pub const PTRACE_GETEVENTMSG: c_int = 0x4201; +pub const PTRACE_GETSIGINFO: c_int = 0x4202; +pub const PTRACE_SETSIGINFO: c_int = 0x4203; +pub const PTRACE_GETREGSET: c_int = 0x4204; +pub const PTRACE_SETREGSET: c_int = 0x4205; +pub const PTRACE_SEIZE: c_int = 0x4206; +pub const PTRACE_INTERRUPT: c_int = 0x4207; +pub const PTRACE_LISTEN: c_int = 0x4208; +pub const PTRACE_PEEKSIGINFO: c_int = 0x4209; +pub const PTRACE_GETSIGMASK: c_uint = 0x420a; +pub const PTRACE_SETSIGMASK: c_uint = 0x420b; + +pub const RWF_HIPRI: c_int = 0x00000001; +pub const RWF_DSYNC: c_int = 0x00000002; +pub const RWF_SYNC: c_int = 0x00000004; +pub const RWF_NOWAIT: c_int = 0x00000008; +pub const RWF_APPEND: c_int = 0x00000010; + +pub const AF_IB: c_int = 27; +pub const AF_MPLS: c_int = 28; +pub const AF_NFC: c_int = 39; +pub const AF_VSOCK: c_int = 40; +pub const AF_XDP: c_int = 44; +pub const PF_IB: c_int = AF_IB; +pub const PF_MPLS: c_int = AF_MPLS; +pub const PF_NFC: c_int = AF_NFC; +pub const PF_VSOCK: c_int = AF_VSOCK; +pub const PF_XDP: c_int = AF_XDP; + +pub const EFD_NONBLOCK: c_int = crate::O_NONBLOCK; + +pub const SFD_NONBLOCK: c_int = crate::O_NONBLOCK; + +pub const PIDFD_NONBLOCK: c_uint = O_NONBLOCK as c_uint; + +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; + +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_NOLOAD: c_int = 0x4; + +pub const CLOCK_SGI_CYCLE: crate::clockid_t = 10; + +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const EXTA: crate::speed_t = B19200; +pub const EXTB: crate::speed_t = B38400; + +pub const REG_OK: c_int = 0; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; + +pub const ADJ_OFFSET: c_uint = 0x0001; +pub const ADJ_FREQUENCY: c_uint = 0x0002; +pub const ADJ_MAXERROR: c_uint = 0x0004; +pub const ADJ_ESTERROR: c_uint = 0x0008; +pub const ADJ_STATUS: c_uint = 0x0010; +pub const ADJ_TIMECONST: c_uint = 0x0020; +pub const ADJ_TAI: c_uint = 0x0080; +pub const ADJ_SETOFFSET: c_uint = 0x0100; +pub const ADJ_MICRO: c_uint = 0x1000; +pub const ADJ_NANO: c_uint = 0x2000; +pub const ADJ_TICK: c_uint = 0x4000; +pub const ADJ_OFFSET_SINGLESHOT: c_uint = 0x8001; +pub const ADJ_OFFSET_SS_READ: c_uint = 0xa001; +pub const MOD_OFFSET: c_uint = ADJ_OFFSET; +pub const MOD_FREQUENCY: c_uint = ADJ_FREQUENCY; +pub const MOD_MAXERROR: c_uint = ADJ_MAXERROR; +pub const MOD_ESTERROR: c_uint = ADJ_ESTERROR; +pub const MOD_STATUS: c_uint = ADJ_STATUS; +pub const MOD_TIMECONST: c_uint = ADJ_TIMECONST; +pub const MOD_CLKB: c_uint = ADJ_TICK; +pub const MOD_CLKA: c_uint = ADJ_OFFSET_SINGLESHOT; +pub const MOD_TAI: c_uint = ADJ_TAI; +pub const MOD_MICRO: c_uint = ADJ_MICRO; +pub const MOD_NANO: c_uint = ADJ_NANO; +pub const STA_PLL: c_int = 0x0001; +pub const STA_PPSFREQ: c_int = 0x0002; +pub const STA_PPSTIME: c_int = 0x0004; +pub const STA_FLL: c_int = 0x0008; +pub const STA_INS: c_int = 0x0010; +pub const STA_DEL: c_int = 0x0020; +pub const STA_UNSYNC: c_int = 0x0040; +pub const STA_FREQHOLD: c_int = 0x0080; +pub const STA_PPSSIGNAL: c_int = 0x0100; +pub const STA_PPSJITTER: c_int = 0x0200; +pub const STA_PPSWANDER: c_int = 0x0400; +pub const STA_PPSERROR: c_int = 0x0800; +pub const STA_CLOCKERR: c_int = 0x1000; +pub const STA_NANO: c_int = 0x2000; +pub const STA_MODE: c_int = 0x4000; +pub const STA_CLK: c_int = 0x8000; +pub const STA_RONLY: c_int = STA_PPSSIGNAL | STA_PPSJITTER | STA_PPSWANDER | STA_PPSERROR @@ -948,147 +952,147 @@ pub const STA_RONLY: ::c_int = STA_PPSSIGNAL | STA_MODE | STA_CLK; -pub const TIME_OK: ::c_int = 0; -pub const TIME_INS: ::c_int = 1; -pub const TIME_DEL: ::c_int = 2; -pub const TIME_OOP: ::c_int = 3; -pub const TIME_WAIT: ::c_int = 4; -pub const TIME_ERROR: ::c_int = 5; -pub const TIME_BAD: ::c_int = TIME_ERROR; -pub const MAXTC: ::c_long = 6; +pub const TIME_OK: c_int = 0; +pub const TIME_INS: c_int = 1; +pub const TIME_DEL: c_int = 2; +pub const TIME_OOP: c_int = 3; +pub const TIME_WAIT: c_int = 4; +pub const TIME_ERROR: c_int = 5; +pub const TIME_BAD: c_int = TIME_ERROR; +pub const MAXTC: c_long = 6; -pub const SOL_XDP: ::c_int = 283; +pub const SOL_XDP: c_int = 283; // linux/if_xdp.h -pub const XDP_SHARED_UMEM: ::__u16 = 1 << 0; -pub const XDP_COPY: ::__u16 = 1 << 1; -pub const XDP_ZEROCOPY: ::__u16 = 1 << 2; -pub const XDP_USE_NEED_WAKEUP: ::__u16 = 1 << 3; -pub const XDP_USE_SG: ::__u16 = 1 << 4; +pub const XDP_SHARED_UMEM: crate::__u16 = 1 << 0; +pub const XDP_COPY: crate::__u16 = 1 << 1; +pub const XDP_ZEROCOPY: crate::__u16 = 1 << 2; +pub const XDP_USE_NEED_WAKEUP: crate::__u16 = 1 << 3; +pub const XDP_USE_SG: crate::__u16 = 1 << 4; -pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: ::__u32 = 1 << 0; +pub const XDP_UMEM_UNALIGNED_CHUNK_FLAG: crate::__u32 = 1 << 0; -pub const XDP_RING_NEED_WAKEUP: ::__u32 = 1 << 0; +pub const XDP_RING_NEED_WAKEUP: crate::__u32 = 1 << 0; -pub const XDP_MMAP_OFFSETS: ::c_int = 1; -pub const XDP_RX_RING: ::c_int = 2; -pub const XDP_TX_RING: ::c_int = 3; -pub const XDP_UMEM_REG: ::c_int = 4; -pub const XDP_UMEM_FILL_RING: ::c_int = 5; -pub const XDP_UMEM_COMPLETION_RING: ::c_int = 6; -pub const XDP_STATISTICS: ::c_int = 7; -pub const XDP_OPTIONS: ::c_int = 8; +pub const XDP_MMAP_OFFSETS: c_int = 1; +pub const XDP_RX_RING: c_int = 2; +pub const XDP_TX_RING: c_int = 3; +pub const XDP_UMEM_REG: c_int = 4; +pub const XDP_UMEM_FILL_RING: c_int = 5; +pub const XDP_UMEM_COMPLETION_RING: c_int = 6; +pub const XDP_STATISTICS: c_int = 7; +pub const XDP_OPTIONS: c_int = 8; -pub const XDP_OPTIONS_ZEROCOPY: ::__u32 = 1 << 0; +pub const XDP_OPTIONS_ZEROCOPY: crate::__u32 = 1 << 0; -pub const XDP_PGOFF_RX_RING: ::off_t = 0; -pub const XDP_PGOFF_TX_RING: ::off_t = 0x80000000; -pub const XDP_UMEM_PGOFF_FILL_RING: ::c_ulonglong = 0x100000000; -pub const XDP_UMEM_PGOFF_COMPLETION_RING: ::c_ulonglong = 0x180000000; +pub const XDP_PGOFF_RX_RING: off_t = 0; +pub const XDP_PGOFF_TX_RING: off_t = 0x80000000; +pub const XDP_UMEM_PGOFF_FILL_RING: c_ulonglong = 0x100000000; +pub const XDP_UMEM_PGOFF_COMPLETION_RING: c_ulonglong = 0x180000000; -pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: ::c_int = 48; -pub const XSK_UNALIGNED_BUF_ADDR_MASK: ::c_ulonglong = (1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1; +pub const XSK_UNALIGNED_BUF_OFFSET_SHIFT: c_int = 48; +pub const XSK_UNALIGNED_BUF_ADDR_MASK: c_ulonglong = (1 << XSK_UNALIGNED_BUF_OFFSET_SHIFT) - 1; -pub const XDP_PKT_CONTD: ::__u32 = 1 << 0; +pub const XDP_PKT_CONTD: crate::__u32 = 1 << 0; -pub const _CS_V6_ENV: ::c_int = 1148; -pub const _CS_V7_ENV: ::c_int = 1149; +pub const _CS_V6_ENV: c_int = 1148; +pub const _CS_V7_ENV: c_int = 1149; cfg_if! { if #[cfg(target_arch = "s390x")] { - pub const POSIX_FADV_DONTNEED: ::c_int = 6; - pub const POSIX_FADV_NOREUSE: ::c_int = 7; + pub const POSIX_FADV_DONTNEED: c_int = 6; + pub const POSIX_FADV_NOREUSE: c_int = 7; } else { - pub const POSIX_FADV_DONTNEED: ::c_int = 4; - pub const POSIX_FADV_NOREUSE: ::c_int = 5; + pub const POSIX_FADV_DONTNEED: c_int = 4; + pub const POSIX_FADV_NOREUSE: c_int = 5; } } extern "C" { pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_uint, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + ) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_uint, - timeout: *mut ::timespec, - ) -> ::c_int; - - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + timeout: *mut crate::timespec, + ) -> c_int; + + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; pub fn prlimit( - pid: ::pid_t, - resource: ::c_int, - new_limit: *const ::rlimit, - old_limit: *mut ::rlimit, - ) -> ::c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn ptrace(request: ::c_int, ...) -> ::c_long; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; + pid: crate::pid_t, + resource: c_int, + new_limit: *const crate::rlimit, + old_limit: *mut crate::rlimit, + ) -> c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn ptrace(request: c_int, ...) -> c_long; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; // Musl targets need the `mask` argument of `fanotify_mark` be specified - // `::c_ulonglong` instead of `u64` or there will be a type mismatch between + // `c_ulonglong` instead of `u64` or there will be a type mismatch between // `long long unsigned int` and the expected `uint64_t`. pub fn fanotify_mark( - fd: ::c_int, - flags: ::c_uint, - mask: ::c_ulonglong, - dirfd: ::c_int, - path: *const ::c_char, - ) -> ::c_int; + fd: c_int, + flags: c_uint, + mask: c_ulonglong, + dirfd: c_int, + path: *const c_char, + ) -> c_int; pub fn preadv2( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t, - flags: ::c_int, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + flags: c_int, + ) -> ssize_t; pub fn pwritev2( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off_t, - flags: ::c_int, - ) -> ::ssize_t; - pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off_t, + flags: c_int, + ) -> ssize_t; + pub fn getauxval(type_: c_ulong) -> c_ulong; // Added in `musl` 1.1.20 - pub fn explicit_bzero(s: *mut ::c_void, len: ::size_t); + pub fn explicit_bzero(s: *mut c_void, len: size_t); // Added in `musl` 1.2.2 - pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; - pub fn adjtimex(buf: *mut ::timex) -> ::c_int; - pub fn clock_adjtime(clk_id: ::clockid_t, buf: *mut ::timex) -> ::c_int; + pub fn adjtimex(buf: *mut crate::timex) -> c_int; + pub fn clock_adjtime(clk_id: crate::clockid_t, buf: *mut crate::timex) -> c_int; - pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; + pub fn ctermid(s: *mut c_char) -> *mut c_char; - pub fn memfd_create(name: *const ::c_char, flags: ::c_uint) -> ::c_int; - pub fn mlock2(addr: *const ::c_void, len: ::size_t, flags: ::c_uint) -> ::c_int; - pub fn malloc_usable_size(ptr: *mut ::c_void) -> ::size_t; + pub fn memfd_create(name: *const c_char, flags: c_uint) -> c_int; + pub fn mlock2(addr: *const c_void, len: size_t, flags: c_uint) -> c_int; + pub fn malloc_usable_size(ptr: *mut c_void) -> size_t; - pub fn euidaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; - pub fn eaccess(pathname: *const ::c_char, mode: ::c_int) -> ::c_int; + pub fn euidaccess(pathname: *const c_char, mode: c_int) -> c_int; + pub fn eaccess(pathname: *const c_char, mode: c_int) -> c_int; - pub fn asctime_r(tm: *const ::tm, buf: *mut ::c_char) -> *mut ::c_char; + pub fn asctime_r(tm: *const crate::tm, buf: *mut c_char) -> *mut c_char; - pub fn dirname(path: *mut ::c_char) -> *mut ::c_char; - pub fn basename(path: *mut ::c_char) -> *mut ::c_char; + pub fn dirname(path: *mut c_char) -> *mut c_char; + pub fn basename(path: *mut c_char) -> *mut c_char; // Added in `musl` 1.1.24 pub fn posix_spawn_file_actions_addchdir_np( - actions: *mut ::posix_spawn_file_actions_t, - path: *const ::c_char, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + path: *const c_char, + ) -> c_int; // Added in `musl` 1.1.24 pub fn posix_spawn_file_actions_addfchdir_np( - actions: *mut ::posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + actions: *mut crate::posix_spawn_file_actions_t, + fd: c_int, + ) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; diff --git a/src/unix/linux_like/linux/uclibc/arm/mod.rs b/src/unix/linux_like/linux/uclibc/arm/mod.rs index cf8cdf694584c..5991d4651c1bb 100644 --- a/src/unix/linux_like/linux/uclibc/arm/mod.rs +++ b/src/unix/linux_like/linux/uclibc/arm/mod.rs @@ -1,244 +1,246 @@ +use crate::{c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t}; + pub type c_char = u8; -pub type wchar_t = ::c_uint; +pub type wchar_t = c_uint; pub type c_long = i32; pub type c_ulong = u32; -pub type time_t = ::c_long; +pub type time_t = c_long; -pub type clock_t = ::c_long; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type ino_t = ::c_ulong; -pub type off_t = ::c_long; -pub type pthread_t = ::c_ulong; -pub type suseconds_t = ::c_long; +pub type clock_t = c_long; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; +pub type ino_t = c_ulong; +pub type off_t = c_long; +pub type pthread_t = c_ulong; +pub type suseconds_t = c_long; -pub type nlink_t = ::c_uint; -pub type blksize_t = ::c_long; -pub type blkcnt_t = ::c_long; +pub type nlink_t = c_uint; +pub type blksize_t = c_long; +pub type blkcnt_t = c_long; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; s! { pub struct cmsghdr { - pub cmsg_len: ::size_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: size_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct pthread_attr_t { - __size: [::c_long; 9], + __size: [c_long; 9], } pub struct stat { - pub st_dev: ::c_ulonglong, - __pad1: ::c_ushort, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulonglong, - __pad2: ::c_ushort, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub st_dev: c_ulonglong, + __pad1: c_ushort, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulonglong, + __pad2: c_ushort, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct stat64 { - pub st_dev: ::c_ulonglong, - pub __pad1: ::c_uint, - pub __st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulonglong, - pub __pad2: ::c_uint, - pub st_size: ::off64_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_ino: ::ino64_t, + pub st_dev: c_ulonglong, + pub __pad1: c_uint, + pub __st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulonglong, + pub __pad2: c_uint, + pub st_size: off64_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_ino: crate::ino64_t, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, } pub struct sysinfo { - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 8], + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 8], } pub struct statfs { - pub f_type: ::c_int, - pub f_bsize: ::c_int, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_int, - pub f_frsize: ::c_int, - pub f_flags: ::c_int, - pub f_spare: [::c_int; 4], + pub f_type: c_int, + pub f_bsize: c_int, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + + pub f_fsid: crate::fsid_t, + pub f_namelen: c_int, + pub f_frsize: c_int, + pub f_flags: c_int, + pub f_spare: [c_int; 4], } pub struct statfs64 { - pub f_type: ::c_int, - pub f_bsize: ::c_int, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_int, - pub f_frsize: ::c_int, - pub f_flags: ::c_int, - pub f_spare: [::c_int; 4], + pub f_type: c_int, + pub f_bsize: c_int, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_int, + pub f_frsize: c_int, + pub f_flags: c_int, + pub f_spare: [c_int; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct sigset_t { - __val: [::c_ulong; 2], + __val: [c_ulong; 2], } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_flags: ::c_ulong, - pub sa_restorer: ::Option, + pub sa_sigaction: crate::sighandler_t, + pub sa_flags: c_ulong, + pub sa_restorer: Option, pub sa_mask: sigset_t, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - pub _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + pub _pad: [c_int; 29], } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - __unused1: ::c_ulong, - pub msg_rtime: ::time_t, - __unused2: ::c_ulong, - pub msg_ctime: ::time_t, - __unused3: ::c_ulong, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + __unused1: c_ulong, + pub msg_rtime: crate::time_t, + __unused2: c_ulong, + pub msg_ctime: crate::time_t, + __unused3: c_ulong, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - __unused1: ::c_ulong, - pub shm_dtime: ::time_t, - __unused2: ::c_ulong, - pub shm_ctime: ::time_t, - __unused3: ::c_ulong, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + __unused1: c_ulong, + pub shm_dtime: crate::time_t, + __unused2: c_ulong, + pub shm_ctime: crate::time_t, + __unused3: c_ulong, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } // FIXME(1.0) this is actually a union @@ -246,13 +248,13 @@ s! { #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct sem_t { #[cfg(target_pointer_width = "32")] - __size: [::c_char; 16], + __size: [c_char; 16], #[cfg(target_pointer_width = "64")] - __size: [::c_char; 32], + __size: [c_char; 32], } } -pub const O_CLOEXEC: ::c_int = 0o2000000; +pub const O_CLOEXEC: c_int = 0o2000000; pub const __SIZEOF_PTHREAD_ATTR_T: usize = 36; pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 24; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; @@ -266,264 +268,264 @@ pub const NCCS: usize = 32; // I wasn't able to find those constants // in uclibc build environment for armv7 -pub const MAP_HUGETLB: ::c_int = 0x040000; // from linux/other/mod.rs +pub const MAP_HUGETLB: c_int = 0x040000; // from linux/other/mod.rs // autogenerated constants with hand tuned types -pub const B0: ::speed_t = 0; -pub const B1000000: ::speed_t = 0x1008; -pub const B110: ::speed_t = 0x3; -pub const B115200: ::speed_t = 0x1002; -pub const B1152000: ::speed_t = 0x1009; -pub const B1200: ::speed_t = 0x9; -pub const B134: ::speed_t = 0x4; -pub const B150: ::speed_t = 0x5; -pub const B1500000: ::speed_t = 0x100a; -pub const B1800: ::speed_t = 0xa; -pub const B19200: ::speed_t = 0xe; -pub const B200: ::speed_t = 0x6; -pub const B2000000: ::speed_t = 0x100b; -pub const B230400: ::speed_t = 0x1003; -pub const B2400: ::speed_t = 0xb; -pub const B2500000: ::speed_t = 0x100c; -pub const B300: ::speed_t = 0x7; -pub const B3000000: ::speed_t = 0x100d; -pub const B3500000: ::speed_t = 0x100e; -pub const B38400: ::speed_t = 0xf; -pub const B4000000: ::speed_t = 0x100f; -pub const B460800: ::speed_t = 0x1004; -pub const B4800: ::speed_t = 0xc; -pub const B50: ::speed_t = 0x1; -pub const B500000: ::speed_t = 0x1005; -pub const B57600: ::speed_t = 0x1001; -pub const B576000: ::speed_t = 0x1006; -pub const B600: ::speed_t = 0x8; -pub const B75: ::speed_t = 0x2; -pub const B921600: ::speed_t = 0x1007; -pub const B9600: ::speed_t = 0xd; -pub const BS1: ::c_int = 0x2000; -pub const BSDLY: ::c_int = 0x2000; -pub const CBAUD: ::tcflag_t = 0x100f; -pub const CBAUDEX: ::tcflag_t = 0x1000; -pub const CIBAUD: ::tcflag_t = 0x100f0000; -pub const CLOCAL: ::tcflag_t = 0x800; -pub const CPU_SETSIZE: ::c_int = 0x400; -pub const CR1: ::c_int = 0x200; -pub const CR2: ::c_int = 0x400; -pub const CR3: ::c_int = 0x600; -pub const CRDLY: ::c_int = 0x600; -pub const CREAD: ::tcflag_t = 0x80; -pub const CS6: ::tcflag_t = 0x10; -pub const CS7: ::tcflag_t = 0x20; -pub const CS8: ::tcflag_t = 0x30; -pub const CSIZE: ::tcflag_t = 0x30; -pub const CSTOPB: ::tcflag_t = 0x40; -pub const EADDRINUSE: ::c_int = 0x62; -pub const EADDRNOTAVAIL: ::c_int = 0x63; -pub const EADV: ::c_int = 0x44; -pub const EAFNOSUPPORT: ::c_int = 0x61; -pub const EALREADY: ::c_int = 0x72; -pub const EBADE: ::c_int = 0x34; -pub const EBADFD: ::c_int = 0x4d; -pub const EBADMSG: ::c_int = 0x4a; -pub const EBADR: ::c_int = 0x35; -pub const EBADRQC: ::c_int = 0x38; -pub const EBADSLT: ::c_int = 0x39; -pub const EBFONT: ::c_int = 0x3b; -pub const ECANCELED: ::c_int = 0x7d; -pub const ECHOCTL: ::tcflag_t = 0x200; -pub const ECHOE: ::tcflag_t = 0x10; -pub const ECHOK: ::tcflag_t = 0x20; -pub const ECHOKE: ::tcflag_t = 0x800; -pub const ECHONL: ::tcflag_t = 0x40; -pub const ECHOPRT: ::tcflag_t = 0x400; -pub const ECHRNG: ::c_int = 0x2c; -pub const ECOMM: ::c_int = 0x46; -pub const ECONNABORTED: ::c_int = 0x67; -pub const ECONNREFUSED: ::c_int = 0x6f; -pub const ECONNRESET: ::c_int = 0x68; -pub const EDEADLK: ::c_int = 0x23; -pub const EDESTADDRREQ: ::c_int = 0x59; -pub const EDOTDOT: ::c_int = 0x49; -pub const EDQUOT: ::c_int = 0x7a; -pub const EFD_CLOEXEC: ::c_int = 0x80000; -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const EHOSTDOWN: ::c_int = 0x70; -pub const EHOSTUNREACH: ::c_int = 0x71; -pub const EHWPOISON: ::c_int = 0x85; -pub const EIDRM: ::c_int = 0x2b; -pub const EILSEQ: ::c_int = 0x54; -pub const EINPROGRESS: ::c_int = 0x73; -pub const EISCONN: ::c_int = 0x6a; -pub const EISNAM: ::c_int = 0x78; -pub const EKEYEXPIRED: ::c_int = 0x7f; -pub const EKEYREJECTED: ::c_int = 0x81; -pub const EKEYREVOKED: ::c_int = 0x80; -pub const EL2HLT: ::c_int = 0x33; -pub const EL2NSYNC: ::c_int = 0x2d; -pub const EL3HLT: ::c_int = 0x2e; -pub const EL3RST: ::c_int = 0x2f; -pub const ELIBACC: ::c_int = 0x4f; -pub const ELIBBAD: ::c_int = 0x50; -pub const ELIBEXEC: ::c_int = 0x53; -pub const ELIBMAX: ::c_int = 0x52; -pub const ELIBSCN: ::c_int = 0x51; -pub const ELNRNG: ::c_int = 0x30; -pub const ELOOP: ::c_int = 0x28; -pub const EMEDIUMTYPE: ::c_int = 0x7c; -pub const EMSGSIZE: ::c_int = 0x5a; -pub const EMULTIHOP: ::c_int = 0x48; -pub const ENAMETOOLONG: ::c_int = 0x24; -pub const ENAVAIL: ::c_int = 0x77; -pub const ENETDOWN: ::c_int = 0x64; -pub const ENETRESET: ::c_int = 0x66; -pub const ENETUNREACH: ::c_int = 0x65; -pub const ENOANO: ::c_int = 0x37; -pub const ENOBUFS: ::c_int = 0x69; -pub const ENOCSI: ::c_int = 0x32; -pub const ENODATA: ::c_int = 0x3d; -pub const ENOKEY: ::c_int = 0x7e; -pub const ENOLCK: ::c_int = 0x25; -pub const ENOLINK: ::c_int = 0x43; -pub const ENOMEDIUM: ::c_int = 0x7b; -pub const ENOMSG: ::c_int = 0x2a; -pub const ENONET: ::c_int = 0x40; -pub const ENOPKG: ::c_int = 0x41; -pub const ENOPROTOOPT: ::c_int = 0x5c; -pub const ENOSR: ::c_int = 0x3f; -pub const ENOSTR: ::c_int = 0x3c; -pub const ENOSYS: ::c_int = 0x26; -pub const ENOTCONN: ::c_int = 0x6b; -pub const ENOTEMPTY: ::c_int = 0x27; -pub const ENOTNAM: ::c_int = 0x76; -pub const ENOTRECOVERABLE: ::c_int = 0x83; -pub const ENOTSOCK: ::c_int = 0x58; -pub const ENOTUNIQ: ::c_int = 0x4c; -pub const EOPNOTSUPP: ::c_int = 0x5f; -pub const EOVERFLOW: ::c_int = 0x4b; -pub const EOWNERDEAD: ::c_int = 0x82; -pub const EPFNOSUPPORT: ::c_int = 0x60; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; -pub const EPROTO: ::c_int = 0x47; -pub const EPROTONOSUPPORT: ::c_int = 0x5d; -pub const EPROTOTYPE: ::c_int = 0x5b; -pub const EREMCHG: ::c_int = 0x4e; -pub const EREMOTE: ::c_int = 0x42; -pub const EREMOTEIO: ::c_int = 0x79; -pub const ERESTART: ::c_int = 0x55; -pub const ERFKILL: ::c_int = 0x84; -pub const ESHUTDOWN: ::c_int = 0x6c; -pub const ESOCKTNOSUPPORT: ::c_int = 0x5e; -pub const ESRMNT: ::c_int = 0x45; -pub const ESTALE: ::c_int = 0x74; -pub const ESTRPIPE: ::c_int = 0x56; -pub const ETIME: ::c_int = 0x3e; -pub const ETIMEDOUT: ::c_int = 0x6e; -pub const ETOOMANYREFS: ::c_int = 0x6d; -pub const EUCLEAN: ::c_int = 0x75; -pub const EUNATCH: ::c_int = 0x31; -pub const EUSERS: ::c_int = 0x57; -pub const EXFULL: ::c_int = 0x36; -pub const FF1: ::c_int = 0x8000; -pub const FFDLY: ::c_int = 0x8000; -pub const FLUSHO: ::tcflag_t = 0x1000; -pub const F_GETLK: ::c_int = 0x5; -pub const F_SETLK: ::c_int = 0x6; -pub const F_SETLKW: ::c_int = 0x7; -pub const HUPCL: ::tcflag_t = 0x400; -pub const ICANON: ::tcflag_t = 0x2; -pub const IEXTEN: ::tcflag_t = 0x8000; -pub const ISIG: ::tcflag_t = 0x1; -pub const IXOFF: ::tcflag_t = 0x1000; -pub const IXON: ::tcflag_t = 0x400; -pub const MAP_ANON: ::c_int = 0x20; -pub const MAP_ANONYMOUS: ::c_int = 0x20; -pub const MAP_DENYWRITE: ::c_int = 0x800; -pub const MAP_EXECUTABLE: ::c_int = 0x1000; -pub const MAP_GROWSDOWN: ::c_int = 0x100; -pub const MAP_LOCKED: ::c_int = 0x2000; -pub const MAP_NONBLOCK: ::c_int = 0x10000; -pub const MAP_NORESERVE: ::c_int = 0x4000; -pub const MAP_POPULATE: ::c_int = 0x8000; -pub const MAP_STACK: ::c_int = 0x20000; -pub const NLDLY: ::tcflag_t = 0x100; -pub const NOFLSH: ::tcflag_t = 0x80; -pub const OLCUC: ::tcflag_t = 0x2; -pub const ONLCR: ::tcflag_t = 0x4; -pub const O_ACCMODE: ::c_int = 0x3; -pub const O_APPEND: ::c_int = 0x400; -pub const O_ASYNC: ::c_int = 0o20000; -pub const O_CREAT: ::c_int = 0x40; -pub const O_DIRECT: ::c_int = 0x10000; -pub const O_DIRECTORY: ::c_int = 0x4000; -pub const O_DSYNC: ::c_int = O_SYNC; -pub const O_EXCL: ::c_int = 0x80; -pub const O_FSYNC: ::c_int = O_SYNC; -pub const O_LARGEFILE: ::c_int = 0o400000; -pub const O_NDELAY: ::c_int = O_NONBLOCK; -pub const O_NOATIME: ::c_int = 0o1000000; -pub const O_NOCTTY: ::c_int = 0x100; -pub const O_NOFOLLOW: ::c_int = 0x8000; -pub const O_NONBLOCK: ::c_int = 0x800; -pub const O_PATH: ::c_int = 0o10000000; -pub const O_RSYNC: ::c_int = O_SYNC; -pub const O_SYNC: ::c_int = 0o10000; -pub const O_TRUNC: ::c_int = 0x200; -pub const PARENB: ::tcflag_t = 0x100; -pub const PARODD: ::tcflag_t = 0x200; -pub const PENDIN: ::tcflag_t = 0x4000; -pub const POLLWRBAND: ::c_short = 0x200; -pub const POLLWRNORM: ::c_short = 0x100; -pub const PTHREAD_STACK_MIN: ::size_t = 16384; -pub const RTLD_GLOBAL: ::c_int = 0x00100; -pub const PIDFD_NONBLOCK: ::c_int = 0x800; +pub const B0: crate::speed_t = 0; +pub const B1000000: crate::speed_t = 0x1008; +pub const B110: crate::speed_t = 0x3; +pub const B115200: crate::speed_t = 0x1002; +pub const B1152000: crate::speed_t = 0x1009; +pub const B1200: crate::speed_t = 0x9; +pub const B134: crate::speed_t = 0x4; +pub const B150: crate::speed_t = 0x5; +pub const B1500000: crate::speed_t = 0x100a; +pub const B1800: crate::speed_t = 0xa; +pub const B19200: crate::speed_t = 0xe; +pub const B200: crate::speed_t = 0x6; +pub const B2000000: crate::speed_t = 0x100b; +pub const B230400: crate::speed_t = 0x1003; +pub const B2400: crate::speed_t = 0xb; +pub const B2500000: crate::speed_t = 0x100c; +pub const B300: crate::speed_t = 0x7; +pub const B3000000: crate::speed_t = 0x100d; +pub const B3500000: crate::speed_t = 0x100e; +pub const B38400: crate::speed_t = 0xf; +pub const B4000000: crate::speed_t = 0x100f; +pub const B460800: crate::speed_t = 0x1004; +pub const B4800: crate::speed_t = 0xc; +pub const B50: crate::speed_t = 0x1; +pub const B500000: crate::speed_t = 0x1005; +pub const B57600: crate::speed_t = 0x1001; +pub const B576000: crate::speed_t = 0x1006; +pub const B600: crate::speed_t = 0x8; +pub const B75: crate::speed_t = 0x2; +pub const B921600: crate::speed_t = 0x1007; +pub const B9600: crate::speed_t = 0xd; +pub const BS1: c_int = 0x2000; +pub const BSDLY: c_int = 0x2000; +pub const CBAUD: crate::tcflag_t = 0x100f; +pub const CBAUDEX: crate::tcflag_t = 0x1000; +pub const CIBAUD: crate::tcflag_t = 0x100f0000; +pub const CLOCAL: crate::tcflag_t = 0x800; +pub const CPU_SETSIZE: c_int = 0x400; +pub const CR1: c_int = 0x200; +pub const CR2: c_int = 0x400; +pub const CR3: c_int = 0x600; +pub const CRDLY: c_int = 0x600; +pub const CREAD: crate::tcflag_t = 0x80; +pub const CS6: crate::tcflag_t = 0x10; +pub const CS7: crate::tcflag_t = 0x20; +pub const CS8: crate::tcflag_t = 0x30; +pub const CSIZE: crate::tcflag_t = 0x30; +pub const CSTOPB: crate::tcflag_t = 0x40; +pub const EADDRINUSE: c_int = 0x62; +pub const EADDRNOTAVAIL: c_int = 0x63; +pub const EADV: c_int = 0x44; +pub const EAFNOSUPPORT: c_int = 0x61; +pub const EALREADY: c_int = 0x72; +pub const EBADE: c_int = 0x34; +pub const EBADFD: c_int = 0x4d; +pub const EBADMSG: c_int = 0x4a; +pub const EBADR: c_int = 0x35; +pub const EBADRQC: c_int = 0x38; +pub const EBADSLT: c_int = 0x39; +pub const EBFONT: c_int = 0x3b; +pub const ECANCELED: c_int = 0x7d; +pub const ECHOCTL: crate::tcflag_t = 0x200; +pub const ECHOE: crate::tcflag_t = 0x10; +pub const ECHOK: crate::tcflag_t = 0x20; +pub const ECHOKE: crate::tcflag_t = 0x800; +pub const ECHONL: crate::tcflag_t = 0x40; +pub const ECHOPRT: crate::tcflag_t = 0x400; +pub const ECHRNG: c_int = 0x2c; +pub const ECOMM: c_int = 0x46; +pub const ECONNABORTED: c_int = 0x67; +pub const ECONNREFUSED: c_int = 0x6f; +pub const ECONNRESET: c_int = 0x68; +pub const EDEADLK: c_int = 0x23; +pub const EDESTADDRREQ: c_int = 0x59; +pub const EDOTDOT: c_int = 0x49; +pub const EDQUOT: c_int = 0x7a; +pub const EFD_CLOEXEC: c_int = 0x80000; +pub const EFD_NONBLOCK: c_int = 0x800; +pub const EHOSTDOWN: c_int = 0x70; +pub const EHOSTUNREACH: c_int = 0x71; +pub const EHWPOISON: c_int = 0x85; +pub const EIDRM: c_int = 0x2b; +pub const EILSEQ: c_int = 0x54; +pub const EINPROGRESS: c_int = 0x73; +pub const EISCONN: c_int = 0x6a; +pub const EISNAM: c_int = 0x78; +pub const EKEYEXPIRED: c_int = 0x7f; +pub const EKEYREJECTED: c_int = 0x81; +pub const EKEYREVOKED: c_int = 0x80; +pub const EL2HLT: c_int = 0x33; +pub const EL2NSYNC: c_int = 0x2d; +pub const EL3HLT: c_int = 0x2e; +pub const EL3RST: c_int = 0x2f; +pub const ELIBACC: c_int = 0x4f; +pub const ELIBBAD: c_int = 0x50; +pub const ELIBEXEC: c_int = 0x53; +pub const ELIBMAX: c_int = 0x52; +pub const ELIBSCN: c_int = 0x51; +pub const ELNRNG: c_int = 0x30; +pub const ELOOP: c_int = 0x28; +pub const EMEDIUMTYPE: c_int = 0x7c; +pub const EMSGSIZE: c_int = 0x5a; +pub const EMULTIHOP: c_int = 0x48; +pub const ENAMETOOLONG: c_int = 0x24; +pub const ENAVAIL: c_int = 0x77; +pub const ENETDOWN: c_int = 0x64; +pub const ENETRESET: c_int = 0x66; +pub const ENETUNREACH: c_int = 0x65; +pub const ENOANO: c_int = 0x37; +pub const ENOBUFS: c_int = 0x69; +pub const ENOCSI: c_int = 0x32; +pub const ENODATA: c_int = 0x3d; +pub const ENOKEY: c_int = 0x7e; +pub const ENOLCK: c_int = 0x25; +pub const ENOLINK: c_int = 0x43; +pub const ENOMEDIUM: c_int = 0x7b; +pub const ENOMSG: c_int = 0x2a; +pub const ENONET: c_int = 0x40; +pub const ENOPKG: c_int = 0x41; +pub const ENOPROTOOPT: c_int = 0x5c; +pub const ENOSR: c_int = 0x3f; +pub const ENOSTR: c_int = 0x3c; +pub const ENOSYS: c_int = 0x26; +pub const ENOTCONN: c_int = 0x6b; +pub const ENOTEMPTY: c_int = 0x27; +pub const ENOTNAM: c_int = 0x76; +pub const ENOTRECOVERABLE: c_int = 0x83; +pub const ENOTSOCK: c_int = 0x58; +pub const ENOTUNIQ: c_int = 0x4c; +pub const EOPNOTSUPP: c_int = 0x5f; +pub const EOVERFLOW: c_int = 0x4b; +pub const EOWNERDEAD: c_int = 0x82; +pub const EPFNOSUPPORT: c_int = 0x60; +pub const EPOLL_CLOEXEC: c_int = 0x80000; +pub const EPROTO: c_int = 0x47; +pub const EPROTONOSUPPORT: c_int = 0x5d; +pub const EPROTOTYPE: c_int = 0x5b; +pub const EREMCHG: c_int = 0x4e; +pub const EREMOTE: c_int = 0x42; +pub const EREMOTEIO: c_int = 0x79; +pub const ERESTART: c_int = 0x55; +pub const ERFKILL: c_int = 0x84; +pub const ESHUTDOWN: c_int = 0x6c; +pub const ESOCKTNOSUPPORT: c_int = 0x5e; +pub const ESRMNT: c_int = 0x45; +pub const ESTALE: c_int = 0x74; +pub const ESTRPIPE: c_int = 0x56; +pub const ETIME: c_int = 0x3e; +pub const ETIMEDOUT: c_int = 0x6e; +pub const ETOOMANYREFS: c_int = 0x6d; +pub const EUCLEAN: c_int = 0x75; +pub const EUNATCH: c_int = 0x31; +pub const EUSERS: c_int = 0x57; +pub const EXFULL: c_int = 0x36; +pub const FF1: c_int = 0x8000; +pub const FFDLY: c_int = 0x8000; +pub const FLUSHO: crate::tcflag_t = 0x1000; +pub const F_GETLK: c_int = 0x5; +pub const F_SETLK: c_int = 0x6; +pub const F_SETLKW: c_int = 0x7; +pub const HUPCL: crate::tcflag_t = 0x400; +pub const ICANON: crate::tcflag_t = 0x2; +pub const IEXTEN: crate::tcflag_t = 0x8000; +pub const ISIG: crate::tcflag_t = 0x1; +pub const IXOFF: crate::tcflag_t = 0x1000; +pub const IXON: crate::tcflag_t = 0x400; +pub const MAP_ANON: c_int = 0x20; +pub const MAP_ANONYMOUS: c_int = 0x20; +pub const MAP_DENYWRITE: c_int = 0x800; +pub const MAP_EXECUTABLE: c_int = 0x1000; +pub const MAP_GROWSDOWN: c_int = 0x100; +pub const MAP_LOCKED: c_int = 0x2000; +pub const MAP_NONBLOCK: c_int = 0x10000; +pub const MAP_NORESERVE: c_int = 0x4000; +pub const MAP_POPULATE: c_int = 0x8000; +pub const MAP_STACK: c_int = 0x20000; +pub const NLDLY: crate::tcflag_t = 0x100; +pub const NOFLSH: crate::tcflag_t = 0x80; +pub const OLCUC: crate::tcflag_t = 0x2; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const O_ACCMODE: c_int = 0x3; +pub const O_APPEND: c_int = 0x400; +pub const O_ASYNC: c_int = 0o20000; +pub const O_CREAT: c_int = 0x40; +pub const O_DIRECT: c_int = 0x10000; +pub const O_DIRECTORY: c_int = 0x4000; +pub const O_DSYNC: c_int = O_SYNC; +pub const O_EXCL: c_int = 0x80; +pub const O_FSYNC: c_int = O_SYNC; +pub const O_LARGEFILE: c_int = 0o400000; +pub const O_NDELAY: c_int = O_NONBLOCK; +pub const O_NOATIME: c_int = 0o1000000; +pub const O_NOCTTY: c_int = 0x100; +pub const O_NOFOLLOW: c_int = 0x8000; +pub const O_NONBLOCK: c_int = 0x800; +pub const O_PATH: c_int = 0o10000000; +pub const O_RSYNC: c_int = O_SYNC; +pub const O_SYNC: c_int = 0o10000; +pub const O_TRUNC: c_int = 0x200; +pub const PARENB: crate::tcflag_t = 0x100; +pub const PARODD: crate::tcflag_t = 0x200; +pub const PENDIN: crate::tcflag_t = 0x4000; +pub const POLLWRBAND: c_short = 0x200; +pub const POLLWRNORM: c_short = 0x100; +pub const PTHREAD_STACK_MIN: size_t = 16384; +pub const RTLD_GLOBAL: c_int = 0x00100; +pub const PIDFD_NONBLOCK: c_int = 0x800; // These are typed unsigned to match sigaction -pub const SA_NOCLDSTOP: ::c_ulong = 0x1; -pub const SA_NOCLDWAIT: ::c_ulong = 0x2; -pub const SA_SIGINFO: ::c_ulong = 0x4; -pub const SA_NODEFER: ::c_ulong = 0x40000000; -pub const SA_ONSTACK: ::c_ulong = 0x8000000; -pub const SA_RESETHAND: ::c_ulong = 0x80000000; -pub const SA_RESTART: ::c_ulong = 0x10000000; - -pub const SFD_CLOEXEC: ::c_int = 0x80000; -pub const SFD_NONBLOCK: ::c_int = 0x800; -pub const SIGBUS: ::c_int = 0x7; -pub const SIGCHLD: ::c_int = 0x11; -pub const SIGCONT: ::c_int = 0x12; -pub const SIGIO: ::c_int = 0x1d; -pub const SIGPROF: ::c_int = 0x1b; -pub const SIGPWR: ::c_int = 0x1e; -pub const SIGSTKFLT: ::c_int = 0x10; -pub const SIGSTKSZ: ::size_t = 8192; -pub const SIGSTOP: ::c_int = 0x13; -pub const SIGSYS: ::c_int = 0x1f; -pub const SIGTSTP: ::c_int = 0x14; -pub const SIGTTIN: ::c_int = 0x15; -pub const SIGTTOU: ::c_int = 0x16; -pub const SIGURG: ::c_int = 0x17; -pub const SIGUSR1: ::c_int = 0xa; -pub const SIGUSR2: ::c_int = 0xc; -pub const SIGVTALRM: ::c_int = 0x1a; -pub const SIGWINCH: ::c_int = 0x1c; -pub const SIGXCPU: ::c_int = 0x18; -pub const SIGXFSZ: ::c_int = 0x19; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_SETMASK: ::c_int = 0x2; -pub const SIG_UNBLOCK: ::c_int = 0x1; -pub const SOCK_DGRAM: ::c_int = 0x2; -pub const SOCK_NONBLOCK: ::c_int = 0o0004000; -pub const SOCK_SEQPACKET: ::c_int = 0x5; -pub const SOCK_STREAM: ::c_int = 0x1; - -pub const TAB1: ::c_int = 0x800; -pub const TAB2: ::c_int = 0x1000; -pub const TAB3: ::c_int = 0x1800; -pub const TABDLY: ::c_int = 0x1800; -pub const TCSADRAIN: ::c_int = 0x1; -pub const TCSAFLUSH: ::c_int = 0x2; -pub const TCSANOW: ::c_int = 0; -pub const TOSTOP: ::tcflag_t = 0x100; +pub const SA_NOCLDSTOP: c_ulong = 0x1; +pub const SA_NOCLDWAIT: c_ulong = 0x2; +pub const SA_SIGINFO: c_ulong = 0x4; +pub const SA_NODEFER: c_ulong = 0x40000000; +pub const SA_ONSTACK: c_ulong = 0x8000000; +pub const SA_RESETHAND: c_ulong = 0x80000000; +pub const SA_RESTART: c_ulong = 0x10000000; + +pub const SFD_CLOEXEC: c_int = 0x80000; +pub const SFD_NONBLOCK: c_int = 0x800; +pub const SIGBUS: c_int = 0x7; +pub const SIGCHLD: c_int = 0x11; +pub const SIGCONT: c_int = 0x12; +pub const SIGIO: c_int = 0x1d; +pub const SIGPROF: c_int = 0x1b; +pub const SIGPWR: c_int = 0x1e; +pub const SIGSTKFLT: c_int = 0x10; +pub const SIGSTKSZ: size_t = 8192; +pub const SIGSTOP: c_int = 0x13; +pub const SIGSYS: c_int = 0x1f; +pub const SIGTSTP: c_int = 0x14; +pub const SIGTTIN: c_int = 0x15; +pub const SIGTTOU: c_int = 0x16; +pub const SIGURG: c_int = 0x17; +pub const SIGUSR1: c_int = 0xa; +pub const SIGUSR2: c_int = 0xc; +pub const SIGVTALRM: c_int = 0x1a; +pub const SIGWINCH: c_int = 0x1c; +pub const SIGXCPU: c_int = 0x18; +pub const SIGXFSZ: c_int = 0x19; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_SETMASK: c_int = 0x2; +pub const SIG_UNBLOCK: c_int = 0x1; +pub const SOCK_DGRAM: c_int = 0x2; +pub const SOCK_NONBLOCK: c_int = 0o0004000; +pub const SOCK_SEQPACKET: c_int = 0x5; +pub const SOCK_STREAM: c_int = 0x1; + +pub const TAB1: c_int = 0x800; +pub const TAB2: c_int = 0x1000; +pub const TAB3: c_int = 0x1800; +pub const TABDLY: c_int = 0x1800; +pub const TCSADRAIN: c_int = 0x1; +pub const TCSAFLUSH: c_int = 0x2; +pub const TCSANOW: c_int = 0; +pub const TOSTOP: crate::tcflag_t = 0x100; pub const VDISCARD: usize = 0xd; pub const VEOF: usize = 0x4; pub const VEOL: usize = 0xb; @@ -534,391 +536,391 @@ pub const VSTART: usize = 0x8; pub const VSTOP: usize = 0x9; pub const VSUSP: usize = 0xa; pub const VSWTC: usize = 0x7; -pub const VT1: ::c_int = 0x4000; -pub const VTDLY: ::c_int = 0x4000; +pub const VT1: c_int = 0x4000; +pub const VTDLY: c_int = 0x4000; pub const VTIME: usize = 0x5; pub const VWERASE: usize = 0xe; -pub const XTABS: ::tcflag_t = 0x1800; +pub const XTABS: crate::tcflag_t = 0x1800; -pub const MADV_SOFT_OFFLINE: ::c_int = 101; +pub const MADV_SOFT_OFFLINE: c_int = 101; // Syscall table is copied from src/unix/notbsd/linux/musl/b32/arm.rs -pub const SYS_restart_syscall: ::c_long = 0; -pub const SYS_exit: ::c_long = 1; -pub const SYS_fork: ::c_long = 2; -pub const SYS_read: ::c_long = 3; -pub const SYS_write: ::c_long = 4; -pub const SYS_open: ::c_long = 5; -pub const SYS_close: ::c_long = 6; -pub const SYS_creat: ::c_long = 8; -pub const SYS_link: ::c_long = 9; -pub const SYS_unlink: ::c_long = 10; -pub const SYS_execve: ::c_long = 11; -pub const SYS_chdir: ::c_long = 12; -pub const SYS_mknod: ::c_long = 14; -pub const SYS_chmod: ::c_long = 15; -pub const SYS_lchown: ::c_long = 16; -pub const SYS_lseek: ::c_long = 19; -pub const SYS_getpid: ::c_long = 20; -pub const SYS_mount: ::c_long = 21; -pub const SYS_setuid: ::c_long = 23; -pub const SYS_getuid: ::c_long = 24; -pub const SYS_ptrace: ::c_long = 26; -pub const SYS_pause: ::c_long = 29; -pub const SYS_access: ::c_long = 33; -pub const SYS_nice: ::c_long = 34; -pub const SYS_sync: ::c_long = 36; -pub const SYS_kill: ::c_long = 37; -pub const SYS_rename: ::c_long = 38; -pub const SYS_mkdir: ::c_long = 39; -pub const SYS_rmdir: ::c_long = 40; -pub const SYS_dup: ::c_long = 41; -pub const SYS_pipe: ::c_long = 42; -pub const SYS_times: ::c_long = 43; -pub const SYS_brk: ::c_long = 45; -pub const SYS_setgid: ::c_long = 46; -pub const SYS_getgid: ::c_long = 47; -pub const SYS_geteuid: ::c_long = 49; -pub const SYS_getegid: ::c_long = 50; -pub const SYS_acct: ::c_long = 51; -pub const SYS_umount2: ::c_long = 52; -pub const SYS_ioctl: ::c_long = 54; -pub const SYS_fcntl: ::c_long = 55; -pub const SYS_setpgid: ::c_long = 57; -pub const SYS_umask: ::c_long = 60; -pub const SYS_chroot: ::c_long = 61; -pub const SYS_ustat: ::c_long = 62; -pub const SYS_dup2: ::c_long = 63; -pub const SYS_getppid: ::c_long = 64; -pub const SYS_getpgrp: ::c_long = 65; -pub const SYS_setsid: ::c_long = 66; -pub const SYS_sigaction: ::c_long = 67; -pub const SYS_setreuid: ::c_long = 70; -pub const SYS_setregid: ::c_long = 71; -pub const SYS_sigsuspend: ::c_long = 72; -pub const SYS_sigpending: ::c_long = 73; -pub const SYS_sethostname: ::c_long = 74; -pub const SYS_setrlimit: ::c_long = 75; -pub const SYS_getrusage: ::c_long = 77; -pub const SYS_gettimeofday: ::c_long = 78; -pub const SYS_settimeofday: ::c_long = 79; -pub const SYS_getgroups: ::c_long = 80; -pub const SYS_setgroups: ::c_long = 81; -pub const SYS_symlink: ::c_long = 83; -pub const SYS_readlink: ::c_long = 85; -pub const SYS_uselib: ::c_long = 86; -pub const SYS_swapon: ::c_long = 87; -pub const SYS_reboot: ::c_long = 88; -pub const SYS_munmap: ::c_long = 91; -pub const SYS_truncate: ::c_long = 92; -pub const SYS_ftruncate: ::c_long = 93; -pub const SYS_fchmod: ::c_long = 94; -pub const SYS_fchown: ::c_long = 95; -pub const SYS_getpriority: ::c_long = 96; -pub const SYS_setpriority: ::c_long = 97; -pub const SYS_statfs: ::c_long = 99; -pub const SYS_fstatfs: ::c_long = 100; -pub const SYS_syslog: ::c_long = 103; -pub const SYS_setitimer: ::c_long = 104; -pub const SYS_getitimer: ::c_long = 105; -pub const SYS_stat: ::c_long = 106; -pub const SYS_lstat: ::c_long = 107; -pub const SYS_fstat: ::c_long = 108; -pub const SYS_vhangup: ::c_long = 111; -pub const SYS_wait4: ::c_long = 114; -pub const SYS_swapoff: ::c_long = 115; -pub const SYS_sysinfo: ::c_long = 116; -pub const SYS_fsync: ::c_long = 118; -pub const SYS_sigreturn: ::c_long = 119; -pub const SYS_clone: ::c_long = 120; -pub const SYS_setdomainname: ::c_long = 121; -pub const SYS_uname: ::c_long = 122; -pub const SYS_adjtimex: ::c_long = 124; -pub const SYS_mprotect: ::c_long = 125; -pub const SYS_sigprocmask: ::c_long = 126; -pub const SYS_init_module: ::c_long = 128; -pub const SYS_delete_module: ::c_long = 129; -pub const SYS_quotactl: ::c_long = 131; -pub const SYS_getpgid: ::c_long = 132; -pub const SYS_fchdir: ::c_long = 133; -pub const SYS_bdflush: ::c_long = 134; -pub const SYS_sysfs: ::c_long = 135; -pub const SYS_personality: ::c_long = 136; -pub const SYS_setfsuid: ::c_long = 138; -pub const SYS_setfsgid: ::c_long = 139; -pub const SYS__llseek: ::c_long = 140; -pub const SYS_getdents: ::c_long = 141; -pub const SYS__newselect: ::c_long = 142; -pub const SYS_flock: ::c_long = 143; -pub const SYS_msync: ::c_long = 144; -pub const SYS_readv: ::c_long = 145; -pub const SYS_writev: ::c_long = 146; -pub const SYS_getsid: ::c_long = 147; -pub const SYS_fdatasync: ::c_long = 148; -pub const SYS__sysctl: ::c_long = 149; -pub const SYS_mlock: ::c_long = 150; -pub const SYS_munlock: ::c_long = 151; -pub const SYS_mlockall: ::c_long = 152; -pub const SYS_munlockall: ::c_long = 153; -pub const SYS_sched_setparam: ::c_long = 154; -pub const SYS_sched_getparam: ::c_long = 155; -pub const SYS_sched_setscheduler: ::c_long = 156; -pub const SYS_sched_getscheduler: ::c_long = 157; -pub const SYS_sched_yield: ::c_long = 158; -pub const SYS_sched_get_priority_max: ::c_long = 159; -pub const SYS_sched_get_priority_min: ::c_long = 160; -pub const SYS_sched_rr_get_interval: ::c_long = 161; -pub const SYS_nanosleep: ::c_long = 162; -pub const SYS_mremap: ::c_long = 163; -pub const SYS_setresuid: ::c_long = 164; -pub const SYS_getresuid: ::c_long = 165; -pub const SYS_poll: ::c_long = 168; -pub const SYS_nfsservctl: ::c_long = 169; -pub const SYS_setresgid: ::c_long = 170; -pub const SYS_getresgid: ::c_long = 171; -pub const SYS_prctl: ::c_long = 172; -pub const SYS_rt_sigreturn: ::c_long = 173; -pub const SYS_rt_sigaction: ::c_long = 174; -pub const SYS_rt_sigprocmask: ::c_long = 175; -pub const SYS_rt_sigpending: ::c_long = 176; -pub const SYS_rt_sigtimedwait: ::c_long = 177; -pub const SYS_rt_sigqueueinfo: ::c_long = 178; -pub const SYS_rt_sigsuspend: ::c_long = 179; -pub const SYS_pread64: ::c_long = 180; -pub const SYS_pwrite64: ::c_long = 181; -pub const SYS_chown: ::c_long = 182; -pub const SYS_getcwd: ::c_long = 183; -pub const SYS_capget: ::c_long = 184; -pub const SYS_capset: ::c_long = 185; -pub const SYS_sigaltstack: ::c_long = 186; -pub const SYS_sendfile: ::c_long = 187; -pub const SYS_vfork: ::c_long = 190; -pub const SYS_ugetrlimit: ::c_long = 191; -pub const SYS_mmap2: ::c_long = 192; -pub const SYS_truncate64: ::c_long = 193; -pub const SYS_ftruncate64: ::c_long = 194; -pub const SYS_stat64: ::c_long = 195; -pub const SYS_lstat64: ::c_long = 196; -pub const SYS_fstat64: ::c_long = 197; -pub const SYS_lchown32: ::c_long = 198; -pub const SYS_getuid32: ::c_long = 199; -pub const SYS_getgid32: ::c_long = 200; -pub const SYS_geteuid32: ::c_long = 201; -pub const SYS_getegid32: ::c_long = 202; -pub const SYS_setreuid32: ::c_long = 203; -pub const SYS_setregid32: ::c_long = 204; -pub const SYS_getgroups32: ::c_long = 205; -pub const SYS_setgroups32: ::c_long = 206; -pub const SYS_fchown32: ::c_long = 207; -pub const SYS_setresuid32: ::c_long = 208; -pub const SYS_getresuid32: ::c_long = 209; -pub const SYS_setresgid32: ::c_long = 210; -pub const SYS_getresgid32: ::c_long = 211; -pub const SYS_chown32: ::c_long = 212; -pub const SYS_setuid32: ::c_long = 213; -pub const SYS_setgid32: ::c_long = 214; -pub const SYS_setfsuid32: ::c_long = 215; -pub const SYS_setfsgid32: ::c_long = 216; -pub const SYS_getdents64: ::c_long = 217; -pub const SYS_pivot_root: ::c_long = 218; -pub const SYS_mincore: ::c_long = 219; -pub const SYS_madvise: ::c_long = 220; -pub const SYS_fcntl64: ::c_long = 221; -pub const SYS_gettid: ::c_long = 224; -pub const SYS_readahead: ::c_long = 225; -pub const SYS_setxattr: ::c_long = 226; -pub const SYS_lsetxattr: ::c_long = 227; -pub const SYS_fsetxattr: ::c_long = 228; -pub const SYS_getxattr: ::c_long = 229; -pub const SYS_lgetxattr: ::c_long = 230; -pub const SYS_fgetxattr: ::c_long = 231; -pub const SYS_listxattr: ::c_long = 232; -pub const SYS_llistxattr: ::c_long = 233; -pub const SYS_flistxattr: ::c_long = 234; -pub const SYS_removexattr: ::c_long = 235; -pub const SYS_lremovexattr: ::c_long = 236; -pub const SYS_fremovexattr: ::c_long = 237; -pub const SYS_tkill: ::c_long = 238; -pub const SYS_sendfile64: ::c_long = 239; -pub const SYS_futex: ::c_long = 240; -pub const SYS_sched_setaffinity: ::c_long = 241; -pub const SYS_sched_getaffinity: ::c_long = 242; -pub const SYS_io_setup: ::c_long = 243; -pub const SYS_io_destroy: ::c_long = 244; -pub const SYS_io_getevents: ::c_long = 245; -pub const SYS_io_submit: ::c_long = 246; -pub const SYS_io_cancel: ::c_long = 247; -pub const SYS_exit_group: ::c_long = 248; -pub const SYS_lookup_dcookie: ::c_long = 249; -pub const SYS_epoll_create: ::c_long = 250; -pub const SYS_epoll_ctl: ::c_long = 251; -pub const SYS_epoll_wait: ::c_long = 252; -pub const SYS_remap_file_pages: ::c_long = 253; -pub const SYS_set_tid_address: ::c_long = 256; -pub const SYS_timer_create: ::c_long = 257; -pub const SYS_timer_settime: ::c_long = 258; -pub const SYS_timer_gettime: ::c_long = 259; -pub const SYS_timer_getoverrun: ::c_long = 260; -pub const SYS_timer_delete: ::c_long = 261; -pub const SYS_clock_settime: ::c_long = 262; -pub const SYS_clock_gettime: ::c_long = 263; -pub const SYS_clock_getres: ::c_long = 264; -pub const SYS_clock_nanosleep: ::c_long = 265; -pub const SYS_statfs64: ::c_long = 266; -pub const SYS_fstatfs64: ::c_long = 267; -pub const SYS_tgkill: ::c_long = 268; -pub const SYS_utimes: ::c_long = 269; -pub const SYS_pciconfig_iobase: ::c_long = 271; -pub const SYS_pciconfig_read: ::c_long = 272; -pub const SYS_pciconfig_write: ::c_long = 273; -pub const SYS_mq_open: ::c_long = 274; -pub const SYS_mq_unlink: ::c_long = 275; -pub const SYS_mq_timedsend: ::c_long = 276; -pub const SYS_mq_timedreceive: ::c_long = 277; -pub const SYS_mq_notify: ::c_long = 278; -pub const SYS_mq_getsetattr: ::c_long = 279; -pub const SYS_waitid: ::c_long = 280; -pub const SYS_socket: ::c_long = 281; -pub const SYS_bind: ::c_long = 282; -pub const SYS_connect: ::c_long = 283; -pub const SYS_listen: ::c_long = 284; -pub const SYS_accept: ::c_long = 285; -pub const SYS_getsockname: ::c_long = 286; -pub const SYS_getpeername: ::c_long = 287; -pub const SYS_socketpair: ::c_long = 288; -pub const SYS_send: ::c_long = 289; -pub const SYS_sendto: ::c_long = 290; -pub const SYS_recv: ::c_long = 291; -pub const SYS_recvfrom: ::c_long = 292; -pub const SYS_shutdown: ::c_long = 293; -pub const SYS_setsockopt: ::c_long = 294; -pub const SYS_getsockopt: ::c_long = 295; -pub const SYS_sendmsg: ::c_long = 296; -pub const SYS_recvmsg: ::c_long = 297; -pub const SYS_semop: ::c_long = 298; -pub const SYS_semget: ::c_long = 299; -pub const SYS_semctl: ::c_long = 300; -pub const SYS_msgsnd: ::c_long = 301; -pub const SYS_msgrcv: ::c_long = 302; -pub const SYS_msgget: ::c_long = 303; -pub const SYS_msgctl: ::c_long = 304; -pub const SYS_shmat: ::c_long = 305; -pub const SYS_shmdt: ::c_long = 306; -pub const SYS_shmget: ::c_long = 307; -pub const SYS_shmctl: ::c_long = 308; -pub const SYS_add_key: ::c_long = 309; -pub const SYS_request_key: ::c_long = 310; -pub const SYS_keyctl: ::c_long = 311; -pub const SYS_semtimedop: ::c_long = 312; -pub const SYS_vserver: ::c_long = 313; -pub const SYS_ioprio_set: ::c_long = 314; -pub const SYS_ioprio_get: ::c_long = 315; -pub const SYS_inotify_init: ::c_long = 316; -pub const SYS_inotify_add_watch: ::c_long = 317; -pub const SYS_inotify_rm_watch: ::c_long = 318; -pub const SYS_mbind: ::c_long = 319; -pub const SYS_get_mempolicy: ::c_long = 320; -pub const SYS_set_mempolicy: ::c_long = 321; -pub const SYS_openat: ::c_long = 322; -pub const SYS_mkdirat: ::c_long = 323; -pub const SYS_mknodat: ::c_long = 324; -pub const SYS_fchownat: ::c_long = 325; -pub const SYS_futimesat: ::c_long = 326; -pub const SYS_fstatat64: ::c_long = 327; -pub const SYS_unlinkat: ::c_long = 328; -pub const SYS_renameat: ::c_long = 329; -pub const SYS_linkat: ::c_long = 330; -pub const SYS_symlinkat: ::c_long = 331; -pub const SYS_readlinkat: ::c_long = 332; -pub const SYS_fchmodat: ::c_long = 333; -pub const SYS_faccessat: ::c_long = 334; -pub const SYS_pselect6: ::c_long = 335; -pub const SYS_ppoll: ::c_long = 336; -pub const SYS_unshare: ::c_long = 337; -pub const SYS_set_robust_list: ::c_long = 338; -pub const SYS_get_robust_list: ::c_long = 339; -pub const SYS_splice: ::c_long = 340; -pub const SYS_tee: ::c_long = 342; -pub const SYS_vmsplice: ::c_long = 343; -pub const SYS_move_pages: ::c_long = 344; -pub const SYS_getcpu: ::c_long = 345; -pub const SYS_epoll_pwait: ::c_long = 346; -pub const SYS_kexec_load: ::c_long = 347; -pub const SYS_utimensat: ::c_long = 348; -pub const SYS_signalfd: ::c_long = 349; -pub const SYS_timerfd_create: ::c_long = 350; -pub const SYS_eventfd: ::c_long = 351; -pub const SYS_fallocate: ::c_long = 352; -pub const SYS_timerfd_settime: ::c_long = 353; -pub const SYS_timerfd_gettime: ::c_long = 354; -pub const SYS_signalfd4: ::c_long = 355; -pub const SYS_eventfd2: ::c_long = 356; -pub const SYS_epoll_create1: ::c_long = 357; -pub const SYS_dup3: ::c_long = 358; -pub const SYS_pipe2: ::c_long = 359; -pub const SYS_inotify_init1: ::c_long = 360; -pub const SYS_preadv: ::c_long = 361; -pub const SYS_pwritev: ::c_long = 362; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 363; -pub const SYS_perf_event_open: ::c_long = 364; -pub const SYS_recvmmsg: ::c_long = 365; -pub const SYS_accept4: ::c_long = 366; -pub const SYS_fanotify_init: ::c_long = 367; -pub const SYS_fanotify_mark: ::c_long = 368; -pub const SYS_prlimit64: ::c_long = 369; -pub const SYS_name_to_handle_at: ::c_long = 370; -pub const SYS_open_by_handle_at: ::c_long = 371; -pub const SYS_clock_adjtime: ::c_long = 372; -pub const SYS_syncfs: ::c_long = 373; -pub const SYS_sendmmsg: ::c_long = 374; -pub const SYS_setns: ::c_long = 375; -pub const SYS_process_vm_readv: ::c_long = 376; -pub const SYS_process_vm_writev: ::c_long = 377; -pub const SYS_kcmp: ::c_long = 378; -pub const SYS_finit_module: ::c_long = 379; -pub const SYS_sched_setattr: ::c_long = 380; -pub const SYS_sched_getattr: ::c_long = 381; -pub const SYS_renameat2: ::c_long = 382; -pub const SYS_seccomp: ::c_long = 383; -pub const SYS_getrandom: ::c_long = 384; -pub const SYS_memfd_create: ::c_long = 385; -pub const SYS_bpf: ::c_long = 386; -pub const SYS_execveat: ::c_long = 387; -pub const SYS_userfaultfd: ::c_long = 388; -pub const SYS_membarrier: ::c_long = 389; -pub const SYS_mlock2: ::c_long = 390; -pub const SYS_copy_file_range: ::c_long = 391; -pub const SYS_preadv2: ::c_long = 392; -pub const SYS_pwritev2: ::c_long = 393; -pub const SYS_pkey_mprotect: ::c_long = 394; -pub const SYS_pkey_alloc: ::c_long = 395; -pub const SYS_pkey_free: ::c_long = 396; +pub const SYS_restart_syscall: c_long = 0; +pub const SYS_exit: c_long = 1; +pub const SYS_fork: c_long = 2; +pub const SYS_read: c_long = 3; +pub const SYS_write: c_long = 4; +pub const SYS_open: c_long = 5; +pub const SYS_close: c_long = 6; +pub const SYS_creat: c_long = 8; +pub const SYS_link: c_long = 9; +pub const SYS_unlink: c_long = 10; +pub const SYS_execve: c_long = 11; +pub const SYS_chdir: c_long = 12; +pub const SYS_mknod: c_long = 14; +pub const SYS_chmod: c_long = 15; +pub const SYS_lchown: c_long = 16; +pub const SYS_lseek: c_long = 19; +pub const SYS_getpid: c_long = 20; +pub const SYS_mount: c_long = 21; +pub const SYS_setuid: c_long = 23; +pub const SYS_getuid: c_long = 24; +pub const SYS_ptrace: c_long = 26; +pub const SYS_pause: c_long = 29; +pub const SYS_access: c_long = 33; +pub const SYS_nice: c_long = 34; +pub const SYS_sync: c_long = 36; +pub const SYS_kill: c_long = 37; +pub const SYS_rename: c_long = 38; +pub const SYS_mkdir: c_long = 39; +pub const SYS_rmdir: c_long = 40; +pub const SYS_dup: c_long = 41; +pub const SYS_pipe: c_long = 42; +pub const SYS_times: c_long = 43; +pub const SYS_brk: c_long = 45; +pub const SYS_setgid: c_long = 46; +pub const SYS_getgid: c_long = 47; +pub const SYS_geteuid: c_long = 49; +pub const SYS_getegid: c_long = 50; +pub const SYS_acct: c_long = 51; +pub const SYS_umount2: c_long = 52; +pub const SYS_ioctl: c_long = 54; +pub const SYS_fcntl: c_long = 55; +pub const SYS_setpgid: c_long = 57; +pub const SYS_umask: c_long = 60; +pub const SYS_chroot: c_long = 61; +pub const SYS_ustat: c_long = 62; +pub const SYS_dup2: c_long = 63; +pub const SYS_getppid: c_long = 64; +pub const SYS_getpgrp: c_long = 65; +pub const SYS_setsid: c_long = 66; +pub const SYS_sigaction: c_long = 67; +pub const SYS_setreuid: c_long = 70; +pub const SYS_setregid: c_long = 71; +pub const SYS_sigsuspend: c_long = 72; +pub const SYS_sigpending: c_long = 73; +pub const SYS_sethostname: c_long = 74; +pub const SYS_setrlimit: c_long = 75; +pub const SYS_getrusage: c_long = 77; +pub const SYS_gettimeofday: c_long = 78; +pub const SYS_settimeofday: c_long = 79; +pub const SYS_getgroups: c_long = 80; +pub const SYS_setgroups: c_long = 81; +pub const SYS_symlink: c_long = 83; +pub const SYS_readlink: c_long = 85; +pub const SYS_uselib: c_long = 86; +pub const SYS_swapon: c_long = 87; +pub const SYS_reboot: c_long = 88; +pub const SYS_munmap: c_long = 91; +pub const SYS_truncate: c_long = 92; +pub const SYS_ftruncate: c_long = 93; +pub const SYS_fchmod: c_long = 94; +pub const SYS_fchown: c_long = 95; +pub const SYS_getpriority: c_long = 96; +pub const SYS_setpriority: c_long = 97; +pub const SYS_statfs: c_long = 99; +pub const SYS_fstatfs: c_long = 100; +pub const SYS_syslog: c_long = 103; +pub const SYS_setitimer: c_long = 104; +pub const SYS_getitimer: c_long = 105; +pub const SYS_stat: c_long = 106; +pub const SYS_lstat: c_long = 107; +pub const SYS_fstat: c_long = 108; +pub const SYS_vhangup: c_long = 111; +pub const SYS_wait4: c_long = 114; +pub const SYS_swapoff: c_long = 115; +pub const SYS_sysinfo: c_long = 116; +pub const SYS_fsync: c_long = 118; +pub const SYS_sigreturn: c_long = 119; +pub const SYS_clone: c_long = 120; +pub const SYS_setdomainname: c_long = 121; +pub const SYS_uname: c_long = 122; +pub const SYS_adjtimex: c_long = 124; +pub const SYS_mprotect: c_long = 125; +pub const SYS_sigprocmask: c_long = 126; +pub const SYS_init_module: c_long = 128; +pub const SYS_delete_module: c_long = 129; +pub const SYS_quotactl: c_long = 131; +pub const SYS_getpgid: c_long = 132; +pub const SYS_fchdir: c_long = 133; +pub const SYS_bdflush: c_long = 134; +pub const SYS_sysfs: c_long = 135; +pub const SYS_personality: c_long = 136; +pub const SYS_setfsuid: c_long = 138; +pub const SYS_setfsgid: c_long = 139; +pub const SYS__llseek: c_long = 140; +pub const SYS_getdents: c_long = 141; +pub const SYS__newselect: c_long = 142; +pub const SYS_flock: c_long = 143; +pub const SYS_msync: c_long = 144; +pub const SYS_readv: c_long = 145; +pub const SYS_writev: c_long = 146; +pub const SYS_getsid: c_long = 147; +pub const SYS_fdatasync: c_long = 148; +pub const SYS__sysctl: c_long = 149; +pub const SYS_mlock: c_long = 150; +pub const SYS_munlock: c_long = 151; +pub const SYS_mlockall: c_long = 152; +pub const SYS_munlockall: c_long = 153; +pub const SYS_sched_setparam: c_long = 154; +pub const SYS_sched_getparam: c_long = 155; +pub const SYS_sched_setscheduler: c_long = 156; +pub const SYS_sched_getscheduler: c_long = 157; +pub const SYS_sched_yield: c_long = 158; +pub const SYS_sched_get_priority_max: c_long = 159; +pub const SYS_sched_get_priority_min: c_long = 160; +pub const SYS_sched_rr_get_interval: c_long = 161; +pub const SYS_nanosleep: c_long = 162; +pub const SYS_mremap: c_long = 163; +pub const SYS_setresuid: c_long = 164; +pub const SYS_getresuid: c_long = 165; +pub const SYS_poll: c_long = 168; +pub const SYS_nfsservctl: c_long = 169; +pub const SYS_setresgid: c_long = 170; +pub const SYS_getresgid: c_long = 171; +pub const SYS_prctl: c_long = 172; +pub const SYS_rt_sigreturn: c_long = 173; +pub const SYS_rt_sigaction: c_long = 174; +pub const SYS_rt_sigprocmask: c_long = 175; +pub const SYS_rt_sigpending: c_long = 176; +pub const SYS_rt_sigtimedwait: c_long = 177; +pub const SYS_rt_sigqueueinfo: c_long = 178; +pub const SYS_rt_sigsuspend: c_long = 179; +pub const SYS_pread64: c_long = 180; +pub const SYS_pwrite64: c_long = 181; +pub const SYS_chown: c_long = 182; +pub const SYS_getcwd: c_long = 183; +pub const SYS_capget: c_long = 184; +pub const SYS_capset: c_long = 185; +pub const SYS_sigaltstack: c_long = 186; +pub const SYS_sendfile: c_long = 187; +pub const SYS_vfork: c_long = 190; +pub const SYS_ugetrlimit: c_long = 191; +pub const SYS_mmap2: c_long = 192; +pub const SYS_truncate64: c_long = 193; +pub const SYS_ftruncate64: c_long = 194; +pub const SYS_stat64: c_long = 195; +pub const SYS_lstat64: c_long = 196; +pub const SYS_fstat64: c_long = 197; +pub const SYS_lchown32: c_long = 198; +pub const SYS_getuid32: c_long = 199; +pub const SYS_getgid32: c_long = 200; +pub const SYS_geteuid32: c_long = 201; +pub const SYS_getegid32: c_long = 202; +pub const SYS_setreuid32: c_long = 203; +pub const SYS_setregid32: c_long = 204; +pub const SYS_getgroups32: c_long = 205; +pub const SYS_setgroups32: c_long = 206; +pub const SYS_fchown32: c_long = 207; +pub const SYS_setresuid32: c_long = 208; +pub const SYS_getresuid32: c_long = 209; +pub const SYS_setresgid32: c_long = 210; +pub const SYS_getresgid32: c_long = 211; +pub const SYS_chown32: c_long = 212; +pub const SYS_setuid32: c_long = 213; +pub const SYS_setgid32: c_long = 214; +pub const SYS_setfsuid32: c_long = 215; +pub const SYS_setfsgid32: c_long = 216; +pub const SYS_getdents64: c_long = 217; +pub const SYS_pivot_root: c_long = 218; +pub const SYS_mincore: c_long = 219; +pub const SYS_madvise: c_long = 220; +pub const SYS_fcntl64: c_long = 221; +pub const SYS_gettid: c_long = 224; +pub const SYS_readahead: c_long = 225; +pub const SYS_setxattr: c_long = 226; +pub const SYS_lsetxattr: c_long = 227; +pub const SYS_fsetxattr: c_long = 228; +pub const SYS_getxattr: c_long = 229; +pub const SYS_lgetxattr: c_long = 230; +pub const SYS_fgetxattr: c_long = 231; +pub const SYS_listxattr: c_long = 232; +pub const SYS_llistxattr: c_long = 233; +pub const SYS_flistxattr: c_long = 234; +pub const SYS_removexattr: c_long = 235; +pub const SYS_lremovexattr: c_long = 236; +pub const SYS_fremovexattr: c_long = 237; +pub const SYS_tkill: c_long = 238; +pub const SYS_sendfile64: c_long = 239; +pub const SYS_futex: c_long = 240; +pub const SYS_sched_setaffinity: c_long = 241; +pub const SYS_sched_getaffinity: c_long = 242; +pub const SYS_io_setup: c_long = 243; +pub const SYS_io_destroy: c_long = 244; +pub const SYS_io_getevents: c_long = 245; +pub const SYS_io_submit: c_long = 246; +pub const SYS_io_cancel: c_long = 247; +pub const SYS_exit_group: c_long = 248; +pub const SYS_lookup_dcookie: c_long = 249; +pub const SYS_epoll_create: c_long = 250; +pub const SYS_epoll_ctl: c_long = 251; +pub const SYS_epoll_wait: c_long = 252; +pub const SYS_remap_file_pages: c_long = 253; +pub const SYS_set_tid_address: c_long = 256; +pub const SYS_timer_create: c_long = 257; +pub const SYS_timer_settime: c_long = 258; +pub const SYS_timer_gettime: c_long = 259; +pub const SYS_timer_getoverrun: c_long = 260; +pub const SYS_timer_delete: c_long = 261; +pub const SYS_clock_settime: c_long = 262; +pub const SYS_clock_gettime: c_long = 263; +pub const SYS_clock_getres: c_long = 264; +pub const SYS_clock_nanosleep: c_long = 265; +pub const SYS_statfs64: c_long = 266; +pub const SYS_fstatfs64: c_long = 267; +pub const SYS_tgkill: c_long = 268; +pub const SYS_utimes: c_long = 269; +pub const SYS_pciconfig_iobase: c_long = 271; +pub const SYS_pciconfig_read: c_long = 272; +pub const SYS_pciconfig_write: c_long = 273; +pub const SYS_mq_open: c_long = 274; +pub const SYS_mq_unlink: c_long = 275; +pub const SYS_mq_timedsend: c_long = 276; +pub const SYS_mq_timedreceive: c_long = 277; +pub const SYS_mq_notify: c_long = 278; +pub const SYS_mq_getsetattr: c_long = 279; +pub const SYS_waitid: c_long = 280; +pub const SYS_socket: c_long = 281; +pub const SYS_bind: c_long = 282; +pub const SYS_connect: c_long = 283; +pub const SYS_listen: c_long = 284; +pub const SYS_accept: c_long = 285; +pub const SYS_getsockname: c_long = 286; +pub const SYS_getpeername: c_long = 287; +pub const SYS_socketpair: c_long = 288; +pub const SYS_send: c_long = 289; +pub const SYS_sendto: c_long = 290; +pub const SYS_recv: c_long = 291; +pub const SYS_recvfrom: c_long = 292; +pub const SYS_shutdown: c_long = 293; +pub const SYS_setsockopt: c_long = 294; +pub const SYS_getsockopt: c_long = 295; +pub const SYS_sendmsg: c_long = 296; +pub const SYS_recvmsg: c_long = 297; +pub const SYS_semop: c_long = 298; +pub const SYS_semget: c_long = 299; +pub const SYS_semctl: c_long = 300; +pub const SYS_msgsnd: c_long = 301; +pub const SYS_msgrcv: c_long = 302; +pub const SYS_msgget: c_long = 303; +pub const SYS_msgctl: c_long = 304; +pub const SYS_shmat: c_long = 305; +pub const SYS_shmdt: c_long = 306; +pub const SYS_shmget: c_long = 307; +pub const SYS_shmctl: c_long = 308; +pub const SYS_add_key: c_long = 309; +pub const SYS_request_key: c_long = 310; +pub const SYS_keyctl: c_long = 311; +pub const SYS_semtimedop: c_long = 312; +pub const SYS_vserver: c_long = 313; +pub const SYS_ioprio_set: c_long = 314; +pub const SYS_ioprio_get: c_long = 315; +pub const SYS_inotify_init: c_long = 316; +pub const SYS_inotify_add_watch: c_long = 317; +pub const SYS_inotify_rm_watch: c_long = 318; +pub const SYS_mbind: c_long = 319; +pub const SYS_get_mempolicy: c_long = 320; +pub const SYS_set_mempolicy: c_long = 321; +pub const SYS_openat: c_long = 322; +pub const SYS_mkdirat: c_long = 323; +pub const SYS_mknodat: c_long = 324; +pub const SYS_fchownat: c_long = 325; +pub const SYS_futimesat: c_long = 326; +pub const SYS_fstatat64: c_long = 327; +pub const SYS_unlinkat: c_long = 328; +pub const SYS_renameat: c_long = 329; +pub const SYS_linkat: c_long = 330; +pub const SYS_symlinkat: c_long = 331; +pub const SYS_readlinkat: c_long = 332; +pub const SYS_fchmodat: c_long = 333; +pub const SYS_faccessat: c_long = 334; +pub const SYS_pselect6: c_long = 335; +pub const SYS_ppoll: c_long = 336; +pub const SYS_unshare: c_long = 337; +pub const SYS_set_robust_list: c_long = 338; +pub const SYS_get_robust_list: c_long = 339; +pub const SYS_splice: c_long = 340; +pub const SYS_tee: c_long = 342; +pub const SYS_vmsplice: c_long = 343; +pub const SYS_move_pages: c_long = 344; +pub const SYS_getcpu: c_long = 345; +pub const SYS_epoll_pwait: c_long = 346; +pub const SYS_kexec_load: c_long = 347; +pub const SYS_utimensat: c_long = 348; +pub const SYS_signalfd: c_long = 349; +pub const SYS_timerfd_create: c_long = 350; +pub const SYS_eventfd: c_long = 351; +pub const SYS_fallocate: c_long = 352; +pub const SYS_timerfd_settime: c_long = 353; +pub const SYS_timerfd_gettime: c_long = 354; +pub const SYS_signalfd4: c_long = 355; +pub const SYS_eventfd2: c_long = 356; +pub const SYS_epoll_create1: c_long = 357; +pub const SYS_dup3: c_long = 358; +pub const SYS_pipe2: c_long = 359; +pub const SYS_inotify_init1: c_long = 360; +pub const SYS_preadv: c_long = 361; +pub const SYS_pwritev: c_long = 362; +pub const SYS_rt_tgsigqueueinfo: c_long = 363; +pub const SYS_perf_event_open: c_long = 364; +pub const SYS_recvmmsg: c_long = 365; +pub const SYS_accept4: c_long = 366; +pub const SYS_fanotify_init: c_long = 367; +pub const SYS_fanotify_mark: c_long = 368; +pub const SYS_prlimit64: c_long = 369; +pub const SYS_name_to_handle_at: c_long = 370; +pub const SYS_open_by_handle_at: c_long = 371; +pub const SYS_clock_adjtime: c_long = 372; +pub const SYS_syncfs: c_long = 373; +pub const SYS_sendmmsg: c_long = 374; +pub const SYS_setns: c_long = 375; +pub const SYS_process_vm_readv: c_long = 376; +pub const SYS_process_vm_writev: c_long = 377; +pub const SYS_kcmp: c_long = 378; +pub const SYS_finit_module: c_long = 379; +pub const SYS_sched_setattr: c_long = 380; +pub const SYS_sched_getattr: c_long = 381; +pub const SYS_renameat2: c_long = 382; +pub const SYS_seccomp: c_long = 383; +pub const SYS_getrandom: c_long = 384; +pub const SYS_memfd_create: c_long = 385; +pub const SYS_bpf: c_long = 386; +pub const SYS_execveat: c_long = 387; +pub const SYS_userfaultfd: c_long = 388; +pub const SYS_membarrier: c_long = 389; +pub const SYS_mlock2: c_long = 390; +pub const SYS_copy_file_range: c_long = 391; +pub const SYS_preadv2: c_long = 392; +pub const SYS_pwritev2: c_long = 393; +pub const SYS_pkey_mprotect: c_long = 394; +pub const SYS_pkey_alloc: c_long = 395; +pub const SYS_pkey_free: c_long = 396; // FIXME: should be a `c_long` too, but a bug slipped in. -pub const SYS_statx: ::c_int = 397; -pub const SYS_pidfd_send_signal: ::c_long = 424; -pub const SYS_io_uring_setup: ::c_long = 425; -pub const SYS_io_uring_enter: ::c_long = 426; -pub const SYS_io_uring_register: ::c_long = 427; -pub const SYS_open_tree: ::c_long = 428; -pub const SYS_move_mount: ::c_long = 429; -pub const SYS_fsopen: ::c_long = 430; -pub const SYS_fsconfig: ::c_long = 431; -pub const SYS_fsmount: ::c_long = 432; -pub const SYS_fspick: ::c_long = 433; -pub const SYS_pidfd_open: ::c_long = 434; -pub const SYS_clone3: ::c_long = 435; -pub const SYS_close_range: ::c_long = 436; -pub const SYS_openat2: ::c_long = 437; -pub const SYS_pidfd_getfd: ::c_long = 438; -pub const SYS_faccessat2: ::c_long = 439; -pub const SYS_process_madvise: ::c_long = 440; -pub const SYS_epoll_pwait2: ::c_long = 441; -pub const SYS_mount_setattr: ::c_long = 442; -pub const SYS_quotactl_fd: ::c_long = 443; -pub const SYS_landlock_create_ruleset: ::c_long = 444; -pub const SYS_landlock_add_rule: ::c_long = 445; -pub const SYS_landlock_restrict_self: ::c_long = 446; -pub const SYS_memfd_secret: ::c_long = 447; -pub const SYS_process_mrelease: ::c_long = 448; -pub const SYS_futex_waitv: ::c_long = 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 450; +pub const SYS_statx: c_int = 397; +pub const SYS_pidfd_send_signal: c_long = 424; +pub const SYS_io_uring_setup: c_long = 425; +pub const SYS_io_uring_enter: c_long = 426; +pub const SYS_io_uring_register: c_long = 427; +pub const SYS_open_tree: c_long = 428; +pub const SYS_move_mount: c_long = 429; +pub const SYS_fsopen: c_long = 430; +pub const SYS_fsconfig: c_long = 431; +pub const SYS_fsmount: c_long = 432; +pub const SYS_fspick: c_long = 433; +pub const SYS_pidfd_open: c_long = 434; +pub const SYS_clone3: c_long = 435; +pub const SYS_close_range: c_long = 436; +pub const SYS_openat2: c_long = 437; +pub const SYS_pidfd_getfd: c_long = 438; +pub const SYS_faccessat2: c_long = 439; +pub const SYS_process_madvise: c_long = 440; +pub const SYS_epoll_pwait2: c_long = 441; +pub const SYS_mount_setattr: c_long = 442; +pub const SYS_quotactl_fd: c_long = 443; +pub const SYS_landlock_create_ruleset: c_long = 444; +pub const SYS_landlock_add_rule: c_long = 445; +pub const SYS_landlock_restrict_self: c_long = 446; +pub const SYS_memfd_secret: c_long = 447; +pub const SYS_process_mrelease: c_long = 448; +pub const SYS_futex_waitv: c_long = 449; +pub const SYS_set_mempolicy_home_node: c_long = 450; diff --git a/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs index 7141bd57ecbaa..dced826fc9130 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mips32/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_longlong, c_short, c_uint, c_ulonglong, c_ushort, c_void, off64_t, size_t}; + pub type c_char = i8; pub type c_long = i32; pub type c_ulong = u32; @@ -10,74 +12,74 @@ pub type ino_t = u32; pub type blkcnt_t = i32; pub type blksize_t = i32; pub type nlink_t = u32; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type __u64 = ::c_ulonglong; -pub type __s64 = ::c_longlong; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; +pub type __u64 = c_ulonglong; +pub type __s64 = c_longlong; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; s! { pub struct stat { - pub st_dev: ::dev_t, - st_pad1: [::c_long; 2], - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_pad2: [::c_long; 1], - pub st_size: ::off_t, - st_pad3: ::c_long, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - st_pad5: [::c_long; 14], + pub st_dev: crate::dev_t, + st_pad1: [c_long; 2], + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_pad2: [c_long; 1], + pub st_size: off_t, + st_pad3: c_long, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + st_pad5: [c_long; 14], } pub struct stat64 { - pub st_dev: ::dev_t, - st_pad1: [::c_long; 2], - pub st_ino: ::ino64_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - st_pad2: [::c_long; 2], - pub st_size: ::off64_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - st_pad3: ::c_long, - pub st_blocks: ::blkcnt64_t, - st_pad5: [::c_long; 14], + pub st_dev: crate::dev_t, + st_pad1: [c_long; 2], + pub st_ino: crate::ino64_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + st_pad2: [c_long; 2], + pub st_size: off64_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + st_pad3: c_long, + pub st_blocks: crate::blkcnt64_t, + st_pad5: [c_long; 14], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_favail: ::fsfilcnt64_t, - pub f_fsid: ::c_ulong, - pub __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub __f_spare: [::c_int; 6], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_favail: crate::fsfilcnt64_t, + pub f_fsid: c_ulong, + pub __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub __f_spare: [c_int; 6], } pub struct pthread_attr_t { @@ -85,174 +87,174 @@ s! { } pub struct sigaction { - pub sa_flags: ::c_uint, - pub sa_sigaction: ::sighandler_t, + pub sa_flags: c_uint, + pub sa_sigaction: crate::sighandler_t, pub sa_mask: sigset_t, - _restorer: *mut ::c_void, + _restorer: *mut c_void, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct sigset_t { - __val: [::c_ulong; 4], + __val: [c_ulong; 4], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - pub _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + pub _pad: [c_int; 29], } pub struct glob64_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, + pub gl_pathc: size_t, + pub gl_pathv: *mut *mut c_char, + pub gl_offs: size_t, + pub gl_flags: c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_uint, + pub __seq: c_ushort, + __pad1: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, + pub msg_perm: crate::ipc_perm, #[cfg(target_endian = "big")] - __glibc_reserved1: ::c_ulong, - pub msg_stime: ::time_t, + __glibc_reserved1: c_ulong, + pub msg_stime: crate::time_t, #[cfg(target_endian = "little")] - __glibc_reserved1: ::c_ulong, + __glibc_reserved1: c_ulong, #[cfg(target_endian = "big")] - __glibc_reserved2: ::c_ulong, - pub msg_rtime: ::time_t, + __glibc_reserved2: c_ulong, + pub msg_rtime: crate::time_t, #[cfg(target_endian = "little")] - __glibc_reserved2: ::c_ulong, + __glibc_reserved2: c_ulong, #[cfg(target_endian = "big")] - __glibc_reserved3: ::c_ulong, - pub msg_ctime: ::time_t, + __glibc_reserved3: c_ulong, + pub msg_ctime: crate::time_t, #[cfg(target_endian = "little")] - __glibc_reserved3: ::c_ulong, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + __glibc_reserved3: c_ulong, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_files: ::fsblkcnt_t, - pub f_ffree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_fsid: ::fsid_t, + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_files: crate::fsblkcnt_t, + pub f_ffree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_fsid: crate::fsid_t, - pub f_namelen: ::c_long, - f_spare: [::c_long; 6], + pub f_namelen: c_long, + f_spare: [c_long; 6], } pub struct statfs64 { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_files: ::fsblkcnt64_t, - pub f_ffree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - pub f_flags: ::c_long, - pub f_spare: [::c_long; 5], + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_files: crate::fsblkcnt64_t, + pub f_ffree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 5], } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: size_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::size_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: size_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_sysid: ::c_long, - pub l_pid: ::pid_t, - pad: [::c_long; 4], + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_sysid: c_long, + pub l_pid: crate::pid_t, + pad: [c_long; 4], } pub struct sysinfo { - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 8], + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 8], } // FIXME(1.0): this is actually a union @@ -260,9 +262,9 @@ s! { #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct sem_t { #[cfg(target_pointer_width = "32")] - __size: [::c_char; 16], + __size: [c_char; 16], #[cfg(target_pointer_width = "64")] - __size: [::c_char; 32], + __size: [c_char; 32], } } @@ -275,418 +277,418 @@ pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 20; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const SYS_syscall: ::c_long = 4000 + 0; -pub const SYS_exit: ::c_long = 4000 + 1; -pub const SYS_fork: ::c_long = 4000 + 2; -pub const SYS_read: ::c_long = 4000 + 3; -pub const SYS_write: ::c_long = 4000 + 4; -pub const SYS_open: ::c_long = 4000 + 5; -pub const SYS_close: ::c_long = 4000 + 6; -pub const SYS_waitpid: ::c_long = 4000 + 7; -pub const SYS_creat: ::c_long = 4000 + 8; -pub const SYS_link: ::c_long = 4000 + 9; -pub const SYS_unlink: ::c_long = 4000 + 10; -pub const SYS_execve: ::c_long = 4000 + 11; -pub const SYS_chdir: ::c_long = 4000 + 12; -pub const SYS_time: ::c_long = 4000 + 13; -pub const SYS_mknod: ::c_long = 4000 + 14; -pub const SYS_chmod: ::c_long = 4000 + 15; -pub const SYS_lchown: ::c_long = 4000 + 16; -pub const SYS_break: ::c_long = 4000 + 17; -pub const SYS_lseek: ::c_long = 4000 + 19; -pub const SYS_getpid: ::c_long = 4000 + 20; -pub const SYS_mount: ::c_long = 4000 + 21; -pub const SYS_umount: ::c_long = 4000 + 22; -pub const SYS_setuid: ::c_long = 4000 + 23; -pub const SYS_getuid: ::c_long = 4000 + 24; -pub const SYS_stime: ::c_long = 4000 + 25; -pub const SYS_ptrace: ::c_long = 4000 + 26; -pub const SYS_alarm: ::c_long = 4000 + 27; -pub const SYS_pause: ::c_long = 4000 + 29; -pub const SYS_utime: ::c_long = 4000 + 30; -pub const SYS_stty: ::c_long = 4000 + 31; -pub const SYS_gtty: ::c_long = 4000 + 32; -pub const SYS_access: ::c_long = 4000 + 33; -pub const SYS_nice: ::c_long = 4000 + 34; -pub const SYS_ftime: ::c_long = 4000 + 35; -pub const SYS_sync: ::c_long = 4000 + 36; -pub const SYS_kill: ::c_long = 4000 + 37; -pub const SYS_rename: ::c_long = 4000 + 38; -pub const SYS_mkdir: ::c_long = 4000 + 39; -pub const SYS_rmdir: ::c_long = 4000 + 40; -pub const SYS_dup: ::c_long = 4000 + 41; -pub const SYS_pipe: ::c_long = 4000 + 42; -pub const SYS_times: ::c_long = 4000 + 43; -pub const SYS_prof: ::c_long = 4000 + 44; -pub const SYS_brk: ::c_long = 4000 + 45; -pub const SYS_setgid: ::c_long = 4000 + 46; -pub const SYS_getgid: ::c_long = 4000 + 47; -pub const SYS_signal: ::c_long = 4000 + 48; -pub const SYS_geteuid: ::c_long = 4000 + 49; -pub const SYS_getegid: ::c_long = 4000 + 50; -pub const SYS_acct: ::c_long = 4000 + 51; -pub const SYS_umount2: ::c_long = 4000 + 52; -pub const SYS_lock: ::c_long = 4000 + 53; -pub const SYS_ioctl: ::c_long = 4000 + 54; -pub const SYS_fcntl: ::c_long = 4000 + 55; -pub const SYS_mpx: ::c_long = 4000 + 56; -pub const SYS_setpgid: ::c_long = 4000 + 57; -pub const SYS_ulimit: ::c_long = 4000 + 58; -pub const SYS_umask: ::c_long = 4000 + 60; -pub const SYS_chroot: ::c_long = 4000 + 61; -pub const SYS_ustat: ::c_long = 4000 + 62; -pub const SYS_dup2: ::c_long = 4000 + 63; -pub const SYS_getppid: ::c_long = 4000 + 64; -pub const SYS_getpgrp: ::c_long = 4000 + 65; -pub const SYS_setsid: ::c_long = 4000 + 66; -pub const SYS_sigaction: ::c_long = 4000 + 67; -pub const SYS_sgetmask: ::c_long = 4000 + 68; -pub const SYS_ssetmask: ::c_long = 4000 + 69; -pub const SYS_setreuid: ::c_long = 4000 + 70; -pub const SYS_setregid: ::c_long = 4000 + 71; -pub const SYS_sigsuspend: ::c_long = 4000 + 72; -pub const SYS_sigpending: ::c_long = 4000 + 73; -pub const SYS_sethostname: ::c_long = 4000 + 74; -pub const SYS_setrlimit: ::c_long = 4000 + 75; -pub const SYS_getrlimit: ::c_long = 4000 + 76; -pub const SYS_getrusage: ::c_long = 4000 + 77; -pub const SYS_gettimeofday: ::c_long = 4000 + 78; -pub const SYS_settimeofday: ::c_long = 4000 + 79; -pub const SYS_getgroups: ::c_long = 4000 + 80; -pub const SYS_setgroups: ::c_long = 4000 + 81; -pub const SYS_symlink: ::c_long = 4000 + 83; -pub const SYS_readlink: ::c_long = 4000 + 85; -pub const SYS_uselib: ::c_long = 4000 + 86; -pub const SYS_swapon: ::c_long = 4000 + 87; -pub const SYS_reboot: ::c_long = 4000 + 88; -pub const SYS_readdir: ::c_long = 4000 + 89; -pub const SYS_mmap: ::c_long = 4000 + 90; -pub const SYS_munmap: ::c_long = 4000 + 91; -pub const SYS_truncate: ::c_long = 4000 + 92; -pub const SYS_ftruncate: ::c_long = 4000 + 93; -pub const SYS_fchmod: ::c_long = 4000 + 94; -pub const SYS_fchown: ::c_long = 4000 + 95; -pub const SYS_getpriority: ::c_long = 4000 + 96; -pub const SYS_setpriority: ::c_long = 4000 + 97; -pub const SYS_profil: ::c_long = 4000 + 98; -pub const SYS_statfs: ::c_long = 4000 + 99; -pub const SYS_fstatfs: ::c_long = 4000 + 100; -pub const SYS_ioperm: ::c_long = 4000 + 101; -pub const SYS_socketcall: ::c_long = 4000 + 102; -pub const SYS_syslog: ::c_long = 4000 + 103; -pub const SYS_setitimer: ::c_long = 4000 + 104; -pub const SYS_getitimer: ::c_long = 4000 + 105; -pub const SYS_stat: ::c_long = 4000 + 106; -pub const SYS_lstat: ::c_long = 4000 + 107; -pub const SYS_fstat: ::c_long = 4000 + 108; -pub const SYS_iopl: ::c_long = 4000 + 110; -pub const SYS_vhangup: ::c_long = 4000 + 111; -pub const SYS_idle: ::c_long = 4000 + 112; -pub const SYS_vm86: ::c_long = 4000 + 113; -pub const SYS_wait4: ::c_long = 4000 + 114; -pub const SYS_swapoff: ::c_long = 4000 + 115; -pub const SYS_sysinfo: ::c_long = 4000 + 116; -pub const SYS_ipc: ::c_long = 4000 + 117; -pub const SYS_fsync: ::c_long = 4000 + 118; -pub const SYS_sigreturn: ::c_long = 4000 + 119; -pub const SYS_clone: ::c_long = 4000 + 120; -pub const SYS_setdomainname: ::c_long = 4000 + 121; -pub const SYS_uname: ::c_long = 4000 + 122; -pub const SYS_modify_ldt: ::c_long = 4000 + 123; -pub const SYS_adjtimex: ::c_long = 4000 + 124; -pub const SYS_mprotect: ::c_long = 4000 + 125; -pub const SYS_sigprocmask: ::c_long = 4000 + 126; -pub const SYS_create_module: ::c_long = 4000 + 127; -pub const SYS_init_module: ::c_long = 4000 + 128; -pub const SYS_delete_module: ::c_long = 4000 + 129; -pub const SYS_get_kernel_syms: ::c_long = 4000 + 130; -pub const SYS_quotactl: ::c_long = 4000 + 131; -pub const SYS_getpgid: ::c_long = 4000 + 132; -pub const SYS_fchdir: ::c_long = 4000 + 133; -pub const SYS_bdflush: ::c_long = 4000 + 134; -pub const SYS_sysfs: ::c_long = 4000 + 135; -pub const SYS_personality: ::c_long = 4000 + 136; -pub const SYS_afs_syscall: ::c_long = 4000 + 137; -pub const SYS_setfsuid: ::c_long = 4000 + 138; -pub const SYS_setfsgid: ::c_long = 4000 + 139; -pub const SYS__llseek: ::c_long = 4000 + 140; -pub const SYS_getdents: ::c_long = 4000 + 141; -pub const SYS__newselect: ::c_long = 4000 + 142; -pub const SYS_flock: ::c_long = 4000 + 143; -pub const SYS_msync: ::c_long = 4000 + 144; -pub const SYS_readv: ::c_long = 4000 + 145; -pub const SYS_writev: ::c_long = 4000 + 146; -pub const SYS_cacheflush: ::c_long = 4000 + 147; -pub const SYS_cachectl: ::c_long = 4000 + 148; -pub const SYS_sysmips: ::c_long = 4000 + 149; -pub const SYS_getsid: ::c_long = 4000 + 151; -pub const SYS_fdatasync: ::c_long = 4000 + 152; -pub const SYS__sysctl: ::c_long = 4000 + 153; -pub const SYS_mlock: ::c_long = 4000 + 154; -pub const SYS_munlock: ::c_long = 4000 + 155; -pub const SYS_mlockall: ::c_long = 4000 + 156; -pub const SYS_munlockall: ::c_long = 4000 + 157; -pub const SYS_sched_setparam: ::c_long = 4000 + 158; -pub const SYS_sched_getparam: ::c_long = 4000 + 159; -pub const SYS_sched_setscheduler: ::c_long = 4000 + 160; -pub const SYS_sched_getscheduler: ::c_long = 4000 + 161; -pub const SYS_sched_yield: ::c_long = 4000 + 162; -pub const SYS_sched_get_priority_max: ::c_long = 4000 + 163; -pub const SYS_sched_get_priority_min: ::c_long = 4000 + 164; -pub const SYS_sched_rr_get_interval: ::c_long = 4000 + 165; -pub const SYS_nanosleep: ::c_long = 4000 + 166; -pub const SYS_mremap: ::c_long = 4000 + 167; -pub const SYS_accept: ::c_long = 4000 + 168; -pub const SYS_bind: ::c_long = 4000 + 169; -pub const SYS_connect: ::c_long = 4000 + 170; -pub const SYS_getpeername: ::c_long = 4000 + 171; -pub const SYS_getsockname: ::c_long = 4000 + 172; -pub const SYS_getsockopt: ::c_long = 4000 + 173; -pub const SYS_listen: ::c_long = 4000 + 174; -pub const SYS_recv: ::c_long = 4000 + 175; -pub const SYS_recvfrom: ::c_long = 4000 + 176; -pub const SYS_recvmsg: ::c_long = 4000 + 177; -pub const SYS_send: ::c_long = 4000 + 178; -pub const SYS_sendmsg: ::c_long = 4000 + 179; -pub const SYS_sendto: ::c_long = 4000 + 180; -pub const SYS_setsockopt: ::c_long = 4000 + 181; -pub const SYS_shutdown: ::c_long = 4000 + 182; -pub const SYS_socket: ::c_long = 4000 + 183; -pub const SYS_socketpair: ::c_long = 4000 + 184; -pub const SYS_setresuid: ::c_long = 4000 + 185; -pub const SYS_getresuid: ::c_long = 4000 + 186; -pub const SYS_query_module: ::c_long = 4000 + 187; -pub const SYS_poll: ::c_long = 4000 + 188; -pub const SYS_nfsservctl: ::c_long = 4000 + 189; -pub const SYS_setresgid: ::c_long = 4000 + 190; -pub const SYS_getresgid: ::c_long = 4000 + 191; -pub const SYS_prctl: ::c_long = 4000 + 192; -pub const SYS_rt_sigreturn: ::c_long = 4000 + 193; -pub const SYS_rt_sigaction: ::c_long = 4000 + 194; -pub const SYS_rt_sigprocmask: ::c_long = 4000 + 195; -pub const SYS_rt_sigpending: ::c_long = 4000 + 196; -pub const SYS_rt_sigtimedwait: ::c_long = 4000 + 197; -pub const SYS_rt_sigqueueinfo: ::c_long = 4000 + 198; -pub const SYS_rt_sigsuspend: ::c_long = 4000 + 199; -pub const SYS_pread64: ::c_long = 4000 + 200; -pub const SYS_pwrite64: ::c_long = 4000 + 201; -pub const SYS_chown: ::c_long = 4000 + 202; -pub const SYS_getcwd: ::c_long = 4000 + 203; -pub const SYS_capget: ::c_long = 4000 + 204; -pub const SYS_capset: ::c_long = 4000 + 205; -pub const SYS_sigaltstack: ::c_long = 4000 + 206; -pub const SYS_sendfile: ::c_long = 4000 + 207; -pub const SYS_getpmsg: ::c_long = 4000 + 208; -pub const SYS_putpmsg: ::c_long = 4000 + 209; -pub const SYS_mmap2: ::c_long = 4000 + 210; -pub const SYS_truncate64: ::c_long = 4000 + 211; -pub const SYS_ftruncate64: ::c_long = 4000 + 212; -pub const SYS_stat64: ::c_long = 4000 + 213; -pub const SYS_lstat64: ::c_long = 4000 + 214; -pub const SYS_fstat64: ::c_long = 4000 + 215; -pub const SYS_pivot_root: ::c_long = 4000 + 216; -pub const SYS_mincore: ::c_long = 4000 + 217; -pub const SYS_madvise: ::c_long = 4000 + 218; -pub const SYS_getdents64: ::c_long = 4000 + 219; -pub const SYS_fcntl64: ::c_long = 4000 + 220; -pub const SYS_gettid: ::c_long = 4000 + 222; -pub const SYS_readahead: ::c_long = 4000 + 223; -pub const SYS_setxattr: ::c_long = 4000 + 224; -pub const SYS_lsetxattr: ::c_long = 4000 + 225; -pub const SYS_fsetxattr: ::c_long = 4000 + 226; -pub const SYS_getxattr: ::c_long = 4000 + 227; -pub const SYS_lgetxattr: ::c_long = 4000 + 228; -pub const SYS_fgetxattr: ::c_long = 4000 + 229; -pub const SYS_listxattr: ::c_long = 4000 + 230; -pub const SYS_llistxattr: ::c_long = 4000 + 231; -pub const SYS_flistxattr: ::c_long = 4000 + 232; -pub const SYS_removexattr: ::c_long = 4000 + 233; -pub const SYS_lremovexattr: ::c_long = 4000 + 234; -pub const SYS_fremovexattr: ::c_long = 4000 + 235; -pub const SYS_tkill: ::c_long = 4000 + 236; -pub const SYS_sendfile64: ::c_long = 4000 + 237; -pub const SYS_futex: ::c_long = 4000 + 238; -pub const SYS_sched_setaffinity: ::c_long = 4000 + 239; -pub const SYS_sched_getaffinity: ::c_long = 4000 + 240; -pub const SYS_io_setup: ::c_long = 4000 + 241; -pub const SYS_io_destroy: ::c_long = 4000 + 242; -pub const SYS_io_getevents: ::c_long = 4000 + 243; -pub const SYS_io_submit: ::c_long = 4000 + 244; -pub const SYS_io_cancel: ::c_long = 4000 + 245; -pub const SYS_exit_group: ::c_long = 4000 + 246; -pub const SYS_lookup_dcookie: ::c_long = 4000 + 247; -pub const SYS_epoll_create: ::c_long = 4000 + 248; -pub const SYS_epoll_ctl: ::c_long = 4000 + 249; -pub const SYS_epoll_wait: ::c_long = 4000 + 250; -pub const SYS_remap_file_pages: ::c_long = 4000 + 251; -pub const SYS_set_tid_address: ::c_long = 4000 + 252; -pub const SYS_restart_syscall: ::c_long = 4000 + 253; -pub const SYS_fadvise64: ::c_long = 4000 + 254; -pub const SYS_statfs64: ::c_long = 4000 + 255; -pub const SYS_fstatfs64: ::c_long = 4000 + 256; -pub const SYS_timer_create: ::c_long = 4000 + 257; -pub const SYS_timer_settime: ::c_long = 4000 + 258; -pub const SYS_timer_gettime: ::c_long = 4000 + 259; -pub const SYS_timer_getoverrun: ::c_long = 4000 + 260; -pub const SYS_timer_delete: ::c_long = 4000 + 261; -pub const SYS_clock_settime: ::c_long = 4000 + 262; -pub const SYS_clock_gettime: ::c_long = 4000 + 263; -pub const SYS_clock_getres: ::c_long = 4000 + 264; -pub const SYS_clock_nanosleep: ::c_long = 4000 + 265; -pub const SYS_tgkill: ::c_long = 4000 + 266; -pub const SYS_utimes: ::c_long = 4000 + 267; -pub const SYS_mbind: ::c_long = 4000 + 268; -pub const SYS_get_mempolicy: ::c_long = 4000 + 269; -pub const SYS_set_mempolicy: ::c_long = 4000 + 270; -pub const SYS_mq_open: ::c_long = 4000 + 271; -pub const SYS_mq_unlink: ::c_long = 4000 + 272; -pub const SYS_mq_timedsend: ::c_long = 4000 + 273; -pub const SYS_mq_timedreceive: ::c_long = 4000 + 274; -pub const SYS_mq_notify: ::c_long = 4000 + 275; -pub const SYS_mq_getsetattr: ::c_long = 4000 + 276; -pub const SYS_vserver: ::c_long = 4000 + 277; -pub const SYS_waitid: ::c_long = 4000 + 278; -/* pub const SYS_sys_setaltroot: ::c_long = 4000 + 279; */ -pub const SYS_add_key: ::c_long = 4000 + 280; -pub const SYS_request_key: ::c_long = 4000 + 281; -pub const SYS_keyctl: ::c_long = 4000 + 282; -pub const SYS_set_thread_area: ::c_long = 4000 + 283; -pub const SYS_inotify_init: ::c_long = 4000 + 284; -pub const SYS_inotify_add_watch: ::c_long = 4000 + 285; -pub const SYS_inotify_rm_watch: ::c_long = 4000 + 286; -pub const SYS_migrate_pages: ::c_long = 4000 + 287; -pub const SYS_openat: ::c_long = 4000 + 288; -pub const SYS_mkdirat: ::c_long = 4000 + 289; -pub const SYS_mknodat: ::c_long = 4000 + 290; -pub const SYS_fchownat: ::c_long = 4000 + 291; -pub const SYS_futimesat: ::c_long = 4000 + 292; -pub const SYS_fstatat64: ::c_long = 4000 + 293; -pub const SYS_unlinkat: ::c_long = 4000 + 294; -pub const SYS_renameat: ::c_long = 4000 + 295; -pub const SYS_linkat: ::c_long = 4000 + 296; -pub const SYS_symlinkat: ::c_long = 4000 + 297; -pub const SYS_readlinkat: ::c_long = 4000 + 298; -pub const SYS_fchmodat: ::c_long = 4000 + 299; -pub const SYS_faccessat: ::c_long = 4000 + 300; -pub const SYS_pselect6: ::c_long = 4000 + 301; -pub const SYS_ppoll: ::c_long = 4000 + 302; -pub const SYS_unshare: ::c_long = 4000 + 303; -pub const SYS_splice: ::c_long = 4000 + 304; -pub const SYS_sync_file_range: ::c_long = 4000 + 305; -pub const SYS_tee: ::c_long = 4000 + 306; -pub const SYS_vmsplice: ::c_long = 4000 + 307; -pub const SYS_move_pages: ::c_long = 4000 + 308; -pub const SYS_set_robust_list: ::c_long = 4000 + 309; -pub const SYS_get_robust_list: ::c_long = 4000 + 310; -pub const SYS_kexec_load: ::c_long = 4000 + 311; -pub const SYS_getcpu: ::c_long = 4000 + 312; -pub const SYS_epoll_pwait: ::c_long = 4000 + 313; -pub const SYS_ioprio_set: ::c_long = 4000 + 314; -pub const SYS_ioprio_get: ::c_long = 4000 + 315; -pub const SYS_utimensat: ::c_long = 4000 + 316; -pub const SYS_signalfd: ::c_long = 4000 + 317; -pub const SYS_timerfd: ::c_long = 4000 + 318; -pub const SYS_eventfd: ::c_long = 4000 + 319; -pub const SYS_fallocate: ::c_long = 4000 + 320; -pub const SYS_timerfd_create: ::c_long = 4000 + 321; -pub const SYS_timerfd_gettime: ::c_long = 4000 + 322; -pub const SYS_timerfd_settime: ::c_long = 4000 + 323; -pub const SYS_signalfd4: ::c_long = 4000 + 324; -pub const SYS_eventfd2: ::c_long = 4000 + 325; -pub const SYS_epoll_create1: ::c_long = 4000 + 326; -pub const SYS_dup3: ::c_long = 4000 + 327; -pub const SYS_pipe2: ::c_long = 4000 + 328; -pub const SYS_inotify_init1: ::c_long = 4000 + 329; -pub const SYS_preadv: ::c_long = 4000 + 330; -pub const SYS_pwritev: ::c_long = 4000 + 331; -pub const SYS_rt_tgsigqueueinfo: ::c_long = 4000 + 332; -pub const SYS_perf_event_open: ::c_long = 4000 + 333; -pub const SYS_accept4: ::c_long = 4000 + 334; -pub const SYS_recvmmsg: ::c_long = 4000 + 335; -pub const SYS_fanotify_init: ::c_long = 4000 + 336; -pub const SYS_fanotify_mark: ::c_long = 4000 + 337; -pub const SYS_prlimit64: ::c_long = 4000 + 338; -pub const SYS_name_to_handle_at: ::c_long = 4000 + 339; -pub const SYS_open_by_handle_at: ::c_long = 4000 + 340; -pub const SYS_clock_adjtime: ::c_long = 4000 + 341; -pub const SYS_syncfs: ::c_long = 4000 + 342; -pub const SYS_sendmmsg: ::c_long = 4000 + 343; -pub const SYS_setns: ::c_long = 4000 + 344; -pub const SYS_process_vm_readv: ::c_long = 4000 + 345; -pub const SYS_process_vm_writev: ::c_long = 4000 + 346; -pub const SYS_kcmp: ::c_long = 4000 + 347; -pub const SYS_finit_module: ::c_long = 4000 + 348; -pub const SYS_sched_setattr: ::c_long = 4000 + 349; -pub const SYS_sched_getattr: ::c_long = 4000 + 350; -pub const SYS_renameat2: ::c_long = 4000 + 351; -pub const SYS_seccomp: ::c_long = 4000 + 352; -pub const SYS_getrandom: ::c_long = 4000 + 353; -pub const SYS_memfd_create: ::c_long = 4000 + 354; -pub const SYS_bpf: ::c_long = 4000 + 355; -pub const SYS_execveat: ::c_long = 4000 + 356; -pub const SYS_userfaultfd: ::c_long = 4000 + 357; -pub const SYS_membarrier: ::c_long = 4000 + 358; -pub const SYS_mlock2: ::c_long = 4000 + 359; -pub const SYS_copy_file_range: ::c_long = 4000 + 360; -pub const SYS_preadv2: ::c_long = 4000 + 361; -pub const SYS_pwritev2: ::c_long = 4000 + 362; -pub const SYS_pkey_mprotect: ::c_long = 4000 + 363; -pub const SYS_pkey_alloc: ::c_long = 4000 + 364; -pub const SYS_pkey_free: ::c_long = 4000 + 365; -pub const SYS_statx: ::c_long = 4000 + 366; -pub const SYS_pidfd_send_signal: ::c_long = 4000 + 424; -pub const SYS_io_uring_setup: ::c_long = 4000 + 425; -pub const SYS_io_uring_enter: ::c_long = 4000 + 426; -pub const SYS_io_uring_register: ::c_long = 4000 + 427; -pub const SYS_open_tree: ::c_long = 4000 + 428; -pub const SYS_move_mount: ::c_long = 4000 + 429; -pub const SYS_fsopen: ::c_long = 4000 + 430; -pub const SYS_fsconfig: ::c_long = 4000 + 431; -pub const SYS_fsmount: ::c_long = 4000 + 432; -pub const SYS_fspick: ::c_long = 4000 + 433; -pub const SYS_pidfd_open: ::c_long = 4000 + 434; -pub const SYS_clone3: ::c_long = 4000 + 435; -pub const SYS_close_range: ::c_long = 4000 + 436; -pub const SYS_openat2: ::c_long = 4000 + 437; -pub const SYS_pidfd_getfd: ::c_long = 4000 + 438; -pub const SYS_faccessat2: ::c_long = 4000 + 439; -pub const SYS_process_madvise: ::c_long = 4000 + 440; -pub const SYS_epoll_pwait2: ::c_long = 4000 + 441; -pub const SYS_mount_setattr: ::c_long = 4000 + 442; -pub const SYS_quotactl_fd: ::c_long = 4000 + 443; -pub const SYS_landlock_create_ruleset: ::c_long = 4000 + 444; -pub const SYS_landlock_add_rule: ::c_long = 4000 + 445; -pub const SYS_landlock_restrict_self: ::c_long = 4000 + 446; -pub const SYS_memfd_secret: ::c_long = 4000 + 447; -pub const SYS_process_mrelease: ::c_long = 4000 + 448; -pub const SYS_futex_waitv: ::c_long = 4000 + 449; -pub const SYS_set_mempolicy_home_node: ::c_long = 4000 + 450; +pub const SYS_syscall: c_long = 4000 + 0; +pub const SYS_exit: c_long = 4000 + 1; +pub const SYS_fork: c_long = 4000 + 2; +pub const SYS_read: c_long = 4000 + 3; +pub const SYS_write: c_long = 4000 + 4; +pub const SYS_open: c_long = 4000 + 5; +pub const SYS_close: c_long = 4000 + 6; +pub const SYS_waitpid: c_long = 4000 + 7; +pub const SYS_creat: c_long = 4000 + 8; +pub const SYS_link: c_long = 4000 + 9; +pub const SYS_unlink: c_long = 4000 + 10; +pub const SYS_execve: c_long = 4000 + 11; +pub const SYS_chdir: c_long = 4000 + 12; +pub const SYS_time: c_long = 4000 + 13; +pub const SYS_mknod: c_long = 4000 + 14; +pub const SYS_chmod: c_long = 4000 + 15; +pub const SYS_lchown: c_long = 4000 + 16; +pub const SYS_break: c_long = 4000 + 17; +pub const SYS_lseek: c_long = 4000 + 19; +pub const SYS_getpid: c_long = 4000 + 20; +pub const SYS_mount: c_long = 4000 + 21; +pub const SYS_umount: c_long = 4000 + 22; +pub const SYS_setuid: c_long = 4000 + 23; +pub const SYS_getuid: c_long = 4000 + 24; +pub const SYS_stime: c_long = 4000 + 25; +pub const SYS_ptrace: c_long = 4000 + 26; +pub const SYS_alarm: c_long = 4000 + 27; +pub const SYS_pause: c_long = 4000 + 29; +pub const SYS_utime: c_long = 4000 + 30; +pub const SYS_stty: c_long = 4000 + 31; +pub const SYS_gtty: c_long = 4000 + 32; +pub const SYS_access: c_long = 4000 + 33; +pub const SYS_nice: c_long = 4000 + 34; +pub const SYS_ftime: c_long = 4000 + 35; +pub const SYS_sync: c_long = 4000 + 36; +pub const SYS_kill: c_long = 4000 + 37; +pub const SYS_rename: c_long = 4000 + 38; +pub const SYS_mkdir: c_long = 4000 + 39; +pub const SYS_rmdir: c_long = 4000 + 40; +pub const SYS_dup: c_long = 4000 + 41; +pub const SYS_pipe: c_long = 4000 + 42; +pub const SYS_times: c_long = 4000 + 43; +pub const SYS_prof: c_long = 4000 + 44; +pub const SYS_brk: c_long = 4000 + 45; +pub const SYS_setgid: c_long = 4000 + 46; +pub const SYS_getgid: c_long = 4000 + 47; +pub const SYS_signal: c_long = 4000 + 48; +pub const SYS_geteuid: c_long = 4000 + 49; +pub const SYS_getegid: c_long = 4000 + 50; +pub const SYS_acct: c_long = 4000 + 51; +pub const SYS_umount2: c_long = 4000 + 52; +pub const SYS_lock: c_long = 4000 + 53; +pub const SYS_ioctl: c_long = 4000 + 54; +pub const SYS_fcntl: c_long = 4000 + 55; +pub const SYS_mpx: c_long = 4000 + 56; +pub const SYS_setpgid: c_long = 4000 + 57; +pub const SYS_ulimit: c_long = 4000 + 58; +pub const SYS_umask: c_long = 4000 + 60; +pub const SYS_chroot: c_long = 4000 + 61; +pub const SYS_ustat: c_long = 4000 + 62; +pub const SYS_dup2: c_long = 4000 + 63; +pub const SYS_getppid: c_long = 4000 + 64; +pub const SYS_getpgrp: c_long = 4000 + 65; +pub const SYS_setsid: c_long = 4000 + 66; +pub const SYS_sigaction: c_long = 4000 + 67; +pub const SYS_sgetmask: c_long = 4000 + 68; +pub const SYS_ssetmask: c_long = 4000 + 69; +pub const SYS_setreuid: c_long = 4000 + 70; +pub const SYS_setregid: c_long = 4000 + 71; +pub const SYS_sigsuspend: c_long = 4000 + 72; +pub const SYS_sigpending: c_long = 4000 + 73; +pub const SYS_sethostname: c_long = 4000 + 74; +pub const SYS_setrlimit: c_long = 4000 + 75; +pub const SYS_getrlimit: c_long = 4000 + 76; +pub const SYS_getrusage: c_long = 4000 + 77; +pub const SYS_gettimeofday: c_long = 4000 + 78; +pub const SYS_settimeofday: c_long = 4000 + 79; +pub const SYS_getgroups: c_long = 4000 + 80; +pub const SYS_setgroups: c_long = 4000 + 81; +pub const SYS_symlink: c_long = 4000 + 83; +pub const SYS_readlink: c_long = 4000 + 85; +pub const SYS_uselib: c_long = 4000 + 86; +pub const SYS_swapon: c_long = 4000 + 87; +pub const SYS_reboot: c_long = 4000 + 88; +pub const SYS_readdir: c_long = 4000 + 89; +pub const SYS_mmap: c_long = 4000 + 90; +pub const SYS_munmap: c_long = 4000 + 91; +pub const SYS_truncate: c_long = 4000 + 92; +pub const SYS_ftruncate: c_long = 4000 + 93; +pub const SYS_fchmod: c_long = 4000 + 94; +pub const SYS_fchown: c_long = 4000 + 95; +pub const SYS_getpriority: c_long = 4000 + 96; +pub const SYS_setpriority: c_long = 4000 + 97; +pub const SYS_profil: c_long = 4000 + 98; +pub const SYS_statfs: c_long = 4000 + 99; +pub const SYS_fstatfs: c_long = 4000 + 100; +pub const SYS_ioperm: c_long = 4000 + 101; +pub const SYS_socketcall: c_long = 4000 + 102; +pub const SYS_syslog: c_long = 4000 + 103; +pub const SYS_setitimer: c_long = 4000 + 104; +pub const SYS_getitimer: c_long = 4000 + 105; +pub const SYS_stat: c_long = 4000 + 106; +pub const SYS_lstat: c_long = 4000 + 107; +pub const SYS_fstat: c_long = 4000 + 108; +pub const SYS_iopl: c_long = 4000 + 110; +pub const SYS_vhangup: c_long = 4000 + 111; +pub const SYS_idle: c_long = 4000 + 112; +pub const SYS_vm86: c_long = 4000 + 113; +pub const SYS_wait4: c_long = 4000 + 114; +pub const SYS_swapoff: c_long = 4000 + 115; +pub const SYS_sysinfo: c_long = 4000 + 116; +pub const SYS_ipc: c_long = 4000 + 117; +pub const SYS_fsync: c_long = 4000 + 118; +pub const SYS_sigreturn: c_long = 4000 + 119; +pub const SYS_clone: c_long = 4000 + 120; +pub const SYS_setdomainname: c_long = 4000 + 121; +pub const SYS_uname: c_long = 4000 + 122; +pub const SYS_modify_ldt: c_long = 4000 + 123; +pub const SYS_adjtimex: c_long = 4000 + 124; +pub const SYS_mprotect: c_long = 4000 + 125; +pub const SYS_sigprocmask: c_long = 4000 + 126; +pub const SYS_create_module: c_long = 4000 + 127; +pub const SYS_init_module: c_long = 4000 + 128; +pub const SYS_delete_module: c_long = 4000 + 129; +pub const SYS_get_kernel_syms: c_long = 4000 + 130; +pub const SYS_quotactl: c_long = 4000 + 131; +pub const SYS_getpgid: c_long = 4000 + 132; +pub const SYS_fchdir: c_long = 4000 + 133; +pub const SYS_bdflush: c_long = 4000 + 134; +pub const SYS_sysfs: c_long = 4000 + 135; +pub const SYS_personality: c_long = 4000 + 136; +pub const SYS_afs_syscall: c_long = 4000 + 137; +pub const SYS_setfsuid: c_long = 4000 + 138; +pub const SYS_setfsgid: c_long = 4000 + 139; +pub const SYS__llseek: c_long = 4000 + 140; +pub const SYS_getdents: c_long = 4000 + 141; +pub const SYS__newselect: c_long = 4000 + 142; +pub const SYS_flock: c_long = 4000 + 143; +pub const SYS_msync: c_long = 4000 + 144; +pub const SYS_readv: c_long = 4000 + 145; +pub const SYS_writev: c_long = 4000 + 146; +pub const SYS_cacheflush: c_long = 4000 + 147; +pub const SYS_cachectl: c_long = 4000 + 148; +pub const SYS_sysmips: c_long = 4000 + 149; +pub const SYS_getsid: c_long = 4000 + 151; +pub const SYS_fdatasync: c_long = 4000 + 152; +pub const SYS__sysctl: c_long = 4000 + 153; +pub const SYS_mlock: c_long = 4000 + 154; +pub const SYS_munlock: c_long = 4000 + 155; +pub const SYS_mlockall: c_long = 4000 + 156; +pub const SYS_munlockall: c_long = 4000 + 157; +pub const SYS_sched_setparam: c_long = 4000 + 158; +pub const SYS_sched_getparam: c_long = 4000 + 159; +pub const SYS_sched_setscheduler: c_long = 4000 + 160; +pub const SYS_sched_getscheduler: c_long = 4000 + 161; +pub const SYS_sched_yield: c_long = 4000 + 162; +pub const SYS_sched_get_priority_max: c_long = 4000 + 163; +pub const SYS_sched_get_priority_min: c_long = 4000 + 164; +pub const SYS_sched_rr_get_interval: c_long = 4000 + 165; +pub const SYS_nanosleep: c_long = 4000 + 166; +pub const SYS_mremap: c_long = 4000 + 167; +pub const SYS_accept: c_long = 4000 + 168; +pub const SYS_bind: c_long = 4000 + 169; +pub const SYS_connect: c_long = 4000 + 170; +pub const SYS_getpeername: c_long = 4000 + 171; +pub const SYS_getsockname: c_long = 4000 + 172; +pub const SYS_getsockopt: c_long = 4000 + 173; +pub const SYS_listen: c_long = 4000 + 174; +pub const SYS_recv: c_long = 4000 + 175; +pub const SYS_recvfrom: c_long = 4000 + 176; +pub const SYS_recvmsg: c_long = 4000 + 177; +pub const SYS_send: c_long = 4000 + 178; +pub const SYS_sendmsg: c_long = 4000 + 179; +pub const SYS_sendto: c_long = 4000 + 180; +pub const SYS_setsockopt: c_long = 4000 + 181; +pub const SYS_shutdown: c_long = 4000 + 182; +pub const SYS_socket: c_long = 4000 + 183; +pub const SYS_socketpair: c_long = 4000 + 184; +pub const SYS_setresuid: c_long = 4000 + 185; +pub const SYS_getresuid: c_long = 4000 + 186; +pub const SYS_query_module: c_long = 4000 + 187; +pub const SYS_poll: c_long = 4000 + 188; +pub const SYS_nfsservctl: c_long = 4000 + 189; +pub const SYS_setresgid: c_long = 4000 + 190; +pub const SYS_getresgid: c_long = 4000 + 191; +pub const SYS_prctl: c_long = 4000 + 192; +pub const SYS_rt_sigreturn: c_long = 4000 + 193; +pub const SYS_rt_sigaction: c_long = 4000 + 194; +pub const SYS_rt_sigprocmask: c_long = 4000 + 195; +pub const SYS_rt_sigpending: c_long = 4000 + 196; +pub const SYS_rt_sigtimedwait: c_long = 4000 + 197; +pub const SYS_rt_sigqueueinfo: c_long = 4000 + 198; +pub const SYS_rt_sigsuspend: c_long = 4000 + 199; +pub const SYS_pread64: c_long = 4000 + 200; +pub const SYS_pwrite64: c_long = 4000 + 201; +pub const SYS_chown: c_long = 4000 + 202; +pub const SYS_getcwd: c_long = 4000 + 203; +pub const SYS_capget: c_long = 4000 + 204; +pub const SYS_capset: c_long = 4000 + 205; +pub const SYS_sigaltstack: c_long = 4000 + 206; +pub const SYS_sendfile: c_long = 4000 + 207; +pub const SYS_getpmsg: c_long = 4000 + 208; +pub const SYS_putpmsg: c_long = 4000 + 209; +pub const SYS_mmap2: c_long = 4000 + 210; +pub const SYS_truncate64: c_long = 4000 + 211; +pub const SYS_ftruncate64: c_long = 4000 + 212; +pub const SYS_stat64: c_long = 4000 + 213; +pub const SYS_lstat64: c_long = 4000 + 214; +pub const SYS_fstat64: c_long = 4000 + 215; +pub const SYS_pivot_root: c_long = 4000 + 216; +pub const SYS_mincore: c_long = 4000 + 217; +pub const SYS_madvise: c_long = 4000 + 218; +pub const SYS_getdents64: c_long = 4000 + 219; +pub const SYS_fcntl64: c_long = 4000 + 220; +pub const SYS_gettid: c_long = 4000 + 222; +pub const SYS_readahead: c_long = 4000 + 223; +pub const SYS_setxattr: c_long = 4000 + 224; +pub const SYS_lsetxattr: c_long = 4000 + 225; +pub const SYS_fsetxattr: c_long = 4000 + 226; +pub const SYS_getxattr: c_long = 4000 + 227; +pub const SYS_lgetxattr: c_long = 4000 + 228; +pub const SYS_fgetxattr: c_long = 4000 + 229; +pub const SYS_listxattr: c_long = 4000 + 230; +pub const SYS_llistxattr: c_long = 4000 + 231; +pub const SYS_flistxattr: c_long = 4000 + 232; +pub const SYS_removexattr: c_long = 4000 + 233; +pub const SYS_lremovexattr: c_long = 4000 + 234; +pub const SYS_fremovexattr: c_long = 4000 + 235; +pub const SYS_tkill: c_long = 4000 + 236; +pub const SYS_sendfile64: c_long = 4000 + 237; +pub const SYS_futex: c_long = 4000 + 238; +pub const SYS_sched_setaffinity: c_long = 4000 + 239; +pub const SYS_sched_getaffinity: c_long = 4000 + 240; +pub const SYS_io_setup: c_long = 4000 + 241; +pub const SYS_io_destroy: c_long = 4000 + 242; +pub const SYS_io_getevents: c_long = 4000 + 243; +pub const SYS_io_submit: c_long = 4000 + 244; +pub const SYS_io_cancel: c_long = 4000 + 245; +pub const SYS_exit_group: c_long = 4000 + 246; +pub const SYS_lookup_dcookie: c_long = 4000 + 247; +pub const SYS_epoll_create: c_long = 4000 + 248; +pub const SYS_epoll_ctl: c_long = 4000 + 249; +pub const SYS_epoll_wait: c_long = 4000 + 250; +pub const SYS_remap_file_pages: c_long = 4000 + 251; +pub const SYS_set_tid_address: c_long = 4000 + 252; +pub const SYS_restart_syscall: c_long = 4000 + 253; +pub const SYS_fadvise64: c_long = 4000 + 254; +pub const SYS_statfs64: c_long = 4000 + 255; +pub const SYS_fstatfs64: c_long = 4000 + 256; +pub const SYS_timer_create: c_long = 4000 + 257; +pub const SYS_timer_settime: c_long = 4000 + 258; +pub const SYS_timer_gettime: c_long = 4000 + 259; +pub const SYS_timer_getoverrun: c_long = 4000 + 260; +pub const SYS_timer_delete: c_long = 4000 + 261; +pub const SYS_clock_settime: c_long = 4000 + 262; +pub const SYS_clock_gettime: c_long = 4000 + 263; +pub const SYS_clock_getres: c_long = 4000 + 264; +pub const SYS_clock_nanosleep: c_long = 4000 + 265; +pub const SYS_tgkill: c_long = 4000 + 266; +pub const SYS_utimes: c_long = 4000 + 267; +pub const SYS_mbind: c_long = 4000 + 268; +pub const SYS_get_mempolicy: c_long = 4000 + 269; +pub const SYS_set_mempolicy: c_long = 4000 + 270; +pub const SYS_mq_open: c_long = 4000 + 271; +pub const SYS_mq_unlink: c_long = 4000 + 272; +pub const SYS_mq_timedsend: c_long = 4000 + 273; +pub const SYS_mq_timedreceive: c_long = 4000 + 274; +pub const SYS_mq_notify: c_long = 4000 + 275; +pub const SYS_mq_getsetattr: c_long = 4000 + 276; +pub const SYS_vserver: c_long = 4000 + 277; +pub const SYS_waitid: c_long = 4000 + 278; +/* pub const SYS_sys_setaltroot: c_long = 4000 + 279; */ +pub const SYS_add_key: c_long = 4000 + 280; +pub const SYS_request_key: c_long = 4000 + 281; +pub const SYS_keyctl: c_long = 4000 + 282; +pub const SYS_set_thread_area: c_long = 4000 + 283; +pub const SYS_inotify_init: c_long = 4000 + 284; +pub const SYS_inotify_add_watch: c_long = 4000 + 285; +pub const SYS_inotify_rm_watch: c_long = 4000 + 286; +pub const SYS_migrate_pages: c_long = 4000 + 287; +pub const SYS_openat: c_long = 4000 + 288; +pub const SYS_mkdirat: c_long = 4000 + 289; +pub const SYS_mknodat: c_long = 4000 + 290; +pub const SYS_fchownat: c_long = 4000 + 291; +pub const SYS_futimesat: c_long = 4000 + 292; +pub const SYS_fstatat64: c_long = 4000 + 293; +pub const SYS_unlinkat: c_long = 4000 + 294; +pub const SYS_renameat: c_long = 4000 + 295; +pub const SYS_linkat: c_long = 4000 + 296; +pub const SYS_symlinkat: c_long = 4000 + 297; +pub const SYS_readlinkat: c_long = 4000 + 298; +pub const SYS_fchmodat: c_long = 4000 + 299; +pub const SYS_faccessat: c_long = 4000 + 300; +pub const SYS_pselect6: c_long = 4000 + 301; +pub const SYS_ppoll: c_long = 4000 + 302; +pub const SYS_unshare: c_long = 4000 + 303; +pub const SYS_splice: c_long = 4000 + 304; +pub const SYS_sync_file_range: c_long = 4000 + 305; +pub const SYS_tee: c_long = 4000 + 306; +pub const SYS_vmsplice: c_long = 4000 + 307; +pub const SYS_move_pages: c_long = 4000 + 308; +pub const SYS_set_robust_list: c_long = 4000 + 309; +pub const SYS_get_robust_list: c_long = 4000 + 310; +pub const SYS_kexec_load: c_long = 4000 + 311; +pub const SYS_getcpu: c_long = 4000 + 312; +pub const SYS_epoll_pwait: c_long = 4000 + 313; +pub const SYS_ioprio_set: c_long = 4000 + 314; +pub const SYS_ioprio_get: c_long = 4000 + 315; +pub const SYS_utimensat: c_long = 4000 + 316; +pub const SYS_signalfd: c_long = 4000 + 317; +pub const SYS_timerfd: c_long = 4000 + 318; +pub const SYS_eventfd: c_long = 4000 + 319; +pub const SYS_fallocate: c_long = 4000 + 320; +pub const SYS_timerfd_create: c_long = 4000 + 321; +pub const SYS_timerfd_gettime: c_long = 4000 + 322; +pub const SYS_timerfd_settime: c_long = 4000 + 323; +pub const SYS_signalfd4: c_long = 4000 + 324; +pub const SYS_eventfd2: c_long = 4000 + 325; +pub const SYS_epoll_create1: c_long = 4000 + 326; +pub const SYS_dup3: c_long = 4000 + 327; +pub const SYS_pipe2: c_long = 4000 + 328; +pub const SYS_inotify_init1: c_long = 4000 + 329; +pub const SYS_preadv: c_long = 4000 + 330; +pub const SYS_pwritev: c_long = 4000 + 331; +pub const SYS_rt_tgsigqueueinfo: c_long = 4000 + 332; +pub const SYS_perf_event_open: c_long = 4000 + 333; +pub const SYS_accept4: c_long = 4000 + 334; +pub const SYS_recvmmsg: c_long = 4000 + 335; +pub const SYS_fanotify_init: c_long = 4000 + 336; +pub const SYS_fanotify_mark: c_long = 4000 + 337; +pub const SYS_prlimit64: c_long = 4000 + 338; +pub const SYS_name_to_handle_at: c_long = 4000 + 339; +pub const SYS_open_by_handle_at: c_long = 4000 + 340; +pub const SYS_clock_adjtime: c_long = 4000 + 341; +pub const SYS_syncfs: c_long = 4000 + 342; +pub const SYS_sendmmsg: c_long = 4000 + 343; +pub const SYS_setns: c_long = 4000 + 344; +pub const SYS_process_vm_readv: c_long = 4000 + 345; +pub const SYS_process_vm_writev: c_long = 4000 + 346; +pub const SYS_kcmp: c_long = 4000 + 347; +pub const SYS_finit_module: c_long = 4000 + 348; +pub const SYS_sched_setattr: c_long = 4000 + 349; +pub const SYS_sched_getattr: c_long = 4000 + 350; +pub const SYS_renameat2: c_long = 4000 + 351; +pub const SYS_seccomp: c_long = 4000 + 352; +pub const SYS_getrandom: c_long = 4000 + 353; +pub const SYS_memfd_create: c_long = 4000 + 354; +pub const SYS_bpf: c_long = 4000 + 355; +pub const SYS_execveat: c_long = 4000 + 356; +pub const SYS_userfaultfd: c_long = 4000 + 357; +pub const SYS_membarrier: c_long = 4000 + 358; +pub const SYS_mlock2: c_long = 4000 + 359; +pub const SYS_copy_file_range: c_long = 4000 + 360; +pub const SYS_preadv2: c_long = 4000 + 361; +pub const SYS_pwritev2: c_long = 4000 + 362; +pub const SYS_pkey_mprotect: c_long = 4000 + 363; +pub const SYS_pkey_alloc: c_long = 4000 + 364; +pub const SYS_pkey_free: c_long = 4000 + 365; +pub const SYS_statx: c_long = 4000 + 366; +pub const SYS_pidfd_send_signal: c_long = 4000 + 424; +pub const SYS_io_uring_setup: c_long = 4000 + 425; +pub const SYS_io_uring_enter: c_long = 4000 + 426; +pub const SYS_io_uring_register: c_long = 4000 + 427; +pub const SYS_open_tree: c_long = 4000 + 428; +pub const SYS_move_mount: c_long = 4000 + 429; +pub const SYS_fsopen: c_long = 4000 + 430; +pub const SYS_fsconfig: c_long = 4000 + 431; +pub const SYS_fsmount: c_long = 4000 + 432; +pub const SYS_fspick: c_long = 4000 + 433; +pub const SYS_pidfd_open: c_long = 4000 + 434; +pub const SYS_clone3: c_long = 4000 + 435; +pub const SYS_close_range: c_long = 4000 + 436; +pub const SYS_openat2: c_long = 4000 + 437; +pub const SYS_pidfd_getfd: c_long = 4000 + 438; +pub const SYS_faccessat2: c_long = 4000 + 439; +pub const SYS_process_madvise: c_long = 4000 + 440; +pub const SYS_epoll_pwait2: c_long = 4000 + 441; +pub const SYS_mount_setattr: c_long = 4000 + 442; +pub const SYS_quotactl_fd: c_long = 4000 + 443; +pub const SYS_landlock_create_ruleset: c_long = 4000 + 444; +pub const SYS_landlock_add_rule: c_long = 4000 + 445; +pub const SYS_landlock_restrict_self: c_long = 4000 + 446; +pub const SYS_memfd_secret: c_long = 4000 + 447; +pub const SYS_process_mrelease: c_long = 4000 + 448; +pub const SYS_futex_waitv: c_long = 4000 + 449; +pub const SYS_set_mempolicy_home_node: c_long = 4000 + 450; #[link(name = "util")] extern "C" { pub fn sysctl( - name: *mut ::c_int, - namelen: ::c_int, - oldp: *mut ::c_void, - oldlenp: *mut ::size_t, - newp: *mut ::c_void, - newlen: ::size_t, - ) -> ::c_int; + name: *mut c_int, + namelen: c_int, + oldp: *mut c_void, + oldlenp: *mut size_t, + newp: *mut c_void, + newlen: size_t, + ) -> c_int; pub fn glob64( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, pglob: *mut glob64_t, - ) -> ::c_int; + ) -> c_int; pub fn globfree64(pglob: *mut glob64_t); pub fn pthread_attr_getaffinity_np( - attr: *const ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *mut ::cpu_set_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + cpusetsize: size_t, + cpuset: *mut crate::cpu_set_t, + ) -> c_int; pub fn pthread_attr_setaffinity_np( - attr: *mut ::pthread_attr_t, - cpusetsize: ::size_t, - cpuset: *const ::cpu_set_t, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + cpusetsize: size_t, + cpuset: *const crate::cpu_set_t, + ) -> c_int; } diff --git a/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs index 3569990f5507d..de46957301023 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mips64/mod.rs @@ -1,10 +1,12 @@ +use crate::{c_int, c_uint, c_ushort, c_void, off64_t, size_t}; + pub type blkcnt_t = i64; pub type blksize_t = i64; pub type c_char = i8; pub type c_long = i64; pub type c_ulong = u64; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; pub type ino_t = u64; pub type nlink_t = u64; pub type off_t = i64; @@ -14,79 +16,79 @@ pub type wchar_t = i32; s! { pub struct stat { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 2], + pub st_dev: c_ulong, + st_pad1: [c_long; 2], pub st_ino: ::ino_t, pub st_mode: ::mode_t, pub st_nlink: ::nlink_t, pub st_uid: ::uid_t, pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - st_pad2: [::c_ulong; 1], - pub st_size: ::off_t, - st_pad3: ::c_long, + pub st_rdev: c_ulong, + st_pad2: [c_ulong; 1], + pub st_size: off_t, + st_pad3: c_long, pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime_nsec: c_long, pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime_nsec: c_long, pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_ctime_nsec: c_long, pub st_blksize: ::blksize_t, - st_pad4: ::c_long, + st_pad4: c_long, pub st_blocks: ::blkcnt_t, - st_pad5: [::c_long; 7], + st_pad5: [c_long; 7], } pub struct stat64 { - pub st_dev: ::c_ulong, - st_pad1: [::c_long; 2], + pub st_dev: c_ulong, + st_pad1: [c_long; 2], pub st_ino: ::ino64_t, pub st_mode: ::mode_t, pub st_nlink: ::nlink_t, pub st_uid: ::uid_t, pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, - st_pad2: [::c_long; 2], - pub st_size: ::off64_t, + pub st_rdev: c_ulong, + st_pad2: [c_long; 2], + pub st_size: off64_t, pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, + pub st_atime_nsec: c_long, pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, + pub st_mtime_nsec: c_long, pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, + pub st_ctime_nsec: c_long, pub st_blksize: ::blksize_t, - st_pad3: ::c_long, + st_pad3: c_long, pub st_blocks: ::blkcnt64_t, - st_pad5: [::c_long; 7], + st_pad5: [c_long; 7], } pub struct pthread_attr_t { - __size: [::c_ulong; 7], + __size: [c_ulong; 7], } pub struct sigaction { - pub sa_flags: ::c_int, + pub sa_flags: c_int, pub sa_sigaction: ::sighandler_t, pub sa_mask: sigset_t, - _restorer: *mut ::c_void, + _restorer: *mut c_void, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct sigset_t { - __size: [::c_ulong; 16], + __size: [c_ulong; 16], } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, - _pad: ::c_int, - _pad2: [::c_long; 14], + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, + _pad: c_int, + _pad2: [c_long; 14], } pub struct ipc_perm { @@ -95,24 +97,24 @@ s! { pub gid: ::gid_t, pub cuid: ::uid_t, pub cgid: ::gid_t, - pub mode: ::c_uint, - pub __seq: ::c_ushort, - __pad1: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub mode: c_uint, + pub __seq: c_ushort, + __pad1: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct shmid_ds { pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, + pub shm_segsz: size_t, pub shm_atime: ::time_t, pub shm_dtime: ::time_t, pub shm_ctime: ::time_t, pub shm_cpid: ::pid_t, pub shm_lpid: ::pid_t, pub shm_nattch: ::shmatt_t, - __unused4: ::c_ulong, - __unused5: ::c_ulong, + __unused4: c_ulong, + __unused5: c_ulong, } pub struct msqid_ds { @@ -120,19 +122,19 @@ s! { pub msg_stime: ::time_t, pub msg_rtime: ::time_t, pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, + __msg_cbytes: c_ulong, pub msg_qnum: ::msgqnum_t, pub msg_qbytes: ::msglen_t, pub msg_lspid: ::pid_t, pub msg_lrpid: ::pid_t, - __glibc_reserved4: ::c_ulong, - __glibc_reserved5: ::c_ulong, + __glibc_reserved4: c_ulong, + __glibc_reserved5: c_ulong, } pub struct statfs { - pub f_type: ::c_long, - pub f_bsize: ::c_long, - pub f_frsize: ::c_long, + pub f_type: c_long, + pub f_bsize: c_long, + pub f_frsize: c_long, pub f_blocks: ::fsblkcnt_t, pub f_bfree: ::fsblkcnt_t, pub f_files: ::fsblkcnt_t, @@ -140,24 +142,24 @@ s! { pub f_bavail: ::fsblkcnt_t, pub f_fsid: ::fsid_t, - pub f_namelen: ::c_long, - f_spare: [::c_long; 6], + pub f_namelen: c_long, + f_spare: [c_long; 6], } pub struct msghdr { - pub msg_name: *mut ::c_void, + pub msg_name: *mut c_void, pub msg_namelen: ::socklen_t, pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, + pub msg_iovlen: size_t, + pub msg_control: *mut c_void, + pub msg_controllen: size_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::size_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: size_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct termios { @@ -170,27 +172,27 @@ s! { } pub struct sysinfo { - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 0], + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 0], } // FIXME(1.0): this is actually a union #[cfg_attr(target_pointer_width = "32", repr(align(4)))] #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct sem_t { - __size: [::c_char; 32], + __size: [c_char; 32], } } @@ -201,4 +203,4 @@ pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; -pub const SYS_gettid: ::c_long = 5178; // Valid for n64 +pub const SYS_gettid: c_long = 5178; // Valid for n64 diff --git a/src/unix/linux_like/linux/uclibc/mips/mod.rs b/src/unix/linux_like/linux/uclibc/mips/mod.rs index d51d73f2944fe..488a4a499d176 100644 --- a/src/unix/linux_like/linux/uclibc/mips/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mips/mod.rs @@ -1,301 +1,303 @@ -pub type pthread_t = ::c_ulong; +use crate::{c_int, c_short, c_uint, size_t}; -pub const SFD_CLOEXEC: ::c_int = 0x080000; +pub type pthread_t = c_ulong; + +pub const SFD_CLOEXEC: c_int = 0x080000; pub const NCCS: usize = 32; -pub const O_TRUNC: ::c_int = 512; +pub const O_TRUNC: c_int = 512; -pub const O_CLOEXEC: ::c_int = 0x80000; +pub const O_CLOEXEC: c_int = 0x80000; -pub const EBFONT: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EDOTDOT: ::c_int = 73; +pub const EBFONT: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EDOTDOT: c_int = 73; -pub const SA_NODEFER: ::c_uint = 0x40000000; -pub const SA_RESETHAND: ::c_uint = 0x80000000; -pub const SA_RESTART: ::c_uint = 0x10000000; -pub const SA_NOCLDSTOP: ::c_uint = 0x00000001; +pub const SA_NODEFER: c_uint = 0x40000000; +pub const SA_RESETHAND: c_uint = 0x80000000; +pub const SA_RESTART: c_uint = 0x10000000; +pub const SA_NOCLDSTOP: c_uint = 0x00000001; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; +pub const EPOLL_CLOEXEC: c_int = 0x80000; -pub const EFD_CLOEXEC: ::c_int = 0x80000; +pub const EFD_CLOEXEC: c_int = 0x80000; -pub const TMP_MAX: ::c_uint = 238328; -pub const _SC_2_C_VERSION: ::c_int = 96; -pub const O_ACCMODE: ::c_int = 3; -pub const O_DIRECT: ::c_int = 0x8000; -pub const O_DIRECTORY: ::c_int = 0x10000; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_NOATIME: ::c_int = 0x40000; -pub const O_PATH: ::c_int = 0o010000000; +pub const TMP_MAX: c_uint = 238328; +pub const _SC_2_C_VERSION: c_int = 96; +pub const O_ACCMODE: c_int = 3; +pub const O_DIRECT: c_int = 0x8000; +pub const O_DIRECTORY: c_int = 0x10000; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_NOATIME: c_int = 0x40000; +pub const O_PATH: c_int = 0o010000000; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_NONBLOCK: ::c_int = 128; -pub const O_SYNC: ::c_int = 0x10; -pub const O_RSYNC: ::c_int = 0x10; -pub const O_DSYNC: ::c_int = 0x10; -pub const O_FSYNC: ::c_int = 0x10; -pub const O_ASYNC: ::c_int = 0x1000; -pub const O_LARGEFILE: ::c_int = 0x2000; -pub const O_NDELAY: ::c_int = 0x80; +pub const O_APPEND: c_int = 8; +pub const O_CREAT: c_int = 256; +pub const O_EXCL: c_int = 1024; +pub const O_NOCTTY: c_int = 2048; +pub const O_NONBLOCK: c_int = 128; +pub const O_SYNC: c_int = 0x10; +pub const O_RSYNC: c_int = 0x10; +pub const O_DSYNC: c_int = 0x10; +pub const O_FSYNC: c_int = 0x10; +pub const O_ASYNC: c_int = 0x1000; +pub const O_LARGEFILE: c_int = 0x2000; +pub const O_NDELAY: c_int = 0x80; -pub const SOCK_NONBLOCK: ::c_int = 128; -pub const PIDFD_NONBLOCK: ::c_int = 128; +pub const SOCK_NONBLOCK: c_int = 128; +pub const PIDFD_NONBLOCK: c_int = 128; -pub const EDEADLK: ::c_int = 45; -pub const ENAMETOOLONG: ::c_int = 78; -pub const ENOLCK: ::c_int = 46; -pub const ENOSYS: ::c_int = 89; -pub const ENOTEMPTY: ::c_int = 93; -pub const ELOOP: ::c_int = 90; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const FFDLY: ::c_int = 0o0100000; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EMULTIHOP: ::c_int = 74; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EBADMSG: ::c_int = 77; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; -pub const EUCLEAN: ::c_int = 135; -pub const ENOTNAM: ::c_int = 137; -pub const ENAVAIL: ::c_int = 138; -pub const EISNAM: ::c_int = 139; -pub const EREMOTEIO: ::c_int = 140; -pub const EDQUOT: ::c_int = 1133; -pub const ENOMEDIUM: ::c_int = 159; -pub const EMEDIUMTYPE: ::c_int = 160; -pub const ECANCELED: ::c_int = 158; -pub const ENOKEY: ::c_int = 161; -pub const EKEYEXPIRED: ::c_int = 162; -pub const EKEYREVOKED: ::c_int = 163; -pub const EKEYREJECTED: ::c_int = 164; -pub const EOWNERDEAD: ::c_int = 165; -pub const ENOTRECOVERABLE: ::c_int = 166; -pub const ERFKILL: ::c_int = 167; +pub const EDEADLK: c_int = 45; +pub const ENAMETOOLONG: c_int = 78; +pub const ENOLCK: c_int = 46; +pub const ENOSYS: c_int = 89; +pub const ENOTEMPTY: c_int = 93; +pub const ELOOP: c_int = 90; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const FFDLY: c_int = 0o0100000; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EMULTIHOP: c_int = 74; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EBADMSG: c_int = 77; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const EUSERS: c_int = 94; +pub const ENOTSOCK: c_int = 95; +pub const EDESTADDRREQ: c_int = 96; +pub const EMSGSIZE: c_int = 97; +pub const EPROTOTYPE: c_int = 98; +pub const ENOPROTOOPT: c_int = 99; +pub const EPROTONOSUPPORT: c_int = 120; +pub const ESOCKTNOSUPPORT: c_int = 121; +pub const EOPNOTSUPP: c_int = 122; +pub const EPFNOSUPPORT: c_int = 123; +pub const EAFNOSUPPORT: c_int = 124; +pub const EADDRINUSE: c_int = 125; +pub const EADDRNOTAVAIL: c_int = 126; +pub const ENETDOWN: c_int = 127; +pub const ENETUNREACH: c_int = 128; +pub const ENETRESET: c_int = 129; +pub const ECONNABORTED: c_int = 130; +pub const ECONNRESET: c_int = 131; +pub const ENOBUFS: c_int = 132; +pub const EISCONN: c_int = 133; +pub const ENOTCONN: c_int = 134; +pub const ESHUTDOWN: c_int = 143; +pub const ETOOMANYREFS: c_int = 144; +pub const ETIMEDOUT: c_int = 145; +pub const ECONNREFUSED: c_int = 146; +pub const EHOSTDOWN: c_int = 147; +pub const EHOSTUNREACH: c_int = 148; +pub const EALREADY: c_int = 149; +pub const EINPROGRESS: c_int = 150; +pub const ESTALE: c_int = 151; +pub const EUCLEAN: c_int = 135; +pub const ENOTNAM: c_int = 137; +pub const ENAVAIL: c_int = 138; +pub const EISNAM: c_int = 139; +pub const EREMOTEIO: c_int = 140; +pub const EDQUOT: c_int = 1133; +pub const ENOMEDIUM: c_int = 159; +pub const EMEDIUMTYPE: c_int = 160; +pub const ECANCELED: c_int = 158; +pub const ENOKEY: c_int = 161; +pub const EKEYEXPIRED: c_int = 162; +pub const EKEYREVOKED: c_int = 163; +pub const EKEYREJECTED: c_int = 164; +pub const EOWNERDEAD: c_int = 165; +pub const ENOTRECOVERABLE: c_int = 166; +pub const ERFKILL: c_int = 167; -pub const MAP_NORESERVE: ::c_int = 0x400; -pub const MAP_ANON: ::c_int = 0x800; -pub const MAP_ANONYMOUS: ::c_int = 0x800; -pub const MAP_GROWSDOWN: ::c_int = 0x1000; -pub const MAP_DENYWRITE: ::c_int = 0x2000; -pub const MAP_EXECUTABLE: ::c_int = 0x4000; -pub const MAP_LOCKED: ::c_int = 0x8000; -pub const MAP_POPULATE: ::c_int = 0x10000; -pub const MAP_NONBLOCK: ::c_int = 0x20000; -pub const MAP_STACK: ::c_int = 0x40000; +pub const MAP_NORESERVE: c_int = 0x400; +pub const MAP_ANON: c_int = 0x800; +pub const MAP_ANONYMOUS: c_int = 0x800; +pub const MAP_GROWSDOWN: c_int = 0x1000; +pub const MAP_DENYWRITE: c_int = 0x2000; +pub const MAP_EXECUTABLE: c_int = 0x4000; +pub const MAP_LOCKED: c_int = 0x8000; +pub const MAP_POPULATE: c_int = 0x10000; +pub const MAP_NONBLOCK: c_int = 0x20000; +pub const MAP_STACK: c_int = 0x40000; -pub const NLDLY: ::tcflag_t = 0o0000400; +pub const NLDLY: crate::tcflag_t = 0o0000400; -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_DGRAM: ::c_int = 1; -pub const SOCK_SEQPACKET: ::c_int = 5; +pub const SOCK_STREAM: c_int = 2; +pub const SOCK_DGRAM: c_int = 1; +pub const SOCK_SEQPACKET: c_int = 5; -pub const SA_ONSTACK: ::c_uint = 0x08000000; -pub const SA_SIGINFO: ::c_uint = 0x00000008; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; +pub const SA_ONSTACK: c_uint = 0x08000000; +pub const SA_SIGINFO: c_uint = 0x00000008; +pub const SA_NOCLDWAIT: c_int = 0x00010000; -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = 22; -pub const SIGSYS: ::c_int = 12; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 3; -pub const SIG_BLOCK: ::c_int = 0x1; -pub const SIG_UNBLOCK: ::c_int = 0x2; +pub const SIGCHLD: c_int = 18; +pub const SIGBUS: c_int = 10; +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGWINCH: c_int = 20; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGCONT: c_int = 25; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGURG: c_int = 21; +pub const SIGIO: c_int = 22; +pub const SIGSYS: c_int = 12; +pub const SIGPWR: c_int = 19; +pub const SIG_SETMASK: c_int = 3; +pub const SIG_BLOCK: c_int = 0x1; +pub const SIG_UNBLOCK: c_int = 0x2; -pub const POLLWRNORM: ::c_short = 0x004; -pub const POLLWRBAND: ::c_short = 0x100; +pub const POLLWRNORM: c_short = 0x004; +pub const POLLWRBAND: c_short = 0x100; -pub const PTHREAD_STACK_MIN: ::size_t = 16384; +pub const PTHREAD_STACK_MIN: size_t = 16384; pub const VEOF: usize = 16; pub const VEOL: usize = 17; pub const VEOL2: usize = 6; pub const VMIN: usize = 4; -pub const IEXTEN: ::tcflag_t = 0x00000100; -pub const TOSTOP: ::tcflag_t = 0x00008000; -pub const FLUSHO: ::tcflag_t = 0x00002000; -pub const TCSANOW: ::c_int = 0x540e; -pub const TCSADRAIN: ::c_int = 0x540f; -pub const TCSAFLUSH: ::c_int = 0x5410; +pub const IEXTEN: crate::tcflag_t = 0x00000100; +pub const TOSTOP: crate::tcflag_t = 0x00008000; +pub const FLUSHO: crate::tcflag_t = 0x00002000; +pub const TCSANOW: c_int = 0x540e; +pub const TCSADRAIN: c_int = 0x540f; +pub const TCSAFLUSH: c_int = 0x5410; -pub const CPU_SETSIZE: ::c_int = 0x400; +pub const CPU_SETSIZE: c_int = 0x400; -pub const EFD_NONBLOCK: ::c_int = 0x80; +pub const EFD_NONBLOCK: c_int = 0x80; -pub const F_GETLK: ::c_int = 14; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; +pub const F_GETLK: c_int = 14; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; -pub const SFD_NONBLOCK: ::c_int = 0x80; +pub const SFD_NONBLOCK: c_int = 0x80; -pub const RTLD_GLOBAL: ::c_int = 0x4; +pub const RTLD_GLOBAL: c_int = 0x4; -pub const SIGSTKSZ: ::size_t = 8192; -pub const CBAUD: ::tcflag_t = 0o0010017; -pub const CBAUDEX: ::tcflag_t = 0o0010000; -pub const CIBAUD: ::tcflag_t = 0o002003600000; -pub const TAB1: ::tcflag_t = 0x00000800; -pub const TAB2: ::tcflag_t = 0x00001000; -pub const TAB3: ::tcflag_t = 0x00001800; -pub const TABDLY: ::tcflag_t = 0o0014000; -pub const CR1: ::tcflag_t = 0x00000200; -pub const CR2: ::tcflag_t = 0x00000400; -pub const CR3: ::tcflag_t = 0x00000600; -pub const FF1: ::tcflag_t = 0x00008000; -pub const BS1: ::tcflag_t = 0x00002000; -pub const BSDLY: ::tcflag_t = 0o0020000; -pub const VT1: ::tcflag_t = 0x00004000; +pub const SIGSTKSZ: size_t = 8192; +pub const CBAUD: crate::tcflag_t = 0o0010017; +pub const CBAUDEX: crate::tcflag_t = 0o0010000; +pub const CIBAUD: crate::tcflag_t = 0o002003600000; +pub const TAB1: crate::tcflag_t = 0x00000800; +pub const TAB2: crate::tcflag_t = 0x00001000; +pub const TAB3: crate::tcflag_t = 0x00001800; +pub const TABDLY: crate::tcflag_t = 0o0014000; +pub const CR1: crate::tcflag_t = 0x00000200; +pub const CR2: crate::tcflag_t = 0x00000400; +pub const CR3: crate::tcflag_t = 0x00000600; +pub const FF1: crate::tcflag_t = 0x00008000; +pub const BS1: crate::tcflag_t = 0x00002000; +pub const BSDLY: crate::tcflag_t = 0o0020000; +pub const VT1: crate::tcflag_t = 0x00004000; pub const VWERASE: usize = 14; -pub const XTABS: ::tcflag_t = 0o0014000; +pub const XTABS: crate::tcflag_t = 0o0014000; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; pub const VSWTC: usize = 7; -pub const VTDLY: ::c_int = 0o0040000; +pub const VTDLY: c_int = 0o0040000; pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 5; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const OLCUC: ::tcflag_t = 0o0000002; -pub const ONLCR: ::tcflag_t = 0x4; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x00000010; -pub const CS7: ::tcflag_t = 0x00000020; -pub const CS8: ::tcflag_t = 0x00000030; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CRDLY: ::c_int = 0o0003000; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOPRT: ::tcflag_t = 0x00000400; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const PENDIN: ::tcflag_t = 0x00004000; -pub const NOFLSH: ::tcflag_t = 0x00000080; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const OLCUC: crate::tcflag_t = 0o0000002; +pub const ONLCR: crate::tcflag_t = 0x4; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x00000010; +pub const CS7: crate::tcflag_t = 0x00000020; +pub const CS8: crate::tcflag_t = 0x00000030; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CRDLY: c_int = 0o0003000; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOPRT: crate::tcflag_t = 0x00000400; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const PENDIN: crate::tcflag_t = 0x00004000; +pub const NOFLSH: crate::tcflag_t = 0x00000080; -pub const MAP_HUGETLB: ::c_int = 0x80000; +pub const MAP_HUGETLB: c_int = 0x80000; -pub const B0: ::speed_t = 0o000000; -pub const B50: ::speed_t = 0o000001; -pub const B75: ::speed_t = 0o000002; -pub const B110: ::speed_t = 0o000003; -pub const B134: ::speed_t = 0o000004; -pub const B150: ::speed_t = 0o000005; -pub const B200: ::speed_t = 0o000006; -pub const B300: ::speed_t = 0o000007; -pub const B600: ::speed_t = 0o000010; -pub const B1200: ::speed_t = 0o000011; -pub const B1800: ::speed_t = 0o000012; -pub const B2400: ::speed_t = 0o000013; -pub const B4800: ::speed_t = 0o000014; -pub const B9600: ::speed_t = 0o000015; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; -pub const B57600: ::speed_t = 0o010001; -pub const B115200: ::speed_t = 0o010002; -pub const B230400: ::speed_t = 0o010003; -pub const B460800: ::speed_t = 0o010004; -pub const B500000: ::speed_t = 0o010005; -pub const B576000: ::speed_t = 0o010006; -pub const B921600: ::speed_t = 0o010007; -pub const B1000000: ::speed_t = 0o010010; -pub const B1152000: ::speed_t = 0o010011; -pub const B1500000: ::speed_t = 0o010012; -pub const B2000000: ::speed_t = 0o010013; -pub const B2500000: ::speed_t = 0o010014; -pub const B3000000: ::speed_t = 0o010015; -pub const B3500000: ::speed_t = 0o010016; -pub const B4000000: ::speed_t = 0o010017; +pub const B0: crate::speed_t = 0o000000; +pub const B50: crate::speed_t = 0o000001; +pub const B75: crate::speed_t = 0o000002; +pub const B110: crate::speed_t = 0o000003; +pub const B134: crate::speed_t = 0o000004; +pub const B150: crate::speed_t = 0o000005; +pub const B200: crate::speed_t = 0o000006; +pub const B300: crate::speed_t = 0o000007; +pub const B600: crate::speed_t = 0o000010; +pub const B1200: crate::speed_t = 0o000011; +pub const B1800: crate::speed_t = 0o000012; +pub const B2400: crate::speed_t = 0o000013; +pub const B4800: crate::speed_t = 0o000014; +pub const B9600: crate::speed_t = 0o000015; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; +pub const B57600: crate::speed_t = 0o010001; +pub const B115200: crate::speed_t = 0o010002; +pub const B230400: crate::speed_t = 0o010003; +pub const B460800: crate::speed_t = 0o010004; +pub const B500000: crate::speed_t = 0o010005; +pub const B576000: crate::speed_t = 0o010006; +pub const B921600: crate::speed_t = 0o010007; +pub const B1000000: crate::speed_t = 0o010010; +pub const B1152000: crate::speed_t = 0o010011; +pub const B1500000: crate::speed_t = 0o010012; +pub const B2000000: crate::speed_t = 0o010013; +pub const B2500000: crate::speed_t = 0o010014; +pub const B3000000: crate::speed_t = 0o010015; +pub const B3500000: crate::speed_t = 0o010016; +pub const B4000000: crate::speed_t = 0o010017; cfg_if! { if #[cfg(target_arch = "mips")] { diff --git a/src/unix/linux_like/linux/uclibc/mod.rs b/src/unix/linux_like/linux/uclibc/mod.rs index 84bd975c26cfe..95aed917fe400 100644 --- a/src/unix/linux_like/linux/uclibc/mod.rs +++ b/src/unix/linux_like/linux/uclibc/mod.rs @@ -1,84 +1,86 @@ -pub type shmatt_t = ::c_ulong; -pub type msgqnum_t = ::c_ulong; -pub type msglen_t = ::c_ulong; -pub type regoff_t = ::c_int; -pub type rlim_t = ::c_ulong; -pub type __rlimit_resource_t = ::c_ulong; -pub type __priority_which_t = ::c_uint; +use crate::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void, off64_t, size_t, ssize_t}; + +pub type shmatt_t = c_ulong; +pub type msgqnum_t = c_ulong; +pub type msglen_t = c_ulong; +pub type regoff_t = c_int; +pub type rlim_t = c_ulong; +pub type __rlimit_resource_t = c_ulong; +pub type __priority_which_t = c_uint; cfg_if! { if #[cfg(doc)] { // Used in `linux::arch` to define ioctl constants. - pub(crate) type Ioctl = ::c_ulong; + pub(crate) type Ioctl = c_ulong; } else { #[doc(hidden)] - pub type Ioctl = ::c_ulong; + pub type Ioctl = c_ulong; } } s! { pub struct statvfs { // Different than GNU! - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, #[cfg(target_endian = "little")] - pub f_fsid: ::c_ulong, + pub f_fsid: c_ulong, #[cfg(target_pointer_width = "32")] - __f_unused: ::c_int, + __f_unused: c_int, #[cfg(target_endian = "big")] - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct regex_t { - __buffer: *mut ::c_void, - __allocated: ::size_t, - __used: ::size_t, - __syntax: ::c_ulong, - __fastmap: *mut ::c_char, - __translate: *mut ::c_char, - __re_nsub: ::size_t, + __buffer: *mut c_void, + __allocated: size_t, + __used: size_t, + __syntax: c_ulong, + __fastmap: *mut c_char, + __translate: *mut c_char, + __re_nsub: size_t, __bitfield: u8, } pub struct rtentry { - pub rt_pad1: ::c_ulong, - pub rt_dst: ::sockaddr, - pub rt_gateway: ::sockaddr, - pub rt_genmask: ::sockaddr, - pub rt_flags: ::c_ushort, - pub rt_pad2: ::c_short, - pub rt_pad3: ::c_ulong, - pub rt_tos: ::c_uchar, - pub rt_class: ::c_uchar, + pub rt_pad1: c_ulong, + pub rt_dst: crate::sockaddr, + pub rt_gateway: crate::sockaddr, + pub rt_genmask: crate::sockaddr, + pub rt_flags: c_ushort, + pub rt_pad2: c_short, + pub rt_pad3: c_ulong, + pub rt_tos: c_uchar, + pub rt_class: c_uchar, #[cfg(target_pointer_width = "64")] - pub rt_pad4: [::c_short; 3usize], + pub rt_pad4: [c_short; 3usize], #[cfg(not(target_pointer_width = "64"))] - pub rt_pad4: ::c_short, - pub rt_metric: ::c_short, - pub rt_dev: *mut ::c_char, - pub rt_mtu: ::c_ulong, - pub rt_window: ::c_ulong, - pub rt_irtt: ::c_ushort, + pub rt_pad4: c_short, + pub rt_metric: c_short, + pub rt_dev: *mut c_char, + pub rt_mtu: c_ulong, + pub rt_window: c_ulong, + pub rt_irtt: c_ushort, } pub struct __exit_status { - pub e_termination: ::c_short, - pub e_exit: ::c_short, + pub e_termination: c_short, + pub e_exit: c_short, } pub struct ptrace_peeksiginfo_args { - pub off: ::__u64, - pub flags: ::__u32, - pub nr: ::__s32, + pub off: crate::__u64, + pub flags: crate::__u32, + pub nr: crate::__s32, } #[cfg_attr( @@ -104,36 +106,36 @@ s! { repr(align(8)) )] pub struct pthread_mutexattr_t { - size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], } #[repr(align(4))] pub struct pthread_condattr_t { - size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { #[repr(C)] struct siginfo_sigfault { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - si_addr: *mut ::c_void, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + si_addr: *mut c_void, } (*(self as *const siginfo_t as *const siginfo_sigfault)).si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_si_value { - _si_signo: ::c_int, - _si_errno: ::c_int, - _si_code: ::c_int, - _si_timerid: ::c_int, - _si_overrun: ::c_int, - si_value: ::sigval, + _si_signo: c_int, + _si_errno: c_int, + _si_code: c_int, + _si_timerid: c_int, + _si_overrun: c_int, + si_value: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_si_value)).si_value } @@ -142,14 +144,14 @@ impl siginfo_t { // Internal, for casts to access union fields #[repr(C)] struct sifields_sigchld { - si_pid: ::pid_t, - si_uid: ::uid_t, - si_status: ::c_int, - si_utime: ::c_long, - si_stime: ::c_long, + si_pid: crate::pid_t, + si_uid: crate::uid_t, + si_status: c_int, + si_utime: c_long, + si_stime: c_long, } -impl ::Copy for sifields_sigchld {} -impl ::Clone for sifields_sigchld { +impl Copy for sifields_sigchld {} +impl Clone for sifields_sigchld { fn clone(&self) -> sifields_sigchld { *self } @@ -158,7 +160,7 @@ impl ::Clone for sifields_sigchld { // Internal, for casts to access union fields #[repr(C)] union sifields { - _align_pointer: *mut ::c_void, + _align_pointer: *mut c_void, sigchld: sifields_sigchld, } @@ -167,7 +169,7 @@ union sifields { // sifields vary on 32-bit and 64-bit architectures. #[repr(C)] struct siginfo_f { - _siginfo_base: [::c_int; 3], + _siginfo_base: [c_int; 3], sifields: sifields, } @@ -176,294 +178,286 @@ impl siginfo_t { &(*(self as *const siginfo_t as *const siginfo_f)).sifields } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.sifields().sigchld.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.sifields().sigchld.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.sifields().sigchld.si_status } - pub unsafe fn si_utime(&self) -> ::c_long { + pub unsafe fn si_utime(&self) -> c_long { self.sifields().sigchld.si_utime } - pub unsafe fn si_stime(&self) -> ::c_long { + pub unsafe fn si_stime(&self) -> c_long { self.sifields().sigchld.si_stime } } -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; -pub const MCL_ONFAULT: ::c_int = 0x0004; +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; +pub const MCL_ONFAULT: c_int = 0x0004; -pub const SIGEV_THREAD_ID: ::c_int = 4; +pub const SIGEV_THREAD_ID: c_int = 4; -pub const AF_VSOCK: ::c_int = 40; +pub const AF_VSOCK: c_int = 40; // Most `*_SUPER_MAGIC` constants are defined at the `linux_like` level; the // following are only available on newer Linux versions than the versions // currently used in CI in some configurations, so we define them here. -pub const BINDERFS_SUPER_MAGIC: ::c_long = 0x6c6f6f70; -pub const XFS_SUPER_MAGIC: ::c_long = 0x58465342; - -pub const PTRACE_TRACEME: ::c_int = 0; -pub const PTRACE_PEEKTEXT: ::c_int = 1; -pub const PTRACE_PEEKDATA: ::c_int = 2; -pub const PTRACE_PEEKUSER: ::c_int = 3; -pub const PTRACE_POKETEXT: ::c_int = 4; -pub const PTRACE_POKEDATA: ::c_int = 5; -pub const PTRACE_POKEUSER: ::c_int = 6; -pub const PTRACE_CONT: ::c_int = 7; -pub const PTRACE_KILL: ::c_int = 8; -pub const PTRACE_SINGLESTEP: ::c_int = 9; -pub const PTRACE_GETREGS: ::c_int = 12; -pub const PTRACE_SETREGS: ::c_int = 13; -pub const PTRACE_GETFPREGS: ::c_int = 14; -pub const PTRACE_SETFPREGS: ::c_int = 15; -pub const PTRACE_ATTACH: ::c_int = 16; -pub const PTRACE_DETACH: ::c_int = 17; -pub const PTRACE_GETFPXREGS: ::c_int = 18; -pub const PTRACE_SETFPXREGS: ::c_int = 19; -pub const PTRACE_SYSCALL: ::c_int = 24; -pub const PTRACE_SETOPTIONS: ::c_int = 0x4200; -pub const PTRACE_GETEVENTMSG: ::c_int = 0x4201; -pub const PTRACE_GETSIGINFO: ::c_int = 0x4202; -pub const PTRACE_SETSIGINFO: ::c_int = 0x4203; -pub const PTRACE_GETREGSET: ::c_int = 0x4204; -pub const PTRACE_SETREGSET: ::c_int = 0x4205; -pub const PTRACE_SEIZE: ::c_int = 0x4206; -pub const PTRACE_INTERRUPT: ::c_int = 0x4207; -pub const PTRACE_LISTEN: ::c_int = 0x4208; - -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const BINDERFS_SUPER_MAGIC: c_long = 0x6c6f6f70; +pub const XFS_SUPER_MAGIC: c_long = 0x58465342; + +pub const PTRACE_TRACEME: c_int = 0; +pub const PTRACE_PEEKTEXT: c_int = 1; +pub const PTRACE_PEEKDATA: c_int = 2; +pub const PTRACE_PEEKUSER: c_int = 3; +pub const PTRACE_POKETEXT: c_int = 4; +pub const PTRACE_POKEDATA: c_int = 5; +pub const PTRACE_POKEUSER: c_int = 6; +pub const PTRACE_CONT: c_int = 7; +pub const PTRACE_KILL: c_int = 8; +pub const PTRACE_SINGLESTEP: c_int = 9; +pub const PTRACE_GETREGS: c_int = 12; +pub const PTRACE_SETREGS: c_int = 13; +pub const PTRACE_GETFPREGS: c_int = 14; +pub const PTRACE_SETFPREGS: c_int = 15; +pub const PTRACE_ATTACH: c_int = 16; +pub const PTRACE_DETACH: c_int = 17; +pub const PTRACE_GETFPXREGS: c_int = 18; +pub const PTRACE_SETFPXREGS: c_int = 19; +pub const PTRACE_SYSCALL: c_int = 24; +pub const PTRACE_SETOPTIONS: c_int = 0x4200; +pub const PTRACE_GETEVENTMSG: c_int = 0x4201; +pub const PTRACE_GETSIGINFO: c_int = 0x4202; +pub const PTRACE_SETSIGINFO: c_int = 0x4203; +pub const PTRACE_GETREGSET: c_int = 0x4204; +pub const PTRACE_SETREGSET: c_int = 0x4205; +pub const PTRACE_SEIZE: c_int = 0x4206; +pub const PTRACE_INTERRUPT: c_int = 0x4207; +pub const PTRACE_LISTEN: c_int = 0x4208; + +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; // These are different than GNU! -pub const LC_CTYPE: ::c_int = 0; -pub const LC_NUMERIC: ::c_int = 1; -pub const LC_TIME: ::c_int = 3; -pub const LC_COLLATE: ::c_int = 4; -pub const LC_MONETARY: ::c_int = 2; -pub const LC_MESSAGES: ::c_int = 5; -pub const LC_ALL: ::c_int = 6; +pub const LC_CTYPE: c_int = 0; +pub const LC_NUMERIC: c_int = 1; +pub const LC_TIME: c_int = 3; +pub const LC_COLLATE: c_int = 4; +pub const LC_MONETARY: c_int = 2; +pub const LC_MESSAGES: c_int = 5; +pub const LC_ALL: c_int = 6; // end different section // MS_ flags for mount(2) -pub const MS_RMT_MASK: ::c_ulong = ::MS_RDONLY | ::MS_SYNCHRONOUS | ::MS_MANDLOCK | ::MS_I_VERSION; +pub const MS_RMT_MASK: c_ulong = + crate::MS_RDONLY | crate::MS_SYNCHRONOUS | crate::MS_MANDLOCK | crate::MS_I_VERSION; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; +pub const ENOTSUP: c_int = EOPNOTSUPP; -pub const IPV6_JOIN_GROUP: ::c_int = 20; -pub const IPV6_LEAVE_GROUP: ::c_int = 21; +pub const IPV6_JOIN_GROUP: c_int = 20; +pub const IPV6_LEAVE_GROUP: c_int = 21; // These are different from GNU -pub const ABDAY_1: ::nl_item = 0x300; -pub const ABDAY_2: ::nl_item = 0x301; -pub const ABDAY_3: ::nl_item = 0x302; -pub const ABDAY_4: ::nl_item = 0x303; -pub const ABDAY_5: ::nl_item = 0x304; -pub const ABDAY_6: ::nl_item = 0x305; -pub const ABDAY_7: ::nl_item = 0x306; -pub const DAY_1: ::nl_item = 0x307; -pub const DAY_2: ::nl_item = 0x308; -pub const DAY_3: ::nl_item = 0x309; -pub const DAY_4: ::nl_item = 0x30A; -pub const DAY_5: ::nl_item = 0x30B; -pub const DAY_6: ::nl_item = 0x30C; -pub const DAY_7: ::nl_item = 0x30D; -pub const ABMON_1: ::nl_item = 0x30E; -pub const ABMON_2: ::nl_item = 0x30F; -pub const ABMON_3: ::nl_item = 0x310; -pub const ABMON_4: ::nl_item = 0x311; -pub const ABMON_5: ::nl_item = 0x312; -pub const ABMON_6: ::nl_item = 0x313; -pub const ABMON_7: ::nl_item = 0x314; -pub const ABMON_8: ::nl_item = 0x315; -pub const ABMON_9: ::nl_item = 0x316; -pub const ABMON_10: ::nl_item = 0x317; -pub const ABMON_11: ::nl_item = 0x318; -pub const ABMON_12: ::nl_item = 0x319; -pub const MON_1: ::nl_item = 0x31A; -pub const MON_2: ::nl_item = 0x31B; -pub const MON_3: ::nl_item = 0x31C; -pub const MON_4: ::nl_item = 0x31D; -pub const MON_5: ::nl_item = 0x31E; -pub const MON_6: ::nl_item = 0x31F; -pub const MON_7: ::nl_item = 0x320; -pub const MON_8: ::nl_item = 0x321; -pub const MON_9: ::nl_item = 0x322; -pub const MON_10: ::nl_item = 0x323; -pub const MON_11: ::nl_item = 0x324; -pub const MON_12: ::nl_item = 0x325; -pub const AM_STR: ::nl_item = 0x326; -pub const PM_STR: ::nl_item = 0x327; -pub const D_T_FMT: ::nl_item = 0x328; -pub const D_FMT: ::nl_item = 0x329; -pub const T_FMT: ::nl_item = 0x32A; -pub const T_FMT_AMPM: ::nl_item = 0x32B; -pub const ERA: ::nl_item = 0x32C; -pub const ERA_D_FMT: ::nl_item = 0x32E; -pub const ALT_DIGITS: ::nl_item = 0x32F; -pub const ERA_D_T_FMT: ::nl_item = 0x330; -pub const ERA_T_FMT: ::nl_item = 0x331; -pub const CODESET: ::nl_item = 10; -pub const CRNCYSTR: ::nl_item = 0x215; -pub const RADIXCHAR: ::nl_item = 0x100; -pub const THOUSEP: ::nl_item = 0x101; -pub const NOEXPR: ::nl_item = 0x501; -pub const YESSTR: ::nl_item = 0x502; -pub const NOSTR: ::nl_item = 0x503; +pub const ABDAY_1: crate::nl_item = 0x300; +pub const ABDAY_2: crate::nl_item = 0x301; +pub const ABDAY_3: crate::nl_item = 0x302; +pub const ABDAY_4: crate::nl_item = 0x303; +pub const ABDAY_5: crate::nl_item = 0x304; +pub const ABDAY_6: crate::nl_item = 0x305; +pub const ABDAY_7: crate::nl_item = 0x306; +pub const DAY_1: crate::nl_item = 0x307; +pub const DAY_2: crate::nl_item = 0x308; +pub const DAY_3: crate::nl_item = 0x309; +pub const DAY_4: crate::nl_item = 0x30A; +pub const DAY_5: crate::nl_item = 0x30B; +pub const DAY_6: crate::nl_item = 0x30C; +pub const DAY_7: crate::nl_item = 0x30D; +pub const ABMON_1: crate::nl_item = 0x30E; +pub const ABMON_2: crate::nl_item = 0x30F; +pub const ABMON_3: crate::nl_item = 0x310; +pub const ABMON_4: crate::nl_item = 0x311; +pub const ABMON_5: crate::nl_item = 0x312; +pub const ABMON_6: crate::nl_item = 0x313; +pub const ABMON_7: crate::nl_item = 0x314; +pub const ABMON_8: crate::nl_item = 0x315; +pub const ABMON_9: crate::nl_item = 0x316; +pub const ABMON_10: crate::nl_item = 0x317; +pub const ABMON_11: crate::nl_item = 0x318; +pub const ABMON_12: crate::nl_item = 0x319; +pub const MON_1: crate::nl_item = 0x31A; +pub const MON_2: crate::nl_item = 0x31B; +pub const MON_3: crate::nl_item = 0x31C; +pub const MON_4: crate::nl_item = 0x31D; +pub const MON_5: crate::nl_item = 0x31E; +pub const MON_6: crate::nl_item = 0x31F; +pub const MON_7: crate::nl_item = 0x320; +pub const MON_8: crate::nl_item = 0x321; +pub const MON_9: crate::nl_item = 0x322; +pub const MON_10: crate::nl_item = 0x323; +pub const MON_11: crate::nl_item = 0x324; +pub const MON_12: crate::nl_item = 0x325; +pub const AM_STR: crate::nl_item = 0x326; +pub const PM_STR: crate::nl_item = 0x327; +pub const D_T_FMT: crate::nl_item = 0x328; +pub const D_FMT: crate::nl_item = 0x329; +pub const T_FMT: crate::nl_item = 0x32A; +pub const T_FMT_AMPM: crate::nl_item = 0x32B; +pub const ERA: crate::nl_item = 0x32C; +pub const ERA_D_FMT: crate::nl_item = 0x32E; +pub const ALT_DIGITS: crate::nl_item = 0x32F; +pub const ERA_D_T_FMT: crate::nl_item = 0x330; +pub const ERA_T_FMT: crate::nl_item = 0x331; +pub const CODESET: crate::nl_item = 10; +pub const CRNCYSTR: crate::nl_item = 0x215; +pub const RADIXCHAR: crate::nl_item = 0x100; +pub const THOUSEP: crate::nl_item = 0x101; +pub const NOEXPR: crate::nl_item = 0x501; +pub const YESSTR: crate::nl_item = 0x502; +pub const NOSTR: crate::nl_item = 0x503; // Different than Gnu. -pub const FILENAME_MAX: ::c_uint = 4095; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; - -pub const SOMAXCONN: ::c_int = 128; - -pub const ST_RELATIME: ::c_ulong = 4096; - -pub const AF_NFC: ::c_int = PF_NFC; -pub const BUFSIZ: ::c_int = 4096; -pub const EDEADLOCK: ::c_int = EDEADLK; -pub const EXTA: ::c_uint = B19200; -pub const EXTB: ::c_uint = B38400; -pub const EXTPROC: ::tcflag_t = 0o200000; -pub const FOPEN_MAX: ::c_int = 16; -pub const F_GETOWN: ::c_int = 9; -pub const F_OFD_GETLK: ::c_int = 36; -pub const F_OFD_SETLK: ::c_int = 37; -pub const F_OFD_SETLKW: ::c_int = 38; -pub const F_RDLCK: ::c_int = 0; -pub const F_SETOWN: ::c_int = 8; -pub const F_UNLCK: ::c_int = 2; -pub const F_WRLCK: ::c_int = 1; -pub const IPV6_MULTICAST_ALL: ::c_int = 29; -pub const IPV6_ROUTER_ALERT_ISOLATE: ::c_int = 30; -pub const MAP_HUGE_SHIFT: ::c_int = 26; -pub const MAP_HUGE_MASK: ::c_int = 0x3f; -pub const MAP_HUGE_64KB: ::c_int = 16 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_512KB: ::c_int = 19 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_1MB: ::c_int = 20 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_2MB: ::c_int = 21 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_8MB: ::c_int = 23 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_16MB: ::c_int = 24 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_32MB: ::c_int = 25 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_256MB: ::c_int = 28 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_512MB: ::c_int = 29 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_1GB: ::c_int = 30 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_2GB: ::c_int = 31 << MAP_HUGE_SHIFT; -pub const MAP_HUGE_16GB: ::c_int = 34 << MAP_HUGE_SHIFT; -pub const MINSIGSTKSZ: ::c_int = 2048; -pub const MSG_COPY: ::c_int = 0o40000; -pub const NI_MAXHOST: ::socklen_t = 1025; -pub const O_TMPFILE: ::c_int = 0o20000000 | O_DIRECTORY; -pub const PACKET_MR_UNICAST: ::c_int = 3; -pub const PF_NFC: ::c_int = 39; -pub const PF_VSOCK: ::c_int = 40; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; -pub const PTRACE_EVENT_STOP: ::c_int = 128; -pub const PTRACE_GETSIGMASK: ::c_uint = 0x420a; -pub const PTRACE_PEEKSIGINFO: ::c_int = 0x4209; -pub const PTRACE_SETSIGMASK: ::c_uint = 0x420b; -pub const RTLD_NOLOAD: ::c_int = 0x00004; -pub const RUSAGE_THREAD: ::c_int = 1; -pub const SHM_EXEC: ::c_int = 0o100000; -pub const SIGPOLL: ::c_int = SIGIO; -pub const SOCK_DCCP: ::c_int = 6; -pub const SOCK_PACKET: ::c_int = 10; -pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; -pub const UDP_GRO: ::c_int = 104; -pub const UDP_SEGMENT: ::c_int = 103; -pub const YESEXPR: ::c_int = ((5) << 8) | (0); +pub const FILENAME_MAX: c_uint = 4095; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; + +pub const SOMAXCONN: c_int = 128; + +pub const ST_RELATIME: c_ulong = 4096; + +pub const AF_NFC: c_int = PF_NFC; +pub const BUFSIZ: c_int = 4096; +pub const EDEADLOCK: c_int = EDEADLK; +pub const EXTA: c_uint = B19200; +pub const EXTB: c_uint = B38400; +pub const EXTPROC: crate::tcflag_t = 0o200000; +pub const FOPEN_MAX: c_int = 16; +pub const F_GETOWN: c_int = 9; +pub const F_OFD_GETLK: c_int = 36; +pub const F_OFD_SETLK: c_int = 37; +pub const F_OFD_SETLKW: c_int = 38; +pub const F_RDLCK: c_int = 0; +pub const F_SETOWN: c_int = 8; +pub const F_UNLCK: c_int = 2; +pub const F_WRLCK: c_int = 1; +pub const IPV6_MULTICAST_ALL: c_int = 29; +pub const IPV6_ROUTER_ALERT_ISOLATE: c_int = 30; +pub const MAP_HUGE_SHIFT: c_int = 26; +pub const MAP_HUGE_MASK: c_int = 0x3f; +pub const MAP_HUGE_64KB: c_int = 16 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_512KB: c_int = 19 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_1MB: c_int = 20 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_2MB: c_int = 21 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_8MB: c_int = 23 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_16MB: c_int = 24 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_32MB: c_int = 25 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_256MB: c_int = 28 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_512MB: c_int = 29 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_1GB: c_int = 30 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_2GB: c_int = 31 << MAP_HUGE_SHIFT; +pub const MAP_HUGE_16GB: c_int = 34 << MAP_HUGE_SHIFT; +pub const MINSIGSTKSZ: c_int = 2048; +pub const MSG_COPY: c_int = 0o40000; +pub const NI_MAXHOST: crate::socklen_t = 1025; +pub const O_TMPFILE: c_int = 0o20000000 | O_DIRECTORY; +pub const PACKET_MR_UNICAST: c_int = 3; +pub const PF_NFC: c_int = 39; +pub const PF_VSOCK: c_int = 40; +pub const POSIX_MADV_DONTNEED: c_int = 4; +pub const PTRACE_EVENT_STOP: c_int = 128; +pub const PTRACE_GETSIGMASK: c_uint = 0x420a; +pub const PTRACE_PEEKSIGINFO: c_int = 0x4209; +pub const PTRACE_SETSIGMASK: c_uint = 0x420b; +pub const RTLD_NOLOAD: c_int = 0x00004; +pub const RUSAGE_THREAD: c_int = 1; +pub const SHM_EXEC: c_int = 0o100000; +pub const SIGPOLL: c_int = SIGIO; +pub const SOCK_DCCP: c_int = 6; +pub const SOCK_PACKET: c_int = 10; +pub const TCP_COOKIE_TRANSACTIONS: c_int = 15; +pub const UDP_GRO: c_int = 104; +pub const UDP_SEGMENT: c_int = 103; +pub const YESEXPR: c_int = ((5) << 8) | (0); extern "C" { - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; pub fn pthread_rwlockattr_getkind_np( - attr: *const ::pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_rwlockattr_t, + val: *mut c_int, + ) -> c_int; pub fn pthread_rwlockattr_setkind_np( - attr: *mut ::pthread_rwlockattr_t, - val: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_rwlockattr_t, + val: c_int, + ) -> c_int; - pub fn ptrace(request: ::c_uint, ...) -> ::c_long; + pub fn ptrace(request: c_uint, ...) -> c_long; pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + ) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_int, - timeout: *mut ::timespec, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_int, + timeout: *mut crate::timespec, + ) -> c_int; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::c_int; + winp: *mut crate::winsize, + ) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::pid_t; + winp: *mut crate::winsize, + ) -> crate::pid_t; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; - - pub fn pwritev( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - ) -> ::ssize_t; - pub fn preadv( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - ) -> ::ssize_t; - - pub fn sethostid(hostid: ::c_long) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; + + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t; + + pub fn sethostid(hostid: c_long) -> c_int; pub fn fanotify_mark( - fd: ::c_int, - flags: ::c_uint, + fd: c_int, + flags: c_uint, mask: u64, - dirfd: ::c_int, - path: *const ::c_char, - ) -> ::c_int; - pub fn getrlimit64(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit64) -> ::c_int; - pub fn setrlimit64(resource: ::__rlimit_resource_t, rlim: *const ::rlimit64) -> ::c_int; - pub fn getrlimit(resource: ::__rlimit_resource_t, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::__rlimit_resource_t, rlim: *const ::rlimit) -> ::c_int; - pub fn getpriority(which: ::__priority_which_t, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::__priority_which_t, who: ::id_t, prio: ::c_int) -> ::c_int; - pub fn getauxval(type_: ::c_ulong) -> ::c_ulong; + dirfd: c_int, + path: *const c_char, + ) -> c_int; + pub fn getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int; + pub fn setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64) + -> c_int; + pub fn getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit) -> c_int; + pub fn getpriority(which: crate::__priority_which_t, who: crate::id_t) -> c_int; + pub fn setpriority(which: crate::__priority_which_t, who: crate::id_t, prio: c_int) -> c_int; + pub fn getauxval(type_: c_ulong) -> c_ulong; } cfg_if! { diff --git a/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs b/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs index f14bbab226f6a..cbf8c033d7414 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/l4re.rs @@ -1,10 +1,12 @@ +use crate::{c_int, c_uint, c_ulong, c_void, size_t}; + /// L4Re specifics /// This module contains definitions required by various L4Re libc backends. /// Some of them are formally not part of the libc, but are a dependency of the /// libc and hence we should provide them here. -pub type l4_umword_t = ::c_ulong; // Unsigned machine word. -pub type pthread_t = *mut ::c_void; +pub type l4_umword_t = c_ulong; // Unsigned machine word. +pub type pthread_t = *mut c_void; s! { /// CPU sets. @@ -29,18 +31,18 @@ s! { #[cfg(target_os = "l4re")] #[allow(missing_debug_implementations)] pub struct pthread_attr_t { - pub __detachstate: ::c_int, - pub __schedpolicy: ::c_int, + pub __detachstate: c_int, + pub __schedpolicy: c_int, pub __schedparam: super::__sched_param, - pub __inheritsched: ::c_int, - pub __scope: ::c_int, - pub __guardsize: ::size_t, - pub __stackaddr_set: ::c_int, - pub __stackaddr: *mut ::c_void, // better don't use it - pub __stacksize: ::size_t, + pub __inheritsched: c_int, + pub __scope: c_int, + pub __guardsize: size_t, + pub __stackaddr_set: c_int, + pub __stackaddr: *mut c_void, // better don't use it + pub __stacksize: size_t, // L4Re specifics pub affinity: l4_sched_cpu_set_t, - pub create_flags: ::c_uint, + pub create_flags: c_uint, } // L4Re requires a min stack size of 64k; that isn't defined in uClibc, but @@ -48,6 +50,6 @@ pub struct pthread_attr_t { pub const PTHREAD_STACK_MIN: usize = 65536; // Misc other constants required for building. -pub const SIGIO: ::c_int = 29; -pub const B19200: ::speed_t = 0o000016; -pub const B38400: ::speed_t = 0o000017; +pub const SIGIO: c_int = 29; +pub const B19200: crate::speed_t = 0o000016; +pub const B38400: crate::speed_t = 0o000017; diff --git a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs index 09a5887232bab..8a8451e956fd3 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/mod.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/mod.rs @@ -1,251 +1,254 @@ //! Definitions for uclibc on 64bit systems + +use crate::{c_int, c_uint, c_ushort, c_void, off64_t, size_t}; + pub type blkcnt_t = i64; pub type blksize_t = i64; pub type clock_t = i64; pub type c_char = u8; pub type c_long = i64; pub type c_ulong = u64; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type fsword_t = ::c_long; -pub type ino_t = ::c_ulong; -pub type nlink_t = ::c_uint; -pub type off_t = ::c_long; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; +pub type fsword_t = c_long; +pub type ino_t = c_ulong; +pub type nlink_t = c_uint; +pub type off_t = c_long; // [uClibc docs] Note stat64 has the same shape as stat for x86-64. pub type stat64 = stat; -pub type suseconds_t = ::c_long; -pub type time_t = ::c_int; -pub type wchar_t = ::c_int; +pub type suseconds_t = c_long; +pub type time_t = c_int; +pub type wchar_t = c_int; pub type fsblkcnt64_t = u64; pub type fsfilcnt64_t = u64; -pub type __u64 = ::c_ulong; -pub type __s64 = ::c_long; +pub type __u64 = c_ulong; +pub type __s64 = c_long; s! { pub struct ipc_perm { - pub __key: ::key_t, - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::c_ushort, // read / write - __pad1: ::c_ushort, - pub __seq: ::c_ushort, - __pad2: ::c_ushort, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub __key: crate::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: c_ushort, // read / write + __pad1: c_ushort, + pub __seq: c_ushort, + __pad2: c_ushort, + __unused1: c_ulong, + __unused2: c_ulong, } #[cfg(not(target_os = "l4re"))] pub struct pthread_attr_t { - __detachstate: ::c_int, - __schedpolicy: ::c_int, + __detachstate: c_int, + __schedpolicy: c_int, __schedparam: __sched_param, - __inheritsched: ::c_int, - __scope: ::c_int, - __guardsize: ::size_t, - __stackaddr_set: ::c_int, - __stackaddr: *mut ::c_void, // better don't use it - __stacksize: ::size_t, + __inheritsched: c_int, + __scope: c_int, + __guardsize: size_t, + __stackaddr_set: c_int, + __stackaddr: *mut c_void, // better don't use it + __stacksize: size_t, } pub struct __sched_param { - __sched_priority: ::c_int, + __sched_priority: c_int, } pub struct siginfo_t { - si_signo: ::c_int, // signal number - si_errno: ::c_int, // if not zero: error value of signal, see errno.h - si_code: ::c_int, // signal code - pub _pad: [::c_int; 28], // unported union + si_signo: c_int, // signal number + si_errno: c_int, // if not zero: error value of signal, see errno.h + si_code: c_int, // signal code + pub _pad: [c_int; 28], // unported union _align: [usize; 0], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, // segment size in bytes - pub shm_atime: ::time_t, // time of last shmat() - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_cpid: ::pid_t, - pub shm_lpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - __unused1: ::c_ulong, - __unused2: ::c_ulong, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, // segment size in bytes + pub shm_atime: crate::time_t, // time of last shmat() + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_cpid: crate::pid_t, + pub shm_lpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + __unused1: c_ulong, + __unused2: c_ulong, } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_stime: ::time_t, - pub msg_rtime: ::time_t, - pub msg_ctime: ::time_t, - __msg_cbytes: ::c_ulong, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - __ignored1: ::c_ulong, - __ignored2: ::c_ulong, + pub msg_perm: crate::ipc_perm, + pub msg_stime: crate::time_t, + pub msg_rtime: crate::time_t, + pub msg_ctime: crate::time_t, + __msg_cbytes: c_ulong, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + __ignored1: c_ulong, + __ignored2: c_ulong, } pub struct sockaddr { - pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_family: crate::sa_family_t, + pub sa_data: [c_char; 14], } pub struct sockaddr_in { - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [u8; 8], } pub struct sockaddr_in6 { - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct stat { - pub st_dev: ::c_ulong, - pub st_ino: ::ino_t, + pub st_dev: c_ulong, + pub st_ino: crate::ino_t, // According to uclibc/libc/sysdeps/linux/x86_64/bits/stat.h, order of // nlink and mode are swapped on 64 bit systems. - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::c_ulong, // dev_t - pub st_size: off_t, // file size - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_ulong, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_ulong, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_ulong, - st_pad4: [::c_long; 3], + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: c_ulong, // dev_t + pub st_size: off_t, // file size + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_ulong, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_ulong, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_ulong, + st_pad4: [c_long; 3], } pub struct sigaction { - pub sa_handler: ::sighandler_t, - pub sa_flags: ::c_ulong, - pub sa_restorer: ::Option, - pub sa_mask: ::sigset_t, + pub sa_handler: crate::sighandler_t, + pub sa_flags: c_ulong, + pub sa_restorer: Option, + pub sa_mask: crate::sigset_t, } pub struct stack_t { // FIXME - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, - pub ss_size: ::size_t, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, + pub ss_size: size_t, } pub struct statfs { // FIXME pub f_type: fsword_t, pub f_bsize: fsword_t, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_fsid: ::fsid_t, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_fsid: crate::fsid_t, pub f_namelen: fsword_t, pub f_frsize: fsword_t, f_spare: [fsword_t; 5], } pub struct statfs64 { - pub f_type: ::c_int, - pub f_bsize: ::c_int, - pub f_blocks: ::fsblkcnt64_t, - pub f_bfree: ::fsblkcnt64_t, - pub f_bavail: ::fsblkcnt64_t, - pub f_files: ::fsfilcnt64_t, - pub f_ffree: ::fsfilcnt64_t, - pub f_fsid: ::fsid_t, - pub f_namelen: ::c_int, - pub f_frsize: ::c_int, - pub f_flags: ::c_int, - pub f_spare: [::c_int; 4], + pub f_type: c_int, + pub f_bsize: c_int, + pub f_blocks: crate::fsblkcnt64_t, + pub f_bfree: crate::fsblkcnt64_t, + pub f_bavail: crate::fsblkcnt64_t, + pub f_files: crate::fsfilcnt64_t, + pub f_ffree: crate::fsfilcnt64_t, + pub f_fsid: crate::fsid_t, + pub f_namelen: c_int, + pub f_frsize: c_int, + pub f_flags: c_int, + pub f_spare: [c_int; 4], } pub struct statvfs64 { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: u64, pub f_bfree: u64, pub f_bavail: u64, pub f_files: u64, pub f_ffree: u64, pub f_favail: u64, - pub f_fsid: ::c_ulong, - __f_unused: ::c_int, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - __f_spare: [::c_int; 6], + pub f_fsid: c_ulong, + __f_unused: c_int, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + __f_spare: [c_int; 6], } pub struct msghdr { // FIXME - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::size_t, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::size_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: size_t, + pub msg_control: *mut c_void, + pub msg_controllen: size_t, + pub msg_flags: c_int, } pub struct termios { // FIXME - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct sigset_t { // FIXME - __val: [::c_ulong; 16], + __val: [c_ulong; 16], } pub struct sysinfo { // FIXME - pub uptime: ::c_long, - pub loads: [::c_ulong; 3], - pub totalram: ::c_ulong, - pub freeram: ::c_ulong, - pub sharedram: ::c_ulong, - pub bufferram: ::c_ulong, - pub totalswap: ::c_ulong, - pub freeswap: ::c_ulong, - pub procs: ::c_ushort, - pub pad: ::c_ushort, - pub totalhigh: ::c_ulong, - pub freehigh: ::c_ulong, - pub mem_unit: ::c_uint, - pub _f: [::c_char; 0], + pub uptime: c_long, + pub loads: [c_ulong; 3], + pub totalram: c_ulong, + pub freeram: c_ulong, + pub sharedram: c_ulong, + pub bufferram: c_ulong, + pub totalswap: c_ulong, + pub freeswap: c_ulong, + pub procs: c_ushort, + pub pad: c_ushort, + pub totalhigh: c_ulong, + pub freehigh: c_ulong, + pub mem_unit: c_uint, + pub _f: [c_char; 0], } pub struct glob_t { // FIXME - pub gl_pathc: ::size_t, + pub gl_pathc: size_t, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + pub gl_offs: size_t, + pub gl_flags: c_int, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct cpu_set_t { @@ -258,78 +261,78 @@ s! { pub struct fsid_t { // FIXME - __val: [::c_int; 2], + __val: [c_int; 2], } // FIXME(1.0): this is actually a union pub struct sem_t { #[cfg(target_pointer_width = "32")] - __size: [::c_char; 16], + __size: [c_char; 16], #[cfg(target_pointer_width = "64")] - __size: [::c_char; 32], - __align: [::c_long; 0], + __size: [c_char; 32], + __align: [c_long; 0], } pub struct cmsghdr { - pub cmsg_len: ::size_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: size_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } } s_no_extra_traits! { #[allow(missing_debug_implementations)] pub struct dirent { - pub d_ino: ::ino64_t, - pub d_off: ::off64_t, + pub d_ino: crate::ino64_t, + pub d_off: off64_t, pub d_reclen: u16, pub d_type: u8, - pub d_name: [::c_char; 256], + pub d_name: [c_char; 256], } } // constants -pub const ENAMETOOLONG: ::c_int = 36; // File name too long -pub const ENOTEMPTY: ::c_int = 39; // Directory not empty -pub const ELOOP: ::c_int = 40; // Too many symbolic links encountered -pub const EADDRINUSE: ::c_int = 98; // Address already in use -pub const EADDRNOTAVAIL: ::c_int = 99; // Cannot assign requested address -pub const ENETDOWN: ::c_int = 100; // Network is down -pub const ENETUNREACH: ::c_int = 101; // Network is unreachable -pub const ECONNABORTED: ::c_int = 103; // Software caused connection abort -pub const ECONNREFUSED: ::c_int = 111; // Connection refused -pub const ECONNRESET: ::c_int = 104; // Connection reset by peer -pub const EDEADLK: ::c_int = 35; // Resource deadlock would occur -pub const ENOSYS: ::c_int = 38; // Function not implemented -pub const ENOTCONN: ::c_int = 107; // Transport endpoint is not connected -pub const ETIMEDOUT: ::c_int = 110; // connection timed out -pub const ESTALE: ::c_int = 116; // Stale file handle -pub const EHOSTUNREACH: ::c_int = 113; // No route to host -pub const EDQUOT: ::c_int = 122; // Quota exceeded -pub const EOPNOTSUPP: ::c_int = 0x5f; -pub const ENODATA: ::c_int = 0x3d; -pub const O_APPEND: ::c_int = 0o2000; -pub const O_ACCMODE: ::c_int = 0o003; -pub const O_CLOEXEC: ::c_int = 0x80000; -pub const O_CREAT: ::c_int = 0100; -pub const O_DIRECTORY: ::c_int = 0o200000; -pub const O_EXCL: ::c_int = 0o200; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_NONBLOCK: ::c_int = 0o4000; -pub const O_TRUNC: ::c_int = 0o1000; +pub const ENAMETOOLONG: c_int = 36; // File name too long +pub const ENOTEMPTY: c_int = 39; // Directory not empty +pub const ELOOP: c_int = 40; // Too many symbolic links encountered +pub const EADDRINUSE: c_int = 98; // Address already in use +pub const EADDRNOTAVAIL: c_int = 99; // Cannot assign requested address +pub const ENETDOWN: c_int = 100; // Network is down +pub const ENETUNREACH: c_int = 101; // Network is unreachable +pub const ECONNABORTED: c_int = 103; // Software caused connection abort +pub const ECONNREFUSED: c_int = 111; // Connection refused +pub const ECONNRESET: c_int = 104; // Connection reset by peer +pub const EDEADLK: c_int = 35; // Resource deadlock would occur +pub const ENOSYS: c_int = 38; // Function not implemented +pub const ENOTCONN: c_int = 107; // Transport endpoint is not connected +pub const ETIMEDOUT: c_int = 110; // connection timed out +pub const ESTALE: c_int = 116; // Stale file handle +pub const EHOSTUNREACH: c_int = 113; // No route to host +pub const EDQUOT: c_int = 122; // Quota exceeded +pub const EOPNOTSUPP: c_int = 0x5f; +pub const ENODATA: c_int = 0x3d; +pub const O_APPEND: c_int = 0o2000; +pub const O_ACCMODE: c_int = 0o003; +pub const O_CLOEXEC: c_int = 0x80000; +pub const O_CREAT: c_int = 0100; +pub const O_DIRECTORY: c_int = 0o200000; +pub const O_EXCL: c_int = 0o200; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_NONBLOCK: c_int = 0o4000; +pub const O_TRUNC: c_int = 0o1000; pub const NCCS: usize = 32; -pub const SIG_SETMASK: ::c_int = 2; // Set the set of blocked signals +pub const SIG_SETMASK: c_int = 2; // Set the set of blocked signals pub const __SIZEOF_PTHREAD_MUTEX_T: usize = 40; pub const __SIZEOF_PTHREAD_MUTEXATTR_T: usize = 4; -pub const SOCK_DGRAM: ::c_int = 2; // connectionless, unreliable datagrams -pub const SOCK_STREAM: ::c_int = 1; // …/common/bits/socket_type.h +pub const SOCK_DGRAM: c_int = 2; // connectionless, unreliable datagrams +pub const SOCK_STREAM: c_int = 1; // …/common/bits/socket_type.h pub const __SIZEOF_PTHREAD_COND_T: usize = 48; pub const __SIZEOF_PTHREAD_CONDATTR_T: usize = 4; pub const __SIZEOF_PTHREAD_RWLOCK_T: usize = 56; pub const __SIZEOF_PTHREAD_RWLOCKATTR_T: usize = 8; pub const __SIZEOF_PTHREAD_BARRIER_T: usize = 32; pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; -pub const PIDFD_NONBLOCK: ::c_int = 0o4000; +pub const PIDFD_NONBLOCK: c_int = 0o4000; cfg_if! { if #[cfg(target_os = "l4re")] { diff --git a/src/unix/linux_like/linux/uclibc/x86_64/other.rs b/src/unix/linux_like/linux/uclibc/x86_64/other.rs index 481577cfc27ff..7890d76f24b43 100644 --- a/src/unix/linux_like/linux/uclibc/x86_64/other.rs +++ b/src/unix/linux_like/linux/uclibc/x86_64/other.rs @@ -1,5 +1,7 @@ +use crate::c_ulong; + // Thestyle checker discourages the use of #[cfg], so this has to go into a // separate module -pub type pthread_t = ::c_ulong; +pub type pthread_t = c_ulong; pub const PTHREAD_STACK_MIN: usize = 16384; diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index 9253f16c5a130..51a89c3a45a9a 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -1,10 +1,12 @@ +use crate::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void, intptr_t, size_t, ssize_t}; + pub type sa_family_t = u16; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; -pub type clockid_t = ::c_int; -pub type timer_t = *mut ::c_void; -pub type key_t = ::c_int; -pub type id_t = ::c_uint; +pub type speed_t = c_uint; +pub type tcflag_t = c_uint; +pub type clockid_t = c_int; +pub type timer_t = *mut c_void; +pub type key_t = c_int; +pub type id_t = c_uint; missing! { #[cfg_attr(feature = "extra_traits", derive(Debug))] @@ -13,12 +15,12 @@ missing! { s! { pub struct __c_anonymous_sigev_thread { - pub _function: Option *mut ::c_void>, - pub _attribute: *mut ::pthread_attr_t, + pub _function: Option *mut c_void>, + pub _attribute: *mut crate::pthread_attr_t, } pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct ip_mreq { @@ -29,7 +31,7 @@ s! { pub struct ip_mreqn { pub imr_multiaddr: in_addr, pub imr_address: in_addr, - pub imr_ifindex: ::c_int, + pub imr_ifindex: c_int, } pub struct ip_mreq_source { @@ -40,160 +42,160 @@ s! { pub struct sockaddr { pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_in { pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [u8; 8], } pub struct sockaddr_in6 { pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } // The order of the `ai_addr` field in this struct is crucial // for converting between the Rust and C types. pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, pub ai_addrlen: socklen_t, #[cfg(any(target_os = "linux", target_os = "emscripten"))] - pub ai_addr: *mut ::sockaddr, + pub ai_addr: *mut crate::sockaddr, pub ai_canonname: *mut c_char, #[cfg(target_os = "android")] - pub ai_addr: *mut ::sockaddr, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, } pub struct sockaddr_ll { - pub sll_family: ::c_ushort, - pub sll_protocol: ::c_ushort, - pub sll_ifindex: ::c_int, - pub sll_hatype: ::c_ushort, - pub sll_pkttype: ::c_uchar, - pub sll_halen: ::c_uchar, - pub sll_addr: [::c_uchar; 8], + pub sll_family: c_ushort, + pub sll_protocol: c_ushort, + pub sll_ifindex: c_int, + pub sll_hatype: c_ushort, + pub sll_pkttype: c_uchar, + pub sll_halen: c_uchar, + pub sll_addr: [c_uchar; 8], } pub struct fd_set { - fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE], + fds_bits: [c_ulong; FD_SETSIZE as usize / ULONG_SIZE], } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *const ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_long, + pub tm_zone: *const c_char, } pub struct sched_param { - pub sched_priority: ::c_int, + pub sched_priority: c_int, #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))] - pub sched_ss_low_priority: ::c_int, + pub sched_ss_low_priority: c_int, #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))] - pub sched_ss_repl_period: ::timespec, + pub sched_ss_repl_period: crate::timespec, #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))] - pub sched_ss_init_budget: ::timespec, + pub sched_ss_init_budget: crate::timespec, #[cfg(any(target_env = "musl", target_os = "emscripten", target_env = "ohos"))] - pub sched_ss_max_repl: ::c_int, + pub sched_ss_max_repl: c_int, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct in_pktinfo { - pub ipi_ifindex: ::c_int, - pub ipi_spec_dst: ::in_addr, - pub ipi_addr: ::in_addr, + pub ipi_ifindex: c_int, + pub ipi_spec_dst: crate::in_addr, + pub ipi_addr: crate::in_addr, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, pub ifa_name: *mut c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_ifu: *mut ::sockaddr, // FIXME This should be a union - pub ifa_data: *mut ::c_void, + pub ifa_flags: c_uint, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_ifu: *mut crate::sockaddr, // FIXME This should be a union + pub ifa_data: *mut c_void, } pub struct in6_rtmsg { - rtmsg_dst: ::in6_addr, - rtmsg_src: ::in6_addr, - rtmsg_gateway: ::in6_addr, + rtmsg_dst: crate::in6_addr, + rtmsg_src: crate::in6_addr, + rtmsg_gateway: crate::in6_addr, rtmsg_type: u32, rtmsg_dst_len: u16, rtmsg_src_len: u16, rtmsg_metric: u32, - rtmsg_info: ::c_ulong, + rtmsg_info: c_ulong, rtmsg_flags: u32, - rtmsg_ifindex: ::c_int, + rtmsg_ifindex: c_int, } pub struct arpreq { - pub arp_pa: ::sockaddr, - pub arp_ha: ::sockaddr, - pub arp_flags: ::c_int, - pub arp_netmask: ::sockaddr, - pub arp_dev: [::c_char; 16], + pub arp_pa: crate::sockaddr, + pub arp_ha: crate::sockaddr, + pub arp_flags: c_int, + pub arp_netmask: crate::sockaddr, + pub arp_dev: [c_char; 16], } pub struct arpreq_old { - pub arp_pa: ::sockaddr, - pub arp_ha: ::sockaddr, - pub arp_flags: ::c_int, - pub arp_netmask: ::sockaddr, + pub arp_pa: crate::sockaddr, + pub arp_ha: crate::sockaddr, + pub arp_flags: c_int, + pub arp_netmask: crate::sockaddr, } pub struct arphdr { @@ -205,8 +207,8 @@ s! { } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::c_uint, + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, } } @@ -214,36 +216,36 @@ cfg_if! { if #[cfg(any(target_env = "gnu", target_os = "android"))] { s! { pub struct statx { - pub stx_mask: ::__u32, - pub stx_blksize: ::__u32, - pub stx_attributes: ::__u64, - pub stx_nlink: ::__u32, - pub stx_uid: ::__u32, - pub stx_gid: ::__u32, - pub stx_mode: ::__u16, - __statx_pad1: [::__u16; 1], - pub stx_ino: ::__u64, - pub stx_size: ::__u64, - pub stx_blocks: ::__u64, - pub stx_attributes_mask: ::__u64, + pub stx_mask: crate::__u32, + pub stx_blksize: crate::__u32, + pub stx_attributes: crate::__u64, + pub stx_nlink: crate::__u32, + pub stx_uid: crate::__u32, + pub stx_gid: crate::__u32, + pub stx_mode: crate::__u16, + __statx_pad1: [crate::__u16; 1], + pub stx_ino: crate::__u64, + pub stx_size: crate::__u64, + pub stx_blocks: crate::__u64, + pub stx_attributes_mask: crate::__u64, pub stx_atime: statx_timestamp, pub stx_btime: statx_timestamp, pub stx_ctime: statx_timestamp, pub stx_mtime: statx_timestamp, - pub stx_rdev_major: ::__u32, - pub stx_rdev_minor: ::__u32, - pub stx_dev_major: ::__u32, - pub stx_dev_minor: ::__u32, - pub stx_mnt_id: ::__u64, - pub stx_dio_mem_align: ::__u32, - pub stx_dio_offset_align: ::__u32, - __statx_pad3: [::__u64; 12], + pub stx_rdev_major: crate::__u32, + pub stx_rdev_minor: crate::__u32, + pub stx_dev_major: crate::__u32, + pub stx_dev_minor: crate::__u32, + pub stx_mnt_id: crate::__u64, + pub stx_dio_mem_align: crate::__u32, + pub stx_dio_offset_align: crate::__u32, + __statx_pad3: [crate::__u64; 12], } pub struct statx_timestamp { - pub tv_sec: ::__s64, - pub tv_nsec: ::__u32, - __statx_timestamp_pad1: [::__s32; 1], + pub tv_sec: crate::__s64, + pub tv_nsec: crate::__u32, + __statx_timestamp_pad1: [crate::__s32; 1], } } } @@ -269,14 +271,14 @@ s_no_extra_traits! { // Can't correctly impl Debug for unions #[allow(missing_debug_implementations)] pub union __c_anonymous_sigev_un { - _pad: [::c_int; SIGEV_PAD_SIZE], - pub _tid: ::c_int, + _pad: [c_int; SIGEV_PAD_SIZE], + pub _tid: c_int, pub _sigev_thread: __c_anonymous_sigev_thread, } pub struct sockaddr_un { pub sun_family: sa_family_t, - pub sun_path: [::c_char; 108], + pub sun_path: [c_char; 108], } pub struct sockaddr_storage { @@ -285,22 +287,22 @@ s_no_extra_traits! { __ss_pad2: [u8; 128 - 2 - 4], #[cfg(target_pointer_width = "64")] __ss_pad2: [u8; 128 - 2 - 8], - __ss_align: ::size_t, + __ss_align: size_t, } pub struct utsname { - pub sysname: [::c_char; 65], - pub nodename: [::c_char; 65], - pub release: [::c_char; 65], - pub version: [::c_char; 65], - pub machine: [::c_char; 65], - pub domainname: [::c_char; 65], + pub sysname: [c_char; 65], + pub nodename: [c_char; 65], + pub release: [c_char; 65], + pub version: [c_char; 65], + pub machine: [c_char; 65], + pub domainname: [c_char; 65], } pub struct sigevent { - pub sigev_value: ::sigval, - pub sigev_signo: ::c_int, - pub sigev_notify: ::c_int, + pub sigev_value: crate::sigval, + pub sigev_signo: c_int, + pub sigev_notify: c_int, pub _sigev_un: __c_anonymous_sigev_un, } } @@ -313,8 +315,8 @@ cfg_if! { } } impl Eq for epoll_event {} - impl ::fmt::Debug for epoll_event { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for epoll_event { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let events = self.events; let u64 = self.u64; f.debug_struct("epoll_event") @@ -323,8 +325,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for epoll_event { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for epoll_event { + fn hash(&self, state: &mut H) { let events = self.events; let u64 = self.u64; events.hash(state); @@ -343,16 +345,16 @@ cfg_if! { } } impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_family", &self.sun_family) // FIXME: .field("sun_path", &self.sun_path) .finish() } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_family.hash(state); self.sun_path.hash(state); } @@ -371,8 +373,8 @@ cfg_if! { impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_family", &self.ss_family) .field("__ss_align", &self.__ss_align) @@ -381,8 +383,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_family.hash(state); self.__ss_pad2.hash(state); } @@ -424,8 +426,8 @@ cfg_if! { impl Eq for utsname {} - impl ::fmt::Debug for utsname { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utsname { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utsname") // FIXME: .field("sysname", &self.sysname) // FIXME: .field("nodename", &self.nodename) @@ -437,8 +439,8 @@ cfg_if! { } } - impl ::hash::Hash for utsname { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utsname { + fn hash(&self, state: &mut H) { self.sysname.hash(state); self.nodename.hash(state); self.release.hash(state); @@ -448,8 +450,8 @@ cfg_if! { } } - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_value", &self.sigev_value) .field("sigev_signo", &self.sigev_signo) @@ -473,105 +475,105 @@ cfg_if! { } } -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 2147483647; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 2147483647; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; + +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; // Linux-specific fcntls -pub const F_SETLEASE: ::c_int = 1024; -pub const F_GETLEASE: ::c_int = 1025; -pub const F_NOTIFY: ::c_int = 1026; -pub const F_CANCELLK: ::c_int = 1029; -pub const F_DUPFD_CLOEXEC: ::c_int = 1030; -pub const F_SETPIPE_SZ: ::c_int = 1031; -pub const F_GETPIPE_SZ: ::c_int = 1032; -pub const F_ADD_SEALS: ::c_int = 1033; -pub const F_GET_SEALS: ::c_int = 1034; - -pub const F_SEAL_SEAL: ::c_int = 0x0001; -pub const F_SEAL_SHRINK: ::c_int = 0x0002; -pub const F_SEAL_GROW: ::c_int = 0x0004; -pub const F_SEAL_WRITE: ::c_int = 0x0008; +pub const F_SETLEASE: c_int = 1024; +pub const F_GETLEASE: c_int = 1025; +pub const F_NOTIFY: c_int = 1026; +pub const F_CANCELLK: c_int = 1029; +pub const F_DUPFD_CLOEXEC: c_int = 1030; +pub const F_SETPIPE_SZ: c_int = 1031; +pub const F_GETPIPE_SZ: c_int = 1032; +pub const F_ADD_SEALS: c_int = 1033; +pub const F_GET_SEALS: c_int = 1034; + +pub const F_SEAL_SEAL: c_int = 0x0001; +pub const F_SEAL_SHRINK: c_int = 0x0002; +pub const F_SEAL_GROW: c_int = 0x0004; +pub const F_SEAL_WRITE: c_int = 0x0008; // FIXME(#235): Include file sealing fcntls once we have a way to verify them. -pub const SIGTRAP: ::c_int = 5; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 1; - -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_MONOTONIC: ::clockid_t = 1; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 3; -pub const CLOCK_MONOTONIC_RAW: ::clockid_t = 4; -pub const CLOCK_REALTIME_COARSE: ::clockid_t = 5; -pub const CLOCK_MONOTONIC_COARSE: ::clockid_t = 6; -pub const CLOCK_BOOTTIME: ::clockid_t = 7; -pub const CLOCK_REALTIME_ALARM: ::clockid_t = 8; -pub const CLOCK_BOOTTIME_ALARM: ::clockid_t = 9; -pub const CLOCK_TAI: ::clockid_t = 11; -pub const TIMER_ABSTIME: ::c_int = 1; - -pub const RUSAGE_SELF: ::c_int = 0; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; - -pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; - -pub const S_IFIFO: ::mode_t = 0o1_0000; -pub const S_IFCHR: ::mode_t = 0o2_0000; -pub const S_IFBLK: ::mode_t = 0o6_0000; -pub const S_IFDIR: ::mode_t = 0o4_0000; -pub const S_IFREG: ::mode_t = 0o10_0000; -pub const S_IFLNK: ::mode_t = 0o12_0000; -pub const S_IFSOCK: ::mode_t = 0o14_0000; -pub const S_IFMT: ::mode_t = 0o17_0000; -pub const S_IRWXU: ::mode_t = 0o0700; -pub const S_IXUSR: ::mode_t = 0o0100; -pub const S_IWUSR: ::mode_t = 0o0200; -pub const S_IRUSR: ::mode_t = 0o0400; -pub const S_IRWXG: ::mode_t = 0o0070; -pub const S_IXGRP: ::mode_t = 0o0010; -pub const S_IWGRP: ::mode_t = 0o0020; -pub const S_IRGRP: ::mode_t = 0o0040; -pub const S_IRWXO: ::mode_t = 0o0007; -pub const S_IXOTH: ::mode_t = 0o0001; -pub const S_IWOTH: ::mode_t = 0o0002; -pub const S_IROTH: ::mode_t = 0o0004; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; +pub const SIGTRAP: c_int = 5; + +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 1; + +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_MONOTONIC: crate::clockid_t = 1; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 3; +pub const CLOCK_MONOTONIC_RAW: crate::clockid_t = 4; +pub const CLOCK_REALTIME_COARSE: crate::clockid_t = 5; +pub const CLOCK_MONOTONIC_COARSE: crate::clockid_t = 6; +pub const CLOCK_BOOTTIME: crate::clockid_t = 7; +pub const CLOCK_REALTIME_ALARM: crate::clockid_t = 8; +pub const CLOCK_BOOTTIME_ALARM: crate::clockid_t = 9; +pub const CLOCK_TAI: crate::clockid_t = 11; +pub const TIMER_ABSTIME: c_int = 1; + +pub const RUSAGE_SELF: c_int = 0; + +pub const O_RDONLY: c_int = 0; +pub const O_WRONLY: c_int = 1; +pub const O_RDWR: c_int = 2; + +pub const SOCK_CLOEXEC: c_int = O_CLOEXEC; + +pub const S_IFIFO: crate::mode_t = 0o1_0000; +pub const S_IFCHR: crate::mode_t = 0o2_0000; +pub const S_IFBLK: crate::mode_t = 0o6_0000; +pub const S_IFDIR: crate::mode_t = 0o4_0000; +pub const S_IFREG: crate::mode_t = 0o10_0000; +pub const S_IFLNK: crate::mode_t = 0o12_0000; +pub const S_IFSOCK: crate::mode_t = 0o14_0000; +pub const S_IFMT: crate::mode_t = 0o17_0000; +pub const S_IRWXU: crate::mode_t = 0o0700; +pub const S_IXUSR: crate::mode_t = 0o0100; +pub const S_IWUSR: crate::mode_t = 0o0200; +pub const S_IRUSR: crate::mode_t = 0o0400; +pub const S_IRWXG: crate::mode_t = 0o0070; +pub const S_IXGRP: crate::mode_t = 0o0010; +pub const S_IWGRP: crate::mode_t = 0o0020; +pub const S_IRGRP: crate::mode_t = 0o0040; +pub const S_IRWXO: crate::mode_t = 0o0007; +pub const S_IXOTH: crate::mode_t = 0o0001; +pub const S_IWOTH: crate::mode_t = 0o0002; +pub const S_IROTH: crate::mode_t = 0o0004; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; const SIGEV_MAX_SIZE: usize = 64; cfg_if! { @@ -583,527 +585,527 @@ cfg_if! { } const SIGEV_PAD_SIZE: usize = (SIGEV_MAX_SIZE - __ARCH_SIGEV_PREAMBLE_SIZE) / 4; -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; -pub const XATTR_CREATE: ::c_int = 0x1; -pub const XATTR_REPLACE: ::c_int = 0x2; +pub const XATTR_CREATE: c_int = 0x1; +pub const XATTR_REPLACE: c_int = 0x2; cfg_if! { if #[cfg(target_os = "android")] { - pub const RLIM64_INFINITY: ::c_ulonglong = !0; + pub const RLIM64_INFINITY: crate::c_ulonglong = !0; } else { - pub const RLIM64_INFINITY: ::rlim64_t = !0; + pub const RLIM64_INFINITY: crate::rlim64_t = !0; } } cfg_if! { if #[cfg(target_env = "ohos")] { - pub const LC_CTYPE: ::c_int = 0; - pub const LC_NUMERIC: ::c_int = 1; - pub const LC_TIME: ::c_int = 2; - pub const LC_COLLATE: ::c_int = 3; - pub const LC_MONETARY: ::c_int = 4; - pub const LC_MESSAGES: ::c_int = 5; - pub const LC_PAPER: ::c_int = 6; - pub const LC_NAME: ::c_int = 7; - pub const LC_ADDRESS: ::c_int = 8; - pub const LC_TELEPHONE: ::c_int = 9; - pub const LC_MEASUREMENT: ::c_int = 10; - pub const LC_IDENTIFICATION: ::c_int = 11; - pub const LC_ALL: ::c_int = 12; + pub const LC_CTYPE: c_int = 0; + pub const LC_NUMERIC: c_int = 1; + pub const LC_TIME: c_int = 2; + pub const LC_COLLATE: c_int = 3; + pub const LC_MONETARY: c_int = 4; + pub const LC_MESSAGES: c_int = 5; + pub const LC_PAPER: c_int = 6; + pub const LC_NAME: c_int = 7; + pub const LC_ADDRESS: c_int = 8; + pub const LC_TELEPHONE: c_int = 9; + pub const LC_MEASUREMENT: c_int = 10; + pub const LC_IDENTIFICATION: c_int = 11; + pub const LC_ALL: c_int = 12; } else if #[cfg(not(target_env = "uclibc"))] { - pub const LC_CTYPE: ::c_int = 0; - pub const LC_NUMERIC: ::c_int = 1; - pub const LC_TIME: ::c_int = 2; - pub const LC_COLLATE: ::c_int = 3; - pub const LC_MONETARY: ::c_int = 4; - pub const LC_MESSAGES: ::c_int = 5; - pub const LC_ALL: ::c_int = 6; + pub const LC_CTYPE: c_int = 0; + pub const LC_NUMERIC: c_int = 1; + pub const LC_TIME: c_int = 2; + pub const LC_COLLATE: c_int = 3; + pub const LC_MONETARY: c_int = 4; + pub const LC_MESSAGES: c_int = 5; + pub const LC_ALL: c_int = 6; } } -pub const LC_CTYPE_MASK: ::c_int = 1 << LC_CTYPE; -pub const LC_NUMERIC_MASK: ::c_int = 1 << LC_NUMERIC; -pub const LC_TIME_MASK: ::c_int = 1 << LC_TIME; -pub const LC_COLLATE_MASK: ::c_int = 1 << LC_COLLATE; -pub const LC_MONETARY_MASK: ::c_int = 1 << LC_MONETARY; -pub const LC_MESSAGES_MASK: ::c_int = 1 << LC_MESSAGES; +pub const LC_CTYPE_MASK: c_int = 1 << LC_CTYPE; +pub const LC_NUMERIC_MASK: c_int = 1 << LC_NUMERIC; +pub const LC_TIME_MASK: c_int = 1 << LC_TIME; +pub const LC_COLLATE_MASK: c_int = 1 << LC_COLLATE; +pub const LC_MONETARY_MASK: c_int = 1 << LC_MONETARY; +pub const LC_MESSAGES_MASK: c_int = 1 << LC_MESSAGES; // LC_ALL_MASK defined per platform -pub const MAP_FILE: ::c_int = 0x0000; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; +pub const MAP_FILE: c_int = 0x0000; +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_FIXED: c_int = 0x0010; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; // MS_ flags for msync(2) -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; -pub const MS_SYNC: ::c_int = 0x0004; +pub const MS_ASYNC: c_int = 0x0001; +pub const MS_INVALIDATE: c_int = 0x0002; +pub const MS_SYNC: c_int = 0x0004; // MS_ flags for mount(2) -pub const MS_RDONLY: ::c_ulong = 0x01; -pub const MS_NOSUID: ::c_ulong = 0x02; -pub const MS_NODEV: ::c_ulong = 0x04; -pub const MS_NOEXEC: ::c_ulong = 0x08; -pub const MS_SYNCHRONOUS: ::c_ulong = 0x10; -pub const MS_REMOUNT: ::c_ulong = 0x20; -pub const MS_MANDLOCK: ::c_ulong = 0x40; -pub const MS_DIRSYNC: ::c_ulong = 0x80; -pub const MS_NOATIME: ::c_ulong = 0x0400; -pub const MS_NODIRATIME: ::c_ulong = 0x0800; -pub const MS_BIND: ::c_ulong = 0x1000; -pub const MS_MOVE: ::c_ulong = 0x2000; -pub const MS_REC: ::c_ulong = 0x4000; -pub const MS_SILENT: ::c_ulong = 0x8000; -pub const MS_POSIXACL: ::c_ulong = 0x010000; -pub const MS_UNBINDABLE: ::c_ulong = 0x020000; -pub const MS_PRIVATE: ::c_ulong = 0x040000; -pub const MS_SLAVE: ::c_ulong = 0x080000; -pub const MS_SHARED: ::c_ulong = 0x100000; -pub const MS_RELATIME: ::c_ulong = 0x200000; -pub const MS_KERNMOUNT: ::c_ulong = 0x400000; -pub const MS_I_VERSION: ::c_ulong = 0x800000; -pub const MS_STRICTATIME: ::c_ulong = 0x1000000; -pub const MS_LAZYTIME: ::c_ulong = 0x2000000; -pub const MS_ACTIVE: ::c_ulong = 0x40000000; -pub const MS_MGC_VAL: ::c_ulong = 0xc0ed0000; -pub const MS_MGC_MSK: ::c_ulong = 0xffff0000; - -pub const SCM_RIGHTS: ::c_int = 0x01; -pub const SCM_CREDENTIALS: ::c_int = 0x02; - -pub const PROT_GROWSDOWN: ::c_int = 0x1000000; -pub const PROT_GROWSUP: ::c_int = 0x2000000; - -pub const MAP_TYPE: ::c_int = 0x000f; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 8; -pub const MADV_REMOVE: ::c_int = 9; -pub const MADV_DONTFORK: ::c_int = 10; -pub const MADV_DOFORK: ::c_int = 11; -pub const MADV_MERGEABLE: ::c_int = 12; -pub const MADV_UNMERGEABLE: ::c_int = 13; -pub const MADV_HUGEPAGE: ::c_int = 14; -pub const MADV_NOHUGEPAGE: ::c_int = 15; -pub const MADV_DONTDUMP: ::c_int = 16; -pub const MADV_DODUMP: ::c_int = 17; -pub const MADV_WIPEONFORK: ::c_int = 18; -pub const MADV_KEEPONFORK: ::c_int = 19; -pub const MADV_COLD: ::c_int = 20; -pub const MADV_PAGEOUT: ::c_int = 21; -pub const MADV_HWPOISON: ::c_int = 100; +pub const MS_RDONLY: c_ulong = 0x01; +pub const MS_NOSUID: c_ulong = 0x02; +pub const MS_NODEV: c_ulong = 0x04; +pub const MS_NOEXEC: c_ulong = 0x08; +pub const MS_SYNCHRONOUS: c_ulong = 0x10; +pub const MS_REMOUNT: c_ulong = 0x20; +pub const MS_MANDLOCK: c_ulong = 0x40; +pub const MS_DIRSYNC: c_ulong = 0x80; +pub const MS_NOATIME: c_ulong = 0x0400; +pub const MS_NODIRATIME: c_ulong = 0x0800; +pub const MS_BIND: c_ulong = 0x1000; +pub const MS_MOVE: c_ulong = 0x2000; +pub const MS_REC: c_ulong = 0x4000; +pub const MS_SILENT: c_ulong = 0x8000; +pub const MS_POSIXACL: c_ulong = 0x010000; +pub const MS_UNBINDABLE: c_ulong = 0x020000; +pub const MS_PRIVATE: c_ulong = 0x040000; +pub const MS_SLAVE: c_ulong = 0x080000; +pub const MS_SHARED: c_ulong = 0x100000; +pub const MS_RELATIME: c_ulong = 0x200000; +pub const MS_KERNMOUNT: c_ulong = 0x400000; +pub const MS_I_VERSION: c_ulong = 0x800000; +pub const MS_STRICTATIME: c_ulong = 0x1000000; +pub const MS_LAZYTIME: c_ulong = 0x2000000; +pub const MS_ACTIVE: c_ulong = 0x40000000; +pub const MS_MGC_VAL: c_ulong = 0xc0ed0000; +pub const MS_MGC_MSK: c_ulong = 0xffff0000; + +pub const SCM_RIGHTS: c_int = 0x01; +pub const SCM_CREDENTIALS: c_int = 0x02; + +pub const PROT_GROWSDOWN: c_int = 0x1000000; +pub const PROT_GROWSUP: c_int = 0x2000000; + +pub const MAP_TYPE: c_int = 0x000f; + +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const MADV_FREE: c_int = 8; +pub const MADV_REMOVE: c_int = 9; +pub const MADV_DONTFORK: c_int = 10; +pub const MADV_DOFORK: c_int = 11; +pub const MADV_MERGEABLE: c_int = 12; +pub const MADV_UNMERGEABLE: c_int = 13; +pub const MADV_HUGEPAGE: c_int = 14; +pub const MADV_NOHUGEPAGE: c_int = 15; +pub const MADV_DONTDUMP: c_int = 16; +pub const MADV_DODUMP: c_int = 17; +pub const MADV_WIPEONFORK: c_int = 18; +pub const MADV_KEEPONFORK: c_int = 19; +pub const MADV_COLD: c_int = 20; +pub const MADV_PAGEOUT: c_int = 21; +pub const MADV_HWPOISON: c_int = 100; cfg_if! { if #[cfg(not(target_os = "emscripten"))] { - pub const MADV_POPULATE_READ: ::c_int = 22; - pub const MADV_POPULATE_WRITE: ::c_int = 23; - pub const MADV_DONTNEED_LOCKED: ::c_int = 24; + pub const MADV_POPULATE_READ: c_int = 22; + pub const MADV_POPULATE_WRITE: c_int = 23; + pub const MADV_DONTNEED_LOCKED: c_int = 24; } } -pub const IFF_UP: ::c_int = 0x1; -pub const IFF_BROADCAST: ::c_int = 0x2; -pub const IFF_DEBUG: ::c_int = 0x4; -pub const IFF_LOOPBACK: ::c_int = 0x8; -pub const IFF_POINTOPOINT: ::c_int = 0x10; -pub const IFF_NOTRAILERS: ::c_int = 0x20; -pub const IFF_RUNNING: ::c_int = 0x40; -pub const IFF_NOARP: ::c_int = 0x80; -pub const IFF_PROMISC: ::c_int = 0x100; -pub const IFF_ALLMULTI: ::c_int = 0x200; -pub const IFF_MASTER: ::c_int = 0x400; -pub const IFF_SLAVE: ::c_int = 0x800; -pub const IFF_MULTICAST: ::c_int = 0x1000; -pub const IFF_PORTSEL: ::c_int = 0x2000; -pub const IFF_AUTOMEDIA: ::c_int = 0x4000; -pub const IFF_DYNAMIC: ::c_int = 0x8000; - -pub const SOL_IP: ::c_int = 0; -pub const SOL_TCP: ::c_int = 6; -pub const SOL_UDP: ::c_int = 17; -pub const SOL_IPV6: ::c_int = 41; -pub const SOL_ICMPV6: ::c_int = 58; -pub const SOL_RAW: ::c_int = 255; -pub const SOL_DECNET: ::c_int = 261; -pub const SOL_X25: ::c_int = 262; -pub const SOL_PACKET: ::c_int = 263; -pub const SOL_ATM: ::c_int = 264; -pub const SOL_AAL: ::c_int = 265; -pub const SOL_IRDA: ::c_int = 266; -pub const SOL_NETBEUI: ::c_int = 267; -pub const SOL_LLC: ::c_int = 268; -pub const SOL_DCCP: ::c_int = 269; -pub const SOL_NETLINK: ::c_int = 270; -pub const SOL_TIPC: ::c_int = 271; -pub const SOL_BLUETOOTH: ::c_int = 274; -pub const SOL_ALG: ::c_int = 279; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = 1; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_AX25: ::c_int = 3; -pub const AF_IPX: ::c_int = 4; -pub const AF_APPLETALK: ::c_int = 5; -pub const AF_NETROM: ::c_int = 6; -pub const AF_BRIDGE: ::c_int = 7; -pub const AF_ATMPVC: ::c_int = 8; -pub const AF_X25: ::c_int = 9; -pub const AF_INET6: ::c_int = 10; -pub const AF_ROSE: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_NETBEUI: ::c_int = 13; -pub const AF_SECURITY: ::c_int = 14; -pub const AF_KEY: ::c_int = 15; -pub const AF_NETLINK: ::c_int = 16; -pub const AF_ROUTE: ::c_int = AF_NETLINK; -pub const AF_PACKET: ::c_int = 17; -pub const AF_ASH: ::c_int = 18; -pub const AF_ECONET: ::c_int = 19; -pub const AF_ATMSVC: ::c_int = 20; -pub const AF_RDS: ::c_int = 21; -pub const AF_SNA: ::c_int = 22; -pub const AF_IRDA: ::c_int = 23; -pub const AF_PPPOX: ::c_int = 24; -pub const AF_WANPIPE: ::c_int = 25; -pub const AF_LLC: ::c_int = 26; -pub const AF_CAN: ::c_int = 29; -pub const AF_TIPC: ::c_int = 30; -pub const AF_BLUETOOTH: ::c_int = 31; -pub const AF_IUCV: ::c_int = 32; -pub const AF_RXRPC: ::c_int = 33; -pub const AF_ISDN: ::c_int = 34; -pub const AF_PHONET: ::c_int = 35; -pub const AF_IEEE802154: ::c_int = 36; -pub const AF_CAIF: ::c_int = 37; -pub const AF_ALG: ::c_int = 38; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_UNIX: ::c_int = AF_UNIX; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_AX25: ::c_int = AF_AX25; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_NETROM: ::c_int = AF_NETROM; -pub const PF_BRIDGE: ::c_int = AF_BRIDGE; -pub const PF_ATMPVC: ::c_int = AF_ATMPVC; -pub const PF_X25: ::c_int = AF_X25; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_ROSE: ::c_int = AF_ROSE; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_NETBEUI: ::c_int = AF_NETBEUI; -pub const PF_SECURITY: ::c_int = AF_SECURITY; -pub const PF_KEY: ::c_int = AF_KEY; -pub const PF_NETLINK: ::c_int = AF_NETLINK; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_PACKET: ::c_int = AF_PACKET; -pub const PF_ASH: ::c_int = AF_ASH; -pub const PF_ECONET: ::c_int = AF_ECONET; -pub const PF_ATMSVC: ::c_int = AF_ATMSVC; -pub const PF_RDS: ::c_int = AF_RDS; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_IRDA: ::c_int = AF_IRDA; -pub const PF_PPPOX: ::c_int = AF_PPPOX; -pub const PF_WANPIPE: ::c_int = AF_WANPIPE; -pub const PF_LLC: ::c_int = AF_LLC; -pub const PF_CAN: ::c_int = AF_CAN; -pub const PF_TIPC: ::c_int = AF_TIPC; -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; -pub const PF_IUCV: ::c_int = AF_IUCV; -pub const PF_RXRPC: ::c_int = AF_RXRPC; -pub const PF_ISDN: ::c_int = AF_ISDN; -pub const PF_PHONET: ::c_int = AF_PHONET; -pub const PF_IEEE802154: ::c_int = AF_IEEE802154; -pub const PF_CAIF: ::c_int = AF_CAIF; -pub const PF_ALG: ::c_int = AF_ALG; - -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTROUTE: ::c_int = 4; -pub const MSG_CTRUNC: ::c_int = 8; -pub const MSG_TRUNC: ::c_int = 0x20; -pub const MSG_DONTWAIT: ::c_int = 0x40; -pub const MSG_EOR: ::c_int = 0x80; -pub const MSG_WAITALL: ::c_int = 0x100; -pub const MSG_FIN: ::c_int = 0x200; -pub const MSG_SYN: ::c_int = 0x400; -pub const MSG_CONFIRM: ::c_int = 0x800; -pub const MSG_RST: ::c_int = 0x1000; -pub const MSG_ERRQUEUE: ::c_int = 0x2000; -pub const MSG_NOSIGNAL: ::c_int = 0x4000; -pub const MSG_MORE: ::c_int = 0x8000; -pub const MSG_WAITFORONE: ::c_int = 0x10000; -pub const MSG_FASTOPEN: ::c_int = 0x20000000; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x40000000; - -pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; - -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const IP_TOS: ::c_int = 1; -pub const IP_TTL: ::c_int = 2; -pub const IP_HDRINCL: ::c_int = 3; -pub const IP_OPTIONS: ::c_int = 4; -pub const IP_ROUTER_ALERT: ::c_int = 5; -pub const IP_RECVOPTS: ::c_int = 6; -pub const IP_RETOPTS: ::c_int = 7; -pub const IP_PKTINFO: ::c_int = 8; -pub const IP_PKTOPTIONS: ::c_int = 9; -pub const IP_MTU_DISCOVER: ::c_int = 10; -pub const IP_RECVERR: ::c_int = 11; -pub const IP_RECVTTL: ::c_int = 12; -pub const IP_RECVTOS: ::c_int = 13; -pub const IP_MTU: ::c_int = 14; -pub const IP_FREEBIND: ::c_int = 15; -pub const IP_IPSEC_POLICY: ::c_int = 16; -pub const IP_XFRM_POLICY: ::c_int = 17; -pub const IP_PASSSEC: ::c_int = 18; -pub const IP_TRANSPARENT: ::c_int = 19; -pub const IP_ORIGDSTADDR: ::c_int = 20; -pub const IP_RECVORIGDSTADDR: ::c_int = IP_ORIGDSTADDR; -pub const IP_MINTTL: ::c_int = 21; -pub const IP_NODEFRAG: ::c_int = 22; -pub const IP_CHECKSUM: ::c_int = 23; -pub const IP_BIND_ADDRESS_NO_PORT: ::c_int = 24; -pub const IP_MULTICAST_IF: ::c_int = 32; -pub const IP_MULTICAST_TTL: ::c_int = 33; -pub const IP_MULTICAST_LOOP: ::c_int = 34; -pub const IP_ADD_MEMBERSHIP: ::c_int = 35; -pub const IP_DROP_MEMBERSHIP: ::c_int = 36; -pub const IP_UNBLOCK_SOURCE: ::c_int = 37; -pub const IP_BLOCK_SOURCE: ::c_int = 38; -pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 39; -pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 40; -pub const IP_MSFILTER: ::c_int = 41; -pub const IP_MULTICAST_ALL: ::c_int = 49; -pub const IP_UNICAST_IF: ::c_int = 50; - -pub const IP_DEFAULT_MULTICAST_TTL: ::c_int = 1; -pub const IP_DEFAULT_MULTICAST_LOOP: ::c_int = 1; - -pub const IP_PMTUDISC_DONT: ::c_int = 0; -pub const IP_PMTUDISC_WANT: ::c_int = 1; -pub const IP_PMTUDISC_DO: ::c_int = 2; -pub const IP_PMTUDISC_PROBE: ::c_int = 3; -pub const IP_PMTUDISC_INTERFACE: ::c_int = 4; -pub const IP_PMTUDISC_OMIT: ::c_int = 5; +pub const IFF_UP: c_int = 0x1; +pub const IFF_BROADCAST: c_int = 0x2; +pub const IFF_DEBUG: c_int = 0x4; +pub const IFF_LOOPBACK: c_int = 0x8; +pub const IFF_POINTOPOINT: c_int = 0x10; +pub const IFF_NOTRAILERS: c_int = 0x20; +pub const IFF_RUNNING: c_int = 0x40; +pub const IFF_NOARP: c_int = 0x80; +pub const IFF_PROMISC: c_int = 0x100; +pub const IFF_ALLMULTI: c_int = 0x200; +pub const IFF_MASTER: c_int = 0x400; +pub const IFF_SLAVE: c_int = 0x800; +pub const IFF_MULTICAST: c_int = 0x1000; +pub const IFF_PORTSEL: c_int = 0x2000; +pub const IFF_AUTOMEDIA: c_int = 0x4000; +pub const IFF_DYNAMIC: c_int = 0x8000; + +pub const SOL_IP: c_int = 0; +pub const SOL_TCP: c_int = 6; +pub const SOL_UDP: c_int = 17; +pub const SOL_IPV6: c_int = 41; +pub const SOL_ICMPV6: c_int = 58; +pub const SOL_RAW: c_int = 255; +pub const SOL_DECNET: c_int = 261; +pub const SOL_X25: c_int = 262; +pub const SOL_PACKET: c_int = 263; +pub const SOL_ATM: c_int = 264; +pub const SOL_AAL: c_int = 265; +pub const SOL_IRDA: c_int = 266; +pub const SOL_NETBEUI: c_int = 267; +pub const SOL_LLC: c_int = 268; +pub const SOL_DCCP: c_int = 269; +pub const SOL_NETLINK: c_int = 270; +pub const SOL_TIPC: c_int = 271; +pub const SOL_BLUETOOTH: c_int = 274; +pub const SOL_ALG: c_int = 279; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_UNIX: c_int = 1; +pub const AF_LOCAL: c_int = 1; +pub const AF_INET: c_int = 2; +pub const AF_AX25: c_int = 3; +pub const AF_IPX: c_int = 4; +pub const AF_APPLETALK: c_int = 5; +pub const AF_NETROM: c_int = 6; +pub const AF_BRIDGE: c_int = 7; +pub const AF_ATMPVC: c_int = 8; +pub const AF_X25: c_int = 9; +pub const AF_INET6: c_int = 10; +pub const AF_ROSE: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_NETBEUI: c_int = 13; +pub const AF_SECURITY: c_int = 14; +pub const AF_KEY: c_int = 15; +pub const AF_NETLINK: c_int = 16; +pub const AF_ROUTE: c_int = AF_NETLINK; +pub const AF_PACKET: c_int = 17; +pub const AF_ASH: c_int = 18; +pub const AF_ECONET: c_int = 19; +pub const AF_ATMSVC: c_int = 20; +pub const AF_RDS: c_int = 21; +pub const AF_SNA: c_int = 22; +pub const AF_IRDA: c_int = 23; +pub const AF_PPPOX: c_int = 24; +pub const AF_WANPIPE: c_int = 25; +pub const AF_LLC: c_int = 26; +pub const AF_CAN: c_int = 29; +pub const AF_TIPC: c_int = 30; +pub const AF_BLUETOOTH: c_int = 31; +pub const AF_IUCV: c_int = 32; +pub const AF_RXRPC: c_int = 33; +pub const AF_ISDN: c_int = 34; +pub const AF_PHONET: c_int = 35; +pub const AF_IEEE802154: c_int = 36; +pub const AF_CAIF: c_int = 37; +pub const AF_ALG: c_int = 38; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_UNIX: c_int = AF_UNIX; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_AX25: c_int = AF_AX25; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_NETROM: c_int = AF_NETROM; +pub const PF_BRIDGE: c_int = AF_BRIDGE; +pub const PF_ATMPVC: c_int = AF_ATMPVC; +pub const PF_X25: c_int = AF_X25; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_ROSE: c_int = AF_ROSE; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_NETBEUI: c_int = AF_NETBEUI; +pub const PF_SECURITY: c_int = AF_SECURITY; +pub const PF_KEY: c_int = AF_KEY; +pub const PF_NETLINK: c_int = AF_NETLINK; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_PACKET: c_int = AF_PACKET; +pub const PF_ASH: c_int = AF_ASH; +pub const PF_ECONET: c_int = AF_ECONET; +pub const PF_ATMSVC: c_int = AF_ATMSVC; +pub const PF_RDS: c_int = AF_RDS; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_IRDA: c_int = AF_IRDA; +pub const PF_PPPOX: c_int = AF_PPPOX; +pub const PF_WANPIPE: c_int = AF_WANPIPE; +pub const PF_LLC: c_int = AF_LLC; +pub const PF_CAN: c_int = AF_CAN; +pub const PF_TIPC: c_int = AF_TIPC; +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; +pub const PF_IUCV: c_int = AF_IUCV; +pub const PF_RXRPC: c_int = AF_RXRPC; +pub const PF_ISDN: c_int = AF_ISDN; +pub const PF_PHONET: c_int = AF_PHONET; +pub const PF_IEEE802154: c_int = AF_IEEE802154; +pub const PF_CAIF: c_int = AF_CAIF; +pub const PF_ALG: c_int = AF_ALG; + +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_DONTROUTE: c_int = 4; +pub const MSG_CTRUNC: c_int = 8; +pub const MSG_TRUNC: c_int = 0x20; +pub const MSG_DONTWAIT: c_int = 0x40; +pub const MSG_EOR: c_int = 0x80; +pub const MSG_WAITALL: c_int = 0x100; +pub const MSG_FIN: c_int = 0x200; +pub const MSG_SYN: c_int = 0x400; +pub const MSG_CONFIRM: c_int = 0x800; +pub const MSG_RST: c_int = 0x1000; +pub const MSG_ERRQUEUE: c_int = 0x2000; +pub const MSG_NOSIGNAL: c_int = 0x4000; +pub const MSG_MORE: c_int = 0x8000; +pub const MSG_WAITFORONE: c_int = 0x10000; +pub const MSG_FASTOPEN: c_int = 0x20000000; +pub const MSG_CMSG_CLOEXEC: c_int = 0x40000000; + +pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; + +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const IP_TOS: c_int = 1; +pub const IP_TTL: c_int = 2; +pub const IP_HDRINCL: c_int = 3; +pub const IP_OPTIONS: c_int = 4; +pub const IP_ROUTER_ALERT: c_int = 5; +pub const IP_RECVOPTS: c_int = 6; +pub const IP_RETOPTS: c_int = 7; +pub const IP_PKTINFO: c_int = 8; +pub const IP_PKTOPTIONS: c_int = 9; +pub const IP_MTU_DISCOVER: c_int = 10; +pub const IP_RECVERR: c_int = 11; +pub const IP_RECVTTL: c_int = 12; +pub const IP_RECVTOS: c_int = 13; +pub const IP_MTU: c_int = 14; +pub const IP_FREEBIND: c_int = 15; +pub const IP_IPSEC_POLICY: c_int = 16; +pub const IP_XFRM_POLICY: c_int = 17; +pub const IP_PASSSEC: c_int = 18; +pub const IP_TRANSPARENT: c_int = 19; +pub const IP_ORIGDSTADDR: c_int = 20; +pub const IP_RECVORIGDSTADDR: c_int = IP_ORIGDSTADDR; +pub const IP_MINTTL: c_int = 21; +pub const IP_NODEFRAG: c_int = 22; +pub const IP_CHECKSUM: c_int = 23; +pub const IP_BIND_ADDRESS_NO_PORT: c_int = 24; +pub const IP_MULTICAST_IF: c_int = 32; +pub const IP_MULTICAST_TTL: c_int = 33; +pub const IP_MULTICAST_LOOP: c_int = 34; +pub const IP_ADD_MEMBERSHIP: c_int = 35; +pub const IP_DROP_MEMBERSHIP: c_int = 36; +pub const IP_UNBLOCK_SOURCE: c_int = 37; +pub const IP_BLOCK_SOURCE: c_int = 38; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 39; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 40; +pub const IP_MSFILTER: c_int = 41; +pub const IP_MULTICAST_ALL: c_int = 49; +pub const IP_UNICAST_IF: c_int = 50; + +pub const IP_DEFAULT_MULTICAST_TTL: c_int = 1; +pub const IP_DEFAULT_MULTICAST_LOOP: c_int = 1; + +pub const IP_PMTUDISC_DONT: c_int = 0; +pub const IP_PMTUDISC_WANT: c_int = 1; +pub const IP_PMTUDISC_DO: c_int = 2; +pub const IP_PMTUDISC_PROBE: c_int = 3; +pub const IP_PMTUDISC_INTERFACE: c_int = 4; +pub const IP_PMTUDISC_OMIT: c_int = 5; // IPPROTO_IP defined in src/unix/mod.rs /// Hop-by-hop option header -pub const IPPROTO_HOPOPTS: ::c_int = 0; +pub const IPPROTO_HOPOPTS: c_int = 0; // IPPROTO_ICMP defined in src/unix/mod.rs /// group mgmt protocol -pub const IPPROTO_IGMP: ::c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; /// for compatibility -pub const IPPROTO_IPIP: ::c_int = 4; +pub const IPPROTO_IPIP: c_int = 4; // IPPROTO_TCP defined in src/unix/mod.rs /// exterior gateway protocol -pub const IPPROTO_EGP: ::c_int = 8; +pub const IPPROTO_EGP: c_int = 8; /// pup -pub const IPPROTO_PUP: ::c_int = 12; +pub const IPPROTO_PUP: c_int = 12; // IPPROTO_UDP defined in src/unix/mod.rs /// xns idp -pub const IPPROTO_IDP: ::c_int = 22; +pub const IPPROTO_IDP: c_int = 22; /// tp-4 w/ class negotiation -pub const IPPROTO_TP: ::c_int = 29; +pub const IPPROTO_TP: c_int = 29; /// DCCP -pub const IPPROTO_DCCP: ::c_int = 33; +pub const IPPROTO_DCCP: c_int = 33; // IPPROTO_IPV6 defined in src/unix/mod.rs /// IP6 routing header -pub const IPPROTO_ROUTING: ::c_int = 43; +pub const IPPROTO_ROUTING: c_int = 43; /// IP6 fragmentation header -pub const IPPROTO_FRAGMENT: ::c_int = 44; +pub const IPPROTO_FRAGMENT: c_int = 44; /// resource reservation -pub const IPPROTO_RSVP: ::c_int = 46; +pub const IPPROTO_RSVP: c_int = 46; /// General Routing Encap. -pub const IPPROTO_GRE: ::c_int = 47; +pub const IPPROTO_GRE: c_int = 47; /// IP6 Encap Sec. Payload -pub const IPPROTO_ESP: ::c_int = 50; +pub const IPPROTO_ESP: c_int = 50; /// IP6 Auth Header -pub const IPPROTO_AH: ::c_int = 51; +pub const IPPROTO_AH: c_int = 51; // IPPROTO_ICMPV6 defined in src/unix/mod.rs /// IP6 no next header -pub const IPPROTO_NONE: ::c_int = 59; +pub const IPPROTO_NONE: c_int = 59; /// IP6 destination option -pub const IPPROTO_DSTOPTS: ::c_int = 60; -pub const IPPROTO_MTP: ::c_int = 92; +pub const IPPROTO_DSTOPTS: c_int = 60; +pub const IPPROTO_MTP: c_int = 92; /// encapsulation header -pub const IPPROTO_ENCAP: ::c_int = 98; +pub const IPPROTO_ENCAP: c_int = 98; /// Protocol indep. multicast -pub const IPPROTO_PIM: ::c_int = 103; +pub const IPPROTO_PIM: c_int = 103; /// IP Payload Comp. Protocol -pub const IPPROTO_COMP: ::c_int = 108; +pub const IPPROTO_COMP: c_int = 108; /// SCTP -pub const IPPROTO_SCTP: ::c_int = 132; -pub const IPPROTO_MH: ::c_int = 135; -pub const IPPROTO_UDPLITE: ::c_int = 136; +pub const IPPROTO_SCTP: c_int = 132; +pub const IPPROTO_MH: c_int = 135; +pub const IPPROTO_UDPLITE: c_int = 136; /// raw IP packet -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_BEETPH: ::c_int = 94; -pub const IPPROTO_MPLS: ::c_int = 137; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_BEETPH: c_int = 94; +pub const IPPROTO_MPLS: c_int = 137; /// Multipath TCP -pub const IPPROTO_MPTCP: ::c_int = 262; +pub const IPPROTO_MPTCP: c_int = 262; /// Ethernet-within-IPv6 encapsulation. -pub const IPPROTO_ETHERNET: ::c_int = 143; - -pub const MCAST_EXCLUDE: ::c_int = 0; -pub const MCAST_INCLUDE: ::c_int = 1; -pub const MCAST_JOIN_GROUP: ::c_int = 42; -pub const MCAST_BLOCK_SOURCE: ::c_int = 43; -pub const MCAST_UNBLOCK_SOURCE: ::c_int = 44; -pub const MCAST_LEAVE_GROUP: ::c_int = 45; -pub const MCAST_JOIN_SOURCE_GROUP: ::c_int = 46; -pub const MCAST_LEAVE_SOURCE_GROUP: ::c_int = 47; -pub const MCAST_MSFILTER: ::c_int = 48; - -pub const IPV6_ADDRFORM: ::c_int = 1; -pub const IPV6_2292PKTINFO: ::c_int = 2; -pub const IPV6_2292HOPOPTS: ::c_int = 3; -pub const IPV6_2292DSTOPTS: ::c_int = 4; -pub const IPV6_2292RTHDR: ::c_int = 5; -pub const IPV6_2292PKTOPTIONS: ::c_int = 6; -pub const IPV6_CHECKSUM: ::c_int = 7; -pub const IPV6_2292HOPLIMIT: ::c_int = 8; -pub const IPV6_NEXTHOP: ::c_int = 9; -pub const IPV6_AUTHHDR: ::c_int = 10; -pub const IPV6_UNICAST_HOPS: ::c_int = 16; -pub const IPV6_MULTICAST_IF: ::c_int = 17; -pub const IPV6_MULTICAST_HOPS: ::c_int = 18; -pub const IPV6_MULTICAST_LOOP: ::c_int = 19; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; -pub const IPV6_ROUTER_ALERT: ::c_int = 22; -pub const IPV6_MTU_DISCOVER: ::c_int = 23; -pub const IPV6_MTU: ::c_int = 24; -pub const IPV6_RECVERR: ::c_int = 25; -pub const IPV6_V6ONLY: ::c_int = 26; -pub const IPV6_JOIN_ANYCAST: ::c_int = 27; -pub const IPV6_LEAVE_ANYCAST: ::c_int = 28; -pub const IPV6_IPSEC_POLICY: ::c_int = 34; -pub const IPV6_XFRM_POLICY: ::c_int = 35; -pub const IPV6_HDRINCL: ::c_int = 36; -pub const IPV6_RECVPKTINFO: ::c_int = 49; -pub const IPV6_PKTINFO: ::c_int = 50; -pub const IPV6_RECVHOPLIMIT: ::c_int = 51; -pub const IPV6_HOPLIMIT: ::c_int = 52; -pub const IPV6_RECVHOPOPTS: ::c_int = 53; -pub const IPV6_HOPOPTS: ::c_int = 54; -pub const IPV6_RTHDRDSTOPTS: ::c_int = 55; -pub const IPV6_RECVRTHDR: ::c_int = 56; -pub const IPV6_RTHDR: ::c_int = 57; -pub const IPV6_RECVDSTOPTS: ::c_int = 58; -pub const IPV6_DSTOPTS: ::c_int = 59; -pub const IPV6_RECVPATHMTU: ::c_int = 60; -pub const IPV6_PATHMTU: ::c_int = 61; -pub const IPV6_DONTFRAG: ::c_int = 62; -pub const IPV6_RECVTCLASS: ::c_int = 66; -pub const IPV6_TCLASS: ::c_int = 67; -pub const IPV6_AUTOFLOWLABEL: ::c_int = 70; -pub const IPV6_ADDR_PREFERENCES: ::c_int = 72; -pub const IPV6_MINHOPCOUNT: ::c_int = 73; -pub const IPV6_ORIGDSTADDR: ::c_int = 74; -pub const IPV6_RECVORIGDSTADDR: ::c_int = IPV6_ORIGDSTADDR; -pub const IPV6_TRANSPARENT: ::c_int = 75; -pub const IPV6_UNICAST_IF: ::c_int = 76; -pub const IPV6_PREFER_SRC_TMP: ::c_int = 0x0001; -pub const IPV6_PREFER_SRC_PUBLIC: ::c_int = 0x0002; -pub const IPV6_PREFER_SRC_PUBTMP_DEFAULT: ::c_int = 0x0100; -pub const IPV6_PREFER_SRC_COA: ::c_int = 0x0004; -pub const IPV6_PREFER_SRC_HOME: ::c_int = 0x0400; -pub const IPV6_PREFER_SRC_CGA: ::c_int = 0x0008; -pub const IPV6_PREFER_SRC_NONCGA: ::c_int = 0x0800; - -pub const IPV6_PMTUDISC_DONT: ::c_int = 0; -pub const IPV6_PMTUDISC_WANT: ::c_int = 1; -pub const IPV6_PMTUDISC_DO: ::c_int = 2; -pub const IPV6_PMTUDISC_PROBE: ::c_int = 3; -pub const IPV6_PMTUDISC_INTERFACE: ::c_int = 4; -pub const IPV6_PMTUDISC_OMIT: ::c_int = 5; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_MAXSEG: ::c_int = 2; -pub const TCP_CORK: ::c_int = 3; -pub const TCP_KEEPIDLE: ::c_int = 4; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; -pub const TCP_SYNCNT: ::c_int = 7; -pub const TCP_LINGER2: ::c_int = 8; -pub const TCP_DEFER_ACCEPT: ::c_int = 9; -pub const TCP_WINDOW_CLAMP: ::c_int = 10; -pub const TCP_INFO: ::c_int = 11; -pub const TCP_QUICKACK: ::c_int = 12; -pub const TCP_CONGESTION: ::c_int = 13; -pub const TCP_MD5SIG: ::c_int = 14; +pub const IPPROTO_ETHERNET: c_int = 143; + +pub const MCAST_EXCLUDE: c_int = 0; +pub const MCAST_INCLUDE: c_int = 1; +pub const MCAST_JOIN_GROUP: c_int = 42; +pub const MCAST_BLOCK_SOURCE: c_int = 43; +pub const MCAST_UNBLOCK_SOURCE: c_int = 44; +pub const MCAST_LEAVE_GROUP: c_int = 45; +pub const MCAST_JOIN_SOURCE_GROUP: c_int = 46; +pub const MCAST_LEAVE_SOURCE_GROUP: c_int = 47; +pub const MCAST_MSFILTER: c_int = 48; + +pub const IPV6_ADDRFORM: c_int = 1; +pub const IPV6_2292PKTINFO: c_int = 2; +pub const IPV6_2292HOPOPTS: c_int = 3; +pub const IPV6_2292DSTOPTS: c_int = 4; +pub const IPV6_2292RTHDR: c_int = 5; +pub const IPV6_2292PKTOPTIONS: c_int = 6; +pub const IPV6_CHECKSUM: c_int = 7; +pub const IPV6_2292HOPLIMIT: c_int = 8; +pub const IPV6_NEXTHOP: c_int = 9; +pub const IPV6_AUTHHDR: c_int = 10; +pub const IPV6_UNICAST_HOPS: c_int = 16; +pub const IPV6_MULTICAST_IF: c_int = 17; +pub const IPV6_MULTICAST_HOPS: c_int = 18; +pub const IPV6_MULTICAST_LOOP: c_int = 19; +pub const IPV6_ADD_MEMBERSHIP: c_int = 20; +pub const IPV6_DROP_MEMBERSHIP: c_int = 21; +pub const IPV6_ROUTER_ALERT: c_int = 22; +pub const IPV6_MTU_DISCOVER: c_int = 23; +pub const IPV6_MTU: c_int = 24; +pub const IPV6_RECVERR: c_int = 25; +pub const IPV6_V6ONLY: c_int = 26; +pub const IPV6_JOIN_ANYCAST: c_int = 27; +pub const IPV6_LEAVE_ANYCAST: c_int = 28; +pub const IPV6_IPSEC_POLICY: c_int = 34; +pub const IPV6_XFRM_POLICY: c_int = 35; +pub const IPV6_HDRINCL: c_int = 36; +pub const IPV6_RECVPKTINFO: c_int = 49; +pub const IPV6_PKTINFO: c_int = 50; +pub const IPV6_RECVHOPLIMIT: c_int = 51; +pub const IPV6_HOPLIMIT: c_int = 52; +pub const IPV6_RECVHOPOPTS: c_int = 53; +pub const IPV6_HOPOPTS: c_int = 54; +pub const IPV6_RTHDRDSTOPTS: c_int = 55; +pub const IPV6_RECVRTHDR: c_int = 56; +pub const IPV6_RTHDR: c_int = 57; +pub const IPV6_RECVDSTOPTS: c_int = 58; +pub const IPV6_DSTOPTS: c_int = 59; +pub const IPV6_RECVPATHMTU: c_int = 60; +pub const IPV6_PATHMTU: c_int = 61; +pub const IPV6_DONTFRAG: c_int = 62; +pub const IPV6_RECVTCLASS: c_int = 66; +pub const IPV6_TCLASS: c_int = 67; +pub const IPV6_AUTOFLOWLABEL: c_int = 70; +pub const IPV6_ADDR_PREFERENCES: c_int = 72; +pub const IPV6_MINHOPCOUNT: c_int = 73; +pub const IPV6_ORIGDSTADDR: c_int = 74; +pub const IPV6_RECVORIGDSTADDR: c_int = IPV6_ORIGDSTADDR; +pub const IPV6_TRANSPARENT: c_int = 75; +pub const IPV6_UNICAST_IF: c_int = 76; +pub const IPV6_PREFER_SRC_TMP: c_int = 0x0001; +pub const IPV6_PREFER_SRC_PUBLIC: c_int = 0x0002; +pub const IPV6_PREFER_SRC_PUBTMP_DEFAULT: c_int = 0x0100; +pub const IPV6_PREFER_SRC_COA: c_int = 0x0004; +pub const IPV6_PREFER_SRC_HOME: c_int = 0x0400; +pub const IPV6_PREFER_SRC_CGA: c_int = 0x0008; +pub const IPV6_PREFER_SRC_NONCGA: c_int = 0x0800; + +pub const IPV6_PMTUDISC_DONT: c_int = 0; +pub const IPV6_PMTUDISC_WANT: c_int = 1; +pub const IPV6_PMTUDISC_DO: c_int = 2; +pub const IPV6_PMTUDISC_PROBE: c_int = 3; +pub const IPV6_PMTUDISC_INTERFACE: c_int = 4; +pub const IPV6_PMTUDISC_OMIT: c_int = 5; + +pub const TCP_NODELAY: c_int = 1; +pub const TCP_MAXSEG: c_int = 2; +pub const TCP_CORK: c_int = 3; +pub const TCP_KEEPIDLE: c_int = 4; +pub const TCP_KEEPINTVL: c_int = 5; +pub const TCP_KEEPCNT: c_int = 6; +pub const TCP_SYNCNT: c_int = 7; +pub const TCP_LINGER2: c_int = 8; +pub const TCP_DEFER_ACCEPT: c_int = 9; +pub const TCP_WINDOW_CLAMP: c_int = 10; +pub const TCP_INFO: c_int = 11; +pub const TCP_QUICKACK: c_int = 12; +pub const TCP_CONGESTION: c_int = 13; +pub const TCP_MD5SIG: c_int = 14; cfg_if! { if #[cfg(all( target_os = "linux", any(target_env = "gnu", target_env = "musl", target_env = "ohos") ))] { // WARN: deprecated - pub const TCP_COOKIE_TRANSACTIONS: ::c_int = 15; + pub const TCP_COOKIE_TRANSACTIONS: c_int = 15; } } -pub const TCP_THIN_LINEAR_TIMEOUTS: ::c_int = 16; -pub const TCP_THIN_DUPACK: ::c_int = 17; -pub const TCP_USER_TIMEOUT: ::c_int = 18; -pub const TCP_REPAIR: ::c_int = 19; -pub const TCP_REPAIR_QUEUE: ::c_int = 20; -pub const TCP_QUEUE_SEQ: ::c_int = 21; -pub const TCP_REPAIR_OPTIONS: ::c_int = 22; -pub const TCP_FASTOPEN: ::c_int = 23; -pub const TCP_TIMESTAMP: ::c_int = 24; -pub const TCP_NOTSENT_LOWAT: ::c_int = 25; -pub const TCP_CC_INFO: ::c_int = 26; -pub const TCP_SAVE_SYN: ::c_int = 27; -pub const TCP_SAVED_SYN: ::c_int = 28; +pub const TCP_THIN_LINEAR_TIMEOUTS: c_int = 16; +pub const TCP_THIN_DUPACK: c_int = 17; +pub const TCP_USER_TIMEOUT: c_int = 18; +pub const TCP_REPAIR: c_int = 19; +pub const TCP_REPAIR_QUEUE: c_int = 20; +pub const TCP_QUEUE_SEQ: c_int = 21; +pub const TCP_REPAIR_OPTIONS: c_int = 22; +pub const TCP_FASTOPEN: c_int = 23; +pub const TCP_TIMESTAMP: c_int = 24; +pub const TCP_NOTSENT_LOWAT: c_int = 25; +pub const TCP_CC_INFO: c_int = 26; +pub const TCP_SAVE_SYN: c_int = 27; +pub const TCP_SAVED_SYN: c_int = 28; cfg_if! { if #[cfg(not(target_os = "emscripten"))] { // NOTE: emscripten doesn't support these options yet. - pub const TCP_REPAIR_WINDOW: ::c_int = 29; - pub const TCP_FASTOPEN_CONNECT: ::c_int = 30; - pub const TCP_ULP: ::c_int = 31; - pub const TCP_MD5SIG_EXT: ::c_int = 32; - pub const TCP_FASTOPEN_KEY: ::c_int = 33; - pub const TCP_FASTOPEN_NO_COOKIE: ::c_int = 34; - pub const TCP_ZEROCOPY_RECEIVE: ::c_int = 35; - pub const TCP_INQ: ::c_int = 36; - pub const TCP_CM_INQ: ::c_int = TCP_INQ; + pub const TCP_REPAIR_WINDOW: c_int = 29; + pub const TCP_FASTOPEN_CONNECT: c_int = 30; + pub const TCP_ULP: c_int = 31; + pub const TCP_MD5SIG_EXT: c_int = 32; + pub const TCP_FASTOPEN_KEY: c_int = 33; + pub const TCP_FASTOPEN_NO_COOKIE: c_int = 34; + pub const TCP_ZEROCOPY_RECEIVE: c_int = 35; + pub const TCP_INQ: c_int = 36; + pub const TCP_CM_INQ: c_int = TCP_INQ; // NOTE: Some CI images doesn't have this option yet. - // pub const TCP_TX_DELAY: ::c_int = 37; + // pub const TCP_TX_DELAY: c_int = 37; pub const TCP_MD5SIG_MAXKEYLEN: usize = 80; } } -pub const SO_DEBUG: ::c_int = 1; +pub const SO_DEBUG: c_int = 1; -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 2; +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 2; -pub const PATH_MAX: ::c_int = 4096; +pub const PATH_MAX: c_int = 4096; -pub const UIO_MAXIOV: ::c_int = 1024; +pub const UIO_MAXIOV: c_int = 1024; -pub const FD_SETSIZE: ::c_int = 1024; +pub const FD_SETSIZE: c_int = 1024; pub const EPOLLIN: u32 = 0x1; pub const EPOLLPRI: u32 = 0x2; @@ -1121,18 +1123,18 @@ pub const EPOLLWAKEUP: u32 = 0x20000000; pub const EPOLLONESHOT: u32 = 0x40000000; pub const EPOLLET: u32 = 0x80000000; -pub const EPOLL_CTL_ADD: ::c_int = 1; -pub const EPOLL_CTL_MOD: ::c_int = 3; -pub const EPOLL_CTL_DEL: ::c_int = 2; +pub const EPOLL_CTL_ADD: c_int = 1; +pub const EPOLL_CTL_MOD: c_int = 3; +pub const EPOLL_CTL_DEL: c_int = 2; -pub const MNT_FORCE: ::c_int = 0x1; -pub const MNT_DETACH: ::c_int = 0x2; -pub const MNT_EXPIRE: ::c_int = 0x4; -pub const UMOUNT_NOFOLLOW: ::c_int = 0x8; +pub const MNT_FORCE: c_int = 0x1; +pub const MNT_DETACH: c_int = 0x2; +pub const MNT_EXPIRE: c_int = 0x4; +pub const UMOUNT_NOFOLLOW: c_int = 0x8; -pub const Q_GETFMT: ::c_int = 0x800004; -pub const Q_GETINFO: ::c_int = 0x800005; -pub const Q_SETINFO: ::c_int = 0x800006; +pub const Q_GETFMT: c_int = 0x800004; +pub const Q_GETINFO: c_int = 0x800005; +pub const Q_SETINFO: c_int = 0x800006; pub const QIF_BLIMITS: u32 = 1; pub const QIF_SPACE: u32 = 2; pub const QIF_ILIMITS: u32 = 4; @@ -1144,169 +1146,169 @@ pub const QIF_USAGE: u32 = 10; pub const QIF_TIMES: u32 = 48; pub const QIF_ALL: u32 = 63; -pub const Q_SYNC: ::c_int = 0x800001; -pub const Q_QUOTAON: ::c_int = 0x800002; -pub const Q_QUOTAOFF: ::c_int = 0x800003; -pub const Q_GETQUOTA: ::c_int = 0x800007; -pub const Q_SETQUOTA: ::c_int = 0x800008; - -pub const TCIOFF: ::c_int = 2; -pub const TCION: ::c_int = 3; -pub const TCOOFF: ::c_int = 0; -pub const TCOON: ::c_int = 1; -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; -pub const NL0: ::tcflag_t = 0x00000000; -pub const NL1: ::tcflag_t = 0x00000100; -pub const TAB0: ::tcflag_t = 0x00000000; -pub const CR0: ::tcflag_t = 0x00000000; -pub const FF0: ::tcflag_t = 0x00000000; -pub const BS0: ::tcflag_t = 0x00000000; -pub const VT0: ::tcflag_t = 0x00000000; +pub const Q_SYNC: c_int = 0x800001; +pub const Q_QUOTAON: c_int = 0x800002; +pub const Q_QUOTAOFF: c_int = 0x800003; +pub const Q_GETQUOTA: c_int = 0x800007; +pub const Q_SETQUOTA: c_int = 0x800008; + +pub const TCIOFF: c_int = 2; +pub const TCION: c_int = 3; +pub const TCOOFF: c_int = 0; +pub const TCOON: c_int = 1; +pub const TCIFLUSH: c_int = 0; +pub const TCOFLUSH: c_int = 1; +pub const TCIOFLUSH: c_int = 2; +pub const NL0: crate::tcflag_t = 0x00000000; +pub const NL1: crate::tcflag_t = 0x00000100; +pub const TAB0: crate::tcflag_t = 0x00000000; +pub const CR0: crate::tcflag_t = 0x00000000; +pub const FF0: crate::tcflag_t = 0x00000000; +pub const BS0: crate::tcflag_t = 0x00000000; +pub const VT0: crate::tcflag_t = 0x00000000; pub const VERASE: usize = 2; pub const VKILL: usize = 3; pub const VINTR: usize = 0; pub const VQUIT: usize = 1; pub const VLNEXT: usize = 15; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXANY: ::tcflag_t = 0x00000800; -pub const IMAXBEL: ::tcflag_t = 0x00002000; -pub const OPOST: ::tcflag_t = 0x1; -pub const CS5: ::tcflag_t = 0x00000000; -pub const CRTSCTS: ::tcflag_t = 0x80000000; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const OCRNL: ::tcflag_t = 0o000010; -pub const ONOCR: ::tcflag_t = 0o000020; -pub const ONLRET: ::tcflag_t = 0o000040; -pub const OFILL: ::tcflag_t = 0o000100; -pub const OFDEL: ::tcflag_t = 0o000200; - -pub const CLONE_VM: ::c_int = 0x100; -pub const CLONE_FS: ::c_int = 0x200; -pub const CLONE_FILES: ::c_int = 0x400; -pub const CLONE_SIGHAND: ::c_int = 0x800; -pub const CLONE_PTRACE: ::c_int = 0x2000; -pub const CLONE_VFORK: ::c_int = 0x4000; -pub const CLONE_PARENT: ::c_int = 0x8000; -pub const CLONE_THREAD: ::c_int = 0x10000; -pub const CLONE_NEWNS: ::c_int = 0x20000; -pub const CLONE_SYSVSEM: ::c_int = 0x40000; -pub const CLONE_SETTLS: ::c_int = 0x80000; -pub const CLONE_PARENT_SETTID: ::c_int = 0x100000; -pub const CLONE_CHILD_CLEARTID: ::c_int = 0x200000; -pub const CLONE_DETACHED: ::c_int = 0x400000; -pub const CLONE_UNTRACED: ::c_int = 0x800000; -pub const CLONE_CHILD_SETTID: ::c_int = 0x01000000; -pub const CLONE_NEWCGROUP: ::c_int = 0x02000000; -pub const CLONE_NEWUTS: ::c_int = 0x04000000; -pub const CLONE_NEWIPC: ::c_int = 0x08000000; -pub const CLONE_NEWUSER: ::c_int = 0x10000000; -pub const CLONE_NEWPID: ::c_int = 0x20000000; -pub const CLONE_NEWNET: ::c_int = 0x40000000; -pub const CLONE_IO: ::c_int = 0x80000000; - -pub const WNOHANG: ::c_int = 0x00000001; -pub const WUNTRACED: ::c_int = 0x00000002; -pub const WSTOPPED: ::c_int = WUNTRACED; -pub const WEXITED: ::c_int = 0x00000004; -pub const WCONTINUED: ::c_int = 0x00000008; -pub const WNOWAIT: ::c_int = 0x01000000; +pub const IGNBRK: crate::tcflag_t = 0x00000001; +pub const BRKINT: crate::tcflag_t = 0x00000002; +pub const IGNPAR: crate::tcflag_t = 0x00000004; +pub const PARMRK: crate::tcflag_t = 0x00000008; +pub const INPCK: crate::tcflag_t = 0x00000010; +pub const ISTRIP: crate::tcflag_t = 0x00000020; +pub const INLCR: crate::tcflag_t = 0x00000040; +pub const IGNCR: crate::tcflag_t = 0x00000080; +pub const ICRNL: crate::tcflag_t = 0x00000100; +pub const IXANY: crate::tcflag_t = 0x00000800; +pub const IMAXBEL: crate::tcflag_t = 0x00002000; +pub const OPOST: crate::tcflag_t = 0x1; +pub const CS5: crate::tcflag_t = 0x00000000; +pub const CRTSCTS: crate::tcflag_t = 0x80000000; +pub const ECHO: crate::tcflag_t = 0x00000008; +pub const OCRNL: crate::tcflag_t = 0o000010; +pub const ONOCR: crate::tcflag_t = 0o000020; +pub const ONLRET: crate::tcflag_t = 0o000040; +pub const OFILL: crate::tcflag_t = 0o000100; +pub const OFDEL: crate::tcflag_t = 0o000200; + +pub const CLONE_VM: c_int = 0x100; +pub const CLONE_FS: c_int = 0x200; +pub const CLONE_FILES: c_int = 0x400; +pub const CLONE_SIGHAND: c_int = 0x800; +pub const CLONE_PTRACE: c_int = 0x2000; +pub const CLONE_VFORK: c_int = 0x4000; +pub const CLONE_PARENT: c_int = 0x8000; +pub const CLONE_THREAD: c_int = 0x10000; +pub const CLONE_NEWNS: c_int = 0x20000; +pub const CLONE_SYSVSEM: c_int = 0x40000; +pub const CLONE_SETTLS: c_int = 0x80000; +pub const CLONE_PARENT_SETTID: c_int = 0x100000; +pub const CLONE_CHILD_CLEARTID: c_int = 0x200000; +pub const CLONE_DETACHED: c_int = 0x400000; +pub const CLONE_UNTRACED: c_int = 0x800000; +pub const CLONE_CHILD_SETTID: c_int = 0x01000000; +pub const CLONE_NEWCGROUP: c_int = 0x02000000; +pub const CLONE_NEWUTS: c_int = 0x04000000; +pub const CLONE_NEWIPC: c_int = 0x08000000; +pub const CLONE_NEWUSER: c_int = 0x10000000; +pub const CLONE_NEWPID: c_int = 0x20000000; +pub const CLONE_NEWNET: c_int = 0x40000000; +pub const CLONE_IO: c_int = 0x80000000; + +pub const WNOHANG: c_int = 0x00000001; +pub const WUNTRACED: c_int = 0x00000002; +pub const WSTOPPED: c_int = WUNTRACED; +pub const WEXITED: c_int = 0x00000004; +pub const WCONTINUED: c_int = 0x00000008; +pub const WNOWAIT: c_int = 0x01000000; // Options for personality(2). -pub const ADDR_NO_RANDOMIZE: ::c_int = 0x0040000; -pub const MMAP_PAGE_ZERO: ::c_int = 0x0100000; -pub const ADDR_COMPAT_LAYOUT: ::c_int = 0x0200000; -pub const READ_IMPLIES_EXEC: ::c_int = 0x0400000; -pub const ADDR_LIMIT_32BIT: ::c_int = 0x0800000; -pub const SHORT_INODE: ::c_int = 0x1000000; -pub const WHOLE_SECONDS: ::c_int = 0x2000000; -pub const STICKY_TIMEOUTS: ::c_int = 0x4000000; -pub const ADDR_LIMIT_3GB: ::c_int = 0x8000000; +pub const ADDR_NO_RANDOMIZE: c_int = 0x0040000; +pub const MMAP_PAGE_ZERO: c_int = 0x0100000; +pub const ADDR_COMPAT_LAYOUT: c_int = 0x0200000; +pub const READ_IMPLIES_EXEC: c_int = 0x0400000; +pub const ADDR_LIMIT_32BIT: c_int = 0x0800000; +pub const SHORT_INODE: c_int = 0x1000000; +pub const WHOLE_SECONDS: c_int = 0x2000000; +pub const STICKY_TIMEOUTS: c_int = 0x4000000; +pub const ADDR_LIMIT_3GB: c_int = 0x8000000; // Options set using PTRACE_SETOPTIONS. -pub const PTRACE_O_TRACESYSGOOD: ::c_int = 0x00000001; -pub const PTRACE_O_TRACEFORK: ::c_int = 0x00000002; -pub const PTRACE_O_TRACEVFORK: ::c_int = 0x00000004; -pub const PTRACE_O_TRACECLONE: ::c_int = 0x00000008; -pub const PTRACE_O_TRACEEXEC: ::c_int = 0x00000010; -pub const PTRACE_O_TRACEVFORKDONE: ::c_int = 0x00000020; -pub const PTRACE_O_TRACEEXIT: ::c_int = 0x00000040; -pub const PTRACE_O_TRACESECCOMP: ::c_int = 0x00000080; -pub const PTRACE_O_SUSPEND_SECCOMP: ::c_int = 0x00200000; -pub const PTRACE_O_EXITKILL: ::c_int = 0x00100000; -pub const PTRACE_O_MASK: ::c_int = 0x003000ff; +pub const PTRACE_O_TRACESYSGOOD: c_int = 0x00000001; +pub const PTRACE_O_TRACEFORK: c_int = 0x00000002; +pub const PTRACE_O_TRACEVFORK: c_int = 0x00000004; +pub const PTRACE_O_TRACECLONE: c_int = 0x00000008; +pub const PTRACE_O_TRACEEXEC: c_int = 0x00000010; +pub const PTRACE_O_TRACEVFORKDONE: c_int = 0x00000020; +pub const PTRACE_O_TRACEEXIT: c_int = 0x00000040; +pub const PTRACE_O_TRACESECCOMP: c_int = 0x00000080; +pub const PTRACE_O_SUSPEND_SECCOMP: c_int = 0x00200000; +pub const PTRACE_O_EXITKILL: c_int = 0x00100000; +pub const PTRACE_O_MASK: c_int = 0x003000ff; // Wait extended result codes for the above trace options. -pub const PTRACE_EVENT_FORK: ::c_int = 1; -pub const PTRACE_EVENT_VFORK: ::c_int = 2; -pub const PTRACE_EVENT_CLONE: ::c_int = 3; -pub const PTRACE_EVENT_EXEC: ::c_int = 4; -pub const PTRACE_EVENT_VFORK_DONE: ::c_int = 5; -pub const PTRACE_EVENT_EXIT: ::c_int = 6; -pub const PTRACE_EVENT_SECCOMP: ::c_int = 7; - -pub const __WNOTHREAD: ::c_int = 0x20000000; -pub const __WALL: ::c_int = 0x40000000; -pub const __WCLONE: ::c_int = 0x80000000; - -pub const SPLICE_F_MOVE: ::c_uint = 0x01; -pub const SPLICE_F_NONBLOCK: ::c_uint = 0x02; -pub const SPLICE_F_MORE: ::c_uint = 0x04; -pub const SPLICE_F_GIFT: ::c_uint = 0x08; - -pub const RTLD_LOCAL: ::c_int = 0; -pub const RTLD_LAZY: ::c_int = 1; - -pub const POSIX_FADV_NORMAL: ::c_int = 0; -pub const POSIX_FADV_RANDOM: ::c_int = 1; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_FADV_WILLNEED: ::c_int = 3; - -pub const AT_FDCWD: ::c_int = -100; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x100; -pub const AT_REMOVEDIR: ::c_int = 0x200; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x400; -pub const AT_NO_AUTOMOUNT: ::c_int = 0x800; -pub const AT_EMPTY_PATH: ::c_int = 0x1000; -pub const AT_RECURSIVE: ::c_int = 0x8000; - -pub const LOG_CRON: ::c_int = 9 << 3; -pub const LOG_AUTHPRIV: ::c_int = 10 << 3; -pub const LOG_FTP: ::c_int = 11 << 3; -pub const LOG_PERROR: ::c_int = 0x20; +pub const PTRACE_EVENT_FORK: c_int = 1; +pub const PTRACE_EVENT_VFORK: c_int = 2; +pub const PTRACE_EVENT_CLONE: c_int = 3; +pub const PTRACE_EVENT_EXEC: c_int = 4; +pub const PTRACE_EVENT_VFORK_DONE: c_int = 5; +pub const PTRACE_EVENT_EXIT: c_int = 6; +pub const PTRACE_EVENT_SECCOMP: c_int = 7; + +pub const __WNOTHREAD: c_int = 0x20000000; +pub const __WALL: c_int = 0x40000000; +pub const __WCLONE: c_int = 0x80000000; + +pub const SPLICE_F_MOVE: c_uint = 0x01; +pub const SPLICE_F_NONBLOCK: c_uint = 0x02; +pub const SPLICE_F_MORE: c_uint = 0x04; +pub const SPLICE_F_GIFT: c_uint = 0x08; + +pub const RTLD_LOCAL: c_int = 0; +pub const RTLD_LAZY: c_int = 1; + +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_RANDOM: c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: c_int = 2; +pub const POSIX_FADV_WILLNEED: c_int = 3; + +pub const AT_FDCWD: c_int = -100; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x100; +pub const AT_REMOVEDIR: c_int = 0x200; +pub const AT_SYMLINK_FOLLOW: c_int = 0x400; +pub const AT_NO_AUTOMOUNT: c_int = 0x800; +pub const AT_EMPTY_PATH: c_int = 0x1000; +pub const AT_RECURSIVE: c_int = 0x8000; + +pub const LOG_CRON: c_int = 9 << 3; +pub const LOG_AUTHPRIV: c_int = 10 << 3; +pub const LOG_FTP: c_int = 11 << 3; +pub const LOG_PERROR: c_int = 0x20; pub const PIPE_BUF: usize = 4096; -pub const SI_LOAD_SHIFT: ::c_uint = 16; +pub const SI_LOAD_SHIFT: c_uint = 16; // si_code values for SIGBUS signal -pub const BUS_ADRALN: ::c_int = 1; -pub const BUS_ADRERR: ::c_int = 2; -pub const BUS_OBJERR: ::c_int = 3; +pub const BUS_ADRALN: c_int = 1; +pub const BUS_ADRERR: c_int = 2; +pub const BUS_OBJERR: c_int = 3; // Linux-specific si_code values for SIGBUS signal -pub const BUS_MCEERR_AR: ::c_int = 4; -pub const BUS_MCEERR_AO: ::c_int = 5; +pub const BUS_MCEERR_AR: c_int = 4; +pub const BUS_MCEERR_AO: c_int = 5; // si_code values for SIGCHLD signal -pub const CLD_EXITED: ::c_int = 1; -pub const CLD_KILLED: ::c_int = 2; -pub const CLD_DUMPED: ::c_int = 3; -pub const CLD_TRAPPED: ::c_int = 4; -pub const CLD_STOPPED: ::c_int = 5; -pub const CLD_CONTINUED: ::c_int = 6; +pub const CLD_EXITED: c_int = 1; +pub const CLD_KILLED: c_int = 2; +pub const CLD_DUMPED: c_int = 3; +pub const CLD_TRAPPED: c_int = 4; +pub const CLD_STOPPED: c_int = 5; +pub const CLD_CONTINUED: c_int = 6; -pub const SIGEV_SIGNAL: ::c_int = 0; -pub const SIGEV_NONE: ::c_int = 1; -pub const SIGEV_THREAD: ::c_int = 2; +pub const SIGEV_SIGNAL: c_int = 0; +pub const SIGEV_NONE: c_int = 1; +pub const SIGEV_THREAD: c_int = 2; pub const P_ALL: idtype_t = 0; pub const P_PID: idtype_t = 1; @@ -1320,18 +1322,18 @@ cfg_if! { pub const UTIME_OMIT: c_long = 1073741822; pub const UTIME_NOW: c_long = 1073741823; -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLOUT: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLHUP: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; -pub const POLLRDNORM: ::c_short = 0x040; -pub const POLLRDBAND: ::c_short = 0x080; +pub const POLLIN: c_short = 0x1; +pub const POLLPRI: c_short = 0x2; +pub const POLLOUT: c_short = 0x4; +pub const POLLERR: c_short = 0x8; +pub const POLLHUP: c_short = 0x10; +pub const POLLNVAL: c_short = 0x20; +pub const POLLRDNORM: c_short = 0x040; +pub const POLLRDBAND: c_short = 0x080; #[cfg(not(any(target_arch = "sparc", target_arch = "sparc64")))] -pub const POLLRDHUP: ::c_short = 0x2000; +pub const POLLRDHUP: c_short = 0x2000; #[cfg(any(target_arch = "sparc", target_arch = "sparc64"))] -pub const POLLRDHUP: ::c_short = 0x800; +pub const POLLRDHUP: c_short = 0x800; pub const IPTOS_LOWDELAY: u8 = 0x10; pub const IPTOS_THROUGHPUT: u8 = 0x08; @@ -1390,8 +1392,8 @@ pub const ARPOP_InREQUEST: u16 = 8; pub const ARPOP_InREPLY: u16 = 9; pub const ARPOP_NAK: u16 = 10; -pub const ATF_NETMASK: ::c_int = 0x20; -pub const ATF_DONTPUB: ::c_int = 0x40; +pub const ATF_NETMASK: c_int = 0x20; +pub const ATF_DONTPUB: c_int = 0x40; pub const ARPHRD_NETROM: u16 = 0; pub const ARPHRD_ETHER: u16 = 1; @@ -1459,194 +1461,194 @@ cfg_if! { if #[cfg(target_os = "emscripten")] { // Emscripten does not define any `*_SUPER_MAGIC` constants. } else if #[cfg(not(target_arch = "s390x"))] { - pub const ADFS_SUPER_MAGIC: ::c_long = 0x0000adf5; - pub const AFFS_SUPER_MAGIC: ::c_long = 0x0000adff; - pub const AFS_SUPER_MAGIC: ::c_long = 0x5346414f; - pub const AUTOFS_SUPER_MAGIC: ::c_long = 0x0187; - pub const BPF_FS_MAGIC: ::c_long = 0xcafe4a11; - pub const BTRFS_SUPER_MAGIC: ::c_long = 0x9123683e; - pub const CGROUP2_SUPER_MAGIC: ::c_long = 0x63677270; - pub const CGROUP_SUPER_MAGIC: ::c_long = 0x27e0eb; - pub const CODA_SUPER_MAGIC: ::c_long = 0x73757245; - pub const CRAMFS_MAGIC: ::c_long = 0x28cd3d45; - pub const DEBUGFS_MAGIC: ::c_long = 0x64626720; - pub const DEVPTS_SUPER_MAGIC: ::c_long = 0x1cd1; - pub const ECRYPTFS_SUPER_MAGIC: ::c_long = 0xf15f; - pub const EFS_SUPER_MAGIC: ::c_long = 0x00414a53; - pub const EXT2_SUPER_MAGIC: ::c_long = 0x0000ef53; - pub const EXT3_SUPER_MAGIC: ::c_long = 0x0000ef53; - pub const EXT4_SUPER_MAGIC: ::c_long = 0x0000ef53; - pub const F2FS_SUPER_MAGIC: ::c_long = 0xf2f52010; - pub const FUSE_SUPER_MAGIC: ::c_long = 0x65735546; - pub const FUTEXFS_SUPER_MAGIC: ::c_long = 0xbad1dea; - pub const HOSTFS_SUPER_MAGIC: ::c_long = 0x00c0ffee; - pub const HPFS_SUPER_MAGIC: ::c_long = 0xf995e849; - pub const HUGETLBFS_MAGIC: ::c_long = 0x958458f6; - pub const ISOFS_SUPER_MAGIC: ::c_long = 0x00009660; - pub const JFFS2_SUPER_MAGIC: ::c_long = 0x000072b6; - pub const MINIX2_SUPER_MAGIC2: ::c_long = 0x00002478; - pub const MINIX2_SUPER_MAGIC: ::c_long = 0x00002468; - pub const MINIX3_SUPER_MAGIC: ::c_long = 0x4d5a; - pub const MINIX_SUPER_MAGIC2: ::c_long = 0x0000138f; - pub const MINIX_SUPER_MAGIC: ::c_long = 0x0000137f; - pub const MSDOS_SUPER_MAGIC: ::c_long = 0x00004d44; - pub const NCP_SUPER_MAGIC: ::c_long = 0x0000564c; - pub const NFS_SUPER_MAGIC: ::c_long = 0x00006969; - pub const NILFS_SUPER_MAGIC: ::c_long = 0x3434; - pub const OCFS2_SUPER_MAGIC: ::c_long = 0x7461636f; - pub const OPENPROM_SUPER_MAGIC: ::c_long = 0x00009fa1; - pub const OVERLAYFS_SUPER_MAGIC: ::c_long = 0x794c7630; - pub const PROC_SUPER_MAGIC: ::c_long = 0x00009fa0; - pub const QNX4_SUPER_MAGIC: ::c_long = 0x0000002f; - pub const QNX6_SUPER_MAGIC: ::c_long = 0x68191122; - pub const RDTGROUP_SUPER_MAGIC: ::c_long = 0x7655821; - pub const REISERFS_SUPER_MAGIC: ::c_long = 0x52654973; - pub const SECURITYFS_MAGIC: ::c_long = 0x73636673; - pub const SELINUX_MAGIC: ::c_long = 0xf97cff8c; - pub const SMACK_MAGIC: ::c_long = 0x43415d53; - pub const SMB_SUPER_MAGIC: ::c_long = 0x0000517b; - pub const SYSFS_MAGIC: ::c_long = 0x62656572; - pub const TMPFS_MAGIC: ::c_long = 0x01021994; - pub const TRACEFS_MAGIC: ::c_long = 0x74726163; - pub const UDF_SUPER_MAGIC: ::c_long = 0x15013346; - pub const USBDEVICE_SUPER_MAGIC: ::c_long = 0x00009fa2; - pub const XENFS_SUPER_MAGIC: ::c_long = 0xabba1974; - pub const NSFS_MAGIC: ::c_long = 0x6e736673; + pub const ADFS_SUPER_MAGIC: c_long = 0x0000adf5; + pub const AFFS_SUPER_MAGIC: c_long = 0x0000adff; + pub const AFS_SUPER_MAGIC: c_long = 0x5346414f; + pub const AUTOFS_SUPER_MAGIC: c_long = 0x0187; + pub const BPF_FS_MAGIC: c_long = 0xcafe4a11; + pub const BTRFS_SUPER_MAGIC: c_long = 0x9123683e; + pub const CGROUP2_SUPER_MAGIC: c_long = 0x63677270; + pub const CGROUP_SUPER_MAGIC: c_long = 0x27e0eb; + pub const CODA_SUPER_MAGIC: c_long = 0x73757245; + pub const CRAMFS_MAGIC: c_long = 0x28cd3d45; + pub const DEBUGFS_MAGIC: c_long = 0x64626720; + pub const DEVPTS_SUPER_MAGIC: c_long = 0x1cd1; + pub const ECRYPTFS_SUPER_MAGIC: c_long = 0xf15f; + pub const EFS_SUPER_MAGIC: c_long = 0x00414a53; + pub const EXT2_SUPER_MAGIC: c_long = 0x0000ef53; + pub const EXT3_SUPER_MAGIC: c_long = 0x0000ef53; + pub const EXT4_SUPER_MAGIC: c_long = 0x0000ef53; + pub const F2FS_SUPER_MAGIC: c_long = 0xf2f52010; + pub const FUSE_SUPER_MAGIC: c_long = 0x65735546; + pub const FUTEXFS_SUPER_MAGIC: c_long = 0xbad1dea; + pub const HOSTFS_SUPER_MAGIC: c_long = 0x00c0ffee; + pub const HPFS_SUPER_MAGIC: c_long = 0xf995e849; + pub const HUGETLBFS_MAGIC: c_long = 0x958458f6; + pub const ISOFS_SUPER_MAGIC: c_long = 0x00009660; + pub const JFFS2_SUPER_MAGIC: c_long = 0x000072b6; + pub const MINIX2_SUPER_MAGIC2: c_long = 0x00002478; + pub const MINIX2_SUPER_MAGIC: c_long = 0x00002468; + pub const MINIX3_SUPER_MAGIC: c_long = 0x4d5a; + pub const MINIX_SUPER_MAGIC2: c_long = 0x0000138f; + pub const MINIX_SUPER_MAGIC: c_long = 0x0000137f; + pub const MSDOS_SUPER_MAGIC: c_long = 0x00004d44; + pub const NCP_SUPER_MAGIC: c_long = 0x0000564c; + pub const NFS_SUPER_MAGIC: c_long = 0x00006969; + pub const NILFS_SUPER_MAGIC: c_long = 0x3434; + pub const OCFS2_SUPER_MAGIC: c_long = 0x7461636f; + pub const OPENPROM_SUPER_MAGIC: c_long = 0x00009fa1; + pub const OVERLAYFS_SUPER_MAGIC: c_long = 0x794c7630; + pub const PROC_SUPER_MAGIC: c_long = 0x00009fa0; + pub const QNX4_SUPER_MAGIC: c_long = 0x0000002f; + pub const QNX6_SUPER_MAGIC: c_long = 0x68191122; + pub const RDTGROUP_SUPER_MAGIC: c_long = 0x7655821; + pub const REISERFS_SUPER_MAGIC: c_long = 0x52654973; + pub const SECURITYFS_MAGIC: c_long = 0x73636673; + pub const SELINUX_MAGIC: c_long = 0xf97cff8c; + pub const SMACK_MAGIC: c_long = 0x43415d53; + pub const SMB_SUPER_MAGIC: c_long = 0x0000517b; + pub const SYSFS_MAGIC: c_long = 0x62656572; + pub const TMPFS_MAGIC: c_long = 0x01021994; + pub const TRACEFS_MAGIC: c_long = 0x74726163; + pub const UDF_SUPER_MAGIC: c_long = 0x15013346; + pub const USBDEVICE_SUPER_MAGIC: c_long = 0x00009fa2; + pub const XENFS_SUPER_MAGIC: c_long = 0xabba1974; + pub const NSFS_MAGIC: c_long = 0x6e736673; } else if #[cfg(target_arch = "s390x")] { - pub const ADFS_SUPER_MAGIC: ::c_uint = 0x0000adf5; - pub const AFFS_SUPER_MAGIC: ::c_uint = 0x0000adff; - pub const AFS_SUPER_MAGIC: ::c_uint = 0x5346414f; - pub const AUTOFS_SUPER_MAGIC: ::c_uint = 0x0187; - pub const BPF_FS_MAGIC: ::c_uint = 0xcafe4a11; - pub const BTRFS_SUPER_MAGIC: ::c_uint = 0x9123683e; - pub const CGROUP2_SUPER_MAGIC: ::c_uint = 0x63677270; - pub const CGROUP_SUPER_MAGIC: ::c_uint = 0x27e0eb; - pub const CODA_SUPER_MAGIC: ::c_uint = 0x73757245; - pub const CRAMFS_MAGIC: ::c_uint = 0x28cd3d45; - pub const DEBUGFS_MAGIC: ::c_uint = 0x64626720; - pub const DEVPTS_SUPER_MAGIC: ::c_uint = 0x1cd1; - pub const ECRYPTFS_SUPER_MAGIC: ::c_uint = 0xf15f; - pub const EFS_SUPER_MAGIC: ::c_uint = 0x00414a53; - pub const EXT2_SUPER_MAGIC: ::c_uint = 0x0000ef53; - pub const EXT3_SUPER_MAGIC: ::c_uint = 0x0000ef53; - pub const EXT4_SUPER_MAGIC: ::c_uint = 0x0000ef53; - pub const F2FS_SUPER_MAGIC: ::c_uint = 0xf2f52010; - pub const FUSE_SUPER_MAGIC: ::c_uint = 0x65735546; - pub const FUTEXFS_SUPER_MAGIC: ::c_uint = 0xbad1dea; - pub const HOSTFS_SUPER_MAGIC: ::c_uint = 0x00c0ffee; - pub const HPFS_SUPER_MAGIC: ::c_uint = 0xf995e849; - pub const HUGETLBFS_MAGIC: ::c_uint = 0x958458f6; - pub const ISOFS_SUPER_MAGIC: ::c_uint = 0x00009660; - pub const JFFS2_SUPER_MAGIC: ::c_uint = 0x000072b6; - pub const MINIX2_SUPER_MAGIC2: ::c_uint = 0x00002478; - pub const MINIX2_SUPER_MAGIC: ::c_uint = 0x00002468; - pub const MINIX3_SUPER_MAGIC: ::c_uint = 0x4d5a; - pub const MINIX_SUPER_MAGIC2: ::c_uint = 0x0000138f; - pub const MINIX_SUPER_MAGIC: ::c_uint = 0x0000137f; - pub const MSDOS_SUPER_MAGIC: ::c_uint = 0x00004d44; - pub const NCP_SUPER_MAGIC: ::c_uint = 0x0000564c; - pub const NFS_SUPER_MAGIC: ::c_uint = 0x00006969; - pub const NILFS_SUPER_MAGIC: ::c_uint = 0x3434; - pub const OCFS2_SUPER_MAGIC: ::c_uint = 0x7461636f; - pub const OPENPROM_SUPER_MAGIC: ::c_uint = 0x00009fa1; - pub const OVERLAYFS_SUPER_MAGIC: ::c_uint = 0x794c7630; - pub const PROC_SUPER_MAGIC: ::c_uint = 0x00009fa0; - pub const QNX4_SUPER_MAGIC: ::c_uint = 0x0000002f; - pub const QNX6_SUPER_MAGIC: ::c_uint = 0x68191122; - pub const RDTGROUP_SUPER_MAGIC: ::c_uint = 0x7655821; - pub const REISERFS_SUPER_MAGIC: ::c_uint = 0x52654973; - pub const SECURITYFS_MAGIC: ::c_uint = 0x73636673; - pub const SELINUX_MAGIC: ::c_uint = 0xf97cff8c; - pub const SMACK_MAGIC: ::c_uint = 0x43415d53; - pub const SMB_SUPER_MAGIC: ::c_uint = 0x0000517b; - pub const SYSFS_MAGIC: ::c_uint = 0x62656572; - pub const TMPFS_MAGIC: ::c_uint = 0x01021994; - pub const TRACEFS_MAGIC: ::c_uint = 0x74726163; - pub const UDF_SUPER_MAGIC: ::c_uint = 0x15013346; - pub const USBDEVICE_SUPER_MAGIC: ::c_uint = 0x00009fa2; - pub const XENFS_SUPER_MAGIC: ::c_uint = 0xabba1974; - pub const NSFS_MAGIC: ::c_uint = 0x6e736673; + pub const ADFS_SUPER_MAGIC: c_uint = 0x0000adf5; + pub const AFFS_SUPER_MAGIC: c_uint = 0x0000adff; + pub const AFS_SUPER_MAGIC: c_uint = 0x5346414f; + pub const AUTOFS_SUPER_MAGIC: c_uint = 0x0187; + pub const BPF_FS_MAGIC: c_uint = 0xcafe4a11; + pub const BTRFS_SUPER_MAGIC: c_uint = 0x9123683e; + pub const CGROUP2_SUPER_MAGIC: c_uint = 0x63677270; + pub const CGROUP_SUPER_MAGIC: c_uint = 0x27e0eb; + pub const CODA_SUPER_MAGIC: c_uint = 0x73757245; + pub const CRAMFS_MAGIC: c_uint = 0x28cd3d45; + pub const DEBUGFS_MAGIC: c_uint = 0x64626720; + pub const DEVPTS_SUPER_MAGIC: c_uint = 0x1cd1; + pub const ECRYPTFS_SUPER_MAGIC: c_uint = 0xf15f; + pub const EFS_SUPER_MAGIC: c_uint = 0x00414a53; + pub const EXT2_SUPER_MAGIC: c_uint = 0x0000ef53; + pub const EXT3_SUPER_MAGIC: c_uint = 0x0000ef53; + pub const EXT4_SUPER_MAGIC: c_uint = 0x0000ef53; + pub const F2FS_SUPER_MAGIC: c_uint = 0xf2f52010; + pub const FUSE_SUPER_MAGIC: c_uint = 0x65735546; + pub const FUTEXFS_SUPER_MAGIC: c_uint = 0xbad1dea; + pub const HOSTFS_SUPER_MAGIC: c_uint = 0x00c0ffee; + pub const HPFS_SUPER_MAGIC: c_uint = 0xf995e849; + pub const HUGETLBFS_MAGIC: c_uint = 0x958458f6; + pub const ISOFS_SUPER_MAGIC: c_uint = 0x00009660; + pub const JFFS2_SUPER_MAGIC: c_uint = 0x000072b6; + pub const MINIX2_SUPER_MAGIC2: c_uint = 0x00002478; + pub const MINIX2_SUPER_MAGIC: c_uint = 0x00002468; + pub const MINIX3_SUPER_MAGIC: c_uint = 0x4d5a; + pub const MINIX_SUPER_MAGIC2: c_uint = 0x0000138f; + pub const MINIX_SUPER_MAGIC: c_uint = 0x0000137f; + pub const MSDOS_SUPER_MAGIC: c_uint = 0x00004d44; + pub const NCP_SUPER_MAGIC: c_uint = 0x0000564c; + pub const NFS_SUPER_MAGIC: c_uint = 0x00006969; + pub const NILFS_SUPER_MAGIC: c_uint = 0x3434; + pub const OCFS2_SUPER_MAGIC: c_uint = 0x7461636f; + pub const OPENPROM_SUPER_MAGIC: c_uint = 0x00009fa1; + pub const OVERLAYFS_SUPER_MAGIC: c_uint = 0x794c7630; + pub const PROC_SUPER_MAGIC: c_uint = 0x00009fa0; + pub const QNX4_SUPER_MAGIC: c_uint = 0x0000002f; + pub const QNX6_SUPER_MAGIC: c_uint = 0x68191122; + pub const RDTGROUP_SUPER_MAGIC: c_uint = 0x7655821; + pub const REISERFS_SUPER_MAGIC: c_uint = 0x52654973; + pub const SECURITYFS_MAGIC: c_uint = 0x73636673; + pub const SELINUX_MAGIC: c_uint = 0xf97cff8c; + pub const SMACK_MAGIC: c_uint = 0x43415d53; + pub const SMB_SUPER_MAGIC: c_uint = 0x0000517b; + pub const SYSFS_MAGIC: c_uint = 0x62656572; + pub const TMPFS_MAGIC: c_uint = 0x01021994; + pub const TRACEFS_MAGIC: c_uint = 0x74726163; + pub const UDF_SUPER_MAGIC: c_uint = 0x15013346; + pub const USBDEVICE_SUPER_MAGIC: c_uint = 0x00009fa2; + pub const XENFS_SUPER_MAGIC: c_uint = 0xabba1974; + pub const NSFS_MAGIC: c_uint = 0x6e736673; } } cfg_if! { if #[cfg(any(target_env = "gnu", target_os = "android"))] { - pub const AT_STATX_SYNC_TYPE: ::c_int = 0x6000; - pub const AT_STATX_SYNC_AS_STAT: ::c_int = 0x0000; - pub const AT_STATX_FORCE_SYNC: ::c_int = 0x2000; - pub const AT_STATX_DONT_SYNC: ::c_int = 0x4000; - pub const STATX_TYPE: ::c_uint = 0x0001; - pub const STATX_MODE: ::c_uint = 0x0002; - pub const STATX_NLINK: ::c_uint = 0x0004; - pub const STATX_UID: ::c_uint = 0x0008; - pub const STATX_GID: ::c_uint = 0x0010; - pub const STATX_ATIME: ::c_uint = 0x0020; - pub const STATX_MTIME: ::c_uint = 0x0040; - pub const STATX_CTIME: ::c_uint = 0x0080; - pub const STATX_INO: ::c_uint = 0x0100; - pub const STATX_SIZE: ::c_uint = 0x0200; - pub const STATX_BLOCKS: ::c_uint = 0x0400; - pub const STATX_BASIC_STATS: ::c_uint = 0x07ff; - pub const STATX_BTIME: ::c_uint = 0x0800; - pub const STATX_ALL: ::c_uint = 0x0fff; - pub const STATX_MNT_ID: ::c_uint = 0x1000; - pub const STATX_DIOALIGN: ::c_uint = 0x2000; - pub const STATX__RESERVED: ::c_int = 0x80000000; - pub const STATX_ATTR_COMPRESSED: ::c_int = 0x0004; - pub const STATX_ATTR_IMMUTABLE: ::c_int = 0x0010; - pub const STATX_ATTR_APPEND: ::c_int = 0x0020; - pub const STATX_ATTR_NODUMP: ::c_int = 0x0040; - pub const STATX_ATTR_ENCRYPTED: ::c_int = 0x0800; - pub const STATX_ATTR_AUTOMOUNT: ::c_int = 0x1000; - pub const STATX_ATTR_MOUNT_ROOT: ::c_int = 0x2000; - pub const STATX_ATTR_VERITY: ::c_int = 0x100000; - pub const STATX_ATTR_DAX: ::c_int = 0x200000; + pub const AT_STATX_SYNC_TYPE: c_int = 0x6000; + pub const AT_STATX_SYNC_AS_STAT: c_int = 0x0000; + pub const AT_STATX_FORCE_SYNC: c_int = 0x2000; + pub const AT_STATX_DONT_SYNC: c_int = 0x4000; + pub const STATX_TYPE: c_uint = 0x0001; + pub const STATX_MODE: c_uint = 0x0002; + pub const STATX_NLINK: c_uint = 0x0004; + pub const STATX_UID: c_uint = 0x0008; + pub const STATX_GID: c_uint = 0x0010; + pub const STATX_ATIME: c_uint = 0x0020; + pub const STATX_MTIME: c_uint = 0x0040; + pub const STATX_CTIME: c_uint = 0x0080; + pub const STATX_INO: c_uint = 0x0100; + pub const STATX_SIZE: c_uint = 0x0200; + pub const STATX_BLOCKS: c_uint = 0x0400; + pub const STATX_BASIC_STATS: c_uint = 0x07ff; + pub const STATX_BTIME: c_uint = 0x0800; + pub const STATX_ALL: c_uint = 0x0fff; + pub const STATX_MNT_ID: c_uint = 0x1000; + pub const STATX_DIOALIGN: c_uint = 0x2000; + pub const STATX__RESERVED: c_int = 0x80000000; + pub const STATX_ATTR_COMPRESSED: c_int = 0x0004; + pub const STATX_ATTR_IMMUTABLE: c_int = 0x0010; + pub const STATX_ATTR_APPEND: c_int = 0x0020; + pub const STATX_ATTR_NODUMP: c_int = 0x0040; + pub const STATX_ATTR_ENCRYPTED: c_int = 0x0800; + pub const STATX_ATTR_AUTOMOUNT: c_int = 0x1000; + pub const STATX_ATTR_MOUNT_ROOT: c_int = 0x2000; + pub const STATX_ATTR_VERITY: c_int = 0x100000; + pub const STATX_ATTR_DAX: c_int = 0x200000; } } const_fn! { {const} fn CMSG_ALIGN(len: usize) -> usize { - len + ::mem::size_of::() - 1 & !(::mem::size_of::() - 1) + len + crate::mem::size_of::() - 1 & !(crate::mem::size_of::() - 1) } } f! { pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { - if (*mhdr).msg_controllen as usize >= ::mem::size_of::() { + if (*mhdr).msg_controllen as usize >= crate::mem::size_of::() { (*mhdr).msg_control as *mut cmsghdr } else { 0 as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut ::c_uchar { - cmsg.offset(1) as *mut ::c_uchar + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + cmsg.offset(1) as *mut c_uchar } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::())) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (CMSG_ALIGN(length as usize) + CMSG_ALIGN(crate::mem::size_of::())) as c_uint } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - CMSG_ALIGN(::mem::size_of::()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + CMSG_ALIGN(crate::mem::size_of::()) as c_uint + length } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } @@ -1659,55 +1661,55 @@ f! { } safe_f! { - pub fn SIGRTMAX() -> ::c_int { + pub fn SIGRTMAX() -> c_int { unsafe { __libc_current_sigrtmax() } } - pub fn SIGRTMIN() -> ::c_int { + pub fn SIGRTMIN() -> c_int { unsafe { __libc_current_sigrtmin() } } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub {const} fn W_EXITCODE(ret: ::c_int, sig: ::c_int) -> ::c_int { + pub {const} fn W_EXITCODE(ret: c_int, sig: c_int) -> c_int { (ret << 8) | sig } - pub {const} fn W_STOPCODE(sig: ::c_int) -> ::c_int { + pub {const} fn W_STOPCODE(sig: c_int) -> c_int { (sig << 8) | 0x7f } - pub {const} fn QCMD(cmd: ::c_int, type_: ::c_int) -> ::c_int { + pub {const} fn QCMD(cmd: c_int, type_: c_int) -> c_int { (cmd << 8) | (type_ & 0x00ff) } @@ -1724,14 +1726,14 @@ safe_f! { } pub {const} fn IPTOS_ECN(x: u8) -> u8 { - x & ::IPTOS_ECN_MASK + x & crate::IPTOS_ECN_MASK } #[allow(ellipsis_inclusive_range_patterns)] pub {const} fn KERNEL_VERSION(a: u32, b: u32, c: u32) -> u32 { ((a << 16) + (b << 8)) + match c { - 0...255 => c, + 0..=255 => c, _ => 255, } } @@ -1739,121 +1741,130 @@ safe_f! { extern "C" { #[doc(hidden)] - pub fn __libc_current_sigrtmax() -> ::c_int; + pub fn __libc_current_sigrtmax() -> c_int; #[doc(hidden)] - pub fn __libc_current_sigrtmin() -> ::c_int; + pub fn __libc_current_sigrtmin() -> c_int; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_uchar) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; + pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_uchar) -> c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; - pub fn pthread_getattr_np(native: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_getattr_np(native: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn setgroups(ngroups: ::size_t, ptr: *const ::gid_t) -> ::c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; - pub fn statfs(path: *const ::c_char, buf: *mut statfs) -> ::c_int; - pub fn fstatfs(fd: ::c_int, buf: *mut statfs) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn setgroups(ngroups: size_t, ptr: *const crate::gid_t) -> c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; + pub fn statfs(path: *const c_char, buf: *mut statfs) -> c_int; + pub fn fstatfs(fd: c_int, buf: *mut statfs) -> c_int; + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_mutexattr_setpshared( - attr: *mut pthread_mutexattr_t, - pshared: ::c_int, - ) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; pub fn pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; - pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> ::c_int; - pub fn clearenv() -> ::c_int; - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; - pub fn getresuid(ruid: *mut ::uid_t, euid: *mut ::uid_t, suid: *mut ::uid_t) -> ::c_int; - pub fn getresgid(rgid: *mut ::gid_t, egid: *mut ::gid_t, sgid: *mut ::gid_t) -> ::c_int; - pub fn acct(filename: *const ::c_char) -> ::c_int; - pub fn brk(addr: *mut ::c_void) -> ::c_int; - pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; - pub fn setresgid(rgid: ::gid_t, egid: ::gid_t, sgid: ::gid_t) -> ::c_int; - pub fn setresuid(ruid: ::uid_t, euid: ::uid_t, suid: ::uid_t) -> ::c_int; + val: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: c_int) -> c_int; + pub fn ptsname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + pub fn clearenv() -> c_int; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; + pub fn getresuid( + ruid: *mut crate::uid_t, + euid: *mut crate::uid_t, + suid: *mut crate::uid_t, + ) -> c_int; + pub fn getresgid( + rgid: *mut crate::gid_t, + egid: *mut crate::gid_t, + sgid: *mut crate::gid_t, + ) -> c_int; + pub fn acct(filename: *const c_char) -> c_int; + pub fn brk(addr: *mut c_void) -> c_int; + pub fn sbrk(increment: intptr_t) -> *mut c_void; + pub fn setresgid(rgid: crate::gid_t, egid: crate::gid_t, sgid: crate::gid_t) -> c_int; + pub fn setresuid(ruid: crate::uid_t, euid: crate::uid_t, suid: crate::uid_t) -> c_int; pub fn wait4( - pid: ::pid_t, - status: *mut ::c_int, - options: ::c_int, - rusage: *mut ::rusage, - ) -> ::pid_t; - pub fn login_tty(fd: ::c_int) -> ::c_int; + pid: crate::pid_t, + status: *mut c_int, + options: c_int, + rusage: *mut crate::rusage, + ) -> crate::pid_t; + pub fn login_tty(fd: c_int) -> c_int; pub fn execvpe( - file: *const ::c_char, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; - - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - - pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn uname(buf: *mut ::utsname) -> ::c_int; - - pub fn strchrnul(s: *const ::c_char, c: ::c_int) -> *mut ::c_char; + file: *const c_char, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; + + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + + pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; + pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; + pub fn uname(buf: *mut crate::utsname) -> c_int; + + pub fn strchrnul(s: *const c_char, c: c_int) -> *mut c_char; pub fn strftime( - s: *mut ::c_char, - max: ::size_t, - format: *const ::c_char, - tm: *const ::tm, - ) -> ::size_t; + s: *mut c_char, + max: size_t, + format: *const c_char, + tm: *const crate::tm, + ) -> size_t; pub fn strftime_l( - s: *mut ::c_char, - max: ::size_t, - format: *const ::c_char, - tm: *const ::tm, - locale: ::locale_t, - ) -> ::size_t; - pub fn strptime(s: *const ::c_char, format: *const ::c_char, tm: *mut ::tm) -> *mut ::c_char; + s: *mut c_char, + max: size_t, + format: *const c_char, + tm: *const crate::tm, + locale: crate::locale_t, + ) -> size_t; + pub fn strptime(s: *const c_char, format: *const c_char, tm: *mut crate::tm) -> *mut c_char; } // LFS64 extensions @@ -1863,57 +1874,52 @@ extern "C" { cfg_if! { if #[cfg(not(any(target_env = "musl", target_os = "emscripten")))] { extern "C" { - pub fn fstatfs64(fd: ::c_int, buf: *mut statfs64) -> ::c_int; - pub fn statvfs64(path: *const ::c_char, buf: *mut statvfs64) -> ::c_int; - pub fn fstatvfs64(fd: ::c_int, buf: *mut statvfs64) -> ::c_int; - pub fn statfs64(path: *const ::c_char, buf: *mut statfs64) -> ::c_int; - pub fn creat64(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn fstat64(fildes: ::c_int, buf: *mut stat64) -> ::c_int; + pub fn fstatfs64(fd: c_int, buf: *mut statfs64) -> c_int; + pub fn statvfs64(path: *const c_char, buf: *mut statvfs64) -> c_int; + pub fn fstatvfs64(fd: c_int, buf: *mut statvfs64) -> c_int; + pub fn statfs64(path: *const c_char, buf: *mut statfs64) -> c_int; + pub fn creat64(path: *const c_char, mode: mode_t) -> c_int; + pub fn fstat64(fildes: c_int, buf: *mut stat64) -> c_int; pub fn fstatat64( - dirfd: ::c_int, + dirfd: c_int, pathname: *const c_char, buf: *mut stat64, - flags: ::c_int, - ) -> ::c_int; - pub fn ftruncate64(fd: ::c_int, length: off64_t) -> ::c_int; - pub fn lseek64(fd: ::c_int, offset: off64_t, whence: ::c_int) -> off64_t; - pub fn lstat64(path: *const c_char, buf: *mut stat64) -> ::c_int; + flags: c_int, + ) -> c_int; + pub fn ftruncate64(fd: c_int, length: off64_t) -> c_int; + pub fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> off64_t; + pub fn lstat64(path: *const c_char, buf: *mut stat64) -> c_int; pub fn mmap64( - addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, + addr: *mut c_void, + len: size_t, + prot: c_int, + flags: c_int, + fd: c_int, offset: off64_t, - ) -> *mut ::c_void; - pub fn open64(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - pub fn openat64(fd: ::c_int, path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + ) -> *mut c_void; + pub fn open64(path: *const c_char, oflag: c_int, ...) -> c_int; + pub fn openat64(fd: c_int, path: *const c_char, oflag: c_int, ...) -> c_int; pub fn posix_fadvise64( - fd: ::c_int, - offset: ::off64_t, - len: ::off64_t, - advise: ::c_int, - ) -> ::c_int; - pub fn pread64( - fd: ::c_int, - buf: *mut ::c_void, - count: ::size_t, + fd: c_int, offset: off64_t, - ) -> ::ssize_t; + len: off64_t, + advise: c_int, + ) -> c_int; + pub fn pread64(fd: c_int, buf: *mut c_void, count: size_t, offset: off64_t) -> ssize_t; pub fn pwrite64( - fd: ::c_int, - buf: *const ::c_void, - count: ::size_t, + fd: c_int, + buf: *const c_void, + count: size_t, offset: off64_t, - ) -> ::ssize_t; - pub fn readdir64(dirp: *mut ::DIR) -> *mut ::dirent64; + ) -> ssize_t; + pub fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64; pub fn readdir64_r( - dirp: *mut ::DIR, - entry: *mut ::dirent64, - result: *mut *mut ::dirent64, - ) -> ::c_int; - pub fn stat64(path: *const c_char, buf: *mut stat64) -> ::c_int; - pub fn truncate64(path: *const c_char, length: off64_t) -> ::c_int; + dirp: *mut crate::DIR, + entry: *mut crate::dirent64, + result: *mut *mut crate::dirent64, + ) -> c_int; + pub fn stat64(path: *const c_char, buf: *mut stat64) -> c_int; + pub fn truncate64(path: *const c_char, length: off64_t) -> c_int; } } } @@ -1926,17 +1932,17 @@ cfg_if! { )))] { extern "C" { pub fn preadv64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, + ) -> ssize_t; pub fn pwritev64( - fd: ::c_int, - iov: *const ::iovec, - iovcnt: ::c_int, - offset: ::off64_t, - ) -> ::ssize_t; + fd: c_int, + iov: *const crate::iovec, + iovcnt: c_int, + offset: off64_t, + ) -> ssize_t; } } } @@ -1946,19 +1952,19 @@ cfg_if! { extern "C" { // uclibc has separate non-const version of this function pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + name: *mut c_char, termp: *const termios, - winp: *const ::winsize, - ) -> ::pid_t; + winp: *const crate::winsize, + ) -> crate::pid_t; // uclibc has separate non-const version of this function pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *const termios, - winp: *const ::winsize, - ) -> ::c_int; + winp: *const crate::winsize, + ) -> c_int; } } } @@ -1968,12 +1974,12 @@ cfg_if! { if #[cfg(any(target_env = "gnu", target_os = "android"))] { extern "C" { pub fn statx( - dirfd: ::c_int, - pathname: *const ::c_char, - flags: ::c_int, - mask: ::c_uint, + dirfd: c_int, + pathname: *const c_char, + flags: c_int, + mask: c_uint, statxbuf: *mut statx, - ) -> ::c_int; + ) -> c_int; } } } diff --git a/src/unix/mod.rs b/src/unix/mod.rs index 271b396c8c0b9..340ae9abd9781 100644 --- a/src/unix/mod.rs +++ b/src/unix/mod.rs @@ -3,7 +3,7 @@ //! More functions and definitions can be found in the more specific modules //! according to the platform in question. -use c_void; +use crate::c_void; pub type c_schar = i8; pub type c_uchar = u8; @@ -27,8 +27,8 @@ pub type ssize_t = isize; pub type pid_t = i32; pub type in_addr_t = u32; pub type in_port_t = u16; -pub type sighandler_t = ::size_t; -pub type cc_t = ::c_uchar; +pub type sighandler_t = size_t; +pub type cc_t = c_uchar; cfg_if! { if #[cfg(any( @@ -36,8 +36,8 @@ cfg_if! { target_os = "horizon", target_os = "vita" ))] { - pub type uid_t = ::c_ushort; - pub type gid_t = ::c_ushort; + pub type uid_t = c_ushort; + pub type gid_t = c_ushort; } else if #[cfg(target_os = "nto")] { pub type uid_t = i32; pub type gid_t = i32; @@ -51,14 +51,14 @@ missing! { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum DIR {} } -pub type locale_t = *mut ::c_void; +pub type locale_t = *mut c_void; s! { pub struct group { - pub gr_name: *mut ::c_char, - pub gr_passwd: *mut ::c_char, - pub gr_gid: ::gid_t, - pub gr_mem: *mut *mut ::c_char, + pub gr_name: *mut c_char, + pub gr_passwd: *mut c_char, + pub gr_gid: crate::gid_t, + pub gr_mem: *mut *mut c_char, } pub struct utimbuf { @@ -78,7 +78,7 @@ s! { #[cfg(all(target_arch = "x86_64", target_pointer_width = "32"))] pub tv_nsec: i64, #[cfg(not(all(target_arch = "x86_64", target_pointer_width = "32")))] - pub tv_nsec: ::c_long, + pub tv_nsec: c_long, } pub struct rlimit { @@ -139,72 +139,72 @@ s! { pub struct ipv6_mreq { pub ipv6mr_multiaddr: in6_addr, #[cfg(target_os = "android")] - pub ipv6mr_interface: ::c_int, + pub ipv6mr_interface: c_int, #[cfg(not(target_os = "android"))] - pub ipv6mr_interface: ::c_uint, + pub ipv6mr_interface: c_uint, } pub struct hostent { - pub h_name: *mut ::c_char, - pub h_aliases: *mut *mut ::c_char, - pub h_addrtype: ::c_int, - pub h_length: ::c_int, - pub h_addr_list: *mut *mut ::c_char, + pub h_name: *mut c_char, + pub h_aliases: *mut *mut c_char, + pub h_addrtype: c_int, + pub h_length: c_int, + pub h_addr_list: *mut *mut c_char, } pub struct iovec { - pub iov_base: *mut ::c_void, - pub iov_len: ::size_t, + pub iov_base: *mut c_void, + pub iov_len: size_t, } pub struct pollfd { - pub fd: ::c_int, - pub events: ::c_short, - pub revents: ::c_short, + pub fd: c_int, + pub events: c_short, + pub revents: c_short, } pub struct winsize { - pub ws_row: ::c_ushort, - pub ws_col: ::c_ushort, - pub ws_xpixel: ::c_ushort, - pub ws_ypixel: ::c_ushort, + pub ws_row: c_ushort, + pub ws_col: c_ushort, + pub ws_xpixel: c_ushort, + pub ws_ypixel: c_ushort, } pub struct linger { - pub l_onoff: ::c_int, - pub l_linger: ::c_int, + pub l_onoff: c_int, + pub l_linger: c_int, } pub struct sigval { // Actually a union of an int and a void* - pub sival_ptr: *mut ::c_void, + pub sival_ptr: *mut c_void, } // pub struct itimerval { - pub it_interval: ::timeval, - pub it_value: ::timeval, + pub it_interval: crate::timeval, + pub it_value: crate::timeval, } // pub struct tms { - pub tms_utime: ::clock_t, - pub tms_stime: ::clock_t, - pub tms_cutime: ::clock_t, - pub tms_cstime: ::clock_t, + pub tms_utime: crate::clock_t, + pub tms_stime: crate::clock_t, + pub tms_cutime: crate::clock_t, + pub tms_cstime: crate::clock_t, } pub struct servent { - pub s_name: *mut ::c_char, - pub s_aliases: *mut *mut ::c_char, - pub s_port: ::c_int, - pub s_proto: *mut ::c_char, + pub s_name: *mut c_char, + pub s_aliases: *mut *mut c_char, + pub s_port: c_int, + pub s_proto: *mut c_char, } pub struct protoent { - pub p_name: *mut ::c_char, - pub p_aliases: *mut *mut ::c_char, - pub p_proto: ::c_int, + pub p_name: *mut c_char, + pub p_aliases: *mut *mut c_char, + pub p_proto: c_int, } #[repr(align(4))] @@ -234,21 +234,21 @@ cfg_if! { } cfg_if! { if #[cfg(not(target_os = "redox"))] { - pub const FD_CLOEXEC: ::c_int = 0x1; + pub const FD_CLOEXEC: c_int = 0x1; } } cfg_if! { if #[cfg(not(target_os = "nto"))] { - pub const USRQUOTA: ::c_int = 0; - pub const GRPQUOTA: ::c_int = 1; + pub const USRQUOTA: c_int = 0; + pub const GRPQUOTA: c_int = 1; } } -pub const SIGIOT: ::c_int = 6; +pub const SIGIOT: c_int = 6; -pub const S_ISUID: ::mode_t = 0o4000; -pub const S_ISGID: ::mode_t = 0o2000; -pub const S_ISVTX: ::mode_t = 0o1000; +pub const S_ISUID: crate::mode_t = 0o4000; +pub const S_ISGID: crate::mode_t = 0o2000; +pub const S_ISVTX: crate::mode_t = 0o1000; cfg_if! { if #[cfg(not(any( @@ -256,62 +256,62 @@ cfg_if! { target_os = "illumos", target_os = "solaris" )))] { - pub const IF_NAMESIZE: ::size_t = 16; - pub const IFNAMSIZ: ::size_t = IF_NAMESIZE; + pub const IF_NAMESIZE: size_t = 16; + pub const IFNAMSIZ: size_t = IF_NAMESIZE; } } -pub const LOG_EMERG: ::c_int = 0; -pub const LOG_ALERT: ::c_int = 1; -pub const LOG_CRIT: ::c_int = 2; -pub const LOG_ERR: ::c_int = 3; -pub const LOG_WARNING: ::c_int = 4; -pub const LOG_NOTICE: ::c_int = 5; -pub const LOG_INFO: ::c_int = 6; -pub const LOG_DEBUG: ::c_int = 7; - -pub const LOG_KERN: ::c_int = 0; -pub const LOG_USER: ::c_int = 1 << 3; -pub const LOG_MAIL: ::c_int = 2 << 3; -pub const LOG_DAEMON: ::c_int = 3 << 3; -pub const LOG_AUTH: ::c_int = 4 << 3; -pub const LOG_SYSLOG: ::c_int = 5 << 3; -pub const LOG_LPR: ::c_int = 6 << 3; -pub const LOG_NEWS: ::c_int = 7 << 3; -pub const LOG_UUCP: ::c_int = 8 << 3; -pub const LOG_LOCAL0: ::c_int = 16 << 3; -pub const LOG_LOCAL1: ::c_int = 17 << 3; -pub const LOG_LOCAL2: ::c_int = 18 << 3; -pub const LOG_LOCAL3: ::c_int = 19 << 3; -pub const LOG_LOCAL4: ::c_int = 20 << 3; -pub const LOG_LOCAL5: ::c_int = 21 << 3; -pub const LOG_LOCAL6: ::c_int = 22 << 3; -pub const LOG_LOCAL7: ::c_int = 23 << 3; +pub const LOG_EMERG: c_int = 0; +pub const LOG_ALERT: c_int = 1; +pub const LOG_CRIT: c_int = 2; +pub const LOG_ERR: c_int = 3; +pub const LOG_WARNING: c_int = 4; +pub const LOG_NOTICE: c_int = 5; +pub const LOG_INFO: c_int = 6; +pub const LOG_DEBUG: c_int = 7; + +pub const LOG_KERN: c_int = 0; +pub const LOG_USER: c_int = 1 << 3; +pub const LOG_MAIL: c_int = 2 << 3; +pub const LOG_DAEMON: c_int = 3 << 3; +pub const LOG_AUTH: c_int = 4 << 3; +pub const LOG_SYSLOG: c_int = 5 << 3; +pub const LOG_LPR: c_int = 6 << 3; +pub const LOG_NEWS: c_int = 7 << 3; +pub const LOG_UUCP: c_int = 8 << 3; +pub const LOG_LOCAL0: c_int = 16 << 3; +pub const LOG_LOCAL1: c_int = 17 << 3; +pub const LOG_LOCAL2: c_int = 18 << 3; +pub const LOG_LOCAL3: c_int = 19 << 3; +pub const LOG_LOCAL4: c_int = 20 << 3; +pub const LOG_LOCAL5: c_int = 21 << 3; +pub const LOG_LOCAL6: c_int = 22 << 3; +pub const LOG_LOCAL7: c_int = 23 << 3; cfg_if! { if #[cfg(not(target_os = "haiku"))] { - pub const LOG_PID: ::c_int = 0x01; - pub const LOG_CONS: ::c_int = 0x02; - pub const LOG_ODELAY: ::c_int = 0x04; - pub const LOG_NDELAY: ::c_int = 0x08; - pub const LOG_NOWAIT: ::c_int = 0x10; + pub const LOG_PID: c_int = 0x01; + pub const LOG_CONS: c_int = 0x02; + pub const LOG_ODELAY: c_int = 0x04; + pub const LOG_NDELAY: c_int = 0x08; + pub const LOG_NOWAIT: c_int = 0x10; } } -pub const LOG_PRIMASK: ::c_int = 7; -pub const LOG_FACMASK: ::c_int = 0x3f8; +pub const LOG_PRIMASK: c_int = 7; +pub const LOG_FACMASK: c_int = 0x3f8; cfg_if! { if #[cfg(not(target_os = "nto"))] { - pub const PRIO_MIN: ::c_int = -20; - pub const PRIO_MAX: ::c_int = 20; + pub const PRIO_MIN: c_int = -20; + pub const PRIO_MAX: c_int = 20; } } -pub const IPPROTO_ICMP: ::c_int = 1; -pub const IPPROTO_ICMPV6: ::c_int = 58; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_UDP: ::c_int = 17; -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; +pub const IPPROTO_ICMP: c_int = 1; +pub const IPPROTO_ICMPV6: c_int = 58; +pub const IPPROTO_TCP: c_int = 6; +pub const IPPROTO_UDP: c_int = 17; +pub const IPPROTO_IP: c_int = 0; +pub const IPPROTO_IPV6: c_int = 41; pub const INADDR_LOOPBACK: in_addr_t = 2130706433; pub const INADDR_ANY: in_addr_t = 0; @@ -329,10 +329,10 @@ pub const IN6ADDR_ANY_INIT: in6_addr = in6_addr { pub const ARPOP_REQUEST: u16 = 1; pub const ARPOP_REPLY: u16 = 2; -pub const ATF_COM: ::c_int = 0x02; -pub const ATF_PERM: ::c_int = 0x04; -pub const ATF_PUBL: ::c_int = 0x08; -pub const ATF_USETRAILERS: ::c_int = 0x10; +pub const ATF_COM: c_int = 0x02; +pub const ATF_PERM: c_int = 0x04; +pub const ATF_PUBL: c_int = 0x08; +pub const ATF_USETRAILERS: c_int = 0x10; pub const FNM_PERIOD: c_int = 1 << 2; pub const FNM_NOMATCH: c_int = 1; @@ -559,14 +559,14 @@ extern "C" { base: *mut c_void, num: size_t, size: size_t, - compar: ::Option c_int>, + compar: Option c_int>, ); pub fn bsearch( key: *const c_void, base: *const c_void, num: size_t, size: size_t, - compar: ::Option c_int>, + compar: Option c_int>, ) -> *mut c_void; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), @@ -673,7 +673,7 @@ extern "C" { pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; pub fn strsignal(sig: c_int) -> *mut c_char; pub fn wcslen(buf: *const wchar_t) -> size_t; - pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t; + pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> size_t; pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn wmemchr(cx: *const wchar_t, c: wchar_t, n: size_t) -> *mut wchar_t; @@ -685,38 +685,38 @@ extern "C" { extern "C" { #[cfg_attr(target_os = "netbsd", link_name = "__getpwnam50")] - pub fn getpwnam(name: *const ::c_char) -> *mut passwd; + pub fn getpwnam(name: *const c_char) -> *mut passwd; #[cfg_attr(target_os = "netbsd", link_name = "__getpwuid50")] - pub fn getpwuid(uid: ::uid_t) -> *mut passwd; + pub fn getpwuid(uid: crate::uid_t) -> *mut passwd; - pub fn fprintf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn printf(format: *const ::c_char, ...) -> ::c_int; - pub fn snprintf(s: *mut ::c_char, n: ::size_t, format: *const ::c_char, ...) -> ::c_int; - pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int; + pub fn fprintf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn printf(format: *const c_char, ...) -> c_int; + pub fn snprintf(s: *mut c_char, n: size_t, format: *const c_char, ...) -> c_int; + pub fn sprintf(s: *mut c_char, format: *const c_char, ...) -> c_int; #[cfg_attr( all(target_os = "linux", not(target_env = "uclibc")), link_name = "__isoc99_fscanf" )] - pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; + pub fn fscanf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; #[cfg_attr( all(target_os = "linux", not(target_env = "uclibc")), link_name = "__isoc99_scanf" )] - pub fn scanf(format: *const ::c_char, ...) -> ::c_int; + pub fn scanf(format: *const c_char, ...) -> c_int; #[cfg_attr( all(target_os = "linux", not(target_env = "uclibc")), link_name = "__isoc99_sscanf" )] - pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn getchar_unlocked() -> ::c_int; - pub fn putchar_unlocked(c: ::c_int) -> ::c_int; + pub fn sscanf(s: *const c_char, format: *const c_char, ...) -> c_int; + pub fn getchar_unlocked() -> c_int; + pub fn putchar_unlocked(c: c_int) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr(target_os = "netbsd", link_name = "__socket30")] #[cfg_attr(target_os = "illumos", link_name = "__xnet_socket")] #[cfg_attr(target_os = "solaris", link_name = "__xnet7_socket")] #[cfg_attr(target_os = "espidf", link_name = "lwip_socket")] - pub fn socket(domain: ::c_int, ty: ::c_int, protocol: ::c_int) -> ::c_int; + pub fn socket(domain: c_int, ty: c_int, protocol: c_int) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), @@ -727,50 +727,44 @@ extern "C" { link_name = "__xnet_connect" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_connect")] - pub fn connect(socket: ::c_int, address: *const sockaddr, len: socklen_t) -> ::c_int; + pub fn connect(socket: c_int, address: *const sockaddr, len: socklen_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "listen$UNIX2003" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_listen")] - pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; + pub fn listen(socket: c_int, backlog: c_int) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "accept$UNIX2003" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_accept")] - pub fn accept(socket: ::c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> ::c_int; + pub fn accept(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "getpeername$UNIX2003" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_getpeername")] - pub fn getpeername( - socket: ::c_int, - address: *mut sockaddr, - address_len: *mut socklen_t, - ) -> ::c_int; + pub fn getpeername(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) + -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "getsockname$UNIX2003" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_getsockname")] - pub fn getsockname( - socket: ::c_int, - address: *mut sockaddr, - address_len: *mut socklen_t, - ) -> ::c_int; + pub fn getsockname(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) + -> c_int; #[cfg_attr(target_os = "espidf", link_name = "lwip_setsockopt")] pub fn setsockopt( - socket: ::c_int, - level: ::c_int, - name: ::c_int, - value: *const ::c_void, + socket: c_int, + level: c_int, + name: c_int, + value: *const c_void, option_len: socklen_t, - ) -> ::c_int; + ) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "socketpair$UNIX2003" @@ -780,11 +774,11 @@ extern "C" { link_name = "__xnet_socketpair" )] pub fn socketpair( - domain: ::c_int, - type_: ::c_int, - protocol: ::c_int, - socket_vector: *mut ::c_int, - ) -> ::c_int; + domain: c_int, + type_: c_int, + protocol: c_int, + socket_vector: *mut c_int, + ) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr( all(target_os = "macos", target_arch = "x86"), @@ -796,26 +790,26 @@ extern "C" { )] #[cfg_attr(target_os = "espidf", link_name = "lwip_sendto")] pub fn sendto( - socket: ::c_int, - buf: *const ::c_void, - len: ::size_t, - flags: ::c_int, + socket: c_int, + buf: *const c_void, + len: size_t, + flags: c_int, addr: *const sockaddr, addrlen: socklen_t, - ) -> ::ssize_t; + ) -> ssize_t; #[cfg_attr(target_os = "espidf", link_name = "lwip_shutdown")] - pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; + pub fn shutdown(socket: c_int, how: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "chmod$UNIX2003" )] - pub fn chmod(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn chmod(path: *const c_char, mode: mode_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "fchmod$UNIX2003" )] - pub fn fchmod(fd: ::c_int, mode: mode_t) -> ::c_int; + pub fn fchmod(fd: c_int, mode: mode_t) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -826,9 +820,9 @@ extern "C" { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "fstat@FBSD_1.0" )] - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int; - pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -839,31 +833,31 @@ extern "C" { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "stat@FBSD_1.0" )] - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> c_int; - pub fn pclose(stream: *mut ::FILE) -> ::c_int; + pub fn pclose(stream: *mut crate::FILE) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "fdopen$UNIX2003" )] - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; - pub fn fileno(stream: *mut ::FILE) -> ::c_int; + pub fn fdopen(fd: c_int, mode: *const c_char) -> *mut crate::FILE; + pub fn fileno(stream: *mut crate::FILE) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "open$UNIX2003" )] - pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "creat$UNIX2003" )] - pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn creat(path: *const c_char, mode: mode_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "fcntl$UNIX2003" )] - pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; + pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), @@ -874,7 +868,7 @@ extern "C" { link_name = "opendir$INODE64$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__opendir30")] - pub fn opendir(dirname: *const c_char) -> *mut ::DIR; + pub fn opendir(dirname: *const c_char) -> *mut crate::DIR; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -885,12 +879,12 @@ extern "C" { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "readdir@FBSD_1.0" )] - pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; + pub fn readdir(dirp: *mut crate::DIR) -> *mut crate::dirent; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "closedir$UNIX2003" )] - pub fn closedir(dirp: *mut ::DIR) -> ::c_int; + pub fn closedir(dirp: *mut crate::DIR) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), link_name = "rewinddir$INODE64" @@ -899,22 +893,22 @@ extern "C" { all(target_os = "macos", target_arch = "x86"), link_name = "rewinddir$INODE64$UNIX2003" )] - pub fn rewinddir(dirp: *mut ::DIR); + pub fn rewinddir(dirp: *mut crate::DIR); pub fn fchmodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - flags: ::c_int, - ) -> ::c_int; - pub fn fchown(fd: ::c_int, owner: ::uid_t, group: ::gid_t) -> ::c_int; + dirfd: c_int, + pathname: *const c_char, + mode: crate::mode_t, + flags: c_int, + ) -> c_int; + pub fn fchown(fd: c_int, owner: crate::uid_t, group: crate::gid_t) -> c_int; pub fn fchownat( - dirfd: ::c_int, - pathname: *const ::c_char, - owner: ::uid_t, - group: ::gid_t, - flags: ::c_int, - ) -> ::c_int; + dirfd: c_int, + pathname: *const c_char, + owner: crate::uid_t, + group: crate::gid_t, + flags: c_int, + ) -> c_int; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), link_name = "fstatat$INODE64" @@ -923,42 +917,33 @@ extern "C" { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "fstatat@FBSD_1.1" )] - pub fn fstatat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut stat, - flags: ::c_int, - ) -> ::c_int; + pub fn fstatat(dirfd: c_int, pathname: *const c_char, buf: *mut stat, flags: c_int) -> c_int; pub fn linkat( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - flags: ::c_int, - ) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + flags: c_int, + ) -> c_int; pub fn renameat( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - ) -> ::c_int; - pub fn symlinkat( - target: *const ::c_char, - newdirfd: ::c_int, - linkpath: *const ::c_char, - ) -> ::c_int; - pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char, flags: ::c_int) -> ::c_int; - - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; - pub fn alarm(seconds: ::c_uint) -> ::c_uint; - pub fn chdir(dir: *const c_char) -> ::c_int; - pub fn fchdir(dirfd: ::c_int) -> ::c_int; - pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + ) -> c_int; + pub fn symlinkat(target: *const c_char, newdirfd: c_int, linkpath: *const c_char) -> c_int; + pub fn unlinkat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int; + + pub fn access(path: *const c_char, amode: c_int) -> c_int; + pub fn alarm(seconds: c_uint) -> c_uint; + pub fn chdir(dir: *const c_char) -> c_int; + pub fn fchdir(dirfd: c_int) -> c_int; + pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "lchown$UNIX2003" )] - pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int; + pub fn lchown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "close$NOCANCEL$UNIX2003" @@ -967,76 +952,73 @@ extern "C" { all(target_os = "macos", target_arch = "x86_64"), link_name = "close$NOCANCEL" )] - pub fn close(fd: ::c_int) -> ::c_int; - pub fn dup(fd: ::c_int) -> ::c_int; - pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; - - pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> ::c_int; - pub fn execle(path: *const ::c_char, arg0: *const ::c_char, ...) -> ::c_int; - pub fn execlp(file: *const ::c_char, arg0: *const ::c_char, ...) -> ::c_int; - pub fn execv(prog: *const c_char, argv: *const *mut c_char) -> ::c_int; - pub fn execve( - prog: *const c_char, - argv: *const *mut c_char, - envp: *const *mut c_char, - ) -> ::c_int; - pub fn execvp(c: *const c_char, argv: *const *mut c_char) -> ::c_int; + pub fn close(fd: c_int) -> c_int; + pub fn dup(fd: c_int) -> c_int; + pub fn dup2(src: c_int, dst: c_int) -> c_int; + + pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> c_int; + pub fn execle(path: *const c_char, arg0: *const c_char, ...) -> c_int; + pub fn execlp(file: *const c_char, arg0: *const c_char, ...) -> c_int; + pub fn execv(prog: *const c_char, argv: *const *mut c_char) -> c_int; + pub fn execve(prog: *const c_char, argv: *const *mut c_char, envp: *const *mut c_char) + -> c_int; + pub fn execvp(c: *const c_char, argv: *const *mut c_char) -> c_int; pub fn fork() -> pid_t; - pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; - pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char; + pub fn fpathconf(filedes: c_int, name: c_int) -> c_long; + pub fn getcwd(buf: *mut c_char, size: size_t) -> *mut c_char; pub fn getegid() -> gid_t; pub fn geteuid() -> uid_t; pub fn getgid() -> gid_t; - pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t) -> ::c_int; + pub fn getgroups(ngroups_max: c_int, groups: *mut gid_t) -> c_int; #[cfg_attr(target_os = "illumos", link_name = "getloginx")] pub fn getlogin() -> *mut c_char; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "getopt$UNIX2003" )] - pub fn getopt(argc: ::c_int, argv: *const *mut c_char, optstr: *const c_char) -> ::c_int; + pub fn getopt(argc: c_int, argv: *const *mut c_char, optstr: *const c_char) -> c_int; pub fn getpgid(pid: pid_t) -> pid_t; pub fn getpgrp() -> pid_t; pub fn getpid() -> pid_t; pub fn getppid() -> pid_t; pub fn getuid() -> uid_t; - pub fn isatty(fd: ::c_int) -> ::c_int; + pub fn isatty(fd: c_int) -> c_int; #[cfg_attr(target_os = "solaris", link_name = "__link_xpg4")] - pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; - pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; - pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; - pub fn pipe(fds: *mut ::c_int) -> ::c_int; - pub fn posix_memalign(memptr: *mut *mut ::c_void, align: ::size_t, size: ::size_t) -> ::c_int; - pub fn aligned_alloc(alignment: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn link(src: *const c_char, dst: *const c_char) -> c_int; + pub fn lseek(fd: c_int, offset: off_t, whence: c_int) -> off_t; + pub fn pathconf(path: *const c_char, name: c_int) -> c_long; + pub fn pipe(fds: *mut c_int) -> c_int; + pub fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int; + pub fn aligned_alloc(alignment: size_t, size: size_t) -> *mut c_void; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "read$UNIX2003" )] - pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) -> ::ssize_t; - pub fn rmdir(path: *const c_char) -> ::c_int; - pub fn seteuid(uid: uid_t) -> ::c_int; - pub fn setegid(gid: gid_t) -> ::c_int; - pub fn setgid(gid: gid_t) -> ::c_int; - pub fn setpgid(pid: pid_t, pgid: pid_t) -> ::c_int; + pub fn read(fd: c_int, buf: *mut c_void, count: size_t) -> ssize_t; + pub fn rmdir(path: *const c_char) -> c_int; + pub fn seteuid(uid: uid_t) -> c_int; + pub fn setegid(gid: gid_t) -> c_int; + pub fn setgid(gid: gid_t) -> c_int; + pub fn setpgid(pid: pid_t, pgid: pid_t) -> c_int; pub fn setsid() -> pid_t; - pub fn setuid(uid: uid_t) -> ::c_int; - pub fn setreuid(ruid: uid_t, euid: uid_t) -> ::c_int; - pub fn setregid(rgid: gid_t, egid: gid_t) -> ::c_int; + pub fn setuid(uid: uid_t) -> c_int; + pub fn setreuid(ruid: uid_t, euid: uid_t) -> c_int; + pub fn setregid(rgid: gid_t, egid: gid_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "sleep$UNIX2003" )] - pub fn sleep(secs: ::c_uint) -> ::c_uint; + pub fn sleep(secs: c_uint) -> c_uint; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "nanosleep$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__nanosleep50")] - pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> ::c_int; - pub fn tcgetpgrp(fd: ::c_int) -> pid_t; - pub fn tcsetpgrp(fd: ::c_int, pgrp: ::pid_t) -> ::c_int; - pub fn ttyname(fd: ::c_int) -> *mut c_char; + pub fn nanosleep(rqtp: *const timespec, rmtp: *mut timespec) -> c_int; + pub fn tcgetpgrp(fd: c_int) -> pid_t; + pub fn tcsetpgrp(fd: c_int, pgrp: crate::pid_t) -> c_int; + pub fn ttyname(fd: c_int) -> *mut c_char; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "ttyname_r$UNIX2003" @@ -1045,74 +1027,74 @@ extern "C" { any(target_os = "illumos", target_os = "solaris"), link_name = "__posix_ttyname_r" )] - pub fn ttyname_r(fd: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; - pub fn unlink(c: *const c_char) -> ::c_int; + pub fn ttyname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + pub fn unlink(c: *const c_char) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "wait$UNIX2003" )] - pub fn wait(status: *mut ::c_int) -> pid_t; + pub fn wait(status: *mut c_int) -> pid_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "waitpid$UNIX2003" )] - pub fn waitpid(pid: pid_t, status: *mut ::c_int, options: ::c_int) -> pid_t; + pub fn waitpid(pid: pid_t, status: *mut c_int, options: c_int) -> pid_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "write$UNIX2003" )] - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t; + pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pread$UNIX2003" )] - pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off_t) -> ::ssize_t; + pub fn pread(fd: c_int, buf: *mut c_void, count: size_t, offset: off_t) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pwrite$UNIX2003" )] - pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t, offset: off_t) -> ::ssize_t; + pub fn pwrite(fd: c_int, buf: *const c_void, count: size_t, offset: off_t) -> ssize_t; pub fn umask(mask: mode_t) -> mode_t; #[cfg_attr(target_os = "netbsd", link_name = "__utime50")] - pub fn utime(file: *const c_char, buf: *const utimbuf) -> ::c_int; + pub fn utime(file: *const c_char, buf: *const utimbuf) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "kill$UNIX2003" )] - pub fn kill(pid: pid_t, sig: ::c_int) -> ::c_int; + pub fn kill(pid: pid_t, sig: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "killpg$UNIX2003" )] - pub fn killpg(pgrp: pid_t, sig: ::c_int) -> ::c_int; + pub fn killpg(pgrp: pid_t, sig: c_int) -> c_int; - pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn munlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn mlockall(flags: ::c_int) -> ::c_int; - pub fn munlockall() -> ::c_int; + pub fn mlock(addr: *const c_void, len: size_t) -> c_int; + pub fn munlock(addr: *const c_void, len: size_t) -> c_int; + pub fn mlockall(flags: c_int) -> c_int; + pub fn munlockall() -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "mmap$UNIX2003" )] pub fn mmap( - addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, + addr: *mut c_void, + len: size_t, + prot: c_int, + flags: c_int, + fd: c_int, offset: off_t, - ) -> *mut ::c_void; + ) -> *mut c_void; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "munmap$UNIX2003" )] - pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int; + pub fn munmap(addr: *mut c_void, len: size_t) -> c_int; - pub fn if_nametoindex(ifname: *const c_char) -> ::c_uint; - pub fn if_indextoname(ifindex: ::c_uint, ifname: *mut ::c_char) -> *mut ::c_char; + pub fn if_nametoindex(ifname: *const c_char) -> c_uint; + pub fn if_indextoname(ifindex: c_uint, ifname: *mut c_char) -> *mut c_char; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -1123,35 +1105,35 @@ extern "C" { all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "lstat@FBSD_1.0" )] - pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "fsync$UNIX2003" )] - pub fn fsync(fd: ::c_int) -> ::c_int; + pub fn fsync(fd: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "setenv$UNIX2003" )] - pub fn setenv(name: *const c_char, val: *const c_char, overwrite: ::c_int) -> ::c_int; + pub fn setenv(name: *const c_char, val: *const c_char, overwrite: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "unsetenv$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__unsetenv13")] - pub fn unsetenv(name: *const c_char) -> ::c_int; + pub fn unsetenv(name: *const c_char) -> c_int; - pub fn symlink(path1: *const c_char, path2: *const c_char) -> ::c_int; + pub fn symlink(path1: *const c_char, path2: *const c_char) -> c_int; - pub fn truncate(path: *const c_char, length: off_t) -> ::c_int; - pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; + pub fn truncate(path: *const c_char, length: off_t) -> c_int; + pub fn ftruncate(fd: c_int, length: off_t) -> c_int; - pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t; + pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t; #[cfg_attr(target_os = "netbsd", link_name = "__getrusage50")] - pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int; + pub fn getrusage(resource: c_int, usage: *mut rusage) -> c_int; #[cfg_attr( any( @@ -1163,65 +1145,65 @@ extern "C" { ), link_name = "realpath$DARWIN_EXTSN" )] - pub fn realpath(pathname: *const ::c_char, resolved: *mut ::c_char) -> *mut ::c_char; + pub fn realpath(pathname: *const c_char, resolved: *mut c_char) -> *mut c_char; #[cfg_attr(target_os = "netbsd", link_name = "__times13")] - pub fn times(buf: *mut ::tms) -> ::clock_t; + pub fn times(buf: *mut crate::tms) -> crate::clock_t; - pub fn pthread_self() -> ::pthread_t; - pub fn pthread_equal(t1: ::pthread_t, t2: ::pthread_t) -> ::c_int; + pub fn pthread_self() -> crate::pthread_t; + pub fn pthread_equal(t1: crate::pthread_t, t2: crate::pthread_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_join$UNIX2003" )] - pub fn pthread_join(native: ::pthread_t, value: *mut *mut ::c_void) -> ::c_int; - pub fn pthread_exit(value: *mut ::c_void) -> !; - pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int; - pub fn pthread_attr_destroy(attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_join(native: crate::pthread_t, value: *mut *mut c_void) -> c_int; + pub fn pthread_exit(value: *mut c_void) -> !; + pub fn pthread_attr_init(attr: *mut crate::pthread_attr_t) -> c_int; + pub fn pthread_attr_destroy(attr: *mut crate::pthread_attr_t) -> c_int; pub fn pthread_attr_getstacksize( - attr: *const ::pthread_attr_t, - stacksize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t, stack_size: ::size_t) -> ::c_int; - pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t, state: ::c_int) -> ::c_int; - pub fn pthread_detach(thread: ::pthread_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + stacksize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setstacksize(attr: *mut crate::pthread_attr_t, stack_size: size_t) + -> c_int; + pub fn pthread_attr_setdetachstate(attr: *mut crate::pthread_attr_t, state: c_int) -> c_int; + pub fn pthread_detach(thread: crate::pthread_t) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__libc_thr_yield")] - pub fn sched_yield() -> ::c_int; + pub fn sched_yield() -> c_int; pub fn pthread_key_create( key: *mut pthread_key_t, - dtor: ::Option, - ) -> ::c_int; - pub fn pthread_key_delete(key: pthread_key_t) -> ::c_int; - pub fn pthread_getspecific(key: pthread_key_t) -> *mut ::c_void; - pub fn pthread_setspecific(key: pthread_key_t, value: *const ::c_void) -> ::c_int; + dtor: Option, + ) -> c_int; + pub fn pthread_key_delete(key: pthread_key_t) -> c_int; + pub fn pthread_getspecific(key: pthread_key_t) -> *mut c_void; + pub fn pthread_setspecific(key: pthread_key_t, value: *const c_void) -> c_int; pub fn pthread_mutex_init( lock: *mut pthread_mutex_t, attr: *const pthread_mutexattr_t, - ) -> ::c_int; - pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> ::c_int; - pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> ::c_int; + ) -> c_int; + pub fn pthread_mutex_destroy(lock: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_lock(lock: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_trylock(lock: *mut pthread_mutex_t) -> c_int; + pub fn pthread_mutex_unlock(lock: *mut pthread_mutex_t) -> c_int; - pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int; + pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_mutexattr_destroy$UNIX2003" )] - pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int; - pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, _type: ::c_int) -> ::c_int; + pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> c_int; + pub fn pthread_mutexattr_settype(attr: *mut pthread_mutexattr_t, _type: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_cond_init$UNIX2003" )] - pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) - -> ::c_int; + pub fn pthread_cond_init(cond: *mut pthread_cond_t, attr: *const pthread_condattr_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_cond_wait$UNIX2003" )] - pub fn pthread_cond_wait(cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_cond_wait(cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_cond_timedwait$UNIX2003" @@ -1229,13 +1211,13 @@ extern "C" { pub fn pthread_cond_timedwait( cond: *mut pthread_cond_t, lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int; - pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> ::c_int; - pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_cond_signal(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_cond_broadcast(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int; + pub fn pthread_condattr_init(attr: *mut pthread_condattr_t) -> c_int; + pub fn pthread_condattr_destroy(attr: *mut pthread_condattr_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_init$UNIX2003" @@ -1243,39 +1225,39 @@ extern "C" { pub fn pthread_rwlock_init( lock: *mut pthread_rwlock_t, attr: *const pthread_rwlockattr_t, - ) -> ::c_int; + ) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_destroy$UNIX2003" )] - pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_destroy(lock: *mut pthread_rwlock_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_rdlock$UNIX2003" )] - pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_rdlock(lock: *mut pthread_rwlock_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_tryrdlock$UNIX2003" )] - pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_tryrdlock(lock: *mut pthread_rwlock_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_wrlock$UNIX2003" )] - pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_wrlock(lock: *mut pthread_rwlock_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_trywrlock$UNIX2003" )] - pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_trywrlock(lock: *mut pthread_rwlock_t) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "pthread_rwlock_unlock$UNIX2003" )] - pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> ::c_int; - pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> ::c_int; - pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t) -> ::c_int; + pub fn pthread_rwlock_unlock(lock: *mut pthread_rwlock_t) -> c_int; + pub fn pthread_rwlockattr_init(attr: *mut pthread_rwlockattr_t) -> c_int; + pub fn pthread_rwlockattr_destroy(attr: *mut pthread_rwlockattr_t) -> c_int; #[cfg_attr( any(target_os = "illumos", target_os = "solaris"), @@ -1283,20 +1265,20 @@ extern "C" { )] #[cfg_attr(target_os = "espidf", link_name = "lwip_getsockopt")] pub fn getsockopt( - sockfd: ::c_int, - level: ::c_int, - optname: ::c_int, - optval: *mut ::c_void, - optlen: *mut ::socklen_t, - ) -> ::c_int; - pub fn raise(signum: ::c_int) -> ::c_int; + sockfd: c_int, + level: c_int, + optname: c_int, + optval: *mut c_void, + optlen: *mut crate::socklen_t, + ) -> c_int; + pub fn raise(signum: c_int) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__utimes50")] - pub fn utimes(filename: *const ::c_char, times: *const ::timeval) -> ::c_int; - pub fn dlopen(filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; - pub fn dlerror() -> *mut ::c_char; - pub fn dlsym(handle: *mut ::c_void, symbol: *const ::c_char) -> *mut ::c_void; - pub fn dlclose(handle: *mut ::c_void) -> ::c_int; + pub fn utimes(filename: *const c_char, times: *const crate::timeval) -> c_int; + pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void; + pub fn dlerror() -> *mut c_char; + pub fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void; + pub fn dlclose(handle: *mut c_void) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr( @@ -1309,12 +1291,12 @@ extern "C" { service: *const c_char, hints: *const addrinfo, res: *mut *mut addrinfo, - ) -> ::c_int; + ) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr(target_os = "espidf", link_name = "lwip_freeaddrinfo")] pub fn freeaddrinfo(res: *mut addrinfo); - pub fn hstrerror(errcode: ::c_int) -> *const ::c_char; - pub fn gai_strerror(errcode: ::c_int) -> *const ::c_char; + pub fn hstrerror(errcode: c_int) -> *const c_char; + pub fn gai_strerror(errcode: c_int) -> *const c_char; #[cfg_attr( any( all( @@ -1337,7 +1319,7 @@ extern "C" { ), link_name = "res_9_init" )] - pub fn res_init() -> ::c_int; + pub fn res_init() -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__gmtime_r50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] @@ -1370,55 +1352,55 @@ extern "C" { #[cfg_attr(target_os = "netbsd", link_name = "__difftime50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // FIXME: for `time_t` - pub fn difftime(time1: time_t, time0: time_t) -> ::c_double; + pub fn difftime(time1: time_t, time0: time_t) -> c_double; #[cfg_attr(target_os = "netbsd", link_name = "__timegm50")] #[cfg_attr(any(target_env = "musl", target_env = "ohos"), allow(deprecated))] // FIXME: for `time_t` - pub fn timegm(tm: *mut ::tm) -> time_t; + pub fn timegm(tm: *mut crate::tm) -> time_t; #[cfg_attr(target_os = "netbsd", link_name = "__mknod50")] #[cfg_attr( all(target_os = "freebsd", any(freebsd11, freebsd10)), link_name = "mknod@FBSD_1.0" )] - pub fn mknod(pathname: *const ::c_char, mode: ::mode_t, dev: ::dev_t) -> ::c_int; - pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int; + pub fn mknod(pathname: *const c_char, mode: crate::mode_t, dev: crate::dev_t) -> c_int; + pub fn gethostname(name: *mut c_char, len: size_t) -> c_int; pub fn endservent(); - pub fn getservbyname(name: *const ::c_char, proto: *const ::c_char) -> *mut servent; - pub fn getservbyport(port: ::c_int, proto: *const ::c_char) -> *mut servent; + pub fn getservbyname(name: *const c_char, proto: *const c_char) -> *mut servent; + pub fn getservbyport(port: c_int, proto: *const c_char) -> *mut servent; pub fn getservent() -> *mut servent; - pub fn setservent(stayopen: ::c_int); - pub fn getprotobyname(name: *const ::c_char) -> *mut protoent; - pub fn getprotobynumber(proto: ::c_int) -> *mut protoent; - pub fn chroot(name: *const ::c_char) -> ::c_int; + pub fn setservent(stayopen: c_int); + pub fn getprotobyname(name: *const c_char) -> *mut protoent; + pub fn getprotobynumber(proto: c_int) -> *mut protoent; + pub fn chroot(name: *const c_char) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "usleep$UNIX2003" )] - pub fn usleep(secs: ::c_uint) -> ::c_int; + pub fn usleep(secs: c_uint) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "send$UNIX2003" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_send")] - pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; + pub fn send(socket: c_int, buf: *const c_void, len: size_t, flags: c_int) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "recv$UNIX2003" )] #[cfg_attr(target_os = "espidf", link_name = "lwip_recv")] - pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; + pub fn recv(socket: c_int, buf: *mut c_void, len: size_t, flags: c_int) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "putenv$UNIX2003" )] #[cfg_attr(target_os = "netbsd", link_name = "__putenv50")] - pub fn putenv(string: *mut c_char) -> ::c_int; + pub fn putenv(string: *mut c_char) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "poll$UNIX2003" )] - pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: c_int) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), link_name = "select$1050" @@ -1429,89 +1411,89 @@ extern "C" { )] #[cfg_attr(target_os = "netbsd", link_name = "__select50")] pub fn select( - nfds: ::c_int, + nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *mut timeval, - ) -> ::c_int; + ) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__setlocale50")] - pub fn setlocale(category: ::c_int, locale: *const ::c_char) -> *mut ::c_char; + pub fn setlocale(category: c_int, locale: *const c_char) -> *mut c_char; pub fn localeconv() -> *mut lconv; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "sem_wait$UNIX2003" )] - pub fn sem_wait(sem: *mut sem_t) -> ::c_int; - pub fn sem_trywait(sem: *mut sem_t) -> ::c_int; - pub fn sem_post(sem: *mut sem_t) -> ::c_int; - pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> ::c_int; - pub fn fstatvfs(fd: ::c_int, buf: *mut statvfs) -> ::c_int; + pub fn sem_wait(sem: *mut sem_t) -> c_int; + pub fn sem_trywait(sem: *mut sem_t) -> c_int; + pub fn sem_post(sem: *mut sem_t) -> c_int; + pub fn statvfs(path: *const c_char, buf: *mut statvfs) -> c_int; + pub fn fstatvfs(fd: c_int, buf: *mut statvfs) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigemptyset14")] - pub fn sigemptyset(set: *mut sigset_t) -> ::c_int; + pub fn sigemptyset(set: *mut sigset_t) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigaddset14")] - pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; + pub fn sigaddset(set: *mut sigset_t, signum: c_int) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigfillset14")] - pub fn sigfillset(set: *mut sigset_t) -> ::c_int; + pub fn sigfillset(set: *mut sigset_t) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigdelset14")] - pub fn sigdelset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; + pub fn sigdelset(set: *mut sigset_t, signum: c_int) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigismember14")] - pub fn sigismember(set: *const sigset_t, signum: ::c_int) -> ::c_int; + pub fn sigismember(set: *const sigset_t, signum: c_int) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigprocmask14")] - pub fn sigprocmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; + pub fn sigprocmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigpending14")] - pub fn sigpending(set: *mut sigset_t) -> ::c_int; + pub fn sigpending(set: *mut sigset_t) -> c_int; #[cfg_attr(target_os = "solaris", link_name = "__sysconf_xpg7")] - pub fn sysconf(name: ::c_int) -> ::c_long; + pub fn sysconf(name: c_int) -> c_long; - pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn mkfifo(path: *const c_char, mode: mode_t) -> c_int; - pub fn fseeko(stream: *mut ::FILE, offset: ::off_t, whence: ::c_int) -> ::c_int; - pub fn ftello(stream: *mut ::FILE) -> ::off_t; + pub fn fseeko(stream: *mut crate::FILE, offset: off_t, whence: c_int) -> c_int; + pub fn ftello(stream: *mut crate::FILE) -> off_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "tcdrain$UNIX2003" )] - pub fn tcdrain(fd: ::c_int) -> ::c_int; - pub fn cfgetispeed(termios: *const ::termios) -> ::speed_t; - pub fn cfgetospeed(termios: *const ::termios) -> ::speed_t; - pub fn cfsetispeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn cfsetospeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; - pub fn tcgetattr(fd: ::c_int, termios: *mut ::termios) -> ::c_int; - pub fn tcsetattr(fd: ::c_int, optional_actions: ::c_int, termios: *const ::termios) -> ::c_int; - pub fn tcflow(fd: ::c_int, action: ::c_int) -> ::c_int; - pub fn tcflush(fd: ::c_int, action: ::c_int) -> ::c_int; - pub fn tcgetsid(fd: ::c_int) -> ::pid_t; - pub fn tcsendbreak(fd: ::c_int, duration: ::c_int) -> ::c_int; - pub fn mkstemp(template: *mut ::c_char) -> ::c_int; - pub fn mkdtemp(template: *mut ::c_char) -> *mut ::c_char; - - pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char; - - pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int); + pub fn tcdrain(fd: c_int) -> c_int; + pub fn cfgetispeed(termios: *const crate::termios) -> crate::speed_t; + pub fn cfgetospeed(termios: *const crate::termios) -> crate::speed_t; + pub fn cfsetispeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; + pub fn cfsetospeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; + pub fn tcgetattr(fd: c_int, termios: *mut crate::termios) -> c_int; + pub fn tcsetattr(fd: c_int, optional_actions: c_int, termios: *const crate::termios) -> c_int; + pub fn tcflow(fd: c_int, action: c_int) -> c_int; + pub fn tcflush(fd: c_int, action: c_int) -> c_int; + pub fn tcgetsid(fd: c_int) -> crate::pid_t; + pub fn tcsendbreak(fd: c_int, duration: c_int) -> c_int; + pub fn mkstemp(template: *mut c_char) -> c_int; + pub fn mkdtemp(template: *mut c_char) -> *mut c_char; + + pub fn tmpnam(ptr: *mut c_char) -> *mut c_char; + + pub fn openlog(ident: *const c_char, logopt: c_int, facility: c_int); pub fn closelog(); - pub fn setlogmask(maskpri: ::c_int) -> ::c_int; + pub fn setlogmask(maskpri: c_int) -> c_int; #[cfg_attr(target_os = "macos", link_name = "syslog$DARWIN_EXTSN")] - pub fn syslog(priority: ::c_int, message: *const ::c_char, ...); + pub fn syslog(priority: c_int, message: *const c_char, ...); #[cfg_attr( all(target_os = "macos", target_arch = "x86"), link_name = "nice$UNIX2003" )] - pub fn nice(incr: ::c_int) -> ::c_int; + pub fn nice(incr: c_int) -> c_int; - pub fn grantpt(fd: ::c_int) -> ::c_int; - pub fn posix_openpt(flags: ::c_int) -> ::c_int; - pub fn ptsname(fd: ::c_int) -> *mut ::c_char; - pub fn unlockpt(fd: ::c_int) -> ::c_int; + pub fn grantpt(fd: c_int) -> c_int; + pub fn posix_openpt(flags: c_int) -> c_int; + pub fn ptsname(fd: c_int) -> *mut c_char; + pub fn unlockpt(fd: c_int) -> c_int; pub fn strcasestr(cs: *const c_char, ct: *const c_char) -> *mut c_char; pub fn getline(lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t; - pub fn lockf(fd: ::c_int, cmd: ::c_int, len: ::off_t) -> ::c_int; + pub fn lockf(fd: c_int, cmd: c_int, len: off_t) -> c_int; } @@ -1541,11 +1523,11 @@ cfg_if! { target_os = "solaris" )))] { extern "C" { - pub fn adjtime(delta: *const timeval, olddelta: *mut timeval) -> ::c_int; + pub fn adjtime(delta: *const timeval, olddelta: *mut timeval) -> c_int; } } else if #[cfg(target_os = "solaris")] { extern "C" { - pub fn adjtime(delta: *mut timeval, olddelta: *mut timeval) -> ::c_int; + pub fn adjtime(delta: *mut timeval, olddelta: *mut timeval) -> c_int; } } } @@ -1570,7 +1552,7 @@ cfg_if! { link_name = "confstr$UNIX2003" )] #[cfg_attr(target_os = "solaris", link_name = "__confstr_xpg7")] - pub fn confstr(name: ::c_int, buf: *mut ::c_char, len: ::size_t) -> ::size_t; + pub fn confstr(name: c_int, buf: *mut c_char, len: size_t) -> size_t; } } } @@ -1578,7 +1560,7 @@ cfg_if! { cfg_if! { if #[cfg(not(target_os = "aix"))] { extern "C" { - pub fn dladdr(addr: *const ::c_void, info: *mut Dl_info) -> ::c_int; + pub fn dladdr(addr: *const c_void, info: *mut Dl_info) -> c_int; } } } @@ -1586,7 +1568,7 @@ cfg_if! { cfg_if! { if #[cfg(not(target_os = "solaris"))] { extern "C" { - pub fn flock(fd: ::c_int, operation: ::c_int) -> ::c_int; + pub fn flock(fd: c_int, operation: c_int) -> c_int; } } } @@ -1607,15 +1589,10 @@ cfg_if! { all(target_os = "macos", target_arch = "x86"), link_name = "pause$UNIX2003" )] - pub fn pause() -> ::c_int; + pub fn pause() -> c_int; - pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - pub fn openat( - dirfd: ::c_int, - pathname: *const ::c_char, - flags: ::c_int, - ... - ) -> ::c_int; + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), @@ -1625,7 +1602,7 @@ cfg_if! { all(target_os = "macos", target_arch = "x86"), link_name = "fdopendir$INODE64$UNIX2003" )] - pub fn fdopendir(fd: ::c_int) -> *mut ::DIR; + pub fn fdopendir(fd: c_int) -> *mut crate::DIR; #[cfg_attr( all(target_os = "macos", not(target_arch = "aarch64")), @@ -1644,10 +1621,10 @@ cfg_if! { /// https://docs.oracle.com/cd/E36784_01/html/E36873/libc-3lib.html /// https://www.unix.com/man-page/opensolaris/3LIB/libc/ pub fn readdir_r( - dirp: *mut ::DIR, - entry: *mut ::dirent, - result: *mut *mut ::dirent, - ) -> ::c_int; + dirp: *mut crate::DIR, + entry: *mut crate::dirent, + result: *mut *mut crate::dirent, + ) -> c_int; } } } @@ -1656,44 +1633,38 @@ cfg_if! { if #[cfg(target_os = "nto")] { extern "C" { pub fn readlinkat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut ::c_char, - bufsiz: ::size_t, - ) -> ::c_int; - pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: ::size_t) -> ::c_int; + dirfd: c_int, + pathname: *const c_char, + buf: *mut c_char, + bufsiz: size_t, + ) -> c_int; + pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: size_t) -> c_int; pub fn pselect( - nfds: ::c_int, + nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *mut timespec, sigmask: *const sigset_t, - ) -> ::c_int; - pub fn sigaction( - signum: ::c_int, - act: *const sigaction, - oldact: *mut sigaction, - ) -> ::c_int; + ) -> c_int; + pub fn sigaction(signum: c_int, act: *const sigaction, oldact: *mut sigaction) + -> c_int; } } else { extern "C" { pub fn readlinkat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut ::c_char, - bufsiz: ::size_t, - ) -> ::ssize_t; + dirfd: c_int, + pathname: *const c_char, + buf: *mut c_char, + bufsiz: size_t, + ) -> ssize_t; pub fn fmemopen(buf: *mut c_void, size: size_t, mode: *const c_char) -> *mut FILE; pub fn open_memstream(ptr: *mut *mut c_char, sizeloc: *mut size_t) -> *mut FILE; pub fn atexit(cb: extern "C" fn()) -> c_int; #[cfg_attr(target_os = "netbsd", link_name = "__sigaction14")] - pub fn sigaction( - signum: ::c_int, - act: *const sigaction, - oldact: *mut sigaction, - ) -> ::c_int; - pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: ::size_t) -> ::ssize_t; + pub fn sigaction(signum: c_int, act: *const sigaction, oldact: *mut sigaction) + -> c_int; + pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: size_t) -> ssize_t; #[cfg_attr( all(target_os = "macos", target_arch = "x86_64"), link_name = "pselect$1050" @@ -1704,13 +1675,13 @@ cfg_if! { )] #[cfg_attr(target_os = "netbsd", link_name = "__pselect50")] pub fn pselect( - nfds: ::c_int, + nfds: c_int, readfds: *mut fd_set, writefds: *mut fd_set, errorfds: *mut fd_set, timeout: *const timespec, sigmask: *const sigset_t, - ) -> ::c_int; + ) -> c_int; } } } @@ -1722,8 +1693,8 @@ cfg_if! { target_os = "nto", )))] { extern "C" { - pub fn cfmakeraw(termios: *mut ::termios); - pub fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int; + pub fn cfmakeraw(termios: *mut crate::termios); + pub fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int; } } } diff --git a/src/unix/newlib/aarch64/mod.rs b/src/unix/newlib/aarch64/mod.rs index 2b4713c9a364e..7efbdf780db3f 100644 --- a/src/unix/newlib/aarch64/mod.rs +++ b/src/unix/newlib/aarch64/mod.rs @@ -1,4 +1,6 @@ -pub type clock_t = ::c_long; +use crate::{c_int, c_short}; + +pub type clock_t = c_long; pub type c_char = u8; pub type wchar_t = u32; @@ -9,7 +11,7 @@ s! { pub struct sockaddr { pub sa_len: u8, pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_in6 { @@ -26,29 +28,29 @@ s! { pub sin_family: ::sa_family_t, pub sin_port: ::in_port_t, pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_zero: [c_char; 8], } } -pub const AF_INET6: ::c_int = 23; +pub const AF_INET6: c_int = 23; -pub const FIONBIO: ::c_ulong = 1; +pub const FIONBIO: c_ulong = 1; -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLOUT: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLHUP: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; +pub const POLLIN: c_short = 0x1; +pub const POLLPRI: c_short = 0x2; +pub const POLLOUT: c_short = 0x4; +pub const POLLERR: c_short = 0x8; +pub const POLLHUP: c_short = 0x10; +pub const POLLNVAL: c_short = 0x20; -pub const SOL_SOCKET: ::c_int = 65535; +pub const SOL_SOCKET: c_int = 65535; -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTWAIT: ::c_int = 4; -pub const MSG_DONTROUTE: ::c_int = 0; -pub const MSG_WAITALL: ::c_int = 0; -pub const MSG_MORE: ::c_int = 0; -pub const MSG_NOSIGNAL: ::c_int = 0; +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_DONTWAIT: c_int = 4; +pub const MSG_DONTROUTE: c_int = 0; +pub const MSG_WAITALL: c_int = 0; +pub const MSG_MORE: c_int = 0; +pub const MSG_NOSIGNAL: c_int = 0; pub use crate::unix::newlib::generic::{dirent, sigset_t, stat}; diff --git a/src/unix/newlib/arm/mod.rs b/src/unix/newlib/arm/mod.rs index 23b75977e63ec..558a70da6b79b 100644 --- a/src/unix/newlib/arm/mod.rs +++ b/src/unix/newlib/arm/mod.rs @@ -1,4 +1,6 @@ -pub type clock_t = ::c_long; +use crate::{c_int, c_short}; + +pub type clock_t = c_long; pub type c_char = u8; pub type wchar_t = u32; @@ -7,50 +9,50 @@ pub type c_ulong = u32; s! { pub struct sockaddr { - pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_family: crate::sa_family_t, + pub sa_data: [c_char; 14], } pub struct sockaddr_in6 { - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct sockaddr_in { - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [u8; 8], } pub struct sockaddr_storage { - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, pub __ss_padding: [u8; 26], } } -pub const AF_INET6: ::c_int = 23; +pub const AF_INET6: c_int = 23; -pub const FIONBIO: ::c_ulong = 1; +pub const FIONBIO: c_ulong = 1; -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLHUP: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLOUT: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; +pub const POLLIN: c_short = 0x1; +pub const POLLPRI: c_short = 0x2; +pub const POLLHUP: c_short = 0x4; +pub const POLLERR: c_short = 0x8; +pub const POLLOUT: c_short = 0x10; +pub const POLLNVAL: c_short = 0x20; -pub const SOL_SOCKET: ::c_int = 65535; +pub const SOL_SOCKET: c_int = 65535; -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTWAIT: ::c_int = 4; -pub const MSG_DONTROUTE: ::c_int = 0; -pub const MSG_WAITALL: ::c_int = 0; -pub const MSG_MORE: ::c_int = 0; -pub const MSG_NOSIGNAL: ::c_int = 0; +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_DONTWAIT: c_int = 4; +pub const MSG_DONTROUTE: c_int = 0; +pub const MSG_WAITALL: c_int = 0; +pub const MSG_MORE: c_int = 0; +pub const MSG_NOSIGNAL: c_int = 0; pub use crate::unix::newlib::generic::{dirent, sigset_t, stat}; diff --git a/src/unix/newlib/espidf/mod.rs b/src/unix/newlib/espidf/mod.rs index 3a4ce49c5c217..c33d6ba4bc05a 100644 --- a/src/unix/newlib/espidf/mod.rs +++ b/src/unix/newlib/espidf/mod.rs @@ -1,4 +1,6 @@ -pub type clock_t = ::c_ulong; +use crate::{c_int, c_short, c_uint, c_void, size_t, ssize_t}; + +pub type clock_t = c_ulong; pub type c_char = i8; pub type wchar_t = u32; @@ -7,116 +9,116 @@ pub type c_ulong = u32; s! { pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct sockaddr_un { - pub sun_family: ::sa_family_t, - pub sun_path: [::c_char; 108], + pub sun_family: crate::sa_family_t, + pub sun_path: [c_char; 108], } pub struct sockaddr { pub sa_len: u8, - pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_family: crate::sa_family_t, + pub sa_data: [c_char; 14], } pub struct sockaddr_in6 { pub sin6_len: u8, - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } pub struct sockaddr_storage { pub s2_len: u8, - pub ss_family: ::sa_family_t, - pub s2_data1: [::c_char; 2], + pub ss_family: crate::sa_family_t, + pub s2_data1: [c_char; 2], pub s2_data2: [u32; 3], pub s2_data3: [u32; 3], } } -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET6: ::c_int = 10; - -pub const FIONBIO: ::c_ulong = 2147772030; - -pub const POLLIN: ::c_short = 1 << 0; -pub const POLLRDNORM: ::c_short = 1 << 1; -pub const POLLRDBAND: ::c_short = 1 << 2; -pub const POLLPRI: ::c_short = POLLRDBAND; -pub const POLLOUT: ::c_short = 1 << 3; -pub const POLLWRNORM: ::c_short = POLLOUT; -pub const POLLWRBAND: ::c_short = 1 << 4; -pub const POLLERR: ::c_short = 1 << 5; -pub const POLLHUP: ::c_short = 1 << 6; - -pub const SOL_SOCKET: ::c_int = 0xfff; - -pub const MSG_OOB: ::c_int = 0x04; -pub const MSG_PEEK: ::c_int = 0x01; -pub const MSG_DONTWAIT: ::c_int = 0x08; -pub const MSG_DONTROUTE: ::c_int = 0x4; -pub const MSG_WAITALL: ::c_int = 0x02; -pub const MSG_MORE: ::c_int = 0x10; -pub const MSG_NOSIGNAL: ::c_int = 0x20; -pub const MSG_TRUNC: ::c_int = 0x04; -pub const MSG_CTRUNC: ::c_int = 0x08; -pub const MSG_EOR: ::c_int = 0x08; - -pub const PTHREAD_STACK_MIN: ::size_t = 768; - -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGILL: ::c_int = 4; -pub const SIGINT: ::c_int = 2; -pub const SIGSEGV: ::c_int = 11; -pub const SIGTERM: ::c_int = 15; -pub const SIGHUP: ::c_int = 1; -pub const SIGQUIT: ::c_int = 3; -pub const NSIG: ::size_t = 32; +pub const AF_UNIX: c_int = 1; +pub const AF_INET6: c_int = 10; + +pub const FIONBIO: c_ulong = 2147772030; + +pub const POLLIN: c_short = 1 << 0; +pub const POLLRDNORM: c_short = 1 << 1; +pub const POLLRDBAND: c_short = 1 << 2; +pub const POLLPRI: c_short = POLLRDBAND; +pub const POLLOUT: c_short = 1 << 3; +pub const POLLWRNORM: c_short = POLLOUT; +pub const POLLWRBAND: c_short = 1 << 4; +pub const POLLERR: c_short = 1 << 5; +pub const POLLHUP: c_short = 1 << 6; + +pub const SOL_SOCKET: c_int = 0xfff; + +pub const MSG_OOB: c_int = 0x04; +pub const MSG_PEEK: c_int = 0x01; +pub const MSG_DONTWAIT: c_int = 0x08; +pub const MSG_DONTROUTE: c_int = 0x4; +pub const MSG_WAITALL: c_int = 0x02; +pub const MSG_MORE: c_int = 0x10; +pub const MSG_NOSIGNAL: c_int = 0x20; +pub const MSG_TRUNC: c_int = 0x04; +pub const MSG_CTRUNC: c_int = 0x08; +pub const MSG_EOR: c_int = 0x08; + +pub const PTHREAD_STACK_MIN: size_t = 768; + +pub const SIGABRT: c_int = 6; +pub const SIGFPE: c_int = 8; +pub const SIGILL: c_int = 4; +pub const SIGINT: c_int = 2; +pub const SIGSEGV: c_int = 11; +pub const SIGTERM: c_int = 15; +pub const SIGHUP: c_int = 1; +pub const SIGQUIT: c_int = 3; +pub const NSIG: size_t = 32; extern "C" { pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(_: *mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(_: *mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; - pub fn gethostname(name: *mut ::c_char, namelen: ::ssize_t); + pub fn gethostname(name: *mut c_char, namelen: ssize_t); #[link_name = "lwip_sendmsg"] - pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn sendmsg(s: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; #[link_name = "lwip_recvmsg"] - pub fn recvmsg(s: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn recvmsg(s: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; - pub fn eventfd(initval: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn eventfd(initval: c_uint, flags: c_int) -> c_int; } pub use crate::unix::newlib::generic::{dirent, sigset_t, stat}; diff --git a/src/unix/newlib/generic.rs b/src/unix/newlib/generic.rs index d716dec19f0f8..fe2216cee356a 100644 --- a/src/unix/newlib/generic.rs +++ b/src/unix/newlib/generic.rs @@ -1,36 +1,38 @@ //! Common types used by most newlib platforms +use crate::{c_char, c_long, c_uchar, off_t}; + s! { pub struct sigset_t { #[cfg(target_os = "horizon")] - __val: [::c_ulong; 16], + __val: [crate::c_ulong; 16], #[cfg(not(target_os = "horizon"))] __val: u32, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_spare1: ::c_long, - pub st_mtime: ::time_t, - pub st_spare2: ::c_long, - pub st_ctime: ::time_t, - pub st_spare3: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_spare4: [::c_long; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_spare1: c_long, + pub st_mtime: crate::time_t, + pub st_spare2: c_long, + pub st_ctime: crate::time_t, + pub st_spare3: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_spare4: [c_long; 2usize], } pub struct dirent { - pub d_ino: ::ino_t, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256usize], + pub d_ino: crate::ino_t, + pub d_type: c_uchar, + pub d_name: [c_char; 256usize], } } diff --git a/src/unix/newlib/horizon/mod.rs b/src/unix/newlib/horizon/mod.rs index 97e0b18f6fb71..055e81fe70767 100644 --- a/src/unix/newlib/horizon/mod.rs +++ b/src/unix/newlib/horizon/mod.rs @@ -1,279 +1,283 @@ //! ARMv6K Nintendo 3DS C Newlib definitions +use crate::{ + c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, off_t, size_t, ssize_t, +}; + pub type c_char = u8; pub type c_long = i32; pub type c_ulong = u32; -pub type wchar_t = ::c_uint; +pub type wchar_t = c_uint; -pub type u_register_t = ::c_uint; -pub type u_char = ::c_uchar; -pub type u_short = ::c_ushort; -pub type u_int = ::c_uint; +pub type u_register_t = c_uint; +pub type u_char = c_uchar; +pub type u_short = c_ushort; +pub type u_int = c_uint; pub type u_long = c_ulong; -pub type ushort = ::c_ushort; -pub type uint = ::c_uint; +pub type ushort = c_ushort; +pub type uint = c_uint; pub type ulong = c_ulong; pub type clock_t = c_ulong; pub type daddr_t = c_long; pub type caddr_t = *mut c_char; -pub type sbintime_t = ::c_longlong; -pub type sigset_t = ::c_ulong; +pub type sbintime_t = c_longlong; +pub type sigset_t = c_ulong; s! { pub struct hostent { - pub h_name: *mut ::c_char, - pub h_aliases: *mut *mut ::c_char, + pub h_name: *mut c_char, + pub h_aliases: *mut *mut c_char, pub h_addrtype: u16, pub h_length: u16, - pub h_addr_list: *mut *mut ::c_char, + pub h_addr_list: *mut *mut c_char, } pub struct sockaddr { - pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 26usize], + pub sa_family: crate::sa_family_t, + pub sa_data: [c_char; 26usize], } pub struct sockaddr_storage { - pub ss_family: ::sa_family_t, - pub __ss_padding: [::c_char; 26usize], + pub ss_family: crate::sa_family_t, + pub __ss_padding: [c_char; 26usize], } pub struct sockaddr_in { - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } pub struct sockaddr_in6 { - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct sockaddr_un { - pub sun_len: ::c_uchar, - pub sun_family: ::sa_family_t, - pub sun_path: [::c_char; 104usize], + pub sun_len: c_uchar, + pub sun_family: crate::sa_family_t, + pub sun_path: [c_char; 104usize], } pub struct sched_param { - pub sched_priority: ::c_int, + pub sched_priority: c_int, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atim: ::timespec, - pub st_mtim: ::timespec, - pub st_ctim: ::timespec, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_spare4: [::c_long; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atim: crate::timespec, + pub st_mtim: crate::timespec, + pub st_ctim: crate::timespec, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_spare4: [c_long; 2usize], } } -pub const SIGEV_NONE: ::c_int = 1; -pub const SIGEV_SIGNAL: ::c_int = 2; -pub const SIGEV_THREAD: ::c_int = 3; -pub const SA_NOCLDSTOP: ::c_int = 1; -pub const MINSIGSTKSZ: ::c_int = 2048; -pub const SIGSTKSZ: ::c_int = 8192; -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 2; -pub const SIG_SETMASK: ::c_int = 0; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGTRAP: ::c_int = 5; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGBUS: ::c_int = 10; -pub const SIGSEGV: ::c_int = 11; -pub const SIGSYS: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGURG: ::c_int = 16; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGCONT: ::c_int = 19; -pub const SIGCHLD: ::c_int = 20; -pub const SIGCLD: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGIO: ::c_int = 23; -pub const SIGPOLL: ::c_int = 23; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGLOST: ::c_int = 29; -pub const SIGUSR1: ::c_int = 30; -pub const SIGUSR2: ::c_int = 31; -pub const NSIG: ::c_int = 32; -pub const CLOCK_ENABLED: ::c_uint = 1; -pub const CLOCK_DISABLED: ::c_uint = 0; -pub const CLOCK_ALLOWED: ::c_uint = 1; -pub const CLOCK_DISALLOWED: ::c_uint = 0; -pub const TIMER_ABSTIME: ::c_uint = 4; -pub const SOL_SOCKET: ::c_int = 65535; -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_DONTWAIT: ::c_int = 4; -pub const MSG_DONTROUTE: ::c_int = 0; -pub const MSG_WAITALL: ::c_int = 0; -pub const MSG_MORE: ::c_int = 0; -pub const MSG_NOSIGNAL: ::c_int = 0; -pub const SOL_CONFIG: ::c_uint = 65534; - -pub const _SC_PAGESIZE: ::c_int = 8; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 51; - -pub const PTHREAD_STACK_MIN: ::size_t = 4096; -pub const WNOHANG: ::c_int = 1; - -pub const POLLIN: ::c_short = 0x0001; -pub const POLLPRI: ::c_short = 0x0002; -pub const POLLOUT: ::c_short = 0x0004; -pub const POLLRDNORM: ::c_short = 0x0040; -pub const POLLWRNORM: ::c_short = POLLOUT; -pub const POLLRDBAND: ::c_short = 0x0080; -pub const POLLWRBAND: ::c_short = 0x0100; -pub const POLLERR: ::c_short = 0x0008; -pub const POLLHUP: ::c_short = 0x0010; -pub const POLLNVAL: ::c_short = 0x0020; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_BADHINTS: ::c_int = 12; -pub const EAI_PROTOCOL: ::c_int = 13; -pub const EAI_OVERFLOW: ::c_int = 14; -pub const EAI_MAX: ::c_int = 15; - -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET6: ::c_int = 23; - -pub const FIONBIO: ::c_ulong = 1; - -pub const RTLD_DEFAULT: *mut ::c_void = 0 as *mut ::c_void; +pub const SIGEV_NONE: c_int = 1; +pub const SIGEV_SIGNAL: c_int = 2; +pub const SIGEV_THREAD: c_int = 3; +pub const SA_NOCLDSTOP: c_int = 1; +pub const MINSIGSTKSZ: c_int = 2048; +pub const SIGSTKSZ: c_int = 8192; +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 2; +pub const SIG_SETMASK: c_int = 0; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGTRAP: c_int = 5; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGBUS: c_int = 10; +pub const SIGSEGV: c_int = 11; +pub const SIGSYS: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGURG: c_int = 16; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGCONT: c_int = 19; +pub const SIGCHLD: c_int = 20; +pub const SIGCLD: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGIO: c_int = 23; +pub const SIGPOLL: c_int = 23; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGLOST: c_int = 29; +pub const SIGUSR1: c_int = 30; +pub const SIGUSR2: c_int = 31; +pub const NSIG: c_int = 32; +pub const CLOCK_ENABLED: c_uint = 1; +pub const CLOCK_DISABLED: c_uint = 0; +pub const CLOCK_ALLOWED: c_uint = 1; +pub const CLOCK_DISALLOWED: c_uint = 0; +pub const TIMER_ABSTIME: c_uint = 4; +pub const SOL_SOCKET: c_int = 65535; +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_DONTWAIT: c_int = 4; +pub const MSG_DONTROUTE: c_int = 0; +pub const MSG_WAITALL: c_int = 0; +pub const MSG_MORE: c_int = 0; +pub const MSG_NOSIGNAL: c_int = 0; +pub const SOL_CONFIG: c_uint = 65534; + +pub const _SC_PAGESIZE: c_int = 8; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 51; + +pub const PTHREAD_STACK_MIN: size_t = 4096; +pub const WNOHANG: c_int = 1; + +pub const POLLIN: c_short = 0x0001; +pub const POLLPRI: c_short = 0x0002; +pub const POLLOUT: c_short = 0x0004; +pub const POLLRDNORM: c_short = 0x0040; +pub const POLLWRNORM: c_short = POLLOUT; +pub const POLLRDBAND: c_short = 0x0080; +pub const POLLWRBAND: c_short = 0x0100; +pub const POLLERR: c_short = 0x0008; +pub const POLLHUP: c_short = 0x0010; +pub const POLLNVAL: c_short = 0x0020; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_BADHINTS: c_int = 12; +pub const EAI_PROTOCOL: c_int = 13; +pub const EAI_OVERFLOW: c_int = 14; +pub const EAI_MAX: c_int = 15; + +pub const AF_UNIX: c_int = 1; +pub const AF_INET6: c_int = 23; + +pub const FIONBIO: c_ulong = 1; + +pub const RTLD_DEFAULT: *mut c_void = 0 as *mut c_void; // For pthread get/setschedparam -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; // For getrandom() -pub const GRND_NONBLOCK: ::c_uint = 0x1; -pub const GRND_RANDOM: ::c_uint = 0x2; +pub const GRND_NONBLOCK: c_uint = 0x1; +pub const GRND_RANDOM: c_uint = 0x2; // Horizon OS works doesn't or can't hold any of this information safe_f! { - pub {const} fn WIFSTOPPED(_status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(_status: c_int) -> bool { false } - pub {const} fn WSTOPSIG(_status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(_status: c_int) -> c_int { 0 } - pub {const} fn WIFCONTINUED(_status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(_status: c_int) -> bool { true } - pub {const} fn WIFSIGNALED(_status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(_status: c_int) -> bool { false } - pub {const} fn WTERMSIG(_status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(_status: c_int) -> c_int { 0 } - pub {const} fn WIFEXITED(_status: ::c_int) -> bool { + pub {const} fn WIFEXITED(_status: c_int) -> bool { true } - pub {const} fn WEXITSTATUS(_status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(_status: c_int) -> c_int { 0 } - pub {const} fn WCOREDUMP(_status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(_status: c_int) -> bool { false } } extern "C" { pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(_: *mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(_: *mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn pthread_attr_getschedparam( - attr: *const ::pthread_attr_t, + attr: *const crate::pthread_attr_t, param: *mut sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_attr_setschedparam( - attr: *mut ::pthread_attr_t, + attr: *mut crate::pthread_attr_t, param: *const sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_attr_getprocessorid_np( - attr: *const ::pthread_attr_t, - processor_id: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + processor_id: *mut c_int, + ) -> c_int; pub fn pthread_attr_setprocessorid_np( - attr: *mut ::pthread_attr_t, - processor_id: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + processor_id: c_int, + ) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; pub fn pthread_condattr_getclock( - attr: *const ::pthread_condattr_t, - clock_id: *mut ::clockid_t, - ) -> ::c_int; + attr: *const crate::pthread_condattr_t, + clock_id: *mut crate::clockid_t, + ) -> c_int; pub fn pthread_condattr_setclock( - attr: *mut ::pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; + attr: *mut crate::pthread_condattr_t, + clock_id: crate::clockid_t, + ) -> c_int; - pub fn pthread_getprocessorid_np() -> ::c_int; + pub fn pthread_getprocessorid_np() -> c_int; - pub fn getrandom(buf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn getrandom(buf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; - pub fn gethostid() -> ::c_long; + pub fn gethostid() -> c_long; } pub use crate::unix::newlib::generic::dirent; diff --git a/src/unix/newlib/mod.rs b/src/unix/newlib/mod.rs index 8680be21a5037..1b547630789a0 100644 --- a/src/unix/newlib/mod.rs +++ b/src/unix/newlib/mod.rs @@ -1,17 +1,19 @@ +use crate::{c_int, c_longlong, c_uint, c_ushort, c_void, size_t}; + pub type blkcnt_t = i32; pub type blksize_t = i32; -pub type clockid_t = ::c_ulong; +pub type clockid_t = c_ulong; cfg_if! { if #[cfg(any(target_os = "espidf"))] { - pub type dev_t = ::c_short; - pub type ino_t = ::c_ushort; - pub type off_t = ::c_long; + pub type dev_t = crate::c_short; + pub type ino_t = c_ushort; + pub type off_t = c_long; } else if #[cfg(any(target_os = "vita"))] { - pub type dev_t = ::c_short; - pub type ino_t = ::c_ushort; - pub type off_t = ::c_int; + pub type dev_t = crate::c_short; + pub type ino_t = c_ushort; + pub type off_t = c_int; } else { pub type dev_t = u32; pub type ino_t = u32; @@ -22,13 +24,13 @@ cfg_if! { pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u32; pub type id_t = u32; -pub type key_t = ::c_int; -pub type loff_t = ::c_longlong; -pub type mode_t = ::c_uint; +pub type key_t = c_int; +pub type loff_t = c_longlong; +pub type mode_t = c_uint; pub type nfds_t = u32; -pub type nlink_t = ::c_ushort; -pub type pthread_t = ::c_ulong; -pub type pthread_key_t = ::c_uint; +pub type nlink_t = c_ushort; +pub type pthread_t = c_ulong; +pub type pthread_key_t = c_uint; pub type rlim_t = u32; cfg_if! { @@ -46,7 +48,7 @@ cfg_if! { if #[cfg(target_os = "espidf")] { pub type tcflag_t = u16; } else { - pub type tcflag_t = ::c_uint; + pub type tcflag_t = c_uint; } } pub type useconds_t = u32; @@ -56,7 +58,7 @@ cfg_if! { target_os = "horizon", all(target_os = "espidf", not(espidf_time32)) ))] { - pub type time_t = ::c_longlong; + pub type time_t = c_longlong; } else { pub type time_t = i32; } @@ -66,12 +68,12 @@ cfg_if! { if #[cfg(not(target_os = "horizon"))] { s! { pub struct hostent { - pub h_name: *mut ::c_char, - pub h_aliases: *mut *mut ::c_char, - pub h_addrtype: ::c_int, - pub h_length: ::c_int, - pub h_addr_list: *mut *mut ::c_char, - pub h_addr: *mut ::c_char, + pub h_name: *mut c_char, + pub h_aliases: *mut *mut c_char, + pub h_addrtype: c_int, + pub h_length: c_int, + pub h_addr_list: *mut *mut c_char, + pub h_addr: *mut c_char, } } } @@ -81,16 +83,16 @@ s! { // The order of the `ai_addr` field in this struct is crucial // for converting between the Rust and C types. pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, pub ai_addrlen: socklen_t, #[cfg(target_os = "espidf")] pub ai_addr: *mut sockaddr, - pub ai_canonname: *mut ::c_char, + pub ai_canonname: *mut c_char, #[cfg(not(any( target_os = "espidf", @@ -107,109 +109,109 @@ s! { } pub struct linger { - pub l_onoff: ::c_int, - pub l_linger: ::c_int, + pub l_onoff: c_int, + pub l_linger: c_int, } pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct pollfd { - pub fd: ::c_int, - pub events: ::c_int, - pub revents: ::c_int, + pub fd: c_int, + pub events: c_int, + pub revents: c_int, } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_p_sign_posn: c_char, } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, pub f_blocks: fsblkcnt_t, pub f_bfree: fsblkcnt_t, pub f_bavail: fsblkcnt_t, pub f_files: fsfilcnt_t, pub f_ffree: fsfilcnt_t, pub f_favail: fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, } pub struct sigaction { - pub sa_handler: extern "C" fn(arg1: ::c_int), + pub sa_handler: extern "C" fn(arg1: c_int), pub sa_mask: sigset_t, - pub sa_flags: ::c_int, + pub sa_flags: c_int, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_flags: c_int, pub ss_size: usize, } pub struct fd_set { // Unverified - fds_bits: [::c_ulong; FD_SETSIZE as usize / ULONG_SIZE], + fds_bits: [c_ulong; FD_SETSIZE as usize / ULONG_SIZE], } pub struct passwd { // Unverified - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct termios { // Unverified - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], #[cfg(target_os = "espidf")] pub c_ispeed: u32, #[cfg(target_os = "espidf")] @@ -218,25 +220,25 @@ s! { pub struct sem_t { // Unverified - __size: [::c_char; 16], + __size: [c_char; 16], } pub struct Dl_info { // Unverified - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct utsname { // Unverified - pub sysname: [::c_char; 65], - pub nodename: [::c_char; 65], - pub release: [::c_char; 65], - pub version: [::c_char; 65], - pub machine: [::c_char; 65], - pub domainname: [::c_char; 65], + pub sysname: [c_char; 65], + pub nodename: [c_char; 65], + pub release: [c_char; 65], + pub version: [c_char; 65], + pub machine: [c_char; 65], + pub domainname: [c_char; 65], } pub struct cpu_set_t { @@ -287,7 +289,7 @@ s! { )] pub struct pthread_mutex_t { // Unverified - size: [u8; ::__SIZEOF_PTHREAD_MUTEX_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEX_T], } #[cfg_attr( @@ -306,7 +308,7 @@ s! { )] pub struct pthread_rwlock_t { // Unverified - size: [u8; ::__SIZEOF_PTHREAD_RWLOCK_T], + size: [u8; crate::__SIZEOF_PTHREAD_RWLOCK_T], } #[cfg_attr( @@ -333,19 +335,19 @@ s! { )] pub struct pthread_mutexattr_t { // Unverified - size: [u8; ::__SIZEOF_PTHREAD_MUTEXATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_MUTEXATTR_T], } #[repr(align(8))] pub struct pthread_cond_t { // Unverified - size: [u8; ::__SIZEOF_PTHREAD_COND_T], + size: [u8; crate::__SIZEOF_PTHREAD_COND_T], } #[repr(align(4))] pub struct pthread_condattr_t { // Unverified - size: [u8; ::__SIZEOF_PTHREAD_CONDATTR_T], + size: [u8; crate::__SIZEOF_PTHREAD_CONDATTR_T], } } @@ -414,440 +416,440 @@ cfg_if! { pub const __SIZEOF_PTHREAD_BARRIERATTR_T: usize = 4; pub const __PTHREAD_MUTEX_HAVE_PREV: usize = 1; pub const __PTHREAD_RWLOCK_INT_FLAGS_SHARED: usize = 1; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; cfg_if! { if #[cfg(any(target_os = "horizon", target_os = "espidf"))] { - pub const FD_SETSIZE: ::c_int = 64; + pub const FD_SETSIZE: c_int = 64; } else if #[cfg(target_os = "vita")] { - pub const FD_SETSIZE: ::c_int = 256; + pub const FD_SETSIZE: c_int = 256; } else { - pub const FD_SETSIZE: ::c_int = 1024; + pub const FD_SETSIZE: c_int = 1024; } } // intentionally not public, only used for fd_set const ULONG_SIZE: usize = 32; // Other constants -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const EDEADLK: ::c_int = 45; -pub const ENOLCK: ::c_int = 46; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENOLINK: ::c_int = 67; -pub const EPROTO: ::c_int = 71; -pub const EMULTIHOP: ::c_int = 74; -pub const EBADMSG: ::c_int = 77; -pub const EFTYPE: ::c_int = 79; -pub const ENOSYS: ::c_int = 88; -pub const ENOTEMPTY: ::c_int = 90; -pub const ENAMETOOLONG: ::c_int = 91; -pub const ELOOP: ::c_int = 92; -pub const EOPNOTSUPP: ::c_int = 95; -pub const EPFNOSUPPORT: ::c_int = 96; -pub const ECONNRESET: ::c_int = 104; -pub const ENOBUFS: ::c_int = 105; -pub const EAFNOSUPPORT: ::c_int = 106; -pub const EPROTOTYPE: ::c_int = 107; -pub const ENOTSOCK: ::c_int = 108; -pub const ENOPROTOOPT: ::c_int = 109; -pub const ECONNREFUSED: ::c_int = 111; -pub const EADDRINUSE: ::c_int = 112; -pub const ECONNABORTED: ::c_int = 113; -pub const ENETUNREACH: ::c_int = 114; -pub const ENETDOWN: ::c_int = 115; -pub const ETIMEDOUT: ::c_int = 116; -pub const EHOSTDOWN: ::c_int = 117; -pub const EHOSTUNREACH: ::c_int = 118; -pub const EINPROGRESS: ::c_int = 119; -pub const EALREADY: ::c_int = 120; -pub const EDESTADDRREQ: ::c_int = 121; -pub const EMSGSIZE: ::c_int = 122; -pub const EPROTONOSUPPORT: ::c_int = 123; -pub const EADDRNOTAVAIL: ::c_int = 125; -pub const ENETRESET: ::c_int = 126; -pub const EISCONN: ::c_int = 127; -pub const ENOTCONN: ::c_int = 128; -pub const ETOOMANYREFS: ::c_int = 129; -pub const EDQUOT: ::c_int = 132; -pub const ESTALE: ::c_int = 133; -pub const ENOTSUP: ::c_int = 134; -pub const EILSEQ: ::c_int = 138; -pub const EOVERFLOW: ::c_int = 139; -pub const ECANCELED: ::c_int = 140; -pub const ENOTRECOVERABLE: ::c_int = 141; -pub const EOWNERDEAD: ::c_int = 142; -pub const EWOULDBLOCK: ::c_int = 11; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const F_RGETLK: ::c_int = 10; -pub const F_RSETLK: ::c_int = 11; -pub const F_CNVT: ::c_int = 12; -pub const F_RSETLKW: ::c_int = 13; -pub const F_DUPFD_CLOEXEC: ::c_int = 14; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_APPEND: ::c_int = 8; -pub const O_CREAT: ::c_int = 512; -pub const O_TRUNC: ::c_int = 1024; -pub const O_EXCL: ::c_int = 2048; -pub const O_SYNC: ::c_int = 8192; -pub const O_NONBLOCK: ::c_int = 16384; - -pub const O_ACCMODE: ::c_int = 3; +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const EDEADLK: c_int = 45; +pub const ENOLCK: c_int = 46; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENOLINK: c_int = 67; +pub const EPROTO: c_int = 71; +pub const EMULTIHOP: c_int = 74; +pub const EBADMSG: c_int = 77; +pub const EFTYPE: c_int = 79; +pub const ENOSYS: c_int = 88; +pub const ENOTEMPTY: c_int = 90; +pub const ENAMETOOLONG: c_int = 91; +pub const ELOOP: c_int = 92; +pub const EOPNOTSUPP: c_int = 95; +pub const EPFNOSUPPORT: c_int = 96; +pub const ECONNRESET: c_int = 104; +pub const ENOBUFS: c_int = 105; +pub const EAFNOSUPPORT: c_int = 106; +pub const EPROTOTYPE: c_int = 107; +pub const ENOTSOCK: c_int = 108; +pub const ENOPROTOOPT: c_int = 109; +pub const ECONNREFUSED: c_int = 111; +pub const EADDRINUSE: c_int = 112; +pub const ECONNABORTED: c_int = 113; +pub const ENETUNREACH: c_int = 114; +pub const ENETDOWN: c_int = 115; +pub const ETIMEDOUT: c_int = 116; +pub const EHOSTDOWN: c_int = 117; +pub const EHOSTUNREACH: c_int = 118; +pub const EINPROGRESS: c_int = 119; +pub const EALREADY: c_int = 120; +pub const EDESTADDRREQ: c_int = 121; +pub const EMSGSIZE: c_int = 122; +pub const EPROTONOSUPPORT: c_int = 123; +pub const EADDRNOTAVAIL: c_int = 125; +pub const ENETRESET: c_int = 126; +pub const EISCONN: c_int = 127; +pub const ENOTCONN: c_int = 128; +pub const ETOOMANYREFS: c_int = 129; +pub const EDQUOT: c_int = 132; +pub const ESTALE: c_int = 133; +pub const ENOTSUP: c_int = 134; +pub const EILSEQ: c_int = 138; +pub const EOVERFLOW: c_int = 139; +pub const ECANCELED: c_int = 140; +pub const ENOTRECOVERABLE: c_int = 141; +pub const EOWNERDEAD: c_int = 142; +pub const EWOULDBLOCK: c_int = 11; + +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; +pub const F_GETOWN: c_int = 5; +pub const F_SETOWN: c_int = 6; +pub const F_GETLK: c_int = 7; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const F_RGETLK: c_int = 10; +pub const F_RSETLK: c_int = 11; +pub const F_CNVT: c_int = 12; +pub const F_RSETLKW: c_int = 13; +pub const F_DUPFD_CLOEXEC: c_int = 14; + +pub const O_RDONLY: c_int = 0; +pub const O_WRONLY: c_int = 1; +pub const O_RDWR: c_int = 2; +pub const O_APPEND: c_int = 8; +pub const O_CREAT: c_int = 512; +pub const O_TRUNC: c_int = 1024; +pub const O_EXCL: c_int = 2048; +pub const O_SYNC: c_int = 8192; +pub const O_NONBLOCK: c_int = 16384; + +pub const O_ACCMODE: c_int = 3; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const O_CLOEXEC: ::c_int = 0x40000; + pub const O_CLOEXEC: c_int = 0x40000; } else { - pub const O_CLOEXEC: ::c_int = 0x80000; + pub const O_CLOEXEC: c_int = 0x80000; } } -pub const RTLD_LAZY: ::c_int = 0x1; - -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; - -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; - -pub const FIOCLEX: ::c_ulong = 0x20006601; -pub const FIONCLEX: ::c_ulong = 0x20006602; - -pub const S_BLKSIZE: ::mode_t = 1024; -pub const S_IREAD: ::mode_t = 0o0400; -pub const S_IWRITE: ::mode_t = 0o0200; -pub const S_IEXEC: ::mode_t = 0o0100; -pub const S_ENFMT: ::mode_t = 0o2000; -pub const S_IFMT: ::mode_t = 0o17_0000; -pub const S_IFDIR: ::mode_t = 0o4_0000; -pub const S_IFCHR: ::mode_t = 0o2_0000; -pub const S_IFBLK: ::mode_t = 0o6_0000; -pub const S_IFREG: ::mode_t = 0o10_0000; -pub const S_IFLNK: ::mode_t = 0o12_0000; -pub const S_IFSOCK: ::mode_t = 0o14_0000; -pub const S_IFIFO: ::mode_t = 0o1_0000; -pub const S_IRUSR: ::mode_t = 0o0400; -pub const S_IWUSR: ::mode_t = 0o0200; -pub const S_IXUSR: ::mode_t = 0o0100; -pub const S_IRGRP: ::mode_t = 0o0040; -pub const S_IWGRP: ::mode_t = 0o0020; -pub const S_IXGRP: ::mode_t = 0o0010; -pub const S_IROTH: ::mode_t = 0o0004; -pub const S_IWOTH: ::mode_t = 0o0002; -pub const S_IXOTH: ::mode_t = 0o0001; - -pub const SOL_TCP: ::c_int = 6; - -pub const PF_UNSPEC: ::c_int = 0; -pub const PF_INET: ::c_int = 2; +pub const RTLD_LAZY: c_int = 0x1; + +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; + +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; + +pub const FIOCLEX: c_ulong = 0x20006601; +pub const FIONCLEX: c_ulong = 0x20006602; + +pub const S_BLKSIZE: crate::mode_t = 1024; +pub const S_IREAD: crate::mode_t = 0o0400; +pub const S_IWRITE: crate::mode_t = 0o0200; +pub const S_IEXEC: crate::mode_t = 0o0100; +pub const S_ENFMT: crate::mode_t = 0o2000; +pub const S_IFMT: crate::mode_t = 0o17_0000; +pub const S_IFDIR: crate::mode_t = 0o4_0000; +pub const S_IFCHR: crate::mode_t = 0o2_0000; +pub const S_IFBLK: crate::mode_t = 0o6_0000; +pub const S_IFREG: crate::mode_t = 0o10_0000; +pub const S_IFLNK: crate::mode_t = 0o12_0000; +pub const S_IFSOCK: crate::mode_t = 0o14_0000; +pub const S_IFIFO: crate::mode_t = 0o1_0000; +pub const S_IRUSR: crate::mode_t = 0o0400; +pub const S_IWUSR: crate::mode_t = 0o0200; +pub const S_IXUSR: crate::mode_t = 0o0100; +pub const S_IRGRP: crate::mode_t = 0o0040; +pub const S_IWGRP: crate::mode_t = 0o0020; +pub const S_IXGRP: crate::mode_t = 0o0010; +pub const S_IROTH: crate::mode_t = 0o0004; +pub const S_IWOTH: crate::mode_t = 0o0002; +pub const S_IXOTH: crate::mode_t = 0o0001; + +pub const SOL_TCP: c_int = 6; + +pub const PF_UNSPEC: c_int = 0; +pub const PF_INET: c_int = 2; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const PF_INET6: ::c_int = 10; + pub const PF_INET6: c_int = 10; } else { - pub const PF_INET6: ::c_int = 23; + pub const PF_INET6: c_int = 23; } } -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_INET: ::c_int = 2; - -pub const CLOCK_REALTIME: ::clockid_t = 1; -pub const CLOCK_MONOTONIC: ::clockid_t = 4; -pub const CLOCK_BOOTTIME: ::clockid_t = 4; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const SO_BINTIME: ::c_int = 0x2000; -pub const SO_NO_OFFLOAD: ::c_int = 0x4000; -pub const SO_NO_DDP: ::c_int = 0x8000; -pub const SO_REUSEPORT_LB: ::c_int = 0x10000; -pub const SO_LABEL: ::c_int = 0x1009; -pub const SO_PEERLABEL: ::c_int = 0x1010; -pub const SO_LISTENQLIMIT: ::c_int = 0x1011; -pub const SO_LISTENQLEN: ::c_int = 0x1012; -pub const SO_LISTENINCQLEN: ::c_int = 0x1013; -pub const SO_SETFIB: ::c_int = 0x1014; -pub const SO_USER_COOKIE: ::c_int = 0x1015; -pub const SO_PROTOCOL: ::c_int = 0x1016; -pub const SO_PROTOTYPE: ::c_int = SO_PROTOCOL; -pub const SO_VENDOR: ::c_int = 0x80000000; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_TIMESTAMP: ::c_int = 0x0400; -pub const SO_NOSIGPIPE: ::c_int = 0x0800; -pub const SO_ACCEPTFILTER: ::c_int = 0x1000; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; +pub const AF_UNSPEC: c_int = 0; +pub const AF_INET: c_int = 2; + +pub const CLOCK_REALTIME: crate::clockid_t = 1; +pub const CLOCK_MONOTONIC: crate::clockid_t = 4; +pub const CLOCK_BOOTTIME: crate::clockid_t = 4; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const SO_BINTIME: c_int = 0x2000; +pub const SO_NO_OFFLOAD: c_int = 0x4000; +pub const SO_NO_DDP: c_int = 0x8000; +pub const SO_REUSEPORT_LB: c_int = 0x10000; +pub const SO_LABEL: c_int = 0x1009; +pub const SO_PEERLABEL: c_int = 0x1010; +pub const SO_LISTENQLIMIT: c_int = 0x1011; +pub const SO_LISTENQLEN: c_int = 0x1012; +pub const SO_LISTENINCQLEN: c_int = 0x1013; +pub const SO_SETFIB: c_int = 0x1014; +pub const SO_USER_COOKIE: c_int = 0x1015; +pub const SO_PROTOCOL: c_int = 0x1016; +pub const SO_PROTOTYPE: c_int = SO_PROTOCOL; +pub const SO_VENDOR: c_int = 0x80000000; +pub const SO_DEBUG: c_int = 0x01; +pub const SO_ACCEPTCONN: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_TIMESTAMP: c_int = 0x0400; +pub const SO_NOSIGPIPE: c_int = 0x0800; +pub const SO_ACCEPTFILTER: c_int = 0x1000; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; cfg_if! { if #[cfg(target_os = "horizon")] { - pub const SO_ERROR: ::c_int = 0x1009; + pub const SO_ERROR: c_int = 0x1009; } else { - pub const SO_ERROR: ::c_int = 0x1007; + pub const SO_ERROR: c_int = 0x1007; } } -pub const SO_TYPE: ::c_int = 0x1008; +pub const SO_TYPE: c_int = 0x1008; -pub const SOCK_CLOEXEC: ::c_int = O_CLOEXEC; +pub const SOCK_CLOEXEC: c_int = O_CLOEXEC; -pub const INET_ADDRSTRLEN: ::c_int = 16; +pub const INET_ADDRSTRLEN: c_int = 16; // https://github.com/bminor/newlib/blob/HEAD/newlib/libc/sys/linux/include/net/if.h#L121 -pub const IFF_UP: ::c_int = 0x1; // interface is up -pub const IFF_BROADCAST: ::c_int = 0x2; // broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x4; // turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x8; // is a loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x10; // interface is point-to-point link -pub const IFF_NOTRAILERS: ::c_int = 0x20; // avoid use of trailers -pub const IFF_RUNNING: ::c_int = 0x40; // resources allocated -pub const IFF_NOARP: ::c_int = 0x80; // no address resolution protocol -pub const IFF_PROMISC: ::c_int = 0x100; // receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x200; // receive all multicast packets -pub const IFF_OACTIVE: ::c_int = 0x400; // transmission in progress -pub const IFF_SIMPLEX: ::c_int = 0x800; // can't hear own transmissions -pub const IFF_LINK0: ::c_int = 0x1000; // per link layer defined bit -pub const IFF_LINK1: ::c_int = 0x2000; // per link layer defined bit -pub const IFF_LINK2: ::c_int = 0x4000; // per link layer defined bit -pub const IFF_ALTPHYS: ::c_int = IFF_LINK2; // use alternate physical connection -pub const IFF_MULTICAST: ::c_int = 0x8000; // supports multicast +pub const IFF_UP: c_int = 0x1; // interface is up +pub const IFF_BROADCAST: c_int = 0x2; // broadcast address valid +pub const IFF_DEBUG: c_int = 0x4; // turn on debugging +pub const IFF_LOOPBACK: c_int = 0x8; // is a loopback net +pub const IFF_POINTOPOINT: c_int = 0x10; // interface is point-to-point link +pub const IFF_NOTRAILERS: c_int = 0x20; // avoid use of trailers +pub const IFF_RUNNING: c_int = 0x40; // resources allocated +pub const IFF_NOARP: c_int = 0x80; // no address resolution protocol +pub const IFF_PROMISC: c_int = 0x100; // receive all packets +pub const IFF_ALLMULTI: c_int = 0x200; // receive all multicast packets +pub const IFF_OACTIVE: c_int = 0x400; // transmission in progress +pub const IFF_SIMPLEX: c_int = 0x800; // can't hear own transmissions +pub const IFF_LINK0: c_int = 0x1000; // per link layer defined bit +pub const IFF_LINK1: c_int = 0x2000; // per link layer defined bit +pub const IFF_LINK2: c_int = 0x4000; // per link layer defined bit +pub const IFF_ALTPHYS: c_int = IFF_LINK2; // use alternate physical connection +pub const IFF_MULTICAST: c_int = 0x8000; // supports multicast cfg_if! { if #[cfg(target_os = "vita")] { - pub const TCP_NODELAY: ::c_int = 1; - pub const TCP_MAXSEG: ::c_int = 2; + pub const TCP_NODELAY: c_int = 1; + pub const TCP_MAXSEG: c_int = 2; } else if #[cfg(target_os = "espidf")] { - pub const TCP_NODELAY: ::c_int = 1; - pub const TCP_MAXSEG: ::c_int = 8194; + pub const TCP_NODELAY: c_int = 1; + pub const TCP_MAXSEG: c_int = 8194; } else { - pub const TCP_NODELAY: ::c_int = 8193; - pub const TCP_MAXSEG: ::c_int = 8194; + pub const TCP_NODELAY: c_int = 8193; + pub const TCP_MAXSEG: c_int = 8194; } } -pub const TCP_NOPUSH: ::c_int = 4; -pub const TCP_NOOPT: ::c_int = 8; +pub const TCP_NOPUSH: c_int = 4; +pub const TCP_NOOPT: c_int = 8; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const TCP_KEEPIDLE: ::c_int = 3; - pub const TCP_KEEPINTVL: ::c_int = 4; - pub const TCP_KEEPCNT: ::c_int = 5; + pub const TCP_KEEPIDLE: c_int = 3; + pub const TCP_KEEPINTVL: c_int = 4; + pub const TCP_KEEPCNT: c_int = 5; } else { - pub const TCP_KEEPIDLE: ::c_int = 256; - pub const TCP_KEEPINTVL: ::c_int = 512; - pub const TCP_KEEPCNT: ::c_int = 1024; + pub const TCP_KEEPIDLE: c_int = 256; + pub const TCP_KEEPINTVL: c_int = 512; + pub const TCP_KEEPCNT: c_int = 1024; } } cfg_if! { if #[cfg(target_os = "horizon")] { - pub const IP_TOS: ::c_int = 7; + pub const IP_TOS: c_int = 7; } else if #[cfg(target_os = "espidf")] { - pub const IP_TOS: ::c_int = 1; + pub const IP_TOS: c_int = 1; } else { - pub const IP_TOS: ::c_int = 3; + pub const IP_TOS: c_int = 3; } } cfg_if! { if #[cfg(target_os = "vita")] { - pub const IP_TTL: ::c_int = 4; + pub const IP_TTL: c_int = 4; } else if #[cfg(target_os = "espidf")] { - pub const IP_TTL: ::c_int = 2; + pub const IP_TTL: c_int = 2; } else { - pub const IP_TTL: ::c_int = 8; + pub const IP_TTL: c_int = 8; } } cfg_if! { if #[cfg(target_os = "espidf")] { - pub const IP_MULTICAST_IF: ::c_int = 6; - pub const IP_MULTICAST_TTL: ::c_int = 5; - pub const IP_MULTICAST_LOOP: ::c_int = 7; + pub const IP_MULTICAST_IF: c_int = 6; + pub const IP_MULTICAST_TTL: c_int = 5; + pub const IP_MULTICAST_LOOP: c_int = 7; } else { - pub const IP_MULTICAST_IF: ::c_int = 9; - pub const IP_MULTICAST_TTL: ::c_int = 10; - pub const IP_MULTICAST_LOOP: ::c_int = 11; + pub const IP_MULTICAST_IF: c_int = 9; + pub const IP_MULTICAST_TTL: c_int = 10; + pub const IP_MULTICAST_LOOP: c_int = 11; } } cfg_if! { if #[cfg(target_os = "vita")] { - pub const IP_ADD_MEMBERSHIP: ::c_int = 12; - pub const IP_DROP_MEMBERSHIP: ::c_int = 13; + pub const IP_ADD_MEMBERSHIP: c_int = 12; + pub const IP_DROP_MEMBERSHIP: c_int = 13; } else if #[cfg(target_os = "espidf")] { - pub const IP_ADD_MEMBERSHIP: ::c_int = 3; - pub const IP_DROP_MEMBERSHIP: ::c_int = 4; + pub const IP_ADD_MEMBERSHIP: c_int = 3; + pub const IP_DROP_MEMBERSHIP: c_int = 4; } else { - pub const IP_ADD_MEMBERSHIP: ::c_int = 11; - pub const IP_DROP_MEMBERSHIP: ::c_int = 12; + pub const IP_ADD_MEMBERSHIP: c_int = 11; + pub const IP_DROP_MEMBERSHIP: c_int = 12; } } -pub const IPV6_UNICAST_HOPS: ::c_int = 4; +pub const IPV6_UNICAST_HOPS: c_int = 4; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const IPV6_MULTICAST_IF: ::c_int = 768; - pub const IPV6_MULTICAST_HOPS: ::c_int = 769; - pub const IPV6_MULTICAST_LOOP: ::c_int = 770; + pub const IPV6_MULTICAST_IF: c_int = 768; + pub const IPV6_MULTICAST_HOPS: c_int = 769; + pub const IPV6_MULTICAST_LOOP: c_int = 770; } else { - pub const IPV6_MULTICAST_IF: ::c_int = 9; - pub const IPV6_MULTICAST_HOPS: ::c_int = 10; - pub const IPV6_MULTICAST_LOOP: ::c_int = 11; + pub const IPV6_MULTICAST_IF: c_int = 9; + pub const IPV6_MULTICAST_HOPS: c_int = 10; + pub const IPV6_MULTICAST_LOOP: c_int = 11; } } -pub const IPV6_V6ONLY: ::c_int = 27; -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13; +pub const IPV6_V6ONLY: c_int = 27; +pub const IPV6_JOIN_GROUP: c_int = 12; +pub const IPV6_LEAVE_GROUP: c_int = 13; +pub const IPV6_ADD_MEMBERSHIP: c_int = 12; +pub const IPV6_DROP_MEMBERSHIP: c_int = 13; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const HOST_NOT_FOUND: ::c_int = 210; - pub const NO_DATA: ::c_int = 211; - pub const NO_RECOVERY: ::c_int = 212; - pub const TRY_AGAIN: ::c_int = 213; + pub const HOST_NOT_FOUND: c_int = 210; + pub const NO_DATA: c_int = 211; + pub const NO_RECOVERY: c_int = 212; + pub const TRY_AGAIN: c_int = 213; } else { - pub const HOST_NOT_FOUND: ::c_int = 1; - pub const NO_DATA: ::c_int = 2; - pub const NO_RECOVERY: ::c_int = 3; - pub const TRY_AGAIN: ::c_int = 4; + pub const HOST_NOT_FOUND: c_int = 1; + pub const NO_DATA: c_int = 2; + pub const NO_RECOVERY: c_int = 3; + pub const TRY_AGAIN: c_int = 4; } } -pub const NO_ADDRESS: ::c_int = 2; +pub const NO_ADDRESS: c_int = 2; -pub const AI_PASSIVE: ::c_int = 1; -pub const AI_CANONNAME: ::c_int = 2; -pub const AI_NUMERICHOST: ::c_int = 4; +pub const AI_PASSIVE: c_int = 1; +pub const AI_CANONNAME: c_int = 2; +pub const AI_NUMERICHOST: c_int = 4; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const AI_NUMERICSERV: ::c_int = 8; - pub const AI_ADDRCONFIG: ::c_int = 64; + pub const AI_NUMERICSERV: c_int = 8; + pub const AI_ADDRCONFIG: c_int = 64; } else { - pub const AI_NUMERICSERV: ::c_int = 0; - pub const AI_ADDRCONFIG: ::c_int = 0; + pub const AI_NUMERICSERV: c_int = 0; + pub const AI_ADDRCONFIG: c_int = 0; } } -pub const NI_MAXHOST: ::c_int = 1025; -pub const NI_MAXSERV: ::c_int = 32; -pub const NI_NOFQDN: ::c_int = 1; -pub const NI_NUMERICHOST: ::c_int = 2; -pub const NI_NAMEREQD: ::c_int = 4; +pub const NI_MAXHOST: c_int = 1025; +pub const NI_MAXSERV: c_int = 32; +pub const NI_NOFQDN: c_int = 1; +pub const NI_NUMERICHOST: c_int = 2; +pub const NI_NAMEREQD: c_int = 4; cfg_if! { if #[cfg(target_os = "espidf")] { - pub const NI_NUMERICSERV: ::c_int = 8; - pub const NI_DGRAM: ::c_int = 16; + pub const NI_NUMERICSERV: c_int = 8; + pub const NI_DGRAM: c_int = 16; } else { - pub const NI_NUMERICSERV: ::c_int = 0; - pub const NI_DGRAM: ::c_int = 0; + pub const NI_NUMERICSERV: c_int = 0; + pub const NI_DGRAM: c_int = 0; } } cfg_if! { // Defined in vita/mod.rs for "vita" if #[cfg(target_os = "espidf")] { - pub const EAI_FAMILY: ::c_int = 204; - pub const EAI_MEMORY: ::c_int = 203; - pub const EAI_NONAME: ::c_int = 200; - pub const EAI_SOCKTYPE: ::c_int = 10; + pub const EAI_FAMILY: c_int = 204; + pub const EAI_MEMORY: c_int = 203; + pub const EAI_NONAME: c_int = 200; + pub const EAI_SOCKTYPE: c_int = 10; } else if #[cfg(not(target_os = "vita"))] { - pub const EAI_FAMILY: ::c_int = -303; - pub const EAI_MEMORY: ::c_int = -304; - pub const EAI_NONAME: ::c_int = -305; - pub const EAI_SOCKTYPE: ::c_int = -307; + pub const EAI_FAMILY: c_int = -303; + pub const EAI_MEMORY: c_int = -304; + pub const EAI_NONAME: c_int = -305; + pub const EAI_SOCKTYPE: c_int = -307; } } -pub const EXIT_SUCCESS: ::c_int = 0; -pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const EXIT_FAILURE: c_int = 1; -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; f! { - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; @@ -861,36 +863,36 @@ f! { } extern "C" { - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; #[cfg_attr(target_os = "linux", link_name = "__xpg_strerror_r")] - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr(target_os = "espidf", link_name = "lwip_bind")] - pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int; - pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn clock_gettime(clock_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_getres(clock_id: ::clockid_t, res: *mut ::timespec) -> ::c_int; + pub fn bind(fd: c_int, addr: *const sockaddr, len: socklen_t) -> c_int; + pub fn clock_settime(clock_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn clock_gettime(clock_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_getres(clock_id: crate::clockid_t, res: *mut crate::timespec) -> c_int; #[cfg_attr(target_os = "espidf", link_name = "lwip_close")] - pub fn closesocket(sockfd: ::c_int) -> ::c_int; - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; + pub fn closesocket(sockfd: c_int) -> c_int; + pub fn ioctl(fd: c_int, request: c_ulong, ...) -> c_int; #[cfg(not(all(target_arch = "powerpc", target_vendor = "nintendo")))] #[cfg_attr(target_os = "espidf", link_name = "lwip_recvfrom")] pub fn recvfrom( - fd: ::c_int, - buf: *mut ::c_void, + fd: c_int, + buf: *mut c_void, n: usize, - flags: ::c_int, + flags: c_int, addr: *mut sockaddr, addr_len: *mut socklen_t, ) -> isize; @@ -898,61 +900,61 @@ extern "C" { pub fn getnameinfo( sa: *const sockaddr, salen: socklen_t, - host: *mut ::c_char, + host: *mut c_char, hostlen: socklen_t, - serv: *mut ::c_char, + serv: *mut c_char, servlen: socklen_t, - flags: ::c_int, - ) -> ::c_int; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + flags: c_int, + ) -> c_int; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn uname(buf: *mut ::utsname) -> ::c_int; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn uname(buf: *mut crate::utsname) -> c_int; } mod generic; diff --git a/src/unix/newlib/powerpc/mod.rs b/src/unix/newlib/powerpc/mod.rs index 10faadbdf8c0a..6b73b6fb39dea 100644 --- a/src/unix/newlib/powerpc/mod.rs +++ b/src/unix/newlib/powerpc/mod.rs @@ -1,6 +1,8 @@ -pub type clock_t = ::c_ulong; +use crate::c_int; + +pub type clock_t = c_ulong; pub type c_char = u8; -pub type wchar_t = ::c_int; +pub type wchar_t = c_int; pub type c_long = i32; pub type c_ulong = u32; diff --git a/src/unix/newlib/rtems/mod.rs b/src/unix/newlib/rtems/mod.rs index f2b7687fa491e..cf390f9fa5eb0 100644 --- a/src/unix/newlib/rtems/mod.rs +++ b/src/unix/newlib/rtems/mod.rs @@ -1,145 +1,145 @@ // defined in architecture specific module -use c_long; +use crate::{c_char, c_int, c_long, c_ulong, c_void, size_t, ssize_t}; s! { pub struct sockaddr_un { - pub sun_family: ::sa_family_t, - pub sun_path: [::c_char; 108usize], + pub sun_family: crate::sa_family_t, + pub sun_path: [c_char; 108usize], } } -pub const AF_UNIX: ::c_int = 1; +pub const AF_UNIX: c_int = 1; -pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void; +pub const RTLD_DEFAULT: *mut c_void = -2isize as *mut c_void; pub const UTIME_OMIT: c_long = -1; -pub const AT_FDCWD: ::c_int = -2; +pub const AT_FDCWD: c_int = -2; -pub const O_DIRECTORY: ::c_int = 0x200000; -pub const O_NOFOLLOW: ::c_int = 0x100000; +pub const O_DIRECTORY: c_int = 0x200000; +pub const O_NOFOLLOW: c_int = 0x100000; -pub const AT_EACCESS: ::c_int = 1; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 2; -pub const AT_SYMLINK_FOLLOW: ::c_int = 4; -pub const AT_REMOVEDIR: ::c_int = 8; +pub const AT_EACCESS: c_int = 1; +pub const AT_SYMLINK_NOFOLLOW: c_int = 2; +pub const AT_SYMLINK_FOLLOW: c_int = 4; +pub const AT_REMOVEDIR: c_int = 8; // signal.h -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; -pub const SIG_SETMASK: ::c_int = 0; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGTRAP: ::c_int = 5; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGBUS: ::c_int = 10; -pub const SIGSEGV: ::c_int = 11; -pub const SIGSYS: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGURG: ::c_int = 16; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGCONT: ::c_int = 19; -pub const SIGCHLD: ::c_int = 20; -pub const SIGCLD: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGIO: ::c_int = 23; -pub const SIGWINCH: ::c_int = 24; -pub const SIGUSR1: ::c_int = 25; -pub const SIGUSR2: ::c_int = 26; -pub const SIGRTMIN: ::c_int = 27; -pub const SIGRTMAX: ::c_int = 31; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; - -pub const SA_NOCLDSTOP: ::c_ulong = 0x00000001; -pub const SA_SIGINFO: ::c_ulong = 0x00000002; -pub const SA_ONSTACK: ::c_ulong = 0x00000004; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const _SC_PAGESIZE: ::c_int = 8; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 51; -pub const PTHREAD_STACK_MIN: ::size_t = 0; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; +pub const SIG_SETMASK: c_int = 0; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGTRAP: c_int = 5; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGBUS: c_int = 10; +pub const SIGSEGV: c_int = 11; +pub const SIGSYS: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGURG: c_int = 16; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGCONT: c_int = 19; +pub const SIGCHLD: c_int = 20; +pub const SIGCLD: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGIO: c_int = 23; +pub const SIGWINCH: c_int = 24; +pub const SIGUSR1: c_int = 25; +pub const SIGUSR2: c_int = 26; +pub const SIGRTMIN: c_int = 27; +pub const SIGRTMAX: c_int = 31; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; + +pub const SA_NOCLDSTOP: c_ulong = 0x00000001; +pub const SA_SIGINFO: c_ulong = 0x00000002; +pub const SA_ONSTACK: c_ulong = 0x00000004; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const _SC_PAGESIZE: c_int = 8; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 51; +pub const PTHREAD_STACK_MIN: size_t = 0; // sys/wait.h -pub const WNOHANG: ::c_int = 1; -pub const WUNTRACED: ::c_int = 2; +pub const WNOHANG: c_int = 1; +pub const WUNTRACED: c_int = 2; // sys/socket.h -pub const SOMAXCONN: ::c_int = 128; +pub const SOMAXCONN: c_int = 128; safe_f! { - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { // (status >> 8) & 0xff WEXITSTATUS(status) } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) > 0) && ((status & 0x7f) < 0x7f) } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0xff) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } // RTEMS doesn't have native WIFCONTINUED. - pub {const} fn WIFCONTINUED(_status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(_status: c_int) -> bool { true } // RTEMS doesn't have native WCOREDUMP. - pub {const} fn WCOREDUMP(_status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(_status: c_int) -> bool { false } } extern "C" { - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(_: *mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(_: *mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn pthread_condattr_setclock( - attr: *mut ::pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; + attr: *mut crate::pthread_condattr_t, + clock_id: crate::clockid_t, + ) -> c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; - pub fn arc4random_buf(buf: *mut core::ffi::c_void, nbytes: ::size_t); + pub fn arc4random_buf(buf: *mut core::ffi::c_void, nbytes: size_t); - pub fn setgroups(ngroups: ::c_int, grouplist: *const ::gid_t) -> ::c_int; + pub fn setgroups(ngroups: c_int, grouplist: *const crate::gid_t) -> c_int; } diff --git a/src/unix/newlib/vita/mod.rs b/src/unix/newlib/vita/mod.rs index d4c6955f36153..e9b12dd0914b8 100644 --- a/src/unix/newlib/vita/mod.rs +++ b/src/unix/newlib/vita/mod.rs @@ -1,4 +1,6 @@ -pub type clock_t = ::c_long; +use crate::{c_int, c_short, c_void, off_t, size_t, ssize_t}; + +pub type clock_t = c_long; pub type c_char = i8; pub type wchar_t = u32; @@ -6,231 +8,231 @@ pub type wchar_t = u32; pub type c_long = i32; pub type c_ulong = u32; -pub type sigset_t = ::c_ulong; +pub type sigset_t = c_ulong; s! { pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct sockaddr { pub sa_len: u8, - pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_family: crate::sa_family_t, + pub sa_data: [c_char; 14], } pub struct sockaddr_in6 { pub sin6_len: u8, - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, - pub sin6_vport: ::in_port_t, + pub sin6_addr: crate::in6_addr, + pub sin6_vport: crate::in_port_t, pub sin6_scope_id: u32, } pub struct sockaddr_in { pub sin_len: u8, - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_vport: ::in_port_t, + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_vport: crate::in_port_t, pub sin_zero: [u8; 6], } pub struct sockaddr_un { pub ss_len: u8, - pub sun_family: ::sa_family_t, - pub sun_path: [::c_char; 108usize], + pub sun_family: crate::sa_family_t, + pub sun_path: [c_char; 108usize], } pub struct sockaddr_storage { pub ss_len: u8, - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, pub __ss_pad1: [u8; 2], pub __ss_align: i64, pub __ss_pad2: [u8; 116], } pub struct sched_param { - pub sched_priority: ::c_int, + pub sched_priority: c_int, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_mtime: ::time_t, - pub st_ctime: ::time_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_spare4: [::c_long; 2usize], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_mtime: crate::time_t, + pub st_ctime: crate::time_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_spare4: [c_long; 2usize], } #[repr(align(8))] pub struct dirent { __offset: [u8; 88], - pub d_name: [::c_char; 256usize], + pub d_name: [c_char; 256usize], __pad: [u8; 8], } } -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET6: ::c_int = 24; +pub const AF_UNIX: c_int = 1; +pub const AF_INET6: c_int = 24; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; -pub const SOMAXCONN: ::c_int = 128; +pub const SOMAXCONN: c_int = 128; -pub const FIONBIO: ::c_ulong = 1; +pub const FIONBIO: c_ulong = 1; -pub const POLLIN: ::c_short = 0x0001; -pub const POLLPRI: ::c_short = POLLIN; -pub const POLLOUT: ::c_short = 0x0004; -pub const POLLRDNORM: ::c_short = POLLIN; -pub const POLLRDBAND: ::c_short = POLLIN; -pub const POLLWRNORM: ::c_short = POLLOUT; -pub const POLLWRBAND: ::c_short = POLLOUT; -pub const POLLERR: ::c_short = 0x0008; -pub const POLLHUP: ::c_short = 0x0010; -pub const POLLNVAL: ::c_short = 0x0020; +pub const POLLIN: c_short = 0x0001; +pub const POLLPRI: c_short = POLLIN; +pub const POLLOUT: c_short = 0x0004; +pub const POLLRDNORM: c_short = POLLIN; +pub const POLLRDBAND: c_short = POLLIN; +pub const POLLWRNORM: c_short = POLLOUT; +pub const POLLWRBAND: c_short = POLLOUT; +pub const POLLERR: c_short = 0x0008; +pub const POLLHUP: c_short = 0x0010; +pub const POLLNVAL: c_short = 0x0020; -pub const RTLD_DEFAULT: *mut ::c_void = 0 as *mut ::c_void; +pub const RTLD_DEFAULT: *mut c_void = 0 as *mut c_void; -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_NONBLOCK: ::c_int = 0x1100; +pub const SOL_SOCKET: c_int = 0xffff; +pub const SO_NONBLOCK: c_int = 0x1100; -pub const MSG_OOB: ::c_int = 0x1; -pub const MSG_PEEK: ::c_int = 0x2; -pub const MSG_DONTROUTE: ::c_int = 0x4; -pub const MSG_EOR: ::c_int = 0x8; -pub const MSG_TRUNC: ::c_int = 0x10; -pub const MSG_CTRUNC: ::c_int = 0x20; -pub const MSG_WAITALL: ::c_int = 0x40; -pub const MSG_DONTWAIT: ::c_int = 0x80; -pub const MSG_BCAST: ::c_int = 0x100; -pub const MSG_MCAST: ::c_int = 0x200; +pub const MSG_OOB: c_int = 0x1; +pub const MSG_PEEK: c_int = 0x2; +pub const MSG_DONTROUTE: c_int = 0x4; +pub const MSG_EOR: c_int = 0x8; +pub const MSG_TRUNC: c_int = 0x10; +pub const MSG_CTRUNC: c_int = 0x20; +pub const MSG_WAITALL: c_int = 0x40; +pub const MSG_DONTWAIT: c_int = 0x80; +pub const MSG_BCAST: c_int = 0x100; +pub const MSG_MCAST: c_int = 0x200; pub const UTIME_OMIT: c_long = -1; -pub const AT_FDCWD: ::c_int = -2; - -pub const O_DIRECTORY: ::c_int = 0x200000; -pub const O_NOFOLLOW: ::c_int = 0x100000; - -pub const AT_EACCESS: ::c_int = 1; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 2; -pub const AT_SYMLINK_FOLLOW: ::c_int = 4; -pub const AT_REMOVEDIR: ::c_int = 8; - -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGTRAP: ::c_int = 5; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGBUS: ::c_int = 10; -pub const SIGSEGV: ::c_int = 11; -pub const SIGSYS: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_NODATA: ::c_int = -5; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_ADDRFAMILY: ::c_int = -9; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_SYSTEM: ::c_int = -11; -pub const EAI_OVERFLOW: ::c_int = -12; - -pub const _SC_PAGESIZE: ::c_int = 8; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 51; -pub const PTHREAD_STACK_MIN: ::size_t = 32 * 1024; - -pub const IP_HDRINCL: ::c_int = 2; +pub const AT_FDCWD: c_int = -2; + +pub const O_DIRECTORY: c_int = 0x200000; +pub const O_NOFOLLOW: c_int = 0x100000; + +pub const AT_EACCESS: c_int = 1; +pub const AT_SYMLINK_NOFOLLOW: c_int = 2; +pub const AT_SYMLINK_FOLLOW: c_int = 4; +pub const AT_REMOVEDIR: c_int = 8; + +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGTRAP: c_int = 5; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGBUS: c_int = 10; +pub const SIGSEGV: c_int = 11; +pub const SIGSYS: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; + +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_NODATA: c_int = -5; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_ADDRFAMILY: c_int = -9; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_SYSTEM: c_int = -11; +pub const EAI_OVERFLOW: c_int = -12; + +pub const _SC_PAGESIZE: c_int = 8; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 51; +pub const PTHREAD_STACK_MIN: size_t = 32 * 1024; + +pub const IP_HDRINCL: c_int = 2; extern "C" { - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; - pub fn sendmsg(s: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn recvmsg(s: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn sendmsg(s: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; + pub fn recvmsg(s: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(_: *mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(_: *mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn pthread_attr_getschedparam( - attr: *const ::pthread_attr_t, + attr: *const crate::pthread_attr_t, param: *mut sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_attr_setschedparam( - attr: *mut ::pthread_attr_t, + attr: *mut crate::pthread_attr_t, param: *const sched_param, - ) -> ::c_int; + ) -> c_int; pub fn pthread_attr_getprocessorid_np( - attr: *const ::pthread_attr_t, - processor_id: *mut ::c_int, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + processor_id: *mut c_int, + ) -> c_int; pub fn pthread_attr_setprocessorid_np( - attr: *mut ::pthread_attr_t, - processor_id: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + processor_id: c_int, + ) -> c_int; pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; pub fn pthread_condattr_getclock( - attr: *const ::pthread_condattr_t, - clock_id: *mut ::clockid_t, - ) -> ::c_int; + attr: *const crate::pthread_condattr_t, + clock_id: *mut crate::clockid_t, + ) -> c_int; pub fn pthread_condattr_setclock( - attr: *mut ::pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; + attr: *mut crate::pthread_condattr_t, + clock_id: crate::clockid_t, + ) -> c_int; - pub fn pthread_getprocessorid_np() -> ::c_int; + pub fn pthread_getprocessorid_np() -> c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; } diff --git a/src/unix/nto/aarch64.rs b/src/unix/nto/aarch64.rs index 6faf8159c7172..0e4694315c73b 100644 --- a/src/unix/nto/aarch64.rs +++ b/src/unix/nto/aarch64.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_void, size_t}; + pub type c_char = u8; pub type wchar_t = u32; pub type c_long = i64; @@ -11,7 +13,7 @@ s! { } pub struct aarch64_fpu_registers { - pub reg: [::aarch64_qreg_t; 32], + pub reg: [crate::aarch64_qreg_t; 32], pub fpsr: u32, pub fpcr: u32, } @@ -24,13 +26,13 @@ s! { #[repr(align(16))] pub struct mcontext_t { - pub cpu: ::aarch64_cpu_registers, - pub fpu: ::aarch64_fpu_registers, + pub cpu: crate::aarch64_cpu_registers, + pub fpu: crate::aarch64_fpu_registers, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } } diff --git a/src/unix/nto/mod.rs b/src/unix/nto/mod.rs index 8363e6abc63ce..994720e82d440 100644 --- a/src/unix/nto/mod.rs +++ b/src/unix/nto/mod.rs @@ -1,22 +1,24 @@ +use crate::{c_int, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t}; + pub type clock_t = u32; pub type sa_family_t = u8; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; -pub type clockid_t = ::c_int; -pub type timer_t = ::c_int; -pub type key_t = ::c_uint; -pub type id_t = ::c_int; +pub type speed_t = c_uint; +pub type tcflag_t = c_uint; +pub type clockid_t = c_int; +pub type timer_t = c_int; +pub type key_t = c_uint; +pub type id_t = c_int; pub type useconds_t = u32; pub type dev_t = u32; pub type socklen_t = u32; pub type mode_t = u32; pub type rlim64_t = u64; -pub type mqd_t = ::c_int; -pub type nfds_t = ::c_uint; -pub type idtype_t = ::c_uint; -pub type errno_t = ::c_int; +pub type mqd_t = c_int; +pub type nfds_t = c_uint; +pub type idtype_t = c_uint; +pub type errno_t = c_int; pub type rsize_t = c_ulong; pub type Elf32_Half = u16; @@ -40,8 +42,8 @@ pub type Elf64_Section = u16; pub type _Time32t = u32; -pub type pthread_t = ::c_int; -pub type regoff_t = ::ssize_t; +pub type pthread_t = c_int; +pub type regoff_t = ssize_t; pub type nlink_t = u32; pub type blksize_t = u32; @@ -55,25 +57,25 @@ pub type msglen_t = u64; pub type fsblkcnt_t = u64; pub type fsfilcnt_t = u64; pub type rlim_t = u64; -pub type posix_spawn_file_actions_t = *mut ::c_void; -pub type posix_spawnattr_t = ::uintptr_t; - -pub type pthread_mutex_t = ::sync_t; -pub type pthread_mutexattr_t = ::_sync_attr; -pub type pthread_cond_t = ::sync_t; -pub type pthread_condattr_t = ::_sync_attr; -pub type pthread_rwlockattr_t = ::_sync_attr; -pub type pthread_key_t = ::c_int; +pub type posix_spawn_file_actions_t = *mut c_void; +pub type posix_spawnattr_t = crate::uintptr_t; + +pub type pthread_mutex_t = crate::sync_t; +pub type pthread_mutexattr_t = crate::_sync_attr; +pub type pthread_cond_t = crate::sync_t; +pub type pthread_condattr_t = crate::_sync_attr; +pub type pthread_rwlockattr_t = crate::_sync_attr; +pub type pthread_key_t = c_int; pub type pthread_spinlock_t = sync_t; pub type pthread_barrierattr_t = _sync_attr; pub type sem_t = sync_t; -pub type nl_item = ::c_int; +pub type nl_item = c_int; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } @@ -87,24 +89,24 @@ s! { } pub struct stat { - pub st_ino: ::ino_t, - pub st_size: ::off_t, - pub st_dev: ::dev_t, - pub st_rdev: ::dev_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub __old_st_mtime: ::_Time32t, - pub __old_st_atime: ::_Time32t, - pub __old_st_ctime: ::_Time32t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_blocksize: ::blksize_t, + pub st_ino: crate::ino_t, + pub st_size: off_t, + pub st_dev: crate::dev_t, + pub st_rdev: crate::dev_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub __old_st_mtime: crate::_Time32t, + pub __old_st_atime: crate::_Time32t, + pub __old_st_ctime: crate::_Time32t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_blocksize: crate::blksize_t, pub st_nblocks: i32, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_mtim: ::timespec, - pub st_atim: ::timespec, - pub st_ctim: ::timespec, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_mtim: crate::timespec, + pub st_atim: crate::timespec, + pub st_ctim: crate::timespec, } pub struct ip_mreq { @@ -114,143 +116,143 @@ s! { #[repr(packed)] pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct sockaddr { pub sa_len: u8, pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_in { pub sin_len: u8, pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [i8; 8], } pub struct sockaddr_in6 { pub sin6_len: u8, pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } // The order of the `ai_addr` field in this struct is crucial // for converting between the Rust and C types. pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, pub ai_addrlen: socklen_t, pub ai_canonname: *mut c_char, - pub ai_addr: *mut ::sockaddr, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, } pub struct fd_set { - fds_bits: [::c_uint; 2 * FD_SETSIZE as usize / ULONG_SIZE], + fds_bits: [c_uint; 2 * FD_SETSIZE as usize / ULONG_SIZE], } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *const ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_long, + pub tm_zone: *const c_char, } #[repr(align(8))] pub struct sched_param { - pub sched_priority: ::c_int, - pub sched_curpriority: ::c_int, - pub reserved: [::c_int; 10], + pub sched_priority: c_int, + pub sched_curpriority: c_int, + pub reserved: [c_int; 10], } #[repr(align(8))] pub struct __sched_param { - pub __sched_priority: ::c_int, - pub __sched_curpriority: ::c_int, - pub reserved: [::c_int; 10], + pub __sched_priority: c_int, + pub __sched_curpriority: c_int, + pub reserved: [c_int; 10], } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct lconv { - pub currency_symbol: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub frac_digits: ::c_char, - pub int_frac_digits: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub n_sign_posn: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - - pub decimal_point: *mut ::c_char, - pub grouping: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - - pub _Frac_grouping: *mut ::c_char, - pub _Frac_sep: *mut ::c_char, - pub _False: *mut ::c_char, - pub _True: *mut ::c_char, - - pub _No: *mut ::c_char, - pub _Yes: *mut ::c_char, - pub _Nostr: *mut ::c_char, - pub _Yesstr: *mut ::c_char, - pub _Reserved: [*mut ::c_char; 8], + pub currency_symbol: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_grouping: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub negative_sign: *mut c_char, + pub positive_sign: *mut c_char, + pub frac_digits: c_char, + pub int_frac_digits: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub n_sign_posn: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub p_sign_posn: c_char, + + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + + pub decimal_point: *mut c_char, + pub grouping: *mut c_char, + pub thousands_sep: *mut c_char, + + pub _Frac_grouping: *mut c_char, + pub _Frac_sep: *mut c_char, + pub _False: *mut c_char, + pub _True: *mut c_char, + + pub _No: *mut c_char, + pub _Yes: *mut c_char, + pub _Nostr: *mut c_char, + pub _Yesstr: *mut c_char, + pub _Reserved: [*mut c_char; 8], } pub struct in_pktinfo { - pub ipi_addr: ::in_addr, - pub ipi_ifindex: ::c_uint, + pub ipi_addr: crate::in_addr, + pub ipi_ifindex: c_uint, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, pub ifa_name: *mut c_char, - pub ifa_flags: ::c_uint, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_dstaddr: *mut ::sockaddr, - pub ifa_data: *mut ::c_void, + pub ifa_flags: c_uint, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_dstaddr: *mut crate::sockaddr, + pub ifa_data: *mut c_void, } pub struct arpreq { - pub arp_pa: ::sockaddr, - pub arp_ha: ::sockaddr, - pub arp_flags: ::c_int, + pub arp_pa: crate::sockaddr, + pub arp_ha: crate::sockaddr, + pub arp_flags: c_int, } #[repr(packed)] @@ -263,27 +265,27 @@ s! { } pub struct mmsghdr { - pub msg_hdr: ::msghdr, - pub msg_len: ::c_uint, + pub msg_hdr: crate::msghdr, + pub msg_len: c_uint, } #[repr(align(8))] pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, __data: [u8; 36], // union } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_flags: ::c_int, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_flags: c_int, + pub sa_mask: crate::sigset_t, } pub struct _sync { - _union: ::c_uint, - __owner: ::c_uint, + _union: c_uint, + __owner: c_uint, } pub struct rlimit64 { pub rlim_cur: rlim64_t, @@ -291,45 +293,45 @@ s! { } pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_matchc: ::c_int, + pub gl_pathc: size_t, + pub gl_matchc: c_int, pub gl_pathv: *mut *mut c_char, - pub gl_offs: ::size_t, - pub gl_flags: ::c_int, - pub gl_errfunc: extern "C" fn(*const ::c_char, ::c_int) -> ::c_int, + pub gl_offs: size_t, + pub gl_flags: c_int, + pub gl_errfunc: extern "C" fn(*const c_char, c_int) -> c_int, - __unused1: *mut ::c_void, - __unused2: *mut ::c_void, - __unused3: *mut ::c_void, - __unused4: *mut ::c_void, - __unused5: *mut ::c_void, + __unused1: *mut c_void, + __unused2: *mut c_void, + __unused3: *mut c_void, + __unused4: *mut c_void, + __unused5: *mut c_void, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_age: *mut ::c_char, - pub pw_comment: *mut ::c_char, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_age: *mut c_char, + pub pw_comment: *mut c_char, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } pub struct sembuf { - pub sem_num: ::c_ushort, - pub sem_op: ::c_short, - pub sem_flg: ::c_short, + pub sem_num: c_ushort, + pub sem_op: c_short, + pub sem_flg: c_short, } pub struct Elf32_Ehdr { - pub e_ident: [::c_uchar; 16], + pub e_ident: [c_uchar; 16], pub e_type: Elf32_Half, pub e_machine: Elf32_Half, pub e_version: Elf32_Word, @@ -346,7 +348,7 @@ s! { } pub struct Elf64_Ehdr { - pub e_ident: [::c_uchar; 16], + pub e_ident: [c_uchar; 16], pub e_type: Elf64_Half, pub e_machine: Elf64_Half, pub e_version: Elf64_Word, @@ -366,15 +368,15 @@ s! { pub st_name: Elf32_Word, pub st_value: Elf32_Addr, pub st_size: Elf32_Word, - pub st_info: ::c_uchar, - pub st_other: ::c_uchar, + pub st_info: c_uchar, + pub st_other: c_uchar, pub st_shndx: Elf32_Section, } pub struct Elf64_Sym { pub st_name: Elf64_Word, - pub st_info: ::c_uchar, - pub st_other: ::c_uchar, + pub st_info: c_uchar, + pub st_other: c_uchar, pub st_shndx: Elf64_Section, pub st_value: Elf64_Addr, pub st_size: Elf64_Xword, @@ -429,12 +431,12 @@ s! { } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } pub struct inotify_event { - pub wd: ::c_int, + pub wd: c_int, pub mask: u32, pub cookie: u32, pub len: u32, @@ -446,148 +448,148 @@ s! { } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], - __reserved: [::c_uint; 3], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; crate::NCCS], + __reserved: [c_uint; 3], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct mallinfo { - pub arena: ::c_int, - pub ordblks: ::c_int, - pub smblks: ::c_int, - pub hblks: ::c_int, - pub hblkhd: ::c_int, - pub usmblks: ::c_int, - pub fsmblks: ::c_int, - pub uordblks: ::c_int, - pub fordblks: ::c_int, - pub keepcost: ::c_int, + pub arena: c_int, + pub ordblks: c_int, + pub smblks: c_int, + pub hblks: c_int, + pub hblkhd: c_int, + pub usmblks: c_int, + pub fsmblks: c_int, + pub uordblks: c_int, + pub fordblks: c_int, + pub keepcost: c_int, } pub struct flock { pub l_type: i16, pub l_whence: i16, pub l_zero1: i32, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_pid: ::pid_t, + pub l_start: off_t, + pub l_len: off_t, + pub l_pid: crate::pid_t, pub l_sysid: u32, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_basetype: [::c_char; 16], - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - f_filler: [::c_uint; 21], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_basetype: [c_char; 16], + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + f_filler: [c_uint; 21], } pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_reqprio: ::c_int, + pub aio_fildes: c_int, + pub aio_reqprio: c_int, pub aio_offset: off_t, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_sigevent: ::sigevent, - pub aio_lio_opcode: ::c_int, - pub _aio_lio_state: *mut ::c_void, - _aio_pad: [::c_int; 3], - pub _aio_next: *mut ::aiocb, - pub _aio_flag: ::c_uint, - pub _aio_iotype: ::c_uint, - pub _aio_result: ::ssize_t, - pub _aio_error: ::c_uint, - pub _aio_suspend: *mut ::c_void, - pub _aio_plist: *mut ::c_void, - pub _aio_policy: ::c_int, - pub _aio_param: ::__sched_param, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_sigevent: crate::sigevent, + pub aio_lio_opcode: c_int, + pub _aio_lio_state: *mut c_void, + _aio_pad: [c_int; 3], + pub _aio_next: *mut crate::aiocb, + pub _aio_flag: c_uint, + pub _aio_iotype: c_uint, + pub _aio_result: ssize_t, + pub _aio_error: c_uint, + pub _aio_suspend: *mut c_void, + pub _aio_plist: *mut c_void, + pub _aio_policy: c_int, + pub _aio_param: crate::__sched_param, } pub struct pthread_attr_t { - __data1: ::c_long, + __data1: c_long, __data2: [u8; 96], } pub struct ipc_perm { - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub seq: ::c_uint, - pub key: ::key_t, - _reserved: [::c_int; 4], + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub seq: c_uint, + pub key: crate::key_t, + _reserved: [c_int; 4], } pub struct regex_t { - re_magic: ::c_int, - re_nsub: ::size_t, - re_endp: *const ::c_char, - re_g: *mut ::c_void, + re_magic: c_int, + re_nsub: size_t, + re_endp: *const c_char, + re_g: *mut c_void, } pub struct _thread_attr { - pub __flags: ::c_int, - pub __stacksize: ::size_t, - pub __stackaddr: *mut ::c_void, - pub __exitfunc: ::Option, - pub __policy: ::c_int, - pub __param: ::__sched_param, - pub __guardsize: ::c_uint, - pub __prealloc: ::c_uint, - __spare: [::c_int; 2], + pub __flags: c_int, + pub __stacksize: size_t, + pub __stackaddr: *mut c_void, + pub __exitfunc: Option, + pub __policy: c_int, + pub __param: crate::__sched_param, + pub __guardsize: c_uint, + pub __prealloc: c_uint, + __spare: [c_int; 2], } pub struct _sync_attr { - pub __protocol: ::c_int, - pub __flags: ::c_int, - pub __prioceiling: ::c_int, - pub __clockid: ::c_int, - pub __count: ::c_int, - __reserved: [::c_int; 3], + pub __protocol: c_int, + pub __flags: c_int, + pub __prioceiling: c_int, + pub __clockid: c_int, + pub __count: c_int, + __reserved: [c_int; 3], } pub struct sockcred { - pub sc_uid: ::uid_t, - pub sc_euid: ::uid_t, - pub sc_gid: ::gid_t, - pub sc_egid: ::gid_t, - pub sc_ngroups: ::c_int, - pub sc_groups: [::gid_t; 1], + pub sc_uid: crate::uid_t, + pub sc_euid: crate::uid_t, + pub sc_gid: crate::gid_t, + pub sc_egid: crate::gid_t, + pub sc_ngroups: c_int, + pub sc_groups: [crate::gid_t; 1], } pub struct bpf_program { - pub bf_len: ::c_uint, - pub bf_insns: *mut ::bpf_insn, + pub bf_len: c_uint, + pub bf_insns: *mut crate::bpf_insn, } pub struct bpf_stat { @@ -598,12 +600,12 @@ s! { } pub struct bpf_version { - pub bv_major: ::c_ushort, - pub bv_minor: ::c_ushort, + pub bv_major: c_ushort, + pub bv_minor: c_ushort, } pub struct bpf_hdr { - pub bh_tstamp: ::timeval, + pub bh_tstamp: crate::timeval, pub bh_caplen: u32, pub bh_datalen: u32, pub bh_hdrlen: u16, @@ -611,33 +613,33 @@ s! { pub struct bpf_insn { pub code: u16, - pub jt: ::c_uchar, - pub jf: ::c_uchar, + pub jt: c_uchar, + pub jf: c_uchar, pub k: u32, } pub struct bpf_dltlist { - pub bfl_len: ::c_uint, - pub bfl_list: *mut ::c_uint, + pub bfl_len: c_uint, + pub bfl_list: *mut c_uint, } pub struct unpcbid { - pub unp_pid: ::pid_t, - pub unp_euid: ::uid_t, - pub unp_egid: ::gid_t, + pub unp_pid: crate::pid_t, + pub unp_euid: crate::uid_t, + pub unp_egid: crate::gid_t, } pub struct dl_phdr_info { - pub dlpi_addr: ::Elf64_Addr, - pub dlpi_name: *const ::c_char, - pub dlpi_phdr: *const ::Elf64_Phdr, - pub dlpi_phnum: ::Elf64_Half, + pub dlpi_addr: crate::Elf64_Addr, + pub dlpi_name: *const c_char, + pub dlpi_phdr: *const crate::Elf64_Phdr, + pub dlpi_phnum: crate::Elf64_Half, } #[repr(align(8))] pub struct ucontext_t { pub uc_link: *mut ucontext_t, - pub uc_sigmask: ::sigset_t, + pub uc_sigmask: crate::sigset_t, pub uc_stack: stack_t, pub uc_mcontext: mcontext_t, } @@ -647,39 +649,39 @@ s_no_extra_traits! { pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, - pub sun_path: [::c_char; 104], + pub sun_path: [c_char; 104], } pub struct sockaddr_storage { pub ss_len: u8, pub ss_family: sa_family_t, - __ss_pad1: [::c_char; 6], + __ss_pad1: [c_char; 6], __ss_align: i64, - __ss_pad2: [::c_char; 112], + __ss_pad2: [c_char; 112], } pub struct utsname { - pub sysname: [::c_char; _SYSNAME_SIZE], - pub nodename: [::c_char; _SYSNAME_SIZE], - pub release: [::c_char; _SYSNAME_SIZE], - pub version: [::c_char; _SYSNAME_SIZE], - pub machine: [::c_char; _SYSNAME_SIZE], + pub sysname: [c_char; _SYSNAME_SIZE], + pub nodename: [c_char; _SYSNAME_SIZE], + pub release: [c_char; _SYSNAME_SIZE], + pub version: [c_char; _SYSNAME_SIZE], + pub machine: [c_char; _SYSNAME_SIZE], } pub struct sigevent { - pub sigev_notify: ::c_int, - pub __padding1: ::c_int, - pub sigev_signo: ::c_int, // union - pub __padding2: ::c_int, - pub sigev_value: ::sigval, + pub sigev_notify: c_int, + pub __padding1: c_int, + pub sigev_signo: c_int, // union + pub __padding2: c_int, + pub sigev_value: crate::sigval, __sigev_un2: usize, // union } pub struct dirent { - pub d_ino: ::ino_t, - pub d_offset: ::off_t, - pub d_reclen: ::c_short, - pub d_namelen: ::c_short, - pub d_name: [::c_char; 1], // flex array + pub d_ino: crate::ino_t, + pub d_offset: off_t, + pub d_reclen: c_short, + pub d_namelen: c_short, + pub d_name: [c_char; 1], // flex array } pub struct sigset_t { @@ -687,54 +689,54 @@ s_no_extra_traits! { } pub struct mq_attr { - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_flags: ::c_long, - pub mq_curmsgs: ::c_long, - pub mq_sendwait: ::c_long, - pub mq_recvwait: ::c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_flags: c_long, + pub mq_curmsgs: c_long, + pub mq_sendwait: c_long, + pub mq_recvwait: c_long, } pub struct msg { - pub msg_next: *mut ::msg, - pub msg_type: ::c_long, - pub msg_ts: ::c_ushort, - pub msg_spot: ::c_short, + pub msg_next: *mut crate::msg, + pub msg_type: c_long, + pub msg_ts: c_ushort, + pub msg_spot: c_short, _pad: [u8; 4], } pub struct msqid_ds { - pub msg_perm: ::ipc_perm, - pub msg_first: *mut ::msg, - pub msg_last: *mut ::msg, - pub msg_cbytes: ::msglen_t, - pub msg_qnum: ::msgqnum_t, - pub msg_qbytes: ::msglen_t, - pub msg_lspid: ::pid_t, - pub msg_lrpid: ::pid_t, - pub msg_stime: ::time_t, - msg_pad1: ::c_long, - pub msg_rtime: ::time_t, - msg_pad2: ::c_long, - pub msg_ctime: ::time_t, - msg_pad3: ::c_long, - msg_pad4: [::c_long; 4], + pub msg_perm: crate::ipc_perm, + pub msg_first: *mut crate::msg, + pub msg_last: *mut crate::msg, + pub msg_cbytes: crate::msglen_t, + pub msg_qnum: crate::msgqnum_t, + pub msg_qbytes: crate::msglen_t, + pub msg_lspid: crate::pid_t, + pub msg_lrpid: crate::pid_t, + pub msg_stime: crate::time_t, + msg_pad1: c_long, + pub msg_rtime: crate::time_t, + msg_pad2: c_long, + pub msg_ctime: crate::time_t, + msg_pad3: c_long, + msg_pad4: [c_long; 4], } pub struct sockaddr_dl { - pub sdl_len: ::c_uchar, - pub sdl_family: ::sa_family_t, + pub sdl_len: c_uchar, + pub sdl_family: crate::sa_family_t, pub sdl_index: u16, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 12], + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 12], } pub struct sync_t { - __u: ::c_uint, // union - pub __owner: ::c_uint, + __u: c_uint, // union + pub __owner: c_uint, } #[repr(align(4))] @@ -744,15 +746,15 @@ s_no_extra_traits! { } pub struct pthread_rwlock_t { - pub __active: ::c_int, - pub __blockedwriters: ::c_int, - pub __blockedreaders: ::c_int, - pub __heavy: ::c_int, - pub __lock: ::pthread_mutex_t, // union - pub __rcond: ::pthread_cond_t, // union - pub __wcond: ::pthread_cond_t, // union - pub __owner: ::c_uint, - pub __spare: ::c_uint, + pub __active: c_int, + pub __blockedwriters: c_int, + pub __blockedreaders: c_int, + pub __heavy: c_int, + pub __lock: crate::pthread_mutex_t, // union + pub __rcond: crate::pthread_cond_t, // union + pub __wcond: crate::pthread_cond_t, // union + pub __owner: c_uint, + pub __spare: c_uint, } } @@ -768,8 +770,8 @@ cfg_if! { } } impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -778,8 +780,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_notify.hash(state); self.sigev_signo.hash(state); self.sigev_value.hash(state); @@ -799,8 +801,8 @@ cfg_if! { } } impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_len", &self.sun_len) .field("sun_family", &self.sun_family) @@ -809,8 +811,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_len.hash(state); self.sun_family.hash(state); self.sun_path.hash(state); @@ -824,22 +826,22 @@ cfg_if! { } } impl Eq for sigset_t {} - impl ::fmt::Debug for sigset_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigset_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigset_t") .field("__val", &self.__val) .finish() } } - impl ::hash::Hash for sigset_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigset_t { + fn hash(&self, state: &mut H) { self.__val.hash(state); } } // msg - impl ::fmt::Debug for msg { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for msg { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("msg") .field("msg_next", &self.msg_next) .field("msg_type", &self.msg_type) @@ -850,8 +852,8 @@ cfg_if! { } // msqid_ds - impl ::fmt::Debug for msqid_ds { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for msqid_ds { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("msqid_ds") .field("msg_perm", &self.msg_perm) .field("msg_first", &self.msg_first) @@ -868,8 +870,8 @@ cfg_if! { } // sockaddr_dl - impl ::fmt::Debug for sockaddr_dl { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_dl { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_dl") .field("sdl_len", &self.sdl_len) .field("sdl_family", &self.sdl_family) @@ -899,8 +901,8 @@ cfg_if! { } } impl Eq for sockaddr_dl {} - impl ::hash::Hash for sockaddr_dl { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_dl { + fn hash(&self, state: &mut H) { self.sdl_len.hash(state); self.sdl_family.hash(state); self.sdl_index.hash(state); @@ -913,8 +915,8 @@ cfg_if! { } // sync_t - impl ::fmt::Debug for sync_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sync_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sync_t") .field("__owner", &self.__owner) .field("__u", &self.__u) @@ -923,8 +925,8 @@ cfg_if! { } // pthread_barrier_t - impl ::fmt::Debug for pthread_barrier_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_barrier_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_barrier_t") .field("__pad", &self.__pad) .finish() @@ -932,8 +934,8 @@ cfg_if! { } // pthread_rwlock_t - impl ::fmt::Debug for pthread_rwlock_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pthread_rwlock_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("pthread_rwlock_t") .field("__active", &self.__active) .field("__blockedwriters", &self.__blockedwriters) @@ -949,8 +951,8 @@ cfg_if! { } // syspage_entry - impl ::fmt::Debug for syspage_entry { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for syspage_entry { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("syspage_entry") .field("size", &self.size) .field("total_size", &self.total_size) @@ -1010,8 +1012,8 @@ cfg_if! { impl Eq for utsname {} - impl ::fmt::Debug for utsname { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utsname { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utsname") // FIXME: .field("sysname", &self.sysname) // FIXME: .field("nodename", &self.nodename) @@ -1022,8 +1024,8 @@ cfg_if! { } } - impl ::hash::Hash for utsname { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utsname { + fn hash(&self, state: &mut H) { self.sysname.hash(state); self.nodename.hash(state); self.release.hash(state); @@ -1046,8 +1048,8 @@ cfg_if! { impl Eq for mq_attr {} - impl ::fmt::Debug for mq_attr { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mq_attr { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mq_attr") .field("mq_maxmsg", &self.mq_maxmsg) .field("mq_msgsize", &self.mq_msgsize) @@ -1059,8 +1061,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for mq_attr { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for mq_attr { + fn hash(&self, state: &mut H) { self.mq_maxmsg.hash(state); self.mq_msgsize.hash(state); self.mq_flags.hash(state); @@ -1086,8 +1088,8 @@ cfg_if! { impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -1098,8 +1100,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_len.hash(state); self.ss_family.hash(state); self.__ss_pad1.hash(state); @@ -1123,8 +1125,8 @@ cfg_if! { impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_offset", &self.d_offset) @@ -1135,8 +1137,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_offset.hash(state); self.d_reclen.hash(state); @@ -1148,8 +1150,8 @@ cfg_if! { } pub const _SYSNAME_SIZE: usize = 256 + 1; -pub const RLIM_INFINITY: ::rlim_t = 0xfffffffffffffffd; -pub const O_LARGEFILE: ::c_int = 0o0100000; +pub const RLIM_INFINITY: crate::rlim_t = 0xfffffffffffffffd; +pub const O_LARGEFILE: c_int = 0o0100000; // intentionally not public, only used for fd_set cfg_if! { @@ -1162,312 +1164,312 @@ cfg_if! { } } -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 32767; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 2; -pub const _IOLBF: ::c_int = 1; - -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; - -pub const F_DUPFD_CLOEXEC: ::c_int = 5; - -pub const SIGTRAP: ::c_int = 5; - -pub const CLOCK_REALTIME: ::clockid_t = 0; -pub const CLOCK_MONOTONIC: ::clockid_t = 2; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 3; -pub const CLOCK_THREAD_CPUTIME_ID: ::clockid_t = 4; -pub const TIMER_ABSTIME: ::c_uint = 0x80000000; - -pub const RUSAGE_SELF: ::c_int = 0; - -pub const F_OK: ::c_int = 0; -pub const X_OK: ::c_int = 1; -pub const W_OK: ::c_int = 2; -pub const R_OK: ::c_int = 4; - -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; - -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; - -pub const PROT_NONE: ::c_int = 0x00000000; -pub const PROT_READ: ::c_int = 0x00000100; -pub const PROT_WRITE: ::c_int = 0x00000200; -pub const PROT_EXEC: ::c_int = 0x00000400; - -pub const MAP_FILE: ::c_int = 0; -pub const MAP_SHARED: ::c_int = 1; -pub const MAP_PRIVATE: ::c_int = 2; -pub const MAP_FIXED: ::c_int = 0x10; - -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MS_ASYNC: ::c_int = 1; -pub const MS_INVALIDATE: ::c_int = 4; -pub const MS_SYNC: ::c_int = 2; - -pub const SCM_RIGHTS: ::c_int = 0x01; -pub const SCM_TIMESTAMP: ::c_int = 0x02; -pub const SCM_CREDS: ::c_int = 0x04; - -pub const MAP_TYPE: ::c_int = 0x3; - -pub const IFF_UP: ::c_int = 0x00000001; -pub const IFF_BROADCAST: ::c_int = 0x00000002; -pub const IFF_DEBUG: ::c_int = 0x00000004; -pub const IFF_LOOPBACK: ::c_int = 0x00000008; -pub const IFF_POINTOPOINT: ::c_int = 0x00000010; -pub const IFF_NOTRAILERS: ::c_int = 0x00000020; -pub const IFF_RUNNING: ::c_int = 0x00000040; -pub const IFF_NOARP: ::c_int = 0x00000080; -pub const IFF_PROMISC: ::c_int = 0x00000100; -pub const IFF_ALLMULTI: ::c_int = 0x00000200; -pub const IFF_MULTICAST: ::c_int = 0x00008000; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = AF_LOCAL; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_IPX: ::c_int = 23; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_INET6: ::c_int = 24; -pub const AF_ROUTE: ::c_int = 17; -pub const AF_SNA: ::c_int = 11; -pub const AF_BLUETOOTH: ::c_int = 31; -pub const AF_ISDN: ::c_int = 26; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_UNIX: ::c_int = PF_LOCAL; -pub const PF_LOCAL: ::c_int = AF_LOCAL; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_INET6: ::c_int = AF_INET6; -pub const pseudo_AF_KEY: ::c_int = 29; -pub const PF_KEY: ::c_int = pseudo_AF_KEY; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_SNA: ::c_int = AF_SNA; - -pub const PF_BLUETOOTH: ::c_int = AF_BLUETOOTH; -pub const PF_ISDN: ::c_int = AF_ISDN; - -pub const SOMAXCONN: ::c_int = 128; - -pub const MSG_OOB: ::c_int = 0x0001; -pub const MSG_PEEK: ::c_int = 0x0002; -pub const MSG_DONTROUTE: ::c_int = 0x0004; -pub const MSG_CTRUNC: ::c_int = 0x0020; -pub const MSG_TRUNC: ::c_int = 0x0010; -pub const MSG_DONTWAIT: ::c_int = 0x0080; -pub const MSG_EOR: ::c_int = 0x0008; -pub const MSG_WAITALL: ::c_int = 0x0040; -pub const MSG_NOSIGNAL: ::c_int = 0x0800; -pub const MSG_WAITFORONE: ::c_int = 0x2000; - -pub const IP_TOS: ::c_int = 3; -pub const IP_TTL: ::c_int = 4; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_OPTIONS: ::c_int = 1; -pub const IP_RECVOPTS: ::c_int = 5; -pub const IP_RETOPTS: ::c_int = 8; -pub const IP_PKTINFO: ::c_int = 25; -pub const IP_IPSEC_POLICY_COMPAT: ::c_int = 22; -pub const IP_MULTICAST_IF: ::c_int = 9; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; -pub const IP_DEFAULT_MULTICAST_TTL: ::c_int = 1; -pub const IP_DEFAULT_MULTICAST_LOOP: ::c_int = 1; - -pub const IPPROTO_HOPOPTS: ::c_int = 0; -pub const IPPROTO_IGMP: ::c_int = 2; -pub const IPPROTO_IPIP: ::c_int = 4; -pub const IPPROTO_EGP: ::c_int = 8; -pub const IPPROTO_PUP: ::c_int = 12; -pub const IPPROTO_IDP: ::c_int = 22; -pub const IPPROTO_TP: ::c_int = 29; -pub const IPPROTO_ROUTING: ::c_int = 43; -pub const IPPROTO_FRAGMENT: ::c_int = 44; -pub const IPPROTO_RSVP: ::c_int = 46; -pub const IPPROTO_GRE: ::c_int = 47; -pub const IPPROTO_ESP: ::c_int = 50; -pub const IPPROTO_AH: ::c_int = 51; -pub const IPPROTO_NONE: ::c_int = 59; -pub const IPPROTO_DSTOPTS: ::c_int = 60; -pub const IPPROTO_ENCAP: ::c_int = 98; -pub const IPPROTO_PIM: ::c_int = 103; -pub const IPPROTO_SCTP: ::c_int = 132; -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_MAX: ::c_int = 256; -pub const IPPROTO_CARP: ::c_int = 112; -pub const IPPROTO_DIVERT: ::c_int = 259; -pub const IPPROTO_DONE: ::c_int = 257; -pub const IPPROTO_EON: ::c_int = 80; -pub const IPPROTO_ETHERIP: ::c_int = 97; -pub const IPPROTO_GGP: ::c_int = 3; -pub const IPPROTO_IPCOMP: ::c_int = 108; -pub const IPPROTO_MOBILE: ::c_int = 55; - -pub const IPV6_RTHDR_LOOSE: ::c_int = 0; -pub const IPV6_RTHDR_STRICT: ::c_int = 1; -pub const IPV6_UNICAST_HOPS: ::c_int = 4; -pub const IPV6_MULTICAST_IF: ::c_int = 9; -pub const IPV6_MULTICAST_HOPS: ::c_int = 10; -pub const IPV6_MULTICAST_LOOP: ::c_int = 11; -pub const IPV6_JOIN_GROUP: ::c_int = 12; -pub const IPV6_LEAVE_GROUP: ::c_int = 13; -pub const IPV6_CHECKSUM: ::c_int = 26; -pub const IPV6_V6ONLY: ::c_int = 27; -pub const IPV6_IPSEC_POLICY_COMPAT: ::c_int = 28; -pub const IPV6_RTHDRDSTOPTS: ::c_int = 35; -pub const IPV6_RECVPKTINFO: ::c_int = 36; -pub const IPV6_RECVHOPLIMIT: ::c_int = 37; -pub const IPV6_RECVRTHDR: ::c_int = 38; -pub const IPV6_RECVHOPOPTS: ::c_int = 39; -pub const IPV6_RECVDSTOPTS: ::c_int = 40; -pub const IPV6_RECVPATHMTU: ::c_int = 43; -pub const IPV6_PATHMTU: ::c_int = 44; -pub const IPV6_PKTINFO: ::c_int = 46; -pub const IPV6_HOPLIMIT: ::c_int = 47; -pub const IPV6_NEXTHOP: ::c_int = 48; -pub const IPV6_HOPOPTS: ::c_int = 49; -pub const IPV6_DSTOPTS: ::c_int = 50; -pub const IPV6_RECVTCLASS: ::c_int = 57; -pub const IPV6_TCLASS: ::c_int = 61; -pub const IPV6_DONTFRAG: ::c_int = 62; - -pub const TCP_NODELAY: ::c_int = 0x01; -pub const TCP_MAXSEG: ::c_int = 0x02; -pub const TCP_MD5SIG: ::c_int = 0x10; -pub const TCP_KEEPALIVE: ::c_int = 0x04; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const LOCK_SH: ::c_int = 0x1; -pub const LOCK_EX: ::c_int = 0x2; -pub const LOCK_NB: ::c_int = 0x4; -pub const LOCK_UN: ::c_int = 0x8; - -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 2; - -pub const PATH_MAX: ::c_int = 1024; - -pub const UIO_MAXIOV: ::c_int = 1024; - -pub const FD_SETSIZE: ::c_int = 256; - -pub const TCIOFF: ::c_int = 0x0002; -pub const TCION: ::c_int = 0x0003; -pub const TCOOFF: ::c_int = 0x0000; -pub const TCOON: ::c_int = 0x0001; -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; -pub const NL0: ::tcflag_t = 0x000; -pub const NL1: ::tcflag_t = 0x100; -pub const TAB0: ::tcflag_t = 0x0000; -pub const CR0: ::tcflag_t = 0x000; -pub const FF0: ::tcflag_t = 0x0000; -pub const BS0: ::tcflag_t = 0x0000; -pub const VT0: ::tcflag_t = 0x0000; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 32767; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 2; +pub const _IOLBF: c_int = 1; + +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; + +pub const F_DUPFD_CLOEXEC: c_int = 5; + +pub const SIGTRAP: c_int = 5; + +pub const CLOCK_REALTIME: crate::clockid_t = 0; +pub const CLOCK_MONOTONIC: crate::clockid_t = 2; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 3; +pub const CLOCK_THREAD_CPUTIME_ID: crate::clockid_t = 4; +pub const TIMER_ABSTIME: c_uint = 0x80000000; + +pub const RUSAGE_SELF: c_int = 0; + +pub const F_OK: c_int = 0; +pub const X_OK: c_int = 1; +pub const W_OK: c_int = 2; +pub const R_OK: c_int = 4; + +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; + +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; + +pub const PROT_NONE: c_int = 0x00000000; +pub const PROT_READ: c_int = 0x00000100; +pub const PROT_WRITE: c_int = 0x00000200; +pub const PROT_EXEC: c_int = 0x00000400; + +pub const MAP_FILE: c_int = 0; +pub const MAP_SHARED: c_int = 1; +pub const MAP_PRIVATE: c_int = 2; +pub const MAP_FIXED: c_int = 0x10; + +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; + +pub const MS_ASYNC: c_int = 1; +pub const MS_INVALIDATE: c_int = 4; +pub const MS_SYNC: c_int = 2; + +pub const SCM_RIGHTS: c_int = 0x01; +pub const SCM_TIMESTAMP: c_int = 0x02; +pub const SCM_CREDS: c_int = 0x04; + +pub const MAP_TYPE: c_int = 0x3; + +pub const IFF_UP: c_int = 0x00000001; +pub const IFF_BROADCAST: c_int = 0x00000002; +pub const IFF_DEBUG: c_int = 0x00000004; +pub const IFF_LOOPBACK: c_int = 0x00000008; +pub const IFF_POINTOPOINT: c_int = 0x00000010; +pub const IFF_NOTRAILERS: c_int = 0x00000020; +pub const IFF_RUNNING: c_int = 0x00000040; +pub const IFF_NOARP: c_int = 0x00000080; +pub const IFF_PROMISC: c_int = 0x00000100; +pub const IFF_ALLMULTI: c_int = 0x00000200; +pub const IFF_MULTICAST: c_int = 0x00008000; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_LOCAL: c_int = 1; +pub const AF_INET: c_int = 2; +pub const AF_IPX: c_int = 23; +pub const AF_APPLETALK: c_int = 16; +pub const AF_INET6: c_int = 24; +pub const AF_ROUTE: c_int = 17; +pub const AF_SNA: c_int = 11; +pub const AF_BLUETOOTH: c_int = 31; +pub const AF_ISDN: c_int = 26; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_UNIX: c_int = PF_LOCAL; +pub const PF_LOCAL: c_int = AF_LOCAL; +pub const PF_INET: c_int = AF_INET; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_INET6: c_int = AF_INET6; +pub const pseudo_AF_KEY: c_int = 29; +pub const PF_KEY: c_int = pseudo_AF_KEY; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_SNA: c_int = AF_SNA; + +pub const PF_BLUETOOTH: c_int = AF_BLUETOOTH; +pub const PF_ISDN: c_int = AF_ISDN; + +pub const SOMAXCONN: c_int = 128; + +pub const MSG_OOB: c_int = 0x0001; +pub const MSG_PEEK: c_int = 0x0002; +pub const MSG_DONTROUTE: c_int = 0x0004; +pub const MSG_CTRUNC: c_int = 0x0020; +pub const MSG_TRUNC: c_int = 0x0010; +pub const MSG_DONTWAIT: c_int = 0x0080; +pub const MSG_EOR: c_int = 0x0008; +pub const MSG_WAITALL: c_int = 0x0040; +pub const MSG_NOSIGNAL: c_int = 0x0800; +pub const MSG_WAITFORONE: c_int = 0x2000; + +pub const IP_TOS: c_int = 3; +pub const IP_TTL: c_int = 4; +pub const IP_HDRINCL: c_int = 2; +pub const IP_OPTIONS: c_int = 1; +pub const IP_RECVOPTS: c_int = 5; +pub const IP_RETOPTS: c_int = 8; +pub const IP_PKTINFO: c_int = 25; +pub const IP_IPSEC_POLICY_COMPAT: c_int = 22; +pub const IP_MULTICAST_IF: c_int = 9; +pub const IP_MULTICAST_TTL: c_int = 10; +pub const IP_MULTICAST_LOOP: c_int = 11; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; +pub const IP_DEFAULT_MULTICAST_TTL: c_int = 1; +pub const IP_DEFAULT_MULTICAST_LOOP: c_int = 1; + +pub const IPPROTO_HOPOPTS: c_int = 0; +pub const IPPROTO_IGMP: c_int = 2; +pub const IPPROTO_IPIP: c_int = 4; +pub const IPPROTO_EGP: c_int = 8; +pub const IPPROTO_PUP: c_int = 12; +pub const IPPROTO_IDP: c_int = 22; +pub const IPPROTO_TP: c_int = 29; +pub const IPPROTO_ROUTING: c_int = 43; +pub const IPPROTO_FRAGMENT: c_int = 44; +pub const IPPROTO_RSVP: c_int = 46; +pub const IPPROTO_GRE: c_int = 47; +pub const IPPROTO_ESP: c_int = 50; +pub const IPPROTO_AH: c_int = 51; +pub const IPPROTO_NONE: c_int = 59; +pub const IPPROTO_DSTOPTS: c_int = 60; +pub const IPPROTO_ENCAP: c_int = 98; +pub const IPPROTO_PIM: c_int = 103; +pub const IPPROTO_SCTP: c_int = 132; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_MAX: c_int = 256; +pub const IPPROTO_CARP: c_int = 112; +pub const IPPROTO_DIVERT: c_int = 259; +pub const IPPROTO_DONE: c_int = 257; +pub const IPPROTO_EON: c_int = 80; +pub const IPPROTO_ETHERIP: c_int = 97; +pub const IPPROTO_GGP: c_int = 3; +pub const IPPROTO_IPCOMP: c_int = 108; +pub const IPPROTO_MOBILE: c_int = 55; + +pub const IPV6_RTHDR_LOOSE: c_int = 0; +pub const IPV6_RTHDR_STRICT: c_int = 1; +pub const IPV6_UNICAST_HOPS: c_int = 4; +pub const IPV6_MULTICAST_IF: c_int = 9; +pub const IPV6_MULTICAST_HOPS: c_int = 10; +pub const IPV6_MULTICAST_LOOP: c_int = 11; +pub const IPV6_JOIN_GROUP: c_int = 12; +pub const IPV6_LEAVE_GROUP: c_int = 13; +pub const IPV6_CHECKSUM: c_int = 26; +pub const IPV6_V6ONLY: c_int = 27; +pub const IPV6_IPSEC_POLICY_COMPAT: c_int = 28; +pub const IPV6_RTHDRDSTOPTS: c_int = 35; +pub const IPV6_RECVPKTINFO: c_int = 36; +pub const IPV6_RECVHOPLIMIT: c_int = 37; +pub const IPV6_RECVRTHDR: c_int = 38; +pub const IPV6_RECVHOPOPTS: c_int = 39; +pub const IPV6_RECVDSTOPTS: c_int = 40; +pub const IPV6_RECVPATHMTU: c_int = 43; +pub const IPV6_PATHMTU: c_int = 44; +pub const IPV6_PKTINFO: c_int = 46; +pub const IPV6_HOPLIMIT: c_int = 47; +pub const IPV6_NEXTHOP: c_int = 48; +pub const IPV6_HOPOPTS: c_int = 49; +pub const IPV6_DSTOPTS: c_int = 50; +pub const IPV6_RECVTCLASS: c_int = 57; +pub const IPV6_TCLASS: c_int = 61; +pub const IPV6_DONTFRAG: c_int = 62; + +pub const TCP_NODELAY: c_int = 0x01; +pub const TCP_MAXSEG: c_int = 0x02; +pub const TCP_MD5SIG: c_int = 0x10; +pub const TCP_KEEPALIVE: c_int = 0x04; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const LOCK_SH: c_int = 0x1; +pub const LOCK_EX: c_int = 0x2; +pub const LOCK_NB: c_int = 0x4; +pub const LOCK_UN: c_int = 0x8; + +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 2; + +pub const PATH_MAX: c_int = 1024; + +pub const UIO_MAXIOV: c_int = 1024; + +pub const FD_SETSIZE: c_int = 256; + +pub const TCIOFF: c_int = 0x0002; +pub const TCION: c_int = 0x0003; +pub const TCOOFF: c_int = 0x0000; +pub const TCOON: c_int = 0x0001; +pub const TCIFLUSH: c_int = 0; +pub const TCOFLUSH: c_int = 1; +pub const TCIOFLUSH: c_int = 2; +pub const NL0: crate::tcflag_t = 0x000; +pub const NL1: crate::tcflag_t = 0x100; +pub const TAB0: crate::tcflag_t = 0x0000; +pub const CR0: crate::tcflag_t = 0x000; +pub const FF0: crate::tcflag_t = 0x0000; +pub const BS0: crate::tcflag_t = 0x0000; +pub const VT0: crate::tcflag_t = 0x0000; pub const VERASE: usize = 2; pub const VKILL: usize = 3; pub const VINTR: usize = 0; pub const VQUIT: usize = 1; pub const VLNEXT: usize = 15; -pub const IGNBRK: ::tcflag_t = 0x00000001; -pub const BRKINT: ::tcflag_t = 0x00000002; -pub const IGNPAR: ::tcflag_t = 0x00000004; -pub const PARMRK: ::tcflag_t = 0x00000008; -pub const INPCK: ::tcflag_t = 0x00000010; -pub const ISTRIP: ::tcflag_t = 0x00000020; -pub const INLCR: ::tcflag_t = 0x00000040; -pub const IGNCR: ::tcflag_t = 0x00000080; -pub const ICRNL: ::tcflag_t = 0x00000100; -pub const IXANY: ::tcflag_t = 0x00000800; -pub const IMAXBEL: ::tcflag_t = 0x00002000; -pub const OPOST: ::tcflag_t = 0x00000001; -pub const CS5: ::tcflag_t = 0x00; -pub const ECHO: ::tcflag_t = 0x00000008; -pub const OCRNL: ::tcflag_t = 0x00000008; -pub const ONOCR: ::tcflag_t = 0x00000010; -pub const ONLRET: ::tcflag_t = 0x00000020; -pub const OFILL: ::tcflag_t = 0x00000040; -pub const OFDEL: ::tcflag_t = 0x00000080; - -pub const WNOHANG: ::c_int = 0x0040; -pub const WUNTRACED: ::c_int = 0x0004; -pub const WSTOPPED: ::c_int = WUNTRACED; -pub const WEXITED: ::c_int = 0x0001; -pub const WCONTINUED: ::c_int = 0x0008; -pub const WNOWAIT: ::c_int = 0x0080; -pub const WTRAPPED: ::c_int = 0x0002; - -pub const RTLD_LOCAL: ::c_int = 0x0200; -pub const RTLD_LAZY: ::c_int = 0x0001; - -pub const POSIX_FADV_NORMAL: ::c_int = 0; -pub const POSIX_FADV_RANDOM: ::c_int = 2; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 1; -pub const POSIX_FADV_WILLNEED: ::c_int = 3; - -pub const AT_FDCWD: ::c_int = -100; -pub const AT_EACCESS: ::c_int = 0x0001; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x0002; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x0004; -pub const AT_REMOVEDIR: ::c_int = 0x0008; - -pub const LOG_CRON: ::c_int = 9 << 3; -pub const LOG_AUTHPRIV: ::c_int = 10 << 3; -pub const LOG_FTP: ::c_int = 11 << 3; -pub const LOG_PERROR: ::c_int = 0x20; +pub const IGNBRK: crate::tcflag_t = 0x00000001; +pub const BRKINT: crate::tcflag_t = 0x00000002; +pub const IGNPAR: crate::tcflag_t = 0x00000004; +pub const PARMRK: crate::tcflag_t = 0x00000008; +pub const INPCK: crate::tcflag_t = 0x00000010; +pub const ISTRIP: crate::tcflag_t = 0x00000020; +pub const INLCR: crate::tcflag_t = 0x00000040; +pub const IGNCR: crate::tcflag_t = 0x00000080; +pub const ICRNL: crate::tcflag_t = 0x00000100; +pub const IXANY: crate::tcflag_t = 0x00000800; +pub const IMAXBEL: crate::tcflag_t = 0x00002000; +pub const OPOST: crate::tcflag_t = 0x00000001; +pub const CS5: crate::tcflag_t = 0x00; +pub const ECHO: crate::tcflag_t = 0x00000008; +pub const OCRNL: crate::tcflag_t = 0x00000008; +pub const ONOCR: crate::tcflag_t = 0x00000010; +pub const ONLRET: crate::tcflag_t = 0x00000020; +pub const OFILL: crate::tcflag_t = 0x00000040; +pub const OFDEL: crate::tcflag_t = 0x00000080; + +pub const WNOHANG: c_int = 0x0040; +pub const WUNTRACED: c_int = 0x0004; +pub const WSTOPPED: c_int = WUNTRACED; +pub const WEXITED: c_int = 0x0001; +pub const WCONTINUED: c_int = 0x0008; +pub const WNOWAIT: c_int = 0x0080; +pub const WTRAPPED: c_int = 0x0002; + +pub const RTLD_LOCAL: c_int = 0x0200; +pub const RTLD_LAZY: c_int = 0x0001; + +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_RANDOM: c_int = 2; +pub const POSIX_FADV_SEQUENTIAL: c_int = 1; +pub const POSIX_FADV_WILLNEED: c_int = 3; + +pub const AT_FDCWD: c_int = -100; +pub const AT_EACCESS: c_int = 0x0001; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x0002; +pub const AT_SYMLINK_FOLLOW: c_int = 0x0004; +pub const AT_REMOVEDIR: c_int = 0x0008; + +pub const LOG_CRON: c_int = 9 << 3; +pub const LOG_AUTHPRIV: c_int = 10 << 3; +pub const LOG_FTP: c_int = 11 << 3; +pub const LOG_PERROR: c_int = 0x20; pub const PIPE_BUF: usize = 5120; -pub const CLD_EXITED: ::c_int = 1; -pub const CLD_KILLED: ::c_int = 2; -pub const CLD_DUMPED: ::c_int = 3; -pub const CLD_TRAPPED: ::c_int = 4; -pub const CLD_STOPPED: ::c_int = 5; -pub const CLD_CONTINUED: ::c_int = 6; +pub const CLD_EXITED: c_int = 1; +pub const CLD_KILLED: c_int = 2; +pub const CLD_DUMPED: c_int = 3; +pub const CLD_TRAPPED: c_int = 4; +pub const CLD_STOPPED: c_int = 5; +pub const CLD_CONTINUED: c_int = 6; pub const UTIME_OMIT: c_long = 0x40000002; pub const UTIME_NOW: c_long = 0x40000001; -pub const POLLIN: ::c_short = POLLRDNORM | POLLRDBAND; -pub const POLLPRI: ::c_short = 0x0008; -pub const POLLOUT: ::c_short = 0x0002; -pub const POLLERR: ::c_short = 0x0020; -pub const POLLHUP: ::c_short = 0x0040; -pub const POLLNVAL: ::c_short = 0x1000; -pub const POLLRDNORM: ::c_short = 0x0001; -pub const POLLRDBAND: ::c_short = 0x0004; +pub const POLLIN: c_short = POLLRDNORM | POLLRDBAND; +pub const POLLPRI: c_short = 0x0008; +pub const POLLOUT: c_short = 0x0002; +pub const POLLERR: c_short = 0x0020; +pub const POLLHUP: c_short = 0x0040; +pub const POLLNVAL: c_short = 0x1000; +pub const POLLRDNORM: c_short = 0x0001; +pub const POLLRDBAND: c_short = 0x0004; pub const IPTOS_LOWDELAY: u8 = 0x10; pub const IPTOS_THROUGHPUT: u8 = 0x08; @@ -1515,122 +1517,122 @@ pub const ARPHRD_IEEE802: u16 = 6; pub const ARPHRD_ARCNET: u16 = 7; pub const ARPHRD_IEEE1394: u16 = 24; -pub const SOL_SOCKET: ::c_int = 0xffff; - -pub const SO_DEBUG: ::c_int = 0x0001; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_REUSEPORT: ::c_int = 0x0200; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_BINDTODEVICE: ::c_int = 0x0800; -pub const SO_TIMESTAMP: ::c_int = 0x0400; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; - -pub const TIOCM_LE: ::c_int = 0x0100; -pub const TIOCM_DTR: ::c_int = 0x0001; -pub const TIOCM_RTS: ::c_int = 0x0002; -pub const TIOCM_ST: ::c_int = 0x0200; -pub const TIOCM_SR: ::c_int = 0x0400; -pub const TIOCM_CTS: ::c_int = 0x1000; -pub const TIOCM_CAR: ::c_int = TIOCM_CD; -pub const TIOCM_CD: ::c_int = 0x8000; -pub const TIOCM_RNG: ::c_int = TIOCM_RI; -pub const TIOCM_RI: ::c_int = 0x4000; -pub const TIOCM_DSR: ::c_int = 0x2000; - -pub const SCHED_OTHER: ::c_int = 3; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; - -pub const IPC_PRIVATE: ::key_t = 0; - -pub const IPC_CREAT: ::c_int = 0o001000; -pub const IPC_EXCL: ::c_int = 0o002000; -pub const IPC_NOWAIT: ::c_int = 0o004000; - -pub const IPC_RMID: ::c_int = 0; -pub const IPC_SET: ::c_int = 1; -pub const IPC_STAT: ::c_int = 2; - -pub const MSG_NOERROR: ::c_int = 0o010000; - -pub const LOG_NFACILITIES: ::c_int = 24; - -pub const SEM_FAILED: *mut ::sem_t = 0xFFFFFFFFFFFFFFFF as *mut sem_t; - -pub const AI_PASSIVE: ::c_int = 0x00000001; -pub const AI_CANONNAME: ::c_int = 0x00000002; -pub const AI_NUMERICHOST: ::c_int = 0x00000004; - -pub const AI_NUMERICSERV: ::c_int = 0x00000008; - -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 14; - -pub const NI_NUMERICHOST: ::c_int = 0x00000002; -pub const NI_NUMERICSERV: ::c_int = 0x00000008; -pub const NI_NOFQDN: ::c_int = 0x00000001; -pub const NI_NAMEREQD: ::c_int = 0x00000004; -pub const NI_DGRAM: ::c_int = 0x00000010; - -pub const AIO_CANCELED: ::c_int = 0; -pub const AIO_NOTCANCELED: ::c_int = 2; -pub const AIO_ALLDONE: ::c_int = 1; -pub const LIO_READ: ::c_int = 1; -pub const LIO_WRITE: ::c_int = 2; -pub const LIO_NOP: ::c_int = 0; -pub const LIO_WAIT: ::c_int = 1; -pub const LIO_NOWAIT: ::c_int = 0; - -pub const ITIMER_REAL: ::c_int = 0; -pub const ITIMER_VIRTUAL: ::c_int = 1; -pub const ITIMER_PROF: ::c_int = 2; - -pub const POSIX_SPAWN_RESETIDS: ::c_short = 0x0010; -pub const POSIX_SPAWN_SETPGROUP: ::c_short = 0x0001; -pub const POSIX_SPAWN_SETSIGDEF: ::c_short = 0x0004; -pub const POSIX_SPAWN_SETSIGMASK: ::c_short = 0x0002; -pub const POSIX_SPAWN_SETSCHEDPARAM: ::c_short = 0x0400; -pub const POSIX_SPAWN_SETSCHEDULER: ::c_short = 0x0040; +pub const SOL_SOCKET: c_int = 0xffff; + +pub const SO_DEBUG: c_int = 0x0001; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_TYPE: c_int = 0x1008; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_REUSEPORT: c_int = 0x0200; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_BINDTODEVICE: c_int = 0x0800; +pub const SO_TIMESTAMP: c_int = 0x0400; +pub const SO_ACCEPTCONN: c_int = 0x0002; + +pub const TIOCM_LE: c_int = 0x0100; +pub const TIOCM_DTR: c_int = 0x0001; +pub const TIOCM_RTS: c_int = 0x0002; +pub const TIOCM_ST: c_int = 0x0200; +pub const TIOCM_SR: c_int = 0x0400; +pub const TIOCM_CTS: c_int = 0x1000; +pub const TIOCM_CAR: c_int = TIOCM_CD; +pub const TIOCM_CD: c_int = 0x8000; +pub const TIOCM_RNG: c_int = TIOCM_RI; +pub const TIOCM_RI: c_int = 0x4000; +pub const TIOCM_DSR: c_int = 0x2000; + +pub const SCHED_OTHER: c_int = 3; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; + +pub const IPC_PRIVATE: crate::key_t = 0; + +pub const IPC_CREAT: c_int = 0o001000; +pub const IPC_EXCL: c_int = 0o002000; +pub const IPC_NOWAIT: c_int = 0o004000; + +pub const IPC_RMID: c_int = 0; +pub const IPC_SET: c_int = 1; +pub const IPC_STAT: c_int = 2; + +pub const MSG_NOERROR: c_int = 0o010000; + +pub const LOG_NFACILITIES: c_int = 24; + +pub const SEM_FAILED: *mut crate::sem_t = 0xFFFFFFFFFFFFFFFF as *mut sem_t; + +pub const AI_PASSIVE: c_int = 0x00000001; +pub const AI_CANONNAME: c_int = 0x00000002; +pub const AI_NUMERICHOST: c_int = 0x00000004; + +pub const AI_NUMERICSERV: c_int = 0x00000008; + +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_NONAME: c_int = 8; +pub const EAI_AGAIN: c_int = 2; +pub const EAI_FAIL: c_int = 4; +pub const EAI_NODATA: c_int = 7; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 14; + +pub const NI_NUMERICHOST: c_int = 0x00000002; +pub const NI_NUMERICSERV: c_int = 0x00000008; +pub const NI_NOFQDN: c_int = 0x00000001; +pub const NI_NAMEREQD: c_int = 0x00000004; +pub const NI_DGRAM: c_int = 0x00000010; + +pub const AIO_CANCELED: c_int = 0; +pub const AIO_NOTCANCELED: c_int = 2; +pub const AIO_ALLDONE: c_int = 1; +pub const LIO_READ: c_int = 1; +pub const LIO_WRITE: c_int = 2; +pub const LIO_NOP: c_int = 0; +pub const LIO_WAIT: c_int = 1; +pub const LIO_NOWAIT: c_int = 0; + +pub const ITIMER_REAL: c_int = 0; +pub const ITIMER_VIRTUAL: c_int = 1; +pub const ITIMER_PROF: c_int = 2; + +pub const POSIX_SPAWN_RESETIDS: c_short = 0x0010; +pub const POSIX_SPAWN_SETPGROUP: c_short = 0x0001; +pub const POSIX_SPAWN_SETSIGDEF: c_short = 0x0004; +pub const POSIX_SPAWN_SETSIGMASK: c_short = 0x0002; +pub const POSIX_SPAWN_SETSCHEDPARAM: c_short = 0x0400; +pub const POSIX_SPAWN_SETSCHEDULER: c_short = 0x0040; pub const IPTOS_ECN_NOT_ECT: u8 = 0x00; -pub const RTF_UP: ::c_ushort = 0x0001; -pub const RTF_GATEWAY: ::c_ushort = 0x0002; +pub const RTF_UP: c_ushort = 0x0001; +pub const RTF_GATEWAY: c_ushort = 0x0002; -pub const RTF_HOST: ::c_ushort = 0x0004; -pub const RTF_DYNAMIC: ::c_ushort = 0x0010; -pub const RTF_MODIFIED: ::c_ushort = 0x0020; -pub const RTF_REJECT: ::c_ushort = 0x0008; -pub const RTF_STATIC: ::c_ushort = 0x0800; -pub const RTF_XRESOLVE: ::c_ushort = 0x0200; +pub const RTF_HOST: c_ushort = 0x0004; +pub const RTF_DYNAMIC: c_ushort = 0x0010; +pub const RTF_MODIFIED: c_ushort = 0x0020; +pub const RTF_REJECT: c_ushort = 0x0008; +pub const RTF_STATIC: c_ushort = 0x0800; +pub const RTF_XRESOLVE: c_ushort = 0x0200; pub const RTF_BROADCAST: u32 = 0x80000; pub const RTM_NEWADDR: u16 = 0xc; pub const RTM_DELADDR: u16 = 0xd; -pub const RTA_DST: ::c_ushort = 0x1; -pub const RTA_GATEWAY: ::c_ushort = 0x2; +pub const RTA_DST: c_ushort = 0x1; +pub const RTA_GATEWAY: c_ushort = 0x2; -pub const UDP_ENCAP: ::c_int = 100; +pub const UDP_ENCAP: c_int = 100; pub const IN_ACCESS: u32 = 0x00000001; pub const IN_MODIFY: u32 = 0x00000002; @@ -1655,540 +1657,540 @@ pub const IN_DONT_FOLLOW: u32 = 0x02000000; pub const IN_ISDIR: u32 = 0x40000000; pub const IN_ONESHOT: u32 = 0x80000000; -pub const REG_EXTENDED: ::c_int = 0o0001; -pub const REG_ICASE: ::c_int = 0o0002; -pub const REG_NEWLINE: ::c_int = 0o0010; -pub const REG_NOSUB: ::c_int = 0o0004; - -pub const REG_NOTBOL: ::c_int = 0o00001; -pub const REG_NOTEOL: ::c_int = 0o00002; - -pub const REG_ENOSYS: ::c_int = 17; -pub const REG_NOMATCH: ::c_int = 1; -pub const REG_BADPAT: ::c_int = 2; -pub const REG_ECOLLATE: ::c_int = 3; -pub const REG_ECTYPE: ::c_int = 4; -pub const REG_EESCAPE: ::c_int = 5; -pub const REG_ESUBREG: ::c_int = 6; -pub const REG_EBRACK: ::c_int = 7; -pub const REG_EPAREN: ::c_int = 8; -pub const REG_EBRACE: ::c_int = 9; -pub const REG_BADBR: ::c_int = 10; -pub const REG_ERANGE: ::c_int = 11; -pub const REG_ESPACE: ::c_int = 12; -pub const REG_BADRPT: ::c_int = 13; +pub const REG_EXTENDED: c_int = 0o0001; +pub const REG_ICASE: c_int = 0o0002; +pub const REG_NEWLINE: c_int = 0o0010; +pub const REG_NOSUB: c_int = 0o0004; + +pub const REG_NOTBOL: c_int = 0o00001; +pub const REG_NOTEOL: c_int = 0o00002; + +pub const REG_ENOSYS: c_int = 17; +pub const REG_NOMATCH: c_int = 1; +pub const REG_BADPAT: c_int = 2; +pub const REG_ECOLLATE: c_int = 3; +pub const REG_ECTYPE: c_int = 4; +pub const REG_EESCAPE: c_int = 5; +pub const REG_ESUBREG: c_int = 6; +pub const REG_EBRACK: c_int = 7; +pub const REG_EPAREN: c_int = 8; +pub const REG_EBRACE: c_int = 9; +pub const REG_BADBR: c_int = 10; +pub const REG_ERANGE: c_int = 11; +pub const REG_ESPACE: c_int = 12; +pub const REG_BADRPT: c_int = 13; // errno.h -pub const EOK: ::c_int = 0; -pub const EWOULDBLOCK: ::c_int = EAGAIN; -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EDEADLK: ::c_int = 45; -pub const ENOLCK: ::c_int = 46; -pub const ECANCELED: ::c_int = 47; -pub const EDQUOT: ::c_int = 49; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EBFONT: ::c_int = 57; -pub const EOWNERDEAD: ::c_int = 58; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const EMULTIHOP: ::c_int = 74; -pub const EBADMSG: ::c_int = 77; -pub const ENAMETOOLONG: ::c_int = 78; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ENOSYS: ::c_int = 89; -pub const ELOOP: ::c_int = 90; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const ENOTEMPTY: ::c_int = 93; -pub const EUSERS: ::c_int = 94; -pub const ENOTRECOVERABLE: ::c_int = 95; -pub const EOPNOTSUPP: ::c_int = 103; -pub const EFPOS: ::c_int = 110; -pub const ESTALE: ::c_int = 122; -pub const EINPROGRESS: ::c_int = 236; -pub const EALREADY: ::c_int = 237; -pub const ENOTSOCK: ::c_int = 238; -pub const EDESTADDRREQ: ::c_int = 239; -pub const EMSGSIZE: ::c_int = 240; -pub const EPROTOTYPE: ::c_int = 241; -pub const ENOPROTOOPT: ::c_int = 242; -pub const EPROTONOSUPPORT: ::c_int = 243; -pub const ESOCKTNOSUPPORT: ::c_int = 244; -pub const EPFNOSUPPORT: ::c_int = 246; -pub const EAFNOSUPPORT: ::c_int = 247; -pub const EADDRINUSE: ::c_int = 248; -pub const EADDRNOTAVAIL: ::c_int = 249; -pub const ENETDOWN: ::c_int = 250; -pub const ENETUNREACH: ::c_int = 251; -pub const ENETRESET: ::c_int = 252; -pub const ECONNABORTED: ::c_int = 253; -pub const ECONNRESET: ::c_int = 254; -pub const ENOBUFS: ::c_int = 255; -pub const EISCONN: ::c_int = 256; -pub const ENOTCONN: ::c_int = 257; -pub const ESHUTDOWN: ::c_int = 258; -pub const ETOOMANYREFS: ::c_int = 259; -pub const ETIMEDOUT: ::c_int = 260; -pub const ECONNREFUSED: ::c_int = 261; -pub const EHOSTDOWN: ::c_int = 264; -pub const EHOSTUNREACH: ::c_int = 265; -pub const EBADRPC: ::c_int = 272; -pub const ERPCMISMATCH: ::c_int = 273; -pub const EPROGUNAVAIL: ::c_int = 274; -pub const EPROGMISMATCH: ::c_int = 275; -pub const EPROCUNAVAIL: ::c_int = 276; -pub const ENOREMOTE: ::c_int = 300; -pub const ENONDP: ::c_int = 301; -pub const EBADFSYS: ::c_int = 302; -pub const EMORE: ::c_int = 309; -pub const ECTRLTERM: ::c_int = 310; -pub const ENOLIC: ::c_int = 311; -pub const ESRVRFAULT: ::c_int = 312; -pub const EENDIAN: ::c_int = 313; -pub const ESECTYPEINVAL: ::c_int = 314; - -pub const RUSAGE_CHILDREN: ::c_int = -1; -pub const L_tmpnam: ::c_uint = 255; - -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 9; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_SYNC_IO: ::c_int = 14; -pub const _PC_ASYNC_IO: ::c_int = 12; -pub const _PC_PRIO_IO: ::c_int = 13; -pub const _PC_SOCK_MAXBUF: ::c_int = 15; -pub const _PC_FILESIZEBITS: ::c_int = 16; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 22; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 23; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 24; -pub const _PC_REC_XFER_ALIGN: ::c_int = 25; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 21; -pub const _PC_SYMLINK_MAX: ::c_int = 17; -pub const _PC_2_SYMLINKS: ::c_int = 20; - -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_PASS_MAX: ::c_int = 9; -pub const _SC_PAGESIZE: ::c_int = 11; -pub const _SC_XOPEN_VERSION: ::c_int = 12; -pub const _SC_STREAM_MAX: ::c_int = 13; -pub const _SC_TZNAME_MAX: ::c_int = 14; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 15; -pub const _SC_AIO_MAX: ::c_int = 16; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 17; -pub const _SC_DELAYTIMER_MAX: ::c_int = 18; -pub const _SC_MQ_OPEN_MAX: ::c_int = 19; -pub const _SC_MQ_PRIO_MAX: ::c_int = 20; -pub const _SC_RTSIG_MAX: ::c_int = 21; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 22; -pub const _SC_SEM_VALUE_MAX: ::c_int = 23; -pub const _SC_SIGQUEUE_MAX: ::c_int = 24; -pub const _SC_TIMER_MAX: ::c_int = 25; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 26; -pub const _SC_FSYNC: ::c_int = 27; -pub const _SC_MAPPED_FILES: ::c_int = 28; -pub const _SC_MEMLOCK: ::c_int = 29; -pub const _SC_MEMLOCK_RANGE: ::c_int = 30; -pub const _SC_MEMORY_PROTECTION: ::c_int = 31; -pub const _SC_MESSAGE_PASSING: ::c_int = 32; -pub const _SC_PRIORITIZED_IO: ::c_int = 33; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 34; -pub const _SC_REALTIME_SIGNALS: ::c_int = 35; -pub const _SC_SEMAPHORES: ::c_int = 36; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 37; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 38; -pub const _SC_TIMERS: ::c_int = 39; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 40; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 41; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 42; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 43; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 44; -pub const _SC_THREAD_STACK_MIN: ::c_int = 45; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 46; -pub const _SC_TTY_NAME_MAX: ::c_int = 47; -pub const _SC_THREADS: ::c_int = 48; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 49; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 50; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 51; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 52; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 53; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 54; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 55; -pub const _SC_2_CHAR_TERM: ::c_int = 56; -pub const _SC_2_C_BIND: ::c_int = 57; -pub const _SC_2_C_DEV: ::c_int = 58; -pub const _SC_2_C_VERSION: ::c_int = 59; -pub const _SC_2_FORT_DEV: ::c_int = 60; -pub const _SC_2_FORT_RUN: ::c_int = 61; -pub const _SC_2_LOCALEDEF: ::c_int = 62; -pub const _SC_2_SW_DEV: ::c_int = 63; -pub const _SC_2_UPE: ::c_int = 64; -pub const _SC_2_VERSION: ::c_int = 65; -pub const _SC_ATEXIT_MAX: ::c_int = 66; -pub const _SC_AVPHYS_PAGES: ::c_int = 67; -pub const _SC_BC_BASE_MAX: ::c_int = 68; -pub const _SC_BC_DIM_MAX: ::c_int = 69; -pub const _SC_BC_SCALE_MAX: ::c_int = 70; -pub const _SC_BC_STRING_MAX: ::c_int = 71; -pub const _SC_CHARCLASS_NAME_MAX: ::c_int = 72; -pub const _SC_CHAR_BIT: ::c_int = 73; -pub const _SC_CHAR_MAX: ::c_int = 74; -pub const _SC_CHAR_MIN: ::c_int = 75; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 76; -pub const _SC_EQUIV_CLASS_MAX: ::c_int = 77; -pub const _SC_EXPR_NEST_MAX: ::c_int = 78; -pub const _SC_INT_MAX: ::c_int = 79; -pub const _SC_INT_MIN: ::c_int = 80; -pub const _SC_LINE_MAX: ::c_int = 81; -pub const _SC_LONG_BIT: ::c_int = 82; -pub const _SC_MB_LEN_MAX: ::c_int = 83; -pub const _SC_NL_ARGMAX: ::c_int = 84; -pub const _SC_NL_LANGMAX: ::c_int = 85; -pub const _SC_NL_MSGMAX: ::c_int = 86; -pub const _SC_NL_NMAX: ::c_int = 87; -pub const _SC_NL_SETMAX: ::c_int = 88; -pub const _SC_NL_TEXTMAX: ::c_int = 89; -pub const _SC_NPROCESSORS_CONF: ::c_int = 90; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 91; -pub const _SC_NZERO: ::c_int = 92; -pub const _SC_PHYS_PAGES: ::c_int = 93; -pub const _SC_PII: ::c_int = 94; -pub const _SC_PII_INTERNET: ::c_int = 95; -pub const _SC_PII_INTERNET_DGRAM: ::c_int = 96; -pub const _SC_PII_INTERNET_STREAM: ::c_int = 97; -pub const _SC_PII_OSI: ::c_int = 98; -pub const _SC_PII_OSI_CLTS: ::c_int = 99; -pub const _SC_PII_OSI_COTS: ::c_int = 100; -pub const _SC_PII_OSI_M: ::c_int = 101; -pub const _SC_PII_SOCKET: ::c_int = 102; -pub const _SC_PII_XTI: ::c_int = 103; -pub const _SC_POLL: ::c_int = 104; -pub const _SC_RE_DUP_MAX: ::c_int = 105; -pub const _SC_SCHAR_MAX: ::c_int = 106; -pub const _SC_SCHAR_MIN: ::c_int = 107; -pub const _SC_SELECT: ::c_int = 108; -pub const _SC_SHRT_MAX: ::c_int = 109; -pub const _SC_SHRT_MIN: ::c_int = 110; -pub const _SC_SSIZE_MAX: ::c_int = 111; -pub const _SC_T_IOV_MAX: ::c_int = 112; -pub const _SC_UCHAR_MAX: ::c_int = 113; -pub const _SC_UINT_MAX: ::c_int = 114; -pub const _SC_UIO_MAXIOV: ::c_int = 115; -pub const _SC_ULONG_MAX: ::c_int = 116; -pub const _SC_USHRT_MAX: ::c_int = 117; -pub const _SC_WORD_BIT: ::c_int = 118; -pub const _SC_XOPEN_CRYPT: ::c_int = 119; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 120; -pub const _SC_XOPEN_SHM: ::c_int = 121; -pub const _SC_XOPEN_UNIX: ::c_int = 122; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 123; -pub const _SC_XOPEN_XPG2: ::c_int = 124; -pub const _SC_XOPEN_XPG3: ::c_int = 125; -pub const _SC_XOPEN_XPG4: ::c_int = 126; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 127; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 128; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 129; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 130; -pub const _SC_ADVISORY_INFO: ::c_int = 131; -pub const _SC_CPUTIME: ::c_int = 132; -pub const _SC_SPAWN: ::c_int = 133; -pub const _SC_SPORADIC_SERVER: ::c_int = 134; -pub const _SC_THREAD_CPUTIME: ::c_int = 135; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 136; -pub const _SC_TIMEOUTS: ::c_int = 137; -pub const _SC_BARRIERS: ::c_int = 138; -pub const _SC_CLOCK_SELECTION: ::c_int = 139; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 140; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 141; -pub const _SC_SPIN_LOCKS: ::c_int = 142; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 143; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 144; -pub const _SC_TRACE: ::c_int = 145; -pub const _SC_TRACE_INHERIT: ::c_int = 146; -pub const _SC_TRACE_LOG: ::c_int = 147; -pub const _SC_2_PBS: ::c_int = 148; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 149; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 150; -pub const _SC_2_PBS_LOCATE: ::c_int = 151; -pub const _SC_2_PBS_MESSAGE: ::c_int = 152; -pub const _SC_2_PBS_TRACK: ::c_int = 153; -pub const _SC_HOST_NAME_MAX: ::c_int = 154; -pub const _SC_IOV_MAX: ::c_int = 155; -pub const _SC_IPV6: ::c_int = 156; -pub const _SC_RAW_SOCKETS: ::c_int = 157; -pub const _SC_REGEXP: ::c_int = 158; -pub const _SC_SHELL: ::c_int = 159; -pub const _SC_SS_REPL_MAX: ::c_int = 160; -pub const _SC_SYMLOOP_MAX: ::c_int = 161; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 162; -pub const _SC_TRACE_NAME_MAX: ::c_int = 163; -pub const _SC_TRACE_SYS_MAX: ::c_int = 164; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 165; -pub const _SC_V6_ILP32_OFF32: ::c_int = 166; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 167; -pub const _SC_V6_LP64_OFF64: ::c_int = 168; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 169; -pub const _SC_XOPEN_REALTIME: ::c_int = 170; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 171; -pub const _SC_XOPEN_LEGACY: ::c_int = 172; -pub const _SC_XOPEN_STREAMS: ::c_int = 173; -pub const _SC_V7_ILP32_OFF32: ::c_int = 176; -pub const _SC_V7_ILP32_OFFBIG: ::c_int = 177; -pub const _SC_V7_LP64_OFF64: ::c_int = 178; -pub const _SC_V7_LPBIG_OFFBIG: ::c_int = 179; - -pub const GLOB_ERR: ::c_int = 0x0001; -pub const GLOB_MARK: ::c_int = 0x0002; -pub const GLOB_NOSORT: ::c_int = 0x0004; -pub const GLOB_DOOFFS: ::c_int = 0x0008; -pub const GLOB_NOCHECK: ::c_int = 0x0010; -pub const GLOB_APPEND: ::c_int = 0x0020; -pub const GLOB_NOESCAPE: ::c_int = 0x0040; - -pub const GLOB_NOSPACE: ::c_int = 1; -pub const GLOB_ABORTED: ::c_int = 2; -pub const GLOB_NOMATCH: ::c_int = 3; - -pub const S_IEXEC: mode_t = ::S_IXUSR; -pub const S_IWRITE: mode_t = ::S_IWUSR; -pub const S_IREAD: mode_t = ::S_IRUSR; - -pub const S_IFIFO: ::mode_t = 0o1_0000; -pub const S_IFCHR: ::mode_t = 0o2_0000; -pub const S_IFDIR: ::mode_t = 0o4_0000; -pub const S_IFBLK: ::mode_t = 0o6_0000; -pub const S_IFREG: ::mode_t = 0o10_0000; -pub const S_IFLNK: ::mode_t = 0o12_0000; -pub const S_IFSOCK: ::mode_t = 0o14_0000; -pub const S_IFMT: ::mode_t = 0o17_0000; - -pub const S_IXOTH: ::mode_t = 0o0001; -pub const S_IWOTH: ::mode_t = 0o0002; -pub const S_IROTH: ::mode_t = 0o0004; -pub const S_IRWXO: ::mode_t = 0o0007; -pub const S_IXGRP: ::mode_t = 0o0010; -pub const S_IWGRP: ::mode_t = 0o0020; -pub const S_IRGRP: ::mode_t = 0o0040; -pub const S_IRWXG: ::mode_t = 0o0070; -pub const S_IXUSR: ::mode_t = 0o0100; -pub const S_IWUSR: ::mode_t = 0o0200; -pub const S_IRUSR: ::mode_t = 0o0400; -pub const S_IRWXU: ::mode_t = 0o0700; - -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; - -pub const ST_RDONLY: ::c_ulong = 0x01; -pub const ST_NOSUID: ::c_ulong = 0x04; -pub const ST_NOEXEC: ::c_ulong = 0x02; -pub const ST_NOATIME: ::c_ulong = 0x20; - -pub const RTLD_NEXT: *mut ::c_void = -3i64 as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = -2i64 as *mut ::c_void; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_NOW: ::c_int = 0x0002; - -pub const EMPTY: ::c_short = 0; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const NEW_TIME: ::c_short = 4; -pub const OLD_TIME: ::c_short = 3; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; -pub const ACCOUNTING: ::c_short = 9; - -pub const ENOTSUP: ::c_int = 48; - -pub const BUFSIZ: ::c_uint = 1024; -pub const TMP_MAX: ::c_uint = 26 * 26 * 26; -pub const FOPEN_MAX: ::c_uint = 16; -pub const FILENAME_MAX: ::c_uint = 255; - -pub const NI_MAXHOST: ::socklen_t = 1025; -pub const M_KEEP: ::c_int = 4; -pub const REG_STARTEND: ::c_int = 0o00004; +pub const EOK: c_int = 0; +pub const EWOULDBLOCK: c_int = EAGAIN; +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EDEADLK: c_int = 45; +pub const ENOLCK: c_int = 46; +pub const ECANCELED: c_int = 47; +pub const EDQUOT: c_int = 49; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EDEADLOCK: c_int = 56; +pub const EBFONT: c_int = 57; +pub const EOWNERDEAD: c_int = 58; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const EMULTIHOP: c_int = 74; +pub const EBADMSG: c_int = 77; +pub const ENAMETOOLONG: c_int = 78; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ENOSYS: c_int = 89; +pub const ELOOP: c_int = 90; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const ENOTEMPTY: c_int = 93; +pub const EUSERS: c_int = 94; +pub const ENOTRECOVERABLE: c_int = 95; +pub const EOPNOTSUPP: c_int = 103; +pub const EFPOS: c_int = 110; +pub const ESTALE: c_int = 122; +pub const EINPROGRESS: c_int = 236; +pub const EALREADY: c_int = 237; +pub const ENOTSOCK: c_int = 238; +pub const EDESTADDRREQ: c_int = 239; +pub const EMSGSIZE: c_int = 240; +pub const EPROTOTYPE: c_int = 241; +pub const ENOPROTOOPT: c_int = 242; +pub const EPROTONOSUPPORT: c_int = 243; +pub const ESOCKTNOSUPPORT: c_int = 244; +pub const EPFNOSUPPORT: c_int = 246; +pub const EAFNOSUPPORT: c_int = 247; +pub const EADDRINUSE: c_int = 248; +pub const EADDRNOTAVAIL: c_int = 249; +pub const ENETDOWN: c_int = 250; +pub const ENETUNREACH: c_int = 251; +pub const ENETRESET: c_int = 252; +pub const ECONNABORTED: c_int = 253; +pub const ECONNRESET: c_int = 254; +pub const ENOBUFS: c_int = 255; +pub const EISCONN: c_int = 256; +pub const ENOTCONN: c_int = 257; +pub const ESHUTDOWN: c_int = 258; +pub const ETOOMANYREFS: c_int = 259; +pub const ETIMEDOUT: c_int = 260; +pub const ECONNREFUSED: c_int = 261; +pub const EHOSTDOWN: c_int = 264; +pub const EHOSTUNREACH: c_int = 265; +pub const EBADRPC: c_int = 272; +pub const ERPCMISMATCH: c_int = 273; +pub const EPROGUNAVAIL: c_int = 274; +pub const EPROGMISMATCH: c_int = 275; +pub const EPROCUNAVAIL: c_int = 276; +pub const ENOREMOTE: c_int = 300; +pub const ENONDP: c_int = 301; +pub const EBADFSYS: c_int = 302; +pub const EMORE: c_int = 309; +pub const ECTRLTERM: c_int = 310; +pub const ENOLIC: c_int = 311; +pub const ESRVRFAULT: c_int = 312; +pub const EENDIAN: c_int = 313; +pub const ESECTYPEINVAL: c_int = 314; + +pub const RUSAGE_CHILDREN: c_int = -1; +pub const L_tmpnam: c_uint = 255; + +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_CHOWN_RESTRICTED: c_int = 9; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 14; +pub const _PC_ASYNC_IO: c_int = 12; +pub const _PC_PRIO_IO: c_int = 13; +pub const _PC_SOCK_MAXBUF: c_int = 15; +pub const _PC_FILESIZEBITS: c_int = 16; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 22; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 23; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 24; +pub const _PC_REC_XFER_ALIGN: c_int = 25; +pub const _PC_ALLOC_SIZE_MIN: c_int = 21; +pub const _PC_SYMLINK_MAX: c_int = 17; +pub const _PC_2_SYMLINKS: c_int = 20; + +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_ARG_MAX: c_int = 1; +pub const _SC_CHILD_MAX: c_int = 2; +pub const _SC_CLK_TCK: c_int = 3; +pub const _SC_NGROUPS_MAX: c_int = 4; +pub const _SC_OPEN_MAX: c_int = 5; +pub const _SC_JOB_CONTROL: c_int = 6; +pub const _SC_SAVED_IDS: c_int = 7; +pub const _SC_VERSION: c_int = 8; +pub const _SC_PASS_MAX: c_int = 9; +pub const _SC_PAGESIZE: c_int = 11; +pub const _SC_XOPEN_VERSION: c_int = 12; +pub const _SC_STREAM_MAX: c_int = 13; +pub const _SC_TZNAME_MAX: c_int = 14; +pub const _SC_AIO_LISTIO_MAX: c_int = 15; +pub const _SC_AIO_MAX: c_int = 16; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 17; +pub const _SC_DELAYTIMER_MAX: c_int = 18; +pub const _SC_MQ_OPEN_MAX: c_int = 19; +pub const _SC_MQ_PRIO_MAX: c_int = 20; +pub const _SC_RTSIG_MAX: c_int = 21; +pub const _SC_SEM_NSEMS_MAX: c_int = 22; +pub const _SC_SEM_VALUE_MAX: c_int = 23; +pub const _SC_SIGQUEUE_MAX: c_int = 24; +pub const _SC_TIMER_MAX: c_int = 25; +pub const _SC_ASYNCHRONOUS_IO: c_int = 26; +pub const _SC_FSYNC: c_int = 27; +pub const _SC_MAPPED_FILES: c_int = 28; +pub const _SC_MEMLOCK: c_int = 29; +pub const _SC_MEMLOCK_RANGE: c_int = 30; +pub const _SC_MEMORY_PROTECTION: c_int = 31; +pub const _SC_MESSAGE_PASSING: c_int = 32; +pub const _SC_PRIORITIZED_IO: c_int = 33; +pub const _SC_PRIORITY_SCHEDULING: c_int = 34; +pub const _SC_REALTIME_SIGNALS: c_int = 35; +pub const _SC_SEMAPHORES: c_int = 36; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 37; +pub const _SC_SYNCHRONIZED_IO: c_int = 38; +pub const _SC_TIMERS: c_int = 39; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 40; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 41; +pub const _SC_LOGIN_NAME_MAX: c_int = 42; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 43; +pub const _SC_THREAD_KEYS_MAX: c_int = 44; +pub const _SC_THREAD_STACK_MIN: c_int = 45; +pub const _SC_THREAD_THREADS_MAX: c_int = 46; +pub const _SC_TTY_NAME_MAX: c_int = 47; +pub const _SC_THREADS: c_int = 48; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 49; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 50; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 51; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 52; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 53; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 54; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 55; +pub const _SC_2_CHAR_TERM: c_int = 56; +pub const _SC_2_C_BIND: c_int = 57; +pub const _SC_2_C_DEV: c_int = 58; +pub const _SC_2_C_VERSION: c_int = 59; +pub const _SC_2_FORT_DEV: c_int = 60; +pub const _SC_2_FORT_RUN: c_int = 61; +pub const _SC_2_LOCALEDEF: c_int = 62; +pub const _SC_2_SW_DEV: c_int = 63; +pub const _SC_2_UPE: c_int = 64; +pub const _SC_2_VERSION: c_int = 65; +pub const _SC_ATEXIT_MAX: c_int = 66; +pub const _SC_AVPHYS_PAGES: c_int = 67; +pub const _SC_BC_BASE_MAX: c_int = 68; +pub const _SC_BC_DIM_MAX: c_int = 69; +pub const _SC_BC_SCALE_MAX: c_int = 70; +pub const _SC_BC_STRING_MAX: c_int = 71; +pub const _SC_CHARCLASS_NAME_MAX: c_int = 72; +pub const _SC_CHAR_BIT: c_int = 73; +pub const _SC_CHAR_MAX: c_int = 74; +pub const _SC_CHAR_MIN: c_int = 75; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 76; +pub const _SC_EQUIV_CLASS_MAX: c_int = 77; +pub const _SC_EXPR_NEST_MAX: c_int = 78; +pub const _SC_INT_MAX: c_int = 79; +pub const _SC_INT_MIN: c_int = 80; +pub const _SC_LINE_MAX: c_int = 81; +pub const _SC_LONG_BIT: c_int = 82; +pub const _SC_MB_LEN_MAX: c_int = 83; +pub const _SC_NL_ARGMAX: c_int = 84; +pub const _SC_NL_LANGMAX: c_int = 85; +pub const _SC_NL_MSGMAX: c_int = 86; +pub const _SC_NL_NMAX: c_int = 87; +pub const _SC_NL_SETMAX: c_int = 88; +pub const _SC_NL_TEXTMAX: c_int = 89; +pub const _SC_NPROCESSORS_CONF: c_int = 90; +pub const _SC_NPROCESSORS_ONLN: c_int = 91; +pub const _SC_NZERO: c_int = 92; +pub const _SC_PHYS_PAGES: c_int = 93; +pub const _SC_PII: c_int = 94; +pub const _SC_PII_INTERNET: c_int = 95; +pub const _SC_PII_INTERNET_DGRAM: c_int = 96; +pub const _SC_PII_INTERNET_STREAM: c_int = 97; +pub const _SC_PII_OSI: c_int = 98; +pub const _SC_PII_OSI_CLTS: c_int = 99; +pub const _SC_PII_OSI_COTS: c_int = 100; +pub const _SC_PII_OSI_M: c_int = 101; +pub const _SC_PII_SOCKET: c_int = 102; +pub const _SC_PII_XTI: c_int = 103; +pub const _SC_POLL: c_int = 104; +pub const _SC_RE_DUP_MAX: c_int = 105; +pub const _SC_SCHAR_MAX: c_int = 106; +pub const _SC_SCHAR_MIN: c_int = 107; +pub const _SC_SELECT: c_int = 108; +pub const _SC_SHRT_MAX: c_int = 109; +pub const _SC_SHRT_MIN: c_int = 110; +pub const _SC_SSIZE_MAX: c_int = 111; +pub const _SC_T_IOV_MAX: c_int = 112; +pub const _SC_UCHAR_MAX: c_int = 113; +pub const _SC_UINT_MAX: c_int = 114; +pub const _SC_UIO_MAXIOV: c_int = 115; +pub const _SC_ULONG_MAX: c_int = 116; +pub const _SC_USHRT_MAX: c_int = 117; +pub const _SC_WORD_BIT: c_int = 118; +pub const _SC_XOPEN_CRYPT: c_int = 119; +pub const _SC_XOPEN_ENH_I18N: c_int = 120; +pub const _SC_XOPEN_SHM: c_int = 121; +pub const _SC_XOPEN_UNIX: c_int = 122; +pub const _SC_XOPEN_XCU_VERSION: c_int = 123; +pub const _SC_XOPEN_XPG2: c_int = 124; +pub const _SC_XOPEN_XPG3: c_int = 125; +pub const _SC_XOPEN_XPG4: c_int = 126; +pub const _SC_XBS5_ILP32_OFF32: c_int = 127; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 128; +pub const _SC_XBS5_LP64_OFF64: c_int = 129; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 130; +pub const _SC_ADVISORY_INFO: c_int = 131; +pub const _SC_CPUTIME: c_int = 132; +pub const _SC_SPAWN: c_int = 133; +pub const _SC_SPORADIC_SERVER: c_int = 134; +pub const _SC_THREAD_CPUTIME: c_int = 135; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 136; +pub const _SC_TIMEOUTS: c_int = 137; +pub const _SC_BARRIERS: c_int = 138; +pub const _SC_CLOCK_SELECTION: c_int = 139; +pub const _SC_MONOTONIC_CLOCK: c_int = 140; +pub const _SC_READER_WRITER_LOCKS: c_int = 141; +pub const _SC_SPIN_LOCKS: c_int = 142; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 143; +pub const _SC_TRACE_EVENT_FILTER: c_int = 144; +pub const _SC_TRACE: c_int = 145; +pub const _SC_TRACE_INHERIT: c_int = 146; +pub const _SC_TRACE_LOG: c_int = 147; +pub const _SC_2_PBS: c_int = 148; +pub const _SC_2_PBS_ACCOUNTING: c_int = 149; +pub const _SC_2_PBS_CHECKPOINT: c_int = 150; +pub const _SC_2_PBS_LOCATE: c_int = 151; +pub const _SC_2_PBS_MESSAGE: c_int = 152; +pub const _SC_2_PBS_TRACK: c_int = 153; +pub const _SC_HOST_NAME_MAX: c_int = 154; +pub const _SC_IOV_MAX: c_int = 155; +pub const _SC_IPV6: c_int = 156; +pub const _SC_RAW_SOCKETS: c_int = 157; +pub const _SC_REGEXP: c_int = 158; +pub const _SC_SHELL: c_int = 159; +pub const _SC_SS_REPL_MAX: c_int = 160; +pub const _SC_SYMLOOP_MAX: c_int = 161; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 162; +pub const _SC_TRACE_NAME_MAX: c_int = 163; +pub const _SC_TRACE_SYS_MAX: c_int = 164; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 165; +pub const _SC_V6_ILP32_OFF32: c_int = 166; +pub const _SC_V6_ILP32_OFFBIG: c_int = 167; +pub const _SC_V6_LP64_OFF64: c_int = 168; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 169; +pub const _SC_XOPEN_REALTIME: c_int = 170; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 171; +pub const _SC_XOPEN_LEGACY: c_int = 172; +pub const _SC_XOPEN_STREAMS: c_int = 173; +pub const _SC_V7_ILP32_OFF32: c_int = 176; +pub const _SC_V7_ILP32_OFFBIG: c_int = 177; +pub const _SC_V7_LP64_OFF64: c_int = 178; +pub const _SC_V7_LPBIG_OFFBIG: c_int = 179; + +pub const GLOB_ERR: c_int = 0x0001; +pub const GLOB_MARK: c_int = 0x0002; +pub const GLOB_NOSORT: c_int = 0x0004; +pub const GLOB_DOOFFS: c_int = 0x0008; +pub const GLOB_NOCHECK: c_int = 0x0010; +pub const GLOB_APPEND: c_int = 0x0020; +pub const GLOB_NOESCAPE: c_int = 0x0040; + +pub const GLOB_NOSPACE: c_int = 1; +pub const GLOB_ABORTED: c_int = 2; +pub const GLOB_NOMATCH: c_int = 3; + +pub const S_IEXEC: mode_t = crate::S_IXUSR; +pub const S_IWRITE: mode_t = crate::S_IWUSR; +pub const S_IREAD: mode_t = crate::S_IRUSR; + +pub const S_IFIFO: crate::mode_t = 0o1_0000; +pub const S_IFCHR: crate::mode_t = 0o2_0000; +pub const S_IFDIR: crate::mode_t = 0o4_0000; +pub const S_IFBLK: crate::mode_t = 0o6_0000; +pub const S_IFREG: crate::mode_t = 0o10_0000; +pub const S_IFLNK: crate::mode_t = 0o12_0000; +pub const S_IFSOCK: crate::mode_t = 0o14_0000; +pub const S_IFMT: crate::mode_t = 0o17_0000; + +pub const S_IXOTH: crate::mode_t = 0o0001; +pub const S_IWOTH: crate::mode_t = 0o0002; +pub const S_IROTH: crate::mode_t = 0o0004; +pub const S_IRWXO: crate::mode_t = 0o0007; +pub const S_IXGRP: crate::mode_t = 0o0010; +pub const S_IWGRP: crate::mode_t = 0o0020; +pub const S_IRGRP: crate::mode_t = 0o0040; +pub const S_IRWXG: crate::mode_t = 0o0070; +pub const S_IXUSR: crate::mode_t = 0o0100; +pub const S_IWUSR: crate::mode_t = 0o0200; +pub const S_IRUSR: crate::mode_t = 0o0400; +pub const S_IRWXU: crate::mode_t = 0o0700; + +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; + +pub const ST_RDONLY: c_ulong = 0x01; +pub const ST_NOSUID: c_ulong = 0x04; +pub const ST_NOEXEC: c_ulong = 0x02; +pub const ST_NOATIME: c_ulong = 0x20; + +pub const RTLD_NEXT: *mut c_void = -3i64 as *mut c_void; +pub const RTLD_DEFAULT: *mut c_void = -2i64 as *mut c_void; +pub const RTLD_NODELETE: c_int = 0x1000; +pub const RTLD_NOW: c_int = 0x0002; + +pub const EMPTY: c_short = 0; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const NEW_TIME: c_short = 4; +pub const OLD_TIME: c_short = 3; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; +pub const ACCOUNTING: c_short = 9; + +pub const ENOTSUP: c_int = 48; + +pub const BUFSIZ: c_uint = 1024; +pub const TMP_MAX: c_uint = 26 * 26 * 26; +pub const FOPEN_MAX: c_uint = 16; +pub const FILENAME_MAX: c_uint = 255; + +pub const NI_MAXHOST: crate::socklen_t = 1025; +pub const M_KEEP: c_int = 4; +pub const REG_STARTEND: c_int = 0o00004; pub const VEOF: usize = 4; -pub const RTLD_GLOBAL: ::c_int = 0x0100; -pub const RTLD_NOLOAD: ::c_int = 0x0004; - -pub const O_RDONLY: ::c_int = 0o000000; -pub const O_WRONLY: ::c_int = 0o000001; -pub const O_RDWR: ::c_int = 0o000002; - -pub const O_EXEC: ::c_int = 0o00003; -pub const O_ASYNC: ::c_int = 0o0200000; -pub const O_NDELAY: ::c_int = O_NONBLOCK; -pub const O_TRUNC: ::c_int = 0o001000; -pub const O_CLOEXEC: ::c_int = 0o020000; -pub const O_DIRECTORY: ::c_int = 0o4000000; -pub const O_ACCMODE: ::c_int = 0o000007; -pub const O_APPEND: ::c_int = 0o000010; -pub const O_CREAT: ::c_int = 0o000400; -pub const O_EXCL: ::c_int = 0o002000; -pub const O_NOCTTY: ::c_int = 0o004000; -pub const O_NONBLOCK: ::c_int = 0o000200; -pub const O_SYNC: ::c_int = 0o000040; -pub const O_RSYNC: ::c_int = 0o000100; -pub const O_DSYNC: ::c_int = 0o000020; -pub const O_NOFOLLOW: ::c_int = 0o010000; - -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; - -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_CLOEXEC: ::c_int = 0x10000000; - -pub const SA_SIGINFO: ::c_int = 0x0002; -pub const SA_NOCLDWAIT: ::c_int = 0x0020; -pub const SA_NODEFER: ::c_int = 0x0010; -pub const SA_RESETHAND: ::c_int = 0x0004; -pub const SA_NOCLDSTOP: ::c_int = 0x0001; - -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGWINCH: ::c_int = 20; -pub const SIGCHLD: ::c_int = 18; -pub const SIGBUS: ::c_int = 10; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGCONT: ::c_int = 25; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGURG: ::c_int = 21; -pub const SIGIO: ::c_int = SIGPOLL; -pub const SIGSYS: ::c_int = 12; -pub const SIGPOLL: ::c_int = 22; -pub const SIGPWR: ::c_int = 19; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; - -pub const POLLWRNORM: ::c_short = ::POLLOUT; -pub const POLLWRBAND: ::c_short = 0x0010; - -pub const F_SETLK: ::c_int = 106; -pub const F_SETLKW: ::c_int = 107; -pub const F_ALLOCSP: ::c_int = 110; -pub const F_FREESP: ::c_int = 111; -pub const F_GETLK: ::c_int = 114; - -pub const F_RDLCK: ::c_int = 1; -pub const F_WRLCK: ::c_int = 2; -pub const F_UNLCK: ::c_int = 3; +pub const RTLD_GLOBAL: c_int = 0x0100; +pub const RTLD_NOLOAD: c_int = 0x0004; + +pub const O_RDONLY: c_int = 0o000000; +pub const O_WRONLY: c_int = 0o000001; +pub const O_RDWR: c_int = 0o000002; + +pub const O_EXEC: c_int = 0o00003; +pub const O_ASYNC: c_int = 0o0200000; +pub const O_NDELAY: c_int = O_NONBLOCK; +pub const O_TRUNC: c_int = 0o001000; +pub const O_CLOEXEC: c_int = 0o020000; +pub const O_DIRECTORY: c_int = 0o4000000; +pub const O_ACCMODE: c_int = 0o000007; +pub const O_APPEND: c_int = 0o000010; +pub const O_CREAT: c_int = 0o000400; +pub const O_EXCL: c_int = 0o002000; +pub const O_NOCTTY: c_int = 0o004000; +pub const O_NONBLOCK: c_int = 0o000200; +pub const O_SYNC: c_int = 0o000040; +pub const O_RSYNC: c_int = 0o000100; +pub const O_DSYNC: c_int = 0o000020; +pub const O_NOFOLLOW: c_int = 0o010000; + +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; + +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_CLOEXEC: c_int = 0x10000000; + +pub const SA_SIGINFO: c_int = 0x0002; +pub const SA_NOCLDWAIT: c_int = 0x0020; +pub const SA_NODEFER: c_int = 0x0010; +pub const SA_RESETHAND: c_int = 0x0004; +pub const SA_NOCLDSTOP: c_int = 0x0001; + +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGWINCH: c_int = 20; +pub const SIGCHLD: c_int = 18; +pub const SIGBUS: c_int = 10; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGCONT: c_int = 25; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGURG: c_int = 21; +pub const SIGIO: c_int = SIGPOLL; +pub const SIGSYS: c_int = 12; +pub const SIGPOLL: c_int = 22; +pub const SIGPWR: c_int = 19; +pub const SIG_SETMASK: c_int = 2; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; + +pub const POLLWRNORM: c_short = crate::POLLOUT; +pub const POLLWRBAND: c_short = 0x0010; + +pub const F_SETLK: c_int = 106; +pub const F_SETLKW: c_int = 107; +pub const F_ALLOCSP: c_int = 110; +pub const F_FREESP: c_int = 111; +pub const F_GETLK: c_int = 114; + +pub const F_RDLCK: c_int = 1; +pub const F_WRLCK: c_int = 2; +pub const F_UNLCK: c_int = 3; pub const NCCS: usize = 40; -pub const MAP_ANON: ::c_int = MAP_ANONYMOUS; -pub const MAP_ANONYMOUS: ::c_int = 0x00080000; - -pub const MCL_CURRENT: ::c_int = 0x000000001; -pub const MCL_FUTURE: ::c_int = 0x000000002; - -pub const _TIO_CBAUD: ::tcflag_t = 15; -pub const CBAUD: ::tcflag_t = _TIO_CBAUD; -pub const TAB1: ::tcflag_t = 0x0800; -pub const TAB2: ::tcflag_t = 0x1000; -pub const TAB3: ::tcflag_t = 0x1800; -pub const CR1: ::tcflag_t = 0x200; -pub const CR2: ::tcflag_t = 0x400; -pub const CR3: ::tcflag_t = 0x600; -pub const FF1: ::tcflag_t = 0x8000; -pub const BS1: ::tcflag_t = 0x2000; -pub const VT1: ::tcflag_t = 0x4000; +pub const MAP_ANON: c_int = MAP_ANONYMOUS; +pub const MAP_ANONYMOUS: c_int = 0x00080000; + +pub const MCL_CURRENT: c_int = 0x000000001; +pub const MCL_FUTURE: c_int = 0x000000002; + +pub const _TIO_CBAUD: crate::tcflag_t = 15; +pub const CBAUD: crate::tcflag_t = _TIO_CBAUD; +pub const TAB1: crate::tcflag_t = 0x0800; +pub const TAB2: crate::tcflag_t = 0x1000; +pub const TAB3: crate::tcflag_t = 0x1800; +pub const CR1: crate::tcflag_t = 0x200; +pub const CR2: crate::tcflag_t = 0x400; +pub const CR3: crate::tcflag_t = 0x600; +pub const FF1: crate::tcflag_t = 0x8000; +pub const BS1: crate::tcflag_t = 0x2000; +pub const VT1: crate::tcflag_t = 0x4000; pub const VWERASE: usize = 14; pub const VREPRINT: usize = 12; pub const VSUSP: usize = 10; @@ -2196,458 +2198,458 @@ pub const VSTART: usize = 8; pub const VSTOP: usize = 9; pub const VDISCARD: usize = 13; pub const VTIME: usize = 17; -pub const IXON: ::tcflag_t = 0x00000400; -pub const IXOFF: ::tcflag_t = 0x00001000; -pub const ONLCR: ::tcflag_t = 0x00000004; -pub const CSIZE: ::tcflag_t = 0x00000030; -pub const CS6: ::tcflag_t = 0x10; -pub const CS7: ::tcflag_t = 0x20; -pub const CS8: ::tcflag_t = 0x30; -pub const CSTOPB: ::tcflag_t = 0x00000040; -pub const CREAD: ::tcflag_t = 0x00000080; -pub const PARENB: ::tcflag_t = 0x00000100; -pub const PARODD: ::tcflag_t = 0x00000200; -pub const HUPCL: ::tcflag_t = 0x00000400; -pub const CLOCAL: ::tcflag_t = 0x00000800; -pub const ECHOKE: ::tcflag_t = 0x00000800; -pub const ECHOE: ::tcflag_t = 0x00000010; -pub const ECHOK: ::tcflag_t = 0x00000020; -pub const ECHONL: ::tcflag_t = 0x00000040; -pub const ECHOCTL: ::tcflag_t = 0x00000200; -pub const ISIG: ::tcflag_t = 0x00000001; -pub const ICANON: ::tcflag_t = 0x00000002; -pub const NOFLSH: ::tcflag_t = 0x00000080; -pub const OLCUC: ::tcflag_t = 0x00000002; -pub const NLDLY: ::tcflag_t = 0x00000100; -pub const CRDLY: ::tcflag_t = 0x00000600; -pub const TABDLY: ::tcflag_t = 0x00001800; -pub const BSDLY: ::tcflag_t = 0x00002000; -pub const FFDLY: ::tcflag_t = 0x00008000; -pub const VTDLY: ::tcflag_t = 0x00004000; -pub const XTABS: ::tcflag_t = 0x1800; - -pub const B0: ::speed_t = 0; -pub const B50: ::speed_t = 1; -pub const B75: ::speed_t = 2; -pub const B110: ::speed_t = 3; -pub const B134: ::speed_t = 4; -pub const B150: ::speed_t = 5; -pub const B200: ::speed_t = 6; -pub const B300: ::speed_t = 7; -pub const B600: ::speed_t = 8; -pub const B1200: ::speed_t = 9; -pub const B1800: ::speed_t = 10; -pub const B2400: ::speed_t = 11; -pub const B4800: ::speed_t = 12; -pub const B9600: ::speed_t = 13; -pub const B19200: ::speed_t = 14; -pub const B38400: ::speed_t = 15; -pub const EXTA: ::speed_t = 14; -pub const EXTB: ::speed_t = 15; -pub const B57600: ::speed_t = 57600; -pub const B115200: ::speed_t = 115200; +pub const IXON: crate::tcflag_t = 0x00000400; +pub const IXOFF: crate::tcflag_t = 0x00001000; +pub const ONLCR: crate::tcflag_t = 0x00000004; +pub const CSIZE: crate::tcflag_t = 0x00000030; +pub const CS6: crate::tcflag_t = 0x10; +pub const CS7: crate::tcflag_t = 0x20; +pub const CS8: crate::tcflag_t = 0x30; +pub const CSTOPB: crate::tcflag_t = 0x00000040; +pub const CREAD: crate::tcflag_t = 0x00000080; +pub const PARENB: crate::tcflag_t = 0x00000100; +pub const PARODD: crate::tcflag_t = 0x00000200; +pub const HUPCL: crate::tcflag_t = 0x00000400; +pub const CLOCAL: crate::tcflag_t = 0x00000800; +pub const ECHOKE: crate::tcflag_t = 0x00000800; +pub const ECHOE: crate::tcflag_t = 0x00000010; +pub const ECHOK: crate::tcflag_t = 0x00000020; +pub const ECHONL: crate::tcflag_t = 0x00000040; +pub const ECHOCTL: crate::tcflag_t = 0x00000200; +pub const ISIG: crate::tcflag_t = 0x00000001; +pub const ICANON: crate::tcflag_t = 0x00000002; +pub const NOFLSH: crate::tcflag_t = 0x00000080; +pub const OLCUC: crate::tcflag_t = 0x00000002; +pub const NLDLY: crate::tcflag_t = 0x00000100; +pub const CRDLY: crate::tcflag_t = 0x00000600; +pub const TABDLY: crate::tcflag_t = 0x00001800; +pub const BSDLY: crate::tcflag_t = 0x00002000; +pub const FFDLY: crate::tcflag_t = 0x00008000; +pub const VTDLY: crate::tcflag_t = 0x00004000; +pub const XTABS: crate::tcflag_t = 0x1800; + +pub const B0: crate::speed_t = 0; +pub const B50: crate::speed_t = 1; +pub const B75: crate::speed_t = 2; +pub const B110: crate::speed_t = 3; +pub const B134: crate::speed_t = 4; +pub const B150: crate::speed_t = 5; +pub const B200: crate::speed_t = 6; +pub const B300: crate::speed_t = 7; +pub const B600: crate::speed_t = 8; +pub const B1200: crate::speed_t = 9; +pub const B1800: crate::speed_t = 10; +pub const B2400: crate::speed_t = 11; +pub const B4800: crate::speed_t = 12; +pub const B9600: crate::speed_t = 13; +pub const B19200: crate::speed_t = 14; +pub const B38400: crate::speed_t = 15; +pub const EXTA: crate::speed_t = 14; +pub const EXTB: crate::speed_t = 15; +pub const B57600: crate::speed_t = 57600; +pub const B115200: crate::speed_t = 115200; pub const VEOL: usize = 5; pub const VEOL2: usize = 6; pub const VMIN: usize = 16; -pub const IEXTEN: ::tcflag_t = 0x00008000; -pub const TOSTOP: ::tcflag_t = 0x00000100; - -pub const TCSANOW: ::c_int = 0x0001; -pub const TCSADRAIN: ::c_int = 0x0002; -pub const TCSAFLUSH: ::c_int = 0x0004; - -pub const HW_MACHINE: ::c_int = 1; -pub const HW_MODEL: ::c_int = 2; -pub const HW_NCPU: ::c_int = 3; -pub const HW_BYTEORDER: ::c_int = 4; -pub const HW_PHYSMEM: ::c_int = 5; -pub const HW_USERMEM: ::c_int = 6; -pub const HW_PAGESIZE: ::c_int = 7; -pub const HW_DISKNAMES: ::c_int = 8; -pub const HW_IOSTATS: ::c_int = 9; -pub const HW_MACHINE_ARCH: ::c_int = 10; -pub const HW_ALIGNBYTES: ::c_int = 11; -pub const HW_CNMAGIC: ::c_int = 12; -pub const HW_PHYSMEM64: ::c_int = 13; -pub const HW_USERMEM64: ::c_int = 14; -pub const HW_IOSTATNAMES: ::c_int = 15; -pub const HW_MAXID: ::c_int = 15; - -pub const CTL_UNSPEC: ::c_int = 0; -pub const CTL_KERN: ::c_int = 1; -pub const CTL_VM: ::c_int = 2; -pub const CTL_VFS: ::c_int = 3; -pub const CTL_NET: ::c_int = 4; -pub const CTL_DEBUG: ::c_int = 5; -pub const CTL_HW: ::c_int = 6; -pub const CTL_MACHDEP: ::c_int = 7; -pub const CTL_USER: ::c_int = 8; -pub const CTL_QNX: ::c_int = 9; -pub const CTL_PROC: ::c_int = 10; -pub const CTL_VENDOR: ::c_int = 11; -pub const CTL_EMUL: ::c_int = 12; -pub const CTL_SECURITY: ::c_int = 13; -pub const CTL_MAXID: ::c_int = 14; - -pub const DAY_1: ::nl_item = 8; -pub const DAY_2: ::nl_item = 9; -pub const DAY_3: ::nl_item = 10; -pub const DAY_4: ::nl_item = 11; -pub const DAY_5: ::nl_item = 12; -pub const DAY_6: ::nl_item = 13; -pub const DAY_7: ::nl_item = 14; - -pub const MON_1: ::nl_item = 22; -pub const MON_2: ::nl_item = 23; -pub const MON_3: ::nl_item = 24; -pub const MON_4: ::nl_item = 25; -pub const MON_5: ::nl_item = 26; -pub const MON_6: ::nl_item = 27; -pub const MON_7: ::nl_item = 28; -pub const MON_8: ::nl_item = 29; -pub const MON_9: ::nl_item = 30; -pub const MON_10: ::nl_item = 31; -pub const MON_11: ::nl_item = 32; -pub const MON_12: ::nl_item = 33; - -pub const ABDAY_1: ::nl_item = 15; -pub const ABDAY_2: ::nl_item = 16; -pub const ABDAY_3: ::nl_item = 17; -pub const ABDAY_4: ::nl_item = 18; -pub const ABDAY_5: ::nl_item = 19; -pub const ABDAY_6: ::nl_item = 20; -pub const ABDAY_7: ::nl_item = 21; - -pub const ABMON_1: ::nl_item = 34; -pub const ABMON_2: ::nl_item = 35; -pub const ABMON_3: ::nl_item = 36; -pub const ABMON_4: ::nl_item = 37; -pub const ABMON_5: ::nl_item = 38; -pub const ABMON_6: ::nl_item = 39; -pub const ABMON_7: ::nl_item = 40; -pub const ABMON_8: ::nl_item = 41; -pub const ABMON_9: ::nl_item = 42; -pub const ABMON_10: ::nl_item = 43; -pub const ABMON_11: ::nl_item = 44; -pub const ABMON_12: ::nl_item = 45; - -pub const AF_ARP: ::c_int = 28; -pub const AF_CCITT: ::c_int = 10; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_CNT: ::c_int = 21; -pub const AF_COIP: ::c_int = 20; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_E164: ::c_int = 26; -pub const AF_ECMA: ::c_int = 8; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_IEEE80211: ::c_int = 32; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_ISO: ::c_int = 7; -pub const AF_LAT: ::c_int = 14; -pub const AF_LINK: ::c_int = 18; -pub const AF_NATM: ::c_int = 27; -pub const AF_NS: ::c_int = 6; -pub const AF_OSI: ::c_int = 7; -pub const AF_PUP: ::c_int = 4; -pub const ALT_DIGITS: ::nl_item = 50; -pub const AM_STR: ::nl_item = 6; -pub const B76800: ::speed_t = 76800; - -pub const BIOCFLUSH: ::c_int = 17000; -pub const BIOCGBLEN: ::c_int = 1074020966; -pub const BIOCGDLT: ::c_int = 1074020970; -pub const BIOCGDLTLIST: ::c_int = -1072676233; -pub const BIOCGETIF: ::c_int = 1083196011; -pub const BIOCGHDRCMPLT: ::c_int = 1074020980; -pub const BIOCGRTIMEOUT: ::c_int = 1074807406; -pub const BIOCGSEESENT: ::c_int = 1074020984; -pub const BIOCGSTATS: ::c_int = 1082147439; -pub const BIOCIMMEDIATE: ::c_int = -2147204496; -pub const BIOCPROMISC: ::c_int = 17001; -pub const BIOCSBLEN: ::c_int = -1073462682; -pub const BIOCSDLT: ::c_int = -2147204490; -pub const BIOCSETF: ::c_int = -2146418073; -pub const BIOCSETIF: ::c_int = -2138029460; -pub const BIOCSHDRCMPLT: ::c_int = -2147204491; -pub const BIOCSRTIMEOUT: ::c_int = -2146418067; -pub const BIOCSSEESENT: ::c_int = -2147204487; -pub const BIOCVERSION: ::c_int = 1074020977; - -pub const BPF_ALIGNMENT: usize = ::mem::size_of::<::c_long>(); +pub const IEXTEN: crate::tcflag_t = 0x00008000; +pub const TOSTOP: crate::tcflag_t = 0x00000100; + +pub const TCSANOW: c_int = 0x0001; +pub const TCSADRAIN: c_int = 0x0002; +pub const TCSAFLUSH: c_int = 0x0004; + +pub const HW_MACHINE: c_int = 1; +pub const HW_MODEL: c_int = 2; +pub const HW_NCPU: c_int = 3; +pub const HW_BYTEORDER: c_int = 4; +pub const HW_PHYSMEM: c_int = 5; +pub const HW_USERMEM: c_int = 6; +pub const HW_PAGESIZE: c_int = 7; +pub const HW_DISKNAMES: c_int = 8; +pub const HW_IOSTATS: c_int = 9; +pub const HW_MACHINE_ARCH: c_int = 10; +pub const HW_ALIGNBYTES: c_int = 11; +pub const HW_CNMAGIC: c_int = 12; +pub const HW_PHYSMEM64: c_int = 13; +pub const HW_USERMEM64: c_int = 14; +pub const HW_IOSTATNAMES: c_int = 15; +pub const HW_MAXID: c_int = 15; + +pub const CTL_UNSPEC: c_int = 0; +pub const CTL_KERN: c_int = 1; +pub const CTL_VM: c_int = 2; +pub const CTL_VFS: c_int = 3; +pub const CTL_NET: c_int = 4; +pub const CTL_DEBUG: c_int = 5; +pub const CTL_HW: c_int = 6; +pub const CTL_MACHDEP: c_int = 7; +pub const CTL_USER: c_int = 8; +pub const CTL_QNX: c_int = 9; +pub const CTL_PROC: c_int = 10; +pub const CTL_VENDOR: c_int = 11; +pub const CTL_EMUL: c_int = 12; +pub const CTL_SECURITY: c_int = 13; +pub const CTL_MAXID: c_int = 14; + +pub const DAY_1: crate::nl_item = 8; +pub const DAY_2: crate::nl_item = 9; +pub const DAY_3: crate::nl_item = 10; +pub const DAY_4: crate::nl_item = 11; +pub const DAY_5: crate::nl_item = 12; +pub const DAY_6: crate::nl_item = 13; +pub const DAY_7: crate::nl_item = 14; + +pub const MON_1: crate::nl_item = 22; +pub const MON_2: crate::nl_item = 23; +pub const MON_3: crate::nl_item = 24; +pub const MON_4: crate::nl_item = 25; +pub const MON_5: crate::nl_item = 26; +pub const MON_6: crate::nl_item = 27; +pub const MON_7: crate::nl_item = 28; +pub const MON_8: crate::nl_item = 29; +pub const MON_9: crate::nl_item = 30; +pub const MON_10: crate::nl_item = 31; +pub const MON_11: crate::nl_item = 32; +pub const MON_12: crate::nl_item = 33; + +pub const ABDAY_1: crate::nl_item = 15; +pub const ABDAY_2: crate::nl_item = 16; +pub const ABDAY_3: crate::nl_item = 17; +pub const ABDAY_4: crate::nl_item = 18; +pub const ABDAY_5: crate::nl_item = 19; +pub const ABDAY_6: crate::nl_item = 20; +pub const ABDAY_7: crate::nl_item = 21; + +pub const ABMON_1: crate::nl_item = 34; +pub const ABMON_2: crate::nl_item = 35; +pub const ABMON_3: crate::nl_item = 36; +pub const ABMON_4: crate::nl_item = 37; +pub const ABMON_5: crate::nl_item = 38; +pub const ABMON_6: crate::nl_item = 39; +pub const ABMON_7: crate::nl_item = 40; +pub const ABMON_8: crate::nl_item = 41; +pub const ABMON_9: crate::nl_item = 42; +pub const ABMON_10: crate::nl_item = 43; +pub const ABMON_11: crate::nl_item = 44; +pub const ABMON_12: crate::nl_item = 45; + +pub const AF_ARP: c_int = 28; +pub const AF_CCITT: c_int = 10; +pub const AF_CHAOS: c_int = 5; +pub const AF_CNT: c_int = 21; +pub const AF_COIP: c_int = 20; +pub const AF_DATAKIT: c_int = 9; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_E164: c_int = 26; +pub const AF_ECMA: c_int = 8; +pub const AF_HYLINK: c_int = 15; +pub const AF_IEEE80211: c_int = 32; +pub const AF_IMPLINK: c_int = 3; +pub const AF_ISO: c_int = 7; +pub const AF_LAT: c_int = 14; +pub const AF_LINK: c_int = 18; +pub const AF_NATM: c_int = 27; +pub const AF_NS: c_int = 6; +pub const AF_OSI: c_int = 7; +pub const AF_PUP: c_int = 4; +pub const ALT_DIGITS: crate::nl_item = 50; +pub const AM_STR: crate::nl_item = 6; +pub const B76800: crate::speed_t = 76800; + +pub const BIOCFLUSH: c_int = 17000; +pub const BIOCGBLEN: c_int = 1074020966; +pub const BIOCGDLT: c_int = 1074020970; +pub const BIOCGDLTLIST: c_int = -1072676233; +pub const BIOCGETIF: c_int = 1083196011; +pub const BIOCGHDRCMPLT: c_int = 1074020980; +pub const BIOCGRTIMEOUT: c_int = 1074807406; +pub const BIOCGSEESENT: c_int = 1074020984; +pub const BIOCGSTATS: c_int = 1082147439; +pub const BIOCIMMEDIATE: c_int = -2147204496; +pub const BIOCPROMISC: c_int = 17001; +pub const BIOCSBLEN: c_int = -1073462682; +pub const BIOCSDLT: c_int = -2147204490; +pub const BIOCSETF: c_int = -2146418073; +pub const BIOCSETIF: c_int = -2138029460; +pub const BIOCSHDRCMPLT: c_int = -2147204491; +pub const BIOCSRTIMEOUT: c_int = -2146418067; +pub const BIOCSSEESENT: c_int = -2147204487; +pub const BIOCVERSION: c_int = 1074020977; + +pub const BPF_ALIGNMENT: usize = crate::mem::size_of::(); pub const CHAR_BIT: usize = 8; -pub const CODESET: ::nl_item = 1; -pub const CRNCYSTR: ::nl_item = 55; - -pub const D_FLAG_FILTER: ::c_int = 0x00000001; -pub const D_FLAG_STAT: ::c_int = 0x00000002; -pub const D_FLAG_STAT_FORM_MASK: ::c_int = 0x000000f0; -pub const D_FLAG_STAT_FORM_T32_2001: ::c_int = 0x00000010; -pub const D_FLAG_STAT_FORM_T32_2008: ::c_int = 0x00000020; -pub const D_FLAG_STAT_FORM_T64_2008: ::c_int = 0x00000030; -pub const D_FLAG_STAT_FORM_UNSET: ::c_int = 0x00000000; - -pub const D_FMT: ::nl_item = 3; -pub const D_GETFLAG: ::c_int = 1; -pub const D_SETFLAG: ::c_int = 2; -pub const D_T_FMT: ::nl_item = 2; -pub const ERA: ::nl_item = 46; -pub const ERA_D_FMT: ::nl_item = 47; -pub const ERA_D_T_FMT: ::nl_item = 48; -pub const ERA_T_FMT: ::nl_item = 49; -pub const RADIXCHAR: ::nl_item = 51; -pub const THOUSEP: ::nl_item = 52; -pub const YESEXPR: ::nl_item = 53; -pub const NOEXPR: ::nl_item = 54; -pub const F_GETOWN: ::c_int = 35; - -pub const FIONBIO: ::c_int = -2147195266; -pub const FIOASYNC: ::c_int = -2147195267; -pub const FIOCLEX: ::c_int = 26113; -pub const FIOGETOWN: ::c_int = 1074030203; -pub const FIONCLEX: ::c_int = 26114; -pub const FIONREAD: ::c_int = 1074030207; -pub const FIONSPACE: ::c_int = 1074030200; -pub const FIONWRITE: ::c_int = 1074030201; -pub const FIOSETOWN: ::c_int = -2147195268; - -pub const F_SETOWN: ::c_int = 36; -pub const IFF_ACCEPTRTADV: ::c_int = 0x40000000; -pub const IFF_IP6FORWARDING: ::c_int = 0x20000000; -pub const IFF_LINK0: ::c_int = 0x00001000; -pub const IFF_LINK1: ::c_int = 0x00002000; -pub const IFF_LINK2: ::c_int = 0x00004000; -pub const IFF_OACTIVE: ::c_int = 0x00000400; -pub const IFF_SHIM: ::c_int = 0x80000000; -pub const IFF_SIMPLEX: ::c_int = 0x00000800; +pub const CODESET: crate::nl_item = 1; +pub const CRNCYSTR: crate::nl_item = 55; + +pub const D_FLAG_FILTER: c_int = 0x00000001; +pub const D_FLAG_STAT: c_int = 0x00000002; +pub const D_FLAG_STAT_FORM_MASK: c_int = 0x000000f0; +pub const D_FLAG_STAT_FORM_T32_2001: c_int = 0x00000010; +pub const D_FLAG_STAT_FORM_T32_2008: c_int = 0x00000020; +pub const D_FLAG_STAT_FORM_T64_2008: c_int = 0x00000030; +pub const D_FLAG_STAT_FORM_UNSET: c_int = 0x00000000; + +pub const D_FMT: crate::nl_item = 3; +pub const D_GETFLAG: c_int = 1; +pub const D_SETFLAG: c_int = 2; +pub const D_T_FMT: crate::nl_item = 2; +pub const ERA: crate::nl_item = 46; +pub const ERA_D_FMT: crate::nl_item = 47; +pub const ERA_D_T_FMT: crate::nl_item = 48; +pub const ERA_T_FMT: crate::nl_item = 49; +pub const RADIXCHAR: crate::nl_item = 51; +pub const THOUSEP: crate::nl_item = 52; +pub const YESEXPR: crate::nl_item = 53; +pub const NOEXPR: crate::nl_item = 54; +pub const F_GETOWN: c_int = 35; + +pub const FIONBIO: c_int = -2147195266; +pub const FIOASYNC: c_int = -2147195267; +pub const FIOCLEX: c_int = 26113; +pub const FIOGETOWN: c_int = 1074030203; +pub const FIONCLEX: c_int = 26114; +pub const FIONREAD: c_int = 1074030207; +pub const FIONSPACE: c_int = 1074030200; +pub const FIONWRITE: c_int = 1074030201; +pub const FIOSETOWN: c_int = -2147195268; + +pub const F_SETOWN: c_int = 36; +pub const IFF_ACCEPTRTADV: c_int = 0x40000000; +pub const IFF_IP6FORWARDING: c_int = 0x20000000; +pub const IFF_LINK0: c_int = 0x00001000; +pub const IFF_LINK1: c_int = 0x00002000; +pub const IFF_LINK2: c_int = 0x00004000; +pub const IFF_OACTIVE: c_int = 0x00000400; +pub const IFF_SHIM: c_int = 0x80000000; +pub const IFF_SIMPLEX: c_int = 0x00000800; pub const IHFLOW: tcflag_t = 0x00000001; pub const IIDLE: tcflag_t = 0x00000008; -pub const IP_RECVDSTADDR: ::c_int = 7; -pub const IP_RECVIF: ::c_int = 20; +pub const IP_RECVDSTADDR: c_int = 7; +pub const IP_RECVIF: c_int = 20; pub const IPTOS_ECN_NOTECT: u8 = 0x00; pub const IUCLC: tcflag_t = 0x00000200; pub const IUTF8: tcflag_t = 0x0004000; -pub const KERN_ARGMAX: ::c_int = 8; -pub const KERN_ARND: ::c_int = 81; -pub const KERN_BOOTTIME: ::c_int = 21; -pub const KERN_CLOCKRATE: ::c_int = 12; -pub const KERN_FILE: ::c_int = 15; -pub const KERN_HOSTID: ::c_int = 11; -pub const KERN_HOSTNAME: ::c_int = 10; -pub const KERN_IOV_MAX: ::c_int = 38; -pub const KERN_JOB_CONTROL: ::c_int = 19; -pub const KERN_LOGSIGEXIT: ::c_int = 46; -pub const KERN_MAXFILES: ::c_int = 7; -pub const KERN_MAXID: ::c_int = 83; -pub const KERN_MAXPROC: ::c_int = 6; -pub const KERN_MAXVNODES: ::c_int = 5; -pub const KERN_NGROUPS: ::c_int = 18; -pub const KERN_OSRELEASE: ::c_int = 2; -pub const KERN_OSREV: ::c_int = 3; -pub const KERN_OSTYPE: ::c_int = 1; -pub const KERN_POSIX1: ::c_int = 17; -pub const KERN_PROC: ::c_int = 14; -pub const KERN_PROC_ALL: ::c_int = 0; -pub const KERN_PROC_ARGS: ::c_int = 48; -pub const KERN_PROC_ENV: ::c_int = 3; -pub const KERN_PROC_GID: ::c_int = 7; -pub const KERN_PROC_PGRP: ::c_int = 2; -pub const KERN_PROC_PID: ::c_int = 1; -pub const KERN_PROC_RGID: ::c_int = 8; -pub const KERN_PROC_RUID: ::c_int = 6; -pub const KERN_PROC_SESSION: ::c_int = 3; -pub const KERN_PROC_TTY: ::c_int = 4; -pub const KERN_PROC_UID: ::c_int = 5; -pub const KERN_PROF: ::c_int = 16; -pub const KERN_SAVED_IDS: ::c_int = 20; -pub const KERN_SECURELVL: ::c_int = 9; -pub const KERN_VERSION: ::c_int = 4; -pub const KERN_VNODE: ::c_int = 13; - -pub const LC_ALL: ::c_int = 63; -pub const LC_COLLATE: ::c_int = 1; -pub const LC_CTYPE: ::c_int = 2; -pub const LC_MESSAGES: ::c_int = 32; -pub const LC_MONETARY: ::c_int = 4; -pub const LC_NUMERIC: ::c_int = 8; -pub const LC_TIME: ::c_int = 16; - -pub const LOCAL_CONNWAIT: ::c_int = 0x0002; -pub const LOCAL_CREDS: ::c_int = 0x0001; -pub const LOCAL_PEEREID: ::c_int = 0x0003; - -pub const MAP_STACK: ::c_int = 0x00001000; -pub const MNT_NOEXEC: ::c_int = 0x02; -pub const MNT_NOSUID: ::c_int = 0x04; -pub const MNT_RDONLY: ::c_int = 0x01; - -pub const MSG_NOTIFICATION: ::c_int = 0x0400; - -pub const NET_RT_DUMP: ::c_int = 1; -pub const NET_RT_FLAGS: ::c_int = 2; -pub const NET_RT_IFLIST: ::c_int = 4; -pub const NI_NUMERICSCOPE: ::c_int = 0x00000040; +pub const KERN_ARGMAX: c_int = 8; +pub const KERN_ARND: c_int = 81; +pub const KERN_BOOTTIME: c_int = 21; +pub const KERN_CLOCKRATE: c_int = 12; +pub const KERN_FILE: c_int = 15; +pub const KERN_HOSTID: c_int = 11; +pub const KERN_HOSTNAME: c_int = 10; +pub const KERN_IOV_MAX: c_int = 38; +pub const KERN_JOB_CONTROL: c_int = 19; +pub const KERN_LOGSIGEXIT: c_int = 46; +pub const KERN_MAXFILES: c_int = 7; +pub const KERN_MAXID: c_int = 83; +pub const KERN_MAXPROC: c_int = 6; +pub const KERN_MAXVNODES: c_int = 5; +pub const KERN_NGROUPS: c_int = 18; +pub const KERN_OSRELEASE: c_int = 2; +pub const KERN_OSREV: c_int = 3; +pub const KERN_OSTYPE: c_int = 1; +pub const KERN_POSIX1: c_int = 17; +pub const KERN_PROC: c_int = 14; +pub const KERN_PROC_ALL: c_int = 0; +pub const KERN_PROC_ARGS: c_int = 48; +pub const KERN_PROC_ENV: c_int = 3; +pub const KERN_PROC_GID: c_int = 7; +pub const KERN_PROC_PGRP: c_int = 2; +pub const KERN_PROC_PID: c_int = 1; +pub const KERN_PROC_RGID: c_int = 8; +pub const KERN_PROC_RUID: c_int = 6; +pub const KERN_PROC_SESSION: c_int = 3; +pub const KERN_PROC_TTY: c_int = 4; +pub const KERN_PROC_UID: c_int = 5; +pub const KERN_PROF: c_int = 16; +pub const KERN_SAVED_IDS: c_int = 20; +pub const KERN_SECURELVL: c_int = 9; +pub const KERN_VERSION: c_int = 4; +pub const KERN_VNODE: c_int = 13; + +pub const LC_ALL: c_int = 63; +pub const LC_COLLATE: c_int = 1; +pub const LC_CTYPE: c_int = 2; +pub const LC_MESSAGES: c_int = 32; +pub const LC_MONETARY: c_int = 4; +pub const LC_NUMERIC: c_int = 8; +pub const LC_TIME: c_int = 16; + +pub const LOCAL_CONNWAIT: c_int = 0x0002; +pub const LOCAL_CREDS: c_int = 0x0001; +pub const LOCAL_PEEREID: c_int = 0x0003; + +pub const MAP_STACK: c_int = 0x00001000; +pub const MNT_NOEXEC: c_int = 0x02; +pub const MNT_NOSUID: c_int = 0x04; +pub const MNT_RDONLY: c_int = 0x01; + +pub const MSG_NOTIFICATION: c_int = 0x0400; + +pub const NET_RT_DUMP: c_int = 1; +pub const NET_RT_FLAGS: c_int = 2; +pub const NET_RT_IFLIST: c_int = 4; +pub const NI_NUMERICSCOPE: c_int = 0x00000040; pub const OHFLOW: tcflag_t = 0x00000002; pub const P_ALL: idtype_t = 0; pub const PARSTK: tcflag_t = 0x00000004; -pub const PF_ARP: ::c_int = 28; -pub const PF_CCITT: ::c_int = 10; -pub const PF_CHAOS: ::c_int = 5; -pub const PF_CNT: ::c_int = 21; -pub const PF_COIP: ::c_int = 20; -pub const PF_DATAKIT: ::c_int = 9; -pub const PF_DECnet: ::c_int = 12; -pub const PF_DLI: ::c_int = 13; -pub const PF_ECMA: ::c_int = 8; -pub const PF_HYLINK: ::c_int = 15; -pub const PF_IMPLINK: ::c_int = 3; -pub const PF_ISO: ::c_int = 7; -pub const PF_LAT: ::c_int = 14; -pub const PF_LINK: ::c_int = 18; -pub const PF_NATM: ::c_int = 27; -pub const PF_OSI: ::c_int = 7; -pub const PF_PIP: ::c_int = 25; -pub const PF_PUP: ::c_int = 4; -pub const PF_RTIP: ::c_int = 22; -pub const PF_XTP: ::c_int = 19; -pub const PM_STR: ::nl_item = 7; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 2; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 1; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const _POSIX_VDISABLE: ::c_int = 0; +pub const PF_ARP: c_int = 28; +pub const PF_CCITT: c_int = 10; +pub const PF_CHAOS: c_int = 5; +pub const PF_CNT: c_int = 21; +pub const PF_COIP: c_int = 20; +pub const PF_DATAKIT: c_int = 9; +pub const PF_DECnet: c_int = 12; +pub const PF_DLI: c_int = 13; +pub const PF_ECMA: c_int = 8; +pub const PF_HYLINK: c_int = 15; +pub const PF_IMPLINK: c_int = 3; +pub const PF_ISO: c_int = 7; +pub const PF_LAT: c_int = 14; +pub const PF_LINK: c_int = 18; +pub const PF_NATM: c_int = 27; +pub const PF_OSI: c_int = 7; +pub const PF_PIP: c_int = 25; +pub const PF_PUP: c_int = 4; +pub const PF_RTIP: c_int = 22; +pub const PF_XTP: c_int = 19; +pub const PM_STR: crate::nl_item = 7; +pub const POSIX_MADV_DONTNEED: c_int = 4; +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 2; +pub const POSIX_MADV_SEQUENTIAL: c_int = 1; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const _POSIX_VDISABLE: c_int = 0; pub const P_PGID: idtype_t = 2; pub const P_PID: idtype_t = 1; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_USER: ::c_int = 2; -pub const pseudo_AF_HDRCMPLT: ::c_int = 30; -pub const pseudo_AF_PIP: ::c_int = 25; -pub const pseudo_AF_RTIP: ::c_int = 22; -pub const pseudo_AF_XTP: ::c_int = 19; -pub const REG_ASSERT: ::c_int = 15; -pub const REG_ATOI: ::c_int = 255; -pub const REG_BACKR: ::c_int = 0x400; -pub const REG_BASIC: ::c_int = 0x00; -pub const REG_DUMP: ::c_int = 0x80; -pub const REG_EMPTY: ::c_int = 14; -pub const REG_INVARG: ::c_int = 16; -pub const REG_ITOA: ::c_int = 0o400; -pub const REG_LARGE: ::c_int = 0x200; -pub const REG_NOSPEC: ::c_int = 0x10; -pub const REG_OK: ::c_int = 0; -pub const REG_PEND: ::c_int = 0x20; -pub const REG_TRACE: ::c_int = 0x100; - -pub const RLIMIT_AS: ::c_int = 6; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_MEMLOCK: ::c_int = 7; -pub const RLIMIT_NOFILE: ::c_int = 5; -pub const RLIMIT_NPROC: ::c_int = 8; -pub const RLIMIT_RSS: ::c_int = 6; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_VMEM: ::c_int = 6; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_USER: c_int = 2; +pub const pseudo_AF_HDRCMPLT: c_int = 30; +pub const pseudo_AF_PIP: c_int = 25; +pub const pseudo_AF_RTIP: c_int = 22; +pub const pseudo_AF_XTP: c_int = 19; +pub const REG_ASSERT: c_int = 15; +pub const REG_ATOI: c_int = 255; +pub const REG_BACKR: c_int = 0x400; +pub const REG_BASIC: c_int = 0x00; +pub const REG_DUMP: c_int = 0x80; +pub const REG_EMPTY: c_int = 14; +pub const REG_INVARG: c_int = 16; +pub const REG_ITOA: c_int = 0o400; +pub const REG_LARGE: c_int = 0x200; +pub const REG_NOSPEC: c_int = 0x10; +pub const REG_OK: c_int = 0; +pub const REG_PEND: c_int = 0x20; +pub const REG_TRACE: c_int = 0x100; + +pub const RLIMIT_AS: c_int = 6; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_MEMLOCK: c_int = 7; +pub const RLIMIT_NOFILE: c_int = 5; +pub const RLIMIT_NPROC: c_int = 8; +pub const RLIMIT_RSS: c_int = 6; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_VMEM: c_int = 6; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] -pub const RLIM_NLIMITS: ::c_int = 14; - -pub const SCHED_ADJTOHEAD: ::c_int = 5; -pub const SCHED_ADJTOTAIL: ::c_int = 6; -pub const SCHED_MAXPOLICY: ::c_int = 7; -pub const SCHED_SETPRIO: ::c_int = 7; -pub const SCHED_SPORADIC: ::c_int = 4; - -pub const SHM_ANON: *mut ::c_char = -1isize as *mut ::c_char; -pub const SIGCLD: ::c_int = SIGCHLD; -pub const SIGDEADLK: ::c_int = 7; -pub const SIGEMT: ::c_int = 7; -pub const SIGEV_NONE: ::c_int = 0; -pub const SIGEV_SIGNAL: ::c_int = 129; -pub const SIGEV_THREAD: ::c_int = 135; -pub const SIOCGIFADDR: ::c_int = -1064277727; -pub const SO_FIB: ::c_int = 0x100a; -pub const SO_OVERFLOWED: ::c_int = 0x1009; -pub const SO_SETFIB: ::c_int = 0x100a; -pub const SO_TXPRIO: ::c_int = 0x100b; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_VLANPRIO: ::c_int = 0x100c; -pub const _SS_ALIGNSIZE: usize = ::mem::size_of::(); +pub const RLIM_NLIMITS: c_int = 14; + +pub const SCHED_ADJTOHEAD: c_int = 5; +pub const SCHED_ADJTOTAIL: c_int = 6; +pub const SCHED_MAXPOLICY: c_int = 7; +pub const SCHED_SETPRIO: c_int = 7; +pub const SCHED_SPORADIC: c_int = 4; + +pub const SHM_ANON: *mut c_char = -1isize as *mut c_char; +pub const SIGCLD: c_int = SIGCHLD; +pub const SIGDEADLK: c_int = 7; +pub const SIGEMT: c_int = 7; +pub const SIGEV_NONE: c_int = 0; +pub const SIGEV_SIGNAL: c_int = 129; +pub const SIGEV_THREAD: c_int = 135; +pub const SIOCGIFADDR: c_int = -1064277727; +pub const SO_FIB: c_int = 0x100a; +pub const SO_OVERFLOWED: c_int = 0x1009; +pub const SO_SETFIB: c_int = 0x100a; +pub const SO_TXPRIO: c_int = 0x100b; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_VLANPRIO: c_int = 0x100c; +pub const _SS_ALIGNSIZE: usize = crate::mem::size_of::(); pub const _SS_MAXSIZE: usize = 128; pub const _SS_PAD1SIZE: usize = _SS_ALIGNSIZE - 2; pub const _SS_PAD2SIZE: usize = _SS_MAXSIZE - 2 - _SS_PAD1SIZE - _SS_ALIGNSIZE; pub const TC_CPOSIX: tcflag_t = CLOCAL | CREAD | CSIZE | CSTOPB | HUPCL | PARENB | PARODD; -pub const TCGETS: ::c_int = 0x404c540d; +pub const TCGETS: c_int = 0x404c540d; pub const TC_IPOSIX: tcflag_t = BRKINT | ICRNL | IGNBRK | IGNPAR | INLCR | INPCK | ISTRIP | IXOFF | IXON | PARMRK; pub const TC_LPOSIX: tcflag_t = ECHO | ECHOE | ECHOK | ECHONL | ICANON | IEXTEN | ISIG | NOFLSH | TOSTOP; pub const TC_OPOSIX: tcflag_t = OPOST; -pub const T_FMT_AMPM: ::nl_item = 5; - -pub const TIOCCBRK: ::c_int = 29818; -pub const TIOCCDTR: ::c_int = 29816; -pub const TIOCDRAIN: ::c_int = 29790; -pub const TIOCEXCL: ::c_int = 29709; -pub const TIOCFLUSH: ::c_int = -2147191792; -pub const TIOCGETA: ::c_int = 1078752275; -pub const TIOCGPGRP: ::c_int = 1074033783; -pub const TIOCGWINSZ: ::c_int = 1074295912; -pub const TIOCMBIC: ::c_int = -2147191701; -pub const TIOCMBIS: ::c_int = -2147191700; -pub const TIOCMGET: ::c_int = 1074033770; -pub const TIOCMSET: ::c_int = -2147191699; -pub const TIOCNOTTY: ::c_int = 29809; -pub const TIOCNXCL: ::c_int = 29710; -pub const TIOCOUTQ: ::c_int = 1074033779; -pub const TIOCPKT: ::c_int = -2147191696; -pub const TIOCPKT_DATA: ::c_int = 0x00; -pub const TIOCPKT_DOSTOP: ::c_int = 0x20; -pub const TIOCPKT_FLUSHREAD: ::c_int = 0x01; -pub const TIOCPKT_FLUSHWRITE: ::c_int = 0x02; -pub const TIOCPKT_IOCTL: ::c_int = 0x40; -pub const TIOCPKT_NOSTOP: ::c_int = 0x10; -pub const TIOCPKT_START: ::c_int = 0x08; -pub const TIOCPKT_STOP: ::c_int = 0x04; -pub const TIOCSBRK: ::c_int = 29819; -pub const TIOCSCTTY: ::c_int = 29793; -pub const TIOCSDTR: ::c_int = 29817; -pub const TIOCSETA: ::c_int = -2142473196; -pub const TIOCSETAF: ::c_int = -2142473194; -pub const TIOCSETAW: ::c_int = -2142473195; -pub const TIOCSPGRP: ::c_int = -2147191690; -pub const TIOCSTART: ::c_int = 29806; -pub const TIOCSTI: ::c_int = -2147388302; -pub const TIOCSTOP: ::c_int = 29807; -pub const TIOCSWINSZ: ::c_int = -2146929561; - -pub const USER_CS_PATH: ::c_int = 1; -pub const USER_BC_BASE_MAX: ::c_int = 2; -pub const USER_BC_DIM_MAX: ::c_int = 3; -pub const USER_BC_SCALE_MAX: ::c_int = 4; -pub const USER_BC_STRING_MAX: ::c_int = 5; -pub const USER_COLL_WEIGHTS_MAX: ::c_int = 6; -pub const USER_EXPR_NEST_MAX: ::c_int = 7; -pub const USER_LINE_MAX: ::c_int = 8; -pub const USER_RE_DUP_MAX: ::c_int = 9; -pub const USER_POSIX2_VERSION: ::c_int = 10; -pub const USER_POSIX2_C_BIND: ::c_int = 11; -pub const USER_POSIX2_C_DEV: ::c_int = 12; -pub const USER_POSIX2_CHAR_TERM: ::c_int = 13; -pub const USER_POSIX2_FORT_DEV: ::c_int = 14; -pub const USER_POSIX2_FORT_RUN: ::c_int = 15; -pub const USER_POSIX2_LOCALEDEF: ::c_int = 16; -pub const USER_POSIX2_SW_DEV: ::c_int = 17; -pub const USER_POSIX2_UPE: ::c_int = 18; -pub const USER_STREAM_MAX: ::c_int = 19; -pub const USER_TZNAME_MAX: ::c_int = 20; -pub const USER_ATEXIT_MAX: ::c_int = 21; -pub const USER_MAXID: ::c_int = 22; +pub const T_FMT_AMPM: crate::nl_item = 5; + +pub const TIOCCBRK: c_int = 29818; +pub const TIOCCDTR: c_int = 29816; +pub const TIOCDRAIN: c_int = 29790; +pub const TIOCEXCL: c_int = 29709; +pub const TIOCFLUSH: c_int = -2147191792; +pub const TIOCGETA: c_int = 1078752275; +pub const TIOCGPGRP: c_int = 1074033783; +pub const TIOCGWINSZ: c_int = 1074295912; +pub const TIOCMBIC: c_int = -2147191701; +pub const TIOCMBIS: c_int = -2147191700; +pub const TIOCMGET: c_int = 1074033770; +pub const TIOCMSET: c_int = -2147191699; +pub const TIOCNOTTY: c_int = 29809; +pub const TIOCNXCL: c_int = 29710; +pub const TIOCOUTQ: c_int = 1074033779; +pub const TIOCPKT: c_int = -2147191696; +pub const TIOCPKT_DATA: c_int = 0x00; +pub const TIOCPKT_DOSTOP: c_int = 0x20; +pub const TIOCPKT_FLUSHREAD: c_int = 0x01; +pub const TIOCPKT_FLUSHWRITE: c_int = 0x02; +pub const TIOCPKT_IOCTL: c_int = 0x40; +pub const TIOCPKT_NOSTOP: c_int = 0x10; +pub const TIOCPKT_START: c_int = 0x08; +pub const TIOCPKT_STOP: c_int = 0x04; +pub const TIOCSBRK: c_int = 29819; +pub const TIOCSCTTY: c_int = 29793; +pub const TIOCSDTR: c_int = 29817; +pub const TIOCSETA: c_int = -2142473196; +pub const TIOCSETAF: c_int = -2142473194; +pub const TIOCSETAW: c_int = -2142473195; +pub const TIOCSPGRP: c_int = -2147191690; +pub const TIOCSTART: c_int = 29806; +pub const TIOCSTI: c_int = -2147388302; +pub const TIOCSTOP: c_int = 29807; +pub const TIOCSWINSZ: c_int = -2146929561; + +pub const USER_CS_PATH: c_int = 1; +pub const USER_BC_BASE_MAX: c_int = 2; +pub const USER_BC_DIM_MAX: c_int = 3; +pub const USER_BC_SCALE_MAX: c_int = 4; +pub const USER_BC_STRING_MAX: c_int = 5; +pub const USER_COLL_WEIGHTS_MAX: c_int = 6; +pub const USER_EXPR_NEST_MAX: c_int = 7; +pub const USER_LINE_MAX: c_int = 8; +pub const USER_RE_DUP_MAX: c_int = 9; +pub const USER_POSIX2_VERSION: c_int = 10; +pub const USER_POSIX2_C_BIND: c_int = 11; +pub const USER_POSIX2_C_DEV: c_int = 12; +pub const USER_POSIX2_CHAR_TERM: c_int = 13; +pub const USER_POSIX2_FORT_DEV: c_int = 14; +pub const USER_POSIX2_FORT_RUN: c_int = 15; +pub const USER_POSIX2_LOCALEDEF: c_int = 16; +pub const USER_POSIX2_SW_DEV: c_int = 17; +pub const USER_POSIX2_UPE: c_int = 18; +pub const USER_STREAM_MAX: c_int = 19; +pub const USER_TZNAME_MAX: c_int = 20; +pub const USER_ATEXIT_MAX: c_int = 21; +pub const USER_MAXID: c_int = 22; pub const VDOWN: usize = 31; pub const VINS: usize = 32; @@ -2669,19 +2671,19 @@ pub const VRIGHT: usize = 29; pub const VUP: usize = 30; pub const XCASE: tcflag_t = 0x00000004; -pub const PTHREAD_BARRIER_SERIAL_THREAD: ::c_int = -1; -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0x00; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x01; +pub const PTHREAD_BARRIER_SERIAL_THREAD: c_int = -1; +pub const PTHREAD_CREATE_JOINABLE: c_int = 0x00; +pub const PTHREAD_CREATE_DETACHED: c_int = 0x01; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 1; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 2; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 3; -pub const PTHREAD_STACK_MIN: ::size_t = 256; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = 0; -pub const PTHREAD_MUTEX_STALLED: ::c_int = 0x00; -pub const PTHREAD_MUTEX_ROBUST: ::c_int = 0x10; -pub const PTHREAD_PROCESS_PRIVATE: ::c_int = 0x00; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 0x01; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 1; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 2; +pub const PTHREAD_MUTEX_NORMAL: c_int = 3; +pub const PTHREAD_STACK_MIN: size_t = 256; +pub const PTHREAD_MUTEX_DEFAULT: c_int = 0; +pub const PTHREAD_MUTEX_STALLED: c_int = 0x00; +pub const PTHREAD_MUTEX_ROBUST: c_int = 0x10; +pub const PTHREAD_PROCESS_PRIVATE: c_int = 0x00; +pub const PTHREAD_PROCESS_SHARED: c_int = 0x01; pub const PTHREAD_KEYS_MAX: usize = 128; @@ -2701,13 +2703,13 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __lock: PTHREAD_MUTEX_INITIALIZER, __rcond: PTHREAD_COND_INITIALIZER, __wcond: PTHREAD_COND_INITIALIZER, - __owner: -2i32 as ::c_uint, + __owner: -2i32 as c_uint, __spare: 0, }; const_fn! { {const} fn _CMSG_ALIGN(len: usize) -> usize { - len + ::mem::size_of::() - 1 & !(::mem::size_of::() - 1) + len + crate::mem::size_of::() - 1 & !(crate::mem::size_of::() - 1) } {const} fn _ALIGN(p: usize, b: usize) -> usize { @@ -2717,51 +2719,51 @@ const_fn! { f! { pub fn CMSG_FIRSTHDR(mhdr: *const msghdr) -> *mut cmsghdr { - if (*mhdr).msg_controllen as usize >= ::mem::size_of::() { + if (*mhdr).msg_controllen as usize >= crate::mem::size_of::() { (*mhdr).msg_control as *mut cmsghdr } else { 0 as *mut cmsghdr } } - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let msg = _CMSG_ALIGN((*cmsg).cmsg_len as usize); - let next = cmsg as usize + msg + _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()); + let next = cmsg as usize + msg + _CMSG_ALIGN(crate::mem::size_of::()); if next > (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { - (cmsg as usize + msg) as *mut ::cmsghdr + (cmsg as usize + msg) as *mut cmsghdr } } - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(_CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(_CMSG_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - _CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + _CMSG_ALIGN(crate::mem::size_of::()) as c_uint + length } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (_CMSG_ALIGN(::mem::size_of::()) + _CMSG_ALIGN(length as usize)) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (_CMSG_ALIGN(crate::mem::size_of::()) + _CMSG_ALIGN(length as usize)) as c_uint } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } @@ -2772,15 +2774,15 @@ f! { } } - pub fn _DEXTRA_FIRST(_d: *const dirent) -> *mut ::dirent_extra { + pub fn _DEXTRA_FIRST(_d: *const dirent) -> *mut crate::dirent_extra { let _f = &((*(_d)).d_name) as *const _; let _s = _d as usize; - _ALIGN(_s + _f as usize - _s + (*_d).d_namelen as usize + 1, 8) as *mut ::dirent_extra + _ALIGN(_s + _f as usize - _s + (*_d).d_namelen as usize + 1, 8) as *mut crate::dirent_extra } - pub fn _DEXTRA_VALID(_x: *const ::dirent_extra, _d: *const dirent) -> bool { - let sz = _x as usize - _d as usize + ::mem::size_of::<::dirent_extra>(); + pub fn _DEXTRA_VALID(_x: *const crate::dirent_extra, _d: *const dirent) -> bool { + let sz = _x as usize - _d as usize + crate::mem::size_of::(); let rsz = (*_d).d_reclen as usize; if sz > rsz || sz + (*_x).d_datalen as usize > rsz { @@ -2790,66 +2792,66 @@ f! { } } - pub fn _DEXTRA_NEXT(_x: *const ::dirent_extra) -> *mut ::dirent_extra { + pub fn _DEXTRA_NEXT(_x: *const crate::dirent_extra) -> *mut crate::dirent_extra { _ALIGN( - _x as usize + ::mem::size_of::<::dirent_extra>() + (*_x).d_datalen as usize, + _x as usize + crate::mem::size_of::() + (*_x).d_datalen as usize, 8, - ) as *mut ::dirent_extra + ) as *mut crate::dirent_extra } pub fn SOCKCREDSIZE(ngrps: usize) -> usize { let ngrps = if ngrps > 0 { ngrps - 1 } else { 0 }; - ::mem::size_of::() + ::mem::size_of::<::gid_t>() * ngrps + crate::mem::size_of::() + crate::mem::size_of::() * ngrps } - pub fn major(dev: ::dev_t) -> ::c_uint { - ((dev as ::c_uint) >> 10) & 0x3f + pub fn major(dev: crate::dev_t) -> c_uint { + ((dev as c_uint) >> 10) & 0x3f } - pub fn minor(dev: ::dev_t) -> ::c_uint { - (dev as ::c_uint) & 0x3ff + pub fn minor(dev: crate::dev_t) -> c_uint { + (dev as c_uint) & 0x3ff } } safe_f! { - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } pub {const} fn IPTOS_ECN(x: u8) -> u8 { - x & ::IPTOS_ECN_MASK + x & crate::IPTOS_ECN_MASK } - pub {const} fn makedev(major: ::c_uint, minor: ::c_uint) -> ::dev_t { - ((major << 10) | (minor)) as ::dev_t + pub {const} fn makedev(major: c_uint, minor: c_uint) -> crate::dev_t { + ((major << 10) | (minor)) as crate::dev_t } } @@ -2859,626 +2861,613 @@ safe_f! { #[link(name = "socket")] #[cfg_attr(not(target_env = "nto70"), link(name = "regex"))] extern "C" { - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; pub fn mknodat( - __fd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: ::dev_t, - ) -> ::c_int; + __fd: c_int, + pathname: *const c_char, + mode: crate::mode_t, + dev: crate::dev_t, + ) -> c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; - pub fn clock_getcpuclockid(pid: ::pid_t, clk_id: *mut ::clockid_t) -> ::c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; + pub fn clock_getcpuclockid(pid: crate::pid_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; - pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; + pub fn setgroups(ngroups: c_int, ptr: *const crate::gid_t) -> c_int; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_mutexattr_setpshared( - attr: *mut pthread_mutexattr_t, - pshared: ::c_int, - ) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn pthread_condattr_setpshared(attr: *mut pthread_condattr_t, pshared: c_int) -> c_int; + pub fn pthread_mutexattr_setpshared(attr: *mut pthread_mutexattr_t, pshared: c_int) -> c_int; pub fn pthread_rwlockattr_getpshared( attr: *const pthread_rwlockattr_t, - val: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: ::c_int) -> ::c_int; - pub fn ptsname_r(fd: ::c_int, buf: *mut ::c_char, buflen: ::size_t) -> *mut ::c_char; - pub fn clearenv() -> ::c_int; - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; + val: *mut c_int, + ) -> c_int; + pub fn pthread_rwlockattr_setpshared(attr: *mut pthread_rwlockattr_t, val: c_int) -> c_int; + pub fn ptsname_r(fd: c_int, buf: *mut c_char, buflen: size_t) -> *mut c_char; + pub fn clearenv() -> c_int; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; pub fn wait4( - pid: ::pid_t, - status: *mut ::c_int, - options: ::c_int, - rusage: *mut ::rusage, - ) -> ::pid_t; + pid: crate::pid_t, + status: *mut c_int, + options: c_int, + rusage: *mut crate::rusage, + ) -> crate::pid_t; pub fn execvpe( - file: *const ::c_char, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; - - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - - pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; - pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + file: *const c_char, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; + + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + + pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; + pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::c_int; + winp: *mut crate::winsize, + ) -> c_int; pub fn forkpty( - amaster: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + name: *mut c_char, termp: *mut termios, - winp: *mut ::winsize, - ) -> ::pid_t; - pub fn login_tty(fd: ::c_int) -> ::c_int; + winp: *mut crate::winsize, + ) -> crate::pid_t; + pub fn login_tty(fd: c_int) -> c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; - pub fn getpeereid(socket: ::c_int, euid: *mut ::uid_t, egid: *mut ::gid_t) -> ::c_int; + pub fn getpeereid(socket: c_int, euid: *mut crate::uid_t, egid: *mut crate::gid_t) -> c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; - pub fn abs(i: ::c_int) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); + pub fn abs(i: c_int) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); pub fn setpwent(); pub fn endpwent(); pub fn getpwent() -> *mut passwd; pub fn setgrent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; pub fn setspent(); pub fn endspent(); - pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; - pub fn ftok(pathname: *const ::c_char, proj_id: ::c_int) -> ::key_t; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; + pub fn ftok(pathname: *const c_char, proj_id: c_int) -> crate::key_t; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn mkostemp(template: *mut ::c_char, flags: ::c_int) -> ::c_int; - pub fn mkostemps(template: *mut ::c_char, suffixlen: ::c_int, flags: ::c_int) -> ::c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn mkostemp(template: *mut c_char, flags: c_int) -> c_int; + pub fn mkostemps(template: *mut c_char, suffixlen: c_int, flags: c_int) -> c_int; pub fn sigtimedwait( set: *const sigset_t, info: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> ::c_int; - pub fn pthread_setschedprio(native: ::pthread_t, priority: ::c_int) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwaitinfo(set: *const sigset_t, info: *mut siginfo_t) -> c_int; + pub fn pthread_setschedprio(native: crate::pthread_t, priority: c_int) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn glob( pattern: *const c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; - pub fn globfree(pglob: *mut ::glob_t); + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; + pub fn globfree(pglob: *mut crate::glob_t); - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - - pub fn getdomainname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn setdomainname(name: *const ::c_char, len: ::size_t) -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + + pub fn getdomainname(name: *mut c_char, len: size_t) -> c_int; + pub fn setdomainname(name: *const c_char, len: size_t) -> c_int; pub fn sync(); pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; - pub fn umount(target: *const ::c_char, flags: ::c_int) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn settimeofday(tv: *const ::timeval, tz: *const ::c_void) -> ::c_int; - pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; + pub fn umount(target: *const c_char, flags: c_int) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn settimeofday(tv: *const crate::timeval, tz: *const c_void) -> c_int; + pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; pub fn mount( - special_device: *const ::c_char, - mount_directory: *const ::c_char, - flags: ::c_int, - mount_type: *const ::c_char, - mount_data: *const ::c_void, - mount_datalen: ::c_int, - ) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; - pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> ::c_int; + special_device: *const c_char, + mount_directory: *const c_char, + flags: c_int, + mount_type: *const c_char, + mount_data: *const c_void, + mount_datalen: c_int, + ) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; + pub fn pthread_mutex_consistent(mutex: *mut pthread_mutex_t) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_spin_init(lock: *mut ::pthread_spinlock_t, pshared: ::c_int) -> ::c_int; - pub fn pthread_spin_destroy(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_lock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_trylock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_spin_unlock(lock: *mut ::pthread_spinlock_t) -> ::c_int; - pub fn pthread_barrierattr_init(__attr: *mut ::pthread_barrierattr_t) -> ::c_int; - pub fn pthread_barrierattr_destroy(__attr: *mut ::pthread_barrierattr_t) -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_spin_init(lock: *mut crate::pthread_spinlock_t, pshared: c_int) -> c_int; + pub fn pthread_spin_destroy(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_lock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_trylock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_spin_unlock(lock: *mut crate::pthread_spinlock_t) -> c_int; + pub fn pthread_barrierattr_init(__attr: *mut crate::pthread_barrierattr_t) -> c_int; + pub fn pthread_barrierattr_destroy(__attr: *mut crate::pthread_barrierattr_t) -> c_int; pub fn pthread_barrierattr_getpshared( - __attr: *const ::pthread_barrierattr_t, - __pshared: *mut ::c_int, - ) -> ::c_int; + __attr: *const crate::pthread_barrierattr_t, + __pshared: *mut c_int, + ) -> c_int; pub fn pthread_barrierattr_setpshared( - __attr: *mut ::pthread_barrierattr_t, - __pshared: ::c_int, - ) -> ::c_int; + __attr: *mut crate::pthread_barrierattr_t, + __pshared: c_int, + ) -> c_int; pub fn pthread_barrier_init( - __barrier: *mut ::pthread_barrier_t, - __attr: *const ::pthread_barrierattr_t, - __count: ::c_uint, - ) -> ::c_int; - pub fn pthread_barrier_destroy(__barrier: *mut ::pthread_barrier_t) -> ::c_int; - pub fn pthread_barrier_wait(__barrier: *mut ::pthread_barrier_t) -> ::c_int; - - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + __barrier: *mut crate::pthread_barrier_t, + __attr: *const crate::pthread_barrierattr_t, + __count: c_uint, + ) -> c_int; + pub fn pthread_barrier_destroy(__barrier: *mut crate::pthread_barrier_t) -> c_int; + pub fn pthread_barrier_wait(__barrier: *mut crate::pthread_barrier_t) -> c_int; + + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; pub fn pthread_attr_getguardsize( - attr: *const ::pthread_attr_t, - guardsize: *mut ::size_t, - ) -> ::c_int; - pub fn pthread_attr_setguardsize(attr: *mut ::pthread_attr_t, guardsize: ::size_t) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::size_t) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; + attr: *const crate::pthread_attr_t, + guardsize: *mut size_t, + ) -> c_int; + pub fn pthread_attr_setguardsize(attr: *mut crate::pthread_attr_t, guardsize: size_t) -> c_int; + pub fn sethostname(name: *const c_char, len: size_t) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; pub fn pthread_condattr_getpshared( attr: *const pthread_condattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn initgroups(user: *const ::c_char, group: ::gid_t) -> ::c_int; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn initgroups(user: *const c_char, group: crate::gid_t) -> c_int; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrouplist( - user: *const ::c_char, - group: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; + user: *const c_char, + group: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_getpshared( attr: *const pthread_mutexattr_t, - pshared: *mut ::c_int, - ) -> ::c_int; + pshared: *mut c_int, + ) -> c_int; pub fn pthread_mutexattr_getrobust( attr: *const pthread_mutexattr_t, - robustness: *mut ::c_int, - ) -> ::c_int; - pub fn pthread_mutexattr_setrobust( - attr: *mut pthread_mutexattr_t, - robustness: ::c_int, - ) -> ::c_int; + robustness: *mut c_int, + ) -> c_int; + pub fn pthread_mutexattr_setrobust(attr: *mut pthread_mutexattr_t, robustness: c_int) -> c_int; pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; - pub fn getitimer(which: ::c_int, curr_value: *mut ::itimerval) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; + pub fn getitimer(which: c_int, curr_value: *mut crate::itimerval) -> c_int; pub fn setitimer( - which: ::c_int, - value: *const ::itimerval, - ovalue: *mut ::itimerval, - ) -> ::c_int; + which: c_int, + value: *const crate::itimerval, + ovalue: *mut crate::itimerval, + ) -> c_int; pub fn posix_spawn( - pid: *mut ::pid_t, - path: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; + pid: *mut crate::pid_t, + path: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; pub fn posix_spawnp( - pid: *mut ::pid_t, - file: *const ::c_char, - file_actions: *const ::posix_spawn_file_actions_t, - attrp: *const ::posix_spawnattr_t, - argv: *const *mut ::c_char, - envp: *const *mut ::c_char, - ) -> ::c_int; - pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> ::c_int; - pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> ::c_int; + pid: *mut crate::pid_t, + file: *const c_char, + file_actions: *const crate::posix_spawn_file_actions_t, + attrp: *const crate::posix_spawnattr_t, + argv: *const *mut c_char, + envp: *const *mut c_char, + ) -> c_int; + pub fn posix_spawnattr_init(attr: *mut posix_spawnattr_t) -> c_int; + pub fn posix_spawnattr_destroy(attr: *mut posix_spawnattr_t) -> c_int; pub fn posix_spawnattr_getsigdefault( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigdefault( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_getsigmask( attr: *const posix_spawnattr_t, - default: *mut ::sigset_t, - ) -> ::c_int; + default: *mut crate::sigset_t, + ) -> c_int; pub fn posix_spawnattr_setsigmask( attr: *mut posix_spawnattr_t, - default: *const ::sigset_t, - ) -> ::c_int; - pub fn posix_spawnattr_getflags( - attr: *const posix_spawnattr_t, - flags: *mut ::c_short, - ) -> ::c_int; - pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: ::c_short) -> ::c_int; + default: *const crate::sigset_t, + ) -> c_int; + pub fn posix_spawnattr_getflags(attr: *const posix_spawnattr_t, flags: *mut c_short) -> c_int; + pub fn posix_spawnattr_setflags(attr: *mut posix_spawnattr_t, flags: c_short) -> c_int; pub fn posix_spawnattr_getpgroup( attr: *const posix_spawnattr_t, - flags: *mut ::pid_t, - ) -> ::c_int; - pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: ::pid_t) -> ::c_int; + flags: *mut crate::pid_t, + ) -> c_int; + pub fn posix_spawnattr_setpgroup(attr: *mut posix_spawnattr_t, flags: crate::pid_t) -> c_int; pub fn posix_spawnattr_getschedpolicy( attr: *const posix_spawnattr_t, - flags: *mut ::c_int, - ) -> ::c_int; - pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: ::c_int) -> ::c_int; + flags: *mut c_int, + ) -> c_int; + pub fn posix_spawnattr_setschedpolicy(attr: *mut posix_spawnattr_t, flags: c_int) -> c_int; pub fn posix_spawnattr_getschedparam( attr: *const posix_spawnattr_t, - param: *mut ::sched_param, - ) -> ::c_int; + param: *mut crate::sched_param, + ) -> c_int; pub fn posix_spawnattr_setschedparam( attr: *mut posix_spawnattr_t, - param: *const ::sched_param, - ) -> ::c_int; + param: *const crate::sched_param, + ) -> c_int; - pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> ::c_int; - pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> ::c_int; + pub fn posix_spawn_file_actions_init(actions: *mut posix_spawn_file_actions_t) -> c_int; + pub fn posix_spawn_file_actions_destroy(actions: *mut posix_spawn_file_actions_t) -> c_int; pub fn posix_spawn_file_actions_addopen( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - path: *const ::c_char, - oflag: ::c_int, - mode: ::mode_t, - ) -> ::c_int; + fd: c_int, + path: *const c_char, + oflag: c_int, + mode: crate::mode_t, + ) -> c_int; pub fn posix_spawn_file_actions_addclose( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - ) -> ::c_int; + fd: c_int, + ) -> c_int; pub fn posix_spawn_file_actions_adddup2( actions: *mut posix_spawn_file_actions_t, - fd: ::c_int, - newfd: ::c_int, - ) -> ::c_int; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; - pub fn inotify_rm_watch(fd: ::c_int, wd: ::c_int) -> ::c_int; - pub fn inotify_init() -> ::c_int; - pub fn inotify_add_watch(fd: ::c_int, path: *const ::c_char, mask: u32) -> ::c_int; - - pub fn gettid() -> ::pid_t; - - pub fn pthread_getcpuclockid(thread: ::pthread_t, clk_id: *mut ::clockid_t) -> ::c_int; + fd: c_int, + newfd: c_int, + ) -> c_int; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; + pub fn inotify_rm_watch(fd: c_int, wd: c_int) -> c_int; + pub fn inotify_init() -> c_int; + pub fn inotify_add_watch(fd: c_int, path: *const c_char, mask: u32) -> c_int; + + pub fn gettid() -> crate::pid_t; + + pub fn pthread_getcpuclockid(thread: crate::pthread_t, clk_id: *mut crate::clockid_t) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; pub fn sendmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_uint, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + ) -> c_int; pub fn recvmmsg( - sockfd: ::c_int, - msgvec: *mut ::mmsghdr, - vlen: ::c_uint, - flags: ::c_uint, - timeout: *mut ::timespec, - ) -> ::c_int; + sockfd: c_int, + msgvec: *mut crate::mmsghdr, + vlen: c_uint, + flags: c_uint, + timeout: *mut crate::timespec, + ) -> c_int; - pub fn mallopt(param: ::c_int, value: i64) -> ::c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; + pub fn mallopt(param: c_int, value: i64) -> c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; - pub fn ctermid(s: *mut ::c_char) -> *mut ::c_char; - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn ctermid(s: *mut c_char) -> *mut c_char; + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; - pub fn mallinfo() -> ::mallinfo; + pub fn mallinfo() -> crate::mallinfo; pub fn getpwent_r( - pwd: *mut ::passwd, - buf: *mut ::c_char, - __bufsize: ::c_int, - __result: *mut *mut ::passwd, - ) -> ::c_int; - pub fn pthread_getname_np(thread: ::pthread_t, name: *mut ::c_char, len: ::c_int) -> ::c_int; - pub fn pthread_setname_np(thread: ::pthread_t, name: *const ::c_char) -> ::c_int; + pwd: *mut crate::passwd, + buf: *mut c_char, + __bufsize: c_int, + __result: *mut *mut crate::passwd, + ) -> c_int; + pub fn pthread_getname_np(thread: crate::pthread_t, name: *mut c_char, len: c_int) -> c_int; + pub fn pthread_setname_np(thread: crate::pthread_t, name: *const c_char) -> c_int; pub fn sysctl( - _: *const ::c_int, - _: ::c_uint, - _: *mut ::c_void, - _: *mut ::size_t, - _: *const ::c_void, - _: ::size_t, - ) -> ::c_int; + _: *const c_int, + _: c_uint, + _: *mut c_void, + _: *mut size_t, + _: *const c_void, + _: size_t, + ) -> c_int; - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlp: *const ::rlimit) -> ::c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlp: *const crate::rlimit) -> c_int; pub fn lio_listio( - __mode: ::c_int, + __mode: c_int, __list: *const *mut aiocb, - __nent: ::c_int, + __nent: c_int, __sig: *mut sigevent, - ) -> ::c_int; + ) -> c_int; pub fn dl_iterate_phdr( - callback: ::Option< + callback: Option< unsafe extern "C" fn( // The original .h file declares this as *const, but for consistency with other platforms, // changing this to *mut to make it easier to use. // Maybe in v0.3 all platforms should use this as a *const. info: *mut dl_phdr_info, - size: ::size_t, - data: *mut ::c_void, - ) -> ::c_int, + size: size_t, + data: *mut c_void, + ) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; + data: *mut c_void, + ) -> c_int; - pub fn memset_s(s: *mut ::c_void, smax: ::size_t, c: ::c_int, n: ::size_t) -> ::c_int; + pub fn memset_s(s: *mut c_void, smax: size_t, c: c_int, n: size_t) -> c_int; - pub fn regcomp( - __preg: *mut ::regex_t, - __pattern: *const ::c_char, - __cflags: ::c_int, - ) -> ::c_int; + pub fn regcomp(__preg: *mut crate::regex_t, __pattern: *const c_char, __cflags: c_int) + -> c_int; pub fn regexec( - __preg: *const ::regex_t, - __str: *const ::c_char, - __nmatch: ::size_t, - __pmatch: *mut ::regmatch_t, - __eflags: ::c_int, - ) -> ::c_int; + __preg: *const crate::regex_t, + __str: *const c_char, + __nmatch: size_t, + __pmatch: *mut crate::regmatch_t, + __eflags: c_int, + ) -> c_int; pub fn regerror( - __errcode: ::c_int, - __preg: *const ::regex_t, - __errbuf: *mut ::c_char, - __errbuf_size: ::size_t, - ) -> ::size_t; - pub fn regfree(__preg: *mut ::regex_t); - pub fn dirfd(__dirp: *mut ::DIR) -> ::c_int; - pub fn dircntl(dir: *mut ::DIR, cmd: ::c_int, ...) -> ::c_int; - - pub fn aio_cancel(__fd: ::c_int, __aiocbp: *mut ::aiocb) -> ::c_int; - pub fn aio_error(__aiocbp: *const ::aiocb) -> ::c_int; - pub fn aio_fsync(__operation: ::c_int, __aiocbp: *mut ::aiocb) -> ::c_int; - pub fn aio_read(__aiocbp: *mut ::aiocb) -> ::c_int; - pub fn aio_return(__aiocpb: *mut ::aiocb) -> ::ssize_t; + __errcode: c_int, + __preg: *const crate::regex_t, + __errbuf: *mut c_char, + __errbuf_size: size_t, + ) -> size_t; + pub fn regfree(__preg: *mut crate::regex_t); + pub fn dirfd(__dirp: *mut crate::DIR) -> c_int; + pub fn dircntl(dir: *mut crate::DIR, cmd: c_int, ...) -> c_int; + + pub fn aio_cancel(__fd: c_int, __aiocbp: *mut crate::aiocb) -> c_int; + pub fn aio_error(__aiocbp: *const crate::aiocb) -> c_int; + pub fn aio_fsync(__operation: c_int, __aiocbp: *mut crate::aiocb) -> c_int; + pub fn aio_read(__aiocbp: *mut crate::aiocb) -> c_int; + pub fn aio_return(__aiocpb: *mut crate::aiocb) -> ssize_t; pub fn aio_suspend( - __list: *const *const ::aiocb, - __nent: ::c_int, - __timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_write(__aiocpb: *mut ::aiocb) -> ::c_int; - - pub fn mq_close(__mqdes: ::mqd_t) -> ::c_int; - pub fn mq_getattr(__mqdes: ::mqd_t, __mqstat: *mut ::mq_attr) -> ::c_int; - pub fn mq_notify(__mqdes: ::mqd_t, __notification: *const ::sigevent) -> ::c_int; - pub fn mq_open(__name: *const ::c_char, __oflag: ::c_int, ...) -> ::mqd_t; + __list: *const *const crate::aiocb, + __nent: c_int, + __timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_write(__aiocpb: *mut crate::aiocb) -> c_int; + + pub fn mq_close(__mqdes: crate::mqd_t) -> c_int; + pub fn mq_getattr(__mqdes: crate::mqd_t, __mqstat: *mut crate::mq_attr) -> c_int; + pub fn mq_notify(__mqdes: crate::mqd_t, __notification: *const crate::sigevent) -> c_int; + pub fn mq_open(__name: *const c_char, __oflag: c_int, ...) -> crate::mqd_t; pub fn mq_receive( - __mqdes: ::mqd_t, - __msg_ptr: *mut ::c_char, - __msg_len: ::size_t, - __msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + __mqdes: crate::mqd_t, + __msg_ptr: *mut c_char, + __msg_len: size_t, + __msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_send( - __mqdes: ::mqd_t, - __msg_ptr: *const ::c_char, - __msg_len: ::size_t, - __msg_prio: ::c_uint, - ) -> ::c_int; + __mqdes: crate::mqd_t, + __msg_ptr: *const c_char, + __msg_len: size_t, + __msg_prio: c_uint, + ) -> c_int; pub fn mq_setattr( - __mqdes: ::mqd_t, + __mqdes: crate::mqd_t, __mqstat: *const mq_attr, __omqstat: *mut mq_attr, - ) -> ::c_int; + ) -> c_int; pub fn mq_timedreceive( - __mqdes: ::mqd_t, - __msg_ptr: *mut ::c_char, - __msg_len: ::size_t, - __msg_prio: *mut ::c_uint, - __abs_timeout: *const ::timespec, - ) -> ::ssize_t; + __mqdes: crate::mqd_t, + __msg_ptr: *mut c_char, + __msg_len: size_t, + __msg_prio: *mut c_uint, + __abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_timedsend( - __mqdes: ::mqd_t, - __msg_ptr: *const ::c_char, - __msg_len: ::size_t, - __msg_prio: ::c_uint, - __abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_unlink(__name: *const ::c_char) -> ::c_int; - pub fn __get_errno_ptr() -> *mut ::c_int; + __mqdes: crate::mqd_t, + __msg_ptr: *const c_char, + __msg_len: size_t, + __msg_prio: c_uint, + __abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_unlink(__name: *const c_char) -> c_int; + pub fn __get_errno_ptr() -> *mut c_int; // System page, see https://www.qnx.com/developers/docs/7.1#com.qnx.doc.neutrino.building/topic/syspage/syspage_about.html pub static mut _syspage_ptr: *mut syspage_entry; // Function on the stack after a call to pthread_create(). This is used // as a sentinel to work around an infitnite loop in the unwinding code. - pub fn __my_thread_exit(value_ptr: *mut *const ::c_void); + pub fn __my_thread_exit(value_ptr: *mut *const c_void); } // Models the implementation in stdlib.h. Ctest will fail if trying to use the // default symbol from libc -pub unsafe fn atexit(cb: extern "C" fn()) -> ::c_int { +pub unsafe fn atexit(cb: extern "C" fn()) -> c_int { extern "C" { - static __dso_handle: *mut ::c_void; - pub fn __cxa_atexit( - cb: extern "C" fn(), - __arg: *mut ::c_void, - __dso: *mut ::c_void, - ) -> ::c_int; - } - __cxa_atexit(cb, 0 as *mut ::c_void, __dso_handle) + static __dso_handle: *mut c_void; + pub fn __cxa_atexit(cb: extern "C" fn(), __arg: *mut c_void, __dso: *mut c_void) -> c_int; + } + __cxa_atexit(cb, 0 as *mut c_void, __dso_handle) } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { #[repr(C)] struct siginfo_si_addr { _pad: [u8; 32], - si_addr: *mut ::c_void, + si_addr: *mut c_void, } (*(self as *const siginfo_t as *const siginfo_si_addr)).si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { #[repr(C)] struct siginfo_si_value { _pad: [u8; 32], - si_value: ::sigval, + si_value: crate::sigval, } (*(self as *const siginfo_t as *const siginfo_si_value)).si_value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { #[repr(C)] struct siginfo_si_pid { _pad: [u8; 16], - si_pid: ::pid_t, + si_pid: crate::pid_t, } (*(self as *const siginfo_t as *const siginfo_si_pid)).si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { #[repr(C)] struct siginfo_si_uid { _pad: [u8; 24], - si_uid: ::uid_t, + si_uid: crate::uid_t, } (*(self as *const siginfo_t as *const siginfo_si_uid)).si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { #[repr(C)] struct siginfo_si_status { _pad: [u8; 28], - si_status: ::c_int, + si_status: c_int, } (*(self as *const siginfo_t as *const siginfo_si_status)).si_status } diff --git a/src/unix/nto/neutrino.rs b/src/unix/nto/neutrino.rs index cc86f8a379214..3e2bee367acd3 100644 --- a/src/unix/nto/neutrino.rs +++ b/src/unix/nto/neutrino.rs @@ -1,4 +1,6 @@ -pub type nto_job_t = ::sync_t; +use crate::{c_int, c_long, c_uint, c_void, size_t}; + +pub type nto_job_t = crate::sync_t; s! { pub struct syspage_entry_info { @@ -12,12 +14,12 @@ s! { } pub struct intrspin { - pub value: ::c_uint, // volatile + pub value: c_uint, // volatile } pub struct iov_t { - pub iov_base: *mut ::c_void, // union - pub iov_len: ::size_t, + pub iov_base: *mut c_void, // union + pub iov_len: size_t, } pub struct _itimer { @@ -28,7 +30,7 @@ s! { pub struct _msg_info64 { pub nd: u32, pub srcnd: u32, - pub pid: ::pid_t, + pub pid: crate::pid_t, pub tid: i32, pub chid: i32, pub scoid: i32, @@ -43,22 +45,22 @@ s! { } pub struct _cred_info { - pub ruid: ::uid_t, - pub euid: ::uid_t, - pub suid: ::uid_t, - pub rgid: ::gid_t, - pub egid: ::gid_t, - pub sgid: ::gid_t, + pub ruid: crate::uid_t, + pub euid: crate::uid_t, + pub suid: crate::uid_t, + pub rgid: crate::gid_t, + pub egid: crate::gid_t, + pub sgid: crate::gid_t, pub ngroups: u32, - pub grouplist: [::gid_t; 8], + pub grouplist: [crate::gid_t; 8], } pub struct _client_info { pub nd: u32, - pub pid: ::pid_t, - pub sid: ::pid_t, + pub pid: crate::pid_t, + pub sid: crate::pid_t, pub flags: u32, - pub cred: ::_cred_info, + pub cred: crate::_cred_info, } pub struct _client_able { @@ -69,96 +71,96 @@ s! { } pub struct nto_channel_config { - pub event: ::sigevent, - pub num_pulses: ::c_uint, - pub rearm_threshold: ::c_uint, - pub options: ::c_uint, - reserved: [::c_uint; 3], + pub event: crate::sigevent, + pub num_pulses: c_uint, + pub rearm_threshold: c_uint, + pub options: c_uint, + reserved: [c_uint; 3], } // TODO: The following structures are defined in a header file which doesn't // appear as part of the default headers found in a standard installation // of Neutrino 7.1 SDP. Commented out for now. //pub struct _asyncmsg_put_header { - // pub err: ::c_int, + // pub err: c_int, // pub iov: *mut ::iov_t, - // pub parts: ::c_int, - // pub handle: ::c_uint, - // pub cb: ::Option< + // pub parts: c_int, + // pub handle: c_uint, + // pub cb: Option< // unsafe extern "C" fn( - // err: ::c_int, - // buf: *mut ::c_void, - // handle: ::c_uint, - // ) -> ::c_int>, - // pub put_hdr_flags: ::c_uint, + // err: c_int, + // buf: *mut c_void, + // handle: c_uint, + // ) -> c_int>, + // pub put_hdr_flags: c_uint, //} //pub struct _asyncmsg_connection_attr { - // pub call_back: ::Option< + // pub call_back: Option< // unsafe extern "C" fn( - // err: ::c_int, - // buff: *mut ::c_void, - // handle: ::c_uint, - // ) -> ::c_int>, - // pub buffer_size: ::size_t, - // pub max_num_buffer: ::c_uint, - // pub trigger_num_msg: ::c_uint, + // err: c_int, + // buff: *mut c_void, + // handle: c_uint, + // ) -> c_int>, + // pub buffer_size: size_t, + // pub max_num_buffer: c_uint, + // pub trigger_num_msg: c_uint, // pub trigger_time: ::_itimer, - // reserve: ::c_uint, + // reserve: c_uint, //} //pub struct _asyncmsg_connection_descriptor { - // pub flags: ::c_uint, - // pub sendq_size: ::c_uint, - // pub sendq_head: ::c_uint, - // pub sendq_tail: ::c_uint, - // pub sendq_free: ::c_uint, - // pub err: ::c_int, + // pub flags: c_uint, + // pub sendq_size: c_uint, + // pub sendq_head: c_uint, + // pub sendq_tail: c_uint, + // pub sendq_free: c_uint, + // pub err: c_int, // pub ev: ::sigevent, - // pub num_curmsg: ::c_uint, + // pub num_curmsg: c_uint, // pub ttimer: ::timer_t, // pub block_con: ::pthread_cond_t, // pub mu: ::pthread_mutex_t, - // reserved: ::c_uint, + // reserved: c_uint, // pub attr: ::_asyncmsg_connection_attr, - // pub reserves: [::c_uint; 3], + // pub reserves: [c_uint; 3], // pub sendq: [::_asyncmsg_put_header; 1], // flexarray //} pub struct __c_anonymous_struct_ev { - pub event: ::sigevent, - pub coid: ::c_int, + pub event: crate::sigevent, + pub coid: c_int, } pub struct _channel_connect_attr { // union - pub ev: ::__c_anonymous_struct_ev, + pub ev: crate::__c_anonymous_struct_ev, } pub struct _sighandler_info { - pub siginfo: ::siginfo_t, - pub handler: ::Option, - pub context: *mut ::c_void, + pub siginfo: crate::siginfo_t, + pub handler: Option, + pub context: *mut c_void, } pub struct __c_anonymous_struct_time { - pub length: ::c_uint, - pub scale: ::c_uint, + pub length: c_uint, + pub scale: c_uint, } pub struct _idle_hook { - pub hook_size: ::c_uint, - pub cmd: ::c_uint, - pub mode: ::c_uint, - pub latency: ::c_uint, + pub hook_size: c_uint, + pub cmd: c_uint, + pub mode: c_uint, + pub latency: c_uint, pub next_fire: u64, pub curr_time: u64, pub tod_adjust: u64, - pub resp: ::c_uint, + pub resp: c_uint, pub time: __c_anonymous_struct_time, - pub trigger: ::sigevent, - pub intrs: *mut ::c_uint, - pub block_stack_size: ::c_uint, + pub trigger: crate::sigevent, + pub intrs: *mut c_uint, + pub block_stack_size: c_uint, } pub struct _clockadjust { @@ -188,22 +190,22 @@ s! { } pub struct _sched_info { - pub priority_min: ::c_int, - pub priority_max: ::c_int, + pub priority_min: c_int, + pub priority_max: c_int, pub interval: u64, - pub priority_priv: ::c_int, - reserved: [::c_int; 11], + pub priority_priv: c_int, + reserved: [c_int; 11], } pub struct _timer_info { - pub itime: ::_itimer, - pub otime: ::_itimer, + pub itime: crate::_itimer, + pub otime: crate::_itimer, pub flags: u32, pub tid: i32, pub notify: i32, - pub clockid: ::clockid_t, + pub clockid: crate::clockid_t, pub overruns: u32, - pub event: ::sigevent, // union + pub event: crate::sigevent, // union } pub struct _clockperiod { @@ -249,28 +251,28 @@ pub const SYSMGR_CHID: u32 = 1; pub const SYSMGR_COID: u32 = _NTO_SIDE_CHANNEL; pub const SYSMGR_HANDLE: u32 = 0; -pub const STATE_DEAD: ::c_int = 0x00; -pub const STATE_RUNNING: ::c_int = 0x01; -pub const STATE_READY: ::c_int = 0x02; -pub const STATE_STOPPED: ::c_int = 0x03; -pub const STATE_SEND: ::c_int = 0x04; -pub const STATE_RECEIVE: ::c_int = 0x05; -pub const STATE_REPLY: ::c_int = 0x06; -pub const STATE_STACK: ::c_int = 0x07; -pub const STATE_WAITTHREAD: ::c_int = 0x08; -pub const STATE_WAITPAGE: ::c_int = 0x09; -pub const STATE_SIGSUSPEND: ::c_int = 0x0a; -pub const STATE_SIGWAITINFO: ::c_int = 0x0b; -pub const STATE_NANOSLEEP: ::c_int = 0x0c; -pub const STATE_MUTEX: ::c_int = 0x0d; -pub const STATE_CONDVAR: ::c_int = 0x0e; -pub const STATE_JOIN: ::c_int = 0x0f; -pub const STATE_INTR: ::c_int = 0x10; -pub const STATE_SEM: ::c_int = 0x11; -pub const STATE_WAITCTX: ::c_int = 0x12; -pub const STATE_NET_SEND: ::c_int = 0x13; -pub const STATE_NET_REPLY: ::c_int = 0x14; -pub const STATE_MAX: ::c_int = 0x18; +pub const STATE_DEAD: c_int = 0x00; +pub const STATE_RUNNING: c_int = 0x01; +pub const STATE_READY: c_int = 0x02; +pub const STATE_STOPPED: c_int = 0x03; +pub const STATE_SEND: c_int = 0x04; +pub const STATE_RECEIVE: c_int = 0x05; +pub const STATE_REPLY: c_int = 0x06; +pub const STATE_STACK: c_int = 0x07; +pub const STATE_WAITTHREAD: c_int = 0x08; +pub const STATE_WAITPAGE: c_int = 0x09; +pub const STATE_SIGSUSPEND: c_int = 0x0a; +pub const STATE_SIGWAITINFO: c_int = 0x0b; +pub const STATE_NANOSLEEP: c_int = 0x0c; +pub const STATE_MUTEX: c_int = 0x0d; +pub const STATE_CONDVAR: c_int = 0x0e; +pub const STATE_JOIN: c_int = 0x0f; +pub const STATE_INTR: c_int = 0x10; +pub const STATE_SEM: c_int = 0x11; +pub const STATE_WAITCTX: c_int = 0x12; +pub const STATE_NET_SEND: c_int = 0x13; +pub const STATE_NET_REPLY: c_int = 0x14; +pub const STATE_MAX: c_int = 0x18; pub const _NTO_TIMEOUT_RECEIVE: i32 = 1 << STATE_RECEIVE; pub const _NTO_TIMEOUT_SEND: i32 = 1 << STATE_SEND; @@ -508,36 +510,33 @@ pub const _NTO_CLIENTINFO_GETGROUPS: u32 = 1; pub const _NTO_CLIENTINFO_GETTYPEID: u32 = 2; extern "C" { - pub fn ChannelCreate(__flags: ::c_uint) -> ::c_int; - pub fn ChannelCreate_r(__flags: ::c_uint) -> ::c_int; - pub fn ChannelCreatePulsePool( - __flags: ::c_uint, - __config: *const nto_channel_config, - ) -> ::c_int; + pub fn ChannelCreate(__flags: c_uint) -> c_int; + pub fn ChannelCreate_r(__flags: c_uint) -> c_int; + pub fn ChannelCreatePulsePool(__flags: c_uint, __config: *const nto_channel_config) -> c_int; pub fn ChannelCreateExt( - __flags: ::c_uint, - __mode: ::mode_t, + __flags: c_uint, + __mode: crate::mode_t, __bufsize: usize, - __maxnumbuf: ::c_uint, - __ev: *const ::sigevent, + __maxnumbuf: c_uint, + __ev: *const crate::sigevent, __cred: *mut _cred_info, - ) -> ::c_int; - pub fn ChannelDestroy(__chid: ::c_int) -> ::c_int; - pub fn ChannelDestroy_r(__chid: ::c_int) -> ::c_int; + ) -> c_int; + pub fn ChannelDestroy(__chid: c_int) -> c_int; + pub fn ChannelDestroy_r(__chid: c_int) -> c_int; pub fn ConnectAttach( __nd: u32, - __pid: ::pid_t, - __chid: ::c_int, - __index: ::c_uint, - __flags: ::c_int, - ) -> ::c_int; + __pid: crate::pid_t, + __chid: c_int, + __index: c_uint, + __flags: c_int, + ) -> c_int; pub fn ConnectAttach_r( __nd: u32, - __pid: ::pid_t, - __chid: ::c_int, - __index: ::c_uint, - __flags: ::c_int, - ) -> ::c_int; + __pid: crate::pid_t, + __chid: c_int, + __index: c_uint, + __flags: c_int, + ) -> c_int; // TODO: The following function uses a structure defined in a header file // which doesn't appear as part of the default headers found in a @@ -545,734 +544,715 @@ extern "C" { //pub fn ConnectAttachExt( // __nd: u32, // __pid: ::pid_t, - // __chid: ::c_int, - // __index: ::c_uint, - // __flags: ::c_int, + // __chid: c_int, + // __index: c_uint, + // __flags: c_int, // __cd: *mut _asyncmsg_connection_descriptor, - //) -> ::c_int; - pub fn ConnectDetach(__coid: ::c_int) -> ::c_int; - pub fn ConnectDetach_r(__coid: ::c_int) -> ::c_int; - pub fn ConnectServerInfo(__pid: ::pid_t, __coid: ::c_int, __info: *mut _msg_info64) -> ::c_int; + //) -> c_int; + pub fn ConnectDetach(__coid: c_int) -> c_int; + pub fn ConnectDetach_r(__coid: c_int) -> c_int; + pub fn ConnectServerInfo(__pid: crate::pid_t, __coid: c_int, __info: *mut _msg_info64) + -> c_int; pub fn ConnectServerInfo_r( - __pid: ::pid_t, - __coid: ::c_int, + __pid: crate::pid_t, + __coid: c_int, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn ConnectClientInfoExtraArgs( - __scoid: ::c_int, + __scoid: c_int, __info_pp: *mut _client_info, - __ngroups: ::c_int, + __ngroups: c_int, __abilities: *mut _client_able, - __nable: ::c_int, - __type_id: *mut ::c_uint, - ) -> ::c_int; + __nable: c_int, + __type_id: *mut c_uint, + ) -> c_int; pub fn ConnectClientInfoExtraArgs_r( - __scoid: ::c_int, + __scoid: c_int, __info_pp: *mut _client_info, - __ngroups: ::c_int, + __ngroups: c_int, __abilities: *mut _client_able, - __nable: ::c_int, - __type_id: *mut ::c_uint, - ) -> ::c_int; - pub fn ConnectClientInfo( - __scoid: ::c_int, - __info: *mut _client_info, - __ngroups: ::c_int, - ) -> ::c_int; + __nable: c_int, + __type_id: *mut c_uint, + ) -> c_int; + pub fn ConnectClientInfo(__scoid: c_int, __info: *mut _client_info, __ngroups: c_int) -> c_int; pub fn ConnectClientInfo_r( - __scoid: ::c_int, + __scoid: c_int, __info: *mut _client_info, - __ngroups: ::c_int, - ) -> ::c_int; + __ngroups: c_int, + ) -> c_int; pub fn ConnectClientInfoExt( - __scoid: ::c_int, + __scoid: c_int, __info_pp: *mut *mut _client_info, - flags: ::c_int, - ) -> ::c_int; - pub fn ClientInfoExtFree(__info_pp: *mut *mut _client_info) -> ::c_int; + flags: c_int, + ) -> c_int; + pub fn ClientInfoExtFree(__info_pp: *mut *mut _client_info) -> c_int; pub fn ConnectClientInfoAble( - __scoid: ::c_int, + __scoid: c_int, __info_pp: *mut *mut _client_info, - flags: ::c_int, + flags: c_int, abilities: *mut _client_able, - nable: ::c_int, - ) -> ::c_int; + nable: c_int, + ) -> c_int; pub fn ConnectFlags( - __pid: ::pid_t, - __coid: ::c_int, - __mask: ::c_uint, - __bits: ::c_uint, - ) -> ::c_int; + __pid: crate::pid_t, + __coid: c_int, + __mask: c_uint, + __bits: c_uint, + ) -> c_int; pub fn ConnectFlags_r( - __pid: ::pid_t, - __coid: ::c_int, - __mask: ::c_uint, - __bits: ::c_uint, - ) -> ::c_int; + __pid: crate::pid_t, + __coid: c_int, + __mask: c_uint, + __bits: c_uint, + ) -> c_int; pub fn ChannelConnectAttr( - __id: ::c_uint, + __id: c_uint, __old_attr: *mut _channel_connect_attr, __new_attr: *mut _channel_connect_attr, - __flags: ::c_uint, - ) -> ::c_int; + __flags: c_uint, + ) -> c_int; pub fn MsgSend( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSend_r( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendnc( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendnc_r( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendsv( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendsv_r( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendsvnc( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendsvnc_r( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendvs( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendvs_r( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendvsnc( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendvsnc_r( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __rmsg: *mut ::c_void, + __rmsg: *mut c_void, __rbytes: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendv( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendv_r( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendvnc( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgSendvnc_r( - __coid: ::c_int, - __siov: *const ::iovec, + __coid: c_int, + __siov: *const crate::iovec, __sparts: usize, - __riov: *const ::iovec, + __riov: *const crate::iovec, __rparts: usize, - ) -> ::c_long; + ) -> c_long; pub fn MsgReceive( - __chid: ::c_int, - __msg: *mut ::c_void, + __chid: c_int, + __msg: *mut c_void, __bytes: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceive_r( - __chid: ::c_int, - __msg: *mut ::c_void, + __chid: c_int, + __msg: *mut c_void, __bytes: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceivev( - __chid: ::c_int, - __iov: *const ::iovec, + __chid: c_int, + __iov: *const crate::iovec, __parts: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceivev_r( - __chid: ::c_int, - __iov: *const ::iovec, + __chid: c_int, + __iov: *const crate::iovec, __parts: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceivePulse( - __chid: ::c_int, - __pulse: *mut ::c_void, + __chid: c_int, + __pulse: *mut c_void, __bytes: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceivePulse_r( - __chid: ::c_int, - __pulse: *mut ::c_void, + __chid: c_int, + __pulse: *mut c_void, __bytes: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceivePulsev( - __chid: ::c_int, - __iov: *const ::iovec, + __chid: c_int, + __iov: *const crate::iovec, __parts: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReceivePulsev_r( - __chid: ::c_int, - __iov: *const ::iovec, + __chid: c_int, + __iov: *const crate::iovec, __parts: usize, __info: *mut _msg_info64, - ) -> ::c_int; + ) -> c_int; pub fn MsgReply( - __rcvid: ::c_int, - __status: ::c_long, - __msg: *const ::c_void, + __rcvid: c_int, + __status: c_long, + __msg: *const c_void, __bytes: usize, - ) -> ::c_int; + ) -> c_int; pub fn MsgReply_r( - __rcvid: ::c_int, - __status: ::c_long, - __msg: *const ::c_void, + __rcvid: c_int, + __status: c_long, + __msg: *const c_void, __bytes: usize, - ) -> ::c_int; + ) -> c_int; pub fn MsgReplyv( - __rcvid: ::c_int, - __status: ::c_long, - __iov: *const ::iovec, + __rcvid: c_int, + __status: c_long, + __iov: *const crate::iovec, __parts: usize, - ) -> ::c_int; + ) -> c_int; pub fn MsgReplyv_r( - __rcvid: ::c_int, - __status: ::c_long, - __iov: *const ::iovec, + __rcvid: c_int, + __status: c_long, + __iov: *const crate::iovec, __parts: usize, - ) -> ::c_int; + ) -> c_int; pub fn MsgReadiov( - __rcvid: ::c_int, - __iov: *const ::iovec, + __rcvid: c_int, + __iov: *const crate::iovec, __parts: usize, __offset: usize, - __flags: ::c_int, + __flags: c_int, ) -> isize; pub fn MsgReadiov_r( - __rcvid: ::c_int, - __iov: *const ::iovec, + __rcvid: c_int, + __iov: *const crate::iovec, __parts: usize, __offset: usize, - __flags: ::c_int, - ) -> isize; - pub fn MsgRead( - __rcvid: ::c_int, - __msg: *mut ::c_void, - __bytes: usize, - __offset: usize, - ) -> isize; - pub fn MsgRead_r( - __rcvid: ::c_int, - __msg: *mut ::c_void, - __bytes: usize, - __offset: usize, + __flags: c_int, ) -> isize; + pub fn MsgRead(__rcvid: c_int, __msg: *mut c_void, __bytes: usize, __offset: usize) -> isize; + pub fn MsgRead_r(__rcvid: c_int, __msg: *mut c_void, __bytes: usize, __offset: usize) -> isize; pub fn MsgReadv( - __rcvid: ::c_int, - __iov: *const ::iovec, + __rcvid: c_int, + __iov: *const crate::iovec, __parts: usize, __offset: usize, ) -> isize; pub fn MsgReadv_r( - __rcvid: ::c_int, - __iov: *const ::iovec, + __rcvid: c_int, + __iov: *const crate::iovec, __parts: usize, __offset: usize, ) -> isize; - pub fn MsgWrite( - __rcvid: ::c_int, - __msg: *const ::c_void, - __bytes: usize, - __offset: usize, - ) -> isize; + pub fn MsgWrite(__rcvid: c_int, __msg: *const c_void, __bytes: usize, __offset: usize) + -> isize; pub fn MsgWrite_r( - __rcvid: ::c_int, - __msg: *const ::c_void, + __rcvid: c_int, + __msg: *const c_void, __bytes: usize, __offset: usize, ) -> isize; pub fn MsgWritev( - __rcvid: ::c_int, - __iov: *const ::iovec, + __rcvid: c_int, + __iov: *const crate::iovec, __parts: usize, __offset: usize, ) -> isize; pub fn MsgWritev_r( - __rcvid: ::c_int, - __iov: *const ::iovec, + __rcvid: c_int, + __iov: *const crate::iovec, __parts: usize, __offset: usize, ) -> isize; - pub fn MsgSendPulse( - __coid: ::c_int, - __priority: ::c_int, - __code: ::c_int, - __value: ::c_int, - ) -> ::c_int; - pub fn MsgSendPulse_r( - __coid: ::c_int, - __priority: ::c_int, - __code: ::c_int, - __value: ::c_int, - ) -> ::c_int; + pub fn MsgSendPulse(__coid: c_int, __priority: c_int, __code: c_int, __value: c_int) -> c_int; + pub fn MsgSendPulse_r(__coid: c_int, __priority: c_int, __code: c_int, __value: c_int) + -> c_int; pub fn MsgSendPulsePtr( - __coid: ::c_int, - __priority: ::c_int, - __code: ::c_int, - __value: *mut ::c_void, - ) -> ::c_int; + __coid: c_int, + __priority: c_int, + __code: c_int, + __value: *mut c_void, + ) -> c_int; pub fn MsgSendPulsePtr_r( - __coid: ::c_int, - __priority: ::c_int, - __code: ::c_int, - __value: *mut ::c_void, - ) -> ::c_int; - pub fn MsgDeliverEvent(__rcvid: ::c_int, __event: *const ::sigevent) -> ::c_int; - pub fn MsgDeliverEvent_r(__rcvid: ::c_int, __event: *const ::sigevent) -> ::c_int; - pub fn MsgVerifyEvent(__rcvid: ::c_int, __event: *const ::sigevent) -> ::c_int; - pub fn MsgVerifyEvent_r(__rcvid: ::c_int, __event: *const ::sigevent) -> ::c_int; - pub fn MsgRegisterEvent(__event: *mut ::sigevent, __coid: ::c_int) -> ::c_int; - pub fn MsgRegisterEvent_r(__event: *mut ::sigevent, __coid: ::c_int) -> ::c_int; - pub fn MsgUnregisterEvent(__event: *const ::sigevent) -> ::c_int; - pub fn MsgUnregisterEvent_r(__event: *const ::sigevent) -> ::c_int; - pub fn MsgInfo(__rcvid: ::c_int, __info: *mut _msg_info64) -> ::c_int; - pub fn MsgInfo_r(__rcvid: ::c_int, __info: *mut _msg_info64) -> ::c_int; + __coid: c_int, + __priority: c_int, + __code: c_int, + __value: *mut c_void, + ) -> c_int; + pub fn MsgDeliverEvent(__rcvid: c_int, __event: *const crate::sigevent) -> c_int; + pub fn MsgDeliverEvent_r(__rcvid: c_int, __event: *const crate::sigevent) -> c_int; + pub fn MsgVerifyEvent(__rcvid: c_int, __event: *const crate::sigevent) -> c_int; + pub fn MsgVerifyEvent_r(__rcvid: c_int, __event: *const crate::sigevent) -> c_int; + pub fn MsgRegisterEvent(__event: *mut crate::sigevent, __coid: c_int) -> c_int; + pub fn MsgRegisterEvent_r(__event: *mut crate::sigevent, __coid: c_int) -> c_int; + pub fn MsgUnregisterEvent(__event: *const crate::sigevent) -> c_int; + pub fn MsgUnregisterEvent_r(__event: *const crate::sigevent) -> c_int; + pub fn MsgInfo(__rcvid: c_int, __info: *mut _msg_info64) -> c_int; + pub fn MsgInfo_r(__rcvid: c_int, __info: *mut _msg_info64) -> c_int; pub fn MsgKeyData( - __rcvid: ::c_int, - __oper: ::c_int, + __rcvid: c_int, + __oper: c_int, __key: u32, __newkey: *mut u32, - __iov: *const ::iovec, - __parts: ::c_int, - ) -> ::c_int; + __iov: *const crate::iovec, + __parts: c_int, + ) -> c_int; pub fn MsgKeyData_r( - __rcvid: ::c_int, - __oper: ::c_int, + __rcvid: c_int, + __oper: c_int, __key: u32, __newkey: *mut u32, - __iov: *const ::iovec, - __parts: ::c_int, - ) -> ::c_int; - pub fn MsgError(__rcvid: ::c_int, __err: ::c_int) -> ::c_int; - pub fn MsgError_r(__rcvid: ::c_int, __err: ::c_int) -> ::c_int; - pub fn MsgCurrent(__rcvid: ::c_int) -> ::c_int; - pub fn MsgCurrent_r(__rcvid: ::c_int) -> ::c_int; + __iov: *const crate::iovec, + __parts: c_int, + ) -> c_int; + pub fn MsgError(__rcvid: c_int, __err: c_int) -> c_int; + pub fn MsgError_r(__rcvid: c_int, __err: c_int) -> c_int; + pub fn MsgCurrent(__rcvid: c_int) -> c_int; + pub fn MsgCurrent_r(__rcvid: c_int) -> c_int; pub fn MsgSendAsyncGbl( - __coid: ::c_int, - __smsg: *const ::c_void, + __coid: c_int, + __smsg: *const c_void, __sbytes: usize, - __msg_prio: ::c_uint, - ) -> ::c_int; - pub fn MsgSendAsync(__coid: ::c_int) -> ::c_int; + __msg_prio: c_uint, + ) -> c_int; + pub fn MsgSendAsync(__coid: c_int) -> c_int; pub fn MsgReceiveAsyncGbl( - __chid: ::c_int, - __rmsg: *mut ::c_void, + __chid: c_int, + __rmsg: *mut c_void, __rbytes: usize, __info: *mut _msg_info64, - __coid: ::c_int, - ) -> ::c_int; - pub fn MsgReceiveAsync(__chid: ::c_int, __iov: *const ::iovec, __parts: ::c_uint) -> ::c_int; - pub fn MsgPause(__rcvid: ::c_int, __cookie: ::c_uint) -> ::c_int; - pub fn MsgPause_r(__rcvid: ::c_int, __cookie: ::c_uint) -> ::c_int; + __coid: c_int, + ) -> c_int; + pub fn MsgReceiveAsync(__chid: c_int, __iov: *const crate::iovec, __parts: c_uint) -> c_int; + pub fn MsgPause(__rcvid: c_int, __cookie: c_uint) -> c_int; + pub fn MsgPause_r(__rcvid: c_int, __cookie: c_uint) -> c_int; pub fn SignalKill( __nd: u32, - __pid: ::pid_t, - __tid: ::c_int, - __signo: ::c_int, - __code: ::c_int, - __value: ::c_int, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __signo: c_int, + __code: c_int, + __value: c_int, + ) -> c_int; pub fn SignalKill_r( __nd: u32, - __pid: ::pid_t, - __tid: ::c_int, - __signo: ::c_int, - __code: ::c_int, - __value: ::c_int, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __signo: c_int, + __code: c_int, + __value: c_int, + ) -> c_int; pub fn SignalKillSigval( __nd: u32, - __pid: ::pid_t, - __tid: ::c_int, - __signo: ::c_int, - __code: ::c_int, - __value: *const ::sigval, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __signo: c_int, + __code: c_int, + __value: *const crate::sigval, + ) -> c_int; pub fn SignalKillSigval_r( __nd: u32, - __pid: ::pid_t, - __tid: ::c_int, - __signo: ::c_int, - __code: ::c_int, - __value: *const ::sigval, - ) -> ::c_int; - pub fn SignalReturn(__info: *mut _sighandler_info) -> ::c_int; - pub fn SignalFault(__sigcode: ::c_uint, __regs: *mut ::c_void, __refaddr: usize) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __signo: c_int, + __code: c_int, + __value: *const crate::sigval, + ) -> c_int; + pub fn SignalReturn(__info: *mut _sighandler_info) -> c_int; + pub fn SignalFault(__sigcode: c_uint, __regs: *mut c_void, __refaddr: usize) -> c_int; pub fn SignalAction( - __pid: ::pid_t, + __pid: crate::pid_t, __sigstub: unsafe extern "C" fn(), - __signo: ::c_int, - __act: *const ::sigaction, - __oact: *mut ::sigaction, - ) -> ::c_int; + __signo: c_int, + __act: *const crate::sigaction, + __oact: *mut crate::sigaction, + ) -> c_int; pub fn SignalAction_r( - __pid: ::pid_t, + __pid: crate::pid_t, __sigstub: unsafe extern "C" fn(), - __signo: ::c_int, - __act: *const ::sigaction, - __oact: *mut ::sigaction, - ) -> ::c_int; + __signo: c_int, + __act: *const crate::sigaction, + __oact: *mut crate::sigaction, + ) -> c_int; pub fn SignalProcmask( - __pid: ::pid_t, - __tid: ::c_int, - __how: ::c_int, - __set: *const ::sigset_t, - __oldset: *mut ::sigset_t, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __how: c_int, + __set: *const crate::sigset_t, + __oldset: *mut crate::sigset_t, + ) -> c_int; pub fn SignalProcmask_r( - __pid: ::pid_t, - __tid: ::c_int, - __how: ::c_int, - __set: *const ::sigset_t, - __oldset: *mut ::sigset_t, - ) -> ::c_int; - pub fn SignalSuspend(__set: *const ::sigset_t) -> ::c_int; - pub fn SignalSuspend_r(__set: *const ::sigset_t) -> ::c_int; - pub fn SignalWaitinfo(__set: *const ::sigset_t, __info: *mut ::siginfo_t) -> ::c_int; - pub fn SignalWaitinfo_r(__set: *const ::sigset_t, __info: *mut ::siginfo_t) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __how: c_int, + __set: *const crate::sigset_t, + __oldset: *mut crate::sigset_t, + ) -> c_int; + pub fn SignalSuspend(__set: *const crate::sigset_t) -> c_int; + pub fn SignalSuspend_r(__set: *const crate::sigset_t) -> c_int; + pub fn SignalWaitinfo(__set: *const crate::sigset_t, __info: *mut crate::siginfo_t) -> c_int; + pub fn SignalWaitinfo_r(__set: *const crate::sigset_t, __info: *mut crate::siginfo_t) -> c_int; pub fn SignalWaitinfoMask( - __set: *const ::sigset_t, - __info: *mut ::siginfo_t, - __mask: *const ::sigset_t, - ) -> ::c_int; + __set: *const crate::sigset_t, + __info: *mut crate::siginfo_t, + __mask: *const crate::sigset_t, + ) -> c_int; pub fn SignalWaitinfoMask_r( - __set: *const ::sigset_t, - __info: *mut ::siginfo_t, - __mask: *const ::sigset_t, - ) -> ::c_int; + __set: *const crate::sigset_t, + __info: *mut crate::siginfo_t, + __mask: *const crate::sigset_t, + ) -> c_int; pub fn ThreadCreate( - __pid: ::pid_t, - __func: unsafe extern "C" fn(__arg: *mut ::c_void) -> *mut ::c_void, - __arg: *mut ::c_void, - __attr: *const ::_thread_attr, - ) -> ::c_int; + __pid: crate::pid_t, + __func: unsafe extern "C" fn(__arg: *mut c_void) -> *mut c_void, + __arg: *mut c_void, + __attr: *const crate::_thread_attr, + ) -> c_int; pub fn ThreadCreate_r( - __pid: ::pid_t, - __func: unsafe extern "C" fn(__arg: *mut ::c_void) -> *mut ::c_void, - __arg: *mut ::c_void, - __attr: *const ::_thread_attr, - ) -> ::c_int; - - pub fn ThreadDestroy(__tid: ::c_int, __priority: ::c_int, __status: *mut ::c_void) -> ::c_int; - pub fn ThreadDestroy_r(__tid: ::c_int, __priority: ::c_int, __status: *mut ::c_void) - -> ::c_int; - pub fn ThreadDetach(__tid: ::c_int) -> ::c_int; - pub fn ThreadDetach_r(__tid: ::c_int) -> ::c_int; - pub fn ThreadJoin(__tid: ::c_int, __status: *mut *mut ::c_void) -> ::c_int; - pub fn ThreadJoin_r(__tid: ::c_int, __status: *mut *mut ::c_void) -> ::c_int; - pub fn ThreadCancel(__tid: ::c_int, __canstub: unsafe extern "C" fn()) -> ::c_int; - pub fn ThreadCancel_r(__tid: ::c_int, __canstub: unsafe extern "C" fn()) -> ::c_int; - pub fn ThreadCtl(__cmd: ::c_int, __data: *mut ::c_void) -> ::c_int; - pub fn ThreadCtl_r(__cmd: ::c_int, __data: *mut ::c_void) -> ::c_int; + __pid: crate::pid_t, + __func: unsafe extern "C" fn(__arg: *mut c_void) -> *mut c_void, + __arg: *mut c_void, + __attr: *const crate::_thread_attr, + ) -> c_int; + + pub fn ThreadDestroy(__tid: c_int, __priority: c_int, __status: *mut c_void) -> c_int; + pub fn ThreadDestroy_r(__tid: c_int, __priority: c_int, __status: *mut c_void) -> c_int; + pub fn ThreadDetach(__tid: c_int) -> c_int; + pub fn ThreadDetach_r(__tid: c_int) -> c_int; + pub fn ThreadJoin(__tid: c_int, __status: *mut *mut c_void) -> c_int; + pub fn ThreadJoin_r(__tid: c_int, __status: *mut *mut c_void) -> c_int; + pub fn ThreadCancel(__tid: c_int, __canstub: unsafe extern "C" fn()) -> c_int; + pub fn ThreadCancel_r(__tid: c_int, __canstub: unsafe extern "C" fn()) -> c_int; + pub fn ThreadCtl(__cmd: c_int, __data: *mut c_void) -> c_int; + pub fn ThreadCtl_r(__cmd: c_int, __data: *mut c_void) -> c_int; pub fn ThreadCtlExt( - __pid: ::pid_t, - __tid: ::c_int, - __cmd: ::c_int, - __data: *mut ::c_void, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __cmd: c_int, + __data: *mut c_void, + ) -> c_int; pub fn ThreadCtlExt_r( - __pid: ::pid_t, - __tid: ::c_int, - __cmd: ::c_int, - __data: *mut ::c_void, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __cmd: c_int, + __data: *mut c_void, + ) -> c_int; pub fn InterruptHookTrace( - __handler: ::Option *const ::sigevent>, - __flags: ::c_uint, - ) -> ::c_int; + __handler: Option *const crate::sigevent>, + __flags: c_uint, + ) -> c_int; pub fn InterruptHookIdle( - __handler: ::Option, - __flags: ::c_uint, - ) -> ::c_int; + __handler: Option, + __flags: c_uint, + ) -> c_int; pub fn InterruptHookIdle2( - __handler: ::Option< - unsafe extern "C" fn(arg1: ::c_uint, arg2: *mut syspage_entry, arg3: *mut _idle_hook), + __handler: Option< + unsafe extern "C" fn(arg1: c_uint, arg2: *mut syspage_entry, arg3: *mut _idle_hook), >, - __flags: ::c_uint, - ) -> ::c_int; - pub fn InterruptHookOverdriveEvent(__event: *const ::sigevent, __flags: ::c_uint) -> ::c_int; + __flags: c_uint, + ) -> c_int; + pub fn InterruptHookOverdriveEvent(__event: *const crate::sigevent, __flags: c_uint) -> c_int; pub fn InterruptAttachEvent( - __intr: ::c_int, - __event: *const ::sigevent, - __flags: ::c_uint, - ) -> ::c_int; + __intr: c_int, + __event: *const crate::sigevent, + __flags: c_uint, + ) -> c_int; pub fn InterruptAttachEvent_r( - __intr: ::c_int, - __event: *const ::sigevent, - __flags: ::c_uint, - ) -> ::c_int; + __intr: c_int, + __event: *const crate::sigevent, + __flags: c_uint, + ) -> c_int; pub fn InterruptAttach( - __intr: ::c_int, - __handler: ::Option< - unsafe extern "C" fn(__area: *mut ::c_void, __id: ::c_int) -> *const ::sigevent, + __intr: c_int, + __handler: Option< + unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const crate::sigevent, >, - __area: *const ::c_void, - __size: ::c_int, - __flags: ::c_uint, - ) -> ::c_int; + __area: *const c_void, + __size: c_int, + __flags: c_uint, + ) -> c_int; pub fn InterruptAttach_r( - __intr: ::c_int, - __handler: ::Option< - unsafe extern "C" fn(__area: *mut ::c_void, __id: ::c_int) -> *const ::sigevent, + __intr: c_int, + __handler: Option< + unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const crate::sigevent, >, - __area: *const ::c_void, - __size: ::c_int, - __flags: ::c_uint, - ) -> ::c_int; + __area: *const c_void, + __size: c_int, + __flags: c_uint, + ) -> c_int; pub fn InterruptAttachArray( - __intr: ::c_int, - __handler: ::Option< - unsafe extern "C" fn(__area: *mut ::c_void, __id: ::c_int) -> *const *const ::sigevent, + __intr: c_int, + __handler: Option< + unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const *const crate::sigevent, >, - __area: *const ::c_void, - __size: ::c_int, - __flags: ::c_uint, - ) -> ::c_int; + __area: *const c_void, + __size: c_int, + __flags: c_uint, + ) -> c_int; pub fn InterruptAttachArray_r( - __intr: ::c_int, - __handler: ::Option< - unsafe extern "C" fn(__area: *mut ::c_void, __id: ::c_int) -> *const *const ::sigevent, + __intr: c_int, + __handler: Option< + unsafe extern "C" fn(__area: *mut c_void, __id: c_int) -> *const *const crate::sigevent, >, - __area: *const ::c_void, - __size: ::c_int, - __flags: ::c_uint, - ) -> ::c_int; - pub fn InterruptDetach(__id: ::c_int) -> ::c_int; - pub fn InterruptDetach_r(__id: ::c_int) -> ::c_int; - pub fn InterruptWait(__flags: ::c_int, __timeout: *const u64) -> ::c_int; - pub fn InterruptWait_r(__flags: ::c_int, __timeout: *const u64) -> ::c_int; + __area: *const c_void, + __size: c_int, + __flags: c_uint, + ) -> c_int; + pub fn InterruptDetach(__id: c_int) -> c_int; + pub fn InterruptDetach_r(__id: c_int) -> c_int; + pub fn InterruptWait(__flags: c_int, __timeout: *const u64) -> c_int; + pub fn InterruptWait_r(__flags: c_int, __timeout: *const u64) -> c_int; pub fn InterruptCharacteristic( - __type: ::c_int, - __id: ::c_int, - __new: *mut ::c_uint, - __old: *mut ::c_uint, - ) -> ::c_int; + __type: c_int, + __id: c_int, + __new: *mut c_uint, + __old: *mut c_uint, + ) -> c_int; pub fn InterruptCharacteristic_r( - __type: ::c_int, - __id: ::c_int, - __new: *mut ::c_uint, - __old: *mut ::c_uint, - ) -> ::c_int; - - pub fn SchedGet(__pid: ::pid_t, __tid: ::c_int, __param: *mut ::sched_param) -> ::c_int; - pub fn SchedGet_r(__pid: ::pid_t, __tid: ::c_int, __param: *mut ::sched_param) -> ::c_int; - pub fn SchedGetCpuNum() -> ::c_uint; + __type: c_int, + __id: c_int, + __new: *mut c_uint, + __old: *mut c_uint, + ) -> c_int; + + pub fn SchedGet(__pid: crate::pid_t, __tid: c_int, __param: *mut crate::sched_param) -> c_int; + pub fn SchedGet_r(__pid: crate::pid_t, __tid: c_int, __param: *mut crate::sched_param) + -> c_int; + pub fn SchedGetCpuNum() -> c_uint; pub fn SchedSet( - __pid: ::pid_t, - __tid: ::c_int, - __algorithm: ::c_int, - __param: *const ::sched_param, - ) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __algorithm: c_int, + __param: *const crate::sched_param, + ) -> c_int; pub fn SchedSet_r( - __pid: ::pid_t, - __tid: ::c_int, - __algorithm: ::c_int, - __param: *const ::sched_param, - ) -> ::c_int; - pub fn SchedInfo(__pid: ::pid_t, __algorithm: ::c_int, __info: *mut ::_sched_info) -> ::c_int; - pub fn SchedInfo_r(__pid: ::pid_t, __algorithm: ::c_int, __info: *mut ::_sched_info) - -> ::c_int; - pub fn SchedYield() -> ::c_int; - pub fn SchedYield_r() -> ::c_int; - pub fn SchedCtl(__cmd: ::c_int, __data: *mut ::c_void, __length: usize) -> ::c_int; - pub fn SchedCtl_r(__cmd: ::c_int, __data: *mut ::c_void, __length: usize) -> ::c_int; - pub fn SchedJobCreate(__job: *mut nto_job_t) -> ::c_int; - pub fn SchedJobCreate_r(__job: *mut nto_job_t) -> ::c_int; - pub fn SchedJobDestroy(__job: *mut nto_job_t) -> ::c_int; - pub fn SchedJobDestroy_r(__job: *mut nto_job_t) -> ::c_int; + __pid: crate::pid_t, + __tid: c_int, + __algorithm: c_int, + __param: *const crate::sched_param, + ) -> c_int; + pub fn SchedInfo( + __pid: crate::pid_t, + __algorithm: c_int, + __info: *mut crate::_sched_info, + ) -> c_int; + pub fn SchedInfo_r( + __pid: crate::pid_t, + __algorithm: c_int, + __info: *mut crate::_sched_info, + ) -> c_int; + pub fn SchedYield() -> c_int; + pub fn SchedYield_r() -> c_int; + pub fn SchedCtl(__cmd: c_int, __data: *mut c_void, __length: usize) -> c_int; + pub fn SchedCtl_r(__cmd: c_int, __data: *mut c_void, __length: usize) -> c_int; + pub fn SchedJobCreate(__job: *mut nto_job_t) -> c_int; + pub fn SchedJobCreate_r(__job: *mut nto_job_t) -> c_int; + pub fn SchedJobDestroy(__job: *mut nto_job_t) -> c_int; + pub fn SchedJobDestroy_r(__job: *mut nto_job_t) -> c_int; pub fn SchedWaypoint( __job: *mut nto_job_t, __new: *const i64, __max: *const i64, __old: *mut i64, - ) -> ::c_int; + ) -> c_int; pub fn SchedWaypoint_r( __job: *mut nto_job_t, __new: *const i64, __max: *const i64, __old: *mut i64, - ) -> ::c_int; + ) -> c_int; - pub fn TimerCreate(__id: ::clockid_t, __notify: *const ::sigevent) -> ::c_int; - pub fn TimerCreate_r(__id: ::clockid_t, __notify: *const ::sigevent) -> ::c_int; - pub fn TimerDestroy(__id: ::timer_t) -> ::c_int; - pub fn TimerDestroy_r(__id: ::timer_t) -> ::c_int; + pub fn TimerCreate(__id: crate::clockid_t, __notify: *const crate::sigevent) -> c_int; + pub fn TimerCreate_r(__id: crate::clockid_t, __notify: *const crate::sigevent) -> c_int; + pub fn TimerDestroy(__id: crate::timer_t) -> c_int; + pub fn TimerDestroy_r(__id: crate::timer_t) -> c_int; pub fn TimerSettime( - __id: ::timer_t, - __flags: ::c_int, - __itime: *const ::_itimer, - __oitime: *mut ::_itimer, - ) -> ::c_int; + __id: crate::timer_t, + __flags: c_int, + __itime: *const crate::_itimer, + __oitime: *mut crate::_itimer, + ) -> c_int; pub fn TimerSettime_r( - __id: ::timer_t, - __flags: ::c_int, - __itime: *const ::_itimer, - __oitime: *mut ::_itimer, - ) -> ::c_int; + __id: crate::timer_t, + __flags: c_int, + __itime: *const crate::_itimer, + __oitime: *mut crate::_itimer, + ) -> c_int; pub fn TimerInfo( - __pid: ::pid_t, - __id: ::timer_t, - __flags: ::c_int, - __info: *mut ::_timer_info, - ) -> ::c_int; + __pid: crate::pid_t, + __id: crate::timer_t, + __flags: c_int, + __info: *mut crate::_timer_info, + ) -> c_int; pub fn TimerInfo_r( - __pid: ::pid_t, - __id: ::timer_t, - __flags: ::c_int, - __info: *mut ::_timer_info, - ) -> ::c_int; + __pid: crate::pid_t, + __id: crate::timer_t, + __flags: c_int, + __info: *mut crate::_timer_info, + ) -> c_int; pub fn TimerAlarm( - __id: ::clockid_t, - __itime: *const ::_itimer, - __otime: *mut ::_itimer, - ) -> ::c_int; + __id: crate::clockid_t, + __itime: *const crate::_itimer, + __otime: *mut crate::_itimer, + ) -> c_int; pub fn TimerAlarm_r( - __id: ::clockid_t, - __itime: *const ::_itimer, - __otime: *mut ::_itimer, - ) -> ::c_int; + __id: crate::clockid_t, + __itime: *const crate::_itimer, + __otime: *mut crate::_itimer, + ) -> c_int; pub fn TimerTimeout( - __id: ::clockid_t, - __flags: ::c_int, - __notify: *const ::sigevent, + __id: crate::clockid_t, + __flags: c_int, + __notify: *const crate::sigevent, __ntime: *const u64, __otime: *mut u64, - ) -> ::c_int; + ) -> c_int; pub fn TimerTimeout_r( - __id: ::clockid_t, - __flags: ::c_int, - __notify: *const ::sigevent, + __id: crate::clockid_t, + __flags: c_int, + __notify: *const crate::sigevent, __ntime: *const u64, __otime: *mut u64, - ) -> ::c_int; + ) -> c_int; pub fn SyncTypeCreate( - __type: ::c_uint, - __sync: *mut ::sync_t, - __attr: *const ::_sync_attr, - ) -> ::c_int; + __type: c_uint, + __sync: *mut crate::sync_t, + __attr: *const crate::_sync_attr, + ) -> c_int; pub fn SyncTypeCreate_r( - __type: ::c_uint, - __sync: *mut ::sync_t, - __attr: *const ::_sync_attr, - ) -> ::c_int; - pub fn SyncDestroy(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncDestroy_r(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncCtl(__cmd: ::c_int, __sync: *mut ::sync_t, __data: *mut ::c_void) -> ::c_int; - pub fn SyncCtl_r(__cmd: ::c_int, __sync: *mut ::sync_t, __data: *mut ::c_void) -> ::c_int; - pub fn SyncMutexEvent(__sync: *mut ::sync_t, event: *const ::sigevent) -> ::c_int; - pub fn SyncMutexEvent_r(__sync: *mut ::sync_t, event: *const ::sigevent) -> ::c_int; - pub fn SyncMutexLock(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncMutexLock_r(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncMutexUnlock(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncMutexUnlock_r(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncMutexRevive(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncMutexRevive_r(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncCondvarWait(__sync: *mut ::sync_t, __mutex: *mut ::sync_t) -> ::c_int; - pub fn SyncCondvarWait_r(__sync: *mut ::sync_t, __mutex: *mut ::sync_t) -> ::c_int; - pub fn SyncCondvarSignal(__sync: *mut ::sync_t, __all: ::c_int) -> ::c_int; - pub fn SyncCondvarSignal_r(__sync: *mut ::sync_t, __all: ::c_int) -> ::c_int; - pub fn SyncSemPost(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncSemPost_r(__sync: *mut ::sync_t) -> ::c_int; - pub fn SyncSemWait(__sync: *mut ::sync_t, __tryto: ::c_int) -> ::c_int; - pub fn SyncSemWait_r(__sync: *mut ::sync_t, __tryto: ::c_int) -> ::c_int; - - pub fn ClockTime(__id: ::clockid_t, _new: *const u64, __old: *mut u64) -> ::c_int; - pub fn ClockTime_r(__id: ::clockid_t, _new: *const u64, __old: *mut u64) -> ::c_int; + __type: c_uint, + __sync: *mut crate::sync_t, + __attr: *const crate::_sync_attr, + ) -> c_int; + pub fn SyncDestroy(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncDestroy_r(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncCtl(__cmd: c_int, __sync: *mut crate::sync_t, __data: *mut c_void) -> c_int; + pub fn SyncCtl_r(__cmd: c_int, __sync: *mut crate::sync_t, __data: *mut c_void) -> c_int; + pub fn SyncMutexEvent(__sync: *mut crate::sync_t, event: *const crate::sigevent) -> c_int; + pub fn SyncMutexEvent_r(__sync: *mut crate::sync_t, event: *const crate::sigevent) -> c_int; + pub fn SyncMutexLock(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncMutexLock_r(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncMutexUnlock(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncMutexUnlock_r(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncMutexRevive(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncMutexRevive_r(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncCondvarWait(__sync: *mut crate::sync_t, __mutex: *mut crate::sync_t) -> c_int; + pub fn SyncCondvarWait_r(__sync: *mut crate::sync_t, __mutex: *mut crate::sync_t) -> c_int; + pub fn SyncCondvarSignal(__sync: *mut crate::sync_t, __all: c_int) -> c_int; + pub fn SyncCondvarSignal_r(__sync: *mut crate::sync_t, __all: c_int) -> c_int; + pub fn SyncSemPost(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncSemPost_r(__sync: *mut crate::sync_t) -> c_int; + pub fn SyncSemWait(__sync: *mut crate::sync_t, __tryto: c_int) -> c_int; + pub fn SyncSemWait_r(__sync: *mut crate::sync_t, __tryto: c_int) -> c_int; + + pub fn ClockTime(__id: crate::clockid_t, _new: *const u64, __old: *mut u64) -> c_int; + pub fn ClockTime_r(__id: crate::clockid_t, _new: *const u64, __old: *mut u64) -> c_int; pub fn ClockAdjust( - __id: ::clockid_t, - _new: *const ::_clockadjust, - __old: *mut ::_clockadjust, - ) -> ::c_int; + __id: crate::clockid_t, + _new: *const crate::_clockadjust, + __old: *mut crate::_clockadjust, + ) -> c_int; pub fn ClockAdjust_r( - __id: ::clockid_t, - _new: *const ::_clockadjust, - __old: *mut ::_clockadjust, - ) -> ::c_int; + __id: crate::clockid_t, + _new: *const crate::_clockadjust, + __old: *mut crate::_clockadjust, + ) -> c_int; pub fn ClockPeriod( - __id: ::clockid_t, - _new: *const ::_clockperiod, - __old: *mut ::_clockperiod, - __reserved: ::c_int, - ) -> ::c_int; + __id: crate::clockid_t, + _new: *const crate::_clockperiod, + __old: *mut crate::_clockperiod, + __reserved: c_int, + ) -> c_int; pub fn ClockPeriod_r( - __id: ::clockid_t, - _new: *const ::_clockperiod, - __old: *mut ::_clockperiod, - __reserved: ::c_int, - ) -> ::c_int; - pub fn ClockId(__pid: ::pid_t, __tid: ::c_int) -> ::c_int; - pub fn ClockId_r(__pid: ::pid_t, __tid: ::c_int) -> ::c_int; + __id: crate::clockid_t, + _new: *const crate::_clockperiod, + __old: *mut crate::_clockperiod, + __reserved: c_int, + ) -> c_int; + pub fn ClockId(__pid: crate::pid_t, __tid: c_int) -> c_int; + pub fn ClockId_r(__pid: crate::pid_t, __tid: c_int) -> c_int; // //TODO: The following commented out functions are implemented in assembly. @@ -1280,9 +1260,9 @@ extern "C" { // //pub fn InterruptEnable(); //pub fn InterruptDisable(); - pub fn InterruptMask(__intr: ::c_int, __id: ::c_int) -> ::c_int; - pub fn InterruptUnmask(__intr: ::c_int, __id: ::c_int) -> ::c_int; + pub fn InterruptMask(__intr: c_int, __id: c_int) -> c_int; + pub fn InterruptUnmask(__intr: c_int, __id: c_int) -> c_int; //pub fn InterruptLock(__spin: *mut ::intrspin); //pub fn InterruptUnlock(__spin: *mut ::intrspin); - //pub fn InterruptStatus() -> ::c_uint; + //pub fn InterruptStatus() -> c_uint; } diff --git a/src/unix/nto/x86_64.rs b/src/unix/nto/x86_64.rs index 55894888f1ad8..ef720ac0a3373 100644 --- a/src/unix/nto/x86_64.rs +++ b/src/unix/nto/x86_64.rs @@ -1,3 +1,5 @@ +use crate::{c_int, c_void, size_t}; + pub type c_char = i8; pub type wchar_t = u32; pub type c_long = i64; @@ -38,9 +40,9 @@ s! { } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct fsave_area_64 { @@ -99,8 +101,8 @@ cfg_if! { } } - impl ::fmt::Debug for x86_64_fpu_registers { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for x86_64_fpu_registers { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("x86_64_fpu_registers") .field("fsave_area", &self.fsave_area) @@ -111,8 +113,8 @@ cfg_if! { } } - impl ::hash::Hash for x86_64_fpu_registers { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for x86_64_fpu_registers { + fn hash(&self, state: &mut H) { unsafe { self.fsave_area.hash(state); self.fxsave_area.hash(state); diff --git a/src/unix/nuttx/mod.rs b/src/unix/nuttx/mod.rs index 200a795ff87ea..014122e421ab8 100644 --- a/src/unix/nuttx/mod.rs +++ b/src/unix/nuttx/mod.rs @@ -1,4 +1,4 @@ -use {c_void, in6_addr, in_addr_t, timespec, DIR}; +use crate::{c_void, in6_addr, in_addr_t, timespec, DIR}; pub type nlink_t = u16; pub type ino_t = u16; @@ -200,16 +200,16 @@ s! { pub struct sockaddr_in { pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, pub sin_zero: [u8; 8], } pub struct sockaddr_in6 { pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } diff --git a/src/unix/redox/mod.rs b/src/unix/redox/mod.rs index 36f72a657eaf3..716d699196ac2 100644 --- a/src/unix/redox/mod.rs +++ b/src/unix/redox/mod.rs @@ -1,3 +1,7 @@ +use crate::{ + c_int, c_longlong, c_short, c_uchar, c_uint, c_ulonglong, c_ushort, c_void, size_t, ssize_t, +}; + pub type c_char = i8; pub type wchar_t = i32; @@ -15,40 +19,40 @@ cfg_if! { } } -pub type blkcnt_t = ::c_ulong; -pub type blksize_t = ::c_long; -pub type clock_t = ::c_long; -pub type clockid_t = ::c_int; -pub type dev_t = ::c_long; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type ino_t = ::c_ulonglong; -pub type mode_t = ::c_int; -pub type nfds_t = ::c_ulong; -pub type nlink_t = ::c_ulong; -pub type off_t = ::c_longlong; -pub type pthread_t = *mut ::c_void; +pub type blkcnt_t = c_ulong; +pub type blksize_t = c_long; +pub type clock_t = c_long; +pub type clockid_t = c_int; +pub type dev_t = c_long; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; +pub type ino_t = c_ulonglong; +pub type mode_t = c_int; +pub type nfds_t = c_ulong; +pub type nlink_t = c_ulong; +pub type off_t = c_longlong; +pub type pthread_t = *mut c_void; // Must be usize due to library/std/sys_common/thread_local.rs, -// should technically be *mut ::c_void +// should technically be *mut c_void pub type pthread_key_t = usize; -pub type rlim_t = ::c_ulonglong; +pub type rlim_t = c_ulonglong; pub type sa_family_t = u16; -pub type sem_t = *mut ::c_void; -pub type sigset_t = ::c_ulonglong; +pub type sem_t = *mut c_void; +pub type sigset_t = c_ulonglong; pub type socklen_t = u32; pub type speed_t = u32; -pub type suseconds_t = ::c_int; +pub type suseconds_t = c_int; pub type tcflag_t = u32; -pub type time_t = ::c_longlong; -pub type id_t = ::c_uint; +pub type time_t = c_longlong; +pub type id_t = c_uint; pub type pid_t = usize; pub type uid_t = u32; pub type gid_t = u32; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } @@ -57,52 +61,52 @@ impl ::Clone for timezone { s_no_extra_traits! { #[repr(C)] pub struct utsname { - pub sysname: [::c_char; UTSLENGTH], - pub nodename: [::c_char; UTSLENGTH], - pub release: [::c_char; UTSLENGTH], - pub version: [::c_char; UTSLENGTH], - pub machine: [::c_char; UTSLENGTH], - pub domainname: [::c_char; UTSLENGTH], + pub sysname: [c_char; UTSLENGTH], + pub nodename: [c_char; UTSLENGTH], + pub release: [c_char; UTSLENGTH], + pub version: [c_char; UTSLENGTH], + pub machine: [c_char; UTSLENGTH], + pub domainname: [c_char; UTSLENGTH], } pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, - pub d_reclen: ::c_ushort, - pub d_type: ::c_uchar, - pub d_name: [::c_char; 256], + pub d_ino: crate::ino_t, + pub d_off: off_t, + pub d_reclen: c_ushort, + pub d_type: c_uchar, + pub d_name: [c_char; 256], } pub struct sockaddr_un { - pub sun_family: ::sa_family_t, - pub sun_path: [::c_char; 108], + pub sun_family: crate::sa_family_t, + pub sun_path: [c_char; 108], } pub struct sockaddr_storage { - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, __ss_padding: [u8; 128 - ::core::mem::size_of::() - ::core::mem::size_of::()], - __ss_align: ::c_ulong, + __ss_align: c_ulong, } } s! { pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::size_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, - pub ai_next: *mut ::addrinfo, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: size_t, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, + pub ai_next: *mut crate::addrinfo, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct epoll_event { @@ -112,141 +116,141 @@ s! { } pub struct fd_set { - fds_bits: [::c_ulong; ::FD_SETSIZE as usize / ULONG_SIZE], + fds_bits: [c_ulong; crate::FD_SETSIZE as usize / ULONG_SIZE], } pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct ip_mreq { - pub imr_multiaddr: ::in_addr, - pub imr_interface: ::in_addr, + pub imr_multiaddr: crate::in_addr, + pub imr_interface: crate::in_addr, } pub struct lconv { - pub currency_symbol: *const ::c_char, - pub decimal_point: *const ::c_char, - pub frac_digits: ::c_char, - pub grouping: *const ::c_char, - pub int_curr_symbol: *const ::c_char, - pub int_frac_digits: ::c_char, - pub mon_decimal_point: *const ::c_char, - pub mon_grouping: *const ::c_char, - pub mon_thousands_sep: *const ::c_char, - pub negative_sign: *const ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub n_sign_posn: ::c_char, - pub positive_sign: *const ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub thousands_sep: *const ::c_char, + pub currency_symbol: *const c_char, + pub decimal_point: *const c_char, + pub frac_digits: c_char, + pub grouping: *const c_char, + pub int_curr_symbol: *const c_char, + pub int_frac_digits: c_char, + pub mon_decimal_point: *const c_char, + pub mon_grouping: *const c_char, + pub mon_thousands_sep: *const c_char, + pub negative_sign: *const c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub n_sign_posn: c_char, + pub positive_sign: *const c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub thousands_sep: *const c_char, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct sigaction { - pub sa_sigaction: ::sighandler_t, - pub sa_flags: ::c_ulong, - pub sa_restorer: ::Option, - pub sa_mask: ::sigset_t, + pub sa_sigaction: crate::sighandler_t, + pub sa_flags: c_ulong, + pub sa_restorer: Option, + pub sa_mask: crate::sigset_t, } pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_errno: ::c_int, - pub si_code: ::c_int, - _pad: [::c_int; 29], + pub si_signo: c_int, + pub si_errno: c_int, + pub si_code: c_int, + _pad: [c_int; 29], _align: [usize; 0], } pub struct sockaddr { - pub sa_family: ::sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_family: crate::sa_family_t, + pub sa_data: [c_char; 14], } pub struct sockaddr_in { - pub sin_family: ::sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_family: crate::sa_family_t, + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } pub struct sockaddr_in6 { - pub sin6_family: ::sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_family: crate::sa_family_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_nlink: ::nlink_t, - pub st_mode: ::mode_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - _pad: [::c_char; 24], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_nlink: crate::nlink_t, + pub st_mode: crate::mode_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + _pad: [c_char; 24], } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_flag: c_ulong, + pub f_namemax: c_ulong, } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_line: ::cc_t, - pub c_cc: [::cc_t; ::NCCS], - pub c_ispeed: ::speed_t, - pub c_ospeed: ::speed_t, + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_line: crate::cc_t, + pub c_cc: [crate::cc_t; crate::NCCS], + pub c_ispeed: crate::speed_t, + pub c_ospeed: crate::speed_t, } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, - pub tm_gmtoff: ::c_long, - pub tm_zone: *const ::c_char, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, + pub tm_gmtoff: c_long, + pub tm_zone: *const c_char, } pub struct ucred { @@ -337,487 +341,487 @@ cfg_if! { } // limits.h -pub const PATH_MAX: ::c_int = 4096; +pub const PATH_MAX: c_int = 4096; // fcntl.h -pub const F_GETLK: ::c_int = 5; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_ULOCK: ::c_int = 0; -pub const F_LOCK: ::c_int = 1; -pub const F_TLOCK: ::c_int = 2; -pub const F_TEST: ::c_int = 3; +pub const F_GETLK: c_int = 5; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_ULOCK: c_int = 0; +pub const F_LOCK: c_int = 1; +pub const F_TLOCK: c_int = 2; +pub const F_TEST: c_int = 3; // FIXME: relibc { -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; // } // dlfcn.h -pub const RTLD_LAZY: ::c_int = 0x0001; -pub const RTLD_NOW: ::c_int = 0x0002; -pub const RTLD_GLOBAL: ::c_int = 0x0100; -pub const RTLD_LOCAL: ::c_int = 0x0000; +pub const RTLD_LAZY: c_int = 0x0001; +pub const RTLD_NOW: c_int = 0x0002; +pub const RTLD_GLOBAL: c_int = 0x0100; +pub const RTLD_LOCAL: c_int = 0x0000; // errno.h -pub const EPERM: ::c_int = 1; /* Operation not permitted */ -pub const ENOENT: ::c_int = 2; /* No such file or directory */ -pub const ESRCH: ::c_int = 3; /* No such process */ -pub const EINTR: ::c_int = 4; /* Interrupted system call */ -pub const EIO: ::c_int = 5; /* I/O error */ -pub const ENXIO: ::c_int = 6; /* No such device or address */ -pub const E2BIG: ::c_int = 7; /* Argument list too long */ -pub const ENOEXEC: ::c_int = 8; /* Exec format error */ -pub const EBADF: ::c_int = 9; /* Bad file number */ -pub const ECHILD: ::c_int = 10; /* No child processes */ -pub const EAGAIN: ::c_int = 11; /* Try again */ -pub const ENOMEM: ::c_int = 12; /* Out of memory */ -pub const EACCES: ::c_int = 13; /* Permission denied */ -pub const EFAULT: ::c_int = 14; /* Bad address */ -pub const ENOTBLK: ::c_int = 15; /* Block device required */ -pub const EBUSY: ::c_int = 16; /* Device or resource busy */ -pub const EEXIST: ::c_int = 17; /* File exists */ -pub const EXDEV: ::c_int = 18; /* Cross-device link */ -pub const ENODEV: ::c_int = 19; /* No such device */ -pub const ENOTDIR: ::c_int = 20; /* Not a directory */ -pub const EISDIR: ::c_int = 21; /* Is a directory */ -pub const EINVAL: ::c_int = 22; /* Invalid argument */ -pub const ENFILE: ::c_int = 23; /* File table overflow */ -pub const EMFILE: ::c_int = 24; /* Too many open files */ -pub const ENOTTY: ::c_int = 25; /* Not a typewriter */ -pub const ETXTBSY: ::c_int = 26; /* Text file busy */ -pub const EFBIG: ::c_int = 27; /* File too large */ -pub const ENOSPC: ::c_int = 28; /* No space left on device */ -pub const ESPIPE: ::c_int = 29; /* Illegal seek */ -pub const EROFS: ::c_int = 30; /* Read-only file system */ -pub const EMLINK: ::c_int = 31; /* Too many links */ -pub const EPIPE: ::c_int = 32; /* Broken pipe */ -pub const EDOM: ::c_int = 33; /* Math argument out of domain of func */ -pub const ERANGE: ::c_int = 34; /* Math result not representable */ -pub const EDEADLK: ::c_int = 35; /* Resource deadlock would occur */ -pub const ENAMETOOLONG: ::c_int = 36; /* File name too long */ -pub const ENOLCK: ::c_int = 37; /* No record locks available */ -pub const ENOSYS: ::c_int = 38; /* Function not implemented */ -pub const ENOTEMPTY: ::c_int = 39; /* Directory not empty */ -pub const ELOOP: ::c_int = 40; /* Too many symbolic links encountered */ -pub const EWOULDBLOCK: ::c_int = 41; /* Operation would block */ -pub const ENOMSG: ::c_int = 42; /* No message of desired type */ -pub const EIDRM: ::c_int = 43; /* Identifier removed */ -pub const ECHRNG: ::c_int = 44; /* Channel number out of range */ -pub const EL2NSYNC: ::c_int = 45; /* Level 2 not synchronized */ -pub const EL3HLT: ::c_int = 46; /* Level 3 halted */ -pub const EL3RST: ::c_int = 47; /* Level 3 reset */ -pub const ELNRNG: ::c_int = 48; /* Link number out of range */ -pub const EUNATCH: ::c_int = 49; /* Protocol driver not attached */ -pub const ENOCSI: ::c_int = 50; /* No CSI structure available */ -pub const EL2HLT: ::c_int = 51; /* Level 2 halted */ -pub const EBADE: ::c_int = 52; /* Invalid exchange */ -pub const EBADR: ::c_int = 53; /* Invalid request descriptor */ -pub const EXFULL: ::c_int = 54; /* Exchange full */ -pub const ENOANO: ::c_int = 55; /* No anode */ -pub const EBADRQC: ::c_int = 56; /* Invalid request code */ -pub const EBADSLT: ::c_int = 57; /* Invalid slot */ -pub const EDEADLOCK: ::c_int = 58; /* Resource deadlock would occur */ -pub const EBFONT: ::c_int = 59; /* Bad font file format */ -pub const ENOSTR: ::c_int = 60; /* Device not a stream */ -pub const ENODATA: ::c_int = 61; /* No data available */ -pub const ETIME: ::c_int = 62; /* Timer expired */ -pub const ENOSR: ::c_int = 63; /* Out of streams resources */ -pub const ENONET: ::c_int = 64; /* Machine is not on the network */ -pub const ENOPKG: ::c_int = 65; /* Package not installed */ -pub const EREMOTE: ::c_int = 66; /* Object is remote */ -pub const ENOLINK: ::c_int = 67; /* Link has been severed */ -pub const EADV: ::c_int = 68; /* Advertise error */ -pub const ESRMNT: ::c_int = 69; /* Srmount error */ -pub const ECOMM: ::c_int = 70; /* Communication error on send */ -pub const EPROTO: ::c_int = 71; /* Protocol error */ -pub const EMULTIHOP: ::c_int = 72; /* Multihop attempted */ -pub const EDOTDOT: ::c_int = 73; /* RFS specific error */ -pub const EBADMSG: ::c_int = 74; /* Not a data message */ -pub const EOVERFLOW: ::c_int = 75; /* Value too large for defined data type */ -pub const ENOTUNIQ: ::c_int = 76; /* Name not unique on network */ -pub const EBADFD: ::c_int = 77; /* File descriptor in bad state */ -pub const EREMCHG: ::c_int = 78; /* Remote address changed */ -pub const ELIBACC: ::c_int = 79; /* Can not access a needed shared library */ -pub const ELIBBAD: ::c_int = 80; /* Accessing a corrupted shared library */ -pub const ELIBSCN: ::c_int = 81; /* .lib section in a.out corrupted */ +pub const EPERM: c_int = 1; /* Operation not permitted */ +pub const ENOENT: c_int = 2; /* No such file or directory */ +pub const ESRCH: c_int = 3; /* No such process */ +pub const EINTR: c_int = 4; /* Interrupted system call */ +pub const EIO: c_int = 5; /* I/O error */ +pub const ENXIO: c_int = 6; /* No such device or address */ +pub const E2BIG: c_int = 7; /* Argument list too long */ +pub const ENOEXEC: c_int = 8; /* Exec format error */ +pub const EBADF: c_int = 9; /* Bad file number */ +pub const ECHILD: c_int = 10; /* No child processes */ +pub const EAGAIN: c_int = 11; /* Try again */ +pub const ENOMEM: c_int = 12; /* Out of memory */ +pub const EACCES: c_int = 13; /* Permission denied */ +pub const EFAULT: c_int = 14; /* Bad address */ +pub const ENOTBLK: c_int = 15; /* Block device required */ +pub const EBUSY: c_int = 16; /* Device or resource busy */ +pub const EEXIST: c_int = 17; /* File exists */ +pub const EXDEV: c_int = 18; /* Cross-device link */ +pub const ENODEV: c_int = 19; /* No such device */ +pub const ENOTDIR: c_int = 20; /* Not a directory */ +pub const EISDIR: c_int = 21; /* Is a directory */ +pub const EINVAL: c_int = 22; /* Invalid argument */ +pub const ENFILE: c_int = 23; /* File table overflow */ +pub const EMFILE: c_int = 24; /* Too many open files */ +pub const ENOTTY: c_int = 25; /* Not a typewriter */ +pub const ETXTBSY: c_int = 26; /* Text file busy */ +pub const EFBIG: c_int = 27; /* File too large */ +pub const ENOSPC: c_int = 28; /* No space left on device */ +pub const ESPIPE: c_int = 29; /* Illegal seek */ +pub const EROFS: c_int = 30; /* Read-only file system */ +pub const EMLINK: c_int = 31; /* Too many links */ +pub const EPIPE: c_int = 32; /* Broken pipe */ +pub const EDOM: c_int = 33; /* Math argument out of domain of func */ +pub const ERANGE: c_int = 34; /* Math result not representable */ +pub const EDEADLK: c_int = 35; /* Resource deadlock would occur */ +pub const ENAMETOOLONG: c_int = 36; /* File name too long */ +pub const ENOLCK: c_int = 37; /* No record locks available */ +pub const ENOSYS: c_int = 38; /* Function not implemented */ +pub const ENOTEMPTY: c_int = 39; /* Directory not empty */ +pub const ELOOP: c_int = 40; /* Too many symbolic links encountered */ +pub const EWOULDBLOCK: c_int = 41; /* Operation would block */ +pub const ENOMSG: c_int = 42; /* No message of desired type */ +pub const EIDRM: c_int = 43; /* Identifier removed */ +pub const ECHRNG: c_int = 44; /* Channel number out of range */ +pub const EL2NSYNC: c_int = 45; /* Level 2 not synchronized */ +pub const EL3HLT: c_int = 46; /* Level 3 halted */ +pub const EL3RST: c_int = 47; /* Level 3 reset */ +pub const ELNRNG: c_int = 48; /* Link number out of range */ +pub const EUNATCH: c_int = 49; /* Protocol driver not attached */ +pub const ENOCSI: c_int = 50; /* No CSI structure available */ +pub const EL2HLT: c_int = 51; /* Level 2 halted */ +pub const EBADE: c_int = 52; /* Invalid exchange */ +pub const EBADR: c_int = 53; /* Invalid request descriptor */ +pub const EXFULL: c_int = 54; /* Exchange full */ +pub const ENOANO: c_int = 55; /* No anode */ +pub const EBADRQC: c_int = 56; /* Invalid request code */ +pub const EBADSLT: c_int = 57; /* Invalid slot */ +pub const EDEADLOCK: c_int = 58; /* Resource deadlock would occur */ +pub const EBFONT: c_int = 59; /* Bad font file format */ +pub const ENOSTR: c_int = 60; /* Device not a stream */ +pub const ENODATA: c_int = 61; /* No data available */ +pub const ETIME: c_int = 62; /* Timer expired */ +pub const ENOSR: c_int = 63; /* Out of streams resources */ +pub const ENONET: c_int = 64; /* Machine is not on the network */ +pub const ENOPKG: c_int = 65; /* Package not installed */ +pub const EREMOTE: c_int = 66; /* Object is remote */ +pub const ENOLINK: c_int = 67; /* Link has been severed */ +pub const EADV: c_int = 68; /* Advertise error */ +pub const ESRMNT: c_int = 69; /* Srmount error */ +pub const ECOMM: c_int = 70; /* Communication error on send */ +pub const EPROTO: c_int = 71; /* Protocol error */ +pub const EMULTIHOP: c_int = 72; /* Multihop attempted */ +pub const EDOTDOT: c_int = 73; /* RFS specific error */ +pub const EBADMSG: c_int = 74; /* Not a data message */ +pub const EOVERFLOW: c_int = 75; /* Value too large for defined data type */ +pub const ENOTUNIQ: c_int = 76; /* Name not unique on network */ +pub const EBADFD: c_int = 77; /* File descriptor in bad state */ +pub const EREMCHG: c_int = 78; /* Remote address changed */ +pub const ELIBACC: c_int = 79; /* Can not access a needed shared library */ +pub const ELIBBAD: c_int = 80; /* Accessing a corrupted shared library */ +pub const ELIBSCN: c_int = 81; /* .lib section in a.out corrupted */ /* Attempting to link in too many shared libraries */ -pub const ELIBMAX: ::c_int = 82; -pub const ELIBEXEC: ::c_int = 83; /* Cannot exec a shared library directly */ -pub const EILSEQ: ::c_int = 84; /* Illegal byte sequence */ +pub const ELIBMAX: c_int = 82; +pub const ELIBEXEC: c_int = 83; /* Cannot exec a shared library directly */ +pub const EILSEQ: c_int = 84; /* Illegal byte sequence */ /* Interrupted system call should be restarted */ -pub const ERESTART: ::c_int = 85; -pub const ESTRPIPE: ::c_int = 86; /* Streams pipe error */ -pub const EUSERS: ::c_int = 87; /* Too many users */ -pub const ENOTSOCK: ::c_int = 88; /* Socket operation on non-socket */ -pub const EDESTADDRREQ: ::c_int = 89; /* Destination address required */ -pub const EMSGSIZE: ::c_int = 90; /* Message too long */ -pub const EPROTOTYPE: ::c_int = 91; /* Protocol wrong type for socket */ -pub const ENOPROTOOPT: ::c_int = 92; /* Protocol not available */ -pub const EPROTONOSUPPORT: ::c_int = 93; /* Protocol not supported */ -pub const ESOCKTNOSUPPORT: ::c_int = 94; /* Socket type not supported */ +pub const ERESTART: c_int = 85; +pub const ESTRPIPE: c_int = 86; /* Streams pipe error */ +pub const EUSERS: c_int = 87; /* Too many users */ +pub const ENOTSOCK: c_int = 88; /* Socket operation on non-socket */ +pub const EDESTADDRREQ: c_int = 89; /* Destination address required */ +pub const EMSGSIZE: c_int = 90; /* Message too long */ +pub const EPROTOTYPE: c_int = 91; /* Protocol wrong type for socket */ +pub const ENOPROTOOPT: c_int = 92; /* Protocol not available */ +pub const EPROTONOSUPPORT: c_int = 93; /* Protocol not supported */ +pub const ESOCKTNOSUPPORT: c_int = 94; /* Socket type not supported */ /* Operation not supported on transport endpoint */ -pub const EOPNOTSUPP: ::c_int = 95; -pub const ENOTSUP: ::c_int = EOPNOTSUPP; -pub const EPFNOSUPPORT: ::c_int = 96; /* Protocol family not supported */ +pub const EOPNOTSUPP: c_int = 95; +pub const ENOTSUP: c_int = EOPNOTSUPP; +pub const EPFNOSUPPORT: c_int = 96; /* Protocol family not supported */ /* Address family not supported by protocol */ -pub const EAFNOSUPPORT: ::c_int = 97; -pub const EADDRINUSE: ::c_int = 98; /* Address already in use */ -pub const EADDRNOTAVAIL: ::c_int = 99; /* Cannot assign requested address */ -pub const ENETDOWN: ::c_int = 100; /* Network is down */ -pub const ENETUNREACH: ::c_int = 101; /* Network is unreachable */ +pub const EAFNOSUPPORT: c_int = 97; +pub const EADDRINUSE: c_int = 98; /* Address already in use */ +pub const EADDRNOTAVAIL: c_int = 99; /* Cannot assign requested address */ +pub const ENETDOWN: c_int = 100; /* Network is down */ +pub const ENETUNREACH: c_int = 101; /* Network is unreachable */ /* Network dropped connection because of reset */ -pub const ENETRESET: ::c_int = 102; -pub const ECONNABORTED: ::c_int = 103; /* Software caused connection abort */ -pub const ECONNRESET: ::c_int = 104; /* Connection reset by peer */ -pub const ENOBUFS: ::c_int = 105; /* No buffer space available */ -pub const EISCONN: ::c_int = 106; /* Transport endpoint is already connected */ -pub const ENOTCONN: ::c_int = 107; /* Transport endpoint is not connected */ +pub const ENETRESET: c_int = 102; +pub const ECONNABORTED: c_int = 103; /* Software caused connection abort */ +pub const ECONNRESET: c_int = 104; /* Connection reset by peer */ +pub const ENOBUFS: c_int = 105; /* No buffer space available */ +pub const EISCONN: c_int = 106; /* Transport endpoint is already connected */ +pub const ENOTCONN: c_int = 107; /* Transport endpoint is not connected */ /* Cannot send after transport endpoint shutdown */ -pub const ESHUTDOWN: ::c_int = 108; -pub const ETOOMANYREFS: ::c_int = 109; /* Too many references: cannot splice */ -pub const ETIMEDOUT: ::c_int = 110; /* Connection timed out */ -pub const ECONNREFUSED: ::c_int = 111; /* Connection refused */ -pub const EHOSTDOWN: ::c_int = 112; /* Host is down */ -pub const EHOSTUNREACH: ::c_int = 113; /* No route to host */ -pub const EALREADY: ::c_int = 114; /* Operation already in progress */ -pub const EINPROGRESS: ::c_int = 115; /* Operation now in progress */ -pub const ESTALE: ::c_int = 116; /* Stale NFS file handle */ -pub const EUCLEAN: ::c_int = 117; /* Structure needs cleaning */ -pub const ENOTNAM: ::c_int = 118; /* Not a XENIX named type file */ -pub const ENAVAIL: ::c_int = 119; /* No XENIX semaphores available */ -pub const EISNAM: ::c_int = 120; /* Is a named type file */ -pub const EREMOTEIO: ::c_int = 121; /* Remote I/O error */ -pub const EDQUOT: ::c_int = 122; /* Quota exceeded */ -pub const ENOMEDIUM: ::c_int = 123; /* No medium found */ -pub const EMEDIUMTYPE: ::c_int = 124; /* Wrong medium type */ -pub const ECANCELED: ::c_int = 125; /* Operation Canceled */ -pub const ENOKEY: ::c_int = 126; /* Required key not available */ -pub const EKEYEXPIRED: ::c_int = 127; /* Key has expired */ -pub const EKEYREVOKED: ::c_int = 128; /* Key has been revoked */ -pub const EKEYREJECTED: ::c_int = 129; /* Key was rejected by service */ -pub const EOWNERDEAD: ::c_int = 130; /* Owner died */ -pub const ENOTRECOVERABLE: ::c_int = 131; /* State not recoverable */ +pub const ESHUTDOWN: c_int = 108; +pub const ETOOMANYREFS: c_int = 109; /* Too many references: cannot splice */ +pub const ETIMEDOUT: c_int = 110; /* Connection timed out */ +pub const ECONNREFUSED: c_int = 111; /* Connection refused */ +pub const EHOSTDOWN: c_int = 112; /* Host is down */ +pub const EHOSTUNREACH: c_int = 113; /* No route to host */ +pub const EALREADY: c_int = 114; /* Operation already in progress */ +pub const EINPROGRESS: c_int = 115; /* Operation now in progress */ +pub const ESTALE: c_int = 116; /* Stale NFS file handle */ +pub const EUCLEAN: c_int = 117; /* Structure needs cleaning */ +pub const ENOTNAM: c_int = 118; /* Not a XENIX named type file */ +pub const ENAVAIL: c_int = 119; /* No XENIX semaphores available */ +pub const EISNAM: c_int = 120; /* Is a named type file */ +pub const EREMOTEIO: c_int = 121; /* Remote I/O error */ +pub const EDQUOT: c_int = 122; /* Quota exceeded */ +pub const ENOMEDIUM: c_int = 123; /* No medium found */ +pub const EMEDIUMTYPE: c_int = 124; /* Wrong medium type */ +pub const ECANCELED: c_int = 125; /* Operation Canceled */ +pub const ENOKEY: c_int = 126; /* Required key not available */ +pub const EKEYEXPIRED: c_int = 127; /* Key has expired */ +pub const EKEYREVOKED: c_int = 128; /* Key has been revoked */ +pub const EKEYREJECTED: c_int = 129; /* Key was rejected by service */ +pub const EOWNERDEAD: c_int = 130; /* Owner died */ +pub const ENOTRECOVERABLE: c_int = 131; /* State not recoverable */ // fcntl.h -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; // FIXME: relibc { -pub const F_DUPFD_CLOEXEC: ::c_int = ::F_DUPFD; +pub const F_DUPFD_CLOEXEC: c_int = crate::F_DUPFD; // } -pub const FD_CLOEXEC: ::c_int = 0x0100_0000; -pub const O_RDONLY: ::c_int = 0x0001_0000; -pub const O_WRONLY: ::c_int = 0x0002_0000; -pub const O_RDWR: ::c_int = 0x0003_0000; -pub const O_ACCMODE: ::c_int = 0x0003_0000; -pub const O_NONBLOCK: ::c_int = 0x0004_0000; -pub const O_APPEND: ::c_int = 0x0008_0000; -pub const O_SHLOCK: ::c_int = 0x0010_0000; -pub const O_EXLOCK: ::c_int = 0x0020_0000; -pub const O_ASYNC: ::c_int = 0x0040_0000; -pub const O_FSYNC: ::c_int = 0x0080_0000; -pub const O_CLOEXEC: ::c_int = 0x0100_0000; -pub const O_CREAT: ::c_int = 0x0200_0000; -pub const O_TRUNC: ::c_int = 0x0400_0000; -pub const O_EXCL: ::c_int = 0x0800_0000; -pub const O_DIRECTORY: ::c_int = 0x1000_0000; -pub const O_PATH: ::c_int = 0x2000_0000; -pub const O_SYMLINK: ::c_int = 0x4000_0000; +pub const FD_CLOEXEC: c_int = 0x0100_0000; +pub const O_RDONLY: c_int = 0x0001_0000; +pub const O_WRONLY: c_int = 0x0002_0000; +pub const O_RDWR: c_int = 0x0003_0000; +pub const O_ACCMODE: c_int = 0x0003_0000; +pub const O_NONBLOCK: c_int = 0x0004_0000; +pub const O_APPEND: c_int = 0x0008_0000; +pub const O_SHLOCK: c_int = 0x0010_0000; +pub const O_EXLOCK: c_int = 0x0020_0000; +pub const O_ASYNC: c_int = 0x0040_0000; +pub const O_FSYNC: c_int = 0x0080_0000; +pub const O_CLOEXEC: c_int = 0x0100_0000; +pub const O_CREAT: c_int = 0x0200_0000; +pub const O_TRUNC: c_int = 0x0400_0000; +pub const O_EXCL: c_int = 0x0800_0000; +pub const O_DIRECTORY: c_int = 0x1000_0000; +pub const O_PATH: c_int = 0x2000_0000; +pub const O_SYMLINK: c_int = 0x4000_0000; // Negative to allow it to be used as int // FIXME: Fix negative values missing from includes -pub const O_NOFOLLOW: ::c_int = -0x8000_0000; +pub const O_NOFOLLOW: c_int = -0x8000_0000; // locale.h -pub const LC_ALL: ::c_int = 0; -pub const LC_COLLATE: ::c_int = 1; -pub const LC_CTYPE: ::c_int = 2; -pub const LC_MESSAGES: ::c_int = 3; -pub const LC_MONETARY: ::c_int = 4; -pub const LC_NUMERIC: ::c_int = 5; -pub const LC_TIME: ::c_int = 6; +pub const LC_ALL: c_int = 0; +pub const LC_COLLATE: c_int = 1; +pub const LC_CTYPE: c_int = 2; +pub const LC_MESSAGES: c_int = 3; +pub const LC_MONETARY: c_int = 4; +pub const LC_NUMERIC: c_int = 5; +pub const LC_TIME: c_int = 6; // netdb.h -pub const AI_PASSIVE: ::c_int = 0x0001; -pub const AI_CANONNAME: ::c_int = 0x0002; -pub const AI_NUMERICHOST: ::c_int = 0x0004; -pub const AI_V4MAPPED: ::c_int = 0x0008; -pub const AI_ALL: ::c_int = 0x0010; -pub const AI_ADDRCONFIG: ::c_int = 0x0020; -pub const AI_NUMERICSERV: ::c_int = 0x0400; -pub const EAI_BADFLAGS: ::c_int = -1; -pub const EAI_NONAME: ::c_int = -2; -pub const EAI_AGAIN: ::c_int = -3; -pub const EAI_FAIL: ::c_int = -4; -pub const EAI_NODATA: ::c_int = -5; -pub const EAI_FAMILY: ::c_int = -6; -pub const EAI_SOCKTYPE: ::c_int = -7; -pub const EAI_SERVICE: ::c_int = -8; -pub const EAI_ADDRFAMILY: ::c_int = -9; -pub const EAI_MEMORY: ::c_int = -10; -pub const EAI_SYSTEM: ::c_int = -11; -pub const EAI_OVERFLOW: ::c_int = -12; -pub const NI_MAXHOST: ::c_int = 1025; -pub const NI_MAXSERV: ::c_int = 32; -pub const NI_NUMERICHOST: ::c_int = 0x0001; -pub const NI_NUMERICSERV: ::c_int = 0x0002; -pub const NI_NOFQDN: ::c_int = 0x0004; -pub const NI_NAMEREQD: ::c_int = 0x0008; -pub const NI_DGRAM: ::c_int = 0x0010; +pub const AI_PASSIVE: c_int = 0x0001; +pub const AI_CANONNAME: c_int = 0x0002; +pub const AI_NUMERICHOST: c_int = 0x0004; +pub const AI_V4MAPPED: c_int = 0x0008; +pub const AI_ALL: c_int = 0x0010; +pub const AI_ADDRCONFIG: c_int = 0x0020; +pub const AI_NUMERICSERV: c_int = 0x0400; +pub const EAI_BADFLAGS: c_int = -1; +pub const EAI_NONAME: c_int = -2; +pub const EAI_AGAIN: c_int = -3; +pub const EAI_FAIL: c_int = -4; +pub const EAI_NODATA: c_int = -5; +pub const EAI_FAMILY: c_int = -6; +pub const EAI_SOCKTYPE: c_int = -7; +pub const EAI_SERVICE: c_int = -8; +pub const EAI_ADDRFAMILY: c_int = -9; +pub const EAI_MEMORY: c_int = -10; +pub const EAI_SYSTEM: c_int = -11; +pub const EAI_OVERFLOW: c_int = -12; +pub const NI_MAXHOST: c_int = 1025; +pub const NI_MAXSERV: c_int = 32; +pub const NI_NUMERICHOST: c_int = 0x0001; +pub const NI_NUMERICSERV: c_int = 0x0002; +pub const NI_NOFQDN: c_int = 0x0004; +pub const NI_NAMEREQD: c_int = 0x0008; +pub const NI_DGRAM: c_int = 0x0010; // netinet/in.h // FIXME: relibc { -pub const IP_TTL: ::c_int = 2; -pub const IPV6_UNICAST_HOPS: ::c_int = 16; -pub const IPV6_MULTICAST_IF: ::c_int = 17; -pub const IPV6_MULTICAST_HOPS: ::c_int = 18; -pub const IPV6_MULTICAST_LOOP: ::c_int = 19; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 20; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 21; -pub const IPV6_V6ONLY: ::c_int = 26; -pub const IP_MULTICAST_IF: ::c_int = 32; -pub const IP_MULTICAST_TTL: ::c_int = 33; -pub const IP_MULTICAST_LOOP: ::c_int = 34; -pub const IP_ADD_MEMBERSHIP: ::c_int = 35; -pub const IP_DROP_MEMBERSHIP: ::c_int = 36; -pub const IP_TOS: ::c_int = 1; -pub const IP_RECVTOS: ::c_int = 2; -pub const IPPROTO_IGMP: ::c_int = 2; -pub const IPPROTO_PUP: ::c_int = 12; -pub const IPPROTO_IDP: ::c_int = 22; -pub const IPPROTO_RAW: ::c_int = 255; -pub const IPPROTO_MAX: ::c_int = 255; +pub const IP_TTL: c_int = 2; +pub const IPV6_UNICAST_HOPS: c_int = 16; +pub const IPV6_MULTICAST_IF: c_int = 17; +pub const IPV6_MULTICAST_HOPS: c_int = 18; +pub const IPV6_MULTICAST_LOOP: c_int = 19; +pub const IPV6_ADD_MEMBERSHIP: c_int = 20; +pub const IPV6_DROP_MEMBERSHIP: c_int = 21; +pub const IPV6_V6ONLY: c_int = 26; +pub const IP_MULTICAST_IF: c_int = 32; +pub const IP_MULTICAST_TTL: c_int = 33; +pub const IP_MULTICAST_LOOP: c_int = 34; +pub const IP_ADD_MEMBERSHIP: c_int = 35; +pub const IP_DROP_MEMBERSHIP: c_int = 36; +pub const IP_TOS: c_int = 1; +pub const IP_RECVTOS: c_int = 2; +pub const IPPROTO_IGMP: c_int = 2; +pub const IPPROTO_PUP: c_int = 12; +pub const IPPROTO_IDP: c_int = 22; +pub const IPPROTO_RAW: c_int = 255; +pub const IPPROTO_MAX: c_int = 255; // } // netinet/tcp.h -pub const TCP_NODELAY: ::c_int = 1; +pub const TCP_NODELAY: c_int = 1; // FIXME: relibc { -pub const TCP_KEEPIDLE: ::c_int = 1; +pub const TCP_KEEPIDLE: c_int = 1; // } // poll.h -pub const POLLIN: ::c_short = 0x001; -pub const POLLPRI: ::c_short = 0x002; -pub const POLLOUT: ::c_short = 0x004; -pub const POLLERR: ::c_short = 0x008; -pub const POLLHUP: ::c_short = 0x010; -pub const POLLNVAL: ::c_short = 0x020; -pub const POLLRDNORM: ::c_short = 0x040; -pub const POLLRDBAND: ::c_short = 0x080; -pub const POLLWRNORM: ::c_short = 0x100; -pub const POLLWRBAND: ::c_short = 0x200; +pub const POLLIN: c_short = 0x001; +pub const POLLPRI: c_short = 0x002; +pub const POLLOUT: c_short = 0x004; +pub const POLLERR: c_short = 0x008; +pub const POLLHUP: c_short = 0x010; +pub const POLLNVAL: c_short = 0x020; +pub const POLLRDNORM: c_short = 0x040; +pub const POLLRDBAND: c_short = 0x080; +pub const POLLWRNORM: c_short = 0x100; +pub const POLLWRBAND: c_short = 0x200; // pthread.h -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 1; -pub const PTHREAD_MUTEX_INITIALIZER: ::pthread_mutex_t = ::pthread_mutex_t { +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 1; +pub const PTHREAD_MUTEX_INITIALIZER: crate::pthread_mutex_t = crate::pthread_mutex_t { bytes: [0; _PTHREAD_MUTEX_SIZE], }; -pub const PTHREAD_COND_INITIALIZER: ::pthread_cond_t = ::pthread_cond_t { +pub const PTHREAD_COND_INITIALIZER: crate::pthread_cond_t = crate::pthread_cond_t { bytes: [0; _PTHREAD_COND_SIZE], }; -pub const PTHREAD_RWLOCK_INITIALIZER: ::pthread_rwlock_t = ::pthread_rwlock_t { +pub const PTHREAD_RWLOCK_INITIALIZER: crate::pthread_rwlock_t = crate::pthread_rwlock_t { bytes: [0; _PTHREAD_RWLOCK_SIZE], }; -pub const PTHREAD_STACK_MIN: ::size_t = 4096; +pub const PTHREAD_STACK_MIN: size_t = 4096; // signal.h -pub const SIG_BLOCK: ::c_int = 0; -pub const SIG_UNBLOCK: ::c_int = 1; -pub const SIG_SETMASK: ::c_int = 2; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGTRAP: ::c_int = 5; -pub const SIGABRT: ::c_int = 6; -pub const SIGBUS: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGUSR1: ::c_int = 10; -pub const SIGSEGV: ::c_int = 11; -pub const SIGUSR2: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGSTKFLT: ::c_int = 16; -pub const SIGCHLD: ::c_int = 17; -pub const SIGCONT: ::c_int = 18; -pub const SIGSTOP: ::c_int = 19; -pub const SIGTSTP: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; -pub const SIGURG: ::c_int = 23; -pub const SIGXCPU: ::c_int = 24; -pub const SIGXFSZ: ::c_int = 25; -pub const SIGVTALRM: ::c_int = 26; -pub const SIGPROF: ::c_int = 27; -pub const SIGWINCH: ::c_int = 28; -pub const SIGIO: ::c_int = 29; -pub const SIGPWR: ::c_int = 30; -pub const SIGSYS: ::c_int = 31; -pub const NSIG: ::c_int = 32; - -pub const SA_NOCLDSTOP: ::c_ulong = 0x00000001; -pub const SA_NOCLDWAIT: ::c_ulong = 0x00000002; -pub const SA_SIGINFO: ::c_ulong = 0x00000004; -pub const SA_RESTORER: ::c_ulong = 0x04000000; -pub const SA_ONSTACK: ::c_ulong = 0x08000000; -pub const SA_RESTART: ::c_ulong = 0x10000000; -pub const SA_NODEFER: ::c_ulong = 0x40000000; -pub const SA_RESETHAND: ::c_ulong = 0x80000000; +pub const SIG_BLOCK: c_int = 0; +pub const SIG_UNBLOCK: c_int = 1; +pub const SIG_SETMASK: c_int = 2; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGTRAP: c_int = 5; +pub const SIGABRT: c_int = 6; +pub const SIGBUS: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGUSR1: c_int = 10; +pub const SIGSEGV: c_int = 11; +pub const SIGUSR2: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGSTKFLT: c_int = 16; +pub const SIGCHLD: c_int = 17; +pub const SIGCONT: c_int = 18; +pub const SIGSTOP: c_int = 19; +pub const SIGTSTP: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; +pub const SIGURG: c_int = 23; +pub const SIGXCPU: c_int = 24; +pub const SIGXFSZ: c_int = 25; +pub const SIGVTALRM: c_int = 26; +pub const SIGPROF: c_int = 27; +pub const SIGWINCH: c_int = 28; +pub const SIGIO: c_int = 29; +pub const SIGPWR: c_int = 30; +pub const SIGSYS: c_int = 31; +pub const NSIG: c_int = 32; + +pub const SA_NOCLDSTOP: c_ulong = 0x00000001; +pub const SA_NOCLDWAIT: c_ulong = 0x00000002; +pub const SA_SIGINFO: c_ulong = 0x00000004; +pub const SA_RESTORER: c_ulong = 0x04000000; +pub const SA_ONSTACK: c_ulong = 0x08000000; +pub const SA_RESTART: c_ulong = 0x10000000; +pub const SA_NODEFER: c_ulong = 0x40000000; +pub const SA_RESETHAND: c_ulong = 0x80000000; // sys/file.h -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; // sys/epoll.h -pub const EPOLL_CLOEXEC: ::c_int = 0x0100_0000; -pub const EPOLL_CTL_ADD: ::c_int = 1; -pub const EPOLL_CTL_DEL: ::c_int = 2; -pub const EPOLL_CTL_MOD: ::c_int = 3; -pub const EPOLLIN: ::c_int = 0x001; -pub const EPOLLPRI: ::c_int = 0x002; -pub const EPOLLOUT: ::c_int = 0x004; -pub const EPOLLERR: ::c_int = 0x008; -pub const EPOLLHUP: ::c_int = 0x010; -pub const EPOLLNVAL: ::c_int = 0x020; -pub const EPOLLRDNORM: ::c_int = 0x040; -pub const EPOLLRDBAND: ::c_int = 0x080; -pub const EPOLLWRNORM: ::c_int = 0x100; -pub const EPOLLWRBAND: ::c_int = 0x200; -pub const EPOLLMSG: ::c_int = 0x400; -pub const EPOLLRDHUP: ::c_int = 0x2000; -pub const EPOLLEXCLUSIVE: ::c_int = 1 << 28; -pub const EPOLLWAKEUP: ::c_int = 1 << 29; -pub const EPOLLONESHOT: ::c_int = 1 << 30; -pub const EPOLLET: ::c_int = 1 << 31; +pub const EPOLL_CLOEXEC: c_int = 0x0100_0000; +pub const EPOLL_CTL_ADD: c_int = 1; +pub const EPOLL_CTL_DEL: c_int = 2; +pub const EPOLL_CTL_MOD: c_int = 3; +pub const EPOLLIN: c_int = 0x001; +pub const EPOLLPRI: c_int = 0x002; +pub const EPOLLOUT: c_int = 0x004; +pub const EPOLLERR: c_int = 0x008; +pub const EPOLLHUP: c_int = 0x010; +pub const EPOLLNVAL: c_int = 0x020; +pub const EPOLLRDNORM: c_int = 0x040; +pub const EPOLLRDBAND: c_int = 0x080; +pub const EPOLLWRNORM: c_int = 0x100; +pub const EPOLLWRBAND: c_int = 0x200; +pub const EPOLLMSG: c_int = 0x400; +pub const EPOLLRDHUP: c_int = 0x2000; +pub const EPOLLEXCLUSIVE: c_int = 1 << 28; +pub const EPOLLWAKEUP: c_int = 1 << 29; +pub const EPOLLONESHOT: c_int = 1 << 30; +pub const EPOLLET: c_int = 1 << 31; // sys/stat.h -pub const S_IFMT: ::c_int = 0o17_0000; -pub const S_IFDIR: ::c_int = 0o4_0000; -pub const S_IFCHR: ::c_int = 0o2_0000; -pub const S_IFBLK: ::c_int = 0o6_0000; -pub const S_IFREG: ::c_int = 0o10_0000; -pub const S_IFIFO: ::c_int = 0o1_0000; -pub const S_IFLNK: ::c_int = 0o12_0000; -pub const S_IFSOCK: ::c_int = 0o14_0000; -pub const S_IRWXU: ::c_int = 0o0700; -pub const S_IRUSR: ::c_int = 0o0400; -pub const S_IWUSR: ::c_int = 0o0200; -pub const S_IXUSR: ::c_int = 0o0100; -pub const S_IRWXG: ::c_int = 0o0070; -pub const S_IRGRP: ::c_int = 0o0040; -pub const S_IWGRP: ::c_int = 0o0020; -pub const S_IXGRP: ::c_int = 0o0010; -pub const S_IRWXO: ::c_int = 0o0007; -pub const S_IROTH: ::c_int = 0o0004; -pub const S_IWOTH: ::c_int = 0o0002; -pub const S_IXOTH: ::c_int = 0o0001; +pub const S_IFMT: c_int = 0o17_0000; +pub const S_IFDIR: c_int = 0o4_0000; +pub const S_IFCHR: c_int = 0o2_0000; +pub const S_IFBLK: c_int = 0o6_0000; +pub const S_IFREG: c_int = 0o10_0000; +pub const S_IFIFO: c_int = 0o1_0000; +pub const S_IFLNK: c_int = 0o12_0000; +pub const S_IFSOCK: c_int = 0o14_0000; +pub const S_IRWXU: c_int = 0o0700; +pub const S_IRUSR: c_int = 0o0400; +pub const S_IWUSR: c_int = 0o0200; +pub const S_IXUSR: c_int = 0o0100; +pub const S_IRWXG: c_int = 0o0070; +pub const S_IRGRP: c_int = 0o0040; +pub const S_IWGRP: c_int = 0o0020; +pub const S_IXGRP: c_int = 0o0010; +pub const S_IRWXO: c_int = 0o0007; +pub const S_IROTH: c_int = 0o0004; +pub const S_IWOTH: c_int = 0o0002; +pub const S_IXOTH: c_int = 0o0001; // stdlib.h -pub const EXIT_SUCCESS: ::c_int = 0; -pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const EXIT_FAILURE: c_int = 1; // sys/ioctl.h // FIXME: relibc { -pub const FIONREAD: ::c_ulong = 0x541B; -pub const FIONBIO: ::c_ulong = 0x5421; -pub const FIOCLEX: ::c_ulong = 0x5451; +pub const FIONREAD: c_ulong = 0x541B; +pub const FIONBIO: c_ulong = 0x5421; +pub const FIOCLEX: c_ulong = 0x5451; // } -pub const TCGETS: ::c_ulong = 0x5401; -pub const TCSETS: ::c_ulong = 0x5402; -pub const TCFLSH: ::c_ulong = 0x540B; -pub const TIOCSCTTY: ::c_ulong = 0x540E; -pub const TIOCGPGRP: ::c_ulong = 0x540F; -pub const TIOCSPGRP: ::c_ulong = 0x5410; -pub const TIOCGWINSZ: ::c_ulong = 0x5413; -pub const TIOCSWINSZ: ::c_ulong = 0x5414; +pub const TCGETS: c_ulong = 0x5401; +pub const TCSETS: c_ulong = 0x5402; +pub const TCFLSH: c_ulong = 0x540B; +pub const TIOCSCTTY: c_ulong = 0x540E; +pub const TIOCGPGRP: c_ulong = 0x540F; +pub const TIOCSPGRP: c_ulong = 0x5410; +pub const TIOCGWINSZ: c_ulong = 0x5413; +pub const TIOCSWINSZ: c_ulong = 0x5414; // sys/mman.h -pub const PROT_NONE: ::c_int = 0x0000; -pub const PROT_READ: ::c_int = 0x0004; -pub const PROT_WRITE: ::c_int = 0x0002; -pub const PROT_EXEC: ::c_int = 0x0001; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; - -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_ANON: ::c_int = 0x0020; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_FAILED: *mut ::c_void = !0 as _; - -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; -pub const MS_SYNC: ::c_int = 0x0004; +pub const PROT_NONE: c_int = 0x0000; +pub const PROT_READ: c_int = 0x0004; +pub const PROT_WRITE: c_int = 0x0002; +pub const PROT_EXEC: c_int = 0x0001; + +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; + +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_ANON: c_int = 0x0020; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; +pub const MAP_FIXED: c_int = 0x0010; +pub const MAP_FAILED: *mut c_void = !0 as _; + +pub const MS_ASYNC: c_int = 0x0001; +pub const MS_INVALIDATE: c_int = 0x0002; +pub const MS_SYNC: c_int = 0x0004; // sys/select.h -pub const FD_SETSIZE: ::c_int = 1024; +pub const FD_SETSIZE: c_int = 1024; // sys/socket.h -pub const AF_INET: ::c_int = 2; -pub const AF_INET6: ::c_int = 10; -pub const AF_UNIX: ::c_int = 1; -pub const AF_UNSPEC: ::c_int = 0; -pub const PF_INET: ::c_int = 2; -pub const PF_INET6: ::c_int = 10; -pub const PF_UNIX: ::c_int = 1; -pub const PF_UNSPEC: ::c_int = 0; -pub const MSG_CTRUNC: ::c_int = 8; -pub const MSG_DONTROUTE: ::c_int = 4; -pub const MSG_EOR: ::c_int = 128; -pub const MSG_OOB: ::c_int = 1; -pub const MSG_PEEK: ::c_int = 2; -pub const MSG_TRUNC: ::c_int = 32; -pub const MSG_DONTWAIT: ::c_int = 64; -pub const MSG_WAITALL: ::c_int = 256; -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; -pub const SO_DEBUG: ::c_int = 1; -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_DONTROUTE: ::c_int = 5; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_OOBINLINE: ::c_int = 10; -pub const SO_NO_CHECK: ::c_int = 11; -pub const SO_PRIORITY: ::c_int = 12; -pub const SO_LINGER: ::c_int = 13; -pub const SO_BSDCOMPAT: ::c_int = 14; -pub const SO_REUSEPORT: ::c_int = 15; -pub const SO_PASSCRED: ::c_int = 16; -pub const SO_PEERCRED: ::c_int = 17; -pub const SO_RCVLOWAT: ::c_int = 18; -pub const SO_SNDLOWAT: ::c_int = 19; -pub const SO_RCVTIMEO: ::c_int = 20; -pub const SO_SNDTIMEO: ::c_int = 21; -pub const SO_ACCEPTCONN: ::c_int = 30; -pub const SO_PEERSEC: ::c_int = 31; -pub const SO_SNDBUFFORCE: ::c_int = 32; -pub const SO_RCVBUFFORCE: ::c_int = 33; -pub const SO_PROTOCOL: ::c_int = 38; -pub const SO_DOMAIN: ::c_int = 39; -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_NONBLOCK: ::c_int = 0o4_000; -pub const SOCK_CLOEXEC: ::c_int = 0o2_000_000; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOL_SOCKET: ::c_int = 1; -pub const SOMAXCONN: ::c_int = 128; +pub const AF_INET: c_int = 2; +pub const AF_INET6: c_int = 10; +pub const AF_UNIX: c_int = 1; +pub const AF_UNSPEC: c_int = 0; +pub const PF_INET: c_int = 2; +pub const PF_INET6: c_int = 10; +pub const PF_UNIX: c_int = 1; +pub const PF_UNSPEC: c_int = 0; +pub const MSG_CTRUNC: c_int = 8; +pub const MSG_DONTROUTE: c_int = 4; +pub const MSG_EOR: c_int = 128; +pub const MSG_OOB: c_int = 1; +pub const MSG_PEEK: c_int = 2; +pub const MSG_TRUNC: c_int = 32; +pub const MSG_DONTWAIT: c_int = 64; +pub const MSG_WAITALL: c_int = 256; +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; +pub const SO_DEBUG: c_int = 1; +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_DONTROUTE: c_int = 5; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_OOBINLINE: c_int = 10; +pub const SO_NO_CHECK: c_int = 11; +pub const SO_PRIORITY: c_int = 12; +pub const SO_LINGER: c_int = 13; +pub const SO_BSDCOMPAT: c_int = 14; +pub const SO_REUSEPORT: c_int = 15; +pub const SO_PASSCRED: c_int = 16; +pub const SO_PEERCRED: c_int = 17; +pub const SO_RCVLOWAT: c_int = 18; +pub const SO_SNDLOWAT: c_int = 19; +pub const SO_RCVTIMEO: c_int = 20; +pub const SO_SNDTIMEO: c_int = 21; +pub const SO_ACCEPTCONN: c_int = 30; +pub const SO_PEERSEC: c_int = 31; +pub const SO_SNDBUFFORCE: c_int = 32; +pub const SO_RCVBUFFORCE: c_int = 33; +pub const SO_PROTOCOL: c_int = 38; +pub const SO_DOMAIN: c_int = 39; +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_NONBLOCK: c_int = 0o4_000; +pub const SOCK_CLOEXEC: c_int = 0o2_000_000; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOL_SOCKET: c_int = 1; +pub const SOMAXCONN: c_int = 128; // sys/termios.h pub const VEOF: usize = 0; @@ -839,26 +843,26 @@ pub const VMIN: usize = 16; pub const VTIME: usize = 17; pub const NCCS: usize = 32; -pub const IGNBRK: ::tcflag_t = 0o000_001; -pub const BRKINT: ::tcflag_t = 0o000_002; -pub const IGNPAR: ::tcflag_t = 0o000_004; -pub const PARMRK: ::tcflag_t = 0o000_010; -pub const INPCK: ::tcflag_t = 0o000_020; -pub const ISTRIP: ::tcflag_t = 0o000_040; -pub const INLCR: ::tcflag_t = 0o000_100; -pub const IGNCR: ::tcflag_t = 0o000_200; -pub const ICRNL: ::tcflag_t = 0o000_400; -pub const IXON: ::tcflag_t = 0o001_000; -pub const IXOFF: ::tcflag_t = 0o002_000; - -pub const OPOST: ::tcflag_t = 0o000_001; -pub const ONLCR: ::tcflag_t = 0o000_002; -pub const OLCUC: ::tcflag_t = 0o000_004; -pub const OCRNL: ::tcflag_t = 0o000_010; -pub const ONOCR: ::tcflag_t = 0o000_020; -pub const ONLRET: ::tcflag_t = 0o000_040; -pub const OFILL: ::tcflag_t = 0o0000_100; -pub const OFDEL: ::tcflag_t = 0o0000_200; +pub const IGNBRK: crate::tcflag_t = 0o000_001; +pub const BRKINT: crate::tcflag_t = 0o000_002; +pub const IGNPAR: crate::tcflag_t = 0o000_004; +pub const PARMRK: crate::tcflag_t = 0o000_010; +pub const INPCK: crate::tcflag_t = 0o000_020; +pub const ISTRIP: crate::tcflag_t = 0o000_040; +pub const INLCR: crate::tcflag_t = 0o000_100; +pub const IGNCR: crate::tcflag_t = 0o000_200; +pub const ICRNL: crate::tcflag_t = 0o000_400; +pub const IXON: crate::tcflag_t = 0o001_000; +pub const IXOFF: crate::tcflag_t = 0o002_000; + +pub const OPOST: crate::tcflag_t = 0o000_001; +pub const ONLCR: crate::tcflag_t = 0o000_002; +pub const OLCUC: crate::tcflag_t = 0o000_004; +pub const OCRNL: crate::tcflag_t = 0o000_010; +pub const ONOCR: crate::tcflag_t = 0o000_020; +pub const ONLRET: crate::tcflag_t = 0o000_040; +pub const OFILL: crate::tcflag_t = 0o0000_100; +pub const OFDEL: crate::tcflag_t = 0o0000_200; pub const B0: speed_t = 0o000_000; pub const B50: speed_t = 0o000_001; @@ -893,143 +897,143 @@ pub const B3000000: speed_t = 0o0_034; pub const B3500000: speed_t = 0o0_035; pub const B4000000: speed_t = 0o0_036; -pub const CSIZE: ::tcflag_t = 0o001_400; -pub const CS5: ::tcflag_t = 0o000_000; -pub const CS6: ::tcflag_t = 0o000_400; -pub const CS7: ::tcflag_t = 0o001_000; -pub const CS8: ::tcflag_t = 0o001_400; - -pub const CSTOPB: ::tcflag_t = 0o002_000; -pub const CREAD: ::tcflag_t = 0o004_000; -pub const PARENB: ::tcflag_t = 0o010_000; -pub const PARODD: ::tcflag_t = 0o020_000; -pub const HUPCL: ::tcflag_t = 0o040_000; - -pub const CLOCAL: ::tcflag_t = 0o0100000; - -pub const ISIG: ::tcflag_t = 0x0000_0080; -pub const ICANON: ::tcflag_t = 0x0000_0100; -pub const ECHO: ::tcflag_t = 0x0000_0008; -pub const ECHOE: ::tcflag_t = 0x0000_0002; -pub const ECHOK: ::tcflag_t = 0x0000_0004; -pub const ECHONL: ::tcflag_t = 0x0000_0010; -pub const NOFLSH: ::tcflag_t = 0x8000_0000; -pub const TOSTOP: ::tcflag_t = 0x0040_0000; -pub const IEXTEN: ::tcflag_t = 0x0000_0400; - -pub const TCOOFF: ::c_int = 0; -pub const TCOON: ::c_int = 1; -pub const TCIOFF: ::c_int = 2; -pub const TCION: ::c_int = 3; - -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; - -pub const TCSANOW: ::c_int = 0; -pub const TCSADRAIN: ::c_int = 1; -pub const TCSAFLUSH: ::c_int = 2; +pub const CSIZE: crate::tcflag_t = 0o001_400; +pub const CS5: crate::tcflag_t = 0o000_000; +pub const CS6: crate::tcflag_t = 0o000_400; +pub const CS7: crate::tcflag_t = 0o001_000; +pub const CS8: crate::tcflag_t = 0o001_400; + +pub const CSTOPB: crate::tcflag_t = 0o002_000; +pub const CREAD: crate::tcflag_t = 0o004_000; +pub const PARENB: crate::tcflag_t = 0o010_000; +pub const PARODD: crate::tcflag_t = 0o020_000; +pub const HUPCL: crate::tcflag_t = 0o040_000; + +pub const CLOCAL: crate::tcflag_t = 0o0100000; + +pub const ISIG: crate::tcflag_t = 0x0000_0080; +pub const ICANON: crate::tcflag_t = 0x0000_0100; +pub const ECHO: crate::tcflag_t = 0x0000_0008; +pub const ECHOE: crate::tcflag_t = 0x0000_0002; +pub const ECHOK: crate::tcflag_t = 0x0000_0004; +pub const ECHONL: crate::tcflag_t = 0x0000_0010; +pub const NOFLSH: crate::tcflag_t = 0x8000_0000; +pub const TOSTOP: crate::tcflag_t = 0x0040_0000; +pub const IEXTEN: crate::tcflag_t = 0x0000_0400; + +pub const TCOOFF: c_int = 0; +pub const TCOON: c_int = 1; +pub const TCIOFF: c_int = 2; +pub const TCION: c_int = 3; + +pub const TCIFLUSH: c_int = 0; +pub const TCOFLUSH: c_int = 1; +pub const TCIOFLUSH: c_int = 2; + +pub const TCSANOW: c_int = 0; +pub const TCSADRAIN: c_int = 1; +pub const TCSAFLUSH: c_int = 2; // sys/wait.h -pub const WNOHANG: ::c_int = 1; -pub const WUNTRACED: ::c_int = 2; +pub const WNOHANG: c_int = 1; +pub const WUNTRACED: c_int = 2; -pub const WSTOPPED: ::c_int = 2; -pub const WEXITED: ::c_int = 4; -pub const WCONTINUED: ::c_int = 8; -pub const WNOWAIT: ::c_int = 0x0100_0000; +pub const WSTOPPED: c_int = 2; +pub const WEXITED: c_int = 4; +pub const WCONTINUED: c_int = 8; +pub const WNOWAIT: c_int = 0x0100_0000; -pub const __WNOTHREAD: ::c_int = 0x2000_0000; -pub const __WALL: ::c_int = 0x4000_0000; +pub const __WNOTHREAD: c_int = 0x2000_0000; +pub const __WALL: c_int = 0x4000_0000; #[allow(overflowing_literals)] -pub const __WCLONE: ::c_int = 0x8000_0000; +pub const __WCLONE: c_int = 0x8000_0000; // time.h -pub const CLOCK_REALTIME: ::c_int = 1; -pub const CLOCK_MONOTONIC: ::c_int = 4; -pub const CLOCK_PROCESS_CPUTIME_ID: ::clockid_t = 2; -pub const CLOCKS_PER_SEC: ::clock_t = 1_000_000; +pub const CLOCK_REALTIME: c_int = 1; +pub const CLOCK_MONOTONIC: c_int = 4; +pub const CLOCK_PROCESS_CPUTIME_ID: crate::clockid_t = 2; +pub const CLOCKS_PER_SEC: crate::clock_t = 1_000_000; // unistd.h // POSIX.1 { -pub const _SC_ARG_MAX: ::c_int = 0; -pub const _SC_CHILD_MAX: ::c_int = 1; -pub const _SC_CLK_TCK: ::c_int = 2; -pub const _SC_NGROUPS_MAX: ::c_int = 3; -pub const _SC_OPEN_MAX: ::c_int = 4; -pub const _SC_STREAM_MAX: ::c_int = 5; -pub const _SC_TZNAME_MAX: ::c_int = 6; +pub const _SC_ARG_MAX: c_int = 0; +pub const _SC_CHILD_MAX: c_int = 1; +pub const _SC_CLK_TCK: c_int = 2; +pub const _SC_NGROUPS_MAX: c_int = 3; +pub const _SC_OPEN_MAX: c_int = 4; +pub const _SC_STREAM_MAX: c_int = 5; +pub const _SC_TZNAME_MAX: c_int = 6; // ... -pub const _SC_VERSION: ::c_int = 29; -pub const _SC_PAGESIZE: ::c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = 30; +pub const _SC_VERSION: c_int = 29; +pub const _SC_PAGESIZE: c_int = 30; +pub const _SC_PAGE_SIZE: c_int = 30; // ... -pub const _SC_RE_DUP_MAX: ::c_int = 44; +pub const _SC_RE_DUP_MAX: c_int = 44; // ... -pub const _SC_LOGIN_NAME_MAX: ::c_int = 71; -pub const _SC_TTY_NAME_MAX: ::c_int = 72; +pub const _SC_LOGIN_NAME_MAX: c_int = 71; +pub const _SC_TTY_NAME_MAX: c_int = 72; // ... -pub const _SC_SYMLOOP_MAX: ::c_int = 173; +pub const _SC_SYMLOOP_MAX: c_int = 173; // ... -pub const _SC_HOST_NAME_MAX: ::c_int = 180; +pub const _SC_HOST_NAME_MAX: c_int = 180; // } POSIX.1 -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; - -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; - -pub const _PC_LINK_MAX: ::c_int = 0; -pub const _PC_MAX_CANON: ::c_int = 1; -pub const _PC_MAX_INPUT: ::c_int = 2; -pub const _PC_NAME_MAX: ::c_int = 3; -pub const _PC_PATH_MAX: ::c_int = 4; -pub const _PC_PIPE_BUF: ::c_int = 5; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 6; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_SYNC_IO: ::c_int = 9; -pub const _PC_ASYNC_IO: ::c_int = 10; -pub const _PC_PRIO_IO: ::c_int = 11; -pub const _PC_SOCK_MAXBUF: ::c_int = 12; -pub const _PC_FILESIZEBITS: ::c_int = 13; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 18; -pub const _PC_SYMLINK_MAX: ::c_int = 19; -pub const _PC_2_SYMLINKS: ::c_int = 20; - -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; + +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; + +pub const _PC_LINK_MAX: c_int = 0; +pub const _PC_MAX_CANON: c_int = 1; +pub const _PC_MAX_INPUT: c_int = 2; +pub const _PC_NAME_MAX: c_int = 3; +pub const _PC_PATH_MAX: c_int = 4; +pub const _PC_PIPE_BUF: c_int = 5; +pub const _PC_CHOWN_RESTRICTED: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_SYNC_IO: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SOCK_MAXBUF: c_int = 12; +pub const _PC_FILESIZEBITS: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_ALLOC_SIZE_MIN: c_int = 18; +pub const _PC_SYMLINK_MAX: c_int = 19; +pub const _PC_2_SYMLINKS: c_int = 20; + +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; // wait.h f! { - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] &= !(1 << (fd % size)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; return ((*set).fds_bits[fd / size] & (1 << (fd % size))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let fd = fd as usize; - let size = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + let size = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; (*set).fds_bits[fd / size] |= 1 << (fd % size); return; } @@ -1042,217 +1046,220 @@ f! { } safe_f! { - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xff) == 0x7f } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { status == 0xffff } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0x7f) + 1) as i8 >= 2 } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7f } - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0x7f) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xff } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } } extern "C" { // errno.h - pub fn __errno_location() -> *mut ::c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn __errno_location() -> *mut c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; // unistd.h - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; + pub fn getdtablesize() -> c_int; // grp.h - pub fn getgrent() -> *mut ::group; + pub fn getgrent() -> *mut crate::group; pub fn setgrent(); pub fn endgrent(); - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; pub fn getgrouplist( - user: *const ::c_char, - group: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; + user: *const c_char, + group: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; // malloc.h - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; // netdb.h pub fn getnameinfo( - addr: *const ::sockaddr, - addrlen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; + addr: *const crate::sockaddr, + addrlen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; // pthread.h pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; pub fn pthread_create( - tid: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - start: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - arg: *mut ::c_void, - ) -> ::c_int; + tid: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + start: extern "C" fn(*mut c_void) -> *mut c_void, + arg: *mut c_void, + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; //pty.h pub fn openpty( - amaster: *mut ::c_int, - aslave: *mut ::c_int, - name: *mut ::c_char, + amaster: *mut c_int, + aslave: *mut c_int, + name: *mut c_char, termp: *const termios, - winp: *const ::winsize, - ) -> ::c_int; + winp: *const crate::winsize, + ) -> c_int; // pwd.h pub fn getpwent() -> *mut passwd; pub fn setpwent(); pub fn endpwent(); pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; // signal.h pub fn pthread_sigmask( - how: ::c_int, - set: *const ::sigset_t, - oldset: *mut ::sigset_t, - ) -> ::c_int; - pub fn pthread_cancel(thread: ::pthread_t) -> ::c_int; - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; + how: c_int, + set: *const crate::sigset_t, + oldset: *mut crate::sigset_t, + ) -> c_int; + pub fn pthread_cancel(thread: crate::pthread_t) -> c_int; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; pub fn sigtimedwait( set: *const sigset_t, sig: *mut siginfo_t, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + timeout: *const crate::timespec, + ) -> c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; // stdlib.h pub fn getsubopt( optionp: *mut *mut c_char, tokens: *const *mut c_char, valuep: *mut *mut c_char, - ) -> ::c_int; - pub fn reallocarray(ptr: *mut ::c_void, nmemb: ::size_t, size: ::size_t) -> *mut ::c_void; + ) -> c_int; + pub fn reallocarray(ptr: *mut c_void, nmemb: size_t, size: size_t) -> *mut c_void; // string.h - pub fn explicit_bzero(p: *mut ::c_void, len: ::size_t); - pub fn strlcat(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t; - pub fn strlcpy(dst: *mut ::c_char, src: *const ::c_char, siz: ::size_t) -> ::size_t; + pub fn explicit_bzero(p: *mut c_void, len: size_t); + pub fn strlcat(dst: *mut c_char, src: *const c_char, siz: size_t) -> size_t; + pub fn strlcpy(dst: *mut c_char, src: *const c_char, siz: size_t) -> size_t; // sys/epoll.h - pub fn epoll_create(size: ::c_int) -> ::c_int; - pub fn epoll_create1(flags: ::c_int) -> ::c_int; + pub fn epoll_create(size: c_int) -> c_int; + pub fn epoll_create1(flags: c_int) -> c_int; pub fn epoll_wait( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - ) -> ::c_int; - pub fn epoll_ctl(epfd: ::c_int, op: ::c_int, fd: ::c_int, event: *mut ::epoll_event) - -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: c_int, + ) -> c_int; + pub fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut crate::epoll_event) -> c_int; // sys/ioctl.h - pub fn ioctl(fd: ::c_int, request: ::c_ulong, ...) -> ::c_int; + pub fn ioctl(fd: c_int, request: c_ulong, ...) -> c_int; // sys/mman.h - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn shm_open(name: *const c_char, oflag: ::c_int, mode: mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; // sys/resource.h - pub fn getpriority(which: ::c_int, who: ::id_t) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::id_t, prio: ::c_int) -> ::c_int; - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + pub fn getpriority(which: c_int, who: crate::id_t) -> c_int; + pub fn setpriority(which: c_int, who: crate::id_t, prio: c_int) -> c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; // sys/socket.h - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; // sys/stat.h - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; // sys/uio.h - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; // sys/utsname.h - pub fn uname(utsname: *mut utsname) -> ::c_int; + pub fn uname(utsname: *mut utsname) -> c_int; // time.h - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::timezone) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut crate::timezone) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; // utmp.h - pub fn login_tty(fd: ::c_int) -> ::c_int; + pub fn login_tty(fd: c_int) -> c_int; } cfg_if! { @@ -1273,8 +1280,8 @@ cfg_if! { impl Eq for dirent {} - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_off", &self.d_off) @@ -1285,8 +1292,8 @@ cfg_if! { } } - impl ::hash::Hash for dirent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for dirent { + fn hash(&self, state: &mut H) { self.d_ino.hash(state); self.d_off.hash(state); self.d_reclen.hash(state); @@ -1308,8 +1315,8 @@ cfg_if! { impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_family", &self.sun_family) // FIXME: .field("sun_path", &self.sun_path) @@ -1317,8 +1324,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_family.hash(state); self.sun_path.hash(state); } @@ -1338,8 +1345,8 @@ cfg_if! { impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_family", &self.ss_family) .field("__ss_align", &self.__ss_align) @@ -1348,8 +1355,8 @@ cfg_if! { } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_family.hash(state); self.__ss_padding.hash(state); self.__ss_align.hash(state); @@ -1392,8 +1399,8 @@ cfg_if! { impl Eq for utsname {} - impl ::fmt::Debug for utsname { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utsname { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utsname") // FIXME: .field("sysname", &self.sysname) // FIXME: .field("nodename", &self.nodename) @@ -1405,8 +1412,8 @@ cfg_if! { } } - impl ::hash::Hash for utsname { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utsname { + fn hash(&self, state: &mut H) { self.sysname.hash(state); self.nodename.hash(state); self.release.hash(state); diff --git a/src/unix/solarish/compat.rs b/src/unix/solarish/compat.rs index 72d1bb436794e..8fd1c750a62cf 100644 --- a/src/unix/solarish/compat.rs +++ b/src/unix/solarish/compat.rs @@ -1,14 +1,14 @@ // Common functions that are unfortunately missing on illumos and // Solaris, but often needed by other crates. - use core::cmp::min; -use unix::solarish::*; +use crate::unix::solarish::*; +use crate::{c_char, c_int, size_t}; const PTEM: &[u8] = b"ptem\0"; const LDTERM: &[u8] = b"ldterm\0"; -pub unsafe fn cfmakeraw(termios: *mut ::termios) { +pub unsafe fn cfmakeraw(termios: *mut crate::termios) { (*termios).c_iflag &= !(IMAXBEL | IGNBRK | BRKINT | PARMRK | ISTRIP | INLCR | IGNCR | ICRNL | IXON); (*termios).c_oflag &= !OPOST; @@ -33,77 +33,79 @@ pub unsafe fn cfmakeraw(termios: *mut ::termios) { (*termios).c_cc[VTIME] = 0; } -pub unsafe fn cfsetspeed(termios: *mut ::termios, speed: ::speed_t) -> ::c_int { +pub unsafe fn cfsetspeed(termios: *mut crate::termios, speed: crate::speed_t) -> c_int { // Neither of these functions on illumos or Solaris actually ever // return an error - ::cfsetispeed(termios, speed); - ::cfsetospeed(termios, speed); + crate::cfsetispeed(termios, speed); + crate::cfsetospeed(termios, speed); 0 } -unsafe fn bail(fdm: ::c_int, fds: ::c_int) -> ::c_int { +unsafe fn bail(fdm: c_int, fds: c_int) -> c_int { let e = *___errno(); if fds >= 0 { - ::close(fds); + crate::close(fds); } if fdm >= 0 { - ::close(fdm); + crate::close(fdm); } *___errno() = e; return -1; } pub unsafe fn openpty( - amain: *mut ::c_int, - asubord: *mut ::c_int, - name: *mut ::c_char, + amain: *mut c_int, + asubord: *mut c_int, + name: *mut c_char, termp: *const termios, - winp: *const ::winsize, -) -> ::c_int { + winp: *const crate::winsize, +) -> c_int { // Open the main pseudo-terminal device, making sure not to set it as the // controlling terminal for this process: - let fdm = ::posix_openpt(O_RDWR | O_NOCTTY); + let fdm = crate::posix_openpt(O_RDWR | O_NOCTTY); if fdm < 0 { return -1; } // Set permissions and ownership on the subordinate device and unlock it: - if ::grantpt(fdm) < 0 || ::unlockpt(fdm) < 0 { + if crate::grantpt(fdm) < 0 || crate::unlockpt(fdm) < 0 { return bail(fdm, -1); } // Get the path name of the subordinate device: - let subordpath = ::ptsname(fdm); + let subordpath = crate::ptsname(fdm); if subordpath.is_null() { return bail(fdm, -1); } // Open the subordinate device without setting it as the controlling // terminal for this process: - let fds = ::open(subordpath, O_RDWR | O_NOCTTY); + let fds = crate::open(subordpath, O_RDWR | O_NOCTTY); if fds < 0 { return bail(fdm, -1); } // Check if the STREAMS modules are already pushed: - let setup = ::ioctl(fds, I_FIND, LDTERM.as_ptr()); + let setup = crate::ioctl(fds, I_FIND, LDTERM.as_ptr()); if setup < 0 { return bail(fdm, fds); } else if setup == 0 { // The line discipline is not present, so push the appropriate STREAMS // modules for the subordinate device: - if ::ioctl(fds, I_PUSH, PTEM.as_ptr()) < 0 || ::ioctl(fds, I_PUSH, LDTERM.as_ptr()) < 0 { + if crate::ioctl(fds, I_PUSH, PTEM.as_ptr()) < 0 + || crate::ioctl(fds, I_PUSH, LDTERM.as_ptr()) < 0 + { return bail(fdm, fds); } } // If provided, set the terminal parameters: - if !termp.is_null() && ::tcsetattr(fds, TCSAFLUSH, termp) != 0 { + if !termp.is_null() && crate::tcsetattr(fds, TCSAFLUSH, termp) != 0 { return bail(fdm, fds); } // If provided, set the window size: - if !winp.is_null() && ::ioctl(fds, TIOCSWINSZ, winp) < 0 { + if !winp.is_null() && crate::ioctl(fds, TIOCSWINSZ, winp) < 0 { return bail(fdm, fds); } @@ -113,7 +115,7 @@ pub unsafe fn openpty( // upper bound on the copy length for this pointer. Nobody should pass // anything but NULL here, preferring instead to use ptsname(3C) directly. if !name.is_null() { - ::strcpy(name, subordpath); + crate::strcpy(name, subordpath); } *amain = fdm; @@ -122,51 +124,51 @@ pub unsafe fn openpty( } pub unsafe fn forkpty( - amain: *mut ::c_int, - name: *mut ::c_char, + amain: *mut c_int, + name: *mut c_char, termp: *const termios, - winp: *const ::winsize, -) -> ::pid_t { + winp: *const crate::winsize, +) -> crate::pid_t { let mut fds = -1; if openpty(amain, &mut fds, name, termp, winp) != 0 { return -1; } - let pid = ::fork(); + let pid = crate::fork(); if pid < 0 { return bail(*amain, fds); } else if pid > 0 { // In the parent process, we close the subordinate device and return the // process ID of the new child: - ::close(fds); + crate::close(fds); return pid; } // The rest of this function executes in the child process. // Close the main side of the pseudo-terminal pair: - ::close(*amain); + crate::close(*amain); // Use TIOCSCTTY to set the subordinate device as our controlling // terminal. This will fail (with ENOTTY) if we are not the leader in // our own session, so we call setsid() first. Finally, arrange for // the pseudo-terminal to occupy the standard I/O descriptors. - if ::setsid() < 0 - || ::ioctl(fds, TIOCSCTTY, 0) < 0 - || ::dup2(fds, 0) < 0 - || ::dup2(fds, 1) < 0 - || ::dup2(fds, 2) < 0 + if crate::setsid() < 0 + || crate::ioctl(fds, TIOCSCTTY, 0) < 0 + || crate::dup2(fds, 0) < 0 + || crate::dup2(fds, 1) < 0 + || crate::dup2(fds, 2) < 0 { // At this stage there are no particularly good ways to handle failure. // Exit as abruptly as possible, using _exit() to avoid messing with any // state still shared with the parent process. - ::_exit(EXIT_FAILURE); + crate::_exit(EXIT_FAILURE); } // Close the inherited descriptor, taking care to avoid closing the standard // descriptors by mistake: if fds > 2 { - ::close(fds); + crate::close(fds); } 0 @@ -174,48 +176,40 @@ pub unsafe fn forkpty( pub unsafe fn getpwent_r( pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, -) -> ::c_int { - let old_errno = *::___errno(); - *::___errno() = 0; - *result = native_getpwent_r( - pwd, - buf, - min(buflen, ::c_int::max_value() as ::size_t) as ::c_int, - ); +) -> c_int { + let old_errno = *crate::___errno(); + *crate::___errno() = 0; + *result = native_getpwent_r(pwd, buf, min(buflen, c_int::max_value() as size_t) as c_int); let ret = if (*result).is_null() { - *::___errno() + *crate::___errno() } else { 0 }; - *::___errno() = old_errno; + *crate::___errno() = old_errno; ret } pub unsafe fn getgrent_r( - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, -) -> ::c_int { - let old_errno = *::___errno(); - *::___errno() = 0; - *result = native_getgrent_r( - grp, - buf, - min(buflen, ::c_int::max_value() as ::size_t) as ::c_int, - ); + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, +) -> c_int { + let old_errno = *crate::___errno(); + *crate::___errno() = 0; + *result = native_getgrent_r(grp, buf, min(buflen, c_int::max_value() as size_t) as c_int); let ret = if (*result).is_null() { - *::___errno() + *crate::___errno() } else { 0 }; - *::___errno() = old_errno; + *crate::___errno() = old_errno; ret } diff --git a/src/unix/solarish/illumos.rs b/src/unix/solarish/illumos.rs index cfdb2d16df034..0fea3b7dd24ba 100644 --- a/src/unix/solarish/illumos.rs +++ b/src/unix/solarish/illumos.rs @@ -1,44 +1,45 @@ -use { - exit_status, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, - PRIV_XPOLICY, +use crate::{ + c_char, c_double, c_int, c_short, c_uint, c_ulong, c_ushort, c_void, exit_status, off_t, + size_t, ssize_t, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, + PRIV_PFEXEC, PRIV_XPOLICY, }; -pub type lgrp_rsrc_t = ::c_int; -pub type lgrp_affinity_t = ::c_int; +pub type lgrp_rsrc_t = c_int; +pub type lgrp_affinity_t = c_int; s! { pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_offset: ::off_t, - pub aio_reqprio: ::c_int, - pub aio_sigevent: ::sigevent, - pub aio_lio_opcode: ::c_int, - pub aio_resultp: ::aio_result_t, - pub aio_state: ::c_int, - pub aio__pad: [::c_int; 1], + pub aio_fildes: c_int, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_offset: off_t, + pub aio_reqprio: c_int, + pub aio_sigevent: crate::sigevent, + pub aio_lio_opcode: c_int, + pub aio_resultp: crate::aio_result_t, + pub aio_state: c_int, + pub aio__pad: [c_int; 1], } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_amp: *mut ::c_void, - pub shm_lkcnt: ::c_ushort, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_cnattch: ::c_ulong, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_amp: *mut c_void, + pub shm_lkcnt: c_ushort, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_cnattch: c_ulong, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, pub shm_pad4: [i64; 4], } pub struct fil_info { - pub fi_flags: ::c_int, - pub fi_pos: ::c_int, - pub fi_name: [::c_char; ::FILNAME_MAX as usize], + pub fi_flags: c_int, + pub fi_pos: c_int, + pub fi_name: [c_char; crate::FILNAME_MAX as usize], } } @@ -50,17 +51,17 @@ s_no_extra_traits! { } pub struct utmpx { - pub ut_user: [::c_char; _UTX_USERSIZE], - pub ut_id: [::c_char; _UTX_IDSIZE], - pub ut_line: [::c_char; _UTX_LINESIZE], - pub ut_pid: ::pid_t, - pub ut_type: ::c_short, + pub ut_user: [c_char; _UTX_USERSIZE], + pub ut_id: [c_char; _UTX_IDSIZE], + pub ut_line: [c_char; _UTX_LINESIZE], + pub ut_pid: crate::pid_t, + pub ut_type: c_short, pub ut_exit: exit_status, - pub ut_tv: ::timeval, - pub ut_session: ::c_int, - pub ut_pad: [::c_int; _UTX_PADSIZE], - pub ut_syslen: ::c_short, - pub ut_host: [::c_char; _UTX_HOSTSIZE], + pub ut_tv: crate::timeval, + pub ut_session: c_int, + pub ut_pad: [c_int; _UTX_PADSIZE], + pub ut_syslen: c_short, + pub ut_host: [c_char; _UTX_HOSTSIZE], } } @@ -88,8 +89,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_user", &self.ut_user) .field("ut_id", &self.ut_id) @@ -106,8 +107,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_user.hash(state); self.ut_type.hash(state); self.ut_pid.hash(state); @@ -128,8 +129,8 @@ cfg_if! { } } impl Eq for epoll_event {} - impl ::fmt::Debug for epoll_event { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for epoll_event { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { let events = self.events; let u64 = self.u64; f.debug_struct("epoll_event") @@ -138,8 +139,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for epoll_event { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for epoll_event { + fn hash(&self, state: &mut H) { let events = self.events; let u64 = self.u64; events.hash(state); @@ -155,195 +156,194 @@ pub const _UTX_PADSIZE: usize = 5; pub const _UTX_IDSIZE: usize = 4; pub const _UTX_HOSTSIZE: usize = 257; -pub const AF_LOCAL: ::c_int = 1; // AF_UNIX -pub const AF_FILE: ::c_int = 1; // AF_UNIX +pub const AF_LOCAL: c_int = 1; // AF_UNIX +pub const AF_FILE: c_int = 1; // AF_UNIX -pub const EFD_SEMAPHORE: ::c_int = 0x1; -pub const EFD_NONBLOCK: ::c_int = 0x800; -pub const EFD_CLOEXEC: ::c_int = 0x80000; +pub const EFD_SEMAPHORE: c_int = 0x1; +pub const EFD_NONBLOCK: c_int = 0x800; +pub const EFD_CLOEXEC: c_int = 0x80000; -pub const POLLRDHUP: ::c_short = 0x4000; +pub const POLLRDHUP: c_short = 0x4000; -pub const TCP_KEEPIDLE: ::c_int = 34; -pub const TCP_KEEPCNT: ::c_int = 35; -pub const TCP_KEEPINTVL: ::c_int = 36; -pub const TCP_CONGESTION: ::c_int = 37; +pub const TCP_KEEPIDLE: c_int = 34; +pub const TCP_KEEPCNT: c_int = 35; +pub const TCP_KEEPINTVL: c_int = 36; +pub const TCP_CONGESTION: c_int = 37; // These constants are correct for 64-bit programs or 32-bit programs that are // not using large-file mode. If Rust ever supports anything other than 64-bit // compilation on illumos, this may require adjustment: -pub const F_OFD_GETLK: ::c_int = 47; -pub const F_OFD_SETLK: ::c_int = 48; -pub const F_OFD_SETLKW: ::c_int = 49; -pub const F_FLOCK: ::c_int = 53; -pub const F_FLOCKW: ::c_int = 54; +pub const F_OFD_GETLK: c_int = 47; +pub const F_OFD_SETLK: c_int = 48; +pub const F_OFD_SETLKW: c_int = 49; +pub const F_FLOCK: c_int = 53; +pub const F_FLOCKW: c_int = 54; -pub const F_DUPFD_CLOEXEC: ::c_int = 37; -pub const F_DUPFD_CLOFORK: ::c_int = 58; -pub const F_DUP2FD_CLOEXEC: ::c_int = 36; -pub const F_DUP2FD_CLOFORK: ::c_int = 57; -pub const F_DUP3FD: ::c_int = 59; +pub const F_DUPFD_CLOEXEC: c_int = 37; +pub const F_DUPFD_CLOFORK: c_int = 58; +pub const F_DUP2FD_CLOEXEC: c_int = 36; +pub const F_DUP2FD_CLOFORK: c_int = 57; +pub const F_DUP3FD: c_int = 59; -pub const FD_CLOFORK: ::c_int = 2; +pub const FD_CLOFORK: c_int = 2; -pub const FIL_ATTACH: ::c_int = 0x1; -pub const FIL_DETACH: ::c_int = 0x2; -pub const FIL_LIST: ::c_int = 0x3; -pub const FILNAME_MAX: ::c_int = 32; -pub const FILF_PROG: ::c_int = 0x1; -pub const FILF_AUTO: ::c_int = 0x2; -pub const FILF_BYPASS: ::c_int = 0x4; -pub const SOL_FILTER: ::c_int = 0xfffc; +pub const FIL_ATTACH: c_int = 0x1; +pub const FIL_DETACH: c_int = 0x2; +pub const FIL_LIST: c_int = 0x3; +pub const FILNAME_MAX: c_int = 32; +pub const FILF_PROG: c_int = 0x1; +pub const FILF_AUTO: c_int = 0x2; +pub const FILF_BYPASS: c_int = 0x4; +pub const SOL_FILTER: c_int = 0xfffc; -pub const MADV_PURGE: ::c_int = 9; +pub const MADV_PURGE: c_int = 9; -pub const POSIX_FADV_NORMAL: ::c_int = 0; -pub const POSIX_FADV_RANDOM: ::c_int = 1; -pub const POSIX_FADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_FADV_WILLNEED: ::c_int = 3; -pub const POSIX_FADV_DONTNEED: ::c_int = 4; -pub const POSIX_FADV_NOREUSE: ::c_int = 5; +pub const POSIX_FADV_NORMAL: c_int = 0; +pub const POSIX_FADV_RANDOM: c_int = 1; +pub const POSIX_FADV_SEQUENTIAL: c_int = 2; +pub const POSIX_FADV_WILLNEED: c_int = 3; +pub const POSIX_FADV_DONTNEED: c_int = 4; +pub const POSIX_FADV_NOREUSE: c_int = 5; -pub const SIGINFO: ::c_int = 41; +pub const SIGINFO: c_int = 41; -pub const O_DIRECT: ::c_int = 0x2000000; -pub const O_CLOFORK: ::c_int = 0x4000000; +pub const O_DIRECT: c_int = 0x2000000; +pub const O_CLOFORK: c_int = 0x4000000; -pub const MSG_CMSG_CLOEXEC: ::c_int = 0x1000; -pub const MSG_CMSG_CLOFORK: ::c_int = 0x2000; +pub const MSG_CMSG_CLOEXEC: c_int = 0x1000; +pub const MSG_CMSG_CLOFORK: c_int = 0x2000; -pub const PBIND_HARD: ::processorid_t = -3; -pub const PBIND_SOFT: ::processorid_t = -4; +pub const PBIND_HARD: crate::processorid_t = -3; +pub const PBIND_SOFT: crate::processorid_t = -4; -pub const PS_SYSTEM: ::c_int = 1; +pub const PS_SYSTEM: c_int = 1; -pub const MAP_FILE: ::c_int = 0; +pub const MAP_FILE: c_int = 0; -pub const MAP_32BIT: ::c_int = 0x80; +pub const MAP_32BIT: c_int = 0x80; -pub const AF_NCA: ::c_int = 28; +pub const AF_NCA: c_int = 28; -pub const PF_NCA: ::c_int = AF_NCA; +pub const PF_NCA: c_int = AF_NCA; -pub const LOCK_SH: ::c_int = 1; -pub const LOCK_EX: ::c_int = 2; -pub const LOCK_NB: ::c_int = 4; -pub const LOCK_UN: ::c_int = 8; +pub const LOCK_SH: c_int = 1; +pub const LOCK_EX: c_int = 2; +pub const LOCK_NB: c_int = 4; +pub const LOCK_UN: c_int = 8; -pub const _PC_LAST: ::c_int = 101; +pub const _PC_LAST: c_int = 101; pub const VSTATUS: usize = 16; pub const VERASE2: usize = 17; -pub const EPOLLIN: ::c_int = 0x1; -pub const EPOLLPRI: ::c_int = 0x2; -pub const EPOLLOUT: ::c_int = 0x4; -pub const EPOLLRDNORM: ::c_int = 0x40; -pub const EPOLLRDBAND: ::c_int = 0x80; -pub const EPOLLWRNORM: ::c_int = 0x100; -pub const EPOLLWRBAND: ::c_int = 0x200; -pub const EPOLLMSG: ::c_int = 0x400; -pub const EPOLLERR: ::c_int = 0x8; -pub const EPOLLHUP: ::c_int = 0x10; -pub const EPOLLET: ::c_int = 0x80000000; -pub const EPOLLRDHUP: ::c_int = 0x2000; -pub const EPOLLONESHOT: ::c_int = 0x40000000; -pub const EPOLLWAKEUP: ::c_int = 0x20000000; -pub const EPOLLEXCLUSIVE: ::c_int = 0x10000000; -pub const EPOLL_CLOEXEC: ::c_int = 0x80000; -pub const EPOLL_CTL_ADD: ::c_int = 1; -pub const EPOLL_CTL_MOD: ::c_int = 3; -pub const EPOLL_CTL_DEL: ::c_int = 2; - -pub const PRIV_USER: ::c_uint = PRIV_DEBUG +pub const EPOLLIN: c_int = 0x1; +pub const EPOLLPRI: c_int = 0x2; +pub const EPOLLOUT: c_int = 0x4; +pub const EPOLLRDNORM: c_int = 0x40; +pub const EPOLLRDBAND: c_int = 0x80; +pub const EPOLLWRNORM: c_int = 0x100; +pub const EPOLLWRBAND: c_int = 0x200; +pub const EPOLLMSG: c_int = 0x400; +pub const EPOLLERR: c_int = 0x8; +pub const EPOLLHUP: c_int = 0x10; +pub const EPOLLET: c_int = 0x80000000; +pub const EPOLLRDHUP: c_int = 0x2000; +pub const EPOLLONESHOT: c_int = 0x40000000; +pub const EPOLLWAKEUP: c_int = 0x20000000; +pub const EPOLLEXCLUSIVE: c_int = 0x10000000; +pub const EPOLL_CLOEXEC: c_int = 0x80000; +pub const EPOLL_CTL_ADD: c_int = 1; +pub const EPOLL_CTL_MOD: c_int = 3; +pub const EPOLL_CTL_DEL: c_int = 2; + +pub const PRIV_USER: c_uint = PRIV_DEBUG | NET_MAC_AWARE | NET_MAC_AWARE_INHERIT | PRIV_XPOLICY | PRIV_AWARE_RESET | PRIV_PFEXEC; -pub const LGRP_RSRC_COUNT: ::lgrp_rsrc_t = 2; -pub const LGRP_RSRC_CPU: ::lgrp_rsrc_t = 0; -pub const LGRP_RSRC_MEM: ::lgrp_rsrc_t = 1; +pub const LGRP_RSRC_COUNT: crate::lgrp_rsrc_t = 2; +pub const LGRP_RSRC_CPU: crate::lgrp_rsrc_t = 0; +pub const LGRP_RSRC_MEM: crate::lgrp_rsrc_t = 1; -pub const P_DISABLED: ::c_int = 0x008; +pub const P_DISABLED: c_int = 0x008; -pub const AT_SUN_HWCAP2: ::c_uint = 2023; -pub const AT_SUN_FPTYPE: ::c_uint = 2027; +pub const AT_SUN_HWCAP2: c_uint = 2023; +pub const AT_SUN_FPTYPE: c_uint = 2027; -pub const B1000000: ::speed_t = 24; -pub const B1152000: ::speed_t = 25; -pub const B1500000: ::speed_t = 26; -pub const B2000000: ::speed_t = 27; -pub const B2500000: ::speed_t = 28; -pub const B3000000: ::speed_t = 29; -pub const B3500000: ::speed_t = 30; -pub const B4000000: ::speed_t = 31; +pub const B1000000: crate::speed_t = 24; +pub const B1152000: crate::speed_t = 25; +pub const B1500000: crate::speed_t = 26; +pub const B2000000: crate::speed_t = 27; +pub const B2500000: crate::speed_t = 28; +pub const B3000000: crate::speed_t = 29; +pub const B3500000: crate::speed_t = 30; +pub const B4000000: crate::speed_t = 31; // sys/systeminfo.h -pub const SI_ADDRESS_WIDTH: ::c_int = 520; +pub const SI_ADDRESS_WIDTH: c_int = 520; extern "C" { - pub fn eventfd(init: ::c_uint, flags: ::c_int) -> ::c_int; + pub fn eventfd(init: c_uint, flags: c_int) -> c_int; pub fn epoll_pwait( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - sigmask: *const ::sigset_t, - ) -> ::c_int; - pub fn epoll_create(size: ::c_int) -> ::c_int; - pub fn epoll_create1(flags: ::c_int) -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: c_int, + sigmask: *const crate::sigset_t, + ) -> c_int; + pub fn epoll_create(size: c_int) -> c_int; + pub fn epoll_create1(flags: c_int) -> c_int; pub fn epoll_wait( - epfd: ::c_int, - events: *mut ::epoll_event, - maxevents: ::c_int, - timeout: ::c_int, - ) -> ::c_int; - pub fn epoll_ctl(epfd: ::c_int, op: ::c_int, fd: ::c_int, event: *mut ::epoll_event) - -> ::c_int; + epfd: c_int, + events: *mut crate::epoll_event, + maxevents: c_int, + timeout: c_int, + ) -> c_int; + pub fn epoll_ctl(epfd: c_int, op: c_int, fd: c_int, event: *mut crate::epoll_event) -> c_int; - pub fn mincore(addr: ::caddr_t, len: ::size_t, vec: *mut ::c_char) -> ::c_int; + pub fn mincore(addr: crate::caddr_t, len: size_t, vec: *mut c_char) -> c_int; pub fn pset_bind_lwp( - pset: ::psetid_t, - id: ::id_t, - pid: ::pid_t, - opset: *mut ::psetid_t, - ) -> ::c_int; - pub fn pset_getloadavg(pset: ::psetid_t, load: *mut ::c_double, num: ::c_int) -> ::c_int; - - pub fn pthread_attr_get_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + pset: crate::psetid_t, + id: crate::id_t, + pid: crate::pid_t, + opset: *mut crate::psetid_t, + ) -> c_int; + pub fn pset_getloadavg(pset: crate::psetid_t, load: *mut c_double, num: c_int) -> c_int; + + pub fn pthread_attr_get_np(thread: crate::pthread_t, attr: *mut crate::pthread_attr_t) + -> c_int; pub fn pthread_attr_getstackaddr( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + ) -> c_int; pub fn pthread_attr_setstack( - attr: *mut ::pthread_attr_t, - stackaddr: *mut ::c_void, - stacksize: ::size_t, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + stackaddr: *mut c_void, + stacksize: size_t, + ) -> c_int; pub fn pthread_attr_setstackaddr( - attr: *mut ::pthread_attr_t, - stackaddr: *mut ::c_void, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + stackaddr: *mut c_void, + ) -> c_int; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advice: ::c_int) -> ::c_int; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; - pub fn getpagesizes2(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advice: c_int) -> c_int; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn getpagesizes2(pagesize: *mut size_t, nelem: c_int) -> c_int; - pub fn ptsname_r(fildes: ::c_int, name: *mut ::c_char, namelen: ::size_t) -> ::c_int; + pub fn ptsname_r(fildes: c_int, name: *mut c_char, namelen: size_t) -> c_int; - pub fn syncfs(fd: ::c_int) -> ::c_int; + pub fn syncfs(fd: c_int) -> c_int; - pub fn strcasecmp_l(s1: *const ::c_char, s2: *const ::c_char, loc: ::locale_t) -> ::c_int; + pub fn strcasecmp_l(s1: *const c_char, s2: *const c_char, loc: crate::locale_t) -> c_int; pub fn strncasecmp_l( - s1: *const ::c_char, - s2: *const ::c_char, - n: ::size_t, - loc: ::locale_t, - ) -> ::c_int; + s1: *const c_char, + s2: *const c_char, + n: size_t, + loc: crate::locale_t, + ) -> c_int; } diff --git a/src/unix/solarish/mod.rs b/src/unix/solarish/mod.rs index 293ecc0b11aa9..77d0add2042bc 100644 --- a/src/unix/solarish/mod.rs +++ b/src/unix/solarish/mod.rs @@ -1,64 +1,68 @@ use core::mem::size_of; +use crate::{ + c_double, c_int, c_longlong, c_short, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t, +}; + pub type c_char = i8; pub type c_long = i64; pub type c_ulong = u64; -pub type caddr_t = *mut ::c_char; - -pub type clockid_t = ::c_int; -pub type blkcnt_t = ::c_long; -pub type clock_t = ::c_long; -pub type daddr_t = ::c_long; -pub type dev_t = ::c_ulong; -pub type fsblkcnt_t = ::c_ulong; -pub type fsfilcnt_t = ::c_ulong; -pub type ino_t = ::c_ulong; -pub type key_t = ::c_int; -pub type major_t = ::c_uint; -pub type minor_t = ::c_uint; -pub type mode_t = ::c_uint; -pub type nlink_t = ::c_uint; -pub type rlim_t = ::c_ulong; -pub type speed_t = ::c_uint; -pub type tcflag_t = ::c_uint; -pub type time_t = ::c_long; -pub type timer_t = ::c_int; -pub type wchar_t = ::c_int; -pub type nfds_t = ::c_ulong; -pub type projid_t = ::c_int; -pub type zoneid_t = ::c_int; -pub type psetid_t = ::c_int; -pub type processorid_t = ::c_int; -pub type chipid_t = ::c_int; -pub type ctid_t = ::id_t; - -pub type suseconds_t = ::c_long; -pub type off_t = ::c_long; -pub type useconds_t = ::c_uint; -pub type socklen_t = ::c_uint; +pub type caddr_t = *mut c_char; + +pub type clockid_t = c_int; +pub type blkcnt_t = c_long; +pub type clock_t = c_long; +pub type daddr_t = c_long; +pub type dev_t = c_ulong; +pub type fsblkcnt_t = c_ulong; +pub type fsfilcnt_t = c_ulong; +pub type ino_t = c_ulong; +pub type key_t = c_int; +pub type major_t = c_uint; +pub type minor_t = c_uint; +pub type mode_t = c_uint; +pub type nlink_t = c_uint; +pub type rlim_t = c_ulong; +pub type speed_t = c_uint; +pub type tcflag_t = c_uint; +pub type time_t = c_long; +pub type timer_t = c_int; +pub type wchar_t = c_int; +pub type nfds_t = c_ulong; +pub type projid_t = c_int; +pub type zoneid_t = c_int; +pub type psetid_t = c_int; +pub type processorid_t = c_int; +pub type chipid_t = c_int; +pub type ctid_t = crate::id_t; + +pub type suseconds_t = c_long; +pub type off_t = c_long; +pub type useconds_t = c_uint; +pub type socklen_t = c_uint; pub type sa_family_t = u16; -pub type pthread_t = ::c_uint; -pub type pthread_key_t = ::c_uint; -pub type thread_t = ::c_uint; -pub type blksize_t = ::c_int; -pub type nl_item = ::c_int; -pub type mqd_t = *mut ::c_void; -pub type id_t = ::c_int; -pub type idtype_t = ::c_uint; -pub type shmatt_t = ::c_ulong; - -pub type lgrp_id_t = ::id_t; -pub type lgrp_mem_size_t = ::c_longlong; -pub type lgrp_cookie_t = ::uintptr_t; -pub type lgrp_content_t = ::c_uint; -pub type lgrp_lat_between_t = ::c_uint; -pub type lgrp_mem_size_flag_t = ::c_uint; -pub type lgrp_view_t = ::c_uint; +pub type pthread_t = c_uint; +pub type pthread_key_t = c_uint; +pub type thread_t = c_uint; +pub type blksize_t = c_int; +pub type nl_item = c_int; +pub type mqd_t = *mut c_void; +pub type id_t = c_int; +pub type idtype_t = c_uint; +pub type shmatt_t = c_ulong; + +pub type lgrp_id_t = crate::id_t; +pub type lgrp_mem_size_t = c_longlong; +pub type lgrp_cookie_t = crate::uintptr_t; +pub type lgrp_content_t = c_uint; +pub type lgrp_lat_between_t = c_uint; +pub type lgrp_mem_size_flag_t = c_uint; +pub type lgrp_view_t = c_uint; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } @@ -66,8 +70,8 @@ impl ::Clone for timezone { #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum ucred_t {} -impl ::Copy for ucred_t {} -impl ::Clone for ucred_t { +impl Copy for ucred_t {} +impl Clone for ucred_t { fn clone(&self) -> ucred_t { *self } @@ -75,7 +79,7 @@ impl ::Clone for ucred_t { s! { pub struct in_addr { - pub s_addr: ::in_addr_t, + pub s_addr: crate::in_addr_t, } pub struct ip_mreq { @@ -90,104 +94,104 @@ s! { } pub struct ipc_perm { - pub uid: ::uid_t, - pub gid: ::gid_t, - pub cuid: ::uid_t, - pub cgid: ::gid_t, - pub mode: ::mode_t, - pub seq: ::c_uint, - pub key: ::key_t, + pub uid: crate::uid_t, + pub gid: crate::gid_t, + pub cuid: crate::uid_t, + pub cgid: crate::gid_t, + pub mode: crate::mode_t, + pub seq: c_uint, + pub key: crate::key_t, } pub struct sockaddr { pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct sockaddr_in { pub sin_family: sa_family_t, - pub sin_port: ::in_port_t, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_port: crate::in_port_t, + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } pub struct sockaddr_in6 { pub sin6_family: sa_family_t, - pub sin6_port: ::in_port_t, + pub sin6_port: crate::in_port_t, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, pub __sin6_src_id: u32, } pub struct in_pktinfo { - pub ipi_ifindex: ::c_uint, - pub ipi_spec_dst: ::in_addr, - pub ipi_addr: ::in_addr, + pub ipi_ifindex: c_uint, + pub ipi_spec_dst: crate::in_addr, + pub ipi_addr: crate::in_addr, } pub struct in6_pktinfo { - pub ipi6_addr: ::in6_addr, - pub ipi6_ifindex: ::c_uint, + pub ipi6_addr: crate::in6_addr, + pub ipi6_ifindex: c_uint, } pub struct passwd { - pub pw_name: *mut ::c_char, - pub pw_passwd: *mut ::c_char, - pub pw_uid: ::uid_t, - pub pw_gid: ::gid_t, - pub pw_age: *mut ::c_char, - pub pw_comment: *mut ::c_char, - pub pw_gecos: *mut ::c_char, - pub pw_dir: *mut ::c_char, - pub pw_shell: *mut ::c_char, + pub pw_name: *mut c_char, + pub pw_passwd: *mut c_char, + pub pw_uid: crate::uid_t, + pub pw_gid: crate::gid_t, + pub pw_age: *mut c_char, + pub pw_comment: *mut c_char, + pub pw_gecos: *mut c_char, + pub pw_dir: *mut c_char, + pub pw_shell: *mut c_char, } pub struct ifaddrs { pub ifa_next: *mut ifaddrs, - pub ifa_name: *mut ::c_char, + pub ifa_name: *mut c_char, pub ifa_flags: u64, - pub ifa_addr: *mut ::sockaddr, - pub ifa_netmask: *mut ::sockaddr, - pub ifa_dstaddr: *mut ::sockaddr, - pub ifa_data: *mut ::c_void, + pub ifa_addr: *mut crate::sockaddr, + pub ifa_netmask: *mut crate::sockaddr, + pub ifa_dstaddr: *mut crate::sockaddr, + pub ifa_data: *mut c_void, } pub struct itimerspec { - pub it_interval: ::timespec, - pub it_value: ::timespec, + pub it_interval: crate::timespec, + pub it_value: crate::timespec, } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, } pub struct msghdr { - pub msg_name: *mut ::c_void, - pub msg_namelen: ::socklen_t, - pub msg_iov: *mut ::iovec, - pub msg_iovlen: ::c_int, - pub msg_control: *mut ::c_void, - pub msg_controllen: ::socklen_t, - pub msg_flags: ::c_int, + pub msg_name: *mut c_void, + pub msg_namelen: crate::socklen_t, + pub msg_iov: *mut crate::iovec, + pub msg_iovlen: c_int, + pub msg_control: *mut c_void, + pub msg_controllen: crate::socklen_t, + pub msg_flags: c_int, } pub struct cmsghdr { - pub cmsg_len: ::socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_len: crate::socklen_t, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } pub struct pthread_attr_t { - __pthread_attrp: *mut ::c_void, + __pthread_attrp: *mut c_void, } pub struct pthread_mutex_t { @@ -201,7 +205,7 @@ s! { } pub struct pthread_mutexattr_t { - __pthread_mutexattrp: *mut ::c_void, + __pthread_mutexattrp: *mut c_void, } pub struct pthread_cond_t { @@ -212,63 +216,63 @@ s! { } pub struct pthread_condattr_t { - __pthread_condattrp: *mut ::c_void, + __pthread_condattrp: *mut c_void, } pub struct pthread_rwlock_t { __pthread_rwlock_readers: i32, __pthread_rwlock_type: u16, __pthread_rwlock_magic: u16, - __pthread_rwlock_mutex: ::pthread_mutex_t, - __pthread_rwlock_readercv: ::pthread_cond_t, - __pthread_rwlock_writercv: ::pthread_cond_t, + __pthread_rwlock_mutex: crate::pthread_mutex_t, + __pthread_rwlock_readercv: crate::pthread_cond_t, + __pthread_rwlock_writercv: crate::pthread_cond_t, } pub struct pthread_rwlockattr_t { - __pthread_rwlockattrp: *mut ::c_void, + __pthread_rwlockattrp: *mut c_void, } pub struct dirent { - pub d_ino: ::ino_t, - pub d_off: ::off_t, + pub d_ino: crate::ino_t, + pub d_off: off_t, pub d_reclen: u16, - pub d_name: [::c_char; 3], + pub d_name: [c_char; 3], } pub struct glob_t { - pub gl_pathc: ::size_t, - pub gl_pathv: *mut *mut ::c_char, - pub gl_offs: ::size_t, - __unused1: *mut ::c_void, - __unused2: ::c_int, + pub gl_pathc: size_t, + pub gl_pathv: *mut *mut c_char, + pub gl_offs: size_t, + __unused1: *mut c_void, + __unused2: c_int, #[cfg(target_os = "illumos")] - __unused3: ::c_int, + __unused3: c_int, #[cfg(target_os = "illumos")] - __unused4: ::c_int, + __unused4: c_int, #[cfg(target_os = "illumos")] - __unused5: *mut ::c_void, + __unused5: *mut c_void, #[cfg(target_os = "illumos")] - __unused6: *mut ::c_void, + __unused6: *mut c_void, #[cfg(target_os = "illumos")] - __unused7: *mut ::c_void, + __unused7: *mut c_void, #[cfg(target_os = "illumos")] - __unused8: *mut ::c_void, + __unused8: *mut c_void, #[cfg(target_os = "illumos")] - __unused9: *mut ::c_void, + __unused9: *mut c_void, #[cfg(target_os = "illumos")] - __unused10: *mut ::c_void, + __unused10: *mut c_void, } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, #[cfg(target_arch = "sparc64")] - __sparcv9_pad: ::c_int, - pub ai_addrlen: ::socklen_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, + __sparcv9_pad: c_int, + pub ai_addrlen: crate::socklen_t, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, pub ai_next: *mut addrinfo, } @@ -277,105 +281,105 @@ s! { } pub struct sigaction { - pub sa_flags: ::c_int, - pub sa_sigaction: ::sighandler_t, + pub sa_flags: c_int, + pub sa_sigaction: crate::sighandler_t, pub sa_mask: sigset_t, } pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } pub struct statvfs { - pub f_bsize: ::c_ulong, - pub f_frsize: ::c_ulong, - pub f_blocks: ::fsblkcnt_t, - pub f_bfree: ::fsblkcnt_t, - pub f_bavail: ::fsblkcnt_t, - pub f_files: ::fsfilcnt_t, - pub f_ffree: ::fsfilcnt_t, - pub f_favail: ::fsfilcnt_t, - pub f_fsid: ::c_ulong, - pub f_basetype: [::c_char; 16], - pub f_flag: ::c_ulong, - pub f_namemax: ::c_ulong, - pub f_fstr: [::c_char; 32], + pub f_bsize: c_ulong, + pub f_frsize: c_ulong, + pub f_blocks: crate::fsblkcnt_t, + pub f_bfree: crate::fsblkcnt_t, + pub f_bavail: crate::fsblkcnt_t, + pub f_files: crate::fsfilcnt_t, + pub f_ffree: crate::fsfilcnt_t, + pub f_favail: crate::fsfilcnt_t, + pub f_fsid: c_ulong, + pub f_basetype: [c_char; 16], + pub f_flag: c_ulong, + pub f_namemax: c_ulong, + pub f_fstr: [c_char; 32], } pub struct sendfilevec_t { - pub sfv_fd: ::c_int, - pub sfv_flag: ::c_uint, - pub sfv_off: ::off_t, - pub sfv_len: ::size_t, + pub sfv_fd: c_int, + pub sfv_flag: c_uint, + pub sfv_off: off_t, + pub sfv_len: size_t, } pub struct sched_param { - pub sched_priority: ::c_int, - sched_pad: [::c_int; 8], + pub sched_priority: c_int, + sched_pad: [c_int; 8], } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_atime_nsec: ::c_long, - pub st_mtime: ::time_t, - pub st_mtime_nsec: ::c_long, - pub st_ctime: ::time_t, - pub st_ctime_nsec: ::c_long, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - __unused: [::c_char; 16], + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_atime_nsec: c_long, + pub st_mtime: crate::time_t, + pub st_mtime_nsec: c_long, + pub st_ctime: crate::time_t, + pub st_ctime_nsec: c_long, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + __unused: [c_char; 16], } pub struct termios { - pub c_iflag: ::tcflag_t, - pub c_oflag: ::tcflag_t, - pub c_cflag: ::tcflag_t, - pub c_lflag: ::tcflag_t, - pub c_cc: [::cc_t; ::NCCS], + pub c_iflag: crate::tcflag_t, + pub c_oflag: crate::tcflag_t, + pub c_cflag: crate::tcflag_t, + pub c_lflag: crate::tcflag_t, + pub c_cc: [crate::cc_t; crate::NCCS], } pub struct lconv { - pub decimal_point: *mut ::c_char, - pub thousands_sep: *mut ::c_char, - pub grouping: *mut ::c_char, - pub int_curr_symbol: *mut ::c_char, - pub currency_symbol: *mut ::c_char, - pub mon_decimal_point: *mut ::c_char, - pub mon_thousands_sep: *mut ::c_char, - pub mon_grouping: *mut ::c_char, - pub positive_sign: *mut ::c_char, - pub negative_sign: *mut ::c_char, - pub int_frac_digits: ::c_char, - pub frac_digits: ::c_char, - pub p_cs_precedes: ::c_char, - pub p_sep_by_space: ::c_char, - pub n_cs_precedes: ::c_char, - pub n_sep_by_space: ::c_char, - pub p_sign_posn: ::c_char, - pub n_sign_posn: ::c_char, - pub int_p_cs_precedes: ::c_char, - pub int_p_sep_by_space: ::c_char, - pub int_n_cs_precedes: ::c_char, - pub int_n_sep_by_space: ::c_char, - pub int_p_sign_posn: ::c_char, - pub int_n_sign_posn: ::c_char, + pub decimal_point: *mut c_char, + pub thousands_sep: *mut c_char, + pub grouping: *mut c_char, + pub int_curr_symbol: *mut c_char, + pub currency_symbol: *mut c_char, + pub mon_decimal_point: *mut c_char, + pub mon_thousands_sep: *mut c_char, + pub mon_grouping: *mut c_char, + pub positive_sign: *mut c_char, + pub negative_sign: *mut c_char, + pub int_frac_digits: c_char, + pub frac_digits: c_char, + pub p_cs_precedes: c_char, + pub p_sep_by_space: c_char, + pub n_cs_precedes: c_char, + pub n_sep_by_space: c_char, + pub p_sign_posn: c_char, + pub n_sign_posn: c_char, + pub int_p_cs_precedes: c_char, + pub int_p_sep_by_space: c_char, + pub int_n_cs_precedes: c_char, + pub int_n_sep_by_space: c_char, + pub int_p_sign_posn: c_char, + pub int_n_sign_posn: c_char, } pub struct sem_t { @@ -387,59 +391,59 @@ s! { } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::off_t, - pub l_len: ::off_t, - pub l_sysid: ::c_int, - pub l_pid: ::pid_t, - pub l_pad: [::c_long; 4], + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: off_t, + pub l_len: off_t, + pub l_sysid: c_int, + pub l_pid: crate::pid_t, + pub l_pad: [c_long; 4], } pub struct if_nameindex { - pub if_index: ::c_uint, - pub if_name: *mut ::c_char, + pub if_index: c_uint, + pub if_name: *mut c_char, } pub struct mq_attr { - pub mq_flags: ::c_long, - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_curmsgs: ::c_long, - _pad: [::c_int; 12], + pub mq_flags: c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_curmsgs: c_long, + _pad: [c_int; 12], } pub struct port_event { - pub portev_events: ::c_int, - pub portev_source: ::c_ushort, - pub portev_pad: ::c_ushort, - pub portev_object: ::uintptr_t, - pub portev_user: *mut ::c_void, + pub portev_events: c_int, + pub portev_source: c_ushort, + pub portev_pad: c_ushort, + pub portev_object: crate::uintptr_t, + pub portev_user: *mut c_void, } pub struct port_notify { - pub portnfy_port: ::c_int, - pub portnfy_user: *mut ::c_void, + pub portnfy_port: c_int, + pub portnfy_user: *mut c_void, } pub struct aio_result_t { - pub aio_return: ::ssize_t, - pub aio_errno: ::c_int, + pub aio_return: ssize_t, + pub aio_errno: c_int, } pub struct exit_status { - e_termination: ::c_short, - e_exit: ::c_short, + e_termination: c_short, + e_exit: c_short, } pub struct utmp { - pub ut_user: [::c_char; 8], - pub ut_id: [::c_char; 4], - pub ut_line: [::c_char; 12], - pub ut_pid: ::c_short, - pub ut_type: ::c_short, + pub ut_user: [c_char; 8], + pub ut_id: [c_char; 4], + pub ut_line: [c_char; 12], + pub ut_pid: c_short, + pub ut_type: c_short, pub ut_exit: exit_status, - pub ut_time: ::time_t, + pub ut_time: crate::time_t, } pub struct timex { @@ -463,39 +467,39 @@ s! { } pub struct ntptimeval { - pub time: ::timeval, + pub time: crate::timeval, pub maxerror: i32, pub esterror: i32, } pub struct mmapobj_result_t { - pub mr_addr: ::caddr_t, - pub mr_msize: ::size_t, - pub mr_fsize: ::size_t, - pub mr_offset: ::size_t, - pub mr_prot: ::c_uint, - pub mr_flags: ::c_uint, + pub mr_addr: crate::caddr_t, + pub mr_msize: size_t, + pub mr_fsize: size_t, + pub mr_offset: size_t, + pub mr_prot: c_uint, + pub mr_flags: c_uint, } pub struct lgrp_affinity_args_t { - pub idtype: ::idtype_t, - pub id: ::id_t, - pub lgrp: ::lgrp_id_t, - pub aff: ::lgrp_affinity_t, + pub idtype: crate::idtype_t, + pub id: crate::id_t, + pub lgrp: crate::lgrp_id_t, + pub aff: crate::lgrp_affinity_t, } pub struct processor_info_t { - pub pi_state: ::c_int, - pub pi_processor_type: [::c_char; PI_TYPELEN as usize], - pub pi_fputypes: [::c_char; PI_FPUTYPE as usize], - pub pi_clock: ::c_int, + pub pi_state: c_int, + pub pi_processor_type: [c_char; PI_TYPELEN as usize], + pub pi_fputypes: [c_char; PI_FPUTYPE as usize], + pub pi_clock: c_int, } pub struct option { - pub name: *const ::c_char, - pub has_arg: ::c_int, - pub flag: *mut ::c_int, - pub val: ::c_int, + pub name: *const c_char, + pub has_arg: c_int, + pub flag: *mut c_int, + pub val: c_int, } } @@ -506,11 +510,11 @@ s_no_extra_traits! { } pub struct utsname { - pub sysname: [::c_char; 257], - pub nodename: [::c_char; 257], - pub release: [::c_char; 257], - pub version: [::c_char; 257], - pub machine: [::c_char; 257], + pub sysname: [c_char; 257], + pub nodename: [c_char; 257], + pub release: [c_char; 257], + pub version: [c_char; 257], + pub machine: [c_char; 257], } pub struct fd_set { @@ -521,7 +525,7 @@ s_no_extra_traits! { } pub struct sockaddr_storage { - pub ss_family: ::sa_family_t, + pub ss_family: crate::sa_family_t, __ss_pad1: [u8; 6], __ss_align: i64, __ss_pad2: [u8; 240], @@ -529,32 +533,32 @@ s_no_extra_traits! { #[cfg_attr(target_pointer_width = "64", repr(align(8)))] pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_errno: ::c_int, + pub si_signo: c_int, + pub si_code: c_int, + pub si_errno: c_int, #[cfg(target_pointer_width = "64")] - pub si_pad: ::c_int, + pub si_pad: c_int, - __data_pad: [::c_int; SIGINFO_DATA_SIZE], + __data_pad: [c_int; SIGINFO_DATA_SIZE], } pub struct sockaddr_dl { - pub sdl_family: ::c_ushort, - pub sdl_index: ::c_ushort, - pub sdl_type: ::c_uchar, - pub sdl_nlen: ::c_uchar, - pub sdl_alen: ::c_uchar, - pub sdl_slen: ::c_uchar, - pub sdl_data: [::c_char; 244], + pub sdl_family: c_ushort, + pub sdl_index: c_ushort, + pub sdl_type: c_uchar, + pub sdl_nlen: c_uchar, + pub sdl_alen: c_uchar, + pub sdl_slen: c_uchar, + pub sdl_data: [c_char; 244], } pub struct sigevent { - pub sigev_notify: ::c_int, - pub sigev_signo: ::c_int, - pub sigev_value: ::sigval, - pub ss_sp: *mut ::c_void, - pub sigev_notify_attributes: *const ::pthread_attr_t, - __sigev_pad2: ::c_int, + pub sigev_notify: c_int, + pub sigev_signo: c_int, + pub sigev_value: crate::sigval, + pub ss_sp: *mut c_void, + pub sigev_notify_attributes: *const crate::pthread_attr_t, + __sigev_pad2: c_int, } #[repr(align(16))] @@ -583,16 +587,16 @@ cfg_if! { } } impl Eq for sockaddr_un {} - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_family", &self.sun_family) // FIXME: .field("sun_path", &self.sun_path) .finish() } } - impl ::hash::Hash for sockaddr_un { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_un { + fn hash(&self, state: &mut H) { self.sun_family.hash(state); self.sun_path.hash(state); } @@ -627,8 +631,8 @@ cfg_if! { } } impl Eq for utsname {} - impl ::fmt::Debug for utsname { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utsname { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utsname") // FIXME: .field("sysname", &self.sysname) // FIXME: .field("nodename", &self.nodename) @@ -638,8 +642,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for utsname { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utsname { + fn hash(&self, state: &mut H) { self.sysname.hash(state); self.nodename.hash(state); self.release.hash(state); @@ -657,15 +661,15 @@ cfg_if! { } } impl Eq for fd_set {} - impl ::fmt::Debug for fd_set { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fd_set { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fd_set") // FIXME: .field("fds_bits", &self.fds_bits) .finish() } } - impl ::hash::Hash for fd_set { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for fd_set { + fn hash(&self, state: &mut H) { self.fds_bits.hash(state); } } @@ -683,8 +687,8 @@ cfg_if! { } } impl Eq for sockaddr_storage {} - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_family", &self.ss_family) .field("__ss_pad1", &self.__ss_pad1) @@ -693,8 +697,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_storage { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_storage { + fn hash(&self, state: &mut H) { self.ss_family.hash(state); self.__ss_pad1.hash(state); self.__ss_align.hash(state); @@ -711,23 +715,23 @@ cfg_if! { /// entire data pad area is "valid" for otherwise unrecognized signal numbers. fn data_field_count(&self) -> usize { match self.si_signo { - ::SIGSEGV | ::SIGBUS | ::SIGILL | ::SIGTRAP | ::SIGFPE => { - size_of::() / size_of::<::c_int>() + SIGSEGV | SIGBUS | SIGILL | SIGTRAP | SIGFPE => { + size_of::() / size_of::() } - ::SIGCLD => size_of::() / size_of::<::c_int>(), - ::SIGHUP - | ::SIGINT - | ::SIGQUIT - | ::SIGABRT - | ::SIGSYS - | ::SIGPIPE - | ::SIGALRM - | ::SIGTERM - | ::SIGUSR1 - | ::SIGUSR2 - | ::SIGPWR - | ::SIGWINCH - | ::SIGURG => size_of::() / size_of::<::c_int>(), + SIGCLD => size_of::() / size_of::(), + SIGHUP + | SIGINT + | SIGQUIT + | SIGABRT + | SIGSYS + | SIGPIPE + | SIGALRM + | SIGTERM + | crate::SIGUSR1 + | crate::SIGUSR2 + | SIGPWR + | SIGWINCH + | SIGURG => size_of::() / size_of::(), _ => SIGINFO_DATA_SIZE, } } @@ -752,8 +756,8 @@ cfg_if! { } } impl Eq for siginfo_t {} - impl ::fmt::Debug for siginfo_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for siginfo_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("siginfo_t") .field("si_signo", &self.si_signo) .field("si_code", &self.si_code) @@ -762,8 +766,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for siginfo_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for siginfo_t { + fn hash(&self, state: &mut H) { self.si_signo.hash(state); self.si_code.hash(state); self.si_errno.hash(state); @@ -792,8 +796,8 @@ cfg_if! { } } impl Eq for sockaddr_dl {} - impl ::fmt::Debug for sockaddr_dl { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_dl { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_dl") .field("sdl_family", &self.sdl_family) .field("sdl_index", &self.sdl_index) @@ -805,8 +809,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sockaddr_dl { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sockaddr_dl { + fn hash(&self, state: &mut H) { self.sdl_family.hash(state); self.sdl_index.hash(state); self.sdl_type.hash(state); @@ -827,8 +831,8 @@ cfg_if! { } } impl Eq for sigevent {} - impl ::fmt::Debug for sigevent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigevent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigevent") .field("sigev_notify", &self.sigev_notify) .field("sigev_signo", &self.sigev_signo) @@ -838,8 +842,8 @@ cfg_if! { .finish() } } - impl ::hash::Hash for sigevent { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigevent { + fn hash(&self, state: &mut H) { self.sigev_notify.hash(state); self.sigev_signo.hash(state); self.sigev_value.hash(state); @@ -857,8 +861,8 @@ cfg_if! { } } impl Eq for pad128_t {} - impl ::fmt::Debug for pad128_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for pad128_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("pad128_t") // FIXME: .field("_q", &{self._q}) @@ -867,8 +871,8 @@ cfg_if! { } } } - impl ::hash::Hash for pad128_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for pad128_t { + fn hash(&self, state: &mut H) { unsafe { // FIXME: state.write_i64(self._q as i64); self._l.hash(state); @@ -884,8 +888,8 @@ cfg_if! { } } impl Eq for upad128_t {} - impl ::fmt::Debug for upad128_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for upad128_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("upad128_t") // FIXME: .field("_q", &{self._q}) @@ -894,8 +898,8 @@ cfg_if! { } } } - impl ::hash::Hash for upad128_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for upad128_t { + fn hash(&self, state: &mut H) { unsafe { // FIXME: state.write_i64(self._q as i64); self._l.hash(state); @@ -915,12 +919,12 @@ cfg_if! { #[repr(C)] struct siginfo_fault { - addr: *mut ::c_void, - trapno: ::c_int, - pc: *mut ::caddr_t, + addr: *mut c_void, + trapno: c_int, + pc: *mut crate::caddr_t, } -impl ::Copy for siginfo_fault {} -impl ::Clone for siginfo_fault { +impl Copy for siginfo_fault {} +impl Clone for siginfo_fault { fn clone(&self) -> Self { *self } @@ -928,12 +932,12 @@ impl ::Clone for siginfo_fault { #[repr(C)] struct siginfo_cldval { - utime: ::clock_t, - status: ::c_int, - stime: ::clock_t, + utime: crate::clock_t, + status: c_int, + stime: crate::clock_t, } -impl ::Copy for siginfo_cldval {} -impl ::Clone for siginfo_cldval { +impl Copy for siginfo_cldval {} +impl Clone for siginfo_cldval { fn clone(&self) -> Self { *self } @@ -941,13 +945,13 @@ impl ::Clone for siginfo_cldval { #[repr(C)] struct siginfo_killval { - uid: ::uid_t, - value: ::sigval, + uid: crate::uid_t, + value: crate::sigval, // Pad out to match the SIGCLD value size - _pad: *mut ::c_void, + _pad: *mut c_void, } -impl ::Copy for siginfo_killval {} -impl ::Clone for siginfo_killval { +impl Copy for siginfo_killval {} +impl Clone for siginfo_killval { fn clone(&self) -> Self { *self } @@ -955,13 +959,13 @@ impl ::Clone for siginfo_killval { #[repr(C)] struct siginfo_sigcld { - pid: ::pid_t, + pid: crate::pid_t, val: siginfo_cldval, - ctid: ::ctid_t, - zoneid: ::zoneid_t, + ctid: crate::ctid_t, + zoneid: crate::zoneid_t, } -impl ::Copy for siginfo_sigcld {} -impl ::Clone for siginfo_sigcld { +impl Copy for siginfo_sigcld {} +impl Clone for siginfo_sigcld { fn clone(&self) -> Self { *self } @@ -969,258 +973,258 @@ impl ::Clone for siginfo_sigcld { #[repr(C)] struct siginfo_kill { - pid: ::pid_t, + pid: crate::pid_t, val: siginfo_killval, - ctid: ::ctid_t, - zoneid: ::zoneid_t, + ctid: crate::ctid_t, + zoneid: crate::zoneid_t, } -impl ::Copy for siginfo_kill {} -impl ::Clone for siginfo_kill { +impl Copy for siginfo_kill {} +impl Clone for siginfo_kill { fn clone(&self) -> Self { *self } } impl siginfo_t { - unsafe fn sidata(&self) -> T { - *((&self.__data_pad) as *const ::c_int as *const T) + unsafe fn sidata(&self) -> T { + *((&self.__data_pad) as *const c_int as *const T) } - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { let sifault: siginfo_fault = self.sidata(); sifault.addr } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { let kill: siginfo_kill = self.sidata(); kill.val.uid } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { let kill: siginfo_kill = self.sidata(); kill.val.value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { let sigcld: siginfo_sigcld = self.sidata(); sigcld.pid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { let sigcld: siginfo_sigcld = self.sidata(); sigcld.val.status } - pub unsafe fn si_utime(&self) -> ::c_long { + pub unsafe fn si_utime(&self) -> c_long { let sigcld: siginfo_sigcld = self.sidata(); sigcld.val.utime } - pub unsafe fn si_stime(&self) -> ::c_long { + pub unsafe fn si_stime(&self) -> c_long { let sigcld: siginfo_sigcld = self.sidata(); sigcld.val.stime } } -pub const LC_CTYPE: ::c_int = 0; -pub const LC_NUMERIC: ::c_int = 1; -pub const LC_TIME: ::c_int = 2; -pub const LC_COLLATE: ::c_int = 3; -pub const LC_MONETARY: ::c_int = 4; -pub const LC_MESSAGES: ::c_int = 5; -pub const LC_ALL: ::c_int = 6; -pub const LC_CTYPE_MASK: ::c_int = 1 << LC_CTYPE; -pub const LC_NUMERIC_MASK: ::c_int = 1 << LC_NUMERIC; -pub const LC_TIME_MASK: ::c_int = 1 << LC_TIME; -pub const LC_COLLATE_MASK: ::c_int = 1 << LC_COLLATE; -pub const LC_MONETARY_MASK: ::c_int = 1 << LC_MONETARY; -pub const LC_MESSAGES_MASK: ::c_int = 1 << LC_MESSAGES; -pub const LC_ALL_MASK: ::c_int = LC_CTYPE_MASK +pub const LC_CTYPE: c_int = 0; +pub const LC_NUMERIC: c_int = 1; +pub const LC_TIME: c_int = 2; +pub const LC_COLLATE: c_int = 3; +pub const LC_MONETARY: c_int = 4; +pub const LC_MESSAGES: c_int = 5; +pub const LC_ALL: c_int = 6; +pub const LC_CTYPE_MASK: c_int = 1 << LC_CTYPE; +pub const LC_NUMERIC_MASK: c_int = 1 << LC_NUMERIC; +pub const LC_TIME_MASK: c_int = 1 << LC_TIME; +pub const LC_COLLATE_MASK: c_int = 1 << LC_COLLATE; +pub const LC_MONETARY_MASK: c_int = 1 << LC_MONETARY; +pub const LC_MESSAGES_MASK: c_int = 1 << LC_MESSAGES; +pub const LC_ALL_MASK: c_int = LC_CTYPE_MASK | LC_NUMERIC_MASK | LC_TIME_MASK | LC_COLLATE_MASK | LC_MONETARY_MASK | LC_MESSAGES_MASK; -pub const DAY_1: ::nl_item = 1; -pub const DAY_2: ::nl_item = 2; -pub const DAY_3: ::nl_item = 3; -pub const DAY_4: ::nl_item = 4; -pub const DAY_5: ::nl_item = 5; -pub const DAY_6: ::nl_item = 6; -pub const DAY_7: ::nl_item = 7; - -pub const ABDAY_1: ::nl_item = 8; -pub const ABDAY_2: ::nl_item = 9; -pub const ABDAY_3: ::nl_item = 10; -pub const ABDAY_4: ::nl_item = 11; -pub const ABDAY_5: ::nl_item = 12; -pub const ABDAY_6: ::nl_item = 13; -pub const ABDAY_7: ::nl_item = 14; - -pub const MON_1: ::nl_item = 15; -pub const MON_2: ::nl_item = 16; -pub const MON_3: ::nl_item = 17; -pub const MON_4: ::nl_item = 18; -pub const MON_5: ::nl_item = 19; -pub const MON_6: ::nl_item = 20; -pub const MON_7: ::nl_item = 21; -pub const MON_8: ::nl_item = 22; -pub const MON_9: ::nl_item = 23; -pub const MON_10: ::nl_item = 24; -pub const MON_11: ::nl_item = 25; -pub const MON_12: ::nl_item = 26; - -pub const ABMON_1: ::nl_item = 27; -pub const ABMON_2: ::nl_item = 28; -pub const ABMON_3: ::nl_item = 29; -pub const ABMON_4: ::nl_item = 30; -pub const ABMON_5: ::nl_item = 31; -pub const ABMON_6: ::nl_item = 32; -pub const ABMON_7: ::nl_item = 33; -pub const ABMON_8: ::nl_item = 34; -pub const ABMON_9: ::nl_item = 35; -pub const ABMON_10: ::nl_item = 36; -pub const ABMON_11: ::nl_item = 37; -pub const ABMON_12: ::nl_item = 38; - -pub const RADIXCHAR: ::nl_item = 39; -pub const THOUSEP: ::nl_item = 40; -pub const YESSTR: ::nl_item = 41; -pub const NOSTR: ::nl_item = 42; -pub const CRNCYSTR: ::nl_item = 43; - -pub const D_T_FMT: ::nl_item = 44; -pub const D_FMT: ::nl_item = 45; -pub const T_FMT: ::nl_item = 46; -pub const AM_STR: ::nl_item = 47; -pub const PM_STR: ::nl_item = 48; - -pub const CODESET: ::nl_item = 49; -pub const T_FMT_AMPM: ::nl_item = 50; -pub const ERA: ::nl_item = 51; -pub const ERA_D_FMT: ::nl_item = 52; -pub const ERA_D_T_FMT: ::nl_item = 53; -pub const ERA_T_FMT: ::nl_item = 54; -pub const ALT_DIGITS: ::nl_item = 55; -pub const YESEXPR: ::nl_item = 56; -pub const NOEXPR: ::nl_item = 57; -pub const _DATE_FMT: ::nl_item = 58; -pub const MAXSTRMSG: ::nl_item = 58; - -pub const PATH_MAX: ::c_int = 1024; - -pub const SA_ONSTACK: ::c_int = 0x00000001; -pub const SA_RESETHAND: ::c_int = 0x00000002; -pub const SA_RESTART: ::c_int = 0x00000004; -pub const SA_SIGINFO: ::c_int = 0x00000008; -pub const SA_NODEFER: ::c_int = 0x00000010; -pub const SA_NOCLDWAIT: ::c_int = 0x00010000; -pub const SA_NOCLDSTOP: ::c_int = 0x00020000; - -pub const SS_ONSTACK: ::c_int = 1; -pub const SS_DISABLE: ::c_int = 2; - -pub const FIOCLEX: ::c_int = 0x20006601; -pub const FIONCLEX: ::c_int = 0x20006602; -pub const FIONREAD: ::c_int = 0x4004667f; -pub const FIONBIO: ::c_int = 0x8004667e; -pub const FIOASYNC: ::c_int = 0x8004667d; -pub const FIOSETOWN: ::c_int = 0x8004667c; -pub const FIOGETOWN: ::c_int = 0x4004667b; - -pub const SIGCHLD: ::c_int = 18; -pub const SIGCLD: ::c_int = ::SIGCHLD; -pub const SIGBUS: ::c_int = 10; -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; -pub const SIG_SETMASK: ::c_int = 3; - -pub const AIO_CANCELED: ::c_int = 0; -pub const AIO_ALLDONE: ::c_int = 1; -pub const AIO_NOTCANCELED: ::c_int = 2; -pub const LIO_NOP: ::c_int = 0; -pub const LIO_READ: ::c_int = 1; -pub const LIO_WRITE: ::c_int = 2; -pub const LIO_NOWAIT: ::c_int = 0; -pub const LIO_WAIT: ::c_int = 1; - -pub const SIGEV_NONE: ::c_int = 1; -pub const SIGEV_SIGNAL: ::c_int = 2; -pub const SIGEV_THREAD: ::c_int = 3; -pub const SIGEV_PORT: ::c_int = 4; - -pub const CLD_EXITED: ::c_int = 1; -pub const CLD_KILLED: ::c_int = 2; -pub const CLD_DUMPED: ::c_int = 3; -pub const CLD_TRAPPED: ::c_int = 4; -pub const CLD_STOPPED: ::c_int = 5; -pub const CLD_CONTINUED: ::c_int = 6; - -pub const IP_RECVDSTADDR: ::c_int = 0x7; -pub const IP_PKTINFO: ::c_int = 0x1a; -pub const IP_DONTFRAG: ::c_int = 0x1b; -pub const IP_SEC_OPT: ::c_int = 0x22; - -pub const IPV6_UNICAST_HOPS: ::c_int = 0x5; -pub const IPV6_MULTICAST_IF: ::c_int = 0x6; -pub const IPV6_MULTICAST_HOPS: ::c_int = 0x7; -pub const IPV6_MULTICAST_LOOP: ::c_int = 0x8; -pub const IPV6_PKTINFO: ::c_int = 0xb; -pub const IPV6_RECVPKTINFO: ::c_int = 0x12; -pub const IPV6_RECVTCLASS: ::c_int = 0x19; -pub const IPV6_DONTFRAG: ::c_int = 0x21; -pub const IPV6_SEC_OPT: ::c_int = 0x22; -pub const IPV6_TCLASS: ::c_int = 0x26; -pub const IPV6_V6ONLY: ::c_int = 0x27; +pub const DAY_1: crate::nl_item = 1; +pub const DAY_2: crate::nl_item = 2; +pub const DAY_3: crate::nl_item = 3; +pub const DAY_4: crate::nl_item = 4; +pub const DAY_5: crate::nl_item = 5; +pub const DAY_6: crate::nl_item = 6; +pub const DAY_7: crate::nl_item = 7; + +pub const ABDAY_1: crate::nl_item = 8; +pub const ABDAY_2: crate::nl_item = 9; +pub const ABDAY_3: crate::nl_item = 10; +pub const ABDAY_4: crate::nl_item = 11; +pub const ABDAY_5: crate::nl_item = 12; +pub const ABDAY_6: crate::nl_item = 13; +pub const ABDAY_7: crate::nl_item = 14; + +pub const MON_1: crate::nl_item = 15; +pub const MON_2: crate::nl_item = 16; +pub const MON_3: crate::nl_item = 17; +pub const MON_4: crate::nl_item = 18; +pub const MON_5: crate::nl_item = 19; +pub const MON_6: crate::nl_item = 20; +pub const MON_7: crate::nl_item = 21; +pub const MON_8: crate::nl_item = 22; +pub const MON_9: crate::nl_item = 23; +pub const MON_10: crate::nl_item = 24; +pub const MON_11: crate::nl_item = 25; +pub const MON_12: crate::nl_item = 26; + +pub const ABMON_1: crate::nl_item = 27; +pub const ABMON_2: crate::nl_item = 28; +pub const ABMON_3: crate::nl_item = 29; +pub const ABMON_4: crate::nl_item = 30; +pub const ABMON_5: crate::nl_item = 31; +pub const ABMON_6: crate::nl_item = 32; +pub const ABMON_7: crate::nl_item = 33; +pub const ABMON_8: crate::nl_item = 34; +pub const ABMON_9: crate::nl_item = 35; +pub const ABMON_10: crate::nl_item = 36; +pub const ABMON_11: crate::nl_item = 37; +pub const ABMON_12: crate::nl_item = 38; + +pub const RADIXCHAR: crate::nl_item = 39; +pub const THOUSEP: crate::nl_item = 40; +pub const YESSTR: crate::nl_item = 41; +pub const NOSTR: crate::nl_item = 42; +pub const CRNCYSTR: crate::nl_item = 43; + +pub const D_T_FMT: crate::nl_item = 44; +pub const D_FMT: crate::nl_item = 45; +pub const T_FMT: crate::nl_item = 46; +pub const AM_STR: crate::nl_item = 47; +pub const PM_STR: crate::nl_item = 48; + +pub const CODESET: crate::nl_item = 49; +pub const T_FMT_AMPM: crate::nl_item = 50; +pub const ERA: crate::nl_item = 51; +pub const ERA_D_FMT: crate::nl_item = 52; +pub const ERA_D_T_FMT: crate::nl_item = 53; +pub const ERA_T_FMT: crate::nl_item = 54; +pub const ALT_DIGITS: crate::nl_item = 55; +pub const YESEXPR: crate::nl_item = 56; +pub const NOEXPR: crate::nl_item = 57; +pub const _DATE_FMT: crate::nl_item = 58; +pub const MAXSTRMSG: crate::nl_item = 58; + +pub const PATH_MAX: c_int = 1024; + +pub const SA_ONSTACK: c_int = 0x00000001; +pub const SA_RESETHAND: c_int = 0x00000002; +pub const SA_RESTART: c_int = 0x00000004; +pub const SA_SIGINFO: c_int = 0x00000008; +pub const SA_NODEFER: c_int = 0x00000010; +pub const SA_NOCLDWAIT: c_int = 0x00010000; +pub const SA_NOCLDSTOP: c_int = 0x00020000; + +pub const SS_ONSTACK: c_int = 1; +pub const SS_DISABLE: c_int = 2; + +pub const FIOCLEX: c_int = 0x20006601; +pub const FIONCLEX: c_int = 0x20006602; +pub const FIONREAD: c_int = 0x4004667f; +pub const FIONBIO: c_int = 0x8004667e; +pub const FIOASYNC: c_int = 0x8004667d; +pub const FIOSETOWN: c_int = 0x8004667c; +pub const FIOGETOWN: c_int = 0x4004667b; + +pub const SIGCHLD: c_int = 18; +pub const SIGCLD: c_int = SIGCHLD; +pub const SIGBUS: c_int = 10; +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; +pub const SIG_SETMASK: c_int = 3; + +pub const AIO_CANCELED: c_int = 0; +pub const AIO_ALLDONE: c_int = 1; +pub const AIO_NOTCANCELED: c_int = 2; +pub const LIO_NOP: c_int = 0; +pub const LIO_READ: c_int = 1; +pub const LIO_WRITE: c_int = 2; +pub const LIO_NOWAIT: c_int = 0; +pub const LIO_WAIT: c_int = 1; + +pub const SIGEV_NONE: c_int = 1; +pub const SIGEV_SIGNAL: c_int = 2; +pub const SIGEV_THREAD: c_int = 3; +pub const SIGEV_PORT: c_int = 4; + +pub const CLD_EXITED: c_int = 1; +pub const CLD_KILLED: c_int = 2; +pub const CLD_DUMPED: c_int = 3; +pub const CLD_TRAPPED: c_int = 4; +pub const CLD_STOPPED: c_int = 5; +pub const CLD_CONTINUED: c_int = 6; + +pub const IP_RECVDSTADDR: c_int = 0x7; +pub const IP_PKTINFO: c_int = 0x1a; +pub const IP_DONTFRAG: c_int = 0x1b; +pub const IP_SEC_OPT: c_int = 0x22; + +pub const IPV6_UNICAST_HOPS: c_int = 0x5; +pub const IPV6_MULTICAST_IF: c_int = 0x6; +pub const IPV6_MULTICAST_HOPS: c_int = 0x7; +pub const IPV6_MULTICAST_LOOP: c_int = 0x8; +pub const IPV6_PKTINFO: c_int = 0xb; +pub const IPV6_RECVPKTINFO: c_int = 0x12; +pub const IPV6_RECVTCLASS: c_int = 0x19; +pub const IPV6_DONTFRAG: c_int = 0x21; +pub const IPV6_SEC_OPT: c_int = 0x22; +pub const IPV6_TCLASS: c_int = 0x26; +pub const IPV6_V6ONLY: c_int = 0x27; cfg_if! { if #[cfg(target_pointer_width = "64")] { - pub const FD_SETSIZE: ::c_int = 65536; + pub const FD_SETSIZE: c_int = 65536; } else { - pub const FD_SETSIZE: ::c_int = 1024; + pub const FD_SETSIZE: c_int = 1024; } } -pub const ST_RDONLY: ::c_ulong = 1; -pub const ST_NOSUID: ::c_ulong = 2; - -pub const NI_MAXHOST: ::socklen_t = 1025; -pub const NI_MAXSERV: ::socklen_t = 32; - -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 32767; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const SEEK_DATA: ::c_int = 3; -pub const SEEK_HOLE: ::c_int = 4; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 4; -pub const _IOLBF: ::c_int = 64; -pub const BUFSIZ: ::c_uint = 1024; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 1024; -pub const L_tmpnam: ::c_uint = 25; -pub const TMP_MAX: ::c_uint = 17576; -pub const PIPE_BUF: ::c_int = 5120; - -pub const GRND_NONBLOCK: ::c_uint = 0x0001; -pub const GRND_RANDOM: ::c_uint = 0x0002; - -pub const O_RDONLY: ::c_int = 0; -pub const O_WRONLY: ::c_int = 1; -pub const O_RDWR: ::c_int = 2; -pub const O_NDELAY: ::c_int = 0x04; -pub const O_APPEND: ::c_int = 8; -pub const O_DSYNC: ::c_int = 0x40; -pub const O_RSYNC: ::c_int = 0x8000; -pub const O_CREAT: ::c_int = 256; -pub const O_EXCL: ::c_int = 1024; -pub const O_NOCTTY: ::c_int = 2048; -pub const O_TRUNC: ::c_int = 512; -pub const O_NOFOLLOW: ::c_int = 0x20000; -pub const O_SEARCH: ::c_int = 0x200000; -pub const O_EXEC: ::c_int = 0x400000; -pub const O_CLOEXEC: ::c_int = 0x800000; -pub const O_ACCMODE: ::c_int = 0x600003; -pub const O_XATTR: ::c_int = 0x4000; -pub const O_DIRECTORY: ::c_int = 0x1000000; +pub const ST_RDONLY: c_ulong = 1; +pub const ST_NOSUID: c_ulong = 2; + +pub const NI_MAXHOST: crate::socklen_t = 1025; +pub const NI_MAXSERV: crate::socklen_t = 32; + +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 32767; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const SEEK_DATA: c_int = 3; +pub const SEEK_HOLE: c_int = 4; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 4; +pub const _IOLBF: c_int = 64; +pub const BUFSIZ: c_uint = 1024; +pub const FOPEN_MAX: c_uint = 20; +pub const FILENAME_MAX: c_uint = 1024; +pub const L_tmpnam: c_uint = 25; +pub const TMP_MAX: c_uint = 17576; +pub const PIPE_BUF: c_int = 5120; + +pub const GRND_NONBLOCK: c_uint = 0x0001; +pub const GRND_RANDOM: c_uint = 0x0002; + +pub const O_RDONLY: c_int = 0; +pub const O_WRONLY: c_int = 1; +pub const O_RDWR: c_int = 2; +pub const O_NDELAY: c_int = 0x04; +pub const O_APPEND: c_int = 8; +pub const O_DSYNC: c_int = 0x40; +pub const O_RSYNC: c_int = 0x8000; +pub const O_CREAT: c_int = 256; +pub const O_EXCL: c_int = 1024; +pub const O_NOCTTY: c_int = 2048; +pub const O_TRUNC: c_int = 512; +pub const O_NOFOLLOW: c_int = 0x20000; +pub const O_SEARCH: c_int = 0x200000; +pub const O_EXEC: c_int = 0x400000; +pub const O_CLOEXEC: c_int = 0x800000; +pub const O_ACCMODE: c_int = 0x600003; +pub const O_XATTR: c_int = 0x4000; +pub const O_DIRECTORY: c_int = 0x1000000; pub const S_IFIFO: mode_t = 0o1_0000; pub const S_IFCHR: mode_t = 0o2_0000; pub const S_IFBLK: mode_t = 0o6_0000; @@ -1244,79 +1248,79 @@ pub const S_IRWXO: mode_t = 0o0007; pub const S_IXOTH: mode_t = 0o0001; pub const S_IWOTH: mode_t = 0o0002; pub const S_IROTH: mode_t = 0o0004; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; -pub const F_LOCK: ::c_int = 1; -pub const F_TEST: ::c_int = 3; -pub const F_TLOCK: ::c_int = 2; -pub const F_ULOCK: ::c_int = 0; -pub const F_SETLK: ::c_int = 6; -pub const F_SETLKW: ::c_int = 7; -pub const F_GETLK: ::c_int = 14; -pub const F_ALLOCSP: ::c_int = 10; -pub const F_FREESP: ::c_int = 11; -pub const F_BLOCKS: ::c_int = 18; -pub const F_BLKSIZE: ::c_int = 19; -pub const F_SHARE: ::c_int = 40; -pub const F_UNSHARE: ::c_int = 41; -pub const F_ISSTREAM: ::c_int = 13; -pub const F_PRIV: ::c_int = 15; -pub const F_NPRIV: ::c_int = 16; -pub const F_QUOTACTL: ::c_int = 17; -pub const F_GETOWN: ::c_int = 23; -pub const F_SETOWN: ::c_int = 24; -pub const F_REVOKE: ::c_int = 25; -pub const F_HASREMOTELOCKS: ::c_int = 26; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGSEGV: ::c_int = 11; -pub const SIGSYS: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGUSR1: ::c_int = 16; -pub const SIGUSR2: ::c_int = 17; -pub const SIGPWR: ::c_int = 19; -pub const SIGWINCH: ::c_int = 20; -pub const SIGURG: ::c_int = 21; -pub const SIGPOLL: ::c_int = 22; -pub const SIGIO: ::c_int = SIGPOLL; -pub const SIGSTOP: ::c_int = 23; -pub const SIGTSTP: ::c_int = 24; -pub const SIGCONT: ::c_int = 25; -pub const SIGTTIN: ::c_int = 26; -pub const SIGTTOU: ::c_int = 27; -pub const SIGVTALRM: ::c_int = 28; -pub const SIGPROF: ::c_int = 29; -pub const SIGXCPU: ::c_int = 30; -pub const SIGXFSZ: ::c_int = 31; - -pub const WNOHANG: ::c_int = 0x40; -pub const WUNTRACED: ::c_int = 0x04; - -pub const WEXITED: ::c_int = 0x01; -pub const WTRAPPED: ::c_int = 0x02; -pub const WSTOPPED: ::c_int = WUNTRACED; -pub const WCONTINUED: ::c_int = 0x08; -pub const WNOWAIT: ::c_int = 0x80; - -pub const AT_FDCWD: ::c_int = 0xffd19553; -pub const AT_SYMLINK_NOFOLLOW: ::c_int = 0x1000; -pub const AT_SYMLINK_FOLLOW: ::c_int = 0x2000; -pub const AT_REMOVEDIR: ::c_int = 0x1; -pub const _AT_TRIGGER: ::c_int = 0x2; -pub const AT_EACCESS: ::c_int = 0x4; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; +pub const F_LOCK: c_int = 1; +pub const F_TEST: c_int = 3; +pub const F_TLOCK: c_int = 2; +pub const F_ULOCK: c_int = 0; +pub const F_SETLK: c_int = 6; +pub const F_SETLKW: c_int = 7; +pub const F_GETLK: c_int = 14; +pub const F_ALLOCSP: c_int = 10; +pub const F_FREESP: c_int = 11; +pub const F_BLOCKS: c_int = 18; +pub const F_BLKSIZE: c_int = 19; +pub const F_SHARE: c_int = 40; +pub const F_UNSHARE: c_int = 41; +pub const F_ISSTREAM: c_int = 13; +pub const F_PRIV: c_int = 15; +pub const F_NPRIV: c_int = 16; +pub const F_QUOTACTL: c_int = 17; +pub const F_GETOWN: c_int = 23; +pub const F_SETOWN: c_int = 24; +pub const F_REVOKE: c_int = 25; +pub const F_HASREMOTELOCKS: c_int = 26; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGSEGV: c_int = 11; +pub const SIGSYS: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGUSR1: c_int = 16; +pub const SIGUSR2: c_int = 17; +pub const SIGPWR: c_int = 19; +pub const SIGWINCH: c_int = 20; +pub const SIGURG: c_int = 21; +pub const SIGPOLL: c_int = 22; +pub const SIGIO: c_int = SIGPOLL; +pub const SIGSTOP: c_int = 23; +pub const SIGTSTP: c_int = 24; +pub const SIGCONT: c_int = 25; +pub const SIGTTIN: c_int = 26; +pub const SIGTTOU: c_int = 27; +pub const SIGVTALRM: c_int = 28; +pub const SIGPROF: c_int = 29; +pub const SIGXCPU: c_int = 30; +pub const SIGXFSZ: c_int = 31; + +pub const WNOHANG: c_int = 0x40; +pub const WUNTRACED: c_int = 0x04; + +pub const WEXITED: c_int = 0x01; +pub const WTRAPPED: c_int = 0x02; +pub const WSTOPPED: c_int = WUNTRACED; +pub const WCONTINUED: c_int = 0x08; +pub const WNOWAIT: c_int = 0x80; + +pub const AT_FDCWD: c_int = 0xffd19553; +pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1000; +pub const AT_SYMLINK_FOLLOW: c_int = 0x2000; +pub const AT_REMOVEDIR: c_int = 0x1; +pub const _AT_TRIGGER: c_int = 0x2; +pub const AT_EACCESS: c_int = 0x4; pub const P_PID: idtype_t = 0; pub const P_PPID: idtype_t = 1; @@ -1335,240 +1339,240 @@ pub const P_CTID: idtype_t = 13; pub const P_CPUID: idtype_t = 14; pub const P_PSETID: idtype_t = 15; -pub const PBIND_NONE: ::processorid_t = -1; -pub const PBIND_QUERY: ::processorid_t = -2; +pub const PBIND_NONE: crate::processorid_t = -1; +pub const PBIND_QUERY: crate::processorid_t = -2; -pub const PS_NONE: ::c_int = -1; -pub const PS_QUERY: ::c_int = -2; -pub const PS_MYID: ::c_int = -3; -pub const PS_SOFT: ::c_int = -4; -pub const PS_HARD: ::c_int = -5; -pub const PS_QUERY_TYPE: ::c_int = -6; -pub const PS_PRIVATE: ::c_int = 2; +pub const PS_NONE: c_int = -1; +pub const PS_QUERY: c_int = -2; +pub const PS_MYID: c_int = -3; +pub const PS_SOFT: c_int = -4; +pub const PS_HARD: c_int = -5; +pub const PS_QUERY_TYPE: c_int = -6; +pub const PS_PRIVATE: c_int = 2; pub const UTIME_OMIT: c_long = -2; pub const UTIME_NOW: c_long = -1; -pub const PROT_NONE: ::c_int = 0; -pub const PROT_READ: ::c_int = 1; -pub const PROT_WRITE: ::c_int = 2; -pub const PROT_EXEC: ::c_int = 4; - -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_NORESERVE: ::c_int = 0x40; -pub const MAP_ANON: ::c_int = 0x0100; -pub const MAP_ANONYMOUS: ::c_int = 0x0100; -pub const MAP_RENAME: ::c_int = 0x20; -pub const MAP_ALIGN: ::c_int = 0x200; -pub const MAP_TEXT: ::c_int = 0x400; -pub const MAP_INITDATA: ::c_int = 0x800; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; - -pub const MCL_CURRENT: ::c_int = 0x0001; -pub const MCL_FUTURE: ::c_int = 0x0002; - -pub const MS_SYNC: ::c_int = 0x0004; -pub const MS_ASYNC: ::c_int = 0x0001; -pub const MS_INVALIDATE: ::c_int = 0x0002; - -pub const MMOBJ_PADDING: ::c_uint = 0x10000; -pub const MMOBJ_INTERPRET: ::c_uint = 0x20000; -pub const MR_PADDING: ::c_uint = 0x1; -pub const MR_HDR_ELF: ::c_uint = 0x2; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const ENOTBLK: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const ETXTBSY: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const ENOMSG: ::c_int = 35; -pub const EIDRM: ::c_int = 36; -pub const ECHRNG: ::c_int = 37; -pub const EL2NSYNC: ::c_int = 38; -pub const EL3HLT: ::c_int = 39; -pub const EL3RST: ::c_int = 40; -pub const ELNRNG: ::c_int = 41; -pub const EUNATCH: ::c_int = 42; -pub const ENOCSI: ::c_int = 43; -pub const EL2HLT: ::c_int = 44; -pub const EDEADLK: ::c_int = 45; -pub const ENOLCK: ::c_int = 46; -pub const ECANCELED: ::c_int = 47; -pub const ENOTSUP: ::c_int = 48; -pub const EDQUOT: ::c_int = 49; -pub const EBADE: ::c_int = 50; -pub const EBADR: ::c_int = 51; -pub const EXFULL: ::c_int = 52; -pub const ENOANO: ::c_int = 53; -pub const EBADRQC: ::c_int = 54; -pub const EBADSLT: ::c_int = 55; -pub const EDEADLOCK: ::c_int = 56; -pub const EBFONT: ::c_int = 57; -pub const EOWNERDEAD: ::c_int = 58; -pub const ENOTRECOVERABLE: ::c_int = 59; -pub const ENOSTR: ::c_int = 60; -pub const ENODATA: ::c_int = 61; -pub const ETIME: ::c_int = 62; -pub const ENOSR: ::c_int = 63; -pub const ENONET: ::c_int = 64; -pub const ENOPKG: ::c_int = 65; -pub const EREMOTE: ::c_int = 66; -pub const ENOLINK: ::c_int = 67; -pub const EADV: ::c_int = 68; -pub const ESRMNT: ::c_int = 69; -pub const ECOMM: ::c_int = 70; -pub const EPROTO: ::c_int = 71; -pub const ELOCKUNMAPPED: ::c_int = 72; -pub const ENOTACTIVE: ::c_int = 73; -pub const EMULTIHOP: ::c_int = 74; -pub const EADI: ::c_int = 75; -pub const EBADMSG: ::c_int = 77; -pub const ENAMETOOLONG: ::c_int = 78; -pub const EOVERFLOW: ::c_int = 79; -pub const ENOTUNIQ: ::c_int = 80; -pub const EBADFD: ::c_int = 81; -pub const EREMCHG: ::c_int = 82; -pub const ELIBACC: ::c_int = 83; -pub const ELIBBAD: ::c_int = 84; -pub const ELIBSCN: ::c_int = 85; -pub const ELIBMAX: ::c_int = 86; -pub const ELIBEXEC: ::c_int = 87; -pub const EILSEQ: ::c_int = 88; -pub const ENOSYS: ::c_int = 89; -pub const ELOOP: ::c_int = 90; -pub const ERESTART: ::c_int = 91; -pub const ESTRPIPE: ::c_int = 92; -pub const ENOTEMPTY: ::c_int = 93; -pub const EUSERS: ::c_int = 94; -pub const ENOTSOCK: ::c_int = 95; -pub const EDESTADDRREQ: ::c_int = 96; -pub const EMSGSIZE: ::c_int = 97; -pub const EPROTOTYPE: ::c_int = 98; -pub const ENOPROTOOPT: ::c_int = 99; -pub const EPROTONOSUPPORT: ::c_int = 120; -pub const ESOCKTNOSUPPORT: ::c_int = 121; -pub const EOPNOTSUPP: ::c_int = 122; -pub const EPFNOSUPPORT: ::c_int = 123; -pub const EAFNOSUPPORT: ::c_int = 124; -pub const EADDRINUSE: ::c_int = 125; -pub const EADDRNOTAVAIL: ::c_int = 126; -pub const ENETDOWN: ::c_int = 127; -pub const ENETUNREACH: ::c_int = 128; -pub const ENETRESET: ::c_int = 129; -pub const ECONNABORTED: ::c_int = 130; -pub const ECONNRESET: ::c_int = 131; -pub const ENOBUFS: ::c_int = 132; -pub const EISCONN: ::c_int = 133; -pub const ENOTCONN: ::c_int = 134; -pub const ESHUTDOWN: ::c_int = 143; -pub const ETOOMANYREFS: ::c_int = 144; -pub const ETIMEDOUT: ::c_int = 145; -pub const ECONNREFUSED: ::c_int = 146; -pub const EHOSTDOWN: ::c_int = 147; -pub const EHOSTUNREACH: ::c_int = 148; -pub const EWOULDBLOCK: ::c_int = EAGAIN; -pub const EALREADY: ::c_int = 149; -pub const EINPROGRESS: ::c_int = 150; -pub const ESTALE: ::c_int = 151; - -pub const EAI_AGAIN: ::c_int = 2; -pub const EAI_BADFLAGS: ::c_int = 3; -pub const EAI_FAIL: ::c_int = 4; -pub const EAI_FAMILY: ::c_int = 5; -pub const EAI_MEMORY: ::c_int = 6; -pub const EAI_NODATA: ::c_int = 7; -pub const EAI_NONAME: ::c_int = 8; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; -pub const EAI_OVERFLOW: ::c_int = 12; - -pub const NI_NOFQDN: ::c_uint = 0x0001; -pub const NI_NUMERICHOST: ::c_uint = 0x0002; -pub const NI_NAMEREQD: ::c_uint = 0x0004; -pub const NI_NUMERICSERV: ::c_uint = 0x0008; -pub const NI_DGRAM: ::c_uint = 0x0010; -pub const NI_WITHSCOPEID: ::c_uint = 0x0020; -pub const NI_NUMERICSCOPE: ::c_uint = 0x0040; - -pub const F_DUPFD: ::c_int = 0; -pub const F_DUP2FD: ::c_int = 9; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; -pub const F_GETXFL: ::c_int = 45; - -pub const SIGTRAP: ::c_int = 5; - -pub const GLOB_APPEND: ::c_int = 32; -pub const GLOB_DOOFFS: ::c_int = 16; -pub const GLOB_ERR: ::c_int = 1; -pub const GLOB_MARK: ::c_int = 2; -pub const GLOB_NOCHECK: ::c_int = 8; -pub const GLOB_NOSORT: ::c_int = 4; -pub const GLOB_NOESCAPE: ::c_int = 64; - -pub const GLOB_NOSPACE: ::c_int = -2; -pub const GLOB_ABORTED: ::c_int = -1; -pub const GLOB_NOMATCH: ::c_int = -3; - -pub const POLLIN: ::c_short = 0x1; -pub const POLLPRI: ::c_short = 0x2; -pub const POLLOUT: ::c_short = 0x4; -pub const POLLERR: ::c_short = 0x8; -pub const POLLHUP: ::c_short = 0x10; -pub const POLLNVAL: ::c_short = 0x20; -pub const POLLNORM: ::c_short = 0x0040; -pub const POLLRDNORM: ::c_short = 0x0040; -pub const POLLWRNORM: ::c_short = 0x4; /* POLLOUT */ -pub const POLLRDBAND: ::c_short = 0x0080; -pub const POLLWRBAND: ::c_short = 0x0100; - -pub const POSIX_MADV_NORMAL: ::c_int = 0; -pub const POSIX_MADV_RANDOM: ::c_int = 1; -pub const POSIX_MADV_SEQUENTIAL: ::c_int = 2; -pub const POSIX_MADV_WILLNEED: ::c_int = 3; -pub const POSIX_MADV_DONTNEED: ::c_int = 4; - -pub const PTHREAD_CREATE_JOINABLE: ::c_int = 0; -pub const PTHREAD_CREATE_DETACHED: ::c_int = 0x40; -pub const PTHREAD_PROCESS_SHARED: ::c_int = 1; -pub const PTHREAD_PROCESS_PRIVATE: ::c_ushort = 0; -pub const PTHREAD_STACK_MIN: ::size_t = 4096; - -pub const SIGSTKSZ: ::size_t = 8192; +pub const PROT_NONE: c_int = 0; +pub const PROT_READ: c_int = 1; +pub const PROT_WRITE: c_int = 2; +pub const PROT_EXEC: c_int = 4; + +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_FIXED: c_int = 0x0010; +pub const MAP_NORESERVE: c_int = 0x40; +pub const MAP_ANON: c_int = 0x0100; +pub const MAP_ANONYMOUS: c_int = 0x0100; +pub const MAP_RENAME: c_int = 0x20; +pub const MAP_ALIGN: c_int = 0x200; +pub const MAP_TEXT: c_int = 0x400; +pub const MAP_INITDATA: c_int = 0x800; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; + +pub const MCL_CURRENT: c_int = 0x0001; +pub const MCL_FUTURE: c_int = 0x0002; + +pub const MS_SYNC: c_int = 0x0004; +pub const MS_ASYNC: c_int = 0x0001; +pub const MS_INVALIDATE: c_int = 0x0002; + +pub const MMOBJ_PADDING: c_uint = 0x10000; +pub const MMOBJ_INTERPRET: c_uint = 0x20000; +pub const MR_PADDING: c_uint = 0x1; +pub const MR_HDR_ELF: c_uint = 0x2; + +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const ENOTBLK: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const ETXTBSY: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const ENOMSG: c_int = 35; +pub const EIDRM: c_int = 36; +pub const ECHRNG: c_int = 37; +pub const EL2NSYNC: c_int = 38; +pub const EL3HLT: c_int = 39; +pub const EL3RST: c_int = 40; +pub const ELNRNG: c_int = 41; +pub const EUNATCH: c_int = 42; +pub const ENOCSI: c_int = 43; +pub const EL2HLT: c_int = 44; +pub const EDEADLK: c_int = 45; +pub const ENOLCK: c_int = 46; +pub const ECANCELED: c_int = 47; +pub const ENOTSUP: c_int = 48; +pub const EDQUOT: c_int = 49; +pub const EBADE: c_int = 50; +pub const EBADR: c_int = 51; +pub const EXFULL: c_int = 52; +pub const ENOANO: c_int = 53; +pub const EBADRQC: c_int = 54; +pub const EBADSLT: c_int = 55; +pub const EDEADLOCK: c_int = 56; +pub const EBFONT: c_int = 57; +pub const EOWNERDEAD: c_int = 58; +pub const ENOTRECOVERABLE: c_int = 59; +pub const ENOSTR: c_int = 60; +pub const ENODATA: c_int = 61; +pub const ETIME: c_int = 62; +pub const ENOSR: c_int = 63; +pub const ENONET: c_int = 64; +pub const ENOPKG: c_int = 65; +pub const EREMOTE: c_int = 66; +pub const ENOLINK: c_int = 67; +pub const EADV: c_int = 68; +pub const ESRMNT: c_int = 69; +pub const ECOMM: c_int = 70; +pub const EPROTO: c_int = 71; +pub const ELOCKUNMAPPED: c_int = 72; +pub const ENOTACTIVE: c_int = 73; +pub const EMULTIHOP: c_int = 74; +pub const EADI: c_int = 75; +pub const EBADMSG: c_int = 77; +pub const ENAMETOOLONG: c_int = 78; +pub const EOVERFLOW: c_int = 79; +pub const ENOTUNIQ: c_int = 80; +pub const EBADFD: c_int = 81; +pub const EREMCHG: c_int = 82; +pub const ELIBACC: c_int = 83; +pub const ELIBBAD: c_int = 84; +pub const ELIBSCN: c_int = 85; +pub const ELIBMAX: c_int = 86; +pub const ELIBEXEC: c_int = 87; +pub const EILSEQ: c_int = 88; +pub const ENOSYS: c_int = 89; +pub const ELOOP: c_int = 90; +pub const ERESTART: c_int = 91; +pub const ESTRPIPE: c_int = 92; +pub const ENOTEMPTY: c_int = 93; +pub const EUSERS: c_int = 94; +pub const ENOTSOCK: c_int = 95; +pub const EDESTADDRREQ: c_int = 96; +pub const EMSGSIZE: c_int = 97; +pub const EPROTOTYPE: c_int = 98; +pub const ENOPROTOOPT: c_int = 99; +pub const EPROTONOSUPPORT: c_int = 120; +pub const ESOCKTNOSUPPORT: c_int = 121; +pub const EOPNOTSUPP: c_int = 122; +pub const EPFNOSUPPORT: c_int = 123; +pub const EAFNOSUPPORT: c_int = 124; +pub const EADDRINUSE: c_int = 125; +pub const EADDRNOTAVAIL: c_int = 126; +pub const ENETDOWN: c_int = 127; +pub const ENETUNREACH: c_int = 128; +pub const ENETRESET: c_int = 129; +pub const ECONNABORTED: c_int = 130; +pub const ECONNRESET: c_int = 131; +pub const ENOBUFS: c_int = 132; +pub const EISCONN: c_int = 133; +pub const ENOTCONN: c_int = 134; +pub const ESHUTDOWN: c_int = 143; +pub const ETOOMANYREFS: c_int = 144; +pub const ETIMEDOUT: c_int = 145; +pub const ECONNREFUSED: c_int = 146; +pub const EHOSTDOWN: c_int = 147; +pub const EHOSTUNREACH: c_int = 148; +pub const EWOULDBLOCK: c_int = EAGAIN; +pub const EALREADY: c_int = 149; +pub const EINPROGRESS: c_int = 150; +pub const ESTALE: c_int = 151; + +pub const EAI_AGAIN: c_int = 2; +pub const EAI_BADFLAGS: c_int = 3; +pub const EAI_FAIL: c_int = 4; +pub const EAI_FAMILY: c_int = 5; +pub const EAI_MEMORY: c_int = 6; +pub const EAI_NODATA: c_int = 7; +pub const EAI_NONAME: c_int = 8; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; +pub const EAI_OVERFLOW: c_int = 12; + +pub const NI_NOFQDN: c_uint = 0x0001; +pub const NI_NUMERICHOST: c_uint = 0x0002; +pub const NI_NAMEREQD: c_uint = 0x0004; +pub const NI_NUMERICSERV: c_uint = 0x0008; +pub const NI_DGRAM: c_uint = 0x0010; +pub const NI_WITHSCOPEID: c_uint = 0x0020; +pub const NI_NUMERICSCOPE: c_uint = 0x0040; + +pub const F_DUPFD: c_int = 0; +pub const F_DUP2FD: c_int = 9; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; +pub const F_GETXFL: c_int = 45; + +pub const SIGTRAP: c_int = 5; + +pub const GLOB_APPEND: c_int = 32; +pub const GLOB_DOOFFS: c_int = 16; +pub const GLOB_ERR: c_int = 1; +pub const GLOB_MARK: c_int = 2; +pub const GLOB_NOCHECK: c_int = 8; +pub const GLOB_NOSORT: c_int = 4; +pub const GLOB_NOESCAPE: c_int = 64; + +pub const GLOB_NOSPACE: c_int = -2; +pub const GLOB_ABORTED: c_int = -1; +pub const GLOB_NOMATCH: c_int = -3; + +pub const POLLIN: c_short = 0x1; +pub const POLLPRI: c_short = 0x2; +pub const POLLOUT: c_short = 0x4; +pub const POLLERR: c_short = 0x8; +pub const POLLHUP: c_short = 0x10; +pub const POLLNVAL: c_short = 0x20; +pub const POLLNORM: c_short = 0x0040; +pub const POLLRDNORM: c_short = 0x0040; +pub const POLLWRNORM: c_short = 0x4; /* POLLOUT */ +pub const POLLRDBAND: c_short = 0x0080; +pub const POLLWRBAND: c_short = 0x0100; + +pub const POSIX_MADV_NORMAL: c_int = 0; +pub const POSIX_MADV_RANDOM: c_int = 1; +pub const POSIX_MADV_SEQUENTIAL: c_int = 2; +pub const POSIX_MADV_WILLNEED: c_int = 3; +pub const POSIX_MADV_DONTNEED: c_int = 4; + +pub const PTHREAD_CREATE_JOINABLE: c_int = 0; +pub const PTHREAD_CREATE_DETACHED: c_int = 0x40; +pub const PTHREAD_PROCESS_SHARED: c_int = 1; +pub const PTHREAD_PROCESS_PRIVATE: c_ushort = 0; +pub const PTHREAD_STACK_MIN: size_t = 4096; + +pub const SIGSTKSZ: size_t = 8192; // https://illumos.org/man/3c/clock_gettime // https://github.com/illumos/illumos-gate/ @@ -1580,450 +1584,450 @@ pub const SIGSTKSZ: ::size_t = 8192; // blob/HEAD/usr/src/uts/common/sys/time_impl.h // Confusing! CLOCK_HIGHRES==CLOCK_MONOTONIC==4 // __CLOCK_REALTIME0==0 is an obsoleted version of CLOCK_REALTIME==3 -pub const CLOCK_REALTIME: ::clockid_t = 3; -pub const CLOCK_MONOTONIC: ::clockid_t = 4; -pub const TIMER_RELTIME: ::c_int = 0; -pub const TIMER_ABSTIME: ::c_int = 1; - -pub const RLIMIT_CPU: ::c_int = 0; -pub const RLIMIT_FSIZE: ::c_int = 1; -pub const RLIMIT_DATA: ::c_int = 2; -pub const RLIMIT_STACK: ::c_int = 3; -pub const RLIMIT_CORE: ::c_int = 4; -pub const RLIMIT_NOFILE: ::c_int = 5; -pub const RLIMIT_VMEM: ::c_int = 6; -pub const RLIMIT_AS: ::c_int = RLIMIT_VMEM; +pub const CLOCK_REALTIME: crate::clockid_t = 3; +pub const CLOCK_MONOTONIC: crate::clockid_t = 4; +pub const TIMER_RELTIME: c_int = 0; +pub const TIMER_ABSTIME: c_int = 1; + +pub const RLIMIT_CPU: c_int = 0; +pub const RLIMIT_FSIZE: c_int = 1; +pub const RLIMIT_DATA: c_int = 2; +pub const RLIMIT_STACK: c_int = 3; +pub const RLIMIT_CORE: c_int = 4; +pub const RLIMIT_NOFILE: c_int = 5; +pub const RLIMIT_VMEM: c_int = 6; +pub const RLIMIT_AS: c_int = RLIMIT_VMEM; #[deprecated(since = "0.2.64", note = "Not stable across OS versions")] pub const RLIM_NLIMITS: rlim_t = 7; pub const RLIM_INFINITY: rlim_t = 0xfffffffffffffffd; -pub const RUSAGE_SELF: ::c_int = 0; -pub const RUSAGE_CHILDREN: ::c_int = -1; - -pub const MADV_NORMAL: ::c_int = 0; -pub const MADV_RANDOM: ::c_int = 1; -pub const MADV_SEQUENTIAL: ::c_int = 2; -pub const MADV_WILLNEED: ::c_int = 3; -pub const MADV_DONTNEED: ::c_int = 4; -pub const MADV_FREE: ::c_int = 5; -pub const MADV_ACCESS_DEFAULT: ::c_int = 6; -pub const MADV_ACCESS_LWP: ::c_int = 7; -pub const MADV_ACCESS_MANY: ::c_int = 8; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_UNIX: ::c_int = 1; -pub const AF_INET: ::c_int = 2; -pub const AF_IMPLINK: ::c_int = 3; -pub const AF_PUP: ::c_int = 4; -pub const AF_CHAOS: ::c_int = 5; -pub const AF_NS: ::c_int = 6; -pub const AF_NBS: ::c_int = 7; -pub const AF_ECMA: ::c_int = 8; -pub const AF_DATAKIT: ::c_int = 9; -pub const AF_CCITT: ::c_int = 10; -pub const AF_SNA: ::c_int = 11; -pub const AF_DECnet: ::c_int = 12; -pub const AF_DLI: ::c_int = 13; -pub const AF_LAT: ::c_int = 14; -pub const AF_HYLINK: ::c_int = 15; -pub const AF_APPLETALK: ::c_int = 16; -pub const AF_NIT: ::c_int = 17; -pub const AF_802: ::c_int = 18; -pub const AF_OSI: ::c_int = 19; -pub const AF_X25: ::c_int = 20; -pub const AF_OSINET: ::c_int = 21; -pub const AF_GOSIP: ::c_int = 22; -pub const AF_IPX: ::c_int = 23; -pub const AF_ROUTE: ::c_int = 24; -pub const AF_LINK: ::c_int = 25; -pub const AF_INET6: ::c_int = 26; -pub const AF_KEY: ::c_int = 27; -pub const AF_POLICY: ::c_int = 29; -pub const AF_INET_OFFLOAD: ::c_int = 30; -pub const AF_TRILL: ::c_int = 31; -pub const AF_PACKET: ::c_int = 32; - -pub const PF_UNSPEC: ::c_int = AF_UNSPEC; -pub const PF_UNIX: ::c_int = AF_UNIX; -pub const PF_LOCAL: ::c_int = PF_UNIX; -pub const PF_FILE: ::c_int = PF_UNIX; -pub const PF_INET: ::c_int = AF_INET; -pub const PF_IMPLINK: ::c_int = AF_IMPLINK; -pub const PF_PUP: ::c_int = AF_PUP; -pub const PF_CHAOS: ::c_int = AF_CHAOS; -pub const PF_NS: ::c_int = AF_NS; -pub const PF_NBS: ::c_int = AF_NBS; -pub const PF_ECMA: ::c_int = AF_ECMA; -pub const PF_DATAKIT: ::c_int = AF_DATAKIT; -pub const PF_CCITT: ::c_int = AF_CCITT; -pub const PF_SNA: ::c_int = AF_SNA; -pub const PF_DECnet: ::c_int = AF_DECnet; -pub const PF_DLI: ::c_int = AF_DLI; -pub const PF_LAT: ::c_int = AF_LAT; -pub const PF_HYLINK: ::c_int = AF_HYLINK; -pub const PF_APPLETALK: ::c_int = AF_APPLETALK; -pub const PF_NIT: ::c_int = AF_NIT; -pub const PF_802: ::c_int = AF_802; -pub const PF_OSI: ::c_int = AF_OSI; -pub const PF_X25: ::c_int = AF_X25; -pub const PF_OSINET: ::c_int = AF_OSINET; -pub const PF_GOSIP: ::c_int = AF_GOSIP; -pub const PF_IPX: ::c_int = AF_IPX; -pub const PF_ROUTE: ::c_int = AF_ROUTE; -pub const PF_LINK: ::c_int = AF_LINK; -pub const PF_INET6: ::c_int = AF_INET6; -pub const PF_KEY: ::c_int = AF_KEY; -pub const PF_POLICY: ::c_int = AF_POLICY; -pub const PF_INET_OFFLOAD: ::c_int = AF_INET_OFFLOAD; -pub const PF_TRILL: ::c_int = AF_TRILL; -pub const PF_PACKET: ::c_int = AF_PACKET; - -pub const SOCK_DGRAM: ::c_int = 1; -pub const SOCK_STREAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 4; -pub const SOCK_RDM: ::c_int = 5; -pub const SOCK_SEQPACKET: ::c_int = 6; -pub const IP_MULTICAST_IF: ::c_int = 16; -pub const IP_MULTICAST_TTL: ::c_int = 17; -pub const IP_MULTICAST_LOOP: ::c_int = 18; -pub const IP_HDRINCL: ::c_int = 2; -pub const IP_TOS: ::c_int = 3; -pub const IP_TTL: ::c_int = 4; -pub const IP_ADD_MEMBERSHIP: ::c_int = 19; -pub const IP_DROP_MEMBERSHIP: ::c_int = 20; -pub const IPV6_JOIN_GROUP: ::c_int = 9; -pub const IPV6_LEAVE_GROUP: ::c_int = 10; -pub const IP_ADD_SOURCE_MEMBERSHIP: ::c_int = 23; -pub const IP_DROP_SOURCE_MEMBERSHIP: ::c_int = 24; -pub const IP_BLOCK_SOURCE: ::c_int = 21; -pub const IP_UNBLOCK_SOURCE: ::c_int = 22; +pub const RUSAGE_SELF: c_int = 0; +pub const RUSAGE_CHILDREN: c_int = -1; + +pub const MADV_NORMAL: c_int = 0; +pub const MADV_RANDOM: c_int = 1; +pub const MADV_SEQUENTIAL: c_int = 2; +pub const MADV_WILLNEED: c_int = 3; +pub const MADV_DONTNEED: c_int = 4; +pub const MADV_FREE: c_int = 5; +pub const MADV_ACCESS_DEFAULT: c_int = 6; +pub const MADV_ACCESS_LWP: c_int = 7; +pub const MADV_ACCESS_MANY: c_int = 8; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_UNIX: c_int = 1; +pub const AF_INET: c_int = 2; +pub const AF_IMPLINK: c_int = 3; +pub const AF_PUP: c_int = 4; +pub const AF_CHAOS: c_int = 5; +pub const AF_NS: c_int = 6; +pub const AF_NBS: c_int = 7; +pub const AF_ECMA: c_int = 8; +pub const AF_DATAKIT: c_int = 9; +pub const AF_CCITT: c_int = 10; +pub const AF_SNA: c_int = 11; +pub const AF_DECnet: c_int = 12; +pub const AF_DLI: c_int = 13; +pub const AF_LAT: c_int = 14; +pub const AF_HYLINK: c_int = 15; +pub const AF_APPLETALK: c_int = 16; +pub const AF_NIT: c_int = 17; +pub const AF_802: c_int = 18; +pub const AF_OSI: c_int = 19; +pub const AF_X25: c_int = 20; +pub const AF_OSINET: c_int = 21; +pub const AF_GOSIP: c_int = 22; +pub const AF_IPX: c_int = 23; +pub const AF_ROUTE: c_int = 24; +pub const AF_LINK: c_int = 25; +pub const AF_INET6: c_int = 26; +pub const AF_KEY: c_int = 27; +pub const AF_POLICY: c_int = 29; +pub const AF_INET_OFFLOAD: c_int = 30; +pub const AF_TRILL: c_int = 31; +pub const AF_PACKET: c_int = 32; + +pub const PF_UNSPEC: c_int = AF_UNSPEC; +pub const PF_UNIX: c_int = AF_UNIX; +pub const PF_LOCAL: c_int = PF_UNIX; +pub const PF_FILE: c_int = PF_UNIX; +pub const PF_INET: c_int = AF_INET; +pub const PF_IMPLINK: c_int = AF_IMPLINK; +pub const PF_PUP: c_int = AF_PUP; +pub const PF_CHAOS: c_int = AF_CHAOS; +pub const PF_NS: c_int = AF_NS; +pub const PF_NBS: c_int = AF_NBS; +pub const PF_ECMA: c_int = AF_ECMA; +pub const PF_DATAKIT: c_int = AF_DATAKIT; +pub const PF_CCITT: c_int = AF_CCITT; +pub const PF_SNA: c_int = AF_SNA; +pub const PF_DECnet: c_int = AF_DECnet; +pub const PF_DLI: c_int = AF_DLI; +pub const PF_LAT: c_int = AF_LAT; +pub const PF_HYLINK: c_int = AF_HYLINK; +pub const PF_APPLETALK: c_int = AF_APPLETALK; +pub const PF_NIT: c_int = AF_NIT; +pub const PF_802: c_int = AF_802; +pub const PF_OSI: c_int = AF_OSI; +pub const PF_X25: c_int = AF_X25; +pub const PF_OSINET: c_int = AF_OSINET; +pub const PF_GOSIP: c_int = AF_GOSIP; +pub const PF_IPX: c_int = AF_IPX; +pub const PF_ROUTE: c_int = AF_ROUTE; +pub const PF_LINK: c_int = AF_LINK; +pub const PF_INET6: c_int = AF_INET6; +pub const PF_KEY: c_int = AF_KEY; +pub const PF_POLICY: c_int = AF_POLICY; +pub const PF_INET_OFFLOAD: c_int = AF_INET_OFFLOAD; +pub const PF_TRILL: c_int = AF_TRILL; +pub const PF_PACKET: c_int = AF_PACKET; + +pub const SOCK_DGRAM: c_int = 1; +pub const SOCK_STREAM: c_int = 2; +pub const SOCK_RAW: c_int = 4; +pub const SOCK_RDM: c_int = 5; +pub const SOCK_SEQPACKET: c_int = 6; +pub const IP_MULTICAST_IF: c_int = 16; +pub const IP_MULTICAST_TTL: c_int = 17; +pub const IP_MULTICAST_LOOP: c_int = 18; +pub const IP_HDRINCL: c_int = 2; +pub const IP_TOS: c_int = 3; +pub const IP_TTL: c_int = 4; +pub const IP_ADD_MEMBERSHIP: c_int = 19; +pub const IP_DROP_MEMBERSHIP: c_int = 20; +pub const IPV6_JOIN_GROUP: c_int = 9; +pub const IPV6_LEAVE_GROUP: c_int = 10; +pub const IP_ADD_SOURCE_MEMBERSHIP: c_int = 23; +pub const IP_DROP_SOURCE_MEMBERSHIP: c_int = 24; +pub const IP_BLOCK_SOURCE: c_int = 21; +pub const IP_UNBLOCK_SOURCE: c_int = 22; // These TCP socket options are common between illumos and Solaris, while higher // numbers have generally diverged: -pub const TCP_NODELAY: ::c_int = 0x1; -pub const TCP_MAXSEG: ::c_int = 0x2; -pub const TCP_KEEPALIVE: ::c_int = 0x8; -pub const TCP_NOTIFY_THRESHOLD: ::c_int = 0x10; -pub const TCP_ABORT_THRESHOLD: ::c_int = 0x11; -pub const TCP_CONN_NOTIFY_THRESHOLD: ::c_int = 0x12; -pub const TCP_CONN_ABORT_THRESHOLD: ::c_int = 0x13; -pub const TCP_RECVDSTADDR: ::c_int = 0x14; -pub const TCP_INIT_CWND: ::c_int = 0x15; -pub const TCP_KEEPALIVE_THRESHOLD: ::c_int = 0x16; -pub const TCP_KEEPALIVE_ABORT_THRESHOLD: ::c_int = 0x17; -pub const TCP_CORK: ::c_int = 0x18; -pub const TCP_RTO_INITIAL: ::c_int = 0x19; -pub const TCP_RTO_MIN: ::c_int = 0x1a; -pub const TCP_RTO_MAX: ::c_int = 0x1b; -pub const TCP_LINGER2: ::c_int = 0x1c; - -pub const UDP_NAT_T_ENDPOINT: ::c_int = 0x0103; - -pub const SOMAXCONN: ::c_int = 128; - -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SO_DEBUG: ::c_int = 0x01; -pub const SO_ACCEPTCONN: ::c_int = 0x0002; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_OOBINLINE: ::c_int = 0x0100; -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_SNDLOWAT: ::c_int = 0x1003; -pub const SO_RCVLOWAT: ::c_int = 0x1004; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_PROTOTYPE: ::c_int = 0x1009; -pub const SO_DOMAIN: ::c_int = 0x100c; -pub const SO_TIMESTAMP: ::c_int = 0x1013; -pub const SO_EXCLBIND: ::c_int = 0x1015; - -pub const SCM_RIGHTS: ::c_int = 0x1010; -pub const SCM_UCRED: ::c_int = 0x1012; -pub const SCM_TIMESTAMP: ::c_int = SO_TIMESTAMP; - -pub const MSG_OOB: ::c_int = 0x1; -pub const MSG_PEEK: ::c_int = 0x2; -pub const MSG_DONTROUTE: ::c_int = 0x4; -pub const MSG_EOR: ::c_int = 0x8; -pub const MSG_CTRUNC: ::c_int = 0x10; -pub const MSG_TRUNC: ::c_int = 0x20; -pub const MSG_WAITALL: ::c_int = 0x40; -pub const MSG_DONTWAIT: ::c_int = 0x80; -pub const MSG_NOTIFICATION: ::c_int = 0x100; -pub const MSG_NOSIGNAL: ::c_int = 0x200; -pub const MSG_DUPCTRL: ::c_int = 0x800; -pub const MSG_XPG4_2: ::c_int = 0x8000; -pub const MSG_MAXIOVLEN: ::c_int = 16; - -pub const IF_NAMESIZE: ::size_t = 32; -pub const IFNAMSIZ: ::size_t = 16; +pub const TCP_NODELAY: c_int = 0x1; +pub const TCP_MAXSEG: c_int = 0x2; +pub const TCP_KEEPALIVE: c_int = 0x8; +pub const TCP_NOTIFY_THRESHOLD: c_int = 0x10; +pub const TCP_ABORT_THRESHOLD: c_int = 0x11; +pub const TCP_CONN_NOTIFY_THRESHOLD: c_int = 0x12; +pub const TCP_CONN_ABORT_THRESHOLD: c_int = 0x13; +pub const TCP_RECVDSTADDR: c_int = 0x14; +pub const TCP_INIT_CWND: c_int = 0x15; +pub const TCP_KEEPALIVE_THRESHOLD: c_int = 0x16; +pub const TCP_KEEPALIVE_ABORT_THRESHOLD: c_int = 0x17; +pub const TCP_CORK: c_int = 0x18; +pub const TCP_RTO_INITIAL: c_int = 0x19; +pub const TCP_RTO_MIN: c_int = 0x1a; +pub const TCP_RTO_MAX: c_int = 0x1b; +pub const TCP_LINGER2: c_int = 0x1c; + +pub const UDP_NAT_T_ENDPOINT: c_int = 0x0103; + +pub const SOMAXCONN: c_int = 128; + +pub const SOL_SOCKET: c_int = 0xffff; +pub const SO_DEBUG: c_int = 0x01; +pub const SO_ACCEPTCONN: c_int = 0x0002; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_OOBINLINE: c_int = 0x0100; +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_SNDLOWAT: c_int = 0x1003; +pub const SO_RCVLOWAT: c_int = 0x1004; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; +pub const SO_PROTOTYPE: c_int = 0x1009; +pub const SO_DOMAIN: c_int = 0x100c; +pub const SO_TIMESTAMP: c_int = 0x1013; +pub const SO_EXCLBIND: c_int = 0x1015; + +pub const SCM_RIGHTS: c_int = 0x1010; +pub const SCM_UCRED: c_int = 0x1012; +pub const SCM_TIMESTAMP: c_int = SO_TIMESTAMP; + +pub const MSG_OOB: c_int = 0x1; +pub const MSG_PEEK: c_int = 0x2; +pub const MSG_DONTROUTE: c_int = 0x4; +pub const MSG_EOR: c_int = 0x8; +pub const MSG_CTRUNC: c_int = 0x10; +pub const MSG_TRUNC: c_int = 0x20; +pub const MSG_WAITALL: c_int = 0x40; +pub const MSG_DONTWAIT: c_int = 0x80; +pub const MSG_NOTIFICATION: c_int = 0x100; +pub const MSG_NOSIGNAL: c_int = 0x200; +pub const MSG_DUPCTRL: c_int = 0x800; +pub const MSG_XPG4_2: c_int = 0x8000; +pub const MSG_MAXIOVLEN: c_int = 16; + +pub const IF_NAMESIZE: size_t = 32; +pub const IFNAMSIZ: size_t = 16; // https://docs.oracle.com/cd/E23824_01/html/821-1475/if-7p.html -pub const IFF_UP: ::c_int = 0x0000000001; // Address is up -pub const IFF_BROADCAST: ::c_int = 0x0000000002; // Broadcast address valid -pub const IFF_DEBUG: ::c_int = 0x0000000004; // Turn on debugging -pub const IFF_LOOPBACK: ::c_int = 0x0000000008; // Loopback net -pub const IFF_POINTOPOINT: ::c_int = 0x0000000010; // Interface is p-to-p -pub const IFF_NOTRAILERS: ::c_int = 0x0000000020; // Avoid use of trailers -pub const IFF_RUNNING: ::c_int = 0x0000000040; // Resources allocated -pub const IFF_NOARP: ::c_int = 0x0000000080; // No address res. protocol -pub const IFF_PROMISC: ::c_int = 0x0000000100; // Receive all packets -pub const IFF_ALLMULTI: ::c_int = 0x0000000200; // Receive all multicast pkts -pub const IFF_INTELLIGENT: ::c_int = 0x0000000400; // Protocol code on board -pub const IFF_MULTICAST: ::c_int = 0x0000000800; // Supports multicast +pub const IFF_UP: c_int = 0x0000000001; // Address is up +pub const IFF_BROADCAST: c_int = 0x0000000002; // Broadcast address valid +pub const IFF_DEBUG: c_int = 0x0000000004; // Turn on debugging +pub const IFF_LOOPBACK: c_int = 0x0000000008; // Loopback net +pub const IFF_POINTOPOINT: c_int = 0x0000000010; // Interface is p-to-p +pub const IFF_NOTRAILERS: c_int = 0x0000000020; // Avoid use of trailers +pub const IFF_RUNNING: c_int = 0x0000000040; // Resources allocated +pub const IFF_NOARP: c_int = 0x0000000080; // No address res. protocol +pub const IFF_PROMISC: c_int = 0x0000000100; // Receive all packets +pub const IFF_ALLMULTI: c_int = 0x0000000200; // Receive all multicast pkts +pub const IFF_INTELLIGENT: c_int = 0x0000000400; // Protocol code on board +pub const IFF_MULTICAST: c_int = 0x0000000800; // Supports multicast // Multicast using broadcst. add. -pub const IFF_MULTI_BCAST: ::c_int = 0x0000001000; -pub const IFF_UNNUMBERED: ::c_int = 0x0000002000; // Non-unique address -pub const IFF_DHCPRUNNING: ::c_int = 0x0000004000; // DHCP controls interface -pub const IFF_PRIVATE: ::c_int = 0x0000008000; // Do not advertise -pub const IFF_NOXMIT: ::c_int = 0x0000010000; // Do not transmit pkts +pub const IFF_MULTI_BCAST: c_int = 0x0000001000; +pub const IFF_UNNUMBERED: c_int = 0x0000002000; // Non-unique address +pub const IFF_DHCPRUNNING: c_int = 0x0000004000; // DHCP controls interface +pub const IFF_PRIVATE: c_int = 0x0000008000; // Do not advertise +pub const IFF_NOXMIT: c_int = 0x0000010000; // Do not transmit pkts // No address - just on-link subnet -pub const IFF_NOLOCAL: ::c_int = 0x0000020000; -pub const IFF_DEPRECATED: ::c_int = 0x0000040000; // Address is deprecated -pub const IFF_ADDRCONF: ::c_int = 0x0000080000; // Addr. from stateless addrconf -pub const IFF_ROUTER: ::c_int = 0x0000100000; // Router on interface -pub const IFF_NONUD: ::c_int = 0x0000200000; // No NUD on interface -pub const IFF_ANYCAST: ::c_int = 0x0000400000; // Anycast address -pub const IFF_NORTEXCH: ::c_int = 0x0000800000; // Don't xchange rout. info -pub const IFF_IPV4: ::c_int = 0x0001000000; // IPv4 interface -pub const IFF_IPV6: ::c_int = 0x0002000000; // IPv6 interface -pub const IFF_NOFAILOVER: ::c_int = 0x0008000000; // in.mpathd test address -pub const IFF_FAILED: ::c_int = 0x0010000000; // Interface has failed -pub const IFF_STANDBY: ::c_int = 0x0020000000; // Interface is a hot-spare -pub const IFF_INACTIVE: ::c_int = 0x0040000000; // Functioning but not used -pub const IFF_OFFLINE: ::c_int = 0x0080000000; // Interface is offline - // If CoS marking is supported -pub const IFF_COS_ENABLED: ::c_longlong = 0x0200000000; -pub const IFF_PREFERRED: ::c_longlong = 0x0400000000; // Prefer as source addr. -pub const IFF_TEMPORARY: ::c_longlong = 0x0800000000; // RFC3041 -pub const IFF_FIXEDMTU: ::c_longlong = 0x1000000000; // MTU set with SIOCSLIFMTU -pub const IFF_VIRTUAL: ::c_longlong = 0x2000000000; // Cannot send/receive pkts -pub const IFF_DUPLICATE: ::c_longlong = 0x4000000000; // Local address in use -pub const IFF_IPMP: ::c_longlong = 0x8000000000; // IPMP IP interface +pub const IFF_NOLOCAL: c_int = 0x0000020000; +pub const IFF_DEPRECATED: c_int = 0x0000040000; // Address is deprecated +pub const IFF_ADDRCONF: c_int = 0x0000080000; // Addr. from stateless addrconf +pub const IFF_ROUTER: c_int = 0x0000100000; // Router on interface +pub const IFF_NONUD: c_int = 0x0000200000; // No NUD on interface +pub const IFF_ANYCAST: c_int = 0x0000400000; // Anycast address +pub const IFF_NORTEXCH: c_int = 0x0000800000; // Don't xchange rout. info +pub const IFF_IPV4: c_int = 0x0001000000; // IPv4 interface +pub const IFF_IPV6: c_int = 0x0002000000; // IPv6 interface +pub const IFF_NOFAILOVER: c_int = 0x0008000000; // in.mpathd test address +pub const IFF_FAILED: c_int = 0x0010000000; // Interface has failed +pub const IFF_STANDBY: c_int = 0x0020000000; // Interface is a hot-spare +pub const IFF_INACTIVE: c_int = 0x0040000000; // Functioning but not used +pub const IFF_OFFLINE: c_int = 0x0080000000; // Interface is offline + // If CoS marking is supported +pub const IFF_COS_ENABLED: c_longlong = 0x0200000000; +pub const IFF_PREFERRED: c_longlong = 0x0400000000; // Prefer as source addr. +pub const IFF_TEMPORARY: c_longlong = 0x0800000000; // RFC3041 +pub const IFF_FIXEDMTU: c_longlong = 0x1000000000; // MTU set with SIOCSLIFMTU +pub const IFF_VIRTUAL: c_longlong = 0x2000000000; // Cannot send/receive pkts +pub const IFF_DUPLICATE: c_longlong = 0x4000000000; // Local address in use +pub const IFF_IPMP: c_longlong = 0x8000000000; // IPMP IP interface // sys/ipc.h: -pub const IPC_ALLOC: ::c_int = 0x8000; -pub const IPC_CREAT: ::c_int = 0x200; -pub const IPC_EXCL: ::c_int = 0x400; -pub const IPC_NOWAIT: ::c_int = 0x800; +pub const IPC_ALLOC: c_int = 0x8000; +pub const IPC_CREAT: c_int = 0x200; +pub const IPC_EXCL: c_int = 0x400; +pub const IPC_NOWAIT: c_int = 0x800; pub const IPC_PRIVATE: key_t = 0; -pub const IPC_RMID: ::c_int = 10; -pub const IPC_SET: ::c_int = 11; -pub const IPC_SEAT: ::c_int = 12; +pub const IPC_RMID: c_int = 10; +pub const IPC_SET: c_int = 11; +pub const IPC_SEAT: c_int = 12; // sys/shm.h -pub const SHM_R: ::c_int = 0o400; -pub const SHM_W: ::c_int = 0o200; -pub const SHM_RDONLY: ::c_int = 0o10000; -pub const SHM_RND: ::c_int = 0o20000; -pub const SHM_SHARE_MMU: ::c_int = 0o40000; -pub const SHM_PAGEABLE: ::c_int = 0o100000; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const F_RDLCK: ::c_short = 1; -pub const F_WRLCK: ::c_short = 2; -pub const F_UNLCK: ::c_short = 3; - -pub const O_SYNC: ::c_int = 16; -pub const O_NONBLOCK: ::c_int = 128; - -pub const IPPROTO_RAW: ::c_int = 255; - -pub const _PC_LINK_MAX: ::c_int = 1; -pub const _PC_MAX_CANON: ::c_int = 2; -pub const _PC_MAX_INPUT: ::c_int = 3; -pub const _PC_NAME_MAX: ::c_int = 4; -pub const _PC_PATH_MAX: ::c_int = 5; -pub const _PC_PIPE_BUF: ::c_int = 6; -pub const _PC_NO_TRUNC: ::c_int = 7; -pub const _PC_VDISABLE: ::c_int = 8; -pub const _PC_CHOWN_RESTRICTED: ::c_int = 9; -pub const _PC_ASYNC_IO: ::c_int = 10; -pub const _PC_PRIO_IO: ::c_int = 11; -pub const _PC_SYNC_IO: ::c_int = 12; -pub const _PC_ALLOC_SIZE_MIN: ::c_int = 13; -pub const _PC_REC_INCR_XFER_SIZE: ::c_int = 14; -pub const _PC_REC_MAX_XFER_SIZE: ::c_int = 15; -pub const _PC_REC_MIN_XFER_SIZE: ::c_int = 16; -pub const _PC_REC_XFER_ALIGN: ::c_int = 17; -pub const _PC_SYMLINK_MAX: ::c_int = 18; -pub const _PC_2_SYMLINKS: ::c_int = 19; -pub const _PC_ACL_ENABLED: ::c_int = 20; -pub const _PC_MIN_HOLE_SIZE: ::c_int = 21; -pub const _PC_CASE_BEHAVIOR: ::c_int = 22; -pub const _PC_SATTR_ENABLED: ::c_int = 23; -pub const _PC_SATTR_EXISTS: ::c_int = 24; -pub const _PC_ACCESS_FILTERING: ::c_int = 25; -pub const _PC_TIMESTAMP_RESOLUTION: ::c_int = 26; -pub const _PC_FILESIZEBITS: ::c_int = 67; -pub const _PC_XATTR_ENABLED: ::c_int = 100; -pub const _PC_XATTR_EXISTS: ::c_int = 101; - -pub const _POSIX_VDISABLE: ::cc_t = 0; - -pub const _SC_ARG_MAX: ::c_int = 1; -pub const _SC_CHILD_MAX: ::c_int = 2; -pub const _SC_CLK_TCK: ::c_int = 3; -pub const _SC_NGROUPS_MAX: ::c_int = 4; -pub const _SC_OPEN_MAX: ::c_int = 5; -pub const _SC_JOB_CONTROL: ::c_int = 6; -pub const _SC_SAVED_IDS: ::c_int = 7; -pub const _SC_VERSION: ::c_int = 8; -pub const _SC_PASS_MAX: ::c_int = 9; -pub const _SC_LOGNAME_MAX: ::c_int = 10; -pub const _SC_PAGESIZE: ::c_int = 11; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; -pub const _SC_XOPEN_VERSION: ::c_int = 12; -pub const _SC_NPROCESSORS_CONF: ::c_int = 14; -pub const _SC_NPROCESSORS_ONLN: ::c_int = 15; -pub const _SC_STREAM_MAX: ::c_int = 16; -pub const _SC_TZNAME_MAX: ::c_int = 17; -pub const _SC_AIO_LISTIO_MAX: ::c_int = 18; -pub const _SC_AIO_MAX: ::c_int = 19; -pub const _SC_AIO_PRIO_DELTA_MAX: ::c_int = 20; -pub const _SC_ASYNCHRONOUS_IO: ::c_int = 21; -pub const _SC_DELAYTIMER_MAX: ::c_int = 22; -pub const _SC_FSYNC: ::c_int = 23; -pub const _SC_MAPPED_FILES: ::c_int = 24; -pub const _SC_MEMLOCK: ::c_int = 25; -pub const _SC_MEMLOCK_RANGE: ::c_int = 26; -pub const _SC_MEMORY_PROTECTION: ::c_int = 27; -pub const _SC_MESSAGE_PASSING: ::c_int = 28; -pub const _SC_MQ_OPEN_MAX: ::c_int = 29; -pub const _SC_MQ_PRIO_MAX: ::c_int = 30; -pub const _SC_PRIORITIZED_IO: ::c_int = 31; -pub const _SC_PRIORITY_SCHEDULING: ::c_int = 32; -pub const _SC_REALTIME_SIGNALS: ::c_int = 33; -pub const _SC_RTSIG_MAX: ::c_int = 34; -pub const _SC_SEMAPHORES: ::c_int = 35; -pub const _SC_SEM_NSEMS_MAX: ::c_int = 36; -pub const _SC_SEM_VALUE_MAX: ::c_int = 37; -pub const _SC_SHARED_MEMORY_OBJECTS: ::c_int = 38; -pub const _SC_SIGQUEUE_MAX: ::c_int = 39; -pub const _SC_SIGRT_MIN: ::c_int = 40; -pub const _SC_SIGRT_MAX: ::c_int = 41; -pub const _SC_SYNCHRONIZED_IO: ::c_int = 42; -pub const _SC_TIMERS: ::c_int = 43; -pub const _SC_TIMER_MAX: ::c_int = 44; -pub const _SC_2_C_BIND: ::c_int = 45; -pub const _SC_2_C_DEV: ::c_int = 46; -pub const _SC_2_C_VERSION: ::c_int = 47; -pub const _SC_2_FORT_DEV: ::c_int = 48; -pub const _SC_2_FORT_RUN: ::c_int = 49; -pub const _SC_2_LOCALEDEF: ::c_int = 50; -pub const _SC_2_SW_DEV: ::c_int = 51; -pub const _SC_2_UPE: ::c_int = 52; -pub const _SC_2_VERSION: ::c_int = 53; -pub const _SC_BC_BASE_MAX: ::c_int = 54; -pub const _SC_BC_DIM_MAX: ::c_int = 55; -pub const _SC_BC_SCALE_MAX: ::c_int = 56; -pub const _SC_BC_STRING_MAX: ::c_int = 57; -pub const _SC_COLL_WEIGHTS_MAX: ::c_int = 58; -pub const _SC_EXPR_NEST_MAX: ::c_int = 59; -pub const _SC_LINE_MAX: ::c_int = 60; -pub const _SC_RE_DUP_MAX: ::c_int = 61; -pub const _SC_XOPEN_CRYPT: ::c_int = 62; -pub const _SC_XOPEN_ENH_I18N: ::c_int = 63; -pub const _SC_XOPEN_SHM: ::c_int = 64; -pub const _SC_2_CHAR_TERM: ::c_int = 66; -pub const _SC_XOPEN_XCU_VERSION: ::c_int = 67; -pub const _SC_ATEXIT_MAX: ::c_int = 76; -pub const _SC_IOV_MAX: ::c_int = 77; -pub const _SC_XOPEN_UNIX: ::c_int = 78; -pub const _SC_T_IOV_MAX: ::c_int = 79; -pub const _SC_PHYS_PAGES: ::c_int = 500; -pub const _SC_AVPHYS_PAGES: ::c_int = 501; -pub const _SC_COHER_BLKSZ: ::c_int = 503; -pub const _SC_SPLIT_CACHE: ::c_int = 504; -pub const _SC_ICACHE_SZ: ::c_int = 505; -pub const _SC_DCACHE_SZ: ::c_int = 506; -pub const _SC_ICACHE_LINESZ: ::c_int = 507; -pub const _SC_DCACHE_LINESZ: ::c_int = 508; -pub const _SC_ICACHE_BLKSZ: ::c_int = 509; -pub const _SC_DCACHE_BLKSZ: ::c_int = 510; -pub const _SC_DCACHE_TBLKSZ: ::c_int = 511; -pub const _SC_ICACHE_ASSOC: ::c_int = 512; -pub const _SC_DCACHE_ASSOC: ::c_int = 513; -pub const _SC_MAXPID: ::c_int = 514; -pub const _SC_STACK_PROT: ::c_int = 515; -pub const _SC_NPROCESSORS_MAX: ::c_int = 516; -pub const _SC_CPUID_MAX: ::c_int = 517; -pub const _SC_EPHID_MAX: ::c_int = 518; -pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: ::c_int = 568; -pub const _SC_GETGR_R_SIZE_MAX: ::c_int = 569; -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 570; -pub const _SC_LOGIN_NAME_MAX: ::c_int = 571; -pub const _SC_THREAD_KEYS_MAX: ::c_int = 572; -pub const _SC_THREAD_STACK_MIN: ::c_int = 573; -pub const _SC_THREAD_THREADS_MAX: ::c_int = 574; -pub const _SC_TTY_NAME_MAX: ::c_int = 575; -pub const _SC_THREADS: ::c_int = 576; -pub const _SC_THREAD_ATTR_STACKADDR: ::c_int = 577; -pub const _SC_THREAD_ATTR_STACKSIZE: ::c_int = 578; -pub const _SC_THREAD_PRIORITY_SCHEDULING: ::c_int = 579; -pub const _SC_THREAD_PRIO_INHERIT: ::c_int = 580; -pub const _SC_THREAD_PRIO_PROTECT: ::c_int = 581; -pub const _SC_THREAD_PROCESS_SHARED: ::c_int = 582; -pub const _SC_THREAD_SAFE_FUNCTIONS: ::c_int = 583; -pub const _SC_XOPEN_LEGACY: ::c_int = 717; -pub const _SC_XOPEN_REALTIME: ::c_int = 718; -pub const _SC_XOPEN_REALTIME_THREADS: ::c_int = 719; -pub const _SC_XBS5_ILP32_OFF32: ::c_int = 720; -pub const _SC_XBS5_ILP32_OFFBIG: ::c_int = 721; -pub const _SC_XBS5_LP64_OFF64: ::c_int = 722; -pub const _SC_XBS5_LPBIG_OFFBIG: ::c_int = 723; -pub const _SC_2_PBS: ::c_int = 724; -pub const _SC_2_PBS_ACCOUNTING: ::c_int = 725; -pub const _SC_2_PBS_CHECKPOINT: ::c_int = 726; -pub const _SC_2_PBS_LOCATE: ::c_int = 728; -pub const _SC_2_PBS_MESSAGE: ::c_int = 729; -pub const _SC_2_PBS_TRACK: ::c_int = 730; -pub const _SC_ADVISORY_INFO: ::c_int = 731; -pub const _SC_BARRIERS: ::c_int = 732; -pub const _SC_CLOCK_SELECTION: ::c_int = 733; -pub const _SC_CPUTIME: ::c_int = 734; -pub const _SC_HOST_NAME_MAX: ::c_int = 735; -pub const _SC_MONOTONIC_CLOCK: ::c_int = 736; -pub const _SC_READER_WRITER_LOCKS: ::c_int = 737; -pub const _SC_REGEXP: ::c_int = 738; -pub const _SC_SHELL: ::c_int = 739; -pub const _SC_SPAWN: ::c_int = 740; -pub const _SC_SPIN_LOCKS: ::c_int = 741; -pub const _SC_SPORADIC_SERVER: ::c_int = 742; -pub const _SC_SS_REPL_MAX: ::c_int = 743; -pub const _SC_SYMLOOP_MAX: ::c_int = 744; -pub const _SC_THREAD_CPUTIME: ::c_int = 745; -pub const _SC_THREAD_SPORADIC_SERVER: ::c_int = 746; -pub const _SC_TIMEOUTS: ::c_int = 747; -pub const _SC_TRACE: ::c_int = 748; -pub const _SC_TRACE_EVENT_FILTER: ::c_int = 749; -pub const _SC_TRACE_EVENT_NAME_MAX: ::c_int = 750; -pub const _SC_TRACE_INHERIT: ::c_int = 751; -pub const _SC_TRACE_LOG: ::c_int = 752; -pub const _SC_TRACE_NAME_MAX: ::c_int = 753; -pub const _SC_TRACE_SYS_MAX: ::c_int = 754; -pub const _SC_TRACE_USER_EVENT_MAX: ::c_int = 755; -pub const _SC_TYPED_MEMORY_OBJECTS: ::c_int = 756; -pub const _SC_V6_ILP32_OFF32: ::c_int = 757; -pub const _SC_V6_ILP32_OFFBIG: ::c_int = 758; -pub const _SC_V6_LP64_OFF64: ::c_int = 759; -pub const _SC_V6_LPBIG_OFFBIG: ::c_int = 760; -pub const _SC_XOPEN_STREAMS: ::c_int = 761; -pub const _SC_IPV6: ::c_int = 762; -pub const _SC_RAW_SOCKETS: ::c_int = 763; +pub const SHM_R: c_int = 0o400; +pub const SHM_W: c_int = 0o200; +pub const SHM_RDONLY: c_int = 0o10000; +pub const SHM_RND: c_int = 0o20000; +pub const SHM_SHARE_MMU: c_int = 0o40000; +pub const SHM_PAGEABLE: c_int = 0o100000; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const F_RDLCK: c_short = 1; +pub const F_WRLCK: c_short = 2; +pub const F_UNLCK: c_short = 3; + +pub const O_SYNC: c_int = 16; +pub const O_NONBLOCK: c_int = 128; + +pub const IPPROTO_RAW: c_int = 255; + +pub const _PC_LINK_MAX: c_int = 1; +pub const _PC_MAX_CANON: c_int = 2; +pub const _PC_MAX_INPUT: c_int = 3; +pub const _PC_NAME_MAX: c_int = 4; +pub const _PC_PATH_MAX: c_int = 5; +pub const _PC_PIPE_BUF: c_int = 6; +pub const _PC_NO_TRUNC: c_int = 7; +pub const _PC_VDISABLE: c_int = 8; +pub const _PC_CHOWN_RESTRICTED: c_int = 9; +pub const _PC_ASYNC_IO: c_int = 10; +pub const _PC_PRIO_IO: c_int = 11; +pub const _PC_SYNC_IO: c_int = 12; +pub const _PC_ALLOC_SIZE_MIN: c_int = 13; +pub const _PC_REC_INCR_XFER_SIZE: c_int = 14; +pub const _PC_REC_MAX_XFER_SIZE: c_int = 15; +pub const _PC_REC_MIN_XFER_SIZE: c_int = 16; +pub const _PC_REC_XFER_ALIGN: c_int = 17; +pub const _PC_SYMLINK_MAX: c_int = 18; +pub const _PC_2_SYMLINKS: c_int = 19; +pub const _PC_ACL_ENABLED: c_int = 20; +pub const _PC_MIN_HOLE_SIZE: c_int = 21; +pub const _PC_CASE_BEHAVIOR: c_int = 22; +pub const _PC_SATTR_ENABLED: c_int = 23; +pub const _PC_SATTR_EXISTS: c_int = 24; +pub const _PC_ACCESS_FILTERING: c_int = 25; +pub const _PC_TIMESTAMP_RESOLUTION: c_int = 26; +pub const _PC_FILESIZEBITS: c_int = 67; +pub const _PC_XATTR_ENABLED: c_int = 100; +pub const _PC_XATTR_EXISTS: c_int = 101; + +pub const _POSIX_VDISABLE: crate::cc_t = 0; + +pub const _SC_ARG_MAX: c_int = 1; +pub const _SC_CHILD_MAX: c_int = 2; +pub const _SC_CLK_TCK: c_int = 3; +pub const _SC_NGROUPS_MAX: c_int = 4; +pub const _SC_OPEN_MAX: c_int = 5; +pub const _SC_JOB_CONTROL: c_int = 6; +pub const _SC_SAVED_IDS: c_int = 7; +pub const _SC_VERSION: c_int = 8; +pub const _SC_PASS_MAX: c_int = 9; +pub const _SC_LOGNAME_MAX: c_int = 10; +pub const _SC_PAGESIZE: c_int = 11; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; +pub const _SC_XOPEN_VERSION: c_int = 12; +pub const _SC_NPROCESSORS_CONF: c_int = 14; +pub const _SC_NPROCESSORS_ONLN: c_int = 15; +pub const _SC_STREAM_MAX: c_int = 16; +pub const _SC_TZNAME_MAX: c_int = 17; +pub const _SC_AIO_LISTIO_MAX: c_int = 18; +pub const _SC_AIO_MAX: c_int = 19; +pub const _SC_AIO_PRIO_DELTA_MAX: c_int = 20; +pub const _SC_ASYNCHRONOUS_IO: c_int = 21; +pub const _SC_DELAYTIMER_MAX: c_int = 22; +pub const _SC_FSYNC: c_int = 23; +pub const _SC_MAPPED_FILES: c_int = 24; +pub const _SC_MEMLOCK: c_int = 25; +pub const _SC_MEMLOCK_RANGE: c_int = 26; +pub const _SC_MEMORY_PROTECTION: c_int = 27; +pub const _SC_MESSAGE_PASSING: c_int = 28; +pub const _SC_MQ_OPEN_MAX: c_int = 29; +pub const _SC_MQ_PRIO_MAX: c_int = 30; +pub const _SC_PRIORITIZED_IO: c_int = 31; +pub const _SC_PRIORITY_SCHEDULING: c_int = 32; +pub const _SC_REALTIME_SIGNALS: c_int = 33; +pub const _SC_RTSIG_MAX: c_int = 34; +pub const _SC_SEMAPHORES: c_int = 35; +pub const _SC_SEM_NSEMS_MAX: c_int = 36; +pub const _SC_SEM_VALUE_MAX: c_int = 37; +pub const _SC_SHARED_MEMORY_OBJECTS: c_int = 38; +pub const _SC_SIGQUEUE_MAX: c_int = 39; +pub const _SC_SIGRT_MIN: c_int = 40; +pub const _SC_SIGRT_MAX: c_int = 41; +pub const _SC_SYNCHRONIZED_IO: c_int = 42; +pub const _SC_TIMERS: c_int = 43; +pub const _SC_TIMER_MAX: c_int = 44; +pub const _SC_2_C_BIND: c_int = 45; +pub const _SC_2_C_DEV: c_int = 46; +pub const _SC_2_C_VERSION: c_int = 47; +pub const _SC_2_FORT_DEV: c_int = 48; +pub const _SC_2_FORT_RUN: c_int = 49; +pub const _SC_2_LOCALEDEF: c_int = 50; +pub const _SC_2_SW_DEV: c_int = 51; +pub const _SC_2_UPE: c_int = 52; +pub const _SC_2_VERSION: c_int = 53; +pub const _SC_BC_BASE_MAX: c_int = 54; +pub const _SC_BC_DIM_MAX: c_int = 55; +pub const _SC_BC_SCALE_MAX: c_int = 56; +pub const _SC_BC_STRING_MAX: c_int = 57; +pub const _SC_COLL_WEIGHTS_MAX: c_int = 58; +pub const _SC_EXPR_NEST_MAX: c_int = 59; +pub const _SC_LINE_MAX: c_int = 60; +pub const _SC_RE_DUP_MAX: c_int = 61; +pub const _SC_XOPEN_CRYPT: c_int = 62; +pub const _SC_XOPEN_ENH_I18N: c_int = 63; +pub const _SC_XOPEN_SHM: c_int = 64; +pub const _SC_2_CHAR_TERM: c_int = 66; +pub const _SC_XOPEN_XCU_VERSION: c_int = 67; +pub const _SC_ATEXIT_MAX: c_int = 76; +pub const _SC_IOV_MAX: c_int = 77; +pub const _SC_XOPEN_UNIX: c_int = 78; +pub const _SC_T_IOV_MAX: c_int = 79; +pub const _SC_PHYS_PAGES: c_int = 500; +pub const _SC_AVPHYS_PAGES: c_int = 501; +pub const _SC_COHER_BLKSZ: c_int = 503; +pub const _SC_SPLIT_CACHE: c_int = 504; +pub const _SC_ICACHE_SZ: c_int = 505; +pub const _SC_DCACHE_SZ: c_int = 506; +pub const _SC_ICACHE_LINESZ: c_int = 507; +pub const _SC_DCACHE_LINESZ: c_int = 508; +pub const _SC_ICACHE_BLKSZ: c_int = 509; +pub const _SC_DCACHE_BLKSZ: c_int = 510; +pub const _SC_DCACHE_TBLKSZ: c_int = 511; +pub const _SC_ICACHE_ASSOC: c_int = 512; +pub const _SC_DCACHE_ASSOC: c_int = 513; +pub const _SC_MAXPID: c_int = 514; +pub const _SC_STACK_PROT: c_int = 515; +pub const _SC_NPROCESSORS_MAX: c_int = 516; +pub const _SC_CPUID_MAX: c_int = 517; +pub const _SC_EPHID_MAX: c_int = 518; +pub const _SC_THREAD_DESTRUCTOR_ITERATIONS: c_int = 568; +pub const _SC_GETGR_R_SIZE_MAX: c_int = 569; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 570; +pub const _SC_LOGIN_NAME_MAX: c_int = 571; +pub const _SC_THREAD_KEYS_MAX: c_int = 572; +pub const _SC_THREAD_STACK_MIN: c_int = 573; +pub const _SC_THREAD_THREADS_MAX: c_int = 574; +pub const _SC_TTY_NAME_MAX: c_int = 575; +pub const _SC_THREADS: c_int = 576; +pub const _SC_THREAD_ATTR_STACKADDR: c_int = 577; +pub const _SC_THREAD_ATTR_STACKSIZE: c_int = 578; +pub const _SC_THREAD_PRIORITY_SCHEDULING: c_int = 579; +pub const _SC_THREAD_PRIO_INHERIT: c_int = 580; +pub const _SC_THREAD_PRIO_PROTECT: c_int = 581; +pub const _SC_THREAD_PROCESS_SHARED: c_int = 582; +pub const _SC_THREAD_SAFE_FUNCTIONS: c_int = 583; +pub const _SC_XOPEN_LEGACY: c_int = 717; +pub const _SC_XOPEN_REALTIME: c_int = 718; +pub const _SC_XOPEN_REALTIME_THREADS: c_int = 719; +pub const _SC_XBS5_ILP32_OFF32: c_int = 720; +pub const _SC_XBS5_ILP32_OFFBIG: c_int = 721; +pub const _SC_XBS5_LP64_OFF64: c_int = 722; +pub const _SC_XBS5_LPBIG_OFFBIG: c_int = 723; +pub const _SC_2_PBS: c_int = 724; +pub const _SC_2_PBS_ACCOUNTING: c_int = 725; +pub const _SC_2_PBS_CHECKPOINT: c_int = 726; +pub const _SC_2_PBS_LOCATE: c_int = 728; +pub const _SC_2_PBS_MESSAGE: c_int = 729; +pub const _SC_2_PBS_TRACK: c_int = 730; +pub const _SC_ADVISORY_INFO: c_int = 731; +pub const _SC_BARRIERS: c_int = 732; +pub const _SC_CLOCK_SELECTION: c_int = 733; +pub const _SC_CPUTIME: c_int = 734; +pub const _SC_HOST_NAME_MAX: c_int = 735; +pub const _SC_MONOTONIC_CLOCK: c_int = 736; +pub const _SC_READER_WRITER_LOCKS: c_int = 737; +pub const _SC_REGEXP: c_int = 738; +pub const _SC_SHELL: c_int = 739; +pub const _SC_SPAWN: c_int = 740; +pub const _SC_SPIN_LOCKS: c_int = 741; +pub const _SC_SPORADIC_SERVER: c_int = 742; +pub const _SC_SS_REPL_MAX: c_int = 743; +pub const _SC_SYMLOOP_MAX: c_int = 744; +pub const _SC_THREAD_CPUTIME: c_int = 745; +pub const _SC_THREAD_SPORADIC_SERVER: c_int = 746; +pub const _SC_TIMEOUTS: c_int = 747; +pub const _SC_TRACE: c_int = 748; +pub const _SC_TRACE_EVENT_FILTER: c_int = 749; +pub const _SC_TRACE_EVENT_NAME_MAX: c_int = 750; +pub const _SC_TRACE_INHERIT: c_int = 751; +pub const _SC_TRACE_LOG: c_int = 752; +pub const _SC_TRACE_NAME_MAX: c_int = 753; +pub const _SC_TRACE_SYS_MAX: c_int = 754; +pub const _SC_TRACE_USER_EVENT_MAX: c_int = 755; +pub const _SC_TYPED_MEMORY_OBJECTS: c_int = 756; +pub const _SC_V6_ILP32_OFF32: c_int = 757; +pub const _SC_V6_ILP32_OFFBIG: c_int = 758; +pub const _SC_V6_LP64_OFF64: c_int = 759; +pub const _SC_V6_LPBIG_OFFBIG: c_int = 760; +pub const _SC_XOPEN_STREAMS: c_int = 761; +pub const _SC_IPV6: c_int = 762; +pub const _SC_RAW_SOCKETS: c_int = 763; pub const _MUTEX_MAGIC: u16 = 0x4d58; // MX pub const _COND_MAGIC: u16 = 0x4356; // CV @@ -2031,7 +2035,7 @@ pub const _RWL_MAGIC: u16 = 0x5257; // RW pub const NCCS: usize = 19; -pub const LOG_CRON: ::c_int = 15 << 3; +pub const LOG_CRON: c_int = 15 << 3; pub const PTHREAD_MUTEX_INITIALIZER: pthread_mutex_t = pthread_mutex_t { __pthread_mutex_flag1: 0, @@ -2056,134 +2060,134 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { __pthread_rwlock_readercv: PTHREAD_COND_INITIALIZER, __pthread_rwlock_writercv: PTHREAD_COND_INITIALIZER, }; -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -pub const PTHREAD_MUTEX_ERRORCHECK: ::c_int = 2; -pub const PTHREAD_MUTEX_RECURSIVE: ::c_int = 4; -pub const PTHREAD_MUTEX_DEFAULT: ::c_int = ::PTHREAD_MUTEX_NORMAL; - -pub const RTLD_NEXT: *mut ::c_void = -1isize as *mut ::c_void; -pub const RTLD_DEFAULT: *mut ::c_void = -2isize as *mut ::c_void; -pub const RTLD_SELF: *mut ::c_void = -3isize as *mut ::c_void; -pub const RTLD_PROBE: *mut ::c_void = -4isize as *mut ::c_void; - -pub const RTLD_LAZY: ::c_int = 0x1; -pub const RTLD_NOW: ::c_int = 0x2; -pub const RTLD_NOLOAD: ::c_int = 0x4; -pub const RTLD_GLOBAL: ::c_int = 0x100; -pub const RTLD_LOCAL: ::c_int = 0x0; -pub const RTLD_PARENT: ::c_int = 0x200; -pub const RTLD_GROUP: ::c_int = 0x400; -pub const RTLD_WORLD: ::c_int = 0x800; -pub const RTLD_NODELETE: ::c_int = 0x1000; -pub const RTLD_FIRST: ::c_int = 0x2000; -pub const RTLD_CONFGEN: ::c_int = 0x10000; - -pub const PORT_SOURCE_AIO: ::c_int = 1; -pub const PORT_SOURCE_TIMER: ::c_int = 2; -pub const PORT_SOURCE_USER: ::c_int = 3; -pub const PORT_SOURCE_FD: ::c_int = 4; -pub const PORT_SOURCE_ALERT: ::c_int = 5; -pub const PORT_SOURCE_MQ: ::c_int = 6; -pub const PORT_SOURCE_FILE: ::c_int = 7; - -pub const NONROOT_USR: ::c_short = 2; - -pub const EMPTY: ::c_short = 0; -pub const RUN_LVL: ::c_short = 1; -pub const BOOT_TIME: ::c_short = 2; -pub const OLD_TIME: ::c_short = 3; -pub const NEW_TIME: ::c_short = 4; -pub const INIT_PROCESS: ::c_short = 5; -pub const LOGIN_PROCESS: ::c_short = 6; -pub const USER_PROCESS: ::c_short = 7; -pub const DEAD_PROCESS: ::c_short = 8; -pub const ACCOUNTING: ::c_short = 9; -pub const DOWN_TIME: ::c_short = 10; - -const _TIOC: ::c_int = ('T' as i32) << 8; -const tIOC: ::c_int = ('t' as i32) << 8; -pub const TCGETA: ::c_int = _TIOC | 1; -pub const TCSETA: ::c_int = _TIOC | 2; -pub const TCSETAW: ::c_int = _TIOC | 3; -pub const TCSETAF: ::c_int = _TIOC | 4; -pub const TCSBRK: ::c_int = _TIOC | 5; -pub const TCXONC: ::c_int = _TIOC | 6; -pub const TCFLSH: ::c_int = _TIOC | 7; -pub const TCDSET: ::c_int = _TIOC | 32; -pub const TCGETS: ::c_int = _TIOC | 13; -pub const TCSETS: ::c_int = _TIOC | 14; -pub const TCSANOW: ::c_int = _TIOC | 14; -pub const TCSETSW: ::c_int = _TIOC | 15; -pub const TCSADRAIN: ::c_int = _TIOC | 15; -pub const TCSETSF: ::c_int = _TIOC | 16; -pub const TCSAFLUSH: ::c_int = _TIOC | 16; -pub const TCIFLUSH: ::c_int = 0; -pub const TCOFLUSH: ::c_int = 1; -pub const TCIOFLUSH: ::c_int = 2; -pub const TCOOFF: ::c_int = 0; -pub const TCOON: ::c_int = 1; -pub const TCIOFF: ::c_int = 2; -pub const TCION: ::c_int = 3; -pub const TIOC: ::c_int = _TIOC; -pub const TIOCKBON: ::c_int = _TIOC | 8; -pub const TIOCKBOF: ::c_int = _TIOC | 9; -pub const TIOCGWINSZ: ::c_int = _TIOC | 104; -pub const TIOCSWINSZ: ::c_int = _TIOC | 103; -pub const TIOCGSOFTCAR: ::c_int = _TIOC | 105; -pub const TIOCSSOFTCAR: ::c_int = _TIOC | 106; -pub const TIOCGPPS: ::c_int = _TIOC | 125; -pub const TIOCSPPS: ::c_int = _TIOC | 126; -pub const TIOCGPPSEV: ::c_int = _TIOC | 127; -pub const TIOCGETD: ::c_int = tIOC | 0; -pub const TIOCSETD: ::c_int = tIOC | 1; -pub const TIOCHPCL: ::c_int = tIOC | 2; -pub const TIOCGETP: ::c_int = tIOC | 8; -pub const TIOCSETP: ::c_int = tIOC | 9; -pub const TIOCSETN: ::c_int = tIOC | 10; -pub const TIOCEXCL: ::c_int = tIOC | 13; -pub const TIOCNXCL: ::c_int = tIOC | 14; -pub const TIOCFLUSH: ::c_int = tIOC | 16; -pub const TIOCSETC: ::c_int = tIOC | 17; -pub const TIOCGETC: ::c_int = tIOC | 18; -pub const TIOCLBIS: ::c_int = tIOC | 127; -pub const TIOCLBIC: ::c_int = tIOC | 126; -pub const TIOCLSET: ::c_int = tIOC | 125; -pub const TIOCLGET: ::c_int = tIOC | 124; -pub const TIOCSBRK: ::c_int = tIOC | 123; -pub const TIOCCBRK: ::c_int = tIOC | 122; -pub const TIOCSDTR: ::c_int = tIOC | 121; -pub const TIOCCDTR: ::c_int = tIOC | 120; -pub const TIOCSLTC: ::c_int = tIOC | 117; -pub const TIOCGLTC: ::c_int = tIOC | 116; -pub const TIOCOUTQ: ::c_int = tIOC | 115; -pub const TIOCNOTTY: ::c_int = tIOC | 113; -pub const TIOCSCTTY: ::c_int = tIOC | 132; -pub const TIOCSTOP: ::c_int = tIOC | 111; -pub const TIOCSTART: ::c_int = tIOC | 110; -pub const TIOCSILOOP: ::c_int = tIOC | 109; -pub const TIOCCILOOP: ::c_int = tIOC | 108; -pub const TIOCGPGRP: ::c_int = tIOC | 20; -pub const TIOCSPGRP: ::c_int = tIOC | 21; -pub const TIOCGSID: ::c_int = tIOC | 22; -pub const TIOCSTI: ::c_int = tIOC | 23; -pub const TIOCMSET: ::c_int = tIOC | 26; -pub const TIOCMBIS: ::c_int = tIOC | 27; -pub const TIOCMBIC: ::c_int = tIOC | 28; -pub const TIOCMGET: ::c_int = tIOC | 29; -pub const TIOCREMOTE: ::c_int = tIOC | 30; -pub const TIOCSIGNAL: ::c_int = tIOC | 31; - -pub const TIOCM_LE: ::c_int = 0o0001; -pub const TIOCM_DTR: ::c_int = 0o0002; -pub const TIOCM_RTS: ::c_int = 0o0004; -pub const TIOCM_ST: ::c_int = 0o0010; -pub const TIOCM_SR: ::c_int = 0o0020; -pub const TIOCM_CTS: ::c_int = 0o0040; -pub const TIOCM_CAR: ::c_int = 0o0100; -pub const TIOCM_CD: ::c_int = TIOCM_CAR; -pub const TIOCM_RNG: ::c_int = 0o0200; -pub const TIOCM_RI: ::c_int = TIOCM_RNG; -pub const TIOCM_DSR: ::c_int = 0o0400; +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +pub const PTHREAD_MUTEX_ERRORCHECK: c_int = 2; +pub const PTHREAD_MUTEX_RECURSIVE: c_int = 4; +pub const PTHREAD_MUTEX_DEFAULT: c_int = crate::PTHREAD_MUTEX_NORMAL; + +pub const RTLD_NEXT: *mut c_void = -1isize as *mut c_void; +pub const RTLD_DEFAULT: *mut c_void = -2isize as *mut c_void; +pub const RTLD_SELF: *mut c_void = -3isize as *mut c_void; +pub const RTLD_PROBE: *mut c_void = -4isize as *mut c_void; + +pub const RTLD_LAZY: c_int = 0x1; +pub const RTLD_NOW: c_int = 0x2; +pub const RTLD_NOLOAD: c_int = 0x4; +pub const RTLD_GLOBAL: c_int = 0x100; +pub const RTLD_LOCAL: c_int = 0x0; +pub const RTLD_PARENT: c_int = 0x200; +pub const RTLD_GROUP: c_int = 0x400; +pub const RTLD_WORLD: c_int = 0x800; +pub const RTLD_NODELETE: c_int = 0x1000; +pub const RTLD_FIRST: c_int = 0x2000; +pub const RTLD_CONFGEN: c_int = 0x10000; + +pub const PORT_SOURCE_AIO: c_int = 1; +pub const PORT_SOURCE_TIMER: c_int = 2; +pub const PORT_SOURCE_USER: c_int = 3; +pub const PORT_SOURCE_FD: c_int = 4; +pub const PORT_SOURCE_ALERT: c_int = 5; +pub const PORT_SOURCE_MQ: c_int = 6; +pub const PORT_SOURCE_FILE: c_int = 7; + +pub const NONROOT_USR: c_short = 2; + +pub const EMPTY: c_short = 0; +pub const RUN_LVL: c_short = 1; +pub const BOOT_TIME: c_short = 2; +pub const OLD_TIME: c_short = 3; +pub const NEW_TIME: c_short = 4; +pub const INIT_PROCESS: c_short = 5; +pub const LOGIN_PROCESS: c_short = 6; +pub const USER_PROCESS: c_short = 7; +pub const DEAD_PROCESS: c_short = 8; +pub const ACCOUNTING: c_short = 9; +pub const DOWN_TIME: c_short = 10; + +const _TIOC: c_int = ('T' as i32) << 8; +const tIOC: c_int = ('t' as i32) << 8; +pub const TCGETA: c_int = _TIOC | 1; +pub const TCSETA: c_int = _TIOC | 2; +pub const TCSETAW: c_int = _TIOC | 3; +pub const TCSETAF: c_int = _TIOC | 4; +pub const TCSBRK: c_int = _TIOC | 5; +pub const TCXONC: c_int = _TIOC | 6; +pub const TCFLSH: c_int = _TIOC | 7; +pub const TCDSET: c_int = _TIOC | 32; +pub const TCGETS: c_int = _TIOC | 13; +pub const TCSETS: c_int = _TIOC | 14; +pub const TCSANOW: c_int = _TIOC | 14; +pub const TCSETSW: c_int = _TIOC | 15; +pub const TCSADRAIN: c_int = _TIOC | 15; +pub const TCSETSF: c_int = _TIOC | 16; +pub const TCSAFLUSH: c_int = _TIOC | 16; +pub const TCIFLUSH: c_int = 0; +pub const TCOFLUSH: c_int = 1; +pub const TCIOFLUSH: c_int = 2; +pub const TCOOFF: c_int = 0; +pub const TCOON: c_int = 1; +pub const TCIOFF: c_int = 2; +pub const TCION: c_int = 3; +pub const TIOC: c_int = _TIOC; +pub const TIOCKBON: c_int = _TIOC | 8; +pub const TIOCKBOF: c_int = _TIOC | 9; +pub const TIOCGWINSZ: c_int = _TIOC | 104; +pub const TIOCSWINSZ: c_int = _TIOC | 103; +pub const TIOCGSOFTCAR: c_int = _TIOC | 105; +pub const TIOCSSOFTCAR: c_int = _TIOC | 106; +pub const TIOCGPPS: c_int = _TIOC | 125; +pub const TIOCSPPS: c_int = _TIOC | 126; +pub const TIOCGPPSEV: c_int = _TIOC | 127; +pub const TIOCGETD: c_int = tIOC | 0; +pub const TIOCSETD: c_int = tIOC | 1; +pub const TIOCHPCL: c_int = tIOC | 2; +pub const TIOCGETP: c_int = tIOC | 8; +pub const TIOCSETP: c_int = tIOC | 9; +pub const TIOCSETN: c_int = tIOC | 10; +pub const TIOCEXCL: c_int = tIOC | 13; +pub const TIOCNXCL: c_int = tIOC | 14; +pub const TIOCFLUSH: c_int = tIOC | 16; +pub const TIOCSETC: c_int = tIOC | 17; +pub const TIOCGETC: c_int = tIOC | 18; +pub const TIOCLBIS: c_int = tIOC | 127; +pub const TIOCLBIC: c_int = tIOC | 126; +pub const TIOCLSET: c_int = tIOC | 125; +pub const TIOCLGET: c_int = tIOC | 124; +pub const TIOCSBRK: c_int = tIOC | 123; +pub const TIOCCBRK: c_int = tIOC | 122; +pub const TIOCSDTR: c_int = tIOC | 121; +pub const TIOCCDTR: c_int = tIOC | 120; +pub const TIOCSLTC: c_int = tIOC | 117; +pub const TIOCGLTC: c_int = tIOC | 116; +pub const TIOCOUTQ: c_int = tIOC | 115; +pub const TIOCNOTTY: c_int = tIOC | 113; +pub const TIOCSCTTY: c_int = tIOC | 132; +pub const TIOCSTOP: c_int = tIOC | 111; +pub const TIOCSTART: c_int = tIOC | 110; +pub const TIOCSILOOP: c_int = tIOC | 109; +pub const TIOCCILOOP: c_int = tIOC | 108; +pub const TIOCGPGRP: c_int = tIOC | 20; +pub const TIOCSPGRP: c_int = tIOC | 21; +pub const TIOCGSID: c_int = tIOC | 22; +pub const TIOCSTI: c_int = tIOC | 23; +pub const TIOCMSET: c_int = tIOC | 26; +pub const TIOCMBIS: c_int = tIOC | 27; +pub const TIOCMBIC: c_int = tIOC | 28; +pub const TIOCMGET: c_int = tIOC | 29; +pub const TIOCREMOTE: c_int = tIOC | 30; +pub const TIOCSIGNAL: c_int = tIOC | 31; + +pub const TIOCM_LE: c_int = 0o0001; +pub const TIOCM_DTR: c_int = 0o0002; +pub const TIOCM_RTS: c_int = 0o0004; +pub const TIOCM_ST: c_int = 0o0010; +pub const TIOCM_SR: c_int = 0o0020; +pub const TIOCM_CTS: c_int = 0o0040; +pub const TIOCM_CAR: c_int = 0o0100; +pub const TIOCM_CD: c_int = TIOCM_CAR; +pub const TIOCM_RNG: c_int = 0o0200; +pub const TIOCM_RI: c_int = TIOCM_RNG; +pub const TIOCM_DSR: c_int = 0o0400; /* termios */ pub const B0: speed_t = 0; @@ -2210,64 +2214,64 @@ pub const B230400: speed_t = 20; pub const B307200: speed_t = 21; pub const B460800: speed_t = 22; pub const B921600: speed_t = 23; -pub const CSTART: ::tcflag_t = 0o21; -pub const CSTOP: ::tcflag_t = 0o23; -pub const CSWTCH: ::tcflag_t = 0o32; -pub const CBAUD: ::tcflag_t = 0o17; -pub const CIBAUD: ::tcflag_t = 0o3600000; -pub const CBAUDEXT: ::tcflag_t = 0o10000000; -pub const CIBAUDEXT: ::tcflag_t = 0o20000000; -pub const CSIZE: ::tcflag_t = 0o000060; -pub const CS5: ::tcflag_t = 0; -pub const CS6: ::tcflag_t = 0o000020; -pub const CS7: ::tcflag_t = 0o000040; -pub const CS8: ::tcflag_t = 0o000060; -pub const CSTOPB: ::tcflag_t = 0o000100; -pub const ECHO: ::tcflag_t = 0o000010; -pub const ECHOE: ::tcflag_t = 0o000020; -pub const ECHOK: ::tcflag_t = 0o000040; -pub const ECHONL: ::tcflag_t = 0o000100; -pub const ECHOCTL: ::tcflag_t = 0o001000; -pub const ECHOPRT: ::tcflag_t = 0o002000; -pub const ECHOKE: ::tcflag_t = 0o004000; -pub const EXTPROC: ::tcflag_t = 0o200000; -pub const IGNBRK: ::tcflag_t = 0o000001; -pub const BRKINT: ::tcflag_t = 0o000002; -pub const IGNPAR: ::tcflag_t = 0o000004; -pub const PARMRK: ::tcflag_t = 0o000010; -pub const INPCK: ::tcflag_t = 0o000020; -pub const ISTRIP: ::tcflag_t = 0o000040; -pub const INLCR: ::tcflag_t = 0o000100; -pub const IGNCR: ::tcflag_t = 0o000200; -pub const ICRNL: ::tcflag_t = 0o000400; -pub const IUCLC: ::tcflag_t = 0o001000; -pub const IXON: ::tcflag_t = 0o002000; -pub const IXOFF: ::tcflag_t = 0o010000; -pub const IXANY: ::tcflag_t = 0o004000; -pub const IMAXBEL: ::tcflag_t = 0o020000; -pub const DOSMODE: ::tcflag_t = 0o100000; -pub const OPOST: ::tcflag_t = 0o000001; -pub const OLCUC: ::tcflag_t = 0o000002; -pub const ONLCR: ::tcflag_t = 0o000004; -pub const OCRNL: ::tcflag_t = 0o000010; -pub const ONOCR: ::tcflag_t = 0o000020; -pub const ONLRET: ::tcflag_t = 0o000040; -pub const OFILL: ::tcflag_t = 0o0000100; -pub const OFDEL: ::tcflag_t = 0o0000200; -pub const CREAD: ::tcflag_t = 0o000200; -pub const PARENB: ::tcflag_t = 0o000400; -pub const PARODD: ::tcflag_t = 0o001000; -pub const HUPCL: ::tcflag_t = 0o002000; -pub const CLOCAL: ::tcflag_t = 0o004000; -pub const CRTSXOFF: ::tcflag_t = 0o10000000000; -pub const CRTSCTS: ::tcflag_t = 0o20000000000; -pub const ISIG: ::tcflag_t = 0o000001; -pub const ICANON: ::tcflag_t = 0o000002; -pub const IEXTEN: ::tcflag_t = 0o100000; -pub const TOSTOP: ::tcflag_t = 0o000400; -pub const FLUSHO: ::tcflag_t = 0o020000; -pub const PENDIN: ::tcflag_t = 0o040000; -pub const NOFLSH: ::tcflag_t = 0o000200; +pub const CSTART: crate::tcflag_t = 0o21; +pub const CSTOP: crate::tcflag_t = 0o23; +pub const CSWTCH: crate::tcflag_t = 0o32; +pub const CBAUD: crate::tcflag_t = 0o17; +pub const CIBAUD: crate::tcflag_t = 0o3600000; +pub const CBAUDEXT: crate::tcflag_t = 0o10000000; +pub const CIBAUDEXT: crate::tcflag_t = 0o20000000; +pub const CSIZE: crate::tcflag_t = 0o000060; +pub const CS5: crate::tcflag_t = 0; +pub const CS6: crate::tcflag_t = 0o000020; +pub const CS7: crate::tcflag_t = 0o000040; +pub const CS8: crate::tcflag_t = 0o000060; +pub const CSTOPB: crate::tcflag_t = 0o000100; +pub const ECHO: crate::tcflag_t = 0o000010; +pub const ECHOE: crate::tcflag_t = 0o000020; +pub const ECHOK: crate::tcflag_t = 0o000040; +pub const ECHONL: crate::tcflag_t = 0o000100; +pub const ECHOCTL: crate::tcflag_t = 0o001000; +pub const ECHOPRT: crate::tcflag_t = 0o002000; +pub const ECHOKE: crate::tcflag_t = 0o004000; +pub const EXTPROC: crate::tcflag_t = 0o200000; +pub const IGNBRK: crate::tcflag_t = 0o000001; +pub const BRKINT: crate::tcflag_t = 0o000002; +pub const IGNPAR: crate::tcflag_t = 0o000004; +pub const PARMRK: crate::tcflag_t = 0o000010; +pub const INPCK: crate::tcflag_t = 0o000020; +pub const ISTRIP: crate::tcflag_t = 0o000040; +pub const INLCR: crate::tcflag_t = 0o000100; +pub const IGNCR: crate::tcflag_t = 0o000200; +pub const ICRNL: crate::tcflag_t = 0o000400; +pub const IUCLC: crate::tcflag_t = 0o001000; +pub const IXON: crate::tcflag_t = 0o002000; +pub const IXOFF: crate::tcflag_t = 0o010000; +pub const IXANY: crate::tcflag_t = 0o004000; +pub const IMAXBEL: crate::tcflag_t = 0o020000; +pub const DOSMODE: crate::tcflag_t = 0o100000; +pub const OPOST: crate::tcflag_t = 0o000001; +pub const OLCUC: crate::tcflag_t = 0o000002; +pub const ONLCR: crate::tcflag_t = 0o000004; +pub const OCRNL: crate::tcflag_t = 0o000010; +pub const ONOCR: crate::tcflag_t = 0o000020; +pub const ONLRET: crate::tcflag_t = 0o000040; +pub const OFILL: crate::tcflag_t = 0o0000100; +pub const OFDEL: crate::tcflag_t = 0o0000200; +pub const CREAD: crate::tcflag_t = 0o000200; +pub const PARENB: crate::tcflag_t = 0o000400; +pub const PARODD: crate::tcflag_t = 0o001000; +pub const HUPCL: crate::tcflag_t = 0o002000; +pub const CLOCAL: crate::tcflag_t = 0o004000; +pub const CRTSXOFF: crate::tcflag_t = 0o10000000000; +pub const CRTSCTS: crate::tcflag_t = 0o20000000000; +pub const ISIG: crate::tcflag_t = 0o000001; +pub const ICANON: crate::tcflag_t = 0o000002; +pub const IEXTEN: crate::tcflag_t = 0o100000; +pub const TOSTOP: crate::tcflag_t = 0o000400; +pub const FLUSHO: crate::tcflag_t = 0o020000; +pub const PENDIN: crate::tcflag_t = 0o040000; +pub const NOFLSH: crate::tcflag_t = 0o000200; pub const VINTR: usize = 0; pub const VQUIT: usize = 1; pub const VERASE: usize = 2; @@ -2288,67 +2292,67 @@ pub const VWERASE: usize = 14; pub const VLNEXT: usize = 15; // -const STR: ::c_int = (b'S' as ::c_int) << 8; -pub const I_NREAD: ::c_int = STR | 0o1; -pub const I_PUSH: ::c_int = STR | 0o2; -pub const I_POP: ::c_int = STR | 0o3; -pub const I_LOOK: ::c_int = STR | 0o4; -pub const I_FLUSH: ::c_int = STR | 0o5; -pub const I_SRDOPT: ::c_int = STR | 0o6; -pub const I_GRDOPT: ::c_int = STR | 0o7; -pub const I_STR: ::c_int = STR | 0o10; -pub const I_SETSIG: ::c_int = STR | 0o11; -pub const I_GETSIG: ::c_int = STR | 0o12; -pub const I_FIND: ::c_int = STR | 0o13; -pub const I_LINK: ::c_int = STR | 0o14; -pub const I_UNLINK: ::c_int = STR | 0o15; -pub const I_PEEK: ::c_int = STR | 0o17; -pub const I_FDINSERT: ::c_int = STR | 0o20; -pub const I_SENDFD: ::c_int = STR | 0o21; -pub const I_RECVFD: ::c_int = STR | 0o16; -pub const I_SWROPT: ::c_int = STR | 0o23; -pub const I_GWROPT: ::c_int = STR | 0o24; -pub const I_LIST: ::c_int = STR | 0o25; -pub const I_PLINK: ::c_int = STR | 0o26; -pub const I_PUNLINK: ::c_int = STR | 0o27; -pub const I_ANCHOR: ::c_int = STR | 0o30; -pub const I_FLUSHBAND: ::c_int = STR | 0o34; -pub const I_CKBAND: ::c_int = STR | 0o35; -pub const I_GETBAND: ::c_int = STR | 0o36; -pub const I_ATMARK: ::c_int = STR | 0o37; -pub const I_SETCLTIME: ::c_int = STR | 0o40; -pub const I_GETCLTIME: ::c_int = STR | 0o41; -pub const I_CANPUT: ::c_int = STR | 0o42; -pub const I_SERROPT: ::c_int = STR | 0o43; -pub const I_GERROPT: ::c_int = STR | 0o44; -pub const I_ESETSIG: ::c_int = STR | 0o45; -pub const I_EGETSIG: ::c_int = STR | 0o46; -pub const __I_PUSH_NOCTTY: ::c_int = STR | 0o47; +const STR: c_int = (b'S' as c_int) << 8; +pub const I_NREAD: c_int = STR | 0o1; +pub const I_PUSH: c_int = STR | 0o2; +pub const I_POP: c_int = STR | 0o3; +pub const I_LOOK: c_int = STR | 0o4; +pub const I_FLUSH: c_int = STR | 0o5; +pub const I_SRDOPT: c_int = STR | 0o6; +pub const I_GRDOPT: c_int = STR | 0o7; +pub const I_STR: c_int = STR | 0o10; +pub const I_SETSIG: c_int = STR | 0o11; +pub const I_GETSIG: c_int = STR | 0o12; +pub const I_FIND: c_int = STR | 0o13; +pub const I_LINK: c_int = STR | 0o14; +pub const I_UNLINK: c_int = STR | 0o15; +pub const I_PEEK: c_int = STR | 0o17; +pub const I_FDINSERT: c_int = STR | 0o20; +pub const I_SENDFD: c_int = STR | 0o21; +pub const I_RECVFD: c_int = STR | 0o16; +pub const I_SWROPT: c_int = STR | 0o23; +pub const I_GWROPT: c_int = STR | 0o24; +pub const I_LIST: c_int = STR | 0o25; +pub const I_PLINK: c_int = STR | 0o26; +pub const I_PUNLINK: c_int = STR | 0o27; +pub const I_ANCHOR: c_int = STR | 0o30; +pub const I_FLUSHBAND: c_int = STR | 0o34; +pub const I_CKBAND: c_int = STR | 0o35; +pub const I_GETBAND: c_int = STR | 0o36; +pub const I_ATMARK: c_int = STR | 0o37; +pub const I_SETCLTIME: c_int = STR | 0o40; +pub const I_GETCLTIME: c_int = STR | 0o41; +pub const I_CANPUT: c_int = STR | 0o42; +pub const I_SERROPT: c_int = STR | 0o43; +pub const I_GERROPT: c_int = STR | 0o44; +pub const I_ESETSIG: c_int = STR | 0o45; +pub const I_EGETSIG: c_int = STR | 0o46; +pub const __I_PUSH_NOCTTY: c_int = STR | 0o47; // 3SOCKET flags -pub const SOCK_CLOEXEC: ::c_int = 0x080000; -pub const SOCK_NONBLOCK: ::c_int = 0x100000; -pub const SOCK_NDELAY: ::c_int = 0x200000; +pub const SOCK_CLOEXEC: c_int = 0x080000; +pub const SOCK_NONBLOCK: c_int = 0x100000; +pub const SOCK_NDELAY: c_int = 0x200000; // -pub const SCALE_KG: ::c_int = 1 << 6; -pub const SCALE_KF: ::c_int = 1 << 16; -pub const SCALE_KH: ::c_int = 1 << 2; -pub const MAXTC: ::c_int = 1 << 6; -pub const SCALE_PHASE: ::c_int = 1 << 22; -pub const SCALE_USEC: ::c_int = 1 << 16; -pub const SCALE_UPDATE: ::c_int = SCALE_KG * MAXTC; -pub const FINEUSEC: ::c_int = 1 << 22; -pub const MAXPHASE: ::c_int = 512000; -pub const MAXFREQ: ::c_int = 512 * SCALE_USEC; -pub const MAXTIME: ::c_int = 200 << PPS_AVG; -pub const MINSEC: ::c_int = 16; -pub const MAXSEC: ::c_int = 1200; -pub const PPS_AVG: ::c_int = 2; -pub const PPS_SHIFT: ::c_int = 2; -pub const PPS_SHIFTMAX: ::c_int = 8; -pub const PPS_VALID: ::c_int = 120; -pub const MAXGLITCH: ::c_int = 30; +pub const SCALE_KG: c_int = 1 << 6; +pub const SCALE_KF: c_int = 1 << 16; +pub const SCALE_KH: c_int = 1 << 2; +pub const MAXTC: c_int = 1 << 6; +pub const SCALE_PHASE: c_int = 1 << 22; +pub const SCALE_USEC: c_int = 1 << 16; +pub const SCALE_UPDATE: c_int = SCALE_KG * MAXTC; +pub const FINEUSEC: c_int = 1 << 22; +pub const MAXPHASE: c_int = 512000; +pub const MAXFREQ: c_int = 512 * SCALE_USEC; +pub const MAXTIME: c_int = 200 << PPS_AVG; +pub const MINSEC: c_int = 16; +pub const MAXSEC: c_int = 1200; +pub const PPS_AVG: c_int = 2; +pub const PPS_SHIFT: c_int = 2; +pub const PPS_SHIFTMAX: c_int = 8; +pub const PPS_VALID: c_int = 120; +pub const MAXGLITCH: c_int = 30; pub const MOD_OFFSET: u32 = 0x0001; pub const MOD_FREQUENCY: u32 = 0x0002; pub const MOD_MAXERROR: u32 = 0x0004; @@ -2379,77 +2383,77 @@ pub const TIME_OOP: i32 = 3; pub const TIME_WAIT: i32 = 4; pub const TIME_ERROR: i32 = 5; -pub const PRIO_PROCESS: ::c_int = 0; -pub const PRIO_PGRP: ::c_int = 1; -pub const PRIO_USER: ::c_int = 2; +pub const PRIO_PROCESS: c_int = 0; +pub const PRIO_PGRP: c_int = 1; +pub const PRIO_USER: c_int = 2; -pub const SCHED_OTHER: ::c_int = 0; -pub const SCHED_FIFO: ::c_int = 1; -pub const SCHED_RR: ::c_int = 2; -pub const SCHED_SYS: ::c_int = 3; -pub const SCHED_IA: ::c_int = 4; -pub const SCHED_FSS: ::c_int = 5; -pub const SCHED_FX: ::c_int = 6; +pub const SCHED_OTHER: c_int = 0; +pub const SCHED_FIFO: c_int = 1; +pub const SCHED_RR: c_int = 2; +pub const SCHED_SYS: c_int = 3; +pub const SCHED_IA: c_int = 4; +pub const SCHED_FSS: c_int = 5; +pub const SCHED_FX: c_int = 6; // sys/priv.h -pub const PRIV_DEBUG: ::c_uint = 0x0001; -pub const PRIV_AWARE: ::c_uint = 0x0002; -pub const PRIV_AWARE_INHERIT: ::c_uint = 0x0004; -pub const __PROC_PROTECT: ::c_uint = 0x0008; -pub const NET_MAC_AWARE: ::c_uint = 0x0010; -pub const NET_MAC_AWARE_INHERIT: ::c_uint = 0x0020; -pub const PRIV_AWARE_RESET: ::c_uint = 0x0040; -pub const PRIV_XPOLICY: ::c_uint = 0x0080; -pub const PRIV_PFEXEC: ::c_uint = 0x0100; +pub const PRIV_DEBUG: c_uint = 0x0001; +pub const PRIV_AWARE: c_uint = 0x0002; +pub const PRIV_AWARE_INHERIT: c_uint = 0x0004; +pub const __PROC_PROTECT: c_uint = 0x0008; +pub const NET_MAC_AWARE: c_uint = 0x0010; +pub const NET_MAC_AWARE_INHERIT: c_uint = 0x0020; +pub const PRIV_AWARE_RESET: c_uint = 0x0040; +pub const PRIV_XPOLICY: c_uint = 0x0080; +pub const PRIV_PFEXEC: c_uint = 0x0100; // sys/systeminfo.h -pub const SI_SYSNAME: ::c_int = 1; -pub const SI_HOSTNAME: ::c_int = 2; -pub const SI_RELEASE: ::c_int = 3; -pub const SI_VERSION: ::c_int = 4; -pub const SI_MACHINE: ::c_int = 5; -pub const SI_ARCHITECTURE: ::c_int = 6; -pub const SI_HW_SERIAL: ::c_int = 7; -pub const SI_HW_PROVIDER: ::c_int = 8; -pub const SI_SET_HOSTNAME: ::c_int = 258; -pub const SI_SET_SRPC_DOMAIN: ::c_int = 265; -pub const SI_PLATFORM: ::c_int = 513; -pub const SI_ISALIST: ::c_int = 514; -pub const SI_DHCP_CACHE: ::c_int = 515; -pub const SI_ARCHITECTURE_32: ::c_int = 516; -pub const SI_ARCHITECTURE_64: ::c_int = 517; -pub const SI_ARCHITECTURE_K: ::c_int = 518; -pub const SI_ARCHITECTURE_NATIVE: ::c_int = 519; +pub const SI_SYSNAME: c_int = 1; +pub const SI_HOSTNAME: c_int = 2; +pub const SI_RELEASE: c_int = 3; +pub const SI_VERSION: c_int = 4; +pub const SI_MACHINE: c_int = 5; +pub const SI_ARCHITECTURE: c_int = 6; +pub const SI_HW_SERIAL: c_int = 7; +pub const SI_HW_PROVIDER: c_int = 8; +pub const SI_SET_HOSTNAME: c_int = 258; +pub const SI_SET_SRPC_DOMAIN: c_int = 265; +pub const SI_PLATFORM: c_int = 513; +pub const SI_ISALIST: c_int = 514; +pub const SI_DHCP_CACHE: c_int = 515; +pub const SI_ARCHITECTURE_32: c_int = 516; +pub const SI_ARCHITECTURE_64: c_int = 517; +pub const SI_ARCHITECTURE_K: c_int = 518; +pub const SI_ARCHITECTURE_NATIVE: c_int = 519; // sys/lgrp_user.h -pub const LGRP_COOKIE_NONE: ::lgrp_cookie_t = 0; -pub const LGRP_AFF_NONE: ::lgrp_affinity_t = 0x0; -pub const LGRP_AFF_WEAK: ::lgrp_affinity_t = 0x10; -pub const LGRP_AFF_STRONG: ::lgrp_affinity_t = 0x100; -pub const LGRP_CONTENT_ALL: ::lgrp_content_t = 0; -pub const LGRP_CONTENT_HIERARCHY: ::lgrp_content_t = LGRP_CONTENT_ALL; -pub const LGRP_CONTENT_DIRECT: ::lgrp_content_t = 1; -pub const LGRP_LAT_CPU_TO_MEM: ::lgrp_lat_between_t = 0; -pub const LGRP_MEM_SZ_FREE: ::lgrp_mem_size_flag_t = 0; -pub const LGRP_MEM_SZ_INSTALLED: ::lgrp_mem_size_flag_t = 1; -pub const LGRP_VIEW_CALLER: ::lgrp_view_t = 0; -pub const LGRP_VIEW_OS: ::lgrp_view_t = 1; +pub const LGRP_COOKIE_NONE: crate::lgrp_cookie_t = 0; +pub const LGRP_AFF_NONE: crate::lgrp_affinity_t = 0x0; +pub const LGRP_AFF_WEAK: crate::lgrp_affinity_t = 0x10; +pub const LGRP_AFF_STRONG: crate::lgrp_affinity_t = 0x100; +pub const LGRP_CONTENT_ALL: crate::lgrp_content_t = 0; +pub const LGRP_CONTENT_HIERARCHY: crate::lgrp_content_t = LGRP_CONTENT_ALL; +pub const LGRP_CONTENT_DIRECT: crate::lgrp_content_t = 1; +pub const LGRP_LAT_CPU_TO_MEM: crate::lgrp_lat_between_t = 0; +pub const LGRP_MEM_SZ_FREE: crate::lgrp_mem_size_flag_t = 0; +pub const LGRP_MEM_SZ_INSTALLED: crate::lgrp_mem_size_flag_t = 1; +pub const LGRP_VIEW_CALLER: crate::lgrp_view_t = 0; +pub const LGRP_VIEW_OS: crate::lgrp_view_t = 1; // sys/processor.h -pub const P_OFFLINE: ::c_int = 0x001; -pub const P_ONLINE: ::c_int = 0x002; -pub const P_STATUS: ::c_int = 0x003; -pub const P_FAULTED: ::c_int = 0x004; -pub const P_POWEROFF: ::c_int = 0x005; -pub const P_NOINTR: ::c_int = 0x006; -pub const P_SPARE: ::c_int = 0x007; -pub const P_FORCED: ::c_int = 0x10000000; -pub const PI_TYPELEN: ::c_int = 16; -pub const PI_FPUTYPE: ::c_int = 32; +pub const P_OFFLINE: c_int = 0x001; +pub const P_ONLINE: c_int = 0x002; +pub const P_STATUS: c_int = 0x003; +pub const P_FAULTED: c_int = 0x004; +pub const P_POWEROFF: c_int = 0x005; +pub const P_NOINTR: c_int = 0x006; +pub const P_SPARE: c_int = 0x007; +pub const P_FORCED: c_int = 0x10000000; +pub const PI_TYPELEN: c_int = 16; +pub const PI_FPUTYPE: c_int = 32; // sys/auxv.h -pub const AT_SUN_HWCAP: ::c_uint = 2009; +pub const AT_SUN_HWCAP: c_uint = 2009; // As per sys/socket.h, header alignment must be 8 bytes on SPARC // and 4 bytes everywhere else: @@ -2458,12 +2462,12 @@ const _CMSG_HDR_ALIGNMENT: usize = 8; #[cfg(not(target_arch = "sparc64"))] const _CMSG_HDR_ALIGNMENT: usize = 4; -const _CMSG_DATA_ALIGNMENT: usize = size_of::<::c_int>(); +const _CMSG_DATA_ALIGNMENT: usize = size_of::(); -const NEWDEV: ::c_int = 1; +const NEWDEV: c_int = 1; // sys/sendfile.h -pub const SFV_FD_SELF: ::c_int = -2; +pub const SFV_FD_SELF: c_int = -2; const_fn! { {const} fn _CMSG_HDR_ALIGN(p: usize) -> usize { @@ -2476,56 +2480,55 @@ const_fn! { } f! { - pub fn CMSG_DATA(cmsg: *const ::cmsghdr) -> *mut ::c_uchar { - _CMSG_DATA_ALIGN(cmsg.offset(1) as usize) as *mut ::c_uchar + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + _CMSG_DATA_ALIGN(cmsg.offset(1) as usize) as *mut c_uchar } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - _CMSG_DATA_ALIGN(::mem::size_of::<::cmsghdr>()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + _CMSG_DATA_ALIGN(crate::mem::size_of::()) as c_uint + length } - pub fn CMSG_FIRSTHDR(mhdr: *const ::msghdr) -> *mut ::cmsghdr { - if ((*mhdr).msg_controllen as usize) < size_of::<::cmsghdr>() { - 0 as *mut ::cmsghdr + pub fn CMSG_FIRSTHDR(mhdr: *const crate::msghdr) -> *mut cmsghdr { + if ((*mhdr).msg_controllen as usize) < size_of::() { + 0 as *mut cmsghdr } else { - (*mhdr).msg_control as *mut ::cmsghdr + (*mhdr).msg_control as *mut cmsghdr } } - pub fn CMSG_NXTHDR(mhdr: *const ::msghdr, cmsg: *const ::cmsghdr) -> *mut ::cmsghdr { + pub fn CMSG_NXTHDR(mhdr: *const crate::msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { if cmsg.is_null() { - return ::CMSG_FIRSTHDR(mhdr); + return crate::CMSG_FIRSTHDR(mhdr); }; - let next = _CMSG_HDR_ALIGN( - cmsg as usize + (*cmsg).cmsg_len as usize + size_of::<::cmsghdr>(), - ); + let next = + _CMSG_HDR_ALIGN(cmsg as usize + (*cmsg).cmsg_len as usize + size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next > max { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } else { - _CMSG_HDR_ALIGN(cmsg as usize + (*cmsg).cmsg_len as usize) as *mut ::cmsghdr + _CMSG_HDR_ALIGN(cmsg as usize + (*cmsg).cmsg_len as usize) as *mut cmsghdr } } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - _CMSG_HDR_ALIGN(size_of::<::cmsghdr>() as usize + length as usize) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + _CMSG_HDR_ALIGN(size_of::() as usize + length as usize) as c_uint } - pub fn FD_CLR(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_CLR(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] &= !(1 << (fd % bits)); return; } - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; return ((*set).fds_bits[fd / bits] & (1 << (fd % bits))) != 0; } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { - let bits = ::mem::size_of_val(&(*set).fds_bits[0]) * 8; + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { + let bits = crate::mem::size_of_val(&(*set).fds_bits[0]) * 8; let fd = fd as usize; (*set).fds_bits[fd / bits] |= 1 << (fd % bits); return; @@ -2539,378 +2542,390 @@ f! { } safe_f! { - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0xFF) == 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { (status >> 8) & 0xFF } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { status & 0x7F } - pub {const} fn WIFCONTINUED(status: ::c_int) -> bool { + pub {const} fn WIFCONTINUED(status: c_int) -> bool { (status & 0xffff) == 0xffff } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status & 0xff00) >> 8 } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { ((status & 0xff) > 0) && (status & 0xff00 == 0) } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { ((status & 0xff) == 0x7f) && ((status & 0xff00) != 0) } - pub {const} fn WCOREDUMP(status: ::c_int) -> bool { + pub {const} fn WCOREDUMP(status: c_int) -> bool { (status & 0x80) != 0 } - pub {const} fn MR_GET_TYPE(flags: ::c_uint) -> ::c_uint { + pub {const} fn MR_GET_TYPE(flags: c_uint) -> c_uint { flags & 0x0000ffff } } extern "C" { - pub fn getrlimit(resource: ::c_int, rlim: *mut ::rlimit) -> ::c_int; - pub fn setrlimit(resource: ::c_int, rlim: *const ::rlimit) -> ::c_int; + pub fn getrlimit(resource: c_int, rlim: *mut crate::rlimit) -> c_int; + pub fn setrlimit(resource: c_int, rlim: *const crate::rlimit) -> c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; - pub fn sem_destroy(sem: *mut sem_t) -> ::c_int; - pub fn sem_init(sem: *mut sem_t, pshared: ::c_int, value: ::c_uint) -> ::c_int; + pub fn sem_destroy(sem: *mut sem_t) -> c_int; + pub fn sem_init(sem: *mut sem_t, pshared: c_int, value: c_uint) -> c_int; - pub fn abs(i: ::c_int) -> ::c_int; - pub fn acct(filename: *const ::c_char) -> ::c_int; - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; - pub fn labs(i: ::c_long) -> ::c_long; - pub fn rand() -> ::c_int; - pub fn srand(seed: ::c_uint); - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; - pub fn getrandom(bbuf: *mut ::c_void, buflen: ::size_t, flags: ::c_uint) -> ::ssize_t; + pub fn abs(i: c_int) -> c_int; + pub fn acct(filename: *const c_char) -> c_int; + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; + pub fn labs(i: c_long) -> c_long; + pub fn rand() -> c_int; + pub fn srand(seed: c_uint); + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; + pub fn getrandom(bbuf: *mut c_void, buflen: size_t, flags: c_uint) -> ssize_t; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn settimeofday(tp: *const ::timeval, tz: *const ::c_void) -> ::c_int; - pub fn getifaddrs(ifap: *mut *mut ::ifaddrs) -> ::c_int; - pub fn freeifaddrs(ifa: *mut ::ifaddrs); + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn settimeofday(tp: *const crate::timeval, tz: *const c_void) -> c_int; + pub fn getifaddrs(ifap: *mut *mut crate::ifaddrs) -> c_int; + pub fn freeifaddrs(ifa: *mut crate::ifaddrs); - pub fn stack_getbounds(sp: *mut ::stack_t) -> ::c_int; + pub fn stack_getbounds(sp: *mut crate::stack_t) -> c_int; pub fn getgrouplist( - name: *const ::c_char, - basegid: ::gid_t, - groups: *mut ::gid_t, - ngroups: *mut ::c_int, - ) -> ::c_int; - pub fn initgroups(name: *const ::c_char, basegid: ::gid_t) -> ::c_int; - pub fn setgroups(ngroups: ::c_int, ptr: *const ::gid_t) -> ::c_int; - pub fn ioctl(fildes: ::c_int, request: ::c_int, ...) -> ::c_int; - pub fn mprotect(addr: *mut ::c_void, len: ::size_t, prot: ::c_int) -> ::c_int; - pub fn ___errno() -> *mut ::c_int; - pub fn clock_getres(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; - pub fn clock_gettime(clk_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + name: *const c_char, + basegid: crate::gid_t, + groups: *mut crate::gid_t, + ngroups: *mut c_int, + ) -> c_int; + pub fn initgroups(name: *const c_char, basegid: crate::gid_t) -> c_int; + pub fn setgroups(ngroups: c_int, ptr: *const crate::gid_t) -> c_int; + pub fn ioctl(fildes: c_int, request: c_int, ...) -> c_int; + pub fn mprotect(addr: *mut c_void, len: size_t, prot: c_int) -> c_int; + pub fn ___errno() -> *mut c_int; + pub fn clock_getres(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; + pub fn clock_gettime(clk_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; pub fn clock_nanosleep( - clk_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; - pub fn clock_settime(clk_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; + clk_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; + pub fn clock_settime(clk_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; pub fn getnameinfo( - sa: *const ::sockaddr, - salen: ::socklen_t, - host: *mut ::c_char, - hostlen: ::socklen_t, - serv: *mut ::c_char, - servlen: ::socklen_t, - flags: ::c_int, - ) -> ::c_int; + sa: *const crate::sockaddr, + salen: crate::socklen_t, + host: *mut c_char, + hostlen: crate::socklen_t, + serv: *mut c_char, + servlen: crate::socklen_t, + flags: c_int, + ) -> c_int; pub fn setpwent(); pub fn endpwent(); pub fn getpwent() -> *mut passwd; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - pub fn nl_langinfo_l(item: ::nl_item, locale: ::locale_t) -> *mut ::c_char; - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn getprogname() -> *const ::c_char; - pub fn setprogname(name: *const ::c_char); - pub fn getloadavg(loadavg: *mut ::c_double, nelem: ::c_int) -> ::c_int; - pub fn getpriority(which: ::c_int, who: ::c_int) -> ::c_int; - pub fn setpriority(which: ::c_int, who: ::c_int, prio: ::c_int) -> ::c_int; - - pub fn mknodat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::mode_t, - dev: dev_t, - ) -> ::c_int; - pub fn mkfifoat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; - pub fn sethostname(name: *const ::c_char, len: ::c_int) -> ::c_int; + pub fn fdatasync(fd: c_int) -> c_int; + pub fn nl_langinfo_l(item: crate::nl_item, locale: crate::locale_t) -> *mut c_char; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn getprogname() -> *const c_char; + pub fn setprogname(name: *const c_char); + pub fn getloadavg(loadavg: *mut c_double, nelem: c_int) -> c_int; + pub fn getpriority(which: c_int, who: c_int) -> c_int; + pub fn setpriority(which: c_int, who: c_int, prio: c_int) -> c_int; + + pub fn mknodat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t, dev: dev_t) + -> c_int; + pub fn mkfifoat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; + pub fn sethostname(name: *const c_char, len: c_int) -> c_int; pub fn if_nameindex() -> *mut if_nameindex; pub fn if_freenameindex(ptr: *mut if_nameindex); pub fn pthread_create( - native: *mut ::pthread_t, - attr: *const ::pthread_attr_t, - f: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + native: *mut crate::pthread_t, + attr: *const crate::pthread_attr_t, + f: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; pub fn pthread_attr_getstack( - attr: *const ::pthread_attr_t, - stackaddr: *mut *mut ::c_void, - stacksize: *mut ::size_t, - ) -> ::c_int; + attr: *const crate::pthread_attr_t, + stackaddr: *mut *mut c_void, + stacksize: *mut size_t, + ) -> c_int; pub fn pthread_condattr_getclock( attr: *const pthread_condattr_t, clock_id: *mut clockid_t, - ) -> ::c_int; + ) -> c_int; pub fn pthread_condattr_setclock( attr: *mut pthread_condattr_t, - clock_id: ::clockid_t, - ) -> ::c_int; - pub fn sem_timedwait(sem: *mut sem_t, abstime: *const ::timespec) -> ::c_int; - pub fn sem_getvalue(sem: *mut sem_t, sval: *mut ::c_int) -> ::c_int; + clock_id: crate::clockid_t, + ) -> c_int; + pub fn sem_timedwait(sem: *mut sem_t, abstime: *const crate::timespec) -> c_int; + pub fn sem_getvalue(sem: *mut sem_t, sval: *mut c_int) -> c_int; pub fn pthread_mutex_timedlock( lock: *mut pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; - pub fn pthread_getname_np(tid: ::pthread_t, name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn pthread_setname_np(tid: ::pthread_t, name: *const ::c_char) -> ::c_int; - pub fn waitid(idtype: idtype_t, id: id_t, infop: *mut ::siginfo_t, options: ::c_int) - -> ::c_int; + abstime: *const crate::timespec, + ) -> c_int; + pub fn pthread_getname_np(tid: crate::pthread_t, name: *mut c_char, len: size_t) -> c_int; + pub fn pthread_setname_np(tid: crate::pthread_t, name: *const c_char) -> c_int; + pub fn waitid( + idtype: idtype_t, + id: id_t, + infop: *mut crate::siginfo_t, + options: c_int, + ) -> c_int; #[cfg_attr(target_os = "illumos", link_name = "_glob_ext")] pub fn glob( - pattern: *const ::c_char, - flags: ::c_int, - errfunc: ::Option ::c_int>, - pglob: *mut ::glob_t, - ) -> ::c_int; + pattern: *const c_char, + flags: c_int, + errfunc: Option c_int>, + pglob: *mut crate::glob_t, + ) -> c_int; #[cfg_attr(target_os = "illumos", link_name = "_globfree_ext")] - pub fn globfree(pglob: *mut ::glob_t); + pub fn globfree(pglob: *mut crate::glob_t); - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; - pub fn posix_madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; + pub fn posix_madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn shmat(shmid: ::c_int, shmaddr: *const ::c_void, shmflg: ::c_int) -> *mut ::c_void; + pub fn shmat(shmid: c_int, shmaddr: *const c_void, shmflg: c_int) -> *mut c_void; - pub fn shmctl(shmid: ::c_int, cmd: ::c_int, buf: *mut ::shmid_ds) -> ::c_int; + pub fn shmctl(shmid: c_int, cmd: c_int, buf: *mut crate::shmid_ds) -> c_int; - pub fn shmdt(shmaddr: *const ::c_void) -> ::c_int; + pub fn shmdt(shmaddr: *const c_void) -> c_int; - pub fn shmget(key: key_t, size: ::size_t, shmflg: ::c_int) -> ::c_int; + pub fn shmget(key: key_t, size: size_t, shmflg: c_int) -> c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - pub fn madvise(addr: *mut ::c_void, len: ::size_t, advice: ::c_int) -> ::c_int; + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + pub fn madvise(addr: *mut c_void, len: size_t, advice: c_int) -> c_int; - pub fn msync(addr: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::c_int; + pub fn msync(addr: *mut c_void, len: size_t, flags: c_int) -> c_int; - pub fn memalign(align: ::size_t, size: ::size_t) -> *mut ::c_void; + pub fn memalign(align: size_t, size: size_t) -> *mut c_void; pub fn recvfrom( - socket: ::c_int, - buf: *mut ::c_void, - len: ::size_t, - flags: ::c_int, - addr: *mut ::sockaddr, - addrlen: *mut ::socklen_t, - ) -> ::ssize_t; - pub fn mkstemps(template: *mut ::c_char, suffixlen: ::c_int) -> ::c_int; - pub fn futimesat(fd: ::c_int, path: *const ::c_char, times: *const ::timeval) -> ::c_int; - pub fn futimens(dirfd: ::c_int, times: *const ::timespec) -> ::c_int; + socket: c_int, + buf: *mut c_void, + len: size_t, + flags: c_int, + addr: *mut crate::sockaddr, + addrlen: *mut crate::socklen_t, + ) -> ssize_t; + pub fn mkstemps(template: *mut c_char, suffixlen: c_int) -> c_int; + pub fn futimesat(fd: c_int, path: *const c_char, times: *const crate::timeval) -> c_int; + pub fn futimens(dirfd: c_int, times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; #[link_name = "__xnet_bind"] - pub fn bind(socket: ::c_int, address: *const ::sockaddr, address_len: ::socklen_t) -> ::c_int; + pub fn bind( + socket: c_int, + address: *const crate::sockaddr, + address_len: crate::socklen_t, + ) -> c_int; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; #[link_name = "__xnet_sendmsg"] - pub fn sendmsg(fd: ::c_int, msg: *const ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn sendmsg(fd: c_int, msg: *const crate::msghdr, flags: c_int) -> ssize_t; #[link_name = "__xnet_recvmsg"] - pub fn recvmsg(fd: ::c_int, msg: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn recvmsg(fd: c_int, msg: *mut crate::msghdr, flags: c_int) -> ssize_t; pub fn accept4( - fd: ::c_int, + fd: c_int, address: *mut sockaddr, address_len: *mut socklen_t, - flags: ::c_int, - ) -> ::c_int; + flags: c_int, + ) -> c_int; - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; - pub fn port_create() -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; + pub fn mq_setattr( + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; + pub fn port_create() -> c_int; pub fn port_associate( - port: ::c_int, - source: ::c_int, - object: ::uintptr_t, - events: ::c_int, - user: *mut ::c_void, - ) -> ::c_int; - pub fn port_dissociate(port: ::c_int, source: ::c_int, object: ::uintptr_t) -> ::c_int; - pub fn port_get(port: ::c_int, pe: *mut port_event, timeout: *mut ::timespec) -> ::c_int; + port: c_int, + source: c_int, + object: crate::uintptr_t, + events: c_int, + user: *mut c_void, + ) -> c_int; + pub fn port_dissociate(port: c_int, source: c_int, object: crate::uintptr_t) -> c_int; + pub fn port_get(port: c_int, pe: *mut port_event, timeout: *mut crate::timespec) -> c_int; pub fn port_getn( - port: ::c_int, + port: c_int, pe_list: *mut port_event, - max: ::c_uint, - nget: *mut ::c_uint, - timeout: *mut ::timespec, - ) -> ::c_int; - pub fn port_send(port: ::c_int, events: ::c_int, user: *mut ::c_void) -> ::c_int; + max: c_uint, + nget: *mut c_uint, + timeout: *mut crate::timespec, + ) -> c_int; + pub fn port_send(port: c_int, events: c_int, user: *mut c_void) -> c_int; pub fn port_sendn( - port_list: *mut ::c_int, - error_list: *mut ::c_int, - nent: ::c_uint, - events: ::c_int, - user: *mut ::c_void, - ) -> ::c_int; + port_list: *mut c_int, + error_list: *mut c_int, + nent: c_uint, + events: c_int, + user: *mut c_void, + ) -> c_int; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getgrgid_r" )] pub fn getgrgid_r( - gid: ::gid_t, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> ::c_int; - pub fn sigsuspend(mask: *const ::sigset_t) -> ::c_int; - pub fn sem_close(sem: *mut sem_t) -> ::c_int; - pub fn getdtablesize() -> ::c_int; + gid: crate::gid_t, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn sigaltstack(ss: *const stack_t, oss: *mut stack_t) -> c_int; + pub fn sigsuspend(mask: *const crate::sigset_t) -> c_int; + pub fn sem_close(sem: *mut sem_t) -> c_int; + pub fn getdtablesize() -> c_int; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getgrnam_r" )] pub fn getgrnam_r( - name: *const ::c_char, - grp: *mut ::group, - buf: *mut ::c_char, - buflen: ::size_t, - result: *mut *mut ::group, - ) -> ::c_int; - pub fn thr_self() -> ::thread_t; - pub fn pthread_sigmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sem_open(name: *const ::c_char, oflag: ::c_int, ...) -> *mut sem_t; - pub fn getgrnam(name: *const ::c_char) -> *mut ::group; + name: *const c_char, + grp: *mut crate::group, + buf: *mut c_char, + buflen: size_t, + result: *mut *mut crate::group, + ) -> c_int; + pub fn thr_self() -> crate::thread_t; + pub fn pthread_sigmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sem_open(name: *const c_char, oflag: c_int, ...) -> *mut sem_t; + pub fn getgrnam(name: *const c_char) -> *mut crate::group; #[cfg_attr(target_os = "solaris", link_name = "__pthread_kill_xpg7")] - pub fn pthread_kill(thread: ::pthread_t, sig: ::c_int) -> ::c_int; - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; - pub fn sched_getparam(pid: ::pid_t, param: *mut sched_param) -> ::c_int; - pub fn sched_setparam(pid: ::pid_t, param: *const sched_param) -> ::c_int; - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + pub fn pthread_kill(thread: crate::pthread_t, sig: c_int) -> c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut sched_param) -> c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const sched_param) -> c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; - pub fn sem_unlink(name: *const ::c_char) -> ::c_int; - pub fn daemon(nochdir: ::c_int, noclose: ::c_int) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; + pub fn sem_unlink(name: *const c_char) -> c_int; + pub fn daemon(nochdir: c_int, noclose: c_int) -> c_int; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getpwnam_r" )] pub fn getpwnam_r( - name: *const ::c_char, + name: *const c_char, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_getpwuid_r" )] pub fn getpwuid_r( - uid: ::uid_t, + uid: crate::uid_t, pwd: *mut passwd, - buf: *mut ::c_char, - buflen: ::size_t, + buf: *mut c_char, + buflen: size_t, result: *mut *mut passwd, - ) -> ::c_int; + ) -> c_int; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "getpwent_r" )] - fn native_getpwent_r(pwd: *mut passwd, buf: *mut ::c_char, buflen: ::c_int) -> *mut passwd; + fn native_getpwent_r(pwd: *mut passwd, buf: *mut c_char, buflen: c_int) -> *mut passwd; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "getgrent_r" )] - fn native_getgrent_r(grp: *mut ::group, buf: *mut ::c_char, buflen: ::c_int) -> *mut ::group; + fn native_getgrent_r( + grp: *mut crate::group, + buf: *mut c_char, + buflen: c_int, + ) -> *mut crate::group; #[cfg_attr( any(target_os = "solaris", target_os = "illumos"), link_name = "__posix_sigwait" )] - pub fn sigwait(set: *const sigset_t, sig: *mut ::c_int) -> ::c_int; + pub fn sigwait(set: *const sigset_t, sig: *mut c_int) -> c_int; pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; - pub fn getgrgid(gid: ::gid_t) -> *mut ::group; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; + pub fn getgrgid(gid: crate::gid_t) -> *mut crate::group; pub fn setgrent(); pub fn endgrent(); - pub fn getgrent() -> *mut ::group; - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn getgrent() -> *mut crate::group; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; - pub fn dup3(src: ::c_int, dst: ::c_int, flags: ::c_int) -> ::c_int; - pub fn uname(buf: *mut ::utsname) -> ::c_int; - pub fn pipe2(fds: *mut ::c_int, flags: ::c_int) -> ::c_int; + pub fn dup3(src: c_int, dst: c_int, flags: c_int) -> c_int; + pub fn uname(buf: *mut crate::utsname) -> c_int; + pub fn pipe2(fds: *mut c_int, flags: c_int) -> c_int; pub fn makeutx(ux: *const utmpx) -> *mut utmpx; pub fn modutx(ux: *const utmpx) -> *mut utmpx; - pub fn updwtmpx(file: *const ::c_char, ut: *mut utmpx); - pub fn utmpxname(file: *const ::c_char) -> ::c_int; + pub fn updwtmpx(file: *const c_char, ut: *mut utmpx); + pub fn utmpxname(file: *const c_char) -> c_int; pub fn getutxent() -> *mut utmpx; pub fn getutxid(ut: *const utmpx) -> *mut utmpx; pub fn getutxline(ut: *const utmpx) -> *mut utmpx; @@ -2924,227 +2939,231 @@ extern "C" { pub fn getutline(u: *const utmp) -> *mut utmp; pub fn pututline(u: *const utmp) -> *mut utmp; pub fn setutent(); - pub fn utmpname(file: *const ::c_char) -> ::c_int; + pub fn utmpname(file: *const c_char) -> c_int; pub fn getutmp(ux: *const utmpx, u: *mut utmp); pub fn getutmpx(u: *const utmp, ux: *mut utmpx); - pub fn updwtmp(file: *const ::c_char, u: *mut utmp); + pub fn updwtmp(file: *const c_char, u: *mut utmp); - pub fn ntp_adjtime(buf: *mut timex) -> ::c_int; - pub fn ntp_gettime(buf: *mut ntptimeval) -> ::c_int; + pub fn ntp_adjtime(buf: *mut timex) -> c_int; + pub fn ntp_gettime(buf: *mut ntptimeval) -> c_int; - pub fn timer_create(clock_id: clockid_t, evp: *mut sigevent, timerid: *mut timer_t) -> ::c_int; - pub fn timer_delete(timerid: timer_t) -> ::c_int; - pub fn timer_getoverrun(timerid: timer_t) -> ::c_int; - pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> ::c_int; + pub fn timer_create(clock_id: clockid_t, evp: *mut sigevent, timerid: *mut timer_t) -> c_int; + pub fn timer_delete(timerid: timer_t) -> c_int; + pub fn timer_getoverrun(timerid: timer_t) -> c_int; + pub fn timer_gettime(timerid: timer_t, value: *mut itimerspec) -> c_int; pub fn timer_settime( timerid: timer_t, - flags: ::c_int, + flags: c_int, value: *const itimerspec, ovalue: *mut itimerspec, - ) -> ::c_int; + ) -> c_int; - pub fn ucred_get(pid: ::pid_t) -> *mut ucred_t; - pub fn getpeerucred(fd: ::c_int, ucred: *mut *mut ucred_t) -> ::c_int; + pub fn ucred_get(pid: crate::pid_t) -> *mut ucred_t; + pub fn getpeerucred(fd: c_int, ucred: *mut *mut ucred_t) -> c_int; pub fn ucred_free(ucred: *mut ucred_t); - pub fn ucred_geteuid(ucred: *const ucred_t) -> ::uid_t; - pub fn ucred_getruid(ucred: *const ucred_t) -> ::uid_t; - pub fn ucred_getsuid(ucred: *const ucred_t) -> ::uid_t; - pub fn ucred_getegid(ucred: *const ucred_t) -> ::gid_t; - pub fn ucred_getrgid(ucred: *const ucred_t) -> ::gid_t; - pub fn ucred_getsgid(ucred: *const ucred_t) -> ::gid_t; - pub fn ucred_getgroups(ucred: *const ucred_t, groups: *mut *const ::gid_t) -> ::c_int; - pub fn ucred_getpid(ucred: *const ucred_t) -> ::pid_t; + pub fn ucred_geteuid(ucred: *const ucred_t) -> crate::uid_t; + pub fn ucred_getruid(ucred: *const ucred_t) -> crate::uid_t; + pub fn ucred_getsuid(ucred: *const ucred_t) -> crate::uid_t; + pub fn ucred_getegid(ucred: *const ucred_t) -> crate::gid_t; + pub fn ucred_getrgid(ucred: *const ucred_t) -> crate::gid_t; + pub fn ucred_getsgid(ucred: *const ucred_t) -> crate::gid_t; + pub fn ucred_getgroups(ucred: *const ucred_t, groups: *mut *const crate::gid_t) -> c_int; + pub fn ucred_getpid(ucred: *const ucred_t) -> crate::pid_t; pub fn ucred_getprojid(ucred: *const ucred_t) -> projid_t; pub fn ucred_getzoneid(ucred: *const ucred_t) -> zoneid_t; - pub fn ucred_getpflags(ucred: *const ucred_t, flags: ::c_uint) -> ::c_uint; + pub fn ucred_getpflags(ucred: *const ucred_t, flags: c_uint) -> c_uint; - pub fn ucred_size() -> ::size_t; + pub fn ucred_size() -> size_t; - pub fn pset_create(newpset: *mut ::psetid_t) -> ::c_int; - pub fn pset_destroy(pset: ::psetid_t) -> ::c_int; - pub fn pset_assign(pset: ::psetid_t, cpu: ::processorid_t, opset: *mut psetid_t) -> ::c_int; + pub fn pset_create(newpset: *mut crate::psetid_t) -> c_int; + pub fn pset_destroy(pset: crate::psetid_t) -> c_int; + pub fn pset_assign( + pset: crate::psetid_t, + cpu: crate::processorid_t, + opset: *mut psetid_t, + ) -> c_int; pub fn pset_info( - pset: ::psetid_t, - tpe: *mut ::c_int, - numcpus: *mut ::c_uint, + pset: crate::psetid_t, + tpe: *mut c_int, + numcpus: *mut c_uint, cpulist: *mut processorid_t, - ) -> ::c_int; + ) -> c_int; pub fn pset_bind( - pset: ::psetid_t, - idtype: ::idtype_t, - id: ::id_t, + pset: crate::psetid_t, + idtype: crate::idtype_t, + id: crate::id_t, opset: *mut psetid_t, - ) -> ::c_int; - pub fn pset_list(pset: *mut psetid_t, numpsets: *mut ::c_uint) -> ::c_int; - pub fn pset_setattr(pset: psetid_t, attr: ::c_uint) -> ::c_int; - pub fn pset_getattr(pset: psetid_t, attr: *mut ::c_uint) -> ::c_int; + ) -> c_int; + pub fn pset_list(pset: *mut psetid_t, numpsets: *mut c_uint) -> c_int; + pub fn pset_setattr(pset: psetid_t, attr: c_uint) -> c_int; + pub fn pset_getattr(pset: psetid_t, attr: *mut c_uint) -> c_int; pub fn processor_bind( - idtype: ::idtype_t, - id: ::id_t, - new_binding: ::processorid_t, + idtype: crate::idtype_t, + id: crate::id_t, + new_binding: crate::processorid_t, old_binding: *mut processorid_t, - ) -> ::c_int; - pub fn p_online(processorid: ::processorid_t, flag: ::c_int) -> ::c_int; - pub fn processor_info(processorid: ::processorid_t, infop: *mut processor_info_t) -> ::c_int; + ) -> c_int; + pub fn p_online(processorid: crate::processorid_t, flag: c_int) -> c_int; + pub fn processor_info(processorid: crate::processorid_t, infop: *mut processor_info_t) + -> c_int; - pub fn getexecname() -> *const ::c_char; + pub fn getexecname() -> *const c_char; - pub fn gethostid() -> ::c_long; + pub fn gethostid() -> c_long; - pub fn getpflags(flags: ::c_uint) -> ::c_uint; - pub fn setpflags(flags: ::c_uint, value: ::c_uint) -> ::c_int; + pub fn getpflags(flags: c_uint) -> c_uint; + pub fn setpflags(flags: c_uint, value: c_uint) -> c_int; - pub fn sysinfo(command: ::c_int, buf: *mut ::c_char, count: ::c_long) -> ::c_int; + pub fn sysinfo(command: c_int, buf: *mut c_char, count: c_long) -> c_int; - pub fn faccessat(fd: ::c_int, path: *const ::c_char, amode: ::c_int, flag: ::c_int) -> ::c_int; + pub fn faccessat(fd: c_int, path: *const c_char, amode: c_int, flag: c_int) -> c_int; // #include #[cfg(any(target_arch = "x86", target_arch = "x86_64"))] pub fn dl_iterate_phdr( - callback: ::Option< - unsafe extern "C" fn( - info: *mut dl_phdr_info, - size: usize, - data: *mut ::c_void, - ) -> ::c_int, + callback: Option< + unsafe extern "C" fn(info: *mut dl_phdr_info, size: usize, data: *mut c_void) -> c_int, >, - data: *mut ::c_void, - ) -> ::c_int; - pub fn getpagesize() -> ::c_int; - pub fn getpagesizes(pagesize: *mut ::size_t, nelem: ::c_int) -> ::c_int; + data: *mut c_void, + ) -> c_int; + pub fn getpagesize() -> c_int; + pub fn getpagesizes(pagesize: *mut size_t, nelem: c_int) -> c_int; pub fn mmapobj( - fd: ::c_int, - flags: ::c_uint, + fd: c_int, + flags: c_uint, storage: *mut mmapobj_result_t, - elements: *mut ::c_uint, - arg: *mut ::c_void, - ) -> ::c_int; + elements: *mut c_uint, + arg: *mut c_void, + ) -> c_int; pub fn meminfo( inaddr: *const u64, - addr_count: ::c_int, - info_req: *const ::c_uint, - info_count: ::c_int, + addr_count: c_int, + info_req: *const c_uint, + info_count: c_int, outdata: *mut u64, - validity: *mut ::c_uint, - ) -> ::c_int; + validity: *mut c_uint, + ) -> c_int; - pub fn strsep(string: *mut *mut ::c_char, delim: *const ::c_char) -> *mut ::c_char; + pub fn strsep(string: *mut *mut c_char, delim: *const c_char) -> *mut c_char; - pub fn getisax(array: *mut u32, n: ::c_uint) -> ::c_uint; + pub fn getisax(array: *mut u32, n: c_uint) -> c_uint; - pub fn backtrace(buffer: *mut *mut ::c_void, size: ::c_int) -> ::c_int; - pub fn backtrace_symbols(buffer: *const *mut ::c_void, size: ::c_int) -> *mut *mut ::c_char; - pub fn backtrace_symbols_fd(buffer: *const *mut ::c_void, size: ::c_int, fd: ::c_int); + pub fn backtrace(buffer: *mut *mut c_void, size: c_int) -> c_int; + pub fn backtrace_symbols(buffer: *const *mut c_void, size: c_int) -> *mut *mut c_char; + pub fn backtrace_symbols_fd(buffer: *const *mut c_void, size: c_int, fd: c_int); pub fn getopt_long( - argc: ::c_int, + argc: c_int, argv: *const *mut c_char, optstring: *const c_char, longopts: *const option, - longindex: *mut ::c_int, - ) -> ::c_int; + longindex: *mut c_int, + ) -> c_int; pub fn sync(); - pub fn aio_cancel(fd: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_error(aiocbp: *const aiocb) -> ::c_int; - pub fn aio_fsync(op: ::c_int, aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_read(aiocbp: *mut aiocb) -> ::c_int; - pub fn aio_return(aiocbp: *mut aiocb) -> ::ssize_t; + pub fn aio_cancel(fd: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_error(aiocbp: *const aiocb) -> c_int; + pub fn aio_fsync(op: c_int, aiocbp: *mut aiocb) -> c_int; + pub fn aio_read(aiocbp: *mut aiocb) -> c_int; + pub fn aio_return(aiocbp: *mut aiocb) -> ssize_t; pub fn aio_suspend( aiocb_list: *const *const aiocb, - nitems: ::c_int, - timeout: *const ::timespec, - ) -> ::c_int; + nitems: c_int, + timeout: *const crate::timespec, + ) -> c_int; pub fn aio_waitn( aiocb_list: *mut *mut aiocb, - nent: ::c_uint, - nwait: *mut ::c_uint, - timeout: *const ::timespec, - ) -> ::c_int; - pub fn aio_write(aiocbp: *mut aiocb) -> ::c_int; + nent: c_uint, + nwait: *mut c_uint, + timeout: *const crate::timespec, + ) -> c_int; + pub fn aio_write(aiocbp: *mut aiocb) -> c_int; pub fn lio_listio( - mode: ::c_int, + mode: c_int, aiocb_list: *const *mut aiocb, - nitems: ::c_int, + nitems: c_int, sevp: *mut sigevent, - ) -> ::c_int; + ) -> c_int; - pub fn __major(version: ::c_int, devnum: ::dev_t) -> ::major_t; - pub fn __minor(version: ::c_int, devnum: ::dev_t) -> ::minor_t; - pub fn __makedev(version: ::c_int, majdev: ::major_t, mindev: ::minor_t) -> ::dev_t; + pub fn __major(version: c_int, devnum: crate::dev_t) -> crate::major_t; + pub fn __minor(version: c_int, devnum: crate::dev_t) -> crate::minor_t; + pub fn __makedev( + version: c_int, + majdev: crate::major_t, + mindev: crate::minor_t, + ) -> crate::dev_t; pub fn arc4random() -> u32; - pub fn arc4random_buf(buf: *mut ::c_void, nbytes: ::size_t); + pub fn arc4random_buf(buf: *mut c_void, nbytes: size_t); pub fn arc4random_uniform(upper_bound: u32) -> u32; } #[link(name = "sendfile")] extern "C" { - pub fn sendfile(out_fd: ::c_int, in_fd: ::c_int, off: *mut ::off_t, len: ::size_t) - -> ::ssize_t; + pub fn sendfile(out_fd: c_int, in_fd: c_int, off: *mut off_t, len: size_t) -> ssize_t; pub fn sendfilev( - fildes: ::c_int, + fildes: c_int, vec: *const sendfilevec_t, - sfvcnt: ::c_int, - xferred: *mut ::size_t, - ) -> ::ssize_t; + sfvcnt: c_int, + xferred: *mut size_t, + ) -> ssize_t; } #[link(name = "lgrp")] extern "C" { pub fn lgrp_init(view: lgrp_view_t) -> lgrp_cookie_t; - pub fn lgrp_fini(cookie: lgrp_cookie_t) -> ::c_int; + pub fn lgrp_fini(cookie: lgrp_cookie_t) -> c_int; pub fn lgrp_affinity_get( - idtype: ::idtype_t, - id: ::id_t, - lgrp: ::lgrp_id_t, - ) -> ::lgrp_affinity_t; + idtype: crate::idtype_t, + id: crate::id_t, + lgrp: crate::lgrp_id_t, + ) -> crate::lgrp_affinity_t; pub fn lgrp_affinity_set( - idtype: ::idtype_t, - id: ::id_t, - lgrp: ::lgrp_id_t, + idtype: crate::idtype_t, + id: crate::id_t, + lgrp: crate::lgrp_id_t, aff: lgrp_affinity_t, - ) -> ::c_int; + ) -> c_int; pub fn lgrp_cpus( - cookie: ::lgrp_cookie_t, - lgrp: ::lgrp_id_t, - cpuids: *mut ::processorid_t, - count: ::c_uint, - content: ::lgrp_content_t, - ) -> ::c_int; + cookie: crate::lgrp_cookie_t, + lgrp: crate::lgrp_id_t, + cpuids: *mut crate::processorid_t, + count: c_uint, + content: crate::lgrp_content_t, + ) -> c_int; pub fn lgrp_mem_size( - cookie: ::lgrp_cookie_t, - lgrp: ::lgrp_id_t, - tpe: ::lgrp_mem_size_flag_t, - content: ::lgrp_content_t, - ) -> ::lgrp_mem_size_t; - pub fn lgrp_nlgrps(cookie: ::lgrp_cookie_t) -> ::c_int; - pub fn lgrp_view(cookie: ::lgrp_cookie_t) -> ::lgrp_view_t; - pub fn lgrp_home(idtype: ::idtype_t, id: ::id_t) -> ::lgrp_id_t; - pub fn lgrp_version(version: ::c_int) -> ::c_int; + cookie: crate::lgrp_cookie_t, + lgrp: crate::lgrp_id_t, + tpe: crate::lgrp_mem_size_flag_t, + content: crate::lgrp_content_t, + ) -> crate::lgrp_mem_size_t; + pub fn lgrp_nlgrps(cookie: crate::lgrp_cookie_t) -> c_int; + pub fn lgrp_view(cookie: crate::lgrp_cookie_t) -> crate::lgrp_view_t; + pub fn lgrp_home(idtype: crate::idtype_t, id: crate::id_t) -> crate::lgrp_id_t; + pub fn lgrp_version(version: c_int) -> c_int; pub fn lgrp_resources( - cookie: ::lgrp_cookie_t, - lgrp: ::lgrp_id_t, - lgrps: *mut ::lgrp_id_t, - count: ::c_uint, - tpe: ::lgrp_rsrc_t, - ) -> ::c_int; - pub fn lgrp_root(cookie: ::lgrp_cookie_t) -> ::lgrp_id_t; + cookie: crate::lgrp_cookie_t, + lgrp: crate::lgrp_id_t, + lgrps: *mut crate::lgrp_id_t, + count: c_uint, + tpe: crate::lgrp_rsrc_t, + ) -> c_int; + pub fn lgrp_root(cookie: crate::lgrp_cookie_t) -> crate::lgrp_id_t; } -pub unsafe fn major(device: ::dev_t) -> ::major_t { +pub unsafe fn major(device: crate::dev_t) -> crate::major_t { __major(NEWDEV, device) } -pub unsafe fn minor(device: ::dev_t) -> ::minor_t { +pub unsafe fn minor(device: crate::dev_t) -> crate::minor_t { __minor(NEWDEV, device) } -pub unsafe fn makedev(maj: ::major_t, min: ::minor_t) -> ::dev_t { +pub unsafe fn makedev(maj: crate::major_t, min: crate::minor_t) -> crate::dev_t { __makedev(NEWDEV, maj, min) } diff --git a/src/unix/solarish/solaris.rs b/src/unix/solarish/solaris.rs index a13637604870c..2eea74d1b0716 100644 --- a/src/unix/solarish/solaris.rs +++ b/src/unix/solarish/solaris.rs @@ -1,11 +1,12 @@ -use { - exit_status, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, +use crate::{ + c_char, c_int, c_short, c_uint, c_ulong, c_ulonglong, c_ushort, c_void, exit_status, off_t, + size_t, NET_MAC_AWARE, NET_MAC_AWARE_INHERIT, PRIV_AWARE_RESET, PRIV_DEBUG, PRIV_PFEXEC, PRIV_XPOLICY, }; -pub type door_attr_t = ::c_uint; -pub type door_id_t = ::c_ulonglong; -pub type lgrp_affinity_t = ::c_uint; +pub type door_attr_t = c_uint; +pub type door_id_t = c_ulonglong; +pub type lgrp_affinity_t = c_uint; e! { #[repr(u32)] @@ -18,41 +19,41 @@ e! { s! { pub struct aiocb { - pub aio_fildes: ::c_int, - pub aio_buf: *mut ::c_void, - pub aio_nbytes: ::size_t, - pub aio_offset: ::off_t, - pub aio_reqprio: ::c_int, - pub aio_sigevent: ::sigevent, - pub aio_lio_opcode: ::c_int, - pub aio_resultp: ::aio_result_t, - pub aio_state: ::c_char, - pub aio_returned: ::c_char, - pub aio__pad1: [::c_char; 2], - pub aio_flags: ::c_int, + pub aio_fildes: c_int, + pub aio_buf: *mut c_void, + pub aio_nbytes: size_t, + pub aio_offset: off_t, + pub aio_reqprio: c_int, + pub aio_sigevent: crate::sigevent, + pub aio_lio_opcode: c_int, + pub aio_resultp: crate::aio_result_t, + pub aio_state: c_char, + pub aio_returned: c_char, + pub aio__pad1: [c_char; 2], + pub aio_flags: c_int, } pub struct shmid_ds { - pub shm_perm: ::ipc_perm, - pub shm_segsz: ::size_t, - pub shm_flags: ::uintptr_t, - pub shm_lkcnt: ::c_ushort, - pub shm_lpid: ::pid_t, - pub shm_cpid: ::pid_t, - pub shm_nattch: ::shmatt_t, - pub shm_cnattch: ::c_ulong, - pub shm_atime: ::time_t, - pub shm_dtime: ::time_t, - pub shm_ctime: ::time_t, - pub shm_amp: *mut ::c_void, + pub shm_perm: crate::ipc_perm, + pub shm_segsz: size_t, + pub shm_flags: crate::uintptr_t, + pub shm_lkcnt: c_ushort, + pub shm_lpid: crate::pid_t, + pub shm_cpid: crate::pid_t, + pub shm_nattch: crate::shmatt_t, + pub shm_cnattch: c_ulong, + pub shm_atime: crate::time_t, + pub shm_dtime: crate::time_t, + pub shm_ctime: crate::time_t, + pub shm_amp: *mut c_void, pub shm_gransize: u64, pub shm_allocated: u64, pub shm_pad4: [i64; 1], } pub struct xrs_t { - pub xrs_id: ::c_ulong, - pub xrs_ptr: *mut ::c_char, + pub xrs_id: c_ulong, + pub xrs_ptr: *mut c_char, } } @@ -60,14 +61,14 @@ s_no_extra_traits! { #[repr(packed)] #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] pub struct door_desc_t__d_data__d_desc { - pub d_descriptor: ::c_int, - pub d_id: ::door_id_t, + pub d_descriptor: c_int, + pub d_id: crate::door_id_t, } #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] pub union door_desc_t__d_data { pub d_desc: door_desc_t__d_data__d_desc, - d_resv: [::c_int; 5], /* Check out /usr/include/sys/door.h */ + d_resv: [c_int; 5], /* Check out /usr/include/sys/door.h */ } #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] @@ -78,26 +79,26 @@ s_no_extra_traits! { #[cfg_attr(feature = "extra_traits", allow(missing_debug_implementations))] pub struct door_arg_t { - pub data_ptr: *const ::c_char, - pub data_size: ::size_t, + pub data_ptr: *const c_char, + pub data_size: size_t, pub desc_ptr: *const door_desc_t, - pub dec_num: ::c_uint, - pub rbuf: *const ::c_char, - pub rsize: ::size_t, + pub dec_num: c_uint, + pub rbuf: *const c_char, + pub rsize: size_t, } pub struct utmpx { - pub ut_user: [::c_char; _UTMP_USER_LEN], - pub ut_id: [::c_char; _UTMP_ID_LEN], - pub ut_line: [::c_char; _UTMP_LINE_LEN], - pub ut_pid: ::pid_t, - pub ut_type: ::c_short, + pub ut_user: [c_char; _UTMP_USER_LEN], + pub ut_id: [c_char; _UTMP_ID_LEN], + pub ut_line: [c_char; _UTMP_LINE_LEN], + pub ut_pid: crate::pid_t, + pub ut_type: c_short, pub ut_exit: exit_status, - pub ut_tv: ::timeval, - pub ut_session: ::c_int, - pub pad: [::c_int; 5], - pub ut_syslen: ::c_short, - pub ut_host: [::c_char; 257], + pub ut_tv: crate::timeval, + pub ut_session: c_int, + pub pad: [c_int; 5], + pub ut_syslen: c_short, + pub ut_host: [c_char; 257], } } @@ -125,8 +126,8 @@ cfg_if! { impl Eq for utmpx {} - impl ::fmt::Debug for utmpx { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for utmpx { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("utmpx") .field("ut_user", &self.ut_user) .field("ut_id", &self.ut_id) @@ -143,8 +144,8 @@ cfg_if! { } } - impl ::hash::Hash for utmpx { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for utmpx { + fn hash(&self, state: &mut H) { self.ut_user.hash(state); self.ut_type.hash(state); self.ut_pid.hash(state); @@ -165,31 +166,31 @@ pub const _UTMP_USER_LEN: usize = 32; pub const _UTMP_LINE_LEN: usize = 32; pub const _UTMP_ID_LEN: usize = 4; -pub const PORT_SOURCE_POSTWAIT: ::c_int = 8; -pub const PORT_SOURCE_SIGNAL: ::c_int = 9; +pub const PORT_SOURCE_POSTWAIT: c_int = 8; +pub const PORT_SOURCE_SIGNAL: c_int = 9; -pub const AF_LOCAL: ::c_int = 1; // AF_UNIX -pub const AF_FILE: ::c_int = 1; // AF_UNIX +pub const AF_LOCAL: c_int = 1; // AF_UNIX +pub const AF_FILE: c_int = 1; // AF_UNIX -pub const TCP_KEEPIDLE: ::c_int = 0x1d; -pub const TCP_KEEPINTVL: ::c_int = 0x1e; -pub const TCP_KEEPCNT: ::c_int = 0x1f; +pub const TCP_KEEPIDLE: c_int = 0x1d; +pub const TCP_KEEPINTVL: c_int = 0x1e; +pub const TCP_KEEPCNT: c_int = 0x1f; -pub const F_DUPFD_CLOEXEC: ::c_int = 47; -pub const F_DUPFD_CLOFORK: ::c_int = 49; -pub const F_DUP2FD_CLOEXEC: ::c_int = 48; -pub const F_DUP2FD_CLOFORK: ::c_int = 50; +pub const F_DUPFD_CLOEXEC: c_int = 47; +pub const F_DUPFD_CLOFORK: c_int = 49; +pub const F_DUP2FD_CLOEXEC: c_int = 48; +pub const F_DUP2FD_CLOFORK: c_int = 50; -pub const _PC_LAST: ::c_int = 102; +pub const _PC_LAST: c_int = 102; -pub const PRIV_PROC_SENSITIVE: ::c_uint = 0x0008; -pub const PRIV_PFEXEC_AUTH: ::c_uint = 0x0200; -pub const PRIV_PROC_TPD: ::c_uint = 0x0400; -pub const PRIV_TPD_UNSAFE: ::c_uint = 0x0800; -pub const PRIV_PROC_TPD_RESET: ::c_uint = 0x1000; -pub const PRIV_TPD_KILLABLE: ::c_uint = 0x2000; +pub const PRIV_PROC_SENSITIVE: c_uint = 0x0008; +pub const PRIV_PFEXEC_AUTH: c_uint = 0x0200; +pub const PRIV_PROC_TPD: c_uint = 0x0400; +pub const PRIV_TPD_UNSAFE: c_uint = 0x0800; +pub const PRIV_PROC_TPD_RESET: c_uint = 0x1000; +pub const PRIV_TPD_KILLABLE: c_uint = 0x2000; -pub const PRIV_USER: ::c_uint = PRIV_DEBUG +pub const PRIV_USER: c_uint = PRIV_DEBUG | PRIV_PROC_SENSITIVE | NET_MAC_AWARE | NET_MAC_AWARE_INHERIT @@ -203,32 +204,32 @@ pub const PRIV_USER: ::c_uint = PRIV_DEBUG | PRIV_PROC_TPD_RESET; extern "C" { - pub fn fexecve(fd: ::c_int, argv: *const *mut ::c_char, envp: *const *mut ::c_char) -> ::c_int; + pub fn fexecve(fd: c_int, argv: *const *mut c_char, envp: *const *mut c_char) -> c_int; - pub fn mincore(addr: *mut ::c_void, len: ::size_t, vec: *mut ::c_char) -> ::c_int; + pub fn mincore(addr: *mut c_void, len: size_t, vec: *mut c_char) -> c_int; - pub fn door_call(d: ::c_int, params: *mut door_arg_t) -> ::c_int; + pub fn door_call(d: c_int, params: *mut door_arg_t) -> c_int; pub fn door_return( - data_ptr: *mut ::c_char, - data_size: ::size_t, + data_ptr: *mut c_char, + data_size: size_t, desc_ptr: *mut door_desc_t, - num_desc: ::c_uint, - ) -> ::c_int; + num_desc: c_uint, + ) -> c_int; pub fn door_create( server_procedure: extern "C" fn( - cookie: *mut ::c_void, - argp: *mut ::c_char, - arg_size: ::size_t, + cookie: *mut c_void, + argp: *mut c_char, + arg_size: size_t, dp: *mut door_desc_t, - n_desc: ::c_uint, + n_desc: c_uint, ), - cookie: *mut ::c_void, + cookie: *mut c_void, attributes: door_attr_t, - ) -> ::c_int; + ) -> c_int; - pub fn fattach(fildes: ::c_int, path: *const ::c_char) -> ::c_int; + pub fn fattach(fildes: c_int, path: *const c_char) -> c_int; - pub fn pthread_getattr_np(thread: ::pthread_t, attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_getattr_np(thread: crate::pthread_t, attr: *mut crate::pthread_attr_t) -> c_int; - pub fn euidaccess(path: *const ::c_char, amode: ::c_int) -> ::c_int; + pub fn euidaccess(path: *const c_char, amode: c_int) -> c_int; } diff --git a/src/unix/solarish/x86.rs b/src/unix/solarish/x86.rs index 23f52ad3c894f..c161169547286 100644 --- a/src/unix/solarish/x86.rs +++ b/src/unix/solarish/x86.rs @@ -1,9 +1,11 @@ -pub type Elf32_Addr = ::c_ulong; -pub type Elf32_Half = ::c_ushort; -pub type Elf32_Off = ::c_ulong; -pub type Elf32_Sword = ::c_long; -pub type Elf32_Word = ::c_ulong; -pub type Elf32_Lword = ::c_ulonglong; +use crate::{c_char, c_long, c_ulong, c_ulonglong, c_ushort}; + +pub type Elf32_Addr = c_ulong; +pub type Elf32_Half = c_ushort; +pub type Elf32_Off = c_ulong; +pub type Elf32_Sword = c_long; +pub type Elf32_Word = c_ulong; +pub type Elf32_Lword = c_ulonglong; pub type Elf32_Phdr = __c_anonymous_Elf32_Phdr; s! { @@ -20,10 +22,10 @@ s! { pub struct dl_phdr_info { pub dlpi_addr: ::Elf32_Addr, - pub dlpi_name: *const ::c_char, + pub dlpi_name: *const c_char, pub dlpi_phdr: *const ::Elf32_Phdr, pub dlpi_phnum: ::Elf32_Half, - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, } } diff --git a/src/unix/solarish/x86_64.rs b/src/unix/solarish/x86_64.rs index 4885aaef57c26..d69fc9a5afbda 100644 --- a/src/unix/solarish/x86_64.rs +++ b/src/unix/solarish/x86_64.rs @@ -1,19 +1,21 @@ +use crate::{c_char, c_int, c_long, c_uint, c_ulong, c_ulonglong, c_ushort, c_void}; + cfg_if! { if #[cfg(target_os = "solaris")] { - use unix::solarish::solaris; + use crate::unix::solarish::solaris; } } -pub type greg_t = ::c_long; +pub type greg_t = c_long; -pub type Elf64_Addr = ::c_ulong; -pub type Elf64_Half = ::c_ushort; -pub type Elf64_Off = ::c_ulong; -pub type Elf64_Sword = ::c_int; -pub type Elf64_Sxword = ::c_long; -pub type Elf64_Word = ::c_uint; -pub type Elf64_Xword = ::c_ulong; -pub type Elf64_Lword = ::c_ulong; +pub type Elf64_Addr = c_ulong; +pub type Elf64_Half = c_ushort; +pub type Elf64_Off = c_ulong; +pub type Elf64_Sword = c_int; +pub type Elf64_Sxword = c_long; +pub type Elf64_Word = c_uint; +pub type Elf64_Xword = c_ulong; +pub type Elf64_Lword = c_ulong; pub type Elf64_Phdr = __c_anonymous_Elf64_Phdr; s! { @@ -27,35 +29,35 @@ s! { pub rdp: u64, pub mxcsr: u32, pub mxcsr_mask: u32, - pub st: [::upad128_t; 8], - pub xmm: [::upad128_t; 16], - pub __fx_ign: [::upad128_t; 6], + pub st: [crate::upad128_t; 8], + pub xmm: [crate::upad128_t; 16], + pub __fx_ign: [crate::upad128_t; 6], pub status: u32, pub xstatus: u32, } pub struct __c_anonymous_Elf64_Phdr { - pub p_type: ::Elf64_Word, - pub p_flags: ::Elf64_Word, - pub p_offset: ::Elf64_Off, - pub p_vaddr: ::Elf64_Addr, - pub p_paddr: ::Elf64_Addr, - pub p_filesz: ::Elf64_Xword, - pub p_memsz: ::Elf64_Xword, - pub p_align: ::Elf64_Xword, + pub p_type: crate::Elf64_Word, + pub p_flags: crate::Elf64_Word, + pub p_offset: crate::Elf64_Off, + pub p_vaddr: crate::Elf64_Addr, + pub p_paddr: crate::Elf64_Addr, + pub p_filesz: crate::Elf64_Xword, + pub p_memsz: crate::Elf64_Xword, + pub p_align: crate::Elf64_Xword, } pub struct dl_phdr_info { - pub dlpi_addr: ::Elf64_Addr, - pub dlpi_name: *const ::c_char, - pub dlpi_phdr: *const ::Elf64_Phdr, - pub dlpi_phnum: ::Elf64_Half, - pub dlpi_adds: ::c_ulonglong, - pub dlpi_subs: ::c_ulonglong, + pub dlpi_addr: crate::Elf64_Addr, + pub dlpi_name: *const c_char, + pub dlpi_phdr: *const crate::Elf64_Phdr, + pub dlpi_phnum: crate::Elf64_Half, + pub dlpi_adds: c_ulonglong, + pub dlpi_subs: c_ulonglong, #[cfg(target_os = "solaris")] - pub dlpi_tls_modid: ::c_ulong, + pub dlpi_tls_modid: c_ulong, #[cfg(target_os = "solaris")] - pub dlpi_tls_data: *mut ::c_void, + pub dlpi_tls_data: *mut c_void, } } @@ -70,26 +72,26 @@ s_no_extra_traits! { } pub struct mcontext_t { - pub gregs: [::greg_t; 28], + pub gregs: [crate::greg_t; 28], pub fpregs: fpregset_t, } pub struct ucontext_t { - pub uc_flags: ::c_ulong, + pub uc_flags: c_ulong, pub uc_link: *mut ucontext_t, - pub uc_sigmask: ::sigset_t, - pub uc_stack: ::stack_t, + pub uc_sigmask: crate::sigset_t, + pub uc_stack: crate::stack_t, pub uc_mcontext: mcontext_t, #[cfg(target_os = "illumos")] - pub uc_brand_data: [*mut ::c_void; 3], + pub uc_brand_data: [*mut c_void; 3], #[cfg(target_os = "illumos")] - pub uc_xsave: ::c_long, + pub uc_xsave: c_long, #[cfg(target_os = "illumos")] - pub uc_filler: ::c_long, + pub uc_filler: c_long, #[cfg(target_os = "solaris")] pub uc_xrs: solaris::xrs_t, #[cfg(target_os = "solaris")] - pub uc_filler: [::c_long; 3], + pub uc_filler: [c_long; 3], } } @@ -108,8 +110,8 @@ cfg_if! { } } impl Eq for __c_anonymous_fp_reg_set {} - impl ::fmt::Debug for __c_anonymous_fp_reg_set { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for __c_anonymous_fp_reg_set { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { f.debug_struct("__c_anonymous_fp_reg_set") .field("fpchip_state", &{ self.fpchip_state }) @@ -124,8 +126,8 @@ cfg_if! { } } impl Eq for fpregset_t {} - impl ::fmt::Debug for fpregset_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for fpregset_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("fpregset_t") .field("fp_reg_set", &self.fp_reg_set) .finish() @@ -137,8 +139,8 @@ cfg_if! { } } impl Eq for mcontext_t {} - impl ::fmt::Debug for mcontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for mcontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("mcontext_t") .field("gregs", &self.gregs) .field("fpregs", &self.fpregs) @@ -156,8 +158,8 @@ cfg_if! { } } impl Eq for ucontext_t {} - impl ::fmt::Debug for ucontext_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for ucontext_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("ucontext_t") .field("uc_flags", &self.uc_flags) .field("uc_link", &self.uc_link) @@ -173,31 +175,31 @@ cfg_if! { // sys/regset.h -pub const REG_GSBASE: ::c_int = 27; -pub const REG_FSBASE: ::c_int = 26; -pub const REG_DS: ::c_int = 25; -pub const REG_ES: ::c_int = 24; -pub const REG_GS: ::c_int = 23; -pub const REG_FS: ::c_int = 22; -pub const REG_SS: ::c_int = 21; -pub const REG_RSP: ::c_int = 20; -pub const REG_RFL: ::c_int = 19; -pub const REG_CS: ::c_int = 18; -pub const REG_RIP: ::c_int = 17; -pub const REG_ERR: ::c_int = 16; -pub const REG_TRAPNO: ::c_int = 15; -pub const REG_RAX: ::c_int = 14; -pub const REG_RCX: ::c_int = 13; -pub const REG_RDX: ::c_int = 12; -pub const REG_RBX: ::c_int = 11; -pub const REG_RBP: ::c_int = 10; -pub const REG_RSI: ::c_int = 9; -pub const REG_RDI: ::c_int = 8; -pub const REG_R8: ::c_int = 7; -pub const REG_R9: ::c_int = 6; -pub const REG_R10: ::c_int = 5; -pub const REG_R11: ::c_int = 4; -pub const REG_R12: ::c_int = 3; -pub const REG_R13: ::c_int = 2; -pub const REG_R14: ::c_int = 1; -pub const REG_R15: ::c_int = 0; +pub const REG_GSBASE: c_int = 27; +pub const REG_FSBASE: c_int = 26; +pub const REG_DS: c_int = 25; +pub const REG_ES: c_int = 24; +pub const REG_GS: c_int = 23; +pub const REG_FS: c_int = 22; +pub const REG_SS: c_int = 21; +pub const REG_RSP: c_int = 20; +pub const REG_RFL: c_int = 19; +pub const REG_CS: c_int = 18; +pub const REG_RIP: c_int = 17; +pub const REG_ERR: c_int = 16; +pub const REG_TRAPNO: c_int = 15; +pub const REG_RAX: c_int = 14; +pub const REG_RCX: c_int = 13; +pub const REG_RDX: c_int = 12; +pub const REG_RBX: c_int = 11; +pub const REG_RBP: c_int = 10; +pub const REG_RSI: c_int = 9; +pub const REG_RDI: c_int = 8; +pub const REG_R8: c_int = 7; +pub const REG_R9: c_int = 6; +pub const REG_R10: c_int = 5; +pub const REG_R11: c_int = 4; +pub const REG_R12: c_int = 3; +pub const REG_R13: c_int = 2; +pub const REG_R14: c_int = 1; +pub const REG_R15: c_int = 0; diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index f863d211b0883..96a82da29d63c 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -3,12 +3,12 @@ use core::mem::size_of; use core::ptr::null_mut; -use c_void; +use crate::c_void; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum DIR {} -impl ::Copy for DIR {} -impl ::Clone for DIR { +impl Copy for DIR {} +impl Clone for DIR { fn clone(&self) -> DIR { *self } @@ -30,109 +30,109 @@ pub type uintmax_t = u64; pub type uintptr_t = usize; pub type intptr_t = isize; pub type ptrdiff_t = isize; -pub type size_t = ::uintptr_t; -pub type ssize_t = ::intptr_t; +pub type size_t = crate::uintptr_t; +pub type ssize_t = intptr_t; -pub type pid_t = ::c_int; +pub type pid_t = c_int; pub type in_addr_t = u32; -pub type sighandler_t = ::size_t; +pub type sighandler_t = size_t; pub type cpuset_t = u32; -pub type blkcnt_t = ::c_long; -pub type blksize_t = ::c_long; -pub type ino_t = ::c_ulong; +pub type blkcnt_t = c_long; +pub type blksize_t = c_long; +pub type ino_t = c_ulong; -pub type rlim_t = ::c_ulong; -pub type suseconds_t = ::c_long; -pub type time_t = ::c_long; +pub type rlim_t = c_ulong; +pub type suseconds_t = c_long; +pub type time_t = c_long; -pub type errno_t = ::c_int; +pub type errno_t = c_int; -pub type useconds_t = ::c_ulong; +pub type useconds_t = c_ulong; -pub type socklen_t = ::c_uint; +pub type socklen_t = c_uint; -pub type pthread_t = ::c_ulong; +pub type pthread_t = c_ulong; -pub type clockid_t = ::c_int; +pub type clockid_t = c_int; //defined for the structs -pub type dev_t = ::c_ulong; -pub type mode_t = ::c_int; -pub type nlink_t = ::c_ulong; -pub type uid_t = ::c_ushort; -pub type gid_t = ::c_ushort; -pub type sigset_t = ::c_ulonglong; -pub type key_t = ::c_long; +pub type dev_t = c_ulong; +pub type mode_t = c_int; +pub type nlink_t = c_ulong; +pub type uid_t = c_ushort; +pub type gid_t = c_ushort; +pub type sigset_t = c_ulonglong; +pub type key_t = c_long; -pub type nfds_t = ::c_uint; -pub type stat64 = ::stat; +pub type nfds_t = c_uint; +pub type stat64 = crate::stat; -pub type pthread_key_t = ::c_ulong; +pub type pthread_key_t = c_ulong; // From b_off_t.h -pub type off_t = ::c_longlong; +pub type off_t = c_longlong; pub type off64_t = off_t; // From b_BOOL.h -pub type BOOL = ::c_int; +pub type BOOL = c_int; // From vxWind.h .. -pub type _Vx_OBJ_HANDLE = ::c_int; -pub type _Vx_TASK_ID = ::_Vx_OBJ_HANDLE; -pub type _Vx_MSG_Q_ID = ::_Vx_OBJ_HANDLE; -pub type _Vx_SEM_ID_KERNEL = ::_Vx_OBJ_HANDLE; -pub type _Vx_RTP_ID = ::_Vx_OBJ_HANDLE; -pub type _Vx_SD_ID = ::_Vx_OBJ_HANDLE; -pub type _Vx_CONDVAR_ID = ::_Vx_OBJ_HANDLE; -pub type _Vx_SEM_ID = *mut ::_Vx_semaphore; -pub type OBJ_HANDLE = ::_Vx_OBJ_HANDLE; -pub type TASK_ID = ::OBJ_HANDLE; -pub type MSG_Q_ID = ::OBJ_HANDLE; -pub type SEM_ID_KERNEL = ::OBJ_HANDLE; -pub type RTP_ID = ::OBJ_HANDLE; -pub type SD_ID = ::OBJ_HANDLE; -pub type CONDVAR_ID = ::OBJ_HANDLE; -pub type STATUS = ::OBJ_HANDLE; +pub type _Vx_OBJ_HANDLE = c_int; +pub type _Vx_TASK_ID = crate::_Vx_OBJ_HANDLE; +pub type _Vx_MSG_Q_ID = crate::_Vx_OBJ_HANDLE; +pub type _Vx_SEM_ID_KERNEL = crate::_Vx_OBJ_HANDLE; +pub type _Vx_RTP_ID = crate::_Vx_OBJ_HANDLE; +pub type _Vx_SD_ID = crate::_Vx_OBJ_HANDLE; +pub type _Vx_CONDVAR_ID = crate::_Vx_OBJ_HANDLE; +pub type _Vx_SEM_ID = *mut crate::_Vx_semaphore; +pub type OBJ_HANDLE = crate::_Vx_OBJ_HANDLE; +pub type TASK_ID = crate::OBJ_HANDLE; +pub type MSG_Q_ID = crate::OBJ_HANDLE; +pub type SEM_ID_KERNEL = crate::OBJ_HANDLE; +pub type RTP_ID = crate::OBJ_HANDLE; +pub type SD_ID = crate::OBJ_HANDLE; +pub type CONDVAR_ID = crate::OBJ_HANDLE; +pub type STATUS = crate::OBJ_HANDLE; // From vxTypes.h pub type _Vx_usr_arg_t = isize; pub type _Vx_exit_code_t = isize; -pub type _Vx_ticks_t = ::c_uint; -pub type _Vx_ticks64_t = ::c_ulonglong; +pub type _Vx_ticks_t = c_uint; +pub type _Vx_ticks64_t = c_ulonglong; -pub type sa_family_t = ::c_uchar; +pub type sa_family_t = c_uchar; // mqueue.h -pub type mqd_t = ::c_int; +pub type mqd_t = c_int; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum _Vx_semaphore {} -impl ::Copy for _Vx_semaphore {} -impl ::Clone for _Vx_semaphore { +impl Copy for _Vx_semaphore {} +impl Clone for _Vx_semaphore { fn clone(&self) -> _Vx_semaphore { *self } } impl siginfo_t { - pub unsafe fn si_addr(&self) -> *mut ::c_void { + pub unsafe fn si_addr(&self) -> *mut c_void { self.si_addr } - pub unsafe fn si_value(&self) -> ::sigval { + pub unsafe fn si_value(&self) -> crate::sigval { self.si_value } - pub unsafe fn si_pid(&self) -> ::pid_t { + pub unsafe fn si_pid(&self) -> crate::pid_t { self.si_pid } - pub unsafe fn si_uid(&self) -> ::uid_t { + pub unsafe fn si_uid(&self) -> crate::uid_t { self.si_uid } - pub unsafe fn si_status(&self) -> ::c_int { + pub unsafe fn si_status(&self) -> c_int { self.si_status } } @@ -140,210 +140,210 @@ impl siginfo_t { s! { // b_pthread_condattr_t.h pub struct pthread_condattr_t { - pub condAttrStatus: ::c_int, - pub condAttrPshared: ::c_int, - pub condAttrClockId: ::clockid_t, + pub condAttrStatus: c_int, + pub condAttrPshared: c_int, + pub condAttrClockId: crate::clockid_t, } // b_pthread_cond_t.h pub struct pthread_cond_t { - pub condSemId: ::_Vx_SEM_ID, - pub condValid: ::c_int, - pub condInitted: ::c_int, - pub condRefCount: ::c_int, - pub condMutex: *mut ::pthread_mutex_t, - pub condAttr: ::pthread_condattr_t, - pub condSemName: [::c_char; _PTHREAD_SHARED_SEM_NAME_MAX], + pub condSemId: crate::_Vx_SEM_ID, + pub condValid: c_int, + pub condInitted: c_int, + pub condRefCount: c_int, + pub condMutex: *mut crate::pthread_mutex_t, + pub condAttr: crate::pthread_condattr_t, + pub condSemName: [c_char; _PTHREAD_SHARED_SEM_NAME_MAX], } // b_pthread_rwlockattr_t.h pub struct pthread_rwlockattr_t { - pub rwlockAttrStatus: ::c_int, - pub rwlockAttrPshared: ::c_int, - pub rwlockAttrMaxReaders: ::c_uint, - pub rwlockAttrConformOpt: ::c_uint, + pub rwlockAttrStatus: c_int, + pub rwlockAttrPshared: c_int, + pub rwlockAttrMaxReaders: c_uint, + pub rwlockAttrConformOpt: c_uint, } // b_pthread_rwlock_t.h pub struct pthread_rwlock_t { - pub rwlockSemId: ::_Vx_SEM_ID, - pub rwlockReadersRefCount: ::c_uint, - pub rwlockValid: ::c_int, - pub rwlockInitted: ::c_int, - pub rwlockAttr: ::pthread_rwlockattr_t, - pub rwlockSemName: [::c_char; _PTHREAD_SHARED_SEM_NAME_MAX], + pub rwlockSemId: crate::_Vx_SEM_ID, + pub rwlockReadersRefCount: c_uint, + pub rwlockValid: c_int, + pub rwlockInitted: c_int, + pub rwlockAttr: crate::pthread_rwlockattr_t, + pub rwlockSemName: [c_char; _PTHREAD_SHARED_SEM_NAME_MAX], } // b_struct_timeval.h pub struct timeval { - pub tv_sec: ::time_t, - pub tv_usec: ::suseconds_t, + pub tv_sec: crate::time_t, + pub tv_usec: crate::suseconds_t, } // socket.h pub struct linger { - pub l_onoff: ::c_int, - pub l_linger: ::c_int, + pub l_onoff: c_int, + pub l_linger: c_int, } pub struct sockaddr { - pub sa_len: ::c_uchar, + pub sa_len: c_uchar, pub sa_family: sa_family_t, - pub sa_data: [::c_char; 14], + pub sa_data: [c_char; 14], } pub struct iovec { - pub iov_base: *mut ::c_void, - pub iov_len: ::size_t, + pub iov_base: *mut c_void, + pub iov_len: size_t, } pub struct msghdr { pub msg_name: *mut c_void, pub msg_namelen: socklen_t, pub msg_iov: *mut iovec, - pub msg_iovlen: ::c_int, + pub msg_iovlen: c_int, pub msg_control: *mut c_void, pub msg_controllen: socklen_t, - pub msg_flags: ::c_int, + pub msg_flags: c_int, } pub struct cmsghdr { pub cmsg_len: socklen_t, - pub cmsg_level: ::c_int, - pub cmsg_type: ::c_int, + pub cmsg_level: c_int, + pub cmsg_type: c_int, } // poll.h pub struct pollfd { - pub fd: ::c_int, - pub events: ::c_short, - pub revents: ::c_short, + pub fd: c_int, + pub events: c_short, + pub revents: c_short, } // resource.h pub struct rlimit { - pub rlim_cur: ::rlim_t, - pub rlim_max: ::rlim_t, + pub rlim_cur: crate::rlim_t, + pub rlim_max: crate::rlim_t, } // stat.h pub struct stat { - pub st_dev: ::dev_t, - pub st_ino: ::ino_t, - pub st_mode: ::mode_t, - pub st_nlink: ::nlink_t, - pub st_uid: ::uid_t, - pub st_gid: ::gid_t, - pub st_rdev: ::dev_t, - pub st_size: ::off_t, - pub st_atime: ::time_t, - pub st_mtime: ::time_t, - pub st_ctime: ::time_t, - pub st_blksize: ::blksize_t, - pub st_blocks: ::blkcnt_t, - pub st_attrib: ::c_uchar, - pub st_reserved1: ::c_int, - pub st_reserved2: ::c_int, - pub st_reserved3: ::c_int, - pub st_reserved4: ::c_int, + pub st_dev: crate::dev_t, + pub st_ino: crate::ino_t, + pub st_mode: crate::mode_t, + pub st_nlink: crate::nlink_t, + pub st_uid: crate::uid_t, + pub st_gid: crate::gid_t, + pub st_rdev: crate::dev_t, + pub st_size: off_t, + pub st_atime: crate::time_t, + pub st_mtime: crate::time_t, + pub st_ctime: crate::time_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, + pub st_attrib: c_uchar, + pub st_reserved1: c_int, + pub st_reserved2: c_int, + pub st_reserved3: c_int, + pub st_reserved4: c_int, } //b_struct__Timespec.h pub struct _Timespec { - pub tv_sec: ::time_t, - pub tv_nsec: ::c_long, + pub tv_sec: crate::time_t, + pub tv_nsec: c_long, } // b_struct__Sched_param.h pub struct sched_param { - pub sched_priority: ::c_int, /* scheduling priority */ - pub sched_ss_low_priority: ::c_int, /* low scheduling priority */ - pub sched_ss_repl_period: ::_Timespec, /* replenishment period */ - pub sched_ss_init_budget: ::_Timespec, /* initial budget */ - pub sched_ss_max_repl: ::c_int, /* max pending replenishment */ + pub sched_priority: c_int, /* scheduling priority */ + pub sched_ss_low_priority: c_int, /* low scheduling priority */ + pub sched_ss_repl_period: crate::_Timespec, /* replenishment period */ + pub sched_ss_init_budget: crate::_Timespec, /* initial budget */ + pub sched_ss_max_repl: c_int, /* max pending replenishment */ } // b_pthread_attr_t.h pub struct pthread_attr_t { - pub threadAttrStatus: ::c_int, - pub threadAttrStacksize: ::size_t, - pub threadAttrStackaddr: *mut ::c_void, - pub threadAttrGuardsize: ::size_t, - pub threadAttrDetachstate: ::c_int, - pub threadAttrContentionscope: ::c_int, - pub threadAttrInheritsched: ::c_int, - pub threadAttrSchedpolicy: ::c_int, - pub threadAttrName: *mut ::c_char, - pub threadAttrOptions: ::c_int, - pub threadAttrSchedparam: ::sched_param, + pub threadAttrStatus: c_int, + pub threadAttrStacksize: size_t, + pub threadAttrStackaddr: *mut c_void, + pub threadAttrGuardsize: size_t, + pub threadAttrDetachstate: c_int, + pub threadAttrContentionscope: c_int, + pub threadAttrInheritsched: c_int, + pub threadAttrSchedpolicy: c_int, + pub threadAttrName: *mut c_char, + pub threadAttrOptions: c_int, + pub threadAttrSchedparam: crate::sched_param, } // signal.h pub struct sigaction { - pub sa_u: ::sa_u_t, - pub sa_mask: ::sigset_t, - pub sa_flags: ::c_int, + pub sa_u: crate::sa_u_t, + pub sa_mask: crate::sigset_t, + pub sa_flags: c_int, } // b_stack_t.h pub struct stack_t { - pub ss_sp: *mut ::c_void, - pub ss_size: ::size_t, - pub ss_flags: ::c_int, + pub ss_sp: *mut c_void, + pub ss_size: size_t, + pub ss_flags: c_int, } // signal.h pub struct siginfo_t { - pub si_signo: ::c_int, - pub si_code: ::c_int, - pub si_value: ::sigval, - pub si_errno: ::c_int, - pub si_status: ::c_int, - pub si_addr: *mut ::c_void, - pub si_uid: ::uid_t, - pub si_pid: ::pid_t, + pub si_signo: c_int, + pub si_code: c_int, + pub si_value: crate::sigval, + pub si_errno: c_int, + pub si_status: c_int, + pub si_addr: *mut c_void, + pub si_uid: crate::uid_t, + pub si_pid: crate::pid_t, } // pthread.h (krnl) // b_pthread_mutexattr_t.h (usr) pub struct pthread_mutexattr_t { - mutexAttrStatus: ::c_int, - mutexAttrPshared: ::c_int, - mutexAttrProtocol: ::c_int, - mutexAttrPrioceiling: ::c_int, - mutexAttrType: ::c_int, + mutexAttrStatus: c_int, + mutexAttrPshared: c_int, + mutexAttrProtocol: c_int, + mutexAttrPrioceiling: c_int, + mutexAttrType: c_int, } // pthread.h (krnl) // b_pthread_mutex_t.h (usr) pub struct pthread_mutex_t { - pub mutexSemId: ::_Vx_SEM_ID, /*_Vx_SEM_ID ..*/ - pub mutexValid: ::c_int, - pub mutexInitted: ::c_int, - pub mutexCondRefCount: ::c_int, - pub mutexSavPriority: ::c_int, - pub mutexAttr: ::pthread_mutexattr_t, - pub mutexSemName: [::c_char; _PTHREAD_SHARED_SEM_NAME_MAX], + pub mutexSemId: crate::_Vx_SEM_ID, /*_Vx_SEM_ID ..*/ + pub mutexValid: c_int, + pub mutexInitted: c_int, + pub mutexCondRefCount: c_int, + pub mutexSavPriority: c_int, + pub mutexAttr: crate::pthread_mutexattr_t, + pub mutexSemName: [c_char; _PTHREAD_SHARED_SEM_NAME_MAX], } // b_struct_timespec.h pub struct timespec { - pub tv_sec: ::time_t, - pub tv_nsec: ::c_long, + pub tv_sec: crate::time_t, + pub tv_nsec: c_long, } // time.h pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, } // in.h @@ -366,19 +366,19 @@ s! { // in6.h pub struct ipv6_mreq { pub ipv6mr_multiaddr: in6_addr, - pub ipv6mr_interface: ::c_uint, + pub ipv6mr_interface: c_uint, } // netdb.h pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, - pub ai_addrlen: ::size_t, - pub ai_canonname: *mut ::c_char, - pub ai_addr: *mut ::sockaddr, - pub ai_next: *mut ::addrinfo, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, + pub ai_addrlen: size_t, + pub ai_canonname: *mut c_char, + pub ai_addr: *mut crate::sockaddr, + pub ai_next: *mut crate::addrinfo, } // in.h @@ -386,8 +386,8 @@ s! { pub sin_len: u8, pub sin_family: u8, pub sin_port: u16, - pub sin_addr: ::in_addr, - pub sin_zero: [::c_char; 8], + pub sin_addr: crate::in_addr, + pub sin_zero: [c_char; 8], } // in6.h @@ -396,83 +396,83 @@ s! { pub sin6_family: u8, pub sin6_port: u16, pub sin6_flowinfo: u32, - pub sin6_addr: ::in6_addr, + pub sin6_addr: crate::in6_addr, pub sin6_scope_id: u32, } pub struct Dl_info { - pub dli_fname: *const ::c_char, - pub dli_fbase: *mut ::c_void, - pub dli_sname: *const ::c_char, - pub dli_saddr: *mut ::c_void, + pub dli_fname: *const c_char, + pub dli_fbase: *mut c_void, + pub dli_sname: *const c_char, + pub dli_saddr: *mut c_void, } pub struct mq_attr { - pub mq_maxmsg: ::c_long, - pub mq_msgsize: ::c_long, - pub mq_flags: ::c_long, - pub mq_curmsgs: ::c_long, + pub mq_maxmsg: c_long, + pub mq_msgsize: c_long, + pub mq_flags: c_long, + pub mq_curmsgs: c_long, } pub struct flock { - pub l_type: ::c_short, - pub l_whence: ::c_short, - pub l_start: ::c_long, - pub l_len: ::c_long, - pub l_pid: ::c_long, + pub l_type: c_short, + pub l_whence: c_short, + pub l_start: c_long, + pub l_len: c_long, + pub l_pid: c_long, } } s_no_extra_traits! { // dirent.h pub struct dirent { - pub d_ino: ::ino_t, - pub d_name: [::c_char; _PARM_NAME_MAX as usize + 1], + pub d_ino: crate::ino_t, + pub d_name: [c_char; _PARM_NAME_MAX as usize + 1], } pub struct sockaddr_un { pub sun_len: u8, pub sun_family: sa_family_t, - pub sun_path: [::c_char; 104], + pub sun_path: [c_char; 104], } // rtpLibCommon.h pub struct RTP_DESC { - pub status: ::c_int, + pub status: c_int, pub options: u32, - pub entrAddr: *mut ::c_void, - pub initTaskId: ::TASK_ID, - pub parentId: ::RTP_ID, - pub pathName: [::c_char; VX_RTP_NAME_LENGTH as usize + 1], - pub taskCnt: ::c_int, - pub textStart: *mut ::c_void, - pub textEnd: *mut ::c_void, + pub entrAddr: *mut c_void, + pub initTaskId: crate::TASK_ID, + pub parentId: crate::RTP_ID, + pub pathName: [c_char; VX_RTP_NAME_LENGTH as usize + 1], + pub taskCnt: c_int, + pub textStart: *mut c_void, + pub textEnd: *mut c_void, } // socket.h pub struct sockaddr_storage { - pub ss_len: ::c_uchar, - pub ss_family: ::sa_family_t, - pub __ss_pad1: [::c_char; _SS_PAD1SIZE], + pub ss_len: c_uchar, + pub ss_family: crate::sa_family_t, + pub __ss_pad1: [c_char; _SS_PAD1SIZE], pub __ss_align: i32, - pub __ss_pad2: [::c_char; _SS_PAD2SIZE], + pub __ss_pad2: [c_char; _SS_PAD2SIZE], } pub union sa_u_t { - pub sa_handler: ::Option !>, + pub sa_handler: Option !>, pub sa_sigaction: - ::Option !>, + Option !>, } pub union sigval { - pub sival_int: ::c_int, - pub sival_ptr: *mut ::c_void, + pub sival_int: c_int, + pub sival_ptr: *mut c_void, } } cfg_if! { if #[cfg(feature = "extra_traits")] { - impl ::fmt::Debug for dirent { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for dirent { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("dirent") .field("d_ino", &self.d_ino) .field("d_name", &&self.d_name[..]) @@ -480,8 +480,8 @@ cfg_if! { } } - impl ::fmt::Debug for sockaddr_un { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_un { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_un") .field("sun_len", &self.sun_len) .field("sun_family", &self.sun_family) @@ -490,8 +490,8 @@ cfg_if! { } } - impl ::fmt::Debug for RTP_DESC { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for RTP_DESC { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("RTP_DESC") .field("status", &self.status) .field("options", &self.options) @@ -505,8 +505,8 @@ cfg_if! { .finish() } } - impl ::fmt::Debug for sockaddr_storage { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sockaddr_storage { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sockaddr_storage") .field("ss_len", &self.ss_len) .field("ss_family", &self.ss_family) @@ -533,8 +533,8 @@ cfg_if! { } } impl Eq for sa_u_t {} - impl ::fmt::Debug for sa_u_t { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sa_u_t { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { unsafe { let h = match self.sa_handler { Some(handler) => handler as usize, @@ -545,8 +545,8 @@ cfg_if! { } } } - impl ::hash::Hash for sa_u_t { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sa_u_t { + fn hash(&self, state: &mut H) { unsafe { let h = match self.sa_handler { Some(handler) => handler as usize, @@ -563,144 +563,144 @@ cfg_if! { } } impl Eq for sigval {} - impl ::fmt::Debug for sigval { - fn fmt(&self, f: &mut ::fmt::Formatter) -> ::fmt::Result { + impl crate::fmt::Debug for sigval { + fn fmt(&self, f: &mut crate::fmt::Formatter) -> crate::fmt::Result { f.debug_struct("sigval") .field("sival_ptr", unsafe { &(self.sival_ptr as usize) }) .finish() } } - impl ::hash::Hash for sigval { - fn hash(&self, state: &mut H) { + impl crate::hash::Hash for sigval { + fn hash(&self, state: &mut H) { unsafe { (self.sival_ptr as usize).hash(state) }; } } } } -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const EXIT_FAILURE: ::c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const EXIT_FAILURE: c_int = 1; -pub const EAI_SERVICE: ::c_int = 9; -pub const EAI_SOCKTYPE: ::c_int = 10; -pub const EAI_SYSTEM: ::c_int = 11; +pub const EAI_SERVICE: c_int = 9; +pub const EAI_SOCKTYPE: c_int = 10; +pub const EAI_SYSTEM: c_int = 11; // FIXME: This is not defined in vxWorks, but we have to define it here // to make the building pass for getrandom and std -pub const RTLD_DEFAULT: *mut ::c_void = 0i64 as *mut ::c_void; +pub const RTLD_DEFAULT: *mut c_void = 0i64 as *mut c_void; //Clock Lib Stuff -pub const CLOCK_REALTIME: ::c_int = 0x0; -pub const CLOCK_MONOTONIC: ::c_int = 0x1; -pub const CLOCK_PROCESS_CPUTIME_ID: ::c_int = 0x2; -pub const CLOCK_THREAD_CPUTIME_ID: ::c_int = 0x3; -pub const TIMER_ABSTIME: ::c_int = 0x1; -pub const TIMER_RELTIME: ::c_int = 0x0; +pub const CLOCK_REALTIME: c_int = 0x0; +pub const CLOCK_MONOTONIC: c_int = 0x1; +pub const CLOCK_PROCESS_CPUTIME_ID: c_int = 0x2; +pub const CLOCK_THREAD_CPUTIME_ID: c_int = 0x3; +pub const TIMER_ABSTIME: c_int = 0x1; +pub const TIMER_RELTIME: c_int = 0x0; // PTHREAD STUFF -pub const PTHREAD_INITIALIZED_OBJ: ::c_int = 0xF70990EF; -pub const PTHREAD_DESTROYED_OBJ: ::c_int = -1; -pub const PTHREAD_VALID_OBJ: ::c_int = 0xEC542A37; -pub const PTHREAD_INVALID_OBJ: ::c_int = -1; -pub const PTHREAD_UNUSED_YET_OBJ: ::c_int = -1; - -pub const PTHREAD_PRIO_NONE: ::c_int = 0; -pub const PTHREAD_PRIO_INHERIT: ::c_int = 1; -pub const PTHREAD_PRIO_PROTECT: ::c_int = 2; - -pub const PTHREAD_MUTEX_NORMAL: ::c_int = 0; -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 PTHREAD_INITIALIZED_OBJ: c_int = 0xF70990EF; +pub const PTHREAD_DESTROYED_OBJ: c_int = -1; +pub const PTHREAD_VALID_OBJ: c_int = 0xEC542A37; +pub const PTHREAD_INVALID_OBJ: c_int = -1; +pub const PTHREAD_UNUSED_YET_OBJ: c_int = -1; + +pub const PTHREAD_PRIO_NONE: c_int = 0; +pub const PTHREAD_PRIO_INHERIT: c_int = 1; +pub const PTHREAD_PRIO_PROTECT: c_int = 2; + +pub const PTHREAD_MUTEX_NORMAL: c_int = 0; +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 PTHREAD_STACK_MIN: usize = 4096; pub const _PTHREAD_SHARED_SEM_NAME_MAX: usize = 30; //sched.h -pub const SCHED_FIFO: ::c_int = 0x01; -pub const SCHED_RR: ::c_int = 0x02; -pub const SCHED_OTHER: ::c_int = 0x04; -pub const SCHED_SPORADIC: ::c_int = 0x08; -pub const PRIO_PROCESS: ::c_uint = 0; -pub const SCHED_FIFO_HIGH_PRI: ::c_int = 255; -pub const SCHED_FIFO_LOW_PRI: ::c_int = 0; -pub const SCHED_RR_HIGH_PRI: ::c_int = 255; -pub const SCHED_RR_LOW_PRI: ::c_int = 0; -pub const SCHED_SPORADIC_HIGH_PRI: ::c_int = 255; -pub const SCHED_SPORADIC_LOW_PRI: ::c_int = 0; +pub const SCHED_FIFO: c_int = 0x01; +pub const SCHED_RR: c_int = 0x02; +pub const SCHED_OTHER: c_int = 0x04; +pub const SCHED_SPORADIC: c_int = 0x08; +pub const PRIO_PROCESS: c_uint = 0; +pub const SCHED_FIFO_HIGH_PRI: c_int = 255; +pub const SCHED_FIFO_LOW_PRI: c_int = 0; +pub const SCHED_RR_HIGH_PRI: c_int = 255; +pub const SCHED_RR_LOW_PRI: c_int = 0; +pub const SCHED_SPORADIC_HIGH_PRI: c_int = 255; +pub const SCHED_SPORADIC_LOW_PRI: c_int = 0; // ERRNO STUFF -pub const ERROR: ::c_int = -1; -pub const OK: ::c_int = 0; -pub const EPERM: ::c_int = 1; /* Not owner */ -pub const ENOENT: ::c_int = 2; /* No such file or directory */ -pub const ESRCH: ::c_int = 3; /* No such process */ -pub const EINTR: ::c_int = 4; /* Interrupted system call */ -pub const EIO: ::c_int = 5; /* I/O error */ -pub const ENXIO: ::c_int = 6; /* No such device or address */ -pub const E2BIG: ::c_int = 7; /* Arg list too long */ -pub const ENOEXEC: ::c_int = 8; /* Exec format error */ -pub const EBADF: ::c_int = 9; /* Bad file number */ -pub const ECHILD: ::c_int = 10; /* No children */ -pub const EAGAIN: ::c_int = 11; /* No more processes */ -pub const ENOMEM: ::c_int = 12; /* Not enough core */ -pub const EACCES: ::c_int = 13; /* Permission denied */ -pub const EFAULT: ::c_int = 14; -pub const ENOTEMPTY: ::c_int = 15; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENAMETOOLONG: ::c_int = 26; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDEADLK: ::c_int = 33; -pub const ERANGE: ::c_int = 38; -pub const EDESTADDRREQ: ::c_int = 40; -pub const EPROTOTYPE: ::c_int = 41; -pub const ENOPROTOOPT: ::c_int = 42; -pub const EPROTONOSUPPORT: ::c_int = 43; -pub const ESOCKTNOSUPPORT: ::c_int = 44; -pub const EOPNOTSUPP: ::c_int = 45; -pub const EPFNOSUPPORT: ::c_int = 46; -pub const EAFNOSUPPORT: ::c_int = 47; -pub const EADDRINUSE: ::c_int = 48; -pub const EADDRNOTAVAIL: ::c_int = 49; -pub const ENOTSOCK: ::c_int = 50; -pub const ENETUNREACH: ::c_int = 51; -pub const ENETRESET: ::c_int = 52; -pub const ECONNABORTED: ::c_int = 53; -pub const ECONNRESET: ::c_int = 54; -pub const ENOBUFS: ::c_int = 55; -pub const EISCONN: ::c_int = 56; -pub const ENOTCONN: ::c_int = 57; -pub const ESHUTDOWN: ::c_int = 58; -pub const ETOOMANYREFS: ::c_int = 59; -pub const ETIMEDOUT: ::c_int = 60; -pub const ECONNREFUSED: ::c_int = 61; -pub const ENETDOWN: ::c_int = 62; -pub const ETXTBSY: ::c_int = 63; -pub const ELOOP: ::c_int = 64; -pub const EHOSTUNREACH: ::c_int = 65; -pub const EINPROGRESS: ::c_int = 68; -pub const EALREADY: ::c_int = 69; -pub const EWOULDBLOCK: ::c_int = 70; -pub const ENOSYS: ::c_int = 71; -pub const EDQUOT: ::c_int = 83; -pub const ESTALE: ::c_int = 88; +pub const ERROR: c_int = -1; +pub const OK: c_int = 0; +pub const EPERM: c_int = 1; /* Not owner */ +pub const ENOENT: c_int = 2; /* No such file or directory */ +pub const ESRCH: c_int = 3; /* No such process */ +pub const EINTR: c_int = 4; /* Interrupted system call */ +pub const EIO: c_int = 5; /* I/O error */ +pub const ENXIO: c_int = 6; /* No such device or address */ +pub const E2BIG: c_int = 7; /* Arg list too long */ +pub const ENOEXEC: c_int = 8; /* Exec format error */ +pub const EBADF: c_int = 9; /* Bad file number */ +pub const ECHILD: c_int = 10; /* No children */ +pub const EAGAIN: c_int = 11; /* No more processes */ +pub const ENOMEM: c_int = 12; /* Not enough core */ +pub const EACCES: c_int = 13; /* Permission denied */ +pub const EFAULT: c_int = 14; +pub const ENOTEMPTY: c_int = 15; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENAMETOOLONG: c_int = 26; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDEADLK: c_int = 33; +pub const ERANGE: c_int = 38; +pub const EDESTADDRREQ: c_int = 40; +pub const EPROTOTYPE: c_int = 41; +pub const ENOPROTOOPT: c_int = 42; +pub const EPROTONOSUPPORT: c_int = 43; +pub const ESOCKTNOSUPPORT: c_int = 44; +pub const EOPNOTSUPP: c_int = 45; +pub const EPFNOSUPPORT: c_int = 46; +pub const EAFNOSUPPORT: c_int = 47; +pub const EADDRINUSE: c_int = 48; +pub const EADDRNOTAVAIL: c_int = 49; +pub const ENOTSOCK: c_int = 50; +pub const ENETUNREACH: c_int = 51; +pub const ENETRESET: c_int = 52; +pub const ECONNABORTED: c_int = 53; +pub const ECONNRESET: c_int = 54; +pub const ENOBUFS: c_int = 55; +pub const EISCONN: c_int = 56; +pub const ENOTCONN: c_int = 57; +pub const ESHUTDOWN: c_int = 58; +pub const ETOOMANYREFS: c_int = 59; +pub const ETIMEDOUT: c_int = 60; +pub const ECONNREFUSED: c_int = 61; +pub const ENETDOWN: c_int = 62; +pub const ETXTBSY: c_int = 63; +pub const ELOOP: c_int = 64; +pub const EHOSTUNREACH: c_int = 65; +pub const EINPROGRESS: c_int = 68; +pub const EALREADY: c_int = 69; +pub const EWOULDBLOCK: c_int = 70; +pub const ENOSYS: c_int = 71; +pub const EDQUOT: c_int = 83; +pub const ESTALE: c_int = 88; // NFS errnos: Refer to pkgs_v2/storage/fs/nfs/h/nfs/nfsCommon.h -const M_nfsStat: ::c_int = 48 << 16; +const M_nfsStat: c_int = 48 << 16; enum nfsstat { NFSERR_REMOTE = 71, NFSERR_WFLUSH = 99, @@ -712,295 +712,296 @@ enum nfsstat { NFSERR_JUKEBOX = 10008, } -pub const S_nfsLib_NFS_OK: ::c_int = OK; -pub const S_nfsLib_NFSERR_PERM: ::c_int = EPERM; -pub const S_nfsLib_NFSERR_NOENT: ::c_int = ENOENT; -pub const S_nfsLib_NFSERR_IO: ::c_int = EIO; -pub const S_nfsLib_NFSERR_NXIO: ::c_int = ENXIO; -pub const S_nfsLib_NFSERR_ACCESS: ::c_int = EACCES; -pub const S_nfsLib_NFSERR_EXIST: ::c_int = EEXIST; -pub const S_nfsLib_NFSERR_ENODEV: ::c_int = ENODEV; -pub const S_nfsLib_NFSERR_NOTDIR: ::c_int = ENOTDIR; -pub const S_nfsLib_NFSERR_ISDIR: ::c_int = EISDIR; -pub const S_nfsLib_NFSERR_INVAL: ::c_int = EINVAL; -pub const S_nfsLib_NFSERR_FBIG: ::c_int = EFBIG; -pub const S_nfsLib_NFSERR_NOSPC: ::c_int = ENOSPC; -pub const S_nfsLib_NFSERR_ROFS: ::c_int = EROFS; -pub const S_nfsLib_NFSERR_NAMETOOLONG: ::c_int = ENAMETOOLONG; -pub const S_nfsLib_NFSERR_NOTEMPTY: ::c_int = ENOTEMPTY; -pub const S_nfsLib_NFSERR_DQUOT: ::c_int = EDQUOT; -pub const S_nfsLib_NFSERR_STALE: ::c_int = ESTALE; -pub const S_nfsLib_NFSERR_WFLUSH: ::c_int = M_nfsStat | nfsstat::NFSERR_WFLUSH as ::c_int; -pub const S_nfsLib_NFSERR_REMOTE: ::c_int = M_nfsStat | nfsstat::NFSERR_REMOTE as ::c_int; -pub const S_nfsLib_NFSERR_BADHANDLE: ::c_int = M_nfsStat | nfsstat::NFSERR_BADHANDLE as ::c_int; -pub const S_nfsLib_NFSERR_NOT_SYNC: ::c_int = M_nfsStat | nfsstat::NFSERR_NOT_SYNC as ::c_int; -pub const S_nfsLib_NFSERR_BAD_COOKIE: ::c_int = M_nfsStat | nfsstat::NFSERR_BAD_COOKIE as ::c_int; -pub const S_nfsLib_NFSERR_NOTSUPP: ::c_int = EOPNOTSUPP; -pub const S_nfsLib_NFSERR_TOOSMALL: ::c_int = M_nfsStat | nfsstat::NFSERR_TOOSMALL as ::c_int; -pub const S_nfsLib_NFSERR_SERVERFAULT: ::c_int = EIO; -pub const S_nfsLib_NFSERR_BADTYPE: ::c_int = M_nfsStat | nfsstat::NFSERR_BADTYPE as ::c_int; -pub const S_nfsLib_NFSERR_JUKEBOX: ::c_int = M_nfsStat | nfsstat::NFSERR_JUKEBOX as ::c_int; +pub const S_nfsLib_NFS_OK: c_int = OK; +pub const S_nfsLib_NFSERR_PERM: c_int = EPERM; +pub const S_nfsLib_NFSERR_NOENT: c_int = ENOENT; +pub const S_nfsLib_NFSERR_IO: c_int = EIO; +pub const S_nfsLib_NFSERR_NXIO: c_int = ENXIO; +pub const S_nfsLib_NFSERR_ACCESS: c_int = EACCES; +pub const S_nfsLib_NFSERR_EXIST: c_int = EEXIST; +pub const S_nfsLib_NFSERR_ENODEV: c_int = ENODEV; +pub const S_nfsLib_NFSERR_NOTDIR: c_int = ENOTDIR; +pub const S_nfsLib_NFSERR_ISDIR: c_int = EISDIR; +pub const S_nfsLib_NFSERR_INVAL: c_int = EINVAL; +pub const S_nfsLib_NFSERR_FBIG: c_int = EFBIG; +pub const S_nfsLib_NFSERR_NOSPC: c_int = ENOSPC; +pub const S_nfsLib_NFSERR_ROFS: c_int = EROFS; +pub const S_nfsLib_NFSERR_NAMETOOLONG: c_int = ENAMETOOLONG; +pub const S_nfsLib_NFSERR_NOTEMPTY: c_int = ENOTEMPTY; +pub const S_nfsLib_NFSERR_DQUOT: c_int = EDQUOT; +pub const S_nfsLib_NFSERR_STALE: c_int = ESTALE; +pub const S_nfsLib_NFSERR_WFLUSH: c_int = M_nfsStat | nfsstat::NFSERR_WFLUSH as c_int; +pub const S_nfsLib_NFSERR_REMOTE: c_int = M_nfsStat | nfsstat::NFSERR_REMOTE as c_int; +pub const S_nfsLib_NFSERR_BADHANDLE: c_int = M_nfsStat | nfsstat::NFSERR_BADHANDLE as c_int; +pub const S_nfsLib_NFSERR_NOT_SYNC: c_int = M_nfsStat | nfsstat::NFSERR_NOT_SYNC as c_int; +pub const S_nfsLib_NFSERR_BAD_COOKIE: c_int = M_nfsStat | nfsstat::NFSERR_BAD_COOKIE as c_int; +pub const S_nfsLib_NFSERR_NOTSUPP: c_int = EOPNOTSUPP; +pub const S_nfsLib_NFSERR_TOOSMALL: c_int = M_nfsStat | nfsstat::NFSERR_TOOSMALL as c_int; +pub const S_nfsLib_NFSERR_SERVERFAULT: c_int = EIO; +pub const S_nfsLib_NFSERR_BADTYPE: c_int = M_nfsStat | nfsstat::NFSERR_BADTYPE as c_int; +pub const S_nfsLib_NFSERR_JUKEBOX: c_int = M_nfsStat | nfsstat::NFSERR_JUKEBOX as c_int; // internal offset values for below constants -const taskErrorBase: ::c_int = 0x00030000; -const semErrorBase: ::c_int = 0x00160000; -const objErrorBase: ::c_int = 0x003d0000; +const taskErrorBase: c_int = 0x00030000; +const semErrorBase: c_int = 0x00160000; +const objErrorBase: c_int = 0x003d0000; // taskLibCommon.h -pub const S_taskLib_NAME_NOT_FOUND: ::c_int = taskErrorBase + 0x0065; -pub const S_taskLib_TASK_HOOK_TABLE_FULL: ::c_int = taskErrorBase + 0x0066; -pub const S_taskLib_TASK_HOOK_NOT_FOUND: ::c_int = taskErrorBase + 0x0067; -pub const S_taskLib_ILLEGAL_PRIORITY: ::c_int = taskErrorBase + 0x0068; +pub const S_taskLib_NAME_NOT_FOUND: c_int = taskErrorBase + 0x0065; +pub const S_taskLib_TASK_HOOK_TABLE_FULL: c_int = taskErrorBase + 0x0066; +pub const S_taskLib_TASK_HOOK_NOT_FOUND: c_int = taskErrorBase + 0x0067; +pub const S_taskLib_ILLEGAL_PRIORITY: c_int = taskErrorBase + 0x0068; // FIXME: could also be useful for TASK_DESC type -pub const VX_TASK_NAME_LENGTH: ::c_int = 31; +pub const VX_TASK_NAME_LENGTH: c_int = 31; // semLibCommon.h -pub const S_semLib_INVALID_STATE: ::c_int = semErrorBase + 0x0065; -pub const S_semLib_INVALID_OPTION: ::c_int = semErrorBase + 0x0066; -pub const S_semLib_INVALID_QUEUE_TYPE: ::c_int = semErrorBase + 0x0067; -pub const S_semLib_INVALID_OPERATION: ::c_int = semErrorBase + 0x0068; +pub const S_semLib_INVALID_STATE: c_int = semErrorBase + 0x0065; +pub const S_semLib_INVALID_OPTION: c_int = semErrorBase + 0x0066; +pub const S_semLib_INVALID_QUEUE_TYPE: c_int = semErrorBase + 0x0067; +pub const S_semLib_INVALID_OPERATION: c_int = semErrorBase + 0x0068; // objLibCommon.h -pub const S_objLib_OBJ_ID_ERROR: ::c_int = objErrorBase + 0x0001; -pub const S_objLib_OBJ_UNAVAILABLE: ::c_int = objErrorBase + 0x0002; -pub const S_objLib_OBJ_DELETED: ::c_int = objErrorBase + 0x0003; -pub const S_objLib_OBJ_TIMEOUT: ::c_int = objErrorBase + 0x0004; -pub const S_objLib_OBJ_NO_METHOD: ::c_int = objErrorBase + 0x0005; +pub const S_objLib_OBJ_ID_ERROR: c_int = objErrorBase + 0x0001; +pub const S_objLib_OBJ_UNAVAILABLE: c_int = objErrorBase + 0x0002; +pub const S_objLib_OBJ_DELETED: c_int = objErrorBase + 0x0003; +pub const S_objLib_OBJ_TIMEOUT: c_int = objErrorBase + 0x0004; +pub const S_objLib_OBJ_NO_METHOD: c_int = objErrorBase + 0x0005; // in.h -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_IPV6: ::c_int = 41; +pub const IPPROTO_IP: c_int = 0; +pub const IPPROTO_IPV6: c_int = 41; -pub const IP_TTL: ::c_int = 4; -pub const IP_MULTICAST_IF: ::c_int = 9; -pub const IP_MULTICAST_TTL: ::c_int = 10; -pub const IP_MULTICAST_LOOP: ::c_int = 11; -pub const IP_ADD_MEMBERSHIP: ::c_int = 12; -pub const IP_DROP_MEMBERSHIP: ::c_int = 13; +pub const IP_TTL: c_int = 4; +pub const IP_MULTICAST_IF: c_int = 9; +pub const IP_MULTICAST_TTL: c_int = 10; +pub const IP_MULTICAST_LOOP: c_int = 11; +pub const IP_ADD_MEMBERSHIP: c_int = 12; +pub const IP_DROP_MEMBERSHIP: c_int = 13; // in6.h -pub const IPV6_V6ONLY: ::c_int = 1; -pub const IPV6_UNICAST_HOPS: ::c_int = 4; -pub const IPV6_MULTICAST_IF: ::c_int = 9; -pub const IPV6_MULTICAST_HOPS: ::c_int = 10; -pub const IPV6_MULTICAST_LOOP: ::c_int = 11; -pub const IPV6_ADD_MEMBERSHIP: ::c_int = 12; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = 13; +pub const IPV6_V6ONLY: c_int = 1; +pub const IPV6_UNICAST_HOPS: c_int = 4; +pub const IPV6_MULTICAST_IF: c_int = 9; +pub const IPV6_MULTICAST_HOPS: c_int = 10; +pub const IPV6_MULTICAST_LOOP: c_int = 11; +pub const IPV6_ADD_MEMBERSHIP: c_int = 12; +pub const IPV6_DROP_MEMBERSHIP: c_int = 13; // STAT Stuff -pub const S_IFMT: ::c_int = 0o17_0000; -pub const S_IFIFO: ::c_int = 0o1_0000; -pub const S_IFCHR: ::c_int = 0o2_0000; -pub const S_IFDIR: ::c_int = 0o4_0000; -pub const S_IFBLK: ::c_int = 0o6_0000; -pub const S_IFREG: ::c_int = 0o10_0000; -pub const S_IFLNK: ::c_int = 0o12_0000; -pub const S_IFSHM: ::c_int = 0o13_0000; -pub const S_IFSOCK: ::c_int = 0o14_0000; -pub const S_ISUID: ::c_int = 0o4000; -pub const S_ISGID: ::c_int = 0o2000; -pub const S_ISTXT: ::c_int = 0o1000; +pub const S_IFMT: c_int = 0o17_0000; +pub const S_IFIFO: c_int = 0o1_0000; +pub const S_IFCHR: c_int = 0o2_0000; +pub const S_IFDIR: c_int = 0o4_0000; +pub const S_IFBLK: c_int = 0o6_0000; +pub const S_IFREG: c_int = 0o10_0000; +pub const S_IFLNK: c_int = 0o12_0000; +pub const S_IFSHM: c_int = 0o13_0000; +pub const S_IFSOCK: c_int = 0o14_0000; +pub const S_ISUID: c_int = 0o4000; +pub const S_ISGID: c_int = 0o2000; +pub const S_ISTXT: c_int = 0o1000; pub const S_ISVTX: mode_t = 0o1000; -pub const S_IRUSR: ::c_int = 0o0400; -pub const S_IWUSR: ::c_int = 0o0200; -pub const S_IXUSR: ::c_int = 0o0100; -pub const S_IRWXU: ::c_int = 0o0700; -pub const S_IRGRP: ::c_int = 0o0040; -pub const S_IWGRP: ::c_int = 0o0020; -pub const S_IXGRP: ::c_int = 0o0010; -pub const S_IRWXG: ::c_int = 0o0070; -pub const S_IROTH: ::c_int = 0o0004; -pub const S_IWOTH: ::c_int = 0o0002; -pub const S_IXOTH: ::c_int = 0o0001; -pub const S_IRWXO: ::c_int = 0o0007; +pub const S_IRUSR: c_int = 0o0400; +pub const S_IWUSR: c_int = 0o0200; +pub const S_IXUSR: c_int = 0o0100; +pub const S_IRWXU: c_int = 0o0700; +pub const S_IRGRP: c_int = 0o0040; +pub const S_IWGRP: c_int = 0o0020; +pub const S_IXGRP: c_int = 0o0010; +pub const S_IRWXG: c_int = 0o0070; +pub const S_IROTH: c_int = 0o0004; +pub const S_IWOTH: c_int = 0o0002; +pub const S_IXOTH: c_int = 0o0001; +pub const S_IRWXO: c_int = 0o0007; // socket.h -pub const SOL_SOCKET: ::c_int = 0xffff; -pub const SOMAXCONN: ::c_int = 128; - -pub const SO_DEBUG: ::c_int = 0x0001; -pub const SO_REUSEADDR: ::c_int = 0x0004; -pub const SO_KEEPALIVE: ::c_int = 0x0008; -pub const SO_DONTROUTE: ::c_int = 0x0010; -pub const SO_RCVLOWAT: ::c_int = 0x0012; -pub const SO_SNDLOWAT: ::c_int = 0x0013; -pub const SO_SNDTIMEO: ::c_int = 0x1005; -pub const SO_ACCEPTCONN: ::c_int = 0x001e; -pub const SO_BROADCAST: ::c_int = 0x0020; -pub const SO_USELOOPBACK: ::c_int = 0x0040; -pub const SO_LINGER: ::c_int = 0x0080; -pub const SO_REUSEPORT: ::c_int = 0x0200; - -pub const SO_VLAN: ::c_int = 0x8000; - -pub const SO_SNDBUF: ::c_int = 0x1001; -pub const SO_RCVBUF: ::c_int = 0x1002; -pub const SO_RCVTIMEO: ::c_int = 0x1006; -pub const SO_ERROR: ::c_int = 0x1007; -pub const SO_TYPE: ::c_int = 0x1008; -pub const SO_BINDTODEVICE: ::c_int = 0x1010; -pub const SO_OOBINLINE: ::c_int = 0x1011; -pub const SO_CONNTIMEO: ::c_int = 0x100a; - -pub const SOCK_STREAM: ::c_int = 1; -pub const SOCK_DGRAM: ::c_int = 2; -pub const SOCK_RAW: ::c_int = 3; -pub const SOCK_RDM: ::c_int = 4; -pub const SOCK_SEQPACKET: ::c_int = 5; -pub const SOCK_PACKET: ::c_int = 10; +pub const SOL_SOCKET: c_int = 0xffff; +pub const SOMAXCONN: c_int = 128; + +pub const SO_DEBUG: c_int = 0x0001; +pub const SO_REUSEADDR: c_int = 0x0004; +pub const SO_KEEPALIVE: c_int = 0x0008; +pub const SO_DONTROUTE: c_int = 0x0010; +pub const SO_RCVLOWAT: c_int = 0x0012; +pub const SO_SNDLOWAT: c_int = 0x0013; +pub const SO_SNDTIMEO: c_int = 0x1005; +pub const SO_ACCEPTCONN: c_int = 0x001e; +pub const SO_BROADCAST: c_int = 0x0020; +pub const SO_USELOOPBACK: c_int = 0x0040; +pub const SO_LINGER: c_int = 0x0080; +pub const SO_REUSEPORT: c_int = 0x0200; + +pub const SO_VLAN: c_int = 0x8000; + +pub const SO_SNDBUF: c_int = 0x1001; +pub const SO_RCVBUF: c_int = 0x1002; +pub const SO_RCVTIMEO: c_int = 0x1006; +pub const SO_ERROR: c_int = 0x1007; +pub const SO_TYPE: c_int = 0x1008; +pub const SO_BINDTODEVICE: c_int = 0x1010; +pub const SO_OOBINLINE: c_int = 0x1011; +pub const SO_CONNTIMEO: c_int = 0x100a; + +pub const SOCK_STREAM: c_int = 1; +pub const SOCK_DGRAM: c_int = 2; +pub const SOCK_RAW: c_int = 3; +pub const SOCK_RDM: c_int = 4; +pub const SOCK_SEQPACKET: c_int = 5; +pub const SOCK_PACKET: c_int = 10; pub const _SS_MAXSIZE: usize = 128; pub const _SS_ALIGNSIZE: usize = size_of::(); -pub const _SS_PAD1SIZE: usize = _SS_ALIGNSIZE - size_of::<::c_uchar>() - size_of::<::sa_family_t>(); +pub const _SS_PAD1SIZE: usize = + _SS_ALIGNSIZE - size_of::() - size_of::(); pub const _SS_PAD2SIZE: usize = _SS_MAXSIZE - - size_of::<::c_uchar>() - - size_of::<::sa_family_t>() + - size_of::() + - size_of::() - _SS_PAD1SIZE - _SS_ALIGNSIZE; -pub const MSG_OOB: ::c_int = 0x0001; -pub const MSG_PEEK: ::c_int = 0x0002; -pub const MSG_DONTROUTE: ::c_int = 0x0004; -pub const MSG_EOR: ::c_int = 0x0008; -pub const MSG_TRUNC: ::c_int = 0x0010; -pub const MSG_CTRUNC: ::c_int = 0x0020; -pub const MSG_WAITALL: ::c_int = 0x0040; -pub const MSG_DONTWAIT: ::c_int = 0x0080; -pub const MSG_EOF: ::c_int = 0x0100; -pub const MSG_EXP: ::c_int = 0x0200; -pub const MSG_MBUF: ::c_int = 0x0400; -pub const MSG_NOTIFICATION: ::c_int = 0x0800; -pub const MSG_COMPAT: ::c_int = 0x8000; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_LOCAL: ::c_int = 1; -pub const AF_UNIX: ::c_int = AF_LOCAL; -pub const AF_INET: ::c_int = 2; -pub const AF_NETLINK: ::c_int = 16; -pub const AF_ROUTE: ::c_int = 17; -pub const AF_LINK: ::c_int = 18; -pub const AF_PACKET: ::c_int = 19; -pub const pseudo_AF_KEY: ::c_int = 27; -pub const AF_KEY: ::c_int = pseudo_AF_KEY; -pub const AF_INET6: ::c_int = 28; -pub const AF_SOCKDEV: ::c_int = 31; -pub const AF_TIPC: ::c_int = 33; -pub const AF_MIPC: ::c_int = 34; -pub const AF_MIPC_SAFE: ::c_int = 35; -pub const AF_MAX: ::c_int = 37; - -pub const SHUT_RD: ::c_int = 0; -pub const SHUT_WR: ::c_int = 1; -pub const SHUT_RDWR: ::c_int = 2; - -pub const IPPROTO_TCP: ::c_int = 6; -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_MAXSEG: ::c_int = 2; -pub const TCP_NOPUSH: ::c_int = 3; -pub const TCP_KEEPIDLE: ::c_int = 4; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; +pub const MSG_OOB: c_int = 0x0001; +pub const MSG_PEEK: c_int = 0x0002; +pub const MSG_DONTROUTE: c_int = 0x0004; +pub const MSG_EOR: c_int = 0x0008; +pub const MSG_TRUNC: c_int = 0x0010; +pub const MSG_CTRUNC: c_int = 0x0020; +pub const MSG_WAITALL: c_int = 0x0040; +pub const MSG_DONTWAIT: c_int = 0x0080; +pub const MSG_EOF: c_int = 0x0100; +pub const MSG_EXP: c_int = 0x0200; +pub const MSG_MBUF: c_int = 0x0400; +pub const MSG_NOTIFICATION: c_int = 0x0800; +pub const MSG_COMPAT: c_int = 0x8000; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_LOCAL: c_int = 1; +pub const AF_UNIX: c_int = AF_LOCAL; +pub const AF_INET: c_int = 2; +pub const AF_NETLINK: c_int = 16; +pub const AF_ROUTE: c_int = 17; +pub const AF_LINK: c_int = 18; +pub const AF_PACKET: c_int = 19; +pub const pseudo_AF_KEY: c_int = 27; +pub const AF_KEY: c_int = pseudo_AF_KEY; +pub const AF_INET6: c_int = 28; +pub const AF_SOCKDEV: c_int = 31; +pub const AF_TIPC: c_int = 33; +pub const AF_MIPC: c_int = 34; +pub const AF_MIPC_SAFE: c_int = 35; +pub const AF_MAX: c_int = 37; + +pub const SHUT_RD: c_int = 0; +pub const SHUT_WR: c_int = 1; +pub const SHUT_RDWR: c_int = 2; + +pub const IPPROTO_TCP: c_int = 6; +pub const TCP_NODELAY: c_int = 1; +pub const TCP_MAXSEG: c_int = 2; +pub const TCP_NOPUSH: c_int = 3; +pub const TCP_KEEPIDLE: c_int = 4; +pub const TCP_KEEPINTVL: c_int = 5; +pub const TCP_KEEPCNT: c_int = 6; // ioLib.h -pub const FIONREAD: ::c_int = 0x40040001; -pub const FIOFLUSH: ::c_int = 2; -pub const FIOOPTIONS: ::c_int = 3; -pub const FIOBAUDRATE: ::c_int = 4; -pub const FIODISKFORMAT: ::c_int = 5; -pub const FIODISKINIT: ::c_int = 6; -pub const FIOSEEK: ::c_int = 7; -pub const FIOWHERE: ::c_int = 8; -pub const FIODIRENTRY: ::c_int = 9; -pub const FIORENAME: ::c_int = 10; -pub const FIOREADYCHANGE: ::c_int = 11; -pub const FIODISKCHANGE: ::c_int = 13; -pub const FIOCANCEL: ::c_int = 14; -pub const FIOSQUEEZE: ::c_int = 15; -pub const FIOGETNAME: ::c_int = 18; -pub const FIONBIO: ::c_int = 0x90040010; +pub const FIONREAD: c_int = 0x40040001; +pub const FIOFLUSH: c_int = 2; +pub const FIOOPTIONS: c_int = 3; +pub const FIOBAUDRATE: c_int = 4; +pub const FIODISKFORMAT: c_int = 5; +pub const FIODISKINIT: c_int = 6; +pub const FIOSEEK: c_int = 7; +pub const FIOWHERE: c_int = 8; +pub const FIODIRENTRY: c_int = 9; +pub const FIORENAME: c_int = 10; +pub const FIOREADYCHANGE: c_int = 11; +pub const FIODISKCHANGE: c_int = 13; +pub const FIOCANCEL: c_int = 14; +pub const FIOSQUEEZE: c_int = 15; +pub const FIOGETNAME: c_int = 18; +pub const FIONBIO: c_int = 0x90040010; // limits.h -pub const PATH_MAX: ::c_int = _PARM_PATH_MAX; -pub const _POSIX_PATH_MAX: ::c_int = 256; +pub const PATH_MAX: c_int = _PARM_PATH_MAX; +pub const _POSIX_PATH_MAX: c_int = 256; // Some poll stuff -pub const POLLIN: ::c_short = 0x0001; -pub const POLLPRI: ::c_short = 0x0002; -pub const POLLOUT: ::c_short = 0x0004; -pub const POLLRDNORM: ::c_short = 0x0040; -pub const POLLWRNORM: ::c_short = POLLOUT; -pub const POLLRDBAND: ::c_short = 0x0080; -pub const POLLWRBAND: ::c_short = 0x0100; -pub const POLLERR: ::c_short = 0x0008; -pub const POLLHUP: ::c_short = 0x0010; -pub const POLLNVAL: ::c_short = 0x0020; +pub const POLLIN: c_short = 0x0001; +pub const POLLPRI: c_short = 0x0002; +pub const POLLOUT: c_short = 0x0004; +pub const POLLRDNORM: c_short = 0x0040; +pub const POLLWRNORM: c_short = POLLOUT; +pub const POLLRDBAND: c_short = 0x0080; +pub const POLLWRBAND: c_short = 0x0100; +pub const POLLERR: c_short = 0x0008; +pub const POLLHUP: c_short = 0x0010; +pub const POLLNVAL: c_short = 0x0020; // fnctlcom.h -pub const FD_CLOEXEC: ::c_int = 1; -pub const F_DUPFD: ::c_int = 0; -pub const F_GETFD: ::c_int = 1; -pub const F_SETFD: ::c_int = 2; -pub const F_GETFL: ::c_int = 3; -pub const F_SETFL: ::c_int = 4; -pub const F_GETOWN: ::c_int = 5; -pub const F_SETOWN: ::c_int = 6; -pub const F_GETLK: ::c_int = 7; -pub const F_SETLK: ::c_int = 8; -pub const F_SETLKW: ::c_int = 9; -pub const F_DUPFD_CLOEXEC: ::c_int = 14; -pub const F_RDLCK: ::c_int = 1; -pub const F_WRLCK: ::c_int = 2; -pub const F_UNLCK: ::c_int = 3; +pub const FD_CLOEXEC: c_int = 1; +pub const F_DUPFD: c_int = 0; +pub const F_GETFD: c_int = 1; +pub const F_SETFD: c_int = 2; +pub const F_GETFL: c_int = 3; +pub const F_SETFL: c_int = 4; +pub const F_GETOWN: c_int = 5; +pub const F_SETOWN: c_int = 6; +pub const F_GETLK: c_int = 7; +pub const F_SETLK: c_int = 8; +pub const F_SETLKW: c_int = 9; +pub const F_DUPFD_CLOEXEC: c_int = 14; +pub const F_RDLCK: c_int = 1; +pub const F_WRLCK: c_int = 2; +pub const F_UNLCK: c_int = 3; // signal.h pub const SIG_DFL: sighandler_t = 0 as sighandler_t; pub const SIG_IGN: sighandler_t = 1 as sighandler_t; pub const SIG_ERR: sighandler_t = -1 as isize as sighandler_t; -pub const SIGHUP: ::c_int = 1; -pub const SIGINT: ::c_int = 2; -pub const SIGQUIT: ::c_int = 3; -pub const SIGILL: ::c_int = 4; -pub const SIGTRAP: ::c_int = 5; -pub const SIGABRT: ::c_int = 6; -pub const SIGEMT: ::c_int = 7; -pub const SIGFPE: ::c_int = 8; -pub const SIGKILL: ::c_int = 9; -pub const SIGBUS: ::c_int = 10; -pub const SIGSEGV: ::c_int = 11; -pub const SIGFMT: ::c_int = 12; -pub const SIGPIPE: ::c_int = 13; -pub const SIGALRM: ::c_int = 14; -pub const SIGTERM: ::c_int = 15; -pub const SIGCNCL: ::c_int = 16; -pub const SIGSTOP: ::c_int = 17; -pub const SIGTSTP: ::c_int = 18; -pub const SIGCONT: ::c_int = 19; -pub const SIGCHLD: ::c_int = 20; -pub const SIGTTIN: ::c_int = 21; -pub const SIGTTOU: ::c_int = 22; - -pub const SIG_BLOCK: ::c_int = 1; -pub const SIG_UNBLOCK: ::c_int = 2; -pub const SIG_SETMASK: ::c_int = 3; - -pub const SI_SYNC: ::c_int = 0; -pub const SI_USER: ::c_int = -1; -pub const SI_QUEUE: ::c_int = -2; -pub const SI_TIMER: ::c_int = -3; -pub const SI_ASYNCIO: ::c_int = -4; -pub const SI_MESGQ: ::c_int = -5; -pub const SI_CHILD: ::c_int = -6; -pub const SI_KILL: ::c_int = SI_USER; +pub const SIGHUP: c_int = 1; +pub const SIGINT: c_int = 2; +pub const SIGQUIT: c_int = 3; +pub const SIGILL: c_int = 4; +pub const SIGTRAP: c_int = 5; +pub const SIGABRT: c_int = 6; +pub const SIGEMT: c_int = 7; +pub const SIGFPE: c_int = 8; +pub const SIGKILL: c_int = 9; +pub const SIGBUS: c_int = 10; +pub const SIGSEGV: c_int = 11; +pub const SIGFMT: c_int = 12; +pub const SIGPIPE: c_int = 13; +pub const SIGALRM: c_int = 14; +pub const SIGTERM: c_int = 15; +pub const SIGCNCL: c_int = 16; +pub const SIGSTOP: c_int = 17; +pub const SIGTSTP: c_int = 18; +pub const SIGCONT: c_int = 19; +pub const SIGCHLD: c_int = 20; +pub const SIGTTIN: c_int = 21; +pub const SIGTTOU: c_int = 22; + +pub const SIG_BLOCK: c_int = 1; +pub const SIG_UNBLOCK: c_int = 2; +pub const SIG_SETMASK: c_int = 3; + +pub const SI_SYNC: c_int = 0; +pub const SI_USER: c_int = -1; +pub const SI_QUEUE: c_int = -2; +pub const SI_TIMER: c_int = -3; +pub const SI_ASYNCIO: c_int = -4; +pub const SI_MESGQ: c_int = -5; +pub const SI_CHILD: c_int = -6; +pub const SI_KILL: c_int = SI_USER; // vxParams.h definitions -pub const _PARM_NAME_MAX: ::c_int = 255; -pub const _PARM_PATH_MAX: ::c_int = 1024; +pub const _PARM_NAME_MAX: c_int = 255; +pub const _PARM_PATH_MAX: c_int = 1024; // WAIT STUFF -pub const WNOHANG: ::c_int = 0x01; -pub const WUNTRACED: ::c_int = 0x02; +pub const WNOHANG: c_int = 0x01; +pub const WUNTRACED: c_int = 0x02; const PTHREAD_MUTEXATTR_INITIALIZER: pthread_mutexattr_t = pthread_mutexattr_t { mutexAttrStatus: PTHREAD_INITIALIZED_OBJ, @@ -1049,55 +1050,55 @@ pub const PTHREAD_RWLOCK_INITIALIZER: pthread_rwlock_t = pthread_rwlock_t { rwlockSemName: [0; _PTHREAD_SHARED_SEM_NAME_MAX], }; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; // rtpLibCommon.h -pub const VX_RTP_NAME_LENGTH: ::c_int = 255; -pub const RTP_ID_ERROR: ::RTP_ID = -1; +pub const VX_RTP_NAME_LENGTH: c_int = 255; +pub const RTP_ID_ERROR: crate::RTP_ID = -1; // h/public/unistd.h -pub const _SC_GETPW_R_SIZE_MAX: ::c_int = 21; // Via unistd.h -pub const _SC_PAGESIZE: ::c_int = 39; -pub const O_ACCMODE: ::c_int = 3; -pub const O_CLOEXEC: ::c_int = 0x100000; // fcntlcom -pub const O_EXCL: ::c_int = 0x0800; -pub const O_CREAT: ::c_int = 0x0200; -pub const O_TRUNC: ::c_int = 0x0400; -pub const O_APPEND: ::c_int = 0x0008; -pub const O_RDWR: ::c_int = 0x0002; -pub const O_WRONLY: ::c_int = 0x0001; -pub const O_RDONLY: ::c_int = 0; -pub const O_NONBLOCK: ::c_int = 0x4000; +pub const _SC_GETPW_R_SIZE_MAX: c_int = 21; // Via unistd.h +pub const _SC_PAGESIZE: c_int = 39; +pub const O_ACCMODE: c_int = 3; +pub const O_CLOEXEC: c_int = 0x100000; // fcntlcom +pub const O_EXCL: c_int = 0x0800; +pub const O_CREAT: c_int = 0x0200; +pub const O_TRUNC: c_int = 0x0400; +pub const O_APPEND: c_int = 0x0008; +pub const O_RDWR: c_int = 0x0002; +pub const O_WRONLY: c_int = 0x0001; +pub const O_RDONLY: c_int = 0; +pub const O_NONBLOCK: c_int = 0x4000; // mman.h -pub const PROT_NONE: ::c_int = 0x0000; -pub const PROT_READ: ::c_int = 0x0001; -pub const PROT_WRITE: ::c_int = 0x0002; -pub const PROT_EXEC: ::c_int = 0x0004; +pub const PROT_NONE: c_int = 0x0000; +pub const PROT_READ: c_int = 0x0001; +pub const PROT_WRITE: c_int = 0x0002; +pub const PROT_EXEC: c_int = 0x0004; -pub const MAP_SHARED: ::c_int = 0x0001; -pub const MAP_PRIVATE: ::c_int = 0x0002; -pub const MAP_ANON: ::c_int = 0x0004; -pub const MAP_ANONYMOUS: ::c_int = MAP_ANON; -pub const MAP_FIXED: ::c_int = 0x0010; -pub const MAP_CONTIG: ::c_int = 0x0020; +pub const MAP_SHARED: c_int = 0x0001; +pub const MAP_PRIVATE: c_int = 0x0002; +pub const MAP_ANON: c_int = 0x0004; +pub const MAP_ANONYMOUS: c_int = MAP_ANON; +pub const MAP_FIXED: c_int = 0x0010; +pub const MAP_CONTIG: c_int = 0x0020; -pub const MAP_FAILED: *mut ::c_void = !0 as *mut ::c_void; +pub const MAP_FAILED: *mut c_void = !0 as *mut c_void; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} -impl ::Copy for FILE {} -impl ::Clone for FILE { +impl Copy for FILE {} +impl Clone for FILE { fn clone(&self) -> FILE { *self } } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos_t {} // FIXME: fill this out with a struct -impl ::Copy for fpos_t {} -impl ::Clone for fpos_t { +impl Copy for fpos_t {} +impl Clone for fpos_t { fn clone(&self) -> fpos_t { *self } @@ -1105,18 +1106,18 @@ impl ::Clone for fpos_t { f! { pub {const} fn CMSG_ALIGN(len: usize) -> usize { - len + ::mem::size_of::() - 1 & !(::mem::size_of::() - 1) + len + crate::mem::size_of::() - 1 & !(crate::mem::size_of::() - 1) } pub fn CMSG_NXTHDR(mhdr: *const msghdr, cmsg: *const cmsghdr) -> *mut cmsghdr { let next = cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize) - + CMSG_ALIGN(::mem::size_of::<::cmsghdr>()); + + CMSG_ALIGN(crate::mem::size_of::()); let max = (*mhdr).msg_control as usize + (*mhdr).msg_controllen as usize; if next <= max { - (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut ::cmsghdr + (cmsg as usize + CMSG_ALIGN((*cmsg).cmsg_len as usize)) as *mut cmsghdr } else { - 0 as *mut ::cmsghdr + 0 as *mut cmsghdr } } @@ -1128,16 +1129,16 @@ f! { } } - pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut ::c_uchar { - (cmsg as *mut ::c_uchar).offset(CMSG_ALIGN(::mem::size_of::<::cmsghdr>()) as isize) + pub fn CMSG_DATA(cmsg: *const cmsghdr) -> *mut c_uchar { + (cmsg as *mut c_uchar).offset(CMSG_ALIGN(crate::mem::size_of::()) as isize) } - pub {const} fn CMSG_SPACE(length: ::c_uint) -> ::c_uint { - (CMSG_ALIGN(length as usize) + CMSG_ALIGN(::mem::size_of::())) as ::c_uint + pub {const} fn CMSG_SPACE(length: c_uint) -> c_uint { + (CMSG_ALIGN(length as usize) + CMSG_ALIGN(crate::mem::size_of::())) as c_uint } - pub {const} fn CMSG_LEN(length: ::c_uint) -> ::c_uint { - CMSG_ALIGN(::mem::size_of::()) as ::c_uint + length + pub {const} fn CMSG_LEN(length: c_uint) -> c_uint { + CMSG_ALIGN(crate::mem::size_of::()) as c_uint + length } } @@ -1224,7 +1225,7 @@ extern "C" { pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; pub fn wcslen(buf: *const wchar_t) -> size_t; - pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t; + pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> size_t; pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn wmemchr(cx: *const wchar_t, c: wchar_t, n: size_t) -> *mut wchar_t; @@ -1235,82 +1236,82 @@ extern "C" { } extern "C" { - pub fn fprintf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn printf(format: *const ::c_char, ...) -> ::c_int; - pub fn snprintf(s: *mut ::c_char, n: ::size_t, format: *const ::c_char, ...) -> ::c_int; - pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn scanf(format: *const ::c_char, ...) -> ::c_int; - pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn getchar_unlocked() -> ::c_int; - pub fn putchar_unlocked(c: ::c_int) -> ::c_int; - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; - pub fn fileno(stream: *mut ::FILE) -> ::c_int; - pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn rewinddir(dirp: *mut ::DIR); - pub fn fchown(fd: ::c_int, owner: ::uid_t, group: ::gid_t) -> ::c_int; - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; - pub fn alarm(seconds: ::c_uint) -> ::c_uint; - pub fn fchdir(dirfd: ::c_int) -> ::c_int; - pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> ::c_int; - pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; + pub fn fprintf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn printf(format: *const c_char, ...) -> c_int; + pub fn snprintf(s: *mut c_char, n: size_t, format: *const c_char, ...) -> c_int; + pub fn sprintf(s: *mut c_char, format: *const c_char, ...) -> c_int; + pub fn fscanf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn scanf(format: *const c_char, ...) -> c_int; + pub fn sscanf(s: *const c_char, format: *const c_char, ...) -> c_int; + pub fn getchar_unlocked() -> c_int; + pub fn putchar_unlocked(c: c_int) -> c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> c_int; + pub fn fdopen(fd: c_int, mode: *const c_char) -> *mut crate::FILE; + pub fn fileno(stream: *mut crate::FILE) -> c_int; + pub fn creat(path: *const c_char, mode: mode_t) -> c_int; + pub fn rewinddir(dirp: *mut crate::DIR); + pub fn fchown(fd: c_int, owner: crate::uid_t, group: crate::gid_t) -> c_int; + pub fn access(path: *const c_char, amode: c_int) -> c_int; + pub fn alarm(seconds: c_uint) -> c_uint; + pub fn fchdir(dirfd: c_int) -> c_int; + pub fn chown(path: *const c_char, uid: uid_t, gid: gid_t) -> c_int; + pub fn fpathconf(filedes: c_int, name: c_int) -> c_long; pub fn getegid() -> gid_t; pub fn geteuid() -> uid_t; - pub fn getgroups(ngroups_max: ::c_int, groups: *mut gid_t) -> ::c_int; + pub fn getgroups(ngroups_max: c_int, groups: *mut gid_t) -> c_int; pub fn getlogin() -> *mut c_char; - pub fn getopt(argc: ::c_int, argv: *const *mut c_char, optstr: *const c_char) -> ::c_int; - pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; - pub fn pause() -> ::c_int; - pub fn seteuid(uid: uid_t) -> ::c_int; - pub fn setegid(gid: gid_t) -> ::c_int; - pub fn sleep(secs: ::c_uint) -> ::c_uint; - pub fn ttyname(fd: ::c_int) -> *mut c_char; - pub fn wait(status: *mut ::c_int) -> pid_t; + pub fn getopt(argc: c_int, argv: *const *mut c_char, optstr: *const c_char) -> c_int; + pub fn pathconf(path: *const c_char, name: c_int) -> c_long; + pub fn pause() -> c_int; + pub fn seteuid(uid: uid_t) -> c_int; + pub fn setegid(gid: gid_t) -> c_int; + pub fn sleep(secs: c_uint) -> c_uint; + pub fn ttyname(fd: c_int) -> *mut c_char; + pub fn wait(status: *mut c_int) -> pid_t; pub fn umask(mask: mode_t) -> mode_t; - pub fn mlock(addr: *const ::c_void, len: ::size_t) -> ::c_int; - pub fn mlockall(flags: ::c_int) -> ::c_int; - pub fn munlockall() -> ::c_int; + pub fn mlock(addr: *const c_void, len: size_t) -> c_int; + pub fn mlockall(flags: c_int) -> c_int; + pub fn munlockall() -> c_int; pub fn mmap( - addr: *mut ::c_void, - len: ::size_t, - prot: ::c_int, - flags: ::c_int, - fd: ::c_int, + addr: *mut c_void, + len: size_t, + prot: c_int, + flags: c_int, + fd: c_int, offset: off_t, - ) -> *mut ::c_void; - pub fn munmap(addr: *mut ::c_void, len: ::size_t) -> ::c_int; - pub fn truncate(path: *const c_char, length: off_t) -> ::c_int; - pub fn shm_open(name: *const ::c_char, oflag: ::c_int, mode: ::mode_t) -> ::c_int; - pub fn shm_unlink(name: *const ::c_char) -> ::c_int; + ) -> *mut c_void; + pub fn munmap(addr: *mut c_void, len: size_t) -> c_int; + pub fn truncate(path: *const c_char, length: off_t) -> c_int; + pub fn shm_open(name: *const c_char, oflag: c_int, mode: crate::mode_t) -> c_int; + pub fn shm_unlink(name: *const c_char) -> c_int; - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn pthread_exit(value: *mut ::c_void) -> !; - pub fn pthread_attr_setdetachstate(attr: *mut ::pthread_attr_t, state: ::c_int) -> ::c_int; + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn pthread_exit(value: *mut c_void) -> !; + pub fn pthread_attr_setdetachstate(attr: *mut crate::pthread_attr_t, state: c_int) -> c_int; - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; - pub fn sigaddset(set: *mut sigset_t, signum: ::c_int) -> ::c_int; + pub fn sigaddset(set: *mut sigset_t, signum: c_int) -> c_int; - pub fn sigaction(signum: ::c_int, act: *const sigaction, oldact: *mut sigaction) -> ::c_int; + pub fn sigaction(signum: c_int, act: *const sigaction, oldact: *mut sigaction) -> c_int; - pub fn utimes(filename: *const ::c_char, times: *const ::timeval) -> ::c_int; + pub fn utimes(filename: *const c_char, times: *const crate::timeval) -> c_int; #[link_name = "_rtld_dlopen"] - pub fn dlopen(filename: *const ::c_char, flag: ::c_int) -> *mut ::c_void; + pub fn dlopen(filename: *const c_char, flag: c_int) -> *mut c_void; #[link_name = "_rtld_dlerror"] - pub fn dlerror() -> *mut ::c_char; + pub fn dlerror() -> *mut c_char; #[link_name = "_rtld_dlsym"] - pub fn dlsym(handle: *mut ::c_void, symbol: *const ::c_char) -> *mut ::c_void; + pub fn dlsym(handle: *mut c_void, symbol: *const c_char) -> *mut c_void; #[link_name = "_rtld_dlclose"] - pub fn dlclose(handle: *mut ::c_void) -> ::c_int; + pub fn dlclose(handle: *mut c_void) -> c_int; #[link_name = "_rtld_dladdr"] - pub fn dladdr(addr: *mut ::c_void, info: *mut Dl_info) -> ::c_int; + pub fn dladdr(addr: *mut c_void, info: *mut Dl_info) -> c_int; // time.h pub fn gmtime_r(time_p: *const time_t, result: *mut tm) -> *mut tm; @@ -1320,422 +1321,431 @@ extern "C" { pub fn gmtime(time_p: *const time_t) -> *mut tm; pub fn localtime(time_p: *const time_t) -> *mut tm; pub fn timegm(tm: *mut tm) -> time_t; - pub fn difftime(time1: time_t, time0: time_t) -> ::c_double; - pub fn gethostname(name: *mut ::c_char, len: ::size_t) -> ::c_int; - pub fn usleep(secs: ::useconds_t) -> ::c_int; - pub fn putenv(string: *mut c_char) -> ::c_int; - pub fn setlocale(category: ::c_int, locale: *const ::c_char) -> *mut ::c_char; + pub fn difftime(time1: time_t, time0: time_t) -> c_double; + pub fn gethostname(name: *mut c_char, len: size_t) -> c_int; + pub fn usleep(secs: crate::useconds_t) -> c_int; + pub fn putenv(string: *mut c_char) -> c_int; + pub fn setlocale(category: c_int, locale: *const c_char) -> *mut c_char; - pub fn sigprocmask(how: ::c_int, set: *const sigset_t, oldset: *mut sigset_t) -> ::c_int; - pub fn sigpending(set: *mut sigset_t) -> ::c_int; + pub fn sigprocmask(how: c_int, set: *const sigset_t, oldset: *mut sigset_t) -> c_int; + pub fn sigpending(set: *mut sigset_t) -> c_int; - pub fn mkfifo(path: *const c_char, mode: mode_t) -> ::c_int; + pub fn mkfifo(path: *const c_char, mode: mode_t) -> c_int; - pub fn fseeko(stream: *mut ::FILE, offset: ::off_t, whence: ::c_int) -> ::c_int; - pub fn ftello(stream: *mut ::FILE) -> ::off_t; - pub fn mkstemp(template: *mut ::c_char) -> ::c_int; + pub fn fseeko(stream: *mut crate::FILE, offset: off_t, whence: c_int) -> c_int; + pub fn ftello(stream: *mut crate::FILE) -> off_t; + pub fn mkstemp(template: *mut c_char) -> c_int; - pub fn tmpnam(ptr: *mut ::c_char) -> *mut ::c_char; + pub fn tmpnam(ptr: *mut c_char) -> *mut c_char; - pub fn openlog(ident: *const ::c_char, logopt: ::c_int, facility: ::c_int); + pub fn openlog(ident: *const c_char, logopt: c_int, facility: c_int); pub fn closelog(); - pub fn setlogmask(maskpri: ::c_int) -> ::c_int; - pub fn syslog(priority: ::c_int, message: *const ::c_char, ...); + pub fn setlogmask(maskpri: c_int) -> c_int; + pub fn syslog(priority: c_int, message: *const c_char, ...); pub fn getline(lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t; } extern "C" { // stdlib.h - pub fn memalign(block_size: ::size_t, size_arg: ::size_t) -> *mut ::c_void; + pub fn memalign(block_size: size_t, size_arg: size_t) -> *mut c_void; // ioLib.h - pub fn getcwd(buf: *mut ::c_char, size: ::size_t) -> *mut ::c_char; + pub fn getcwd(buf: *mut c_char, size: size_t) -> *mut c_char; // ioLib.h - pub fn chdir(attr: *const ::c_char) -> ::c_int; + pub fn chdir(attr: *const c_char) -> c_int; // pthread.h - pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> ::c_int; + pub fn pthread_mutexattr_init(attr: *mut pthread_mutexattr_t) -> c_int; // pthread.h - pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> ::c_int; + pub fn pthread_mutexattr_destroy(attr: *mut pthread_mutexattr_t) -> c_int; // pthread.h - pub fn pthread_mutexattr_settype(pAttr: *mut ::pthread_mutexattr_t, pType: ::c_int) -> ::c_int; + pub fn pthread_mutexattr_settype(pAttr: *mut crate::pthread_mutexattr_t, pType: c_int) + -> c_int; // pthread.h pub fn pthread_mutex_init( mutex: *mut pthread_mutex_t, attr: *const pthread_mutexattr_t, - ) -> ::c_int; + ) -> c_int; // pthread.h - pub fn pthread_mutex_destroy(mutex: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_destroy(mutex: *mut pthread_mutex_t) -> c_int; // pthread.h - pub fn pthread_mutex_lock(mutex: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_lock(mutex: *mut pthread_mutex_t) -> c_int; // pthread.h - pub fn pthread_mutex_trylock(mutex: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_trylock(mutex: *mut pthread_mutex_t) -> c_int; // pthread.h - pub fn pthread_mutex_timedlock(attr: *mut pthread_mutex_t, spec: *const timespec) -> ::c_int; + pub fn pthread_mutex_timedlock(attr: *mut pthread_mutex_t, spec: *const timespec) -> c_int; // pthread.h - pub fn pthread_mutex_unlock(mutex: *mut pthread_mutex_t) -> ::c_int; + pub fn pthread_mutex_unlock(mutex: *mut pthread_mutex_t) -> c_int; // pthread.h - pub fn pthread_attr_setname(pAttr: *mut ::pthread_attr_t, name: *mut ::c_char) -> ::c_int; + pub fn pthread_attr_setname(pAttr: *mut crate::pthread_attr_t, name: *mut c_char) -> c_int; // pthread.h - pub fn pthread_attr_setstacksize(attr: *mut ::pthread_attr_t, stacksize: ::size_t) -> ::c_int; + pub fn pthread_attr_setstacksize(attr: *mut crate::pthread_attr_t, stacksize: size_t) -> c_int; // pthread.h - pub fn pthread_attr_getstacksize(attr: *const ::pthread_attr_t, size: *mut ::size_t) - -> ::c_int; + pub fn pthread_attr_getstacksize( + attr: *const crate::pthread_attr_t, + size: *mut size_t, + ) -> c_int; // pthread.h - pub fn pthread_attr_init(attr: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_init(attr: *mut crate::pthread_attr_t) -> c_int; // pthread.h pub fn pthread_create( - pThread: *mut ::pthread_t, - pAttr: *const ::pthread_attr_t, - start_routine: extern "C" fn(*mut ::c_void) -> *mut ::c_void, - value: *mut ::c_void, - ) -> ::c_int; + pThread: *mut crate::pthread_t, + pAttr: *const crate::pthread_attr_t, + start_routine: extern "C" fn(*mut c_void) -> *mut c_void, + value: *mut c_void, + ) -> c_int; //pthread.h pub fn pthread_setschedparam( - native: ::pthread_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; //pthread.h pub fn pthread_getschedparam( - native: ::pthread_t, - policy: *mut ::c_int, - param: *mut ::sched_param, - ) -> ::c_int; + native: crate::pthread_t, + policy: *mut c_int, + param: *mut crate::sched_param, + ) -> c_int; //pthread.h pub fn pthread_attr_setinheritsched( - attr: *mut ::pthread_attr_t, - inheritsched: ::c_int, - ) -> ::c_int; + attr: *mut crate::pthread_attr_t, + inheritsched: c_int, + ) -> c_int; //pthread.h - pub fn pthread_attr_setschedpolicy(attr: *mut ::pthread_attr_t, policy: ::c_int) -> ::c_int; + pub fn pthread_attr_setschedpolicy(attr: *mut crate::pthread_attr_t, policy: c_int) -> c_int; // pthread.h - pub fn pthread_attr_destroy(thread: *mut ::pthread_attr_t) -> ::c_int; + pub fn pthread_attr_destroy(thread: *mut crate::pthread_attr_t) -> c_int; // pthread.h - pub fn pthread_detach(thread: ::pthread_t) -> ::c_int; + pub fn pthread_detach(thread: crate::pthread_t) -> c_int; // int pthread_atfork (void (*)(void), void (*)(void), void (*)(void)); pub fn pthread_atfork( - prepare: ::Option, - parent: ::Option, - child: ::Option, - ) -> ::c_int; + prepare: Option, + parent: Option, + child: Option, + ) -> c_int; // stat.h - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int; // stat.h - pub fn lstat(path: *const ::c_char, buf: *mut stat) -> ::c_int; + pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int; // unistd.h - pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; + pub fn ftruncate(fd: c_int, length: off_t) -> c_int; // dirent.h - pub fn readdir_r(pDir: *mut ::DIR, entry: *mut ::dirent, result: *mut *mut ::dirent) - -> ::c_int; + pub fn readdir_r( + pDir: *mut crate::DIR, + entry: *mut crate::dirent, + result: *mut *mut crate::dirent, + ) -> c_int; // dirent.h - pub fn readdir(pDir: *mut ::DIR) -> *mut ::dirent; + pub fn readdir(pDir: *mut crate::DIR) -> *mut crate::dirent; // fcntl.h or // ioLib.h - pub fn open(path: *const ::c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int; // poll.h - pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: c_int) -> c_int; // pthread.h - pub fn pthread_condattr_init(attr: *mut ::pthread_condattr_t) -> ::c_int; + pub fn pthread_condattr_init(attr: *mut crate::pthread_condattr_t) -> c_int; // pthread.h - pub fn pthread_condattr_destroy(attr: *mut ::pthread_condattr_t) -> ::c_int; + pub fn pthread_condattr_destroy(attr: *mut crate::pthread_condattr_t) -> c_int; // pthread.h pub fn pthread_condattr_getclock( - pAttr: *const ::pthread_condattr_t, - pClockId: *mut ::clockid_t, - ) -> ::c_int; + pAttr: *const crate::pthread_condattr_t, + pClockId: *mut crate::clockid_t, + ) -> c_int; // pthread.h pub fn pthread_condattr_setclock( - pAttr: *mut ::pthread_condattr_t, - clockId: ::clockid_t, - ) -> ::c_int; + pAttr: *mut crate::pthread_condattr_t, + clockId: crate::clockid_t, + ) -> c_int; // pthread.h pub fn pthread_cond_init( - cond: *mut ::pthread_cond_t, - attr: *const ::pthread_condattr_t, - ) -> ::c_int; + cond: *mut crate::pthread_cond_t, + attr: *const crate::pthread_condattr_t, + ) -> c_int; // pthread.h - pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> ::c_int; + pub fn pthread_cond_destroy(cond: *mut pthread_cond_t) -> c_int; // pthread.h - pub fn pthread_cond_signal(cond: *mut ::pthread_cond_t) -> ::c_int; + pub fn pthread_cond_signal(cond: *mut crate::pthread_cond_t) -> c_int; // pthread.h - pub fn pthread_cond_broadcast(cond: *mut ::pthread_cond_t) -> ::c_int; + pub fn pthread_cond_broadcast(cond: *mut crate::pthread_cond_t) -> c_int; // pthread.h - pub fn pthread_cond_wait(cond: *mut ::pthread_cond_t, mutex: *mut ::pthread_mutex_t) - -> ::c_int; + pub fn pthread_cond_wait( + cond: *mut crate::pthread_cond_t, + mutex: *mut crate::pthread_mutex_t, + ) -> c_int; // pthread.h - pub fn pthread_rwlockattr_init(attr: *mut ::pthread_rwlockattr_t) -> ::c_int; + pub fn pthread_rwlockattr_init(attr: *mut crate::pthread_rwlockattr_t) -> c_int; // pthread.h - pub fn pthread_rwlockattr_destroy(attr: *mut ::pthread_rwlockattr_t) -> ::c_int; + pub fn pthread_rwlockattr_destroy(attr: *mut crate::pthread_rwlockattr_t) -> c_int; // pthread.h pub fn pthread_rwlockattr_setmaxreaders( - attr: *mut ::pthread_rwlockattr_t, - attr2: ::c_uint, - ) -> ::c_int; + attr: *mut crate::pthread_rwlockattr_t, + attr2: c_uint, + ) -> c_int; // pthread.h pub fn pthread_rwlock_init( - attr: *mut ::pthread_rwlock_t, - host: *const ::pthread_rwlockattr_t, - ) -> ::c_int; + attr: *mut crate::pthread_rwlock_t, + host: *const crate::pthread_rwlockattr_t, + ) -> c_int; // pthread.h - pub fn pthread_rwlock_destroy(attr: *mut ::pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_destroy(attr: *mut crate::pthread_rwlock_t) -> c_int; // pthread.h - pub fn pthread_rwlock_rdlock(attr: *mut ::pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_rdlock(attr: *mut crate::pthread_rwlock_t) -> c_int; // pthread.h - pub fn pthread_rwlock_tryrdlock(attr: *mut ::pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_tryrdlock(attr: *mut crate::pthread_rwlock_t) -> c_int; // pthread.h pub fn pthread_rwlock_timedrdlock( - attr: *mut ::pthread_rwlock_t, - host: *const ::timespec, - ) -> ::c_int; + attr: *mut crate::pthread_rwlock_t, + host: *const crate::timespec, + ) -> c_int; // pthread.h - pub fn pthread_rwlock_wrlock(attr: *mut ::pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_wrlock(attr: *mut crate::pthread_rwlock_t) -> c_int; // pthread.h - pub fn pthread_rwlock_trywrlock(attr: *mut ::pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_trywrlock(attr: *mut crate::pthread_rwlock_t) -> c_int; // pthread.h pub fn pthread_rwlock_timedwrlock( - attr: *mut ::pthread_rwlock_t, - host: *const ::timespec, - ) -> ::c_int; + attr: *mut crate::pthread_rwlock_t, + host: *const crate::timespec, + ) -> c_int; // pthread.h - pub fn pthread_rwlock_unlock(attr: *mut ::pthread_rwlock_t) -> ::c_int; + pub fn pthread_rwlock_unlock(attr: *mut crate::pthread_rwlock_t) -> c_int; // pthread.h pub fn pthread_key_create( - key: *mut ::pthread_key_t, - dtor: ::Option, - ) -> ::c_int; + key: *mut crate::pthread_key_t, + dtor: Option, + ) -> c_int; // pthread.h - pub fn pthread_key_delete(key: ::pthread_key_t) -> ::c_int; + pub fn pthread_key_delete(key: crate::pthread_key_t) -> c_int; // pthread.h - pub fn pthread_setspecific(key: ::pthread_key_t, value: *const ::c_void) -> ::c_int; + pub fn pthread_setspecific(key: crate::pthread_key_t, value: *const c_void) -> c_int; // pthread.h - pub fn pthread_getspecific(key: ::pthread_key_t) -> *mut ::c_void; + pub fn pthread_getspecific(key: crate::pthread_key_t) -> *mut c_void; // pthread.h pub fn pthread_cond_timedwait( - cond: *mut ::pthread_cond_t, - mutex: *mut ::pthread_mutex_t, - abstime: *const ::timespec, - ) -> ::c_int; + cond: *mut crate::pthread_cond_t, + mutex: *mut crate::pthread_mutex_t, + abstime: *const crate::timespec, + ) -> c_int; // pthread.h - pub fn pthread_attr_getname(attr: *mut ::pthread_attr_t, name: *mut *mut ::c_char) -> ::c_int; + pub fn pthread_attr_getname(attr: *mut crate::pthread_attr_t, name: *mut *mut c_char) -> c_int; // pthread.h - pub fn pthread_join(thread: ::pthread_t, status: *mut *mut ::c_void) -> ::c_int; + pub fn pthread_join(thread: crate::pthread_t, status: *mut *mut c_void) -> c_int; // pthread.h - pub fn pthread_self() -> ::pthread_t; + pub fn pthread_self() -> crate::pthread_t; // clockLib.h - pub fn clock_gettime(clock_id: ::clockid_t, tp: *mut ::timespec) -> ::c_int; + pub fn clock_gettime(clock_id: crate::clockid_t, tp: *mut crate::timespec) -> c_int; // clockLib.h - pub fn clock_settime(clock_id: ::clockid_t, tp: *const ::timespec) -> ::c_int; + pub fn clock_settime(clock_id: crate::clockid_t, tp: *const crate::timespec) -> c_int; // clockLib.h - pub fn clock_getres(clock_id: ::clockid_t, res: *mut ::timespec) -> ::c_int; + pub fn clock_getres(clock_id: crate::clockid_t, res: *mut crate::timespec) -> c_int; // clockLib.h pub fn clock_nanosleep( - clock_id: ::clockid_t, - flags: ::c_int, - rqtp: *const ::timespec, - rmtp: *mut ::timespec, - ) -> ::c_int; + clock_id: crate::clockid_t, + flags: c_int, + rqtp: *const crate::timespec, + rmtp: *mut crate::timespec, + ) -> c_int; // timerLib.h - pub fn nanosleep(rqtp: *const ::timespec, rmtp: *mut ::timespec) -> ::c_int; + pub fn nanosleep(rqtp: *const crate::timespec, rmtp: *mut crate::timespec) -> c_int; // socket.h - pub fn accept(s: ::c_int, addr: *mut ::sockaddr, addrlen: *mut ::socklen_t) -> ::c_int; + pub fn accept(s: c_int, addr: *mut crate::sockaddr, addrlen: *mut crate::socklen_t) -> c_int; // socket.h - pub fn bind(fd: ::c_int, addr: *const sockaddr, len: socklen_t) -> ::c_int; + pub fn bind(fd: c_int, addr: *const sockaddr, len: socklen_t) -> c_int; // socket.h - pub fn connect(s: ::c_int, name: *const ::sockaddr, namelen: ::socklen_t) -> ::c_int; + pub fn connect(s: c_int, name: *const crate::sockaddr, namelen: crate::socklen_t) -> c_int; // socket.h - pub fn getpeername(s: ::c_int, name: *mut ::sockaddr, namelen: *mut ::socklen_t) -> ::c_int; + pub fn getpeername( + s: c_int, + name: *mut crate::sockaddr, + namelen: *mut crate::socklen_t, + ) -> c_int; // socket.h - pub fn getsockname( - socket: ::c_int, - address: *mut sockaddr, - address_len: *mut socklen_t, - ) -> ::c_int; + pub fn getsockname(socket: c_int, address: *mut sockaddr, address_len: *mut socklen_t) + -> c_int; // socket.h pub fn getsockopt( - sockfd: ::c_int, - level: ::c_int, - optname: ::c_int, - optval: *mut ::c_void, - optlen: *mut ::socklen_t, - ) -> ::c_int; + sockfd: c_int, + level: c_int, + optname: c_int, + optval: *mut c_void, + optlen: *mut crate::socklen_t, + ) -> c_int; // socket.h - pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; + pub fn listen(socket: c_int, backlog: c_int) -> c_int; // socket.h - pub fn recv(s: ::c_int, buf: *mut ::c_void, bufLen: ::size_t, flags: ::c_int) -> ::ssize_t; + pub fn recv(s: c_int, buf: *mut c_void, bufLen: size_t, flags: c_int) -> ssize_t; // socket.h pub fn recvfrom( - s: ::c_int, - buf: *mut ::c_void, - bufLen: ::size_t, - flags: ::c_int, - from: *mut ::sockaddr, - pFromLen: *mut ::socklen_t, - ) -> ::ssize_t; + s: c_int, + buf: *mut c_void, + bufLen: size_t, + flags: c_int, + from: *mut crate::sockaddr, + pFromLen: *mut crate::socklen_t, + ) -> ssize_t; - pub fn recvmsg(socket: ::c_int, mp: *mut ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn recvmsg(socket: c_int, mp: *mut crate::msghdr, flags: c_int) -> ssize_t; // socket.h - pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; + pub fn send(socket: c_int, buf: *const c_void, len: size_t, flags: c_int) -> ssize_t; - pub fn sendmsg(socket: ::c_int, mp: *const ::msghdr, flags: ::c_int) -> ::ssize_t; + pub fn sendmsg(socket: c_int, mp: *const crate::msghdr, flags: c_int) -> ssize_t; // socket.h pub fn sendto( - socket: ::c_int, - buf: *const ::c_void, - len: ::size_t, - flags: ::c_int, + socket: c_int, + buf: *const c_void, + len: size_t, + flags: c_int, addr: *const sockaddr, addrlen: socklen_t, - ) -> ::ssize_t; + ) -> ssize_t; // socket.h pub fn setsockopt( - socket: ::c_int, - level: ::c_int, - name: ::c_int, - value: *const ::c_void, + socket: c_int, + level: c_int, + name: c_int, + value: *const c_void, option_len: socklen_t, - ) -> ::c_int; + ) -> c_int; // socket.h - pub fn shutdown(s: ::c_int, how: ::c_int) -> ::c_int; + pub fn shutdown(s: c_int, how: c_int) -> c_int; // socket.h - pub fn socket(domain: ::c_int, _type: ::c_int, protocol: ::c_int) -> ::c_int; + pub fn socket(domain: c_int, _type: c_int, protocol: c_int) -> c_int; // icotl.h - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; // fcntl.h - pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; + pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int; // ntp_rfc2553.h for kernel // netdb.h for user - pub fn gai_strerror(errcode: ::c_int) -> *mut ::c_char; + pub fn gai_strerror(errcode: c_int) -> *mut c_char; // ioLib.h or // unistd.h - pub fn close(fd: ::c_int) -> ::c_int; + pub fn close(fd: c_int) -> c_int; // ioLib.h or // unistd.h - pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::size_t) -> ::ssize_t; + pub fn read(fd: c_int, buf: *mut c_void, count: size_t) -> ssize_t; // ioLib.h or // unistd.h - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::size_t) -> ::ssize_t; + pub fn write(fd: c_int, buf: *const c_void, count: size_t) -> ssize_t; // ioLib.h or // unistd.h - pub fn isatty(fd: ::c_int) -> ::c_int; + pub fn isatty(fd: c_int) -> c_int; // ioLib.h or // unistd.h - pub fn dup(src: ::c_int) -> ::c_int; + pub fn dup(src: c_int) -> c_int; // ioLib.h or // unistd.h - pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; + pub fn dup2(src: c_int, dst: c_int) -> c_int; // ioLib.h or // unistd.h - pub fn pipe(fds: *mut ::c_int) -> ::c_int; + pub fn pipe(fds: *mut c_int) -> c_int; // ioLib.h or // unistd.h - pub fn unlink(pathname: *const ::c_char) -> ::c_int; + pub fn unlink(pathname: *const c_char) -> c_int; // unistd.h and // ioLib.h - pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; + pub fn lseek(fd: c_int, offset: off_t, whence: c_int) -> off_t; // netdb.h pub fn getaddrinfo( - node: *const ::c_char, - service: *const ::c_char, + node: *const c_char, + service: *const c_char, hints: *const addrinfo, res: *mut *mut addrinfo, - ) -> ::c_int; + ) -> c_int; // netdb.h pub fn freeaddrinfo(res: *mut addrinfo); // signal.h - pub fn signal(signum: ::c_int, handler: sighandler_t) -> sighandler_t; + pub fn signal(signum: c_int, handler: sighandler_t) -> sighandler_t; // unistd.h pub fn getpid() -> pid_t; @@ -1744,166 +1754,162 @@ extern "C" { pub fn getppid() -> pid_t; // wait.h - pub fn waitpid(pid: pid_t, status: *mut ::c_int, optons: ::c_int) -> pid_t; + pub fn waitpid(pid: pid_t, status: *mut c_int, optons: c_int) -> pid_t; // unistd.h - pub fn sysconf(attr: ::c_int) -> ::c_long; + pub fn sysconf(attr: c_int) -> c_long; // stdlib.h pub fn setenv( // setenv.c - envVarName: *const ::c_char, - envVarValue: *const ::c_char, - overwrite: ::c_int, - ) -> ::c_int; + envVarName: *const c_char, + envVarValue: *const c_char, + overwrite: c_int, + ) -> c_int; // stdlib.h pub fn unsetenv( // setenv.c - envVarName: *const ::c_char, - ) -> ::c_int; + envVarName: *const c_char, + ) -> c_int; // stdlib.h - pub fn realpath(fileName: *const ::c_char, resolvedName: *mut ::c_char) -> *mut ::c_char; + pub fn realpath(fileName: *const c_char, resolvedName: *mut c_char) -> *mut c_char; // unistd.h - pub fn link(src: *const ::c_char, dst: *const ::c_char) -> ::c_int; + pub fn link(src: *const c_char, dst: *const c_char) -> c_int; // unistd.h - pub fn readlink(path: *const ::c_char, buf: *mut ::c_char, bufsize: ::size_t) -> ::ssize_t; + pub fn readlink(path: *const c_char, buf: *mut c_char, bufsize: size_t) -> ssize_t; // unistd.h - pub fn symlink(path1: *const ::c_char, path2: *const ::c_char) -> ::c_int; + pub fn symlink(path1: *const c_char, path2: *const c_char) -> c_int; // dirent.h - pub fn opendir(name: *const ::c_char) -> *mut ::DIR; + pub fn opendir(name: *const c_char) -> *mut crate::DIR; // unistd.h - pub fn rmdir(path: *const ::c_char) -> ::c_int; + pub fn rmdir(path: *const c_char) -> c_int; // stat.h - pub fn mkdir(dirName: *const ::c_char, mode: ::mode_t) -> ::c_int; + pub fn mkdir(dirName: *const c_char, mode: crate::mode_t) -> c_int; // stat.h - pub fn chmod(path: *const ::c_char, mode: ::mode_t) -> ::c_int; + pub fn chmod(path: *const c_char, mode: crate::mode_t) -> c_int; // stat.h - pub fn fchmod(attr1: ::c_int, attr2: ::mode_t) -> ::c_int; + pub fn fchmod(attr1: c_int, attr2: crate::mode_t) -> c_int; // unistd.h - pub fn fsync(fd: ::c_int) -> ::c_int; + pub fn fsync(fd: c_int) -> c_int; // dirent.h - pub fn closedir(ptr: *mut ::DIR) -> ::c_int; + pub fn closedir(ptr: *mut crate::DIR) -> c_int; //sched.h - pub fn sched_get_priority_max(policy: ::c_int) -> ::c_int; + pub fn sched_get_priority_max(policy: c_int) -> c_int; //sched.h - pub fn sched_get_priority_min(policy: ::c_int) -> ::c_int; + pub fn sched_get_priority_min(policy: c_int) -> c_int; //sched.h - pub fn sched_setparam(pid: ::pid_t, param: *const ::sched_param) -> ::c_int; + pub fn sched_setparam(pid: crate::pid_t, param: *const crate::sched_param) -> c_int; //sched.h - pub fn sched_getparam(pid: ::pid_t, param: *mut ::sched_param) -> ::c_int; + pub fn sched_getparam(pid: crate::pid_t, param: *mut crate::sched_param) -> c_int; //sched.h pub fn sched_setscheduler( - pid: ::pid_t, - policy: ::c_int, - param: *const ::sched_param, - ) -> ::c_int; + pid: crate::pid_t, + policy: c_int, + param: *const crate::sched_param, + ) -> c_int; //sched.h - pub fn sched_getscheduler(pid: ::pid_t) -> ::c_int; + pub fn sched_getscheduler(pid: crate::pid_t) -> c_int; //sched.h - pub fn sched_rr_get_interval(pid: ::pid_t, tp: *mut ::timespec) -> ::c_int; + pub fn sched_rr_get_interval(pid: crate::pid_t, tp: *mut crate::timespec) -> c_int; // sched.h - pub fn sched_yield() -> ::c_int; + pub fn sched_yield() -> c_int; // errnoLib.h - pub fn errnoSet(err: ::c_int) -> ::c_int; + pub fn errnoSet(err: c_int) -> c_int; // errnoLib.h - pub fn errnoGet() -> ::c_int; + pub fn errnoGet() -> c_int; // unistd.h - pub fn _exit(status: ::c_int) -> !; + pub fn _exit(status: c_int) -> !; // unistd.h - pub fn setgid(gid: ::gid_t) -> ::c_int; + pub fn setgid(gid: crate::gid_t) -> c_int; // unistd.h - pub fn getgid() -> ::gid_t; + pub fn getgid() -> crate::gid_t; // unistd.h - pub fn setuid(uid: ::uid_t) -> ::c_int; + pub fn setuid(uid: crate::uid_t) -> c_int; // unistd.h - pub fn getuid() -> ::uid_t; + pub fn getuid() -> crate::uid_t; // signal.h - pub fn sigemptyset(__set: *mut sigset_t) -> ::c_int; + pub fn sigemptyset(__set: *mut sigset_t) -> c_int; // pthread.h for kernel // signal.h for user - pub fn pthread_sigmask( - __how: ::c_int, - __set: *const sigset_t, - __oset: *mut sigset_t, - ) -> ::c_int; + pub fn pthread_sigmask(__how: c_int, __set: *const sigset_t, __oset: *mut sigset_t) -> c_int; // signal.h for user - pub fn kill(__pid: pid_t, __signo: ::c_int) -> ::c_int; + pub fn kill(__pid: pid_t, __signo: c_int) -> c_int; // signal.h for user - pub fn sigqueue(__pid: pid_t, __signo: ::c_int, __value: ::sigval) -> ::c_int; + pub fn sigqueue(__pid: pid_t, __signo: c_int, __value: crate::sigval) -> c_int; // signal.h for user pub fn _sigqueue( - rtpId: ::RTP_ID, - signo: ::c_int, - pValue: *const ::sigval, - sigCode: ::c_int, - ) -> ::c_int; + rtpId: crate::RTP_ID, + signo: c_int, + pValue: *const crate::sigval, + sigCode: c_int, + ) -> c_int; // signal.h - pub fn taskKill(taskId: ::TASK_ID, signo: ::c_int) -> ::c_int; + pub fn taskKill(taskId: crate::TASK_ID, signo: c_int) -> c_int; // signal.h - pub fn raise(__signo: ::c_int) -> ::c_int; + pub fn raise(__signo: c_int) -> c_int; // taskLibCommon.h - pub fn taskIdSelf() -> ::TASK_ID; - pub fn taskDelay(ticks: ::_Vx_ticks_t) -> ::c_int; + pub fn taskIdSelf() -> crate::TASK_ID; + pub fn taskDelay(ticks: crate::_Vx_ticks_t) -> c_int; // taskLib.h - pub fn taskNameSet(task_id: ::TASK_ID, task_name: *mut ::c_char) -> ::c_int; - pub fn taskNameGet(task_id: ::TASK_ID, buf_name: *mut ::c_char, bufsize: ::size_t) -> ::c_int; + pub fn taskNameSet(task_id: crate::TASK_ID, task_name: *mut c_char) -> c_int; + pub fn taskNameGet(task_id: crate::TASK_ID, buf_name: *mut c_char, bufsize: size_t) -> c_int; // rtpLibCommon.h - pub fn rtpInfoGet(rtpId: ::RTP_ID, rtpStruct: *mut ::RTP_DESC) -> ::c_int; + pub fn rtpInfoGet(rtpId: crate::RTP_ID, rtpStruct: *mut crate::RTP_DESC) -> c_int; pub fn rtpSpawn( - pubrtpFileName: *const ::c_char, - argv: *mut *const ::c_char, - envp: *mut *const ::c_char, - priority: ::c_int, - uStackSize: ::size_t, - options: ::c_int, - taskOptions: ::c_int, + pubrtpFileName: *const c_char, + argv: *mut *const c_char, + envp: *mut *const c_char, + priority: c_int, + uStackSize: size_t, + options: c_int, + taskOptions: c_int, ) -> RTP_ID; // ioLib.h - pub fn _realpath(fileName: *const ::c_char, resolvedName: *mut ::c_char) -> *mut ::c_char; + pub fn _realpath(fileName: *const c_char, resolvedName: *mut c_char) -> *mut c_char; // pathLib.h - pub fn _pathIsAbsolute(filepath: *const ::c_char, pNameTail: *mut *const ::c_char) -> BOOL; + pub fn _pathIsAbsolute(filepath: *const c_char, pNameTail: *mut *const c_char) -> BOOL; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; // randomNumGen.h pub fn randBytes(buf: *mut c_uchar, length: c_int) -> c_int; @@ -1912,105 +1918,95 @@ extern "C" { pub fn randSecure() -> c_int; // mqueue.h - pub fn mq_open(name: *const ::c_char, oflag: ::c_int, ...) -> ::mqd_t; - pub fn mq_close(mqd: ::mqd_t) -> ::c_int; - pub fn mq_unlink(name: *const ::c_char) -> ::c_int; + pub fn mq_open(name: *const c_char, oflag: c_int, ...) -> crate::mqd_t; + pub fn mq_close(mqd: crate::mqd_t) -> c_int; + pub fn mq_unlink(name: *const c_char) -> c_int; pub fn mq_receive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + ) -> ssize_t; pub fn mq_timedreceive( - mqd: ::mqd_t, - msg_ptr: *mut ::c_char, - msg_len: ::size_t, - msg_prio: *mut ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::ssize_t; + mqd: crate::mqd_t, + msg_ptr: *mut c_char, + msg_len: size_t, + msg_prio: *mut c_uint, + abs_timeout: *const crate::timespec, + ) -> ssize_t; pub fn mq_send( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - ) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + ) -> c_int; pub fn mq_timedsend( - mqd: ::mqd_t, - msg_ptr: *const ::c_char, - msg_len: ::size_t, - msg_prio: ::c_uint, - abs_timeout: *const ::timespec, - ) -> ::c_int; - pub fn mq_getattr(mqd: ::mqd_t, attr: *mut ::mq_attr) -> ::c_int; - pub fn mq_setattr(mqd: ::mqd_t, newattr: *const ::mq_attr, oldattr: *mut ::mq_attr) -> ::c_int; + mqd: crate::mqd_t, + msg_ptr: *const c_char, + msg_len: size_t, + msg_prio: c_uint, + abs_timeout: *const crate::timespec, + ) -> c_int; + pub fn mq_getattr(mqd: crate::mqd_t, attr: *mut crate::mq_attr) -> c_int; + pub fn mq_setattr( + mqd: crate::mqd_t, + newattr: *const crate::mq_attr, + oldattr: *mut crate::mq_attr, + ) -> c_int; // vxCpuLib.h - pub fn vxCpuEnabledGet() -> ::cpuset_t; // Get set of running CPU's in the system - pub fn vxCpuConfiguredGet() -> ::cpuset_t; // Get set of Configured CPU's in the system + pub fn vxCpuEnabledGet() -> crate::cpuset_t; // Get set of running CPU's in the system + pub fn vxCpuConfiguredGet() -> crate::cpuset_t; // Get set of Configured CPU's in the system } //Dummy functions, these don't really exist in VxWorks. // wait.h macros safe_f! { - pub {const} fn WIFEXITED(status: ::c_int) -> bool { + pub {const} fn WIFEXITED(status: c_int) -> bool { (status & 0xFF00) == 0 } - pub {const} fn WIFSIGNALED(status: ::c_int) -> bool { + pub {const} fn WIFSIGNALED(status: c_int) -> bool { (status & 0xFF00) != 0 } - pub {const} fn WIFSTOPPED(status: ::c_int) -> bool { + pub {const} fn WIFSTOPPED(status: c_int) -> bool { (status & 0xFF0000) != 0 } - pub {const} fn WEXITSTATUS(status: ::c_int) -> ::c_int { + pub {const} fn WEXITSTATUS(status: c_int) -> c_int { status & 0xFF } - pub {const} fn WTERMSIG(status: ::c_int) -> ::c_int { + pub {const} fn WTERMSIG(status: c_int) -> c_int { (status >> 8) & 0xFF } - pub {const} fn WSTOPSIG(status: ::c_int) -> ::c_int { + pub {const} fn WSTOPSIG(status: c_int) -> c_int { (status >> 16) & 0xFF } } -pub unsafe fn pread( - _fd: ::c_int, - _buf: *mut ::c_void, - _count: ::size_t, - _offset: off64_t, -) -> ::ssize_t { +pub unsafe fn pread(_fd: c_int, _buf: *mut c_void, _count: size_t, _offset: off64_t) -> ssize_t { -1 } -pub unsafe fn pwrite( - _fd: ::c_int, - _buf: *const ::c_void, - _count: ::size_t, - _offset: off64_t, -) -> ::ssize_t { +pub unsafe fn pwrite(_fd: c_int, _buf: *const c_void, _count: size_t, _offset: off64_t) -> ssize_t { -1 } -pub unsafe fn posix_memalign( - memptr: *mut *mut ::c_void, - align: ::size_t, - size: ::size_t, -) -> ::c_int { +pub unsafe fn posix_memalign(memptr: *mut *mut c_void, align: size_t, size: size_t) -> c_int { // check to see if align is a power of 2 and if align is a multiple // of sizeof(void *) - if (align & align - 1 != 0) || (align as usize % size_of::<::size_t>() != 0) { - return ::EINVAL; + if (align & align - 1 != 0) || (align as usize % size_of::() != 0) { + return crate::EINVAL; } unsafe { // posix_memalign should not set errno - let e = ::errnoGet(); + let e = crate::errnoGet(); let temp = memalign(align, size); - ::errnoSet(e as ::c_int); + crate::errnoSet(e as c_int); if temp.is_null() { - ::ENOMEM + crate::ENOMEM } else { *memptr = temp; 0 diff --git a/src/wasi/mod.rs b/src/wasi/mod.rs index 16024cdcc4ab0..e07e46fe9d55d 100644 --- a/src/wasi/mod.rs +++ b/src/wasi/mod.rs @@ -5,9 +5,8 @@ use core::iter::Iterator; -use c_void; - use super::{Send, Sync}; +use crate::c_void; pub type c_char = i8; pub type c_uchar = u8; @@ -244,7 +243,7 @@ pub const POSIX_FADV_NORMAL: c_int = 0; pub const POSIX_FADV_RANDOM: c_int = 2; pub const POSIX_FADV_SEQUENTIAL: c_int = 1; pub const POSIX_FADV_WILLNEED: c_int = 3; -pub const AT_FDCWD: ::c_int = -2; +pub const AT_FDCWD: c_int = -2; pub const AT_EACCESS: c_int = 0x0; pub const AT_SYMLINK_NOFOLLOW: c_int = 0x1; pub const AT_SYMLINK_FOLLOW: c_int = 0x2; @@ -282,17 +281,17 @@ pub const DT_REG: u8 = 4; pub const DT_LNK: u8 = 7; pub const FIONREAD: c_int = 1; pub const FIONBIO: c_int = 2; -pub const F_OK: ::c_int = 0; -pub const R_OK: ::c_int = 4; -pub const W_OK: ::c_int = 2; -pub const X_OK: ::c_int = 1; -pub const POLLIN: ::c_short = 0x1; -pub const POLLOUT: ::c_short = 0x2; -pub const POLLERR: ::c_short = 0x1000; -pub const POLLHUP: ::c_short = 0x2000; -pub const POLLNVAL: ::c_short = 0x4000; -pub const POLLRDNORM: ::c_short = 0x1; -pub const POLLWRNORM: ::c_short = 0x2; +pub const F_OK: c_int = 0; +pub const R_OK: c_int = 4; +pub const W_OK: c_int = 2; +pub const X_OK: c_int = 1; +pub const POLLIN: c_short = 0x1; +pub const POLLOUT: c_short = 0x2; +pub const POLLERR: c_short = 0x1000; +pub const POLLHUP: c_short = 0x2000; +pub const POLLNVAL: c_short = 0x4000; +pub const POLLRDNORM: c_short = 0x1; +pub const POLLWRNORM: c_short = 0x2; pub const E2BIG: c_int = 1; pub const EACCES: c_int = 2; @@ -374,7 +373,7 @@ pub const EOPNOTSUPP: c_int = ENOTSUP; pub const EWOULDBLOCK: c_int = EAGAIN; pub const _SC_PAGESIZE: c_int = 30; -pub const _SC_PAGE_SIZE: ::c_int = _SC_PAGESIZE; +pub const _SC_PAGE_SIZE: c_int = _SC_PAGESIZE; pub const _SC_IOV_MAX: c_int = 60; pub const _SC_SYMLOOP_MAX: c_int = 173; @@ -397,79 +396,79 @@ cfg_if! { } } -pub const ABDAY_1: ::nl_item = 0x20000; -pub const ABDAY_2: ::nl_item = 0x20001; -pub const ABDAY_3: ::nl_item = 0x20002; -pub const ABDAY_4: ::nl_item = 0x20003; -pub const ABDAY_5: ::nl_item = 0x20004; -pub const ABDAY_6: ::nl_item = 0x20005; -pub const ABDAY_7: ::nl_item = 0x20006; - -pub const DAY_1: ::nl_item = 0x20007; -pub const DAY_2: ::nl_item = 0x20008; -pub const DAY_3: ::nl_item = 0x20009; -pub const DAY_4: ::nl_item = 0x2000A; -pub const DAY_5: ::nl_item = 0x2000B; -pub const DAY_6: ::nl_item = 0x2000C; -pub const DAY_7: ::nl_item = 0x2000D; - -pub const ABMON_1: ::nl_item = 0x2000E; -pub const ABMON_2: ::nl_item = 0x2000F; -pub const ABMON_3: ::nl_item = 0x20010; -pub const ABMON_4: ::nl_item = 0x20011; -pub const ABMON_5: ::nl_item = 0x20012; -pub const ABMON_6: ::nl_item = 0x20013; -pub const ABMON_7: ::nl_item = 0x20014; -pub const ABMON_8: ::nl_item = 0x20015; -pub const ABMON_9: ::nl_item = 0x20016; -pub const ABMON_10: ::nl_item = 0x20017; -pub const ABMON_11: ::nl_item = 0x20018; -pub const ABMON_12: ::nl_item = 0x20019; - -pub const MON_1: ::nl_item = 0x2001A; -pub const MON_2: ::nl_item = 0x2001B; -pub const MON_3: ::nl_item = 0x2001C; -pub const MON_4: ::nl_item = 0x2001D; -pub const MON_5: ::nl_item = 0x2001E; -pub const MON_6: ::nl_item = 0x2001F; -pub const MON_7: ::nl_item = 0x20020; -pub const MON_8: ::nl_item = 0x20021; -pub const MON_9: ::nl_item = 0x20022; -pub const MON_10: ::nl_item = 0x20023; -pub const MON_11: ::nl_item = 0x20024; -pub const MON_12: ::nl_item = 0x20025; - -pub const AM_STR: ::nl_item = 0x20026; -pub const PM_STR: ::nl_item = 0x20027; - -pub const D_T_FMT: ::nl_item = 0x20028; -pub const D_FMT: ::nl_item = 0x20029; -pub const T_FMT: ::nl_item = 0x2002A; -pub const T_FMT_AMPM: ::nl_item = 0x2002B; - -pub const ERA: ::nl_item = 0x2002C; -pub const ERA_D_FMT: ::nl_item = 0x2002E; -pub const ALT_DIGITS: ::nl_item = 0x2002F; -pub const ERA_D_T_FMT: ::nl_item = 0x20030; -pub const ERA_T_FMT: ::nl_item = 0x20031; - -pub const CODESET: ::nl_item = 14; -pub const CRNCYSTR: ::nl_item = 0x4000F; -pub const RADIXCHAR: ::nl_item = 0x10000; -pub const THOUSEP: ::nl_item = 0x10001; -pub const YESEXPR: ::nl_item = 0x50000; -pub const NOEXPR: ::nl_item = 0x50001; -pub const YESSTR: ::nl_item = 0x50002; -pub const NOSTR: ::nl_item = 0x50003; +pub const ABDAY_1: crate::nl_item = 0x20000; +pub const ABDAY_2: crate::nl_item = 0x20001; +pub const ABDAY_3: crate::nl_item = 0x20002; +pub const ABDAY_4: crate::nl_item = 0x20003; +pub const ABDAY_5: crate::nl_item = 0x20004; +pub const ABDAY_6: crate::nl_item = 0x20005; +pub const ABDAY_7: crate::nl_item = 0x20006; + +pub const DAY_1: crate::nl_item = 0x20007; +pub const DAY_2: crate::nl_item = 0x20008; +pub const DAY_3: crate::nl_item = 0x20009; +pub const DAY_4: crate::nl_item = 0x2000A; +pub const DAY_5: crate::nl_item = 0x2000B; +pub const DAY_6: crate::nl_item = 0x2000C; +pub const DAY_7: crate::nl_item = 0x2000D; + +pub const ABMON_1: crate::nl_item = 0x2000E; +pub const ABMON_2: crate::nl_item = 0x2000F; +pub const ABMON_3: crate::nl_item = 0x20010; +pub const ABMON_4: crate::nl_item = 0x20011; +pub const ABMON_5: crate::nl_item = 0x20012; +pub const ABMON_6: crate::nl_item = 0x20013; +pub const ABMON_7: crate::nl_item = 0x20014; +pub const ABMON_8: crate::nl_item = 0x20015; +pub const ABMON_9: crate::nl_item = 0x20016; +pub const ABMON_10: crate::nl_item = 0x20017; +pub const ABMON_11: crate::nl_item = 0x20018; +pub const ABMON_12: crate::nl_item = 0x20019; + +pub const MON_1: crate::nl_item = 0x2001A; +pub const MON_2: crate::nl_item = 0x2001B; +pub const MON_3: crate::nl_item = 0x2001C; +pub const MON_4: crate::nl_item = 0x2001D; +pub const MON_5: crate::nl_item = 0x2001E; +pub const MON_6: crate::nl_item = 0x2001F; +pub const MON_7: crate::nl_item = 0x20020; +pub const MON_8: crate::nl_item = 0x20021; +pub const MON_9: crate::nl_item = 0x20022; +pub const MON_10: crate::nl_item = 0x20023; +pub const MON_11: crate::nl_item = 0x20024; +pub const MON_12: crate::nl_item = 0x20025; + +pub const AM_STR: crate::nl_item = 0x20026; +pub const PM_STR: crate::nl_item = 0x20027; + +pub const D_T_FMT: crate::nl_item = 0x20028; +pub const D_FMT: crate::nl_item = 0x20029; +pub const T_FMT: crate::nl_item = 0x2002A; +pub const T_FMT_AMPM: crate::nl_item = 0x2002B; + +pub const ERA: crate::nl_item = 0x2002C; +pub const ERA_D_FMT: crate::nl_item = 0x2002E; +pub const ALT_DIGITS: crate::nl_item = 0x2002F; +pub const ERA_D_T_FMT: crate::nl_item = 0x20030; +pub const ERA_T_FMT: crate::nl_item = 0x20031; + +pub const CODESET: crate::nl_item = 14; +pub const CRNCYSTR: crate::nl_item = 0x4000F; +pub const RADIXCHAR: crate::nl_item = 0x10000; +pub const THOUSEP: crate::nl_item = 0x10001; +pub const YESEXPR: crate::nl_item = 0x50000; +pub const NOEXPR: crate::nl_item = 0x50001; +pub const YESSTR: crate::nl_item = 0x50002; +pub const NOSTR: crate::nl_item = 0x50003; f! { - pub fn FD_ISSET(fd: ::c_int, set: *const fd_set) -> bool { + pub fn FD_ISSET(fd: c_int, set: *const fd_set) -> bool { let set = &*set; let n = set.__nfds; return set.__fds[..n].iter().any(|p| *p == fd); } - pub fn FD_SET(fd: ::c_int, set: *mut fd_set) -> () { + pub fn FD_SET(fd: c_int, set: *mut fd_set) -> () { let set = &mut *set; let n = set.__nfds; if !set.__fds[..n].iter().any(|p| *p == fd) { @@ -508,13 +507,13 @@ extern "C" { pub fn getenv(s: *const c_char) -> *mut c_char; pub fn malloc(amt: size_t) -> *mut c_void; pub fn malloc_usable_size(ptr: *mut c_void) -> size_t; - pub fn sbrk(increment: ::intptr_t) -> *mut ::c_void; + pub fn sbrk(increment: intptr_t) -> *mut c_void; pub fn rand() -> c_int; pub fn read(fd: c_int, ptr: *mut c_void, size: size_t) -> ssize_t; pub fn realloc(ptr: *mut c_void, amt: size_t) -> *mut c_void; pub fn setenv(k: *const c_char, v: *const c_char, a: c_int) -> c_int; pub fn unsetenv(k: *const c_char) -> c_int; - pub fn clearenv() -> ::c_int; + pub fn clearenv() -> c_int; pub fn write(fd: c_int, ptr: *const c_void, size: size_t) -> ssize_t; pub static mut environ: *mut *mut c_char; pub fn fopen(a: *const c_char, b: *const c_char) -> *mut FILE; @@ -630,154 +629,139 @@ extern "C" { pub fn memmove(dest: *mut c_void, src: *const c_void, n: size_t) -> *mut c_void; pub fn memset(dest: *mut c_void, c: c_int, n: size_t) -> *mut c_void; - pub fn fprintf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn printf(format: *const ::c_char, ...) -> ::c_int; - pub fn snprintf(s: *mut ::c_char, n: ::size_t, format: *const ::c_char, ...) -> ::c_int; - pub fn sprintf(s: *mut ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn fscanf(stream: *mut ::FILE, format: *const ::c_char, ...) -> ::c_int; - pub fn scanf(format: *const ::c_char, ...) -> ::c_int; - pub fn sscanf(s: *const ::c_char, format: *const ::c_char, ...) -> ::c_int; - pub fn getchar_unlocked() -> ::c_int; - pub fn putchar_unlocked(c: ::c_int) -> ::c_int; - - pub fn shutdown(socket: ::c_int, how: ::c_int) -> ::c_int; - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; - pub fn mkdir(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; - pub fn fileno(stream: *mut ::FILE) -> ::c_int; - pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; - pub fn creat(path: *const c_char, mode: mode_t) -> ::c_int; - pub fn fcntl(fd: ::c_int, cmd: ::c_int, ...) -> ::c_int; - pub fn opendir(dirname: *const c_char) -> *mut ::DIR; - pub fn fdopendir(fd: ::c_int) -> *mut ::DIR; - pub fn readdir(dirp: *mut ::DIR) -> *mut ::dirent; - pub fn closedir(dirp: *mut ::DIR) -> ::c_int; - pub fn rewinddir(dirp: *mut ::DIR); - pub fn dirfd(dirp: *mut ::DIR) -> ::c_int; - pub fn seekdir(dirp: *mut ::DIR, loc: ::c_long); - pub fn telldir(dirp: *mut ::DIR) -> ::c_long; - - pub fn openat(dirfd: ::c_int, pathname: *const ::c_char, flags: ::c_int, ...) -> ::c_int; - pub fn fstatat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut stat, - flags: ::c_int, - ) -> ::c_int; + pub fn fprintf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn printf(format: *const c_char, ...) -> c_int; + pub fn snprintf(s: *mut c_char, n: size_t, format: *const c_char, ...) -> c_int; + pub fn sprintf(s: *mut c_char, format: *const c_char, ...) -> c_int; + pub fn fscanf(stream: *mut crate::FILE, format: *const c_char, ...) -> c_int; + pub fn scanf(format: *const c_char, ...) -> c_int; + pub fn sscanf(s: *const c_char, format: *const c_char, ...) -> c_int; + pub fn getchar_unlocked() -> c_int; + pub fn putchar_unlocked(c: c_int) -> c_int; + + pub fn shutdown(socket: c_int, how: c_int) -> c_int; + pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int; + pub fn mkdir(path: *const c_char, mode: mode_t) -> c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> c_int; + pub fn fdopen(fd: c_int, mode: *const c_char) -> *mut crate::FILE; + pub fn fileno(stream: *mut crate::FILE) -> c_int; + pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int; + pub fn creat(path: *const c_char, mode: mode_t) -> c_int; + pub fn fcntl(fd: c_int, cmd: c_int, ...) -> c_int; + pub fn opendir(dirname: *const c_char) -> *mut crate::DIR; + pub fn fdopendir(fd: c_int) -> *mut crate::DIR; + pub fn readdir(dirp: *mut crate::DIR) -> *mut crate::dirent; + pub fn closedir(dirp: *mut crate::DIR) -> c_int; + pub fn rewinddir(dirp: *mut crate::DIR); + pub fn dirfd(dirp: *mut crate::DIR) -> c_int; + pub fn seekdir(dirp: *mut crate::DIR, loc: c_long); + pub fn telldir(dirp: *mut crate::DIR) -> c_long; + + pub fn openat(dirfd: c_int, pathname: *const c_char, flags: c_int, ...) -> c_int; + pub fn fstatat(dirfd: c_int, pathname: *const c_char, buf: *mut stat, flags: c_int) -> c_int; pub fn linkat( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - flags: ::c_int, - ) -> ::c_int; - pub fn mkdirat(dirfd: ::c_int, pathname: *const ::c_char, mode: ::mode_t) -> ::c_int; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + flags: c_int, + ) -> c_int; + pub fn mkdirat(dirfd: c_int, pathname: *const c_char, mode: crate::mode_t) -> c_int; pub fn readlinkat( - dirfd: ::c_int, - pathname: *const ::c_char, - buf: *mut ::c_char, - bufsiz: ::size_t, - ) -> ::ssize_t; + dirfd: c_int, + pathname: *const c_char, + buf: *mut c_char, + bufsiz: size_t, + ) -> ssize_t; pub fn renameat( - olddirfd: ::c_int, - oldpath: *const ::c_char, - newdirfd: ::c_int, - newpath: *const ::c_char, - ) -> ::c_int; - pub fn symlinkat( - target: *const ::c_char, - newdirfd: ::c_int, - linkpath: *const ::c_char, - ) -> ::c_int; - pub fn unlinkat(dirfd: ::c_int, pathname: *const ::c_char, flags: ::c_int) -> ::c_int; - - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; - pub fn close(fd: ::c_int) -> ::c_int; - pub fn fpathconf(filedes: ::c_int, name: ::c_int) -> c_long; - pub fn getopt(argc: ::c_int, argv: *const *mut c_char, optstr: *const c_char) -> ::c_int; - pub fn isatty(fd: ::c_int) -> ::c_int; - pub fn link(src: *const c_char, dst: *const c_char) -> ::c_int; - pub fn lseek(fd: ::c_int, offset: off_t, whence: ::c_int) -> off_t; - pub fn pathconf(path: *const c_char, name: ::c_int) -> c_long; - pub fn rmdir(path: *const c_char) -> ::c_int; - pub fn sleep(secs: ::c_uint) -> ::c_uint; - pub fn unlink(c: *const c_char) -> ::c_int; - pub fn pread(fd: ::c_int, buf: *mut ::c_void, count: ::size_t, offset: off_t) -> ::ssize_t; - pub fn pwrite(fd: ::c_int, buf: *const ::c_void, count: ::size_t, offset: off_t) -> ::ssize_t; - - pub fn lstat(path: *const c_char, buf: *mut stat) -> ::c_int; - - pub fn fsync(fd: ::c_int) -> ::c_int; - pub fn fdatasync(fd: ::c_int) -> ::c_int; - - pub fn symlink(path1: *const c_char, path2: *const c_char) -> ::c_int; - - pub fn truncate(path: *const c_char, length: off_t) -> ::c_int; - pub fn ftruncate(fd: ::c_int, length: off_t) -> ::c_int; - - pub fn getrusage(resource: ::c_int, usage: *mut rusage) -> ::c_int; - - pub fn gettimeofday(tp: *mut ::timeval, tz: *mut ::c_void) -> ::c_int; - pub fn times(buf: *mut ::tms) -> ::clock_t; - - pub fn strerror_r(errnum: ::c_int, buf: *mut c_char, buflen: ::size_t) -> ::c_int; - - pub fn usleep(secs: ::c_uint) -> ::c_int; - pub fn send(socket: ::c_int, buf: *const ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; - pub fn recv(socket: ::c_int, buf: *mut ::c_void, len: ::size_t, flags: ::c_int) -> ::ssize_t; - pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: ::c_int) -> ::c_int; - pub fn setlocale(category: ::c_int, locale: *const ::c_char) -> *mut ::c_char; + olddirfd: c_int, + oldpath: *const c_char, + newdirfd: c_int, + newpath: *const c_char, + ) -> c_int; + pub fn symlinkat(target: *const c_char, newdirfd: c_int, linkpath: *const c_char) -> c_int; + pub fn unlinkat(dirfd: c_int, pathname: *const c_char, flags: c_int) -> c_int; + + pub fn access(path: *const c_char, amode: c_int) -> c_int; + pub fn close(fd: c_int) -> c_int; + pub fn fpathconf(filedes: c_int, name: c_int) -> c_long; + pub fn getopt(argc: c_int, argv: *const *mut c_char, optstr: *const c_char) -> c_int; + pub fn isatty(fd: c_int) -> c_int; + pub fn link(src: *const c_char, dst: *const c_char) -> c_int; + pub fn lseek(fd: c_int, offset: off_t, whence: c_int) -> off_t; + pub fn pathconf(path: *const c_char, name: c_int) -> c_long; + pub fn rmdir(path: *const c_char) -> c_int; + pub fn sleep(secs: c_uint) -> c_uint; + pub fn unlink(c: *const c_char) -> c_int; + pub fn pread(fd: c_int, buf: *mut c_void, count: size_t, offset: off_t) -> ssize_t; + pub fn pwrite(fd: c_int, buf: *const c_void, count: size_t, offset: off_t) -> ssize_t; + + pub fn lstat(path: *const c_char, buf: *mut stat) -> c_int; + + pub fn fsync(fd: c_int) -> c_int; + pub fn fdatasync(fd: c_int) -> c_int; + + pub fn symlink(path1: *const c_char, path2: *const c_char) -> c_int; + + pub fn truncate(path: *const c_char, length: off_t) -> c_int; + pub fn ftruncate(fd: c_int, length: off_t) -> c_int; + + pub fn getrusage(resource: c_int, usage: *mut rusage) -> c_int; + + pub fn gettimeofday(tp: *mut crate::timeval, tz: *mut c_void) -> c_int; + pub fn times(buf: *mut crate::tms) -> crate::clock_t; + + pub fn strerror_r(errnum: c_int, buf: *mut c_char, buflen: size_t) -> c_int; + + pub fn usleep(secs: c_uint) -> c_int; + pub fn send(socket: c_int, buf: *const c_void, len: size_t, flags: c_int) -> ssize_t; + pub fn recv(socket: c_int, buf: *mut c_void, len: size_t, flags: c_int) -> ssize_t; + pub fn poll(fds: *mut pollfd, nfds: nfds_t, timeout: c_int) -> c_int; + pub fn setlocale(category: c_int, locale: *const c_char) -> *mut c_char; pub fn localeconv() -> *mut lconv; - pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: ::size_t) -> ::ssize_t; + pub fn readlink(path: *const c_char, buf: *mut c_char, bufsz: size_t) -> ssize_t; - pub fn timegm(tm: *mut ::tm) -> time_t; + pub fn timegm(tm: *mut crate::tm) -> time_t; - pub fn sysconf(name: ::c_int) -> ::c_long; + pub fn sysconf(name: c_int) -> c_long; - pub fn ioctl(fd: ::c_int, request: ::c_int, ...) -> ::c_int; + pub fn ioctl(fd: c_int, request: c_int, ...) -> c_int; - pub fn fseeko(stream: *mut ::FILE, offset: ::off_t, whence: ::c_int) -> ::c_int; - pub fn ftello(stream: *mut ::FILE) -> ::off_t; - pub fn posix_fallocate(fd: ::c_int, offset: ::off_t, len: ::off_t) -> ::c_int; + pub fn fseeko(stream: *mut crate::FILE, offset: off_t, whence: c_int) -> c_int; + pub fn ftello(stream: *mut crate::FILE) -> off_t; + pub fn posix_fallocate(fd: c_int, offset: off_t, len: off_t) -> c_int; pub fn strcasestr(cs: *const c_char, ct: *const c_char) -> *mut c_char; pub fn getline(lineptr: *mut *mut c_char, n: *mut size_t, stream: *mut FILE) -> ssize_t; - pub fn faccessat( - dirfd: ::c_int, - pathname: *const ::c_char, - mode: ::c_int, - flags: ::c_int, - ) -> ::c_int; - pub fn writev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn readv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int) -> ::ssize_t; - pub fn pwritev(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) - -> ::ssize_t; - pub fn preadv(fd: ::c_int, iov: *const ::iovec, iovcnt: ::c_int, offset: ::off_t) -> ::ssize_t; - pub fn posix_fadvise(fd: ::c_int, offset: ::off_t, len: ::off_t, advise: ::c_int) -> ::c_int; - pub fn futimens(fd: ::c_int, times: *const ::timespec) -> ::c_int; + pub fn faccessat(dirfd: c_int, pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; + pub fn writev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn readv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn posix_fadvise(fd: c_int, offset: off_t, len: off_t, advise: c_int) -> c_int; + pub fn futimens(fd: c_int, times: *const crate::timespec) -> c_int; pub fn utimensat( - dirfd: ::c_int, - path: *const ::c_char, - times: *const ::timespec, - flag: ::c_int, - ) -> ::c_int; - pub fn getentropy(buf: *mut ::c_void, buflen: ::size_t) -> ::c_int; - pub fn memrchr(cx: *const ::c_void, c: ::c_int, n: ::size_t) -> *mut ::c_void; + dirfd: c_int, + path: *const c_char, + times: *const crate::timespec, + flag: c_int, + ) -> c_int; + pub fn getentropy(buf: *mut c_void, buflen: size_t) -> c_int; + pub fn memrchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn abs(i: c_int) -> c_int; pub fn labs(i: c_long) -> c_long; - pub fn duplocale(base: ::locale_t) -> ::locale_t; - pub fn freelocale(loc: ::locale_t); - pub fn newlocale(mask: ::c_int, locale: *const ::c_char, base: ::locale_t) -> ::locale_t; - pub fn uselocale(loc: ::locale_t) -> ::locale_t; - pub fn sched_yield() -> ::c_int; - pub fn getcwd(buf: *mut c_char, size: ::size_t) -> *mut c_char; - pub fn chdir(dir: *const c_char) -> ::c_int; + pub fn duplocale(base: crate::locale_t) -> crate::locale_t; + pub fn freelocale(loc: crate::locale_t); + pub fn newlocale(mask: c_int, locale: *const c_char, base: crate::locale_t) -> crate::locale_t; + pub fn uselocale(loc: crate::locale_t) -> crate::locale_t; + pub fn sched_yield() -> c_int; + pub fn getcwd(buf: *mut c_char, size: size_t) -> *mut c_char; + pub fn chdir(dir: *const c_char) -> c_int; - pub fn nl_langinfo(item: ::nl_item) -> *mut ::c_char; - pub fn nl_langinfo_l(item: ::nl_item, loc: ::locale_t) -> *mut ::c_char; + pub fn nl_langinfo(item: crate::nl_item) -> *mut c_char; + pub fn nl_langinfo_l(item: crate::nl_item, loc: crate::locale_t) -> *mut c_char; pub fn select( nfds: c_int, @@ -797,7 +781,7 @@ extern "C" { relative_path: *mut *mut c_char, relative_path_len: usize, ) -> c_int; - pub fn __wasilibc_tell(fd: c_int) -> ::off_t; + pub fn __wasilibc_tell(fd: c_int) -> off_t; pub fn __wasilibc_nocwd___wasilibc_unlinkat(dirfd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_nocwd___wasilibc_rmdirat(dirfd: c_int, path: *const c_char) -> c_int; pub fn __wasilibc_nocwd_linkat( @@ -842,15 +826,15 @@ extern "C" { pub fn __wasilibc_nocwd_utimensat( dirfd: c_int, path: *const c_char, - times: *const ::timespec, + times: *const crate::timespec, flags: c_int, ) -> c_int; - pub fn __wasilibc_nocwd_opendirat(dirfd: c_int, path: *const c_char) -> *mut ::DIR; + pub fn __wasilibc_nocwd_opendirat(dirfd: c_int, path: *const c_char) -> *mut crate::DIR; pub fn __wasilibc_access(pathname: *const c_char, mode: c_int, flags: c_int) -> c_int; pub fn __wasilibc_stat(pathname: *const c_char, buf: *mut stat, flags: c_int) -> c_int; pub fn __wasilibc_utimens( pathname: *const c_char, - times: *const ::timespec, + times: *const crate::timespec, flags: c_int, ) -> c_int; pub fn __wasilibc_link(oldpath: *const c_char, newpath: *const c_char, flags: c_int) -> c_int; @@ -881,7 +865,7 @@ extern "C" { pub fn arc4random_buf(a: *mut c_void, b: size_t); pub fn arc4random_uniform(a: u32) -> u32; - pub fn __errno_location() -> *mut ::c_int; + pub fn __errno_location() -> *mut c_int; } cfg_if! { diff --git a/src/wasi/p2.rs b/src/wasi/p2.rs index d6381be451389..344029f222334 100644 --- a/src/wasi/p2.rs +++ b/src/wasi/p2.rs @@ -1,14 +1,16 @@ -pub type sa_family_t = ::c_ushort; -pub type in_port_t = ::c_ushort; -pub type in_addr_t = ::c_uint; +use crate::{c_char, c_int, c_uchar, c_uint, c_ushort, c_void, size_t, ssize_t}; -pub type socklen_t = ::c_uint; +pub type sa_family_t = c_ushort; +pub type in_port_t = c_ushort; +pub type in_addr_t = c_uint; + +pub type socklen_t = c_uint; s! { #[repr(align(16))] pub struct sockaddr { pub sa_family: sa_family_t, - pub sa_data: [::c_char; 0], + pub sa_data: [c_char; 0], } pub struct in_addr { @@ -24,32 +26,32 @@ s! { #[repr(align(4))] pub struct in6_addr { - pub s6_addr: [::c_uchar; 16], + pub s6_addr: [c_uchar; 16], } #[repr(align(16))] pub struct sockaddr_in6 { pub sin6_family: sa_family_t, pub sin6_port: in_port_t, - pub sin6_flowinfo: ::c_uint, + pub sin6_flowinfo: c_uint, pub sin6_addr: in6_addr, - pub sin6_scope_id: ::c_uint, + pub sin6_scope_id: c_uint, } #[repr(align(16))] pub struct sockaddr_storage { pub ss_family: sa_family_t, - pub __ss_data: [::c_char; 32], + pub __ss_data: [c_char; 32], } pub struct addrinfo { - pub ai_flags: ::c_int, - pub ai_family: ::c_int, - pub ai_socktype: ::c_int, - pub ai_protocol: ::c_int, + pub ai_flags: c_int, + pub ai_family: c_int, + pub ai_socktype: c_int, + pub ai_protocol: c_int, pub ai_addrlen: socklen_t, pub ai_addr: *mut sockaddr, - pub ai_canonname: *mut ::c_char, + pub ai_canonname: *mut c_char, pub ai_next: *mut addrinfo, } @@ -60,127 +62,127 @@ s! { pub struct ipv6_mreq { pub ipv6mr_multiaddr: in6_addr, - pub ipv6mr_interface: ::c_uint, + pub ipv6mr_interface: c_uint, } pub struct linger { - pub l_onoff: ::c_int, - pub l_linger: ::c_int, + pub l_onoff: c_int, + pub l_linger: c_int, } } -pub const SHUT_RD: ::c_int = 1 << 0; -pub const SHUT_WR: ::c_int = 1 << 1; -pub const SHUT_RDWR: ::c_int = SHUT_RD | SHUT_WR; - -pub const MSG_NOSIGNAL: ::c_int = 0x4000; -pub const MSG_PEEK: ::c_int = 0x0002; - -pub const SO_REUSEADDR: ::c_int = 2; -pub const SO_TYPE: ::c_int = 3; -pub const SO_ERROR: ::c_int = 4; -pub const SO_BROADCAST: ::c_int = 6; -pub const SO_SNDBUF: ::c_int = 7; -pub const SO_RCVBUF: ::c_int = 8; -pub const SO_KEEPALIVE: ::c_int = 9; -pub const SO_LINGER: ::c_int = 13; -pub const SO_ACCEPTCONN: ::c_int = 30; -pub const SO_PROTOCOL: ::c_int = 38; -pub const SO_DOMAIN: ::c_int = 39; -pub const SO_RCVTIMEO: ::c_int = 66; -pub const SO_SNDTIMEO: ::c_int = 67; - -pub const SOCK_DGRAM: ::c_int = 5; -pub const SOCK_STREAM: ::c_int = 6; -pub const SOCK_NONBLOCK: ::c_int = 0x00004000; - -pub const SOL_SOCKET: ::c_int = 0x7fffffff; - -pub const AF_UNSPEC: ::c_int = 0; -pub const AF_INET: ::c_int = 1; -pub const AF_INET6: ::c_int = 2; - -pub const IPPROTO_IP: ::c_int = 0; -pub const IPPROTO_TCP: ::c_int = 6; -pub const IPPROTO_UDP: ::c_int = 17; -pub const IPPROTO_IPV6: ::c_int = 41; - -pub const IP_TTL: ::c_int = 2; -pub const IP_MULTICAST_TTL: ::c_int = 33; -pub const IP_MULTICAST_LOOP: ::c_int = 34; -pub const IP_ADD_MEMBERSHIP: ::c_int = 35; -pub const IP_DROP_MEMBERSHIP: ::c_int = 36; - -pub const IPV6_UNICAST_HOPS: ::c_int = 16; -pub const IPV6_MULTICAST_LOOP: ::c_int = 19; -pub const IPV6_JOIN_GROUP: ::c_int = 20; -pub const IPV6_LEAVE_GROUP: ::c_int = 21; -pub const IPV6_V6ONLY: ::c_int = 26; - -pub const IPV6_ADD_MEMBERSHIP: ::c_int = IPV6_JOIN_GROUP; -pub const IPV6_DROP_MEMBERSHIP: ::c_int = IPV6_LEAVE_GROUP; - -pub const TCP_NODELAY: ::c_int = 1; -pub const TCP_KEEPIDLE: ::c_int = 4; -pub const TCP_KEEPINTVL: ::c_int = 5; -pub const TCP_KEEPCNT: ::c_int = 6; - -pub const EAI_SYSTEM: ::c_int = -11; +pub const SHUT_RD: c_int = 1 << 0; +pub const SHUT_WR: c_int = 1 << 1; +pub const SHUT_RDWR: c_int = SHUT_RD | SHUT_WR; + +pub const MSG_NOSIGNAL: c_int = 0x4000; +pub const MSG_PEEK: c_int = 0x0002; + +pub const SO_REUSEADDR: c_int = 2; +pub const SO_TYPE: c_int = 3; +pub const SO_ERROR: c_int = 4; +pub const SO_BROADCAST: c_int = 6; +pub const SO_SNDBUF: c_int = 7; +pub const SO_RCVBUF: c_int = 8; +pub const SO_KEEPALIVE: c_int = 9; +pub const SO_LINGER: c_int = 13; +pub const SO_ACCEPTCONN: c_int = 30; +pub const SO_PROTOCOL: c_int = 38; +pub const SO_DOMAIN: c_int = 39; +pub const SO_RCVTIMEO: c_int = 66; +pub const SO_SNDTIMEO: c_int = 67; + +pub const SOCK_DGRAM: c_int = 5; +pub const SOCK_STREAM: c_int = 6; +pub const SOCK_NONBLOCK: c_int = 0x00004000; + +pub const SOL_SOCKET: c_int = 0x7fffffff; + +pub const AF_UNSPEC: c_int = 0; +pub const AF_INET: c_int = 1; +pub const AF_INET6: c_int = 2; + +pub const IPPROTO_IP: c_int = 0; +pub const IPPROTO_TCP: c_int = 6; +pub const IPPROTO_UDP: c_int = 17; +pub const IPPROTO_IPV6: c_int = 41; + +pub const IP_TTL: c_int = 2; +pub const IP_MULTICAST_TTL: c_int = 33; +pub const IP_MULTICAST_LOOP: c_int = 34; +pub const IP_ADD_MEMBERSHIP: c_int = 35; +pub const IP_DROP_MEMBERSHIP: c_int = 36; + +pub const IPV6_UNICAST_HOPS: c_int = 16; +pub const IPV6_MULTICAST_LOOP: c_int = 19; +pub const IPV6_JOIN_GROUP: c_int = 20; +pub const IPV6_LEAVE_GROUP: c_int = 21; +pub const IPV6_V6ONLY: c_int = 26; + +pub const IPV6_ADD_MEMBERSHIP: c_int = IPV6_JOIN_GROUP; +pub const IPV6_DROP_MEMBERSHIP: c_int = IPV6_LEAVE_GROUP; + +pub const TCP_NODELAY: c_int = 1; +pub const TCP_KEEPIDLE: c_int = 4; +pub const TCP_KEEPINTVL: c_int = 5; +pub const TCP_KEEPCNT: c_int = 6; + +pub const EAI_SYSTEM: c_int = -11; extern "C" { - pub fn socket(domain: ::c_int, type_: ::c_int, protocol: ::c_int) -> ::c_int; - pub fn connect(fd: ::c_int, name: *const sockaddr, addrlen: socklen_t) -> ::c_int; - pub fn bind(socket: ::c_int, addr: *const sockaddr, addrlen: socklen_t) -> ::c_int; - pub fn listen(socket: ::c_int, backlog: ::c_int) -> ::c_int; - pub fn accept(socket: ::c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) -> ::c_int; + pub fn socket(domain: c_int, type_: c_int, protocol: c_int) -> c_int; + pub fn connect(fd: c_int, name: *const sockaddr, addrlen: socklen_t) -> c_int; + pub fn bind(socket: c_int, addr: *const sockaddr, addrlen: socklen_t) -> c_int; + pub fn listen(socket: c_int, backlog: c_int) -> c_int; + pub fn accept(socket: c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) -> c_int; pub fn accept4( - socket: ::c_int, + socket: c_int, addr: *mut sockaddr, addrlen: *mut socklen_t, - flags: ::c_int, - ) -> ::c_int; + flags: c_int, + ) -> c_int; - pub fn getsockname(socket: ::c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) -> ::c_int; - pub fn getpeername(socket: ::c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) -> ::c_int; + pub fn getsockname(socket: c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) -> c_int; + pub fn getpeername(socket: c_int, addr: *mut sockaddr, addrlen: *mut socklen_t) -> c_int; pub fn sendto( - socket: ::c_int, - buffer: *const ::c_void, - length: ::size_t, - flags: ::c_int, + socket: c_int, + buffer: *const c_void, + length: size_t, + flags: c_int, addr: *const sockaddr, addrlen: socklen_t, - ) -> ::ssize_t; + ) -> ssize_t; pub fn recvfrom( - socket: ::c_int, - buffer: *mut ::c_void, - length: ::size_t, - flags: ::c_int, + socket: c_int, + buffer: *mut c_void, + length: size_t, + flags: c_int, addr: *mut sockaddr, addrlen: *mut socklen_t, - ) -> ::ssize_t; + ) -> ssize_t; pub fn getsockopt( - sockfd: ::c_int, - level: ::c_int, - optname: ::c_int, - optval: *mut ::c_void, + sockfd: c_int, + level: c_int, + optname: c_int, + optval: *mut c_void, optlen: *mut socklen_t, - ) -> ::c_int; + ) -> c_int; pub fn setsockopt( - sockfd: ::c_int, - level: ::c_int, - optname: ::c_int, - optval: *const ::c_void, + sockfd: c_int, + level: c_int, + optname: c_int, + optval: *const c_void, optlen: socklen_t, - ) -> ::c_int; + ) -> c_int; pub fn getaddrinfo( - host: *const ::c_char, - serv: *const ::c_char, + host: *const c_char, + serv: *const c_char, hint: *const addrinfo, res: *mut *mut addrinfo, - ) -> ::c_int; + ) -> c_int; pub fn freeaddrinfo(p: *mut addrinfo); - pub fn gai_strerror(ecode: ::c_int) -> *const ::c_char; + pub fn gai_strerror(ecode: c_int) -> *const c_char; } diff --git a/src/windows/gnu/mod.rs b/src/windows/gnu/mod.rs index 1d90f826bc253..e593dff519e04 100644 --- a/src/windows/gnu/mod.rs +++ b/src/windows/gnu/mod.rs @@ -1,3 +1,5 @@ +use crate::{c_char, c_int, c_uint, size_t}; + cfg_if! { if #[cfg(target_pointer_width = "64")] { s_no_extra_traits! { @@ -18,19 +20,19 @@ cfg_if! { } } -pub const L_tmpnam: ::c_uint = 14; -pub const TMP_MAX: ::c_uint = 0x7fff; +pub const L_tmpnam: c_uint = 14; +pub const TMP_MAX: c_uint = 0x7fff; // stdio file descriptor numbers -pub const STDIN_FILENO: ::c_int = 0; -pub const STDOUT_FILENO: ::c_int = 1; -pub const STDERR_FILENO: ::c_int = 2; +pub const STDIN_FILENO: c_int = 0; +pub const STDOUT_FILENO: c_int = 1; +pub const STDERR_FILENO: c_int = 2; extern "C" { - pub fn strcasecmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int; - pub fn strncasecmp(s1: *const ::c_char, s2: *const ::c_char, n: ::size_t) -> ::c_int; + pub fn strcasecmp(s1: *const c_char, s2: *const c_char) -> c_int; + pub fn strncasecmp(s1: *const c_char, s2: *const c_char, n: size_t) -> c_int; // NOTE: For MSVC target, `wmemchr` is only a inline function in `` // header file. We cannot find a way to link to that symbol from Rust. - pub fn wmemchr(cx: *const ::wchar_t, c: ::wchar_t, n: ::size_t) -> *mut ::wchar_t; + pub fn wmemchr(cx: *const crate::wchar_t, c: crate::wchar_t, n: size_t) -> *mut crate::wchar_t; } diff --git a/src/windows/mod.rs b/src/windows/mod.rs index 0bdd2a967020a..55a07f7990885 100644 --- a/src/windows/mod.rs +++ b/src/windows/mod.rs @@ -1,6 +1,6 @@ //! Windows CRT definitions -use c_void; +use crate::c_void; pub type c_schar = i8; pub type c_uchar = u8; @@ -29,7 +29,7 @@ pub type wchar_t = u16; pub type clock_t = i32; -pub type errno_t = ::c_int; +pub type errno_t = c_int; cfg_if! { if #[cfg(all(target_arch = "x86", target_env = "gnu"))] { @@ -44,15 +44,15 @@ pub type dev_t = u32; pub type ino_t = u16; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum timezone {} -impl ::Copy for timezone {} -impl ::Clone for timezone { +impl Copy for timezone {} +impl Clone for timezone { fn clone(&self) -> timezone { *self } } pub type time64_t = i64; -pub type SOCKET = ::uintptr_t; +pub type SOCKET = crate::uintptr_t; s! { // note this is the struct called stat64 in Windows. Not stat, nor stati64. @@ -60,9 +60,9 @@ s! { pub st_dev: dev_t, pub st_ino: ino_t, pub st_mode: c_ushort, - pub st_nlink: ::c_short, - pub st_uid: ::c_short, - pub st_gid: ::c_short, + pub st_nlink: c_short, + pub st_uid: c_short, + pub st_gid: c_short, pub st_rdev: dev_t, pub st_size: i64, pub st_atime: time64_t, @@ -77,15 +77,15 @@ s! { } pub struct tm { - pub tm_sec: ::c_int, - pub tm_min: ::c_int, - pub tm_hour: ::c_int, - pub tm_mday: ::c_int, - pub tm_mon: ::c_int, - pub tm_year: ::c_int, - pub tm_wday: ::c_int, - pub tm_yday: ::c_int, - pub tm_isdst: ::c_int, + pub tm_sec: c_int, + pub tm_min: c_int, + pub tm_hour: c_int, + pub tm_mday: c_int, + pub tm_mon: c_int, + pub tm_year: c_int, + pub tm_wday: c_int, + pub tm_yday: c_int, + pub tm_isdst: c_int, } pub struct timeval { @@ -107,167 +107,167 @@ s! { pub const INT_MIN: c_int = -2147483648; pub const INT_MAX: c_int = 2147483647; -pub const EXIT_FAILURE: ::c_int = 1; -pub const EXIT_SUCCESS: ::c_int = 0; -pub const RAND_MAX: ::c_int = 32767; -pub const EOF: ::c_int = -1; -pub const SEEK_SET: ::c_int = 0; -pub const SEEK_CUR: ::c_int = 1; -pub const SEEK_END: ::c_int = 2; -pub const _IOFBF: ::c_int = 0; -pub const _IONBF: ::c_int = 4; -pub const _IOLBF: ::c_int = 64; -pub const BUFSIZ: ::c_uint = 512; -pub const FOPEN_MAX: ::c_uint = 20; -pub const FILENAME_MAX: ::c_uint = 260; +pub const EXIT_FAILURE: c_int = 1; +pub const EXIT_SUCCESS: c_int = 0; +pub const RAND_MAX: c_int = 32767; +pub const EOF: c_int = -1; +pub const SEEK_SET: c_int = 0; +pub const SEEK_CUR: c_int = 1; +pub const SEEK_END: c_int = 2; +pub const _IOFBF: c_int = 0; +pub const _IONBF: c_int = 4; +pub const _IOLBF: c_int = 64; +pub const BUFSIZ: c_uint = 512; +pub const FOPEN_MAX: c_uint = 20; +pub const FILENAME_MAX: c_uint = 260; // fcntl.h -pub const O_RDONLY: ::c_int = 0x0000; -pub const O_WRONLY: ::c_int = 0x0001; -pub const O_RDWR: ::c_int = 0x0002; -pub const O_APPEND: ::c_int = 0x0008; -pub const O_CREAT: ::c_int = 0x0100; -pub const O_TRUNC: ::c_int = 0x0200; -pub const O_EXCL: ::c_int = 0x0400; -pub const O_TEXT: ::c_int = 0x4000; -pub const O_BINARY: ::c_int = 0x8000; -pub const _O_WTEXT: ::c_int = 0x10000; -pub const _O_U16TEXT: ::c_int = 0x20000; -pub const _O_U8TEXT: ::c_int = 0x40000; -pub const O_RAW: ::c_int = O_BINARY; -pub const O_NOINHERIT: ::c_int = 0x0080; -pub const O_TEMPORARY: ::c_int = 0x0040; -pub const _O_SHORT_LIVED: ::c_int = 0x1000; -pub const _O_OBTAIN_DIR: ::c_int = 0x2000; -pub const O_SEQUENTIAL: ::c_int = 0x0020; -pub const O_RANDOM: ::c_int = 0x0010; - -pub const S_IFCHR: ::c_ushort = 0o2_0000; -pub const S_IFDIR: ::c_ushort = 0o4_0000; -pub const S_IFREG: ::c_ushort = 0o10_0000; -pub const S_IFMT: ::c_ushort = 0o17_0000; -pub const S_IEXEC: ::c_ushort = 0o0100; -pub const S_IWRITE: ::c_ushort = 0o0200; -pub const S_IREAD: ::c_ushort = 0o0400; - -pub const LC_ALL: ::c_int = 0; -pub const LC_COLLATE: ::c_int = 1; -pub const LC_CTYPE: ::c_int = 2; -pub const LC_MONETARY: ::c_int = 3; -pub const LC_NUMERIC: ::c_int = 4; -pub const LC_TIME: ::c_int = 5; - -pub const EPERM: ::c_int = 1; -pub const ENOENT: ::c_int = 2; -pub const ESRCH: ::c_int = 3; -pub const EINTR: ::c_int = 4; -pub const EIO: ::c_int = 5; -pub const ENXIO: ::c_int = 6; -pub const E2BIG: ::c_int = 7; -pub const ENOEXEC: ::c_int = 8; -pub const EBADF: ::c_int = 9; -pub const ECHILD: ::c_int = 10; -pub const EAGAIN: ::c_int = 11; -pub const ENOMEM: ::c_int = 12; -pub const EACCES: ::c_int = 13; -pub const EFAULT: ::c_int = 14; -pub const EBUSY: ::c_int = 16; -pub const EEXIST: ::c_int = 17; -pub const EXDEV: ::c_int = 18; -pub const ENODEV: ::c_int = 19; -pub const ENOTDIR: ::c_int = 20; -pub const EISDIR: ::c_int = 21; -pub const EINVAL: ::c_int = 22; -pub const ENFILE: ::c_int = 23; -pub const EMFILE: ::c_int = 24; -pub const ENOTTY: ::c_int = 25; -pub const EFBIG: ::c_int = 27; -pub const ENOSPC: ::c_int = 28; -pub const ESPIPE: ::c_int = 29; -pub const EROFS: ::c_int = 30; -pub const EMLINK: ::c_int = 31; -pub const EPIPE: ::c_int = 32; -pub const EDOM: ::c_int = 33; -pub const ERANGE: ::c_int = 34; -pub const EDEADLK: ::c_int = 36; -pub const EDEADLOCK: ::c_int = 36; -pub const ENAMETOOLONG: ::c_int = 38; -pub const ENOLCK: ::c_int = 39; -pub const ENOSYS: ::c_int = 40; -pub const ENOTEMPTY: ::c_int = 41; -pub const EILSEQ: ::c_int = 42; -pub const STRUNCATE: ::c_int = 80; +pub const O_RDONLY: c_int = 0x0000; +pub const O_WRONLY: c_int = 0x0001; +pub const O_RDWR: c_int = 0x0002; +pub const O_APPEND: c_int = 0x0008; +pub const O_CREAT: c_int = 0x0100; +pub const O_TRUNC: c_int = 0x0200; +pub const O_EXCL: c_int = 0x0400; +pub const O_TEXT: c_int = 0x4000; +pub const O_BINARY: c_int = 0x8000; +pub const _O_WTEXT: c_int = 0x10000; +pub const _O_U16TEXT: c_int = 0x20000; +pub const _O_U8TEXT: c_int = 0x40000; +pub const O_RAW: c_int = O_BINARY; +pub const O_NOINHERIT: c_int = 0x0080; +pub const O_TEMPORARY: c_int = 0x0040; +pub const _O_SHORT_LIVED: c_int = 0x1000; +pub const _O_OBTAIN_DIR: c_int = 0x2000; +pub const O_SEQUENTIAL: c_int = 0x0020; +pub const O_RANDOM: c_int = 0x0010; + +pub const S_IFCHR: c_ushort = 0o2_0000; +pub const S_IFDIR: c_ushort = 0o4_0000; +pub const S_IFREG: c_ushort = 0o10_0000; +pub const S_IFMT: c_ushort = 0o17_0000; +pub const S_IEXEC: c_ushort = 0o0100; +pub const S_IWRITE: c_ushort = 0o0200; +pub const S_IREAD: c_ushort = 0o0400; + +pub const LC_ALL: c_int = 0; +pub const LC_COLLATE: c_int = 1; +pub const LC_CTYPE: c_int = 2; +pub const LC_MONETARY: c_int = 3; +pub const LC_NUMERIC: c_int = 4; +pub const LC_TIME: c_int = 5; + +pub const EPERM: c_int = 1; +pub const ENOENT: c_int = 2; +pub const ESRCH: c_int = 3; +pub const EINTR: c_int = 4; +pub const EIO: c_int = 5; +pub const ENXIO: c_int = 6; +pub const E2BIG: c_int = 7; +pub const ENOEXEC: c_int = 8; +pub const EBADF: c_int = 9; +pub const ECHILD: c_int = 10; +pub const EAGAIN: c_int = 11; +pub const ENOMEM: c_int = 12; +pub const EACCES: c_int = 13; +pub const EFAULT: c_int = 14; +pub const EBUSY: c_int = 16; +pub const EEXIST: c_int = 17; +pub const EXDEV: c_int = 18; +pub const ENODEV: c_int = 19; +pub const ENOTDIR: c_int = 20; +pub const EISDIR: c_int = 21; +pub const EINVAL: c_int = 22; +pub const ENFILE: c_int = 23; +pub const EMFILE: c_int = 24; +pub const ENOTTY: c_int = 25; +pub const EFBIG: c_int = 27; +pub const ENOSPC: c_int = 28; +pub const ESPIPE: c_int = 29; +pub const EROFS: c_int = 30; +pub const EMLINK: c_int = 31; +pub const EPIPE: c_int = 32; +pub const EDOM: c_int = 33; +pub const ERANGE: c_int = 34; +pub const EDEADLK: c_int = 36; +pub const EDEADLOCK: c_int = 36; +pub const ENAMETOOLONG: c_int = 38; +pub const ENOLCK: c_int = 39; +pub const ENOSYS: c_int = 40; +pub const ENOTEMPTY: c_int = 41; +pub const EILSEQ: c_int = 42; +pub const STRUNCATE: c_int = 80; // POSIX Supplement (from errno.h) -pub const EADDRINUSE: ::c_int = 100; -pub const EADDRNOTAVAIL: ::c_int = 101; -pub const EAFNOSUPPORT: ::c_int = 102; -pub const EALREADY: ::c_int = 103; -pub const EBADMSG: ::c_int = 104; -pub const ECANCELED: ::c_int = 105; -pub const ECONNABORTED: ::c_int = 106; -pub const ECONNREFUSED: ::c_int = 107; -pub const ECONNRESET: ::c_int = 108; -pub const EDESTADDRREQ: ::c_int = 109; -pub const EHOSTUNREACH: ::c_int = 110; -pub const EIDRM: ::c_int = 111; -pub const EINPROGRESS: ::c_int = 112; -pub const EISCONN: ::c_int = 113; -pub const ELOOP: ::c_int = 114; -pub const EMSGSIZE: ::c_int = 115; -pub const ENETDOWN: ::c_int = 116; -pub const ENETRESET: ::c_int = 117; -pub const ENETUNREACH: ::c_int = 118; -pub const ENOBUFS: ::c_int = 119; -pub const ENODATA: ::c_int = 120; -pub const ENOLINK: ::c_int = 121; -pub const ENOMSG: ::c_int = 122; -pub const ENOPROTOOPT: ::c_int = 123; -pub const ENOSR: ::c_int = 124; -pub const ENOSTR: ::c_int = 125; -pub const ENOTCONN: ::c_int = 126; -pub const ENOTRECOVERABLE: ::c_int = 127; -pub const ENOTSOCK: ::c_int = 128; -pub const ENOTSUP: ::c_int = 129; -pub const EOPNOTSUPP: ::c_int = 130; -pub const EOVERFLOW: ::c_int = 132; -pub const EOWNERDEAD: ::c_int = 133; -pub const EPROTO: ::c_int = 134; -pub const EPROTONOSUPPORT: ::c_int = 135; -pub const EPROTOTYPE: ::c_int = 136; -pub const ETIME: ::c_int = 137; -pub const ETIMEDOUT: ::c_int = 138; -pub const ETXTBSY: ::c_int = 139; -pub const EWOULDBLOCK: ::c_int = 140; +pub const EADDRINUSE: c_int = 100; +pub const EADDRNOTAVAIL: c_int = 101; +pub const EAFNOSUPPORT: c_int = 102; +pub const EALREADY: c_int = 103; +pub const EBADMSG: c_int = 104; +pub const ECANCELED: c_int = 105; +pub const ECONNABORTED: c_int = 106; +pub const ECONNREFUSED: c_int = 107; +pub const ECONNRESET: c_int = 108; +pub const EDESTADDRREQ: c_int = 109; +pub const EHOSTUNREACH: c_int = 110; +pub const EIDRM: c_int = 111; +pub const EINPROGRESS: c_int = 112; +pub const EISCONN: c_int = 113; +pub const ELOOP: c_int = 114; +pub const EMSGSIZE: c_int = 115; +pub const ENETDOWN: c_int = 116; +pub const ENETRESET: c_int = 117; +pub const ENETUNREACH: c_int = 118; +pub const ENOBUFS: c_int = 119; +pub const ENODATA: c_int = 120; +pub const ENOLINK: c_int = 121; +pub const ENOMSG: c_int = 122; +pub const ENOPROTOOPT: c_int = 123; +pub const ENOSR: c_int = 124; +pub const ENOSTR: c_int = 125; +pub const ENOTCONN: c_int = 126; +pub const ENOTRECOVERABLE: c_int = 127; +pub const ENOTSOCK: c_int = 128; +pub const ENOTSUP: c_int = 129; +pub const EOPNOTSUPP: c_int = 130; +pub const EOVERFLOW: c_int = 132; +pub const EOWNERDEAD: c_int = 133; +pub const EPROTO: c_int = 134; +pub const EPROTONOSUPPORT: c_int = 135; +pub const EPROTOTYPE: c_int = 136; +pub const ETIME: c_int = 137; +pub const ETIMEDOUT: c_int = 138; +pub const ETXTBSY: c_int = 139; +pub const EWOULDBLOCK: c_int = 140; // signal codes -pub const SIGINT: ::c_int = 2; -pub const SIGILL: ::c_int = 4; -pub const SIGFPE: ::c_int = 8; -pub const SIGSEGV: ::c_int = 11; -pub const SIGTERM: ::c_int = 15; -pub const SIGABRT: ::c_int = 22; -pub const NSIG: ::c_int = 23; - -pub const SIG_ERR: ::c_int = -1; -pub const SIG_DFL: ::sighandler_t = 0; -pub const SIG_IGN: ::sighandler_t = 1; -pub const SIG_GET: ::sighandler_t = 2; -pub const SIG_SGE: ::sighandler_t = 3; -pub const SIG_ACK: ::sighandler_t = 4; +pub const SIGINT: c_int = 2; +pub const SIGILL: c_int = 4; +pub const SIGFPE: c_int = 8; +pub const SIGSEGV: c_int = 11; +pub const SIGTERM: c_int = 15; +pub const SIGABRT: c_int = 22; +pub const NSIG: c_int = 23; + +pub const SIG_ERR: c_int = -1; +pub const SIG_DFL: crate::sighandler_t = 0; +pub const SIG_IGN: crate::sighandler_t = 1; +pub const SIG_GET: crate::sighandler_t = 2; +pub const SIG_SGE: crate::sighandler_t = 3; +pub const SIG_ACK: crate::sighandler_t = 4; #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum FILE {} -impl ::Copy for FILE {} -impl ::Clone for FILE { +impl Copy for FILE {} +impl Clone for FILE { fn clone(&self) -> FILE { *self } } #[cfg_attr(feature = "extra_traits", derive(Debug))] pub enum fpos_t {} // FIXME: fill this out with a struct -impl ::Copy for fpos_t {} -impl ::Clone for fpos_t { +impl Copy for fpos_t {} +impl Clone for fpos_t { fn clone(&self) -> fpos_t { *self } @@ -281,8 +281,8 @@ cfg_if! { link(name = "legacy_stdio_definitions") )] extern "C" { - pub fn printf(format: *const c_char, ...) -> ::c_int; - pub fn fprintf(stream: *mut FILE, format: *const c_char, ...) -> ::c_int; + pub fn printf(format: *const c_char, ...) -> c_int; + pub fn fprintf(stream: *mut FILE, format: *const c_char, ...) -> c_int; } } } @@ -371,7 +371,7 @@ extern "C" { pub fn strtok(s: *mut c_char, t: *const c_char) -> *mut c_char; pub fn strxfrm(s: *mut c_char, ct: *const c_char, n: size_t) -> size_t; pub fn wcslen(buf: *const wchar_t) -> size_t; - pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> ::size_t; + pub fn wcstombs(dest: *mut c_char, src: *const wchar_t, n: size_t) -> size_t; pub fn memchr(cx: *const c_void, c: c_int, n: size_t) -> *mut c_void; pub fn memcmp(cx: *const c_void, ct: *const c_void, n: size_t) -> c_int; @@ -388,51 +388,51 @@ extern "C" { pub fn raise(signum: c_int) -> c_int; #[link_name = "_gmtime64_s"] - pub fn gmtime_s(destTime: *mut tm, srcTime: *const time_t) -> ::c_int; + pub fn gmtime_s(destTime: *mut tm, srcTime: *const time_t) -> c_int; #[link_name = "_localtime64_s"] - pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> ::errno_t; + pub fn localtime_s(tmDest: *mut tm, sourceTime: *const time_t) -> crate::errno_t; #[link_name = "_time64"] pub fn time(destTime: *mut time_t) -> time_t; #[link_name = "_chmod"] - pub fn chmod(path: *const c_char, mode: ::c_int) -> ::c_int; + pub fn chmod(path: *const c_char, mode: c_int) -> c_int; #[link_name = "_wchmod"] - pub fn wchmod(path: *const wchar_t, mode: ::c_int) -> ::c_int; + pub fn wchmod(path: *const wchar_t, mode: c_int) -> c_int; #[link_name = "_mkdir"] - pub fn mkdir(path: *const c_char) -> ::c_int; + pub fn mkdir(path: *const c_char) -> c_int; #[link_name = "_wrmdir"] - pub fn wrmdir(path: *const wchar_t) -> ::c_int; + pub fn wrmdir(path: *const wchar_t) -> c_int; #[link_name = "_fstat64"] - pub fn fstat(fildes: ::c_int, buf: *mut stat) -> ::c_int; + pub fn fstat(fildes: c_int, buf: *mut stat) -> c_int; #[link_name = "_stat64"] - pub fn stat(path: *const c_char, buf: *mut stat) -> ::c_int; + pub fn stat(path: *const c_char, buf: *mut stat) -> c_int; #[link_name = "_wstat64"] - pub fn wstat(path: *const wchar_t, buf: *mut stat) -> ::c_int; + pub fn wstat(path: *const wchar_t, buf: *mut stat) -> c_int; #[link_name = "_wutime64"] - pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> ::c_int; + pub fn wutime(file: *const wchar_t, buf: *mut utimbuf) -> c_int; #[link_name = "_popen"] - pub fn popen(command: *const c_char, mode: *const c_char) -> *mut ::FILE; + pub fn popen(command: *const c_char, mode: *const c_char) -> *mut crate::FILE; #[link_name = "_pclose"] - pub fn pclose(stream: *mut ::FILE) -> ::c_int; + pub fn pclose(stream: *mut crate::FILE) -> c_int; #[link_name = "_fdopen"] - pub fn fdopen(fd: ::c_int, mode: *const c_char) -> *mut ::FILE; + pub fn fdopen(fd: c_int, mode: *const c_char) -> *mut crate::FILE; #[link_name = "_fileno"] - pub fn fileno(stream: *mut ::FILE) -> ::c_int; + pub fn fileno(stream: *mut crate::FILE) -> c_int; #[link_name = "_open"] - pub fn open(path: *const c_char, oflag: ::c_int, ...) -> ::c_int; + pub fn open(path: *const c_char, oflag: c_int, ...) -> c_int; #[link_name = "_wopen"] - pub fn wopen(path: *const wchar_t, oflag: ::c_int, ...) -> ::c_int; + pub fn wopen(path: *const wchar_t, oflag: c_int, ...) -> c_int; #[link_name = "_creat"] - pub fn creat(path: *const c_char, mode: ::c_int) -> ::c_int; + pub fn creat(path: *const c_char, mode: c_int) -> c_int; #[link_name = "_access"] - pub fn access(path: *const c_char, amode: ::c_int) -> ::c_int; + pub fn access(path: *const c_char, amode: c_int) -> c_int; #[link_name = "_chdir"] - pub fn chdir(dir: *const c_char) -> ::c_int; + pub fn chdir(dir: *const c_char) -> c_int; #[link_name = "_close"] - pub fn close(fd: ::c_int) -> ::c_int; + pub fn close(fd: c_int) -> c_int; #[link_name = "_dup"] - pub fn dup(fd: ::c_int) -> ::c_int; + pub fn dup(fd: c_int) -> c_int; #[link_name = "_dup2"] - pub fn dup2(src: ::c_int, dst: ::c_int) -> ::c_int; + pub fn dup2(src: c_int, dst: c_int) -> c_int; #[link_name = "_execl"] pub fn execl(path: *const c_char, arg0: *const c_char, ...) -> intptr_t; #[link_name = "_wexecl"] @@ -450,121 +450,123 @@ extern "C" { #[link_name = "_wexeclpe"] pub fn wexeclpe(path: *const wchar_t, arg0: *const wchar_t, ...) -> intptr_t; #[link_name = "_execv"] - pub fn execv(prog: *const c_char, argv: *const *const c_char) -> ::intptr_t; + pub fn execv(prog: *const c_char, argv: *const *const c_char) -> intptr_t; #[link_name = "_execve"] pub fn execve( prog: *const c_char, argv: *const *const c_char, envp: *const *const c_char, - ) -> ::intptr_t; + ) -> intptr_t; #[link_name = "_execvp"] - pub fn execvp(c: *const c_char, argv: *const *const c_char) -> ::intptr_t; + pub fn execvp(c: *const c_char, argv: *const *const c_char) -> intptr_t; #[link_name = "_execvpe"] pub fn execvpe( c: *const c_char, argv: *const *const c_char, envp: *const *const c_char, - ) -> ::intptr_t; + ) -> intptr_t; #[link_name = "_wexecv"] - pub fn wexecv(prog: *const wchar_t, argv: *const *const wchar_t) -> ::intptr_t; + pub fn wexecv(prog: *const wchar_t, argv: *const *const wchar_t) -> intptr_t; #[link_name = "_wexecve"] pub fn wexecve( prog: *const wchar_t, argv: *const *const wchar_t, envp: *const *const wchar_t, - ) -> ::intptr_t; + ) -> intptr_t; #[link_name = "_wexecvp"] - pub fn wexecvp(c: *const wchar_t, argv: *const *const wchar_t) -> ::intptr_t; + pub fn wexecvp(c: *const wchar_t, argv: *const *const wchar_t) -> intptr_t; #[link_name = "_wexecvpe"] pub fn wexecvpe( c: *const wchar_t, argv: *const *const wchar_t, envp: *const *const wchar_t, - ) -> ::intptr_t; + ) -> intptr_t; #[link_name = "_getcwd"] - pub fn getcwd(buf: *mut c_char, size: ::c_int) -> *mut c_char; + pub fn getcwd(buf: *mut c_char, size: c_int) -> *mut c_char; #[link_name = "_getpid"] - pub fn getpid() -> ::c_int; + pub fn getpid() -> c_int; #[link_name = "_isatty"] - pub fn isatty(fd: ::c_int) -> ::c_int; + pub fn isatty(fd: c_int) -> c_int; #[link_name = "_lseek"] - pub fn lseek(fd: ::c_int, offset: c_long, origin: ::c_int) -> c_long; + pub fn lseek(fd: c_int, offset: c_long, origin: c_int) -> c_long; #[link_name = "_lseeki64"] - pub fn lseek64(fd: ::c_int, offset: c_longlong, origin: ::c_int) -> c_longlong; + pub fn lseek64(fd: c_int, offset: c_longlong, origin: c_int) -> c_longlong; #[link_name = "_pipe"] - pub fn pipe(fds: *mut ::c_int, psize: ::c_uint, textmode: ::c_int) -> ::c_int; + pub fn pipe(fds: *mut c_int, psize: c_uint, textmode: c_int) -> c_int; #[link_name = "_read"] - pub fn read(fd: ::c_int, buf: *mut ::c_void, count: ::c_uint) -> ::c_int; + pub fn read(fd: c_int, buf: *mut c_void, count: c_uint) -> c_int; #[link_name = "_rmdir"] - pub fn rmdir(path: *const c_char) -> ::c_int; + pub fn rmdir(path: *const c_char) -> c_int; #[link_name = "_unlink"] - pub fn unlink(c: *const c_char) -> ::c_int; + pub fn unlink(c: *const c_char) -> c_int; #[link_name = "_write"] - pub fn write(fd: ::c_int, buf: *const ::c_void, count: ::c_uint) -> ::c_int; + pub fn write(fd: c_int, buf: *const c_void, count: c_uint) -> c_int; #[link_name = "_commit"] - pub fn commit(fd: ::c_int) -> ::c_int; + pub fn commit(fd: c_int) -> c_int; #[link_name = "_get_osfhandle"] - pub fn get_osfhandle(fd: ::c_int) -> ::intptr_t; + pub fn get_osfhandle(fd: c_int) -> intptr_t; #[link_name = "_open_osfhandle"] - pub fn open_osfhandle(osfhandle: ::intptr_t, flags: ::c_int) -> ::c_int; - pub fn setlocale(category: ::c_int, locale: *const c_char) -> *mut c_char; + pub fn open_osfhandle(osfhandle: intptr_t, flags: c_int) -> c_int; + pub fn setlocale(category: c_int, locale: *const c_char) -> *mut c_char; #[link_name = "_wsetlocale"] - pub fn wsetlocale(category: ::c_int, locale: *const wchar_t) -> *mut wchar_t; + pub fn wsetlocale(category: c_int, locale: *const wchar_t) -> *mut wchar_t; #[link_name = "_aligned_malloc"] pub fn aligned_malloc(size: size_t, alignment: size_t) -> *mut c_void; #[link_name = "_aligned_free"] - pub fn aligned_free(ptr: *mut ::c_void); + pub fn aligned_free(ptr: *mut c_void); #[link_name = "_aligned_realloc"] - pub fn aligned_realloc(memblock: *mut ::c_void, size: size_t, alignment: size_t) - -> *mut c_void; + pub fn aligned_realloc(memblock: *mut c_void, size: size_t, alignment: size_t) -> *mut c_void; #[link_name = "_putenv"] - pub fn putenv(envstring: *const ::c_char) -> ::c_int; + pub fn putenv(envstring: *const c_char) -> c_int; #[link_name = "_wputenv"] - pub fn wputenv(envstring: *const ::wchar_t) -> ::c_int; + pub fn wputenv(envstring: *const crate::wchar_t) -> c_int; #[link_name = "_putenv_s"] - pub fn putenv_s(envstring: *const ::c_char, value_string: *const ::c_char) -> ::errno_t; + pub fn putenv_s(envstring: *const c_char, value_string: *const c_char) -> crate::errno_t; #[link_name = "_wputenv_s"] - pub fn wputenv_s(envstring: *const ::wchar_t, value_string: *const ::wchar_t) -> ::errno_t; + pub fn wputenv_s( + envstring: *const crate::wchar_t, + value_string: *const crate::wchar_t, + ) -> crate::errno_t; } extern "system" { - pub fn listen(s: SOCKET, backlog: ::c_int) -> ::c_int; - pub fn accept(s: SOCKET, addr: *mut ::sockaddr, addrlen: *mut ::c_int) -> SOCKET; - pub fn bind(s: SOCKET, name: *const ::sockaddr, namelen: ::c_int) -> ::c_int; - pub fn connect(s: SOCKET, name: *const ::sockaddr, namelen: ::c_int) -> ::c_int; - pub fn getpeername(s: SOCKET, name: *mut ::sockaddr, nameln: *mut ::c_int) -> ::c_int; - pub fn getsockname(s: SOCKET, name: *mut ::sockaddr, nameln: *mut ::c_int) -> ::c_int; + pub fn listen(s: SOCKET, backlog: c_int) -> c_int; + pub fn accept(s: SOCKET, addr: *mut crate::sockaddr, addrlen: *mut c_int) -> SOCKET; + pub fn bind(s: SOCKET, name: *const crate::sockaddr, namelen: c_int) -> c_int; + pub fn connect(s: SOCKET, name: *const crate::sockaddr, namelen: c_int) -> c_int; + pub fn getpeername(s: SOCKET, name: *mut crate::sockaddr, nameln: *mut c_int) -> c_int; + pub fn getsockname(s: SOCKET, name: *mut crate::sockaddr, nameln: *mut c_int) -> c_int; pub fn getsockopt( s: SOCKET, - level: ::c_int, - optname: ::c_int, - optval: *mut ::c_char, - optlen: *mut ::c_int, - ) -> ::c_int; + level: c_int, + optname: c_int, + optval: *mut c_char, + optlen: *mut c_int, + ) -> c_int; pub fn recvfrom( s: SOCKET, - buf: *mut ::c_char, - len: ::c_int, - flags: ::c_int, - from: *mut ::sockaddr, - fromlen: *mut ::c_int, - ) -> ::c_int; + buf: *mut c_char, + len: c_int, + flags: c_int, + from: *mut crate::sockaddr, + fromlen: *mut c_int, + ) -> c_int; pub fn sendto( s: SOCKET, - buf: *const ::c_char, - len: ::c_int, - flags: ::c_int, - to: *const ::sockaddr, - tolen: ::c_int, - ) -> ::c_int; + buf: *const c_char, + len: c_int, + flags: c_int, + to: *const crate::sockaddr, + tolen: c_int, + ) -> c_int; pub fn setsockopt( s: SOCKET, - level: ::c_int, - optname: ::c_int, - optval: *const ::c_char, - optlen: ::c_int, - ) -> ::c_int; - pub fn socket(af: ::c_int, socket_type: ::c_int, protocol: ::c_int) -> SOCKET; + level: c_int, + optname: c_int, + optval: *const c_char, + optlen: c_int, + ) -> c_int; + pub fn socket(af: c_int, socket_type: c_int, protocol: c_int) -> SOCKET; } cfg_if! { diff --git a/src/windows/msvc/mod.rs b/src/windows/msvc/mod.rs index f5a1d95f395b3..3f9f34e7e24ff 100644 --- a/src/windows/msvc/mod.rs +++ b/src/windows/msvc/mod.rs @@ -1,20 +1,17 @@ -pub const L_tmpnam: ::c_uint = 260; -pub const TMP_MAX: ::c_uint = 0x7fff_ffff; +use crate::{c_char, c_int, c_uint, c_void, size_t}; + +pub const L_tmpnam: c_uint = 260; +pub const TMP_MAX: c_uint = 0x7fff_ffff; // POSIX Supplement (from errno.h) // This particular error code is only currently available in msvc toolchain -pub const EOTHER: ::c_int = 131; +pub const EOTHER: c_int = 131; extern "C" { #[link_name = "_stricmp"] - pub fn stricmp(s1: *const ::c_char, s2: *const ::c_char) -> ::c_int; + pub fn stricmp(s1: *const c_char, s2: *const c_char) -> c_int; #[link_name = "_strnicmp"] - pub fn strnicmp(s1: *const ::c_char, s2: *const ::c_char, n: ::size_t) -> ::c_int; + pub fn strnicmp(s1: *const c_char, s2: *const c_char, n: size_t) -> c_int; #[link_name = "_memccpy"] - pub fn memccpy( - dest: *mut ::c_void, - src: *const ::c_void, - c: ::c_int, - count: ::size_t, - ) -> *mut ::c_void; + pub fn memccpy(dest: *mut c_void, src: *const c_void, c: c_int, count: size_t) -> *mut c_void; }