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

std: fix a few ABI issues in the OS layer #20304

Merged
merged 2 commits into from
Jun 17, 2024

Conversation

ifreund
Copy link
Member

@ifreund ifreund commented Jun 15, 2024

No description provided.

@ifreund ifreund requested a review from kprotty as a code owner June 15, 2024 20:56
ifreund added 2 commits June 17, 2024 23:26
Using structs with unspecified layout on the ABI boundry can't end well.
I believe this was accidentally broken when the E enum for errno values
was introduces. These functions are quite the special case in that they
return the error value directly rather than returning -1 and passing the
error value through the errno variable.

In any case, using a u16 as the return type at the ABI boundary where a
c_int is expected is asking for trouble.
@andrewrk
Copy link
Member

Thanks for the fixes btw. The rest looks good 👍

@andrewrk andrewrk enabled auto-merge June 17, 2024 21:27
@andrewrk andrewrk merged commit 04e08ea into ziglang:master Jun 17, 2024
10 checks passed
@ifreund ifreund deleted the std-abi-fixes branch June 18, 2024 15:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants