acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of POSIX threads.
authorPaolo Carlini <paolo.carlini@oracle.com>
Thu, 4 Sep 2008 18:57:42 +0000 (18:57 +0000)
committerPaolo Carlini <paolo@gcc.gnu.org>
Thu, 4 Sep 2008 18:57:42 +0000 (18:57 +0000)
2008-09-04  Paolo Carlini  <paolo.carlini@oracle.com>

  * acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of
POSIX threads.
* configure: Regenerate.

From-SVN: r139994

libstdc++-v3/ChangeLog
libstdc++-v3/acinclude.m4
libstdc++-v3/configure

index fa5059e..05ea4bd 100644 (file)
@@ -1,3 +1,9 @@
+2008-09-04  Paolo Carlini  <paolo.carlini@oracle.com>
+
+       * acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of
+       POSIX threads.
+       * configure: Regenerate.
+
 2008-09-04  Chris Fairles  <chris.fairles@gmail.com>
 
         * include/std/mutex (once_flag): Construct __gthread_once_t in a
index aba3786..b334657 100644 (file)
@@ -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])
index b1470c7..a6223e7 100755 (executable)
@@ -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;