com php-src: Temporarily disable wait/xml protocol...: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.h sapi/phpdbg/phpdbg_help.c sapi/phpdb
g/phpdbg_prompt.c sapi/phpdbg/phpdbg_rinit_hook.c sapi/phpdbg/phpdbg_wait.c
| From: | Bob Weinand | Date: | Thu, 30 Oct 2014 22:09:57 +0000 |
| Subject: | com php-src: Temporarily disable wait/xml protocol...: sapi/phpdbg/phpdbg.c sapi/phpdbg/phpdbg.h sapi/phpdbg/phpdbg_help.c sapi/phpdb g/phpdbg_prompt.c sapi/phpdbg/phpdbg_rinit_hook.c sapi/phpdbg/phpdbg_wait.c |
||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-82908@lists.php.net to get a copy of this message | ||
Commit: 113f1fd6d5eb286c50f6cca003d18f847bc202cb
Author: Bob Weinand <bobwei9@hotmail.com> Thu, 30 Oct 2014 23:09:57 +0100
Parents: 067852ca615bd083e821a08dbc21c21e9d46306f
Branches: PHP-5.6
Link: http://git.php.net/?p=php-src.git;a=commitdiff;h=113f1fd6d5eb286c50f6cca003d18f847bc202cb
Log:
Temporarily disable wait/xml protocol...
Changed paths:
M sapi/phpdbg/phpdbg.c
M sapi/phpdbg/phpdbg.h
M sapi/phpdbg/phpdbg_help.c
M sapi/phpdbg/phpdbg_prompt.c
M sapi/phpdbg/phpdbg_rinit_hook.c
M sapi/phpdbg/phpdbg_wait.c
Diff:
diff --git a/sapi/phpdbg/phpdbg.c b/sapi/phpdbg/phpdbg.c
index 7ca7997..6ee41b7 100644
--- a/sapi/phpdbg/phpdbg.c
+++ b/sapi/phpdbg/phpdbg.c
@@ -779,7 +779,9 @@ const opt_struct OPTIONS[] = { /* {{{ */
{'S', 1, "sapi-name"},
{'l', 1, "listen"},
{'a', 1, "address-or-any"},
+#if PHPDBG_IN_DEV
{'x', 0, "xml output"},
+#endif
{'V', 0, "version"},
{'-', 0, NULL}
}; /* }}} */
@@ -1213,8 +1215,10 @@ phpdbg_main:
} else address = strdup(php_optarg);
} break;
+#if PHPDBG_IN_DEV
case 'x':
flags |= PHPDBG_WRITE_XML;
+#endif
break;
case 'V': {
diff --git a/sapi/phpdbg/phpdbg.h b/sapi/phpdbg/phpdbg.h
index a9be804..a0ba75e 100644
--- a/sapi/phpdbg/phpdbg.h
+++ b/sapi/phpdbg/phpdbg.h
@@ -21,6 +21,8 @@
#ifndef PHPDBG_H
#define PHPDBG_H
+#define PHPDBG_IN_DEV 0
+
#ifdef PHP_WIN32
# define PHPDBG_API __declspec(dllexport)
#elif defined(__GNUC__) && __GNUC__ >= 4
diff --git a/sapi/phpdbg/phpdbg_help.c b/sapi/phpdbg/phpdbg_help.c
index 652e170..d47f8c7 100644
--- a/sapi/phpdbg/phpdbg_help.c
+++ b/sapi/phpdbg/phpdbg_help.c
@@ -388,7 +388,9 @@ phpdbg_help_text_t phpdbg_help_text[] = {
" **-S** **-S**cli Override SAPI name, careful!" CR
" **-l** **-l**4000 Setup remote console ports" CR
" **-a** **-a**192.168.0.3 Setup remote console bind address" CR
+#if PHPDBG_IN_DEV
" **-x** Enable xml output (instead of normal text output)" CR
+#endif
" **-V** Print version number" CR
" **--** **--** arg1 arg2 Use to delimit phpdbg arguments and php $argv; append
any $argv "
"argument after it" CR CR
diff --git a/sapi/phpdbg/phpdbg_prompt.c b/sapi/phpdbg/phpdbg_prompt.c
index 915bccf..f030654 100644
--- a/sapi/phpdbg/phpdbg_prompt.c
+++ b/sapi/phpdbg/phpdbg_prompt.c
@@ -82,7 +82,9 @@ const phpdbg_command_t phpdbg_prompt_commands[] = {
PHPDBG_COMMAND_D(export, "export breaks to a .phpdbginit script", '>',
NULL, "s", PHPDBG_ASYNC_SAFE),
PHPDBG_COMMAND_D(sh, "shell a command", 0 , NULL,
"i", 0),
PHPDBG_COMMAND_D(quit, "exit phpdbg", 'q',
NULL, 0, PHPDBG_ASYNC_SAFE),
+#if PHPDBG_IN_DEV
PHPDBG_COMMAND_D(wait, "wait for other process", 'W',
NULL, 0, 0),
+#endif
PHPDBG_COMMAND_D(watch, "set watchpoint", 'w',
phpdbg_watch_commands, "|ss", 0),
PHPDBG_COMMAND_D(eol, "set EOL", 'E',
NULL, "|s", 0),
PHPDBG_END_COMMAND
diff --git a/sapi/phpdbg/phpdbg_rinit_hook.c b/sapi/phpdbg/phpdbg_rinit_hook.c
index acbdfb6..11bd5c9 100644
--- a/sapi/phpdbg/phpdbg_rinit_hook.c
+++ b/sapi/phpdbg/phpdbg_rinit_hook.c
@@ -52,7 +52,7 @@ static PHP_RINIT_FUNCTION(phpdbg_webhelper) /* {{{ */
return SUCCESS;
}
-#ifndef _WIN32
+#if PHPDBG_IN_DEV
{
struct sockaddr_un sock;
int s = socket(AF_UNIX, SOCK_STREAM, 0);
diff --git a/sapi/phpdbg/phpdbg_wait.c b/sapi/phpdbg/phpdbg_wait.c
index 6f9eea9..180ae6a 100644
--- a/sapi/phpdbg/phpdbg_wait.c
+++ b/sapi/phpdbg/phpdbg_wait.c
@@ -365,7 +365,7 @@ void phpdbg_webdata_decompress(char *msg, int len TSRMLS_DC) {
PHPDBG_COMMAND(wait) /* {{{ */
{
-#ifndef PHP_WIN32
+#if PHPDBG_IN_DEV
struct sockaddr_un local, remote;
int rlen, sr, sl;
unlink(PHPDBG_G(socket_path));