@@ -331,9 +331,6 @@ fn test_apple(target: &str) {
331
331
return true ;
332
332
}
333
333
match ty {
334
- // FIXME(union): actually a union
335
- "sigval" => true ,
336
-
337
334
// FIXME(macos): The size is changed in recent macOSes.
338
335
"malloc_zone_t" => true ,
339
336
// it is a moving target, changing through versions
@@ -429,14 +426,6 @@ fn test_apple(target: &str) {
429
426
}
430
427
} ) ;
431
428
432
- cfg. skip_field_type ( move |struct_, field| {
433
- match ( struct_, field) {
434
- // FIXME(union): actually a union
435
- ( "sigevent" , "sigev_value" ) => true ,
436
- _ => false ,
437
- }
438
- } ) ;
439
-
440
429
cfg. volatile_item ( |i| {
441
430
use ctest:: VolatileItemKind :: * ;
442
431
match i {
@@ -576,23 +565,8 @@ fn test_openbsd(target: &str) {
576
565
"sys/param.h" ,
577
566
}
578
567
579
- cfg. skip_struct ( move |ty| {
580
- if ty. starts_with ( "__c_anonymous_" ) {
581
- return true ;
582
- }
583
- match ty {
584
- // FIXME(union): actually a union
585
- "sigval" => true ,
586
-
587
- _ => false ,
588
- }
589
- } ) ;
590
-
591
568
cfg. skip_const ( move |name| {
592
569
match name {
593
- // Removed in OpenBSD 7.7
594
- "ATF_COM" | "ATF_PERM" | "ATF_PUBL" | "ATF_USETRAILERS" => true ,
595
-
596
570
// Removed in OpenBSD 7.8
597
571
"CTL_FS" | "SO_NETPROC" => true ,
598
572
@@ -720,9 +694,6 @@ fn test_cygwin(target: &str) {
720
694
721
695
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
722
696
723
- // sigval is a struct in Rust, but a union in C:
724
- "sigval" => "union sigval" . to_string ( ) ,
725
-
726
697
// put `struct` in front of all structs:.
727
698
t if is_struct => format ! ( "struct {t}" ) ,
728
699
@@ -1174,8 +1145,6 @@ fn test_solarish(target: &str) {
1174
1145
return true ;
1175
1146
}
1176
1147
match ty {
1177
- // union, not a struct
1178
- "sigval" => true ,
1179
1148
// a bunch of solaris-only fields
1180
1149
"utmpx" if is_illumos => true ,
1181
1150
_ => false ,
@@ -1195,8 +1164,6 @@ fn test_solarish(target: &str) {
1195
1164
"sigaction" if field == "sa_sigaction" => true ,
1196
1165
// Missing in illumos
1197
1166
"sigevent" if field == "ss_sp" => true ,
1198
- // Avoid sigval union issues
1199
- "sigevent" if field == "sigev_value" => true ,
1200
1167
// const issues
1201
1168
"sigevent" if field == "sigev_notify_attributes" => true ,
1202
1169
@@ -1423,8 +1390,6 @@ fn test_netbsd(target: &str) {
1423
1390
1424
1391
cfg. skip_struct ( move |ty| {
1425
1392
match ty {
1426
- // This is actually a union, not a struct
1427
- "sigval" => true ,
1428
1393
// These are tested as part of the linux_fcntl tests since there are
1429
1394
// header conflicts when including them with all the other structs.
1430
1395
"termios2" => true ,
@@ -1476,8 +1441,6 @@ fn test_netbsd(target: &str) {
1476
1441
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1477
1442
// sighandler_t type is super weird
1478
1443
( 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
1444
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1482
1445
( struct_ == "aiocb" && field == "aio_buf" )
1483
1446
} ) ;
@@ -1606,9 +1569,6 @@ fn test_dragonflybsd(target: &str) {
1606
1569
1607
1570
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1608
1571
1609
- // sigval is a struct in Rust, but a union in C:
1610
- "sigval" => "union sigval" . to_string ( ) ,
1611
-
1612
1572
// put `struct` in front of all structs:.
1613
1573
t if is_struct => format ! ( "struct {t}" ) ,
1614
1574
@@ -1701,8 +1661,6 @@ fn test_dragonflybsd(target: &str) {
1701
1661
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1702
1662
// sighandler_t type is super weird
1703
1663
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1704
- // sigval is actually a union, but we pretend it's a struct
1705
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
1706
1664
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1707
1665
( struct_ == "aiocb" && field == "aio_buf" )
1708
1666
} ) ;
@@ -1993,9 +1951,6 @@ fn test_android(target: &str) {
1993
1951
1994
1952
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1995
1953
1996
- // sigval is a struct in Rust, but a union in C:
1997
- "sigval" => "union sigval" . to_string ( ) ,
1998
-
1999
1954
"Ioctl" => "int" . to_string ( ) ,
2000
1955
2001
1956
// put `struct` in front of all structs:.
@@ -2300,8 +2255,6 @@ fn test_android(target: &str) {
2300
2255
cfg. skip_field_type ( move |struct_, field| {
2301
2256
// This is a weird union, don't check the type.
2302
2257
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
2303
- // sigval is actually a union, but we pretend it's a struct
2304
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
2305
2258
// this one is an anonymous union
2306
2259
( struct_ == "ff_effect" && field == "u" ) ||
2307
2260
// FIXME(android): `sa_sigaction` has type `sighandler_t` but that type is
@@ -2504,9 +2457,6 @@ fn test_freebsd(target: &str) {
2504
2457
2505
2458
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
2506
2459
2507
- // sigval is a struct in Rust, but a union in C:
2508
- "sigval" => "union sigval" . to_string ( ) ,
2509
-
2510
2460
// put `struct` in front of all structs:.
2511
2461
t if is_struct => format ! ( "struct {t}" ) ,
2512
2462
@@ -3141,7 +3091,8 @@ fn test_emscripten(target: &str) {
3141
3091
return true ;
3142
3092
}
3143
3093
match ty {
3144
- // This is actually a union, not a struct
3094
+ // FIXME(emscripten): Investigate why the test fails.
3095
+ // Skip for now to unblock CI.
3145
3096
"sigval" => true ,
3146
3097
3147
3098
// FIXME(emscripten): Investigate why the test fails.
@@ -3222,9 +3173,7 @@ fn test_emscripten(target: &str) {
3222
3173
// This is a weird union, don't check the type.
3223
3174
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
3224
3175
// sighandler_t type is super weird
3225
- ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
3226
- // sigval is actually a union, but we pretend it's a struct
3227
- ( struct_ == "sigevent" && field == "sigev_value" )
3176
+ ( struct_ == "sigaction" && field == "sa_sigaction" )
3228
3177
} ) ;
3229
3178
3230
3179
cfg. skip_field ( move |struct_, field| {
@@ -3437,9 +3386,6 @@ fn test_neutrino(target: &str) {
3437
3386
match ty {
3438
3387
"Elf64_Phdr" | "Elf32_Phdr" => true ,
3439
3388
3440
- // FIXME(union): This is actually a union, not a struct
3441
- "sigval" => true ,
3442
-
3443
3389
// union
3444
3390
"_channel_connect_attr" => true ,
3445
3391
@@ -3494,8 +3440,6 @@ fn test_neutrino(target: &str) {
3494
3440
} ) ;
3495
3441
3496
3442
cfg. skip_field_type ( move |struct_, field| {
3497
- // sigval is actually a union, but we pretend it's a struct
3498
- struct_ == "sigevent" && field == "sigev_value" ||
3499
3443
// Anonymous structures
3500
3444
struct_ == "_idle_hook" && field == "time"
3501
3445
} ) ;
@@ -3506,8 +3450,6 @@ fn test_neutrino(target: &str) {
3506
3450
( "__sched_param" , "reserved" )
3507
3451
| ( "sched_param" , "reserved" )
3508
3452
| ( "sigevent" , "__padding1" ) // ensure alignment
3509
- | ( "sigevent" , "__padding2" ) // union
3510
- | ( "sigevent" , "__sigev_un2" ) // union
3511
3453
| ( "sigaction" , "sa_sigaction" ) // sighandler_t type is super weird
3512
3454
| ( "syspage_entry" , "__reserved" ) // does not exist
3513
3455
)
@@ -3612,10 +3554,8 @@ fn test_vxworks(target: &str) {
3612
3554
3613
3555
// FIXME(vxworks)
3614
3556
cfg. skip_fn ( move |name| match name {
3615
- // sigval
3616
- "sigqueue" | "_sigqueue"
3617
3557
// sighandler_t
3618
- | "signal"
3558
+ "signal"
3619
3559
// not used in static linking by default
3620
3560
| "dlerror" => true ,
3621
3561
_ => false ,
@@ -4053,9 +3993,6 @@ fn test_linux(target: &str) {
4053
3993
// which is absent in glibc, has to be defined.
4054
3994
"__timeval" => true ,
4055
3995
4056
- // FIXME(union): This is actually a union, not a struct
4057
- "sigval" => true ,
4058
-
4059
3996
// This type is tested in the `linux_termios.rs` file since there
4060
3997
// are header conflicts when including them with all the other
4061
3998
// structs.
@@ -4752,12 +4689,6 @@ fn test_linux(target: &str) {
4752
4689
// Needs musl 1.2.3 or later.
4753
4690
"pthread_getname_np" if old_musl => true ,
4754
4691
4755
- // pthread_sigqueue uses sigval, which was initially declared
4756
- // as a struct but should be defined as a union. However due
4757
- // to the issues described here: https://github.com/rust-lang/libc/issues/2816
4758
- // it can't be changed from struct.
4759
- "pthread_sigqueue" => true ,
4760
-
4761
4692
// There are two versions of basename(3) on Linux with glibc, see
4762
4693
//
4763
4694
// https://man7.org/linux/man-pages/man3/basename.3.html
@@ -4791,8 +4722,6 @@ fn test_linux(target: &str) {
4791
4722
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
4792
4723
// __timeval type is a patch which doesn't exist in glibc
4793
4724
( struct_ == "utmpx" && field == "ut_tv" ) ||
4794
- // sigval is actually a union, but we pretend it's a struct
4795
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
4796
4725
// this one is an anonymous union
4797
4726
( struct_ == "ff_effect" && field == "u" ) ||
4798
4727
// `__exit_status` type is a patch which is absent in musl
@@ -5273,8 +5202,6 @@ fn test_haiku(target: &str) {
5273
5202
return true ;
5274
5203
}
5275
5204
match ty {
5276
- // FIXME(union): actually a union
5277
- "sigval" => true ,
5278
5205
// FIXME(haiku): locale_t does not exist on Haiku
5279
5206
"locale_t" => true ,
5280
5207
// FIXME(haiku): rusage has a different layout on Haiku
@@ -5381,10 +5308,8 @@ fn test_haiku(target: &str) {
5381
5308
( "stat" , "st_crtime_nsec" ) => true ,
5382
5309
5383
5310
// these are actually unions, but we cannot represent it well
5384
- ( "siginfo_t" , "sigval" ) => true ,
5385
5311
( "sem_t" , "named_sem_id" ) => true ,
5386
5312
( "sigaction" , "sa_sigaction" ) => true ,
5387
- ( "sigevent" , "sigev_value" ) => true ,
5388
5313
( "fpu_state" , "_fpreg" ) => true ,
5389
5314
( "cpu_topology_node_info" , "data" ) => true ,
5390
5315
// these fields have a simplified data definition in libc
@@ -5435,8 +5360,6 @@ fn test_haiku(target: &str) {
5435
5360
ty. to_string ( )
5436
5361
}
5437
5362
5438
- // is actually a union
5439
- "sigval" => "union sigval" . to_string ( ) ,
5440
5363
t if is_union => format ! ( "union {t}" ) ,
5441
5364
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
5442
5365
t if is_struct => format ! ( "struct {t}" ) ,
@@ -5575,9 +5498,6 @@ fn test_aix(target: &str) {
5575
5498
"FILE" => ty. to_string ( ) ,
5576
5499
"ACTION" => ty. to_string ( ) ,
5577
5500
5578
- // 'sigval' is a struct in Rust, but a union in C.
5579
- "sigval" => format ! ( "union sigval" ) ,
5580
-
5581
5501
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
5582
5502
t if is_struct => format ! ( "struct {}" , t) ,
5583
5503
t if is_union => format ! ( "union {}" , t) ,
@@ -5614,9 +5534,6 @@ fn test_aix(target: &str) {
5614
5534
5615
5535
cfg. skip_struct ( move |ty| {
5616
5536
match ty {
5617
- // FIXME(union): actually a union.
5618
- "sigval" => true ,
5619
-
5620
5537
// '__poll_ctl_ext_u' and '__pollfd_ext_u' are for unnamed unions.
5621
5538
"__poll_ctl_ext_u" => true ,
5622
5539
"__pollfd_ext_u" => true ,
0 commit comments