]> granicus.if.org Git - php/commitdiff
NetWare LibC don't have socketpair function. So enabling socket_create_pair functiona...
authorAnantha Kesari H Y <hyanantha@php.net>
Fri, 23 Sep 2005 09:54:31 +0000 (09:54 +0000)
committerAnantha Kesari H Y <hyanantha@php.net>
Fri, 23 Sep 2005 09:54:31 +0000 (09:54 +0000)
--Kamesh

ext/sockets/config.m4
ext/sockets/sockets.c

index e88b54ecda406804bd12b28a4a8fe1848c1d987e..a48e8bf6cec2a4c6dde4742378f2da8de78e4cb6 100644 (file)
@@ -31,5 +31,6 @@ if test "$PHP_SOCKETS" != "no"; then
   PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
 fi
 
+PHP_CHECK_FUNC(socketpair)
 PHP_CHECK_FUNC(gethostbyname2)
 
index 44a40a5e01166a99916b4330d91be8390a0aa0a9..4ceeecfb9f91e95572296cd7c43d084461079493 100644 (file)
@@ -116,7 +116,9 @@ function_entry sockets_functions[] = {
        PHP_FE(socket_select,                   first_through_third_args_force_ref)
        PHP_FE(socket_create,                   NULL)
        PHP_FE(socket_create_listen,    NULL)
+#ifdef HAVE_SOCKETPAIR
        PHP_FE(socket_create_pair,              fourth_arg_force_ref)
+#endif
        PHP_FE(socket_accept,                   NULL)
        PHP_FE(socket_set_nonblock,             NULL)
        PHP_FE(socket_set_block,                NULL)
@@ -1652,6 +1654,7 @@ PHP_FUNCTION(socket_set_option)
 }
 /* }}} */
 
+#ifdef HAVE_SOCKETPAIR
 /* {{{ proto bool socket_create_pair(int domain, int type, int protocol, array &fd)
    Creates a pair of indistinguishable sockets and stores them in fds. */
 PHP_FUNCTION(socket_create_pair)
@@ -1711,6 +1714,7 @@ PHP_FUNCTION(socket_create_pair)
        RETURN_TRUE;
 }
 /* }}} */
+#endif
 
 /* {{{ proto bool socket_shutdown(resource socket[, int how])
    Shuts down a socket for receiving, sending, or both. */