summaryrefslogtreecommitdiff
path: root/src/utils.cc
diff options
context:
space:
mode:
authorJohn Wiegley <johnw@newartisans.com>2016-09-17 14:41:15 -0700
committerGitHub <noreply@github.com>2016-09-17 14:41:15 -0700
commit132156766770da8340138aab117cf7e37787403c (patch)
tree5f837949c367f435d947833c6f52e37473357ee6 /src/utils.cc
parenta3b573e1107729e743c96da8ed9272361ba6ae31 (diff)
parentc193cc3a5b4dbf39e19744cf4d30e616298eaa86 (diff)
downloadfork-ledger-132156766770da8340138aab117cf7e37787403c.tar.gz
fork-ledger-132156766770da8340138aab117cf7e37787403c.tar.bz2
fork-ledger-132156766770da8340138aab117cf7e37787403c.zip
Merge pull request #466 from schmave/win-1
Fix build under msys32; add Appveyor continuous build
Diffstat (limited to 'src/utils.cc')
-rw-r--r--src/utils.cc4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/utils.cc b/src/utils.cc
index 947f2408..fca9e6d4 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -807,7 +807,7 @@ path expand_path(const path& pathname)
if (path_string.length() == 1 || pos == 1) {
pfx = std::getenv("HOME");
-#if HAVE_GETPWUID
+#ifdef HAVE_GETPWUID
if (! pfx) {
// Punt. We're trying to expand ~/, but HOME isn't set
struct passwd * pw = getpwuid(getuid());
@@ -816,7 +816,7 @@ path expand_path(const path& pathname)
}
#endif
}
-#if HAVE_GETPWNAM
+#ifdef HAVE_GETPWNAM
else {
string user(path_string, 1, pos == string::npos ?
string::npos : pos - 1);