~jspashett/+junk/sossnt-import

« back to all changes in this revision

Viewing changes to src/db-4.2.52.NC/hash/hash_stub.c

  • Committer: jason.spashett
  • Date: 2009-09-24 13:40:02 UTC
  • Revision ID: jason.spashett@sw-dev-jspash1-20090924134002-biz3nn1401317vkb
Initial import from sourceforge

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
/*-
 
2
 * See the file LICENSE for redistribution information.
 
3
 *
 
4
 * Copyright (c) 1996-2003
 
5
 *      Sleepycat Software.  All rights reserved.
 
6
 */
 
7
#include "db_config.h"
 
8
 
 
9
#ifndef lint
 
10
static const char revid[] = "$Id: hash_stub.c,v 1.4 2003/07/01 19:47:14 bostic Exp $";
 
11
#endif /* not lint */
 
12
 
 
13
#ifndef NO_SYSTEM_INCLUDES
 
14
#include <sys/types.h>
 
15
#endif
 
16
 
 
17
#include "db_int.h"
 
18
#include "dbinc/db_page.h"
 
19
#include "dbinc/hash.h"
 
20
 
 
21
/*
 
22
 * If the library wasn't compiled with the Hash access method, various
 
23
 * routines aren't available.  Stub them here, returning an appropriate
 
24
 * error.
 
25
 */
 
26
 
 
27
/*
 
28
 * __db_nohasham --
 
29
 *      Error when a Berkeley DB build doesn't include the access method.
 
30
 *
 
31
 * PUBLIC: int __db_no_hash_am __P((DB_ENV *));
 
32
 */
 
33
int
 
34
__db_no_hash_am(dbenv)
 
35
        DB_ENV *dbenv;
 
36
{
 
37
        __db_err(dbenv,
 
38
            "library build did not include support for the Hash access method");
 
39
        return (DB_OPNOTSUP);
 
40
}
 
41
 
 
42
int
 
43
__ham_30_hashmeta(dbp, real_name, obuf)
 
44
        DB *dbp;
 
45
        char *real_name;
 
46
        u_int8_t *obuf;
 
47
{
 
48
        COMPQUIET(real_name, NULL);
 
49
        COMPQUIET(obuf, NULL);
 
50
        return (__db_no_hash_am(dbp->dbenv));
 
51
}
 
52
 
 
53
int
 
54
__ham_30_sizefix(dbp, fhp, realname, metabuf)
 
55
        DB *dbp;
 
56
        DB_FH *fhp;
 
57
        char *realname;
 
58
        u_int8_t *metabuf;
 
59
{
 
60
        COMPQUIET(fhp, NULL);
 
61
        COMPQUIET(realname, NULL);
 
62
        COMPQUIET(metabuf, NULL);
 
63
        return (__db_no_hash_am(dbp->dbenv));
 
64
}
 
65
 
 
66
int
 
67
__ham_31_hash(dbp, real_name, flags, fhp, h, dirtyp)
 
68
        DB *dbp;
 
69
        char *real_name;
 
70
        u_int32_t flags;
 
71
        DB_FH *fhp;
 
72
        PAGE *h;
 
73
        int *dirtyp;
 
74
{
 
75
        COMPQUIET(real_name, NULL);
 
76
        COMPQUIET(flags, 0);
 
77
        COMPQUIET(fhp, NULL);
 
78
        COMPQUIET(h, NULL);
 
79
        COMPQUIET(dirtyp, NULL);
 
80
        return (__db_no_hash_am(dbp->dbenv));
 
81
}
 
82
 
 
83
int
 
84
__ham_31_hashmeta(dbp, real_name, flags, fhp, h, dirtyp)
 
85
        DB *dbp;
 
86
        char *real_name;
 
87
        u_int32_t flags;
 
88
        DB_FH *fhp;
 
89
        PAGE *h;
 
90
        int *dirtyp;
 
