Skip to content

Commit ab446f3

Browse files
committed
[getconf] macos testing fixes
Completed Fixes | Fix | Description | Status | |-------|--------------------------------------------------------------------------------------------------------------------------------|--------| | Fix 1 | Proper errno checking - outputs "undefined" with exit 0 instead of error when sysconf/pathconf returns -1 with errno unchanged | ✅ | | Fix 2 | POSIX2_* compatibility aliases (POSIX2_VERSION, POSIX2_C_DEV, POSIX2_LINE_MAX, etc.) | ✅ | | Fix 3 | Added missing sysconf variables (PAGESIZE, _POSIX_VERSION, HOST_NAME_MAX, _XOPEN_VERSION, etc.) | ✅ | | Fix 4 | Fixed confstr output to trim null byte | ✅ | | Fix 5 | Clean error message format (no Rust debug output) | ✅ | | Fix 6 | Handle -v option properly (emit "unsupported specification" error) | ✅ | | Fix 7 | Added POSIX_V6_* confstr variables on macOS | ✅ | Files Modified - sys/getconf.rs - Main implementation - sys/Cargo.toml - Added errno dependency Test Results All tests pass and outputs match the system getconf: - sysconf variables (ARG_MAX, NGROUPS_MAX, PAGESIZE, etc.) - POSIX2_* compatibility names - "undefined" handling for unsupported variables - pathconf variables (NAME_MAX, PATH_MAX, etc.) - confstr variables (PATH, POSIX_V6_WIDTH_RESTRICTED_ENVS, etc.)
1 parent 0d0f27e commit ab446f3

File tree

3 files changed

+280
-68
lines changed

3 files changed

+280
-68
lines changed

Cargo.lock

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

sys/Cargo.toml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ rust-version.workspace = true
1010
[dependencies]
1111
plib = { path = "../plib" }
1212
clap.workspace = true
13+
errno.workspace = true
1314
gettext-rs.workspace = true
1415
uname = "0.1"
1516
libc.workspace = true

0 commit comments

Comments
 (0)