Main Page | Class Hierarchy | Data Structures | Directories | File List | Data Fields | Related Pages

hash_stub.c

00001 /*-
00002  * See the file LICENSE for redistribution information.
00003  *
00004  * Copyright (c) 1996-2005
00005  *      Sleepycat Software.  All rights reserved.
00006  *
00007  * $Id: hash_stub.c,v 12.1 2005/06/16 20:22:54 bostic Exp $
00008  */
00009 
00010 #include "db_config.h"
00011 
00012 #ifndef HAVE_HASH
00013 #ifndef NO_SYSTEM_INCLUDES
00014 #include <sys/types.h>
00015 #endif
00016 
00017 #include "db_int.h"
00018 #include "dbinc/db_page.h"
00019 #include "dbinc/hash.h"
00020 
00021 /*
00022  * If the library wasn't compiled with the Hash access method, various
00023  * routines aren't available.  Stub them here, returning an appropriate
00024  * error.
00025  */
00026 
00027 /*
00028  * __db_nohasham --
00029  *      Error when a Berkeley DB build doesn't include the access method.
00030  *
00031  * PUBLIC: int __db_no_hash_am __P((DB_ENV *));
00032  */
00033 int
00034 __db_no_hash_am(dbenv)
00035         DB_ENV *dbenv;
00036 {
00037         __db_err(dbenv,
00038             "library build did not include support for the Hash access method");
00039         return (DB_OPNOTSUP);
00040 }
00041 
00042 int
00043 __ham_30_hashmeta(dbp, real_name, obuf)
00044         DB *dbp;
00045         char *real_name;
00046         u_int8_t *obuf;
00047 {
00048         COMPQUIET(real_name, NULL);
00049         COMPQUIET(obuf, NULL);
00050         return (__db_no_hash_am(dbp->dbenv));
00051 }
00052 
00053 int
00054 __ham_30_sizefix(dbp, fhp, realname, metabuf)
00055         DB *dbp;
00056         DB_FH *fhp;
00057         char *realname;
00058         u_int8_t *metabuf;
00059 {
00060         COMPQUIET(fhp, NULL);
00061         COMPQUIET(realname, NULL);
00062         COMPQUIET(metabuf, NULL);
00063         return (__db_no_hash_am(dbp->dbenv));
00064 }
00065 
00066 int
00067 __ham_31_hash(dbp, real_name, flags, fhp, h, dirtyp)
00068         DB *dbp;
00069         char *real_name;
00070         u_int32_t flags;
00071         DB_FH *fhp;
00072         PAGE *h;
00073         int *dirtyp;
00074 {
00075         COMPQUIET(real_name, NULL);
00076         COMPQUIET(flags, 0);
00077         COMPQUIET(fhp, NULL);
00078         COMPQUIET(h, NULL);
00079         COMPQUIET(dirtyp, NULL);
00080         return (__db_no_hash_am(dbp->dbenv));
00081 }
00082 
00083 int
00084 __ham_31_hashmeta(dbp, real_name, flags, fhp, h, dirtyp)
00085         DB *dbp;
00086         char *real_name;
00087         u_int32_t flags;
00088         DB_FH *fhp;
00089         PAGE *h;
00090         int *dirtyp;
00091 {
00092         COMPQUIET(real_name, NULL);
00093         COMPQUIET(flags, 0);
00094         COMPQUIET(fhp, NULL);
00095         COMPQUIET(h, NULL);
00096         COMPQUIET(dirtyp, NULL);
00097         return (__db_no_hash_am(dbp->dbenv));
00098 }
00099 
00100 int
00101 __ham_c_count(dbc, recnop)
00102         DBC *dbc;
00103         db_recno_t *recnop;
00104 {
00105         COMPQUIET(recnop, NULL);
00106         return (__db_no_hash_am(dbc->dbp->dbenv));
00107 }
00108 
00109 int
00110 __ham_c_dup(orig_dbc, new_dbc)
00111         DBC *orig_dbc, *new_dbc;
00112 {
00113         COMPQUIET(new_dbc, NULL);
00114         return (__db_no_hash_am(orig_dbc->dbp->dbenv));
00115 }
00116 
00117 int
00118 __ham_c_init(dbc)
00119         DBC *dbc;
00120 {
00121         return (__db_no_hash_am(dbc->dbp->dbenv));
00122 }
00123 
00124 int
00125 __ham_db_close(dbp)
00126         DB *dbp;
00127 {
00128         COMPQUIET(dbp, NULL);
00129         return (0);
00130 }
00131 
00132 int
00133 __ham_db_create(dbp)
00134         DB *dbp;
00135 {
00136         COMPQUIET(dbp, NULL);
00137         return (0);
00138 }
00139 
00140 int
00141 __ham_init_print(dbenv, dtabp, dtabsizep)
00142         DB_ENV *dbenv;
00143         int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
00144         size_t *dtabsizep;
00145 {
00146         COMPQUIET(dbenv, NULL);
00147         COMPQUIET(dtabp, NULL);
00148         COMPQUIET(dtabsizep, NULL);
00149         return (0);
00150 }
00151 
00152 int
00153 __ham_init_recover(dbenv, dtabp, dtabsizep)
00154         DB_ENV *dbenv;
00155         int (***dtabp)__P((DB_ENV *, DBT *, DB_LSN *, db_recops, void *));
00156         size_t *dtabsizep;
00157 {
00158         COMPQUIET(dbenv, NULL);
00159         COMPQUIET(dtabp, NULL);
00160         COMPQUIET(dtabsizep, NULL);
00161         return (0);
00162 }
00163 
00164 int
00165 __ham_meta2pgset(dbp, vdp, hmeta, flags, pgset)
00166         DB *dbp;
00167         VRFY_DBINFO *vdp;
00168         HMETA *hmeta;
00169         u_int32_t flags;
00170         DB *pgset;
00171 {
00172         COMPQUIET(vdp, NULL);
00173         COMPQUIET(hmeta, NULL);
00174         COMPQUIET(flags, 0);
00175         COMPQUIET(pgset, NULL);
00176         return (__db_no_hash_am(dbp->dbenv));
00177 }
00178 
00179 int
00180 __ham_metachk(dbp, name, hashm)
00181         DB *dbp;
00182         const char *name;
00183         HMETA *hashm;
00184 {
00185         COMPQUIET(name, NULL);
00186         COMPQUIET(hashm, NULL);
00187         return (__db_no_hash_am(dbp->dbenv));
00188 }
00189 
00190 int
00191 __ham_new_file(dbp, txn, fhp, name)
00192         DB *dbp;
00193         DB_TXN *txn;
00194         DB_FH *fhp;
00195         const char *name;
00196 {
00197         COMPQUIET(txn, NULL);
00198         COMPQUIET(fhp, NULL);
00199         COMPQUIET(name, NULL);
00200         return (__db_no_hash_am(dbp->dbenv));
00201 }
00202 
00203 int
00204 __ham_new_subdb(mdbp, dbp, txn)
00205         DB *mdbp, *dbp;
00206         DB_TXN *txn;
00207 {
00208         COMPQUIET(dbp, NULL);
00209         COMPQUIET(txn, NULL);
00210         return (__db_no_hash_am(mdbp->dbenv));
00211 }
00212 
00213 int
00214 __ham_open(dbp, txn, name, base_pgno, flags)
00215         DB *dbp;
00216         DB_TXN *txn;
00217         const char *name;
00218         db_pgno_t base_pgno;
00219         u_int32_t flags;
00220 {
00221         COMPQUIET(txn, NULL);
00222         COMPQUIET(name, NULL);
00223         COMPQUIET(base_pgno, 0);
00224         COMPQUIET(flags, 0);
00225         return (__db_no_hash_am(dbp->dbenv));
00226 }
00227 
00228 int
00229 __ham_pgin(dbenv, dummydbp, pg, pp, cookie)
00230         DB_ENV *dbenv;
00231         DB *dummydbp;
00232         db_pgno_t pg;
00233         void *pp;
00234         DBT *cookie;
00235 {
00236         COMPQUIET(dummydbp, NULL);
00237         COMPQUIET(pg, 0);
00238         COMPQUIET(pp, NULL);
00239         COMPQUIET(cookie, NULL);
00240         return (__db_no_hash_am(dbenv));
00241 }
00242 
00243 int
00244 __ham_pgout(dbenv, dummydbp, pg, pp, cookie)
00245         DB_ENV *dbenv;
00246         DB *dummydbp;
00247         db_pgno_t pg;
00248         void *pp;
00249         DBT *cookie;
00250 {
00251         COMPQUIET(dummydbp, NULL);
00252         COMPQUIET(pg, 0);
00253         COMPQUIET(pp, NULL);
00254         COMPQUIET(cookie, NULL);
00255         return (__db_no_hash_am(dbenv));
00256 }
00257 
00258 void
00259 __ham_print_cursor(dbc)
00260         DBC *dbc;
00261 {
00262         (void)__db_no_hash_am(dbc->dbp->dbenv);
00263 }
00264 
00265 int
00266 __ham_quick_delete(dbc)
00267         DBC *dbc;
00268 {
00269         return (__db_no_hash_am(dbc->dbp->dbenv));
00270 }
00271 
00272 int
00273 __ham_reclaim(dbp, txn)
00274         DB *dbp;
00275         DB_TXN *txn;
00276 {
00277         COMPQUIET(txn, NULL);
00278         return (__db_no_hash_am(dbp->dbenv));
00279 }
00280 
00281 int
00282 __ham_salvage(dbp, vdp, pgno, h, handle, callback, flags)
00283         DB *dbp;
00284         VRFY_DBINFO *vdp;
00285         db_pgno_t pgno;
00286         PAGE *h;
00287         void *handle;
00288         int (*callback) __P((void *, const void *));
00289         u_int32_t flags;
00290 {
00291         COMPQUIET(vdp, NULL);
00292         COMPQUIET(pgno, 0);
00293         COMPQUIET(h, NULL);
00294         COMPQUIET(handle, NULL);
00295         COMPQUIET(callback, NULL);
00296         COMPQUIET(flags, 0);
00297         return (__db_no_hash_am(dbp->dbenv));
00298 }
00299 
00300 int
00301 __ham_stat(dbc, spp, flags)
00302         DBC *dbc;
00303         void *spp;
00304         u_int32_t flags;
00305 {
00306         COMPQUIET(spp, NULL);
00307         COMPQUIET(flags, 0);
00308         return (__db_no_hash_am(dbc->dbp->dbenv));
00309 }
00310 
00311 int
00312 __ham_stat_print(dbc, flags)
00313         DBC *dbc;
00314         u_int32_t flags;
00315 {
00316         COMPQUIET(flags, 0);
00317         return (__db_no_hash_am(dbc->dbp->dbenv));
00318 }
00319 
00320 int
00321 __ham_truncate(dbc, countp)
00322         DBC *dbc;
00323         u_int32_t *countp;
00324 {
00325         COMPQUIET(dbc, NULL);
00326         COMPQUIET(countp, NULL);
00327         return (__db_no_hash_am(dbc->dbp->dbenv));
00328 }
00329 
00330 int
00331 __ham_vrfy(dbp, vdp, h, pgno, flags)
00332         DB *dbp;
00333         VRFY_DBINFO *vdp;
00334         PAGE *h;
00335         db_pgno_t pgno;
00336         u_int32_t flags;
00337 {
00338         COMPQUIET(vdp, NULL);
00339         COMPQUIET(h, NULL);
00340         COMPQUIET(pgno, 0);
00341         COMPQUIET(flags, 0);
00342         return (__db_no_hash_am(dbp->dbenv));
00343 }
00344 
00345 int
00346 __ham_vrfy_hashing(dbp, nentries, m, thisbucket, pgno, flags, hfunc)
00347         DB *dbp;
00348         u_int32_t nentries;
00349         HMETA *m;
00350         u_int32_t thisbucket;
00351         db_pgno_t pgno;
00352         u_int32_t flags;
00353         u_int32_t (*hfunc) __P((DB *, const void *, u_int32_t));
00354 {
00355         COMPQUIET(nentries, 0);
00356         COMPQUIET(m, NULL);
00357         COMPQUIET(thisbucket, 0);
00358         COMPQUIET(pgno, 0);
00359         COMPQUIET(flags, 0);
00360         COMPQUIET(hfunc, NULL);
00361         return (__db_no_hash_am(dbp->dbenv));
00362 }
00363 
00364 int
00365 __ham_vrfy_meta(dbp, vdp, m, pgno, flags)
00366         DB *dbp;
00367         VRFY_DBINFO *vdp;
00368         HMETA *m;
00369         db_pgno_t pgno;
00370         u_int32_t flags;
00371 {
00372         COMPQUIET(vdp, NULL);
00373         COMPQUIET(m, NULL);
00374         COMPQUIET(pgno, 0);
00375         COMPQUIET(flags, 0);
00376         return (__db_no_hash_am(dbp->dbenv));
00377 }
00378 
00379 int
00380 __ham_vrfy_structure(dbp, vdp, meta_pgno, flags)
00381         DB *dbp;
00382         VRFY_DBINFO *vdp;
00383         db_pgno_t meta_pgno;
00384         u_int32_t flags;
00385 {
00386         COMPQUIET(vdp, NULL);
00387         COMPQUIET(meta_pgno, 0);
00388         COMPQUIET(flags, 0);
00389         return (__db_no_hash_am(dbp->dbenv));
00390 }
00391 #endif /* !HAVE_HASH */

Generated on Sun Dec 25 12:14:30 2005 for Berkeley DB 4.4.16 by  doxygen 1.4.2