@@ -6,39 +6,43 @@ pub type time_t = i32;
6
6
pub type suseconds_t = i32 ;
7
7
pub type register_t = i32 ;
8
8
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
+ }
42
46
}
43
47
}
44
48
@@ -54,7 +58,7 @@ cfg_if! {
54
58
}
55
59
56
60
cfg_if ! {
57
- if #[ cfg( feature = "extra_traits" ) ] {
61
+ if #[ cfg( all ( libc_align , feature = "extra_traits" ) ) ] {
58
62
impl PartialEq for mcontext_t {
59
63
fn eq( & self , other: & mcontext_t) -> bool {
60
64
self . mc_onstack == other. mc_onstack &&
0 commit comments