This is the mail archive of the libstdc++@gcc.gnu.org mailing list for the libstdc++ project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[v3] atomic.cc macro guard


... make guards match mutex.cc

tested x86_64/linux

-benjamin
2008-12-12  Benjamin Kosnik  <bkoz@redhat.com>

	* src/atomic.cc: Correct guards to match mutex.cc.

Index: src/atomic.cc
===================================================================
--- src/atomic.cc	(revision 142734)
+++ src/atomic.cc	(working copy)
@@ -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 @@
     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 @@
     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;

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]