Skip to content

Commit 987bf68

Browse files
committed
posix: profiles: add custom Zephyr POSIX subprofile
Add a custom Zephyr POSIX subprofile specifically for enabling the default features that Zephyr requires as per the coding guidelines. Signed-off-by: Chris Friedt <[email protected]>
1 parent 45bd68a commit 987bf68

File tree

1 file changed

+22
-0
lines changed

1 file changed

+22
-0
lines changed

lib/posix/Kconfig.profile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,28 @@ config POSIX_AEP_CHOICE_NONE
4141
help
4242
No POSIX subprofile is selected.
4343

44+
config POSIX_AEP_CHOICE_ZEPHYR
45+
bool "Minimal Zephyr System Profile"
46+
select POSIX_C_LIB_EXT
47+
select POSIX_C_LANG_SUPPORT_R
48+
help
49+
Zephyr expects certain POSIX functions to be available throughout the build environment,
50+
such as gmtime_r(), strnlen(), strtok_r(), and possibly others.
51+
52+
These functions are divided into two standalone Option Groups that may be enabled
53+
independently of the remainder of the POSIX API implementation; namely POSIX_C_LIB_EXT and
54+
POSIX_C_LANG_SUPPORT_R. If not referenced by the Zephyr kernel or application, there are no
55+
resource implications for enabling these option groups.
56+
57+
Unlike pre-defined, standard POSIX subprofiles, this subprofile is custom to Zephyr and
58+
therefore does not need to include the base definitions or system interfaces that would
59+
otherwise be required for a conformant POSIX system or subprofile. This system profile
60+
does not itself meet the requirements for POSIX implementation conformance.
61+
62+
For more information, see
63+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html
64+
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
65+
4466
config POSIX_AEP_CHOICE_BASE
4567
bool "Minimal POSIX System Profile"
4668
select POSIX_SYSTEM_INTERFACES

0 commit comments

Comments
 (0)