From e16db76505aa0fd4206758a8f476704e29296908 Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Tue, 16 Jun 2026 10:27:41 +0200 Subject: [PATCH] l4re: change bitwidths of file offset types This patch makes a few changes to the file offset types and routines that are made available under the `unix/linux_like/l4re` module. The current upstream definitions under x86_64 and AArch64 are unconditionally 64-bit. Then there's the fact there's only one target officially supported by rustc under L4Re, and that's x86_64. --- src/unix/linux_like/l4re/mod.rs | 26 ++- .../linux_like/l4re/uclibc/aarch64/mod.rs | 60 +++--- src/unix/linux_like/l4re/uclibc/mod.rs | 79 +++----- src/unix/linux_like/l4re/uclibc/x86_64/mod.rs | 49 ++--- src/unix/linux_like/linux_l4re_shared.rs | 61 +++++- src/unix/linux_like/mod.rs | 191 ++++++++++++++++++ 6 files changed, 353 insertions(+), 113 deletions(-) diff --git a/src/unix/linux_like/l4re/mod.rs b/src/unix/linux_like/l4re/mod.rs index 5ac4868f7d1c2..d131b06b8b8ab 100644 --- a/src/unix/linux_like/l4re/mod.rs +++ b/src/unix/linux_like/l4re/mod.rs @@ -10,10 +10,6 @@ pub type pthread_t = *mut c_void; pub type dev_t = u64; pub type socklen_t = u32; pub type mode_t = u32; -pub type ino64_t = u64; -pub type off64_t = i64; -pub type blkcnt64_t = i64; -pub type rlim64_t = u64; pub type nfds_t = c_ulong; pub type nl_item = c_int; pub type idtype_t = c_uint; @@ -22,6 +18,28 @@ pub type pthread_key_t = c_uint; pub type pthread_once_t = c_int; pub type pthread_spinlock_t = c_int; +#[deprecated( + since = "0.2.187", + note = "Use `ino_t` instead. 64-bit targets alias both types." +)] +pub type ino64_t = u64; +#[deprecated( + since = "0.2.187", + note = "Use `off_t` instead. No matter the target platform, off_t is always 64-bits wide, and \ + the `libc` crate is phasing out support for unsuffixed types." +)] +pub type off64_t = i64; +#[deprecated( + since = "0.2.187", + note = "Use `blkcnt_t` instead. 64-bit targets alias both types." +)] +pub type blkcnt64_t = i64; +#[deprecated( + since = "0.2.187", + note = "Use `rlim_t` instead. 64-bit targets alias both types." +)] +pub type rlim64_t = u64; + s! { /// CPU sets. pub struct l4_sched_cpu_set_t { diff --git a/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs b/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs index 3a471700f6437..e8070e858918a 100644 --- a/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs +++ b/src/unix/linux_like/l4re/uclibc/aarch64/mod.rs @@ -15,64 +15,58 @@ pub type suseconds_t = c_long; pub type blksize_t = c_long; pub type blkcnt_t = c_long; +#[deprecated( + since = "0.2.187", + note = "Use `fsblkcnt_t` instead. The unsuffixed type is defined in terms of the suffixed type \ + upstream under the current target architecture (x86_64,) and support for suffixed \ + types is phasing out in the `libc` crate." +)] pub type fsblkcnt64_t = c_ulong; +#[deprecated( + since = "0.2.187", + note = "Use `fsfilcnt_t` instead. The unsuffixed type is defined in terms of the suffixed type \ + upstream under the current target architecture (x86_64,) and support for suffixed \ + types is phasing out in the `libc` crate." +)] pub type fsfilcnt64_t = c_ulong; pub type __u64 = c_ulong; +pub type flock64 = flock; +pub type stat64 = stat; + s! { pub struct stat { - pub st_dev: c_ulong, - pub __pad1: c_ushort, + pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, - pub st_mode: crate::mode_t, pub st_nlink: nlink_t, - pub st_uid: crate::uid_t, - pub st_gid: crate::gid_t, - pub st_rdev: c_ulong, - pub __pad2: c_ushort, - pub st_size: crate::off64_t, - pub st_blksize: blksize_t, - pub st_blocks: crate::blkcnt64_t, - pub st_atim: crate::timespec, - pub st_mtim: crate::timespec, - pub st_ctim: crate::timespec, - pub __uclibc_unused4: c_ulong, - pub __uclibc_unused5: c_ulong, - } - - pub struct stat64 { - pub st_dev: c_ulong, - pub __pad1: c_uint, - pub __st_ino: crate::ino_t, pub st_mode: crate::mode_t, - pub st_nlink: nlink_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, - pub st_rdev: c_ulong, - pub __pad2: c_uint, - pub st_size: crate::off64_t, - pub st_blksize: blksize_t, - pub st_blocks: crate::blkcnt64_t, + __pad0: Padding, + pub st_rdev: crate::dev_t, + pub st_size: crate::off_t, + pub st_blksize: crate::blksize_t, + pub st_blocks: crate::blkcnt_t, pub st_atim: crate::timespec, pub st_mtim: crate::timespec, pub st_ctim: crate::timespec, - pub st_ino: crate::ino64_t, + __uclibc_unused: Padding<[c_long; 3]>, } pub struct shmid_ds { pub shm_perm: crate::ipc_perm, pub shm_segsz: crate::size_t, pub shm_atime: crate::time_t, - __unused1: c_ulong, + __unused1: Padding, pub shm_dtime: crate::time_t, - __unused2: c_ulong, + __unused2: Padding, pub shm_ctime: crate::time_t, - __unused3: c_ulong, + __unused3: Padding, pub shm_cpid: crate::pid_t, pub shm_lpid: crate::pid_t, pub shm_nattch: crate::shmatt_t, - __unused4: c_ulong, - __unused5: c_ulong, + __unused4: Padding, + __unused5: Padding, } #[allow(unpredictable_function_pointer_comparisons)] diff --git a/src/unix/linux_like/l4re/uclibc/mod.rs b/src/unix/linux_like/l4re/uclibc/mod.rs index b3dba2c37766c..df18a0f3d83d1 100644 --- a/src/unix/linux_like/l4re/uclibc/mod.rs +++ b/src/unix/linux_like/l4re/uclibc/mod.rs @@ -1,4 +1,3 @@ -use crate::off64_t; use crate::prelude::*; pub type shmatt_t = c_ulong; @@ -10,6 +9,9 @@ pub type __priority_which_t = c_uint; pub type _pthread_descr = *mut c_void; pub type __pthread_cond_align_t = c_long; +pub type statfs64 = statfs; +pub type statvfs64 = statvfs; + cfg_if! { if #[cfg(doc)] { // Used in `linux::arch` to define ioctl constants. @@ -44,48 +46,18 @@ s! { } pub struct statfs { - pub f_type: fsword_t, - pub f_bsize: fsword_t, + pub f_type: c_long, + pub f_bsize: c_long, pub f_blocks: crate::fsblkcnt_t, pub f_bfree: crate::fsblkcnt_t, pub f_bavail: crate::fsblkcnt_t, pub f_files: crate::fsfilcnt_t, pub f_ffree: crate::fsfilcnt_t, pub f_fsid: crate::fsid_t, - pub f_namelen: fsword_t, - pub f_frsize: fsword_t, - pub f_flags: fsword_t, - pub f_spare: [fsword_t; 4], - } - - pub struct statfs64 { - pub f_type: fsword_t, - pub f_bsize: fsword_t, - pub f_blocks: crate::fsblkcnt64_t, - pub f_bfree: crate::fsblkcnt64_t, - pub f_bavail: crate::fsblkcnt64_t, - pub f_files: crate::fsfilcnt64_t, - pub f_ffree: crate::fsfilcnt64_t, - pub f_fsid: crate::fsid_t, - pub f_namelen: fsword_t, - pub f_frsize: fsword_t, - pub f_flags: fsword_t, - pub f_spare: [fsword_t; 4], - } - - pub struct statvfs64 { - pub f_bsize: c_ulong, - pub f_frsize: c_ulong, - pub f_blocks: crate::fsfilcnt64_t, - pub f_bfree: crate::fsfilcnt64_t, - pub f_bavail: crate::fsfilcnt64_t, - pub f_files: crate::fsfilcnt64_t, - pub f_ffree: crate::fsfilcnt64_t, - pub f_favail: crate::fsfilcnt64_t, - pub f_fsid: c_ulong, - pub f_flag: c_ulong, - pub f_namemax: c_ulong, - pub __f_spare: [c_int; 6], + pub f_namelen: c_long, + pub f_frsize: c_long, + pub f_flags: c_long, + pub f_spare: [c_long; 4], } pub struct ipc_perm { @@ -99,11 +71,11 @@ s! { #[cfg(target_pointer_width = "64")] pub mode: c_uint, #[cfg(target_pointer_width = "32")] - __pad1: c_ushort, + __pad1: Padding, pub __seq: c_ushort, - __pad2: c_ushort, - __unused1: c_ulong, - __unused2: c_ulong, + __pad2: Padding, + __unused1: Padding, + __unused2: Padding, } pub struct statvfs { @@ -116,15 +88,12 @@ s! { pub f_files: crate::fsfilcnt_t, pub f_ffree: crate::fsfilcnt_t, pub f_favail: crate::fsfilcnt_t, - #[cfg(target_endian = "little")] pub f_fsid: c_ulong, #[cfg(target_pointer_width = "32")] - __f_unused: c_int, - #[cfg(target_endian = "big")] - pub f_fsid: c_ulong, + __f_unused: Padding, pub f_flag: c_ulong, pub f_namemax: c_ulong, - __f_spare: [c_int; 6], + __f_spare: Padding<[c_int; 6]>, } pub struct sysinfo { @@ -513,10 +482,24 @@ extern "C" { flags: c_int, ) -> c_int; - pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t; - pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off64_t) -> ssize_t; + pub fn pwritev(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + pub fn preadv(fd: c_int, iov: *const crate::iovec, iovcnt: c_int, offset: off_t) -> ssize_t; + #[deprecated( + since = "0.2.187", + note = "Use `getrlimit` instead. Upstream `#define`s the unsuffixed variants in terms of \ + the suffixed variants under builds that use the default configurations. Support for \ + suffixed symbols is being phased out in the `libc` crate." + )] + #[allow(deprecated)] pub fn getrlimit64(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit64) -> c_int; + #[deprecated( + since = "0.2.187", + note = "Use `setrlimit` instead. Upstream `#define`s the unsuffixed variants in terms of \ + the suffixed variants under builds that use the default configurations. Support for \ + suffixed symbols is being phased out in the `libc` crate." + )] + #[allow(deprecated)] pub fn setrlimit64(resource: crate::__rlimit_resource_t, rlim: *const crate::rlimit64) -> c_int; pub fn getrlimit(resource: crate::__rlimit_resource_t, rlim: *mut crate::rlimit) -> c_int; diff --git a/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs b/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs index bb4b2ed4a6fea..83315e16f7539 100644 --- a/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs +++ b/src/unix/linux_like/l4re/uclibc/x86_64/mod.rs @@ -17,49 +17,44 @@ pub type suseconds_t = c_long; pub type blksize_t = c_long; pub type blkcnt_t = c_long; +#[deprecated( + since = "0.2.187", + note = "Use `fsblkcnt_t` instead. The unsuffixed type is defined in terms of the suffixed type \ + upstream under the current target architecture (x86_64,) and support for suffixed \ + types is phasing out in the `libc` crate." +)] pub type fsblkcnt64_t = c_ulong; +#[deprecated( + since = "0.2.187", + note = "Use `fsfilcnt_t` instead. The unsuffixed type is defined in terms of the suffixed type \ + upstream under the current target architecture (x86_64,) and support for suffixed \ + types is phasing out in the `libc` crate." +)] pub type fsfilcnt64_t = c_ulong; pub type __u32 = c_uint; pub type __u64 = c_ulong; +pub type stat64 = stat; +pub type flock64 = flock; + s! { pub struct stat { - pub st_dev: c_ulong, - pub st_ino: crate::ino_t, - // According to uclibc/libc/sysdeps/linux/x86_64/bits/stat.h, order of - // nlink and mode are swapped on 64 bit systems. - pub st_nlink: nlink_t, - pub st_mode: crate::mode_t, - pub st_uid: crate::uid_t, - pub st_gid: crate::gid_t, - __pad0: c_int, - pub st_rdev: c_ulong, - pub st_size: crate::off_t, - pub st_blksize: crate::blksize_t, - pub st_blocks: crate::blkcnt64_t, - pub st_atim: crate::timespec, - pub st_mtim: crate::timespec, - pub st_ctim: crate::timespec, - __uclibc_unused: [c_long; 3], - } - - pub struct stat64 { - pub st_dev: c_ulong, + pub st_dev: crate::dev_t, pub st_ino: crate::ino_t, pub st_nlink: nlink_t, pub st_mode: crate::mode_t, pub st_uid: crate::uid_t, pub st_gid: crate::gid_t, - __pad0: c_int, - pub st_rdev: c_ulong, + __pad0: Padding, + pub st_rdev: crate::dev_t, pub st_size: crate::off_t, pub st_blksize: crate::blksize_t, - pub st_blocks: crate::blkcnt64_t, + pub st_blocks: crate::blkcnt_t, pub st_atim: crate::timespec, pub st_mtim: crate::timespec, pub st_ctim: crate::timespec, - st_pad4: [c_long; 3], + __uclibc_unused: Padding<[c_long; 3]>, } pub struct shmid_ds { @@ -71,8 +66,8 @@ s! { pub shm_cpid: crate::pid_t, pub shm_lpid: crate::pid_t, pub shm_nattch: crate::shmatt_t, - __unused4: c_ulong, - __unused5: c_ulong, + __unused4: Padding, + __unused5: Padding, } #[allow(unpredictable_function_pointer_comparisons)] diff --git a/src/unix/linux_like/linux_l4re_shared.rs b/src/unix/linux_like/linux_l4re_shared.rs index 1877f3cadcf37..ace6eeb790908 100644 --- a/src/unix/linux_like/linux_l4re_shared.rs +++ b/src/unix/linux_like/linux_l4re_shared.rs @@ -283,6 +283,17 @@ s! { pub val: c_int, } + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use `rlimit` instead. The unsuffixed type is defined as an alias to this type, \ + and their memory layout is effectively equivalent. The `libc` crate is phasing \ + out support for suffixed variants in favor of a single, unsuffixed, fixed \ + bitwidth symbol." + ), + allow(deprecated) + )] pub struct rlimit64 { pub rlim_cur: crate::rlim64_t, pub rlim_max: crate::rlim64_t, @@ -305,6 +316,17 @@ s! { pub d_name: [c_char; 256], } + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use `dirent` instead. The unsuffixed type is defined as an alias to this type, \ + and their memory layout is effectively equivalent. The `libc` crate is phasing \ + out support for suffixed variants in favor of a single, unsuffixed, fixed \ + bitwidth symbol." + ), + allow(deprecated) + )] pub struct dirent64 { pub d_ino: crate::ino64_t, pub d_off: crate::off64_t, @@ -1926,18 +1948,55 @@ extern "C" { cfg_if! { if #[cfg(not(any(target_env = "musl", target_env = "ohos")))] { extern "C" { + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use `freopen` instead. The unsuffixed routine is `#define`d as an \ + alias to the suffixed routine in default builds of uClibc. Support for \ + suffixed variants is phasing out in the `libc` crate." + ) + )] pub fn freopen64( filename: *const c_char, mode: *const c_char, file: *mut crate::FILE, ) -> *mut crate::FILE; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use `fseeko` instead. The unsuffixed routine is `#define`d as an alias \ + to the suffixed routine in default builds of uClibc. Support for \ + suffixed variants is phasing out in the `libc` crate." + ) + )] pub fn fseeko64( stream: *mut crate::FILE, - offset: crate::off64_t, + #[cfg(not(all(target_os = "l4re", target_env = "uclibc")))] offset: crate::off64_t, + #[cfg(all(target_os = "l4re", target_env = "uclibc"))] offset: crate::off_t, whence: c_int, ) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use `fsetpos` instead. The unsuffixed routine is `#define`d as an \ + alias to the suffixed routine in default builds of uClibc. Support for \ + suffixed variants is phasing out in the `libc` crate." + ) + )] pub fn fsetpos64(stream: *mut crate::FILE, ptr: *const crate::fpos64_t) -> c_int; + #[cfg(not(all(target_os = "l4re", target_env = "uclibc")))] pub fn ftello64(stream: *mut crate::FILE) -> crate::off64_t; + #[cfg(all(target_os = "l4re", target_env = "uclibc"))] + #[deprecated( + since = "0.2.187", + note = "Use `ftello` instead. The unsuffixed routine is `#define`d as an alias \ + to the suffixed routine in default builds of uClibc. Support for \ + suffixed variants is phasing out in the `libc` crate." + )] + pub fn ftello64(stream: *mut crate::FILE) -> crate::off_t; } } } diff --git a/src/unix/linux_like/mod.rs b/src/unix/linux_like/mod.rs index e594abb9693b8..6bfd096ed65c1 100644 --- a/src/unix/linux_like/mod.rs +++ b/src/unix/linux_like/mod.rs @@ -532,6 +532,8 @@ pub const XATTR_REPLACE: c_int = 0x2; cfg_if! { if #[cfg(target_os = "android")] { pub const RLIM64_INFINITY: c_ulonglong = !0; + } else if #[cfg(all(target_os = "l4re", target_env = "uclibc"))] { + pub const RLIM64_INFINITY: crate::rlim_t = !0; } else { pub const RLIM64_INFINITY: crate::rlim64_t = !0; } @@ -2099,26 +2101,128 @@ cfg_if! { target_os = "emscripten", )))] { extern "C" { + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn fstatfs64(fd: c_int, buf: *mut statfs64) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn statvfs64(path: *const c_char, buf: *mut statvfs64) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn fstatvfs64(fd: c_int, buf: *mut statvfs64) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn statfs64(path: *const c_char, buf: *mut statfs64) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn creat64(path: *const c_char, mode: mode_t) -> c_int; #[cfg_attr(gnu_time_bits64, link_name = "__fstat64_time64")] + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn fstat64(fildes: c_int, buf: *mut stat64) -> c_int; #[cfg_attr(gnu_time_bits64, link_name = "__fstatat64_time64")] #[cfg(not(target_os = "l4re"))] + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn fstatat64( dirfd: c_int, pathname: *const c_char, buf: *mut stat64, flags: c_int, ) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn ftruncate64(fd: c_int, length: off64_t) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn lseek64(fd: c_int, offset: off64_t, whence: c_int) -> off64_t; #[cfg_attr(gnu_time_bits64, link_name = "__lstat64_time64")] #[cfg(not(target_os = "l4re"))] + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn lstat64(path: *const c_char, buf: *mut stat64) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn mmap64( addr: *mut c_void, len: size_t, @@ -2127,22 +2231,90 @@ cfg_if! { fd: c_int, offset: off64_t, ) -> *mut c_void; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn open64(path: *const c_char, oflag: c_int, ...) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn openat64(fd: c_int, path: *const c_char, oflag: c_int, ...) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn posix_fadvise64( fd: c_int, offset: off64_t, len: off64_t, advise: c_int, ) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn pread64(fd: c_int, buf: *mut c_void, count: size_t, offset: off64_t) -> ssize_t; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn pwrite64( fd: c_int, buf: *const c_void, count: size_t, offset: off64_t, ) -> ssize_t; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn readdir64(dirp: *mut crate::DIR) -> *mut crate::dirent64; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn readdir64_r( dirp: *mut crate::DIR, entry: *mut crate::dirent64, @@ -2150,7 +2322,26 @@ cfg_if! { ) -> c_int; #[cfg_attr(gnu_time_bits64, link_name = "__stat64_time64")] #[cfg(not(target_os = "l4re"))] + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ) + )] pub fn stat64(path: *const c_char, buf: *mut stat64) -> c_int; + #[cfg_attr( + all(target_os = "l4re", target_env = "uclibc"), + deprecated( + since = "0.2.187", + note = "Use the unsuffixed routines instead. These are aliased from the \ + suffixed routines in default builds of uClibc and musl. The `libc` \ + crate is phasing out support for them, in favor of unsuffixed symbols." + ), + allow(deprecated) + )] pub fn truncate64(path: *const c_char, length: off64_t) -> c_int; } }