Skip to content

add grp.h functions to c.zig #24597

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

Merged
merged 1 commit into from
Jul 31, 2025
Merged

add grp.h functions to c.zig #24597

merged 1 commit into from
Jul 31, 2025

Conversation

p00f
Copy link
Contributor

@p00f p00f commented Jul 27, 2025

No description provided.

@p00f
Copy link
Contributor Author

p00f commented Jul 27, 2025

Also, why are endpwent, getpwent, setpwent, getpwnam_r, and getpwuid_r restricted to openbsd here? Only getpwuid_shadow and getpwnam_shadow are openbsd-specific, the rest are in POSIX

@alexrp alexrp self-assigned this Jul 27, 2025
@alexrp
Copy link
Member

alexrp commented Jul 28, 2025

Also, why are endpwent, getpwent, setpwent, getpwnam_r, and getpwuid_r restricted to openbsd here? Only getpwuid_shadow and getpwnam_shadow are openbsd-specific, the rest are in POSIX

I'm guessing whoever added them only checked them for OpenBSD? std.c is full of little quirks like this.

@p00f
Copy link
Contributor Author

p00f commented Jul 28, 2025

Also, why are endpwent, getpwent, setpwent, getpwnam_r, and getpwuid_r restricted to openbsd here? Only getpwuid_shadow and getpwnam_shadow are openbsd-specific, the rest are in POSIX

I'm guessing whoever added them only checked them for OpenBSD? std.c is full of little quirks like this.

But they obviously went through the trouble of looking at the layout of struct passwd for many unixes, for the function itself you only need to make sure it's in POSIX right?

@p00f p00f force-pushed the grp_h branch 2 times, most recently from 897af62 to eeba082 Compare July 29, 2025 05:26
@andrewrk
Copy link
Member

Right. It was probably a sloppy contribution and then never properly reexamined (by me) during a non-functional code transformation.

@p00f
Copy link
Contributor Author

p00f commented Jul 30, 2025

i rebased because it looked like x86_64-linux-debug-llvm and x86_64-linux-release were stuck, can you approve CI again?

@andrewrk andrewrk merged commit e941ce3 into ziglang:master Jul 31, 2025
10 checks passed
@alexrp alexrp self-requested a review July 31, 2025 16:54
@alexrp alexrp removed their assignment Jul 31, 2025
@alexrp alexrp removed their request for review July 31, 2025 16:55
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.

4 participants