91
{
 
92
        COMPQUIET(real_name, NULL);
 
93
        COMPQUIET(flags, 0);
 
94
        COMPQUIET(fhp, NULL);
 
95
        COMPQUIET(h, NULL);
 
96
        COMPQUIET(dirtyp, NULL);
 
97
        return (__db_no_hash_am(dbp->dbenv));
 
98
}
 
99
 
 
100
int
 
101
__ham_c_count(dbc, recnop)
 
102
        DBC *dbc;
 
103
        db_recno_t *recnop;
 
104
{
 
105
        COMPQUIET(recnop, NULL);
 
106
        return (__db_no_hash_am(dbc->dbp->dbenv));
 
107
}
 
108
 
 
109
int
 
110
__ham_c_dup(orig_dbc, new_dbc)
 
111
        DBC *orig_dbc, *new_dbc;
 
112
{
 
113
        COMPQUIET(new_dbc, NULL);
 
114
        return (__db_no_hash_am(orig_dbc->dbp->dbenv));
 
115
}
 
116
 
 
117
int
 
118
__ham_c_init(dbc)
 
119
        DBC *dbc;
 
120
{
 
121
        return (__db_no_hash_am(dbc->dbp->dbenv));
 
122
}
 
123
 
 
124
void
 
125
__ham_cprint(dbc)
 
126
        DBC *dbc;
 
127
{
 
128
        COMPQUIET(dbc, NULL);
 
129
        return;
 
130
}
 
131
 
 
132
int
 
133
__ham_db_close(dbp)
 
134
        DB *dbp;
 
135
{
 
136
        COMPQUIET(dbp, NULL);
 
137
        return (0);
 
138
}
 
139
 
 
140
int
 
141
__ham_db_create(dbp)
 
142
        DB *dbp;
 
143
{
 
144
        COMPQUIET(dbp, NULL);
 
145
        return (0);
 
146
}
 
147
 
 
148
int
 
149
__ham_init_getpgnos(dbenv, dtabp, dtabsizep)
 
150
        DB_ENV *dbenv;
 
151
        int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
 
152
        size_t *dtabsizep;
 
153
{
 
154
        COMPQUIET(dbenv, NULL);
 
155
        COMPQUIET(dtabp, NULL);
 
156
        COMPQUIET(dtabsizep, NULL);
 
157
        return (0);
 
158
}
 
159
 
 
160
int
 
161
__ham_init_print(dbenv, dtabp, dtabsizep)
 
162
        DB_ENV *dbenv;
 
163
        int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
 
164
        size_t *dtabsizep;
 
165
{
 
166
        COMPQUIET(dbenv, NULL);
 
167
        COMPQUIET(dtabp, NULL);
 
168
        COMPQUIET(dtabsizep, NULL);
 
169
        return (0);
 
170
}
 
171
 
 
172
int
 
173
__ham_init_recover(dbenv, dtabp, dtabsizep)
 
174
        DB_ENV *dbenv;
 
175
        int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
 
176
        size_t *dtabsizep;
 
177
{
 
178
        COMPQUIET(dbenv, NULL);
 
179
        COMPQUIET(dtabp, NULL);
 
180
        COMPQUIET(dtabsizep, NULL);
 
181
        return (0);
 
182
}
 
183
 
 
184
int
 
185
__ham_meta2pgset(dbp, vdp, hmeta, flags, pgset)
 
186
        DB *dbp;
 
187
        VRFY_DBINFO *vdp;
 
188
        HMETA *hmeta;
 
189
        u_int32_t flags;
 
190
        DB *pgset;
 
191
{
 
192
        COMPQUIET(vdp, NULL);
 
193
        COMPQUIET(hmeta, NULL);
 
194
        COMPQUIET(flags, 0);
 
195
        COMPQUIET(pgset, NULL);
 
196
        return (__db_no_hash_am(dbp->dbenv));
 
197
}
 
198
 
 
199
int
 
200
__ham_metachk(dbp, name, hashm)
 
