-
Notifications
You must be signed in to change notification settings - Fork 7.5k
posix: header fixups #51771
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: header fixups #51771
Changes from all commits
90b1950
17a871b
bea5b9a
45242f6
202f260
a540ae7
5dbbad3
b47f435
39a6128
f089cb8
6dbd9cd
7fb8b99
81de964
9a1c149
e2103ab
97b51cc
f19242a
49a04c2
6fd104c
759dc8d
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,8 +3,8 @@ | |
* | ||
* SPDX-License-Identifier: Apache-2.0 | ||
*/ | ||
#ifndef ZEPHYR_INCLUDE_POSIX_POSIX_SCHED_H_ | ||
#define ZEPHYR_INCLUDE_POSIX_POSIX_SCHED_H_ | ||
#ifndef ZEPHYR_INCLUDE_POSIX_SCHED_H_ | ||
#define ZEPHYR_INCLUDE_POSIX_SCHED_H_ | ||
Comment on lines
-6
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. While this is the right thing to do, this will be a breaking change for the Zephyr users, upgrading to 3.3 from an older Zephyr version, who relied on the availability of There should be a dummy There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Fixed! |
||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
|
@@ -40,4 +40,4 @@ int sched_get_priority_max(int policy); | |
} | ||
#endif | ||
|
||
#endif /* ZEPHYR_INCLUDE_POSIX_POSIX_SCHED_H_ */ | ||
#endif /* ZEPHYR_INCLUDE_POSIX_SCHED_H_ */ |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,7 +4,7 @@ | |
zephyr_interface_library_named(posix_subsys) | ||
|
||
if(CONFIG_POSIX_API) | ||
target_include_directories(posix_subsys INTERFACE ${ZEPHYR_BASE}/include/zephyr/posix) | ||
zephyr_include_directories(${ZEPHYR_BASE}/include/zephyr/posix) | ||
endif() | ||
Comment on lines
6
to
8
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
While I find making the POSIX includes available in the default include path (i.e. without any prefixes) when applications have explicitly chosen to use POSIX APIs reasonable, we should still provide an option to keep using the
But does it really make sense to include POSIX headers or select the Kconfigs that are supposedly subordinate to the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Exactly - that is the default behaviour. I should specify, for all Zephyr internal code, we should also continue to use the
That's a valid argument, but technically there is nothing preventing any source file from including any header. The "subordinate" kconfig options were done that way so that individual options could be built (i.e. linked in) without enabling all of them to be built. So CONFIG_POSIX_API is mainly a shorthand for enabling all of them (plus making sure that the headers are in the standard include path). |
||
|
||
if(CONFIG_POSIX_API OR CONFIG_PTHREAD_IPC OR CONFIG_POSIX_CLOCK OR | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
|
||
menuconfig GETOPT | ||
bool "Getopt library support" | ||
default y if POSIX_API | ||
Comment on lines
5
to
+7
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Any reason this should not There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Most POSIX options are like that already.
In that sense, |
||
help | ||
This option adds support of getopt. | ||
Different shell backends are use their own instance of getopt to | ||
|
Uh oh!
There was an error while loading. Please reload this page.