Skip to content

Commit 8161ea5

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 0775ea4 commit 8161ea5

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

lib/posix/Kconfig.profile

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -35,6 +35,27 @@ config POSIX_AEP_CHOICE_NONE
3535
help
3636
No POSIX subprofile is selected.
3737

38+
config POSIX_AEP_CHOICE_ZEPHYR
39+
bool "A minimal POSIX subprofile designed for Zephyr"
40+
select POSIX_C_LIB_EXT
41+
select POSIX_C_LANG_SUPPORT_R
42+
help
43+
Zephyr expects certain POSIX functions to be available throughout the build environment,
44+
such as gmtime_r(), strnlen(), strtok_r(), and possibly others.
45+
46+
These functions are divided into two standalone Option Groups that may be enabled
47+
independently of the remainder of the POSIX API implementation; namely POSIX_C_LIB_EXT and
48+
POSIX_C_LANG_SUPPORT_R. There are no configuration, compilation, runtime, or ROM implications
49+
of enabling this option if not referenced by the Zephyr kernel or application.
50+
51+
Unlike pre-defined, standard POSIX subprofiles, this subprofile is custom to Zephyr and
52+
therefore does not need to include the base definitions or system interfaces that would
53+
otherwise be required for a conformant POSIX system.
54+
55+
For more information, see
56+
https://docs.zephyrproject.org/latest/contribute/coding_guidelines/index.html
57+
https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
58+
3859
config POSIX_AEP_CHOICE_BASE
3960
bool "Minimal POSIX System Profile"
4061
depends on POSIX_SYSTEM_INTERFACES

0 commit comments

Comments
 (0)