--- parser3/src/targets/cgi/parser3.C 2012/06/15 09:30:01 1.261 +++ parser3/src/targets/cgi/parser3.C 2013/07/23 13:07:49 1.264 @@ -5,14 +5,10 @@ Author: Alexandr Petrosian (http://paf.design.ru) */ -volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.261 2012/06/15 09:30:01 moko Exp $"; +volatile const char * IDENT_PARSER3_C="$Id: parser3.C,v 1.264 2013/07/23 13:07:49 moko Exp $"; #include "pa_config_includes.h" -#if _MSC_VER -# include -#endif - #include "pa_sapi.h" #include "classes.h" #include "pa_common.h" @@ -20,8 +16,10 @@ volatile const char * IDENT_PARSER3_C="$ #include "pa_socks.h" #include "pa_version.h" -#ifdef WIN32 -# include +#ifdef _MSC_VER +#include +#include +#include #endif // defines @@ -42,7 +40,7 @@ volatile const char * IDENT_PARSER3_C="$ #define PARSER_LOG_ENV_NAME "CGI_PARSER_LOG" /// IIS refuses to read bigger chunks -const size_t READ_POST_CHUNK_SIZE=0x400*0x400; // 1M +const size_t READ_POST_CHUNK_SIZE=0x400*0x400; // 1M static const char* argv0; static const char* config_filespec_cstr=0; @@ -174,13 +172,10 @@ static void die_or_abort(const char* fmt // exit & try to produce core dump[unix] or invoke debugger[Win32 Debug version] if(write_core) { -#if defined(WIN32) && !defined(_DEBUG) +#ifdef WIN32 // IIS with abort failes to show STDOUT, it just barks "abnormal program termination" exit(1); #else -#if _MSC_VER - _asm int 3; -#endif abort(); #endif } @@ -617,7 +612,7 @@ static void call_real_parser_handler__su static void usage(const char* program) { printf( "Parser/%s\n" - "Copyright (c) 2001-2012 Art. Lebedev Studio (http://www.artlebedev.com)\n" + "Copyright (c) 2001-2013 Art. Lebedev Studio (http://www.artlebedev.com)\n" "Author: Alexandr Petrosian (http://paf.design.ru)\n" "\n" "Usage: %s [options] file\n" @@ -645,17 +640,6 @@ int main(int argc, char *argv[]) { // so deciding for speed GC_dont_gc=1; #endif -/* - - Array test; - test+=3; - test+=4; -// int a=test.count(); - int i=0; - scanf("%d", &i); - int b=test.get(i); -// int b=test.get(10); - printf("%d", b);//test.count());*/ #ifdef SIGUSR1 if(signal(SIGUSR1, SIGUSR1_handler)==SIG_ERR) @@ -673,9 +657,6 @@ int main(int argc, char *argv[]) { } #endif -#ifdef _DEBUG - //_crtBreakAlloc=46; -#endif argv_all=argv; argv0=argv[0]; @@ -737,7 +718,7 @@ int main(int argc, char *argv[]) { args_skip=optind; } -#ifdef WIN32 +#ifdef _MSC_VER setmode(fileno(stdin), _O_BINARY); setmode(fileno(stdout), _O_BINARY); setmode(fileno(stderr), _O_BINARY); @@ -752,7 +733,6 @@ int main(int argc, char *argv[]) { // Set flag to the new value _CrtSetDbgFlag( tmpFlag ); -// _CrtSetBreakAlloc(61); _CrtSetReportMode( _CRT_WARN, _CRTDBG_MODE_FILE ); _CrtSetReportFile( _CRT_WARN, _CRTDBG_FILE_STDERR );