201
        DB *dbp;
 
202
        const char *name;
 
203
        HMETA *hashm;
 
204
{
 
205
        COMPQUIET(name, NULL);
 
206
        COMPQUIET(hashm, NULL);
 
207
        return (__db_no_hash_am(dbp->dbenv));
 
208
}
 
209
 
 
210
int
 
211
__ham_new_file(dbp, txn, fhp, name)
 
212
        DB *dbp;
 
213
        DB_TXN *txn;
 
214
        DB_FH *fhp;
 
215
        const char *name;
 
216
{
 
217
        COMPQUIET(txn, NULL);
 
218
        COMPQUIET(fhp, NULL);
 
219
        COMPQUIET(name, NULL);
 
220
        return (__db_no_hash_am(dbp->dbenv));
 
221
}
 
222
 
 
223
int
 
224
__ham_new_subdb(mdbp, dbp, txn)
 
225
        DB *mdbp, *dbp;
 
226
        DB_TXN *txn;
 
227
{
 
228
        COMPQUIET(dbp, NULL);
 
229
        COMPQUIET(txn, NULL);
 
230
        return (__db_no_hash_am(mdbp->dbenv));
 
231
}
 
232
 
 
233
int
 
234
__ham_open(dbp, txn, name, base_pgno, flags)
 
235
        DB *dbp;
 
236
        DB_TXN *txn;
 
237
        const char *name;
 
238
        db_pgno_t base_pgno;
 
239
        u_int32_t flags;
 
240
{
 
241
        COMPQUIET(txn, NULL);
 
242
        COMPQUIET(name, NULL);
 
243
        COMPQUIET(base_pgno, 0);
 
244
        COMPQUIET(flags, 0);
 
245
        return (__db_no_hash_am(dbp->dbenv));
 
246
}
 
247
 
 
248
int
 
249
__ham_pgin(dbenv, dummydbp, pg, pp, cookie)
 
250
        DB_ENV *dbenv;
 
251
        DB *dummydbp;
 
252
        db_pgno_t pg;
 
253
        void *pp;
 
254
        DBT *cookie;
 
255
{
 
256
        COMPQUIET(dummydbp, NULL);
 
257
        COMPQUIET(pg, 0);
 
258
        COMPQUIET(pp, NULL);
 
259
        COMPQUIET(cookie, NULL);
 
260
        return (__db_no_hash_am(dbenv));
 
261
}
 
262
 
 
263
int
 
264
__ham_pgout(dbenv, dummydbp, pg, pp, cookie)
 
265
        DB_ENV *dbenv;
 
266
        DB *dummydbp;
 
267
        db_pgno_t pg;
 
268
        void *pp;
 
269
        DBT *cookie;
 
270
{
 
271
        COMPQUIET(dummydbp, NULL);
 
272
        COMPQUIET(pg, 0);
 
273
        COMPQUIET(pp, NULL);
 
274
        COMPQUIET(cookie, NULL);
 
275
        return (__db_no_hash_am(dbenv));
 
276
}
 
277
 
 
278
int
 
279
__ham_quick_delete(dbc)
 
280
        DBC *dbc;
 
281
{
 
282
        return (__db_no_hash_am(dbc->dbp->dbenv));
 
283
}
 
284
 
 
285
int
 
286
__ham_reclaim(dbp, txn)
 
287
        DB *dbp;
 
288
        DB_TXN *txn;
 
289
{
 
290
        COMPQUIET(txn, NULL);
 
291
        return (__db_no_hash_am(dbp->dbenv));
 
292
}
 
293
 
 
294
int
 
295
__ham_salvage(dbp, vdp, pgno, h, handle, callback, flags)
 
296
        DB *dbp;
 
297
        VRFY_DBINFO *vdp;
 
298
        db_pgno_t pgno;
 
299
        PAGE *h;
 
300
        void *handle;
 
301
        int (*callback) __P((void *, const void *));
 
