Commit 60b6534a by Jonathan Wakely Committed by Jonathan Wakely

re PR libstdc++/64203 (shared_mutex compile errors on bare-metal targets)

	PR libstdc++/64203
	* include/std/shared_mutex: Fix preprocessor conditions.
	* testsuite/experimental/feat-cxx14.cc: Check conditions.

From-SVN: r218511
parent ac6aeab4
2014-12-09 Jonathan Wakely <jwakely@redhat.com>
PR libstdc++/64203
* include/std/shared_mutex: Fix preprocessor conditions.
* testsuite/experimental/feat-cxx14.cc: Check conditions.
2014-12-05 Jonathan Wakely <jwakely@redhat.com> 2014-12-05 Jonathan Wakely <jwakely@redhat.com>
* include/bits/hashtable_policy.h (_Map_base::operator[], * include/bits/hashtable_policy.h (_Map_base::operator[],
......
...@@ -36,10 +36,8 @@ ...@@ -36,10 +36,8 @@
#else #else
#include <bits/c++config.h> #include <bits/c++config.h>
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) #include <mutex>
# include <mutex> #include <condition_variable>
# include <condition_variable>
#endif
#include <bits/functexcept.h> #include <bits/functexcept.h>
namespace std _GLIBCXX_VISIBILITY(default) namespace std _GLIBCXX_VISIBILITY(default)
...@@ -51,7 +49,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -51,7 +49,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
* @{ * @{
*/ */
#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1) #ifdef _GLIBCXX_USE_C99_STDINT_TR1
#ifdef _GLIBCXX_HAS_GTHREADS
#define __cpp_lib_shared_timed_mutex 201402 #define __cpp_lib_shared_timed_mutex 201402
...@@ -254,7 +253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -254,7 +253,7 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
} }
} }
}; };
#endif // _GLIBCXX_HAS_GTHREADS && _GLIBCXX_USE_C99_STDINT_TR1 #endif // _GLIBCXX_HAS_GTHREADS
/// shared_lock /// shared_lock
template<typename _Mutex> template<typename _Mutex>
...@@ -393,6 +392,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION ...@@ -393,6 +392,8 @@ _GLIBCXX_BEGIN_NAMESPACE_VERSION
swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept swap(shared_lock<_Mutex>& __x, shared_lock<_Mutex>& __y) noexcept
{ __x.swap(__y); } { __x.swap(__y); }
#endif // _GLIBCXX_USE_C99_STDINT_TR1
// @} group mutexes // @} group mutexes
_GLIBCXX_END_NAMESPACE_VERSION _GLIBCXX_END_NAMESPACE_VERSION
} // namespace } // namespace
......
...@@ -106,10 +106,12 @@ ...@@ -106,10 +106,12 @@
# error "<shared_mutex>" # error "<shared_mutex>"
#endif #endif
#ifndef __cpp_lib_shared_timed_mutex #if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
# error "__cpp_lib_shared_timed_mutex" # ifndef __cpp_lib_shared_timed_mutex
#elif __cpp_lib_shared_timed_mutex != 201402 # error "__cpp_lib_shared_timed_mutex"
# error "__cpp_lib_shared_timed_mutex != 201402" # elif __cpp_lib_shared_timed_mutex != 201402
# error "__cpp_lib_shared_timed_mutex != 201402"
# endif
#endif #endif
#ifndef __cpp_lib_is_final #ifndef __cpp_lib_is_final
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment