summaryrefslogtreecommitdiffstats
path: root/include/jemalloc/jemalloc.sh
diff options
context:
space:
mode:
authorJason Evans <jasone@canonware.com>2014-01-22 19:11:22 (GMT)
committerJason Evans <jasone@canonware.com>2014-01-22 19:11:22 (GMT)
commitcc47dde16203a6ae7eb685b53e1ae501f3869bc6 (patch)
tree74e81d65651b2ca7e294a857797dda6635177454 /include/jemalloc/jemalloc.sh
parent0135fb806e4137dc9cdf152541926a2bc95e33f0 (diff)
parent798a48103014aabf8afb3d7efff90399a466dd8c (diff)
downloadjemalloc-3.5.0.zip
jemalloc-3.5.0.tar.gz
jemalloc-3.5.0.tar.bz2
Merge branch 'dev'3.5.0
Diffstat (limited to 'include/jemalloc/jemalloc.sh')
-rwxr-xr-xinclude/jemalloc/jemalloc.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/include/jemalloc/jemalloc.sh b/include/jemalloc/jemalloc.sh
new file mode 100755
index 0000000..e4738eb
--- /dev/null
+++ b/include/jemalloc/jemalloc.sh
@@ -0,0 +1,28 @@
+#!/bin/sh
+
+objroot=$1
+
+cat <<EOF
+#ifndef JEMALLOC_H_
+#define JEMALLOC_H_
+#ifdef __cplusplus
+extern "C" {
+#endif
+
+EOF
+
+for hdr in jemalloc_defs.h jemalloc_rename.h jemalloc_macros.h \
+ jemalloc_protos.h jemalloc_mangle.h ; do
+ cat "${objroot}include/jemalloc/${hdr}" \
+ | grep -v 'Generated from .* by configure\.' \
+ | sed -e 's/^#define /#define /g' \
+ | sed -e 's/ $//g'
+ echo
+done
+
+cat <<EOF
+#ifdef __cplusplus
+};
+#endif
+#endif /* JEMALLOC_H_ */
+EOF