diff options
Diffstat (limited to 'lib/talloc/abi_checks.sh')
-rwxr-xr-x | lib/talloc/abi_checks.sh | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/talloc/abi_checks.sh b/lib/talloc/abi_checks.sh new file mode 100755 index 0000000000..432cc87745 --- /dev/null +++ b/lib/talloc/abi_checks.sh @@ -0,0 +1,32 @@ +#!/bin/bash + +make clean + +mkdir abi +ABI_CHECKS="-aux-info abi/\$@.X" +make ABI_CHECK="$ABI_CHECKS" + +for i in abi/*.X; do cat $i | grep 'talloc\.h'; done | sort | uniq | awk -F "extern " '{ print $2 }' > abi/signatures + +cat > abi/exports << EOF +{ + global: +EOF +cat abi/signatures | awk -F '(' '{ print $1 }' | awk -F ' ' '{ print " "$NF";" }' | tr -d '*' | sort >> abi/exports +cat >> abi/exports << EOF + + local: *; +}; +EOF + +rm -fr abi/*.X + +diff -u talloc.signatures abi/signatures +if [ "$?" != "0" ]; then + echo "WARNING: Possible ABI Change!!" +fi + +diff -u talloc.exports abi/exports +if [ "$?" != "0" ]; then + echo "WARNING: Export file may be outdated!!" +fi |