11pub type c_char = u8 ;
22pub type c_long = i32 ;
33pub type c_ulong = u32 ;
4+ pub type clock_t = u32 ;
45pub type wchar_t = i32 ;
56pub type time_t = i64 ;
67pub type suseconds_t = i32 ;
78pub type register_t = i32 ;
89
10+ cfg_if ! {
11+ if #[ cfg( libc_align) ] {
12+ s_no_extra_traits! {
13+ #[ repr( align( 16 ) ) ]
14+ pub struct mcontext_t {
15+ pub mc_vers: :: c_int,
16+ pub mc_flags: :: c_int,
17+ pub mc_onstack: :: c_int,
18+ pub mc_len: :: c_int,
19+ pub mc_avec: [ u64 ; 64 ] ,
20+ pub mc_av: [ u32 ; 2 ] ,
21+ pub mc_frame: [ :: register_t; 42 ] ,
22+ pub mc_fpreg: [ u64 ; 33 ] ,
23+ pub mc_vsxfpreg: [ u64 ; 32 ] ,
24+ }
25+ }
26+ }
27+ }
28+
29+ cfg_if ! {
30+ if #[ cfg( all( libc_align, feature = "extra_traits" ) ) ] {
31+ impl PartialEq for mcontext_t {
32+ fn eq( & self , other: & mcontext_t) -> bool {
33+ self . mc_vers == other. mc_vers &&
34+ self . mc_flags == other. mc_flags &&
35+ self . mc_onstack == other. mc_onstack &&
36+ self . mc_len == other. mc_len &&
37+ self . mc_avec == other. mc_avec &&
38+ self . mc_av == other. mc_av &&
39+ self . mc_frame == other. mc_frame &&
40+ self . mc_fpreg == other. mc_fpreg &&
41+ self . mc_vsxfpreg == other. mc_vsxfpreg
42+ }
43+ }
44+ impl Eq for mcontext_t { }
45+ impl :: fmt:: Debug for mcontext_t {
46+ fn fmt( & self , f: & mut :: fmt:: Formatter ) -> :: fmt:: Result {
47+ f. debug_struct( "mcontext_t" )
48+ . field( "mc_vers" , & self . mc_vers)
49+ . field( "mc_flags" , & self . mc_flags)
50+ . field( "mc_onstack" , & self . mc_onstack)
51+ . field( "mc_len" , & self . mc_len)
52+ . field( "mc_avec" , & self . mc_avec)
53+ . field( "mc_av" , & self . mc_av)
54+ . field( "mc_frame" , & self . mc_frame)
55+ . field( "mc_fpreg" , & self . mc_fpreg)
56+ . field( "mc_vsxfpreg" , & self . mc_vsxfpreg)
57+ . finish( )
58+ }
59+ }
60+ impl :: hash:: Hash for mcontext_t {
61+ fn hash<H : :: hash:: Hasher >( & self , state: & mut H ) {
62+ self . mc_vers. hash( state) ;
63+ self . mc_flags. hash( state) ;
64+ self . mc_onstack. hash( state) ;
65+ self . mc_len. hash( state) ;
66+ self . mc_avec. hash( state) ;
67+ self . mc_av. hash( state) ;
68+ self . mc_frame. hash( state) ;
69+ self . mc_fpreg. hash( state) ;
70+ self . mc_vsxfpreg. hash( state) ;
71+ }
72+ }
73+ }
74+ }
75+
976// should be pub(crate), but that requires Rust 1.18.0
1077cfg_if ! {
1178 if #[ cfg( libc_const_size_of) ] {
@@ -17,5 +84,8 @@ cfg_if! {
1784 }
1885}
1986
87+ pub const BIOCSRTIMEOUT : :: c_ulong = 0x8010426d ;
88+ pub const BIOCGRTIMEOUT : :: c_ulong = 0x4010426e ;
2089pub const MAP_32BIT : :: c_int = 0x00080000 ;
2190pub const MINSIGSTKSZ : :: size_t = 2048 ; // 512 * 4
91+ pub const TIOCTIMESTAMP : :: c_ulong = 0x40107459 ;
0 commit comments