about summary refs log tree commit diff
path: root/src/libstore/globals.cc
diff options
context:
space:
mode:
authorEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
committerEelco Dolstra <e.dolstra@tudelft.nl>2006-09-04T21·06+0000
commit75068e7d753cf6cbe45a4bf294000dca9bd41d8b (patch)
treec6274cc10caab08349b5585206034f41ca4a575f /src/libstore/globals.cc
parentaab88127321344d5818d823bff515d127108d058 (diff)
* Use a proper namespace.
* Optimise header file usage a bit.
* Compile the parser as C++.

Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r--src/libstore/globals.cc11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc
index f61fe167d870..466d0e0b26d7 100644
--- a/src/libstore/globals.cc
+++ b/src/libstore/globals.cc
@@ -1,9 +1,13 @@
 #include "globals.hh"
+#include "util.hh"
 
 #include <map>
 #include <algorithm>
 
 
+namespace nix {
+
+
 string nixStore = "/UNINIT";
 string nixDataDir = "/UNINIT";
 string nixLogDir = "/UNINIT";
@@ -23,7 +27,7 @@ string thisSystem = "unset";
 
 static bool settingsRead = false;
 
-static map<string, Strings> settings;
+static std::map<string, Strings> settings;
 
 
 string & at(Strings & ss, unsigned int n)
@@ -72,7 +76,7 @@ static void readSettings()
 Strings querySetting(const string & name, const Strings & def)
 {
     if (!settingsRead) readSettings();
-    map<string, Strings>::iterator i = settings.find(name);
+    std::map<string, Strings>::iterator i = settings.find(name);
     return i == settings.end() ? def : i->second;
 }
 
@@ -98,3 +102,6 @@ bool queryBoolSetting(const string & name, bool def)
     else throw Error(format("configuration option `%1%' should be either `true' or `false', not `%2%'")
         % name % v);
 }
+
+ 
+}