fix #if handling in get_term_columns
This commit is contained in:
parent
e635e16464
commit
f5e65274f0
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user