+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
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])
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;