summaryrefslogtreecommitdiffstats
path: root/memory/jemalloc/src/include/jemalloc/jemalloc.sh
diff options
context:
space:
mode:
Diffstat (limited to 'memory/jemalloc/src/include/jemalloc/jemalloc.sh')
-rwxr-xr-xmemory/jemalloc/src/include/jemalloc/jemalloc.sh28
1 files changed, 28 insertions, 0 deletions
diff --git a/memory/jemalloc/src/include/jemalloc/jemalloc.sh b/memory/jemalloc/src/include/jemalloc/jemalloc.sh
new file mode 100755
index 000000000..c085814f2
--- /dev/null
+++ b/memory/jemalloc/src/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_typedefs.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