Skip to content

Commit 04a0d17

Browse files
committed
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.
1 parent f4d6777 commit 04a0d17

1 file changed

Lines changed: 13 additions & 0 deletions

File tree

src/vxworks/mod.rs

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,11 @@ pub type pthread_key_t = c_ulong;
5858

5959
// From b_off_t.h
6060
pub type off_t = c_longlong;
61+
#[deprecated(
62+
since = "0.2.187",
63+
note = "Use `off_t` instead. The `libc` crate is on track to supporting solely non-suffixed \
64+
variants of time and file offset types. See #PENDING for details and discussion."
65+
)]
6166
pub type off64_t = off_t;
6267

6368
// From b_BOOL.h
@@ -2414,10 +2419,18 @@ safe_f! {
24142419
}
24152420
}
24162421

2422+
// FIXME(msrv): once we bump MSRV enough to reach stabilization of `expect` and
2423+
// the `reason` attribute parameter, use that to mention that this is not really
2424+
// a routine that's part of VxWorks.
2425+
#[allow(deprecated)]
24172426
pub unsafe fn pread(_fd: c_int, _buf: *mut c_void, _count: size_t, _offset: off64_t) -> ssize_t {
24182427
-1
24192428
}
24202429

2430+
// FIXME(msrv): once we bump MSRV enough to reach stabilization of `expect` and
2431+
// the `reason` attribute parameter, use that to mention that this is not really
2432+
// a routine that's part of VxWorks.
2433+
#[allow(deprecated)]
24212434
pub unsafe fn pwrite(_fd: c_int, _buf: *const c_void, _count: size_t, _offset: off64_t) -> ssize_t {
24222435
-1
24232436
}

0 commit comments

Comments
 (0)