diff options
Diffstat (limited to 'src/libstore/globals.cc')
-rw-r--r-- | src/libstore/globals.cc | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/src/libstore/globals.cc b/src/libstore/globals.cc index f61fe167d..466d0e0b2 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); } + + +} |