aboutsummaryrefslogtreecommitdiff
path: root/vendor/libc/src/unix/bsd/apple/b64
diff options
context:
space:
mode:
Diffstat (limited to 'vendor/libc/src/unix/bsd/apple/b64')
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/aarch64/align.rs55
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs14
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/align.rs7
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/mod.rs124
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/x86_64/align.rs7
-rw-r--r--vendor/libc/src/unix/bsd/apple/b64/x86_64/mod.rs180
6 files changed, 387 insertions, 0 deletions
diff --git a/vendor/libc/src/unix/bsd/apple/b64/aarch64/align.rs b/vendor/libc/src/unix/bsd/apple/b64/aarch64/align.rs
new file mode 100644
index 0000000..131e15b
--- /dev/null
+++ b/vendor/libc/src/unix/bsd/apple/b64/aarch64/align.rs
@@ -0,0 +1,55 @@
+pub type mcontext_t = *mut __darwin_mcontext64;
+
+s_no_extra_traits! {
+ #[allow(missing_debug_implementations)]
+ pub struct max_align_t {
+ priv_: f64
+ }
+}
+
+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_mcsize: usize,
+ pub uc_mcontext: mcontext_t,
+ }
+
+ pub struct __darwin_mcontext64 {
+ pub __es: __darwin_arm_exception_state64,
+ pub __ss: __darwin_arm_thread_state64,
+ pub __ns: __darwin_arm_neon_state64,
+ }
+
+ pub struct __darwin_arm_exception_state64 {
+ pub __far: u64,
+ pub __esr: u32,
+ pub __exception: u32,
+ }
+
+ pub struct __darwin_arm_thread_state64 {
+ pub __x: [u64; 29],
+ pub __fp: u64,
+ pub __lr: u64,
+ pub __sp: u64,
+ pub __pc: u64,
+ pub __cpsr: u32,
+ pub __pad: u32,
+ }
+
+ // This type natively uses a uint128, but for a while we hacked
+ // it in with repr(align) and `[u64; 2]`. uint128 isn't available
+ // all the way back to our earliest supported versions so we
+ // preserver the old shim.
+ #[cfg_attr(not(libc_int128), repr(align(16)))]
+ pub struct __darwin_arm_neon_state64 {
+ #[cfg(libc_int128)]
+ pub __v: [::__uint128_t; 32],
+ #[cfg(not(libc_int128))]
+ pub __v: [[u64; 2]; 32],
+ pub __fpsr: u32,
+ pub __fpcr: u32,
+ }
+}
diff --git a/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs b/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
new file mode 100644
index 0000000..79e9ac8
--- /dev/null
+++ b/vendor/libc/src/unix/bsd/apple/b64/aarch64/mod.rs
@@ -0,0 +1,14 @@
+pub type boolean_t = ::c_int;
+
+s! {
+ pub struct malloc_zone_t {
+ __private: [::uintptr_t; 18], // FIXME: needs arm64 auth pointers support
+ }
+}
+
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ }
+}
diff --git a/vendor/libc/src/unix/bsd/apple/b64/align.rs b/vendor/libc/src/unix/bsd/apple/b64/align.rs
new file mode 100644
index 0000000..ca1fe1c
--- /dev/null
+++ b/vendor/libc/src/unix/bsd/apple/b64/align.rs
@@ -0,0 +1,7 @@
+s_no_extra_traits! {
+ #[allow(missing_debug_implementations)]
+ #[repr(align(16))]
+ pub struct max_align_t {
+ priv_: [f64; 2]
+ }
+}
diff --git a/vendor/libc/src/unix/bsd/apple/b64/mod.rs b/vendor/libc/src/unix/bsd/apple/b64/mod.rs
new file mode 100644
index 0000000..48d94bc
--- /dev/null
+++ b/vendor/libc/src/unix/bsd/apple/b64/mod.rs
@@ -0,0 +1,124 @@
+//! 64-bit specific Apple (ios/darwin) definitions
+
+pub type c_long = i64;
+pub type c_ulong = u64;
+
+s! {
+ pub struct timeval32 {
+ pub tv_sec: i32,
+ pub tv_usec: i32,
+ }
+
+ 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_mtu: u32,
+ pub ifi_metric: u32,
+ pub ifi_baudrate: u32,
+ pub ifi_ipackets: u32,
+ pub ifi_ierrors: u32,
+ pub ifi_opackets: u32,
+ pub ifi_oerrors: u32,
+ pub ifi_collisions: u32,
+ pub ifi_ibytes: u32,
+ pub ifi_obytes: u32,
+ pub ifi_imcasts: u32,
+ pub ifi_omcasts: u32,
+ pub ifi_iqdrops: u32,
+ pub ifi_noproto: u32,
+ pub ifi_recvtiming: u32,
+ pub ifi_xmittiming: u32,
+ pub ifi_lastchange: timeval32,
+ pub ifi_unused2: u32,
+ pub ifi_hwassist: u32,
+ pub ifi_reserved1: u32,
+ pub ifi_reserved2: u32,
+ }
+
+ pub struct bpf_hdr {
+ pub bh_tstamp: ::timeval32,
+ pub bh_caplen: u32,
+ pub bh_datalen: u32,
+ pub bh_hdrlen: ::c_ushort,
+ }
+}
+
+s_no_extra_traits! {
+ pub struct pthread_attr_t {
+ __sig: c_long,
+ __opaque: [::c_char; 56]
+ }
+}
+
+cfg_if! {
+ if #[cfg(feature = "extra_traits")] {
+ impl PartialEq for pthread_attr_t {
+ fn eq(&self, other: &pthread_attr_t) -> bool {
+ self.__sig == other.__sig
+ && self.__opaque
+ .iter()
+ .zip(other.__opaque.iter())
+ .all(|(a,b)| a == b)
+ }
+ }
+ impl Eq for pthread_attr_t {}
+ impl ::fmt::Debug for pthread_attr_t {
+ fn fmt(&self, f: &mut ::fmt::Formatter) -> ::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<H: ::hash::Hasher>(&self, state: &mut H) {
+ self.__sig.hash(state);
+ self.__opaque.hash(state);
+ }
+ }
+ }
+}
+
+#[doc(hidden)]
+#[deprecated(since = "0.2.55")]
+pub const NET_RT_MAXID: ::c_int = 11;
+
+pub const __PTHREAD_MUTEX_SIZE__: usize = 56;
+pub const __PTHREAD_COND_SIZE__: usize = 40;
+pub const __PTHREAD_CONDATTR_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 BIOCSETF: ::c_ulong = 0x80104267;
+pub const BIOCSRTIMEOUT: ::c_ulong = 0x8010426d;
+pub const BIOCGRTIMEOUT: ::c_ulong = 0x4010426e;
+pub const BIOCSETFNR: ::c_ulong = 0x8010427e;
+
+extern "C" {
+ pub fn exchangedata(
+ path1: *const ::c_char,
+ path2: *const ::c_char,
+ options: ::c_uint,
+ ) -> ::c_int;
+}
+
+cfg_if! {
+ if #[cfg(target_arch = "x86_64")] {
+ mod x86_64;
+ pub use self::x86_64::*;
+ } else if #[cfg(target_arch = "aarch64")] {
+ mod aarch64;
+ pub use self::aarch64::*;
+ } else {
+ // Unknown target_arch
+ }
+}
diff --git a/vendor/libc/src/unix/bsd/apple/b64/x86_64/align.rs b/vendor/libc/src/unix/bsd/apple/b64/x86_64/align.rs
new file mode 100644
index 0000000..ca1fe1c
--- /dev/null
+++ b/vendor/libc/src/unix/bsd/apple/b64/x86_64/align.rs
@@ -0,0 +1,7 @@
+s_no_extra_traits! {
+ #[allow(missing_debug_implementations)]
+ #[repr(align(16))]
+ pub struct max_align_t {
+ priv_: [f64; 2]
+ }
+}
diff --git a/vendor/libc/src/unix/bsd/apple/b64/x86_64/mod.rs b/vendor/libc/src/unix/bsd/apple/b64/x86_64/mod.rs
new file mode 100644
index 0000000..653650c
--- /dev/null
+++ b/vendor/libc/src/unix/bsd/apple/b64/x86_64/mod.rs
@@ -0,0 +1,180 @@
+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_mcsize: usize,
+ pub uc_mcontext: mcontext_t,
+ }
+
+ pub struct __darwin_mcontext64 {
+ pub __es: __darwin_x86_exception_state64,
+ pub __ss: __darwin_x86_thread_state64,
+ pub __fs: __darwin_x86_float_state64,
+ }
+
+ pub struct __darwin_x86_exception_state64 {
+ pub __trapno: u16,
+ pub __cpu: u16,
+ pub __err: u32,
+ pub __faultvaddr: u64,
+ }
+
+ pub struct __darwin_x86_thread_state64 {
+ pub __rax: u64,
+ pub __rbx: u64,
+ pub __rcx: u64,
+ pub __rdx: u64,
+ pub __rdi: u64,
+ pub __rsi: u64,
+ pub __rbp: u64,
+ pub __rsp: u64,
+ pub __r8: u64,
+ pub __r9: u64,
+ pub __r10: u64,
+ pub __r11: u64,
+ pub __r12: u64,
+ pub __r13: u64,
+ pub __r14: u64,
+ pub __r15: u64,
+ pub __rip: u64,
+ pub __rflags: u64,
+ pub __cs: u64,
+ pub __fs: u64,
+ pub __gs: u64,
+ }
+
+ pub struct __darwin_x86_float_state64 {
+ 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,
+ pub __fpu_ip: u32,
+ pub __fpu_cs: u16,
+ pub __fpu_rsrv2: u16,
+ pub __fpu_dp: u32,
+ pub __fpu_ds: u16,
+ pub __fpu_rsrv3: u16,
+ pub __fpu_mxcsr: u32,
+ pub __fpu_mxcsrmask: u32,
+ pub __fpu_stmm0: __darwin_mmst_reg,
+ pub __fpu_stmm1: __darwin_mmst_reg,
+ pub __fpu_stmm2: __darwin_mmst_reg,
+ pub __fpu_stmm3: __darwin_mmst_reg,
+ pub __fpu_stmm4: __darwin_mmst_reg,
+ pub __fpu_stmm5: __darwin_mmst_reg,
+ pub __fpu_stmm6: __darwin_mmst_reg,
+ pub __fpu_stmm7: __darwin_mmst_reg,
+ pub __fpu_xmm0: __darwin_xmm_reg,
+ pub __fpu_xmm1: __darwin_xmm_reg,
+ pub __fpu_xmm2: __darwin_xmm_reg,
+ pub __fpu_xmm3: __darwin_xmm_reg,
+ pub __fpu_xmm4: __darwin_xmm_reg,
+ pub __fpu_xmm5: __darwin_xmm_reg,
+ pub __fpu_xmm6: __darwin_xmm_reg,
+ pub __fpu_xmm7: __darwin_xmm_reg,
+ pub __fpu_xmm8: __darwin_xmm_reg,
+ pub __fpu_xmm9: __darwin_xmm_reg,
+ pub __fpu_xmm10: __darwin_xmm_reg,
+ pub __fpu_xmm11: __darwin_xmm_reg,
+ pub __fpu_xmm12: __darwin_xmm_reg,
+ pub __fpu_xmm13: __darwin_xmm_reg,
+ pub __fpu_xmm14: __darwin_xmm_reg,
+ pub __fpu_xmm15: __darwin_xmm_reg,
+ // this field is actually [u8; 96], but defining it with a bigger type
+ // 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 struct __darwin_mmst_reg {
+ pub __mmst_reg: [::c_char; 10],
+ pub __mmst_rsrv: [::c_char; 6],
+ }
+
+ pub struct __darwin_xmm_reg {
+ pub __xmm_reg: [::c_char; 16],
+ }
+
+ pub struct malloc_introspection_t {
+ _private: [::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<unsafe extern "C" fn(
+ zone: *mut malloc_zone_t,
+ 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<unsafe extern "C" fn(
+ zone: *mut malloc_zone_t,
+ ptr: *mut ::c_void
+ )>,
+ pub realloc: ::Option<unsafe extern "C" fn(
+ zone: *mut malloc_zone_t,
+ ptr: *mut ::c_void,
+ size: ::size_t,
+ ) -> *mut ::c_void>,
+ pub destroy: ::Option<unsafe extern "C" fn(zone: *mut malloc_zone_t)>,
+ 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>,
+ 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,
+ )>,
+ pub introspect: *mut malloc_introspection_t,
+ 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
+ )>,
+ pub pressure_relief: ::Option<unsafe extern "C" fn(
+ zone: *mut malloc_zone_t,
+ goal: ::size_t,
+ ) -> ::size_t>,
+ pub claimed_address: ::Option<unsafe extern "C" fn(
+ zone: *mut malloc_zone_t,
+ ptr: *mut ::c_void,
+ ) -> ::boolean_t>,
+ }
+}
+
+cfg_if! {
+ if #[cfg(libc_align)] {
+ mod align;
+ pub use self::align::*;
+ }
+}