| 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> |
| 2 | <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> |
| 3 | <html xmlns="http://www.w3.org/1999/xhtml"> |
| 4 | <head> |
| 5 | <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" /> |
| 6 | <title>Name spaces</title> |
| 7 | <link rel="stylesheet" href="gettingStarted.css" type="text/css" /> |
| 8 | <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" /> |
| 9 | <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" /> |
| 10 | <link rel="up" href="program.html" title="Chapter 15. Programmer Notes" /> |
| 11 | <link rel="prev" href="program_scope.html" title="Berkeley DB handles" /> |
| 12 | <link rel="next" href="program_ram.html" title="Memory-only or Flash configurations" /> |
| 13 | </head> |
| 14 | <body> |
| 15 | <div xmlns="" class="navheader"> |
| 16 | <div class="libver"> |
| 17 | <p>Library Version 11.2.5.3</p> |
| 18 | </div> |
| 19 | <table width="100%" summary="Navigation header"> |
| 20 | <tr> |
| 21 | <th colspan="3" align="center">Name spaces</th> |
| 22 | </tr> |
| 23 | <tr> |
| 24 | <td width="20%" align="left"><a accesskey="p" href="program_scope.html">Prev</a> </td> |
| 25 | <th width="60%" align="center">Chapter 15. |
| 26 | Programmer Notes |
| 27 | </th> |
| 28 | <td width="20%" align="right"> <a accesskey="n" href="program_ram.html">Next</a></td> |
| 29 | </tr> |
| 30 | </table> |
| 31 | <hr /> |
| 32 | </div> |
| 33 | <div class="sect1" lang="en" xml:lang="en"> |
| 34 | <div class="titlepage"> |
| 35 | <div> |
| 36 | <div> |
| 37 | <h2 class="title" style="clear: both"><a id="program_namespace"></a>Name spaces</h2> |
| 38 | </div> |
| 39 | </div> |
| 40 | </div> |
| 41 | <div class="toc"> |
| 42 | <dl> |
| 43 | <dt> |
| 44 | <span class="sect2"> |
| 45 | <a href="program_namespace.html#idp52962960">C Language Name Space</a> |
| 46 | </span> |
| 47 | </dt> |
| 48 | <dt> |
| 49 | <span class="sect2"> |
| 50 | <a href="program_namespace.html#idp53001824">Filesystem Name Space</a> |
| 51 | </span> |
| 52 | </dt> |
| 53 | </dl> |
| 54 | </div> |
| 55 | <div class="sect2" lang="en" xml:lang="en"> |
| 56 | <div class="titlepage"> |
| 57 | <div> |
| 58 | <div> |
| 59 | <h3 class="title"><a id="idp52962960"></a>C Language Name Space</h3> |
| 60 | </div> |
| 61 | </div> |
| 62 | </div> |
| 63 | <p>The Berkeley DB library is careful to avoid C language programmer name spaces, |
| 64 | but there are a few potential areas for concern, mostly in the Berkeley DB |
| 65 | include file db.h. The db.h include file defines a number of types and |
| 66 | strings. Where possible, all of these types and strings are prefixed with |
| 67 | "DB_" or "db_". There are a few notable exceptions.</p> |
| 68 | <p>The Berkeley DB library uses a macro named "__P" to configure for systems that |
| 69 | do not provide ANSI C function prototypes. This could potentially collide |
| 70 | with other systems using a "__P" macro for similar or different purposes.</p> |
| 71 | <p>The Berkeley DB library needs information about specifically sized types for |
| 72 | each architecture. If they are not provided by the system, they are |
| 73 | typedef'd in the db.h include file. The types that may be typedef'd |
| 74 | by db.h include the following: u_int8_t, int16_t, u_int16_t, int32_t, |
| 75 | u_int32_t, u_char, u_short, u_int, and u_long.</p> |
| 76 | <p>The Berkeley DB library declares a few external routines. All these routines |
| 77 | are prefixed with the strings "db_". All internal Berkeley DB routines are |
| 78 | prefixed with the strings "__XXX_", where "XXX" is the subsystem prefix |
| 79 | (for example, "__db_XXX_" and "__txn_XXX_").</p> |
| 80 | </div> |
| 81 | <div class="sect2" lang="en" xml:lang="en"> |
| 82 | <div class="titlepage"> |
| 83 | <div> |
| 84 | <div> |
| 85 | <h3 class="title"><a id="idp53001824"></a>Filesystem Name Space</h3> |
| 86 | </div> |
| 87 | </div> |
| 88 | </div> |
| 89 | <p>Berkeley DB environments create or use some number of files in environment |
| 90 | home directories. These files are named <a class="link" href="env_db_config.html" title="DB_CONFIG configuration file">DB_CONFIG</a>, "log.NNNNN" |
| 91 | (for example, log.0000000003, where the number of digits following the |
| 92 | dot is unspecified), or with the string prefix "__db" (for example, |
| 93 | __db.001). Applications should never create files or databases in |
| 94 | database environment home directories with names beginning with the |
| 95 | characters "log" or "__db".</p> |
| 96 | <p>In some cases, applications may choose to remove Berkeley DB files as part of |
| 97 | their cleanup procedures, using system utilities instead of Berkeley DB |
| 98 | interfaces (for example, using the UNIX rm utility instead of the |
| 99 | <a href="../api_reference/C/envremove.html" class="olink">DB_ENV->remove()</a> method). This is not a problem, as long as applications |
| 100 | limit themselves to removing only files named "__db.###", where "###" |
| 101 | are the digits 0 through 9. Applications should never remove any files |
| 102 | named with the prefix "__db" or "log", other than "__db.###" files.</p> |
| 103 | </div> |
| 104 | </div> |
| 105 | <div class="navfooter"> |
| 106 | <hr /> |
| 107 | <table width="100%" summary="Navigation footer"> |
| 108 | <tr> |
| 109 | <td width="40%" align="left"><a accesskey="p" href="program_scope.html">Prev</a> </td> |
| 110 | <td width="20%" align="center"> |
| 111 | <a accesskey="u" href="program.html">Up</a> |
| 112 | </td> |
| 113 | <td width="40%" align="right"> <a accesskey="n" href="program_ram.html">Next</a></td> |
| 114 | </tr> |
| 115 | <tr> |
| 116 | <td width="40%" align="left" valign="top">Berkeley DB handles </td> |
| 117 | <td width="20%" align="center"> |
| 118 | <a accesskey="h" href="index.html">Home</a> |
| 119 | </td> |
| 120 | <td width="40%" align="right" valign="top"> Memory-only or Flash configurations</td> |
| 121 | </tr> |
| 122 | </table> |
| 123 | </div> |
| 124 | </body> |
| 125 | </html> |