diff options
author | Anatol Belski <ab@php.net> | 2014-07-02 10:27:59 +0200 |
---|---|---|
committer | Anatol Belski <ab@php.net> | 2014-07-02 10:27:59 +0200 |
commit | 84876850ff3e50ee7b85abc7261bdf9038d65e4b (patch) | |
tree | 091e7474679a1b6700459d6db2e36e0ac9272397 /sapi/phpdbg/phpdbg_utils.c | |
parent | 0e7bf92129f608c44f4d5bd51139ec2bd85fecc8 (diff) | |
parent | 96783bdfb79b33646dc916d4b93bc33b78d70c4c (diff) | |
download | php-git-84876850ff3e50ee7b85abc7261bdf9038d65e4b.tar.gz |
Merge remote-tracking branch 'origin/str_size_and_int64_56_backport' into str_size_and_int64
* origin/str_size_and_int64_56_backport: (178 commits)
fix integer overflow in {stream,file}_{get,put}_contents()
add some missing NEWS entries
NEWS block for 5.6.0RC3
Fix ext/pgsql builds with libpq < 7.3.
updated libs_version.txt
updated libs_version.txt
updated libmagic.patch in 5.6+
updated libmagic.patch
Fixed possible crash because of race conditions on modifying constants in shared memory
remove the NEWS entry for the reverted fpm fix
remove the NEWS entry for the reverted fpm fix
remove the NEWS entry for the reverted fpm fix
Revert "Fix Bug #67530 error_log=syslog ignored"
--enable-fpm for the travis build
fix the last fpm NEWS entry, the other bug is related, but not the same what we fixed here
NEWS
NEWS
Fix bug #67091: make install fails to install libphp5.so on FreeBSD 10.0
adding NEWS entry for the fix for bug #65641
Updated NEWS file for recent phpdbg fixes
...
Diffstat (limited to 'sapi/phpdbg/phpdbg_utils.c')
-rw-r--r-- | sapi/phpdbg/phpdbg_utils.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/sapi/phpdbg/phpdbg_utils.c b/sapi/phpdbg/phpdbg_utils.c index c9b22a2039..3ce2fade17 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); @@ -397,12 +400,16 @@ PHPDBG_API const char *phpdbg_get_prompt(TSRMLS_D) /* {{{ */ } /* create cached prompt */ +#ifndef HAVE_LIBEDIT + /* TODO: libedit doesn't seems to support coloured prompt */ if ((PHPDBG_G(flags) & PHPDBG_IS_COLOURED)) { asprintf( &PHPDBG_G(prompt)[1], "\033[%sm%s\033[0m ", PHPDBG_G(colors)[PHPDBG_COLOR_PROMPT]->code, PHPDBG_G(prompt)[0]); - } else { + } else +#endif + { asprintf( &PHPDBG_G(prompt)[1], "%s ", PHPDBG_G(prompt)[0]); @@ -437,12 +444,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; } /* }}} */ |