aboutsummaryrefslogtreecommitdiff
path: root/build2/b.cxx
diff options
context:
space:
mode:
authorBoris Kolpackov <boris@codesynthesis.com>2016-10-19 17:50:40 +0200
committerBoris Kolpackov <boris@codesynthesis.com>2016-11-04 09:26:33 +0200
commite84fd4aeeb15cd5894193dc403afc60e0dd7f321 (patch)
treee74f31d273e1e5e54b358ab66d1c7e6fb577afaf /build2/b.cxx
parenta17e517e079c33bcb4d6dea94f6c441a5eb2e33a (diff)
Factor global initialization into init() analogous to reset()
Diffstat (limited to 'build2/b.cxx')
-rw-r--r--build2/b.cxx18
1 files changed, 4 insertions, 14 deletions
diff --git a/build2/b.cxx b/build2/b.cxx
index d16a406..d800605 100644
--- a/build2/b.cxx
+++ b/build2/b.cxx
@@ -2,7 +2,6 @@
// copyright : Copyright (c) 2014-2016 Code Synthesis Ltd
// license : MIT; see accompanying LICENSE file
-#include <time.h> // tzset()
#include <string.h> // strerror()
#include <stdlib.h> // getenv() _putenv()(_WIN32)
@@ -160,11 +159,11 @@ main (int argc, char* argv[])
fail << e;
}
- // Diagnostics verbosity.
+ // Global initializations.
//
- verb = ops.verbose_specified ()
- ? ops.verbose ()
- : ops.V () ? 3 : ops.v () ? 2 : ops.q () ? 0 : 1;
+ init (ops.verbose_specified ()
+ ? ops.verbose ()
+ : ops.V () ? 3 : ops.v () ? 2 : ops.q () ? 0 : 1);
// Version.
//
@@ -205,10 +204,6 @@ main (int argc, char* argv[])
}
}
- // Initialize time conversion data that is used by localtime_r().
- //
- tzset ();
-
// Register builtin modules.
//
{
@@ -248,11 +243,6 @@ main (int argc, char* argv[])
bm["cli"] = mf {nullptr, &cli::init};
}
- // Figure out work and home directories.
- //
- work = dir_path::current ();
- home = dir_path::home ();
-
if (verb >= 5)
{
const char* p (getenv ("PATH"));