-
Notifications
You must be signed in to change notification settings - Fork 8k
posix: use posix_time.h and posix_signal.h #95226
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
posix: use posix_time.h and posix_signal.h #95226
Conversation
2313eed
to
85942d5
Compare
|
85942d5
to
68ba062
Compare
|
It looks like #95285 is causing the build failure in twister-build (1). |
The failure in twister build (7) is the result of interdependency between current https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html I'll see if I can remove that interdependency in a separate PR. If it is not possible, then the signal.h changes will be added to this PR. |
38a73f6
to
128f1bc
Compare
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
Create a header for satisfying POSIX conformance requirements of signal.h that is named posix_signal.h rather than signal.h. The primary reason for doing so, is that the de-facto owner of signal.h is the C library. This new header only defines required POSIX symbols that form a strict superset over the ISO C signal.h symbols. Signed-off-by: Chris Friedt <[email protected]>
To avoid conflicts between the C library's `time.h` and signal.h use an "override" header (when necessary) for C libraries that do not themselves provide POSIX definitions in `time.h` or `signal.h`. Signed-off-by: Chris Friedt <[email protected]>
28c80f3
to
2b318b2
Compare
@stephanosio - this should basically be ready for you to review. Only minor changes since the last revision. |
|
@stephanosio - are you able to review? If not, is it ok if I reassign to e.g. Keith or someone else? |
Just adding the |
And, oddly, adding the dev-review label causes CI to fail 😅 . Hopefully, removing it will help. |
Self-assigning this, since it
|
1eb5c97
into
zephyrproject-rtos:main
Zephyr's POSIX time support has been updated (PR #95226) to provide a new header <zephyr/posix/posix_time.h>. This change ensures that <time.h> can be included safely, even when a libc previously provided its own conflicting version. To maintain compatibility before and after the PR, this patch uses __has_include to prefer <time.h> when <zephyr/posix/posix_time.h> is available, and falls back to <zephyr/posix/time.h> otherwise. This prevents build errors caused by incompatible or incomplete <time.h> implementations in some environments. References: – zephyrproject-rtos/zephyr#95226 – zephyrproject-rtos/zephyr#96911 – https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html Signed-off-by: Yasushi SHOJI <[email protected]>
Zephyr's POSIX time support has been updated (PR #95226) to provide a new header <zephyr/posix/posix_time.h>. This change ensures that <time.h> can be included safely, even when a libc previously provided its own conflicting version. To maintain compatibility before and after the PR, this patch uses __has_include to prefer <time.h> when <zephyr/posix/posix_time.h> is available, and falls back to <zephyr/posix/time.h> otherwise. This prevents build errors caused by incompatible or incomplete <time.h> implementations in some environments. References: – zephyrproject-rtos/zephyr#95226 – zephyrproject-rtos/zephyr#96911 – https://gcc.gnu.org/onlinedocs/cpp/_005f_005fhas_005finclude.html Signed-off-by: Yasushi SHOJI <[email protected]>
To avoid conflicts between the C library's
time.h
andsignal.h
use an "override" header (when necessary) for C libraries that do not themselves provide POSIX definitions intime.h
orsignal.h
.In order to achieve that, provide
posix_time.h
andposix_signal.h
that define only the POSIX symbols that are not defined by ISO C.https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/time.h.html
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/signal.h.html
Required by #88547