svn: /php/php-src/ branches/PHP_5_3/ext/standard/streamsfuncs.c trunk/ext/standard/streamsfuncs.c

From: Date: Mon, 06 Sep 2010 10:39:26 +0000
Subject: svn: /php/php-src/ branches/PHP_5_3/ext/standard/streamsfuncs.c trunk/ext/standard/streamsfuncs.c
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-63440@lists.php.net to get a copy of this message
pajoye Mon, 06 Sep 2010 10:39:26 +0000 Revision: http://svn.php.net/viewvc?view=revision&revision=303068 Log: - timeval element are always 32bit long on Windows Changed paths: U php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c U php/php-src/trunk/ext/standard/streamsfuncs.c Modified: php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c =================================================================== --- php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c 2010-09-06 10:28:04 UTC (rev 303067) +++ php/php-src/branches/PHP_5_3/ext/standard/streamsfuncs.c 2010-09-06 10:39:26 UTC (rev 303068) @@ -116,9 +116,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 1000000.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 1000000); + tv.tv_usec =(long)(conv % 1000000); +#else tv.tv_sec = conv / 1000000; tv.tv_usec = conv % 1000000; - +#endif if (zerrno) { zval_dtor(zerrno); ZVAL_LONG(zerrno, 0); @@ -258,9 +262,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 1000000.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 1000000); + tv.tv_usec = (long)(conv % 1000000); +#else tv.tv_sec = conv / 1000000; tv.tv_usec = conv % 1000000; - +#endif if (zpeername) { zval_dtor(zpeername); ZVAL_NULL(zpeername); Modified: php/php-src/trunk/ext/standard/streamsfuncs.c =================================================================== --- php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-06 10:28:04 UTC (rev 303067) +++ php/php-src/trunk/ext/standard/streamsfuncs.c 2010-09-06 10:39:26 UTC (rev 303068) @@ -116,9 +116,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 1000000.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 1000000); + tv.tv_usec =(long)(conv % 1000000); +#else tv.tv_sec = conv / 1000000; tv.tv_usec = conv % 1000000; - +#endif if (zerrno) { zval_dtor(zerrno); ZVAL_LONG(zerrno, 0); @@ -258,9 +262,13 @@ /* prepare the timeout value for use */ conv = (php_timeout_ull) (timeout * 1000000.0); +#ifdef PHP_WIN32 + tv.tv_sec = (long)(conv / 1000000); + tv.tv_usec = (long)(conv % 1000000); +#else tv.tv_sec = conv / 1000000; tv.tv_usec = conv % 1000000; - +#endif if (zpeername) { zval_dtor(zpeername); ZVAL_NULL(zpeername);

« previous php.cvs (#63440) next »