| 1 |
#!/bin/sh - |
| 2 |
# |
| 3 |
# $Id$ |
| 4 |
# |
| 5 |
# Check to make sure __mutex_print_id knows about all of the mutex types. |
| 6 |
|
| 7 |
d=../.. |
| 8 |
[ -f $d/LICENSE ] || { |
| 9 |
echo 'FAIL: cannot find source distribution directory.' |
| 10 |
exit 1 |
| 11 |
} |
| 12 |
|
| 13 |
s=$d/src |
| 14 |
t1=__1 |
| 15 |
t2=__2 |
| 16 |
|
| 17 |
egrep 'case MTX_.*return' $s/mutex/mut_stat.c | |
| 18 |
sed -e 's/.*case //' \ |
| 19 |
-e 's/:.*//' | |
| 20 |
sort > $t1 |
| 21 |
|
| 22 |
egrep '#define.MTX_' $s/dbinc/mutex.h | |
| 23 |
sed -e 's/#define.//' \ |
| 24 |
-e 's/ .*//' \ |
| 25 |
-e '/MTX_MAX_ENTRY/d' | |
| 26 |
sort > $t2 |
| 27 |
|
| 28 |
cmp $t1 $t2 > /dev/null || { |
| 29 |
echo "<<< mutex/mut_stat.c >>> dbinc/mutex.h" |
| 30 |
diff $t1 $t2 |
| 31 |
exit 1 |
| 32 |
} |
| 33 |
|
| 34 |
rm -f $t1 $t2 |
| 35 |
|
| 36 |
exit 0 |