@@ -293,9 +293,6 @@ fn test_apple(target: &str) {
293293 return true ;
294294 }
295295 match ty {
296- // FIXME: actually a union
297- "sigval" => true ,
298-
299296 // FIXME: The size is changed in recent macOSes.
300297 "malloc_zone_t" => true ,
301298 // it is a moving target, changing through versions
@@ -391,14 +388,6 @@ fn test_apple(target: &str) {
391388 }
392389 } ) ;
393390
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-
402391 cfg. volatile_item ( |i| {
403392 use ctest:: VolatileItemKind :: * ;
404393 match i {
@@ -538,27 +527,6 @@ fn test_openbsd(target: &str) {
538527 "sys/param.h" ,
539528 }
540529
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-
562530 cfg. skip_fn ( move |name| {
563531 match name {
564532 // futex() has volatile arguments, but that doesn't exist in Rust.
@@ -953,8 +921,6 @@ fn test_solarish(target: &str) {
953921 return true ;
954922 }
955923 match ty {
956- // union, not a struct
957- "sigval" => true ,
958924 // a bunch of solaris-only fields
959925 "utmpx" if is_illumos => true ,
960926 _ => false ,
@@ -974,8 +940,6 @@ fn test_solarish(target: &str) {
974940 "sigaction" if field == "sa_sigaction" => true ,
975941 // Missing in illumos
976942 "sigevent" if field == "ss_sp" => true ,
977- // Avoid sigval union issues
978- "sigevent" if field == "sigev_value" => true ,
979943 // const issues
980944 "sigevent" if field == "sigev_notify_attributes" => true ,
981945
@@ -1198,8 +1162,6 @@ fn test_netbsd(target: &str) {
11981162
11991163 cfg. skip_struct ( move |ty| {
12001164 match ty {
1201- // This is actually a union, not a struct
1202- "sigval" => true ,
12031165 // These are tested as part of the linux_fcntl tests since there are
12041166 // header conflicts when including them with all the other structs.
12051167 "termios2" => true ,
@@ -1250,8 +1212,6 @@ fn test_netbsd(target: &str) {
12501212 ( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
12511213 // sighandler_t type is super weird
12521214 ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1253- // sigval is actually a union, but we pretend it's a struct
1254- ( struct_ == "sigevent" && field == "sigev_value" ) ||
12551215 // aio_buf is "volatile void*" and Rust doesn't understand volatile
12561216 ( struct_ == "aiocb" && field == "aio_buf" )
12571217 } ) ;
@@ -1380,9 +1340,6 @@ fn test_dragonflybsd(target: &str) {
13801340
13811341 t if t. ends_with ( "_t" ) => t. to_string ( ) ,
13821342
1383- // sigval is a struct in Rust, but a union in C:
1384- "sigval" => format ! ( "union sigval" ) ,
1385-
13861343 // put `struct` in front of all structs:.
13871344 t if is_struct => format ! ( "struct {}" , t) ,
13881345
@@ -1476,8 +1433,6 @@ fn test_dragonflybsd(target: &str) {
14761433 ( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
14771434 // sighandler_t type is super weird
14781435 ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
1479- // sigval is actually a union, but we pretend it's a struct
1480- ( struct_ == "sigevent" && field == "sigev_value" ) ||
14811436 // aio_buf is "volatile void*" and Rust doesn't understand volatile
14821437 ( struct_ == "aiocb" && field == "aio_buf" )
14831438 } ) ;
@@ -1768,9 +1723,6 @@ fn test_android(target: &str) {
17681723
17691724 t if t. ends_with ( "_t" ) => t. to_string ( ) ,
17701725
1771- // sigval is a struct in Rust, but a union in C:
1772- "sigval" => format ! ( "union sigval" ) ,
1773-
17741726 // put `struct` in front of all structs:.
17751727 t if is_struct => format ! ( "struct {}" , t) ,
17761728
@@ -2061,8 +2013,6 @@ fn test_android(target: &str) {
20612013 cfg. skip_field_type ( move |struct_, field| {
20622014 // This is a weird union, don't check the type.
20632015 ( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
2064- // sigval is actually a union, but we pretend it's a struct
2065- ( struct_ == "sigevent" && field == "sigev_value" ) ||
20662016 // this one is an anonymous union
20672017 ( struct_ == "ff_effect" && field == "u" ) ||
20682018 // FIXME: `sa_sigaction` has type `sighandler_t` but that type is
@@ -2268,9 +2218,6 @@ fn test_freebsd(target: &str) {
22682218
22692219 t if t. ends_with ( "_t" ) => t. to_string ( ) ,
22702220
2271- // sigval is a struct in Rust, but a union in C:
2272- "sigval" => format ! ( "union sigval" ) ,
2273-
22742221 // put `struct` in front of all structs:.
22752222 t if is_struct => format ! ( "struct {}" , t) ,
22762223
@@ -2890,13 +2837,13 @@ fn test_emscripten(target: &str) {
28902837
28912838 cfg. skip_struct ( move |ty| {
28922839 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 ,
28952843
28962844 // FIXME: Investigate why the test fails.
28972845 // Skip for now to unblock CI.
28982846 "pthread_condattr_t" => true ,
2899- "pthread_mutexattr_t" => true ,
29002847
29012848 // No epoll support
29022849 // https://github.com/emscripten-core/emscripten/issues/5033
@@ -2969,8 +2916,9 @@ fn test_emscripten(target: &str) {
29692916 ( struct_ == "ifaddrs" && field == "ifa_ifu" ) ||
29702917 // sighandler_t type is super weird
29712918 ( 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" )
29742922 } ) ;
29752923
29762924 cfg. skip_field ( move |struct_, field| {
@@ -3164,9 +3112,6 @@ fn test_neutrino(target: &str) {
31643112 match ty {
31653113 "Elf64_Phdr" | "Elf32_Phdr" => true ,
31663114
3167- // FIXME: This is actually a union, not a struct
3168- "sigval" => true ,
3169-
31703115 // union
31713116 "_channel_connect_attr" => true ,
31723117
@@ -3218,8 +3163,6 @@ fn test_neutrino(target: &str) {
32183163 } ) ;
32193164
32203165 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" ||
32233166 // Anonymous structures
32243167 struct_ == "_idle_hook" && field == "time"
32253168 } ) ;
@@ -3228,8 +3171,6 @@ fn test_neutrino(target: &str) {
32283171 ( struct_ == "__sched_param" && field == "reserved" ) ||
32293172 ( struct_ == "sched_param" && field == "reserved" ) ||
32303173 ( struct_ == "sigevent" && field == "__padding1" ) || // ensure alignment
3231- ( struct_ == "sigevent" && field == "__padding2" ) || // union
3232- ( struct_ == "sigevent" && field == "__sigev_un2" ) || // union
32333174 // sighandler_t type is super weird
32343175 ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
32353176 // does not exist
@@ -3338,10 +3279,8 @@ fn test_vxworks(target: &str) {
33383279
33393280 // FIXME
33403281 cfg. skip_fn ( move |name| match name {
3341- // sigval
3342- "sigqueue" | "_sigqueue"
33433282 // sighandler_t
3344- | "signal"
3283+ "signal"
33453284 // not used in static linking by default
33463285 | "dlerror" => true ,
33473286 _ => false ,
@@ -3747,9 +3686,6 @@ fn test_linux(target: &str) {
37473686 // which is absent in glibc, has to be defined.
37483687 "__timeval" => true ,
37493688
3750- // FIXME: This is actually a union, not a struct
3751- "sigval" => true ,
3752-
37533689 // This type is tested in the `linux_termios.rs` file since there
37543690 // are header conflicts when including them with all the other
37553691 // structs.
@@ -4415,8 +4351,6 @@ fn test_linux(target: &str) {
44154351 ( struct_ == "sigaction" && field == "sa_sigaction" ) ||
44164352 // __timeval type is a patch which doesn't exist in glibc
44174353 ( struct_ == "utmpx" && field == "ut_tv" ) ||
4418- // sigval is actually a union, but we pretend it's a struct
4419- ( struct_ == "sigevent" && field == "sigev_value" ) ||
44204354 // this one is an anonymous union
44214355 ( struct_ == "ff_effect" && field == "u" ) ||
44224356 // `__exit_status` type is a patch which is absent in musl
@@ -4860,8 +4794,6 @@ fn test_haiku(target: &str) {
48604794 return true ;
48614795 }
48624796 match ty {
4863- // FIXME: actually a union
4864- "sigval" => true ,
48654797 // FIXME: locale_t does not exist on Haiku
48664798 "locale_t" => true ,
48674799 // FIXME: rusage has a different layout on Haiku
@@ -4968,10 +4900,8 @@ fn test_haiku(target: &str) {
49684900 ( "stat" , "st_crtime_nsec" ) => true ,
49694901
49704902 // these are actually unions, but we cannot represent it well
4971- ( "siginfo_t" , "sigval" ) => true ,
49724903 ( "sem_t" , "named_sem_id" ) => true ,
49734904 ( "sigaction" , "sa_sigaction" ) => true ,
4974- ( "sigevent" , "sigev_value" ) => true ,
49754905 ( "fpu_state" , "_fpreg" ) => true ,
49764906 ( "cpu_topology_node_info" , "data" ) => true ,
49774907 // these fields have a simplified data definition in libc
@@ -5022,8 +4952,6 @@ fn test_haiku(target: &str) {
50224952 ty. to_string ( )
50234953 }
50244954
5025- // is actually a union
5026- "sigval" => format ! ( "union sigval" ) ,
50274955 t if is_union => format ! ( "union {}" , t) ,
50284956 t if t. ends_with ( "_t" ) => t. to_string ( ) ,
50294957 t if is_struct => format ! ( "struct {}" , t) ,
0 commit comments