futriix/include/jemalloc/jemalloc_rename.sh
Yoav Steinberg 220a0f0880 Squashed 'deps/jemalloc/' content from commit 886e40bb3
git-subtree-dir: deps/jemalloc
git-subtree-split: 886e40bb339ec1358a5ff2a52fdb782ca66461cb
2021-10-10 18:26:48 +03:00

23 lines
460 B
Bash
Executable File

#!/bin/sh
public_symbols_txt=$1
cat <<EOF
/*
* Name mangling for public symbols is controlled by --with-mangling and
* --with-jemalloc-prefix. With default settings the je_ prefix is stripped by
* these macro definitions.
*/
#ifndef JEMALLOC_NO_RENAME
EOF
for nm in `cat ${public_symbols_txt}` ; do
n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'`
m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'`
echo "# define je_${n} ${m}"
done
cat <<EOF
#endif
EOF