diff options
author | Alexis Hildebrandt <afh@surryhill.net> | 2023-04-19 10:22:43 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-04-19 10:22:43 +0200 |
commit | 1a5fba25987c8f44a0fdcf8219d9243a3d04dda2 (patch) | |
tree | 9ddc6177529da531c4c25852f2ca88adde7740f3 /src/select.cc | |
parent | bd510c2e5f6269b4112f032d2a9e1d7665e4fd74 (diff) | |
parent | d2de65d7d8b366bc3a6291831e7a1090e2e940a4 (diff) | |
download | fork-ledger-1a5fba25987c8f44a0fdcf8219d9243a3d04dda2.tar.gz fork-ledger-1a5fba25987c8f44a0fdcf8219d9243a3d04dda2.tar.bz2 fork-ledger-1a5fba25987c8f44a0fdcf8219d9243a3d04dda2.zip |
Merge pull request #2238 from afh/cleanup-system-defines
Cleanup system defines
Diffstat (limited to 'src/select.cc')
-rw-r--r-- | src/select.cc | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/select.cc b/src/select.cc index 6660f1ab..ccec34ec 100644 --- a/src/select.cc +++ b/src/select.cc @@ -145,14 +145,14 @@ value_t select_command(call_scope_t& args) string thus_far = ""; std::size_t cols = 0; -#ifdef HAVE_IOCTL +#if HAVE_IOCTL struct winsize ws; #endif if (report.HANDLED(columns_)) cols = lexical_cast<std::size_t>(report.HANDLER(columns_).value); else if (const char * columns_env = std::getenv("COLUMNS")) cols = lexical_cast<std::size_t>(columns_env); -#ifdef HAVE_IOCTL +#if HAVE_IOCTL else if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1) cols = ws.ws_col; #endif |