diff --git a/doc/releases/release-notes-4.3.rst b/doc/releases/release-notes-4.3.rst index a73d2a11ea157..ddf7fcf9d99d7 100644 --- a/doc/releases/release-notes-4.3.rst +++ b/doc/releases/release-notes-4.3.rst @@ -82,6 +82,8 @@ Deprecated APIs and options * :c:func:`bt_ctlr_set_public_addr` is deprecated in favor of using :c:struct:`bt_hci_cp_vs_write_bd_addr` for setting the public Bluetooth device address. +* :kconfig:option:`CONFIG_XOPEN_STREAMS` was deprecated. Use :kconfig:option:`CONFIG_XSI_STREAMS` instead. + New APIs and options ==================== diff --git a/doc/services/portability/posix/conformance/index.rst b/doc/services/portability/posix/conformance/index.rst index 23faa7568fa01..cea2ed3d15b4f 100644 --- a/doc/services/portability/posix/conformance/index.rst +++ b/doc/services/portability/posix/conformance/index.rst @@ -97,7 +97,7 @@ POSIX System Interfaces _XOPEN_CRYPT, -1, :ref:`_XOPEN_REALTIME `, 700, :kconfig:option:`CONFIG_XSI_REALTIME` _XOPEN_REALTIME_THREADS, -1, - :ref:`_XOPEN_STREAMS`, 200809L, :kconfig:option:`CONFIG_XOPEN_STREAMS` + :ref:`_XOPEN_STREAMS`, 200809L, :kconfig:option:`CONFIG_XSI_STREAMS` _XOPEN_UNIX, -1, diff --git a/doc/services/portability/posix/option_groups/index.rst b/doc/services/portability/posix/option_groups/index.rst index 695d57051da38..4f33044fad7b9 100644 --- a/doc/services/portability/posix/option_groups/index.rst +++ b/doc/services/portability/posix/option_groups/index.rst @@ -1111,7 +1111,7 @@ implemented in Zephyr but are provided so that conformant applications can still Unimplemented functions in this option group will fail, setting ``errno`` to ``ENOSYS`` :ref:`†`. -Enable this option with :kconfig:option:`CONFIG_XOPEN_STREAMS`. +Enable this option with :kconfig:option:`CONFIG_XSI_STREAMS`. .. csv-table:: _XOPEN_STREAMS :header: API, Supported diff --git a/lib/posix/Kconfig.toolchain b/lib/posix/Kconfig.toolchain index 4ee30a8246540..e22d357b2a50e 100644 --- a/lib/posix/Kconfig.toolchain +++ b/lib/posix/Kconfig.toolchain @@ -219,6 +219,9 @@ config TC_PROVIDES_XSI_SIGNALS config TC_PROVIDES_XSI_SINGLE_PROCESS bool +config TC_PROVIDES_XSI_STREAMS + bool + config TC_PROVIDES_XSI_SYSTEM_DATABASE bool diff --git a/lib/posix/options/CMakeLists.txt b/lib/posix/options/CMakeLists.txt index 3c0a886edd2eb..c901853041aee 100644 --- a/lib/posix/options/CMakeLists.txt +++ b/lib/posix/options/CMakeLists.txt @@ -165,8 +165,6 @@ if(NOT CONFIG_TC_PROVIDES_XSI_REALTIME) zephyr_library_sources_ifdef(CONFIG_POSIX_SHARED_MEMORY_OBJECTS shm.c) endif() -zephyr_library_sources_ifdef(CONFIG_XOPEN_STREAMS stropts.c) - if (NOT CONFIG_TC_PROVIDES_XSI_SINGLE_PROCESS) zephyr_library_sources_ifdef(CONFIG_XSI_SINGLE_PROCESS env_common.c @@ -174,6 +172,13 @@ if (NOT CONFIG_TC_PROVIDES_XSI_SINGLE_PROCESS) ) endif() +if(NOT CONFIG_TC_PROVIDES_XSI_STREAMS) + zephyr_library_sources_ifdef(CONFIG_XSI_STREAMS stropts.c) +endif() +if(CONFIG_XSI_STREAMS) + zephyr_compile_definitions(-D_XOPEN_STREAMS=${POSIX_VERSION}) +endif() + if (NOT CONFIG_TC_PROVIDES_XSI_SYSTEM_LOGGING) zephyr_library_sources_ifdef(CONFIG_XSI_SYSTEM_LOGGING syslog.c) endif() diff --git a/lib/posix/options/Kconfig.xsi_streams b/lib/posix/options/Kconfig.xsi_streams index 21b7e2010b517..06088d48455b5 100644 --- a/lib/posix/options/Kconfig.xsi_streams +++ b/lib/posix/options/Kconfig.xsi_streams @@ -2,7 +2,7 @@ # # SPDX-License-Identifier: Apache-2.0 -config XOPEN_STREAMS +config XSI_STREAMS bool "X/Open streams" help This option provides support for the X/Open Streams interface, including functions such as @@ -10,3 +10,10 @@ config XOPEN_STREAMS For more information, please see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap02.html#tag_02_01_05_09 + +config XOPEN_STREAMS + bool "X/Open Streams [DEPRECATED]" + select XSI_STREAMS + select DEPRECATED + help + This option is deprecated. Please use XSI_STREAMS instead. diff --git a/samples/modules/thrift/hello/client/prj.conf b/samples/modules/thrift/hello/client/prj.conf index 3c3cfcdbbe8e1..bce2363d7f1ee 100644 --- a/samples/modules/thrift/hello/client/prj.conf +++ b/samples/modules/thrift/hello/client/prj.conf @@ -5,7 +5,7 @@ CONFIG_CPP=y CONFIG_STD_CPP17=y CONFIG_CPP_EXCEPTIONS=y CONFIG_POSIX_API=y -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y CONFIG_COMMON_LIBC_THRD=y CONFIG_DYNAMIC_THREAD=y CONFIG_THREAD_STACK_INFO=y diff --git a/samples/modules/thrift/hello/server/prj.conf b/samples/modules/thrift/hello/server/prj.conf index 78b009fb3e285..4095642c136d0 100644 --- a/samples/modules/thrift/hello/server/prj.conf +++ b/samples/modules/thrift/hello/server/prj.conf @@ -6,7 +6,7 @@ CONFIG_CPP=y CONFIG_STD_CPP17=y CONFIG_CPP_EXCEPTIONS=y CONFIG_POSIX_API=y -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y CONFIG_NET_SOCKETPAIR=y CONFIG_HEAP_MEM_POOL_SIZE=16384 CONFIG_EVENTFD=y diff --git a/tests/modules/thrift/ThriftTest/prj.conf b/tests/modules/thrift/ThriftTest/prj.conf index 4bc7153026a10..c304c7b3434d4 100755 --- a/tests/modules/thrift/ThriftTest/prj.conf +++ b/tests/modules/thrift/ThriftTest/prj.conf @@ -7,7 +7,7 @@ CONFIG_STD_CPP17=y CONFIG_CPP_EXCEPTIONS=y CONFIG_GLIBCXX_LIBCPP=y CONFIG_POSIX_API=y -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y CONFIG_NETWORKING=y CONFIG_NET_TCP=y CONFIG_NET_SOCKETS=y diff --git a/tests/posix/common/prj.conf b/tests/posix/common/prj.conf index f50d956f8b274..7c34c53b0e21c 100644 --- a/tests/posix/common/prj.conf +++ b/tests/posix/common/prj.conf @@ -16,7 +16,7 @@ CONFIG_TEST_EXTRA_STACK_SIZE=4096 CONFIG_POSIX_C_LIB_EXT=y # for putmsg() -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y # for sleep(), getpid() CONFIG_POSIX_MULTI_PROCESS=y diff --git a/tests/posix/eventfd/prj.conf b/tests/posix/eventfd/prj.conf index a5839a7a447a7..d3c4ddb9296f2 100644 --- a/tests/posix/eventfd/prj.conf +++ b/tests/posix/eventfd/prj.conf @@ -9,5 +9,5 @@ CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_ZTEST=y CONFIG_POSIX_API=y -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y CONFIG_EVENTFD=y diff --git a/tests/posix/headers/prj.conf b/tests/posix/headers/prj.conf index e5c34983aeaf2..c7dc4bb313a38 100644 --- a/tests/posix/headers/prj.conf +++ b/tests/posix/headers/prj.conf @@ -14,7 +14,7 @@ CONFIG_TEST_RANDOM_GENERATOR=y CONFIG_POSIX_PRIORITY_SCHEDULING=y # For putmsg(), etc -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y # for when CONFIG_POSIX_API is not selected CONFIG_POSIX_THREADS=y diff --git a/tests/posix/xsi_streams/prj.conf b/tests/posix/xsi_streams/prj.conf index 6a39c38d1c684..ee23313bd2950 100644 --- a/tests/posix/xsi_streams/prj.conf +++ b/tests/posix/xsi_streams/prj.conf @@ -2,4 +2,4 @@ CONFIG_POSIX_API=y CONFIG_ZTEST=y CONFIG_POSIX_AEP_CHOICE_BASE=y -CONFIG_XOPEN_STREAMS=y +CONFIG_XSI_STREAMS=y