f234dc51b9
Fix stress tests such that testlib code uses the jet_ allocator, but test code uses libjemalloc. Generate jemalloc_{rename,mangle}.h, the former because it's needed for the stress test name mangling fix, and the latter for consistency. As an artifact of this change, some (but not all) definitions related to the experimental API are absent from the headers unless the feature is enabled at configure time.
29 lines
480 B
Bash
Executable File
29 lines
480 B
Bash
Executable File
#!/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
|