@@ -143,8 +143,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class __mutex
{
private:
-#if __GTHREADS && defined __GTHREAD_MUTEX_INIT \
- && defined __GXX_EXPERIMENTAL_CXX0X__
+#if __GTHREADS && defined __GTHREAD_MUTEX_INIT
__gthread_mutex_t _M_mutex = __GTHREAD_MUTEX_INIT;
#else
__gthread_mutex_t _M_mutex;
@@ -156,19 +155,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
__mutex()
{
-#if __GTHREADS
+#if __GTHREADS && ! defined __GTHREAD_MUTEX_INIT
if (__gthread_active_p())
- {
-#if defined __GTHREAD_MUTEX_INIT
-# ifndef __GXX_EXPERIMENTAL_CXX0X__
- __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
- _M_mutex = __tmp;
-# endif
-#else
- __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
+ __GTHREAD_MUTEX_INIT_FUNCTION(&_M_mutex);
#endif
- }
-#endif
}
#if __GTHREADS && ! defined __GTHREAD_MUTEX_INIT
@@ -208,8 +198,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class __recursive_mutex
{
private:
-#if __GTHREADS && defined __GTHREAD_RECURSIVE_MUTEX_INIT \
- && defined __GXX_EXPERIMENTAL_CXX0X__
+#if __GTHREADS && defined __GTHREAD_RECURSIVE_MUTEX_INIT
__gthread_recursive_mutex_t _M_mutex = __GTHREAD_RECURSIVE_MUTEX_INIT;
#else
__gthread_recursive_mutex_t _M_mutex;
@@ -221,19 +210,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
__recursive_mutex()
{
-#if __GTHREADS
+#if __GTHREADS && ! defined __GTHREAD_RECURSIVE_MUTEX_INIT
if (__gthread_active_p())
- {
-#if defined __GTHREAD_RECURSIVE_MUTEX_INIT
-# ifndef __GXX_EXPERIMENTAL_CXX0X__
- __gthread_recursive_mutex_t __tmp = __GTHREAD_RECURSIVE_MUTEX_INIT;
- _M_mutex = __tmp;
-# endif
-#else
- __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
+ __GTHREAD_RECURSIVE_MUTEX_INIT_FUNCTION(&_M_mutex);
#endif
- }
-#endif
}
#if __GTHREADS && ! defined __GTHREAD_RECURSIVE_MUTEX_INIT
@@ -333,8 +313,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
class __cond
{
private:
-#if __GTHREADS && defined __GTHREAD_COND_INIT \
- && defined __GXX_EXPERIMENTAL_CXX0X__
+#if __GTHREADS && defined __GTHREAD_COND_INIT
__gthread_cond_t _M_cond = __GTHREAD_COND_INIT;
#else
__gthread_cond_t _M_cond;
@@ -346,19 +325,10 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
public:
__cond()
{
-#if __GTHREADS
+#if __GTHREADS && ! defined __GTHREAD_COND_INIT
if (__gthread_active_p())
- {
-#if defined __GTHREAD_COND_INIT
-# ifndef __GXX_EXPERIMENTAL_CXX0X__
- __gthread_cond_t __tmp = __GTHREAD_COND_INIT;
- _M_cond = __tmp;
-# endif
-#else
- __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
+ __GTHREAD_COND_INIT_FUNCTION(&_M_cond);
#endif
- }
-#endif
}
#if __GTHREADS && ! defined __GTHREAD_COND_INIT
@@ -44,6 +44,8 @@
#ifndef _ROPE
#define _ROPE 1
+#pragma GCC system_header
+
#include <algorithm>
#include <iosfwd>
#include <bits/stl_construct.h>
@@ -458,7 +460,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
volatile _RC_t _M_ref_count;
// Constructor
-#if defined __GTHREAD_MUTEX_INIT && defined __GXX_EXPERIMENTAL_CXX0X__
+#ifdef __GTHREAD_MUTEX_INIT
__gthread_mutex_t _M_ref_count_lock = __GTHREAD_MUTEX_INIT;
#else
__gthread_mutex_t _M_ref_count_lock;
@@ -466,16 +468,13 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
_Refcount_Base(_RC_t __n) : _M_ref_count(__n), _M_ref_count_lock()
{
-#ifdef __GTHREAD_MUTEX_INIT
-# ifndef __GXX_EXPERIMENTAL_CXX0X__
- __gthread_mutex_t __tmp = __GTHREAD_MUTEX_INIT;
- _M_ref_count_lock = __tmp;
-# endif
-#elif defined(__GTHREAD_MUTEX_INIT_FUNCTION)
+#ifndef __GTHREAD_MUTEX_INIT
+#ifdef __GTHREAD_MUTEX_INIT_FUNCTION
__GTHREAD_MUTEX_INIT_FUNCTION (&_M_ref_count_lock);
#else
#error __GTHREAD_MUTEX_INIT or __GTHREAD_MUTEX_INIT_FUNCTION should be defined by gthr.h abstraction layer, report problem to libstdc++@gcc.gnu.org.
#endif
+#endif
}
#ifndef __GTHREAD_MUTEX_INIT