summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--libstdc++-v3/ChangeLog4
-rw-r--r--libstdc++-v3/src/atomic.cc6
2 files changed, 7 insertions, 3 deletions
diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog
index 36149efdf27..a9b95b1d61b 100644
--- a/libstdc++-v3/ChangeLog
+++ b/libstdc++-v3/ChangeLog
@@ -1,3 +1,7 @@
+2008-12-12 Benjamin Kosnik <bkoz@redhat.com>
+
+ * src/atomic.cc: Correct guards to match mutex.cc.
+
2008-12-11 Benjamin Kosnik <bkoz@redhat.com>
Richard Henderson <rth@redhat.com>
diff --git a/libstdc++-v3/src/atomic.cc b/libstdc++-v3/src/atomic.cc
index e2fe68f09bc..9e6444dcfe3 100644
--- a/libstdc++-v3/src/atomic.cc
+++ b/libstdc++-v3/src/atomic.cc
@@ -36,7 +36,7 @@
namespace
{
-#ifdef _GLIBCXX_HAS_GTHREADS
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
std::mutex atomic_mutex;
#endif
@@ -56,7 +56,7 @@ namespace std
bool
atomic_flag::test_and_set(memory_order) volatile
{
-#ifdef _GLIBCXX_HAS_GTHREADS
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
lock_guard<mutex> __lock(atomic_mutex);
#endif
bool result = _M_i;
@@ -67,7 +67,7 @@ namespace std
void
atomic_flag::clear(memory_order) volatile
{
-#ifdef _GLIBCXX_HAS_GTHREADS
+#if defined(_GLIBCXX_HAS_GTHREADS) && defined(_GLIBCXX_USE_C99_STDINT_TR1)
lock_guard<mutex> __lock(atomic_mutex);
#endif
_M_i = false;