]> git.ipfire.org Git - thirdparty/valgrind.git/commitdiff
DRD tests: replaced __APPLE__ by VGO_darwin.
authorBart Van Assche <bvanassche@acm.org>
Sat, 5 Mar 2011 14:11:40 +0000 (14:11 +0000)
committerBart Van Assche <bvanassche@acm.org>
Sat, 5 Mar 2011 14:11:40 +0000 (14:11 +0000)
git-svn-id: svn://svn.valgrind.org/valgrind/trunk@11589

drd/tests/circular_buffer.c
drd/tests/memory_allocation.c
drd/tests/pth_inconsistent_cond_wait.c
drd/tests/tsan_thread_wrappers_pthread.h
drd/tests/tsan_unittest.cpp

index 68035215c56dcb343c76542c06f72b8b10a4cf1a..dcfc6115a8bf31dc341385521726850827514c3b 100644 (file)
@@ -59,7 +59,7 @@ int fetch_and_add(int* p, int i)
 
 static sem_t* create_semaphore(const char* const name, const int value)
 {
-#ifdef __APPLE__
+#ifdef VGO_darwin
   sem_t* p = sem_open(name, O_CREAT, 0600, value);
   return p;
 #else
@@ -72,7 +72,7 @@ static sem_t* create_semaphore(const char* const name, const int value)
 
 static void destroy_semaphore(const char* const name, sem_t* p)
 {
-#ifdef __APPLE__
+#ifdef VGO_darwin
   sem_close(p);
   sem_unlink(name);
 #else
index 1072489d0cb31d1849e558452c4a318fba8c74d9..d6d63882363bf7a90e2a9522106c64888ee2d567 100644 (file)
@@ -26,7 +26,7 @@ int main()
      * is zero, while Darwin's C library returns a non-NULL pointer. Both are
      * allowed by POSIX.
      */
-#if defined(__APPLE__)
+#if defined(VGO_darwin)
     if (p)
       free(p);
 #else
index 618b5401aaaa1a3deb11e14f451aa8af5ae7cfe9..ccfbc3a20babaeef46ef3032dba20564b4b2ef7f 100644 (file)
@@ -44,7 +44,7 @@ static int             s_quiet;
 
 static sem_t* create_semaphore(const char* const name)
 {
-#ifdef __APPLE__
+#ifdef VGO_darwin
   sem_t* p = sem_open(name, O_CREAT, 0600, 0);
   return p;
 #else
@@ -57,7 +57,7 @@ static sem_t* create_semaphore(const char* const name)
 
 static void destroy_semaphore(const char* const name, sem_t* p)
 {
-#ifdef __APPLE__
+#ifdef VGO_darwin
   sem_close(p);
   sem_unlink(name);
 #else
index cfb9b3cd277c43971c22dd7dd7b732866d1135e7..7072fead1c9e3be908cb7ab58aed7af4f0fb2b8f 100644 (file)
@@ -51,7 +51,7 @@
 #include <stdio.h>
 #include <limits.h>   // INT_MAX
 
-#ifdef __APPLE__
+#ifdef VGO_darwin
 #include <libkern/OSAtomic.h>
 #define NO_BARRIER
 #define NO_TLS
@@ -106,7 +106,7 @@ class CondVar;
 #ifndef NO_SPINLOCK
 /// helgrind does not (yet) support spin locks, so we annotate them.
 
-#ifndef __APPLE__
+#ifndef VGO_darwin
 class SpinLock {
  public:
   SpinLock() {
@@ -151,7 +151,7 @@ class SpinLock {
  private:
   OSSpinLock mu_;
 };
-#endif // __APPLE__
+#endif // VGO_darwin
 
 #endif // NO_SPINLOCK
 
@@ -589,7 +589,7 @@ class BlockingCounter {
 
 int AtomicIncrement(volatile int *value, int increment);
 
-#ifndef __APPLE__
+#ifndef VGO_darwin
 inline int AtomicIncrement(volatile int *value, int increment) {
   return __sync_add_and_fetch(value, increment);
 }
@@ -608,7 +608,7 @@ int posix_memalign(void **out, size_t al, size_t size) {
   *out = memalign(al, size);
   return (*out == 0);
 }
-#endif // __APPLE__
+#endif // VGO_darwin
 
 #endif // THREAD_WRAPPERS_PTHREAD_H
 // vim:shiftwidth=2:softtabstop=2:expandtab:foldmethod=marker
index 6ba123d7626a10988e3eda43004a4c6253d9951b..57357a3371cd6378d158ee062eecc6a01f9b3014 100644 (file)
@@ -93,7 +93,7 @@ static inline void IGNORE_RETURN_VALUE(T v)
 #include <stdlib.h>
 #include <dirent.h>
 
-#ifndef __APPLE__
+#ifndef VGO_darwin
 #include <malloc.h>
 #endif
 
@@ -4786,7 +4786,7 @@ void Run() {
   // but the files are actually the same (symlinked).
   sprintf(out_name, "/tmp/racecheck_unittest_out.%d", getpid());
   fd_out = creat(out_name, O_WRONLY | S_IRWXU);
-#ifdef __APPLE__
+#ifdef VGO_darwin
   // symlink() is not supported on Darwin. Copy the output file name.
   strcpy(in_name, out_name);
 #else