From a1c5742d23d814196858c58173630dd8ee90f48f Mon Sep 17 00:00:00 2001 From: Paolo Carlini Date: Thu, 4 Sep 2008 18:57:42 +0000 Subject: [PATCH] acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of POSIX threads. 2008-09-04 Paolo Carlini * acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of POSIX threads. * configure: Regenerate. From-SVN: r139994 --- libstdc++-v3/ChangeLog | 6 ++++++ libstdc++-v3/acinclude.m4 | 13 +++++++++---- libstdc++-v3/configure | 13 +++++++++---- 3 files changed, 24 insertions(+), 8 deletions(-) diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index fa5059e25e8..05ea4bda4a8 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,9 @@ +2008-09-04 Paolo Carlini + + * acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of + POSIX threads. + * configure: Regenerate. + 2008-09-04 Chris Fairles * include/std/mutex (once_flag): Construct __gthread_once_t in a diff --git a/libstdc++-v3/acinclude.m4 b/libstdc++-v3/acinclude.m4 index aba378693df..b334657042d 100644 --- a/libstdc++-v3/acinclude.m4 +++ b/libstdc++-v3/acinclude.m4 @@ -2843,10 +2843,15 @@ AC_DEFUN([GLIBCXX_CHECK_GTHREADS], [ AC_TRY_COMPILE([#include "gthr.h"], [ - #if (!defined(__GTHREADS_CXX0X) || !defined(_POSIX_TIMEOUTS) \ - || _POSIX_TIMEOUTS <= 0) - #error - #endif + #ifndef __GTHREADS_CXX0X + #error + #endif + + // In case of POSIX threads check _POSIX_TIMEOUTS too. + #if (defined(_PTHREADS) \ + && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0)) + #error + #endif ], [ac_has_gthreads=yes], [ac_has_gthreads=no]) AC_MSG_RESULT([$ac_has_gthreads]) diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index b1470c7cf78..a6223e7a40d 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -21610,10 +21610,15 @@ int main () { - #if (!defined(__GTHREADS_CXX0X) || !defined(_POSIX_TIMEOUTS) \ - || _POSIX_TIMEOUTS <= 0) - #error - #endif + #ifndef __GTHREADS_CXX0X + #error + #endif + + // In case of POSIX threads check _POSIX_TIMEOUTS too. + #if (defined(_PTHREADS) \ + && (!defined(_POSIX_TIMEOUTS) || _POSIX_TIMEOUTS <= 0)) + #error + #endif ; return 0;