From 25c2aaef9b18bf9474cc1328a0f59e99187471bf Mon Sep 17 00:00:00 2001 From: Chris Friedt Date: Tue, 23 Dec 2025 09:55:12 -0500 Subject: [PATCH] posix: xsi: streams: deprecate CONFIG_XOPEN_STREAMS (again) CONFIG_XOPEN_STREAMS does not follow the pattern of other XSI Option Groups, where the Option Group name is not the same as the feature test macro that indicates it is supported by the implementation. Deprecate CONFIG_XOPEN_STREAMS and rename it to CONFIG_XSI_STREAMS. For more information, please see https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/\ V1_chap02.html#tag_02_01_05_09 Signed-off-by: Chris Friedt --- doc/services/portability/posix/conformance/index.rst | 2 +- doc/services/portability/posix/option_groups/index.rst | 2 +- lib/posix/options/CMakeLists.txt | 2 +- lib/posix/options/Kconfig.xsi_streams | 9 ++++++++- samples/modules/thrift/hello/client/prj.conf | 2 +- samples/modules/thrift/hello/server/prj.conf | 2 +- tests/modules/thrift/ThriftTest/prj.conf | 2 +- tests/posix/common/prj.conf | 2 +- tests/posix/eventfd/prj.conf | 2 +- tests/posix/xsi_streams/prj.conf | 2 +- 10 files changed, 17 insertions(+), 10 deletions(-) diff --git a/doc/services/portability/posix/conformance/index.rst b/doc/services/portability/posix/conformance/index.rst index 23faa7568fa..cea2ed3d15b 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 695d57051da..4f33044fad7 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/options/CMakeLists.txt b/lib/posix/options/CMakeLists.txt index c15d38d08d5..808a80fa448 100644 --- a/lib/posix/options/CMakeLists.txt +++ b/lib/posix/options/CMakeLists.txt @@ -165,7 +165,7 @@ 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) +zephyr_library_sources_ifdef(CONFIG_XSI_STREAMS stropts.c) if(NOT CONFIG_TC_PROVIDES_XSI_SINGLE_PROCESS) zephyr_library_sources_ifdef(CONFIG_XSI_SINGLE_PROCESS diff --git a/lib/posix/options/Kconfig.xsi_streams b/lib/posix/options/Kconfig.xsi_streams index 21b7e2010b5..06088d48455 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 dea85eac5e0..9a581877c2a 100644 --- a/samples/modules/thrift/hello/client/prj.conf +++ b/samples/modules/thrift/hello/client/prj.conf @@ -5,7 +5,6 @@ CONFIG_CPP=y CONFIG_STD_CPP17=y CONFIG_CPP_EXCEPTIONS=y CONFIG_POSIX_API=y -CONFIG_XOPEN_STREAMS=y CONFIG_COMMON_LIBC_THRD=y CONFIG_DYNAMIC_THREAD=y CONFIG_THREAD_STACK_INFO=y @@ -14,6 +13,7 @@ CONFIG_NET_SOCKETS=y CONFIG_NET_SOCKETPAIR=y CONFIG_HEAP_MEM_POOL_SIZE=16384 CONFIG_EVENTFD=y +CONFIG_XSI_STREAMS=y CONFIG_THRIFT=y diff --git a/samples/modules/thrift/hello/server/prj.conf b/samples/modules/thrift/hello/server/prj.conf index e8f3044415f..0f7c523db59 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 a4727acced1..d7d5e5fdb8c 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 f50d956f8b2..7c34c53b0e2 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 a5839a7a447..d3c4ddb9296 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/xsi_streams/prj.conf b/tests/posix/xsi_streams/prj.conf index 6a39c38d1c6..ee23313bd29 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