]> granicus.if.org Git - python/commitdiff
bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (#16446)
authorJesús Cea <jcea@jcea.es>
Sat, 28 Sep 2019 01:44:32 +0000 (03:44 +0200)
committerGitHub <noreply@github.com>
Sat, 28 Sep 2019 01:44:32 +0000 (03:44 +0200)
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 bb8fbc26c74ed128559121c86bcc9646ede621e7..f1979c1b8124c1db51bbb03f3604bf49d509b78c 100755 (executable)
--- a/configure
+++ b/configure
@@ -10500,6 +10500,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 69e2a5ea556c16175295332e7720a457c3ea428f..917a9087185e3f6303d2a7fabb371bcd0a4d065f 100644 (file)
@@ -3063,6 +3063,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"