- Fix build

This commit is contained in:
Felipe Pena 2013-11-18 23:30:57 -02:00
parent 0250a0992c
commit db8f825414

View File

@ -914,6 +914,7 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */
{
size_t cmd_len;
int ret = SUCCESS;
const char *start = NULL;
#ifndef HAVE_LIBREADLINE
char cmd[PHPDBG_MAX_CMD];
@ -924,13 +925,14 @@ int phpdbg_interactive(TSRMLS_D) /* {{{ */
cmd_len = strlen(cmd) - 1;
#else
char *cmd = NULL;
const char *start = NULL;
while (!(PHPDBG_G(flags) & PHPDBG_IS_QUITTING)) {
cmd = readline(PROMPT);
cmd_len = cmd ? strlen(cmd) : 0;
start = estrndup(cmd, cmd_len);
#endif
start = estrndup(cmd, cmd_len);
/* trim space from end of input */
while (*cmd && isspace(cmd[cmd_len-1]))
cmd_len--;