-
Notifications
You must be signed in to change notification settings - Fork 6.7k
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
tests/c_lib: strerror_r is POSIX #58460
tests/c_lib: strerror_r is POSIX #58460
Conversation
Looks like we'll have to wait for the SDK used by CI to get updated to one with picolibc's |
be66170
to
381e8be
Compare
Fixed a commit message which needed word wrapping for the Compliance Checks. |
Looks pretty close. This is definitely on the roadmap. I'm hoping we can tie Konfig into POSIX feature test macros / version specifiers. |
Thanks. This depends on an SDK that supports |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
@keith-packard did you want to rebase / can this now go in? |
Thanks for the reminder -- I'll poke at this later today or tomorrow; I'm working on not enabling malloc by default today in between meetings (saves a few hundred bytes in apps not using malloc). |
The Zephyr C Standard Library Usage Restrictions defines an additional set of interfaces beyond the ISO/ICE 9899:2011 standard (C11), but that does not include strerror_r. That function is only available under the POSIX specification. Always define _POSIX_C_SOURCE 200809 so that picolibc and newlib, and any other C libraries which offer both C11 and POSIX will declare strerror_r. Signed-off-by: Keith Packard <[email protected]>
Don't ask picolibc to expose the full POSIX API by default, instead have it only define the Zephyr API. Signed-off-by: Keith Packard <[email protected]>
381e8be
to
c5e6a88
Compare
all done; let's see if CI agrees with my local twister run. |
This pull request has been marked as stale because it has been open (more than) 60 days with no activity. Remove the stale label or add a comment saying that you would like to have the label removed otherwise this pull request will automatically be closed in 14 days. Note, that you can always re-open a closed pull request at any time. |
Add "#define _POSIX_C_SOURCE 200809" so that picolibc will declare the complete POSIX API, including strerror_r, not just the Zephyr C library API.