1# Copyright (c) 2023 Meta
2# Copyright (c) 2024 BayLibre SAS
3# Copyright (c) 2024 Tenstorrent AI ULC
4#
5# SPDX-License-Identifier: Apache-2.0
6
7menuconfig POSIX_SINGLE_PROCESS
8	bool "POSIX single process support"
9	# imply COMMON_LIBC_MALLOC # for env.c
10	help
11	  Select 'y' here to use confstr(), environ, errno, getenv(), setenv(), sysconf(), uname(),
12	  or unsetenv().
13
14	  For more information, please see
15	  https://pubs.opengroup.org/onlinepubs/9699919799/xrat/V4_subprofiles.html
16
17if POSIX_SINGLE_PROCESS
18
19choice POSIX_SYSCONF_IMPL_CHOICE
20	default POSIX_SYSCONF_IMPL_FULL if CPP
21	default POSIX_SYSCONF_IMPL_MACRO
22	prompt "Sysconf implementation method"
23
24config POSIX_SYSCONF_IMPL_MACRO
25	bool "Macro"
26	help
27	  The sysconf() function is implemented compile-time constant via macros. This is the option
28	  with the least overhead. The downside is that sysconf() is not an addressable function.
29
30config POSIX_SYSCONF_IMPL_FULL
31	bool "Full"
32	help
33	  The sysconf() function is implemented as a large integer-integer array. The advantage if this
34	  option is that all sysconf() options can be queried and that the sysconf() symbol is
35	  addressable.
36
37endchoice
38
39config POSIX_UNAME_VERSION_LEN
40	int "uname version string length"
41	default 70
42	help
43	  Defines the maximum string length of uname version.
44
45config POSIX_UNAME_NODENAME_LEN
46	int "uname nodename string length"
47	default 6 if !NET_HOSTNAME_UNIQUE
48	default 22 if NET_HOSTNAME_UNIQUE
49	help
50	  Defines the maximum string length of nodename version.
51
52module = POSIX_ENV
53module-str = POSIX env logging
54source "subsys/logging/Kconfig.template.log_config"
55
56endif # POSIX_SINGLE_PROCESS
57