casaroli opened a new pull request, #20602:
URL: https://github.com/apache/nuttx/pull/20602
## Summary
`sysconf(_SC_ARG_MAX)` returned -1 with `ENOSYS`. POSIX requires it to
return `ARG_MAX`, and programs that build command lines, such as xargs, use it
to size them.
This PR returns `ARG_MAX` from `<limits.h>`.
## Impact
`sysconf(_SC_ARG_MAX)` works. No other change.
## Testing
The run-time tests ran on a local branch that has this change and other
pending changes on top of master; the builds are of this branch alone.
On master, `sysconf(_SC_ARG_MAX)` takes the default branch and fails with
`ENOSYS`. With this change, Python's `os.sysconf("SC_ARG_MAX")` returns 32768
on qemu-armv8a (kernel build, QEMU 11 with HVF, a local configuration with
`ARG_MAX` set to 32768 through `CONFIG_TASK_ARG_MAX` from #20596).
Builds with `-Wno-cpp -Werror`: `qemu-armv8a:nsh`, `qemu-armv8a:knsh`.
`tools/checkpatch.sh -c -u -m -g` passes.
--
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.
To unsubscribe, e-mail: [email protected]
For queries about this service, please contact Infrastructure at:
[email protected]