@@ -41,22 +41,6 @@ pub type Elf64_Section = u16;
41
41
pub enum fpos64_t { } // TODO: fill this out with a struct
42
42
43
43
s ! {
44
- pub struct dirent {
45
- pub d_ino: :: ino_t,
46
- pub d_off: :: off_t,
47
- pub d_reclen: :: c_ushort,
48
- pub d_type: :: c_uchar,
49
- pub d_name: [ :: c_char; 256 ] ,
50
- }
51
-
52
- pub struct dirent64 {
53
- pub d_ino: :: ino64_t,
54
- pub d_off: :: off64_t,
55
- pub d_reclen: :: c_ushort,
56
- pub d_type: :: c_uchar,
57
- pub d_name: [ :: c_char; 256 ] ,
58
- }
59
-
60
44
pub struct rlimit64 {
61
45
pub rlim_cur: rlim64_t,
62
46
pub rlim_max: rlim64_t,
75
59
__unused5: * mut :: c_void,
76
60
}
77
61
78
- #[ cfg_attr( all( feature = "align" ,
79
- target_pointer_width = "32" ,
80
- any( target_arch = "mips" ,
81
- target_arch = "arm" ,
82
- target_arch = "powerpc" ,
83
- target_arch = "x86_64" ,
84
- target_arch = "x86" ) ) ,
85
- repr( align( 4 ) ) ) ]
86
- #[ cfg_attr( all( feature = "align" ,
87
- any( target_pointer_width = "64" ,
88
- not( any( target_arch = "mips" ,
89
- target_arch = "arm" ,
90
- target_arch = "powerpc" ,
91
- target_arch = "x86_64" ,
92
- target_arch = "x86" ) ) ) ) ,
93
- repr( align( 8 ) ) ) ]
94
- pub struct pthread_mutex_t {
95
- #[ cfg( all( not( feature = "align" ) ,
96
- any( target_arch = "mips" ,
97
- target_arch = "arm" ,
98
- target_arch = "powerpc" ,
99
- all( target_arch = "x86_64" ,
100
- target_pointer_width = "32" ) ) ) ) ]
101
- __align: [ :: c_long; 0 ] ,
102
- #[ cfg( not( any( feature = "align" ,
103
- target_arch = "mips" ,
104
- target_arch = "arm" ,
105
- target_arch = "powerpc" ,
106
- all( target_arch = "x86_64" ,
107
- target_pointer_width = "32" ) ) ) ) ]
108
- __align: [ :: c_longlong; 0 ] ,
109
- size: [ u8 ; __SIZEOF_PTHREAD_MUTEX_T] ,
110
- }
111
-
112
- #[ cfg_attr( all( feature = "align" ,
113
- target_pointer_width = "32" ,
114
- any( target_arch = "mips" ,
115
- target_arch = "arm" ,
116
- target_arch = "powerpc" ,
117
- target_arch = "x86_64" ,
118
- target_arch = "x86" ) ) ,
119
- repr( align( 4 ) ) ) ]
120
- #[ cfg_attr( all( feature = "align" ,
121
- any( target_pointer_width = "64" ,
122
- not( any( target_arch = "mips" ,
123
- target_arch = "arm" ,
124
- target_arch = "powerpc" ,
125
- target_arch = "x86_64" ,
126
- target_arch = "x86" ) ) ) ) ,
127
- repr( align( 8 ) ) ) ]
128
- pub struct pthread_rwlock_t {
129
- #[ cfg( all( not( feature = "align" ) ,
130
- any( target_arch = "mips" ,
131
- target_arch = "arm" ,
132
- target_arch = "powerpc" ,
133
- all( target_arch = "x86_64" ,
134
- target_pointer_width = "32" ) ) ) ) ]
135
- __align: [ :: c_long; 0 ] ,
136
- #[ cfg( not( any( feature = "align" ,
137
- target_arch = "mips" ,
138
- target_arch = "arm" ,
139
- target_arch = "powerpc" ,
140
- all( target_arch = "x86_64" ,
141
- target_pointer_width = "32" ) ) ) ) ]
142
- __align: [ :: c_longlong; 0 ] ,
143
- size: [ u8 ; __SIZEOF_PTHREAD_RWLOCK_T] ,
144
- }
145
-
146
62
#[ cfg_attr( all( feature = "align" ,
147
63
any( target_pointer_width = "32" ,
148
64
target_arch = "x86_64" , target_arch = "powerpc64" ,
@@ -188,30 +104,6 @@ s! {
188
104
size: [ u8 ; __SIZEOF_PTHREAD_RWLOCKATTR_T] ,
189
105
}
190
106
191
- #[ cfg_attr( all( feature = "align" ,
192
- target_env = "musl" ,
193
- target_pointer_width = "32" ) ,
194
- repr( align( 4 ) ) ) ]
195
- #[ cfg_attr( all( feature = "align" ,
196
- target_env = "musl" ,
197
- target_pointer_width = "64" ) ,
198
- repr( align( 8 ) ) ) ]
199
- #[ cfg_attr( all( feature = "align" ,
200
- not( target_env = "musl" ) ,
201
- target_arch = "x86" ) ,
202
- repr( align( 4 ) ) ) ]
203
- #[ cfg_attr( all( feature = "align" ,
204
- not( target_env = "musl" ) ,
205
- not( target_arch = "x86" ) ) ,
206
- repr( align( 8 ) ) ) ]
207
- pub struct pthread_cond_t {
208
- #[ cfg( all( not( feature = "align" ) , target_env = "musl" ) ) ]
209
- __align: [ * const :: c_void; 0 ] ,
210
- #[ cfg( not( any( feature = "align" , target_env = "musl" ) ) ) ]
211
- __align: [ :: c_longlong; 0 ] ,
212
- size: [ u8 ; __SIZEOF_PTHREAD_COND_T] ,
213
- }
214
-
215
107
#[ cfg_attr( feature = "align" , repr( align( 4 ) ) ) ]
216
108
pub struct pthread_condattr_t {
217
109
#[ cfg( not( feature = "align" ) ) ]
@@ -657,6 +549,169 @@ s! {
657
549
}
658
550
}
659
551
552
+ s_no_extra_traits ! {
553
+ pub struct dirent {
554
+ pub d_ino: :: ino_t,
555
+ pub d_off: :: off_t,
556
+ pub d_reclen: :: c_ushort,
557
+ pub d_type: :: c_uchar,
558
+ pub d_name: [ :: c_char; 256 ] ,
559
+ }
560
+
561
+ pub struct dirent64 {
562
+ pub d_ino: :: ino64_t,
563
+ pub d_off: :: off64_t,
564
+ pub d_reclen: :: c_ushort,
565
+ pub d_type: :: c_uchar,
566
+ pub d_name: [ :: c_char; 256 ] ,
567
+ }
568
+
569
+ #[ cfg_attr( all( feature = "align" ,
570
+ target_env = "musl" ,
571
+ target_pointer_width = "32" ) ,
572
+ repr( align( 4 ) ) ) ]
573
+ #[ cfg_attr( all( feature = "align" ,
574
+ target_env = "musl" ,
575
+ target_pointer_width = "64" ) ,
576
+ repr( align( 8 ) ) ) ]
577
+ #[ cfg_attr( all( feature = "align" ,
578
+ not( target_env = "musl" ) ,
579
+ target_arch = "x86" ) ,
580
+ repr( align( 4 ) ) ) ]
581
+ #[ cfg_attr( all( feature = "align" ,
582
+ not( target_env = "musl" ) ,
583
+ not( target_arch = "x86" ) ) ,
584
+ repr( align( 8 ) ) ) ]
585
+ pub struct pthread_cond_t {
586
+ #[ cfg( all( not( feature = "align" ) , target_env = "musl" ) ) ]
587
+ __align: [ * const :: c_void; 0 ] ,
588
+ #[ cfg( not( any( feature = "align" , target_env = "musl" ) ) ) ]
589
+ __align: [ :: c_longlong; 0 ] ,
590
+ size: [ u8 ; __SIZEOF_PTHREAD_COND_T] ,
591
+ }
592
+
593
+ #[ cfg_attr( all( feature = "align" ,
594
+ target_pointer_width = "32" ,
595
+ any( target_arch = "mips" ,
596
+ target_arch = "arm" ,
597
+ target_arch = "powerpc" ,
598
+ target_arch = "x86_64" ,
599
+ target_arch = "x86" ) ) ,
600
+ repr( align( 4 ) ) ) ]
601
+ #[ cfg_attr( all( feature = "align" ,
602
+ any( target_pointer_width = "64" ,
603
+ not( any( target_arch = "mips" ,
604
+ target_arch = "arm" ,
605
+ target_arch = "powerpc" ,
606
+ target_arch = "x86_64" ,
607
+ target_arch = "x86" ) ) ) ) ,
608
+ repr( align( 8 ) ) ) ]
609
+ pub struct pthread_mutex_t {
610
+ #[ cfg( all( not( feature = "align" ) ,
611
+ any( target_arch = "mips" ,
612
+ target_arch = "arm" ,
613
+ target_arch = "powerpc" ,
614
+ all( target_arch = "x86_64" ,
615
+ target_pointer_width = "32" ) ) ) ) ]
616
+ __align: [ :: c_long; 0 ] ,
617
+ #[ cfg( not( any( feature = "align" ,
618
+ target_arch = "mips" ,
619
+ target_arch = "arm" ,
620
+ target_arch = "powerpc" ,
621
+ all( target_arch = "x86_64" ,
622
+ target_pointer_width = "32" ) ) ) ) ]
623
+ __align: [ :: c_longlong; 0 ] ,
624
+ size: [ u8 ; __SIZEOF_PTHREAD_MUTEX_T] ,
625
+ }
626
+
627
+ #[ cfg_attr( all( feature = "align" ,
628
+ target_pointer_width = "32" ,
629
+ any( target_arch = "mips" ,
630
+ target_arch = "arm" ,
631
+ target_arch = "powerpc" ,
632
+ target_arch = "x86_64" ,
633
+ target_arch = "x86" ) ) ,
634
+ repr( align( 4 ) ) ) ]
635
+ #[ cfg_attr( all( feature = "align" ,
636
+ any( target_pointer_width = "64" ,
637
+ not( any( target_arch = "mips" ,
638
+ target_arch = "arm" ,
639
+ target_arch = "powerpc" ,
640
+ target_arch = "x86_64" ,
641
+ target_arch = "x86" ) ) ) ) ,
642
+ repr( align( 8 ) ) ) ]
643
+ pub struct pthread_rwlock_t {
644
+ #[ cfg( all( not( feature = "align" ) ,
645
+ any( target_arch = "mips" ,
646
+ target_arch = "arm" ,
647
+ target_arch = "powerpc" ,
648
+ all( target_arch = "x86_64" ,
649
+ target_pointer_width = "32" ) ) ) ) ]
650
+ __align: [ :: c_long; 0 ] ,
651
+ #[ cfg( not( any( feature = "align" ,
652
+ target_arch = "mips" ,
653
+ target_arch = "arm" ,
654
+ target_arch = "powerpc" ,
655
+ all( target_arch = "x86_64" ,
656
+ target_pointer_width = "32" ) ) ) ) ]
657
+ __align: [ :: c_longlong; 0 ] ,
658
+ size: [ u8 ; __SIZEOF_PTHREAD_RWLOCK_T] ,
659
+ }
660
+ }
661
+
662
+ #[ cfg( feature = "extra_traits" ) ]
663
+ impl PartialEq for dirent {
664
+ fn eq ( & self , other : & dirent ) -> bool {
665
+ self . d_ino == other. d_ino &&
666
+ self . d_off == other. d_off &&
667
+ self . d_reclen == other. d_reclen &&
668
+ self . d_type == other. d_type &&
669
+ self . d_name . iter ( ) . zip ( other. d_name . iter ( ) ) . all ( |( a, b) | a == b)
670
+ }
671
+ }
672
+ #[ cfg( feature = "extra_traits" ) ]
673
+ impl Eq for dirent { }
674
+
675
+ #[ cfg( feature = "extra_traits" ) ]
676
+ impl PartialEq for dirent64 {
677
+ fn eq ( & self , other : & dirent64 ) -> bool {
678
+ self . d_ino == other. d_ino &&
679
+ self . d_off == other. d_off &&
680
+ self . d_reclen == other. d_reclen &&
681
+ self . d_type == other. d_type &&
682
+ self . d_name . iter ( ) . zip ( other. d_name . iter ( ) ) . all ( |( a, b) | a == b)
683
+ }
684
+ }
685
+ #[ cfg( feature = "extra_traits" ) ]
686
+ impl Eq for dirent64 { }
687
+
688
+ #[ cfg( feature = "extra_traits" ) ]
689
+ impl PartialEq for pthread_cond_t {
690
+ fn eq ( & self , other : & pthread_cond_t ) -> bool {
691
+ self . size . iter ( ) . zip ( other. size . iter ( ) ) . all ( |( a, b) | a == b)
692
+ }
693
+ }
694
+ #[ cfg( feature = "extra_traits" ) ]
695
+ impl Eq for pthread_cond_t { }
696
+
697
+ #[ cfg( feature = "extra_traits" ) ]
698
+ impl PartialEq for pthread_mutex_t {
699
+ fn eq ( & self , other : & pthread_mutex_t ) -> bool {
700
+ self . size . iter ( ) . zip ( other. size . iter ( ) ) . all ( |( a, b) | a == b)
701
+ }
702
+ }
703
+ #[ cfg( feature = "extra_traits" ) ]
704
+ impl Eq for pthread_mutex_t { }
705
+
706
+ #[ cfg( feature = "extra_traits" ) ]
707
+ impl PartialEq for pthread_rwlock_t {
708
+ fn eq ( & self , other : & pthread_rwlock_t ) -> bool {
709
+ self . size . iter ( ) . zip ( other. size . iter ( ) ) . all ( |( a, b) | a == b)
710
+ }
711
+ }
712
+ #[ cfg( feature = "extra_traits" ) ]
713
+ impl Eq for pthread_rwlock_t { }
714
+
660
715
pub const ABDAY_1 : :: nl_item = 0x20000 ;
661
716
pub const ABDAY_2 : :: nl_item = 0x20001 ;
662
717
pub const ABDAY_3 : :: nl_item = 0x20002 ;
0 commit comments