From 675bad72f5f65c650118630bd974ec32268d3c8d Mon Sep 17 00:00:00 2001 From: dybucc <149513579+dybucc@users.noreply.github.com> Date: Sun, 31 May 2026 18:05:11 +0200 Subject: [PATCH] refactor: deprecate `off64_t in vxworks This type, alongside aliases such as `time64_t`, are being deprecated in favor of keeping a single, non-suffixed type that is 64-bits wide. In VxWorks, `off64_t` already depends on `off_t`, so deprecating it makes the transition to `off_t` easier. --- src/vxworks/mod.rs | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/vxworks/mod.rs b/src/vxworks/mod.rs index 00428543d7aff..95896bf5a66cc 100644 --- a/src/vxworks/mod.rs +++ b/src/vxworks/mod.rs @@ -60,6 +60,11 @@ pub type pthread_key_t = c_ulong; // From b_off_t.h pub type off_t = c_longlong; +#[deprecated( + since = "0.2.187", + note = "Use `off_t` instead. The `libc` crate is on track to supporting solely non-suffixed \ + variants of time and file offset types. See #PENDING for details and discussion." +)] pub type off64_t = off_t; // From b_BOOL.h @@ -2416,10 +2421,18 @@ safe_f! { } } +// FIXME(msrv): once we bump MSRV enough to reach stabilization of `expect` and +// the `reason` attribute parameter, use that to mention that this is not really +// a routine that's part of VxWorks. +#[allow(deprecated)] pub unsafe fn pread(_fd: c_int, _buf: *mut c_void, _count: size_t, _offset: off64_t) -> ssize_t { -1 } +// FIXME(msrv): once we bump MSRV enough to reach stabilization of `expect` and +// the `reason` attribute parameter, use that to mention that this is not really +// a routine that's part of VxWorks. +#[allow(deprecated)] pub unsafe fn pwrite(_fd: c_int, _buf: *const c_void, _count: size_t, _offset: off64_t) -> ssize_t { -1 }