[ --enable-sockets Enable sockets support])
if test "$PHP_SOCKETS" != "no"; then
+ dnl Check for struct cmsghdr
+ AC_CACHE_CHECK([for struct cmsghdr], ac_cv_cmsghdr,
+ [
+ AC_TRY_COMPILE([
+#include <sys/types.h>
+#include <sys/socket.h>], [struct cmsghdr s; s], ac_cv_cmsghdr=yes, ac_cv_cmsghdr=no)
+ ])
+
+ if test "$ac_cv_cmsghdr" = yes; then
+ AC_DEFINE(HAVE_CMSGHDR,1,[Whether you have struct cmsghdr])
+ fi
AC_CHECK_FUNCS([hstrerror])
AC_CHECK_HEADERS([netdb.h netinet/tcp.h sys/un.h errno.h])
PHP_FE(socket_send, NULL)
PHP_FE(socket_recvfrom, second_fifth_and_sixth_args_force_ref)
PHP_FE(socket_sendto, NULL)
+#ifdef HAVE_CMSGHDR
PHP_FE(socket_recvmsg, third_through_seventh_args_force_ref)
+#endif
PHP_FE(socket_sendmsg, NULL)
PHP_FE(socket_readv, NULL)
PHP_FE(socket_writev, NULL)
/* {{{ proto bool socket_recvmsg(resource socket, resource iovec, array &control, int &controllen, int &flags, string &addr [, int &port])
Used to receive messages on a socket, whether connection-oriented or not */
+#ifdef HAVE_CMSGHDR
PHP_FUNCTION(socket_recvmsg)
{
zval *arg1, *arg2, *arg3, *arg4, *arg5, *arg6, *arg7 = NULL;
RETURN_FALSE;
}
}
+#endif
/* }}} */
/* {{{ proto bool socket_sendmsg(resource socket, resource iovec, int flags, string addr [, int port])