]> Savannah Git Hosting - gnulib.git/commitdiff
threadlib: Optimize out runtime test on Solaris >= 10.
authorBruno Haible <bruno@clisp.org>
Sat, 10 Dec 2016 13:04:42 +0000 (14:04 +0100)
committerBruno Haible <bruno@clisp.org>
Sat, 10 Dec 2016 13:04:42 +0000 (14:04 +0100)
* m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.

ChangeLog
m4/threadlib.m4

index 90c264af50d16660750b603da92093732e392998..f547cca1af59b8b8954f63134146ab12e91b1266 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,10 @@
+2016-12-10  Bruno Haible  <bruno@clisp.org>
+
+       threadlib: Optimize out runtime test on Solaris >= 10.
+       * m4/threadlib.m4 (gl_THREADLIB_BODY): Don't set
+       PTHREAD_IN_USE_DETECTION_HARD if configuring on Solaris 10 or newer.
+       Reported by Peter Felecan at <https://savannah.gnu.org/bugs/?32087>.
+
 2016-12-10  Bruno Haible  <bruno@clisp.org>
 
        stdint: Update doc about Solaris 9.
index b43534ea278493cb78eb75d716fc44ff5a206834..2b6b6cf255189f5148cdcb78e6ecd6c6dc558289 100644 (file)
@@ -1,4 +1,4 @@
-# threadlib.m4 serial 11 (gettext-0.18.2)
+# threadlib.m4 serial 12
 dnl Copyright (C) 2005-2016 Free Software Foundation, Inc.
 dnl This file is free software; the Free Software Foundation
 dnl gives unlimited permission to copy and/or distribute it,
@@ -195,8 +195,10 @@ int main ()
              # Therefore pthread_in_use() needs to actually try to create a
              # thread: pthread_create from libc will fail, whereas
              # pthread_create will actually create a thread.
+             # On Solaris 10 or newer, this test is no longer needed, because
+             # libc contains the fully functional pthread functions.
              case "$host_os" in
-               solaris* | hpux*)
+               solaris | solaris2.[1-9] | solaris2.[1-9].* | hpux*)
                  AC_DEFINE([PTHREAD_IN_USE_DETECTION_HARD], [1],
                    [Define if the pthread_in_use() detection is hard.])
              esac