1 #!/bin/sh 2 3 public_symbols_txt=$1 4 5 cat <<EOF 6 /* 7 * Name mangling for public symbols is controlled by --with-mangling and 8 * --with-jemalloc-prefix. With default settings the je_ prefix is stripped by 9 * these macro definitions. 10 */ 11 #ifndef JEMALLOC_NO_RENAME 12 EOF 13 14 for nm in `cat ${public_symbols_txt}` ; do 15 n=`echo ${nm} |tr ':' ' ' |awk '{print $1}'` 16 m=`echo ${nm} |tr ':' ' ' |awk '{print $2}'` 17 echo "# define je_${n} ${m}" 18 done 19 20 cat <<EOF 21 #endif 22 EOF 23