summaryrefslogtreecommitdiff
path: root/lib/tdb/script
diff options
context:
space:
mode:
authorMichael Adam <obnox@samba.org>2009-08-28 16:04:47 +0200
committerMichael Adam <obnox@samba.org>2009-08-30 00:51:55 +0200
commit84446a2407d0e44f829a11d033ba59286d286e1b (patch)
tree9c94aaa1acbbe2db98ea1569a886b0690268be1c /lib/tdb/script
parentf7c473f53470b3fb7eac9474928cfa76219e766e (diff)
downloadsamba-84446a2407d0e44f829a11d033ba59286d286e1b.tar.gz
samba-84446a2407d0e44f829a11d033ba59286d286e1b.tar.bz2
samba-84446a2407d0e44f829a11d033ba59286d286e1b.zip
tdb: move the original abi_checks script to script/abi_checks_gcc.sh
Michael
Diffstat (limited to 'lib/tdb/script')
-rwxr-xr-xlib/tdb/script/abi_checks_gcc.sh35
1 files changed, 35 insertions, 0 deletions
diff --git a/lib/tdb/script/abi_checks_gcc.sh b/lib/tdb/script/abi_checks_gcc.sh
new file mode 100755
index 0000000000..f0e02f4825
--- /dev/null
+++ b/lib/tdb/script/abi_checks_gcc.sh
@@ -0,0 +1,35 @@
+#!/bin/bash
+
+make clean
+
+mkdir -p abi/common
+mkdir -p abi/tools
+ABI_CHECKS="-aux-info abi/\$@.X"
+make ABI_CHECK="$ABI_CHECKS" CC="/usr/bin/gcc"
+
+for i in abi/*/*.X; do cat $i | grep 'tdb\.h'; done | sort | uniq | awk -F "extern " '{ print $2 }' | sort > abi/signatures
+grep '^extern' include/tdb.h | grep -v '"C"' | sort | uniq | awk -F "extern " '{ print $2 }' >> abi/signatures
+
+cat > abi/exports << EOF
+{
+ global:
+EOF
+#Functions
+cat abi/signatures | grep "(" | awk -F '(' '{ print $1 }' | awk -F ' ' '{ print " "$NF";" }' | tr -d '*' | sort >> abi/exports
+#global vars
+cat abi/signatures | grep -v "(" | awk -F ';' '{print $1 }' | awk -F ' ' '{ print " "$NF";" }' | tr -d '*' | sort >> abi/exports
+cat >> abi/exports << EOF
+
+ local: *;
+};
+EOF
+
+diff -u tdb.signatures abi/signatures
+if [ "$?" != "0" ]; then
+ echo "WARNING: Possible ABI Change!!"
+fi
+
+diff -u tdb.exports abi/exports
+if [ "$?" != "0" ]; then
+ echo "WARNING: Export file may be outdated!!"
+fi