summaryrefslogtreecommitdiff
path: root/m4/threadlib.m4
diff options
context:
space:
mode:
authorBruno Haible <bruno@clisp.org>2016-12-10 14:04:42 +0100
committerBruno Haible <bruno@clisp.org>2016-12-10 14:04:42 +0100
commit83d3c7ff38488105ab667b37671086c3d739c30c (patch)
tree6c0224a4a0f1ccc84ab410d504c44f2b2599e186 /m4/threadlib.m4
parentd25927299b0f2d859e4c61e721528e9adccc0b37 (diff)
downloadgnulib-83d3c7ff38488105ab667b37671086c3d739c30c.tar.gz
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>.
Diffstat (limited to 'm4/threadlib.m4')
-rw-r--r--m4/threadlib.m46
1 files changed, 4 insertions, 2 deletions
diff --git a/m4/threadlib.m4 b/m4/threadlib.m4
index b43534ea27..2b6b6cf255 100644
--- a/m4/threadlib.m4
+++ b/m4/threadlib.m4
@@ -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