Skip to content

Commit 3d55d66

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 8132431 commit 3d55d66

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
@@ -60,6 +60,11 @@ pub type pthread_key_t = c_ulong;
6060

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

6570
// From b_BOOL.h
@@ -2416,10 +2421,18 @@ safe_f! {
24162421
}
24172422
}
24182423

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

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

0 commit comments

Comments
 (0)