@@ -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
@@ -1174,8 +1148,6 @@ fn test_solarish(target: &str) {
1174
1148
return true ;
1175
1149
}
1176
1150
match ty {
1177
- // union, not a struct
1178
- "sigval" => true ,
1179
1151
// a bunch of solaris-only fields
1180
1152
"utmpx" if is_illumos => true ,
1181
1153
_ => false ,
@@ -1195,8 +1167,6 @@ fn test_solarish(target: &str) {
1195
1167
"sigaction" if field == "sa_sigaction" => true ,
1196
1168
// Missing in illumos
1197
1169
"sigevent" if field == "ss_sp" => true ,
1198
- // Avoid sigval union issues
1199
- "sigevent" if field == "sigev_value" => true ,
1200
1170
// const issues
1201
1171
"sigevent" if field == "sigev_notify_attributes" => true ,
1202
1172
@@ -1423,8 +1393,6 @@ fn test_netbsd(target: &str) {
1423
1393
1424
1394
cfg. skip_struct ( move |ty| {
1425
1395
match ty {
1426
- // This is actually a union, not a struct
1427
- "sigval" => true ,
1428
1396
// These are tested as part of the linux_fcntl tests since there are
1429
1397
// header conflicts when including them with all the other structs.
1430
1398
"termios2" => true ,
@@ -1476,8 +1444,6 @@ fn test_netbsd(target: &str) {
1476
1444
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1477
1445
// sighandler_t type is super weird
1478
1446
( 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
1447
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1482
1448
( struct_ == "aiocb" && field == "aio_buf" )
1483
1449
} ) ;
@@ -1606,9 +1572,6 @@ fn test_dragonflybsd(target: &str) {
1606
1572
1607
1573
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1608
1574
1609
- // sigval is a struct in Rust, but a union in C:
1610
- "sigval" => "union sigval" . to_string ( ) ,
1611
-
1612
1575
// put `struct` in front of all structs:.
1613
1576
t if is_struct => format ! ( "struct {t}" ) ,
1614
1577
@@ -1701,8 +1664,6 @@ fn test_dragonflybsd(target: &str) {
1701
1664
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
1702
1665
// sighandler_t type is super weird
1703
1666
( 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
1667
// aio_buf is "volatile void*" and Rust doesn't understand volatile
1707
1668
( struct_ == "aiocb" && field == "aio_buf" )
1708
1669
} ) ;
@@ -1993,9 +1954,6 @@ fn test_android(target: &str) {
1993
1954
1994
1955
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
1995
1956
1996
- // sigval is a struct in Rust, but a union in C:
1997
- "sigval" => "union sigval" . to_string ( ) ,
1998
-
1999
1957
"Ioctl" => "int" . to_string ( ) ,
2000
1958
2001
1959
// put `struct` in front of all structs:.
@@ -2300,8 +2258,6 @@ fn test_android(target: &str) {
2300
2258
cfg. skip_field_type ( move |struct_, field| {
2301
2259
// This is a weird union, don't check the type.
2302
2260
( 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
2261
// this one is an anonymous union
2306
2262
( struct_ == "ff_effect" && field == "u" ) ||
2307
2263
// FIXME(android): `sa_sigaction` has type `sighandler_t` but that type is
@@ -2504,9 +2460,6 @@ fn test_freebsd(target: &str) {
2504
2460
2505
2461
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
2506
2462
2507
- // sigval is a struct in Rust, but a union in C:
2508
- "sigval" => "union sigval" . to_string ( ) ,
2509
-
2510
2463
// put `struct` in front of all structs:.
2511
2464
t if is_struct => format ! ( "struct {t}" ) ,
2512
2465
@@ -3140,9 +3093,6 @@ fn test_emscripten(target: &str) {
3140
3093
return true ;
3141
3094
}
3142
3095
match ty {
3143
- // This is actually a union, not a struct
3144
- "sigval" => true ,
3145
-
3146
3096
// FIXME(emscripten): Investigate why the test fails.
3147
3097
// Skip for now to unblock CI.
3148
3098
"pthread_condattr_t" => true ,
@@ -3221,9 +3171,7 @@ fn test_emscripten(target: &str) {
3221
3171
// This is a weird union, don't check the type.
3222
3172
( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
3223
3173
// sighandler_t type is super weird
3224
- ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
3225
- // sigval is actually a union, but we pretend it's a struct
3226
- ( struct_ == "sigevent" && field == "sigev_value" )
3174
+ ( struct_ == "sigaction" && field == "sa_sigaction" )
3227
3175
} ) ;
3228
3176
3229
3177
cfg. skip_field ( move |struct_, field| {
@@ -3436,9 +3384,6 @@ fn test_neutrino(target: &str) {
3436
3384
match ty {
3437
3385
"Elf64_Phdr" | "Elf32_Phdr" => true ,
3438
3386
3439
- // FIXME(union): This is actually a union, not a struct
3440
- "sigval" => true ,
3441
-
3442
3387
// union
3443
3388
"_channel_connect_attr" => true ,
3444
3389
@@ -3493,8 +3438,6 @@ fn test_neutrino(target: &str) {
3493
3438
} ) ;
3494
3439
3495
3440
cfg. skip_field_type ( move |struct_, field| {
3496
- // sigval is actually a union, but we pretend it's a struct
3497
- struct_ == "sigevent" && field == "sigev_value" ||
3498
3441
// Anonymous structures
3499
3442
struct_ == "_idle_hook" && field == "time"
3500
3443
} ) ;
@@ -3505,8 +3448,6 @@ fn test_neutrino(target: &str) {
3505
3448
( "__sched_param" , "reserved" )
3506
3449
| ( "sched_param" , "reserved" )
3507
3450
| ( "sigevent" , "__padding1" ) // ensure alignment
3508
- | ( "sigevent" , "__padding2" ) // union
3509
- | ( "sigevent" , "__sigev_un2" ) // union
3510
3451
| ( "sigaction" , "sa_sigaction" ) // sighandler_t type is super weird
3511
3452
| ( "syspage_entry" , "__reserved" ) // does not exist
3512
3453
)
@@ -3611,10 +3552,8 @@ fn test_vxworks(target: &str) {
3611
3552
3612
3553
// FIXME(vxworks)
3613
3554
cfg. skip_fn ( move |name| match name {
3614
- // sigval
3615
- "sigqueue" | "_sigqueue"
3616
3555
// sighandler_t
3617
- | "signal"
3556
+ "signal"
3618
3557
// not used in static linking by default
3619
3558
| "dlerror" => true ,
3620
3559
_ => false ,
@@ -4051,9 +3990,6 @@ fn test_linux(target: &str) {
4051
3990
// which is absent in glibc, has to be defined.
4052
3991
"__timeval" => true ,
4053
3992
4054
- // FIXME(union): This is actually a union, not a struct
4055
- "sigval" => true ,
4056
-
4057
3993
// This type is tested in the `linux_termios.rs` file since there
4058
3994
// are header conflicts when including them with all the other
4059
3995
// structs.
@@ -4779,8 +4715,6 @@ fn test_linux(target: &str) {
4779
4715
( struct_ == "sigaction" && field == "sa_sigaction" ) ||
4780
4716
// __timeval type is a patch which doesn't exist in glibc
4781
4717
( struct_ == "utmpx" && field == "ut_tv" ) ||
4782
- // sigval is actually a union, but we pretend it's a struct
4783
- ( struct_ == "sigevent" && field == "sigev_value" ) ||
4784
4718
// this one is an anonymous union
4785
4719
( struct_ == "ff_effect" && field == "u" ) ||
4786
4720
// `__exit_status` type is a patch which is absent in musl
@@ -5261,8 +5195,6 @@ fn test_haiku(target: &str) {
5261
5195
return true ;
5262
5196
}
5263
5197
match ty {
5264
- // FIXME(union): actually a union
5265
- "sigval" => true ,
5266
5198
// FIXME(haiku): locale_t does not exist on Haiku
5267
5199
"locale_t" => true ,
5268
5200
// FIXME(haiku): rusage has a different layout on Haiku
@@ -5369,10 +5301,8 @@ fn test_haiku(target: &str) {
5369
5301
( "stat" , "st_crtime_nsec" ) => true ,
5370
5302
5371
5303
// these are actually unions, but we cannot represent it well
5372
- ( "siginfo_t" , "sigval" ) => true ,
5373
5304
( "sem_t" , "named_sem_id" ) => true ,
5374
5305
( "sigaction" , "sa_sigaction" ) => true ,
5375
- ( "sigevent" , "sigev_value" ) => true ,
5376
5306
( "fpu_state" , "_fpreg" ) => true ,
5377
5307
( "cpu_topology_node_info" , "data" ) => true ,
5378
5308
// these fields have a simplified data definition in libc
@@ -5423,8 +5353,6 @@ fn test_haiku(target: &str) {
5423
5353
ty. to_string ( )
5424
5354
}
5425
5355
5426
- // is actually a union
5427
- "sigval" => "union sigval" . to_string ( ) ,
5428
5356
t if is_union => format ! ( "union {t}" ) ,
5429
5357
t if t. ends_with ( "_t" ) => t. to_string ( ) ,
5430
5358
t if is_struct => format ! ( "struct {t}" ) ,
0 commit comments