From 57fb9abd4355fae4b923403f4bcf51013d16e2c2 Mon Sep 17 00:00:00 2001 From: Alexis Hildebrandt Date: Sat, 15 Apr 2023 14:07:01 +0200 Subject: Use #cmakedefine01 for system capability checks and reply #ifdev HAVE_ with #if HAVE_ --- src/utils.cc | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'src/utils.cc') 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); -- cgit v1.2.3