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/select.cc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/select.cc') 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(report.HANDLER(columns_).value); else if (const char * columns_env = std::getenv("COLUMNS")) cols = lexical_cast(columns_env); -#ifdef HAVE_IOCTL +#if HAVE_IOCTL else if (ioctl(STDIN_FILENO, TIOCGWINSZ, &ws) != -1) cols = ws.ws_col; #endif -- cgit v1.2.3