AC_DEFINE(HAVE_CMSGHDR,1,[Whether you have struct cmsghdr])
fi
- AC_CHECK_FUNCS([hstrerror])
+ AC_CHECK_FUNCS([hstrerror socketpair])
AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h errno.h])
AC_TRY_COMPILE([
#include <sys/types.h>
PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
fi
-
-PHP_CHECK_FUNC(gethostbyname2)
-
PHP_FUNCTION(socket_select);
PHP_FUNCTION(socket_create_listen);
+#ifdef HAVE_SOCKETPAIR
PHP_FUNCTION(socket_create_pair);
+#endif
PHP_FUNCTION(socket_accept);
PHP_FUNCTION(socket_set_nonblock);
PHP_FUNCTION(socket_set_block);
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)
}
/* }}} */
+#ifdef HAVE_SOCKETPAIR
/* {{{ 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)
RETURN_TRUE;
}
/* }}} */
+#endif
#ifdef HAVE_SHUTDOWN
/* {{{ proto bool socket_shutdown(resource socket[, int how]) U