diff options
author | Xinchen Hui <laruence@php.net> | 2014-06-18 23:37:47 +0800 |
---|---|---|
committer | Xinchen Hui <laruence@php.net> | 2014-06-18 23:37:47 +0800 |
commit | 17f35c9a295a55b8af09a5c8ba7dbc8894d3861b (patch) | |
tree | cbd1f091c85ea6bbd361196244d4aa7bc3f04ad4 /sapi/phpdbg/phpdbg_utils.c | |
parent | b38f6f3de96990163d36c82c248fb29e6f0815c4 (diff) | |
parent | b108267f2c5c09bd153cfb1d4e580d5fc9c52d51 (diff) | |
download | php-git-17f35c9a295a55b8af09a5c8ba7dbc8894d3861b.tar.gz |
Merge branch 'phpng' of git.php.net:php-src into phpng
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; } /* }}} */ |