-
Notifications
You must be signed in to change notification settings - Fork 1.2k
Add a definition of max_align_t to nto #4927
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add a definition of max_align_t to nto #4927
Conversation
|
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. |
The definition of this type is a bit tricky for nto for multiple reasons: * The C definition is different from the C++ definition in some versions of the QNX SDK. * It uses long double, which does not exist inside libc. * The definition on C uses alignment modifiers per field, which aren't supported in Rust. However, since they just reuse the field type, they're actually redundant so that we can safely skip them.
a76d595 to
ae580a7
Compare
|
cc target maintainers @flba-eb @gh-tr @jonathanpallant @japaric to verify (as I cannot do on my end) |
|
On QNX 8.0 AArch64 the max_align_t type has a size of 32 and an alignof of 16. It's the same on x86-64. This type has the same, and the fields match, so looks good to me. |
JohnTitor
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you both!
The definition of this type is a bit tricky for nto for multiple reasons: * The C definition is different from the C++ definition in some versions of the QNX SDK. * It uses long double, which does not exist inside libc. * The definition on C uses alignment modifiers per field, which aren't supported in Rust. However, since they just reuse the field type, they're actually redundant so that we can safely skip them. (backport <rust-lang#4927>) (cherry picked from commit 64f2ae4)
The definition of this type is a bit tricky for nto for multiple reasons: * The C definition is different from the C++ definition in some versions of the QNX SDK. * It uses long double, which does not exist inside libc. * The definition on C uses alignment modifiers per field, which aren't supported in Rust. However, since they just reuse the field type, they're actually redundant so that we can safely skip them. (backport <#4927>) (cherry picked from commit 64f2ae4)
The definition of this type is a bit tricky for nto for multiple reasons:
Description
The change adds a definition for max_align_t for QNX.
Sources
Source of the QNX SDP is closed source and can only be accessed by owning a developer license.
Docs available at https://www.qnx.com/developers/docs/8.0/com.qnx.doc.neutrino.lib_ref/topic/m/max_align_t.html.
Checklist
libc-test/semverhave been updated (No updates needed as max_align_t isn't part of unix.txt)*LASTor*MAXareincluded (see #3131)
cd libc-test && cargo test --target mytarget);especially relevant for platforms that may not be checked in CI (Test cannot be run for the target also on HEAD; code that uses max_align_t compiles and runs fine, though. Test for host platform runs fine, no surprises here.)
@rustbot label +stable-nominated