aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-04-17 12:21:15 +0000
committerMike Frysinger <vapier@gentoo.org>2007-04-17 12:21:15 +0000
commitf5e65274f0f150d6db9f53f87e87eb6d984f8e94 (patch)
treef9be80f9c2c29940daaaeef31bbd8eb1d1bea184
parente635e1646466d632250ac2ed9e0d3d3b86dfb4cf (diff)
fix #if handling in get_term_columns
-rw-r--r--src/libeinfo.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/libeinfo.c b/src/libeinfo.c
index 8c7671da..c2ae9715 100644
--- a/src/libeinfo.c
+++ b/src/libeinfo.c
@@ -162,13 +162,13 @@ static bool colour_terminal (void)
static int get_term_columns (void)
{
-#ifdef TIOCGSIZE /* BSD */
+#if defined(TIOCGSIZE) /* BSD */
struct ttysize ts;
if (ioctl(0, TIOCGSIZE, &ts) == 0)
return (ts.ts_cols);
-#elif TIOCGWINSZ /* Linux */
- struct winsize ws;
+#elif defined(TIOCGWINSZ) /* Linux */
+ struct winsize ws;
if (ioctl(0, TIOCGWINSZ, &ws) == 0)
return (ws.ws_col);