namespace.html   [plain text]


<!--$Id: namespace.html,v 1.2 2004/03/30 01:22:55 jtownsen Exp $-->
<!--Copyright 1997-2003 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<!--See the file LICENSE for redistribution information.-->
<html>
<head>
<title>Berkeley DB Reference Guide: Name spaces</title>
<meta name="description" content="Berkeley DB: An embedded database programmatic toolkit.">
<meta name="keywords" content="embedded,database,programmatic,toolkit,b+tree,btree,hash,hashing,transaction,transactions,locking,logging,access method,access methods,Java,C,C++">
</head>
<body bgcolor=white>
<a name="2"><!--meow--></a>
<table width="100%"><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Programmer Notes</dl></h3></td>
<td align=right><a href="../program/scope.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../program/ram.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h3 align=center>Name spaces</h3>
<h3>C Language Name Space</h3>
<p>The Berkeley DB library is careful to avoid C language programmer name spaces,
but there are a few potential areas for concern, mostly in the Berkeley DB
include file db.h.  The db.h include file defines a number of types and
strings.  Where possible, all of these types and strings are prefixed with
"DB_" or "db_".  There are a few notable exceptions.</p>
<p>The Berkeley DB library uses a macro named "__P" to configure for systems that
do not provide ANSI C function prototypes.  This could potentially collide
with other systems using a "__P" macro for similar or different purposes.</p>
<p>The Berkeley DB library needs information about specifically sized types for
each architecture.  If they are not provided by the system, they are
typedef'd in the db.h include file.  The types that may be typedef'd
by db.h include the following: u_int8_t, int16_t, u_int16_t, int32_t,
u_int32_t, u_char, u_short, u_int, and u_long.</p>
<p>The Berkeley DB library declares a number of external routines.  All these
routines are prefixed with the strings "db_", "lock_", "log_", "memp_"
or "txn_".  All internal routines are prefixed with the strings "__db_",
"__lock_", "__log_", "__memp_", or "__txn_".</p>
<h3>Filesystem Name Space</h3>
<p>Berkeley DB environments create or use some number of files in environment
home directories.  These files are named <a href="../../ref/env/db_config.html#DB_CONFIG">DB_CONFIG</a>, "log.NNNNN"
(for example, log.0000000003, where the number of digits following the
dot is unspecified), or with the string prefix "__db" (for example,
__db.001).  Database files that match these names should not be created
in the environment directory.</p>
<table width="100%"><tr><td><br></td><td align=right><a href="../program/scope.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../program/ram.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1><a href="../../sleepycat/legal.html">Copyright (c) 1996-2003</a> <a href="http://www.sleepycat.com">Sleepycat Software, Inc.</a> - All rights reserved.</font>
</body>
</html>