diff options
author | Karen Arutyunov <karen@codesynthesis.com> | 2016-06-03 16:43:46 +0300 |
---|---|---|
committer | Karen Arutyunov <karen@codesynthesis.com> | 2016-06-18 15:17:29 +0300 |
commit | b0e481a653b01e4329bccb1d101d56e3e878e960 (patch) | |
tree | bba1a4cae73ec4ece95f408e079a15d664e49927 /build2/b.cxx | |
parent | 0d692ec857340a0f16a03d6a7ef38fe864a83cfc (diff) |
Port to MinGW
Diffstat (limited to 'build2/b.cxx')
-rw-r--r-- | build2/b.cxx | 17 |
1 files changed, 1 insertions, 16 deletions
diff --git a/build2/b.cxx b/build2/b.cxx index 1377d5b..633d583 100644 --- a/build2/b.cxx +++ b/build2/b.cxx @@ -8,7 +8,6 @@ #include <stdlib.h> // getenv() #include <unistd.h> // getuid() #include <sys/types.h> // uid_t -#include <pwd.h> // struct passwd, getpwuid() #include <sstream> #include <cstring> // strcmp(), strchr() @@ -202,21 +201,7 @@ main (int argc, char* argv[]) // Figure out work and home directories. // work = dir_path::current (); - - if (const char* h = getenv ("HOME")) - home = dir_path (h); - else - { - struct passwd* pw (getpwuid (getuid ())); - - if (pw == nullptr) - { - const char* msg (strerror (errno)); - fail << "unable to determine home directory: " << msg; - } - - home = dir_path (pw->pw_dir); - } + home = dir_path::home (); if (verb >= 5) { |