~samba-team/talloc/ppa-maverick

« back to all changes in this revision

Viewing changes to script/abi_checks_gcc.sh

  • Committer: Jelmer Vernooij
  • Date: 2010-05-06 13:36:58 UTC
  • mfrom: (36.1.12 unstable)
  • Revision ID: jelmer@samba.org-20100506133658-l9k1768b1ww3zh62
Merge unstable.

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#!/bin/bash
 
2
 
 
3
make clean
 
4
 
 
5
mkdir abi
 
6
ABI_CHECKS="-aux-info abi/\$@.X"
 
7
make ABI_CHECK="$ABI_CHECKS" CC="/usr/bin/gcc"
 
8
 
 
9
for i in abi/*.X; do cat $i | grep 'talloc\.h'; done | sort | uniq | awk -F "extern " '{ print $2 }' | sort > abi/signatures
 
10
 
 
11
cat > abi/exports << EOF
 
12
{
 
13
    global:
 
14
EOF
 
15
cat abi/signatures | awk -F '(' '{ print $1 }' | awk -F ' ' '{ print "           "$NF";" }' | tr -d '*' | sort >> abi/exports
 
16
# need to manually add talloc free for backward ABI compat
 
17
echo '           talloc_free;' >> abi/exports
 
18
cat >> abi/exports << EOF
 
19
 
 
20
    local: *;
 
21
};
 
22
EOF
 
23
 
 
24
rm -fr abi/*.X
 
25
 
 
26
diff -u talloc.signatures abi/signatures
 
27
if [ "$?" != "0" ]; then
 
28
    echo "WARNING: Possible ABI Change!!"
 
29
fi
 
30
 
 
31
diff -u talloc.exports abi/exports
 
32
if [ "$?" != "0" ]; then
 
33
    echo "WARNING: Export file may be outdated!!"
 
34
fi