summaryrefslogtreecommitdiff
path: root/bdb/docs/ref/program/namespace.html
blob: 519f5f61c745376a8bc6aedfed5d073696f7e838 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
<!--$Id: namespace.so,v 10.14 2000/08/01 21:51:23 bostic Exp $-->
<!--Copyright 1997, 1998, 1999, 2000 by Sleepycat Software, Inc.-->
<!--All rights reserved.-->
<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><tr valign=top>
<td><h3><dl><dt>Berkeley DB Reference Guide:<dd>Programmer Notes</dl></h3></td>
<td width="1%"><a href="../../ref/program/scope.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/program/copy.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p>
<h1 align=center>Name spaces</h1>
<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>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>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 which 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>The Berkeley DB library declares a number of external routines.  All of 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>Berkeley DB environments create or use some number of files in environment home
directories.  These files are named <a href="../../ref/env/naming.html#DB_CONFIG">DB_CONFIG</a>, "log.NNNNNNNNNN"
(e.g., log.0000000003), or with the string prefix "__db" (e.g., __db.001).
Database files that match these names should not be created in the
environment directory.
<table><tr><td><br></td><td width="1%"><a href="../../ref/program/scope.html"><img src="../../images/prev.gif" alt="Prev"></a><a href="../../ref/toc.html"><img src="../../images/ref.gif" alt="Ref"></a><a href="../../ref/program/copy.html"><img src="../../images/next.gif" alt="Next"></a>
</td></tr></table>
<p><font size=1><a href="http://www.sleepycat.com">Copyright Sleepycat Software</a></font>
</body>
</html>