diff --git a/libc-test/build.rs b/libc-test/build.rs index a31d6ba4878ba..8f7072177c87d 100644 --- a/libc-test/build.rs +++ b/libc-test/build.rs @@ -356,9 +356,6 @@ fn test_apple(target: &str) { // FIXME(macos): Requires the macOS 14.4 SDK. "os_sync_wake_by_address_flags_t" | "os_sync_wait_on_address_flags_t" => true, - // FIXME(macos): "'__uint128' undeclared" in C - "__uint128" => true, - _ => false, } }); @@ -2037,8 +2034,6 @@ fn test_android(target: &str) { "posix_spawn_file_actions_t" => true, "posix_spawnattr_t" => true, - // FIXME(android): "'__uint128' undeclared" in C - "__uint128" => true, // Added in API level 24 "if_nameindex" => true, @@ -3413,9 +3408,6 @@ fn test_neutrino(target: &str) { // Does not exist in Neutrino "locale_t" => true, - // FIXME: "'__uint128' undeclared" in C - "__uint128" => true, - _ => false, } }); @@ -3955,9 +3947,6 @@ fn test_linux(target: &str) { // specific type. "Ioctl" => true, - // FIXME: "'__uint128' undeclared" in C - "__uint128" => true, - t => { if musl { // LFS64 types have been removed in musl 1.2.4+ @@ -5525,9 +5514,9 @@ fn test_aix(target: &str) { }); cfg.type_name(move |ty, is_struct, is_union| match ty { - "DIR" => ty.to_string(), - "FILE" => ty.to_string(), - "ACTION" => ty.to_string(), + "DIR" => ty.to_string(), + "FILE" => ty.to_string(), + "ACTION" => ty.to_string(), // 'sigval' is a struct in Rust, but a union in C. "sigval" => format!("union sigval"), @@ -5614,9 +5603,9 @@ fn test_aix(target: &str) { // POSIX-compliant versions in the system libc. As a result, // function pointer comparisons between the C and Rust sides // would fail. - "getpwuid_r" | "getpwnam_r" | "getgrgid_r" | "getgrnam_r" - | "aio_cancel" | "aio_error" | "aio_fsync" | "aio_read" - | "aio_return" | "aio_suspend" | "aio_write" | "select" => true, + "getpwuid_r" | "getpwnam_r" | "getgrgid_r" | "getgrnam_r" | "aio_cancel" + | "aio_error" | "aio_fsync" | "aio_read" | "aio_return" | "aio_suspend" + | "aio_write" | "select" => true, // 'getdtablesize' is a constant in the AIX header but it is // a real function in libc which the Rust side is resolved to. @@ -5633,7 +5622,6 @@ fn test_aix(target: &str) { } }); - cfg.volatile_item(|i| { use ctest::VolatileItemKind::*; match i { diff --git a/src/primitives.rs b/src/primitives.rs index 78b14b52ef1f2..a9821f42c748c 100644 --- a/src/primitives.rs +++ b/src/primitives.rs @@ -129,12 +129,16 @@ cfg_if! { // [0]: https://github.com/rust-lang/rust/issues/54341 /// C `__int128` (a GCC extension that's part of many ABIs) + #[deprecated(since = "0.2.172", note = "Use i128 instead.")] pub type __int128 = i128; /// C `unsigned __int128` (a GCC extension that's part of many ABIs) + #[deprecated(since = "0.2.172", note = "Use u128 instead.")] pub type __uint128 = u128; /// C __int128_t (alternate name for [__int128][]) + #[deprecated(since = "0.2.172", note = "Use i128 instead.")] pub type __int128_t = i128; /// C __uint128_t (alternate name for [__uint128][]) + #[deprecated(since = "0.2.172", note = "Use u128 instead.")] pub type __uint128_t = u128; // NOTE: if you add more platforms to here, you may need to cfg @@ -181,8 +185,10 @@ cfg_if! { ) ))] { /// C `__int128_t` + #[deprecated(since = "0.2.172", note = "Use i128 instead.")] pub type __int128_t = i128; /// C `__uint128_t` + #[deprecated(since = "0.2.172", note = "Use ux128 instead.")] pub type __uint128_t = u128; } } diff --git a/src/unix/bsd/apple/b64/aarch64/mod.rs b/src/unix/bsd/apple/b64/aarch64/mod.rs index e300b76ae8228..45bab300eb917 100644 --- a/src/unix/bsd/apple/b64/aarch64/mod.rs +++ b/src/unix/bsd/apple/b64/aarch64/mod.rs @@ -40,7 +40,7 @@ s! { } pub struct __darwin_arm_neon_state64 { - pub __v: [crate::__uint128_t; 32], + pub __v: [u128; 32], pub __fpsr: u32, pub __fpcr: u32, } diff --git a/src/unix/linux_like/android/b64/aarch64/mod.rs b/src/unix/linux_like/android/b64/aarch64/mod.rs index b678eb8da6aa4..47d7208b0b9ae 100644 --- a/src/unix/linux_like/android/b64/aarch64/mod.rs +++ b/src/unix/linux_like/android/b64/aarch64/mod.rs @@ -78,7 +78,7 @@ s! { } pub struct user_fpsimd_struct { - pub vregs: [crate::__uint128_t; 32], + pub vregs: [u128; 32], pub fpsr: u32, pub fpcr: u32, } diff --git a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs index 0e990f6006378..f0e64cabfa284 100644 --- a/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/gnu/b64/aarch64/mod.rs @@ -218,7 +218,7 @@ s! { } pub struct user_fpsimd_struct { - pub vregs: [crate::__uint128_t; 32], + pub vregs: [u128; 32], pub fpsr: c_uint, pub fpcr: c_uint, } diff --git a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs index 243247edafc46..1addefbb6af24 100644 --- a/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs +++ b/src/unix/linux_like/linux/musl/b64/aarch64/mod.rs @@ -122,7 +122,7 @@ s! { } pub struct user_fpsimd_struct { - pub vregs: [crate::__uint128_t; 32], + pub vregs: [u128; 32], pub fpsr: u32, pub fpcr: u32, }