From 801080cf7ef1ed333e97741e6a002bc5a2636fed Mon Sep 17 00:00:00 2001 From: Bob Weinand Date: Wed, 22 Oct 2014 19:58:52 +0200 Subject: [PATCH] Try fixing 5.4 and 5.5 build, again --- phpdbg.h | 3 +++ phpdbg_prompt.c | 2 +- phpdbg_utils.c | 4 ++++ 3 files changed, 8 insertions(+), 1 deletion(-) diff --git a/phpdbg.h b/phpdbg.h index b7346ab8bf..ce90c6a95e 100644 --- a/phpdbg.h +++ b/phpdbg.h @@ -29,6 +29,8 @@ # define PHPDBG_API #endif +#include +#include #include "php.h" #include "php_globals.h" #include "php_variables.h" @@ -48,6 +50,7 @@ #if defined(_WIN32) && !defined(__MINGW32__) # include # include "config.w32.h" +# include "win32/php_stdint.h" # undef strcasecmp # undef strncasecmp # define strcasecmp _stricmp diff --git a/phpdbg_prompt.c b/phpdbg_prompt.c index 6611e8b8f4..6c78ec6d13 100644 --- a/phpdbg_prompt.c +++ b/phpdbg_prompt.c @@ -557,7 +557,7 @@ static inline void phpdbg_handle_exception(TSRMLS_D) /* }}} */ zval_ptr_dtor(&trace); } else { - phpdbg_error("exception", "name=\"%s\"" "Uncaught %s!", Z_OBJCE(exception)->name); + phpdbg_error("exception", "name=\"%s\"", "Uncaught %s!", Z_OBJCE(exception)->name); } /* output useful information about address */ diff --git a/phpdbg_utils.c b/phpdbg_utils.c index 76f870df7d..69dc7d12d4 100644 --- a/phpdbg_utils.c +++ b/phpdbg_utils.c @@ -1227,7 +1227,11 @@ static int phpdbg_process_print(int fd, int type, const char *tag, const char *m efree(stream_buf); PHPDBG_G(in_script_xml) = type; } +#if PHP_VERSION_ID >= 50600 buf = php_escape_html_entities((unsigned char *) msg, msglen, (size_t *) &buflen, 0, ENT_NOQUOTES, PG(internal_encoding) && PG(internal_encoding)[0] ? PG(internal_encoding) : (SG(default_charset) ? SG(default_charset) : "UTF-8") TSRMLS_CC); +#else + buf = php_escape_html_entities((unsigned char *) msg, msglen, (size_t *) &buflen, 0, ENT_NOQUOTES, SG(default_charset) ? SG(default_charset) : "UTF-8" TSRMLS_CC); +#endif phpdbg_encode_ctrl_chars(&buf, &buflen); phpdbg_mixed_write(fd, buf, buflen TSRMLS_CC); efree(buf); -- 2.40.0