@@ -622,9 +622,12 @@ fn test_openbsd(target: &str) {
622622 "KERN_MAXID" | "NET_RT_MAXID" => true ,
623623 "EV_SYSFLAGS" => true ,
624624
625- // Removed in OpenBSD 7.7 (unused since 1991)
625+ // Removed in OpenBSD 7.7
626626 "ATF_COM" | "ATF_PERM" | "ATF_PUBL" | "ATF_USETRAILERS" => true ,
627627
628+ // Removed in OpenBSD 7.8
629+ "CTL_FS" | "SO_NETPROC" => true ,
630+
628631 _ => false ,
629632 }
630633 } ) ;
@@ -3689,22 +3692,37 @@ fn test_vxworks(target: &str) {
36893692}
36903693
36913694fn config_gnu_bits ( target : & str , cfg : & mut ctest:: TestGenerator ) {
3692- match env:: var ( "RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS" ) {
3693- Ok ( val) if val == "64" => {
3694- if target. contains ( "gnu" )
3695- && target. contains ( "linux" )
3696- && !target. ends_with ( "x32" )
3697- && !target. contains ( "riscv32" )
3698- && env:: var ( "CARGO_CFG_TARGET_POINTER_WIDTH" ) . unwrap ( ) == "32"
3699- {
3695+ let pointer_width = env:: var ( "CARGO_CFG_TARGET_POINTER_WIDTH" ) . unwrap_or_default ( ) ;
3696+ if target. contains ( "gnu" )
3697+ && target. contains ( "linux" )
3698+ && !target. ends_with ( "x32" )
3699+ && !target. contains ( "riscv32" )
3700+ && pointer_width == "32"
3701+ {
3702+ match env:: var ( "RUST_LIBC_UNSTABLE_GNU_TIME_BITS" ) {
3703+ Ok ( val) if val == "64" => {
37003704 cfg. define ( "_FILE_OFFSET_BITS" , Some ( "64" ) ) ;
3705+ cfg. define ( "_TIME_BITS" , Some ( "64" ) ) ;
37013706 cfg. cfg ( "gnu_file_offset_bits64" , None ) ;
3707+ cfg. cfg ( "linux_time_bits64" , None ) ;
3708+ cfg. cfg ( "gnu_time_bits64" , None ) ;
3709+ }
3710+ Ok ( val) if val != "32" => {
3711+ panic ! ( "RUST_LIBC_UNSTABLE_GNU_TIME_BITS may only be set to '32' or '64'" )
3712+ }
3713+ _ => {
3714+ match env:: var ( "RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS" ) {
3715+ Ok ( val) if val == "64" => {
3716+ cfg. define ( "_FILE_OFFSET_BITS" , Some ( "64" ) ) ;
3717+ cfg. cfg ( "gnu_file_offset_bits64" , None ) ;
3718+ }
3719+ Ok ( val) if val != "32" => {
3720+ panic ! ( "RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS may only be set to '32' or '64'" )
3721+ }
3722+ _ => { }
3723+ }
37023724 }
37033725 }
3704- Ok ( val) if val != "32" => {
3705- panic ! ( "RUST_LIBC_UNSTABLE_GNU_FILE_OFFSET_BITS may only be set to '32' or '64'" )
3706- }
3707- _ => { }
37083726 }
37093727}
37103728
@@ -5607,9 +5625,9 @@ fn test_aix(target: &str) {
56075625 } ) ;
56085626
56095627 cfg. type_name ( move |ty, is_struct, is_union| match ty {
5610- "DIR" => ty. to_string ( ) ,
5611- "FILE" => ty. to_string ( ) ,
5612- "ACTION" => ty. to_string ( ) ,
5628+ "DIR" => ty. to_string ( ) ,
5629+ "FILE" => ty. to_string ( ) ,
5630+ "ACTION" => ty. to_string ( ) ,
56135631
56145632 // 'sigval' is a struct in Rust, but a union in C.
56155633 "sigval" => format ! ( "union sigval" ) ,
@@ -5696,9 +5714,9 @@ fn test_aix(target: &str) {
56965714 // POSIX-compliant versions in the system libc. As a result,
56975715 // function pointer comparisons between the C and Rust sides
56985716 // would fail.
5699- "getpwuid_r" | "getpwnam_r" | "getgrgid_r" | "getgrnam_r"
5700- | "aio_cancel " | "aio_error " | "aio_fsync " | "aio_read "
5701- | "aio_return" | "aio_suspend" | " aio_write" | "select" => true ,
5717+ "getpwuid_r" | "getpwnam_r" | "getgrgid_r" | "getgrnam_r" | "aio_cancel"
5718+ | "aio_error " | "aio_fsync " | "aio_read " | "aio_return" | "aio_suspend "
5719+ | "aio_write" | "select" => true ,
57025720
57035721 // 'getdtablesize' is a constant in the AIX header but it is
57045722 // a real function in libc which the Rust side is resolved to.
@@ -5715,7 +5733,6 @@ fn test_aix(target: &str) {
57155733 }
57165734 } ) ;
57175735
5718-
57195736 cfg. volatile_item ( |i| {
57205737 use ctest:: VolatileItemKind :: * ;
57215738 match i {
0 commit comments