vxworks: add cfg to definition of off64_t and off_t#5129
Conversation
fb9aeb7 to
675bad7
Compare
This comment has been minimized.
This comment has been minimized.
675bad7 to
3d55d66
Compare
This comment has been minimized.
This comment has been minimized.
|
CI actually passes. There seems to be an issue with a glob import that is not used, but this has not |
3d55d66 to
04a0d17
Compare
This comment has been minimized.
This comment has been minimized.
04a0d17 to
6b96768
Compare
|
@rustbot blocked Holding off until there is a good alternative to off64_t |
|
(https://snoozeth.is/Pf0pTEeZDMs) I will wait until Wed, 19 Aug 2026 08:31:52 UTC and then add label S-waiting-on-review and remove label S-blocked. @rustbot claim. |
6b96768 to
1d99a12
Compare
|
This PR was rebased onto a different main commit. Here's a range-diff highlighting what actually changed. Rebasing is a normal part of keeping PRs up to date, so no action is needed—this note is just to help reviewers. |
VxWorks exposes a different bit width for `off64_t`. This will depend on whether the program is a real-time-process. `off_t` will be 64-bits if it is. `off64_t` only exists when compiling kernels. `off_t` may then be 32-bits or 64-bits wide. This will depend on whether the target follows LP64. `off64_t` is then 64-bits wide. Two routines were removed. They were explicitly excluded from the shipped SDK.
1d99a12 to
0b3f97d
Compare
off64_t in VxWorkscfg to definition of off64_t and off_t
|
@tgross35 The PR has been updated. I don't think I can find a better solution. Both
@rustbot ready review |
Description
This PR improves the definition of
off_t. This applies to targets whose operating system is VxWorks.The
libccrate definesoff_tas ac_longlong. This is only correct in programs compiled as RTPs. Programs compiled as VxWorks kernels are different. They exposeoff_tas ac_long.The
off64_type is not present in RTP processes.Automatic detection of this does not seem possible in Rust. A specific flag is issued to gcc to expose the feature test macro. This patch adds an equivalent
cfg. The crate user must manually set it.Two redundant routines were removed. These are explicitly out of the shipped SDK. It seems like the
libccrate had polyfills set up. These would always return an error value.Sources
sysroot/usr/h/public/base/b_off_t.h. This was found in the VxWorks downloadable SDK for QEMU x86_64.usr/3pp/develop/usr/include/python3.9/pyconfig.h. This was found in the same as SDK as quoted above. This defines certain included features.preadandpwriteare not defined.Checklist
libc-test/semverhave been updated*LASTor*MAXare included (see #3131)cd libc-test && cargo test --target mytarget); especially relevant for platforms that may not be checked in CI@rustbot label +stable-nominated