summaryrefslogtreecommitdiff
path: root/src/utils.cc
diff options
context:
space:
mode:
authorAlexis Hildebrandt <afh@surryhill.net>2023-04-19 10:22:43 +0200
committerGitHub <noreply@github.com>2023-04-19 10:22:43 +0200
commit1a5fba25987c8f44a0fdcf8219d9243a3d04dda2 (patch)
tree9ddc6177529da531c4c25852f2ca88adde7740f3 /src/utils.cc
parentbd510c2e5f6269b4112f032d2a9e1d7665e4fd74 (diff)
parentd2de65d7d8b366bc3a6291831e7a1090e2e940a4 (diff)
downloadledger-1a5fba25987c8f44a0fdcf8219d9243a3d04dda2.tar.gz
ledger-1a5fba25987c8f44a0fdcf8219d9243a3d04dda2.tar.bz2
ledger-1a5fba25987c8f44a0fdcf8219d9243a3d04dda2.zip
Merge pull request #2238 from afh/cleanup-system-defines
Cleanup system defines
Diffstat (limited to 'src/utils.cc')
-rw-r--r--src/utils.cc8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/utils.cc b/src/utils.cc
index baf5a27a..6ca7eeb7 100644
--- a/src/utils.cc
+++ b/src/utils.cc
@@ -29,7 +29,7 @@
* OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*/
-#include <system.hh>
+#include <ledger.hh>
#include "times.h"
@@ -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);