summaryrefslogtreecommitdiff
path: root/src/utils.cc
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-04-15 14:07:01 +0200
committerAlexis Hildebrandt <afh@surryhill.net>2023-04-15 14:28:29 +0200
commit57fb9abd4355fae4b923403f4bcf51013d16e2c2 (patch)
treebd672d22d3236a2a51a09dc141f6680c74063cea /src/utils.cc
parentfac2c16d1237fdeccb4017268f3068254cbde573 (diff)
downloadfork-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.cc6
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);