diff options
author | Evan Mallory <schmave@gmail.com> | 2016-09-17 13:29:09 -0400 |
---|---|---|
committer | Evan Mallory <schmave@gmail.com> | 2016-09-17 14:22:38 -0400 |
commit | c193cc3a5b4dbf39e19744cf4d30e616298eaa86 (patch) | |
tree | 5f837949c367f435d947833c6f52e37473357ee6 /src/utils.cc | |
parent | a3b573e1107729e743c96da8ed9272361ba6ae31 (diff) | |
download | fork-ledger-c193cc3a5b4dbf39e19744cf4d30e616298eaa86.tar.gz fork-ledger-c193cc3a5b4dbf39e19744cf4d30e616298eaa86.tar.bz2 fork-ledger-c193cc3a5b4dbf39e19744cf4d30e616298eaa86.zip |
Fix build under msys32; add Appveyor continuous build
* Appveyor is a continuous integration platform for Windows that is free for open source projects. See latest test build here: https://ci.appveyor.com/project/Evan/ledger/build/artifacts
* Changed WIN32 to _WIN32 because this article http://nadeausoftware.com/articles/2012/01/c_c_tip_how_use_compiler_predefined_macros_detect_operating_system claims that it is defined by the greatest number of compilers.
* Modified HAVE_ISATTY and other system defines so that system.hh compiles when cmake fails to find the relevant function.
* Add missing include in test/unit/t_value.cc
Almost all tests fail when you run them on msys32. I will address that in a future PR.
Diffstat (limited to 'src/utils.cc')
-rw-r--r-- | src/utils.cc | 4 |
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); |