File tree Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Expand file tree Collapse file tree 2 files changed +25
-11
lines changed Original file line number Diff line number Diff line change @@ -36,16 +36,33 @@ macro_rules! __cfg_if_apply {
36
36
37
37
macro_rules! s {
38
38
( $( $( #[ $attr: meta] ) * pub $t: ident $i: ident { $( $field: tt) * } ) * ) => ( $(
39
+ s!( it: $( #[ $attr] ) * pub $t $i { $( $field) * } ) ;
40
+ ) * ) ;
41
+ ( it: $( #[ $attr: meta] ) * pub struct $i: ident { $( $field: tt) * } ) => (
39
42
__item! {
40
43
#[ repr( C ) ]
41
44
$( #[ $attr] ) *
42
- pub $t $i { $( $field) * }
45
+ pub struct $i { $( $field) * }
43
46
}
44
47
impl :: dox:: Copy for $i { }
45
48
impl :: dox:: Clone for $i {
46
49
fn clone( & self ) -> $i { * self }
47
50
}
48
- ) * )
51
+ ) ;
52
+ ( it: $( #[ $attr: meta] ) * pub union $i: ident { $( $field: tt) * } ) => (
53
+ __item! {
54
+ #[ cfg( libc_union) ]
55
+ #[ repr( C ) ]
56
+ $( #[ $attr] ) *
57
+ pub struct $i { $( $field) * }
58
+ }
59
+ #[ cfg( libc_union) ]
60
+ impl :: dox:: Copy for $i { }
61
+ #[ cfg( libc_union) ]
62
+ impl :: dox:: Clone for $i {
63
+ fn clone( & self ) -> $i { * self }
64
+ }
65
+ ) ;
49
66
}
50
67
51
68
#[ allow( unused_macros) ]
Original file line number Diff line number Diff line change @@ -557,6 +557,12 @@ s! {
557
557
pub sem_pad3: [ :: int32_t; 4 ] ,
558
558
}
559
559
560
+ pub union semun {
561
+ pub val: :: c_int,
562
+ pub buf: * mut semid_ds,
563
+ pub array: * mut :: c_ushort,
564
+ }
565
+
560
566
// sys/shm.h
561
567
562
568
#[ cfg_attr( feature = "rustc-dep-of-std" , repr( packed( 4 ) ) ) ]
@@ -583,15 +589,6 @@ s! {
583
589
}
584
590
}
585
591
586
- #[ cfg( libc_union) ]
587
- s ! {
588
- pub union semun {
589
- pub val: :: c_int,
590
- pub buf: * mut semid_ds,
591
- pub array: * mut :: c_ushort,
592
- }
593
- }
594
-
595
592
pub const _UTX_USERSIZE: usize = 256 ;
596
593
pub const _UTX_LINESIZE: usize = 32 ;
597
594
pub const _UTX_IDSIZE: usize = 4 ;
You can’t perform that action at this time.
0 commit comments