iliaa Mon Sep 11 14:52:21 2006 UTC
Modified files: (Branch: PHP_5_2)
/php-src NEWS
/php-src/ext/standard streamsfuncs.c
Log:
Fixed bug #38096 (large timeout values ignored on 32bit machines in
stream_socket_accept() and stream_socket_client()).
http://cvs.php.net/viewvc.cgi/php-src/NEWS?r1=1.2027.2.547.2.243&r2=1.2027.2.547.2.244&diff_format=u
Index: php-src/NEWS
diff -u php-src/NEWS:1.2027.2.547.2.243 php-src/NEWS:1.2027.2.547.2.244
--- php-src/NEWS:1.2027.2.547.2.243 Mon Sep 11 14:30:17 2006
+++ php-src/NEWS Mon Sep 11 14:52:20 2006
@@ -14,6 +14,8 @@
- Fixed bug #38661 (mixed-case URL breaks url-wrappers). (Ilia)
- Fixed bug #38464 (array_count_values() mishandles numeric strings).
(php_lists at realplain dot com, Ilia)
+- Fixed bug #38096 (large timeout values ignored on 32bit machines in
+ stream_socket_accept() and stream_socket_client()). (Ilia)
31 Aug 2006, PHP 5.2.0RC3
- Updated PCRE to version 6.7. (Ilia)
http://cvs.php.net/viewvc.cgi/php-src/ext/standard/streamsfuncs.c?r1=1.58.2.6.2.5&r2=1.58.2.6.2.6&diff_format=u
Index: php-src/ext/standard/streamsfuncs.c
diff -u php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.5
php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.6
--- php-src/ext/standard/streamsfuncs.c:1.58.2.6.2.5 Thu Aug 31 14:41:24 2006
+++ php-src/ext/standard/streamsfuncs.c Mon Sep 11 14:52:21 2006
@@ -17,7 +17,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: streamsfuncs.c,v 1.58.2.6.2.5 2006/08/31 14:41:24 tony2001 Exp $ */
+/* $Id: streamsfuncs.c,v 1.58.2.6.2.6 2006/09/11 14:52:21 iliaa Exp $ */
#include "php.h"
#include "php_globals.h"
@@ -33,8 +33,10 @@
#ifndef PHP_WIN32
#define php_select(m, r, w, e, t) select(m, r, w, e, t)
+typedef unsigned long long php_timeout_ull;
#else
#include "win32/select.h"
+typedef unsigned __int64 php_timeout_ull;
#endif
static php_stream_context *decode_context_param(zval *contextresource
TSRMLS_DC);
@@ -81,7 +83,7 @@
int host_len;
zval *zerrno = NULL, *zerrstr = NULL, *zcontext = NULL;
double timeout = FG(default_socket_timeout);
- unsigned long conv;
+ php_timeout_ull conv;
struct timeval tv;
char *hashkey = NULL;
php_stream *stream = NULL;
@@ -103,7 +105,7 @@
}
/* prepare the timeout value for use */
- conv = (unsigned long) (timeout * 1000000.0);
+ conv = (php_timeout_ull) (timeout * 1000000.0);
tv.tv_sec = conv / 1000000;
tv.tv_usec = conv % 1000000;
@@ -231,7 +233,7 @@
{
double timeout = FG(default_socket_timeout);
zval *peername = NULL;
- unsigned long conv;
+ php_timeout_ull conv;
struct timeval tv;
php_stream *stream = NULL, *clistream = NULL;
zval *zstream;
@@ -245,7 +247,7 @@
php_stream_from_zval(stream, &zstream);
/* prepare the timeout value for use */
- conv = (unsigned long) (timeout * 1000000.0);
+ conv = (php_timeout_ull) (timeout * 1000000.0);
tv.tv_sec = conv / 1000000;
tv.tv_usec = conv % 1000000;
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php