1 pub type c_long = i64; 2 pub type c_ulong = u64; 3 pub type c_char = u8; 4 pub type ucontext_t = sigcontext; 5 6 s! { 7 pub struct sigcontext { 8 __sc_unused: ::c_int, 9 pub sc_mask: ::c_int, 10 pub sc_ra: ::c_long, 11 pub sc_sp: ::c_long, 12 pub sc_gp: ::c_long, 13 pub sc_tp: ::c_long, 14 pub sc_t: [::c_long; 7], 15 pub sc_s: [::c_long; 12], 16 pub sc_a: [::c_long; 8], 17 pub sc_sepc: ::c_long, 18 pub sc_f: [::c_long; 32], 19 pub sc_fcsr: ::c_long, 20 pub sc_cookie: ::c_long, 21 } 22 } 23 24 // should be pub(crate), but that requires Rust 1.18.0 25 cfg_if! { 26 if #[cfg(libc_const_size_of)] { 27 #[doc(hidden)] 28 pub const _ALIGNBYTES: usize = ::mem::size_of::<::c_long>() - 1; 29 } else { 30 #[doc(hidden)] 31 pub const _ALIGNBYTES: usize = 8 - 1; 32 } 33 } 34 35 pub const _MAX_PAGE_SHIFT: u32 = 12; 36