From 1dd5d42bd80a5fa1f14b9f2046cfa042ff5e6195 Mon Sep 17 00:00:00 2001 From: krakjoe Date: Sat, 9 Nov 2013 22:53:27 +0000 Subject: [PATCH] cleanup --- phpdbg.c | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) 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); -- 2.50.1