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/report.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/report.cc')
-rw-r--r-- | src/report.cc | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/src/report.cc b/src/report.cc index 991f3a6d..6c957767 100644 --- a/src/report.cc +++ b/src/report.cc @@ -56,7 +56,7 @@ void report_t::normalize_options(const string& verb) // Patch up some of the reporting options based on what kind of // command it was. -#ifdef HAVE_ISATTY +#if HAVE_ISATTY if (! HANDLED(force_color)) { if (! HANDLED(no_color) && isatty(STDOUT_FILENO)) HANDLER(color).on("?normalize"); @@ -183,14 +183,14 @@ void report_t::normalize_options(const string& verb) } long cols = 0; -#ifdef HAVE_IOCTL +#if HAVE_IOCTL struct winsize ws; #endif if (HANDLED(columns_)) cols = lexical_cast<long>(HANDLER(columns_).value); else if (const char * columns = std::getenv("COLUMNS")) cols = lexical_cast<long>(columns); -#ifdef HAVE_IOCTL +#if HAVE_IOCTL else if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1) cols = ws.ws_col; #endif |