@@ -293,9 +293,6 @@ fn test_apple(target: &str) {
293
293
return true ;
294
294
}
295
295
match ty {
296
- // FIXME: actually a union
297
- "sigval" => true ,
298
-
299
296
// FIXME: The size is changed in recent macOSes.
300
297
"malloc_zone_t" => true ,
301
298
// it is a moving target, changing through versions
@@ -391,14 +388,6 @@ fn test_apple(target: &str) {
391
388
}
392
389
} ) ;
393
390
394
- cfg. skip_field_type ( move |struct_, field| {
395
- match ( struct_, field) {
396
- // FIXME: actually a union
397
- ( "sigevent" , "sigev_value" ) => true ,
398
- _ => false ,
399
- }
400
- } ) ;
401
-
402
391
cfg. volatile_item ( |i| {
403
392
use ctest:: VolatileItemKind :: * ;
404
393
match i {
@@ -538,27 +527,6 @@ fn test_openbsd(target: &str) {
538
527
"sys/param.h" ,
539
528
}
540
529
541
- cfg. skip_struct ( move |ty| {
542
- if ty. starts_with ( "__c_anonymous_" ) {
543
- return true ;
544
- }
545
- match ty {
546
- // FIXME: actually a union
547
- "sigval" => true ,
548
-
549
- _ => false ,
550
- }
551
- } ) ;
552
-
553
- cfg. skip_const ( move |name| {
554
- match name {
555
- // Removed in OpenBSD 7.7 (unused since 1991)
556
- "ATF_COM" | "ATF_PERM" | "ATF_PUBL" | "ATF_USETRAILERS" => true ,
557
-
558
- _ => false ,
559
- }
560
- } ) ;
561
-
562
530
cfg. skip_fn ( move |name| {
563
531
match name {
564
532
// futex() has volatile arguments, but that doesn't exist in Rust.
@@ -953,8 +921,6 @@ fn test_solarish(target: &str) {
953
921
return true ;
954
922
}
955
923
match ty {
956
- // union, not a struct
957
- "sigval" => true ,
958
924
// a bunch of solaris-only fields
959
925
"utmpx" if is_illumos => true ,
960
926
_ => false ,
@@ -974,8 +940,6 @@ fn test_solarish(target: &str) {
974
940
"sigaction" if field == "sa_sigaction" => true ,
975
941
// Missing in illumos
976
942
"sigevent" if field == "ss_sp" => true ,
977
- // Avoid sigval union issues
978
- "sigevent" if field == "sigev_value" => true ,
979
943
// const issues
980
944
"sigevent" if field == "sigev_notify_attributes" => true ,
981
945
@@ -1198,8 +1162,6 @@ fn test_netbsd(target: &str) {
1198
1162
1199
1163
cfg. skip_struct ( move |ty| {
1200
1164
match ty {
1201
- // This is actually a union, not a struct
1202
- "sigval" => true ,
1203
1165
// These are tested as part of the linux_fcntl tests since there are
1204
1166
// header conflicts when including them with all the other structs.
1205
1167
"termios2" => true ,
@@ -1250,8 +1212,6 @@ fn test_netbsd(target: &str) {
1250
1212
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1251
1213
// sighandler_t type is super weird
1252
1214
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1253
- // sigval is actually a union, but we pretend it's a struct
1254
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
1255
1215
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1256
1216
( struct_ == "aiocb" && field == "aio_buf" )
1257
1217
} ) ;
@@ -1380,9 +1340,6 @@ fn test_dragonflybsd(target: &str) {
1380
1340
1381
1341
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1382
1342
1383
- // sigval is a struct in Rust, but a union in C:
1384
- "sigval" => format ! ( "union sigval" ) ,
1385
-
1386
1343
// put `struct` in front of all structs:.
1387
1344
t if is_struct => format ! ( "struct {}" , t) ,
1388
1345
@@ -1476,8 +1433,6 @@ fn test_dragonflybsd(target: &str) {
1476
1433
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1477
1434
// sighandler_t type is super weird
1478
1435
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1479
- // sigval is actually a union, but we pretend it's a struct
1480
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
1481
1436
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1482
1437
( struct_ == "aiocb" && field == "aio_buf" )
1483
1438
} ) ;
@@ -1768,9 +1723,6 @@ fn test_android(target: &str) {
1768
1723
1769
1724
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1770
1725
1771
- // sigval is a struct in Rust, but a union in C:
1772
- "sigval" => format ! ( "union sigval" ) ,
1773
-
1774
1726
// put `struct` in front of all structs:.
1775
1727
t if is_struct => format ! ( "struct {}" , t) ,
1776
1728
@@ -2061,8 +2013,6 @@ fn test_android(target: &str) {
2061
2013
cfg. skip_field_type ( move |struct_, field| {
2062
2014
// This is a weird union, don't check the type.
2063
2015
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
2064
- // sigval is actually a union, but we pretend it's a struct
2065
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
2066
2016
// this one is an anonymous union
2067
2017
( struct_ == "ff_effect" && field == "u" ) ||
2068
2018
// FIXME: `sa_sigaction` has type `sighandler_t` but that type is
@@ -2268,9 +2218,6 @@ fn test_freebsd(target: &str) {
2268
2218
2269
2219
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
2270
2220
2271
- // sigval is a struct in Rust, but a union in C:
2272
- "sigval" => format ! ( "union sigval" ) ,
2273
-
2274
2221
// put `struct` in front of all structs:.
2275
2222
t if is_struct => format ! ( "struct {}" , t) ,
2276
2223
@@ -2890,13 +2837,13 @@ fn test_emscripten(target: &str) {
2890
2837
2891
2838
cfg. skip_struct ( move |ty| {
2892
2839
match ty {
2893
- // This is actually a union, not a struct
2894
- "sigval" => true ,
2840
+ // FIXME: It was removed in
2841
+ // emscripten-core/emscripten@953e414
2842
+ "pthread_mutexattr_t" => true ,
2895
2843
2896
2844
// FIXME: Investigate why the test fails.
2897
2845
// Skip for now to unblock CI.
2898
2846
"pthread_condattr_t" => true ,
2899
- "pthread_mutexattr_t" => true ,
2900
2847
2901
2848
// No epoll support
2902
2849
// https://github.com/emscripten-core/emscripten/issues/5033
@@ -2969,8 +2916,9 @@ fn test_emscripten(target: &str) {
2969
2916
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
2970
2917
// sighandler_t type is super weird
2971
2918
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
2972
- // sigval is actually a union, but we pretend it's a struct
2973
- ( struct_ == "sigevent" && field == "sigev_value" )
2919
+ // aio_buf is "volatile void*" and Rust doesn't understand volatile
2920
+ // FIXME: is this necessary?
2921
+ ( struct_ == "aiocb" && field == "aio_buf" )
2974
2922
} ) ;
2975
2923
2976
2924
cfg. skip_field ( move |struct_, field| {
@@ -3164,9 +3112,6 @@ fn test_neutrino(target: &str) {
3164
3112
match ty {
3165
3113
"Elf64_Phdr" | "Elf32_Phdr" => true ,
3166
3114
3167
- // FIXME: This is actually a union, not a struct
3168
- "sigval" => true ,
3169
-
3170
3115
// union
3171
3116
"_channel_connect_attr" => true ,
3172
3117
@@ -3218,8 +3163,6 @@ fn test_neutrino(target: &str) {
3218
3163
} ) ;
3219
3164
3220
3165
cfg. skip_field_type ( move |struct_, field| {
3221
- // sigval is actually a union, but we pretend it's a struct
3222
- struct_ == "sigevent" && field == "sigev_value" ||
3223
3166
// Anonymous structures
3224
3167
struct_ == "_idle_hook" && field == "time"
3225
3168
} ) ;
@@ -3228,8 +3171,6 @@ fn test_neutrino(target: &str) {
3228
3171
( struct_ == "__sched_param" && field == "reserved" ) ||
3229
3172
( struct_ == "sched_param" && field == "reserved" ) ||
3230
3173
( struct_ == "sigevent" && field == "__padding1" ) || // ensure alignment
3231
- ( struct_ == "sigevent" && field == "__padding2" ) || // union
3232
- ( struct_ == "sigevent" && field == "__sigev_un2" ) || // union
3233
3174
// sighandler_t type is super weird
3234
3175
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
3235
3176
// does not exist
@@ -3338,10 +3279,8 @@ fn test_vxworks(target: &str) {
3338
3279
3339
3280
// FIXME
3340
3281
cfg. skip_fn ( move |name| match name {
3341
- // sigval
3342
- "sigqueue" | "_sigqueue"
3343
3282
// sighandler_t
3344
- | "signal"
3283
+ "signal"
3345
3284
// not used in static linking by default
3346
3285
| "dlerror" => true ,
3347
3286
_ => false ,
@@ -3747,9 +3686,6 @@ fn test_linux(target: &str) {
3747
3686
// which is absent in glibc, has to be defined.
3748
3687
"__timeval" => true ,
3749
3688
3750
- // FIXME: This is actually a union, not a struct
3751
- "sigval" => true ,
3752
-
3753
3689
// This type is tested in the `linux_termios.rs` file since there
3754
3690
// are header conflicts when including them with all the other
3755
3691
// structs.
@@ -4415,8 +4351,6 @@ fn test_linux(target: &str) {
4415
4351
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
4416
4352
// __timeval type is a patch which doesn't exist in glibc
4417
4353
( struct_ == "utmpx" && field == "ut_tv" ) ||
4418
- // sigval is actually a union, but we pretend it's a struct
4419
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
4420
4354
// this one is an anonymous union
4421
4355
( struct_ == "ff_effect" && field == "u" ) ||
4422
4356
// `__exit_status` type is a patch which is absent in musl
@@ -4860,8 +4794,6 @@ fn test_haiku(target: &str) {
4860
4794
return true ;
4861
4795
}
4862
4796
match ty {
4863
- // FIXME: actually a union
4864
- "sigval" => true ,
4865
4797
// FIXME: locale_t does not exist on Haiku
4866
4798
"locale_t" => true ,
4867
4799
// FIXME: rusage has a different layout on Haiku
@@ -4968,10 +4900,8 @@ fn test_haiku(target: &str) {
4968
4900
( "stat" , "st_crtime_nsec" ) => true ,
4969
4901
4970
4902
// these are actually unions, but we cannot represent it well
4971
- ( "siginfo_t" , "sigval" ) => true ,
4972
4903
( "sem_t" , "named_sem_id" ) => true ,
4973
4904
( "sigaction" , "sa_sigaction" ) => true ,
4974
- ( "sigevent" , "sigev_value" ) => true ,
4975
4905
( "fpu_state" , "_fpreg" ) => true ,
4976
4906
( "cpu_topology_node_info" , "data" ) => true ,
4977
4907
// these fields have a simplified data definition in libc
@@ -5022,8 +4952,6 @@ fn test_haiku(target: &str) {
5022
4952
ty. to_string ( )
5023
4953
}
5024
4954
5025
- // is actually a union
5026
- "sigval" => format ! ( "union sigval" ) ,
5027
4955
t if is_union => format ! ( "union {}" , t) ,
5028
4956
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
5029
4957
t if is_struct => format ! ( "struct {}" , t) ,
0 commit comments