From: krakjoe Date: Sat, 9 Nov 2013 22:53:27 +0000 (+0000) Subject: cleanup X-Git-Tag: php-5.6.0alpha1~110^2~559 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1dd5d42bd80a5fa1f14b9f2046cfa042ff5e6195;p=php cleanup --- diff --git a/phpdbg.c b/phpdbg.c index 9223824193..7a9b419b9f 100644 --- a/phpdbg.c +++ b/phpdbg.c @@ -25,7 +25,6 @@ #include "zend_stream.h" #include "SAPI.h" -#include "sapi/cgi/fastcgi.h" #include @@ -99,17 +98,20 @@ int main(int argc, char **argv) { /* {{{ */ tsrm_ls = ts_resource(0); } #endif - + sapi_module_struct *phpdbg = &phpdbg_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 */ + _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); + phpdbg->executable_location = argv[0]; + + sapi_startup(phpdbg); - if (phpdbg_sapi_module.startup(&phpdbg_sapi_module) == SUCCESS) + if (phpdbg->startup(phpdbg) == SUCCESS) { zend_activate(TSRMLS_C);