felipe          Wed Jan  7 20:21:46 2009 UTC

  Modified files:              (Branch: PHP_5_3)
    /php-src/main       php_network.h 
    /php-src/main/streams       xp_socket.c 
  Log:
  MFH:
  - Added check for EWOULDBLOCK
  - Using EWOULDBLOCK instead of EAGAIN by portability issues
  (Related to #46917)
  
  
http://cvs.php.net/viewvc.cgi/php-src/main/php_network.h?r1=1.56.2.1.2.1.2.4&r2=1.56.2.1.2.1.2.5&diff_format=u
Index: php-src/main/php_network.h
diff -u php-src/main/php_network.h:1.56.2.1.2.1.2.4 
php-src/main/php_network.h:1.56.2.1.2.1.2.5
--- php-src/main/php_network.h:1.56.2.1.2.1.2.4 Wed Dec 31 11:15:47 2008
+++ php-src/main/php_network.h  Wed Jan  7 20:21:46 2009
@@ -16,7 +16,7 @@
    +----------------------------------------------------------------------+
  */
 
-/* $Id: php_network.h,v 1.56.2.1.2.1.2.4 2008/12/31 11:15:47 sebastian Exp $ */
+/* $Id: php_network.h,v 1.56.2.1.2.1.2.5 2009/01/07 20:21:46 felipe Exp $ */
 
 #ifndef _PHP_NETWORK_H
 #define _PHP_NETWORK_H
@@ -40,6 +40,10 @@
 #      define ftruncate(a, b) chsize(a, b)
 #endif /* defined(PHP_WIN32) */
 
+#ifndef EWOULDBLOCK
+# define EWOULDBLOCK EAGAIN
+#endif
+
 #ifdef PHP_WIN32
 #define php_socket_errno() WSAGetLastError()
 #else
http://cvs.php.net/viewvc.cgi/php-src/main/streams/xp_socket.c?r1=1.33.2.2.2.6.2.8&r2=1.33.2.2.2.6.2.9&diff_format=u
Index: php-src/main/streams/xp_socket.c
diff -u php-src/main/streams/xp_socket.c:1.33.2.2.2.6.2.8 
php-src/main/streams/xp_socket.c:1.33.2.2.2.6.2.9
--- php-src/main/streams/xp_socket.c:1.33.2.2.2.6.2.8   Wed Dec 31 11:15:48 2008
+++ php-src/main/streams/xp_socket.c    Wed Jan  7 20:21:46 2009
@@ -16,7 +16,7 @@
   +----------------------------------------------------------------------+
 */
 
-/* $Id: xp_socket.c,v 1.33.2.2.2.6.2.8 2008/12/31 11:15:48 sebastian Exp $ */
+/* $Id: xp_socket.c,v 1.33.2.2.2.6.2.9 2009/01/07 20:21:46 felipe Exp $ */
 
 #include "php.h"
 #include "ext/standard/file.h"
@@ -281,7 +281,7 @@
                                if (sock->socket == -1) {
                                        alive = 0;
                                } else if (php_pollfd_for(sock->socket, 
PHP_POLLREADABLE|POLLPRI, &tv) > 0) {
-                                       if (0 == recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) && php_socket_errno() != EAGAIN) {
+                                       if (0 == recv(sock->socket, &buf, 
sizeof(buf), MSG_PEEK) && php_socket_errno() != EWOULDBLOCK) {
                                                alive = 0;
                                        }
                                }



-- 
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to