diff options
author | Bob Weinand <bobwei9@hotmail.com> | 2014-06-15 15:47:14 +0200 |
---|---|---|
committer | Bob Weinand <bobwei9@hotmail.com> | 2014-06-15 15:47:14 +0200 |
commit | f677889a9a536d506febc13e1022eb4816fb5fa1 (patch) | |
tree | b43a2401c9df097d1753b6421e1a012c05e88661 /sapi/phpdbg/phpdbg_utils.c | |
parent | da3ef175b98266e8920c326ff619d70ef8c375c3 (diff) | |
parent | e9c2e7d6e630ae660b6b5dc7269af58d4bf7bf54 (diff) | |
download | php-git-f677889a9a536d506febc13e1022eb4816fb5fa1.tar.gz |
Merge sapi/phpdbg into PHP-5.6
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_utils.c | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index c9b22a2039..98748b202a 100644 --- a/sapi/phpdbg/phpdbg_utils.c +++ b/sapi/phpdbg/phpdbg_utils.c @@ -32,6 +32,9 @@ # include "win32/time.h" #elif defined(HAVE_SYS_IOCTL_H) # include "sys/ioctl.h" +# ifndef GWINSZ_IN_SYS_IOCTL +# include <termios.h> +# endif #endif ZEND_EXTERN_MODULE_GLOBALS(phpdbg); @@ -437,12 +440,12 @@ PHPDBG_API int phpdbg_get_terminal_width(TSRMLS_D) /* {{{ */ GetConsoleScreenBufferInfo(GetStdHandle(STD_OUTPUT_HANDLE), &csbi); columns = csbi.srWindow.Right - csbi.srWindow.Left + 1; -#elif defined(HAVE_SYS_IOCTL_H) +#elif defined(HAVE_SYS_IOCTL_H) && defined (TIOCGWINSZ) struct winsize w; - columns = ioctl(fileno(stdout), TIOCGWINSZ, &w) == 0 ? w.ws_col : 100; + columns = ioctl(fileno(stdout), TIOCGWINSZ, &w) == 0 ? w.ws_col : 80; #else - columns = 100; + columns = 80; #endif return columns; } /* }}} */ |