blob: 20365a280a3f6782ac44032c2946ecd53b09b14d (
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
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
|
#!/bin/sh -
#
# $Id$
#
# Check that DB doesn't call DB or DB_ENV methods internally.
d=../..
t=__1
echo ========================================================
echo "Check that DB doesn't call DB or DB_ENV methods internally."
echo ========================================================
m=`grep '(\*[a-z][_a-z]*)' $d/dbinc/db.in |
sed -e 's/^[^(]*(\*//' \
-e 's/).*//' \
-e '/am_bulk/d' \
-e '/am_close/d' \
-e '/am_del/d' \
-e '/am_destroy/d' \
-e '/am_get/d' \
-e '/am_put/d' \
-e '/am_remove/d' \
-e '/am_rename/d' \
-e '/am_writelock/d' \
-e '/app_dispatch/d' \
-e '/db_append_recno/d' \
-e '/db_errcall/d' \
-e '/db_event_func/d' \
-e '/db_feedback/d' \
-e '/db_free/d' \
-e '/db_malloc/d' \
-e '/db_paniccall/d' \
-e '/db_realloc/d' \
-e '/dbt_usercopy/d' \
-e '/dup_compare/d' \
-e '/s_callback/d' |
sort -u`
(cd $d && for i in $m; do
#echo "$i..." > /dev/stderr
egrep -- "->$i\(" */*.[ch]
done) |
sed \
-e '/Wrapper function for/d' \
-e '/\/db.h:/d' \
-e '/^[^:]*:[ ]*\*[ ]/d' \
-e '/^common\/db_getlong.c:/d' \
-e '/^common\/util_cache.c:/d' \
-e '/^common\/util_log.c:/d' \
-e '/^common\/util_sig.c:/d' \
-e '/^db185\//d' \
-e '/^db_archive\//d' \
-e '/^db_checkpoint\//d' \
-e '/^db_codegen\//d' \
-e '/^db_deadlock\//d' \
-e '/^db_dump185\//d' \
-e '/^db_dump\//d' \
-e '/^db_hotbackup\//d' \
-e '/^db_load\//d' \
-e '/^db_printlog\//d' \
-e '/^db_recover\//d' \
-e '/^db_stat\//d' \
-e '/^db_sql\//d' \
-e '/^db_upgrade\//d' \
-e '/^db_verify\//d' \
-e '/^dbm\//d' \
-e '/^examples_c\//d' \
-e '/^examples_cxx\//d' \
-e '/^examples_java\//d' \
-e '/^hsearch\//d' \
-e '/^libdb_java\//d' \
-e '/^libdb_csharp\//d' \
-e '/^mod_db4\//d' \
-e '/^mutex\/tm.c:/d' \
-e '/^php_db4\//d' \
-e '/^stl\//d' \
-e '/^tcl\//d' \
-e '/^test\//d' \
-e '/^test_erlang\//d' \
-e '/^test_perf\//d' \
-e '/^test_purify\//d' \
-e '/^test_repmgr\//d' \
-e '/^test_server\//d' \
-e '/^test_thread\//d' \
-e '/^test_vxworks\//d' \
-e '/^xa\//d' \
-e '/closeme->close() is a wrapper;/d' \
-e '/crypto.c.*db_cipher->close/d' \
-e '/db_err.c:.*dbenv->db_msgcall(dbenv, buf);/d' \
-e '/db_iface.c:.*(txn->commit(txn, nosync ? DB_TXN_NOSYNC : 0));/d' \
-e '/db_iface.c:.*if ((t_ret = txn->abort(txn)) != 0)/d' \
-e '/db_iface.c:.*return (dbenv->txn_begin(dbenv, NULL, txnidp, 0));/d' \
-e '/db_iface.c:.*return (dbp->get(dbp, txn, key, &data, flags));/d' \
-e '/dbenv->is_alive(/d' \
-e '/dbenv->thread_id(/d' \
-e '/dbenv->thread_id_string(/d' \
-e '/rep_util.c:.*ret = dbenv->rep_send(/d' \
-e '/test_mutex.c:/d'
>$t
test -s $t && {
cat $t
echo "FAIL: found DB/DB_ENV method calls DB library."
exit 1
}
exit 0
|