From: Bruno Haible Date: Sat, 10 Dec 2016 13:04:42 +0000 (+0100) Subject: threadlib: Optimize out runtime test on Solaris >= 10. X-Git-Tag: v1.0~6508 X-Git-Url: https://gitweb.git.savannah.gnu.org/gitweb/?a=commitdiff_plain;h=83d3c7ff38488105ab667b37671086c3d739c30c;p=gnulib.git 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 . --- diff --git a/ChangeLog b/ChangeLog index 90c264af50..f547cca1af 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,10 @@ +2016-12-10 Bruno Haible + + 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 . + 2016-12-10 Bruno Haible stdint: Update doc about Solaris 9. 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