]> granicus.if.org Git - php/commitdiff
MFH:
authorKalle Sommer Nielsen <kalle@php.net>
Thu, 1 Jan 2009 05:24:29 +0000 (05:24 +0000)
committerKalle Sommer Nielsen <kalle@php.net>
Thu, 1 Jan 2009 05:24:29 +0000 (05:24 +0000)
[DOC] Renable socket_create_pair() on Windows

# ext/sockets have its own implementation of socketpair(), perhaps we should move it
# to the core. This will make stream_socket_pair() available on Windows aswell

NEWS
ext/sockets/php_sockets.h
ext/sockets/sockets.c

diff --git a/NEWS b/NEWS
index bd001fb6b1c98770085f344a243b9db5d0bc4fc3..f8ad33ac18eb785a9a2c4ca1eba543ff4fe3ec05 100644 (file)
--- a/NEWS
+++ b/NEWS
@@ -11,6 +11,7 @@ PHP                                                                        NEWS
 - Changed opendir(), dir() and scandir() to use default context when no context
   argument is passed. (Sara)
 - Changed open_basedir to allow tightening in runtime contexts. (Sara)
+- Re-enabled socket_create_pair() on Windows (Kalle)
 
 - Added json_last_error() to return any error information from json_decode().
   (Scott)
index 5d160411d1cbd42ccb4ca15cf3f6d359630a24cc..f0c9cc5203aca5b02188bff16616c1e3c2244919 100644 (file)
@@ -43,7 +43,7 @@ PHP_RSHUTDOWN_FUNCTION(sockets);
 
 PHP_FUNCTION(socket_select);
 PHP_FUNCTION(socket_create_listen);
-#ifdef HAVE_SOCKETPAIR
+#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32)
 PHP_FUNCTION(socket_create_pair);
 #endif
 PHP_FUNCTION(socket_accept);
index 89affa1a60ab6dcffc19c9dace2bd1dda0d08609..d53b8f5b4c68db645ecb37853f857778c462b092 100644 (file)
@@ -223,7 +223,7 @@ ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_set_option, 0, 0, 4)
        ZEND_ARG_INFO(0, optval)
 ZEND_END_ARG_INFO()
 
-#ifdef HAVE_SOCKETPAIR
+#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32)
 ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_create_pair, 0, 0, 4)
        ZEND_ARG_INFO(0, domain)
        ZEND_ARG_INFO(0, type)
@@ -254,7 +254,7 @@ const zend_function_entry sockets_functions[] = {
        PHP_FE(socket_select,                   arginfo_socket_select)
        PHP_FE(socket_create,                   arginfo_socket_create)
        PHP_FE(socket_create_listen,    arginfo_socket_create_listen)
-#ifdef HAVE_SOCKETPAIR
+#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32)
        PHP_FE(socket_create_pair,              arginfo_socket_create_pair)
 #endif
        PHP_FE(socket_accept,                   arginfo_socket_accept)
@@ -1867,7 +1867,7 @@ PHP_FUNCTION(socket_set_option)
 }
 /* }}} */
 
-#ifdef HAVE_SOCKETPAIR
+#if defined(HAVE_SOCKETPAIR) || defined(PHP_WIN32)
 /* {{{ proto bool socket_create_pair(int domain, int type, int protocol, array &fd) U
    Creates a pair of indistinguishable sockets and stores them in fds. */
 PHP_FUNCTION(socket_create_pair)