cvs: php-src(PHP_5_0) /ext/sockets config.m4 sockets.c
| From: | Anantha Kesari H Y | Date: | Fri, 23 Sep 2005 10:01:07 +0000 |
| Subject: | cvs: php-src(PHP_5_0) /ext/sockets config.m4 sockets.c | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-34096@lists.php.net to get a copy of this message | ||
hyanantha Fri Sep 23 06:01:07 2005 EDT
Modified files: (Branch: PHP_5_0)
/php-src/ext/sockets sockets.c config.m4
Log:
NetWare LibC don't have socketpair function. So enabling socket_create_pair functionality
only if socketpair is available in the host LibC.
--Kamesh
http://cvs.php.net/diff.php/php-src/ext/sockets/sockets.c?r1=1.165.2.4&r2=1.165.2.5&ty=u
Index: php-src/ext/sockets/sockets.c
diff -u php-src/ext/sockets/sockets.c:1.165.2.4 php-src/ext/sockets/sockets.c:1.165.2.5
--- php-src/ext/sockets/sockets.c:1.165.2.4 Thu May 12 12:27:05 2005
+++ php-src/ext/sockets/sockets.c Fri Sep 23 06:01:06 2005
@@ -19,7 +19,7 @@
+----------------------------------------------------------------------+
*/
-/* $Id: sockets.c,v 1.165.2.4 2005/05/12 16:27:05 tony2001 Exp $ */
+/* $Id: sockets.c,v 1.165.2.5 2005/09/23 10:01:06 hyanantha Exp $ */
#ifdef HAVE_CONFIG_H
#include "config.h"
@@ -116,7 +116,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)
@@ -1652,6 +1654,7 @@
}
/* }}} */
+#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 @@
RETURN_TRUE;
}
/* }}} */
+#endif
/* {{{ proto bool socket_shutdown(resource socket[, int how])
Shuts down a socket for receiving, sending, or both. */
http://cvs.php.net/diff.php/php-src/ext/sockets/config.m4?r1=1.15&r2=1.15.2.1&ty=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.15.2.1
--- php-src/ext/sockets/config.m4:1.15 Mon Jul 7 23:38:00 2003
+++ php-src/ext/sockets/config.m4 Fri Sep 23 06:01:06 2005
@@ -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.15.2.1 2005/09/23 10:01:06 hyanantha Exp $
dnl
PHP_ARG_ENABLE(sockets, whether to enable sockets support,
@@ -31,5 +31,6 @@
PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared])
fi
+PHP_CHECK_FUNC(socketpair)
PHP_CHECK_FUNC(gethostbyname2)