summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--ext/standard/fsock.c2
-rw-r--r--ext/standard/parsedate.y12
-rw-r--r--main/main.c7
-rw-r--r--php4dll.dsp24
-rw-r--r--php4dllts.dsp24
5 files changed, 62 insertions, 7 deletions
diff --git a/ext/standard/fsock.c b/ext/standard/fsock.c
index ea5968e043..227e606c5d 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 df75728bb0..6552c517a2 100644
--- a/ext/standard/parsedate.y
+++ b/ext/standard/parsedate.y
@@ -24,6 +24,10 @@
# include "php_config.h"
#endif
+#if WIN32||WINNT
+#include <malloc.h>
+#endif
+
#include <stdio.h>
#include <sys/types.h>
#include <time.h>
@@ -41,10 +45,12 @@
#include <alloca.h>
#endif
-#ifndef HAVE_TM_ZONE
-#ifndef _TIMEZONE
+#if WIN32||WINNT
+#include <time.h>
+#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 59d1a54b37..361a3c6853 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 88e260aa56..abc95a1fc7 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
@@ -739,6 +743,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 fe93f84042..0925f76d9e 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
@@ -755,6 +759,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"