diff options
author | Jesús Cea <jcea@jcea.es> | 2019-09-28 05:09:24 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-09-28 05:09:24 +0200 |
commit | 598f676880662fb453ff98fda42b7b7068e5be32 (patch) | |
tree | fd285df6c5759b4ef3faef7c2bcfddaa2c8bad87 | |
parent | bpo-38174 follow up: Remove loadlibrary.c from VS9.0. (GH-16411) (diff) | |
download | cpython-598f676880662fb453ff98fda42b7b7068e5be32.tar.gz cpython-598f676880662fb453ff98fda42b7b7068e5be32.tar.bz2 cpython-598f676880662fb453ff98fda42b7b7068e5be32.zip |
[2.7] bpo-38301: In Solaris family, we must be sure to use '-D_REENTRANT' (GH-16446). (#16454)
(cherry picked from commit 52d1b86bde2b772a76919c76991c326384954bf1)
Co-authored-by: Jesús Cea <jcea@jcea.es>
-rw-r--r-- | Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst | 2 | ||||
-rwxr-xr-x | configure | 3 | ||||
-rw-r--r-- | configure.ac | 3 |
3 files changed, 8 insertions, 0 deletions
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 index 00000000000..59c9a76385e --- /dev/null +++ b/Misc/NEWS.d/next/Build/2019-09-28-02-37-11.bpo-38301.123456.rst @@ -0,0 +1,2 @@ +In Solaris family, we must be sure to use ``-D_REENTRANT``. +Patch by Jesús Cea Avión. diff --git a/configure b/configure index 67300fe2b6e..63d675312da 100755 --- 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" diff --git a/configure.ac b/configure.ac index 36df3d02a2d..efe6922b5de 100644 --- a/configure.ac +++ b/configure.ac @@ -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" |