summaryrefslogtreecommitdiff
path: root/tests
diff options
context:
space:
mode:
Diffstat (limited to 'tests')
-rw-r--r--tests/asm.h8
-rw-r--r--tests/malloc.h11
-rw-r--r--tests/sys_mman.h4
3 files changed, 1 insertions, 22 deletions
diff --git a/tests/asm.h b/tests/asm.h
index d64a893f..0fd5cb3b 100644
--- a/tests/asm.h
+++ b/tests/asm.h
@@ -5,15 +5,7 @@
// general, any symbol named in asm code should be wrapped by VG_SYM.
// This one is for use in inline asm in C files.
-#if defined(VGO_darwin)
-#define VG_SYM(x) "_"#x
-#else
#define VG_SYM(x) #x
-#endif
// This one is for use in asm files.
-#if defined(VGO_darwin)
#define VG_SYM_ASM(x) _#x
-#else
-#define VG_SYM_ASM(x) x
-#endif
diff --git a/tests/malloc.h b/tests/malloc.h
index 0179b387..454d2cff 100644
--- a/tests/malloc.h
+++ b/tests/malloc.h
@@ -1,11 +1,7 @@
// Replacement for malloc.h which factors out platform differences.
#include <stdlib.h>
-#if defined(VGO_darwin)
-# include <malloc/malloc.h>
-#else
-# include <malloc.h>
-#endif
+#include <malloc.h>
#include <assert.h>
@@ -14,12 +10,7 @@ __attribute__((unused))
static void* memalign16(size_t szB)
{
void* x;
-#if defined(VGO_darwin)
- // Darwin lacks memalign, but its malloc is always 16-aligned anyway.
- x = malloc(szB);
-#else
x = memalign(16, szB);
-#endif
assert(x);
assert(0 == ((16-1) & (unsigned long)x));
return x;
diff --git a/tests/sys_mman.h b/tests/sys_mman.h
index 7ac64d54..862bccc1 100644
--- a/tests/sys_mman.h
+++ b/tests/sys_mman.h
@@ -2,10 +2,6 @@
#include <sys/mman.h>
-#if defined(VGO_darwin)
-# define MAP_ANONYMOUS MAP_ANON
-#endif
-
#include <assert.h>
#include <unistd.h>