jani Sun Jul 22 22:17:51 2007 UTC
Modified files:
/php-src/ext/sockets config.m4 php_sockets.h sockets.c
Log:
MFB: sockepair is not always available
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/config.m4?r1=1.15&r2=1.16&diff_format=u
Index: php-src/ext/sockets/config.m4
diff -u php-src/ext/sockets/config.m4:1.15 php-src/ext/sockets/config.m4:1.16
--- php-src/ext/sockets/config.m4:1.15 Tue Jul 8 03:38:00 2003
+++ php-src/ext/sockets/config.m4 Sun Jul 22 22:17:51 2007
@@ -1,5 +1,5 @@
dnl
-dnl $Id: config.m4,v 1.15 2003/07/08 03:38:00 pollita Exp $
+dnl $Id: config.m4,v 1.16 2007/07/22 22:17:51 jani Exp $
dnl
PHP_ARG_ENABLE(sockets, whether to enable sockets support,
@@ -18,7 +18,7 @@
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>
@@ -30,6 +30,3 @@
PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
fi
-
-PHP_CHECK_FUNC(gethostbyname2)
-
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/php_sockets.h?r1=1.40&r2=1.41&diff_format=u
Index: php-src/ext/sockets/php_sockets.h
diff -u php-src/ext/sockets/php_sockets.h:1.40
php-src/ext/sockets/php_sockets.h:1.41
--- php-src/ext/sockets/php_sockets.h:1.40 Mon May 28 23:33:13 2007
+++ php-src/ext/sockets/php_sockets.h Sun Jul 22 22:17:51 2007
@@ -22,7 +22,7 @@
#ifndef PHP_SOCKETS_H
#define PHP_SOCKETS_H
-/* $Id: php_sockets.h,v 1.40 2007/05/28 23:33:13 iliaa Exp $ */
+/* $Id: php_sockets.h,v 1.41 2007/07/22 22:17:51 jani Exp $ */
#if HAVE_SOCKETS
@@ -45,7 +45,9 @@
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);
http://cvs.php.net/viewvc.cgi/php-src/ext/sockets/sockets.c?r1=1.190&r2=1.191&diff_format=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.190 php-src/ext/sockets/sockets.c:1.191
--- php-src/ext/sockets/sockets.c:1.190 Mon May 28 23:14:57 2007
+++ php-src/ext/sockets/sockets.c Sun Jul 22 22:17:51 2007
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.190 2007/05/28 23:14:57 iliaa Exp $ */
+/* $Id: sockets.c,v 1.191 2007/07/22 22:17:51 jani Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -117,7 +117,9 @@
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)
@@ -1726,6 +1728,7 @@
}
/* }}} */
+#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)
@@ -1786,6 +1789,7 @@
RETURN_TRUE;
}
/* }}} */
+#endif
#ifdef HAVE_SHUTDOWN
/* {{{ proto bool socket_shutdown(resource socket[, int how]) U
--
PHP CVS Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php