]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
[2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446...
authorJesús Cea <jcea@jcea.es>
Sat, 28 Sep 2019 03:09:24 +0000 (05:09 +0200)
committerGitHub <noreply@github.com>
Sat, 28 Sep 2019 03:09:24 +0000 (05:09 +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 67300fe2b6e1c9c2fcb7c63043e73a1432be44b2..63d675312da960759698110cd3b3dd36f5fdfa91 100755 (executable)
--- a/configure
+++ b/configure
@@ -9602,6 +9602,9 @@ then
 
     posix_threads=yes
     THREADOBJ="Python/thread.o"
+    if test "$ac_sys_system" = "SunOS"; then
+        CFLAGS="$CFLAGS -D_REENTRANT"
+    fi
 elif test "$ac_cv_kpthread" = "yes"
 then
     CC="$CC -Kpthread"
index 36df3d02a2d842310b856b08a6a1076594c44ad4..efe6922b5de25f8f8100b74f68507163c8a66f4d 100644 (file)
@@ -2625,6 +2625,9 @@ then
     AC_DEFINE(_REENTRANT)
     posix_threads=yes
     THREADOBJ="Python/thread.o"    
+    if test "$ac_sys_system" = "SunOS"; then
+        CFLAGS="$CFLAGS -D_REENTRANT"
+    fi
 elif test "$ac_cv_kpthread" = "yes"
 then
     CC="$CC -Kpthread"