--- /dev/null
+Define ``_XOPEN_SOURCE=600`` on Solaris and illumos, so that on illumos the
+socket module is built with :meth:`~socket.socket.sendmsg`,
+:meth:`~socket.socket.recvmsg` and the ``CMSG_*`` helpers. This also
+enables the ``forkserver`` :mod:`multiprocessing` start method.
# Marc Recht
NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6[A-S])
define_xopen_source=no;;
- # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
- # request to enable features supported by the standard as a request
- # to disable features not supported by the standard. The best way
- # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
- # entirely and define __EXTENSIONS__ instead.
+ # On Solaris, _XOPEN_SOURCE=800 hides platform specific features.
+ # A lower level is defined below.
SunOS/*)
define_xopen_source=no;;
# On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
printf "%s\n" "#define _ISOC23_SOURCE 1" >>confdefs.h
+elif test "$ac_sys_system" = "SunOS"
+then
+ # On illumos the socket ancillary-data API (CMSG_*, sendmsg(), recvmsg())
+ # is declared only with _XOPEN_SOURCE >= 600; Solaris declares it anyway.
+ # __EXTENSIONS__ keeps the platform specific features which _XOPEN_SOURCE
+ # would otherwise hide. See gh-57208.
+
+printf "%s\n" "#define _XOPEN_SOURCE 600" >>confdefs.h
+
fi
# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE
# Marc Recht
NetBSD/1.5 | NetBSD/1.5.* | NetBSD/1.6 | NetBSD/1.6.* | NetBSD/1.6@<:@A-S@:>@)
define_xopen_source=no;;
- # From the perspective of Solaris, _XOPEN_SOURCE is not so much a
- # request to enable features supported by the standard as a request
- # to disable features not supported by the standard. The best way
- # for Python to use Solaris is simply to leave _XOPEN_SOURCE out
- # entirely and define __EXTENSIONS__ instead.
+ # On Solaris, _XOPEN_SOURCE=800 hides platform specific features.
+ # A lower level is defined below.
SunOS/*)
define_xopen_source=no;;
# On UnixWare 7, u_long is never defined with _XOPEN_SOURCE,
# with -std=c11. Defining _ISOC23_SOURCE makes them visible again.
AC_DEFINE([_ISOC23_SOURCE], [1],
[Define to activate ISO C23 library declarations])
+elif test "$ac_sys_system" = "SunOS"
+then
+ # On illumos the socket ancillary-data API (CMSG_*, sendmsg(), recvmsg())
+ # is declared only with _XOPEN_SOURCE >= 600; Solaris declares it anyway.
+ # __EXTENSIONS__ keeps the platform specific features which _XOPEN_SOURCE
+ # would otherwise hide. See gh-57208.
+ AC_DEFINE([_XOPEN_SOURCE], [600],
+ [Define to the level of X/Open that your system supports])
fi
# On HP-UX mbstate_t requires _INCLUDE__STDC_A1_SOURCE