Skip to content

Commit 3b3e480

Browse files
Define _XOPEN_SOURCE in a single place and mention illumos
Move the Solaris definition into the same conditional as the general one, so that all _XOPEN_SOURCE decisions are together. The socket ancillary data API is gated on _XOPEN_SOURCE only on illumos; Solaris declares it anyway. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent 7c914af commit 3b3e480

3 files changed

Lines changed: 18 additions & 18 deletions

File tree

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
Define ``_XOPEN_SOURCE=600`` on Solaris and illumos, so that the socket
2-
module is built with :meth:`~socket.socket.sendmsg`,
1+
Define ``_XOPEN_SOURCE=600`` on Solaris and illumos, so that on illumos the
2+
socket module is built with :meth:`~socket.socket.sendmsg`,
33
:meth:`~socket.socket.recvmsg` and the ``CMSG_*`` helpers. This also
44
enables the ``forkserver`` :mod:`multiprocessing` start method.

configure

Lines changed: 8 additions & 8 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

configure.ac

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -871,8 +871,8 @@ case $ac_sys_system/$ac_sys_release in
871871
# Marc Recht
872872
NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
873873
define_xopen_source=no;;
874-
# On Solaris, _XOPEN_SOURCE disables features unless __EXTENSIONS__ is
875-
# also defined; a dedicated _XOPEN_SOURCE=600 is set for it below.
874+
# On Solaris, _XOPEN_SOURCE=800 hides platform specific features.
875+
# A lower level is defined below.
876876
SunOS/*)
877877
define_xopen_source=no;;
878878
# On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
@@ -938,12 +938,12 @@ then
938938
# with -std=c11. Defining _ISOC23_SOURCE makes them visible again.
939939
AC_DEFINE([_ISOC23_SOURCE], [1],
940940
[Define to activate ISO C23 library declarations])
941-
fi
942-
943-
# On Solaris the socket ancillary-data API (CMSG_*, sendmsg(), recvmsg())
944-
# needs _XOPEN_SOURCE >= 600; __EXTENSIONS__ keeps the other platform
945-
# features. This enables the forkserver start method. See gh-57208.
946-
if test "$ac_sys_system" = "SunOS"; then
941+
elif test "$ac_sys_system" = "SunOS"
942+
then
943+
# On illumos the socket ancillary-data API (CMSG_*, sendmsg(), recvmsg())
944+
# is declared only with _XOPEN_SOURCE >= 600; Solaris declares it anyway.
945+
# __EXTENSIONS__ keeps the platform specific features which _XOPEN_SOURCE
946+
# would otherwise hide. See gh-57208.
947947
AC_DEFINE([_XOPEN_SOURCE], [600],
948948
[Define to the level of X/Open that your system supports])
949949
fi

0 commit comments

Comments
 (0)