Merged
Conversation
Collaborator
|
Some changes occurred in OpenBSD module cc @semarie |
b78588a to
1d1226b
Compare
semarie
suggested changes
Oct 6, 2025
Contributor
semarie
left a comment
There was a problem hiding this comment.
- LGTM for OpenBSD part
- but you added
_CS_PATHin netbsd.txt and I don't see corresponding mod.rs edited
According to https://man.netbsd.org/confstr.3 _CS_PATH is obsoleted by sysctl (which has a USER_CS_PATH equivalent), but Linux doesn't have that. So the simplest thing for applications is to use _CS_PATH which is part of POSIX. Define, matching the <unistd.h> header. We could maybe share this definition in src/unix/bsd/netbsdlike/mod.rs, but I saw that existing definitions are not shared either, so I'm not sure. $ grep src/unix/bsd/netbsdlike -e _PC_LINK_MAX src/unix/bsd/netbsdlike/netbsd/mod.rs:1599:11:pub const _PC_LINK_MAX: c_int = 1; src/unix/bsd/netbsdlike/openbsd/mod.rs:1193:11:pub const _PC_LINK_MAX: c_int = 1; Originally reported in fish-shell/fish-shell#11892
1d1226b to
cdd6bb0
Compare
semarie
approved these changes
Oct 6, 2025
Contributor
semarie
left a comment
There was a problem hiding this comment.
LGTM thanks.
Please note that currently people able to merge seems to be busy. it could take some time to be merged.
3 tasks
JohnTitor
pushed a commit
to JohnTitor/libc
that referenced
this pull request
Oct 9, 2025
According to https://man.netbsd.org/confstr.3 _CS_PATH is obsoleted by sysctl (which has a USER_CS_PATH equivalent), but Linux doesn't have that. So the simplest thing for applications is to use _CS_PATH which is part of POSIX. Define, matching the <unistd.h> header. We could maybe share this definition in src/unix/bsd/netbsdlike/mod.rs, but I saw that existing definitions are not shared either, so I'm not sure. $ grep src/unix/bsd/netbsdlike -e _PC_LINK_MAX src/unix/bsd/netbsdlike/netbsd/mod.rs:1599:11:pub const _PC_LINK_MAX: c_int = 1; src/unix/bsd/netbsdlike/openbsd/mod.rs:1193:11:pub const _PC_LINK_MAX: c_int = 1; Originally reported in fish-shell/fish-shell#11892 (backport rust-lang#4738) (cherry picked from commit b1be455)
Merged
github-merge-queue bot
pushed a commit
that referenced
this pull request
Oct 9, 2025
According to https://man.netbsd.org/confstr.3 _CS_PATH is obsoleted by sysctl (which has a USER_CS_PATH equivalent), but Linux doesn't have that. So the simplest thing for applications is to use _CS_PATH which is part of POSIX. Define, matching the <unistd.h> header. We could maybe share this definition in src/unix/bsd/netbsdlike/mod.rs, but I saw that existing definitions are not shared either, so I'm not sure. $ grep src/unix/bsd/netbsdlike -e _PC_LINK_MAX src/unix/bsd/netbsdlike/netbsd/mod.rs:1599:11:pub const _PC_LINK_MAX: c_int = 1; src/unix/bsd/netbsdlike/openbsd/mod.rs:1193:11:pub const _PC_LINK_MAX: c_int = 1; Originally reported in fish-shell/fish-shell#11892 (backport #4738) (cherry picked from commit b1be455)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
According to
https://man.netbsd.org/confstr.3
_CS_PATH is obsoleted by sysctl (which has a USER_CS_PATH equivalent),
but Linux doesn't have that.
So the simplest thing for applications is to use _CS_PATH which is
part of POSIX. Define, matching the <unistd.h> header.
We could maybe share this definition in src/unix/bsd/netbsdlike/mod.rs,
but I saw that existing definitions are not shared either, so I'm
not sure.
Originally reported in fish-shell/fish-shell#11892