From: Kalle Sommer Nielsen Date: Thu, 1 Jan 2009 05:22:54 +0000 (+0000) Subject: Renable socket_create_pair() on Windows X-Git-Tag: php-5.4.0alpha1~191^2~4685 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=1055a03d625a67b8e02c7e105e6db1c3ef76fccb;p=php 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 --- diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 5d160411d1..f0c9cc5203 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -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); diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 13a995b584..62a2039eea 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -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) @@ -1857,7 +1857,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)