]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
Compiles now on Darwin.
authorBart Van Assche <bvanassche@acm.org>
Tue, 21 Jul 2009 11:12:59 +0000 (11:12 +0000)
committerBart Van Assche <bvanassche@acm.org>
Tue, 21 Jul 2009 11:12:59 +0000 (11:12 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@10498

drd/tests/tsan_thread_wrappers_pthread.h
drd/tests/tsan_unittest.cpp

index 58b00ccc5ba8b12b2123cd2019a090165a904ad3..a7a195fd5002d3e77e646a707e8195973ab87608 100644 (file)
@@ -51,7 +51,7 @@
 #include <stdio.h>
 #include <limits.h>   // INT_MAX
 
-#ifdef _APPLE_
+#ifdef __APPLE__
 #include <libkern/OSAtomic.h>
 #define NO_BARRIER
 #define NO_TLS
@@ -105,7 +105,7 @@ class CondVar;
 #ifndef NO_SPINLOCK
 /// helgrind does not (yet) support spin locks, so we annotate them.
 
-#ifndef _APPLE_
+#ifndef __APPLE__
 class SpinLock {
  public:
   SpinLock() {
@@ -150,7 +150,7 @@ class SpinLock {
  private:
   OSSpinLock mu_;
 };
-#endif // _APPLE_
+#endif // __APPLE__
 
 #endif // NO_SPINLOCK
 
@@ -588,7 +588,7 @@ class BlockingCounter {
 
 int AtomicIncrement(volatile int *value, int increment);
 
-#ifndef _APPLE_
+#ifndef __APPLE__
 inline int AtomicIncrement(volatile int *value, int increment) {
   return __sync_add_and_fetch(value, increment);
 }
@@ -607,7 +607,7 @@ int posix_memalign(void **out, size_t al, size_t size) {
   *out = memalign(al, size);
   return (*out == 0);
 }
-#endif // _APPLE_
+#endif // __APPLE__
 
 #endif // THREAD_WRAPPERS_PTHREAD_H
 // vim:shiftwidth=2:softtabstop=2:expandtab:foldmethod=marker
index c76365cc9112526cf91459271df00034774ed9fd..bd3ec94f175e376a619a46e79c558a81dc2be050 100644 (file)
@@ -93,7 +93,7 @@ static inline void IGNORE_RETURN_VALUE(T v)
 #include <stdlib.h>
 #include <dirent.h>
 
-#ifndef _APPLE_
+#ifndef __APPLE__
 #include <malloc.h>
 #endif