diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-15 14:07:01 +0200 |
---|---|---|
committer | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-15 14:28:29 +0200 |
commit | 57fb9abd4355fae4b923403f4bcf51013d16e2c2 (patch) | |
tree | bd672d22d3236a2a51a09dc141f6680c74063cea /src/utils.cc | |
parent | fac2c16d1237fdeccb4017268f3068254cbde573 (diff) | |
download | fork-ledger-57fb9abd4355fae4b923403f4bcf51013d16e2c2.tar.gz fork-ledger-57fb9abd4355fae4b923403f4bcf51013d16e2c2.tar.bz2 fork-ledger-57fb9abd4355fae4b923403f4bcf51013d16e2c2.zip |
Use #cmakedefine01 for system capability checks
and reply #ifdev HAVE_ with #if HAVE_
Diffstat (limited to 'src/utils.cc')
-rw-r--r-- | src/utils.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/utils.cc b/src/utils.cc index baf5a27a..955b5a7f 100644 --- a/src/utils.cc +++ b/src/utils.cc @@ -662,7 +662,7 @@ static struct __maybe_enable_debugging { * Timers (allows log xacts to specify cumulative time spent) */ -#if LOGGING_ON && defined(TIMERS_ON) +#if LOGGING_ON && TIMERS_ON namespace ledger { @@ -807,7 +807,7 @@ path expand_path(const path& pathname) if (path_string.length() == 1 || pos == 1) { pfx = std::getenv("HOME"); -#ifdef HAVE_GETPWUID +#if 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 } -#ifdef HAVE_GETPWNAM +#if HAVE_GETPWNAM else { string user(path_string, 1, pos == string::npos ? string::npos : pos - 1); |