summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKalle Sommer Nielsen <kalle@php.net>2009-01-01 05:22:54 +0000
committerKalle Sommer Nielsen <kalle@php.net>2009-01-01 05:22:54 +0000
commit1055a03d625a67b8e02c7e105e6db1c3ef76fccb (patch)
tree683d1efc430f6ceabafe567a1515ca8db6c173a9
parent320c3d54a3190402ed1ad948994bbee3a2c46f69 (diff)
downloadphp-git-1055a03d625a67b8e02c7e105e6db1c3ef76fccb.tar.gz
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
-rw-r--r--ext/sockets/php_sockets.h2
-rw-r--r--ext/sockets/sockets.c6
2 files changed, 4 insertions, 4 deletions
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)