From 4a013962bdd08ee0cf285136e4eca0f2c9c76b98 Mon Sep 17 00:00:00 2001 From: Eelco Dolstra Date: Thu, 31 Jul 2003 13:47:13 +0000 Subject: * Started using Berkeley DB environments. This is necessary for transaction support (but we don't actually use transactions yet). --- src/globals.hh | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) (limited to 'src/globals.hh') diff --git a/src/globals.hh b/src/globals.hh index fbb020df7c..9df8276222 100644 --- a/src/globals.hh +++ b/src/globals.hh @@ -3,10 +3,15 @@ #include +#include "db.hh" + using namespace std; -/* Database names. */ +extern Database nixDB; + + +/* Database tables. */ /* dbPath2Id :: Path -> FSId @@ -60,12 +65,14 @@ extern string nixDataDir; /* !!! fix */ /* nixLogDir is the directory where we log various operations. */ extern string nixLogDir; -/* nixDB is the file name of the Berkeley DB database where we - maintain the dbXXX mappings. */ -extern string nixDB; +/* nixDBPath is the path name of our Berkeley DB environment. */ +extern string nixDBPath; + +/* Open the database environment. */ +void openDB(); -/* Initialize the databases. */ +/* Create the required database tables. */ void initDB(); -- cgit 1.4.1