Skip to content

Commit c4dd947

Browse files
author
Chris Friedt
committed
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 <[email protected]>
1 parent b677e82 commit c4dd947

File tree

11 files changed

+24
-12
lines changed

11 files changed

+24
-12
lines changed

doc/services/portability/posix/conformance/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,7 @@ POSIX System Interfaces
9797
_XOPEN_CRYPT, -1,
9898
:ref:`_XOPEN_REALTIME <posix_option_group_xsi_realtime>`, 700, :kconfig:option:`CONFIG_XSI_REALTIME`
9999
_XOPEN_REALTIME_THREADS, -1,
100-
:ref:`_XOPEN_STREAMS<posix_option_xopen_streams>`, 200809L, :kconfig:option:`CONFIG_XOPEN_STREAMS`
100+
:ref:`_XOPEN_STREAMS<posix_option_xopen_streams>`, 200809L, :kconfig:option:`CONFIG_XSI_STREAMS`
101101
_XOPEN_UNIX, -1,
102102

103103

doc/services/portability/posix/option_groups/index.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1111,7 +1111,7 @@ implemented in Zephyr but are provided so that conformant applications can still
11111111
Unimplemented functions in this option group will fail, setting ``errno`` to ``ENOSYS``
11121112
:ref:`†<posix_undefined_behaviour>`.
11131113

1114-
Enable this option with :kconfig:option:`CONFIG_XOPEN_STREAMS`.
1114+
Enable this option with :kconfig:option:`CONFIG_XSI_STREAMS`.
11151115

11161116
.. csv-table:: _XOPEN_STREAMS
11171117
:header: API, Supported

lib/posix/options/CMakeLists.txt

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -165,15 +165,20 @@ if(NOT CONFIG_TC_PROVIDES_XSI_REALTIME)
165165
zephyr_library_sources_ifdef(CONFIG_POSIX_SHARED_MEMORY_OBJECTS shm.c)
166166
endif()
167167

168-
zephyr_library_sources_ifdef(CONFIG_XOPEN_STREAMS stropts.c)
169-
170168
if (NOT CONFIG_TC_PROVIDES_XSI_SINGLE_PROCESS)
171169
zephyr_library_sources_ifdef(CONFIG_XSI_SINGLE_PROCESS
172170
env_common.c
173171
xsi_single_process.c
174172
)
175173
endif()
176174

175+
if(NOT CONFIG_TC_PROVIDES_XSI_STREAMS)
176+
zephyr_library_sources_ifdef(CONFIG_XSI_STREAMS stropts.c)
177+
endif()
178+
if(CONFIG_XSI_STREAMS)
179+
zephyr_compile_definitions(-D_XOPEN_STREAMS=${POSIX_VERSION})
180+
endif()
181+
177182
if (NOT CONFIG_TC_PROVIDES_XSI_SYSTEM_LOGGING)
178183
zephyr_library_sources_ifdef(CONFIG_XSI_SYSTEM_LOGGING syslog.c)
179184
endif()

lib/posix/options/Kconfig.xsi_streams

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,18 @@
22
#
33
# SPDX-License-Identifier: Apache-2.0
44

5-
config XOPEN_STREAMS
5+
config XSI_STREAMS
66
bool "X/Open streams"
77
help
88
This option provides support for the X/Open Streams interface, including functions such as
99
fattach(), fdetach(), getmsg(), getpmsg(), putmsg(), and putpmsg().
1010

1111
For more information, please see
1212
https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap02.html#tag_02_01_05_09
13+
14+
config XOPEN_STREAMS
15+
bool "X/Open Streams [DEPRECATED]"
16+
select XSI_STREAMS
17+
select DEPRECATED
18+
help
19+
This option is deprecated. Please use XSI_STREAMS instead.

samples/modules/thrift/hello/client/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,6 @@ CONFIG_CPP=y
55
CONFIG_STD_CPP17=y
66
CONFIG_CPP_EXCEPTIONS=y
77
CONFIG_POSIX_API=y
8-
CONFIG_XOPEN_STREAMS=y
98
CONFIG_COMMON_LIBC_THRD=y
109
CONFIG_DYNAMIC_THREAD=y
1110
CONFIG_THREAD_STACK_INFO=y
@@ -14,6 +13,7 @@ CONFIG_NET_SOCKETS=y
1413
CONFIG_NET_SOCKETPAIR=y
1514
CONFIG_HEAP_MEM_POOL_SIZE=16384
1615
CONFIG_EVENTFD=y
16+
CONFIG_XSI_STREAMS=y
1717

1818
CONFIG_THRIFT=y
1919

samples/modules/thrift/hello/server/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ CONFIG_CPP=y
66
CONFIG_STD_CPP17=y
77
CONFIG_CPP_EXCEPTIONS=y
88
CONFIG_POSIX_API=y
9-
CONFIG_XOPEN_STREAMS=y
9+
CONFIG_XSI_STREAMS=y
1010
CONFIG_NET_SOCKETPAIR=y
1111
CONFIG_HEAP_MEM_POOL_SIZE=16384
1212
CONFIG_EVENTFD=y

tests/modules/thrift/ThriftTest/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ CONFIG_STD_CPP17=y
77
CONFIG_CPP_EXCEPTIONS=y
88
CONFIG_GLIBCXX_LIBCPP=y
99
CONFIG_POSIX_API=y
10-
CONFIG_XOPEN_STREAMS=y
10+
CONFIG_XSI_STREAMS=y
1111
CONFIG_NETWORKING=y
1212
CONFIG_NET_TCP=y
1313
CONFIG_NET_SOCKETS=y

tests/posix/common/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ CONFIG_TEST_EXTRA_STACK_SIZE=4096
1616
CONFIG_POSIX_C_LIB_EXT=y
1717

1818
# for putmsg()
19-
CONFIG_XOPEN_STREAMS=y
19+
CONFIG_XSI_STREAMS=y
2020

2121
# for sleep(), getpid()
2222
CONFIG_POSIX_MULTI_PROCESS=y

tests/posix/eventfd/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,5 +9,5 @@ CONFIG_TEST_RANDOM_GENERATOR=y
99
CONFIG_ZTEST=y
1010

1111
CONFIG_POSIX_API=y
12-
CONFIG_XOPEN_STREAMS=y
12+
CONFIG_XSI_STREAMS=y
1313
CONFIG_EVENTFD=y

tests/posix/headers/prj.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ CONFIG_TEST_RANDOM_GENERATOR=y
1414
CONFIG_POSIX_PRIORITY_SCHEDULING=y
1515

1616
# For putmsg(), etc
17-
CONFIG_XOPEN_STREAMS=y
17+
CONFIG_XSI_STREAMS=y
1818

1919
# for when CONFIG_POSIX_API is not selected
2020
CONFIG_POSIX_THREADS=y

0 commit comments

Comments
 (0)