302
        u_int32_t flags;
 
303
{
 
304
        COMPQUIET(vdp, NULL);
 
305
        COMPQUIET(pgno, 0);
 
306
        COMPQUIET(h, NULL);
 
307
        COMPQUIET(handle, NULL);
 
308
        COMPQUIET(callback, NULL);
 
309
        COMPQUIET(flags, 0);
 
310
        return (__db_no_hash_am(dbp->dbenv));
 
311
}
 
312
 
 
313
int
 
314
__ham_stat(dbc, spp, flags)
 
315
        DBC *dbc;
 
316
        void *spp;
 
317
        u_int32_t flags;
 
318
{
 
319
        COMPQUIET(spp, NULL);
 
320
        COMPQUIET(flags, 0);
 
321
        return (__db_no_hash_am(dbc->dbp->dbenv));
 
322
}
 
323
 
 
324
int
 
325
__ham_truncate(dbc, countp)
 
326
        DBC *dbc;
 
327
        u_int32_t *countp;
 
328
{
 
329
        COMPQUIET(dbc, NULL);
 
330
        COMPQUIET(countp, NULL);
 
331
        return (__db_no_hash_am(dbc->dbp->dbenv));
 
332
}
 
333
 
 
334
int
 
335
__ham_vrfy(dbp, vdp, h, pgno, flags)
 
336
        DB *dbp;
 
337
        VRFY_DBINFO *vdp;
 
338
        PAGE *h;
 
339
        db_pgno_t pgno;
 
340
        u_int32_t flags;
 
341
{
 
342
        COMPQUIET(vdp, NULL);
 
343
        COMPQUIET(h, NULL);
 
344
        COMPQUIET(pgno, 0);
 
345
        COMPQUIET(flags, 0);
 
346
        return (__db_no_hash_am(dbp->dbenv));
 
347
}
 
348
 
 
349
int
 
350
__ham_vrfy_hashing(dbp, nentries, m, thisbucket, pgno, flags, hfunc)
 
351
        DB *dbp;
 
352
        u_int32_t nentries;
 
353
        HMETA *m;
 
354
        u_int32_t thisbucket;
 
355
        db_pgno_t pgno;
 
356
        u_int32_t flags;
 
357
        u_int32_t (*hfunc) __P((DB *, const void *, u_int32_t));
 
358
{
 
359
        COMPQUIET(nentries, 0);
 
360
        COMPQUIET(m, NULL);
 
361
        COMPQUIET(thisbucket, 0);
 
362
        COMPQUIET(pgno, 0);
 
363
        COMPQUIET(flags, 0);
 
364
        COMPQUIET(hfunc, NULL);
 
365
        return (__db_no_hash_am(dbp->dbenv));
 
366
}
 
367
 
 
368
int
 
369
__ham_vrfy_meta(dbp, vdp, m, pgno, flags)
 
370
        DB *dbp;
 
371
        VRFY_DBINFO *vdp;
 
372
        HMETA *m;
 
373
        db_pgno_t pgno;
 
374
        u_int32_t flags;
 
375
{
 
376
        COMPQUIET(vdp, NULL);
 
377
        COMPQUIET(m, NULL);
 
378
        COMPQUIET(pgno, 0);
 
379
        COMPQUIET(flags, 0);
 
380
        return (__db_no_hash_am(dbp->dbenv));
 
381
}
 
382
 
 
383
int
 
384
__ham_vrfy_structure(dbp, vdp, meta_pgno, flags)
 
385
        DB *dbp;
 
386
        VRFY_DBINFO *vdp;
 
387
        db_pgno_t meta_pgno;
 
388
        u_int32_t flags;
 
389
{
 
390
        COMPQUIET(vdp, NULL);
 
391
        COMPQUIET(meta_pgno, 0);
 
392
        COMPQUIET(flags, 0);
 
393
        return (__db_no_hash_am(dbp->dbenv));
 
394
}