@@ -6,39 +6,43 @@ pub type time_t = i32;
66pub type suseconds_t = i32 ;
77pub type register_t = i32 ;
88
9- s_no_extra_traits ! {
10- #[ repr( align( 16 ) ) ]
11- pub struct mcontext_t {
12- pub mc_onstack: register_t,
13- pub mc_gs: register_t,
14- pub mc_fs: register_t,
15- pub mc_es: register_t,
16- pub mc_ds: register_t,
17- pub mc_edi: register_t,
18- pub mc_esi: register_t,
19- pub mc_ebp: register_t,
20- pub mc_isp: register_t,
21- pub mc_ebx: register_t,
22- pub mc_edx: register_t,
23- pub mc_ecx: register_t,
24- pub mc_eax: register_t,
25- pub mc_trapno: register_t,
26- pub mc_err: register_t,
27- pub mc_eip: register_t,
28- pub mc_cs: register_t,
29- pub mc_eflags: register_t,
30- pub mc_esp: register_t,
31- pub mc_ss: register_t,
32- pub mc_len: :: c_int,
33- pub mc_fpformat: :: c_int,
34- pub mc_ownedfp: :: c_int,
35- pub mc_flags: register_t,
36- pub mc_fpstate: [ :: c_int; 128 ] ,
37- pub mc_fsbase: register_t,
38- pub mc_gsbase: register_t,
39- pub mc_xfpustate: register_t,
40- pub mc_xfpustate_len: register_t,
41- pub mc_spare2: [ :: c_int; 4 ] ,
9+ cfg_if ! {
10+ if #[ cfg( libc_align) ] {
11+ s_no_extra_traits! {
12+ #[ repr( align( 16 ) ) ]
13+ pub struct mcontext_t {
14+ pub mc_onstack: register_t,
15+ pub mc_gs: register_t,
16+ pub mc_fs: register_t,
17+ pub mc_es: register_t,
18+ pub mc_ds: register_t,
19+ pub mc_edi: register_t,
20+ pub mc_esi: register_t,
21+ pub mc_ebp: register_t,
22+ pub mc_isp: register_t,
23+ pub mc_ebx: register_t,
24+ pub mc_edx: register_t,
25+ pub mc_ecx: register_t,
26+ pub mc_eax: register_t,
27+ pub mc_trapno: register_t,
28+ pub mc_err: register_t,
29+ pub mc_eip: register_t,
30+ pub mc_cs: register_t,
31+ pub mc_eflags: register_t,
32+ pub mc_esp: register_t,
33+ pub mc_ss: register_t,
34+ pub mc_len: :: c_int,
35+ pub mc_fpformat: :: c_int,
36+ pub mc_ownedfp: :: c_int,
37+ pub mc_flags: register_t,
38+ pub mc_fpstate: [ :: c_int; 128 ] ,
39+ pub mc_fsbase: register_t,
40+ pub mc_gsbase: register_t,
41+ pub mc_xfpustate: register_t,
42+ pub mc_xfpustate_len: register_t,
43+ pub mc_spare2: [ :: c_int; 4 ] ,
44+ }
45+ }
4246 }
4347}
4448
@@ -54,7 +58,7 @@ cfg_if! {
5458}
5559
5660cfg_if ! {
57- if #[ cfg( feature = "extra_traits" ) ] {
61+ if #[ cfg( all ( libc_align , feature = "extra_traits" ) ) ] {
5862 impl PartialEq for mcontext_t {
5963 fn eq( & self , other: & mcontext_t) -> bool {
6064 self . mc_onstack == other. mc_onstack &&
0 commit comments