]> granicus.if.org Git - php/commitdiff
Try fixing 5.4 and 5.5 build, again
authorBob Weinand <bobwei9@hotmail.com>
Wed, 22 Oct 2014 17:58:52 +0000 (19:58 +0200)
committerBob Weinand <bobwei9@hotmail.com>
Wed, 22 Oct 2014 17:58:52 +0000 (19:58 +0200)
phpdbg.h
phpdbg_prompt.c
phpdbg_utils.c

index b7346ab8bf2ddf15a9e1109c4fa2f9a832f01be5..ce90c6a95e071a30c134ef93eb32ede3cedc1483 100644 (file)
--- a/phpdbg.h
+++ b/phpdbg.h
@@ -29,6 +29,8 @@
 # define PHPDBG_API
 #endif
 
+#include <stdint.h>
+#include <stddef.h>
 #include "php.h"
 #include "php_globals.h"
 #include "php_variables.h"
@@ -48,6 +50,7 @@
 #if defined(_WIN32) && !defined(__MINGW32__)
 #      include <windows.h>
 #      include "config.w32.h"
+#      include "win32/php_stdint.h"
 #      undef  strcasecmp
 #      undef  strncasecmp
 #      define strcasecmp _stricmp 
index 6611e8b8f46825019870899a17c318d4d91888a5..6c78ec6d1302fc07425abec7054592d2a60878b5 100644 (file)
@@ -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 */
index 76f870df7dd6ae6ed6ac4fb97d240b0a7a54163d..69dc7d12d4cdd2eb03e2f8aa93d8384c9702e486 100644 (file)
@@ -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);