summaryrefslogtreecommitdiffstats
path: root/jemalloc/test
diff options
context:
space:
mode:
authorJason Evans <je@facebook.com>2010-10-07 16:53:26 (GMT)
committerJason Evans <je@facebook.com>2010-10-07 16:53:26 (GMT)
commit9f3b0a74fdaac6fa5eb8b5a875b8901bc56b2f5e (patch)
treee7a09df8008af79aa44c90afddae06bf6912316c /jemalloc/test
parent1506a1b90341cf27415c01b271b56f82f682fd07 (diff)
downloadjemalloc-9f3b0a74fdaac6fa5eb8b5a875b8901bc56b2f5e.zip
jemalloc-9f3b0a74fdaac6fa5eb8b5a875b8901bc56b2f5e.tar.gz
jemalloc-9f3b0a74fdaac6fa5eb8b5a875b8901bc56b2f5e.tar.bz2
Fix tests build when --with-install-suffix is set.
Add test/jemalloc_test.h.in, which is processed to include jemalloc/jemalloc@install_suffix@.h, so that test programs can include it without worrying about the install suffix.
Diffstat (limited to 'jemalloc/test')
-rw-r--r--jemalloc/test/allocm.c2
-rw-r--r--jemalloc/test/jemalloc_test.h.in6
-rw-r--r--jemalloc/test/posix_memalign.c2
-rw-r--r--jemalloc/test/rallocm.c2
-rw-r--r--jemalloc/test/thread_arena.c2
5 files changed, 10 insertions, 4 deletions
diff --git a/jemalloc/test/allocm.c b/jemalloc/test/allocm.c
index 4367cb8..59d0002 100644
--- a/jemalloc/test/allocm.c
+++ b/jemalloc/test/allocm.c
@@ -3,7 +3,7 @@
#include <stdint.h>
#define JEMALLOC_MANGLE
-#include "jemalloc/jemalloc.h"
+#include "jemalloc_test.h"
#define CHUNK 0x400000
/* #define MAXALIGN ((size_t)0x80000000000LLU) */
diff --git a/jemalloc/test/jemalloc_test.h.in b/jemalloc/test/jemalloc_test.h.in
new file mode 100644
index 0000000..0c48895
--- /dev/null
+++ b/jemalloc/test/jemalloc_test.h.in
@@ -0,0 +1,6 @@
+/*
+ * This header should be included by tests, rather than directly including
+ * jemalloc/jemalloc.h, because --with-install-suffix may cause the header to
+ * have a different name.
+ */
+#include "jemalloc/jemalloc@install_suffix@.h"
diff --git a/jemalloc/test/posix_memalign.c b/jemalloc/test/posix_memalign.c
index c5651d7..3e306c0 100644
--- a/jemalloc/test/posix_memalign.c
+++ b/jemalloc/test/posix_memalign.c
@@ -5,7 +5,7 @@
#include <string.h>
#define JEMALLOC_MANGLE
-#include "jemalloc/jemalloc.h"
+#include "jemalloc_test.h"
#define CHUNK 0x400000
/* #define MAXALIGN ((size_t)0x80000000000LLU) */
diff --git a/jemalloc/test/rallocm.c b/jemalloc/test/rallocm.c
index b52bdb2..7e8a271 100644
--- a/jemalloc/test/rallocm.c
+++ b/jemalloc/test/rallocm.c
@@ -3,7 +3,7 @@
#include <string.h>
#define JEMALLOC_MANGLE
-#include "jemalloc/jemalloc.h"
+#include "jemalloc_test.h"
int
main(void)
diff --git a/jemalloc/test/thread_arena.c b/jemalloc/test/thread_arena.c
index 5b1058b..bd884e1 100644
--- a/jemalloc/test/thread_arena.c
+++ b/jemalloc/test/thread_arena.c
@@ -4,7 +4,7 @@
#include <string.h>
#define JEMALLOC_MANGLE
-#include "jemalloc/jemalloc.h"
+#include "jemalloc_test.h"
void *
thread_start(void *arg)