From 68e32f6ac37eebe70c0ebbbbfaefceeafbaa6d73 Mon Sep 17 00:00:00 2001 From: Zeev Suraski Date: Sat, 24 Jul 1999 16:52:00 +0000 Subject: [PATCH] * Make Win32 build work again * Make error_reporting value prior to the standard initialization be set so that errors show up --- ext/standard/fsock.c | 2 +- ext/standard/parsedate.y | 12 +++++++++--- main/main.c | 7 ++++--- php4dll.dsp | 24 ++++++++++++++++++++++++ php4dllts.dsp | 24 ++++++++++++++++++++++++ 5 files changed, 62 insertions(+), 7 deletions(-) diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c index ea5968e043e..227e606c5d8 100644 --- a/ext/standard/fsock.c +++ b/ext/standard/fsock.c @@ -248,7 +248,7 @@ static void _php3_fsockopen(INTERNAL_FUNCTION_PARAMETERS, int persistent) { switch(arg_count) { case 5: convert_to_double(args[4]); - conv = (unsigned long) args[4]->value.dval * 1000000.0; + conv = (unsigned long) (args[4]->value.dval * 1000000.0); timeout.tv_sec = conv / 1000000; timeout.tv_usec = conv % 1000000; /* fall-through */ diff --git a/ext/standard/parsedate.y b/ext/standard/parsedate.y index df75728bb00..6552c517a23 100644 --- a/ext/standard/parsedate.y +++ b/ext/standard/parsedate.y @@ -24,6 +24,10 @@ # include "php_config.h" #endif +#if WIN32||WINNT +#include +#endif + #include #include #include @@ -41,10 +45,12 @@ #include #endif -#ifndef HAVE_TM_ZONE -#ifndef _TIMEZONE +#if WIN32||WINNT +#include +#else +# if !defined(HAVE_TM_ZONE) && !defined(_TIMEZONE) extern time_t timezone; -#endif +# endif #endif #define yylhs date_yylhs diff --git a/main/main.c b/main/main.c index 59d1a54b375..361a3c68535 100644 --- a/main/main.c +++ b/main/main.c @@ -768,11 +768,10 @@ int php_module_startup(sapi_module_struct *sf) sapi_globals_struct *sapi_globals = ts_resource(sapi_globals_id); #endif #if (WIN32|WINNT) && !(USE_SAPI) - WORD wVersionRequested; + WORD wVersionRequested = MAKEWORD(2, 0); WSADATA wsaData; - - wVersionRequested = MAKEWORD(2, 0); #endif + ELS_FETCH(); SG(server_context) = NULL; SG(request_info).request_method = NULL; @@ -782,6 +781,8 @@ int php_module_startup(sapi_module_struct *sf) return SUCCESS; } + EG(error_reporting) = E_ALL & ~E_NOTICE; + sapi_module = *sf; zend_output_startup(); diff --git a/php4dll.dsp b/php4dll.dsp index 88e260aa569..abc95a1fc70 100644 --- a/php4dll.dsp +++ b/php4dll.dsp @@ -363,6 +363,10 @@ SOURCE=.\ext\standard\pageinfo.c # End Source File # Begin Source File +SOURCE=.\ext\standard\parsedate.c +# End Source File +# Begin Source File + SOURCE=.\ext\pcre\php_pcre.c # End Source File # Begin Source File @@ -738,6 +742,26 @@ BuildCmds= \ !ENDIF +# End Source File +# Begin Source File + +SOURCE=.\ext\standard\parsedate.y + +!IF "$(CFG)" == "php4dll - Win32 Debug" + +# Begin Custom Build +InputPath=.\ext\standard\parsedate.y + +"ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cd ext\standard + bison --output=parsedate.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" parsedate.y + +# End Custom Build + +!ELSEIF "$(CFG)" == "php4dll - Win32 Release" + +!ENDIF + # End Source File # End Group # Begin Group "Scanners" diff --git a/php4dllts.dsp b/php4dllts.dsp index fe93f840423..0925f76d9e2 100644 --- a/php4dllts.dsp +++ b/php4dllts.dsp @@ -371,6 +371,10 @@ SOURCE=.\ext\standard\pageinfo.c # End Source File # Begin Source File +SOURCE=.\ext\standard\parsedate.c +# End Source File +# Begin Source File + SOURCE=.\ext\pcre\php_pcre.c # End Source File # Begin Source File @@ -754,6 +758,26 @@ BuildCmds= \ !ENDIF +# End Source File +# Begin Source File + +SOURCE=.\ext\standard\parsedate.y + +!IF "$(CFG)" == "php4dllts - Win32 Debug_TS" + +# Begin Custom Build +InputPath=.\ext\standard\parsedate.y + +"ext\standard\parsedate.c" : $(SOURCE) "$(INTDIR)" "$(OUTDIR)" + cd ext\standard + bison --output=parsedate.c -v -d -S "C:\Program Files\Cygnus\share\bison.simple" parsedate.y + +# End Custom Build + +!ELSEIF "$(CFG)" == "php4dllts - Win32 Release_TS" + +!ENDIF + # End Source File # End Group # Begin Group "Scanners"