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 {
3636
3737macro_rules! s {
3838 ( $( $( #[ $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) * } ) => (
3942 __item! {
4043 #[ repr( C ) ]
4144 $( #[ $attr] ) *
42- pub $t $i { $( $field) * }
45+ pub struct $i { $( $field) * }
4346 }
4447 impl :: dox:: Copy for $i { }
4548 impl :: dox:: Clone for $i {
4649 fn clone( & self ) -> $i { * self }
4750 }
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+ ) ;
4966}
5067
5168#[ allow( unused_macros) ]
Original file line number Diff line number Diff line change @@ -557,6 +557,12 @@ s! {
557557 pub sem_pad3: [ :: int32_t; 4 ] ,
558558 }
559559
560+ pub union semun {
561+ pub val: :: c_int,
562+ pub buf: * mut semid_ds,
563+ pub array: * mut :: c_ushort,
564+ }
565+
560566 // sys/shm.h
561567
562568 #[ cfg_attr( feature = "rustc-dep-of-std" , repr( packed( 4 ) ) ) ]
@@ -583,15 +589,6 @@ s! {
583589 }
584590}
585591
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-
595592pub const _UTX_USERSIZE: usize = 256 ;
596593pub const _UTX_LINESIZE: usize = 32 ;
597594pub const _UTX_IDSIZE: usize = 4 ;
You can’t perform that action at this time.
0 commit comments