fix #if handling in get_term_columns

This commit is contained in:
Mike Frysinger 2007-04-17 12:21:15 +00:00
parent e635e16464
commit f5e65274f0

View File

@ -162,12 +162,12 @@ 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 */
#elif defined(TIOCGWINSZ) /* Linux */
struct winsize ws;
if (ioctl(0, TIOCGWINSZ, &ws) == 0)