2008-09-04 Paolo Carlini <paolo.carlini@oracle.com>
authorpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Sep 2008 18:57:42 +0000 (18:57 +0000)
committerpaolo <paolo@138bc75d-0d04-0410-961f-82ee72b054a4>
Thu, 4 Sep 2008 18:57:42 +0000 (18:57 +0000)
  * acinclude.m4 ([GLIBCXX_CHECK_GTHREADS]): Tidy checks in case of
POSIX threads.
* configure: Regenerate.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@139994 138bc75d-0d04-0410-961f-82ee72b054a4

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;