mirror of
https://github.com/MariaDB/server.git
synced 2025-12-24 11:21:21 +03:00
Import changeset
This commit is contained in:
102
bdb/LICENSE
Normal file
102
bdb/LICENSE
Normal file
@@ -0,0 +1,102 @@
|
||||
/*-
|
||||
* $Id: LICENSE,v 11.7 2000/11/01 20:35:49 bostic Exp $
|
||||
*/
|
||||
|
||||
The following is the license that applies to this copy of the Berkeley DB
|
||||
software. For a license to use the Berkeley DB software under conditions
|
||||
other than those described here, or to purchase support for this software,
|
||||
please contact Sleepycat Software by email at db@sleepycat.com, or on the
|
||||
Web at http://www.sleepycat.com.
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=
|
||||
/*
|
||||
* Copyright (c) 1990-2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Redistributions in any form must be accompanied by information on
|
||||
* how to obtain complete source code for the DB software and any
|
||||
* accompanying software that uses the DB software. The source code
|
||||
* must either be included in the distribution or be available for no
|
||||
* more than the cost of distribution plus a nominal fee, and must be
|
||||
* freely redistributable under reasonable conditions. For an
|
||||
* executable file, complete source code means the source code for all
|
||||
* modules it contains. It does not include source code for modules or
|
||||
* files that typically accompany the major components of the operating
|
||||
* system on which the executable file runs.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY SLEEPYCAT SOFTWARE ``AS IS'' AND ANY EXPRESS
|
||||
* OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
|
||||
* WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR
|
||||
* NON-INFRINGEMENT, ARE DISCLAIMED. IN NO EVENT SHALL SLEEPYCAT SOFTWARE
|
||||
* BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
|
||||
* CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
|
||||
* SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
|
||||
* INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
|
||||
* CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
|
||||
* ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF
|
||||
* THE POSSIBILITY OF SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1995, 1996
|
||||
* The President and Fellows of Harvard University. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY HARVARD AND ITS CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL HARVARD OR ITS CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
211
bdb/btree/bt_compare.c
Normal file
211
bdb/btree/bt_compare.c
Normal file
@@ -0,0 +1,211 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995, 1996
|
||||
* Keith Bostic. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Mike Olson.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_compare.c,v 11.12 2000/10/26 19:00:28 krinsky Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "btree.h"
|
||||
|
||||
/*
|
||||
* __bam_cmp --
|
||||
* Compare a key to a given record.
|
||||
*
|
||||
* PUBLIC: int __bam_cmp __P((DB *, const DBT *, PAGE *,
|
||||
* PUBLIC: u_int32_t, int (*)(DB *, const DBT *, const DBT *), int *));
|
||||
*/
|
||||
int
|
||||
__bam_cmp(dbp, dbt, h, indx, func, cmpp)
|
||||
DB *dbp;
|
||||
const DBT *dbt;
|
||||
PAGE *h;
|
||||
u_int32_t indx;
|
||||
int (*func)__P((DB *, const DBT *, const DBT *));
|
||||
int *cmpp;
|
||||
{
|
||||
BINTERNAL *bi;
|
||||
BKEYDATA *bk;
|
||||
BOVERFLOW *bo;
|
||||
DBT pg_dbt;
|
||||
|
||||
/*
|
||||
* Returns:
|
||||
* < 0 if dbt is < page record
|
||||
* = 0 if dbt is = page record
|
||||
* > 0 if dbt is > page record
|
||||
*
|
||||
* !!!
|
||||
* We do not clear the pg_dbt DBT even though it's likely to contain
|
||||
* random bits. That should be okay, because the app's comparison
|
||||
* routine had better not be looking at fields other than data/size.
|
||||
* We don't clear it because we go through this path a lot and it's
|
||||
* expensive.
|
||||
*/
|
||||
switch (TYPE(h)) {
|
||||
case P_LBTREE:
|
||||
case P_LDUP:
|
||||
case P_LRECNO:
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
if (B_TYPE(bk->type) == B_OVERFLOW)
|
||||
bo = (BOVERFLOW *)bk;
|
||||
else {
|
||||
pg_dbt.data = bk->data;
|
||||
pg_dbt.size = bk->len;
|
||||
*cmpp = func(dbp, dbt, &pg_dbt);
|
||||
return (0);
|
||||
}
|
||||
break;
|
||||
case P_IBTREE:
|
||||
/*
|
||||
* The following code guarantees that the left-most key on an
|
||||
* internal page at any place in the tree sorts less than any
|
||||
* user-specified key. The reason is that if we have reached
|
||||
* this internal page, we know the user key must sort greater
|
||||
* than the key we're storing for this page in any internal
|
||||
* pages at levels above us in the tree. It then follows that
|
||||
* any user-specified key cannot sort less than the first page
|
||||
* which we reference, and so there's no reason to call the
|
||||
* comparison routine. While this may save us a comparison
|
||||
* routine call or two, the real reason for this is because
|
||||
* we don't maintain a copy of the smallest key in the tree,
|
||||
* so that we don't have to update all the levels of the tree
|
||||
* should the application store a new smallest key. And, so,
|
||||
* we may not have a key to compare, which makes doing the
|
||||
* comparison difficult and error prone.
|
||||
*/
|
||||
if (indx == 0) {
|
||||
*cmpp = 1;
|
||||
return (0);
|
||||
}
|
||||
|
||||
bi = GET_BINTERNAL(h, indx);
|
||||
if (B_TYPE(bi->type) == B_OVERFLOW)
|
||||
bo = (BOVERFLOW *)(bi->data);
|
||||
else {
|
||||
pg_dbt.data = bi->data;
|
||||
pg_dbt.size = bi->len;
|
||||
*cmpp = func(dbp, dbt, &pg_dbt);
|
||||
return (0);
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return (__db_pgfmt(dbp, PGNO(h)));
|
||||
}
|
||||
|
||||
/*
|
||||
* Overflow.
|
||||
*/
|
||||
return (__db_moff(dbp, dbt,
|
||||
bo->pgno, bo->tlen, func == __bam_defcmp ? NULL : func, cmpp));
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_defcmp --
|
||||
* Default comparison routine.
|
||||
*
|
||||
* PUBLIC: int __bam_defcmp __P((DB *, const DBT *, const DBT *));
|
||||
*/
|
||||
int
|
||||
__bam_defcmp(dbp, a, b)
|
||||
DB *dbp;
|
||||
const DBT *a, *b;
|
||||
{
|
||||
size_t len;
|
||||
u_int8_t *p1, *p2;
|
||||
|
||||
COMPQUIET(dbp, NULL);
|
||||
|
||||
/*
|
||||
* Returns:
|
||||
* < 0 if a is < b
|
||||
* = 0 if a is = b
|
||||
* > 0 if a is > b
|
||||
*
|
||||
* XXX
|
||||
* If a size_t doesn't fit into a long, or if the difference between
|
||||
* any two characters doesn't fit into an int, this routine can lose.
|
||||
* What we need is a signed integral type that's guaranteed to be at
|
||||
* least as large as a size_t, and there is no such thing.
|
||||
*/
|
||||
len = a->size > b->size ? b->size : a->size;
|
||||
for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2)
|
||||
if (*p1 != *p2)
|
||||
return ((long)*p1 - (long)*p2);
|
||||
return ((long)a->size - (long)b->size);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_defpfx --
|
||||
* Default prefix routine.
|
||||
*
|
||||
* PUBLIC: size_t __bam_defpfx __P((DB *, const DBT *, const DBT *));
|
||||
*/
|
||||
size_t
|
||||
__bam_defpfx(dbp, a, b)
|
||||
DB *dbp;
|
||||
const DBT *a, *b;
|
||||
{
|
||||
size_t cnt, len;
|
||||
u_int8_t *p1, *p2;
|
||||
|
||||
COMPQUIET(dbp, NULL);
|
||||
|
||||
cnt = 1;
|
||||
len = a->size > b->size ? b->size : a->size;
|
||||
for (p1 = a->data, p2 = b->data; len--; ++p1, ++p2, ++cnt)
|
||||
if (*p1 != *p2)
|
||||
return (cnt);
|
||||
|
||||
/*
|
||||
* We know that a->size must be <= b->size, or they wouldn't be
|
||||
* in this order.
|
||||
*/
|
||||
return (a->size < b->size ? a->size + 1 : a->size);
|
||||
}
|
||||
98
bdb/btree/bt_conv.c
Normal file
98
bdb/btree/bt_conv.c
Normal file
@@ -0,0 +1,98 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_conv.c,v 11.6 2000/03/31 00:30:26 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_swap.h"
|
||||
#include "btree.h"
|
||||
|
||||
/*
|
||||
* __bam_pgin --
|
||||
* Convert host-specific page layout from the host-independent format
|
||||
* stored on disk.
|
||||
*
|
||||
* PUBLIC: int __bam_pgin __P((DB_ENV *, db_pgno_t, void *, DBT *));
|
||||
*/
|
||||
int
|
||||
__bam_pgin(dbenv, pg, pp, cookie)
|
||||
DB_ENV *dbenv;
|
||||
db_pgno_t pg;
|
||||
void *pp;
|
||||
DBT *cookie;
|
||||
{
|
||||
DB_PGINFO *pginfo;
|
||||
PAGE *h;
|
||||
|
||||
pginfo = (DB_PGINFO *)cookie->data;
|
||||
if (!pginfo->needswap)
|
||||
return (0);
|
||||
|
||||
h = pp;
|
||||
return (TYPE(h) == P_BTREEMETA ? __bam_mswap(pp) :
|
||||
__db_byteswap(dbenv, pg, pp, pginfo->db_pagesize, 1));
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_pgout --
|
||||
* Convert host-specific page layout to the host-independent format
|
||||
* stored on disk.
|
||||
*
|
||||
* PUBLIC: int __bam_pgout __P((DB_ENV *, db_pgno_t, void *, DBT *));
|
||||
*/
|
||||
int
|
||||
__bam_pgout(dbenv, pg, pp, cookie)
|
||||
DB_ENV *dbenv;
|
||||
db_pgno_t pg;
|
||||
void *pp;
|
||||
DBT *cookie;
|
||||
{
|
||||
DB_PGINFO *pginfo;
|
||||
PAGE *h;
|
||||
|
||||
pginfo = (DB_PGINFO *)cookie->data;
|
||||
if (!pginfo->needswap)
|
||||
return (0);
|
||||
|
||||
h = pp;
|
||||
return (TYPE(h) == P_BTREEMETA ? __bam_mswap(pp) :
|
||||
__db_byteswap(dbenv, pg, pp, pginfo->db_pagesize, 0));
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_mswap --
|
||||
* Swap the bytes on the btree metadata page.
|
||||
*
|
||||
* PUBLIC: int __bam_mswap __P((PAGE *));
|
||||
*/
|
||||
int
|
||||
__bam_mswap(pg)
|
||||
PAGE *pg;
|
||||
{
|
||||
u_int8_t *p;
|
||||
|
||||
__db_metaswap(pg);
|
||||
|
||||
p = (u_int8_t *)pg + sizeof(DBMETA);
|
||||
|
||||
SWAP32(p); /* maxkey */
|
||||
SWAP32(p); /* minkey */
|
||||
SWAP32(p); /* re_len */
|
||||
SWAP32(p); /* re_pad */
|
||||
SWAP32(p); /* root */
|
||||
|
||||
return (0);
|
||||
}
|
||||
573
bdb/btree/bt_curadj.c
Normal file
573
bdb/btree/bt_curadj.c
Normal file
@@ -0,0 +1,573 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_curadj.c,v 11.20 2001/01/17 16:15:49 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "btree.h"
|
||||
#include "txn.h"
|
||||
|
||||
static int __bam_opd_cursor __P((DB *, DBC *, db_pgno_t, u_int32_t, u_int32_t));
|
||||
|
||||
#ifdef DEBUG
|
||||
/*
|
||||
* __bam_cprint --
|
||||
* Display the current internal cursor.
|
||||
*
|
||||
* PUBLIC: void __bam_cprint __P((DBC *));
|
||||
*/
|
||||
void
|
||||
__bam_cprint(dbc)
|
||||
DBC *dbc;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
fprintf(stderr, "\tinternal: ovflsize: %lu", (u_long)cp->ovflsize);
|
||||
if (dbc->dbtype == DB_RECNO)
|
||||
fprintf(stderr, " recno: %lu", (u_long)cp->recno);
|
||||
if (F_ISSET(cp, C_DELETED))
|
||||
fprintf(stderr, " (deleted)");
|
||||
fprintf(stderr, "\n");
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* Cursor adjustments are logged if they are for subtransactions. This is
|
||||
* because it's possible for a subtransaction to adjust cursors which will
|
||||
* still be active after the subtransaction aborts, and so which must be
|
||||
* restored to their previous locations. Cursors that can be both affected
|
||||
* by our cursor adjustments and active after our transaction aborts can
|
||||
* only be found in our parent transaction -- cursors in other transactions,
|
||||
* including other child transactions of our parent, must have conflicting
|
||||
* locker IDs, and so cannot be affected by adjustments in this transaction.
|
||||
*/
|
||||
|
||||
/*
|
||||
* __bam_ca_delete --
|
||||
* Update the cursors when items are deleted and when already deleted
|
||||
* items are overwritten. Return the number of relevant cursors found.
|
||||
*
|
||||
* PUBLIC: int __bam_ca_delete __P((DB *, db_pgno_t, u_int32_t, int));
|
||||
*/
|
||||
int
|
||||
__bam_ca_delete(dbp, pgno, indx, delete)
|
||||
DB *dbp;
|
||||
db_pgno_t pgno;
|
||||
u_int32_t indx;
|
||||
int delete;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
DB *ldbp;
|
||||
DB_ENV *dbenv;
|
||||
DBC *dbc;
|
||||
int count; /* !!!: Has to contain max number of cursors. */
|
||||
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. We have the page write locked, so the
|
||||
* only other cursors that can be pointing at a page are
|
||||
* those in the same thread of control. Unfortunately, we don't
|
||||
* know that they're using the same DB handle, so traverse
|
||||
* all matching DB handles in the same DB_ENV, then all cursors
|
||||
* on each matching DB handle.
|
||||
*
|
||||
* Each cursor is single-threaded, so we only need to lock the
|
||||
* list of DBs and then the list of cursors in each DB.
|
||||
*/
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (count = 0, ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
if (cp->pgno == pgno && cp->indx == indx) {
|
||||
if (delete)
|
||||
F_SET(cp, C_DELETED);
|
||||
else
|
||||
F_CLR(cp, C_DELETED);
|
||||
++count;
|
||||
}
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
|
||||
return (count);
|
||||
}
|
||||
|
||||
/*
|
||||
* __ram_ca_delete --
|
||||
* Return the number of relevant cursors.
|
||||
*
|
||||
* PUBLIC: int __ram_ca_delete __P((DB *, db_pgno_t));
|
||||
*/
|
||||
int
|
||||
__ram_ca_delete(dbp, root_pgno)
|
||||
DB *dbp;
|
||||
db_pgno_t root_pgno;
|
||||
{
|
||||
DB *ldbp;
|
||||
DBC *dbc;
|
||||
DB_ENV *dbenv;
|
||||
int found;
|
||||
|
||||
found = 0;
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
/*
|
||||
* Review the cursors. See the comment in __bam_ca_delete().
|
||||
*/
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
found == 0 && ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
found == 0 && dbc != NULL; dbc = TAILQ_NEXT(dbc, links))
|
||||
if (dbc->internal->root == root_pgno)
|
||||
found = 1;
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
return (found);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ca_di --
|
||||
* Adjust the cursors during a delete or insert.
|
||||
*
|
||||
* PUBLIC: int __bam_ca_di __P((DBC *, db_pgno_t, u_int32_t, int));
|
||||
*/
|
||||
int
|
||||
__bam_ca_di(my_dbc, pgno, indx, adjust)
|
||||
DBC *my_dbc;
|
||||
db_pgno_t pgno;
|
||||
u_int32_t indx;
|
||||
int adjust;
|
||||
{
|
||||
DB *dbp, *ldbp;
|
||||
DB_ENV *dbenv;
|
||||
DB_LSN lsn;
|
||||
DB_TXN *my_txn;
|
||||
DBC *dbc;
|
||||
DBC_INTERNAL *cp;
|
||||
int found, ret;
|
||||
|
||||
dbp = my_dbc->dbp;
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
my_txn = IS_SUBTRANSACTION(my_dbc->txn) ? my_dbc->txn : NULL;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. See the comment in __bam_ca_delete().
|
||||
*/
|
||||
found = 0;
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
if (dbc->dbtype == DB_RECNO)
|
||||
continue;
|
||||
cp = dbc->internal;
|
||||
if (cp->pgno == pgno && cp->indx >= indx) {
|
||||
/* Cursor indices should never be negative. */
|
||||
DB_ASSERT(cp->indx != 0 || adjust > 0);
|
||||
|
||||
cp->indx += adjust;
|
||||
if (my_txn != NULL && dbc->txn != my_txn)
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
|
||||
if (found != 0 && DB_LOGGING(my_dbc)) {
|
||||
if ((ret = __bam_curadj_log(dbenv,
|
||||
my_dbc->txn, &lsn, 0, dbp->log_fileid,
|
||||
DB_CA_DI, pgno, 0, 0, adjust, indx, 0)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_opd_cursor -- create a new opd cursor.
|
||||
*/
|
||||
static int
|
||||
__bam_opd_cursor(dbp, dbc, first, tpgno, ti)
|
||||
DB *dbp;
|
||||
DBC *dbc;
|
||||
db_pgno_t tpgno;
|
||||
u_int32_t first, ti;
|
||||
{
|
||||
BTREE_CURSOR *cp, *orig_cp;
|
||||
DBC *dbc_nopd;
|
||||
int ret;
|
||||
|
||||
orig_cp = (BTREE_CURSOR *)dbc->internal;
|
||||
dbc_nopd = NULL;
|
||||
|
||||
/*
|
||||
* Allocate a new cursor and create the stack. If duplicates
|
||||
* are sorted, we've just created an off-page duplicate Btree.
|
||||
* If duplicates aren't sorted, we've just created a Recno tree.
|
||||
*/
|
||||
if ((ret = __db_c_newopd(dbc, tpgno, &dbc_nopd)) != 0)
|
||||
return (ret);
|
||||
|
||||
cp = (BTREE_CURSOR *)dbc_nopd->internal;
|
||||
cp->pgno = tpgno;
|
||||
cp->indx = ti;
|
||||
|
||||
if (dbp->dup_compare == NULL) {
|
||||
/*
|
||||
* Converting to off-page Recno trees is tricky. The
|
||||
* record number for the cursor is the index + 1 (to
|
||||
* convert to 1-based record numbers).
|
||||
*/
|
||||
cp->recno = ti + 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* Transfer the deleted flag from the top-level cursor to the
|
||||
* created one.
|
||||
*/
|
||||
if (F_ISSET(orig_cp, C_DELETED)) {
|
||||
F_SET(cp, C_DELETED);
|
||||
F_CLR(orig_cp, C_DELETED);
|
||||
}
|
||||
|
||||
/* Stack the cursors and reset the initial cursor's index. */
|
||||
orig_cp->opd = dbc_nopd;
|
||||
orig_cp->indx = first;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ca_dup --
|
||||
* Adjust the cursors when moving items from a leaf page to a duplicates
|
||||
* page.
|
||||
*
|
||||
* PUBLIC: int __bam_ca_dup __P((DBC *,
|
||||
* PUBLIC: u_int32_t, db_pgno_t, u_int32_t, db_pgno_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_ca_dup(my_dbc, first, fpgno, fi, tpgno, ti)
|
||||
DBC *my_dbc;
|
||||
db_pgno_t fpgno, tpgno;
|
||||
u_int32_t first, fi, ti;
|
||||
{
|
||||
BTREE_CURSOR *orig_cp;
|
||||
DB *dbp, *ldbp;
|
||||
DBC *dbc;
|
||||
DB_ENV *dbenv;
|
||||
DB_LSN lsn;
|
||||
DB_TXN *my_txn;
|
||||
int found, ret;
|
||||
|
||||
dbp = my_dbc->dbp;
|
||||
dbenv = dbp->dbenv;
|
||||
my_txn = IS_SUBTRANSACTION(my_dbc->txn) ? my_dbc->txn : NULL;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. See the comment in __bam_ca_delete().
|
||||
*/
|
||||
found = 0;
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
loop: MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
/* Find cursors pointing to this record. */
|
||||
orig_cp = (BTREE_CURSOR *)dbc->internal;
|
||||
if (orig_cp->pgno != fpgno || orig_cp->indx != fi)
|
||||
continue;
|
||||
|
||||
/*
|
||||
* Since we rescan the list see if this is already
|
||||
* converted.
|
||||
*/
|
||||
if (orig_cp->opd != NULL)
|
||||
continue;
|
||||
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
if ((ret = __bam_opd_cursor(dbp,
|
||||
dbc, first, tpgno, ti)) !=0)
|
||||
return (ret);
|
||||
if (my_txn != NULL && dbc->txn != my_txn)
|
||||
found = 1;
|
||||
/* We released the MUTEX to get a cursor, start over. */
|
||||
goto loop;
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
|
||||
if (found != 0 && DB_LOGGING(my_dbc)) {
|
||||
if ((ret = __bam_curadj_log(dbenv,
|
||||
my_dbc->txn, &lsn, 0, dbp->log_fileid,
|
||||
DB_CA_DUP, fpgno, tpgno, 0, first, fi, ti)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ca_undodup --
|
||||
* Adjust the cursors when returning items to a leaf page
|
||||
* from a duplicate page.
|
||||
* Called only during undo processing.
|
||||
*
|
||||
* PUBLIC: int __bam_ca_undodup __P((DB *,
|
||||
* PUBLIC: u_int32_t, db_pgno_t, u_int32_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_ca_undodup(dbp, first, fpgno, fi, ti)
|
||||
DB *dbp;
|
||||
db_pgno_t fpgno;
|
||||
u_int32_t first, fi, ti;
|
||||
{
|
||||
BTREE_CURSOR *orig_cp;
|
||||
DB *ldbp;
|
||||
DBC *dbc;
|
||||
DB_ENV *dbenv;
|
||||
int ret;
|
||||
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. See the comment in __bam_ca_delete().
|
||||
*/
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
loop: MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
orig_cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
if (orig_cp->pgno != fpgno ||
|
||||
orig_cp->indx != first ||
|
||||
((BTREE_CURSOR *)orig_cp->opd->internal)->indx
|
||||
!= ti)
|
||||
continue;
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
if ((ret = orig_cp->opd->c_close(orig_cp->opd)) != 0)
|
||||
return (ret);
|
||||
orig_cp->opd = NULL;
|
||||
orig_cp->indx = fi;
|
||||
/*
|
||||
* We released the MUTEX to free a cursor,
|
||||
* start over.
|
||||
*/
|
||||
goto loop;
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ca_rsplit --
|
||||
* Adjust the cursors when doing reverse splits.
|
||||
*
|
||||
* PUBLIC: int __bam_ca_rsplit __P((DBC *, db_pgno_t, db_pgno_t));
|
||||
*/
|
||||
int
|
||||
__bam_ca_rsplit(my_dbc, fpgno, tpgno)
|
||||
DBC* my_dbc;
|
||||
db_pgno_t fpgno, tpgno;
|
||||
{
|
||||
DB *dbp, *ldbp;
|
||||
DBC *dbc;
|
||||
DB_ENV *dbenv;
|
||||
DB_LSN lsn;
|
||||
DB_TXN *my_txn;
|
||||
int found, ret;
|
||||
|
||||
dbp = my_dbc->dbp;
|
||||
dbenv = dbp->dbenv;
|
||||
my_txn = IS_SUBTRANSACTION(my_dbc->txn) ? my_dbc->txn : NULL;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. See the comment in __bam_ca_delete().
|
||||
*/
|
||||
found = 0;
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
if (dbc->dbtype == DB_RECNO)
|
||||
continue;
|
||||
if (dbc->internal->pgno == fpgno) {
|
||||
dbc->internal->pgno = tpgno;
|
||||
if (my_txn != NULL && dbc->txn != my_txn)
|
||||
found = 1;
|
||||
}
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
|
||||
if (found != 0 && DB_LOGGING(my_dbc)) {
|
||||
if ((ret = __bam_curadj_log(dbenv,
|
||||
my_dbc->txn, &lsn, 0, dbp->log_fileid,
|
||||
DB_CA_RSPLIT, fpgno, tpgno, 0, 0, 0, 0)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ca_split --
|
||||
* Adjust the cursors when splitting a page.
|
||||
*
|
||||
* PUBLIC: int __bam_ca_split __P((DBC *,
|
||||
* PUBLIC: db_pgno_t, db_pgno_t, db_pgno_t, u_int32_t, int));
|
||||
*/
|
||||
int
|
||||
__bam_ca_split(my_dbc, ppgno, lpgno, rpgno, split_indx, cleft)
|
||||
DBC *my_dbc;
|
||||
db_pgno_t ppgno, lpgno, rpgno;
|
||||
u_int32_t split_indx;
|
||||
int cleft;
|
||||
{
|
||||
DB *dbp, *ldbp;
|
||||
DBC *dbc;
|
||||
DBC_INTERNAL *cp;
|
||||
DB_ENV *dbenv;
|
||||
DB_LSN lsn;
|
||||
DB_TXN *my_txn;
|
||||
int found, ret;
|
||||
|
||||
dbp = my_dbc->dbp;
|
||||
dbenv = dbp->dbenv;
|
||||
my_txn = IS_SUBTRANSACTION(my_dbc->txn) ? my_dbc->txn : NULL;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. See the comment in __bam_ca_delete().
|
||||
*
|
||||
* If splitting the page that a cursor was on, the cursor has to be
|
||||
* adjusted to point to the same record as before the split. Most
|
||||
* of the time we don't adjust pointers to the left page, because
|
||||
* we're going to copy its contents back over the original page. If
|
||||
* the cursor is on the right page, it is decremented by the number of
|
||||
* records split to the left page.
|
||||
*/
|
||||
found = 0;
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
if (dbc->dbtype == DB_RECNO)
|
||||
continue;
|
||||
cp = dbc->internal;
|
||||
if (cp->pgno == ppgno) {
|
||||
if (my_txn != NULL && dbc->txn != my_txn)
|
||||
found = 1;
|
||||
if (cp->indx < split_indx) {
|
||||
if (cleft)
|
||||
cp->pgno = lpgno;
|
||||
} else {
|
||||
cp->pgno = rpgno;
|
||||
cp->indx -= split_indx;
|
||||
}
|
||||
}
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
|
||||
if (found != 0 && DB_LOGGING(my_dbc)) {
|
||||
if ((ret = __bam_curadj_log(dbenv, my_dbc->txn,
|
||||
&lsn, 0, dbp->log_fileid, DB_CA_SPLIT, ppgno, rpgno,
|
||||
cleft ? lpgno : PGNO_INVALID, 0, split_indx, 0)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ca_undosplit --
|
||||
* Adjust the cursors when undoing a split of a page.
|
||||
* If we grew a level we will execute this for both the
|
||||
* left and the right pages.
|
||||
* Called only during undo processing.
|
||||
*
|
||||
* PUBLIC: void __bam_ca_undosplit __P((DB *,
|
||||
* PUBLIC: db_pgno_t, db_pgno_t, db_pgno_t, u_int32_t));
|
||||
*/
|
||||
void
|
||||
__bam_ca_undosplit(dbp, frompgno, topgno, lpgno, split_indx)
|
||||
DB *dbp;
|
||||
db_pgno_t frompgno, topgno, lpgno;
|
||||
u_int32_t split_indx;
|
||||
{
|
||||
DB *ldbp;
|
||||
DBC *dbc;
|
||||
DB_ENV *dbenv;
|
||||
DBC_INTERNAL *cp;
|
||||
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
/*
|
||||
* Adjust the cursors. See the comment in __bam_ca_delete().
|
||||
*
|
||||
* When backing out a split, we move the cursor back
|
||||
* to the original offset and bump it by the split_indx.
|
||||
*/
|
||||
MUTEX_THREAD_LOCK(dbenv, dbenv->dblist_mutexp);
|
||||
for (ldbp = __dblist_get(dbenv, dbp->adj_fileid);
|
||||
ldbp != NULL && ldbp->adj_fileid == dbp->adj_fileid;
|
||||
ldbp = LIST_NEXT(ldbp, dblistlinks)) {
|
||||
MUTEX_THREAD_LOCK(dbenv, dbp->mutexp);
|
||||
for (dbc = TAILQ_FIRST(&ldbp->active_queue);
|
||||
dbc != NULL; dbc = TAILQ_NEXT(dbc, links)) {
|
||||
if (dbc->dbtype == DB_RECNO)
|
||||
continue;
|
||||
cp = dbc->internal;
|
||||
if (cp->pgno == topgno) {
|
||||
cp->pgno = frompgno;
|
||||
cp->indx += split_indx;
|
||||
} else if (cp->pgno == lpgno)
|
||||
cp->pgno = frompgno;
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbp->mutexp);
|
||||
}
|
||||
MUTEX_THREAD_UNLOCK(dbenv, dbenv->dblist_mutexp);
|
||||
}
|
||||
2131
bdb/btree/bt_cursor.c
Normal file
2131
bdb/btree/bt_cursor.c
Normal file
File diff suppressed because it is too large
Load Diff
530
bdb/btree/bt_delete.c
Normal file
530
bdb/btree/bt_delete.c
Normal file
@@ -0,0 +1,530 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995, 1996
|
||||
* Keith Bostic. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Mike Olson.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_delete.c,v 11.31 2001/01/17 18:48:46 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_shash.h"
|
||||
#include "btree.h"
|
||||
#include "lock.h"
|
||||
|
||||
/*
|
||||
* __bam_delete --
|
||||
* Delete the items referenced by a key.
|
||||
*
|
||||
* PUBLIC: int __bam_delete __P((DB *, DB_TXN *, DBT *, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_delete(dbp, txn, key, flags)
|
||||
DB *dbp;
|
||||
DB_TXN *txn;
|
||||
DBT *key;
|
||||
u_int32_t flags;
|
||||
{
|
||||
DBC *dbc;
|
||||
DBT lkey;
|
||||
DBT data;
|
||||
u_int32_t f_init, f_next;
|
||||
int ret, t_ret;
|
||||
|
||||
PANIC_CHECK(dbp->dbenv);
|
||||
DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->del");
|
||||
DB_CHECK_TXN(dbp, txn);
|
||||
|
||||
/* Check for invalid flags. */
|
||||
if ((ret =
|
||||
__db_delchk(dbp, key, flags, F_ISSET(dbp, DB_AM_RDONLY))) != 0)
|
||||
return (ret);
|
||||
|
||||
/* Allocate a cursor. */
|
||||
if ((ret = dbp->cursor(dbp, txn, &dbc, DB_WRITELOCK)) != 0)
|
||||
return (ret);
|
||||
|
||||
DEBUG_LWRITE(dbc, txn, "bam_delete", key, NULL, flags);
|
||||
|
||||
/*
|
||||
* Walk a cursor through the key/data pairs, deleting as we go. Set
|
||||
* the DB_DBT_USERMEM flag, as this might be a threaded application
|
||||
* and the flags checking will catch us. We don't actually want the
|
||||
* keys or data, so request a partial of length 0.
|
||||
*/
|
||||
memset(&lkey, 0, sizeof(lkey));
|
||||
F_SET(&lkey, DB_DBT_USERMEM | DB_DBT_PARTIAL);
|
||||
memset(&data, 0, sizeof(data));
|
||||
F_SET(&data, DB_DBT_USERMEM | DB_DBT_PARTIAL);
|
||||
|
||||
/*
|
||||
* If locking (and we haven't already acquired CDB locks), set the
|
||||
* read-modify-write flag.
|
||||
*/
|
||||
f_init = DB_SET;
|
||||
f_next = DB_NEXT_DUP;
|
||||
if (STD_LOCKING(dbc)) {
|
||||
f_init |= DB_RMW;
|
||||
f_next |= DB_RMW;
|
||||
}
|
||||
|
||||
/* Walk through the set of key/data pairs, deleting as we go. */
|
||||
if ((ret = dbc->c_get(dbc, key, &data, f_init)) != 0)
|
||||
goto err;
|
||||
for (;;) {
|
||||
if ((ret = dbc->c_del(dbc, 0)) != 0)
|
||||
goto err;
|
||||
if ((ret = dbc->c_get(dbc, &lkey, &data, f_next)) != 0) {
|
||||
if (ret == DB_NOTFOUND) {
|
||||
ret = 0;
|
||||
break;
|
||||
}
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
err: /* Discard the cursor. */
|
||||
if ((t_ret = dbc->c_close(dbc)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ditem --
|
||||
* Delete one or more entries from a page.
|
||||
*
|
||||
* PUBLIC: int __bam_ditem __P((DBC *, PAGE *, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_ditem(dbc, h, indx)
|
||||
DBC *dbc;
|
||||
PAGE *h;
|
||||
u_int32_t indx;
|
||||
{
|
||||
BINTERNAL *bi;
|
||||
BKEYDATA *bk;
|
||||
DB *dbp;
|
||||
u_int32_t nbytes;
|
||||
int ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
|
||||
switch (TYPE(h)) {
|
||||
case P_IBTREE:
|
||||
bi = GET_BINTERNAL(h, indx);
|
||||
switch (B_TYPE(bi->type)) {
|
||||
case B_DUPLICATE:
|
||||
case B_KEYDATA:
|
||||
nbytes = BINTERNAL_SIZE(bi->len);
|
||||
break;
|
||||
case B_OVERFLOW:
|
||||
nbytes = BINTERNAL_SIZE(bi->len);
|
||||
if ((ret =
|
||||
__db_doff(dbc, ((BOVERFLOW *)bi->data)->pgno)) != 0)
|
||||
return (ret);
|
||||
break;
|
||||
default:
|
||||
return (__db_pgfmt(dbp, PGNO(h)));
|
||||
}
|
||||
break;
|
||||
case P_IRECNO:
|
||||
nbytes = RINTERNAL_SIZE;
|
||||
break;
|
||||
case P_LBTREE:
|
||||
/*
|
||||
* If it's a duplicate key, discard the index and don't touch
|
||||
* the actual page item.
|
||||
*
|
||||
* !!!
|
||||
* This works because no data item can have an index matching
|
||||
* any other index so even if the data item is in a key "slot",
|
||||
* it won't match any other index.
|
||||
*/
|
||||
if ((indx % 2) == 0) {
|
||||
/*
|
||||
* Check for a duplicate after us on the page. NOTE:
|
||||
* we have to delete the key item before deleting the
|
||||
* data item, otherwise the "indx + P_INDX" calculation
|
||||
* won't work!
|
||||
*/
|
||||
if (indx + P_INDX < (u_int32_t)NUM_ENT(h) &&
|
||||
h->inp[indx] == h->inp[indx + P_INDX])
|
||||
return (__bam_adjindx(dbc,
|
||||
h, indx, indx + O_INDX, 0));
|
||||
/*
|
||||
* Check for a duplicate before us on the page. It
|
||||
* doesn't matter if we delete the key item before or
|
||||
* after the data item for the purposes of this one.
|
||||
*/
|
||||
if (indx > 0 && h->inp[indx] == h->inp[indx - P_INDX])
|
||||
return (__bam_adjindx(dbc,
|
||||
h, indx, indx - P_INDX, 0));
|
||||
}
|
||||
/* FALLTHROUGH */
|
||||
case P_LDUP:
|
||||
case P_LRECNO:
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
switch (B_TYPE(bk->type)) {
|
||||
case B_DUPLICATE:
|
||||
nbytes = BOVERFLOW_SIZE;
|
||||
break;
|
||||
case B_OVERFLOW:
|
||||
nbytes = BOVERFLOW_SIZE;
|
||||
if ((ret = __db_doff(
|
||||
dbc, (GET_BOVERFLOW(h, indx))->pgno)) != 0)
|
||||
return (ret);
|
||||
break;
|
||||
case B_KEYDATA:
|
||||
nbytes = BKEYDATA_SIZE(bk->len);
|
||||
break;
|
||||
default:
|
||||
return (__db_pgfmt(dbp, PGNO(h)));
|
||||
}
|
||||
break;
|
||||
default:
|
||||
return (__db_pgfmt(dbp, PGNO(h)));
|
||||
}
|
||||
|
||||
/* Delete the item and mark the page dirty. */
|
||||
if ((ret = __db_ditem(dbc, h, indx, nbytes)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fset(dbp->mpf, h, DB_MPOOL_DIRTY)) != 0)
|
||||
return (ret);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_adjindx --
|
||||
* Adjust an index on the page.
|
||||
*
|
||||
* PUBLIC: int __bam_adjindx __P((DBC *, PAGE *, u_int32_t, u_int32_t, int));
|
||||
*/
|
||||
int
|
||||
__bam_adjindx(dbc, h, indx, indx_copy, is_insert)
|
||||
DBC *dbc;
|
||||
PAGE *h;
|
||||
u_int32_t indx, indx_copy;
|
||||
int is_insert;
|
||||
{
|
||||
DB *dbp;
|
||||
db_indx_t copy;
|
||||
int ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
|
||||
/* Log the change. */
|
||||
if (DB_LOGGING(dbc) &&
|
||||
(ret = __bam_adj_log(dbp->dbenv, dbc->txn, &LSN(h),
|
||||
0, dbp->log_fileid, PGNO(h), &LSN(h), indx, indx_copy,
|
||||
(u_int32_t)is_insert)) != 0)
|
||||
return (ret);
|
||||
|
||||
/* Shuffle the indices and mark the page dirty. */
|
||||
if (is_insert) {
|
||||
copy = h->inp[indx_copy];
|
||||
if (indx != NUM_ENT(h))
|
||||
memmove(&h->inp[indx + O_INDX], &h->inp[indx],
|
||||
sizeof(db_indx_t) * (NUM_ENT(h) - indx));
|
||||
h->inp[indx] = copy;
|
||||
++NUM_ENT(h);
|
||||
} else {
|
||||
--NUM_ENT(h);
|
||||
if (indx != NUM_ENT(h))
|
||||
memmove(&h->inp[indx], &h->inp[indx + O_INDX],
|
||||
sizeof(db_indx_t) * (NUM_ENT(h) - indx));
|
||||
}
|
||||
if ((ret = memp_fset(dbp->mpf, h, DB_MPOOL_DIRTY)) != 0)
|
||||
return (ret);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_dpages --
|
||||
* Delete a set of locked pages.
|
||||
*
|
||||
* PUBLIC: int __bam_dpages __P((DBC *, EPG *));
|
||||
*/
|
||||
int
|
||||
__bam_dpages(dbc, stack_epg)
|
||||
DBC *dbc;
|
||||
EPG *stack_epg;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
BINTERNAL *bi;
|
||||
DB *dbp;
|
||||
DBT a, b;
|
||||
DB_LOCK c_lock, p_lock;
|
||||
EPG *epg;
|
||||
PAGE *child, *parent;
|
||||
db_indx_t nitems;
|
||||
db_pgno_t pgno, root_pgno;
|
||||
db_recno_t rcnt;
|
||||
int done, ret, t_ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
/*
|
||||
* We have the entire stack of deletable pages locked.
|
||||
*
|
||||
* Btree calls us with a pointer to the beginning of a stack, where
|
||||
* the first page in the stack is to have a single item deleted, and
|
||||
* the rest of the pages are to be removed.
|
||||
*
|
||||
* Recno calls us with a pointer into the middle of the stack, where
|
||||
* the referenced page is to have a single item deleted, and pages
|
||||
* after the stack reference are to be removed.
|
||||
*
|
||||
* First, discard any pages that we don't care about.
|
||||
*/
|
||||
ret = 0;
|
||||
for (epg = cp->sp; epg < stack_epg; ++epg) {
|
||||
if ((t_ret =
|
||||
memp_fput(dbp->mpf, epg->page, 0)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
(void)__TLPUT(dbc, epg->lock);
|
||||
}
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* !!!
|
||||
* There is an interesting deadlock situation here. We have to relink
|
||||
* the leaf page chain around the leaf page being deleted. Consider
|
||||
* a cursor walking through the leaf pages, that has the previous page
|
||||
* read-locked and is waiting on a lock for the page we're deleting.
|
||||
* It will deadlock here. Before we unlink the subtree, we relink the
|
||||
* leaf page chain.
|
||||
*/
|
||||
if ((ret = __db_relink(dbc, DB_REM_PAGE, cp->csp->page, NULL, 1)) != 0)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* Delete the last item that references the underlying pages that are
|
||||
* to be deleted, and adjust cursors that reference that page. Then,
|
||||
* save that page's page number and item count and release it. If
|
||||
* the application isn't retaining locks because it's running without
|
||||
* transactions, this lets the rest of the tree get back to business
|
||||
* immediately.
|
||||
*/
|
||||
if ((ret = __bam_ditem(dbc, epg->page, epg->indx)) != 0)
|
||||
goto err;
|
||||
if ((ret = __bam_ca_di(dbc, PGNO(epg->page), epg->indx, -1)) != 0)
|
||||
goto err;
|
||||
|
||||
pgno = PGNO(epg->page);
|
||||
nitems = NUM_ENT(epg->page);
|
||||
|
||||
if ((ret = memp_fput(dbp->mpf, epg->page, 0)) != 0)
|
||||
goto err_inc;
|
||||
(void)__TLPUT(dbc, epg->lock);
|
||||
|
||||
/* Free the rest of the pages in the stack. */
|
||||
while (++epg <= cp->csp) {
|
||||
/*
|
||||
* Delete page entries so they will be restored as part of
|
||||
* recovery. We don't need to do cursor adjustment here as
|
||||
* the pages are being emptied by definition and so cannot
|
||||
* be referenced by a cursor.
|
||||
*/
|
||||
if (NUM_ENT(epg->page) != 0) {
|
||||
DB_ASSERT(NUM_ENT(epg->page) == 1);
|
||||
|
||||
if ((ret = __bam_ditem(dbc, epg->page, epg->indx)) != 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
if ((ret = __db_free(dbc, epg->page)) != 0) {
|
||||
epg->page = NULL;
|
||||
goto err_inc;
|
||||
}
|
||||
(void)__TLPUT(dbc, epg->lock);
|
||||
}
|
||||
|
||||
if (0) {
|
||||
err_inc: ++epg;
|
||||
err: for (; epg <= cp->csp; ++epg) {
|
||||
if (epg->page != NULL)
|
||||
(void)memp_fput(dbp->mpf, epg->page, 0);
|
||||
(void)__TLPUT(dbc, epg->lock);
|
||||
}
|
||||
BT_STK_CLR(cp);
|
||||
return (ret);
|
||||
}
|
||||
BT_STK_CLR(cp);
|
||||
|
||||
/*
|
||||
* If we just deleted the next-to-last item from the root page, the
|
||||
* tree can collapse one or more levels. While there remains only a
|
||||
* single item on the root page, write lock the last page referenced
|
||||
* by the root page and copy it over the root page.
|
||||
*/
|
||||
root_pgno = cp->root;
|
||||
if (pgno != root_pgno || nitems != 1)
|
||||
return (0);
|
||||
|
||||
for (done = 0; !done;) {
|
||||
/* Initialize. */
|
||||
parent = child = NULL;
|
||||
p_lock.off = c_lock.off = LOCK_INVALID;
|
||||
|
||||
/* Lock the root. */
|
||||
pgno = root_pgno;
|
||||
if ((ret =
|
||||
__db_lget(dbc, 0, pgno, DB_LOCK_WRITE, 0, &p_lock)) != 0)
|
||||
goto stop;
|
||||
if ((ret = memp_fget(dbp->mpf, &pgno, 0, &parent)) != 0)
|
||||
goto stop;
|
||||
|
||||
if (NUM_ENT(parent) != 1)
|
||||
goto stop;
|
||||
|
||||
switch (TYPE(parent)) {
|
||||
case P_IBTREE:
|
||||
/*
|
||||
* If this is overflow, then try to delete it.
|
||||
* The child may or may not still point at it.
|
||||
*/
|
||||
bi = GET_BINTERNAL(parent, 0);
|
||||
if (B_TYPE(bi->type) == B_OVERFLOW)
|
||||
if ((ret = __db_doff(dbc,
|
||||
((BOVERFLOW *)bi->data)->pgno)) != 0)
|
||||
goto stop;
|
||||
pgno = bi->pgno;
|
||||
break;
|
||||
case P_IRECNO:
|
||||
pgno = GET_RINTERNAL(parent, 0)->pgno;
|
||||
break;
|
||||
default:
|
||||
goto stop;
|
||||
}
|
||||
|
||||
/* Lock the child page. */
|
||||
if ((ret =
|
||||
__db_lget(dbc, 0, pgno, DB_LOCK_WRITE, 0, &c_lock)) != 0)
|
||||
goto stop;
|
||||
if ((ret = memp_fget(dbp->mpf, &pgno, 0, &child)) != 0)
|
||||
goto stop;
|
||||
|
||||
/* Log the change. */
|
||||
if (DB_LOGGING(dbc)) {
|
||||
memset(&a, 0, sizeof(a));
|
||||
a.data = child;
|
||||
a.size = dbp->pgsize;
|
||||
memset(&b, 0, sizeof(b));
|
||||
b.data = P_ENTRY(parent, 0);
|
||||
b.size = TYPE(parent) == P_IRECNO ? RINTERNAL_SIZE :
|
||||
BINTERNAL_SIZE(((BINTERNAL *)b.data)->len);
|
||||
if ((ret =
|
||||
__bam_rsplit_log(dbp->dbenv, dbc->txn, &child->lsn,
|
||||
0, dbp->log_fileid, PGNO(child), &a, PGNO(parent),
|
||||
RE_NREC(parent), &b, &parent->lsn)) != 0)
|
||||
goto stop;
|
||||
}
|
||||
|
||||
/*
|
||||
* Make the switch.
|
||||
*
|
||||
* One fixup -- internal pages below the top level do not store
|
||||
* a record count, so we have to preserve it if we're not
|
||||
* converting to a leaf page. Note also that we are about to
|
||||
* overwrite the parent page, including its LSN. This is OK
|
||||
* because the log message we wrote describing this update
|
||||
* stores its LSN on the child page. When the child is copied
|
||||
* onto the parent, the correct LSN is copied into place.
|
||||
*/
|
||||
COMPQUIET(rcnt, 0);
|
||||
if (F_ISSET(cp, C_RECNUM) && LEVEL(child) > LEAFLEVEL)
|
||||
rcnt = RE_NREC(parent);
|
||||
memcpy(parent, child, dbp->pgsize);
|
||||
PGNO(parent) = root_pgno;
|
||||
if (F_ISSET(cp, C_RECNUM) && LEVEL(child) > LEAFLEVEL)
|
||||
RE_NREC_SET(parent, rcnt);
|
||||
|
||||
/* Mark the pages dirty. */
|
||||
if ((ret = memp_fset(dbp->mpf, parent, DB_MPOOL_DIRTY)) != 0)
|
||||
goto stop;
|
||||
if ((ret = memp_fset(dbp->mpf, child, DB_MPOOL_DIRTY)) != 0)
|
||||
goto stop;
|
||||
|
||||
/* Adjust the cursors. */
|
||||
if ((ret = __bam_ca_rsplit(dbc, PGNO(child), root_pgno)) != 0)
|
||||
goto stop;
|
||||
|
||||
/*
|
||||
* Free the page copied onto the root page and discard its
|
||||
* lock. (The call to __db_free() discards our reference
|
||||
* to the page.)
|
||||
*/
|
||||
if ((ret = __db_free(dbc, child)) != 0) {
|
||||
child = NULL;
|
||||
goto stop;
|
||||
}
|
||||
child = NULL;
|
||||
|
||||
if (0) {
|
||||
stop: done = 1;
|
||||
}
|
||||
if (p_lock.off != LOCK_INVALID)
|
||||
(void)__TLPUT(dbc, p_lock);
|
||||
if (parent != NULL &&
|
||||
(t_ret = memp_fput(dbp->mpf, parent, 0)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
if (c_lock.off != LOCK_INVALID)
|
||||
(void)__TLPUT(dbc, c_lock);
|
||||
if (child != NULL &&
|
||||
(t_ret = memp_fput(dbp->mpf, child, 0)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
}
|
||||
|
||||
return (ret);
|
||||
}
|
||||
387
bdb/btree/bt_method.c
Normal file
387
bdb/btree/bt_method.c
Normal file
@@ -0,0 +1,387 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_method.c,v 11.20 2000/11/30 00:58:28 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "btree.h"
|
||||
#include "qam.h"
|
||||
|
||||
static int __bam_set_bt_compare
|
||||
__P((DB *, int (*)(DB *, const DBT *, const DBT *)));
|
||||
static int __bam_set_bt_maxkey __P((DB *, u_int32_t));
|
||||
static int __bam_set_bt_minkey __P((DB *, u_int32_t));
|
||||
static int __bam_set_bt_prefix
|
||||
__P((DB *, size_t(*)(DB *, const DBT *, const DBT *)));
|
||||
static int __ram_set_re_delim __P((DB *, int));
|
||||
static int __ram_set_re_len __P((DB *, u_int32_t));
|
||||
static int __ram_set_re_pad __P((DB *, int));
|
||||
static int __ram_set_re_source __P((DB *, const char *));
|
||||
|
||||
/*
|
||||
* __bam_db_create --
|
||||
* Btree specific initialization of the DB structure.
|
||||
*
|
||||
* PUBLIC: int __bam_db_create __P((DB *));
|
||||
*/
|
||||
int
|
||||
__bam_db_create(dbp)
|
||||
DB *dbp;
|
||||
{
|
||||
BTREE *t;
|
||||
int ret;
|
||||
|
||||
/* Allocate and initialize the private btree structure. */
|
||||
if ((ret = __os_calloc(dbp->dbenv, 1, sizeof(BTREE), &t)) != 0)
|
||||
return (ret);
|
||||
dbp->bt_internal = t;
|
||||
|
||||
t->bt_minkey = DEFMINKEYPAGE; /* Btree */
|
||||
t->bt_compare = __bam_defcmp;
|
||||
t->bt_prefix = __bam_defpfx;
|
||||
|
||||
dbp->set_bt_compare = __bam_set_bt_compare;
|
||||
dbp->set_bt_maxkey = __bam_set_bt_maxkey;
|
||||
dbp->set_bt_minkey = __bam_set_bt_minkey;
|
||||
dbp->set_bt_prefix = __bam_set_bt_prefix;
|
||||
|
||||
t->re_pad = ' '; /* Recno */
|
||||
t->re_delim = '\n';
|
||||
t->re_eof = 1;
|
||||
|
||||
dbp->set_re_delim = __ram_set_re_delim;
|
||||
dbp->set_re_len = __ram_set_re_len;
|
||||
dbp->set_re_pad = __ram_set_re_pad;
|
||||
dbp->set_re_source = __ram_set_re_source;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_db_close --
|
||||
* Btree specific discard of the DB structure.
|
||||
*
|
||||
* PUBLIC: int __bam_db_close __P((DB *));
|
||||
*/
|
||||
int
|
||||
__bam_db_close(dbp)
|
||||
DB *dbp;
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
t = dbp->bt_internal;
|
||||
/* Recno */
|
||||
/* Close any backing source file descriptor. */
|
||||
if (t->re_fp != NULL)
|
||||
(void)fclose(t->re_fp);
|
||||
|
||||
/* Free any backing source file name. */
|
||||
if (t->re_source != NULL)
|
||||
__os_freestr(t->re_source);
|
||||
|
||||
__os_free(t, sizeof(BTREE));
|
||||
dbp->bt_internal = NULL;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_set_flags --
|
||||
* Set Btree specific flags.
|
||||
*
|
||||
* PUBLIC: int __bam_set_flags __P((DB *, u_int32_t *flagsp));
|
||||
*/
|
||||
int
|
||||
__bam_set_flags(dbp, flagsp)
|
||||
DB *dbp;
|
||||
u_int32_t *flagsp;
|
||||
{
|
||||
u_int32_t flags;
|
||||
|
||||
flags = *flagsp;
|
||||
if (LF_ISSET(DB_DUP | DB_DUPSORT | DB_RECNUM | DB_REVSPLITOFF)) {
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "DB->set_flags");
|
||||
|
||||
/*
|
||||
* The DB_DUP and DB_DUPSORT flags are shared by the Hash
|
||||
* and Btree access methods.
|
||||
*/
|
||||
if (LF_ISSET(DB_DUP | DB_DUPSORT))
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE | DB_OK_HASH);
|
||||
|
||||
if (LF_ISSET(DB_RECNUM | DB_REVSPLITOFF))
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE);
|
||||
|
||||
if (LF_ISSET(DB_DUP | DB_DUPSORT)) {
|
||||
/* DB_DUP/DB_DUPSORT is incompatible with DB_RECNUM. */
|
||||
if (F_ISSET(dbp, DB_BT_RECNUM))
|
||||
goto incompat;
|
||||
|
||||
if (LF_ISSET(DB_DUPSORT)) {
|
||||
if (dbp->dup_compare == NULL)
|
||||
dbp->dup_compare = __bam_defcmp;
|
||||
F_SET(dbp, DB_AM_DUPSORT);
|
||||
}
|
||||
|
||||
F_SET(dbp, DB_AM_DUP);
|
||||
LF_CLR(DB_DUP | DB_DUPSORT);
|
||||
}
|
||||
|
||||
if (LF_ISSET(DB_RECNUM)) {
|
||||
/* DB_RECNUM is incompatible with DB_DUP/DB_DUPSORT. */
|
||||
if (F_ISSET(dbp, DB_AM_DUP))
|
||||
goto incompat;
|
||||
|
||||
F_SET(dbp, DB_BT_RECNUM);
|
||||
LF_CLR(DB_RECNUM);
|
||||
}
|
||||
|
||||
if (LF_ISSET(DB_REVSPLITOFF)) {
|
||||
F_SET(dbp, DB_BT_REVSPLIT);
|
||||
LF_CLR(DB_REVSPLITOFF);
|
||||
}
|
||||
|
||||
*flagsp = flags;
|
||||
}
|
||||
return (0);
|
||||
|
||||
incompat:
|
||||
return (__db_ferr(dbp->dbenv, "DB->set_flags", 1));
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_set_bt_compare --
|
||||
* Set the comparison function.
|
||||
*/
|
||||
static int
|
||||
__bam_set_bt_compare(dbp, func)
|
||||
DB *dbp;
|
||||
int (*func) __P((DB *, const DBT *, const DBT *));
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_bt_compare");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
/*
|
||||
* Can't default the prefix routine if the user supplies a comparison
|
||||
* routine; shortening the keys can break their comparison algorithm.
|
||||
*/
|
||||
t->bt_compare = func;
|
||||
if (t->bt_prefix == __bam_defpfx)
|
||||
t->bt_prefix = NULL;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_set_bt_maxkey --
|
||||
* Set the maximum keys per page.
|
||||
*/
|
||||
static int
|
||||
__bam_set_bt_maxkey(dbp, bt_maxkey)
|
||||
DB *dbp;
|
||||
u_int32_t bt_maxkey;
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_bt_maxkey");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
if (bt_maxkey < 1) {
|
||||
__db_err(dbp->dbenv, "minimum bt_maxkey value is 1");
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
t->bt_maxkey = bt_maxkey;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_set_bt_minkey --
|
||||
* Set the minimum keys per page.
|
||||
*/
|
||||
static int
|
||||
__bam_set_bt_minkey(dbp, bt_minkey)
|
||||
DB *dbp;
|
||||
u_int32_t bt_minkey;
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_bt_minkey");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
if (bt_minkey < 2) {
|
||||
__db_err(dbp->dbenv, "minimum bt_minkey value is 2");
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
t->bt_minkey = bt_minkey;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_set_bt_prefix --
|
||||
* Set the prefix function.
|
||||
*/
|
||||
static int
|
||||
__bam_set_bt_prefix(dbp, func)
|
||||
DB *dbp;
|
||||
size_t (*func) __P((DB *, const DBT *, const DBT *));
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_bt_prefix");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
t->bt_prefix = func;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __ram_set_flags --
|
||||
* Set Recno specific flags.
|
||||
*
|
||||
* PUBLIC: int __ram_set_flags __P((DB *, u_int32_t *flagsp));
|
||||
*/
|
||||
int
|
||||
__ram_set_flags(dbp, flagsp)
|
||||
DB *dbp;
|
||||
u_int32_t *flagsp;
|
||||
{
|
||||
u_int32_t flags;
|
||||
|
||||
flags = *flagsp;
|
||||
if (LF_ISSET(DB_RENUMBER | DB_SNAPSHOT)) {
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "DB->set_flags");
|
||||
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_RECNO);
|
||||
|
||||
if (LF_ISSET(DB_RENUMBER)) {
|
||||
F_SET(dbp, DB_RE_RENUMBER);
|
||||
LF_CLR(DB_RENUMBER);
|
||||
}
|
||||
|
||||
if (LF_ISSET(DB_SNAPSHOT)) {
|
||||
F_SET(dbp, DB_RE_SNAPSHOT);
|
||||
LF_CLR(DB_SNAPSHOT);
|
||||
}
|
||||
|
||||
*flagsp = flags;
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __ram_set_re_delim --
|
||||
* Set the variable-length input record delimiter.
|
||||
*/
|
||||
static int
|
||||
__ram_set_re_delim(dbp, re_delim)
|
||||
DB *dbp;
|
||||
int re_delim;
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_re_delim");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_RECNO);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
t->re_delim = re_delim;
|
||||
F_SET(dbp, DB_RE_DELIMITER);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __ram_set_re_len --
|
||||
* Set the variable-length input record length.
|
||||
*/
|
||||
static int
|
||||
__ram_set_re_len(dbp, re_len)
|
||||
DB *dbp;
|
||||
u_int32_t re_len;
|
||||
{
|
||||
BTREE *t;
|
||||
QUEUE *q;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_re_len");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_QUEUE | DB_OK_RECNO);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
t->re_len = re_len;
|
||||
|
||||
q = dbp->q_internal;
|
||||
q->re_len = re_len;
|
||||
|
||||
F_SET(dbp, DB_RE_FIXEDLEN);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __ram_set_re_pad --
|
||||
* Set the fixed-length record pad character.
|
||||
*/
|
||||
static int
|
||||
__ram_set_re_pad(dbp, re_pad)
|
||||
DB *dbp;
|
||||
int re_pad;
|
||||
{
|
||||
BTREE *t;
|
||||
QUEUE *q;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_re_pad");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_QUEUE | DB_OK_RECNO);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
t->re_pad = re_pad;
|
||||
|
||||
q = dbp->q_internal;
|
||||
q->re_pad = re_pad;
|
||||
|
||||
F_SET(dbp, DB_RE_PAD);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __ram_set_re_source --
|
||||
* Set the backing source file name.
|
||||
*/
|
||||
static int
|
||||
__ram_set_re_source(dbp, re_source)
|
||||
DB *dbp;
|
||||
const char *re_source;
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
DB_ILLEGAL_AFTER_OPEN(dbp, "set_re_source");
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_RECNO);
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
return (__os_strdup(dbp->dbenv, re_source, &t->re_source));
|
||||
}
|
||||
468
bdb/btree/bt_open.c
Normal file
468
bdb/btree/bt_open.c
Normal file
@@ -0,0 +1,468 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995, 1996
|
||||
* Keith Bostic. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Mike Olson.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_open.c,v 11.42 2000/11/30 00:58:28 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_swap.h"
|
||||
#include "btree.h"
|
||||
#include "db_shash.h"
|
||||
#include "lock.h"
|
||||
#include "log.h"
|
||||
#include "mp.h"
|
||||
|
||||
/*
|
||||
* __bam_open --
|
||||
* Open a btree.
|
||||
*
|
||||
* PUBLIC: int __bam_open __P((DB *, const char *, db_pgno_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_open(dbp, name, base_pgno, flags)
|
||||
DB *dbp;
|
||||
const char *name;
|
||||
db_pgno_t base_pgno;
|
||||
u_int32_t flags;
|
||||
{
|
||||
BTREE *t;
|
||||
|
||||
t = dbp->bt_internal;
|
||||
|
||||
/* Initialize the remaining fields/methods of the DB. */
|
||||
dbp->del = __bam_delete;
|
||||
dbp->key_range = __bam_key_range;
|
||||
dbp->stat = __bam_stat;
|
||||
|
||||
/*
|
||||
* We don't permit the user to specify a prefix routine if they didn't
|
||||
* also specify a comparison routine, they can't know enough about our
|
||||
* comparison routine to get it right.
|
||||
*/
|
||||
if (t->bt_compare == __bam_defcmp && t->bt_prefix != __bam_defpfx) {
|
||||
__db_err(dbp->dbenv,
|
||||
"prefix comparison may not be specified for default comparison routine");
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* Verify that the bt_minkey value specified won't cause the
|
||||
* calculation of ovflsize to underflow [#2406] for this pagesize.
|
||||
*/
|
||||
if (B_MINKEY_TO_OVFLSIZE(t->bt_minkey, dbp->pgsize) >
|
||||
B_MINKEY_TO_OVFLSIZE(DEFMINKEYPAGE, dbp->pgsize)) {
|
||||
__db_err(dbp->dbenv,
|
||||
"bt_minkey value of %lu too high for page size of %lu",
|
||||
(u_long)t->bt_minkey, (u_long)dbp->pgsize);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/* Start up the tree. */
|
||||
return (__bam_read_root(dbp, name, base_pgno, flags));
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_metachk --
|
||||
*
|
||||
* PUBLIC: int __bam_metachk __P((DB *, const char *, BTMETA *));
|
||||
*/
|
||||
int
|
||||
__bam_metachk(dbp, name, btm)
|
||||
DB *dbp;
|
||||
const char *name;
|
||||
BTMETA *btm;
|
||||
{
|
||||
DB_ENV *dbenv;
|
||||
u_int32_t vers;
|
||||
int ret;
|
||||
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
/*
|
||||
* At this point, all we know is that the magic number is for a Btree.
|
||||
* Check the version, the database may be out of date.
|
||||
*/
|
||||
vers = btm->dbmeta.version;
|
||||
if (F_ISSET(dbp, DB_AM_SWAP))
|
||||
M_32_SWAP(vers);
|
||||
switch (vers) {
|
||||
case 6:
|
||||
case 7:
|
||||
__db_err(dbenv,
|
||||
"%s: btree version %lu requires a version upgrade",
|
||||
name, (u_long)vers);
|
||||
return (DB_OLD_VERSION);
|
||||
case 8:
|
||||
break;
|
||||
default:
|
||||
__db_err(dbenv,
|
||||
"%s: unsupported btree version: %lu", name, (u_long)vers);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/* Swap the page if we need to. */
|
||||
if (F_ISSET(dbp, DB_AM_SWAP) && (ret = __bam_mswap((PAGE *)btm)) != 0)
|
||||
return (ret);
|
||||
|
||||
/*
|
||||
* Check application info against metadata info, and set info, flags,
|
||||
* and type based on metadata info.
|
||||
*/
|
||||
if ((ret =
|
||||
__db_fchk(dbenv, "DB->open", btm->dbmeta.flags, BTM_MASK)) != 0)
|
||||
return (ret);
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_RECNO)) {
|
||||
if (dbp->type == DB_BTREE)
|
||||
goto wrong_type;
|
||||
dbp->type = DB_RECNO;
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_RECNO);
|
||||
} else {
|
||||
if (dbp->type == DB_RECNO)
|
||||
goto wrong_type;
|
||||
dbp->type = DB_BTREE;
|
||||
DB_ILLEGAL_METHOD(dbp, DB_OK_BTREE);
|
||||
}
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_DUP))
|
||||
F_SET(dbp, DB_AM_DUP);
|
||||
else
|
||||
if (F_ISSET(dbp, DB_AM_DUP)) {
|
||||
__db_err(dbenv,
|
||||
"%s: DB_DUP specified to open method but not set in database",
|
||||
name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_RECNUM)) {
|
||||
if (dbp->type != DB_BTREE)
|
||||
goto wrong_type;
|
||||
F_SET(dbp, DB_BT_RECNUM);
|
||||
|
||||
if ((ret = __db_fcchk(dbenv,
|
||||
"DB->open", dbp->flags, DB_AM_DUP, DB_BT_RECNUM)) != 0)
|
||||
return (ret);
|
||||
} else
|
||||
if (F_ISSET(dbp, DB_BT_RECNUM)) {
|
||||
__db_err(dbenv,
|
||||
"%s: DB_RECNUM specified to open method but not set in database",
|
||||
name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_FIXEDLEN)) {
|
||||
if (dbp->type != DB_RECNO)
|
||||
goto wrong_type;
|
||||
F_SET(dbp, DB_RE_FIXEDLEN);
|
||||
} else
|
||||
if (F_ISSET(dbp, DB_RE_FIXEDLEN)) {
|
||||
__db_err(dbenv,
|
||||
"%s: DB_FIXEDLEN specified to open method but not set in database",
|
||||
name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_RENUMBER)) {
|
||||
if (dbp->type != DB_RECNO)
|
||||
goto wrong_type;
|
||||
F_SET(dbp, DB_RE_RENUMBER);
|
||||
} else
|
||||
if (F_ISSET(dbp, DB_RE_RENUMBER)) {
|
||||
__db_err(dbenv,
|
||||
"%s: DB_RENUMBER specified to open method but not set in database",
|
||||
name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_SUBDB))
|
||||
F_SET(dbp, DB_AM_SUBDB);
|
||||
else
|
||||
if (F_ISSET(dbp, DB_AM_SUBDB)) {
|
||||
__db_err(dbenv,
|
||||
"%s: multiple databases specified but not supported by file",
|
||||
name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
if (F_ISSET(&btm->dbmeta, BTM_DUPSORT)) {
|
||||
if (dbp->dup_compare == NULL)
|
||||
dbp->dup_compare = __bam_defcmp;
|
||||
F_SET(dbp, DB_AM_DUPSORT);
|
||||
} else
|
||||
if (dbp->dup_compare != NULL) {
|
||||
__db_err(dbenv,
|
||||
"%s: duplicate sort specified but not supported in database",
|
||||
name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/* Set the page size. */
|
||||
dbp->pgsize = btm->dbmeta.pagesize;
|
||||
|
||||
/* Copy the file's ID. */
|
||||
memcpy(dbp->fileid, btm->dbmeta.uid, DB_FILE_ID_LEN);
|
||||
|
||||
return (0);
|
||||
|
||||
wrong_type:
|
||||
if (dbp->type == DB_BTREE)
|
||||
__db_err(dbenv,
|
||||
"open method type is Btree, database type is Recno");
|
||||
else
|
||||
__db_err(dbenv,
|
||||
"open method type is Recno, database type is Btree");
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_read_root --
|
||||
* Check (and optionally create) a tree.
|
||||
*
|
||||
* PUBLIC: int __bam_read_root __P((DB *, const char *, db_pgno_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_read_root(dbp, name, base_pgno, flags)
|
||||
DB *dbp;
|
||||
const char *name;
|
||||
db_pgno_t base_pgno;
|
||||
u_int32_t flags;
|
||||
{
|
||||
BTMETA *meta;
|
||||
BTREE *t;
|
||||
DBC *dbc;
|
||||
DB_LSN orig_lsn;
|
||||
DB_LOCK metalock;
|
||||
PAGE *root;
|
||||
int locked, ret, t_ret;
|
||||
|
||||
ret = 0;
|
||||
t = dbp->bt_internal;
|
||||
meta = NULL;
|
||||
root = NULL;
|
||||
locked = 0;
|
||||
|
||||
/*
|
||||
* Get a cursor. If DB_CREATE is specified, we may be creating
|
||||
* the root page, and to do that safely in CDB we need a write
|
||||
* cursor. In STD_LOCKING mode, we'll synchronize using the
|
||||
* meta page lock instead.
|
||||
*/
|
||||
if ((ret = dbp->cursor(dbp, dbp->open_txn,
|
||||
&dbc, LF_ISSET(DB_CREATE) && CDB_LOCKING(dbp->dbenv) ?
|
||||
DB_WRITECURSOR : 0)) != 0)
|
||||
return (ret);
|
||||
|
||||
/* Get, and optionally create the metadata page. */
|
||||
if ((ret =
|
||||
__db_lget(dbc, 0, base_pgno, DB_LOCK_READ, 0, &metalock)) != 0)
|
||||
goto err;
|
||||
if ((ret = memp_fget(
|
||||
dbp->mpf, &base_pgno, DB_MPOOL_CREATE, (PAGE **)&meta)) != 0)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* If the magic number is correct, we're not creating the tree.
|
||||
* Correct any fields that may not be right. Note, all of the
|
||||
* local flags were set by DB->open.
|
||||
*/
|
||||
again: if (meta->dbmeta.magic != 0) {
|
||||
t->bt_maxkey = meta->maxkey;
|
||||
t->bt_minkey = meta->minkey;
|
||||
t->re_pad = meta->re_pad;
|
||||
t->re_len = meta->re_len;
|
||||
|
||||
t->bt_meta = base_pgno;
|
||||
t->bt_root = meta->root;
|
||||
|
||||
(void)memp_fput(dbp->mpf, meta, 0);
|
||||
meta = NULL;
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* In recovery if it's not there it will be created elsewhere.*/
|
||||
if (IS_RECOVERING(dbp->dbenv))
|
||||
goto done;
|
||||
|
||||
/* If we're doing CDB; we now have to get the write lock. */
|
||||
if (CDB_LOCKING(dbp->dbenv)) {
|
||||
/*
|
||||
* We'd better have DB_CREATE set if we're actually doing
|
||||
* the create.
|
||||
*/
|
||||
DB_ASSERT(LF_ISSET(DB_CREATE));
|
||||
if ((ret = lock_get(dbp->dbenv, dbc->locker, DB_LOCK_UPGRADE,
|
||||
&dbc->lock_dbt, DB_LOCK_WRITE, &dbc->mylock)) != 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we are doing locking, relase the read lock and get a write lock.
|
||||
* We want to avoid deadlock.
|
||||
*/
|
||||
if (locked == 0 && STD_LOCKING(dbc)) {
|
||||
if ((ret = __LPUT(dbc, metalock)) != 0)
|
||||
goto err;
|
||||
if ((ret = __db_lget(dbc,
|
||||
0, base_pgno, DB_LOCK_WRITE, 0, &metalock)) != 0)
|
||||
goto err;
|
||||
locked = 1;
|
||||
goto again;
|
||||
}
|
||||
|
||||
/* Initialize the tree structure metadata information. */
|
||||
orig_lsn = meta->dbmeta.lsn;
|
||||
memset(meta, 0, sizeof(BTMETA));
|
||||
meta->dbmeta.lsn = orig_lsn;
|
||||
meta->dbmeta.pgno = base_pgno;
|
||||
meta->dbmeta.magic = DB_BTREEMAGIC;
|
||||
meta->dbmeta.version = DB_BTREEVERSION;
|
||||
meta->dbmeta.pagesize = dbp->pgsize;
|
||||
meta->dbmeta.type = P_BTREEMETA;
|
||||
meta->dbmeta.free = PGNO_INVALID;
|
||||
if (F_ISSET(dbp, DB_AM_DUP))
|
||||
F_SET(&meta->dbmeta, BTM_DUP);
|
||||
if (F_ISSET(dbp, DB_RE_FIXEDLEN))
|
||||
F_SET(&meta->dbmeta, BTM_FIXEDLEN);
|
||||
if (F_ISSET(dbp, DB_BT_RECNUM))
|
||||
F_SET(&meta->dbmeta, BTM_RECNUM);
|
||||
if (F_ISSET(dbp, DB_RE_RENUMBER))
|
||||
F_SET(&meta->dbmeta, BTM_RENUMBER);
|
||||
if (F_ISSET(dbp, DB_AM_SUBDB))
|
||||
F_SET(&meta->dbmeta, BTM_SUBDB);
|
||||
if (dbp->dup_compare != NULL)
|
||||
F_SET(&meta->dbmeta, BTM_DUPSORT);
|
||||
if (dbp->type == DB_RECNO)
|
||||
F_SET(&meta->dbmeta, BTM_RECNO);
|
||||
memcpy(meta->dbmeta.uid, dbp->fileid, DB_FILE_ID_LEN);
|
||||
|
||||
meta->maxkey = t->bt_maxkey;
|
||||
meta->minkey = t->bt_minkey;
|
||||
meta->re_len = t->re_len;
|
||||
meta->re_pad = t->re_pad;
|
||||
|
||||
/* If necessary, log the meta-data and root page creates. */
|
||||
if ((ret = __db_log_page(dbp,
|
||||
name, &orig_lsn, base_pgno, (PAGE *)meta)) != 0)
|
||||
goto err;
|
||||
|
||||
/* Create and initialize a root page. */
|
||||
if ((ret = __db_new(dbc,
|
||||
dbp->type == DB_RECNO ? P_LRECNO : P_LBTREE, &root)) != 0)
|
||||
goto err;
|
||||
root->level = LEAFLEVEL;
|
||||
|
||||
if (dbp->open_txn != NULL && (ret = __bam_root_log(dbp->dbenv,
|
||||
dbp->open_txn, &meta->dbmeta.lsn, 0, dbp->log_fileid,
|
||||
meta->dbmeta.pgno, root->pgno, &meta->dbmeta.lsn)) != 0)
|
||||
goto err;
|
||||
|
||||
meta->root = root->pgno;
|
||||
|
||||
DB_TEST_RECOVERY(dbp, DB_TEST_POSTLOGMETA, ret, name);
|
||||
if ((ret = __db_log_page(dbp,
|
||||
name, &root->lsn, root->pgno, root)) != 0)
|
||||
goto err;
|
||||
DB_TEST_RECOVERY(dbp, DB_TEST_POSTLOG, ret, name);
|
||||
|
||||
t->bt_meta = base_pgno;
|
||||
t->bt_root = root->pgno;
|
||||
|
||||
/* Release the metadata and root pages. */
|
||||
if ((ret = memp_fput(dbp->mpf, meta, DB_MPOOL_DIRTY)) != 0)
|
||||
goto err;
|
||||
meta = NULL;
|
||||
if ((ret = memp_fput(dbp->mpf, root, DB_MPOOL_DIRTY)) != 0)
|
||||
goto err;
|
||||
root = NULL;
|
||||
|
||||
/*
|
||||
* Flush the metadata and root pages to disk.
|
||||
*
|
||||
* !!!
|
||||
* It's not useful to return not-yet-flushed here -- convert it to
|
||||
* an error.
|
||||
*/
|
||||
if ((ret = memp_fsync(dbp->mpf)) == DB_INCOMPLETE) {
|
||||
__db_err(dbp->dbenv, "Metapage flush failed");
|
||||
ret = EINVAL;
|
||||
}
|
||||
DB_TEST_RECOVERY(dbp, DB_TEST_POSTSYNC, ret, name);
|
||||
|
||||
done: /*
|
||||
* !!!
|
||||
* We already did an insert and so the last-page-inserted has been
|
||||
* set. I'm not sure where the *right* place to clear this value
|
||||
* is, it's not intuitively obvious that it belongs here.
|
||||
*/
|
||||
t->bt_lpgno = PGNO_INVALID;
|
||||
|
||||
err:
|
||||
DB_TEST_RECOVERY_LABEL
|
||||
/* Put any remaining pages back. */
|
||||
if (meta != NULL)
|
||||
if ((t_ret = memp_fput(dbp->mpf, meta, 0)) != 0 &&
|
||||
ret == 0)
|
||||
ret = t_ret;
|
||||
if (root != NULL)
|
||||
if ((t_ret = memp_fput(dbp->mpf, root, 0)) != 0 &&
|
||||
ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
/* We can release the metapage lock when we are done. */
|
||||
if ((t_ret = __LPUT(dbc, metalock)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
if ((t_ret = dbc->c_close(dbc)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
return (ret);
|
||||
}
|
||||
859
bdb/btree/bt_put.c
Normal file
859
bdb/btree/bt_put.c
Normal file
@@ -0,0 +1,859 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995, 1996
|
||||
* Keith Bostic. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Mike Olson.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_put.c,v 11.46 2001/01/17 18:48:46 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "btree.h"
|
||||
|
||||
static int __bam_dup_convert __P((DBC *, PAGE *, u_int32_t));
|
||||
static int __bam_ovput
|
||||
__P((DBC *, u_int32_t, db_pgno_t, PAGE *, u_int32_t, DBT *));
|
||||
|
||||
/*
|
||||
* __bam_iitem --
|
||||
* Insert an item into the tree.
|
||||
*
|
||||
* PUBLIC: int __bam_iitem __P((DBC *, DBT *, DBT *, u_int32_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_iitem(dbc, key, data, op, flags)
|
||||
DBC *dbc;
|
||||
DBT *key, *data;
|
||||
u_int32_t op, flags;
|
||||
{
|
||||
BKEYDATA *bk, bk_tmp;
|
||||
BTREE *t;
|
||||
BTREE_CURSOR *cp;
|
||||
DB *dbp;
|
||||
DBT bk_hdr, tdbt;
|
||||
PAGE *h;
|
||||
db_indx_t indx;
|
||||
u_int32_t data_size, have_bytes, need_bytes, needed;
|
||||
int cmp, bigkey, bigdata, dupadjust, padrec, replace, ret, was_deleted;
|
||||
|
||||
COMPQUIET(bk, NULL);
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
t = dbp->bt_internal;
|
||||
h = cp->page;
|
||||
indx = cp->indx;
|
||||
dupadjust = replace = was_deleted = 0;
|
||||
|
||||
/*
|
||||
* Fixed-length records with partial puts: it's an error to specify
|
||||
* anything other simple overwrite.
|
||||
*/
|
||||
if (F_ISSET(dbp, DB_RE_FIXEDLEN) &&
|
||||
F_ISSET(data, DB_DBT_PARTIAL) && data->dlen != data->size) {
|
||||
data_size = data->size;
|
||||
goto len_err;
|
||||
}
|
||||
|
||||
/*
|
||||
* Figure out how much space the data will take, including if it's a
|
||||
* partial record.
|
||||
*
|
||||
* Fixed-length records: it's an error to specify a record that's
|
||||
* longer than the fixed-length, and we never require less than
|
||||
* the fixed-length record size.
|
||||
*/
|
||||
data_size = F_ISSET(data, DB_DBT_PARTIAL) ?
|
||||
__bam_partsize(op, data, h, indx) : data->size;
|
||||
padrec = 0;
|
||||
if (F_ISSET(dbp, DB_RE_FIXEDLEN)) {
|
||||
if (data_size > t->re_len) {
|
||||
len_err: __db_err(dbp->dbenv,
|
||||
"Length improper for fixed length record %lu",
|
||||
(u_long)data_size);
|
||||
return (EINVAL);
|
||||
}
|
||||
if (data_size < t->re_len) {
|
||||
padrec = 1;
|
||||
data_size = t->re_len;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* Handle partial puts or short fixed-length records: build the
|
||||
* real record.
|
||||
*/
|
||||
if (padrec || F_ISSET(data, DB_DBT_PARTIAL)) {
|
||||
tdbt = *data;
|
||||
if ((ret =
|
||||
__bam_build(dbc, op, &tdbt, h, indx, data_size)) != 0)
|
||||
return (ret);
|
||||
data = &tdbt;
|
||||
}
|
||||
|
||||
/*
|
||||
* If the user has specified a duplicate comparison function, return
|
||||
* an error if DB_CURRENT was specified and the replacement data
|
||||
* doesn't compare equal to the current data. This stops apps from
|
||||
* screwing up the duplicate sort order. We have to do this after
|
||||
* we build the real record so that we're comparing the real items.
|
||||
*/
|
||||
if (op == DB_CURRENT && dbp->dup_compare != NULL) {
|
||||
if ((ret = __bam_cmp(dbp, data, h,
|
||||
indx + (TYPE(h) == P_LBTREE ? O_INDX : 0),
|
||||
dbp->dup_compare, &cmp)) != 0)
|
||||
return (ret);
|
||||
if (cmp != 0) {
|
||||
__db_err(dbp->dbenv,
|
||||
"Current data differs from put data");
|
||||
return (EINVAL);
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* If the key or data item won't fit on a page, we'll have to store
|
||||
* them on overflow pages.
|
||||
*/
|
||||
needed = 0;
|
||||
bigdata = data_size > cp->ovflsize;
|
||||
switch (op) {
|
||||
case DB_KEYFIRST:
|
||||
/* We're adding a new key and data pair. */
|
||||
bigkey = key->size > cp->ovflsize;
|
||||
if (bigkey)
|
||||
needed += BOVERFLOW_PSIZE;
|
||||
else
|
||||
needed += BKEYDATA_PSIZE(key->size);
|
||||
if (bigdata)
|
||||
needed += BOVERFLOW_PSIZE;
|
||||
else
|
||||
needed += BKEYDATA_PSIZE(data_size);
|
||||
break;
|
||||
case DB_AFTER:
|
||||
case DB_BEFORE:
|
||||
case DB_CURRENT:
|
||||
/*
|
||||
* We're either overwriting the data item of a key/data pair
|
||||
* or we're creating a new on-page duplicate and only adding
|
||||
* a data item.
|
||||
*
|
||||
* !!!
|
||||
* We're not currently correcting for space reclaimed from
|
||||
* already deleted items, but I don't think it's worth the
|
||||
* complexity.
|
||||
*/
|
||||
bigkey = 0;
|
||||
if (op == DB_CURRENT) {
|
||||
bk = GET_BKEYDATA(h,
|
||||
indx + (TYPE(h) == P_LBTREE ? O_INDX : 0));
|
||||
if (B_TYPE(bk->type) == B_KEYDATA)
|
||||
have_bytes = BKEYDATA_PSIZE(bk->len);
|
||||
else
|
||||
have_bytes = BOVERFLOW_PSIZE;
|
||||
need_bytes = 0;
|
||||
} else {
|
||||
have_bytes = 0;
|
||||
need_bytes = sizeof(db_indx_t);
|
||||
}
|
||||
if (bigdata)
|
||||
need_bytes += BOVERFLOW_PSIZE;
|
||||
else
|
||||
need_bytes += BKEYDATA_PSIZE(data_size);
|
||||
|
||||
if (have_bytes < need_bytes)
|
||||
needed += need_bytes - have_bytes;
|
||||
break;
|
||||
default:
|
||||
return (__db_unknown_flag(dbp->dbenv, "__bam_iitem", op));
|
||||
}
|
||||
|
||||
/*
|
||||
* If there's not enough room, or the user has put a ceiling on the
|
||||
* number of keys permitted in the page, split the page.
|
||||
*
|
||||
* XXX
|
||||
* The t->bt_maxkey test here may be insufficient -- do we have to
|
||||
* check in the btree split code, so we don't undo it there!?!?
|
||||
*/
|
||||
if (P_FREESPACE(h) < needed ||
|
||||
(t->bt_maxkey != 0 && NUM_ENT(h) > t->bt_maxkey))
|
||||
return (DB_NEEDSPLIT);
|
||||
|
||||
/*
|
||||
* The code breaks it up into five cases:
|
||||
*
|
||||
* 1. Insert a new key/data pair.
|
||||
* 2. Append a new data item (a new duplicate).
|
||||
* 3. Insert a new data item (a new duplicate).
|
||||
* 4. Delete and re-add the data item (overflow item).
|
||||
* 5. Overwrite the data item.
|
||||
*/
|
||||
switch (op) {
|
||||
case DB_KEYFIRST: /* 1. Insert a new key/data pair. */
|
||||
if (bigkey) {
|
||||
if ((ret = __bam_ovput(dbc,
|
||||
B_OVERFLOW, PGNO_INVALID, h, indx, key)) != 0)
|
||||
return (ret);
|
||||
} else
|
||||
if ((ret = __db_pitem(dbc, h, indx,
|
||||
BKEYDATA_SIZE(key->size), NULL, key)) != 0)
|
||||
return (ret);
|
||||
|
||||
if ((ret = __bam_ca_di(dbc, PGNO(h), indx, 1)) != 0)
|
||||
return (ret);
|
||||
++indx;
|
||||
break;
|
||||
case DB_AFTER: /* 2. Append a new data item. */
|
||||
if (TYPE(h) == P_LBTREE) {
|
||||
/* Copy the key for the duplicate and adjust cursors. */
|
||||
if ((ret =
|
||||
__bam_adjindx(dbc, h, indx + P_INDX, indx, 1)) != 0)
|
||||
return (ret);
|
||||
if ((ret =
|
||||
__bam_ca_di(dbc, PGNO(h), indx + P_INDX, 1)) != 0)
|
||||
return (ret);
|
||||
|
||||
indx += 3;
|
||||
dupadjust = 1;
|
||||
|
||||
cp->indx += 2;
|
||||
} else {
|
||||
++indx;
|
||||
cp->indx += 1;
|
||||
}
|
||||
break;
|
||||
case DB_BEFORE: /* 3. Insert a new data item. */
|
||||
if (TYPE(h) == P_LBTREE) {
|
||||
/* Copy the key for the duplicate and adjust cursors. */
|
||||
if ((ret = __bam_adjindx(dbc, h, indx, indx, 1)) != 0)
|
||||
return (ret);
|
||||
if ((ret = __bam_ca_di(dbc, PGNO(h), indx, 1)) != 0)
|
||||
return (ret);
|
||||
|
||||
++indx;
|
||||
dupadjust = 1;
|
||||
}
|
||||
break;
|
||||
case DB_CURRENT:
|
||||
/*
|
||||
* Clear the cursor's deleted flag. The problem is that if
|
||||
* we deadlock or fail while deleting the overflow item or
|
||||
* replacing the non-overflow item, a subsequent cursor close
|
||||
* will try and remove the item because the cursor's delete
|
||||
* flag is set
|
||||
*/
|
||||
(void)__bam_ca_delete(dbp, PGNO(h), indx, 0);
|
||||
|
||||
if (TYPE(h) == P_LBTREE) {
|
||||
++indx;
|
||||
dupadjust = 1;
|
||||
|
||||
/*
|
||||
* In a Btree deleted records aren't counted (deleted
|
||||
* records are counted in a Recno because all accesses
|
||||
* are based on record number). If it's a Btree and
|
||||
* it's a DB_CURRENT operation overwriting a previously
|
||||
* deleted record, increment the record count.
|
||||
*/
|
||||
was_deleted = B_DISSET(bk->type);
|
||||
}
|
||||
|
||||
/*
|
||||
* 4. Delete and re-add the data item.
|
||||
*
|
||||
* If we're changing the type of the on-page structure, or we
|
||||
* are referencing offpage items, we have to delete and then
|
||||
* re-add the item. We do not do any cursor adjustments here
|
||||
* because we're going to immediately re-add the item into the
|
||||
* same slot.
|
||||
*/
|
||||
if (bigdata || B_TYPE(bk->type) != B_KEYDATA) {
|
||||
if ((ret = __bam_ditem(dbc, h, indx)) != 0)
|
||||
return (ret);
|
||||
break;
|
||||
}
|
||||
|
||||
/* 5. Overwrite the data item. */
|
||||
replace = 1;
|
||||
break;
|
||||
default:
|
||||
return (__db_unknown_flag(dbp->dbenv, "__bam_iitem", op));
|
||||
}
|
||||
|
||||
/* Add the data. */
|
||||
if (bigdata) {
|
||||
if ((ret = __bam_ovput(dbc,
|
||||
B_OVERFLOW, PGNO_INVALID, h, indx, data)) != 0)
|
||||
return (ret);
|
||||
} else {
|
||||
if (LF_ISSET(BI_DELETED)) {
|
||||
B_TSET(bk_tmp.type, B_KEYDATA, 1);
|
||||
bk_tmp.len = data->size;
|
||||
bk_hdr.data = &bk_tmp;
|
||||
bk_hdr.size = SSZA(BKEYDATA, data);
|
||||
ret = __db_pitem(dbc, h, indx,
|
||||
BKEYDATA_SIZE(data->size), &bk_hdr, data);
|
||||
} else if (replace)
|
||||
ret = __bam_ritem(dbc, h, indx, data);
|
||||
else
|
||||
ret = __db_pitem(dbc, h, indx,
|
||||
BKEYDATA_SIZE(data->size), NULL, data);
|
||||
if (ret != 0)
|
||||
return (ret);
|
||||
}
|
||||
if ((ret = memp_fset(dbp->mpf, h, DB_MPOOL_DIRTY)) != 0)
|
||||
return (ret);
|
||||
|
||||
/*
|
||||
* Re-position the cursors if necessary and reset the current cursor
|
||||
* to point to the new item.
|
||||
*/
|
||||
if (op != DB_CURRENT) {
|
||||
if ((ret = __bam_ca_di(dbc, PGNO(h), indx, 1)) != 0)
|
||||
return (ret);
|
||||
cp->indx = TYPE(h) == P_LBTREE ? indx - O_INDX : indx;
|
||||
}
|
||||
|
||||
/*
|
||||
* If we've changed the record count, update the tree. There's no
|
||||
* need to adjust the count if the operation not performed on the
|
||||
* current record or when the current record was previously deleted.
|
||||
*/
|
||||
if (F_ISSET(cp, C_RECNUM) && (op != DB_CURRENT || was_deleted))
|
||||
if ((ret = __bam_adjust(dbc, 1)) != 0)
|
||||
return (ret);
|
||||
|
||||
/*
|
||||
* If a Btree leaf page is at least 50% full and we may have added or
|
||||
* modified a duplicate data item, see if the set of duplicates takes
|
||||
* up at least 25% of the space on the page. If it does, move it onto
|
||||
* its own page.
|
||||
*/
|
||||
if (dupadjust && P_FREESPACE(h) <= dbp->pgsize / 2) {
|
||||
if ((ret = __bam_dup_convert(dbc, h, indx - O_INDX)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/* If we've modified a recno file, set the flag. */
|
||||
if (dbc->dbtype == DB_RECNO)
|
||||
t->re_modified = 1;
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_partsize --
|
||||
* Figure out how much space a partial data item is in total.
|
||||
*
|
||||
* PUBLIC: u_int32_t __bam_partsize __P((u_int32_t, DBT *, PAGE *, u_int32_t));
|
||||
*/
|
||||
u_int32_t
|
||||
__bam_partsize(op, data, h, indx)
|
||||
u_int32_t op, indx;
|
||||
DBT *data;
|
||||
PAGE *h;
|
||||
{
|
||||
BKEYDATA *bk;
|
||||
u_int32_t nbytes;
|
||||
|
||||
/*
|
||||
* If the record doesn't already exist, it's simply the data we're
|
||||
* provided.
|
||||
*/
|
||||
if (op != DB_CURRENT)
|
||||
return (data->doff + data->size);
|
||||
|
||||
/*
|
||||
* Otherwise, it's the data provided plus any already existing data
|
||||
* that we're not replacing.
|
||||
*/
|
||||
bk = GET_BKEYDATA(h, indx + (TYPE(h) == P_LBTREE ? O_INDX : 0));
|
||||
nbytes =
|
||||
B_TYPE(bk->type) == B_OVERFLOW ? ((BOVERFLOW *)bk)->tlen : bk->len;
|
||||
|
||||
/*
|
||||
* There are really two cases here:
|
||||
*
|
||||
* Case 1: We are replacing some bytes that do not exist (i.e., they
|
||||
* are past the end of the record). In this case the number of bytes
|
||||
* we are replacing is irrelevant and all we care about is how many
|
||||
* bytes we are going to add from offset. So, the new record length
|
||||
* is going to be the size of the new bytes (size) plus wherever those
|
||||
* new bytes begin (doff).
|
||||
*
|
||||
* Case 2: All the bytes we are replacing exist. Therefore, the new
|
||||
* size is the oldsize (nbytes) minus the bytes we are replacing (dlen)
|
||||
* plus the bytes we are adding (size).
|
||||
*/
|
||||
if (nbytes < data->doff + data->dlen) /* Case 1 */
|
||||
return (data->doff + data->size);
|
||||
|
||||
return (nbytes + data->size - data->dlen); /* Case 2 */
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_build --
|
||||
* Build the real record for a partial put, or short fixed-length record.
|
||||
*
|
||||
* PUBLIC: int __bam_build __P((DBC *, u_int32_t,
|
||||
* PUBLIC: DBT *, PAGE *, u_int32_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_build(dbc, op, dbt, h, indx, nbytes)
|
||||
DBC *dbc;
|
||||
u_int32_t op, indx, nbytes;
|
||||
DBT *dbt;
|
||||
PAGE *h;
|
||||
{
|
||||
BKEYDATA *bk, tbk;
|
||||
BOVERFLOW *bo;
|
||||
BTREE *t;
|
||||
BTREE_CURSOR *cp;
|
||||
DB *dbp;
|
||||
DBT copy;
|
||||
u_int32_t len, tlen;
|
||||
u_int8_t *p;
|
||||
int ret;
|
||||
|
||||
COMPQUIET(bo, NULL);
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *) dbc->internal;
|
||||
t = dbp->bt_internal;
|
||||
|
||||
/* We use the record data return memory, it's only a short-term use. */
|
||||
if (dbc->rdata.ulen < nbytes) {
|
||||
if ((ret = __os_realloc(dbp->dbenv,
|
||||
nbytes, NULL, &dbc->rdata.data)) != 0) {
|
||||
dbc->rdata.ulen = 0;
|
||||
dbc->rdata.data = NULL;
|
||||
return (ret);
|
||||
}
|
||||
dbc->rdata.ulen = nbytes;
|
||||
}
|
||||
|
||||
/*
|
||||
* We use nul or pad bytes for any part of the record that isn't
|
||||
* specified; get it over with.
|
||||
*/
|
||||
memset(dbc->rdata.data,
|
||||
F_ISSET(dbp, DB_RE_FIXEDLEN) ? t->re_pad : 0, nbytes);
|
||||
|
||||
/*
|
||||
* In the next clauses, we need to do three things: a) set p to point
|
||||
* to the place at which to copy the user's data, b) set tlen to the
|
||||
* total length of the record, not including the bytes contributed by
|
||||
* the user, and c) copy any valid data from an existing record. If
|
||||
* it's not a partial put (this code is called for both partial puts
|
||||
* and fixed-length record padding) or it's a new key, we can cut to
|
||||
* the chase.
|
||||
*/
|
||||
if (!F_ISSET(dbt, DB_DBT_PARTIAL) || op != DB_CURRENT) {
|
||||
p = (u_int8_t *)dbc->rdata.data + dbt->doff;
|
||||
tlen = dbt->doff;
|
||||
goto user_copy;
|
||||
}
|
||||
|
||||
/* Find the current record. */
|
||||
if (indx < NUM_ENT(h)) {
|
||||
bk = GET_BKEYDATA(h, indx + (TYPE(h) == P_LBTREE ? O_INDX : 0));
|
||||
bo = (BOVERFLOW *)bk;
|
||||
} else {
|
||||
bk = &tbk;
|
||||
B_TSET(bk->type, B_KEYDATA, 0);
|
||||
bk->len = 0;
|
||||
}
|
||||
if (B_TYPE(bk->type) == B_OVERFLOW) {
|
||||
/*
|
||||
* In the case of an overflow record, we shift things around
|
||||
* in the current record rather than allocate a separate copy.
|
||||
*/
|
||||
memset(©, 0, sizeof(copy));
|
||||
if ((ret = __db_goff(dbp, ©, bo->tlen,
|
||||
bo->pgno, &dbc->rdata.data, &dbc->rdata.ulen)) != 0)
|
||||
return (ret);
|
||||
|
||||
/* Skip any leading data from the original record. */
|
||||
tlen = dbt->doff;
|
||||
p = (u_int8_t *)dbc->rdata.data + dbt->doff;
|
||||
|
||||
/*
|
||||
* Copy in any trailing data from the original record.
|
||||
*
|
||||
* If the original record was larger than the original offset
|
||||
* plus the bytes being deleted, there is trailing data in the
|
||||
* original record we need to preserve. If we aren't deleting
|
||||
* the same number of bytes as we're inserting, copy it up or
|
||||
* down, into place.
|
||||
*
|
||||
* Use memmove(), the regions may overlap.
|
||||
*/
|
||||
if (bo->tlen > dbt->doff + dbt->dlen) {
|
||||
len = bo->tlen - (dbt->doff + dbt->dlen);
|
||||
if (dbt->dlen != dbt->size)
|
||||
memmove(p + dbt->size, p + dbt->dlen, len);
|
||||
tlen += len;
|
||||
}
|
||||
} else {
|
||||
/* Copy in any leading data from the original record. */
|
||||
memcpy(dbc->rdata.data,
|
||||
bk->data, dbt->doff > bk->len ? bk->len : dbt->doff);
|
||||
tlen = dbt->doff;
|
||||
p = (u_int8_t *)dbc->rdata.data + dbt->doff;
|
||||
|
||||
/* Copy in any trailing data from the original record. */
|
||||
len = dbt->doff + dbt->dlen;
|
||||
if (bk->len > len) {
|
||||
memcpy(p + dbt->size, bk->data + len, bk->len - len);
|
||||
tlen += bk->len - len;
|
||||
}
|
||||
}
|
||||
|
||||
user_copy:
|
||||
/*
|
||||
* Copy in the application provided data -- p and tlen must have been
|
||||
* initialized above.
|
||||
*/
|
||||
memcpy(p, dbt->data, dbt->size);
|
||||
tlen += dbt->size;
|
||||
|
||||
/* Set the DBT to reference our new record. */
|
||||
dbc->rdata.size = F_ISSET(dbp, DB_RE_FIXEDLEN) ? t->re_len : tlen;
|
||||
dbc->rdata.dlen = 0;
|
||||
dbc->rdata.doff = 0;
|
||||
dbc->rdata.flags = 0;
|
||||
*dbt = dbc->rdata;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ritem --
|
||||
* Replace an item on a page.
|
||||
*
|
||||
* PUBLIC: int __bam_ritem __P((DBC *, PAGE *, u_int32_t, DBT *));
|
||||
*/
|
||||
int
|
||||
__bam_ritem(dbc, h, indx, data)
|
||||
DBC *dbc;
|
||||
PAGE *h;
|
||||
u_int32_t indx;
|
||||
DBT *data;
|
||||
{
|
||||
BKEYDATA *bk;
|
||||
DB *dbp;
|
||||
DBT orig, repl;
|
||||
db_indx_t cnt, lo, ln, min, off, prefix, suffix;
|
||||
int32_t nbytes;
|
||||
int ret;
|
||||
u_int8_t *p, *t;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
|
||||
/*
|
||||
* Replace a single item onto a page. The logic figuring out where
|
||||
* to insert and whether it fits is handled in the caller. All we do
|
||||
* here is manage the page shuffling.
|
||||
*/
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
|
||||
/* Log the change. */
|
||||
if (DB_LOGGING(dbc)) {
|
||||
/*
|
||||
* We might as well check to see if the two data items share
|
||||
* a common prefix and suffix -- it can save us a lot of log
|
||||
* message if they're large.
|
||||
*/
|
||||
min = data->size < bk->len ? data->size : bk->len;
|
||||
for (prefix = 0,
|
||||
p = bk->data, t = data->data;
|
||||
prefix < min && *p == *t; ++prefix, ++p, ++t)
|
||||
;
|
||||
|
||||
min -= prefix;
|
||||
for (suffix = 0,
|
||||
p = (u_int8_t *)bk->data + bk->len - 1,
|
||||
t = (u_int8_t *)data->data + data->size - 1;
|
||||
suffix < min && *p == *t; ++suffix, --p, --t)
|
||||
;
|
||||
|
||||
/* We only log the parts of the keys that have changed. */
|
||||
orig.data = (u_int8_t *)bk->data + prefix;
|
||||
orig.size = bk->len - (prefix + suffix);
|
||||
repl.data = (u_int8_t *)data->data + prefix;
|
||||
repl.size = data->size - (prefix + suffix);
|
||||
if ((ret = __bam_repl_log(dbp->dbenv, dbc->txn,
|
||||
&LSN(h), 0, dbp->log_fileid, PGNO(h), &LSN(h),
|
||||
(u_int32_t)indx, (u_int32_t)B_DISSET(bk->type),
|
||||
&orig, &repl, (u_int32_t)prefix, (u_int32_t)suffix)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* Set references to the first in-use byte on the page and the
|
||||
* first byte of the item being replaced.
|
||||
*/
|
||||
p = (u_int8_t *)h + HOFFSET(h);
|
||||
t = (u_int8_t *)bk;
|
||||
|
||||
/*
|
||||
* If the entry is growing in size, shift the beginning of the data
|
||||
* part of the page down. If the entry is shrinking in size, shift
|
||||
* the beginning of the data part of the page up. Use memmove(3),
|
||||
* the regions overlap.
|
||||
*/
|
||||
lo = BKEYDATA_SIZE(bk->len);
|
||||
ln = BKEYDATA_SIZE(data->size);
|
||||
if (lo != ln) {
|
||||
nbytes = lo - ln; /* Signed difference. */
|
||||
if (p == t) /* First index is fast. */
|
||||
h->inp[indx] += nbytes;
|
||||
else { /* Else, shift the page. */
|
||||
memmove(p + nbytes, p, t - p);
|
||||
|
||||
/* Adjust the indices' offsets. */
|
||||
off = h->inp[indx];
|
||||
for (cnt = 0; cnt < NUM_ENT(h); ++cnt)
|
||||
if (h->inp[cnt] <= off)
|
||||
h->inp[cnt] += nbytes;
|
||||
}
|
||||
|
||||
/* Clean up the page and adjust the item's reference. */
|
||||
HOFFSET(h) += nbytes;
|
||||
t += nbytes;
|
||||
}
|
||||
|
||||
/* Copy the new item onto the page. */
|
||||
bk = (BKEYDATA *)t;
|
||||
B_TSET(bk->type, B_KEYDATA, 0);
|
||||
bk->len = data->size;
|
||||
memcpy(bk->data, data->data, data->size);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_dup_convert --
|
||||
* Check to see if the duplicate set at indx should have its own page.
|
||||
* If it should, create it.
|
||||
*/
|
||||
static int
|
||||
__bam_dup_convert(dbc, h, indx)
|
||||
DBC *dbc;
|
||||
PAGE *h;
|
||||
u_int32_t indx;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
BKEYDATA *bk;
|
||||
DB *dbp;
|
||||
DBT hdr;
|
||||
PAGE *dp;
|
||||
db_indx_t cnt, cpindx, dindx, first, sz;
|
||||
int ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
/*
|
||||
* Count the duplicate records and calculate how much room they're
|
||||
* using on the page.
|
||||
*/
|
||||
while (indx > 0 && h->inp[indx] == h->inp[indx - P_INDX])
|
||||
indx -= P_INDX;
|
||||
for (cnt = 0, sz = 0, first = indx;; ++cnt, indx += P_INDX) {
|
||||
if (indx >= NUM_ENT(h) || h->inp[first] != h->inp[indx])
|
||||
break;
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
sz += B_TYPE(bk->type) == B_KEYDATA ?
|
||||
BKEYDATA_PSIZE(bk->len) : BOVERFLOW_PSIZE;
|
||||
bk = GET_BKEYDATA(h, indx + O_INDX);
|
||||
sz += B_TYPE(bk->type) == B_KEYDATA ?
|
||||
BKEYDATA_PSIZE(bk->len) : BOVERFLOW_PSIZE;
|
||||
}
|
||||
|
||||
/*
|
||||
* We have to do these checks when the user is replacing the cursor's
|
||||
* data item -- if the application replaces a duplicate item with a
|
||||
* larger data item, it can increase the amount of space used by the
|
||||
* duplicates, requiring this check. But that means we may have done
|
||||
* this check when it wasn't a duplicate item after all.
|
||||
*/
|
||||
if (cnt == 1)
|
||||
return (0);
|
||||
|
||||
/*
|
||||
* If this set of duplicates is using more than 25% of the page, move
|
||||
* them off. The choice of 25% is a WAG, but the value must be small
|
||||
* enough that we can always split a page without putting duplicates
|
||||
* on two different pages.
|
||||
*/
|
||||
if (sz < dbp->pgsize / 4)
|
||||
return (0);
|
||||
|
||||
/* Get a new page. */
|
||||
if ((ret = __db_new(dbc,
|
||||
dbp->dup_compare == NULL ? P_LRECNO : P_LDUP, &dp)) != 0)
|
||||
return (ret);
|
||||
P_INIT(dp, dbp->pgsize, dp->pgno,
|
||||
PGNO_INVALID, PGNO_INVALID, LEAFLEVEL, TYPE(dp));
|
||||
|
||||
/*
|
||||
* Move this set of duplicates off the page. First points to the first
|
||||
* key of the first duplicate key/data pair, cnt is the number of pairs
|
||||
* we're dealing with.
|
||||
*/
|
||||
memset(&hdr, 0, sizeof(hdr));
|
||||
dindx = first;
|
||||
indx = first;
|
||||
cpindx = 0;
|
||||
do {
|
||||
/* Move cursors referencing the old entry to the new entry. */
|
||||
if ((ret = __bam_ca_dup(dbc, first,
|
||||
PGNO(h), indx, PGNO(dp), cpindx)) != 0)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* Copy the entry to the new page. If the off-duplicate page
|
||||
* If the off-duplicate page is a Btree page (i.e. dup_compare
|
||||
* will be non-NULL, we use Btree pages for sorted dups,
|
||||
* and Recno pages for unsorted dups), move all entries
|
||||
* normally, even deleted ones. If it's a Recno page,
|
||||
* deleted entries are discarded (if the deleted entry is
|
||||
* overflow, then free up those pages).
|
||||
*/
|
||||
bk = GET_BKEYDATA(h, dindx + 1);
|
||||
hdr.data = bk;
|
||||
hdr.size = B_TYPE(bk->type) == B_KEYDATA ?
|
||||
BKEYDATA_SIZE(bk->len) : BOVERFLOW_SIZE;
|
||||
if (dbp->dup_compare == NULL && B_DISSET(bk->type)) {
|
||||
/*
|
||||
* Unsorted dups, i.e. recno page, and we have
|
||||
* a deleted entry, don't move it, but if it was
|
||||
* an overflow entry, we need to free those pages.
|
||||
*/
|
||||
if (B_TYPE(bk->type) == B_OVERFLOW &&
|
||||
(ret = __db_doff(dbc,
|
||||
(GET_BOVERFLOW(h, dindx + 1))->pgno)) != 0)
|
||||
goto err;
|
||||
} else {
|
||||
if ((ret = __db_pitem(
|
||||
dbc, dp, cpindx, hdr.size, &hdr, NULL)) != 0)
|
||||
goto err;
|
||||
++cpindx;
|
||||
}
|
||||
/* Delete all but the last reference to the key. */
|
||||
if (cnt != 1) {
|
||||
if ((ret = __bam_adjindx(dbc,
|
||||
h, dindx, first + 1, 0)) != 0)
|
||||
goto err;
|
||||
} else
|
||||
dindx++;
|
||||
|
||||
/* Delete the data item. */
|
||||
if ((ret = __db_ditem(dbc, h, dindx, hdr.size)) != 0)
|
||||
goto err;
|
||||
indx += P_INDX;
|
||||
} while (--cnt);
|
||||
|
||||
/* Put in a new data item that points to the duplicates page. */
|
||||
if ((ret = __bam_ovput(dbc,
|
||||
B_DUPLICATE, dp->pgno, h, first + 1, NULL)) != 0)
|
||||
goto err;
|
||||
|
||||
/* Adjust cursors for all the above movments. */
|
||||
if ((ret = __bam_ca_di(dbc,
|
||||
PGNO(h), first + P_INDX, first + P_INDX - indx)) != 0)
|
||||
goto err;
|
||||
|
||||
return (memp_fput(dbp->mpf, dp, DB_MPOOL_DIRTY));
|
||||
|
||||
err: (void)__db_free(dbc, dp);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_ovput --
|
||||
* Build an item for an off-page duplicates page or overflow page and
|
||||
* insert it on the page.
|
||||
*/
|
||||
static int
|
||||
__bam_ovput(dbc, type, pgno, h, indx, item)
|
||||
DBC *dbc;
|
||||
u_int32_t type, indx;
|
||||
db_pgno_t pgno;
|
||||
PAGE *h;
|
||||
DBT *item;
|
||||
{
|
||||
BOVERFLOW bo;
|
||||
DBT hdr;
|
||||
int ret;
|
||||
|
||||
UMRW_SET(bo.unused1);
|
||||
B_TSET(bo.type, type, 0);
|
||||
UMRW_SET(bo.unused2);
|
||||
|
||||
/*
|
||||
* If we're creating an overflow item, do so and acquire the page
|
||||
* number for it. If we're creating an off-page duplicates tree,
|
||||
* we are giving the page number as an argument.
|
||||
*/
|
||||
if (type == B_OVERFLOW) {
|
||||
if ((ret = __db_poff(dbc, item, &bo.pgno)) != 0)
|
||||
return (ret);
|
||||
bo.tlen = item->size;
|
||||
} else {
|
||||
bo.pgno = pgno;
|
||||
bo.tlen = 0;
|
||||
}
|
||||
|
||||
/* Store the new record on the page. */
|
||||
memset(&hdr, 0, sizeof(hdr));
|
||||
hdr.data = &bo;
|
||||
hdr.size = BOVERFLOW_SIZE;
|
||||
return (__db_pitem(dbc, h, indx, BOVERFLOW_SIZE, &hdr, NULL));
|
||||
}
|
||||
1219
bdb/btree/bt_rec.c
Normal file
1219
bdb/btree/bt_rec.c
Normal file
File diff suppressed because it is too large
Load Diff
53
bdb/btree/bt_reclaim.c
Normal file
53
bdb/btree/bt_reclaim.c
Normal file
@@ -0,0 +1,53 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_reclaim.c,v 11.5 2000/03/22 04:21:01 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_shash.h"
|
||||
#include "lock.h"
|
||||
#include "btree.h"
|
||||
|
||||
/*
|
||||
* __bam_reclaim --
|
||||
* Free a database.
|
||||
*
|
||||
* PUBLIC: int __bam_reclaim __P((DB *, DB_TXN *));
|
||||
*/
|
||||
int
|
||||
__bam_reclaim(dbp, txn)
|
||||
DB *dbp;
|
||||
DB_TXN *txn;
|
||||
{
|
||||
DBC *dbc;
|
||||
int ret, t_ret;
|
||||
|
||||
/* Acquire a cursor. */
|
||||
if ((ret = dbp->cursor(dbp, txn, &dbc, 0)) != 0)
|
||||
return (ret);
|
||||
|
||||
/* Walk the tree, freeing pages. */
|
||||
ret = __bam_traverse(dbc,
|
||||
DB_LOCK_WRITE, dbc->internal->root, __db_reclaim_callback, dbc);
|
||||
|
||||
/* Discard the cursor. */
|
||||
if ((t_ret = dbc->c_close(dbc)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
return (ret);
|
||||
}
|
||||
1369
bdb/btree/bt_recno.c
Normal file
1369
bdb/btree/bt_recno.c
Normal file
File diff suppressed because it is too large
Load Diff
429
bdb/btree/bt_rsearch.c
Normal file
429
bdb/btree/bt_rsearch.c
Normal file
@@ -0,0 +1,429 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995, 1996
|
||||
* Keith Bostic. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_rsearch.c,v 11.21 2000/03/28 21:50:04 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "btree.h"
|
||||
#include "db_shash.h"
|
||||
#include "lock.h"
|
||||
|
||||
/*
|
||||
* __bam_rsearch --
|
||||
* Search a btree for a record number.
|
||||
*
|
||||
* PUBLIC: int __bam_rsearch __P((DBC *, db_recno_t *, u_int32_t, int, int *));
|
||||
*/
|
||||
int
|
||||
__bam_rsearch(dbc, recnop, flags, stop, exactp)
|
||||
DBC *dbc;
|
||||
db_recno_t *recnop;
|
||||
u_int32_t flags;
|
||||
int stop, *exactp;
|
||||
{
|
||||
BINTERNAL *bi;
|
||||
BTREE_CURSOR *cp;
|
||||
DB *dbp;
|
||||
DB_LOCK lock;
|
||||
PAGE *h;
|
||||
RINTERNAL *ri;
|
||||
db_indx_t adjust, deloffset, indx, top;
|
||||
db_lockmode_t lock_mode;
|
||||
db_pgno_t pg;
|
||||
db_recno_t recno, t_recno, total;
|
||||
int ret, stack;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
BT_STK_CLR(cp);
|
||||
|
||||
/*
|
||||
* There are several ways we search a btree tree. The flags argument
|
||||
* specifies if we're acquiring read or write locks and if we are
|
||||
* locking pairs of pages. In addition, if we're adding or deleting
|
||||
* an item, we have to lock the entire tree, regardless. See btree.h
|
||||
* for more details.
|
||||
*
|
||||
* If write-locking pages, we need to know whether or not to acquire a
|
||||
* write lock on a page before getting it. This depends on how deep it
|
||||
* is in tree, which we don't know until we acquire the root page. So,
|
||||
* if we need to lock the root page we may have to upgrade it later,
|
||||
* because we won't get the correct lock initially.
|
||||
*
|
||||
* Retrieve the root page.
|
||||
*/
|
||||
pg = cp->root;
|
||||
stack = LF_ISSET(S_STACK);
|
||||
lock_mode = stack ? DB_LOCK_WRITE : DB_LOCK_READ;
|
||||
if ((ret = __db_lget(dbc, 0, pg, lock_mode, 0, &lock)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fget(dbp->mpf, &pg, 0, &h)) != 0) {
|
||||
/* Did not read it, so we can release the lock */
|
||||
(void)__LPUT(dbc, lock);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* Decide if we need to save this page; if we do, write lock it.
|
||||
* We deliberately don't lock-couple on this call. If the tree
|
||||
* is tiny, i.e., one page, and two threads are busily updating
|
||||
* the root page, we're almost guaranteed deadlocks galore, as
|
||||
* each one gets a read lock and then blocks the other's attempt
|
||||
* for a write lock.
|
||||
*/
|
||||
if (!stack &&
|
||||
((LF_ISSET(S_PARENT) && (u_int8_t)(stop + 1) >= h->level) ||
|
||||
(LF_ISSET(S_WRITE) && h->level == LEAFLEVEL))) {
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
(void)__LPUT(dbc, lock);
|
||||
lock_mode = DB_LOCK_WRITE;
|
||||
if ((ret = __db_lget(dbc, 0, pg, lock_mode, 0, &lock)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fget(dbp->mpf, &pg, 0, &h)) != 0) {
|
||||
/* Did not read it, so we can release the lock */
|
||||
(void)__LPUT(dbc, lock);
|
||||
return (ret);
|
||||
}
|
||||
stack = 1;
|
||||
}
|
||||
|
||||
/*
|
||||
* If appending to the tree, set the record number now -- we have the
|
||||
* root page locked.
|
||||
*
|
||||
* Delete only deletes exact matches, read only returns exact matches.
|
||||
* Note, this is different from __bam_search(), which returns non-exact
|
||||
* matches for read.
|
||||
*
|
||||
* The record may not exist. We can only return the correct location
|
||||
* for the record immediately after the last record in the tree, so do
|
||||
* a fast check now.
|
||||
*/
|
||||
total = RE_NREC(h);
|
||||
if (LF_ISSET(S_APPEND)) {
|
||||
*exactp = 0;
|
||||
*recnop = recno = total + 1;
|
||||
} else {
|
||||
recno = *recnop;
|
||||
if (recno <= total)
|
||||
*exactp = 1;
|
||||
else {
|
||||
*exactp = 0;
|
||||
if (!LF_ISSET(S_PAST_EOF) || recno > total + 1) {
|
||||
/*
|
||||
* Keep the page locked for serializability.
|
||||
*
|
||||
* XXX
|
||||
* This leaves the root page locked, which will
|
||||
* eliminate any concurrency. A possible fix
|
||||
* would be to lock the last leaf page instead.
|
||||
*/
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
(void)__TLPUT(dbc, lock);
|
||||
return (DB_NOTFOUND);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* !!!
|
||||
* Record numbers in the tree are 0-based, but the recno is
|
||||
* 1-based. All of the calculations below have to take this
|
||||
* into account.
|
||||
*/
|
||||
for (total = 0;;) {
|
||||
switch (TYPE(h)) {
|
||||
case P_LBTREE:
|
||||
case P_LDUP:
|
||||
recno -= total;
|
||||
/*
|
||||
* There may be logically deleted records on the page.
|
||||
* If there are enough, the record may not exist.
|
||||
*/
|
||||
if (TYPE(h) == P_LBTREE) {
|
||||
adjust = P_INDX;
|
||||
deloffset = O_INDX;
|
||||
} else {
|
||||
adjust = O_INDX;
|
||||
deloffset = 0;
|
||||
}
|
||||
for (t_recno = 0, indx = 0;; indx += adjust) {
|
||||
if (indx >= NUM_ENT(h)) {
|
||||
*exactp = 0;
|
||||
if (!LF_ISSET(S_PAST_EOF) ||
|
||||
recno > t_recno + 1) {
|
||||
ret = DB_NOTFOUND;
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if (!B_DISSET(
|
||||
GET_BKEYDATA(h, indx + deloffset)->type) &&
|
||||
++t_recno == recno)
|
||||
break;
|
||||
}
|
||||
|
||||
/* Correct from 1-based to 0-based for a page offset. */
|
||||
BT_STK_ENTER(dbp->dbenv,
|
||||
cp, h, indx, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
return (0);
|
||||
case P_IBTREE:
|
||||
for (indx = 0, top = NUM_ENT(h);;) {
|
||||
bi = GET_BINTERNAL(h, indx);
|
||||
if (++indx == top || total + bi->nrecs >= recno)
|
||||
break;
|
||||
total += bi->nrecs;
|
||||
}
|
||||
pg = bi->pgno;
|
||||
break;
|
||||
case P_LRECNO:
|
||||
recno -= total;
|
||||
|
||||
/* Correct from 1-based to 0-based for a page offset. */
|
||||
--recno;
|
||||
BT_STK_ENTER(dbp->dbenv,
|
||||
cp, h, recno, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
return (0);
|
||||
case P_IRECNO:
|
||||
for (indx = 0, top = NUM_ENT(h);;) {
|
||||
ri = GET_RINTERNAL(h, indx);
|
||||
if (++indx == top || total + ri->nrecs >= recno)
|
||||
break;
|
||||
total += ri->nrecs;
|
||||
}
|
||||
pg = ri->pgno;
|
||||
break;
|
||||
default:
|
||||
return (__db_pgfmt(dbp, h->pgno));
|
||||
}
|
||||
--indx;
|
||||
|
||||
if (stack) {
|
||||
/* Return if this is the lowest page wanted. */
|
||||
if (LF_ISSET(S_PARENT) && stop == h->level) {
|
||||
BT_STK_ENTER(dbp->dbenv,
|
||||
cp, h, indx, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
return (0);
|
||||
}
|
||||
BT_STK_PUSH(dbp->dbenv,
|
||||
cp, h, indx, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
|
||||
lock_mode = DB_LOCK_WRITE;
|
||||
if ((ret =
|
||||
__db_lget(dbc, 0, pg, lock_mode, 0, &lock)) != 0)
|
||||
goto err;
|
||||
} else {
|
||||
/*
|
||||
* Decide if we want to return a pointer to the next
|
||||
* page in the stack. If we do, write lock it and
|
||||
* never unlock it.
|
||||
*/
|
||||
if ((LF_ISSET(S_PARENT) &&
|
||||
(u_int8_t)(stop + 1) >= (u_int8_t)(h->level - 1)) ||
|
||||
(h->level - 1) == LEAFLEVEL)
|
||||
stack = 1;
|
||||
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
|
||||
lock_mode = stack &&
|
||||
LF_ISSET(S_WRITE) ? DB_LOCK_WRITE : DB_LOCK_READ;
|
||||
if ((ret = __db_lget(dbc,
|
||||
LCK_COUPLE, pg, lock_mode, 0, &lock)) != 0) {
|
||||
/*
|
||||
* If we fail, discard the lock we held. This
|
||||
* is OK because this only happens when we are
|
||||
* descending the tree holding read-locks.
|
||||
*/
|
||||
__LPUT(dbc, lock);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
|
||||
if ((ret = memp_fget(dbp->mpf, &pg, 0, &h)) != 0)
|
||||
goto err;
|
||||
}
|
||||
/* NOTREACHED */
|
||||
|
||||
err: BT_STK_POP(cp);
|
||||
__bam_stkrel(dbc, 0);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_adjust --
|
||||
* Adjust the tree after adding or deleting a record.
|
||||
*
|
||||
* PUBLIC: int __bam_adjust __P((DBC *, int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_adjust(dbc, adjust)
|
||||
DBC *dbc;
|
||||
int32_t adjust;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
DB *dbp;
|
||||
EPG *epg;
|
||||
PAGE *h;
|
||||
db_pgno_t root_pgno;
|
||||
int ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
root_pgno = cp->root;
|
||||
|
||||
/* Update the record counts for the tree. */
|
||||
for (epg = cp->sp; epg <= cp->csp; ++epg) {
|
||||
h = epg->page;
|
||||
if (TYPE(h) == P_IBTREE || TYPE(h) == P_IRECNO) {
|
||||
if (DB_LOGGING(dbc) &&
|
||||
(ret = __bam_cadjust_log(dbp->dbenv,
|
||||
dbc->txn, &LSN(h), 0, dbp->log_fileid,
|
||||
PGNO(h), &LSN(h), (u_int32_t)epg->indx, adjust,
|
||||
PGNO(h) == root_pgno ? CAD_UPDATEROOT : 0)) != 0)
|
||||
return (ret);
|
||||
|
||||
if (TYPE(h) == P_IBTREE)
|
||||
GET_BINTERNAL(h, epg->indx)->nrecs += adjust;
|
||||
else
|
||||
GET_RINTERNAL(h, epg->indx)->nrecs += adjust;
|
||||
|
||||
if (PGNO(h) == root_pgno)
|
||||
RE_NREC_ADJ(h, adjust);
|
||||
|
||||
if ((ret = memp_fset(dbp->mpf, h, DB_MPOOL_DIRTY)) != 0)
|
||||
return (ret);
|
||||
}
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_nrecs --
|
||||
* Return the number of records in the tree.
|
||||
*
|
||||
* PUBLIC: int __bam_nrecs __P((DBC *, db_recno_t *));
|
||||
*/
|
||||
int
|
||||
__bam_nrecs(dbc, rep)
|
||||
DBC *dbc;
|
||||
db_recno_t *rep;
|
||||
{
|
||||
DB *dbp;
|
||||
DB_LOCK lock;
|
||||
PAGE *h;
|
||||
db_pgno_t pgno;
|
||||
int ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
|
||||
pgno = dbc->internal->root;
|
||||
if ((ret = __db_lget(dbc, 0, pgno, DB_LOCK_READ, 0, &lock)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fget(dbp->mpf, &pgno, 0, &h)) != 0)
|
||||
return (ret);
|
||||
|
||||
*rep = RE_NREC(h);
|
||||
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
(void)__TLPUT(dbc, lock);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_total --
|
||||
* Return the number of records below a page.
|
||||
*
|
||||
* PUBLIC: db_recno_t __bam_total __P((PAGE *));
|
||||
*/
|
||||
db_recno_t
|
||||
__bam_total(h)
|
||||
PAGE *h;
|
||||
{
|
||||
db_recno_t nrecs;
|
||||
db_indx_t indx, top;
|
||||
|
||||
nrecs = 0;
|
||||
top = NUM_ENT(h);
|
||||
|
||||
switch (TYPE(h)) {
|
||||
case P_LBTREE:
|
||||
/* Check for logically deleted records. */
|
||||
for (indx = 0; indx < top; indx += P_INDX)
|
||||
if (!B_DISSET(GET_BKEYDATA(h, indx + O_INDX)->type))
|
||||
++nrecs;
|
||||
break;
|
||||
case P_LDUP:
|
||||
/* Check for logically deleted records. */
|
||||
for (indx = 0; indx < top; indx += O_INDX)
|
||||
if (!B_DISSET(GET_BKEYDATA(h, indx)->type))
|
||||
++nrecs;
|
||||
break;
|
||||
case P_IBTREE:
|
||||
for (indx = 0; indx < top; indx += O_INDX)
|
||||
nrecs += GET_BINTERNAL(h, indx)->nrecs;
|
||||
break;
|
||||
case P_LRECNO:
|
||||
nrecs = NUM_ENT(h);
|
||||
break;
|
||||
case P_IRECNO:
|
||||
for (indx = 0; indx < top; indx += O_INDX)
|
||||
nrecs += GET_RINTERNAL(h, indx)->nrecs;
|
||||
break;
|
||||
}
|
||||
|
||||
return (nrecs);
|
||||
}
|
||||
471
bdb/btree/bt_search.c
Normal file
471
bdb/btree/bt_search.c
Normal file
@@ -0,0 +1,471 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995, 1996
|
||||
* Keith Bostic. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993, 1994, 1995
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Mike Olson.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_search.c,v 11.32 2001/01/17 20:19:46 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_shash.h"
|
||||
#include "btree.h"
|
||||
#include "lock.h"
|
||||
|
||||
/*
|
||||
* __bam_search --
|
||||
* Search a btree for a key.
|
||||
*
|
||||
* PUBLIC: int __bam_search __P((DBC *,
|
||||
* PUBLIC: const DBT *, u_int32_t, int, db_recno_t *, int *));
|
||||
*/
|
||||
int
|
||||
__bam_search(dbc, key, flags, stop, recnop, exactp)
|
||||
DBC *dbc;
|
||||
const DBT *key;
|
||||
u_int32_t flags;
|
||||
int stop, *exactp;
|
||||
db_recno_t *recnop;
|
||||
{
|
||||
BTREE *t;
|
||||
BTREE_CURSOR *cp;
|
||||
DB *dbp;
|
||||
DB_LOCK lock;
|
||||
PAGE *h;
|
||||
db_indx_t base, i, indx, lim;
|
||||
db_lockmode_t lock_mode;
|
||||
db_pgno_t pg;
|
||||
db_recno_t recno;
|
||||
int adjust, cmp, deloffset, ret, stack;
|
||||
int (*func) __P((DB *, const DBT *, const DBT *));
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
t = dbp->bt_internal;
|
||||
recno = 0;
|
||||
|
||||
BT_STK_CLR(cp);
|
||||
|
||||
/*
|
||||
* There are several ways we search a btree tree. The flags argument
|
||||
* specifies if we're acquiring read or write locks, if we position
|
||||
* to the first or last item in a set of duplicates, if we return
|
||||
* deleted items, and if we are locking pairs of pages. In addition,
|
||||
* if we're modifying record numbers, we have to lock the entire tree
|
||||
* regardless. See btree.h for more details.
|
||||
*
|
||||
* If write-locking pages, we need to know whether or not to acquire a
|
||||
* write lock on a page before getting it. This depends on how deep it
|
||||
* is in tree, which we don't know until we acquire the root page. So,
|
||||
* if we need to lock the root page we may have to upgrade it later,
|
||||
* because we won't get the correct lock initially.
|
||||
*
|
||||
* Retrieve the root page.
|
||||
*/
|
||||
try_again:
|
||||
pg = cp->root;
|
||||
stack = LF_ISSET(S_STACK) && F_ISSET(cp, C_RECNUM);
|
||||
lock_mode = stack ? DB_LOCK_WRITE : DB_LOCK_READ;
|
||||
if ((ret = __db_lget(dbc, 0, pg, lock_mode, 0, &lock)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fget(dbp->mpf, &pg, 0, &h)) != 0) {
|
||||
/* Did not read it, so we can release the lock */
|
||||
(void)__LPUT(dbc, lock);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* Decide if we need to save this page; if we do, write lock it.
|
||||
* We deliberately don't lock-couple on this call. If the tree
|
||||
* is tiny, i.e., one page, and two threads are busily updating
|
||||
* the root page, we're almost guaranteed deadlocks galore, as
|
||||
* each one gets a read lock and then blocks the other's attempt
|
||||
* for a write lock.
|
||||
*/
|
||||
if (!stack &&
|
||||
((LF_ISSET(S_PARENT) && (u_int8_t)(stop + 1) >= h->level) ||
|
||||
(LF_ISSET(S_WRITE) && h->level == LEAFLEVEL))) {
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
(void)__LPUT(dbc, lock);
|
||||
lock_mode = DB_LOCK_WRITE;
|
||||
if ((ret = __db_lget(dbc, 0, pg, lock_mode, 0, &lock)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fget(dbp->mpf, &pg, 0, &h)) != 0) {
|
||||
/* Did not read it, so we can release the lock */
|
||||
(void)__LPUT(dbc, lock);
|
||||
return (ret);
|
||||
}
|
||||
if (!((LF_ISSET(S_PARENT)
|
||||
&& (u_int8_t)(stop + 1) >= h->level) ||
|
||||
(LF_ISSET(S_WRITE) && h->level == LEAFLEVEL))) {
|
||||
/* Someone else split the root, start over. */
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
(void)__LPUT(dbc, lock);
|
||||
goto try_again;
|
||||
}
|
||||
stack = 1;
|
||||
}
|
||||
|
||||
/* Choose a comparison function. */
|
||||
func = F_ISSET(dbc, DBC_OPD) ?
|
||||
(dbp->dup_compare == NULL ? __bam_defcmp : dbp->dup_compare) :
|
||||
t->bt_compare;
|
||||
|
||||
for (;;) {
|
||||
/*
|
||||
* Do a binary search on the current page. If we're searching
|
||||
* a Btree leaf page, we have to walk the indices in groups of
|
||||
* two. If we're searching an internal page or a off-page dup
|
||||
* page, they're an index per page item. If we find an exact
|
||||
* match on a leaf page, we're done.
|
||||
*/
|
||||
adjust = TYPE(h) == P_LBTREE ? P_INDX : O_INDX;
|
||||
for (base = 0,
|
||||
lim = NUM_ENT(h) / (db_indx_t)adjust; lim != 0; lim >>= 1) {
|
||||
indx = base + ((lim >> 1) * adjust);
|
||||
if ((ret =
|
||||
__bam_cmp(dbp, key, h, indx, func, &cmp)) != 0)
|
||||
goto err;
|
||||
if (cmp == 0) {
|
||||
if (TYPE(h) == P_LBTREE || TYPE(h) == P_LDUP)
|
||||
goto found;
|
||||
goto next;
|
||||
}
|
||||
if (cmp > 0) {
|
||||
base = indx + adjust;
|
||||
--lim;
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* No match found. Base is the smallest index greater than
|
||||
* key and may be zero or a last + O_INDX index.
|
||||
*
|
||||
* If it's a leaf page, return base as the "found" value.
|
||||
* Delete only deletes exact matches.
|
||||
*/
|
||||
if (TYPE(h) == P_LBTREE || TYPE(h) == P_LDUP) {
|
||||
*exactp = 0;
|
||||
|
||||
if (LF_ISSET(S_EXACT))
|
||||
goto notfound;
|
||||
|
||||
if (LF_ISSET(S_STK_ONLY)) {
|
||||
BT_STK_NUM(dbp->dbenv, cp, h, base, ret);
|
||||
__LPUT(dbc, lock);
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* !!!
|
||||
* Possibly returning a deleted record -- DB_SET_RANGE,
|
||||
* DB_KEYFIRST and DB_KEYLAST don't require an exact
|
||||
* match, and we don't want to walk multiple pages here
|
||||
* to find an undeleted record. This is handled by the
|
||||
* calling routine.
|
||||
*/
|
||||
BT_STK_ENTER(dbp->dbenv,
|
||||
cp, h, base, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* If it's not a leaf page, record the internal page (which is
|
||||
* a parent page for the key). Decrement the base by 1 if it's
|
||||
* non-zero so that if a split later occurs, the inserted page
|
||||
* will be to the right of the saved page.
|
||||
*/
|
||||
indx = base > 0 ? base - O_INDX : base;
|
||||
|
||||
/*
|
||||
* If we're trying to calculate the record number, sum up
|
||||
* all the record numbers on this page up to the indx point.
|
||||
*/
|
||||
next: if (recnop != NULL)
|
||||
for (i = 0; i < indx; ++i)
|
||||
recno += GET_BINTERNAL(h, i)->nrecs;
|
||||
|
||||
pg = GET_BINTERNAL(h, indx)->pgno;
|
||||
|
||||
if (LF_ISSET(S_STK_ONLY)) {
|
||||
if (stop == h->level) {
|
||||
BT_STK_NUM(dbp->dbenv, cp, h, indx, ret);
|
||||
__LPUT(dbc, lock);
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
return (ret);
|
||||
}
|
||||
BT_STK_NUMPUSH(dbp->dbenv, cp, h, indx, ret);
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
if ((ret = __db_lget(dbc,
|
||||
LCK_COUPLE, pg, lock_mode, 0, &lock)) != 0) {
|
||||
/*
|
||||
* Discard our lock and return on failure. This
|
||||
* is OK because it only happens when descending
|
||||
* the tree holding read-locks.
|
||||
*/
|
||||
__LPUT(dbc, lock);
|
||||
return (ret);
|
||||
}
|
||||
} else if (stack) {
|
||||
/* Return if this is the lowest page wanted. */
|
||||
if (LF_ISSET(S_PARENT) && stop == h->level) {
|
||||
BT_STK_ENTER(dbp->dbenv,
|
||||
cp, h, indx, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
return (0);
|
||||
}
|
||||
BT_STK_PUSH(dbp->dbenv,
|
||||
cp, h, indx, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
|
||||
lock_mode = DB_LOCK_WRITE;
|
||||
if ((ret =
|
||||
__db_lget(dbc, 0, pg, lock_mode, 0, &lock)) != 0)
|
||||
goto err;
|
||||
} else {
|
||||
/*
|
||||
* Decide if we want to return a reference to the next
|
||||
* page in the return stack. If so, lock it and never
|
||||
* unlock it.
|
||||
*/
|
||||
if ((LF_ISSET(S_PARENT) &&
|
||||
(u_int8_t)(stop + 1) >= (u_int8_t)(h->level - 1)) ||
|
||||
(h->level - 1) == LEAFLEVEL)
|
||||
stack = 1;
|
||||
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
|
||||
lock_mode = stack &&
|
||||
LF_ISSET(S_WRITE) ? DB_LOCK_WRITE : DB_LOCK_READ;
|
||||
if ((ret = __db_lget(dbc,
|
||||
LCK_COUPLE, pg, lock_mode, 0, &lock)) != 0) {
|
||||
/*
|
||||
* If we fail, discard the lock we held. This
|
||||
* is OK because this only happens when we are
|
||||
* descending the tree holding read-locks.
|
||||
*/
|
||||
__LPUT(dbc, lock);
|
||||
goto err;
|
||||
}
|
||||
}
|
||||
if ((ret = memp_fget(dbp->mpf, &pg, 0, &h)) != 0)
|
||||
goto err;
|
||||
}
|
||||
/* NOTREACHED */
|
||||
|
||||
found: *exactp = 1;
|
||||
|
||||
/*
|
||||
* If we're trying to calculate the record number, add in the
|
||||
* offset on this page and correct for the fact that records
|
||||
* in the tree are 0-based.
|
||||
*/
|
||||
if (recnop != NULL)
|
||||
*recnop = recno + (indx / P_INDX) + 1;
|
||||
|
||||
/*
|
||||
* If we got here, we know that we have a Btree leaf or off-page
|
||||
* duplicates page. If it's a Btree leaf page, we have to handle
|
||||
* on-page duplicates.
|
||||
*
|
||||
* If there are duplicates, go to the first/last one. This is
|
||||
* safe because we know that we're not going to leave the page,
|
||||
* all duplicate sets that are not on overflow pages exist on a
|
||||
* single leaf page.
|
||||
*/
|
||||
if (TYPE(h) == P_LBTREE) {
|
||||
if (LF_ISSET(S_DUPLAST))
|
||||
while (indx < (db_indx_t)(NUM_ENT(h) - P_INDX) &&
|
||||
h->inp[indx] == h->inp[indx + P_INDX])
|
||||
indx += P_INDX;
|
||||
else
|
||||
while (indx > 0 &&
|
||||
h->inp[indx] == h->inp[indx - P_INDX])
|
||||
indx -= P_INDX;
|
||||
}
|
||||
|
||||
/*
|
||||
* Now check if we are allowed to return deleted items; if not, then
|
||||
* find the next (or previous) non-deleted duplicate entry. (We do
|
||||
* not move from the original found key on the basis of the S_DELNO
|
||||
* flag.)
|
||||
*/
|
||||
if (LF_ISSET(S_DELNO)) {
|
||||
deloffset = TYPE(h) == P_LBTREE ? O_INDX : 0;
|
||||
if (LF_ISSET(S_DUPLAST))
|
||||
while (B_DISSET(GET_BKEYDATA(
|
||||
h, indx + deloffset)->type) && indx > 0 &&
|
||||
h->inp[indx] == h->inp[indx - adjust])
|
||||
indx -= adjust;
|
||||
else
|
||||
while (B_DISSET(GET_BKEYDATA(
|
||||
h, indx + deloffset)->type) &&
|
||||
indx < (db_indx_t)(NUM_ENT(h) - adjust) &&
|
||||
h->inp[indx] == h->inp[indx + adjust])
|
||||
indx += adjust;
|
||||
|
||||
/*
|
||||
* If we weren't able to find a non-deleted duplicate, return
|
||||
* DB_NOTFOUND.
|
||||
*/
|
||||
if (B_DISSET(GET_BKEYDATA(h, indx + deloffset)->type))
|
||||
goto notfound;
|
||||
}
|
||||
|
||||
if (LF_ISSET(S_STK_ONLY)) {
|
||||
BT_STK_NUM(dbp->dbenv, cp, h, indx, ret);
|
||||
__LPUT(dbc, lock);
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
} else {
|
||||
BT_STK_ENTER(dbp->dbenv, cp, h, indx, lock, lock_mode, ret);
|
||||
if (ret != 0)
|
||||
goto err;
|
||||
}
|
||||
return (0);
|
||||
|
||||
notfound:
|
||||
/* Keep the page locked for serializability. */
|
||||
(void)memp_fput(dbp->mpf, h, 0);
|
||||
(void)__TLPUT(dbc, lock);
|
||||
ret = DB_NOTFOUND;
|
||||
|
||||
err: BT_STK_POP(cp);
|
||||
__bam_stkrel(dbc, 0);
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_stkrel --
|
||||
* Release all pages currently held in the stack.
|
||||
*
|
||||
* PUBLIC: int __bam_stkrel __P((DBC *, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_stkrel(dbc, flags)
|
||||
DBC *dbc;
|
||||
u_int32_t flags;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
DB *dbp;
|
||||
EPG *epg;
|
||||
int ret, t_ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
/*
|
||||
* Release inner pages first.
|
||||
*
|
||||
* The caller must be sure that setting STK_NOLOCK will not effect
|
||||
* either serializability or recoverability.
|
||||
*/
|
||||
for (ret = 0, epg = cp->sp; epg <= cp->csp; ++epg) {
|
||||
if (epg->page != NULL) {
|
||||
if (LF_ISSET(STK_CLRDBC) && cp->page == epg->page) {
|
||||
cp->page = NULL;
|
||||
cp->lock.off = LOCK_INVALID;
|
||||
}
|
||||
if ((t_ret = memp_fput(
|
||||
dbp->mpf, epg->page, 0)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
/*
|
||||
* XXX
|
||||
* Temporary fix for #3243 -- under certain deadlock
|
||||
* conditions we call here again and re-free the page.
|
||||
* The correct fix is to never release a stack that
|
||||
* doesn't hold items.
|
||||
*/
|
||||
epg->page = NULL;
|
||||
}
|
||||
if (epg->lock.off != LOCK_INVALID) {
|
||||
if (LF_ISSET(STK_NOLOCK))
|
||||
(void)__LPUT(dbc, epg->lock);
|
||||
else
|
||||
(void)__TLPUT(dbc, epg->lock);
|
||||
}
|
||||
}
|
||||
|
||||
/* Clear the stack, all pages have been released. */
|
||||
BT_STK_CLR(cp);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_stkgrow --
|
||||
* Grow the stack.
|
||||
*
|
||||
* PUBLIC: int __bam_stkgrow __P((DB_ENV *, BTREE_CURSOR *));
|
||||
*/
|
||||
int
|
||||
__bam_stkgrow(dbenv, cp)
|
||||
DB_ENV *dbenv;
|
||||
BTREE_CURSOR *cp;
|
||||
{
|
||||
EPG *p;
|
||||
size_t entries;
|
||||
int ret;
|
||||
|
||||
entries = cp->esp - cp->sp;
|
||||
|
||||
if ((ret = __os_calloc(dbenv, entries * 2, sizeof(EPG), &p)) != 0)
|
||||
return (ret);
|
||||
memcpy(p, cp->sp, entries * sizeof(EPG));
|
||||
if (cp->sp != cp->stack)
|
||||
__os_free(cp->sp, entries * sizeof(EPG));
|
||||
cp->sp = p;
|
||||
cp->csp = p + entries;
|
||||
cp->esp = p + entries * 2;
|
||||
return (0);
|
||||
}
|
||||
1126
bdb/btree/bt_split.c
Normal file
1126
bdb/btree/bt_split.c
Normal file
File diff suppressed because it is too large
Load Diff
480
bdb/btree/bt_stat.c
Normal file
480
bdb/btree/bt_stat.c
Normal file
@@ -0,0 +1,480 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_stat.c,v 11.29 2000/11/28 21:42:27 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_shash.h"
|
||||
#include "lock.h"
|
||||
#include "btree.h"
|
||||
|
||||
/*
|
||||
* __bam_stat --
|
||||
* Gather/print the btree statistics
|
||||
*
|
||||
* PUBLIC: int __bam_stat __P((DB *, void *, void *(*)(size_t), u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_stat(dbp, spp, db_malloc, flags)
|
||||
DB *dbp;
|
||||
void *spp;
|
||||
void *(*db_malloc) __P((size_t));
|
||||
u_int32_t flags;
|
||||
{
|
||||
BTMETA *meta;
|
||||
BTREE *t;
|
||||
BTREE_CURSOR *cp;
|
||||
DBC *dbc;
|
||||
DB_BTREE_STAT *sp;
|
||||
DB_LOCK lock, metalock;
|
||||
PAGE *h;
|
||||
db_pgno_t pgno;
|
||||
int ret, t_ret;
|
||||
|
||||
PANIC_CHECK(dbp->dbenv);
|
||||
DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->stat");
|
||||
|
||||
meta = NULL;
|
||||
t = dbp->bt_internal;
|
||||
sp = NULL;
|
||||
metalock.off = lock.off = LOCK_INVALID;
|
||||
h = NULL;
|
||||
ret = 0;
|
||||
|
||||
/* Check for invalid flags. */
|
||||
if ((ret = __db_statchk(dbp, flags)) != 0)
|
||||
return (ret);
|
||||
|
||||
/* Acquire a cursor. */
|
||||
if ((ret = dbp->cursor(dbp, NULL, &dbc, 0)) != 0)
|
||||
return (ret);
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
|
||||
DEBUG_LWRITE(dbc, NULL, "bam_stat", NULL, NULL, flags);
|
||||
|
||||
/* Allocate and clear the structure. */
|
||||
if ((ret = __os_malloc(dbp->dbenv, sizeof(*sp), db_malloc, &sp)) != 0)
|
||||
goto err;
|
||||
memset(sp, 0, sizeof(*sp));
|
||||
|
||||
/* If the app just wants the record count, make it fast. */
|
||||
if (flags == DB_RECORDCOUNT) {
|
||||
if ((ret = __db_lget(dbc, 0,
|
||||
cp->root, DB_LOCK_READ, 0, &lock)) != 0)
|
||||
goto err;
|
||||
if ((ret = memp_fget(dbp->mpf,
|
||||
&cp->root, 0, (PAGE **)&h)) != 0)
|
||||
goto err;
|
||||
|
||||
sp->bt_nkeys = RE_NREC(h);
|
||||
|
||||
goto done;
|
||||
}
|
||||
if (flags == DB_CACHED_COUNTS) {
|
||||
if ((ret = __db_lget(dbc,
|
||||
0, t->bt_meta, DB_LOCK_READ, 0, &lock)) != 0)
|
||||
goto err;
|
||||
if ((ret =
|
||||
memp_fget(dbp->mpf, &t->bt_meta, 0, (PAGE **)&meta)) != 0)
|
||||
goto err;
|
||||
sp->bt_nkeys = meta->dbmeta.key_count;
|
||||
sp->bt_ndata = meta->dbmeta.record_count;
|
||||
|
||||
goto done;
|
||||
}
|
||||
|
||||
/* Get the metadata page for the entire database. */
|
||||
pgno = PGNO_BASE_MD;
|
||||
if ((ret = __db_lget(dbc, 0, pgno, DB_LOCK_READ, 0, &metalock)) != 0)
|
||||
goto err;
|
||||
if ((ret = memp_fget(dbp->mpf, &pgno, 0, (PAGE **)&meta)) != 0)
|
||||
goto err;
|
||||
|
||||
/* Walk the metadata free list, counting pages. */
|
||||
for (sp->bt_free = 0, pgno = meta->dbmeta.free; pgno != PGNO_INVALID;) {
|
||||
++sp->bt_free;
|
||||
|
||||
if ((ret = memp_fget(dbp->mpf, &pgno, 0, &h)) != 0)
|
||||
goto err;
|
||||
|
||||
pgno = h->next_pgno;
|
||||
if ((ret = memp_fput(dbp->mpf, h, 0)) != 0)
|
||||
goto err;
|
||||
h = NULL;
|
||||
}
|
||||
|
||||
/* Get the root page. */
|
||||
pgno = cp->root;
|
||||
if ((ret = __db_lget(dbc, 0, pgno, DB_LOCK_READ, 0, &lock)) != 0)
|
||||
goto err;
|
||||
if ((ret = memp_fget(dbp->mpf, &pgno, 0, &h)) != 0)
|
||||
goto err;
|
||||
|
||||
/* Get the levels from the root page. */
|
||||
sp->bt_levels = h->level;
|
||||
|
||||
/* Discard the root page. */
|
||||
if ((ret = memp_fput(dbp->mpf, h, 0)) != 0)
|
||||
goto err;
|
||||
h = NULL;
|
||||
__LPUT(dbc, lock);
|
||||
|
||||
/* Walk the tree. */
|
||||
if ((ret = __bam_traverse(dbc,
|
||||
DB_LOCK_READ, cp->root, __bam_stat_callback, sp)) != 0)
|
||||
goto err;
|
||||
|
||||
/*
|
||||
* Get the subdatabase metadata page if it's not the same as the
|
||||
* one we already have.
|
||||
*/
|
||||
if (t->bt_meta != PGNO_BASE_MD || !F_ISSET(dbp, DB_AM_RDONLY)) {
|
||||
if ((ret = memp_fput(dbp->mpf, meta, 0)) != 0)
|
||||
goto err;
|
||||
meta = NULL;
|
||||
__LPUT(dbc, metalock);
|
||||
|
||||
if ((ret = __db_lget(dbc,
|
||||
0, t->bt_meta, F_ISSET(dbp, DB_AM_RDONLY) ?
|
||||
DB_LOCK_READ : DB_LOCK_WRITE, 0, &metalock)) != 0)
|
||||
goto err;
|
||||
if ((ret =
|
||||
memp_fget(dbp->mpf, &t->bt_meta, 0, (PAGE **)&meta)) != 0)
|
||||
goto err;
|
||||
}
|
||||
|
||||
/* Get metadata page statistics. */
|
||||
sp->bt_metaflags = meta->dbmeta.flags;
|
||||
sp->bt_maxkey = meta->maxkey;
|
||||
sp->bt_minkey = meta->minkey;
|
||||
sp->bt_re_len = meta->re_len;
|
||||
sp->bt_re_pad = meta->re_pad;
|
||||
sp->bt_pagesize = meta->dbmeta.pagesize;
|
||||
sp->bt_magic = meta->dbmeta.magic;
|
||||
sp->bt_version = meta->dbmeta.version;
|
||||
if (!F_ISSET(dbp, DB_AM_RDONLY)) {
|
||||
meta->dbmeta.key_count = sp->bt_nkeys;
|
||||
meta->dbmeta.record_count = sp->bt_ndata;
|
||||
}
|
||||
|
||||
/* Discard the metadata page. */
|
||||
if ((ret = memp_fput(dbp->mpf,
|
||||
meta, F_ISSET(dbp, DB_AM_RDONLY) ? 0 : DB_MPOOL_DIRTY)) != 0)
|
||||
goto err;
|
||||
meta = NULL;
|
||||
__LPUT(dbc, metalock);
|
||||
|
||||
done: *(DB_BTREE_STAT **)spp = sp;
|
||||
|
||||
if (0) {
|
||||
err: if (sp != NULL)
|
||||
__os_free(sp, sizeof(*sp));
|
||||
}
|
||||
|
||||
if (h != NULL &&
|
||||
(t_ret = memp_fput(dbp->mpf, h, 0)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
if (meta != NULL &&
|
||||
(t_ret = memp_fput(dbp->mpf, meta, 0)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
if (lock.off != LOCK_INVALID)
|
||||
__LPUT(dbc, lock);
|
||||
|
||||
if ((t_ret = dbc->c_close(dbc)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_traverse --
|
||||
* Walk a Btree database.
|
||||
*
|
||||
* PUBLIC: int __bam_traverse __P((DBC *, db_lockmode_t,
|
||||
* PUBLIC: db_pgno_t, int (*)(DB *, PAGE *, void *, int *), void *));
|
||||
*/
|
||||
int
|
||||
__bam_traverse(dbc, mode, root_pgno, callback, cookie)
|
||||
DBC *dbc;
|
||||
db_lockmode_t mode;
|
||||
db_pgno_t root_pgno;
|
||||
int (*callback)__P((DB *, PAGE *, void *, int *));
|
||||
void *cookie;
|
||||
{
|
||||
BINTERNAL *bi;
|
||||
BKEYDATA *bk;
|
||||
DB *dbp;
|
||||
DB_LOCK lock;
|
||||
PAGE *h;
|
||||
RINTERNAL *ri;
|
||||
db_indx_t indx;
|
||||
int already_put, ret, t_ret;
|
||||
|
||||
dbp = dbc->dbp;
|
||||
|
||||
if ((ret = __db_lget(dbc, 0, root_pgno, mode, 0, &lock)) != 0)
|
||||
return (ret);
|
||||
if ((ret = memp_fget(dbp->mpf, &root_pgno, 0, &h)) != 0)
|
||||
goto err;
|
||||
|
||||
switch (TYPE(h)) {
|
||||
case P_IBTREE:
|
||||
for (indx = 0; indx < NUM_ENT(h); indx += O_INDX) {
|
||||
bi = GET_BINTERNAL(h, indx);
|
||||
if (B_TYPE(bi->type) == B_OVERFLOW &&
|
||||
(ret = __db_traverse_big(dbp,
|
||||
((BOVERFLOW *)bi->data)->pgno,
|
||||
callback, cookie)) != 0)
|
||||
goto err;
|
||||
if ((ret = __bam_traverse(
|
||||
dbc, mode, bi->pgno, callback, cookie)) != 0)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case P_IRECNO:
|
||||
for (indx = 0; indx < NUM_ENT(h); indx += O_INDX) {
|
||||
ri = GET_RINTERNAL(h, indx);
|
||||
if ((ret = __bam_traverse(
|
||||
dbc, mode, ri->pgno, callback, cookie)) != 0)
|
||||
break;
|
||||
}
|
||||
break;
|
||||
case P_LBTREE:
|
||||
for (indx = 0; indx < NUM_ENT(h); indx += P_INDX) {
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
if (B_TYPE(bk->type) == B_OVERFLOW &&
|
||||
(ret = __db_traverse_big(dbp,
|
||||
GET_BOVERFLOW(h, indx)->pgno,
|
||||
callback, cookie)) != 0)
|
||||
goto err;
|
||||
bk = GET_BKEYDATA(h, indx + O_INDX);
|
||||
if (B_TYPE(bk->type) == B_DUPLICATE &&
|
||||
(ret = __bam_traverse(dbc, mode,
|
||||
GET_BOVERFLOW(h, indx + O_INDX)->pgno,
|
||||
callback, cookie)) != 0)
|
||||
goto err;
|
||||
if (B_TYPE(bk->type) == B_OVERFLOW &&
|
||||
(ret = __db_traverse_big(dbp,
|
||||
GET_BOVERFLOW(h, indx + O_INDX)->pgno,
|
||||
callback, cookie)) != 0)
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
case P_LDUP:
|
||||
case P_LRECNO:
|
||||
for (indx = 0; indx < NUM_ENT(h); indx += O_INDX) {
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
if (B_TYPE(bk->type) == B_OVERFLOW &&
|
||||
(ret = __db_traverse_big(dbp,
|
||||
GET_BOVERFLOW(h, indx)->pgno,
|
||||
callback, cookie)) != 0)
|
||||
goto err;
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
||||
already_put = 0;
|
||||
if ((ret = callback(dbp, h, cookie, &already_put)) != 0)
|
||||
goto err;
|
||||
|
||||
err: if (!already_put &&
|
||||
(t_ret = memp_fput(dbp->mpf, h, 0)) != 0 && ret != 0)
|
||||
ret = t_ret;
|
||||
__LPUT(dbc, lock);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_stat_callback --
|
||||
* Statistics callback.
|
||||
*
|
||||
* PUBLIC: int __bam_stat_callback __P((DB *, PAGE *, void *, int *));
|
||||
*/
|
||||
int
|
||||
__bam_stat_callback(dbp, h, cookie, putp)
|
||||
DB *dbp;
|
||||
PAGE *h;
|
||||
void *cookie;
|
||||
int *putp;
|
||||
{
|
||||
DB_BTREE_STAT *sp;
|
||||
db_indx_t indx, top;
|
||||
u_int8_t type;
|
||||
|
||||
sp = cookie;
|
||||
*putp = 0;
|
||||
top = NUM_ENT(h);
|
||||
|
||||
switch (TYPE(h)) {
|
||||
case P_IBTREE:
|
||||
case P_IRECNO:
|
||||
++sp->bt_int_pg;
|
||||
sp->bt_int_pgfree += P_FREESPACE(h);
|
||||
break;
|
||||
case P_LBTREE:
|
||||
/* Correct for on-page duplicates and deleted items. */
|
||||
for (indx = 0; indx < top; indx += P_INDX) {
|
||||
if (indx + P_INDX >= top ||
|
||||
h->inp[indx] != h->inp[indx + P_INDX])
|
||||
++sp->bt_nkeys;
|
||||
|
||||
type = GET_BKEYDATA(h, indx + O_INDX)->type;
|
||||
if (!B_DISSET(type) && B_TYPE(type) != B_DUPLICATE)
|
||||
++sp->bt_ndata;
|
||||
}
|
||||
|
||||
++sp->bt_leaf_pg;
|
||||
sp->bt_leaf_pgfree += P_FREESPACE(h);
|
||||
break;
|
||||
case P_LRECNO:
|
||||
/*
|
||||
* If walking a recno tree, then each of these items is a key.
|
||||
* Otherwise, we're walking an off-page duplicate set.
|
||||
*/
|
||||
if (dbp->type == DB_RECNO) {
|
||||
sp->bt_nkeys += top;
|
||||
|
||||
/*
|
||||
* Correct for deleted items in non-renumbering
|
||||
* Recno databases.
|
||||
*/
|
||||
if (F_ISSET(dbp, DB_RE_RENUMBER))
|
||||
sp->bt_ndata += top;
|
||||
else
|
||||
for (indx = 0; indx < top; indx += O_INDX) {
|
||||
type = GET_BKEYDATA(h, indx)->type;
|
||||
if (!B_DISSET(type))
|
||||
++sp->bt_ndata;
|
||||
}
|
||||
|
||||
++sp->bt_leaf_pg;
|
||||
sp->bt_leaf_pgfree += P_FREESPACE(h);
|
||||
} else {
|
||||
sp->bt_ndata += top;
|
||||
|
||||
++sp->bt_dup_pg;
|
||||
sp->bt_dup_pgfree += P_FREESPACE(h);
|
||||
}
|
||||
break;
|
||||
case P_LDUP:
|
||||
/* Correct for deleted items. */
|
||||
for (indx = 0; indx < top; indx += O_INDX)
|
||||
if (!B_DISSET(GET_BKEYDATA(h, indx)->type))
|
||||
++sp->bt_ndata;
|
||||
|
||||
++sp->bt_dup_pg;
|
||||
sp->bt_dup_pgfree += P_FREESPACE(h);
|
||||
break;
|
||||
case P_OVERFLOW:
|
||||
++sp->bt_over_pg;
|
||||
sp->bt_over_pgfree += P_OVFLSPACE(dbp->pgsize, h);
|
||||
break;
|
||||
default:
|
||||
return (__db_pgfmt(dbp, h->pgno));
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_key_range --
|
||||
* Return proportion of keys relative to given key. The numbers are
|
||||
* slightly skewed due to on page duplicates.
|
||||
*
|
||||
* PUBLIC: int __bam_key_range __P((DB *,
|
||||
* PUBLIC: DB_TXN *, DBT *, DB_KEY_RANGE *, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__bam_key_range(dbp, txn, dbt, kp, flags)
|
||||
DB *dbp;
|
||||
DB_TXN *txn;
|
||||
DBT *dbt;
|
||||
DB_KEY_RANGE *kp;
|
||||
u_int32_t flags;
|
||||
{
|
||||
BTREE_CURSOR *cp;
|
||||
DBC *dbc;
|
||||
EPG *sp;
|
||||
double factor;
|
||||
int exact, ret, t_ret;
|
||||
|
||||
PANIC_CHECK(dbp->dbenv);
|
||||
DB_ILLEGAL_BEFORE_OPEN(dbp, "DB->key_range");
|
||||
|
||||
if (flags != 0)
|
||||
return (__db_ferr(dbp->dbenv, "DB->key_range", 0));
|
||||
|
||||
/* Acquire a cursor. */
|
||||
if ((ret = dbp->cursor(dbp, txn, &dbc, 0)) != 0)
|
||||
return (ret);
|
||||
|
||||
DEBUG_LWRITE(dbc, NULL, "bam_key_range", NULL, NULL, 0);
|
||||
|
||||
if ((ret = __bam_search(dbc, dbt, S_STK_ONLY, 1, NULL, &exact)) != 0)
|
||||
goto err;
|
||||
|
||||
cp = (BTREE_CURSOR *)dbc->internal;
|
||||
kp->less = kp->greater = 0.0;
|
||||
|
||||
factor = 1.0;
|
||||
/* Correct the leaf page. */
|
||||
cp->csp->entries /= 2;
|
||||
cp->csp->indx /= 2;
|
||||
for (sp = cp->sp; sp <= cp->csp; ++sp) {
|
||||
/*
|
||||
* At each level we know that pages greater than indx contain
|
||||
* keys greater than what we are looking for and those less
|
||||
* than indx are less than. The one pointed to by indx may
|
||||
* have some less, some greater or even equal. If indx is
|
||||
* equal to the number of entries, then the key is out of range
|
||||
* and everything is less.
|
||||
*/
|
||||
if (sp->indx == 0)
|
||||
kp->greater += factor * (sp->entries - 1)/sp->entries;
|
||||
else if (sp->indx == sp->entries)
|
||||
kp->less += factor;
|
||||
else {
|
||||
kp->less += factor * sp->indx / sp->entries;
|
||||
kp->greater += factor *
|
||||
(sp->entries - sp->indx - 1) / sp->entries;
|
||||
}
|
||||
factor *= 1.0/sp->entries;
|
||||
}
|
||||
|
||||
/*
|
||||
* If there was an exact match then assign 1 n'th to the key itself.
|
||||
* Otherwise that factor belongs to those greater than the key, unless
|
||||
* the key was out of range.
|
||||
*/
|
||||
if (exact)
|
||||
kp->equal = factor;
|
||||
else {
|
||||
if (kp->less != 1)
|
||||
kp->greater += factor;
|
||||
kp->equal = 0;
|
||||
}
|
||||
|
||||
BT_STK_CLR(cp);
|
||||
|
||||
err: if ((t_ret = dbc->c_close(dbc)) != 0 && ret == 0)
|
||||
ret = t_ret;
|
||||
|
||||
return (ret);
|
||||
}
|
||||
164
bdb/btree/bt_upgrade.c
Normal file
164
bdb/btree/bt_upgrade.c
Normal file
@@ -0,0 +1,164 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: bt_upgrade.c,v 11.19 2000/11/30 00:58:29 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_swap.h"
|
||||
#include "btree.h"
|
||||
#include "db_am.h"
|
||||
#include "db_upgrade.h"
|
||||
|
||||
/*
|
||||
* __bam_30_btreemeta --
|
||||
* Upgrade the metadata pages from version 6 to version 7.
|
||||
*
|
||||
* PUBLIC: int __bam_30_btreemeta __P((DB *, char *, u_int8_t *));
|
||||
*/
|
||||
int
|
||||
__bam_30_btreemeta(dbp, real_name, buf)
|
||||
DB *dbp;
|
||||
char *real_name;
|
||||
u_int8_t *buf;
|
||||
{
|
||||
BTMETA30 *newmeta;
|
||||
BTMETA2X *oldmeta;
|
||||
DB_ENV *dbenv;
|
||||
int ret;
|
||||
|
||||
dbenv = dbp->dbenv;
|
||||
|
||||
newmeta = (BTMETA30 *)buf;
|
||||
oldmeta = (BTMETA2X *)buf;
|
||||
|
||||
/*
|
||||
* Move things from the end up, so we do not overwrite things.
|
||||
* We are going to create a new uid, so we can move the stuff
|
||||
* at the end of the structure first, overwriting the uid.
|
||||
*/
|
||||
|
||||
newmeta->re_pad = oldmeta->re_pad;
|
||||
newmeta->re_len = oldmeta->re_len;
|
||||
newmeta->minkey = oldmeta->minkey;
|
||||
newmeta->maxkey = oldmeta->maxkey;
|
||||
newmeta->dbmeta.free = oldmeta->free;
|
||||
newmeta->dbmeta.flags = oldmeta->flags;
|
||||
newmeta->dbmeta.type = P_BTREEMETA;
|
||||
|
||||
newmeta->dbmeta.version = 7;
|
||||
/* Replace the unique ID. */
|
||||
if ((ret = __os_fileid(dbenv, real_name, 1, buf + 36)) != 0)
|
||||
return (ret);
|
||||
|
||||
newmeta->root = 1;
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_31_btreemeta --
|
||||
* Upgrade the database from version 7 to version 8.
|
||||
*
|
||||
* PUBLIC: int __bam_31_btreemeta
|
||||
* PUBLIC: __P((DB *, char *, u_int32_t, DB_FH *, PAGE *, int *));
|
||||
*/
|
||||
int
|
||||
__bam_31_btreemeta(dbp, real_name, flags, fhp, h, dirtyp)
|
||||
DB *dbp;
|
||||
char *real_name;
|
||||
u_int32_t flags;
|
||||
DB_FH *fhp;
|
||||
PAGE *h;
|
||||
int *dirtyp;
|
||||
{
|
||||
BTMETA31 *newmeta;
|
||||
BTMETA30 *oldmeta;
|
||||
|
||||
COMPQUIET(dbp, NULL);
|
||||
COMPQUIET(real_name, NULL);
|
||||
COMPQUIET(fhp, NULL);
|
||||
|
||||
newmeta = (BTMETA31 *)h;
|
||||
oldmeta = (BTMETA30 *)h;
|
||||
|
||||
/*
|
||||
* Copy the effected fields down the page.
|
||||
* The fields may overlap each other so we
|
||||
* start at the bottom and use memmove.
|
||||
*/
|
||||
newmeta->root = oldmeta->root;
|
||||
newmeta->re_pad = oldmeta->re_pad;
|
||||
newmeta->re_len = oldmeta->re_len;
|
||||
newmeta->minkey = oldmeta->minkey;
|
||||
newmeta->maxkey = oldmeta->maxkey;
|
||||
memmove(newmeta->dbmeta.uid,
|
||||
oldmeta->dbmeta.uid, sizeof(oldmeta->dbmeta.uid));
|
||||
newmeta->dbmeta.flags = oldmeta->dbmeta.flags;
|
||||
newmeta->dbmeta.record_count = 0;
|
||||
newmeta->dbmeta.key_count = 0;
|
||||
ZERO_LSN(newmeta->dbmeta.unused3);
|
||||
|
||||
/* Set the version number. */
|
||||
newmeta->dbmeta.version = 8;
|
||||
|
||||
/* Upgrade the flags. */
|
||||
if (LF_ISSET(DB_DUPSORT))
|
||||
F_SET(&newmeta->dbmeta, BTM_DUPSORT);
|
||||
|
||||
*dirtyp = 1;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __bam_31_lbtree --
|
||||
* Upgrade the database btree leaf pages.
|
||||
*
|
||||
* PUBLIC: int __bam_31_lbtree
|
||||
* PUBLIC: __P((DB *, char *, u_int32_t, DB_FH *, PAGE *, int *));
|
||||
*/
|
||||
int
|
||||
__bam_31_lbtree(dbp, real_name, flags, fhp, h, dirtyp)
|
||||
DB *dbp;
|
||||
char *real_name;
|
||||
u_int32_t flags;
|
||||
DB_FH *fhp;
|
||||
PAGE *h;
|
||||
int *dirtyp;
|
||||
{
|
||||
BKEYDATA *bk;
|
||||
db_pgno_t pgno;
|
||||
db_indx_t indx;
|
||||
int ret;
|
||||
|
||||
ret = 0;
|
||||
for (indx = O_INDX; indx < NUM_ENT(h); indx += P_INDX) {
|
||||
bk = GET_BKEYDATA(h, indx);
|
||||
if (B_TYPE(bk->type) == B_DUPLICATE) {
|
||||
pgno = GET_BOVERFLOW(h, indx)->pgno;
|
||||
if ((ret = __db_31_offdup(dbp, real_name, fhp,
|
||||
LF_ISSET(DB_DUPSORT) ? 1 : 0, &pgno)) != 0)
|
||||
break;
|
||||
if (pgno != GET_BOVERFLOW(h, indx)->pgno) {
|
||||
*dirtyp = 1;
|
||||
GET_BOVERFLOW(h, indx)->pgno = pgno;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return (ret);
|
||||
}
|
||||
2237
bdb/btree/bt_verify.c
Normal file
2237
bdb/btree/bt_verify.c
Normal file
File diff suppressed because it is too large
Load Diff
296
bdb/btree/btree.src
Normal file
296
bdb/btree/btree.src
Normal file
@@ -0,0 +1,296 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* $Id: btree.src,v 10.26 2000/12/12 17:40:23 bostic Exp $
|
||||
*/
|
||||
|
||||
PREFIX bam
|
||||
|
||||
INCLUDE #include "db_config.h"
|
||||
INCLUDE
|
||||
INCLUDE #ifndef NO_SYSTEM_INCLUDES
|
||||
INCLUDE #include <sys/types.h>
|
||||
INCLUDE
|
||||
INCLUDE #include <ctype.h>
|
||||
INCLUDE #include <errno.h>
|
||||
INCLUDE #include <string.h>
|
||||
INCLUDE #endif
|
||||
INCLUDE
|
||||
INCLUDE #include "db_int.h"
|
||||
INCLUDE #include "db_page.h"
|
||||
INCLUDE #include "db_dispatch.h"
|
||||
INCLUDE #include "db_am.h"
|
||||
INCLUDE #include "btree.h"
|
||||
INCLUDE #include "txn.h"
|
||||
INCLUDE
|
||||
|
||||
/*
|
||||
* BTREE-pg_alloc: used to record allocating a new page.
|
||||
*
|
||||
* meta_lsn: the meta-data page's original lsn.
|
||||
* page_lsn: the allocated page's original lsn.
|
||||
* pgno: the page allocated.
|
||||
* next: the next page on the free list.
|
||||
*/
|
||||
BEGIN pg_alloc 51
|
||||
ARG fileid int32_t ld
|
||||
POINTER meta_lsn DB_LSN * lu
|
||||
POINTER page_lsn DB_LSN * lu
|
||||
ARG pgno db_pgno_t lu
|
||||
ARG ptype u_int32_t lu
|
||||
ARG next db_pgno_t lu
|
||||
END
|
||||
|
||||
DEPRECATED pg_alloc1 60
|
||||
ARG fileid int32_t ld
|
||||
POINTER meta_lsn DB_LSN * lu
|
||||
POINTER alloc_lsn DB_LSN * lu
|
||||
POINTER page_lsn DB_LSN * lu
|
||||
ARG pgno db_pgno_t lu
|
||||
ARG ptype u_int32_t lu
|
||||
ARG next db_pgno_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-pg_free: used to record freeing a page.
|
||||
*
|
||||
* pgno: the page being freed.
|
||||
* meta_lsn: the meta-data page's original lsn.
|
||||
* header: the header from the free'd page.
|
||||
* next: the previous next pointer on the metadata page.
|
||||
*/
|
||||
BEGIN pg_free 52
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
POINTER meta_lsn DB_LSN * lu
|
||||
DBT header DBT s
|
||||
ARG next db_pgno_t lu
|
||||
END
|
||||
|
||||
DEPRECATED pg_free1 61
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
POINTER meta_lsn DB_LSN * lu
|
||||
POINTER alloc_lsn DB_LSN * lu
|
||||
DBT header DBT s
|
||||
ARG next db_pgno_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-split: used to log a page split.
|
||||
*
|
||||
* left: the page number for the low-order contents.
|
||||
* llsn: the left page's original LSN.
|
||||
* right: the page number for the high-order contents.
|
||||
* rlsn: the right page's original LSN.
|
||||
* indx: the number of entries that went to the left page.
|
||||
* npgno: the next page number
|
||||
* nlsn: the next page's original LSN (or 0 if no next page).
|
||||
* pg: the split page's contents before the split.
|
||||
*/
|
||||
DEPRECATED split1 53
|
||||
ARG fileid int32_t ld
|
||||
ARG left db_pgno_t lu
|
||||
POINTER llsn DB_LSN * lu
|
||||
ARG right db_pgno_t lu
|
||||
POINTER rlsn DB_LSN * lu
|
||||
ARG indx u_int32_t lu
|
||||
ARG npgno db_pgno_t lu
|
||||
POINTER nlsn DB_LSN * lu
|
||||
DBT pg DBT s
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-split: used to log a page split.
|
||||
*
|
||||
* left: the page number for the low-order contents.
|
||||
* llsn: the left page's original LSN.
|
||||
* right: the page number for the high-order contents.
|
||||
* rlsn: the right page's original LSN.
|
||||
* indx: the number of entries that went to the left page.
|
||||
* npgno: the next page number
|
||||
* npgno: the next page number
|
||||
* nlsn: the next page's original LSN (or 0 if no next page).
|
||||
* root_pgno: the root page number
|
||||
* pg: the split page's contents before the split.
|
||||
* opflags: SPL_NRECS: if splitting a tree that maintains a record count.
|
||||
*/
|
||||
BEGIN split 62
|
||||
ARG fileid int32_t ld
|
||||
ARG left db_pgno_t lu
|
||||
POINTER llsn DB_LSN * lu
|
||||
ARG right db_pgno_t lu
|
||||
POINTER rlsn DB_LSN * lu
|
||||
ARG indx u_int32_t lu
|
||||
ARG npgno db_pgno_t lu
|
||||
POINTER nlsn DB_LSN * lu
|
||||
ARG root_pgno db_pgno_t lu
|
||||
DBT pg DBT s
|
||||
ARG opflags u_int32_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-rsplit: used to log a reverse-split
|
||||
*
|
||||
* pgno: the page number of the page copied over the root.
|
||||
* pgdbt: the page being copied on the root page.
|
||||
* nrec: the tree's record count.
|
||||
* rootent: last entry on the root page.
|
||||
* rootlsn: the root page's original lsn.
|
||||
*/
|
||||
DEPRECATED rsplit1 54
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
DBT pgdbt DBT s
|
||||
ARG nrec db_pgno_t lu
|
||||
DBT rootent DBT s
|
||||
POINTER rootlsn DB_LSN * lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-rsplit: used to log a reverse-split
|
||||
*
|
||||
* pgno: the page number of the page copied over the root.
|
||||
* pgdbt: the page being copied on the root page.
|
||||
* root_pgno: the root page number.
|
||||
* nrec: the tree's record count.
|
||||
* rootent: last entry on the root page.
|
||||
* rootlsn: the root page's original lsn.
|
||||
*/
|
||||
BEGIN rsplit 63
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
DBT pgdbt DBT s
|
||||
ARG root_pgno db_pgno_t lu
|
||||
ARG nrec db_pgno_t lu
|
||||
DBT rootent DBT s
|
||||
POINTER rootlsn DB_LSN * lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-adj: used to log the adjustment of an index.
|
||||
*
|
||||
* pgno: the page modified.
|
||||
* lsn: the page's original lsn.
|
||||
* indx: the index adjusted.
|
||||
* indx_copy: the index to copy if inserting.
|
||||
* is_insert: 0 if a delete, 1 if an insert.
|
||||
*/
|
||||
BEGIN adj 55
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
POINTER lsn DB_LSN * lu
|
||||
ARG indx u_int32_t lu
|
||||
ARG indx_copy u_int32_t lu
|
||||
ARG is_insert u_int32_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-cadjust: used to adjust the count change in an internal page.
|
||||
*
|
||||
* pgno: the page modified.
|
||||
* lsn: the page's original lsn.
|
||||
* indx: the index to be adjusted.
|
||||
* adjust: the signed adjustment.
|
||||
* opflags: CAD_UPDATEROOT: if root page count was adjusted.
|
||||
*/
|
||||
BEGIN cadjust 56
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
POINTER lsn DB_LSN * lu
|
||||
ARG indx u_int32_t lu
|
||||
ARG adjust int32_t ld
|
||||
ARG opflags u_int32_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-cdel: used to log the intent-to-delete of a cursor record.
|
||||
*
|
||||
* pgno: the page modified.
|
||||
* lsn: the page's original lsn.
|
||||
* indx: the index to be deleted.
|
||||
*/
|
||||
BEGIN cdel 57
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
POINTER lsn DB_LSN * lu
|
||||
ARG indx u_int32_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-repl: used to log the replacement of an item.
|
||||
*
|
||||
* pgno: the page modified.
|
||||
* lsn: the page's original lsn.
|
||||
* orig: the original data.
|
||||
* new: the replacement data.
|
||||
* duplicate: the prefix of the replacement that matches the original.
|
||||
*/
|
||||
BEGIN repl 58
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t lu
|
||||
POINTER lsn DB_LSN * lu
|
||||
ARG indx u_int32_t lu
|
||||
ARG isdeleted u_int32_t lu
|
||||
DBT orig DBT s
|
||||
DBT repl DBT s
|
||||
ARG prefix u_int32_t lu
|
||||
ARG suffix u_int32_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-root: log the assignment of a root btree page.
|
||||
*/
|
||||
BEGIN root 59
|
||||
ARG fileid int32_t ld
|
||||
ARG meta_pgno db_pgno_t lu
|
||||
ARG root_pgno db_pgno_t lu
|
||||
POINTER meta_lsn DB_LSN * lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-curadj: undo cursor adjustments on txn abort.
|
||||
* Should only be processed during DB_TXN_ABORT.
|
||||
* NOTE: the first_indx field gets used to hold
|
||||
* signed index adjustment in one case.
|
||||
* care should be taken if its size is changed.
|
||||
*/
|
||||
BEGIN curadj 64
|
||||
/* Fileid of db affected. */
|
||||
ARG fileid int32_t ld
|
||||
/* Which adjustment. */
|
||||
ARG mode db_ca_mode ld
|
||||
/* Page entry is from. */
|
||||
ARG from_pgno db_pgno_t lu
|
||||
/* Page entry went to. */
|
||||
ARG to_pgno db_pgno_t lu
|
||||
/* Left page of root split. */
|
||||
ARG left_pgno db_pgno_t lu
|
||||
/* First index of dup set. Also used as adjustment. */
|
||||
ARG first_indx u_int32_t lu
|
||||
/* Index entry is from. */
|
||||
ARG from_indx u_int32_t lu
|
||||
/* Index where entry went. */
|
||||
ARG to_indx u_int32_t lu
|
||||
END
|
||||
|
||||
/*
|
||||
* BTREE-rcuradj: undo cursor adjustments on txn abort in
|
||||
* renumbering recno trees.
|
||||
* Should only be processed during DB_TXN_ABORT.
|
||||
*/
|
||||
BEGIN rcuradj 65
|
||||
/* Fileid of db affected. */
|
||||
ARG fileid int32_t ld
|
||||
/* Which adjustment. */
|
||||
ARG mode ca_recno_arg ld
|
||||
/* Root page number. */
|
||||
ARG root db_pgno_t ld
|
||||
/* Recno of the adjustment. */
|
||||
ARG recno db_recno_t ld
|
||||
/* Order number of the adjustment. */
|
||||
ARG order u_int32_t ld
|
||||
END
|
||||
2284
bdb/btree/btree_auto.c
Normal file
2284
bdb/btree/btree_auto.c
Normal file
File diff suppressed because it is too large
Load Diff
3
bdb/build_unix/.IGNORE_ME
Normal file
3
bdb/build_unix/.IGNORE_ME
Normal file
@@ -0,0 +1,3 @@
|
||||
Some combinations of the gzip and tar archive exploders found
|
||||
on Linux systems ignore directories that don't have any files
|
||||
(other than symbolic links) in them. So, here's a file.
|
||||
6066
bdb/build_vxworks/BerkeleyDB.wpj
Normal file
6066
bdb/build_vxworks/BerkeleyDB.wpj
Normal file
File diff suppressed because it is too large
Load Diff
24
bdb/build_vxworks/BerkeleyDB.wsp
Normal file
24
bdb/build_vxworks/BerkeleyDB.wsp
Normal file
@@ -0,0 +1,24 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
Workspace
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> projectList
|
||||
$(PRJ_DIR)/BerkeleyDB.wpj \
|
||||
$(PRJ_DIR)/ex_access/ex_access.wpj \
|
||||
$(PRJ_DIR)/ex_btrec/ex_btrec.wpj \
|
||||
$(PRJ_DIR)/ex_env/ex_env.wpj \
|
||||
$(PRJ_DIR)/ex_mpool/ex_mpool.wpj \
|
||||
$(PRJ_DIR)/ex_tpcb/ex_tpcb.wpj \
|
||||
$(PRJ_DIR)/ex_dbclient/ex_dbclient.wpj
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
|
||||
<END>
|
||||
|
||||
264
bdb/build_vxworks/db_config.h
Normal file
264
bdb/build_vxworks/db_config.h
Normal file
@@ -0,0 +1,264 @@
|
||||
/*
|
||||
* $Id: db_config.h,v 1.4 2000/12/12 18:39:26 bostic Exp $
|
||||
*/
|
||||
|
||||
/* Define if building VxWorks */
|
||||
#define HAVE_VXWORKS 1
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
#define HAVE_ST_BLKSIZE 1
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* #undef TIME_WITH_SYS_TIME */
|
||||
|
||||
/* !!!
|
||||
* WORDS_BIGENDIAN is the ONLY option in this file that may be edited
|
||||
* for VxWorks.
|
||||
*
|
||||
* The user must set this according to VxWork's target arch. We use an
|
||||
* x86 (little-endian) target.
|
||||
*/
|
||||
/* Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* !!!
|
||||
* The CONFIG_TEST option may be added using the Tornado project build.
|
||||
* DO NOT modify it here.
|
||||
*/
|
||||
/* Define if you are building a version for running the test suite. */
|
||||
/* #undef CONFIG_TEST */
|
||||
|
||||
/* !!!
|
||||
* The DEBUG option may be added using the Tornado project build.
|
||||
* DO NOT modify it here.
|
||||
*/
|
||||
/* Define if you want a debugging version. */
|
||||
/* #undef DEBUG */
|
||||
|
||||
/* Define if you want a version that logs read operations. */
|
||||
/* #undef DEBUG_ROP */
|
||||
|
||||
/* Define if you want a version that logs write operations. */
|
||||
/* #undef DEBUG_WOP */
|
||||
|
||||
/* !!!
|
||||
* The DIAGNOSTIC option may be added using the Tornado project build.
|
||||
* DO NOT modify it here.
|
||||
*/
|
||||
/* Define if you want a version with run-time diagnostic checking. */
|
||||
/* #undef DIAGNOSTIC */
|
||||
|
||||
/* Define if you want to mask harmless unitialized memory read/writes. */
|
||||
/* #undef UMRW */
|
||||
|
||||
/* Define if fcntl/F_SETFD denies child access to file descriptors. */
|
||||
/* #undef HAVE_FCNTL_F_SETFD */
|
||||
|
||||
/* Define if building big-file environment (e.g., AIX, HP/UX, Solaris). */
|
||||
/* #undef HAVE_FILE_OFFSET_BITS */
|
||||
|
||||
/* Mutex possibilities. */
|
||||
/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */
|
||||
/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */
|
||||
/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_MACOS */
|
||||
/* #undef HAVE_MUTEX_MSEM_INIT */
|
||||
/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_PTHREADS */
|
||||
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
|
||||
/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_SEMA_INIT */
|
||||
/* #undef HAVE_MUTEX_SGI_INIT_LOCK */
|
||||
/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */
|
||||
/* #undef HAVE_MUTEX_SOLARIS_LWP */
|
||||
/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */
|
||||
#define HAVE_MUTEX_THREADS 1
|
||||
/* #undef HAVE_MUTEX_UI_THREADS */
|
||||
/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_VMS */
|
||||
#define HAVE_MUTEX_VXWORKS 1
|
||||
/* #undef HAVE_MUTEX_WIN16 */
|
||||
/* #undef HAVE_MUTEX_WIN32 */
|
||||
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
|
||||
|
||||
/* Define if building on QNX. */
|
||||
/* #undef HAVE_QNX */
|
||||
|
||||
/* !!!
|
||||
* The HAVE_RPC option may be added using the Tornado project build.
|
||||
* DO NOT modify it here.
|
||||
*/
|
||||
/* Define if building RPC client/server. */
|
||||
/* #undef HAVE_RPC */
|
||||
|
||||
/* Define if your sprintf returns a pointer, not a length. */
|
||||
/* #undef SPRINTF_RET_CHARPNT */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getopt function. */
|
||||
/* #undef HAVE_GETOPT */
|
||||
|
||||
/* Define if you have the getuid function. */
|
||||
/* #undef HAVE_GETUID */
|
||||
|
||||
/* Define if you have the memcmp function. */
|
||||
#define HAVE_MEMCMP 1
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define if you have the mlock function. */
|
||||
#define HAVE_MLOCK 1
|
||||
|
||||
/* Define if you have the mmap function. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if you have the munlock function. */
|
||||
#define HAVE_MUNLOCK 1
|
||||
|
||||
/* Define if you have the munmap function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* Define if you have the pread function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define if you have the pstat_getdynamic function. */
|
||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||
|
||||
/* Define if you have the pwrite function. */
|
||||
/* #undef HAVE_PWRITE */
|
||||
|
||||
/* Define if you have the qsort function. */
|
||||
#define HAVE_QSORT 1
|
||||
|
||||
/* Define if you have the raise function. */
|
||||
#define HAVE_RAISE 1
|
||||
|
||||
/* Define if you have the sched_yield function. */
|
||||
#define HAVE_SCHED_YIELD 1
|
||||
|
||||
/* Define if you have the select function. */
|
||||
#define HAVE_SELECT 1
|
||||
|
||||
/* Define if you have the shmget function. */
|
||||
/* #undef HAVE_SHMGET */
|
||||
|
||||
/* Define if you have the snprintf function. */
|
||||
/* #undef HAVE_SNPRINTF */
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strtoul function. */
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
/* Define if you have the sysconf function. */
|
||||
/* #undef HAVE_SYSCONF */
|
||||
|
||||
/* Define if you have the vsnprintf function. */
|
||||
/* #undef HAVE_VSNPRINTF */
|
||||
|
||||
/* Define if you have the yield function. */
|
||||
/* #undef HAVE_YIELD */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
#define HAVE_DIRENT_H 1
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define if you have the nsl library (-lnsl). */
|
||||
/* #undef HAVE_LIBNSL */
|
||||
|
||||
/*
|
||||
* !!!
|
||||
* The following is not part of the automatic configuration setup, but
|
||||
* provides necessary VxWorks information.
|
||||
*/
|
||||
#include "vxWorks.h"
|
||||
|
||||
/*
|
||||
* VxWorks does not have getpid().
|
||||
*/
|
||||
#define getpid() taskIdSelf()
|
||||
|
||||
/*
|
||||
* Don't step on the namespace. Other libraries may have their own
|
||||
* implementations of these functions, we don't want to use their
|
||||
* implementations or force them to use ours based on the load order.
|
||||
*/
|
||||
#ifndef HAVE_GETCWD
|
||||
#define getcwd __db_Cgetcwd
|
||||
#endif
|
||||
#ifndef HAVE_GETOPT
|
||||
#define getopt __db_Cgetopt
|
||||
#endif
|
||||
#ifndef HAVE_MEMCMP
|
||||
#define memcmp __db_Cmemcmp
|
||||
#endif
|
||||
#ifndef HAVE_MEMCPY
|
||||
#define memcpy __db_Cmemcpy
|
||||
#endif
|
||||
#ifndef HAVE_MEMMOVE
|
||||
#define memmove __db_Cmemmove
|
||||
#endif
|
||||
#ifndef HAVE_RAISE
|
||||
#define raise __db_Craise
|
||||
#endif
|
||||
#ifndef HAVE_SNPRINTF
|
||||
#define snprintf __db_Csnprintf
|
||||
#endif
|
||||
#ifndef HAVE_STRCASECMP
|
||||
#define strcasecmp __db_Cstrcasecmp
|
||||
#endif
|
||||
#ifndef HAVE_STRERROR
|
||||
#define strerror __db_Cstrerror
|
||||
#endif
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
#define vsnprintf __db_Cvsnprintf
|
||||
#endif
|
||||
398
bdb/build_vxworks/db_int.h
Normal file
398
bdb/build_vxworks/db_int.h
Normal file
@@ -0,0 +1,398 @@
|
||||
/* DO NOT EDIT: automatically built by dist/s_vxworks. */
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* $Id: db_int.src,v 11.42 2001/01/11 17:49:17 krinsky Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DB_INTERNAL_H_
|
||||
#define _DB_INTERNAL_H_
|
||||
|
||||
/*******************************************************
|
||||
* General includes.
|
||||
*******************************************************/
|
||||
#include "db.h"
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "queue.h"
|
||||
#include "shqueue.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*******************************************************
|
||||
* General purpose constants and macros.
|
||||
*******************************************************/
|
||||
#define UINT16_T_MAX 0xffff /* Maximum 16 bit unsigned. */
|
||||
#define UINT32_T_MAX 0xffffffff /* Maximum 32 bit unsigned. */
|
||||
|
||||
#define MEGABYTE 1048576
|
||||
#define GIGABYTE 1073741824
|
||||
|
||||
#define MS_PER_SEC 1000 /* Milliseconds in a second. */
|
||||
#define USEC_PER_MS 1000 /* Microseconds in a millisecond. */
|
||||
|
||||
#define DB_MIN_PGSIZE 0x000200 /* Minimum page size (512). */
|
||||
#define DB_MAX_PGSIZE 0x010000 /* Maximum page size (65536). */
|
||||
|
||||
#define RECNO_OOB 0 /* Illegal record number. */
|
||||
|
||||
/*
|
||||
* If we are unable to determine the underlying filesystem block size, use
|
||||
* 8K on the grounds that most OS's use less than 8K for a VM page size.
|
||||
*/
|
||||
#define DB_DEF_IOSIZE (8 * 1024)
|
||||
|
||||
/*
|
||||
* Aligning items to particular sizes or in pages or memory.
|
||||
*
|
||||
* db_align_t --
|
||||
* Largest integral type, used to align structures in memory. We don't store
|
||||
* floating point types in structures, so integral types should be sufficient
|
||||
* (and we don't have to worry about systems that store floats in other than
|
||||
* power-of-2 numbers of bytes). Additionally this fixes compiler that rewrite
|
||||
* structure assignments and ANSI C memcpy calls to be in-line instructions
|
||||
* that happen to require alignment. Note: this alignment isn't sufficient for
|
||||
* mutexes, which depend on things like cache line alignment. Mutex alignment
|
||||
* is handled separately, in mutex.h.
|
||||
*
|
||||
* db_alignp_t --
|
||||
* Integral type that's the same size as a pointer. There are places where
|
||||
* DB modifies pointers by discarding the bottom bits to guarantee alignment.
|
||||
* We can't use db_align_t, it may be larger than the pointer, and compilers
|
||||
* get upset about that. So far we haven't run on any machine where there
|
||||
* isn't an integral type the same size as a pointer -- here's hoping.
|
||||
*/
|
||||
typedef unsigned long db_align_t;
|
||||
typedef unsigned long db_alignp_t;
|
||||
|
||||
/* Align an integer to a specific boundary. */
|
||||
#undef ALIGN
|
||||
#define ALIGN(value, bound) \
|
||||
(((value) + (bound) - 1) & ~(((u_int)bound) - 1))
|
||||
|
||||
/* Align a pointer to a specific boundary. */
|
||||
#undef ALIGNP
|
||||
#define ALIGNP(value, bound) ALIGN((db_alignp_t)value, bound)
|
||||
|
||||
/*
|
||||
* There are several on-page structures that are declared to have a number of
|
||||
* fields followed by a variable length array of items. The structure size
|
||||
* without including the variable length array or the address of the first of
|
||||
* those elements can be found using SSZ.
|
||||
*
|
||||
* This macro can also be used to find the offset of a structure element in a
|
||||
* structure. This is used in various places to copy structure elements from
|
||||
* unaligned memory references, e.g., pointers into a packed page.
|
||||
*
|
||||
* There are two versions because compilers object if you take the address of
|
||||
* an array.
|
||||
*/
|
||||
#undef SSZ
|
||||
#define SSZ(name, field) ((int)&(((name *)0)->field))
|
||||
|
||||
#undef SSZA
|
||||
#define SSZA(name, field) ((int)&(((name *)0)->field[0]))
|
||||
|
||||
/*
|
||||
* Print an address as a u_long (a u_long is the largest type we can print
|
||||
* portably). Most 64-bit systems have made longs 64-bits, so this should
|
||||
* work.
|
||||
*/
|
||||
#define P_TO_ULONG(p) ((u_long)(db_alignp_t)(p))
|
||||
|
||||
/* Structure used to print flag values. */
|
||||
typedef struct __fn {
|
||||
u_int32_t mask; /* Flag value. */
|
||||
const char *name; /* Flag name. */
|
||||
} FN;
|
||||
|
||||
/* Set, clear and test flags. */
|
||||
#define FLD_CLR(fld, f) (fld) &= ~(f)
|
||||
#define FLD_ISSET(fld, f) ((fld) & (f))
|
||||
#define FLD_SET(fld, f) (fld) |= (f)
|
||||
#define F_CLR(p, f) (p)->flags &= ~(f)
|
||||
#define F_ISSET(p, f) ((p)->flags & (f))
|
||||
#define F_SET(p, f) (p)->flags |= (f)
|
||||
#define LF_CLR(f) (flags &= ~(f))
|
||||
#define LF_ISSET(f) (flags & (f))
|
||||
#define LF_SET(f) (flags |= (f))
|
||||
|
||||
/* Display separator string. */
|
||||
#undef DB_LINE
|
||||
#define DB_LINE "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
|
||||
|
||||
/* Unused, or not-used-yet variable. "Shut that bloody compiler up!" */
|
||||
#define COMPQUIET(n, v) (n) = (v)
|
||||
|
||||
/*******************************************************
|
||||
* Files.
|
||||
*******************************************************/
|
||||
/*
|
||||
* We use 1024 as the maximum path length. It's too hard to figure out what
|
||||
* the real path length is, as it was traditionally stored in <sys/param.h>,
|
||||
* and that file isn't always available.
|
||||
*/
|
||||
#undef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
|
||||
#define PATH_DOT "." /* Current working directory. */
|
||||
#define PATH_SEPARATOR "/\\" /* Path separator character. */
|
||||
|
||||
/*
|
||||
* Flags understood by __os_open.
|
||||
*/
|
||||
#define DB_OSO_CREATE 0x001 /* POSIX: O_CREAT */
|
||||
#define DB_OSO_EXCL 0x002 /* POSIX: O_EXCL */
|
||||
#define DB_OSO_LOG 0x004 /* Opening a log file. */
|
||||
#define DB_OSO_RDONLY 0x008 /* POSIX: O_RDONLY */
|
||||
#define DB_OSO_REGION 0x010 /* Opening a region file. */
|
||||
#define DB_OSO_SEQ 0x020 /* Expected sequential access. */
|
||||
#define DB_OSO_TEMP 0x040 /* Remove after last close. */
|
||||
#define DB_OSO_TRUNC 0x080 /* POSIX: O_TRUNC */
|
||||
|
||||
/*
|
||||
* Seek options understood by __os_seek.
|
||||
*/
|
||||
typedef enum {
|
||||
DB_OS_SEEK_CUR, /* POSIX: SEEK_CUR */
|
||||
DB_OS_SEEK_END, /* POSIX: SEEK_END */
|
||||
DB_OS_SEEK_SET /* POSIX: SEEK_SET */
|
||||
} DB_OS_SEEK;
|
||||
|
||||
/*******************************************************
|
||||
* Environment.
|
||||
*******************************************************/
|
||||
/* Type passed to __db_appname(). */
|
||||
typedef enum {
|
||||
DB_APP_NONE=0, /* No type (region). */
|
||||
DB_APP_DATA, /* Data file. */
|
||||
DB_APP_LOG, /* Log file. */
|
||||
DB_APP_TMP /* Temporary file. */
|
||||
} APPNAME;
|
||||
|
||||
/*
|
||||
* CDB_LOCKING CDB product locking.
|
||||
* LOCKING_ON Locking has been configured.
|
||||
* LOGGING_ON Logging has been configured.
|
||||
* MPOOL_ON Memory pool has been configured.
|
||||
* TXN_ON Transactions have been configured.
|
||||
*/
|
||||
#define CDB_LOCKING(dbenv) F_ISSET(dbenv, DB_ENV_CDB)
|
||||
#define LOCKING_ON(dbenv) ((dbenv)->lk_handle != NULL)
|
||||
#define LOGGING_ON(dbenv) ((dbenv)->lg_handle != NULL)
|
||||
#define MPOOL_ON(dbenv) ((dbenv)->mp_handle != NULL)
|
||||
#define TXN_ON(dbenv) ((dbenv)->tx_handle != NULL)
|
||||
|
||||
/*
|
||||
* STD_LOCKING Standard locking, that is, locking was configured and CDB
|
||||
* was not. We do not do locking in off-page duplicate trees,
|
||||
* so we check for that in the cursor first.
|
||||
*/
|
||||
#define STD_LOCKING(dbc) \
|
||||
(!F_ISSET(dbc, DBC_OPD) && \
|
||||
!CDB_LOCKING((dbc)->dbp->dbenv) && LOCKING_ON((dbc)->dbp->dbenv))
|
||||
|
||||
/*
|
||||
* IS_RECOVERING The system is running recovery.
|
||||
*/
|
||||
#define IS_RECOVERING(dbenv) \
|
||||
(LOGGING_ON(dbenv) && \
|
||||
F_ISSET((DB_LOG *)(dbenv)->lg_handle, DBLOG_RECOVER))
|
||||
|
||||
/* Most initialization methods cannot be called after open is called. */
|
||||
#define ENV_ILLEGAL_AFTER_OPEN(dbenv, name) \
|
||||
if (F_ISSET((dbenv), DB_ENV_OPEN_CALLED)) \
|
||||
return (__db_mi_open(dbenv, name, 1));
|
||||
|
||||
/* We're not actually user hostile, honest. */
|
||||
#define ENV_REQUIRES_CONFIG(dbenv, handle, subsystem) \
|
||||
if (handle == NULL) \
|
||||
return (__db_env_config(dbenv, subsystem));
|
||||
|
||||
/*******************************************************
|
||||
* Database Access Methods.
|
||||
*******************************************************/
|
||||
/*
|
||||
* DB_IS_THREADED --
|
||||
* The database handle is free-threaded (was opened with DB_THREAD).
|
||||
*/
|
||||
#define DB_IS_THREADED(dbp) \
|
||||
((dbp)->mutexp != NULL)
|
||||
|
||||
/* Initialization methods are often illegal before/after open is called. */
|
||||
#define DB_ILLEGAL_AFTER_OPEN(dbp, name) \
|
||||
if (F_ISSET((dbp), DB_OPEN_CALLED)) \
|
||||
return (__db_mi_open(dbp->dbenv, name, 1));
|
||||
#define DB_ILLEGAL_BEFORE_OPEN(dbp, name) \
|
||||
if (!F_ISSET((dbp), DB_OPEN_CALLED)) \
|
||||
return (__db_mi_open(dbp->dbenv, name, 0));
|
||||
/* Some initialization methods are illegal if environment isn't local. */
|
||||
#define DB_ILLEGAL_IN_ENV(dbp, name) \
|
||||
if (!F_ISSET(dbp->dbenv, DB_ENV_DBLOCAL)) \
|
||||
return (__db_mi_env(dbp->dbenv, name));
|
||||
#define DB_ILLEGAL_METHOD(dbp, flags) { \
|
||||
int __ret; \
|
||||
if ((__ret = __dbh_am_chk(dbp, flags)) != 0) \
|
||||
return (__ret); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Common DBC->internal fields. Each access method adds additional fields
|
||||
* to this list, but the initial fields are common.
|
||||
*/
|
||||
#define __DBC_INTERNAL \
|
||||
DBC *opd; /* Off-page duplicate cursor. */\
|
||||
\
|
||||
void *page; /* Referenced page. */ \
|
||||
db_pgno_t root; /* Tree root. */ \
|
||||
db_pgno_t pgno; /* Referenced page number. */ \
|
||||
db_indx_t indx; /* Referenced key item index. */\
|
||||
\
|
||||
DB_LOCK lock; /* Cursor lock. */ \
|
||||
db_lockmode_t lock_mode; /* Lock mode. */
|
||||
|
||||
struct __dbc_internal {
|
||||
__DBC_INTERNAL
|
||||
};
|
||||
|
||||
/*
|
||||
* Access-method-common macro for determining whether a cursor
|
||||
* has been initialized.
|
||||
*/
|
||||
#define IS_INITIALIZED(dbc) ((dbc)->internal->pgno != PGNO_INVALID)
|
||||
|
||||
/*******************************************************
|
||||
* Mpool.
|
||||
*******************************************************/
|
||||
/*
|
||||
* File types for DB access methods. Negative numbers are reserved to DB.
|
||||
*/
|
||||
#define DB_FTYPE_SET -1 /* Call pgin/pgout functions. */
|
||||
#define DB_FTYPE_NOTSET 0 /* Don't call... */
|
||||
|
||||
/* Structure used as the DB pgin/pgout pgcookie. */
|
||||
typedef struct __dbpginfo {
|
||||
size_t db_pagesize; /* Underlying page size. */
|
||||
int needswap; /* If swapping required. */
|
||||
} DB_PGINFO;
|
||||
|
||||
/*******************************************************
|
||||
* Log.
|
||||
*******************************************************/
|
||||
/* Initialize an LSN to 'zero'. */
|
||||
#define ZERO_LSN(LSN) do { \
|
||||
(LSN).file = 0; \
|
||||
(LSN).offset = 0; \
|
||||
} while (0)
|
||||
|
||||
/* Return 1 if LSN is a 'zero' lsn, otherwise return 0. */
|
||||
#define IS_ZERO_LSN(LSN) ((LSN).file == 0)
|
||||
|
||||
/* Test if we need to log a change. */
|
||||
#define DB_LOGGING(dbc) \
|
||||
(LOGGING_ON((dbc)->dbp->dbenv) && !F_ISSET(dbc, DBC_RECOVER))
|
||||
|
||||
/* Internal flag for use with internal __log_unregister. */
|
||||
#define DB_LOGONLY 0x01
|
||||
/*******************************************************
|
||||
* Txn.
|
||||
*******************************************************/
|
||||
#define DB_NONBLOCK(C) ((C)->txn != NULL && F_ISSET((C)->txn, TXN_NOWAIT))
|
||||
#define IS_SUBTRANSACTION(txn) \
|
||||
((txn) != NULL && (txn)->parent != NULL)
|
||||
|
||||
/*******************************************************
|
||||
* Global variables.
|
||||
*******************************************************/
|
||||
#ifdef HAVE_VXWORKS
|
||||
#include "semLib.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DB global variables. Done in a single structure to minimize the name-space
|
||||
* pollution.
|
||||
*/
|
||||
typedef struct __db_globals {
|
||||
u_int32_t db_pageyield; /* db_set_pageyield */
|
||||
u_int32_t db_panic; /* db_set_panic */
|
||||
u_int32_t db_region_init; /* db_set_region_init */
|
||||
u_int32_t db_tas_spins; /* db_set_tas_spins */
|
||||
#ifdef HAVE_VXWORKS
|
||||
u_int32_t db_global_init; /* VxWorks: inited */
|
||||
SEM_ID db_global_lock; /* VxWorks: global semaphore */
|
||||
#endif
|
||||
/* XA: list of opened environments. */
|
||||
TAILQ_HEAD(__db_envq, __db_env) db_envq;
|
||||
} DB_GLOBALS;
|
||||
|
||||
#ifdef DB_INITIALIZE_DB_GLOBALS
|
||||
DB_GLOBALS __db_global_values = {
|
||||
0, /* db_set_pageyield */
|
||||
1, /* db_set_panic */
|
||||
0, /* db_set_region_init */
|
||||
0, /* db_set_tas_spins */
|
||||
#ifdef HAVE_VXWORKS
|
||||
0, /* db_global_init */
|
||||
NULL, /* db_global_lock */
|
||||
#endif
|
||||
/* XA environment queue */
|
||||
{NULL, &__db_global_values.db_envq.tqh_first}
|
||||
};
|
||||
#else
|
||||
extern DB_GLOBALS __db_global_values;
|
||||
#endif
|
||||
#define DB_GLOBAL(v) __db_global_values.v
|
||||
|
||||
/* Forward structure declarations. */
|
||||
struct __db_reginfo_t; typedef struct __db_reginfo_t REGINFO;
|
||||
struct __mutex_t; typedef struct __mutex_t MUTEX;
|
||||
struct __vrfy_childinfo; typedef struct __vrfy_childinfo VRFY_CHILDINFO;
|
||||
struct __vrfy_dbinfo; typedef struct __vrfy_dbinfo VRFY_DBINFO;
|
||||
struct __vrfy_pageinfo; typedef struct __vrfy_pageinfo VRFY_PAGEINFO;
|
||||
struct __db_txnlist; typedef struct __db_txnlist DB_TXNLIST;
|
||||
struct __db_txnhead; typedef struct __db_txnhead DB_TXNHEAD;
|
||||
typedef enum {
|
||||
TXNLIST_DELETE,
|
||||
TXNLIST_LSN,
|
||||
TXNLIST_TXNID,
|
||||
TXNLIST_PGNO
|
||||
} db_txnlist_type;
|
||||
|
||||
/*
|
||||
* Currently, region offsets are limited to 32-bits. I expect that's going
|
||||
* to have to be fixed in the not-too-distant future, since we won't want to
|
||||
* split 100Gb memory pools into that many different regions. It's typedef'd
|
||||
* so it won't be too painful to upgrade.
|
||||
*/
|
||||
typedef u_int32_t roff_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************
|
||||
* More general includes.
|
||||
*******************************************************/
|
||||
#include "debug.h"
|
||||
#include "mutex.h"
|
||||
#include "region.h"
|
||||
#include "mutex_ext.h"
|
||||
#include "env_ext.h"
|
||||
#include "os.h"
|
||||
#include "os_ext.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
#endif /* !_DB_INTERNAL_H_ */
|
||||
244
bdb/build_vxworks/ex_access/ex_access.wpj
Normal file
244
bdb/build_vxworks/ex_access/ex_access.wpj
Normal file
@@ -0,0 +1,244 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
|
||||
ar386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/PENTIUMgnu/ex_access.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM \
|
||||
-I/export/home/db/build_vxworks
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
|
||||
cc386 -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
|
||||
ld386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
|
||||
-X -N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-X -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
|
||||
nm386 -g
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
|
||||
size386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_TC
|
||||
::tc_PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_archive
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_ex_access.out
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_objects
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_BUILDRULE
|
||||
ex_access.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AR
|
||||
arsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/SIMSPARCSOLARISgnu/ex_access.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AS
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CC
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CPP
|
||||
ccsimso -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDFLAGS
|
||||
-N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-nostdlib -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_NM
|
||||
nmsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_SIZE
|
||||
sizesimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_TC
|
||||
::tc_SIMSPARCSOLARISgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__CURRENT
|
||||
PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__LIST
|
||||
SIMSPARCSOLARISgnu PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
::prj_vxApp
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_access.c_dependDone
|
||||
TRUE
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_access.c_dependencies
|
||||
/export/home/db/build_vxworks/db_config.h /export/home/db/build_vxworks/db.h
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_access.c_objects
|
||||
ex_access.o
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_access.c_tool
|
||||
C/C++ compiler
|
||||
<END>
|
||||
|
||||
<BEGIN> PROJECT_FILES
|
||||
/export/home/db/examples_c/ex_access.c
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
ex_access
|
||||
<END>
|
||||
|
||||
250
bdb/build_vxworks/ex_btrec/ex_btrec.wpj
Normal file
250
bdb/build_vxworks/ex_btrec/ex_btrec.wpj
Normal file
@@ -0,0 +1,250 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
|
||||
ar386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/PENTIUMgnu/ex_btrec.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM \
|
||||
-I/export/home/db/build_vxworks
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
|
||||
cc386 -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
|
||||
ld386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
|
||||
-X -N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-X -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
|
||||
nm386 -g
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
|
||||
size386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_TC
|
||||
::tc_PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_archive
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_ex_btrec.out
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_objects
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_BUILDRULE
|
||||
ex_btrec.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AR
|
||||
arsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/SIMSPARCSOLARISgnu/ex_btrec.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AS
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CC
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I/export/home/db/include \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CPP
|
||||
ccsimso -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDDEPS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDFLAGS
|
||||
-N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-nostdlib -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_NM
|
||||
nmsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_SIZE
|
||||
sizesimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_TC
|
||||
::tc_SIMSPARCSOLARISgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__CURRENT
|
||||
PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__LIST
|
||||
SIMSPARCSOLARISgnu PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
::prj_vxApp
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_btrec.c_dependDone
|
||||
TRUE
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_btrec.c_dependencies
|
||||
/export/home/db/build_vxworks/db_config.h /export/home/db/build_vxworks/db.h
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_btrec.c_objects
|
||||
ex_btrec.o
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_btrec.c_tool
|
||||
C/C++ compiler
|
||||
<END>
|
||||
|
||||
<BEGIN> PROJECT_FILES
|
||||
/export/home/db/examples_c/ex_btrec.c
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
ex_btrec
|
||||
<END>
|
||||
|
||||
266
bdb/build_vxworks/ex_dbclient/ex_dbclient.wpj
Normal file
266
bdb/build_vxworks/ex_dbclient/ex_dbclient.wpj
Normal file
@@ -0,0 +1,266 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_BUILDRULE
|
||||
ex_dbclient.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
|
||||
ar386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/PENTIUMgnu/ex_dbclient.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I/export/home/db/include \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
|
||||
cc386 -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
|
||||
ld386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDDEPS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
|
||||
-X -N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-X -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
|
||||
nm386 -g
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
|
||||
size386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_TC
|
||||
::tc_PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_archive
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_ex_dbclient.out
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_objects
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_BUILDRULE
|
||||
ex_dbclient.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AR
|
||||
arsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/SIMSPARCSOLARISgnu/ex_dbclient.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AS
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CC
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I/export/home/db/include \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CPP
|
||||
ccsimso -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDDEPS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDFLAGS
|
||||
-N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-nostdlib -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_NM
|
||||
nmsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_SIZE
|
||||
sizesimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_TC
|
||||
::tc_SIMSPARCSOLARISgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__CURRENT
|
||||
PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__LIST
|
||||
SIMSPARCSOLARISgnu PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
::prj_vxApp
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_dbclient.c_dependDone
|
||||
TRUE
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_dbclient.c_dependencies
|
||||
/export/home/db/build_vxworks/db_config.h /export/home/db/build_vxworks/db.h
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_dbclient.c_objects
|
||||
ex_dbclient.o
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_dbclient.c_tool
|
||||
C/C++ compiler
|
||||
<END>
|
||||
|
||||
<BEGIN> PROJECT_FILES
|
||||
/export/home/db/examples_c/ex_dbclient.c
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
RPC Client example
|
||||
<END>
|
||||
|
||||
248
bdb/build_vxworks/ex_env/ex_env.wpj
Normal file
248
bdb/build_vxworks/ex_env/ex_env.wpj
Normal file
@@ -0,0 +1,248 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
|
||||
ar386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/PENTIUMgnu/ex_env.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM \
|
||||
-I/export/home/db/build_vxworks
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
|
||||
cc386 -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
|
||||
ld386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
|
||||
-X -N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-X -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
|
||||
nm386 -g
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
|
||||
size386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_TC
|
||||
::tc_PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_archive
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_ex_env.out
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_objects
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_BUILDRULE
|
||||
ex_env.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AR
|
||||
arsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/SIMSPARCSOLARISgnu/ex_env.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AS
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CC
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CPP
|
||||
ccsimso -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDDEPS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDFLAGS
|
||||
-N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-nostdlib -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_NM
|
||||
nmsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_SIZE
|
||||
sizesimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_TC
|
||||
::tc_SIMSPARCSOLARISgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__CURRENT
|
||||
PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__LIST
|
||||
SIMSPARCSOLARISgnu PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
::prj_vxApp
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_env.c_dependDone
|
||||
TRUE
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_env.c_dependencies
|
||||
/export/home/db/build_vxworks/db_config.h /export/home/db/build_vxworks/db.h
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_env.c_objects
|
||||
ex_env.o
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_env.c_tool
|
||||
C/C++ compiler
|
||||
<END>
|
||||
|
||||
<BEGIN> PROJECT_FILES
|
||||
/export/home/db/examples_c/ex_env.c
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
ex_env
|
||||
<END>
|
||||
|
||||
248
bdb/build_vxworks/ex_mpool/ex_mpool.wpj
Normal file
248
bdb/build_vxworks/ex_mpool/ex_mpool.wpj
Normal file
@@ -0,0 +1,248 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
|
||||
ar386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/PENTIUMgnu/ex_mpool.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM \
|
||||
-I/export/home/db/build_vxworks
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
|
||||
cc386 -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
|
||||
ld386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
|
||||
-X -N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-X -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
|
||||
nm386 -g
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
|
||||
size386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_TC
|
||||
::tc_PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_archive
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_ex_mpool.out
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_objects
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_BUILDRULE
|
||||
ex_mpool.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AR
|
||||
arsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/SIMSPARCSOLARISgnu/ex_mpool.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AS
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CC
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CPP
|
||||
ccsimso -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDDEPS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDFLAGS
|
||||
-N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-nostdlib -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_NM
|
||||
nmsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_SIZE
|
||||
sizesimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_TC
|
||||
::tc_SIMSPARCSOLARISgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__CURRENT
|
||||
PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__LIST
|
||||
SIMSPARCSOLARISgnu PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
::prj_vxApp
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_mpool.c_dependDone
|
||||
TRUE
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_mpool.c_dependencies
|
||||
/export/home/db/build_vxworks/db_config.h /export/home/db/build_vxworks/db.h
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_mpool.c_objects
|
||||
ex_mpool.o
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_mpool.c_tool
|
||||
C/C++ compiler
|
||||
<END>
|
||||
|
||||
<BEGIN> PROJECT_FILES
|
||||
/export/home/db/examples_c/ex_mpool.c
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
ex_mpool
|
||||
<END>
|
||||
|
||||
261
bdb/build_vxworks/ex_tpcb/ex_tpcb.wpj
Normal file
261
bdb/build_vxworks/ex_tpcb/ex_tpcb.wpj
Normal file
@@ -0,0 +1,261 @@
|
||||
Document file - DO NOT EDIT
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_BUILDRULE
|
||||
ex_tpcb.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AR
|
||||
ar386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/PENTIUMgnu/ex_tpcb.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_AS
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CC
|
||||
cc386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-DVERY_TINY
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-mpentium \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-nostdlib \
|
||||
-fno-builtin \
|
||||
-fno-defer-pop \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=PENTIUM
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_CPP
|
||||
cc386 -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD
|
||||
ld386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LDFLAGS
|
||||
-X -N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-X -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_NM
|
||||
nm386 -g
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_MACRO_SIZE
|
||||
size386
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_PENTIUMgnu_TC
|
||||
::tc_PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_archive
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_ex_tpcb.out
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_RULE_objects
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_BUILDRULE
|
||||
ex_tpcb.out
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AR
|
||||
arsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_ARCHIVE
|
||||
$(PRJ_DIR)/SIMSPARCSOLARISgnu/ex_tpcb.a
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_AS
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CC
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-DRW_MULTI_THREAD \
|
||||
-D_REENTRANT \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-I/export/home/db/build_vxworks \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CFLAGS_AS
|
||||
-g \
|
||||
-ansi \
|
||||
-nostdinc \
|
||||
-fvolatile \
|
||||
-fno-builtin \
|
||||
-P \
|
||||
-x \
|
||||
assembler-with-cpp \
|
||||
-I. \
|
||||
-I$(WIND_BASE)/target/h \
|
||||
-DCPU=SIMSPARCSOLARIS
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_CPP
|
||||
ccsimso -E -P -xc
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD
|
||||
ccsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDDEPS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LDFLAGS
|
||||
-N
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_LD_PARTIAL_FLAGS
|
||||
-nostdlib -r
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_NM
|
||||
nmsimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_DEFINE_MACRO
|
||||
-D
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_OPTION_INCLUDE_DIR
|
||||
-I
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_POST_BUILD_RULE
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_PRJ_LIBS
|
||||
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_MACRO_SIZE
|
||||
sizesimso
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_RO_DEPEND_PATH
|
||||
{$(WIND_BASE)/target/h/} \
|
||||
{$(WIND_BASE)/target/src/} \
|
||||
{$(WIND_BASE)/target/config/}
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD_SIMSPARCSOLARISgnu_TC
|
||||
::tc_SIMSPARCSOLARISgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__CURRENT
|
||||
PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> BUILD__LIST
|
||||
SIMSPARCSOLARISgnu PENTIUMgnu
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_TYPE
|
||||
::prj_vxApp
|
||||
<END>
|
||||
|
||||
<BEGIN> CORE_INFO_VERSION
|
||||
2.0
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_tpcb.c_dependDone
|
||||
TRUE
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_tpcb.c_dependencies
|
||||
/export/home/db/build_vxworks/db_config.h /export/home/db/build_vxworks/db.h
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_tpcb.c_objects
|
||||
ex_tpcb.o
|
||||
<END>
|
||||
|
||||
<BEGIN> FILE_/export/home/db/examples_c/ex_tpcb.c_tool
|
||||
C/C++ compiler
|
||||
<END>
|
||||
|
||||
<BEGIN> PROJECT_FILES
|
||||
/export/home/db/examples_c/ex_tpcb.c
|
||||
<END>
|
||||
|
||||
<BEGIN> userComments
|
||||
ex_tpcb
|
||||
<END>
|
||||
|
||||
569
bdb/build_win32/Berkeley_DB.dsw
Normal file
569
bdb/build_win32/Berkeley_DB.dsw
Normal file
@@ -0,0 +1,569 @@
|
||||
Microsoft Developer Studio Workspace File, Format Version 5.00
|
||||
# WARNING: DO NOT EDIT OR DELETE THIS WORKSPACE FILE!
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "DB_DLL"=.\db_dll.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "DB_Static"=.\db_static.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_archive"=.\db_archive.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_buildall"=.\db_buildall.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_archive
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_checkpoint
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_deadlock
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_dump
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_load
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_printlog
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_recover
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_stat
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_upgrade
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_verify
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ex_access
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ex_btrec
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ex_env
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ex_lock
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ex_mpool
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name ex_tpcb
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name excxx_access
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name excxx_btrec
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name excxx_env
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name excxx_lock
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name excxx_mpool
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name excxx_tpcb
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_checkpoint"=.\db_checkpoint.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_deadlock"=.\db_deadlock.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_dump"=.\db_dump.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_java"=.\db_java.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_load"=.\db_load.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_printlog"=.\db_printlog.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_recover"=.\db_recover.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_stat"=.\db_stat.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_tcl"=.\db_tcl.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_test"=.\db_test.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_buildall
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name db_tcl
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_upgrade"=.\db_upgrade.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "db_verify"=.\db_verify.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ex_access"=.\ex_access.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ex_btrec"=.\ex_btrec.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ex_env"=.\ex_env.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ex_lock"=.\ex_lock.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ex_mpool"=.\ex_mpool.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "ex_tpcb"=.\ex_tpcb.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "excxx_access"=.\excxx_access.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "excxx_btrec"=.\excxx_btrec.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "excxx_env"=.\excxx_env.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "excxx_lock"=.\excxx_lock.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "excxx_mpool"=.\excxx_mpool.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Project: "excxx_tpcb"=.\excxx_tpcb.dsp - Package Owner=<4>
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<4>
|
||||
{{{
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_DLL
|
||||
End Project Dependency
|
||||
Begin Project Dependency
|
||||
Project_Dep_Name DB_Static
|
||||
End Project Dependency
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
Global:
|
||||
|
||||
Package=<5>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
Package=<3>
|
||||
{{{
|
||||
}}}
|
||||
|
||||
###############################################################################
|
||||
|
||||
148
bdb/build_win32/app_dsp.src
Normal file
148
bdb/build_win32/app_dsp.src
Normal file
@@ -0,0 +1,148 @@
|
||||
# Microsoft Developer Studio Project File - Name="@project_name@" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=@project_name@ - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak" CFG="@project_name@ - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "@project_name@ - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "@project_name@ - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "@project_name@ - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "@project_name@ - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "@project_name@ - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "@project_name@ - Win32 Release"
|
||||
# Name "@project_name@ - Win32 Debug"
|
||||
# Name "@project_name@ - Win32 Release Static"
|
||||
# Name "@project_name@ - Win32 Debug Static"
|
||||
@SOURCE_FILES@
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_archive.dsp
Normal file
151
bdb/build_win32/db_archive.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_archive" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_archive - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_archive.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_archive.mak" CFG="db_archive - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_archive - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_archive - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_archive - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_archive - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_archive - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_archive - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_archive - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_archive - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_archive - Win32 Release"
|
||||
# Name "db_archive - Win32 Debug"
|
||||
# Name "db_archive - Win32 Release Static"
|
||||
# Name "db_archive - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_archive\db_archive.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
128
bdb/build_win32/db_buildall.dsp
Normal file
128
bdb/build_win32/db_buildall.dsp
Normal file
@@ -0,0 +1,128 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_buildall" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) External Target" 0x0106
|
||||
|
||||
CFG=db_buildall - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_buildall.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_buildall.mak" CFG="db_buildall - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_buildall - Win32 Release" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "db_buildall - Win32 Debug" (based on "Win32 (x86) External Target")
|
||||
!MESSAGE "db_buildall - Win32 Release Static" (based on\
|
||||
"Win32 (x86) External Target")
|
||||
!MESSAGE "db_buildall - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) External Target")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
|
||||
!IF "$(CFG)" == "db_buildall - Win32 Release"
|
||||
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Cmd_Line "NMAKE /f db_buildall.mak"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "db_buildall.exe"
|
||||
# PROP BASE Bsc_Name "db_buildall.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Cmd_Line "echo DB release version built."
|
||||
# PROP Rebuild_Opt ""
|
||||
# PROP Target_File "db_buildall.exe"
|
||||
# PROP Bsc_Name "db_buildall.bsc"
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_buildall - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Cmd_Line "NMAKE /f db_buildall.mak"
|
||||
# PROP BASE Rebuild_Opt "/a"
|
||||
# PROP BASE Target_File "db_buildall.exe"
|
||||
# PROP BASE Bsc_Name "db_buildall.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Cmd_Line "echo DB debug version built."
|
||||
# PROP Rebuild_Opt ""
|
||||
# PROP Target_File "db_buildall.exe"
|
||||
# PROP Bsc_Name "db_buildall.bsc"
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_buildall - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release_static"
|
||||
# PROP BASE Intermediate_Dir "Release_static"
|
||||
# PROP BASE Cmd_Line "echo DB release version built."
|
||||
# PROP BASE Rebuild_Opt ""
|
||||
# PROP BASE Target_File "db_buildall.exe"
|
||||
# PROP BASE Bsc_Name "db_buildall.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Cmd_Line "echo DB release version built."
|
||||
# PROP Rebuild_Opt ""
|
||||
# PROP Target_File "db_buildall.exe"
|
||||
# PROP Bsc_Name "db_buildall.bsc"
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_buildall - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug_static"
|
||||
# PROP BASE Intermediate_Dir "Debug_static"
|
||||
# PROP BASE Cmd_Line "echo DB debug version built."
|
||||
# PROP BASE Rebuild_Opt ""
|
||||
# PROP BASE Target_File "db_buildall.exe"
|
||||
# PROP BASE Bsc_Name "db_buildall.bsc"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Cmd_Line "echo DB debug version built."
|
||||
# PROP Rebuild_Opt ""
|
||||
# PROP Target_File "db_buildall.exe"
|
||||
# PROP Bsc_Name "db_buildall.bsc"
|
||||
# PROP Target_Dir ""
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_buildall - Win32 Release"
|
||||
# Name "db_buildall - Win32 Debug"
|
||||
# Name "db_buildall - Win32 Release Static"
|
||||
# Name "db_buildall - Win32 Debug Static"
|
||||
|
||||
!IF "$(CFG)" == "db_buildall - Win32 Release"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_buildall - Win32 Debug"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_buildall - Win32 Release Static"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_buildall - Win32 Debug Static"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_checkpoint.dsp
Normal file
151
bdb/build_win32/db_checkpoint.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_checkpoint" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_checkpoint - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_checkpoint.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_checkpoint.mak" CFG="db_checkpoint - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_checkpoint - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_checkpoint - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_checkpoint - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_checkpoint - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_checkpoint - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_checkpoint - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_checkpoint - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_checkpoint - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_checkpoint - Win32 Release"
|
||||
# Name "db_checkpoint - Win32 Debug"
|
||||
# Name "db_checkpoint - Win32 Release Static"
|
||||
# Name "db_checkpoint - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_checkpoint\db_checkpoint.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
275
bdb/build_win32/db_config.h
Normal file
275
bdb/build_win32/db_config.h
Normal file
@@ -0,0 +1,275 @@
|
||||
/*
|
||||
* $Id: db_config.h,v 11.24 2000/12/12 18:39:26 bostic Exp $
|
||||
*/
|
||||
|
||||
/* Define to empty if the keyword does not work. */
|
||||
/* #undef const */
|
||||
|
||||
/* Define if your struct stat has st_blksize. */
|
||||
/* #undef HAVE_ST_BLKSIZE */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef mode_t */
|
||||
|
||||
/* Define to `long' if <sys/types.h> doesn't define. */
|
||||
/* #undef off_t */
|
||||
|
||||
/* Define to `int' if <sys/types.h> doesn't define. */
|
||||
/* #undef pid_t */
|
||||
|
||||
/* Define to `unsigned' if <sys/types.h> doesn't define. */
|
||||
/* #undef size_t */
|
||||
|
||||
/* Define if the `S_IS*' macros in <sys/stat.h> do not work properly. */
|
||||
/* #undef STAT_MACROS_BROKEN */
|
||||
|
||||
/* Define if you have the ANSI C header files. */
|
||||
#define STDC_HEADERS 1
|
||||
|
||||
/* Define if you can safely include both <sys/time.h> and <time.h>. */
|
||||
/* #undef TIME_WITH_SYS_TIME */
|
||||
|
||||
/* Define if your processor stores words with the most significant
|
||||
byte first (like Motorola and SPARC, unlike Intel and VAX). */
|
||||
/* #undef WORDS_BIGENDIAN */
|
||||
|
||||
/* Define if you are building a version for running the test suite. */
|
||||
/* #undef CONFIG_TEST */
|
||||
|
||||
/* Define if you want a debugging version. */
|
||||
/* #undef DEBUG */
|
||||
#if defined(_DEBUG)
|
||||
#if !defined(DEBUG)
|
||||
#define DEBUG 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
/* Define if you want a version that logs read operations. */
|
||||
/* #undef DEBUG_ROP */
|
||||
|
||||
/* Define if you want a version that logs write operations. */
|
||||
/* #undef DEBUG_WOP */
|
||||
|
||||
/* Define if you want a version with run-time diagnostic checking. */
|
||||
/* #undef DIAGNOSTIC */
|
||||
|
||||
/* Define if you want to mask harmless unitialized memory read/writes. */
|
||||
/* #undef UMRW */
|
||||
|
||||
/* Define if fcntl/F_SETFD denies child access to file descriptors. */
|
||||
/* #undef HAVE_FCNTL_F_SETFD */
|
||||
|
||||
/* Define if building big-file environment (e.g., AIX, HP/UX, Solaris). */
|
||||
/* #undef HAVE_FILE_OFFSET_BITS */
|
||||
|
||||
/* Mutex possibilities. */
|
||||
/* #undef HAVE_MUTEX_68K_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_AIX_CHECK_LOCK */
|
||||
/* #undef HAVE_MUTEX_ALPHA_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_HPPA_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_HPPA_MSEM_INIT */
|
||||
/* #undef HAVE_MUTEX_IA64_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_MACOS */
|
||||
/* #undef HAVE_MUTEX_MSEM_INIT */
|
||||
/* #undef HAVE_MUTEX_PPC_GCC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_PTHREADS */
|
||||
/* #undef HAVE_MUTEX_RELIANTUNIX_INITSPIN */
|
||||
/* #undef HAVE_MUTEX_SCO_X86_CC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_SEMA_INIT */
|
||||
/* #undef HAVE_MUTEX_SGI_INIT_LOCK */
|
||||
/* #undef HAVE_MUTEX_SOLARIS_LOCK_TRY */
|
||||
/* #undef HAVE_MUTEX_SOLARIS_LWP */
|
||||
/* #undef HAVE_MUTEX_SPARC_GCC_ASSEMBLY */
|
||||
#define HAVE_MUTEX_THREADS 1
|
||||
/* #undef HAVE_MUTEX_UI_THREADS */
|
||||
/* #undef HAVE_MUTEX_UTS_CC_ASSEMBLY */
|
||||
/* #undef HAVE_MUTEX_VMS */
|
||||
/* #undef HAVE_MUTEX_VXWORKS */
|
||||
/* #undef HAVE_MUTEX_WIN16 */
|
||||
#define HAVE_MUTEX_WIN32 1
|
||||
/* #undef HAVE_MUTEX_X86_GCC_ASSEMBLY */
|
||||
|
||||
/* Define if building on QNX. */
|
||||
/* #undef HAVE_QNX */
|
||||
|
||||
/* Define if building RPC client/server. */
|
||||
/* #undef HAVE_RPC */
|
||||
|
||||
/* Define if your sprintf returns a pointer, not a length. */
|
||||
/* #undef SPRINTF_RET_CHARPNT */
|
||||
|
||||
/* Define if you have the getcwd function. */
|
||||
#define HAVE_GETCWD 1
|
||||
|
||||
/* Define if you have the getopt function. */
|
||||
/* #undef HAVE_GETOPT */
|
||||
|
||||
/* Define if you have the getuid function. */
|
||||
/* #undef HAVE_GETUID */
|
||||
|
||||
/* Define if you have the memcmp function. */
|
||||
#define HAVE_MEMCMP 1
|
||||
|
||||
/* Define if you have the memcpy function. */
|
||||
#define HAVE_MEMCPY 1
|
||||
|
||||
/* Define if you have the memmove function. */
|
||||
#define HAVE_MEMMOVE 1
|
||||
|
||||
/* Define if you have the mlock function. */
|
||||
/* #undef HAVE_MLOCK */
|
||||
|
||||
/* Define if you have the mmap function. */
|
||||
/* #undef HAVE_MMAP */
|
||||
|
||||
/* Define if you have the munlock function. */
|
||||
/* #undef HAVE_MUNLOCK */
|
||||
|
||||
/* Define if you have the munmap function. */
|
||||
/* #undef HAVE_MUNMAP */
|
||||
|
||||
/* Define if you have the pread function. */
|
||||
/* #undef HAVE_PREAD */
|
||||
|
||||
/* Define if you have the pstat_getdynamic function. */
|
||||
/* #undef HAVE_PSTAT_GETDYNAMIC */
|
||||
|
||||
/* Define if you have the pwrite function. */
|
||||
/* #undef HAVE_PWRITE */
|
||||
|
||||
/* Define if you have the qsort function. */
|
||||
#define HAVE_QSORT 1
|
||||
|
||||
/* Define if you have the raise function. */
|
||||
#define HAVE_RAISE 1
|
||||
|
||||
/* Define if you have the sched_yield function. */
|
||||
/* #undef HAVE_SCHED_YIELD */
|
||||
|
||||
/* Define if you have the select function. */
|
||||
/* #undef HAVE_SELECT */
|
||||
|
||||
/* Define if you have the shmget function. */
|
||||
/* #undef HAVE_SHMGET */
|
||||
|
||||
/* Define if you have the snprintf function. */
|
||||
#define HAVE_SNPRINTF 1
|
||||
|
||||
/* Define if you have the strcasecmp function. */
|
||||
/* #undef HAVE_STRCASECMP */
|
||||
|
||||
/* Define if you have the strerror function. */
|
||||
#define HAVE_STRERROR 1
|
||||
|
||||
/* Define if you have the strtoul function. */
|
||||
#define HAVE_STRTOUL 1
|
||||
|
||||
/* Define if you have the sysconf function. */
|
||||
/* #undef HAVE_SYSCONF */
|
||||
|
||||
/* Define if you have the vsnprintf function. */
|
||||
#define HAVE_VSNPRINTF 1
|
||||
|
||||
/* Define if you have the yield function. */
|
||||
/* #undef HAVE_YIELD */
|
||||
|
||||
/* Define if you have the <dirent.h> header file. */
|
||||
/* #undef HAVE_DIRENT_H */
|
||||
|
||||
/* Define if you have the <ndir.h> header file. */
|
||||
/* #undef HAVE_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/dir.h> header file. */
|
||||
/* #undef HAVE_SYS_DIR_H */
|
||||
|
||||
/* Define if you have the <sys/ndir.h> header file. */
|
||||
/* #undef HAVE_SYS_NDIR_H */
|
||||
|
||||
/* Define if you have the <sys/select.h> header file. */
|
||||
/* #undef HAVE_SYS_SELECT_H */
|
||||
|
||||
/* Define if you have the <sys/time.h> header file. */
|
||||
/* #undef HAVE_SYS_TIME_H */
|
||||
|
||||
/* Define if you have the nsl library (-lnsl). */
|
||||
/* #undef HAVE_LIBNSL */
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* The following is not part of the automatic configuration setup,
|
||||
* but provides the information necessary to build DB on Windows.
|
||||
*/
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#include <direct.h>
|
||||
#include <fcntl.h>
|
||||
#include <io.h>
|
||||
#include <limits.h>
|
||||
#include <memory.h>
|
||||
#include <process.h>
|
||||
#include <signal.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <time.h>
|
||||
#include <errno.h>
|
||||
|
||||
#if defined(__cplusplus)
|
||||
#include <iostream.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* To build Tcl interface libraries, the include path must be configured to
|
||||
* use the directory containing <tcl.h>, usually the include directory in
|
||||
* the Tcl distribution.
|
||||
*/
|
||||
#ifdef DB_TCL_SUPPORT
|
||||
#include <tcl.h>
|
||||
#endif
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
/*
|
||||
* Win32 has fsync, getcwd, snprintf and vsnprintf, but under different names.
|
||||
*/
|
||||
#define fsync(fd) _commit(fd)
|
||||
#define getcwd(buf, size) _getcwd(buf, size)
|
||||
#define snprintf _snprintf
|
||||
#define vsnprintf _vsnprintf
|
||||
|
||||
/*
|
||||
* Win32 does not define getopt and friends in any header file, so we must.
|
||||
*/
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
extern int optind;
|
||||
extern char *optarg;
|
||||
extern int getopt(int, char * const *, const char *);
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
#define NO_SYSTEM_INCLUDES
|
||||
|
||||
/*
|
||||
* We use DB_WIN32 much as one would use _WIN32, to determine that we're
|
||||
* using an operating system environment that supports Win32 calls
|
||||
* and semantics. We don't use _WIN32 because cygwin/gcc also defines
|
||||
* that, even though it closely emulates the Unix environment.
|
||||
*/
|
||||
#define DB_WIN32 1
|
||||
|
||||
/*
|
||||
* This is a grievous hack -- once we've included windows.h, we have no choice
|
||||
* but to use ANSI-style varargs (because it pulls in stdarg.h for us). DB's
|
||||
* code decides which type of varargs to use based on the state of __STDC__.
|
||||
* Sensible. Unfortunately, Microsoft's compiler _doesn't_ define __STDC__
|
||||
* unless you invoke it with arguments turning OFF all vendor extensions. Even
|
||||
* more unfortunately, if we do that, it fails to parse windows.h!!!!! So, we
|
||||
* define __STDC__ here, after windows.h comes in. Note: the compiler knows
|
||||
* we've defined it, and starts enforcing strict ANSI compilance from this point
|
||||
* on.
|
||||
*/
|
||||
#define __STDC__ 1
|
||||
151
bdb/build_win32/db_deadlock.dsp
Normal file
151
bdb/build_win32/db_deadlock.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_deadlock" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_deadlock - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_deadlock.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_deadlock.mak" CFG="db_deadlock - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_deadlock - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_deadlock - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_deadlock - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_deadlock - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_deadlock - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_deadlock - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_deadlock - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_deadlock - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_deadlock - Win32 Release"
|
||||
# Name "db_deadlock - Win32 Debug"
|
||||
# Name "db_deadlock - Win32 Release Static"
|
||||
# Name "db_deadlock - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_deadlock\db_deadlock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
753
bdb/build_win32/db_dll.dsp
Normal file
753
bdb/build_win32/db_dll.dsp
Normal file
@@ -0,0 +1,753 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_dll" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=db_dll - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_dll.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_dll.mak" CFG="db_dll - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_dll - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "db_dll - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "db_dll - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "db_dll - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_dll - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_CREATE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb32.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_dll - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_CREATE_DLL" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb32d.dll" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_dll - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "DB_DLL__"
|
||||
# PROP BASE Intermediate_Dir "DB_DLL__"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_CREATE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_CREATE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb32.dll"
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb32.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_dll - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DB_DLL_0"
|
||||
# PROP BASE Intermediate_Dir "DB_DLL_0"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_CREATE_DLL" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /YX"config.h" /FD /c
|
||||
# SUBTRACT BASE CPP /Fr
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_CREATE_DLL" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb32d.dll" /fixed:no
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb32d.dll" /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_dll - Win32 Release"
|
||||
# Name "db_dll - Win32 Debug"
|
||||
# Name "db_dll - Win32 Release Static"
|
||||
# Name "db_dll - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_compare.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_curadj.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_cursor.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_delete.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_put.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_reclaim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_recno.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_rsearch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_search.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_split.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\btree_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dllmain.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libdb.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libdb.rc
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\strcasecmp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_byteorder.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_err.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_getlong.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_log2.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\util_log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\util_sig.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_app.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_except.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_lock.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_log.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_mpool.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_table.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_txn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\crdel_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\crdel_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_am.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_cam.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_dispatch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_dup.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_iface.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_join.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_meta.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_overflow.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_pr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_reclaim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_ret.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_upg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_upg_opd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_vrfy.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_vrfyutil.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dbm\dbm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\db_salloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\db_shash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_recover.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_dup.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_func.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_meta.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_page.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_reclaim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hsearch\hsearch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_conflict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_deadlock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_util.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_archive.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_compare.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_findckp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_get.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_put.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_register.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_bh.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fget.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fopen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fput.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fset.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_register.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_sync.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_trickle.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mutex\mut_tas.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mutex\mutex.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_fsync.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_handle.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_oflags.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_root.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_rpath.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_rw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_tmpdir.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_unlink.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_abs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_dir.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_errno.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_fid.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_finit.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_map.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_rename.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_seek.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_sleep.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_spin.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_type.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_files.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\xa\xa.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\xa\xa_db.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\xa\xa_map.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_dump.dsp
Normal file
151
bdb/build_win32/db_dump.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_dump" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_dump - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_dump.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_dump.mak" CFG="db_dump - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_dump - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_dump - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_dump - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_dump - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_dump - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_dump - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_dump - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_dump - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_dump - Win32 Release"
|
||||
# Name "db_dump - Win32 Debug"
|
||||
# Name "db_dump - Win32 Release Static"
|
||||
# Name "db_dump - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_dump\db_dump.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
398
bdb/build_win32/db_int.h
Normal file
398
bdb/build_win32/db_int.h
Normal file
@@ -0,0 +1,398 @@
|
||||
/* DO NOT EDIT: automatically built by dist/s_win32. */
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* $Id: db_int.src,v 11.42 2001/01/11 17:49:17 krinsky Exp $
|
||||
*/
|
||||
|
||||
#ifndef _DB_INTERNAL_H_
|
||||
#define _DB_INTERNAL_H_
|
||||
|
||||
/*******************************************************
|
||||
* General includes.
|
||||
*******************************************************/
|
||||
#include "db.h"
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#if defined(__STDC__) || defined(__cplusplus)
|
||||
#include <stdarg.h>
|
||||
#else
|
||||
#include <varargs.h>
|
||||
#endif
|
||||
#include <errno.h>
|
||||
#endif
|
||||
|
||||
#include "queue.h"
|
||||
#include "shqueue.h"
|
||||
|
||||
#if defined(__cplusplus)
|
||||
extern "C" {
|
||||
#endif
|
||||
|
||||
/*******************************************************
|
||||
* General purpose constants and macros.
|
||||
*******************************************************/
|
||||
#define UINT16_T_MAX 0xffff /* Maximum 16 bit unsigned. */
|
||||
#define UINT32_T_MAX 0xffffffff /* Maximum 32 bit unsigned. */
|
||||
|
||||
#define MEGABYTE 1048576
|
||||
#define GIGABYTE 1073741824
|
||||
|
||||
#define MS_PER_SEC 1000 /* Milliseconds in a second. */
|
||||
#define USEC_PER_MS 1000 /* Microseconds in a millisecond. */
|
||||
|
||||
#define DB_MIN_PGSIZE 0x000200 /* Minimum page size (512). */
|
||||
#define DB_MAX_PGSIZE 0x010000 /* Maximum page size (65536). */
|
||||
|
||||
#define RECNO_OOB 0 /* Illegal record number. */
|
||||
|
||||
/*
|
||||
* If we are unable to determine the underlying filesystem block size, use
|
||||
* 8K on the grounds that most OS's use less than 8K for a VM page size.
|
||||
*/
|
||||
#define DB_DEF_IOSIZE (8 * 1024)
|
||||
|
||||
/*
|
||||
* Aligning items to particular sizes or in pages or memory.
|
||||
*
|
||||
* db_align_t --
|
||||
* Largest integral type, used to align structures in memory. We don't store
|
||||
* floating point types in structures, so integral types should be sufficient
|
||||
* (and we don't have to worry about systems that store floats in other than
|
||||
* power-of-2 numbers of bytes). Additionally this fixes compiler that rewrite
|
||||
* structure assignments and ANSI C memcpy calls to be in-line instructions
|
||||
* that happen to require alignment. Note: this alignment isn't sufficient for
|
||||
* mutexes, which depend on things like cache line alignment. Mutex alignment
|
||||
* is handled separately, in mutex.h.
|
||||
*
|
||||
* db_alignp_t --
|
||||
* Integral type that's the same size as a pointer. There are places where
|
||||
* DB modifies pointers by discarding the bottom bits to guarantee alignment.
|
||||
* We can't use db_align_t, it may be larger than the pointer, and compilers
|
||||
* get upset about that. So far we haven't run on any machine where there
|
||||
* isn't an integral type the same size as a pointer -- here's hoping.
|
||||
*/
|
||||
typedef unsigned long db_align_t;
|
||||
typedef unsigned long db_alignp_t;
|
||||
|
||||
/* Align an integer to a specific boundary. */
|
||||
#undef ALIGN
|
||||
#define ALIGN(value, bound) \
|
||||
(((value) + (bound) - 1) & ~(((u_int)bound) - 1))
|
||||
|
||||
/* Align a pointer to a specific boundary. */
|
||||
#undef ALIGNP
|
||||
#define ALIGNP(value, bound) ALIGN((db_alignp_t)value, bound)
|
||||
|
||||
/*
|
||||
* There are several on-page structures that are declared to have a number of
|
||||
* fields followed by a variable length array of items. The structure size
|
||||
* without including the variable length array or the address of the first of
|
||||
* those elements can be found using SSZ.
|
||||
*
|
||||
* This macro can also be used to find the offset of a structure element in a
|
||||
* structure. This is used in various places to copy structure elements from
|
||||
* unaligned memory references, e.g., pointers into a packed page.
|
||||
*
|
||||
* There are two versions because compilers object if you take the address of
|
||||
* an array.
|
||||
*/
|
||||
#undef SSZ
|
||||
#define SSZ(name, field) ((int)&(((name *)0)->field))
|
||||
|
||||
#undef SSZA
|
||||
#define SSZA(name, field) ((int)&(((name *)0)->field[0]))
|
||||
|
||||
/*
|
||||
* Print an address as a u_long (a u_long is the largest type we can print
|
||||
* portably). Most 64-bit systems have made longs 64-bits, so this should
|
||||
* work.
|
||||
*/
|
||||
#define P_TO_ULONG(p) ((u_long)(db_alignp_t)(p))
|
||||
|
||||
/* Structure used to print flag values. */
|
||||
typedef struct __fn {
|
||||
u_int32_t mask; /* Flag value. */
|
||||
const char *name; /* Flag name. */
|
||||
} FN;
|
||||
|
||||
/* Set, clear and test flags. */
|
||||
#define FLD_CLR(fld, f) (fld) &= ~(f)
|
||||
#define FLD_ISSET(fld, f) ((fld) & (f))
|
||||
#define FLD_SET(fld, f) (fld) |= (f)
|
||||
#define F_CLR(p, f) (p)->flags &= ~(f)
|
||||
#define F_ISSET(p, f) ((p)->flags & (f))
|
||||
#define F_SET(p, f) (p)->flags |= (f)
|
||||
#define LF_CLR(f) (flags &= ~(f))
|
||||
#define LF_ISSET(f) (flags & (f))
|
||||
#define LF_SET(f) (flags |= (f))
|
||||
|
||||
/* Display separator string. */
|
||||
#undef DB_LINE
|
||||
#define DB_LINE "=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-="
|
||||
|
||||
/* Unused, or not-used-yet variable. "Shut that bloody compiler up!" */
|
||||
#define COMPQUIET(n, v) (n) = (v)
|
||||
|
||||
/*******************************************************
|
||||
* Files.
|
||||
*******************************************************/
|
||||
/*
|
||||
* We use 1024 as the maximum path length. It's too hard to figure out what
|
||||
* the real path length is, as it was traditionally stored in <sys/param.h>,
|
||||
* and that file isn't always available.
|
||||
*/
|
||||
#undef MAXPATHLEN
|
||||
#define MAXPATHLEN 1024
|
||||
|
||||
#define PATH_DOT "." /* Current working directory. */
|
||||
#define PATH_SEPARATOR "\\/:" /* Path separator character. */
|
||||
|
||||
/*
|
||||
* Flags understood by __os_open.
|
||||
*/
|
||||
#define DB_OSO_CREATE 0x001 /* POSIX: O_CREAT */
|
||||
#define DB_OSO_EXCL 0x002 /* POSIX: O_EXCL */
|
||||
#define DB_OSO_LOG 0x004 /* Opening a log file. */
|
||||
#define DB_OSO_RDONLY 0x008 /* POSIX: O_RDONLY */
|
||||
#define DB_OSO_REGION 0x010 /* Opening a region file. */
|
||||
#define DB_OSO_SEQ 0x020 /* Expected sequential access. */
|
||||
#define DB_OSO_TEMP 0x040 /* Remove after last close. */
|
||||
#define DB_OSO_TRUNC 0x080 /* POSIX: O_TRUNC */
|
||||
|
||||
/*
|
||||
* Seek options understood by __os_seek.
|
||||
*/
|
||||
typedef enum {
|
||||
DB_OS_SEEK_CUR, /* POSIX: SEEK_CUR */
|
||||
DB_OS_SEEK_END, /* POSIX: SEEK_END */
|
||||
DB_OS_SEEK_SET /* POSIX: SEEK_SET */
|
||||
} DB_OS_SEEK;
|
||||
|
||||
/*******************************************************
|
||||
* Environment.
|
||||
*******************************************************/
|
||||
/* Type passed to __db_appname(). */
|
||||
typedef enum {
|
||||
DB_APP_NONE=0, /* No type (region). */
|
||||
DB_APP_DATA, /* Data file. */
|
||||
DB_APP_LOG, /* Log file. */
|
||||
DB_APP_TMP /* Temporary file. */
|
||||
} APPNAME;
|
||||
|
||||
/*
|
||||
* CDB_LOCKING CDB product locking.
|
||||
* LOCKING_ON Locking has been configured.
|
||||
* LOGGING_ON Logging has been configured.
|
||||
* MPOOL_ON Memory pool has been configured.
|
||||
* TXN_ON Transactions have been configured.
|
||||
*/
|
||||
#define CDB_LOCKING(dbenv) F_ISSET(dbenv, DB_ENV_CDB)
|
||||
#define LOCKING_ON(dbenv) ((dbenv)->lk_handle != NULL)
|
||||
#define LOGGING_ON(dbenv) ((dbenv)->lg_handle != NULL)
|
||||
#define MPOOL_ON(dbenv) ((dbenv)->mp_handle != NULL)
|
||||
#define TXN_ON(dbenv) ((dbenv)->tx_handle != NULL)
|
||||
|
||||
/*
|
||||
* STD_LOCKING Standard locking, that is, locking was configured and CDB
|
||||
* was not. We do not do locking in off-page duplicate trees,
|
||||
* so we check for that in the cursor first.
|
||||
*/
|
||||
#define STD_LOCKING(dbc) \
|
||||
(!F_ISSET(dbc, DBC_OPD) && \
|
||||
!CDB_LOCKING((dbc)->dbp->dbenv) && LOCKING_ON((dbc)->dbp->dbenv))
|
||||
|
||||
/*
|
||||
* IS_RECOVERING The system is running recovery.
|
||||
*/
|
||||
#define IS_RECOVERING(dbenv) \
|
||||
(LOGGING_ON(dbenv) && \
|
||||
F_ISSET((DB_LOG *)(dbenv)->lg_handle, DBLOG_RECOVER))
|
||||
|
||||
/* Most initialization methods cannot be called after open is called. */
|
||||
#define ENV_ILLEGAL_AFTER_OPEN(dbenv, name) \
|
||||
if (F_ISSET((dbenv), DB_ENV_OPEN_CALLED)) \
|
||||
return (__db_mi_open(dbenv, name, 1));
|
||||
|
||||
/* We're not actually user hostile, honest. */
|
||||
#define ENV_REQUIRES_CONFIG(dbenv, handle, subsystem) \
|
||||
if (handle == NULL) \
|
||||
return (__db_env_config(dbenv, subsystem));
|
||||
|
||||
/*******************************************************
|
||||
* Database Access Methods.
|
||||
*******************************************************/
|
||||
/*
|
||||
* DB_IS_THREADED --
|
||||
* The database handle is free-threaded (was opened with DB_THREAD).
|
||||
*/
|
||||
#define DB_IS_THREADED(dbp) \
|
||||
((dbp)->mutexp != NULL)
|
||||
|
||||
/* Initialization methods are often illegal before/after open is called. */
|
||||
#define DB_ILLEGAL_AFTER_OPEN(dbp, name) \
|
||||
if (F_ISSET((dbp), DB_OPEN_CALLED)) \
|
||||
return (__db_mi_open(dbp->dbenv, name, 1));
|
||||
#define DB_ILLEGAL_BEFORE_OPEN(dbp, name) \
|
||||
if (!F_ISSET((dbp), DB_OPEN_CALLED)) \
|
||||
return (__db_mi_open(dbp->dbenv, name, 0));
|
||||
/* Some initialization methods are illegal if environment isn't local. */
|
||||
#define DB_ILLEGAL_IN_ENV(dbp, name) \
|
||||
if (!F_ISSET(dbp->dbenv, DB_ENV_DBLOCAL)) \
|
||||
return (__db_mi_env(dbp->dbenv, name));
|
||||
#define DB_ILLEGAL_METHOD(dbp, flags) { \
|
||||
int __ret; \
|
||||
if ((__ret = __dbh_am_chk(dbp, flags)) != 0) \
|
||||
return (__ret); \
|
||||
}
|
||||
|
||||
/*
|
||||
* Common DBC->internal fields. Each access method adds additional fields
|
||||
* to this list, but the initial fields are common.
|
||||
*/
|
||||
#define __DBC_INTERNAL \
|
||||
DBC *opd; /* Off-page duplicate cursor. */\
|
||||
\
|
||||
void *page; /* Referenced page. */ \
|
||||
db_pgno_t root; /* Tree root. */ \
|
||||
db_pgno_t pgno; /* Referenced page number. */ \
|
||||
db_indx_t indx; /* Referenced key item index. */\
|
||||
\
|
||||
DB_LOCK lock; /* Cursor lock. */ \
|
||||
db_lockmode_t lock_mode; /* Lock mode. */
|
||||
|
||||
struct __dbc_internal {
|
||||
__DBC_INTERNAL
|
||||
};
|
||||
|
||||
/*
|
||||
* Access-method-common macro for determining whether a cursor
|
||||
* has been initialized.
|
||||
*/
|
||||
#define IS_INITIALIZED(dbc) ((dbc)->internal->pgno != PGNO_INVALID)
|
||||
|
||||
/*******************************************************
|
||||
* Mpool.
|
||||
*******************************************************/
|
||||
/*
|
||||
* File types for DB access methods. Negative numbers are reserved to DB.
|
||||
*/
|
||||
#define DB_FTYPE_SET -1 /* Call pgin/pgout functions. */
|
||||
#define DB_FTYPE_NOTSET 0 /* Don't call... */
|
||||
|
||||
/* Structure used as the DB pgin/pgout pgcookie. */
|
||||
typedef struct __dbpginfo {
|
||||
size_t db_pagesize; /* Underlying page size. */
|
||||
int needswap; /* If swapping required. */
|
||||
} DB_PGINFO;
|
||||
|
||||
/*******************************************************
|
||||
* Log.
|
||||
*******************************************************/
|
||||
/* Initialize an LSN to 'zero'. */
|
||||
#define ZERO_LSN(LSN) do { \
|
||||
(LSN).file = 0; \
|
||||
(LSN).offset = 0; \
|
||||
} while (0)
|
||||
|
||||
/* Return 1 if LSN is a 'zero' lsn, otherwise return 0. */
|
||||
#define IS_ZERO_LSN(LSN) ((LSN).file == 0)
|
||||
|
||||
/* Test if we need to log a change. */
|
||||
#define DB_LOGGING(dbc) \
|
||||
(LOGGING_ON((dbc)->dbp->dbenv) && !F_ISSET(dbc, DBC_RECOVER))
|
||||
|
||||
/* Internal flag for use with internal __log_unregister. */
|
||||
#define DB_LOGONLY 0x01
|
||||
/*******************************************************
|
||||
* Txn.
|
||||
*******************************************************/
|
||||
#define DB_NONBLOCK(C) ((C)->txn != NULL && F_ISSET((C)->txn, TXN_NOWAIT))
|
||||
#define IS_SUBTRANSACTION(txn) \
|
||||
((txn) != NULL && (txn)->parent != NULL)
|
||||
|
||||
/*******************************************************
|
||||
* Global variables.
|
||||
*******************************************************/
|
||||
#ifdef HAVE_VXWORKS
|
||||
#include "semLib.h"
|
||||
#endif
|
||||
|
||||
/*
|
||||
* DB global variables. Done in a single structure to minimize the name-space
|
||||
* pollution.
|
||||
*/
|
||||
typedef struct __db_globals {
|
||||
u_int32_t db_pageyield; /* db_set_pageyield */
|
||||
u_int32_t db_panic; /* db_set_panic */
|
||||
u_int32_t db_region_init; /* db_set_region_init */
|
||||
u_int32_t db_tas_spins; /* db_set_tas_spins */
|
||||
#ifdef HAVE_VXWORKS
|
||||
u_int32_t db_global_init; /* VxWorks: inited */
|
||||
SEM_ID db_global_lock; /* VxWorks: global semaphore */
|
||||
#endif
|
||||
/* XA: list of opened environments. */
|
||||
TAILQ_HEAD(__db_envq, __db_env) db_envq;
|
||||
} DB_GLOBALS;
|
||||
|
||||
#ifdef DB_INITIALIZE_DB_GLOBALS
|
||||
DB_GLOBALS __db_global_values = {
|
||||
0, /* db_set_pageyield */
|
||||
1, /* db_set_panic */
|
||||
0, /* db_set_region_init */
|
||||
0, /* db_set_tas_spins */
|
||||
#ifdef HAVE_VXWORKS
|
||||
0, /* db_global_init */
|
||||
NULL, /* db_global_lock */
|
||||
#endif
|
||||
/* XA environment queue */
|
||||
{NULL, &__db_global_values.db_envq.tqh_first}
|
||||
};
|
||||
#else
|
||||
extern DB_GLOBALS __db_global_values;
|
||||
#endif
|
||||
#define DB_GLOBAL(v) __db_global_values.v
|
||||
|
||||
/* Forward structure declarations. */
|
||||
struct __db_reginfo_t; typedef struct __db_reginfo_t REGINFO;
|
||||
struct __mutex_t; typedef struct __mutex_t MUTEX;
|
||||
struct __vrfy_childinfo; typedef struct __vrfy_childinfo VRFY_CHILDINFO;
|
||||
struct __vrfy_dbinfo; typedef struct __vrfy_dbinfo VRFY_DBINFO;
|
||||
struct __vrfy_pageinfo; typedef struct __vrfy_pageinfo VRFY_PAGEINFO;
|
||||
struct __db_txnlist; typedef struct __db_txnlist DB_TXNLIST;
|
||||
struct __db_txnhead; typedef struct __db_txnhead DB_TXNHEAD;
|
||||
typedef enum {
|
||||
TXNLIST_DELETE,
|
||||
TXNLIST_LSN,
|
||||
TXNLIST_TXNID,
|
||||
TXNLIST_PGNO
|
||||
} db_txnlist_type;
|
||||
|
||||
/*
|
||||
* Currently, region offsets are limited to 32-bits. I expect that's going
|
||||
* to have to be fixed in the not-too-distant future, since we won't want to
|
||||
* split 100Gb memory pools into that many different regions. It's typedef'd
|
||||
* so it won't be too painful to upgrade.
|
||||
*/
|
||||
typedef u_int32_t roff_t;
|
||||
|
||||
#if defined(__cplusplus)
|
||||
}
|
||||
#endif
|
||||
|
||||
/*******************************************************
|
||||
* More general includes.
|
||||
*******************************************************/
|
||||
#include "debug.h"
|
||||
#include "mutex.h"
|
||||
#include "region.h"
|
||||
#include "mutex_ext.h"
|
||||
#include "env_ext.h"
|
||||
#include "os.h"
|
||||
#include "os_ext.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
#endif /* !_DB_INTERNAL_H_ */
|
||||
174
bdb/build_win32/db_java.dsp
Normal file
174
bdb/build_win32/db_java.dsp
Normal file
@@ -0,0 +1,174 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_java" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=db_java - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_java.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_java.mak" CFG="db_java - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_java - Win32 Release" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "db_java - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_java - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb_java32.dll"
|
||||
# Begin Custom Build - Compiling java files using javac
|
||||
ProjDir=.
|
||||
InputPath=.\Release\libdb_java32.dll
|
||||
SOURCE=$(InputPath)
|
||||
|
||||
"force_compilation.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
cd $(ProjDir)\..\java\src\com\sleepycat\db
|
||||
mkdir ..\..\..\..\classes
|
||||
echo compiling Berkeley DB classes
|
||||
javac -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
echo compiling examples
|
||||
cd ..\examples
|
||||
javac -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
echo creating jar file
|
||||
cd ..\..\..\..\classes
|
||||
jar cf db.jar com\sleepycat\db\*.class
|
||||
echo Java build finished
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_java - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /D "_WINDLL" /D "_AFXDLL" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb_java32d.dll" /fixed:no
|
||||
# Begin Custom Build - Compiling java files using javac
|
||||
ProjDir=.
|
||||
InputPath=.\Debug\libdb_java32d.dll
|
||||
SOURCE=$(InputPath)
|
||||
|
||||
"force_compilation.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
cd $(ProjDir)\..\java\src\com\sleepycat\db
|
||||
mkdir ..\..\..\..\classes
|
||||
echo compiling Berkeley DB classes
|
||||
javac -g -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
echo compiling examples
|
||||
javac -g -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
cd ..\examples
|
||||
echo creating jar file
|
||||
cd ..\..\..\..\classes
|
||||
jar cf db.jar com\sleepycat\db\*.class
|
||||
echo Java build finished
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_java - Win32 Release"
|
||||
# Name "db_java - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_Db.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_DbEnv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_DbLock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_DbLsn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_DbTxn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_Dbc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_Dbt.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_info.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_locked.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\libdb_java\java_util.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_load.dsp
Normal file
151
bdb/build_win32/db_load.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_load" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_load - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_load.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_load.mak" CFG="db_load - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_load - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_load - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_load - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_load - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_load - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_load - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_load - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_load - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_load - Win32 Release"
|
||||
# Name "db_load - Win32 Debug"
|
||||
# Name "db_load - Win32 Release Static"
|
||||
# Name "db_load - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_load\db_load.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_printlog.dsp
Normal file
151
bdb/build_win32/db_printlog.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_printlog" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_printlog - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_printlog.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_printlog.mak" CFG="db_printlog - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_printlog - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_printlog - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_printlog - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_printlog - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_printlog - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_printlog - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_printlog - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_printlog - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_printlog - Win32 Release"
|
||||
# Name "db_printlog - Win32 Debug"
|
||||
# Name "db_printlog - Win32 Release Static"
|
||||
# Name "db_printlog - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_printlog\db_printlog.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_recover.dsp
Normal file
151
bdb/build_win32/db_recover.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_recover" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_recover - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_recover.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_recover.mak" CFG="db_recover - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_recover - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_recover - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_recover - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_recover - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_recover - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_recover - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_recover - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_recover - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_recover - Win32 Release"
|
||||
# Name "db_recover - Win32 Debug"
|
||||
# Name "db_recover - Win32 Release Static"
|
||||
# Name "db_recover - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_recover\db_recover.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_stat.dsp
Normal file
151
bdb/build_win32/db_stat.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_stat" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_stat - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_stat.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_stat.mak" CFG="db_stat - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_stat - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_stat - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_stat - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_stat - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_stat - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_stat - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_stat - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_stat - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_stat - Win32 Release"
|
||||
# Name "db_stat - Win32 Debug"
|
||||
# Name "db_stat - Win32 Release Static"
|
||||
# Name "db_stat - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_stat\db_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
714
bdb/build_win32/db_static.dsp
Normal file
714
bdb/build_win32/db_static.dsp
Normal file
@@ -0,0 +1,714 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_static" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=db_static - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_static.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_static.mak" CFG="db_static - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_static - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "db_static - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "db_static - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE "db_static - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "db_static - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "DB_Stati"
|
||||
# PROP BASE Intermediate_Dir "DB_Stati"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Release_static/libdb32s.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_static - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DB_Stat0"
|
||||
# PROP BASE Intermediate_Dir "DB_Stat0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug_static/libdb32sd.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_static - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "DB_Stati"
|
||||
# PROP BASE Intermediate_Dir "DB_Stati"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX"config.h" /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"Release/libdb32s.lib"
|
||||
# ADD LIB32 /nologo /out:"Release_static/libdb32s.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_static - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DB_Stat0"
|
||||
# PROP BASE Intermediate_Dir "DB_Stat0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX"config.h" /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"Debug/libdb32sd.lib"
|
||||
# ADD LIB32 /nologo /out:"Debug_static/libdb32sd.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_static - Win32 Release"
|
||||
# Name "db_static - Win32 Debug"
|
||||
# Name "db_static - Win32 Release Static"
|
||||
# Name "db_static - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_compare.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_curadj.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_cursor.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_delete.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_put.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_reclaim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_recno.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_rsearch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_search.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_split.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\bt_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\btree\btree_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\strcasecmp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_byteorder.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_err.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_getlong.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\db_log2.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\util_log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\common\util_sig.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_app.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_except.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_lock.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_log.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_mpool.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_table.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\cxx\cxx_txn.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\crdel_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\crdel_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_am.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_cam.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_dispatch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_dup.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_iface.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_join.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_meta.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_overflow.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_pr.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_reclaim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_ret.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_upg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_upg_opd.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_vrfy.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db\db_vrfyutil.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\dbm\dbm.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\db_salloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\db_shash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_recover.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\env\env_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_dup.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_func.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_meta.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_page.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_reclaim.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hash\hash_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\hsearch\hsearch.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_conflict.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_deadlock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\lock\lock_util.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_archive.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_compare.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_findckp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_get.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_put.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\log\log_register.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_bh.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fget.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fopen.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fput.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_fset.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_register.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_sync.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mp\mp_trickle.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mutex\mut_tas.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\mutex\mutex.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_alloc.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_fsync.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_handle.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_oflags.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_root.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_rpath.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_rw.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_tmpdir.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os\os_unlink.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_abs.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_dir.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_errno.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_fid.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_finit.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_map.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_rename.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_seek.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_sleep.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_spin.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\os_win32\os_type.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_conv.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_files.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_method.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_open.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_stat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\qam\qam_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn_auto.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn_rec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\txn\txn_region.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\xa\xa.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\xa\xa_db.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\xa\xa_map.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
135
bdb/build_win32/db_tcl.dsp
Normal file
135
bdb/build_win32/db_tcl.dsp
Normal file
@@ -0,0 +1,135 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_tcl" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=db_tcl - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_tcl.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_tcl.mak" CFG="db_tcl - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_tcl - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "db_tcl - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_tcl - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_TCL_SUPPORT" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib tcl83.lib /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb_tcl32.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_tcl - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_TCL_SUPPORT" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /D "_WINDLL" /D "_AFXDLL" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib tcl83d.lib /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb_tcl32d.dll" /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_tcl - Win32 Release"
|
||||
# Name "db_tcl - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\libdb_tcl.def
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_compat.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_db.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_db_pkg.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_dbcursor.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_env.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_internal.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_lock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_log.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_mp.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\tcl\tcl_txn.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
99
bdb/build_win32/db_test.dsp
Normal file
99
bdb/build_win32/db_test.dsp
Normal file
@@ -0,0 +1,99 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_test" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_test - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_test.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_test.mak" CFG="db_test - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_test - Win32 Release" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE "db_test - Win32 Debug" (based on "Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_test - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# Begin Special Build Tool
|
||||
SOURCE=$(InputPath)
|
||||
PostBuild_Desc=Copy built executable files.
|
||||
PostBuild_Cmds=copy Release\*.exe .
|
||||
# End Special Build Tool
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_test - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "db_recov"
|
||||
# PROP BASE Intermediate_Dir "db_recov"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /out:"Debug/dbkill.exe" /fixed:no
|
||||
# Begin Special Build Tool
|
||||
SOURCE=$(InputPath)
|
||||
PostBuild_Desc=Copy built executable files.
|
||||
PostBuild_Cmds=copy Debug\*.exe .
|
||||
# End Special Build Tool
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_test - Win32 Release"
|
||||
# Name "db_test - Win32 Debug"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=.\dbkill.cpp
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_upgrade.dsp
Normal file
151
bdb/build_win32/db_upgrade.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_upgrade" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_upgrade - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_upgrade.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_upgrade.mak" CFG="db_upgrade - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_upgrade - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_upgrade - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_upgrade - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_upgrade - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_upgrade - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_upgrade - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_upgrade - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_upgrade - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_upgrade - Win32 Release"
|
||||
# Name "db_upgrade - Win32 Debug"
|
||||
# Name "db_upgrade - Win32 Release Static"
|
||||
# Name "db_upgrade - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_upgrade\db_upgrade.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/db_verify.dsp
Normal file
151
bdb/build_win32/db_verify.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="db_verify" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=db_verify - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_verify.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "db_verify.mak" CFG="db_verify - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "db_verify - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_verify - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_verify - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "db_verify - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "db_verify - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_verify - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_verify - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "db_verify - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "db_verify - Win32 Release"
|
||||
# Name "db_verify - Win32 Debug"
|
||||
# Name "db_verify - Win32 Release Static"
|
||||
# Name "db_verify - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\db_verify\db_verify.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
131
bdb/build_win32/dbkill.cpp
Normal file
131
bdb/build_win32/dbkill.cpp
Normal file
@@ -0,0 +1,131 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* $Id: dbkill.cpp,v 11.4 2000/05/02 17:08:31 dda Exp $
|
||||
*/
|
||||
/*
|
||||
* Kill -
|
||||
* Simulate Unix kill on Windows/NT and Windows/9X.
|
||||
* This good enough to support the Berkeley DB test suite,
|
||||
* but may be missing some favorite features.
|
||||
*
|
||||
* Would have used MKS kill, but it didn't seem to work well
|
||||
* on Win/9X. Cygnus kill works within the Gnu/Cygnus environment
|
||||
* (where processes are given small pids, with presumably a translation
|
||||
* table between small pids and actual process handles), but our test
|
||||
* environment, via Tcl, does not use the Cygnus environment.
|
||||
*
|
||||
* Compile this and install it as c:/tools/kill.exe (or as indicated
|
||||
* by build_win32/include.tcl ).
|
||||
*/
|
||||
|
||||
#include <windows.h>
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <limits.h>
|
||||
|
||||
/*
|
||||
* Like atol, with specified base. Would use stdlib, but
|
||||
* strtol("0xFFFF1234", NULL, 16) returns 0x7FFFFFFF and
|
||||
* strtol("4294712487", NULL, 16) returns 0x7FFFFFFF w/ VC++
|
||||
*/
|
||||
long
|
||||
myatol(char *s, int base)
|
||||
{
|
||||
long result = 0;
|
||||
char ch;
|
||||
int sign = 1; /* + */
|
||||
if (base == 0)
|
||||
base = 10;
|
||||
if (base != 10 && base != 16)
|
||||
return LONG_MAX;
|
||||
while ((ch = *s++) != '\0') {
|
||||
if (ch == '-') {
|
||||
sign = -sign;
|
||||
}
|
||||
else if (ch >= '0' && ch <= '9') {
|
||||
result = result * base + (ch - '0');
|
||||
}
|
||||
else if (ch == 'x' || ch == 'X') {
|
||||
/* Allow leading 0x..., and switch to base 16 */
|
||||
base = 16;
|
||||
}
|
||||
else if (base == 16 && ch >= 'a' && ch <= 'f') {
|
||||
result = result * base + (ch - 'a' + 10);
|
||||
}
|
||||
else if (base == 16 && ch >= 'A' && ch <= 'F') {
|
||||
result = result * base + (ch - 'A' + 10);
|
||||
}
|
||||
else {
|
||||
if (sign > 1)
|
||||
return LONG_MAX;
|
||||
else
|
||||
return LONG_MIN;
|
||||
}
|
||||
}
|
||||
return sign * result;
|
||||
}
|
||||
|
||||
void
|
||||
usage_exit()
|
||||
{
|
||||
fprintf(stderr, "Usage: kill [ -sig ] pid\n");
|
||||
fprintf(stderr, " for win32, sig must be or 0, 15 (TERM)\n");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
int
|
||||
main(int argc, char **argv)
|
||||
{
|
||||
HANDLE hProcess ;
|
||||
DWORD accessflag;
|
||||
long pid;
|
||||
int sig = 15;
|
||||
|
||||
if (argc > 2) {
|
||||
if (argv[1][0] != '-')
|
||||
usage_exit();
|
||||
|
||||
if (strcmp(argv[1], "-TERM") == 0)
|
||||
sig = 15;
|
||||
else {
|
||||
/* currently sig is more or less ignored,
|
||||
* we only care if it is zero or not
|
||||
*/
|
||||
sig = atoi(&argv[1][1]);
|
||||
if (sig < 0)
|
||||
usage_exit();
|
||||
}
|
||||
argc--;
|
||||
argv++;
|
||||
}
|
||||
if (argc < 2)
|
||||
usage_exit();
|
||||
|
||||
pid = myatol(argv[1], 10);
|
||||
/*printf("pid = %ld (0x%lx) (command line %s)\n", pid, pid, argv[1]);*/
|
||||
if (pid == LONG_MAX || pid == LONG_MIN)
|
||||
usage_exit();
|
||||
|
||||
if (sig == 0)
|
||||
accessflag = PROCESS_QUERY_INFORMATION | PROCESS_VM_READ;
|
||||
else
|
||||
accessflag = STANDARD_RIGHTS_REQUIRED | PROCESS_TERMINATE;
|
||||
hProcess = OpenProcess(accessflag, FALSE, pid);
|
||||
if (hProcess == NULL) {
|
||||
fprintf(stderr, "dbkill: %s: no such process\n", argv[1]);
|
||||
exit(1);
|
||||
}
|
||||
if (sig == 0)
|
||||
exit(0);
|
||||
if (!TerminateProcess(hProcess, 99)) {
|
||||
DWORD err = GetLastError();
|
||||
fprintf(stderr,
|
||||
"dbkill: cannot kill process: error %d (0x%lx)\n", err, err);
|
||||
exit(1);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
97
bdb/build_win32/dllmain.c
Normal file
97
bdb/build_win32/dllmain.c
Normal file
@@ -0,0 +1,97 @@
|
||||
/*
|
||||
* --------------------------------------------------------------------------
|
||||
* Copyright (C) 1997 Netscape Communications Corporation
|
||||
* --------------------------------------------------------------------------
|
||||
*
|
||||
* dllmain.c
|
||||
*
|
||||
* $Id: dllmain.c,v 1.3 2000/10/26 21:58:48 bostic Exp $
|
||||
*/
|
||||
|
||||
#define WIN32_LEAN_AND_MEAN
|
||||
#include <windows.h>
|
||||
|
||||
static int ProcessesAttached = 0;
|
||||
static HINSTANCE Instance; /* Global library instance handle. */
|
||||
|
||||
/*
|
||||
* The following declaration is for the VC++ DLL entry point.
|
||||
*/
|
||||
|
||||
BOOL APIENTRY DllMain (HINSTANCE hInst,
|
||||
DWORD reason, LPVOID reserved);
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* DllEntryPoint --
|
||||
*
|
||||
* This wrapper function is used by Borland to invoke the
|
||||
* initialization code for Tcl. It simply calls the DllMain
|
||||
* routine.
|
||||
*
|
||||
* Results:
|
||||
* See DllMain.
|
||||
*
|
||||
* Side effects:
|
||||
* See DllMain.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
|
||||
BOOL APIENTRY
|
||||
DllEntryPoint(hInst, reason, reserved)
|
||||
HINSTANCE hInst; /* Library instance handle. */
|
||||
DWORD reason; /* Reason this function is being called. */
|
||||
LPVOID reserved; /* Not used. */
|
||||
{
|
||||
return DllMain(hInst, reason, reserved);
|
||||
}
|
||||
|
||||
/*
|
||||
*----------------------------------------------------------------------
|
||||
*
|
||||
* DllMain --
|
||||
*
|
||||
* This routine is called by the VC++ C run time library init
|
||||
* code, or the DllEntryPoint routine. It is responsible for
|
||||
* initializing various dynamically loaded libraries.
|
||||
*
|
||||
* Results:
|
||||
* TRUE on sucess, FALSE on failure.
|
||||
*
|
||||
* Side effects:
|
||||
* Establishes 32-to-16 bit thunk and initializes sockets library.
|
||||
*
|
||||
*----------------------------------------------------------------------
|
||||
*/
|
||||
BOOL APIENTRY
|
||||
DllMain(hInst, reason, reserved)
|
||||
HINSTANCE hInst; /* Library instance handle. */
|
||||
DWORD reason; /* Reason this function is being called. */
|
||||
LPVOID reserved; /* Not used. */
|
||||
{
|
||||
switch (reason) {
|
||||
case DLL_PROCESS_ATTACH:
|
||||
|
||||
/*
|
||||
* Registration of UT need to be done only once for first
|
||||
* attaching process. At that time set the tclWin32s flag
|
||||
* to indicate if the DLL is executing under Win32s or not.
|
||||
*/
|
||||
|
||||
if (ProcessesAttached++) {
|
||||
return FALSE; /* Not the first initialization. */
|
||||
}
|
||||
|
||||
Instance = hInst;
|
||||
return TRUE;
|
||||
|
||||
case DLL_PROCESS_DETACH:
|
||||
|
||||
ProcessesAttached--;
|
||||
break;
|
||||
}
|
||||
|
||||
return TRUE;
|
||||
}
|
||||
154
bdb/build_win32/dynamic_dsp.src
Normal file
154
bdb/build_win32/dynamic_dsp.src
Normal file
@@ -0,0 +1,154 @@
|
||||
# Microsoft Developer Studio Project File - Name="@project_name@" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=@project_name@ - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak" CFG="@project_name@ - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "@project_name@ - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "@project_name@ - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "@project_name@ - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "@project_name@ - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "@project_name@ - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_CREATE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_CREATE_DLL" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.dll" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "DB_DLL__"
|
||||
# PROP BASE Intermediate_Dir "DB_DLL__"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_CREATE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_CREATE_DLL" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.dll"
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 2
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DB_DLL_0"
|
||||
# PROP BASE Intermediate_Dir "DB_DLL_0"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_CREATE_DLL" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /YX"config.h" /FD /c
|
||||
# SUBTRACT BASE CPP /Fr
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_CREATE_DLL" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_WINDLL" /D "_AFXDLL" /D "_MBCS" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.dll" /fixed:no
|
||||
# ADD LINK32 /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.dll" /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "@project_name@ - Win32 Release"
|
||||
# Name "@project_name@ - Win32 Debug"
|
||||
# Name "@project_name@ - Win32 Release Static"
|
||||
# Name "@project_name@ - Win32 Debug Static"
|
||||
@SOURCE_FILES@
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/ex_access.dsp
Normal file
151
bdb/build_win32/ex_access.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="ex_access" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=ex_access - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_access.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_access.mak" CFG="ex_access - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ex_access - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_access - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_access - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_access - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ex_access - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_access - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_access - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_access - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ex_access - Win32 Release"
|
||||
# Name "ex_access - Win32 Debug"
|
||||
# Name "ex_access - Win32 Release Static"
|
||||
# Name "ex_access - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_c\ex_access.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/ex_btrec.dsp
Normal file
151
bdb/build_win32/ex_btrec.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="ex_btrec" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=ex_btrec - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_btrec.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_btrec.mak" CFG="ex_btrec - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ex_btrec - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_btrec - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_btrec - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_btrec - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ex_btrec - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_btrec - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_btrec - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_btrec - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ex_btrec - Win32 Release"
|
||||
# Name "ex_btrec - Win32 Debug"
|
||||
# Name "ex_btrec - Win32 Release Static"
|
||||
# Name "ex_btrec - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_c\ex_btrec.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/ex_env.dsp
Normal file
151
bdb/build_win32/ex_env.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="ex_env" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=ex_env - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_env.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_env.mak" CFG="ex_env - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ex_env - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_env - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_env - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_env - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ex_env - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_env - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_env - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_env - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ex_env - Win32 Release"
|
||||
# Name "ex_env - Win32 Debug"
|
||||
# Name "ex_env - Win32 Release Static"
|
||||
# Name "ex_env - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_c\ex_env.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/ex_lock.dsp
Normal file
151
bdb/build_win32/ex_lock.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="ex_lock" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=ex_lock - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_lock.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_lock.mak" CFG="ex_lock - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ex_lock - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_lock - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_lock - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_lock - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ex_lock - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_lock - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_lock - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_lock - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ex_lock - Win32 Release"
|
||||
# Name "ex_lock - Win32 Debug"
|
||||
# Name "ex_lock - Win32 Release Static"
|
||||
# Name "ex_lock - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_c\ex_lock.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/ex_mpool.dsp
Normal file
151
bdb/build_win32/ex_mpool.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="ex_mpool" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=ex_mpool - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_mpool.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_mpool.mak" CFG="ex_mpool - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ex_mpool - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_mpool - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_mpool - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_mpool - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ex_mpool - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_mpool - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_mpool - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_mpool - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ex_mpool - Win32 Release"
|
||||
# Name "ex_mpool - Win32 Debug"
|
||||
# Name "ex_mpool - Win32 Release Static"
|
||||
# Name "ex_mpool - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_c\ex_mpool.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/ex_tpcb.dsp
Normal file
151
bdb/build_win32/ex_tpcb.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="ex_tpcb" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=ex_tpcb - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_tpcb.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "ex_tpcb.mak" CFG="ex_tpcb - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "ex_tpcb - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_tpcb - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_tpcb - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "ex_tpcb - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "ex_tpcb - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_tpcb - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_tpcb - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "ex_tpcb - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "ex_tpcb - Win32 Release"
|
||||
# Name "ex_tpcb - Win32 Debug"
|
||||
# Name "ex_tpcb - Win32 Release Static"
|
||||
# Name "ex_tpcb - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_c\ex_tpcb.c
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/excxx_access.dsp
Normal file
151
bdb/build_win32/excxx_access.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="excxx_access" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=excxx_access - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_access.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_access.mak" CFG="excxx_access - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "excxx_access - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_access - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_access - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_access - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "excxx_access - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_access - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_access - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_access - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "excxx_access - Win32 Release"
|
||||
# Name "excxx_access - Win32 Debug"
|
||||
# Name "excxx_access - Win32 Release Static"
|
||||
# Name "excxx_access - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_cxx\AccessExample.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/excxx_btrec.dsp
Normal file
151
bdb/build_win32/excxx_btrec.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="excxx_btrec" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=excxx_btrec - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_btrec.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_btrec.mak" CFG="excxx_btrec - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "excxx_btrec - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_btrec - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_btrec - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_btrec - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "excxx_btrec - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_btrec - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_btrec - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_btrec - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "excxx_btrec - Win32 Release"
|
||||
# Name "excxx_btrec - Win32 Debug"
|
||||
# Name "excxx_btrec - Win32 Release Static"
|
||||
# Name "excxx_btrec - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_cxx\BtRecExample.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/excxx_env.dsp
Normal file
151
bdb/build_win32/excxx_env.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="excxx_env" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=excxx_env - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_env.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_env.mak" CFG="excxx_env - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "excxx_env - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_env - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_env - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_env - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "excxx_env - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_env - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_env - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_env - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "excxx_env - Win32 Release"
|
||||
# Name "excxx_env - Win32 Debug"
|
||||
# Name "excxx_env - Win32 Release Static"
|
||||
# Name "excxx_env - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_cxx\EnvExample.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/excxx_lock.dsp
Normal file
151
bdb/build_win32/excxx_lock.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="excxx_lock" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=excxx_lock - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_lock.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_lock.mak" CFG="excxx_lock - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "excxx_lock - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_lock - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_lock - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_lock - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "excxx_lock - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_lock - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_lock - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_lock - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "excxx_lock - Win32 Release"
|
||||
# Name "excxx_lock - Win32 Debug"
|
||||
# Name "excxx_lock - Win32 Release Static"
|
||||
# Name "excxx_lock - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_cxx\LockExample.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/excxx_mpool.dsp
Normal file
151
bdb/build_win32/excxx_mpool.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="excxx_mpool" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=excxx_mpool - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_mpool.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_mpool.mak" CFG="excxx_mpool - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "excxx_mpool - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_mpool - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_mpool - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_mpool - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "excxx_mpool - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_mpool - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_mpool - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_mpool - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "excxx_mpool - Win32 Release"
|
||||
# Name "excxx_mpool - Win32 Debug"
|
||||
# Name "excxx_mpool - Win32 Release Static"
|
||||
# Name "excxx_mpool - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_cxx\MpoolExample.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/excxx_tpcb.dsp
Normal file
151
bdb/build_win32/excxx_tpcb.dsp
Normal file
@@ -0,0 +1,151 @@
|
||||
# Microsoft Developer Studio Project File - Name="excxx_tpcb" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Console Application" 0x0103
|
||||
|
||||
CFG=excxx_tpcb - Win32 Debug Static
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_tpcb.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "excxx_tpcb.mak" CFG="excxx_tpcb - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "excxx_tpcb - Win32 Release" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_tpcb - Win32 Debug" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_tpcb - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE "excxx_tpcb - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Console Application")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "excxx_tpcb - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /subsystem:console /machine:I386 /nodefaultlib:"libcmt"
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_tpcb - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /nodefaultlib:"libcmtd" /fixed:no
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_tpcb - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MD /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Release_static/libdb32.lib /nologo /subsystem:console /machine:I386
|
||||
# ADD LINK32 Release_static/libdb32s.lib /nologo /subsystem:console /machine:I386
|
||||
|
||||
!ELSEIF "$(CFG)" == "excxx_tpcb - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Ignore_Export_Lib 0
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_CONSOLE" /D "_MBCS" /YX /FD /c
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 Debug_static/libdb32d.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
# ADD LINK32 Debug_static/libdb32sd.lib kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:console /pdb:none /debug /machine:I386 /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "excxx_tpcb - Win32 Release"
|
||||
# Name "excxx_tpcb - Win32 Debug"
|
||||
# Name "excxx_tpcb - Win32 Release Static"
|
||||
# Name "excxx_tpcb - Win32 Debug Static"
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\examples_cxx\TpcbExample.cpp
|
||||
# End Source File
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=..\clib\getopt.c
|
||||
# End Source File
|
||||
# End Target
|
||||
# End Project
|
||||
16
bdb/build_win32/include.tcl
Normal file
16
bdb/build_win32/include.tcl
Normal file
@@ -0,0 +1,16 @@
|
||||
set tclsh_path SET_YOUR_TCLSH_PATH
|
||||
set test_path ../test
|
||||
set tcllib ./Debug/libdb_tcl32d.dll
|
||||
|
||||
set KILL ./dbkill.exe
|
||||
|
||||
# DO NOT EDIT BELOW THIS LINE: automatically built by dist/s_tcl.
|
||||
|
||||
global dict
|
||||
global testdir
|
||||
global util_path
|
||||
set testdir ./TESTDIR
|
||||
|
||||
global is_hp_test
|
||||
global is_qnx_test
|
||||
global is_windows_test
|
||||
135
bdb/build_win32/java_dsp.src
Normal file
135
bdb/build_win32/java_dsp.src
Normal file
@@ -0,0 +1,135 @@
|
||||
# Microsoft Developer Studio Project File - Name="@project_name@" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=@project_name@ - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak" CFG="@project_name@ - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "@project_name@ - Win32 Release" (based on\
|
||||
"Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "@project_name@ - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "@project_name@ - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb_java@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.dll"
|
||||
# Begin Custom Build - Compiling java files using javac
|
||||
ProjDir=.
|
||||
InputPath=.\Release\libdb_java@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.dll
|
||||
SOURCE=$(InputPath)
|
||||
|
||||
"force_compilation.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
cd $(ProjDir)\..\java\src\com\sleepycat\db
|
||||
mkdir ..\..\..\..\classes
|
||||
echo compiling Berkeley DB classes
|
||||
javac -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
echo compiling examples
|
||||
cd ..\examples
|
||||
javac -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
echo creating jar file
|
||||
cd ..\..\..\..\classes
|
||||
jar cf db.jar com\sleepycat\db\*.class
|
||||
echo Java build finished
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /D "_WINDLL" /D "_AFXDLL" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb_java@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.dll" /fixed:no
|
||||
# Begin Custom Build - Compiling java files using javac
|
||||
ProjDir=.
|
||||
InputPath=.\Debug\libdb_java@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.dll
|
||||
SOURCE=$(InputPath)
|
||||
|
||||
"force_compilation.txt" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)"
|
||||
cd $(ProjDir)\..\java\src\com\sleepycat\db
|
||||
mkdir ..\..\..\..\classes
|
||||
echo compiling Berkeley DB classes
|
||||
javac -g -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
echo compiling examples
|
||||
javac -g -d ../../../../classes -classpath "$(CLASSPATH);../../../../classes"\
|
||||
*.java
|
||||
cd ..\examples
|
||||
echo creating jar file
|
||||
cd ..\..\..\..\classes
|
||||
jar cf db.jar com\sleepycat\db\*.class
|
||||
echo Java build finished
|
||||
|
||||
# End Custom Build
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "@project_name@ - Win32 Release"
|
||||
# Name "@project_name@ - Win32 Debug"
|
||||
@SOURCE_FILES@
|
||||
# End Target
|
||||
# End Project
|
||||
151
bdb/build_win32/libdb.def
Normal file
151
bdb/build_win32/libdb.def
Normal file
@@ -0,0 +1,151 @@
|
||||
; $Id: libdb.def,v 11.21 2001/01/04 15:07:33 dda Exp $
|
||||
|
||||
DESCRIPTION 'Berkeley DB 3.2 Library'
|
||||
EXPORTS
|
||||
lock_get @1
|
||||
lock_id @2
|
||||
lock_put @3
|
||||
lock_vec @4
|
||||
log_compare @5
|
||||
log_file @6
|
||||
log_flush @7
|
||||
log_get @8
|
||||
log_put @9
|
||||
log_register @10
|
||||
log_unregister @11
|
||||
memp_fclose @12
|
||||
memp_fget @13
|
||||
memp_fopen @14
|
||||
memp_fput @15
|
||||
memp_fset @16
|
||||
memp_fsync @17
|
||||
memp_register @18
|
||||
memp_sync @19
|
||||
txn_abort @20
|
||||
txn_begin @21
|
||||
txn_checkpoint @22
|
||||
txn_commit @23
|
||||
txn_prepare @24
|
||||
db_version @25
|
||||
memp_stat @26
|
||||
log_archive @27
|
||||
lock_detect @28
|
||||
txn_id @29
|
||||
txn_stat @30
|
||||
memp_trickle @31
|
||||
log_stat @32
|
||||
lock_stat @33
|
||||
db_create @34
|
||||
db_env_create @35
|
||||
db_strerror @36
|
||||
db_xa_switch @37
|
||||
db_env_set_func_close @38
|
||||
db_env_set_func_dirfree @39
|
||||
db_env_set_func_dirlist @40
|
||||
db_env_set_func_exists @41
|
||||
db_env_set_func_free @42
|
||||
db_env_set_func_fsync @43
|
||||
db_env_set_func_ioinfo @44
|
||||
db_env_set_func_malloc @45
|
||||
db_env_set_func_map @46
|
||||
db_env_set_func_open @47
|
||||
db_env_set_func_read @48
|
||||
db_env_set_func_realloc @49
|
||||
db_env_set_func_rename @50
|
||||
db_env_set_func_sleep @51
|
||||
db_env_set_func_unlink @52
|
||||
db_env_set_func_unmap @53
|
||||
db_env_set_func_write @54
|
||||
db_env_set_func_yield @55
|
||||
; FREE @56
|
||||
db_env_set_pageyield @57
|
||||
db_env_set_panicstate @58
|
||||
db_env_set_region_init @59
|
||||
db_env_set_tas_spins @60
|
||||
; these are only for testing
|
||||
__db_loadme @201
|
||||
__ham_func2 @202
|
||||
__ham_func3 @203
|
||||
__ham_func4 @204
|
||||
__ham_func5 @205
|
||||
__db_hcreate @206
|
||||
__db_hsearch @207
|
||||
__db_hdestroy @208
|
||||
__db_dbm_init @209
|
||||
__db_dbm_delete @210
|
||||
__db_dbm_fetch @211
|
||||
__db_dbm_store @212
|
||||
__db_dbm_firstkey @213
|
||||
__db_dbm_nextkey @214
|
||||
__db_dbm_close @215
|
||||
__db_ndbm_open @216
|
||||
__db_ndbm_store @217
|
||||
__db_ndbm_rdonly @218
|
||||
__db_ndbm_pagfno @219
|
||||
__db_ndbm_nextkey @220
|
||||
__db_ndbm_firstkey @221
|
||||
__db_ndbm_fetch @222
|
||||
__db_ndbm_error @223
|
||||
__db_ndbm_dirfno @224
|
||||
__db_ndbm_delete @225
|
||||
__db_ndbm_close @226
|
||||
__db_ndbm_clearerr @227
|
||||
__lock_dump_region @228
|
||||
__memp_dump_region @229
|
||||
__os_closehandle @230
|
||||
__os_openhandle @231
|
||||
__os_strdup @232
|
||||
__db_r_attach @233
|
||||
__db_r_detach @234
|
||||
__db_tas_mutex_init @235
|
||||
__db_tas_mutex_lock @236
|
||||
__db_tas_mutex_unlock @237
|
||||
__os_read @238
|
||||
__os_write @239
|
||||
__os_open @240
|
||||
__os_ioinfo @241
|
||||
__os_free @242
|
||||
__os_malloc @243
|
||||
__os_freestr @244
|
||||
__os_calloc @245
|
||||
__ham_test @246
|
||||
; these are needed for linking tools
|
||||
__db_dump @401
|
||||
__db_rpath @402
|
||||
__db_dispatch @403
|
||||
__db_err @404
|
||||
__db_init_print @405
|
||||
__txn_init_print @406
|
||||
__log_init_print @407
|
||||
__ham_init_print @408
|
||||
__bam_init_print @409
|
||||
__db_jump @410
|
||||
__ham_pgin @411
|
||||
__ham_pgout @412
|
||||
__bam_pgin @413
|
||||
__bam_pgout @414
|
||||
__db_omode @415
|
||||
__db_prdbt @416
|
||||
__os_sleep @417
|
||||
__db_e_stat @420
|
||||
__db_getlong @421
|
||||
__os_get_errno @422
|
||||
__os_set_errno @423
|
||||
__ham_get_meta @424
|
||||
__ham_release_meta @425
|
||||
__qam_init_print @426
|
||||
__crdel_init_print @427
|
||||
__qam_pgin_out @428
|
||||
__db_pgin @429
|
||||
__db_pgout @430
|
||||
__db_getulong @431
|
||||
__db_util_sigresend @432
|
||||
__db_util_siginit @433
|
||||
__db_util_interrupted @434
|
||||
__db_util_logset @435
|
||||
__db_prheader @436
|
||||
__db_prfooter @437
|
||||
__db_verify_callback @438
|
||||
__db_verify_internal @439
|
||||
__os_yield @440
|
||||
__db_global_values @441
|
||||
33
bdb/build_win32/libdb.rc
Normal file
33
bdb/build_win32/libdb.rc
Normal file
@@ -0,0 +1,33 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION 3,0,2,9
|
||||
PRODUCTVERSION 3,0,2,9
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Sleepycat Software\0"
|
||||
VALUE "FileDescription", "Berkeley DB 3.0 DLL\0"
|
||||
VALUE "FileVersion", "3.2.9\0"
|
||||
VALUE "InternalName", "libdb.dll\0"
|
||||
VALUE "LegalCopyright", "Copyright <20> Sleepycat Software Inc. 1997, 1998, 1999, 2000\0"
|
||||
VALUE "OriginalFilename", "libdb.dll\0"
|
||||
VALUE "ProductName", "Sleepycat Software libdb\0"
|
||||
VALUE "ProductVersion", "3.2.9\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
35
bdb/build_win32/libdb_tcl.def
Normal file
35
bdb/build_win32/libdb_tcl.def
Normal file
@@ -0,0 +1,35 @@
|
||||
; $Id: libdb_tcl.def,v 11.2 1999/11/21 23:10:00 bostic Exp $
|
||||
|
||||
DESCRIPTION 'Berkeley DB TCL interface Library'
|
||||
EXPORTS
|
||||
Db_tcl_Init
|
||||
bdb_DbmCommand
|
||||
bdb_HCommand
|
||||
bdb_NdbmOpen
|
||||
bdb_RandCommand
|
||||
db_Cmd
|
||||
dbc_Cmd
|
||||
env_Cmd
|
||||
ndbm_Cmd
|
||||
tcl_EnvRemove
|
||||
tcl_LockDetect
|
||||
tcl_LockGet
|
||||
tcl_LockStat
|
||||
tcl_LockVec
|
||||
tcl_LogArchive
|
||||
tcl_LogCompare
|
||||
tcl_LogFile
|
||||
tcl_LogFlush
|
||||
tcl_LogGet
|
||||
tcl_LogPut
|
||||
tcl_LogRegister
|
||||
tcl_LogStat
|
||||
tcl_LogUnregister
|
||||
tcl_Mp
|
||||
tcl_MpStat
|
||||
tcl_MpSync
|
||||
tcl_MpTrickle
|
||||
tcl_Txn
|
||||
tcl_TxnCheckpoint
|
||||
tcl_TxnStat
|
||||
txn_Cmd
|
||||
33
bdb/build_win32/libdbrc.src
Normal file
33
bdb/build_win32/libdbrc.src
Normal file
@@ -0,0 +1,33 @@
|
||||
1 VERSIONINFO
|
||||
FILEVERSION %MAJOR%,0,%MINOR%,%PATCH%
|
||||
PRODUCTVERSION %MAJOR%,0,%MINOR%,%PATCH%
|
||||
FILEFLAGSMASK 0x3fL
|
||||
#ifdef _DEBUG
|
||||
FILEFLAGS 0x1L
|
||||
#else
|
||||
FILEFLAGS 0x0L
|
||||
#endif
|
||||
FILEOS 0x4L
|
||||
FILETYPE 0x2L
|
||||
FILESUBTYPE 0x0L
|
||||
|
||||
BEGIN
|
||||
BLOCK "StringFileInfo"
|
||||
BEGIN
|
||||
BLOCK "040904b0"
|
||||
BEGIN
|
||||
VALUE "CompanyName", "Sleepycat Software\0"
|
||||
VALUE "FileDescription", "Berkeley DB 3.0 DLL\0"
|
||||
VALUE "FileVersion", "%MAJOR%.%MINOR%.%PATCH%\0"
|
||||
VALUE "InternalName", "libdb.dll\0"
|
||||
VALUE "LegalCopyright", "Copyright <20> Sleepycat Software Inc. 1997, 1998, 1999, 2000\0"
|
||||
VALUE "OriginalFilename", "libdb.dll\0"
|
||||
VALUE "ProductName", "Sleepycat Software libdb\0"
|
||||
VALUE "ProductVersion", "%MAJOR%.%MINOR%.%PATCH%\0"
|
||||
END
|
||||
END
|
||||
BLOCK "VarFileInfo"
|
||||
BEGIN
|
||||
VALUE "Translation", 0x409, 1200
|
||||
END
|
||||
END
|
||||
4
bdb/build_win32/srcfile_dsp.src
Normal file
4
bdb/build_win32/srcfile_dsp.src
Normal file
@@ -0,0 +1,4 @@
|
||||
# Begin Source File
|
||||
|
||||
SOURCE=@srcdir@\@srcfile@
|
||||
# End Source File
|
||||
127
bdb/build_win32/static_dsp.src
Normal file
127
bdb/build_win32/static_dsp.src
Normal file
@@ -0,0 +1,127 @@
|
||||
# Microsoft Developer Studio Project File - Name="@project_name@" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Static Library" 0x0104
|
||||
|
||||
CFG=@project_name@ - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak" CFG="@project_name@ - Win32 Debug Static"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "@project_name@ - Win32 Release" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "@project_name@ - Win32 Debug" (based on "Win32 (x86) Static Library")
|
||||
!MESSAGE "@project_name@ - Win32 Release Static" (based on\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE "@project_name@ - Win32 Debug Static" (based on\
|
||||
"Win32 (x86) Static Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
|
||||
!IF "$(CFG)" == "@project_name@ - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "DB_Stati"
|
||||
# PROP BASE Intermediate_Dir "DB_Stati"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Release_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DB_Stat0"
|
||||
# PROP BASE Intermediate_Dir "DB_Stat0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /W3 /GX /Z7 /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo
|
||||
# ADD LIB32 /nologo /out:"Debug_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Release Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "DB_Stati"
|
||||
# PROP BASE Intermediate_Dir "DB_Stati"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release_static"
|
||||
# PROP Intermediate_Dir "Release_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX"config.h" /FD /c
|
||||
# ADD CPP /nologo /MT /W3 /GX /O2 /I "." /I "../include" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"Release/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s.lib"
|
||||
# ADD LIB32 /nologo /out:"Release_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@s.lib"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug Static"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "DB_Stat0"
|
||||
# PROP BASE Intermediate_Dir "DB_Stat0"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug_static"
|
||||
# PROP Intermediate_Dir "Debug_static"
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX"config.h" /FD /c
|
||||
# ADD CPP /nologo /MTd /W3 /GX /Z7 /Od /I "." /I "../include" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "_MBCS" /YX"config.h" /FD /c
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LIB32=link.exe -lib
|
||||
# ADD BASE LIB32 /nologo /out:"Debug/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd.lib"
|
||||
# ADD LIB32 /nologo /out:"Debug_static/libdb@DB_VERSION_MAJOR@@DB_VERSION_MINOR@sd.lib"
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "@project_name@ - Win32 Release"
|
||||
# Name "@project_name@ - Win32 Debug"
|
||||
# Name "@project_name@ - Win32 Release Static"
|
||||
# Name "@project_name@ - Win32 Debug Static"
|
||||
@SOURCE_FILES@
|
||||
# End Target
|
||||
# End Project
|
||||
92
bdb/build_win32/tcl_dsp.src
Normal file
92
bdb/build_win32/tcl_dsp.src
Normal file
@@ -0,0 +1,92 @@
|
||||
# Microsoft Developer Studio Project File - Name="@project_name@" - Package Owner=<4>
|
||||
# Microsoft Developer Studio Generated Build File, Format Version 5.00
|
||||
# ** DO NOT EDIT **
|
||||
|
||||
# TARGTYPE "Win32 (x86) Dynamic-Link Library" 0x0102
|
||||
|
||||
CFG=@project_name@ - Win32 Debug
|
||||
!MESSAGE This is not a valid makefile. To build this project using NMAKE,
|
||||
!MESSAGE use the Export Makefile command and run
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak".
|
||||
!MESSAGE
|
||||
!MESSAGE You can specify a configuration when running NMAKE
|
||||
!MESSAGE by defining the macro CFG on the command line. For example:
|
||||
!MESSAGE
|
||||
!MESSAGE NMAKE /f "@project_name@.mak" CFG="@project_name@ - Win32 Debug"
|
||||
!MESSAGE
|
||||
!MESSAGE Possible choices for configuration are:
|
||||
!MESSAGE
|
||||
!MESSAGE "@project_name@ - Win32 Release" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE "@project_name@ - Win32 Debug" (based on "Win32 (x86) Dynamic-Link Library")
|
||||
!MESSAGE
|
||||
|
||||
# Begin Project
|
||||
# PROP Scc_ProjName ""
|
||||
# PROP Scc_LocalPath ""
|
||||
CPP=cl.exe
|
||||
MTL=midl.exe
|
||||
RSC=rc.exe
|
||||
|
||||
!IF "$(CFG)" == "@project_name@ - Win32 Release"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 0
|
||||
# PROP BASE Output_Dir "Release"
|
||||
# PROP BASE Intermediate_Dir "Release"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 0
|
||||
# PROP Use_Debug_Libraries 0
|
||||
# PROP Output_Dir "Release"
|
||||
# PROP Intermediate_Dir "Release"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MT /W3 /GX /O2 /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MD /W3 /GX /O2 /Ob2 /I "." /I "../include" /D "DB_TCL_SUPPORT" /D "WIN32" /D "NDEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /YX /FD /c
|
||||
# ADD BASE MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "NDEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "NDEBUG"
|
||||
# ADD RSC /l 0x409 /d "NDEBUG"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /machine:I386
|
||||
# ADD LINK32 Release/libdb32.lib tcl83.lib /nologo /base:"0x13000000" /subsystem:windows /dll /machine:I386 /out:"Release/libdb_tcl@DB_VERSION_MAJOR@@DB_VERSION_MINOR@.dll"
|
||||
|
||||
!ELSEIF "$(CFG)" == "@project_name@ - Win32 Debug"
|
||||
|
||||
# PROP BASE Use_MFC 0
|
||||
# PROP BASE Use_Debug_Libraries 1
|
||||
# PROP BASE Output_Dir "Debug"
|
||||
# PROP BASE Intermediate_Dir "Debug"
|
||||
# PROP BASE Target_Dir ""
|
||||
# PROP Use_MFC 2
|
||||
# PROP Use_Debug_Libraries 1
|
||||
# PROP Output_Dir "Debug"
|
||||
# PROP Intermediate_Dir "Debug"
|
||||
# PROP Ignore_Export_Lib 0
|
||||
# PROP Target_Dir ""
|
||||
# ADD BASE CPP /nologo /MTd /W3 /Gm /GX /Zi /Od /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /YX /FD /c
|
||||
# ADD CPP /nologo /MDd /W3 /GX /Z7 /Od /I "." /I "../include" /D "DB_TCL_SUPPORT" /D "CONFIG_TEST" /D "WIN32" /D "_DEBUG" /D "_WINDOWS" /D "DB_CREATE_DLL" /D "_WINDLL" /D "_AFXDLL" /YX"config.h" /FD /c
|
||||
# SUBTRACT CPP /Fr
|
||||
# ADD BASE MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD MTL /nologo /D "_DEBUG" /mktyplib203 /o NUL /win32
|
||||
# ADD BASE RSC /l 0x409 /d "_DEBUG"
|
||||
# ADD RSC /l 0x409 /d "_DEBUG" /d "_AFXDLL"
|
||||
BSC32=bscmake.exe
|
||||
# ADD BASE BSC32 /nologo
|
||||
# ADD BSC32 /nologo
|
||||
LINK32=link.exe
|
||||
# ADD BASE LINK32 kernel32.lib user32.lib gdi32.lib winspool.lib comdlg32.lib advapi32.lib shell32.lib ole32.lib oleaut32.lib uuid.lib odbc32.lib odbccp32.lib /nologo /subsystem:windows /dll /debug /machine:I386 /pdbtype:sept
|
||||
# ADD LINK32 Debug/libdb32d.lib tcl83d.lib /nologo /base:"0x13000000" /subsystem:windows /dll /pdb:none /debug /machine:I386 /out:"Debug/libdb_tcl@DB_VERSION_MAJOR@@DB_VERSION_MINOR@d.dll" /fixed:no
|
||||
|
||||
!ENDIF
|
||||
|
||||
# Begin Target
|
||||
|
||||
# Name "@project_name@ - Win32 Release"
|
||||
# Name "@project_name@ - Win32 Debug"
|
||||
@SOURCE_FILES@
|
||||
# End Target
|
||||
# End Project
|
||||
272
bdb/clib/getcwd.c
Normal file
272
bdb/clib/getcwd.c
Normal file
@@ -0,0 +1,272 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1989, 1991, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: getcwd.c,v 11.7 2000/11/30 00:58:30 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#include <sys/stat.h>
|
||||
|
||||
#if HAVE_DIRENT_H
|
||||
# include <dirent.h>
|
||||
# define NAMLEN(dirent) strlen((dirent)->d_name)
|
||||
#else
|
||||
# define dirent direct
|
||||
# define NAMLEN(dirent) (dirent)->d_namlen
|
||||
# if HAVE_SYS_NDIR_H
|
||||
# include <sys/ndir.h>
|
||||
# endif
|
||||
# if HAVE_SYS_DIR_H
|
||||
# include <sys/dir.h>
|
||||
# endif
|
||||
# if HAVE_NDIR_H
|
||||
# include <ndir.h>
|
||||
# endif
|
||||
#endif
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
|
||||
#define ISDOT(dp) \
|
||||
(dp->d_name[0] == '.' && (dp->d_name[1] == '\0' || \
|
||||
(dp->d_name[1] == '.' && dp->d_name[2] == '\0')))
|
||||
|
||||
#ifndef dirfd
|
||||
#define dirfd(dirp) ((dirp)->dd_fd)
|
||||
#endif
|
||||
|
||||
/*
|
||||
* getcwd --
|
||||
* Get the current working directory.
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_GETCWD
|
||||
* PUBLIC: char *getcwd __P((char *, size_t));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
char *
|
||||
getcwd(pt, size)
|
||||
char *pt;
|
||||
size_t size;
|
||||
{
|
||||
register struct dirent *dp;
|
||||
register DIR *dir;
|
||||
register dev_t dev;
|
||||
register ino_t ino;
|
||||
register int first;
|
||||
register char *bpt, *bup;
|
||||
struct stat s;
|
||||
dev_t root_dev;
|
||||
ino_t root_ino;
|
||||
size_t ptsize, upsize;
|
||||
int ret, save_errno;
|
||||
char *ept, *eup, *up;
|
||||
|
||||
/*
|
||||
* If no buffer specified by the user, allocate one as necessary.
|
||||
* If a buffer is specified, the size has to be non-zero. The path
|
||||
* is built from the end of the buffer backwards.
|
||||
*/
|
||||
if (pt) {
|
||||
ptsize = 0;
|
||||
if (!size) {
|
||||
__os_set_errno(EINVAL);
|
||||
return (NULL);
|
||||
}
|
||||
if (size == 1) {
|
||||
__os_set_errno(ERANGE);
|
||||
return (NULL);
|
||||
}
|
||||
ept = pt + size;
|
||||
} else {
|
||||
if ((ret =
|
||||
__os_malloc(NULL, ptsize = 1024 - 4, NULL, &pt)) != 0) {
|
||||
__os_set_errno(ret);
|
||||
return (NULL);
|
||||
}
|
||||
ept = pt + ptsize;
|
||||
}
|
||||
bpt = ept - 1;
|
||||
*bpt = '\0';
|
||||
|
||||
/*
|
||||
* Allocate bytes (1024 - malloc space) for the string of "../"'s.
|
||||
* Should always be enough (it's 340 levels). If it's not, allocate
|
||||
* as necessary. Special case the first stat, it's ".", not "..".
|
||||
*/
|
||||
if ((ret = __os_malloc(NULL, upsize = 1024 - 4, NULL, &up)) != 0)
|
||||
goto err;
|
||||
eup = up + 1024;
|
||||
bup = up;
|
||||
up[0] = '.';
|
||||
up[1] = '\0';
|
||||
|
||||
/* Save root values, so know when to stop. */
|
||||
if (stat("/", &s))
|
||||
goto err;
|
||||
root_dev = s.st_dev;
|
||||
root_ino = s.st_ino;
|
||||
|
||||
__os_set_errno(0); /* XXX readdir has no error return. */
|
||||
|
||||
for (first = 1;; first = 0) {
|
||||
/* Stat the current level. */
|
||||
if (lstat(up, &s))
|
||||
goto err;
|
||||
|
||||
/* Save current node values. */
|
||||
ino = s.st_ino;
|
||||
dev = s.st_dev;
|
||||
|
||||
/* Check for reaching root. */
|
||||
if (root_dev == dev && root_ino == ino) {
|
||||
*--bpt = PATH_SEPARATOR[0];
|
||||
/*
|
||||
* It's unclear that it's a requirement to copy the
|
||||
* path to the beginning of the buffer, but it's always
|
||||
* been that way and stuff would probably break.
|
||||
*/
|
||||
bcopy(bpt, pt, ept - bpt);
|
||||
__os_free(up, upsize);
|
||||
return (pt);
|
||||
}
|
||||
|
||||
/*
|
||||
* Build pointer to the parent directory, allocating memory
|
||||
* as necessary. Max length is 3 for "../", the largest
|
||||
* possible component name, plus a trailing NULL.
|
||||
*/
|
||||
if (bup + 3 + MAXNAMLEN + 1 >= eup) {
|
||||
if (__os_realloc(NULL, upsize *= 2, NULL, &up) != 0)
|
||||
goto err;
|
||||
bup = up;
|
||||
eup = up + upsize;
|
||||
}
|
||||
*bup++ = '.';
|
||||
*bup++ = '.';
|
||||
*bup = '\0';
|
||||
|
||||
/* Open and stat parent directory. */
|
||||
if (!(dir = opendir(up)) || fstat(dirfd(dir), &s))
|
||||
goto err;
|
||||
|
||||
/* Add trailing slash for next directory. */
|
||||
*bup++ = PATH_SEPARATOR[0];
|
||||
|
||||
/*
|
||||
* If it's a mount point, have to stat each element because
|
||||
* the inode number in the directory is for the entry in the
|
||||
* parent directory, not the inode number of the mounted file.
|
||||
*/
|
||||
save_errno = 0;
|
||||
if (s.st_dev == dev) {
|
||||
for (;;) {
|
||||
if (!(dp = readdir(dir)))
|
||||
goto notfound;
|
||||
if (dp->d_fileno == ino)
|
||||
break;
|
||||
}
|
||||
} else
|
||||
for (;;) {
|
||||
if (!(dp = readdir(dir)))
|
||||
goto notfound;
|
||||
if (ISDOT(dp))
|
||||
continue;
|
||||
bcopy(dp->d_name, bup, dp->d_namlen + 1);
|
||||
|
||||
/* Save the first error for later. */
|
||||
if (lstat(up, &s)) {
|
||||
if (save_errno == 0)
|
||||
save_errno = __os_get_errno();
|
||||
__os_set_errno(0);
|
||||
continue;
|
||||
}
|
||||
if (s.st_dev == dev && s.st_ino == ino)
|
||||
break;
|
||||
}
|
||||
|
||||
/*
|
||||
* Check for length of the current name, preceding slash,
|
||||
* leading slash.
|
||||
*/
|
||||
if (bpt - pt < dp->d_namlen + (first ? 1 : 2)) {
|
||||
size_t len, off;
|
||||
|
||||
if (!ptsize) {
|
||||
__os_set_errno(ERANGE);
|
||||
goto err;
|
||||
}
|
||||
off = bpt - pt;
|
||||
len = ept - bpt;
|
||||
if (__os_realloc(NULL, ptsize *= 2, NULL, &pt) != 0)
|
||||
goto err;
|
||||
bpt = pt + off;
|
||||
ept = pt + ptsize;
|
||||
bcopy(bpt, ept - len, len);
|
||||
bpt = ept - len;
|
||||
}
|
||||
if (!first)
|
||||
*--bpt = PATH_SEPARATOR[0];
|
||||
bpt -= dp->d_namlen;
|
||||
bcopy(dp->d_name, bpt, dp->d_namlen);
|
||||
(void)closedir(dir);
|
||||
|
||||
/* Truncate any file name. */
|
||||
*bup = '\0';
|
||||
}
|
||||
|
||||
notfound:
|
||||
/*
|
||||
* If readdir set errno, use it, not any saved error; otherwise,
|
||||
* didn't find the current directory in its parent directory, set
|
||||
* errno to ENOENT.
|
||||
*/
|
||||
if (__os_get_errno() == 0)
|
||||
__os_set_errno(save_errno == 0 ? ENOENT : save_errno);
|
||||
/* FALLTHROUGH */
|
||||
err:
|
||||
if (ptsize)
|
||||
__os_free(pt, ptsize);
|
||||
__os_free(up, upsize);
|
||||
return (NULL);
|
||||
}
|
||||
139
bdb/clib/getopt.c
Normal file
139
bdb/clib/getopt.c
Normal file
@@ -0,0 +1,139 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1987, 1993, 1994
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: getopt.c,v 11.4 2000/02/14 02:59:40 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
|
||||
int opterr = 1, /* if error message should be printed */
|
||||
optind = 1, /* index into parent argv vector */
|
||||
optopt, /* character checked for validity */
|
||||
optreset; /* reset getopt */
|
||||
char *optarg; /* argument associated with option */
|
||||
|
||||
#undef BADCH
|
||||
#define BADCH (int)'?'
|
||||
#undef BADARG
|
||||
#define BADARG (int)':'
|
||||
#undef EMSG
|
||||
#define EMSG ""
|
||||
|
||||
/*
|
||||
* getopt --
|
||||
* Parse argc/argv argument vector.
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_GETOPT
|
||||
* PUBLIC: int getopt __P((int, char * const *, const char *));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
int
|
||||
getopt(nargc, nargv, ostr)
|
||||
int nargc;
|
||||
char * const *nargv;
|
||||
const char *ostr;
|
||||
{
|
||||
static char *progname;
|
||||
static char *place = EMSG; /* option letter processing */
|
||||
char *oli; /* option letter list index */
|
||||
|
||||
if (!progname) {
|
||||
if ((progname = __db_rpath(*nargv)) == NULL)
|
||||
progname = *nargv;
|
||||
else
|
||||
++progname;
|
||||
}
|
||||
|
||||
if (optreset || !*place) { /* update scanning pointer */
|
||||
optreset = 0;
|
||||
if (optind >= nargc || *(place = nargv[optind]) != '-') {
|
||||
place = EMSG;
|
||||
return (EOF);
|
||||
}
|
||||
if (place[1] && *++place == '-') { /* found "--" */
|
||||
++optind;
|
||||
place = EMSG;
|
||||
return (EOF);
|
||||
}
|
||||
} /* option letter okay? */
|
||||
if ((optopt = (int)*place++) == (int)':' ||
|
||||
!(oli = strchr(ostr, optopt))) {
|
||||
/*
|
||||
* if the user didn't specify '-' as an option,
|
||||
* assume it means EOF.
|
||||
*/
|
||||
if (optopt == (int)'-')
|
||||
return (EOF);
|
||||
if (!*place)
|
||||
++optind;
|
||||
if (opterr && *ostr != ':')
|
||||
(void)fprintf(stderr,
|
||||
"%s: illegal option -- %c\n", progname, optopt);
|
||||
return (BADCH);
|
||||
}
|
||||
if (*++oli != ':') { /* don't need argument */
|
||||
optarg = NULL;
|
||||
if (!*place)
|
||||
++optind;
|
||||
}
|
||||
else { /* need an argument */
|
||||
if (*place) /* no white space */
|
||||
optarg = place;
|
||||
else if (nargc <= ++optind) { /* no arg */
|
||||
place = EMSG;
|
||||
if (*ostr == ':')
|
||||
return (BADARG);
|
||||
if (opterr)
|
||||
(void)fprintf(stderr,
|
||||
"%s: option requires an argument -- %c\n",
|
||||
progname, optopt);
|
||||
return (BADCH);
|
||||
}
|
||||
else /* white space */
|
||||
optarg = nargv[optind];
|
||||
place = EMSG;
|
||||
++optind;
|
||||
}
|
||||
return (optopt); /* dump back option letter */
|
||||
}
|
||||
67
bdb/clib/memcmp.c
Normal file
67
bdb/clib/memcmp.c
Normal file
@@ -0,0 +1,67 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: memcmp.c,v 11.5 2000/02/24 21:58:12 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* memcmp --
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_MEMCMP
|
||||
* PUBLIC: int memcmp __P((const void *, const void *, size_t));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
int
|
||||
memcmp(s1, s2, n)
|
||||
char *s1, *s2;
|
||||
size_t n;
|
||||
{
|
||||
if (n != 0) {
|
||||
unsigned char *p1 = (unsigned char *)s1,
|
||||
*p2 = (unsigned char *)s2;
|
||||
do {
|
||||
if (*p1++ != *p2++)
|
||||
return (*--p1 - *--p2);
|
||||
} while (--n != 0);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
155
bdb/clib/memmove.c
Normal file
155
bdb/clib/memmove.c
Normal file
@@ -0,0 +1,155 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1990, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: memmove.c,v 11.4 2000/02/14 02:59:40 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* sizeof(word) MUST BE A POWER OF TWO
|
||||
* SO THAT wmask BELOW IS ALL ONES
|
||||
*/
|
||||
typedef int word; /* "word" used for optimal copy speed */
|
||||
|
||||
#undef wsize
|
||||
#define wsize sizeof(word)
|
||||
#undef wmask
|
||||
#define wmask (wsize - 1)
|
||||
|
||||
/*
|
||||
* Copy a block of memory, handling overlap.
|
||||
* This is the routine that actually implements
|
||||
* (the portable versions of) bcopy, memcpy, and memmove.
|
||||
*/
|
||||
#ifdef MEMCOPY
|
||||
/*
|
||||
* PUBLIC: #ifndef HAVE_MEMCPY
|
||||
* PUBLIC: void *memcpy __P((void *, const void *, size_t));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
void *
|
||||
memcpy(dst0, src0, length)
|
||||
#else
|
||||
#ifdef MEMMOVE
|
||||
/*
|
||||
* PUBLIC: #ifndef HAVE_MEMMOVE
|
||||
* PUBLIC: void *memmove __P((void *, const void *, size_t));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
void *
|
||||
memmove(dst0, src0, length)
|
||||
#else
|
||||
void
|
||||
bcopy(src0, dst0, length)
|
||||
#endif
|
||||
#endif
|
||||
void *dst0;
|
||||
const void *src0;
|
||||
register size_t length;
|
||||
{
|
||||
register char *dst = dst0;
|
||||
register const char *src = src0;
|
||||
register size_t t;
|
||||
|
||||
if (length == 0 || dst == src) /* nothing to do */
|
||||
goto done;
|
||||
|
||||
/*
|
||||
* Macros: loop-t-times; and loop-t-times, t>0
|
||||
*/
|
||||
#undef TLOOP
|
||||
#define TLOOP(s) if (t) TLOOP1(s)
|
||||
#undef TLOOP1
|
||||
#define TLOOP1(s) do { s; } while (--t)
|
||||
|
||||
if ((unsigned long)dst < (unsigned long)src) {
|
||||
/*
|
||||
* Copy forward.
|
||||
*/
|
||||
t = (int)src; /* only need low bits */
|
||||
if ((t | (int)dst) & wmask) {
|
||||
/*
|
||||
* Try to align operands. This cannot be done
|
||||
* unless the low bits match.
|
||||
*/
|
||||
if ((t ^ (int)dst) & wmask || length < wsize)
|
||||
t = length;
|
||||
else
|
||||
t = wsize - (t & wmask);
|
||||
length -= t;
|
||||
TLOOP1(*dst++ = *src++);
|
||||
}
|
||||
/*
|
||||
* Copy whole words, then mop up any trailing bytes.
|
||||
*/
|
||||
t = length / wsize;
|
||||
TLOOP(*(word *)dst = *(word *)src; src += wsize; dst += wsize);
|
||||
t = length & wmask;
|
||||
TLOOP(*dst++ = *src++);
|
||||
} else {
|
||||
/*
|
||||
* Copy backwards. Otherwise essentially the same.
|
||||
* Alignment works as before, except that it takes
|
||||
* (t&wmask) bytes to align, not wsize-(t&wmask).
|
||||
*/
|
||||
src += length;
|
||||
dst += length;
|
||||
t = (int)src;
|
||||
if ((t | (int)dst) & wmask) {
|
||||
if ((t ^ (int)dst) & wmask || length <= wsize)
|
||||
t = length;
|
||||
else
|
||||
t &= wmask;
|
||||
length -= t;
|
||||
TLOOP1(*--dst = *--src);
|
||||
}
|
||||
t = length / wsize;
|
||||
TLOOP(src -= wsize; dst -= wsize; *(word *)dst = *(word *)src);
|
||||
t = length & wmask;
|
||||
TLOOP(*--dst = *--src);
|
||||
}
|
||||
done:
|
||||
#if defined(MEMCOPY) || defined(MEMMOVE)
|
||||
return (dst0);
|
||||
#else
|
||||
return;
|
||||
#endif
|
||||
}
|
||||
32
bdb/clib/raise.c
Normal file
32
bdb/clib/raise.c
Normal file
@@ -0,0 +1,32 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: raise.c,v 11.3 2000/02/14 02:59:41 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <signal.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* raise --
|
||||
* Send a signal to the current process.
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_RAISE
|
||||
* PUBLIC: int raise __P((int));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
int
|
||||
raise(s)
|
||||
int s;
|
||||
{
|
||||
return (kill(getpid(), s));
|
||||
}
|
||||
61
bdb/clib/snprintf.c
Normal file
61
bdb/clib/snprintf.c
Normal file
@@ -0,0 +1,61 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: snprintf.c,v 11.5 2000/12/22 19:38:37 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
|
||||
/*
|
||||
* snprintf --
|
||||
* Bounded version of sprintf.
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_SNPRINTF
|
||||
* PUBLIC: int snprintf __P((char *, size_t, const char *, ...));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
#ifndef HAVE_SNPRINTF
|
||||
int
|
||||
#ifdef __STDC__
|
||||
snprintf(char *str, size_t n, const char *fmt, ...)
|
||||
#else
|
||||
snprintf(str, n, fmt, va_alist)
|
||||
char *str;
|
||||
size_t n;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
int rval;
|
||||
|
||||
COMPQUIET(n, 0);
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
#ifdef SPRINTF_RET_CHARPNT
|
||||
(void)vsprintf(str, fmt, ap);
|
||||
va_end(ap);
|
||||
return (strlen(str));
|
||||
#else
|
||||
rval = vsprintf(str, fmt, ap);
|
||||
va_end(ap);
|
||||
return (rval);
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
102
bdb/clib/strcasecmp.c
Normal file
102
bdb/clib/strcasecmp.c
Normal file
@@ -0,0 +1,102 @@
|
||||
/*
|
||||
* Copyright (c) 1987, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. All advertising materials mentioning features or use of this software
|
||||
* must display the following acknowledgement:
|
||||
* This product includes software developed by the University of
|
||||
* California, Berkeley and its contributors.
|
||||
* 4. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: strcasecmp.c,v 1.4 2000/03/24 22:31:31 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
/*
|
||||
* This array is designed for mapping upper and lower case letter
|
||||
* together for a case independent comparison. The mappings are
|
||||
* based upon ascii character sequences.
|
||||
*/
|
||||
static const unsigned char charmap[] = {
|
||||
'\000', '\001', '\002', '\003', '\004', '\005', '\006', '\007',
|
||||
'\010', '\011', '\012', '\013', '\014', '\015', '\016', '\017',
|
||||
'\020', '\021', '\022', '\023', '\024', '\025', '\026', '\027',
|
||||
'\030', '\031', '\032', '\033', '\034', '\035', '\036', '\037',
|
||||
'\040', '\041', '\042', '\043', '\044', '\045', '\046', '\047',
|
||||
'\050', '\051', '\052', '\053', '\054', '\055', '\056', '\057',
|
||||
'\060', '\061', '\062', '\063', '\064', '\065', '\066', '\067',
|
||||
'\070', '\071', '\072', '\073', '\074', '\075', '\076', '\077',
|
||||
'\100', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\133', '\134', '\135', '\136', '\137',
|
||||
'\140', '\141', '\142', '\143', '\144', '\145', '\146', '\147',
|
||||
'\150', '\151', '\152', '\153', '\154', '\155', '\156', '\157',
|
||||
'\160', '\161', '\162', '\163', '\164', '\165', '\166', '\167',
|
||||
'\170', '\171', '\172', '\173', '\174', '\175', '\176', '\177',
|
||||
'\200', '\201', '\202', '\203', '\204', '\205', '\206', '\207',
|
||||
'\210', '\211', '\212', '\213', '\214', '\215', '\216', '\217',
|
||||
'\220', '\221', '\222', '\223', '\224', '\225', '\226', '\227',
|
||||
'\230', '\231', '\232', '\233', '\234', '\235', '\236', '\237',
|
||||
'\240', '\241', '\242', '\243', '\244', '\245', '\246', '\247',
|
||||
'\250', '\251', '\252', '\253', '\254', '\255', '\256', '\257',
|
||||
'\260', '\261', '\262', '\263', '\264', '\265', '\266', '\267',
|
||||
'\270', '\271', '\272', '\273', '\274', '\275', '\276', '\277',
|
||||
'\300', '\301', '\302', '\303', '\304', '\305', '\306', '\307',
|
||||
'\310', '\311', '\312', '\313', '\314', '\315', '\316', '\317',
|
||||
'\320', '\321', '\322', '\323', '\324', '\325', '\326', '\327',
|
||||
'\330', '\331', '\332', '\333', '\334', '\335', '\336', '\337',
|
||||
'\340', '\341', '\342', '\343', '\344', '\345', '\346', '\347',
|
||||
'\350', '\351', '\352', '\353', '\354', '\355', '\356', '\357',
|
||||
'\360', '\361', '\362', '\363', '\364', '\365', '\366', '\367',
|
||||
'\370', '\371', '\372', '\373', '\374', '\375', '\376', '\377',
|
||||
};
|
||||
|
||||
/*
|
||||
* strcasecmp --
|
||||
* Do strcmp(3) in a case-insensitive manner.
|
||||
*
|
||||
* PUBLIC: int strcasecmp __P((const char *, const char *));
|
||||
*/
|
||||
int
|
||||
strcasecmp(s1, s2)
|
||||
const char *s1, *s2;
|
||||
{
|
||||
register const unsigned char *cm = charmap,
|
||||
*us1 = (const unsigned char *)s1,
|
||||
*us2 = (const unsigned char *)s2;
|
||||
|
||||
while (cm[*us1] == cm[*us2++])
|
||||
if (*us1++ == '\0')
|
||||
return (0);
|
||||
return (cm[*us1] - cm[*--us2]);
|
||||
}
|
||||
77
bdb/clib/strerror.c
Normal file
77
bdb/clib/strerror.c
Normal file
@@ -0,0 +1,77 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1988, 1993
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: strerror.c,v 11.4 2000/02/14 02:59:41 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
/*
|
||||
* strerror --
|
||||
* Return the string associated with an errno.
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_STRERROR
|
||||
* PUBLIC: char *strerror __P((int));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
char *
|
||||
strerror(num)
|
||||
int num;
|
||||
{
|
||||
extern int sys_nerr;
|
||||
extern char *sys_errlist[];
|
||||
#undef UPREFIX
|
||||
#define UPREFIX "Unknown error: "
|
||||
static char ebuf[40] = UPREFIX; /* 64-bit number + slop */
|
||||
int errnum;
|
||||
char *p, *t, tmp[40];
|
||||
|
||||
errnum = num; /* convert to unsigned */
|
||||
if (errnum < sys_nerr)
|
||||
return(sys_errlist[errnum]);
|
||||
|
||||
/* Do this by hand, so we don't include stdio(3). */
|
||||
t = tmp;
|
||||
do {
|
||||
*t++ = "0123456789"[errnum % 10];
|
||||
} while (errnum /= 10);
|
||||
for (p = ebuf + sizeof(UPREFIX) - 1;;) {
|
||||
*p++ = *--t;
|
||||
if (t <= tmp)
|
||||
break;
|
||||
}
|
||||
return(ebuf);
|
||||
}
|
||||
47
bdb/clib/vsnprintf.c
Normal file
47
bdb/clib/vsnprintf.c
Normal file
@@ -0,0 +1,47 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: vsnprintf.c,v 11.4 2000/05/18 19:24:59 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
|
||||
/*
|
||||
* vsnprintf --
|
||||
* Bounded version of vsprintf.
|
||||
*
|
||||
* PUBLIC: #ifndef HAVE_VSNPRINTF
|
||||
* PUBLIC: int vsnprintf();
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
#ifndef HAVE_VSNPRINTF
|
||||
int
|
||||
vsnprintf(str, n, fmt, ap)
|
||||
char *str;
|
||||
size_t n;
|
||||
const char *fmt;
|
||||
va_list ap;
|
||||
{
|
||||
COMPQUIET(n, 0);
|
||||
|
||||
#ifdef SPRINTF_RET_CHARPNT
|
||||
(void)vsprintf(str, fmt, ap);
|
||||
return (strlen(str));
|
||||
#else
|
||||
return (vsprintf(str, fmt, ap));
|
||||
#endif
|
||||
}
|
||||
#endif
|
||||
62
bdb/common/db_byteorder.c
Normal file
62
bdb/common/db_byteorder.c
Normal file
@@ -0,0 +1,62 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: db_byteorder.c,v 11.4 2000/11/30 00:58:31 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#ifdef HAVE_ENDIAN_H
|
||||
#include <endian.h>
|
||||
#if BYTE_ORDER == BIG_ENDIAN
|
||||
#define WORDS_BIGENDIAN 1
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
/*
|
||||
* __db_byteorder --
|
||||
* Return if we need to do byte swapping, checking for illegal
|
||||
* values.
|
||||
*
|
||||
* PUBLIC: int __db_byteorder __P((DB_ENV *, int));
|
||||
*/
|
||||
int
|
||||
__db_byteorder(dbenv, lorder)
|
||||
DB_ENV *dbenv;
|
||||
int lorder;
|
||||
{
|
||||
switch (lorder) {
|
||||
case 0:
|
||||
break;
|
||||
case 1234:
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
return (DB_SWAPBYTES);
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
case 4321:
|
||||
#if defined(WORDS_BIGENDIAN)
|
||||
break;
|
||||
#else
|
||||
return (DB_SWAPBYTES);
|
||||
#endif
|
||||
default:
|
||||
__db_err(dbenv,
|
||||
"unsupported byte order, only big and little-endian supported");
|
||||
return (EINVAL);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
544
bdb/common/db_err.c
Normal file
544
bdb/common/db_err.c
Normal file
@@ -0,0 +1,544 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: db_err.c,v 11.38 2001/01/22 21:50:25 sue Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdio.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_shash.h"
|
||||
#include "lock.h"
|
||||
#include "lock_ext.h"
|
||||
#include "log.h"
|
||||
#include "log_ext.h"
|
||||
#include "mp.h"
|
||||
#include "mp_ext.h"
|
||||
#include "txn.h"
|
||||
#include "txn_ext.h"
|
||||
#include "clib_ext.h"
|
||||
#include "common_ext.h"
|
||||
#include "db_auto.h"
|
||||
|
||||
static void __db_errcall __P((const DB_ENV *, int, int, const char *, va_list));
|
||||
static void __db_errfile __P((const DB_ENV *, int, int, const char *, va_list));
|
||||
|
||||
/*
|
||||
* __db_fchk --
|
||||
* General flags checking routine.
|
||||
*
|
||||
* PUBLIC: int __db_fchk __P((DB_ENV *, const char *, u_int32_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__db_fchk(dbenv, name, flags, ok_flags)
|
||||
DB_ENV *dbenv;
|
||||
const char *name;
|
||||
u_int32_t flags, ok_flags;
|
||||
{
|
||||
return (LF_ISSET(~ok_flags) ? __db_ferr(dbenv, name, 0) : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_fcchk --
|
||||
* General combination flags checking routine.
|
||||
*
|
||||
* PUBLIC: int __db_fcchk
|
||||
* PUBLIC: __P((DB_ENV *, const char *, u_int32_t, u_int32_t, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__db_fcchk(dbenv, name, flags, flag1, flag2)
|
||||
DB_ENV *dbenv;
|
||||
const char *name;
|
||||
u_int32_t flags, flag1, flag2;
|
||||
{
|
||||
return (LF_ISSET(flag1) &&
|
||||
LF_ISSET(flag2) ? __db_ferr(dbenv, name, 1) : 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_ferr --
|
||||
* Common flag errors.
|
||||
*
|
||||
* PUBLIC: int __db_ferr __P((const DB_ENV *, const char *, int));
|
||||
*/
|
||||
int
|
||||
__db_ferr(dbenv, name, iscombo)
|
||||
const DB_ENV *dbenv;
|
||||
const char *name;
|
||||
int iscombo;
|
||||
{
|
||||
__db_err(dbenv, "illegal flag %sspecified to %s",
|
||||
iscombo ? "combination " : "", name);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_pgerr --
|
||||
* Error when unable to retrieve a specified page.
|
||||
*
|
||||
* PUBLIC: int __db_pgerr __P((DB *, db_pgno_t));
|
||||
*/
|
||||
int
|
||||
__db_pgerr(dbp, pgno)
|
||||
DB *dbp;
|
||||
db_pgno_t pgno;
|
||||
{
|
||||
/*
|
||||
* Three things are certain:
|
||||
* Death, taxes, and lost data.
|
||||
* Guess which has occurred.
|
||||
*/
|
||||
__db_err(dbp->dbenv,
|
||||
"unable to create/retrieve page %lu", (u_long)pgno);
|
||||
return (__db_panic(dbp->dbenv, EIO));
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_pgfmt --
|
||||
* Error when a page has the wrong format.
|
||||
*
|
||||
* PUBLIC: int __db_pgfmt __P((DB *, db_pgno_t));
|
||||
*/
|
||||
int
|
||||
__db_pgfmt(dbp, pgno)
|
||||
DB *dbp;
|
||||
db_pgno_t pgno;
|
||||
{
|
||||
__db_err(dbp->dbenv,
|
||||
"page %lu: illegal page type or format", (u_long)pgno);
|
||||
return (__db_panic(dbp->dbenv, EINVAL));
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_eopnotsup --
|
||||
* Common operation not supported message.
|
||||
*
|
||||
* PUBLIC: int __db_eopnotsup __P((const DB_ENV *));
|
||||
*/
|
||||
int
|
||||
__db_eopnotsup(dbenv)
|
||||
const DB_ENV *dbenv;
|
||||
{
|
||||
__db_err(dbenv, "operation not supported");
|
||||
#ifdef EOPNOTSUPP
|
||||
return (EOPNOTSUPP);
|
||||
#else
|
||||
return (EINVAL);
|
||||
#endif
|
||||
}
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
/*
|
||||
* __db_assert --
|
||||
* Error when an assertion fails. Only checked if #DIAGNOSTIC defined.
|
||||
*
|
||||
* PUBLIC: #ifdef DIAGNOSTIC
|
||||
* PUBLIC: void __db_assert __P((const char *, const char *, int));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
void
|
||||
__db_assert(failedexpr, file, line)
|
||||
const char *failedexpr, *file;
|
||||
int line;
|
||||
{
|
||||
(void)fprintf(stderr,
|
||||
"__db_assert: \"%s\" failed: file \"%s\", line %d\n",
|
||||
failedexpr, file, line);
|
||||
fflush(stderr);
|
||||
|
||||
/* We want a stack trace of how this could possibly happen. */
|
||||
abort();
|
||||
|
||||
/* NOTREACHED */
|
||||
}
|
||||
#endif
|
||||
|
||||
/*
|
||||
* __db_panic_msg --
|
||||
* Just report that someone else paniced.
|
||||
*
|
||||
* PUBLIC: int __db_panic_msg __P((DB_ENV *));
|
||||
*/
|
||||
int
|
||||
__db_panic_msg(dbenv)
|
||||
DB_ENV *dbenv;
|
||||
{
|
||||
__db_err(dbenv, "region error detected; run recovery.");
|
||||
return (DB_RUNRECOVERY);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_panic --
|
||||
* Lock out the tree due to unrecoverable error.
|
||||
*
|
||||
* PUBLIC: int __db_panic __P((DB_ENV *, int));
|
||||
*/
|
||||
int
|
||||
__db_panic(dbenv, errval)
|
||||
DB_ENV *dbenv;
|
||||
int errval;
|
||||
{
|
||||
|
||||
if (dbenv != NULL) {
|
||||
((REGENV *)((REGINFO *)dbenv->reginfo)->primary)->panic = 1;
|
||||
|
||||
dbenv->db_panic = errval;
|
||||
|
||||
__db_err(dbenv, "PANIC: %s", db_strerror(errval));
|
||||
|
||||
if (dbenv->db_paniccall != NULL)
|
||||
dbenv->db_paniccall(dbenv, errval);
|
||||
}
|
||||
|
||||
/*
|
||||
* Chaos reigns within.
|
||||
* Reflect, repent, and reboot.
|
||||
* Order shall return.
|
||||
*/
|
||||
return (DB_RUNRECOVERY);
|
||||
}
|
||||
|
||||
/*
|
||||
* db_strerror --
|
||||
* ANSI C strerror(3) for DB.
|
||||
*/
|
||||
char *
|
||||
db_strerror(error)
|
||||
int error;
|
||||
{
|
||||
if (error == 0)
|
||||
return ("Successful return: 0");
|
||||
if (error > 0)
|
||||
return (strerror(error));
|
||||
|
||||
/*
|
||||
* !!!
|
||||
* The Tcl API requires that some of these return strings be compared
|
||||
* against strings stored in application scripts. So, any of these
|
||||
* errors that do not invariably result in a Tcl exception may not be
|
||||
* altered.
|
||||
*/
|
||||
switch (error) {
|
||||
case DB_INCOMPLETE:
|
||||
return ("DB_INCOMPLETE: Cache flush was unable to complete");
|
||||
case DB_KEYEMPTY:
|
||||
return ("DB_KEYEMPTY: Non-existent key/data pair");
|
||||
case DB_KEYEXIST:
|
||||
return ("DB_KEYEXIST: Key/data pair already exists");
|
||||
case DB_LOCK_DEADLOCK:
|
||||
return
|
||||
("DB_LOCK_DEADLOCK: Locker killed to resolve a deadlock");
|
||||
case DB_LOCK_NOTGRANTED:
|
||||
return ("DB_LOCK_NOTGRANTED: Lock not granted");
|
||||
case DB_NOSERVER:
|
||||
return ("DB_NOSERVER: Fatal error, no server");
|
||||
case DB_NOSERVER_HOME:
|
||||
return ("DB_NOSERVER_HOME: Home unrecognized at server");
|
||||
case DB_NOSERVER_ID:
|
||||
return ("DB_NOSERVER_ID: Identifier unrecognized at server");
|
||||
case DB_NOTFOUND:
|
||||
return ("DB_NOTFOUND: No matching key/data pair found");
|
||||
case DB_OLD_VERSION:
|
||||
return ("DB_OLDVERSION: Database requires a version upgrade");
|
||||
case DB_RUNRECOVERY:
|
||||
return ("DB_RUNRECOVERY: Fatal error, run database recovery");
|
||||
case DB_VERIFY_BAD:
|
||||
return ("DB_VERIFY_BAD: Database verification failed");
|
||||
default: {
|
||||
/*
|
||||
* !!!
|
||||
* Room for a 64-bit number + slop. This buffer is only used
|
||||
* if we're given an unknown error, which should never happen.
|
||||
* Note, however, we're no longer thread-safe if it does.
|
||||
*/
|
||||
static char ebuf[40];
|
||||
|
||||
(void)snprintf(ebuf, sizeof(ebuf), "Unknown error: %d", error);
|
||||
return (ebuf);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_err --
|
||||
* Standard DB error routine. The same as db_errx, except that we
|
||||
* don't write to stderr if no output mechanism was specified.
|
||||
*
|
||||
* PUBLIC: void __db_err __P((const DB_ENV *, const char *, ...));
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
__db_err(const DB_ENV *dbenv, const char *fmt, ...)
|
||||
#else
|
||||
__db_err(dbenv, fmt, va_alist)
|
||||
const DB_ENV *dbenv;
|
||||
const char *fmt;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
/*
|
||||
XXX
|
||||
Log the message.
|
||||
|
||||
It would be nice to automatically log the error into the log files
|
||||
if the application is configured for logging. The problem is that
|
||||
if we currently hold the log region mutex, we will self-deadlock.
|
||||
Leave all the structure in place, but turned off. I'd like to fix
|
||||
this in the future by detecting if we have the log region already
|
||||
locked (e.g., a flag in the environment handle), or perhaps even
|
||||
have a finer granularity so that the only calls to __db_err we
|
||||
can't log are those made while we have the current log buffer
|
||||
locked, or perhaps have a separate buffer into which we log error
|
||||
messages.
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
__db_real_log(dbenv, NULL, "db_err", 0, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
#endif
|
||||
*/
|
||||
|
||||
/* Tell the application. */
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
__db_real_err(dbenv, 0, 0, 0, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_real_err --
|
||||
* All the DB error routines end up here.
|
||||
*
|
||||
* PUBLIC: void __db_real_err
|
||||
* PUBLIC: __P((const DB_ENV *, int, int, int, const char *, va_list));
|
||||
*/
|
||||
void
|
||||
__db_real_err(dbenv, error, error_set, stderr_default, fmt, ap)
|
||||
const DB_ENV *dbenv;
|
||||
int error, error_set, stderr_default;
|
||||
const char *fmt;
|
||||
va_list ap;
|
||||
{
|
||||
/* Call the user's callback function, if specified. */
|
||||
if (dbenv != NULL && dbenv->db_errcall != NULL)
|
||||
__db_errcall(dbenv, error, error_set, fmt, ap);
|
||||
|
||||
/* Write to the user's file descriptor, if specified. */
|
||||
if (dbenv != NULL && dbenv->db_errfile != NULL)
|
||||
__db_errfile(dbenv, error, error_set, fmt, ap);
|
||||
|
||||
/*
|
||||
* If we have a default and we didn't do either of the above, write
|
||||
* to the default.
|
||||
*/
|
||||
if (stderr_default && (dbenv == NULL ||
|
||||
(dbenv->db_errcall == NULL && dbenv->db_errfile == NULL)))
|
||||
__db_errfile(dbenv, error, error_set, fmt, ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_errcall --
|
||||
* Do the error message work for callback functions.
|
||||
*/
|
||||
static void
|
||||
__db_errcall(dbenv, error, error_set, fmt, ap)
|
||||
const DB_ENV *dbenv;
|
||||
int error, error_set;
|
||||
const char *fmt;
|
||||
va_list ap;
|
||||
{
|
||||
char *p;
|
||||
char __errbuf[2048]; /* !!!: END OF THE STACK DON'T TRUST SPRINTF. */
|
||||
|
||||
p = __errbuf;
|
||||
if (fmt != NULL) {
|
||||
p += vsnprintf(__errbuf, sizeof(__errbuf), fmt, ap);
|
||||
if (error_set) {
|
||||
*p++ = ':';
|
||||
*p++ = ' ';
|
||||
}
|
||||
}
|
||||
if (error_set)
|
||||
(void)strcpy(p, db_strerror(error));
|
||||
|
||||
dbenv->db_errcall(dbenv->db_errpfx, __errbuf);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_errfile --
|
||||
* Do the error message work for FILE *s.
|
||||
*/
|
||||
static void
|
||||
__db_errfile(dbenv, error, error_set, fmt, ap)
|
||||
const DB_ENV *dbenv;
|
||||
int error, error_set;
|
||||
const char *fmt;
|
||||
va_list ap;
|
||||
{
|
||||
FILE *fp;
|
||||
|
||||
fp = dbenv == NULL ||
|
||||
dbenv->db_errfile == NULL ? stderr : dbenv->db_errfile;
|
||||
|
||||
if (dbenv != NULL && dbenv->db_errpfx != NULL)
|
||||
(void)fprintf(fp, "%s: ", dbenv->db_errpfx);
|
||||
if (fmt != NULL) {
|
||||
(void)vfprintf(fp, fmt, ap);
|
||||
if (error_set)
|
||||
(void)fprintf(fp, ": ");
|
||||
}
|
||||
if (error_set)
|
||||
(void)fprintf(fp, "%s", db_strerror(error));
|
||||
(void)fprintf(fp, "\n");
|
||||
(void)fflush(fp);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_logmsg --
|
||||
* Write information into the DB log.
|
||||
*
|
||||
* PUBLIC: void __db_logmsg __P((const DB_ENV *,
|
||||
* PUBLIC: DB_TXN *, const char *, u_int32_t, const char *, ...));
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
__db_logmsg(const DB_ENV *dbenv,
|
||||
DB_TXN *txnid, const char *opname, u_int32_t flags, const char *fmt, ...)
|
||||
#else
|
||||
__db_logmsg(dbenv, txnid, opname, flags, fmt, va_alist)
|
||||
const DB_ENV *dbenv;
|
||||
DB_TXN *txnid;
|
||||
const char *opname, *fmt;
|
||||
u_int32_t flags;
|
||||
va_dcl
|
||||
#endif
|
||||
{
|
||||
va_list ap;
|
||||
|
||||
#ifdef __STDC__
|
||||
va_start(ap, fmt);
|
||||
#else
|
||||
va_start(ap);
|
||||
#endif
|
||||
__db_real_log(dbenv, txnid, opname, flags, fmt, ap);
|
||||
|
||||
va_end(ap);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_real_log --
|
||||
* Write information into the DB log.
|
||||
*
|
||||
* PUBLIC: void __db_real_log __P((const DB_ENV *,
|
||||
* PUBLIC: DB_TXN *, const char *, u_int32_t, const char *, va_list ap));
|
||||
*/
|
||||
void
|
||||
#ifdef __STDC__
|
||||
__db_real_log(const DB_ENV *dbenv, DB_TXN *txnid,
|
||||
const char *opname, u_int32_t flags, const char *fmt, va_list ap)
|
||||
#else
|
||||
__db_real_log(dbenv, txnid, opname, flags, fmt, ap)
|
||||
const DB_ENV *dbenv;
|
||||
DB_TXN *txnid;
|
||||
const char *opname, *fmt;
|
||||
u_int32_t flags;
|
||||
va_list ap;
|
||||
#endif
|
||||
{
|
||||
DBT opdbt, msgdbt;
|
||||
DB_LSN lsn;
|
||||
char __logbuf[2048]; /* !!!: END OF THE STACK DON'T TRUST SPRINTF. */
|
||||
|
||||
if (!LOGGING_ON(dbenv))
|
||||
return;
|
||||
|
||||
memset(&opdbt, 0, sizeof(opdbt));
|
||||
opdbt.data = (void *)opname;
|
||||
opdbt.size = strlen(opname) + 1;
|
||||
|
||||
memset(&msgdbt, 0, sizeof(msgdbt));
|
||||
msgdbt.data = __logbuf;
|
||||
msgdbt.size = vsnprintf(__logbuf, sizeof(__logbuf), fmt, ap);
|
||||
|
||||
/*
|
||||
* XXX
|
||||
* Explicitly discard the const. Otherwise, we have to const DB_ENV
|
||||
* references throughout the logging subsystem.
|
||||
*/
|
||||
__db_debug_log(
|
||||
(DB_ENV *)dbenv, txnid, &lsn, flags, &opdbt, -1, &msgdbt, NULL, 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_unknown_flag -- report internal error
|
||||
*
|
||||
* PUBLIC: int __db_unknown_flag __P((DB_ENV *, char *, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__db_unknown_flag(dbenv, routine, flag)
|
||||
DB_ENV *dbenv;
|
||||
char *routine;
|
||||
u_int32_t flag;
|
||||
{
|
||||
__db_err(dbenv, "%s: Unknown flag: 0x%x", routine, flag);
|
||||
DB_ASSERT(0);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_unknown_type -- report internal error
|
||||
*
|
||||
* PUBLIC: int __db_unknown_type __P((DB_ENV *, char *, u_int32_t));
|
||||
*/
|
||||
int
|
||||
__db_unknown_type(dbenv, routine, type)
|
||||
DB_ENV *dbenv;
|
||||
char *routine;
|
||||
u_int32_t type;
|
||||
{
|
||||
__db_err(dbenv, "%s: Unknown db type: 0x%x", routine, type);
|
||||
DB_ASSERT(0);
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
#ifdef DIAGNOSTIC
|
||||
/*
|
||||
* __db_missing_txn_err --
|
||||
* Cannot combine operations with and without transactions.
|
||||
*
|
||||
* PUBLIC: #ifdef DIAGNOSTIC
|
||||
* PUBLIC: int __db_missing_txn_err __P((DB_ENV *));
|
||||
* PUBLIC: #endif
|
||||
*/
|
||||
int
|
||||
__db_missing_txn_err(dbenv)
|
||||
DB_ENV *dbenv;
|
||||
{
|
||||
__db_err(dbenv,
|
||||
"DB handle previously used in transaction, missing transaction handle.");
|
||||
return (EINVAL);
|
||||
}
|
||||
#endif
|
||||
159
bdb/common/db_getlong.c
Normal file
159
bdb/common/db_getlong.c
Normal file
@@ -0,0 +1,159 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: db_getlong.c,v 11.11 2000/12/22 19:16:04 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <limits.h>
|
||||
#include <stdlib.h>
|
||||
#include <string.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "clib_ext.h"
|
||||
|
||||
/*
|
||||
* __db_getlong --
|
||||
* Return a long value inside of basic parameters.
|
||||
*
|
||||
* PUBLIC: int __db_getlong
|
||||
* PUBLIC: __P((DB *, const char *, char *, long, long, long *));
|
||||
*/
|
||||
int
|
||||
__db_getlong(dbp, progname, p, min, max, storep)
|
||||
DB *dbp;
|
||||
const char *progname;
|
||||
char *p;
|
||||
long min, max, *storep;
|
||||
{
|
||||
long val;
|
||||
char *end;
|
||||
|
||||
__os_set_errno(0);
|
||||
val = strtol(p, &end, 10);
|
||||
if ((val == LONG_MIN || val == LONG_MAX) &&
|
||||
__os_get_errno() == ERANGE) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: %s\n", progname, p, strerror(ERANGE));
|
||||
exit(1);
|
||||
}
|
||||
dbp->err(dbp, ERANGE, "%s", p);
|
||||
return (1);
|
||||
}
|
||||
if (p[0] == '\0' || (end[0] != '\0' && end[0] != '\n')) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: Invalid numeric argument\n", progname, p);
|
||||
exit(1);
|
||||
}
|
||||
dbp->errx(dbp, "%s: Invalid numeric argument", p);
|
||||
return (1);
|
||||
}
|
||||
if (val < min) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: Less than minimum value (%ld)\n",
|
||||
progname, p, min);
|
||||
exit(1);
|
||||
}
|
||||
dbp->errx(dbp, "%s: Less than minimum value (%ld)", p, min);
|
||||
return (1);
|
||||
}
|
||||
if (val > max) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: Greater than maximum value (%ld)\n",
|
||||
progname, p, max);
|
||||
exit(1);
|
||||
}
|
||||
dbp->errx(dbp, "%s: Greater than maximum value (%ld)", p, max);
|
||||
exit(1);
|
||||
}
|
||||
*storep = val;
|
||||
return (0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_getulong --
|
||||
* Return an unsigned long value inside of basic parameters.
|
||||
*
|
||||
* PUBLIC: int __db_getulong
|
||||
* PUBLIC: __P((DB *, const char *, char *, u_long, u_long, u_long *));
|
||||
*/
|
||||
int
|
||||
__db_getulong(dbp, progname, p, min, max, storep)
|
||||
DB *dbp;
|
||||
const char *progname;
|
||||
char *p;
|
||||
u_long min, max, *storep;
|
||||
{
|
||||
#if !defined(HAVE_STRTOUL)
|
||||
COMPQUIET(min, 0);
|
||||
|
||||
return (__db_getlong(dbp, progname, p, 0, max, (long *)storep));
|
||||
#else
|
||||
u_long val;
|
||||
char *end;
|
||||
|
||||
__os_set_errno(0);
|
||||
val = strtoul(p, &end, 10);
|
||||
if (val == ULONG_MAX && __os_get_errno() == ERANGE) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: %s\n", progname, p, strerror(ERANGE));
|
||||
exit(1);
|
||||
}
|
||||
dbp->err(dbp, ERANGE, "%s", p);
|
||||
return (1);
|
||||
}
|
||||
if (p[0] == '\0' || (end[0] != '\0' && end[0] != '\n')) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: Invalid numeric argument\n", progname, p);
|
||||
exit(1);
|
||||
}
|
||||
dbp->errx(dbp, "%s: Invalid numeric argument", p);
|
||||
return (1);
|
||||
}
|
||||
if (val < min) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: Less than minimum value (%ld)\n",
|
||||
progname, p, min);
|
||||
exit(1);
|
||||
}
|
||||
dbp->errx(dbp, "%s: Less than minimum value (%ld)", p, min);
|
||||
return (1);
|
||||
}
|
||||
|
||||
/*
|
||||
* We allow a 0 to substitute as a max value for ULONG_MAX because
|
||||
* 1) accepting only a 0 value is unlikely to be necessary, and 2)
|
||||
* we don't want callers to have to use ULONG_MAX explicitly, as it
|
||||
* may not exist on all platforms.
|
||||
*/
|
||||
if (max != 0 && val > max) {
|
||||
if (dbp == NULL) {
|
||||
fprintf(stderr,
|
||||
"%s: %s: Greater than maximum value (%ld)\n",
|
||||
progname, p, max);
|
||||
exit(1);
|
||||
}
|
||||
dbp->errx(dbp, "%s: Greater than maximum value (%ld)", p, max);
|
||||
exit(1);
|
||||
}
|
||||
*storep = val;
|
||||
return (0);
|
||||
#endif /* !defined(HAVE_STRTOUL) */
|
||||
}
|
||||
65
bdb/common/db_log2.c
Normal file
65
bdb/common/db_log2.c
Normal file
@@ -0,0 +1,65 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
/*
|
||||
* Copyright (c) 1995, 1996
|
||||
* The Regents of the University of California. All rights reserved.
|
||||
*
|
||||
* This code is derived from software contributed to Berkeley by
|
||||
* Margo Seltzer.
|
||||
*
|
||||
* Redistribution and use in source and binary forms, with or without
|
||||
* modification, are permitted provided that the following conditions
|
||||
* are met:
|
||||
* 1. Redistributions of source code must retain the above copyright
|
||||
* notice, this list of conditions and the following disclaimer.
|
||||
* 2. Redistributions in binary form must reproduce the above copyright
|
||||
* notice, this list of conditions and the following disclaimer in the
|
||||
* documentation and/or other materials provided with the distribution.
|
||||
* 3. Neither the name of the University nor the names of its contributors
|
||||
* may be used to endorse or promote products derived from this software
|
||||
* without specific prior written permission.
|
||||
*
|
||||
* THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND
|
||||
* ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
|
||||
* IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
|
||||
* ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE
|
||||
* FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
|
||||
* DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
|
||||
* OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
|
||||
* HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
|
||||
* LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
|
||||
* OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
|
||||
* SUCH DAMAGE.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: db_log2.c,v 11.4 2000/02/14 02:59:41 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
/*
|
||||
* PUBLIC: u_int32_t __db_log2 __P((u_int32_t));
|
||||
*/
|
||||
u_int32_t
|
||||
__db_log2(num)
|
||||
u_int32_t num;
|
||||
{
|
||||
u_int32_t i, limit;
|
||||
|
||||
limit = 1;
|
||||
for (i = 0; limit < num; limit = limit << 1)
|
||||
++i;
|
||||
return (i);
|
||||
}
|
||||
63
bdb/common/util_log.c
Normal file
63
bdb/common/util_log.c
Normal file
@@ -0,0 +1,63 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: util_log.c,v 1.7 2000/11/30 00:58:31 ubell Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <stdlib.h>
|
||||
#if TIME_WITH_SYS_TIME
|
||||
#include <sys/time.h>
|
||||
#include <time.h>
|
||||
#else
|
||||
#if HAVE_SYS_TIME_H
|
||||
#include <sys/time.h>
|
||||
#else
|
||||
#include <time.h>
|
||||
#endif
|
||||
#endif
|
||||
|
||||
#include <string.h>
|
||||
#include <unistd.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
/*
|
||||
* __db_util_logset --
|
||||
* Log that we're running.
|
||||
*
|
||||
* PUBLIC: int __db_util_logset __P((const char *, char *));
|
||||
*/
|
||||
int
|
||||
__db_util_logset(progname, fname)
|
||||
const char *progname;
|
||||
char *fname;
|
||||
{
|
||||
FILE *fp;
|
||||
time_t now;
|
||||
|
||||
if ((fp = fopen(fname, "w")) == NULL)
|
||||
goto err;
|
||||
|
||||
(void)time(&now);
|
||||
fprintf(fp, "%s: %lu %s", progname, (u_long)getpid(), ctime(&now));
|
||||
|
||||
if (fclose(fp) == EOF)
|
||||
goto err;
|
||||
|
||||
return (0);
|
||||
|
||||
err: fprintf(stderr, "%s: %s: %s\n", progname, fname, strerror(errno));
|
||||
return (1);
|
||||
}
|
||||
87
bdb/common/util_sig.c
Normal file
87
bdb/common/util_sig.c
Normal file
@@ -0,0 +1,87 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: util_sig.c,v 1.3 2000/04/28 19:32:00 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#ifndef NO_SYSTEM_INCLUDES
|
||||
#include <sys/types.h>
|
||||
|
||||
#include <signal.h>
|
||||
#endif
|
||||
|
||||
#include "db_int.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
static int interrupt;
|
||||
static void onint __P((int));
|
||||
|
||||
/*
|
||||
* onint --
|
||||
* Interrupt signal handler.
|
||||
*/
|
||||
static void
|
||||
onint(signo)
|
||||
int signo;
|
||||
{
|
||||
if ((interrupt = signo) == 0)
|
||||
interrupt = SIGINT;
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_util_siginit --
|
||||
*
|
||||
* PUBLIC: void __db_util_siginit __P((void));
|
||||
*/
|
||||
void
|
||||
__db_util_siginit()
|
||||
{
|
||||
/*
|
||||
* Initialize the set of signals for which we want to clean up.
|
||||
* Generally, we try not to leave the shared regions locked if
|
||||
* we can.
|
||||
*/
|
||||
#ifdef SIGHUP
|
||||
(void)signal(SIGHUP, onint);
|
||||
#endif
|
||||
(void)signal(SIGINT, onint);
|
||||
#ifdef SIGPIPE
|
||||
(void)signal(SIGPIPE, onint);
|
||||
#endif
|
||||
(void)signal(SIGTERM, onint);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_util_interrupted --
|
||||
* Return if interrupted.
|
||||
*
|
||||
* PUBLIC: int __db_util_interrupted __P((void));
|
||||
*/
|
||||
int
|
||||
__db_util_interrupted()
|
||||
{
|
||||
return (interrupt != 0);
|
||||
}
|
||||
|
||||
/*
|
||||
* __db_util_sigresend --
|
||||
*
|
||||
* PUBLIC: void __db_util_sigresend __P((void));
|
||||
*/
|
||||
void
|
||||
__db_util_sigresend()
|
||||
{
|
||||
/* Resend any caught signal. */
|
||||
if (__db_util_interrupted != 0) {
|
||||
(void)signal(interrupt, SIG_DFL);
|
||||
(void)raise(interrupt);
|
||||
/* NOTREACHED */
|
||||
}
|
||||
}
|
||||
671
bdb/cxx/cxx_app.cpp
Normal file
671
bdb/cxx/cxx_app.cpp
Normal file
@@ -0,0 +1,671 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_app.cpp,v 11.38 2000/12/21 20:30:18 dda Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
#include <stdio.h> // needed for set_error_stream
|
||||
#include <string.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
#include "db_int.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
// The reason for a static variable is that some structures
|
||||
// (like Dbts) have no connection to any Db or DbEnv, so when
|
||||
// errors occur in their methods, we must have some reasonable
|
||||
// way to determine whether to throw or return errors.
|
||||
//
|
||||
// This variable is taken from flags whenever a DbEnv is constructed.
|
||||
// Normally there is only one DbEnv per program, and even if not,
|
||||
// there is typically a single policy of throwing or returning.
|
||||
//
|
||||
static int last_known_error_policy = ON_ERROR_UNKNOWN;
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbEnv //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
ostream *DbEnv::error_stream_ = 0;
|
||||
|
||||
// _destroy_check is called when there is a user error in a
|
||||
// destructor, specifically when close has not been called for an
|
||||
// object (even if it was never opened). If the DbEnv is being
|
||||
// destroyed we cannot always use DbEnv::error_stream_, so we'll
|
||||
// use cerr in that case.
|
||||
//
|
||||
void DbEnv::_destroy_check(const char *str, int isDbEnv)
|
||||
{
|
||||
ostream *out;
|
||||
|
||||
out = error_stream_;
|
||||
if (out == NULL || isDbEnv == 1)
|
||||
out = &cerr;
|
||||
|
||||
(*out) << "DbEnv::_destroy_check: open " << str << " object destroyed\n";
|
||||
}
|
||||
|
||||
// A truism for the DbEnv object is that there is a valid
|
||||
// DB_ENV handle from the constructor until close().
|
||||
// After the close, the DB_ENV handle is invalid and
|
||||
// no operations are permitted on the DbEnv (other than
|
||||
// destructor). Leaving the DbEnv handle open and not
|
||||
// doing a close is generally considered an error.
|
||||
//
|
||||
// We used to allow DbEnv objects to be closed and reopened.
|
||||
// This implied always keeping a valid DB_ENV object, and
|
||||
// coordinating the open objects between Db/DbEnv turned
|
||||
// out to be overly complicated. Now we do not allow this.
|
||||
|
||||
DbEnv::DbEnv(u_int32_t flags)
|
||||
: imp_(0)
|
||||
, construct_error_(0)
|
||||
, construct_flags_(flags)
|
||||
, tx_recover_callback_(0)
|
||||
, paniccall_callback_(0)
|
||||
{
|
||||
int err;
|
||||
|
||||
COMPQUIET(err, 0);
|
||||
if ((err = initialize(0)) != 0)
|
||||
DB_ERROR("DbEnv::DbEnv", err, error_policy());
|
||||
}
|
||||
|
||||
DbEnv::DbEnv(DB_ENV *env, u_int32_t flags)
|
||||
: imp_(0)
|
||||
, construct_error_(0)
|
||||
, construct_flags_(flags)
|
||||
, tx_recover_callback_(0)
|
||||
, paniccall_callback_(0)
|
||||
{
|
||||
int err;
|
||||
|
||||
COMPQUIET(err, 0);
|
||||
if ((err = initialize(env)) != 0)
|
||||
DB_ERROR("DbEnv::DbEnv", err, error_policy());
|
||||
}
|
||||
|
||||
// Note: if the user has not closed, we call _destroy_check
|
||||
// to warn against this non-safe programming practice,
|
||||
// and call close anyway.
|
||||
//
|
||||
DbEnv::~DbEnv()
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if (env != NULL) {
|
||||
_destroy_check("DbEnv", 1);
|
||||
(void)env->close(env, 0);
|
||||
|
||||
// extra safety
|
||||
cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
// called by Db destructor when the DbEnv is owned by DB.
|
||||
void DbEnv::cleanup()
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if (env != NULL) {
|
||||
env->cj_internal = 0;
|
||||
imp_ = 0;
|
||||
}
|
||||
}
|
||||
|
||||
int DbEnv::close(u_int32_t flags)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err, init_err;
|
||||
|
||||
COMPQUIET(init_err, 0);
|
||||
|
||||
// after a close (no matter if success or failure),
|
||||
// the underlying DB_ENV object must not be accessed,
|
||||
// so we clean up in advance.
|
||||
//
|
||||
cleanup();
|
||||
|
||||
// It's safe to throw an error after the close,
|
||||
// since our error mechanism does not peer into
|
||||
// the DB* structures.
|
||||
//
|
||||
if ((err = env->close(env, flags)) != 0) {
|
||||
DB_ERROR("DbEnv::close", err, error_policy());
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
void DbEnv::err(int error, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
va_start(args, format);
|
||||
__db_real_err(env, error, 1, 1, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void DbEnv::errx(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
va_start(args, format);
|
||||
__db_real_err(env, 0, 0, 1, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
// used internally during constructor
|
||||
// to associate an existing DB_ENV with this DbEnv,
|
||||
// or create a new one. If there is an error,
|
||||
// construct_error_ is set; this is examined during open.
|
||||
//
|
||||
int DbEnv::initialize(DB_ENV *env)
|
||||
{
|
||||
int err;
|
||||
|
||||
last_known_error_policy = error_policy();
|
||||
|
||||
if (env == 0) {
|
||||
// Create a new DB_ENV environment.
|
||||
if ((err = ::db_env_create(&env,
|
||||
construct_flags_ & ~DB_CXX_NO_EXCEPTIONS)) != 0) {
|
||||
construct_error_ = err;
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
imp_ = wrap(env);
|
||||
env->cj_internal = this; // for DB_ENV* to DbEnv* conversion
|
||||
return (0);
|
||||
}
|
||||
|
||||
// Return a tristate value corresponding to whether we should
|
||||
// throw exceptions on errors:
|
||||
// ON_ERROR_RETURN
|
||||
// ON_ERROR_THROW
|
||||
// ON_ERROR_UNKNOWN
|
||||
//
|
||||
int DbEnv::error_policy()
|
||||
{
|
||||
if ((construct_flags_ & DB_CXX_NO_EXCEPTIONS) != 0) {
|
||||
return (ON_ERROR_RETURN);
|
||||
}
|
||||
else {
|
||||
return (ON_ERROR_THROW);
|
||||
}
|
||||
}
|
||||
|
||||
// If an error occurred during the constructor, report it now.
|
||||
// Otherwise, call the underlying DB->open method.
|
||||
//
|
||||
int DbEnv::open(const char *db_home, u_int32_t flags, int mode)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = construct_error_) != 0)
|
||||
DB_ERROR("Db::open", err, error_policy());
|
||||
else if ((err = env->open(env, db_home, flags, mode)) != 0)
|
||||
DB_ERROR("DbEnv::open", err, error_policy());
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::remove(const char *db_home, u_int32_t flags)
|
||||
{
|
||||
DB_ENV *env;
|
||||
int ret;
|
||||
|
||||
env = unwrap(this);
|
||||
|
||||
// after a remove (no matter if success or failure),
|
||||
// the underlying DB_ENV object must not be accessed,
|
||||
// so we clean up in advance.
|
||||
//
|
||||
cleanup();
|
||||
|
||||
if ((ret = env->remove(env, db_home, flags)) != 0)
|
||||
DB_ERROR("DbEnv::remove", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// Report an error associated with the DbEnv.
|
||||
// error_policy is one of:
|
||||
// ON_ERROR_THROW throw an error
|
||||
// ON_ERROR_RETURN do nothing here, the caller will return an error
|
||||
// ON_ERROR_UNKNOWN defer the policy to policy saved in DbEnv::DbEnv
|
||||
//
|
||||
void DbEnv::runtime_error(const char *caller, int error, int error_policy)
|
||||
{
|
||||
if (error_policy == ON_ERROR_UNKNOWN)
|
||||
error_policy = last_known_error_policy;
|
||||
if (error_policy == ON_ERROR_THROW) {
|
||||
// Creating and throwing the object in two separate
|
||||
// statements seems to be necessary for HP compilers.
|
||||
DbException except(caller, error);
|
||||
throw except;
|
||||
}
|
||||
}
|
||||
|
||||
// static method
|
||||
char *DbEnv::strerror(int error)
|
||||
{
|
||||
return (db_strerror(error));
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
void _stream_error_function_c(const char *prefix, char *message)
|
||||
{
|
||||
DbEnv::_stream_error_function(prefix, message);
|
||||
}
|
||||
|
||||
void DbEnv::_stream_error_function(const char *prefix, char *message)
|
||||
{
|
||||
// HP compilers need the extra casts, we don't know why.
|
||||
if (error_stream_) {
|
||||
if (prefix) {
|
||||
(*error_stream_) << prefix << (const char *)": ";
|
||||
}
|
||||
if (message) {
|
||||
(*error_stream_) << (const char *)message;
|
||||
}
|
||||
(*error_stream_) << (const char *)"\n";
|
||||
}
|
||||
}
|
||||
|
||||
// Note: This actually behaves a bit like a static function,
|
||||
// since DB_ENV.db_errcall has no information about which
|
||||
// db_env triggered the call. A user that has multiple DB_ENVs
|
||||
// will simply not be able to have different streams for each one.
|
||||
//
|
||||
void DbEnv::set_error_stream(ostream *stream)
|
||||
{
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
error_stream_ = stream;
|
||||
dbenv->set_errcall(dbenv, (stream == 0) ? 0 :
|
||||
_stream_error_function_c);
|
||||
}
|
||||
|
||||
// static method
|
||||
char *DbEnv::version(int *major, int *minor, int *patch)
|
||||
{
|
||||
return (db_version(major, minor, patch));
|
||||
}
|
||||
|
||||
// This is a variant of the DB_WO_ACCESS macro to define a simple set_
|
||||
// method calling the underlying C method, but unlike a simple
|
||||
// set method, it may return an error or raise an exception.
|
||||
// Note this macro expects that input _argspec is an argument
|
||||
// list element (e.g. "char *arg") defined in terms of "arg".
|
||||
//
|
||||
#define DB_DBENV_ACCESS(_name, _argspec) \
|
||||
\
|
||||
int DbEnv::set_##_name(_argspec) \
|
||||
{ \
|
||||
int ret; \
|
||||
DB_ENV *dbenv = unwrap(this); \
|
||||
\
|
||||
if ((ret = (*(dbenv->set_##_name))(dbenv, arg)) != 0) {\
|
||||
DB_ERROR("DbEnv::set_" # _name, ret, error_policy()); \
|
||||
} \
|
||||
return (ret); \
|
||||
}
|
||||
|
||||
#define DB_DBENV_ACCESS_NORET(_name, _argspec) \
|
||||
\
|
||||
void DbEnv::set_##_name(_argspec) \
|
||||
{ \
|
||||
DB_ENV *dbenv = unwrap(this); \
|
||||
\
|
||||
(*(dbenv->set_##_name))(dbenv, arg); \
|
||||
return; \
|
||||
}
|
||||
|
||||
DB_DBENV_ACCESS_NORET(errfile, FILE *arg)
|
||||
DB_DBENV_ACCESS_NORET(errpfx, const char *arg)
|
||||
|
||||
// We keep these alphabetical by field name,
|
||||
// for comparison with Java's list.
|
||||
//
|
||||
DB_DBENV_ACCESS(data_dir, const char *arg)
|
||||
DB_DBENV_ACCESS(lg_bsize, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(lg_dir, const char *arg)
|
||||
DB_DBENV_ACCESS(lg_max, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(lk_detect, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(lk_max, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(lk_max_lockers, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(lk_max_locks, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(lk_max_objects, u_int32_t arg)
|
||||
DB_DBENV_ACCESS(mp_mmapsize, size_t arg)
|
||||
DB_DBENV_ACCESS(mutexlocks, int arg)
|
||||
DB_DBENV_ACCESS(tmp_dir, const char *arg)
|
||||
DB_DBENV_ACCESS(tx_max, u_int32_t arg)
|
||||
|
||||
// Here are the set methods that don't fit the above mold.
|
||||
//
|
||||
extern "C" {
|
||||
typedef void (*db_errcall_fcn_type)
|
||||
(const char *, char *);
|
||||
};
|
||||
|
||||
void DbEnv::set_errcall(void (*arg)(const char *, char *))
|
||||
{
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
// XXX
|
||||
// We are casting from a function ptr declared with C++
|
||||
// linkage to one (same arg types) declared with C
|
||||
// linkage. It's hard to imagine a pair of C/C++
|
||||
// compilers from the same vendor for which this
|
||||
// won't work. Unfortunately, we can't use a
|
||||
// intercept function like the others since the
|
||||
// function does not have a (DbEnv*) as one of
|
||||
// the args. If this causes trouble, we can pull
|
||||
// the same trick we use in Java, namely stuffing
|
||||
// a (DbEnv*) pointer into the prefix. We're
|
||||
// avoiding this for the moment because it obfuscates.
|
||||
//
|
||||
(*(dbenv->set_errcall))(dbenv, (db_errcall_fcn_type)arg);
|
||||
}
|
||||
|
||||
int DbEnv::set_cachesize(u_int32_t gbytes, u_int32_t bytes, int ncache)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret =
|
||||
(*(dbenv->set_cachesize))(dbenv, gbytes, bytes, ncache)) != 0)
|
||||
DB_ERROR("DbEnv::set_cachesize", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int DbEnv::set_flags(u_int32_t flags, int onoff)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret = (dbenv->set_flags)(dbenv, flags, onoff)) != 0)
|
||||
DB_ERROR("DbEnv::set_flags", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int DbEnv::set_lk_conflicts(u_int8_t *lk_conflicts, int lk_max)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret = (*(dbenv->set_lk_conflicts))
|
||||
(dbenv, lk_conflicts, lk_max)) != 0)
|
||||
DB_ERROR("DbEnv::set_lk_conflicts", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// static method
|
||||
int DbEnv::set_pageyield(int arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = db_env_set_pageyield(arg)) != 0)
|
||||
DB_ERROR("DbEnv::set_pageyield", ret, last_known_error_policy);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// static method
|
||||
int DbEnv::set_panicstate(int arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = db_env_set_panicstate(arg)) != 0)
|
||||
DB_ERROR("DbEnv::set_panicstate", ret, last_known_error_policy);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// static method
|
||||
int DbEnv::set_region_init(int arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = db_env_set_region_init(arg)) != 0)
|
||||
DB_ERROR("DbEnv::set_region_init", ret, last_known_error_policy);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int DbEnv::set_server(char *host, long tsec, long ssec, u_int32_t flags)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret = dbenv->set_server(dbenv, host, tsec, ssec, flags)) != 0)
|
||||
DB_ERROR("DbEnv::set_server", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int DbEnv::set_shm_key(long shm_key)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret = dbenv->set_shm_key(dbenv, shm_key)) != 0)
|
||||
DB_ERROR("DbEnv::set_shm_key", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// static method
|
||||
int DbEnv::set_tas_spins(u_int32_t arg)
|
||||
{
|
||||
int ret;
|
||||
|
||||
if ((ret = db_env_set_tas_spins(arg)) != 0)
|
||||
DB_ERROR("DbEnv::set_tas_spins", ret, last_known_error_policy);
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int DbEnv::set_verbose(u_int32_t which, int onoff)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret = (*(dbenv->set_verbose))(dbenv, which, onoff)) != 0)
|
||||
DB_ERROR("DbEnv::set_verbose", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
int _tx_recover_intercept_c(DB_ENV *env, DBT *dbt,
|
||||
DB_LSN *lsn, db_recops op)
|
||||
{
|
||||
return (DbEnv::_tx_recover_intercept(env, dbt, lsn, op));
|
||||
}
|
||||
|
||||
int DbEnv::_tx_recover_intercept(DB_ENV *env, DBT *dbt,
|
||||
DB_LSN *lsn, db_recops op)
|
||||
{
|
||||
if (env == 0) {
|
||||
DB_ERROR("DbEnv::tx_recover_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return (EINVAL);
|
||||
}
|
||||
DbEnv *cxxenv = (DbEnv *)env->cj_internal;
|
||||
if (cxxenv == 0) {
|
||||
DB_ERROR("DbEnv::tx_recover_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return (EINVAL);
|
||||
}
|
||||
if (cxxenv->tx_recover_callback_ == 0) {
|
||||
DB_ERROR("DbEnv::tx_recover_callback", EINVAL, cxxenv->error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
Dbt *cxxdbt = (Dbt *)dbt;
|
||||
DbLsn *cxxlsn = (DbLsn *)lsn;
|
||||
return ((*cxxenv->tx_recover_callback_)(cxxenv, cxxdbt, cxxlsn, op));
|
||||
}
|
||||
|
||||
int DbEnv::set_tx_recover
|
||||
(int (*arg)(DbEnv *, Dbt *, DbLsn *, db_recops))
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
tx_recover_callback_ = arg;
|
||||
if ((ret =
|
||||
(*(dbenv->set_tx_recover))(dbenv, _tx_recover_intercept_c)) != 0)
|
||||
DB_ERROR("DbEnv::set_tx_recover", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int DbEnv::set_tx_timestamp(time_t *timestamp)
|
||||
{
|
||||
int ret;
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
if ((ret = dbenv->set_tx_timestamp(dbenv, timestamp)) != 0)
|
||||
DB_ERROR("DbEnv::set_tx_timestamp", ret, error_policy());
|
||||
|
||||
return (ret);
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
void _paniccall_intercept_c(DB_ENV *env, int errval)
|
||||
{
|
||||
DbEnv::_paniccall_intercept(env, errval);
|
||||
}
|
||||
|
||||
void DbEnv::_paniccall_intercept(DB_ENV *env, int errval)
|
||||
{
|
||||
if (env == 0) {
|
||||
DB_ERROR("DbEnv::paniccall_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
}
|
||||
DbEnv *cxxenv = (DbEnv *)env->cj_internal;
|
||||
if (cxxenv == 0) {
|
||||
DB_ERROR("DbEnv::paniccall_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
}
|
||||
if (cxxenv->paniccall_callback_ == 0) {
|
||||
DB_ERROR("DbEnv::paniccall_callback", EINVAL, cxxenv->error_policy());
|
||||
}
|
||||
(*cxxenv->paniccall_callback_)(cxxenv, errval);
|
||||
}
|
||||
|
||||
int DbEnv::set_paniccall(void (*arg)(DbEnv *, int))
|
||||
{
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
paniccall_callback_ = arg;
|
||||
|
||||
return ((*(dbenv->set_paniccall))(dbenv, _paniccall_intercept_c));
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
int _recovery_init_intercept_c(DB_ENV *env)
|
||||
{
|
||||
return (DbEnv::_recovery_init_intercept(env));
|
||||
}
|
||||
|
||||
int DbEnv::_recovery_init_intercept(DB_ENV *env)
|
||||
{
|
||||
if (env == 0) {
|
||||
DB_ERROR("DbEnv::recovery_init_callback", EINVAL,
|
||||
ON_ERROR_UNKNOWN);
|
||||
}
|
||||
DbEnv *cxxenv = (DbEnv *)env->cj_internal;
|
||||
if (cxxenv == 0) {
|
||||
DB_ERROR("DbEnv::recovery_init_callback", EINVAL,
|
||||
ON_ERROR_UNKNOWN);
|
||||
}
|
||||
if (cxxenv->recovery_init_callback_ == 0) {
|
||||
DB_ERROR("DbEnv::recovery_init_callback", EINVAL,
|
||||
cxxenv->error_policy());
|
||||
}
|
||||
return ((*cxxenv->recovery_init_callback_)(cxxenv));
|
||||
}
|
||||
|
||||
int DbEnv::set_recovery_init(int (*arg)(DbEnv *))
|
||||
{
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
recovery_init_callback_ = arg;
|
||||
|
||||
return ((*(dbenv->set_recovery_init))(dbenv, _recovery_init_intercept_c));
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
void _feedback_intercept_c(DB_ENV *env, int opcode, int pct)
|
||||
{
|
||||
DbEnv::_feedback_intercept(env, opcode, pct);
|
||||
}
|
||||
|
||||
void DbEnv::_feedback_intercept(DB_ENV *env, int opcode, int pct)
|
||||
{
|
||||
if (env == 0) {
|
||||
DB_ERROR("DbEnv::feedback_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
DbEnv *cxxenv = (DbEnv *)env->cj_internal;
|
||||
if (cxxenv == 0) {
|
||||
DB_ERROR("DbEnv::feedback_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
if (cxxenv->feedback_callback_ == 0) {
|
||||
DB_ERROR("DbEnv::feedback_callback", EINVAL,
|
||||
cxxenv->error_policy());
|
||||
return;
|
||||
}
|
||||
(*cxxenv->feedback_callback_)(cxxenv, opcode, pct);
|
||||
}
|
||||
|
||||
int DbEnv::set_feedback(void (*arg)(DbEnv *, int, int))
|
||||
{
|
||||
DB_ENV *dbenv = unwrap(this);
|
||||
|
||||
feedback_callback_ = arg;
|
||||
|
||||
return ((*(dbenv->set_feedback))(dbenv, _feedback_intercept_c));
|
||||
}
|
||||
132
bdb/cxx/cxx_except.cpp
Normal file
132
bdb/cxx/cxx_except.cpp
Normal file
@@ -0,0 +1,132 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_except.cpp,v 11.7 2000/09/21 15:05:45 dda Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <string.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
// tmpString is used to create strings on the stack
|
||||
//
|
||||
class tmpString
|
||||
{
|
||||
public:
|
||||
tmpString(const char *str1,
|
||||
const char *str2 = 0,
|
||||
const char *str3 = 0,
|
||||
const char *str4 = 0,
|
||||
const char *str5 = 0)
|
||||
{
|
||||
int len = strlen(str1);
|
||||
if (str2)
|
||||
len += strlen(str2);
|
||||
if (str3)
|
||||
len += strlen(str3);
|
||||
if (str4)
|
||||
len += strlen(str4);
|
||||
if (str5)
|
||||
len += strlen(str5);
|
||||
|
||||
s_ = new char[len+1];
|
||||
|
||||
strcpy(s_, str1);
|
||||
if (str2)
|
||||
strcat(s_, str2);
|
||||
if (str3)
|
||||
strcat(s_, str3);
|
||||
if (str4)
|
||||
strcat(s_, str4);
|
||||
if (str5)
|
||||
strcat(s_, str5);
|
||||
}
|
||||
~tmpString() { delete [] s_; }
|
||||
operator const char *() { return (s_); }
|
||||
|
||||
private:
|
||||
char *s_;
|
||||
};
|
||||
|
||||
// Note: would not be needed if we can inherit from exception
|
||||
// It does not appear to be possible to inherit from exception
|
||||
// with the current Microsoft library (VC5.0).
|
||||
//
|
||||
static char *dupString(const char *s)
|
||||
{
|
||||
char *r = new char[strlen(s)+1];
|
||||
strcpy(r, s);
|
||||
return (r);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbException //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DbException::~DbException()
|
||||
{
|
||||
if (what_)
|
||||
delete [] what_;
|
||||
}
|
||||
|
||||
DbException::DbException(int err)
|
||||
: err_(err)
|
||||
{
|
||||
what_ = dupString(db_strerror(err));
|
||||
}
|
||||
|
||||
DbException::DbException(const char *description)
|
||||
: err_(0)
|
||||
{
|
||||
what_ = dupString(tmpString(description));
|
||||
}
|
||||
|
||||
DbException::DbException(const char *prefix, int err)
|
||||
: err_(err)
|
||||
{
|
||||
what_ = dupString(tmpString(prefix, ": ", db_strerror(err)));
|
||||
}
|
||||
|
||||
DbException::DbException(const char *prefix1, const char *prefix2, int err)
|
||||
: err_(err)
|
||||
{
|
||||
what_ = dupString(tmpString(prefix1, ": ", prefix2, ": ", db_strerror(err)));
|
||||
}
|
||||
|
||||
DbException::DbException(const DbException &that)
|
||||
: err_(that.err_)
|
||||
{
|
||||
what_ = dupString(that.what_);
|
||||
}
|
||||
|
||||
DbException &DbException::operator = (const DbException &that)
|
||||
{
|
||||
if (this != &that) {
|
||||
err_ = that.err_;
|
||||
if (what_)
|
||||
delete [] what_;
|
||||
what_ = 0; // in case new throws exception
|
||||
what_ = dupString(that.what_);
|
||||
}
|
||||
return (*this);
|
||||
}
|
||||
|
||||
int DbException::get_errno() const
|
||||
{
|
||||
return (err_);
|
||||
}
|
||||
|
||||
const char *DbException::what() const
|
||||
{
|
||||
return (what_);
|
||||
}
|
||||
125
bdb/cxx/cxx_lock.cpp
Normal file
125
bdb/cxx/cxx_lock.cpp
Normal file
@@ -0,0 +1,125 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_lock.cpp,v 11.9 2000/09/21 15:05:45 dda Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
int DbEnv::lock_detect(u_int32_t flags, u_int32_t atype, int *aborted)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = ::lock_detect(env, flags, atype, aborted)) != 0) {
|
||||
DB_ERROR("DbEnv::lock_detect", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::lock_get(u_int32_t locker, u_int32_t flags, const Dbt *obj,
|
||||
db_lockmode_t lock_mode, DbLock *lock)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = ::lock_get(env, locker, flags, obj,
|
||||
lock_mode, &lock->lock_)) != 0) {
|
||||
DB_ERROR("DbEnv::lock_get", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::lock_id(u_int32_t *idp)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = ::lock_id(env, idp)) != 0) {
|
||||
DB_ERROR("DbEnv::lock_id", err, error_policy());
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::lock_stat(DB_LOCK_STAT **statp,
|
||||
db_malloc_fcn_type db_malloc_fcn)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = ::lock_stat(env, statp, db_malloc_fcn)) != 0) {
|
||||
DB_ERROR("DbEnv::lock_stat", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::lock_vec(u_int32_t locker, u_int32_t flags,
|
||||
DB_LOCKREQ list[],
|
||||
int nlist, DB_LOCKREQ **elist_returned)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = ::lock_vec(env, locker, flags, list,
|
||||
nlist, elist_returned)) != 0) {
|
||||
DB_ERROR("DbEnv::lock_vec", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbLock //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DbLock::DbLock(DB_LOCK value)
|
||||
: lock_(value)
|
||||
{
|
||||
}
|
||||
|
||||
DbLock::DbLock()
|
||||
{
|
||||
memset(&lock_, 0, sizeof(DB_LOCK));
|
||||
}
|
||||
|
||||
DbLock::DbLock(const DbLock &that)
|
||||
: lock_(that.lock_)
|
||||
{
|
||||
}
|
||||
|
||||
DbLock &DbLock::operator = (const DbLock &that)
|
||||
{
|
||||
lock_ = that.lock_;
|
||||
return (*this);
|
||||
}
|
||||
|
||||
int DbLock::put(DbEnv *env)
|
||||
{
|
||||
DB_ENV *envp = unwrap(env);
|
||||
|
||||
if (!env) {
|
||||
return (EINVAL); // handle never assigned
|
||||
}
|
||||
|
||||
int err;
|
||||
if ((err = lock_put(envp, &lock_)) != 0) {
|
||||
DB_ERROR("DbLock::put", err, env->error_policy());
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
125
bdb/cxx/cxx_log.cpp
Normal file
125
bdb/cxx/cxx_log.cpp
Normal file
@@ -0,0 +1,125 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_log.cpp,v 11.9 2000/09/21 15:05:45 dda Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbLog //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int DbEnv::log_archive(char **list[], u_int32_t flags,
|
||||
db_malloc_fcn_type db_malloc_fcn)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_archive(env, list, flags, db_malloc_fcn)) != 0) {
|
||||
DB_ERROR("DbEnv::log_archive", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_compare(const DbLsn *lsn0, const DbLsn *lsn1)
|
||||
{
|
||||
return (::log_compare(lsn0, lsn1));
|
||||
}
|
||||
|
||||
int DbEnv::log_file(DbLsn *lsn, char *namep, size_t len)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_file(env, lsn, namep, len)) != 0) {
|
||||
DB_ERROR("DbEnv::log_file", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_flush(const DbLsn *lsn)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_flush(env, lsn)) != 0) {
|
||||
DB_ERROR("DbEnv::log_flush", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_get(DbLsn *lsn, Dbt *data, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_get(env, lsn, data, flags)) != 0) {
|
||||
DB_ERROR("DbEnv::log_get", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_put(DbLsn *lsn, const Dbt *data, u_int32_t flags)
|
||||
{
|
||||
int err = 0;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_put(env, lsn, data, flags)) != 0) {
|
||||
DB_ERROR("DbEnv::log_put", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_register(Db *dbp, const char *name)
|
||||
{
|
||||
int err = 0;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_register(env, unwrap(dbp), name)) != 0) {
|
||||
DB_ERROR("DbEnv::log_register", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_stat(DB_LOG_STAT **spp, db_malloc_fcn_type db_malloc_fcn)
|
||||
{
|
||||
int err = 0;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_stat(env, spp, db_malloc_fcn)) != 0) {
|
||||
DB_ERROR("DbEnv::log_stat", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbEnv::log_unregister(Db *dbp)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
|
||||
if ((err = ::log_unregister(env, unwrap(dbp))) != 0) {
|
||||
DB_ERROR("DbEnv::log_unregister", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
180
bdb/cxx/cxx_mpool.cpp
Normal file
180
bdb/cxx/cxx_mpool.cpp
Normal file
@@ -0,0 +1,180 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_mpool.cpp,v 11.11 2000/09/21 15:05:45 dda Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbMpoolFile //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DbMpoolFile::DbMpoolFile()
|
||||
: imp_(0)
|
||||
{
|
||||
}
|
||||
|
||||
DbMpoolFile::~DbMpoolFile()
|
||||
{
|
||||
}
|
||||
|
||||
int DbMpoolFile::open(DbEnv *envp, const char *file,
|
||||
u_int32_t flags, int mode, size_t pagesize,
|
||||
DB_MPOOL_FINFO *finfop, DbMpoolFile **result)
|
||||
{
|
||||
int err;
|
||||
|
||||
DB_MPOOLFILE *mpf;
|
||||
DB_ENV *env = unwrap(envp);
|
||||
|
||||
if ((err = ::memp_fopen(env, file, flags, mode, pagesize,
|
||||
finfop, &mpf)) != 0) {
|
||||
DB_ERROR("DbMpoolFile::open", err, envp->error_policy());
|
||||
return (err);
|
||||
}
|
||||
*result = new DbMpoolFile();
|
||||
(*result)->imp_ = wrap(mpf);
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbMpoolFile::close()
|
||||
{
|
||||
DB_MPOOLFILE *mpf = unwrap(this);
|
||||
int err = 0;
|
||||
if (!mpf) {
|
||||
err = EINVAL;
|
||||
}
|
||||
else if ((err = ::memp_fclose(mpf)) != 0) {
|
||||
DB_ERROR("DbMpoolFile::close", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
imp_ = 0; // extra safety
|
||||
|
||||
// This may seem weird, but is legal as long as we don't access
|
||||
// any data before returning.
|
||||
//
|
||||
delete this;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int DbMpoolFile::get(db_pgno_t *pgnoaddr, u_int32_t flags, void *pagep)
|
||||
{
|
||||
DB_MPOOLFILE *mpf = unwrap(this);
|
||||
int err = 0;
|
||||
if (!mpf) {
|
||||
err = EINVAL;
|
||||
}
|
||||
else if ((err = ::memp_fget(mpf, pgnoaddr, flags, pagep)) != 0) {
|
||||
DB_ERROR("DbMpoolFile::get", err, ON_ERROR_UNKNOWN);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbMpoolFile::put(void *pgaddr, u_int32_t flags)
|
||||
{
|
||||
DB_MPOOLFILE *mpf = unwrap(this);
|
||||
int err = 0;
|
||||
if (!mpf) {
|
||||
err = EINVAL;
|
||||
}
|
||||
else if ((err = ::memp_fput(mpf, pgaddr, flags)) != 0) {
|
||||
DB_ERROR("DbMpoolFile::put", err, ON_ERROR_UNKNOWN);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbMpoolFile::set(void *pgaddr, u_int32_t flags)
|
||||
{
|
||||
DB_MPOOLFILE *mpf = unwrap(this);
|
||||
int err = 0;
|
||||
if (!mpf) {
|
||||
err = EINVAL;
|
||||
}
|
||||
else if ((err = ::memp_fset(mpf, pgaddr, flags)) != 0) {
|
||||
DB_ERROR("DbMpoolFile::set", err, ON_ERROR_UNKNOWN);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbMpoolFile::sync()
|
||||
{
|
||||
DB_MPOOLFILE *mpf = unwrap(this);
|
||||
int err = 0;
|
||||
if (!mpf) {
|
||||
err = EINVAL;
|
||||
}
|
||||
else if ((err = ::memp_fsync(mpf)) != 0 && err != DB_INCOMPLETE) {
|
||||
DB_ERROR("DbMpoolFile::sync", err, ON_ERROR_UNKNOWN);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbMpool //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int DbEnv::memp_register(int ftype,
|
||||
pgin_fcn_type pgin_fcn,
|
||||
pgout_fcn_type pgout_fcn)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err = 0;
|
||||
|
||||
if ((err = ::memp_register(env, ftype, pgin_fcn, pgout_fcn)) != 0) {
|
||||
DB_ERROR("DbEnv::memp_register", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::memp_stat(DB_MPOOL_STAT **gsp, DB_MPOOL_FSTAT ***fsp,
|
||||
db_malloc_fcn_type db_malloc_fcn)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err = 0;
|
||||
|
||||
if ((err = ::memp_stat(env, gsp, fsp, db_malloc_fcn)) != 0) {
|
||||
DB_ERROR("DbEnv::memp_stat", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::memp_sync(DbLsn *sn)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err = 0;
|
||||
|
||||
if ((err = ::memp_sync(env, sn)) != 0 && err != DB_INCOMPLETE) {
|
||||
DB_ERROR("DbEnv::memp_sync", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::memp_trickle(int pct, int *nwrotep)
|
||||
{
|
||||
DB_ENV *env = unwrap(this);
|
||||
int err = 0;
|
||||
|
||||
if ((err = ::memp_trickle(env, pct, nwrotep)) != 0) {
|
||||
DB_ERROR("DbEnv::memp_trickle", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
808
bdb/cxx/cxx_table.cpp
Normal file
808
bdb/cxx/cxx_table.cpp
Normal file
@@ -0,0 +1,808 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_table.cpp,v 11.35 2001/01/11 18:19:49 bostic Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
#include <string.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
#include "db_int.h"
|
||||
#include "db_page.h"
|
||||
#include "db_ext.h"
|
||||
#include "common_ext.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Db //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// A truism for the DbEnv object is that there is a valid
|
||||
// DB_ENV handle from the constructor until close().
|
||||
// After the close, the DB handle is invalid and
|
||||
// no operations are permitted on the Db (other than
|
||||
// destructor). Leaving the Db handle open and not
|
||||
// doing a close is generally considered an error.
|
||||
//
|
||||
// We used to allow Db objects to be closed and reopened.
|
||||
// This implied always keeping a valid DB object, and
|
||||
// coordinating the open objects between Db/DbEnv turned
|
||||
// out to be overly complicated. Now we do not allow this.
|
||||
|
||||
Db::Db(DbEnv *env, u_int32_t flags)
|
||||
: imp_(0)
|
||||
, env_(env)
|
||||
, construct_error_(0)
|
||||
, flags_(0)
|
||||
, construct_flags_(flags)
|
||||
{
|
||||
if (env_ == 0)
|
||||
flags_ |= DB_CXX_PRIVATE_ENV;
|
||||
initialize();
|
||||
}
|
||||
|
||||
// Note: if the user has not closed, we call _destroy_check
|
||||
// to warn against this non-safe programming practice.
|
||||
// We can't close, because the environment may already
|
||||
// be closed/destroyed.
|
||||
//
|
||||
Db::~Db()
|
||||
{
|
||||
DB *db;
|
||||
|
||||
db = unwrap(this);
|
||||
if (db != NULL) {
|
||||
DbEnv::_destroy_check("Db", 0);
|
||||
cleanup();
|
||||
}
|
||||
}
|
||||
|
||||
// private method to initialize during constructor.
|
||||
// initialize must create a backing DB object,
|
||||
// and if that creates a new DB_ENV, it must be tied to a new DbEnv.
|
||||
// If there is an error, construct_error_ is set; this is examined
|
||||
// during open.
|
||||
//
|
||||
int Db::initialize()
|
||||
{
|
||||
u_int32_t cxx_flags;
|
||||
DB *db;
|
||||
int err;
|
||||
DB_ENV *cenv = unwrap(env_);
|
||||
|
||||
cxx_flags = construct_flags_ & DB_CXX_NO_EXCEPTIONS;
|
||||
|
||||
// Create a new underlying DB object.
|
||||
// We rely on the fact that if a NULL DB_ENV* is given,
|
||||
// one is allocated by DB.
|
||||
//
|
||||
if ((err = db_create(&db, cenv,
|
||||
construct_flags_ & ~cxx_flags)) != 0) {
|
||||
construct_error_ = err;
|
||||
return (err);
|
||||
}
|
||||
|
||||
// Associate the DB with this object
|
||||
imp_ = wrap(db);
|
||||
db->cj_internal = this;
|
||||
|
||||
// Create a new DbEnv from a DB_ENV* if it was created locally.
|
||||
// It is deleted in Db::close().
|
||||
//
|
||||
if ((flags_ & DB_CXX_PRIVATE_ENV) != 0)
|
||||
env_ = new DbEnv(db->dbenv, cxx_flags);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
// private method to cleanup after destructor or during close.
|
||||
// If the environment was created by this Db object, we optionally
|
||||
// delete it, or return it so the caller can delete it after
|
||||
// last use.
|
||||
//
|
||||
void Db::cleanup()
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (db != NULL) {
|
||||
// extra safety
|
||||
db->cj_internal = 0;
|
||||
imp_ = 0;
|
||||
|
||||
// we must dispose of the DbEnv object if
|
||||
// we created it. This will be the case
|
||||
// if a NULL DbEnv was passed into the constructor.
|
||||
// The underlying DB_ENV object will be inaccessible
|
||||
// after the close, so we must clean it up now.
|
||||
//
|
||||
if ((flags_ & DB_CXX_PRIVATE_ENV) != 0) {
|
||||
env_->cleanup();
|
||||
delete env_;
|
||||
env_ = 0;
|
||||
}
|
||||
}
|
||||
construct_error_ = 0;
|
||||
}
|
||||
|
||||
// Return a tristate value corresponding to whether we should
|
||||
// throw exceptions on errors:
|
||||
// ON_ERROR_RETURN
|
||||
// ON_ERROR_THROW
|
||||
// ON_ERROR_UNKNOWN
|
||||
//
|
||||
int Db::error_policy()
|
||||
{
|
||||
if (env_ != NULL)
|
||||
return (env_->error_policy());
|
||||
else {
|
||||
// If the env_ is null, that means that the user
|
||||
// did not attach an environment, so the correct error
|
||||
// policy can be deduced from constructor flags
|
||||
// for this Db.
|
||||
//
|
||||
if ((construct_flags_ & DB_CXX_NO_EXCEPTIONS) != 0) {
|
||||
return (ON_ERROR_RETURN);
|
||||
}
|
||||
else {
|
||||
return (ON_ERROR_THROW);
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
int Db::close(u_int32_t flags)
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
int err;
|
||||
|
||||
// after a DB->close (no matter if success or failure),
|
||||
// the underlying DB object must not be accessed,
|
||||
// so we clean up in advance.
|
||||
//
|
||||
cleanup();
|
||||
|
||||
// It's safe to throw an error after the close,
|
||||
// since our error mechanism does not peer into
|
||||
// the DB* structures.
|
||||
//
|
||||
if ((err = db->close(db, flags)) != 0 && err != DB_INCOMPLETE)
|
||||
DB_ERROR("Db::close", err, error_policy());
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::cursor(DbTxn *txnid, Dbc **cursorp, u_int32_t flags)
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
DBC *dbc = 0;
|
||||
int err;
|
||||
|
||||
if ((err = db->cursor(db, unwrap(txnid), &dbc, flags)) != 0) {
|
||||
DB_ERROR("Db::cursor", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
|
||||
// The following cast implies that Dbc can be no larger than DBC
|
||||
*cursorp = (Dbc*)dbc;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Db::del(DbTxn *txnid, Dbt *key, u_int32_t flags)
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = db->del(db, unwrap(txnid), key, flags)) != 0) {
|
||||
// DB_NOTFOUND is a "normal" return, so should not be
|
||||
// thrown as an error
|
||||
//
|
||||
if (err != DB_NOTFOUND) {
|
||||
DB_ERROR("Db::del", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
void Db::err(int error, const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
va_start(args, format);
|
||||
__db_real_err(db->dbenv, error, 1, 1, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
void Db::errx(const char *format, ...)
|
||||
{
|
||||
va_list args;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
va_start(args, format);
|
||||
__db_real_err(db->dbenv, 0, 0, 1, format, args);
|
||||
va_end(args);
|
||||
}
|
||||
|
||||
int Db::fd(int *fdp)
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = db->fd(db, fdp)) != 0) {
|
||||
DB_ERROR("Db::fd", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
void _db_feedback_intercept_c(DB *db, int opcode, int pct)
|
||||
{
|
||||
Db::_feedback_intercept(db, opcode, pct);
|
||||
}
|
||||
|
||||
//static
|
||||
void Db::_feedback_intercept(DB *db, int opcode, int pct)
|
||||
{
|
||||
if (db == 0) {
|
||||
DB_ERROR("Db::feedback_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
Db *cxxdb = (Db *)db->cj_internal;
|
||||
if (cxxdb == 0) {
|
||||
DB_ERROR("Db::feedback_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return;
|
||||
}
|
||||
if (cxxdb->feedback_callback_ == 0) {
|
||||
DB_ERROR("Db::feedback_callback", EINVAL, cxxdb->error_policy());
|
||||
return;
|
||||
}
|
||||
(*cxxdb->feedback_callback_)(cxxdb, opcode, pct);
|
||||
}
|
||||
|
||||
int Db::set_feedback(void (*arg)(Db *, int, int))
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
|
||||
feedback_callback_ = arg;
|
||||
|
||||
return ((*(db->set_feedback))(db, _db_feedback_intercept_c));
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
int _db_append_recno_intercept_c(DB *db, DBT *data, db_recno_t recno)
|
||||
{
|
||||
return (Db::_append_recno_intercept(db, data, recno));
|
||||
}
|
||||
|
||||
//static
|
||||
int Db::_append_recno_intercept(DB *db, DBT *data, db_recno_t recno)
|
||||
{
|
||||
int err;
|
||||
|
||||
if (db == 0) {
|
||||
DB_ERROR("Db::append_recno_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return (EINVAL);
|
||||
}
|
||||
Db *cxxdb = (Db *)db->cj_internal;
|
||||
if (cxxdb == 0) {
|
||||
DB_ERROR("Db::append_recno_callback", EINVAL, ON_ERROR_UNKNOWN);
|
||||
return (EINVAL);
|
||||
}
|
||||
if (cxxdb->append_recno_callback_ == 0) {
|
||||
DB_ERROR("Db::append_recno_callback", EINVAL, cxxdb->error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
// making these copies is slow but portable.
|
||||
// Another alternative is to cast the DBT* manufactured
|
||||
// by the C layer to a Dbt*. It 'should be' safe since
|
||||
// Dbt is a thin shell over DBT, adding no extra data,
|
||||
// but is nonportable, and could lead to errors if anything
|
||||
// were added to the Dbt class.
|
||||
//
|
||||
Dbt cxxdbt;
|
||||
memcpy((DBT *)&cxxdbt, data, sizeof(DBT));
|
||||
err = (*cxxdb->append_recno_callback_)(cxxdb, &cxxdbt, recno);
|
||||
memcpy(data, (DBT *)&cxxdbt, sizeof(DBT));
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::set_append_recno(int (*arg)(Db *, Dbt *, db_recno_t))
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
|
||||
append_recno_callback_ = arg;
|
||||
|
||||
return ((*(db->set_append_recno))(db, _db_append_recno_intercept_c));
|
||||
}
|
||||
|
||||
int Db::get(DbTxn *txnid, Dbt *key, Dbt *value, u_int32_t flags)
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = db->get(db, unwrap(txnid), key, value, flags)) != 0) {
|
||||
// DB_NOTFOUND and DB_KEYEMPTY are "normal" returns,
|
||||
// so should not be thrown as an error
|
||||
//
|
||||
if (err != DB_NOTFOUND && err != DB_KEYEMPTY) {
|
||||
DB_ERROR("Db::get", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::get_byteswapped() const
|
||||
{
|
||||
DB *db = (DB *)unwrapConst(this);
|
||||
return (db->get_byteswapped(db));
|
||||
}
|
||||
|
||||
DBTYPE Db::get_type() const
|
||||
{
|
||||
DB *db = (DB *)unwrapConst(this);
|
||||
return ((DBTYPE)db->get_type(db));
|
||||
}
|
||||
|
||||
int Db::join(Dbc **curslist, Dbc **cursorp, u_int32_t flags)
|
||||
{
|
||||
// Dbc is a "compatible" subclass of DBC -
|
||||
// that is, no virtual functions or even extra data members,
|
||||
// so this cast, although technically non-portable,
|
||||
// "should" always be okay.
|
||||
//
|
||||
DBC **list = (DBC **)(curslist);
|
||||
DB *db = unwrap(this);
|
||||
DBC *dbc = 0;
|
||||
int err;
|
||||
|
||||
if ((err = db->join(db, list, &dbc, flags)) != 0) {
|
||||
DB_ERROR("Db::join_cursor", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
*cursorp = (Dbc*)dbc;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Db::key_range(DbTxn *txnid, Dbt *key,
|
||||
DB_KEY_RANGE *results, u_int32_t flags)
|
||||
{
|
||||
DB *db = unwrap(this);
|
||||
int err;
|
||||
|
||||
if ((err = db->key_range(db, unwrap(txnid), key,
|
||||
results, flags)) != 0) {
|
||||
DB_ERROR("Db::key_range", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
// If an error occurred during the constructor, report it now.
|
||||
// Otherwise, call the underlying DB->open method.
|
||||
//
|
||||
int Db::open(const char *file, const char *database,
|
||||
DBTYPE type, u_int32_t flags, int mode)
|
||||
{
|
||||
int err;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if ((err = construct_error_) != 0)
|
||||
DB_ERROR("Db::open", construct_error_, error_policy());
|
||||
else if ((err = db->open(db, file, database, type, flags, mode)) != 0)
|
||||
DB_ERROR("Db::open", err, error_policy());
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::put(DbTxn *txnid, Dbt *key, Dbt *value, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if ((err = db->put(db, unwrap(txnid), key, value, flags)) != 0) {
|
||||
|
||||
// DB_KEYEXIST is a "normal" return, so should not be
|
||||
// thrown as an error
|
||||
//
|
||||
if (err != DB_KEYEXIST) {
|
||||
DB_ERROR("Db::put", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::rename(const char *file, const char *database,
|
||||
const char *newname, u_int32_t flags)
|
||||
{
|
||||
int err = 0;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (!db) {
|
||||
DB_ERROR("Db::rename", EINVAL, error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
// after a DB->rename (no matter if success or failure),
|
||||
// the underlying DB object must not be accessed,
|
||||
// so we clean up in advance.
|
||||
//
|
||||
cleanup();
|
||||
|
||||
if ((err = db->rename(db, file, database, newname, flags)) != 0) {
|
||||
DB_ERROR("Db::rename", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Db::remove(const char *file, const char *database, u_int32_t flags)
|
||||
{
|
||||
int err = 0;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (!db) {
|
||||
DB_ERROR("Db::remove", EINVAL, error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
|
||||
// after a DB->remove (no matter if success or failure),
|
||||
// the underlying DB object must not be accessed,
|
||||
// so we clean up in advance.
|
||||
//
|
||||
cleanup();
|
||||
|
||||
if ((err = db->remove(db, file, database, flags)) != 0)
|
||||
DB_ERROR("Db::remove", err, error_policy());
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::stat(void *sp, db_malloc_fcn_type db_malloc_fcn, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (!db) {
|
||||
DB_ERROR("Db::stat", EINVAL, error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
if ((err = db->stat(db, sp, db_malloc_fcn, flags)) != 0) {
|
||||
DB_ERROR("Db::stat", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Db::sync(u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (!db) {
|
||||
DB_ERROR("Db::sync", EINVAL, error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
if ((err = db->sync(db, flags)) != 0 && err != DB_INCOMPLETE) {
|
||||
DB_ERROR("Db::sync", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Db::upgrade(const char *name, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (!db) {
|
||||
DB_ERROR("Db::upgrade", EINVAL, error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
if ((err = db->upgrade(db, name, flags)) != 0) {
|
||||
DB_ERROR("Db::upgrade", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
static int _verify_callback_cxx(void *handle, const void *str_arg)
|
||||
{
|
||||
char *str;
|
||||
ostream *out;
|
||||
|
||||
str = (char *)str_arg;
|
||||
out = (ostream *)handle;
|
||||
|
||||
(*out) << str;
|
||||
if (out->fail())
|
||||
return (EIO);
|
||||
|
||||
return (0);
|
||||
}
|
||||
|
||||
// This is a 'glue' function declared as extern "C" so it will
|
||||
// be compatible with picky compilers that do not allow mixing
|
||||
// of function pointers to 'C' functions with function pointers
|
||||
// to C++ functions.
|
||||
//
|
||||
extern "C"
|
||||
int _verify_callback_c(void *handle, const void *str_arg)
|
||||
{
|
||||
return (_verify_callback_cxx(handle, str_arg));
|
||||
}
|
||||
|
||||
int Db::verify(const char *name, const char *subdb,
|
||||
ostream *ostr, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if (!db) {
|
||||
DB_ERROR("Db::verify", EINVAL, error_policy());
|
||||
return (EINVAL);
|
||||
}
|
||||
if ((err = __db_verify_internal(db, name, subdb, ostr,
|
||||
_verify_callback_c, flags)) != 0) {
|
||||
DB_ERROR("Db::verify", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
// This is a variant of the DB_WO_ACCESS macro to define a simple set_
|
||||
// method calling the underlying C method, but unlike a simple
|
||||
// set method, it may return an error or raise an exception.
|
||||
// Note this macro expects that input _argspec is an argument
|
||||
// list element (e.g. "char *arg") defined in terms of "arg".
|
||||
//
|
||||
#define DB_DB_ACCESS(_name, _argspec) \
|
||||
\
|
||||
int Db::set_##_name(_argspec) \
|
||||
{ \
|
||||
int ret; \
|
||||
DB *db = unwrap(this); \
|
||||
\
|
||||
if ((ret = (*(db->set_##_name))(db, arg)) != 0) { \
|
||||
DB_ERROR("Db::set_" # _name, ret, error_policy()); \
|
||||
} \
|
||||
return (ret); \
|
||||
}
|
||||
|
||||
#define DB_DB_ACCESS_NORET(_name, _argspec) \
|
||||
\
|
||||
void Db::set_##_name(_argspec) \
|
||||
{ \
|
||||
DB *db = unwrap(this); \
|
||||
\
|
||||
(*(db->set_##_name))(db, arg); \
|
||||
return; \
|
||||
}
|
||||
|
||||
DB_DB_ACCESS(bt_compare, bt_compare_fcn_type arg)
|
||||
DB_DB_ACCESS(bt_maxkey, u_int32_t arg)
|
||||
DB_DB_ACCESS(bt_minkey, u_int32_t arg)
|
||||
DB_DB_ACCESS(bt_prefix, bt_prefix_fcn_type arg)
|
||||
DB_DB_ACCESS(dup_compare, dup_compare_fcn_type arg)
|
||||
DB_DB_ACCESS_NORET(errfile, FILE *arg)
|
||||
DB_DB_ACCESS_NORET(errpfx, const char *arg)
|
||||
DB_DB_ACCESS(flags, u_int32_t arg)
|
||||
DB_DB_ACCESS(h_ffactor, u_int32_t arg)
|
||||
DB_DB_ACCESS(h_hash, h_hash_fcn_type arg)
|
||||
DB_DB_ACCESS(h_nelem, u_int32_t arg)
|
||||
DB_DB_ACCESS(lorder, int arg)
|
||||
DB_DB_ACCESS(malloc, db_malloc_fcn_type arg)
|
||||
DB_DB_ACCESS(pagesize, u_int32_t arg)
|
||||
DB_DB_ACCESS(realloc, db_realloc_fcn_type arg)
|
||||
DB_DB_ACCESS(re_delim, int arg)
|
||||
DB_DB_ACCESS(re_len, u_int32_t arg)
|
||||
DB_DB_ACCESS(re_pad, int arg)
|
||||
DB_DB_ACCESS(re_source, char *arg)
|
||||
DB_DB_ACCESS(q_extentsize, u_int32_t arg)
|
||||
|
||||
// Here are the set methods that don't fit the above mold.
|
||||
//
|
||||
|
||||
void Db::set_errcall(void (*arg)(const char *, char *))
|
||||
{
|
||||
env_->set_errcall(arg);
|
||||
}
|
||||
|
||||
int Db::set_cachesize(u_int32_t gbytes, u_int32_t bytes, int ncache)
|
||||
{
|
||||
int ret;
|
||||
DB *db = unwrap(this);
|
||||
|
||||
if ((ret = (*(db->set_cachesize))(db, gbytes, bytes, ncache)) != 0) {
|
||||
DB_ERROR("Db::set_cachesize", ret, error_policy());
|
||||
}
|
||||
return (ret);
|
||||
}
|
||||
|
||||
int Db::set_paniccall(void (*callback)(DbEnv *, int))
|
||||
{
|
||||
return (env_->set_paniccall(callback));
|
||||
}
|
||||
|
||||
void Db::set_error_stream(ostream *error_stream)
|
||||
{
|
||||
env_->set_error_stream(error_stream);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Dbc //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
// It's private, and should never be called, but VC4.0 needs it resolved
|
||||
//
|
||||
Dbc::~Dbc()
|
||||
{
|
||||
}
|
||||
|
||||
int Dbc::close()
|
||||
{
|
||||
DBC *cursor = this;
|
||||
int err;
|
||||
|
||||
if ((err = cursor->c_close(cursor)) != 0) {
|
||||
DB_ERROR("Db::close", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Dbc::count(db_recno_t *countp, u_int32_t flags_arg)
|
||||
{
|
||||
DBC *cursor = this;
|
||||
int err;
|
||||
|
||||
if ((err = cursor->c_count(cursor, countp, flags_arg)) != 0) {
|
||||
DB_ERROR("Db::count", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Dbc::del(u_int32_t flags_arg)
|
||||
{
|
||||
DBC *cursor = this;
|
||||
int err;
|
||||
|
||||
if ((err = cursor->c_del(cursor, flags_arg)) != 0) {
|
||||
|
||||
// DB_KEYEMPTY is a "normal" return, so should not be
|
||||
// thrown as an error
|
||||
//
|
||||
if (err != DB_KEYEMPTY) {
|
||||
DB_ERROR("Db::del", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Dbc::dup(Dbc** cursorp, u_int32_t flags_arg)
|
||||
{
|
||||
DBC *cursor = this;
|
||||
DBC *new_cursor = 0;
|
||||
int err;
|
||||
|
||||
if ((err = cursor->c_dup(cursor, &new_cursor, flags_arg)) != 0) {
|
||||
DB_ERROR("Db::dup", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
|
||||
// The following cast implies that Dbc can be no larger than DBC
|
||||
*cursorp = (Dbc*)new_cursor;
|
||||
return (0);
|
||||
}
|
||||
|
||||
int Dbc::get(Dbt* key, Dbt *data, u_int32_t flags_arg)
|
||||
{
|
||||
DBC *cursor = this;
|
||||
int err;
|
||||
|
||||
if ((err = cursor->c_get(cursor, key, data, flags_arg)) != 0) {
|
||||
|
||||
// DB_NOTFOUND and DB_KEYEMPTY are "normal" returns,
|
||||
// so should not be thrown as an error
|
||||
//
|
||||
if (err != DB_NOTFOUND && err != DB_KEYEMPTY) {
|
||||
DB_ERROR("Db::get", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int Dbc::put(Dbt* key, Dbt *data, u_int32_t flags_arg)
|
||||
{
|
||||
DBC *cursor = this;
|
||||
int err;
|
||||
|
||||
if ((err = cursor->c_put(cursor, key, data, flags_arg)) != 0) {
|
||||
|
||||
// DB_KEYEXIST is a "normal" return, so should not be
|
||||
// thrown as an error
|
||||
//
|
||||
if (err != DB_KEYEXIST) {
|
||||
DB_ERROR("Db::put", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// Dbt //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
Dbt::Dbt()
|
||||
{
|
||||
DBT *dbt = this;
|
||||
memset(dbt, 0, sizeof(DBT));
|
||||
}
|
||||
|
||||
Dbt::Dbt(void *data_arg, size_t size_arg)
|
||||
{
|
||||
DBT *dbt = this;
|
||||
memset(dbt, 0, sizeof(DBT));
|
||||
set_data(data_arg);
|
||||
set_size(size_arg);
|
||||
}
|
||||
|
||||
Dbt::~Dbt()
|
||||
{
|
||||
}
|
||||
|
||||
Dbt::Dbt(const Dbt &that)
|
||||
{
|
||||
const DBT *from = &that;
|
||||
DBT *to = this;
|
||||
memcpy(to, from, sizeof(DBT));
|
||||
}
|
||||
|
||||
Dbt &Dbt::operator = (const Dbt &that)
|
||||
{
|
||||
if (this != &that) {
|
||||
const DBT *from = &that;
|
||||
DBT *to = this;
|
||||
memcpy(to, from, sizeof(DBT));
|
||||
}
|
||||
return (*this);
|
||||
}
|
||||
|
||||
DB_RW_ACCESS(Dbt, void *, data, data)
|
||||
DB_RW_ACCESS(Dbt, u_int32_t, size, size)
|
||||
DB_RW_ACCESS(Dbt, u_int32_t, ulen, ulen)
|
||||
DB_RW_ACCESS(Dbt, u_int32_t, dlen, dlen)
|
||||
DB_RW_ACCESS(Dbt, u_int32_t, doff, doff)
|
||||
DB_RW_ACCESS(Dbt, u_int32_t, flags, flags)
|
||||
136
bdb/cxx/cxx_txn.cpp
Normal file
136
bdb/cxx/cxx_txn.cpp
Normal file
@@ -0,0 +1,136 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*/
|
||||
|
||||
#include "db_config.h"
|
||||
|
||||
#ifndef lint
|
||||
static const char revid[] = "$Id: cxx_txn.cpp,v 11.13 2000/12/21 16:24:33 dda Exp $";
|
||||
#endif /* not lint */
|
||||
|
||||
#include <errno.h>
|
||||
|
||||
#include "db_cxx.h"
|
||||
#include "cxx_int.h"
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbTxnMgr //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
int DbEnv::txn_begin(DbTxn *pid, DbTxn **tid, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
DB_TXN *txn;
|
||||
|
||||
if ((err = ::txn_begin(env, unwrap(pid), &txn, flags)) != 0) {
|
||||
DB_ERROR("DbEnv::txn_begin", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
DbTxn *result = new DbTxn();
|
||||
result->imp_ = wrap(txn);
|
||||
*tid = result;
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::txn_checkpoint(u_int32_t kbyte, u_int32_t min, u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
if ((err = ::txn_checkpoint(env, kbyte, min, flags)) != 0 &&
|
||||
err != DB_INCOMPLETE) {
|
||||
DB_ERROR("DbEnv::txn_checkpoint", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbEnv::txn_stat(DB_TXN_STAT **statp, db_malloc_fcn_type db_malloc_fcn)
|
||||
{
|
||||
int err;
|
||||
DB_ENV *env = unwrap(this);
|
||||
if ((err = ::txn_stat(env, statp, db_malloc_fcn)) != 0) {
|
||||
DB_ERROR("DbEnv::txn_stat", err, error_policy());
|
||||
return (err);
|
||||
}
|
||||
return (err);
|
||||
}
|
||||
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
// //
|
||||
// DbTxn //
|
||||
// //
|
||||
////////////////////////////////////////////////////////////////////////
|
||||
|
||||
DbTxn::DbTxn()
|
||||
: imp_(0)
|
||||
{
|
||||
}
|
||||
|
||||
DbTxn::~DbTxn()
|
||||
{
|
||||
}
|
||||
|
||||
int DbTxn::abort()
|
||||
{
|
||||
int err;
|
||||
DB_TXN *txn;
|
||||
|
||||
txn = unwrap(this);
|
||||
err = txn_abort(txn);
|
||||
|
||||
// It may seem weird to delete this, but is legal as long
|
||||
// as we don't access any of its data before returning.
|
||||
//
|
||||
delete this;
|
||||
|
||||
if (err != 0)
|
||||
DB_ERROR("DbTxn::abort", err, ON_ERROR_UNKNOWN);
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
int DbTxn::commit(u_int32_t flags)
|
||||
{
|
||||
int err;
|
||||
DB_TXN *txn;
|
||||
|
||||
txn = unwrap(this);
|
||||
err = txn_commit(txn, flags);
|
||||
|
||||
// It may seem weird to delete this, but is legal as long
|
||||
// as we don't access any of its data before returning.
|
||||
//
|
||||
delete this;
|
||||
|
||||
if (err != 0)
|
||||
DB_ERROR("DbTxn::commit", err, ON_ERROR_UNKNOWN);
|
||||
|
||||
return (err);
|
||||
}
|
||||
|
||||
u_int32_t DbTxn::id()
|
||||
{
|
||||
DB_TXN *txn;
|
||||
|
||||
txn = unwrap(this);
|
||||
return (txn_id(txn)); // no error
|
||||
}
|
||||
|
||||
int DbTxn::prepare()
|
||||
{
|
||||
int err;
|
||||
DB_TXN *txn;
|
||||
|
||||
txn = unwrap(this);
|
||||
if ((err = txn_prepare(txn)) != 0) {
|
||||
DB_ERROR("DbTxn::prepare", err, ON_ERROR_UNKNOWN);
|
||||
return (err);
|
||||
}
|
||||
return (0);
|
||||
}
|
||||
21
bdb/cxx/namemap.txt
Normal file
21
bdb/cxx/namemap.txt
Normal file
@@ -0,0 +1,21 @@
|
||||
$Id: namemap.txt,v 10.4 2000/02/19 20:57:54 bostic Exp $
|
||||
|
||||
The bulk of DB provides for wrapper classes and appropriately named methods
|
||||
that call into DB. For the most part, there is a straightforward mapping of
|
||||
names. For the purposes of referencing documentation, this chart shows the
|
||||
underlying C structure name for each C++ class. In some cases, using the
|
||||
given C prefix with a C++ method name gives the underlying C function name.
|
||||
For example, DbMpoolFile::close() is implemented by memp_fclose().
|
||||
|
||||
C++ C C prefix
|
||||
|
||||
Db DB
|
||||
DbEnv DB_ENV
|
||||
Dbc DBC
|
||||
DbException none
|
||||
DbInfo DB_INFO
|
||||
DbLock DB_LOCK lock_
|
||||
DbLsn DB_LSN
|
||||
DbMpoolFile DB_MPOOL_FILE memp_
|
||||
Dbt DBT
|
||||
DbTxn DB_TXN txn_
|
||||
452
bdb/db/Design.fileop
Normal file
452
bdb/db/Design.fileop
Normal file
@@ -0,0 +1,452 @@
|
||||
# $Id: Design.fileop,v 11.4 2000/02/19 20:57:54 bostic Exp $
|
||||
|
||||
The design of file operation recovery.
|
||||
|
||||
Keith has asked me to write up notes on our current status of database
|
||||
create and delete and recovery, why it's so hard, and how we've violated
|
||||
all the cornerstone assumptions on which our recovery framework is based.
|
||||
|
||||
I am including two documents at the end of this one. The first is the
|
||||
initial design of the recoverability of file create and delete (there is
|
||||
no talk of subdatabases there, because we didn't think we'd have to do
|
||||
anything special there). I will annotate this document on where things
|
||||
changed.
|
||||
|
||||
The second is the design of recd007 which is supposed to test our ability
|
||||
to recover these operations regardless of where one crashes. This test
|
||||
is fundamentally different from our other recovery tests in the following
|
||||
manner. Normally, the application controls transaction boundaries.
|
||||
Therefore, we can perform an operation and then decide whether to commit
|
||||
or abort it. In the normal recovery tests, we force the database into
|
||||
each of the four possible states from a recovery perspective:
|
||||
|
||||
database is pre-op, undo (do nothing)
|
||||
database is pre-op, redo
|
||||
database is post-op, undo
|
||||
database is post-op, redo (do nothing)
|
||||
|
||||
By copying databases at various points and initiating txn_commit and abort
|
||||
appropriately, we can make all these things happen. Notice that the one
|
||||
case we don't handle is where page A is in one state (e.g., pre-op) and
|
||||
page B is in another state (e.g., post-op). I will argue that these don't
|
||||
matter because each page is recovered independently. If anyone can poke
|
||||
holes in this, I'm interested.
|
||||
|
||||
The problem with create/delete recovery testing is that the transaction
|
||||
is begun and ended all inside the library. Therefore, there is never any
|
||||
point (outside the library) where we can copy files and or initiate
|
||||
abort/commit. In order to still put the recovery code through its paces,
|
||||
Sue designed an infrastructure that lets you tell the library where to
|
||||
make copies of things and where to suddenly inject errors so that the
|
||||
transaction gets aborted. This level of detail allows us to push the
|
||||
create/delete recovery code through just about every recovery path
|
||||
possible (although I'm sure Mike will tell me I'm wrong when he starts to
|
||||
run code coverage tools).
|
||||
|
||||
OK, so that's all preamble and a brief discussion of the documents I'm
|
||||
enclosing.
|
||||
|
||||
Why was this so hard and painful and why is the code so Q@#$!% complicated?
|
||||
The following is a discussion/explanation, but to the best of my knowledge,
|
||||
the structure we have in place now works. The key question we need to be
|
||||
asking is, "Does this need to have to be so complex or should we redesign
|
||||
portions to simplify it?" At this point, there is no obvious way to simplify
|
||||
it in my book, but I may be having difficulty seeing this because my mind is
|
||||
too polluted at this point.
|
||||
|
||||
Our overall strategy for recovery is that we do write-ahead logging,
|
||||
that is we log an operation and make sure it is on disk before any
|
||||
data corresponding to the data that log record describes is on disk.
|
||||
Typically we use log sequence numbers (LSNs) to mark the data so that
|
||||
during recovery, we can look at the data and determine if it is in a
|
||||
state before a particular log record or after a particular log record.
|
||||
|
||||
In the good old days, opens were not transaction protected, so we could
|
||||
do regular old opens during recovery and if the file existed, we opened
|
||||
it and if it didn't (or appeared corrupt), we didn't and treated it like
|
||||
a missing file. As will be discussed below in detail, our states are much
|
||||
more complicated and recovery can't make such simplistic assumptions.
|
||||
|
||||
Also, since we are now dealing with file system operations, we have less
|
||||
control about when they actually happen and what the state of the system
|
||||
can be. That is, we have to write create log records synchronously, because
|
||||
the create/open system call may force a newly created (0-length) file to
|
||||
disk. This file has to now be identified as being in the "being-created"
|
||||
state.
|
||||
|
||||
A. We used to make a number of assumptions during recovery:
|
||||
|
||||
1. We could call db_open at any time and one of three things would happen:
|
||||
a) the file would be opened cleanly
|
||||
b) the file would not exist
|
||||
c) we would encounter an error while opening the file
|
||||
|
||||
Case a posed no difficulty.
|
||||
In Case b, we simply spit out a warning that a file was missing and then
|
||||
ignored all subsequent operations to that file.
|
||||
In Case c, we reported a fatal error.
|
||||
|
||||
2. We can always generate a warning if a file is missing.
|
||||
|
||||
3. We never encounter NULL file names in the log.
|
||||
|
||||
B. We also made some assumptions in the main-line library:
|
||||
|
||||
1. If you try to open a file and it exists but is 0-length, then
|
||||
someone else is trying to open it.
|
||||
|
||||
2. You can write pages anywhere in a file and any non-existent pages
|
||||
are 0-filled. [This breaks on Windows.]
|
||||
|
||||
3. If you have proper permissions then you can always evict pages from
|
||||
the buffer pool.
|
||||
|
||||
4. During open, we can close the master database handle as soon as
|
||||
we're done with it since all the rest of the activity will take place
|
||||
on the subdatabase handle.
|
||||
|
||||
In our brave new world, most of these assumptions are no longer valid.
|
||||
Let's address them one at a time.
|
||||
|
||||
A.1 We could call db_open at any time and one of three things would happen:
|
||||
a) the file would be opened cleanly
|
||||
b) the file would not exist
|
||||
c) we would encounter an error while opening the file
|
||||
There are now additional states. Since we are trying to make file
|
||||
operations recoverable, you can now die in the middle of such an
|
||||
operation and we have to be able to pick up the pieces. What this
|
||||
now means is that:
|
||||
|
||||
* a 0-length file can be an indication of a create in-progress
|
||||
* you can have a meta-data page but no root page (of a btree)
|
||||
* if a file doesn't exist, it could mean that it was just about
|
||||
to be created and needs to be rolled forward.
|
||||
* if you encounter an error in a file (e.g., the meta-data page
|
||||
is all 0's) you could still be in mid-open.
|
||||
|
||||
I have now made this all work, but it required significant changes to the
|
||||
db_open code and error handling and this is the sort of change that makes
|
||||
everyone nervous.
|
||||
|
||||
A.2. We can always generate a warning if a file is missing.
|
||||
|
||||
Now that we have a delete file method in the API, we need to make sure
|
||||
that we do not generate warning messages for files that don't exist if
|
||||
we see that they were explicitly deleted.
|
||||
|
||||
This means that we need to save state during recovery, determine which
|
||||
files were missing and were not being recreated and were not deleted and
|
||||
only complain about those.
|
||||
|
||||
A.3. We never encounter NULL file names in the log.
|
||||
|
||||
Now that we allow tranaction protection on memory-resident files, we write
|
||||
log messages for files with NULL file names. This means that our assumption
|
||||
of always being able to call "db_open" on any log_register OPEN message found
|
||||
in the log is no longer valid.
|
||||
|
||||
B.1. If you try to open a file and it exists but is 0-length, then
|
||||
someone else is trying to open it.
|
||||
|
||||
As discussed for A.1, this is no longer true. It may be instead that you
|
||||
are in the process of recovering a create.
|
||||
|
||||
B.2. You can write pages anywhere in a file and any non-existent pages
|
||||
are 0-filled.
|
||||
|
||||
It turns out that this is not true on Windows. This means that places
|
||||
we do group allocation (hash) must explicitly allocate each page, because
|
||||
we can't count on recognizing the uninitialized pages later.
|
||||
|
||||
B.3. If you have proper permissions then you can always evict pages from
|
||||
the buffer pool.
|
||||
|
||||
In the brave new world though, files can be deleted and they may
|
||||
have pages in the mpool. If you later try to evict these, you
|
||||
discover that the file doesn't exist. We'd get here when we had
|
||||
to dirty pages during a remove operation.
|
||||
|
||||
B.4. You can close files any time you want.
|
||||
|
||||
However, if the file takes part in the open/remove transaction,
|
||||
then we had better not close it until after the transaction
|
||||
commits/aborts, because we need to be able to get our hands on the
|
||||
dbp and the open happened in a different transaction.
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
Design for recovering file create and delete in the presence of subdatabases.
|
||||
|
||||
Assumptions:
|
||||
Remove the O_TRUNCATE flag.
|
||||
Single-thread all open/create/delete operations.
|
||||
(Well, almost all; we'll optimize opens without DB_CREATE set.)
|
||||
The reasoning for this is that with two simultaneous
|
||||
open/creaters, during recovery, we cannot identify which
|
||||
transaction successfully created files and therefore cannot
|
||||
recovery correctly.
|
||||
File system creates/deletes are synchronous
|
||||
Once the file is open, subdatabase creates look like regular
|
||||
get/put operations and a metadata page creation.
|
||||
|
||||
There are 4 cases to deal with:
|
||||
1. Open/create file
|
||||
2. Open/create subdatabase
|
||||
3. Delete
|
||||
4. Recovery records
|
||||
|
||||
__db_fileopen_recover
|
||||
__db_metapage_recover
|
||||
__db_delete_recover
|
||||
existing c_put and c_get routines for subdatabase creation
|
||||
|
||||
Note that the open/create of the file and the open/create of the
|
||||
subdatabase need to be in the same transaction.
|
||||
|
||||
1. Open/create (full file and subdb version)
|
||||
|
||||
If create
|
||||
LOCK_FILEOP
|
||||
txn_begin
|
||||
log create message (open message below)
|
||||
do file system open/create
|
||||
if we did not create
|
||||
abort transaction (before going to open_only)
|
||||
if (!subdb)
|
||||
set dbp->open_txn = NULL
|
||||
else
|
||||
txn_begin a new transaction for the subdb open
|
||||
|
||||
construct meta-data page
|
||||
log meta-data page (see metapage)
|
||||
write the meta-data page
|
||||
* It may be the case that btrees need to log both meta-data pages
|
||||
and root pages. If that is the case, I believe that we can use
|
||||
this same record and recovery routines for both
|
||||
|
||||
txn_commit
|
||||
UNLOCK_FILEOP
|
||||
|
||||
2. Delete
|
||||
LOCK_FILEOP
|
||||
txn_begin
|
||||
log delete message (delete message below)
|
||||
mv file __db.file.lsn
|
||||
txn_commit
|
||||
unlink __db.file.lsn
|
||||
UNLOCK_FILEOP
|
||||
|
||||
3. Recovery Routines
|
||||
|
||||
__db_fileopen_recover
|
||||
if (argp->name.size == 0
|
||||
done;
|
||||
|
||||
if (redo) /* Commit */
|
||||
__os_open(argp->name, DB_OSO_CREATE, argp->mode, &fh)
|
||||
__os_closehandle(fh)
|
||||
if (undo) /* Abort */
|
||||
if (argp->name exists)
|
||||
unlink(argp->name);
|
||||
|
||||
__db_metapage_recover
|
||||
if (redo)
|
||||
__os_open(argp->name, 0, 0, &fh)
|
||||
__os_lseek(meta data page)
|
||||
__os_write(meta data page)
|
||||
__os_closehandle(fh);
|
||||
if (undo)
|
||||
done = 0;
|
||||
if (argp->name exists)
|
||||
if (length of argp->name != 0)
|
||||
__os_open(argp->name, 0, 0, &fh)
|
||||
__os_lseek(meta data page)
|
||||
__os_read(meta data page)
|
||||
if (read succeeds && page lsn != current_lsn)
|
||||
done = 1
|
||||
__os_closehandle(fh);
|
||||
if (!done)
|
||||
unlink(argp->name)
|
||||
|
||||
__db_delete_recover
|
||||
if (redo)
|
||||
Check if the backup file still exists and if so, delete it.
|
||||
|
||||
if (undo)
|
||||
if (__db_appname(__db.file.lsn exists))
|
||||
mv __db_appname(__db.file.lsn) __db_appname(file)
|
||||
|
||||
__db_metasub_recover
|
||||
/* This is like a normal recovery routine */
|
||||
Get the metadata page
|
||||
if (cmp_n && redo)
|
||||
copy the log page onto the page
|
||||
update the lsn
|
||||
make sure page gets put dirty
|
||||
else if (cmp_p && undo)
|
||||
update the lsn to the lsn in the log record
|
||||
make sure page gets put dirty
|
||||
|
||||
if the page was modified, put it back dirty
|
||||
|
||||
In db.src
|
||||
|
||||
# name: filename (before call to __db_appname)
|
||||
# mode: file system mode
|
||||
BEGIN open
|
||||
DBT name DBT s
|
||||
ARG mode u_int32_t o
|
||||
END
|
||||
|
||||
# opcode: indicate if it is a create/delete and if it is a subdatabase
|
||||
# pgsize: page size on which we're going to write the meta-data page
|
||||
# pgno: page number on which to write this meta-data page
|
||||
# page: the actual meta-data page
|
||||
# lsn: LSN of the meta-data page -- 0 for new databases, may be non-0
|
||||
# for subdatabases.
|
||||
|
||||
BEGIN metapage
|
||||
ARG opcode u_int32_t x
|
||||
DBT name DBT s
|
||||
ARG pgno db_pgno_t d
|
||||
DBT page DBT s
|
||||
POINTER lsn DB_LSN * lu
|
||||
END
|
||||
|
||||
# We do not need a subdatabase name here because removing a subdatabase
|
||||
# name is simply a regular bt_delete operation from the master database.
|
||||
# It will get logged normally.
|
||||
# name: filename
|
||||
BEGIN delete
|
||||
DBT name DBT s
|
||||
END
|
||||
|
||||
# We also need to reclaim pages, but we can use the existing
|
||||
# bt_pg_alloc routines.
|
||||
|
||||
=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-
|
||||
Testing recoverability of create/delete.
|
||||
|
||||
These tests are unlike other tests in that they are going to
|
||||
require hooks in the library. The reason is that the create
|
||||
and delete calls are internally wrapped in a transaction, so
|
||||
that if the call returns, the transaction has already either
|
||||
commited or aborted. Using only that interface limits what
|
||||
kind of testing we can do. To match our other recovery testing
|
||||
efforts, we need to add hooks to trigger aborts at particular
|
||||
times in the create/delete path.
|
||||
|
||||
The general recovery testing strategy is that we wish to
|
||||
execute every path through every recovery routine. That
|
||||
means that we try to:
|
||||
catch each operation in its pre-operation state
|
||||
call the recovery function with redo
|
||||
call the recovery function with undo
|
||||
catch each operation in its post-operation state
|
||||
call the recovery function with redo
|
||||
call the recovery function with undo
|
||||
|
||||
In addition, there are a few critical points in the create and
|
||||
delete path that we want to make sure we capture.
|
||||
|
||||
1. Test Structure
|
||||
|
||||
The test structure should be similar to the existing recovery
|
||||
tests. We will want to have a structure in place where we
|
||||
can execute different commands:
|
||||
create a file/database
|
||||
create a file that will contain subdatabases.
|
||||
create a subdatabase
|
||||
remove a subdatabase (that contains valid data)
|
||||
remove a subdatabase (that does not contain any data)
|
||||
remove a file that used to contain subdatabases
|
||||
remove a file that contains a database
|
||||
|
||||
The tricky part is capturing the state of the world at the
|
||||
various points in the create/delete process.
|
||||
|
||||
The critical points in the create process are:
|
||||
|
||||
1. After we've logged the create, but before we've done anything.
|
||||
in db/db.c
|
||||
after the open_retry
|
||||
after the __crdel_fileopen_log call (and before we've
|
||||
called __os_open).
|
||||
|
||||
2. Immediately after the __os_open
|
||||
|
||||
3. Immediately after each __db_log_page call
|
||||
in bt_open.c
|
||||
log meta-data page
|
||||
log root page
|
||||
in hash.c
|
||||
log meta-data page
|
||||
|
||||
4. With respect to the log records above, shortly after each
|
||||
log write is an memp_fput. We need to do a sync after
|
||||
each memp_fput and trigger a point after that sync.
|
||||
|
||||
The critical points in the remove process are:
|
||||
|
||||
1. Right after the crdel_delete_log in db/db.c
|
||||
|
||||
2. Right after the __os_rename call (below the crdel_delete_log)
|
||||
|
||||
3. After the __db_remove_callback call.
|
||||
|
||||
I believe that there are the places where we'll need some sort of hook.
|
||||
|
||||
2. Adding hooks to the library.
|
||||
|
||||
The hooks need two components. One component is to capture the state of
|
||||
the database at the hook point and the other is to trigger a txn_abort at
|
||||
the hook point. The second part is fairly trivial.
|
||||
|
||||
The first part requires more thought. Let me explain what we do in a
|
||||
"normal" recovery test. In a normal recovery test, we save an intial
|
||||
copy of the database (this copy is called init). Then we execute one
|
||||
or more operations. Then, right before the commit/abort, we sync the
|
||||
file, and save another copy (the afterop copy). Finally, we call txn_commit
|
||||
or txn_abort, sync the file again, and save the database one last time (the
|
||||
final copy).
|
||||
|
||||
Then we run recovery. The first time, this should be a no-op, because
|
||||
we've either committed the transaction and are checking to redo it or
|
||||
we aborted the transaction, undid it on the abort and are checking to
|
||||
undo it again.
|
||||
|
||||
We then run recovery again on whatever database will force us through
|
||||
the path that requires work. In the commit case, this means we start
|
||||
with the init copy of the database and run recovery. This pushes us
|
||||
through all the redo paths. In the abort case, we start with the afterop
|
||||
copy which pushes us through all the undo cases.
|
||||
|
||||
In some sense, we're asking the create/delete test to be more exhaustive
|
||||
by defining all the trigger points, but I think that's the correct thing
|
||||
to do, since the create/delete is not initiated by a user transaction.
|
||||
|
||||
So, what do we have to do at the hook points?
|
||||
1. sync the file to disk.
|
||||
2. save the file itself
|
||||
3. save any files named __db_backup_name(name, &backup_name, lsn)
|
||||
Since we may not know the right lsns, I think we should save
|
||||
every file of the form __db.name.0xNNNNNNNN.0xNNNNNNNN into
|
||||
some temporary files from which we can restore it to run
|
||||
recovery.
|
||||
|
||||
3. Putting it all together
|
||||
|
||||
So, the three pieces are writing the test structure, putting in the hooks
|
||||
and then writing the recovery portions so that we restore the right thing
|
||||
that the hooks saved in order to initiate recovery.
|
||||
|
||||
Some of the technical issues that need to be solved are:
|
||||
How does the hook code become active (i.e., we don't
|
||||
want it in there normally, but it's got to be
|
||||
there when you configure for testing)?
|
||||
How do you (the test) tell the library that you want a
|
||||
particular hook to abort?
|
||||
How do you (the test) tell the library that you want the
|
||||
hook code doing its copies (do we really want
|
||||
*every* test doing these copies during testing?
|
||||
Maybe it's not a big deal, but maybe it is; we
|
||||
should at least think about it).
|
||||
103
bdb/db/crdel.src
Normal file
103
bdb/db/crdel.src
Normal file
@@ -0,0 +1,103 @@
|
||||
/*-
|
||||
* See the file LICENSE for redistribution information.
|
||||
*
|
||||
* Copyright (c) 1996, 1997, 1998, 1999, 2000
|
||||
* Sleepycat Software. All rights reserved.
|
||||
*
|
||||
* $Id: crdel.src,v 11.12 2000/12/12 17:41:48 bostic Exp $
|
||||
*/
|
||||
|
||||
PREFIX crdel
|
||||
|
||||
INCLUDE #include "db_config.h"
|
||||
INCLUDE
|
||||
INCLUDE #ifndef NO_SYSTEM_INCLUDES
|
||||
INCLUDE #include <sys/types.h>
|
||||
INCLUDE
|
||||
INCLUDE #include <ctype.h>
|
||||
INCLUDE #include <errno.h>
|
||||
INCLUDE #include <string.h>
|
||||
INCLUDE #endif
|
||||
INCLUDE
|
||||
INCLUDE #include "db_int.h"
|
||||
INCLUDE #include "db_page.h"
|
||||
INCLUDE #include "db_dispatch.h"
|
||||
INCLUDE #include "db_am.h"
|
||||
INCLUDE #include "txn.h"
|
||||
INCLUDE
|
||||
|
||||
/*
|
||||
* Fileopen -- log a potential file create operation
|
||||
*
|
||||
* name: filename
|
||||
* subname: sub database name
|
||||
* mode: file system mode
|
||||
*/
|
||||
BEGIN fileopen 141
|
||||
DBT name DBT s
|
||||
ARG mode u_int32_t o
|
||||
END
|
||||
|
||||
/*
|
||||
* Metasub: log the creation of a subdatabase meta data page.
|
||||
*
|
||||
* fileid: identifies the file being acted upon.
|
||||
* pgno: page number on which to write this meta-data page
|
||||
* page: the actual meta-data page
|
||||
* lsn: lsn of the page.
|
||||
*/
|
||||
BEGIN metasub 142
|
||||
ARG fileid int32_t ld
|
||||
ARG pgno db_pgno_t d
|
||||
DBT page DBT s
|
||||
POINTER lsn DB_LSN * lu
|
||||
END
|
||||
|
||||
/*
|
||||
* Metapage: log the creation of a meta data page for a new file.
|
||||
*
|
||||
* fileid: identifies the file being acted upon.
|
||||
* name: file containing the page.
|
||||
* pgno: page number on which to write this meta-data page
|
||||
* page: the actual meta-data page
|
||||
*/
|
||||
BEGIN metapage 143
|
||||
ARG fileid int32_t ld
|
||||
DBT name DBT s
|
||||
ARG pgno db_pgno_t d
|
||||
DBT page DBT s
|
||||
END
|
||||
|
||||
/*
|
||||
* Delete: remove a file.
|
||||
* Note that we don't need a special log record for subdatabase
|
||||
* removes, because we use normal btree operations to remove them.
|
||||
*
|
||||
* name: name of the file being removed (relative to DBHOME).
|
||||
*/
|
||||
DEPRECATED old_delete 144
|
||||
DBT name DBT s
|
||||
END
|
||||
|
||||
/*
|
||||
* Rename: rename a file
|
||||
* We do not need this for subdatabases
|
||||
*
|
||||
* name: name of the file being removed (relative to DBHOME).
|
||||
*/
|
||||
BEGIN rename 145
|
||||
ARG fileid int32_t ld
|
||||
DBT name DBT s
|
||||
DBT newname DBT s
|
||||
END
|
||||
/*
|
||||
* Delete: remove a file.
|
||||
* Note that we don't need a special log record for subdatabase
|
||||
* removes, because we use normal btree operations to remove them.
|
||||
*
|
||||
* name: name of the file being removed (relative to DBHOME).
|
||||
*/
|
||||
BEGIN delete 146
|
||||
ARG fileid int32_t ld
|
||||
DBT name DBT s
|
||||
END
|
||||
Some files were not shown because too many files have changed in this diff Show More
Reference in New Issue
Block a user