From: krakjoe Date: Sat, 9 Nov 2013 22:47:39 +0000 (+0000) Subject: change server->phpdbg X-Git-Tag: php-5.6.0alpha1~110^2~560 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=60ee0cc74cbe43aa2452c97b1c687320d41b4c59;p=php change server->phpdbg --- diff --git a/phpdbg.c b/phpdbg.c index ba1b0a3e75..9223824193 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -31,9 +31,9 @@ #include "php_main.h" -static zend_module_entry sapi_server_module_entry = { +static zend_module_entry sapi_phpdbg_module_entry = { STANDARD_MODULE_HEADER, - "server", + "phpdbg", NULL, NULL, NULL, @@ -44,20 +44,20 @@ static zend_module_entry sapi_server_module_entry = { STANDARD_MODULE_PROPERTIES }; -static inline int php_sapi_server_module_startup(sapi_module_struct *module) { /* {{{ */ - if (php_module_startup(module, &sapi_server_module_entry, 1) == FAILURE) { +static inline int php_sapi_phpdbg_module_startup(sapi_module_struct *module) { /* {{{ */ + if (php_module_startup(module, &sapi_phpdbg_module_entry, 1) == FAILURE) { return FAILURE; } return SUCCESS; } /* }}} */ -/* {{{ sapi_module_struct server_sapi_module +/* {{{ sapi_module_struct phpdbg_sapi_module */ -static sapi_module_struct server_sapi_module = { - "server", /* name */ - "SAPI server", /* pretty name */ +static sapi_module_struct phpdbg_sapi_module = { + "phpdbg", /* name */ + "phpdbg", /* pretty name */ - php_sapi_server_module_startup, /* startup */ + php_sapi_phpdbg_module_startup, /* startup */ php_module_shutdown_wrapper, /* shutdown */ NULL, /* activate */ @@ -100,9 +100,16 @@ int main(int argc, char **argv) { /* {{{ */ } #endif - sapi_startup(&server_sapi_module); +#ifdef PHP_WIN32 + _fmode = _O_BINARY; /*sets default for file streams to binary */ + setmode(_fileno(stdin), O_BINARY); /* make the stdio mode be binary */ + setmode(_fileno(stdout), O_BINARY); /* make the stdio mode be binary */ + setmode(_fileno(stderr), O_BINARY); /* make the stdio mode be binary */ +#endif + + sapi_startup(&phpdbg_sapi_module); - if (server_sapi_module.startup(&server_sapi_module) == SUCCESS) + if (phpdbg_sapi_module.startup(&phpdbg_sapi_module) == SUCCESS) { zend_activate(TSRMLS_C);