Skip to content
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 windows_sys type definitions for ARM32 manually #112527

Merged
merged 2 commits into from
Jun 12, 2023

Conversation

bdbai
Copy link
Contributor

@bdbai bdbai commented Jun 11, 2023

windows_sys bindings do not include platform-specific type definitions for ARM 32 architecture, so it breaks thumbv7a-pc-windows-msvc and thumbv7a-uwp-windows-msvc targets. This PR tries to add them back by manually inserting them together with the generated ones.

WSADATA is copied from the generated definition for x86. CONTEXT is copied from the definition before windows_sys is introduced (which is just an empty enum):

pub enum CONTEXT {}
.

Fixes #112265.

@rustbot
Copy link
Collaborator

rustbot commented Jun 11, 2023

r? @ChrisDenton

(rustbot has picked a reviewer for you, use r? to override)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-libs Relevant to the library team, which will review and decide on the PR/issue. labels Jun 11, 2023
@ChrisDenton
Copy link
Member

This looks good to me. I might want to think more about how to organise platform support but let's fix this issue first.

Could you add a short comment to arm_shim.rs explaining how it's included? Nothing long but it's not part of the normal module system so I'd like to make that clear for anyone reading.

@bdbai
Copy link
Contributor Author

bdbai commented Jun 12, 2023

Could you add a short comment to arm_shim.rs explaining how it's included? Nothing long but it's not part of the normal module system so I'd like to make that clear for anyone reading.

@ChrisDenton I have added some comments in df08f56. Does it makes sense?

@ChrisDenton
Copy link
Member

Yep makes sense to me, thanks!

@bors r+ rollup

@bors
Copy link
Contributor

bors commented Jun 12, 2023

📌 Commit df08f56 has been approved by ChrisDenton

It is now in the queue for this repository.

@bors bors added S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. and removed S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. labels Jun 12, 2023
bors added a commit to rust-lang-ci/rust that referenced this pull request Jun 12, 2023
…iaskrgr

Rollup of 4 pull requests

Successful merges:

 - rust-lang#112302 (Suggest using `ptr::null_mut` when user provided `ptr::null` to a function expecting `ptr::null_mut`)
 - rust-lang#112416 (Fix debug ICE for extern type with where clauses)
 - rust-lang#112527 (Add windows_sys type definitions for ARM32 manually)
 - rust-lang#112546 (new solver: extend assert to other aliases)

r? `@ghost`
`@rustbot` modify labels: rollup
@bors bors merged commit 9c4cff4 into rust-lang:master Jun 12, 2023
@rustbot rustbot added this to the 1.72.0 milestone Jun 12, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-bors Status: Waiting on bors to run and complete tests. Bors will change the label on completion. T-libs Relevant to the library team, which will review and decide on the PR/issue.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

windows-sys generated WinAPI bindings break ARM platforms
5 participants