summaryrefslogtreecommitdiff
path: root/bdb/dist/build/chk.def
blob: abd12b83908f8f77b565d59ee0e92973998ad22b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
#!/bin/sh -
#
# $Id: chk.def,v 1.4 2000/12/12 18:20:59 bostic Exp $
#
# Check to make sure we haven't forgotten to add any interfaces
# to the Win32 libdb.def file.

# Run from the top-level directory.
[ -f db_config.h ] && cd ..

f=build_win32/libdb.def
t1=/tmp/__1
t2=/tmp/__2

sed '/; /d' $f |
    egrep @ |
    awk '{print $1}' |
    sed -e '/db_xa_switch/d' \
	-e '/^__/d' -e '/^;/d' |
    sort > ${t1}

egrep __P include/db.src |
    sed '/^[a-z]/!d' |
    awk '{print $2}' |
    sed 's/^\*//' |
    sed '/^__/d' | sort > ${t2}

if cmp -s ${t1} ${t2} ; then
	:
else
	echo "<<< libdb.def"
	echo ">>> DB include files"
	diff ${t1} ${t2}
fi

# Check to make sure we don't have any extras in the libdb.def file.
sed '/; /d' $f |
    egrep @ |
    awk '{print $1}' |
    sed -e '/__db_global_values/d' > ${t1}

for i in `cat ${t1}`; do
	if egrep $i */*.c > /dev/null; then
		:
	else
		echo "$f: $i not found in DB sources"
	fi
done

rm -f ${t1} ${t2}