]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446) (...
authorMiss Islington (bot) <31488909+miss-islington@users.noreply.github.com>
Sat, 28 Sep 2019 02:21:24 +0000 (19:21 -0700)
committerJesús Cea <jcea@jcea.es>
Sat, 28 Sep 2019 02:21:24 +0000 (04:21 +0200)
(cherry picked from commit 52d1b86bde2b772a76919c76991c326384954bf1)

Co-authored-by: Jesús Cea <jcea@jcea.es>
Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst [new file with mode: 0644]
configure
configure.ac

diff --git a/Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst b/Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst
new file mode 100644 (file)
index 0000000..59c9a76
--- /dev/null
@@ -0,0 +1,2 @@
+In Solaris family, we must be sure to use ``-D_REENTRANT``.
+Patch by Jesús Cea Avión.
index cfdbb6cfeda6abe431e2e74e6e39a7ce9d915e41..0f466db4aa0a8249a1d0addda2ace396ae33e4df 100755 (executable)
--- a/configure
+++ b/configure
@@ -10489,6 +10489,9 @@ then
     $as_echo "#define _REENTRANT 1" >>confdefs.h
 
     posix_threads=yes
+    if test "$ac_sys_system" = "SunOS"; then
+        CFLAGS="$CFLAGS -D_REENTRANT"
+    fi
 elif test "$ac_cv_kpthread" = "yes"
 then
     CC="$CC -Kpthread"
index 93f3b0d5a6be8d3a75fed52ea3d494804337b065..1ef0df70e686ae61165e231401785fab9691bd99 100644 (file)
@@ -3079,6 +3079,9 @@ then
     # Defining _REENTRANT on system with POSIX threads should not hurt.
     AC_DEFINE(_REENTRANT)
     posix_threads=yes
+    if test "$ac_sys_system" = "SunOS"; then
+        CFLAGS="$CFLAGS -D_REENTRANT"
+    fi
 elif test "$ac_cv_kpthread" = "yes"
 then
     CC="$CC -Kpthread"