@@ -292,9 +292,6 @@ fn test_apple(target: &str) {
292
292
return true ;
293
293
}
294
294
match ty {
295
- // FIXME: actually a union
296
- "sigval" => true ,
297
-
298
295
// FIXME: The size is changed in recent macOSes.
299
296
"malloc_zone_t" => true ,
300
297
// it is a moving target, changing through versions
@@ -388,14 +385,6 @@ fn test_apple(target: &str) {
388
385
}
389
386
} ) ;
390
387
391
- cfg. skip_field_type ( move |struct_, field| {
392
- match ( struct_, field) {
393
- // FIXME: actually a union
394
- ( "sigevent" , "sigev_value" ) => true ,
395
- _ => false ,
396
- }
397
- } ) ;
398
-
399
388
cfg. volatile_item ( |i| {
400
389
use ctest:: VolatileItemKind :: * ;
401
390
match i {
@@ -534,18 +523,6 @@ fn test_openbsd(target: &str) {
534
523
"sys/param.h" ,
535
524
}
536
525
537
- cfg. skip_struct ( move |ty| {
538
- if ty. starts_with ( "__c_anonymous_" ) {
539
- return true ;
540
- }
541
- match ty {
542
- // FIXME: actually a union
543
- "sigval" => true ,
544
-
545
- _ => false ,
546
- }
547
- } ) ;
548
-
549
526
cfg. skip_fn ( move |name| {
550
527
match name {
551
528
// futex() has volatile arguments, but that doesn't exist in Rust.
@@ -926,8 +903,6 @@ fn test_solarish(target: &str) {
926
903
return true ;
927
904
}
928
905
match ty {
929
- // union, not a struct
930
- "sigval" => true ,
931
906
// a bunch of solaris-only fields
932
907
"utmpx" if is_illumos => true ,
933
908
_ => false ,
@@ -942,8 +917,6 @@ fn test_solarish(target: &str) {
942
917
"sigaction" if field == "sa_sigaction" => true ,
943
918
// Missing in illumos
944
919
"sigevent" if field == "ss_sp" => true ,
945
- // Avoid sigval union issues
946
- "sigevent" if field == "sigev_value" => true ,
947
920
// const issues
948
921
"sigevent" if field == "sigev_notify_attributes" => true ,
949
922
@@ -1159,8 +1132,6 @@ fn test_netbsd(target: &str) {
1159
1132
1160
1133
cfg. skip_struct ( move |ty| {
1161
1134
match ty {
1162
- // This is actually a union, not a struct
1163
- "sigval" => true ,
1164
1135
// These are tested as part of the linux_fcntl tests since there are
1165
1136
// header conflicts when including them with all the other structs.
1166
1137
"termios2" => true ,
@@ -1211,8 +1182,6 @@ fn test_netbsd(target: &str) {
1211
1182
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1212
1183
// sighandler_t type is super weird
1213
1184
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1214
- // sigval is actually a union, but we pretend it's a struct
1215
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
1216
1185
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1217
1186
( struct_ == "aiocb" && field == "aio_buf" )
1218
1187
} ) ;
@@ -1340,9 +1309,6 @@ fn test_dragonflybsd(target: &str) {
1340
1309
1341
1310
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1342
1311
1343
- // sigval is a struct in Rust, but a union in C:
1344
- "sigval" => format ! ( "union sigval" ) ,
1345
-
1346
1312
// put `struct` in front of all structs:.
1347
1313
t if is_struct => format ! ( "struct {}" , t) ,
1348
1314
@@ -1436,8 +1402,6 @@ fn test_dragonflybsd(target: &str) {
1436
1402
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1437
1403
// sighandler_t type is super weird
1438
1404
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1439
- // sigval is actually a union, but we pretend it's a struct
1440
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
1441
1405
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1442
1406
( struct_ == "aiocb" && field == "aio_buf" )
1443
1407
} ) ;
@@ -1708,9 +1672,6 @@ fn test_android(target: &str) {
1708
1672
1709
1673
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1710
1674
1711
- // sigval is a struct in Rust, but a union in C:
1712
- "sigval" => format ! ( "union sigval" ) ,
1713
-
1714
1675
// put `struct` in front of all structs:.
1715
1676
t if is_struct => format ! ( "struct {}" , t) ,
1716
1677
@@ -1991,8 +1952,6 @@ fn test_android(target: &str) {
1991
1952
cfg. skip_field_type ( move |struct_, field| {
1992
1953
// This is a weird union, don't check the type.
1993
1954
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1994
- // sigval is actually a union, but we pretend it's a struct
1995
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
1996
1955
// this one is an anonymous union
1997
1956
( struct_ == "ff_effect" && field == "u" ) ||
1998
1957
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
@@ -2197,9 +2156,6 @@ fn test_freebsd(target: &str) {
2197
2156
2198
2157
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
2199
2158
2200
- // sigval is a struct in Rust, but a union in C:
2201
- "sigval" => format ! ( "union sigval" ) ,
2202
-
2203
2159
// put `struct` in front of all structs:.
2204
2160
t if is_struct => format ! ( "struct {}" , t) ,
2205
2161
@@ -2823,10 +2779,6 @@ fn test_emscripten(target: &str) {
2823
2779
2824
2780
cfg. skip_struct ( move |ty| {
2825
2781
match ty {
2826
- // This is actually a union, not a struct
2827
- // FIXME: is this necessary?
2828
- "sigval" => true ,
2829
-
2830
2782
// FIXME: It was removed in
2831
2783
// emscripten-core/emscripten@953e414
2832
2784
"pthread_mutexattr_t" => true ,
@@ -2905,9 +2857,6 @@ fn test_emscripten(target: &str) {
2905
2857
// sighandler_t type is super weird
2906
2858
// FIXME: is this necessary?
2907
2859
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
2908
- // sigval is actually a union, but we pretend it's a struct
2909
- // FIXME: is this necessary?
2910
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
2911
2860
// aio_buf is "volatile void*" and Rust doesn't understand volatile
2912
2861
// FIXME: is this necessary?
2913
2862
( struct_ == "aiocb" && field == "aio_buf" )
@@ -3117,9 +3066,6 @@ fn test_neutrino(target: &str) {
3117
3066
match ty {
3118
3067
"Elf64_Phdr" | "Elf32_Phdr" => true ,
3119
3068
3120
- // FIXME: This is actually a union, not a struct
3121
- "sigval" => true ,
3122
-
3123
3069
// union
3124
3070
"_channel_connect_attr" => true ,
3125
3071
@@ -3171,8 +3117,6 @@ fn test_neutrino(target: &str) {
3171
3117
} ) ;
3172
3118
3173
3119
cfg. skip_field_type ( move |struct_, field| {
3174
- // sigval is actually a union, but we pretend it's a struct
3175
- struct_ == "sigevent" && field == "sigev_value" ||
3176
3120
// Anonymous structures
3177
3121
struct_ == "_idle_hook" && field == "time"
3178
3122
} ) ;
@@ -3181,8 +3125,6 @@ fn test_neutrino(target: &str) {
3181
3125
( struct_ == "__sched_param" && field == "reserved" ) ||
3182
3126
( struct_ == "sched_param" && field == "reserved" ) ||
3183
3127
( struct_ == "sigevent" && field == "__padding1" ) || // ensure alignment
3184
- ( struct_ == "sigevent" && field == "__padding2" ) || // union
3185
- ( struct_ == "sigevent" && field == "__sigev_un2" ) || // union
3186
3128
// sighandler_t type is super weird
3187
3129
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
3188
3130
// does not exist
@@ -3291,10 +3233,8 @@ fn test_vxworks(target: &str) {
3291
3233
3292
3234
// FIXME
3293
3235
cfg. skip_fn ( move |name| match name {
3294
- // sigval
3295
- "sigqueue" | "_sigqueue"
3296
3236
// sighandler_t
3297
- | "signal"
3237
+ "signal"
3298
3238
// not used in static linking by default
3299
3239
| "dlerror" => true ,
3300
3240
_ => false ,
@@ -3693,9 +3633,6 @@ fn test_linux(target: &str) {
3693
3633
// which is absent in glibc, has to be defined.
3694
3634
"__timeval" => true ,
3695
3635
3696
- // FIXME: This is actually a union, not a struct
3697
- "sigval" => true ,
3698
-
3699
3636
// This type is tested in the `linux_termios.rs` file since there
3700
3637
// are header conflicts when including them with all the other
3701
3638
// structs.
@@ -4354,8 +4291,6 @@ fn test_linux(target: &str) {
4354
4291
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
4355
4292
// __timeval type is a patch which doesn't exist in glibc
4356
4293
( struct_ == "utmpx" && field == "ut_tv" ) ||
4357
- // sigval is actually a union, but we pretend it's a struct
4358
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
4359
4294
// this one is an anonymous union
4360
4295
( struct_ == "ff_effect" && field == "u" ) ||
4361
4296
// `__exit_status` type is a patch which is absent in musl
@@ -4788,8 +4723,6 @@ fn test_haiku(target: &str) {
4788
4723
return true ;
4789
4724
}
4790
4725
match ty {
4791
- // FIXME: actually a union
4792
- "sigval" => true ,
4793
4726
// FIXME: locale_t does not exist on Haiku
4794
4727
"locale_t" => true ,
4795
4728
// FIXME: rusage has a different layout on Haiku
@@ -4896,10 +4829,8 @@ fn test_haiku(target: &str) {
4896
4829
( "stat" , "st_crtime_nsec" ) => true ,
4897
4830
4898
4831
// these are actually unions, but we cannot represent it well
4899
- ( "siginfo_t" , "sigval" ) => true ,
4900
4832
( "sem_t" , "named_sem_id" ) => true ,
4901
4833
( "sigaction" , "sa_sigaction" ) => true ,
4902
- ( "sigevent" , "sigev_value" ) => true ,
4903
4834
( "fpu_state" , "_fpreg" ) => true ,
4904
4835
( "cpu_topology_node_info" , "data" ) => true ,
4905
4836
// these fields have a simplified data definition in libc
@@ -4950,8 +4881,6 @@ fn test_haiku(target: &str) {
4950
4881
ty. to_string ( )
4951
4882
}
4952
4883
4953
- // is actually a union
4954
- "sigval" => format ! ( "union sigval" ) ,
4955
4884
t if is_union => format ! ( "union {}" , t) ,
4956
4885
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
4957
4886
t if is_struct => format ! ( "struct {}" , t) ,
0 commit comments