diff options
| author | Ondřej Surý <ondrej@sury.org> | 2010-03-09 11:57:54 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2010-03-09 11:57:54 +0100 |
| commit | 855a09f4eded707941180c9d90acd17c25e29447 (patch) | |
| tree | a40947efaa9876f31b6ee3956c3f3775768143bb /ext/sockets | |
| parent | c852c28a88fccf6e34a2cb091fdfa72bce2b59c7 (diff) | |
| download | php-upstream/5.3.2.tar.gz | |
Imported Upstream version 5.3.2upstream/5.3.2
Diffstat (limited to 'ext/sockets')
| -rw-r--r-- | ext/sockets/config.m4 | 3 | ||||
| -rw-r--r-- | ext/sockets/php_sockets.h | 6 | ||||
| -rw-r--r-- | ext/sockets/sockets.c | 12 | ||||
| -rw-r--r-- | ext/sockets/tests/socket_getpeername_ipv6loop.phpt | 7 | ||||
| -rw-r--r-- | ext/sockets/tests/socket_set_option_rcvtimeo.phpt | 2 | ||||
| -rw-r--r-- | ext/sockets/tests/socket_set_option_seolinger.phpt | 2 | ||||
| -rw-r--r-- | ext/sockets/tests/socket_set_option_sndtimeo.phpt | 2 | ||||
| -rw-r--r-- | ext/sockets/unix_socket_constants.h | 4 | ||||
| -rw-r--r-- | ext/sockets/win32_socket_constants.h | 4 |
9 files changed, 26 insertions, 16 deletions
diff --git a/ext/sockets/config.m4 b/ext/sockets/config.m4 index ce18979ce..93f892a51 100644 --- a/ext/sockets/config.m4 +++ b/ext/sockets/config.m4 @@ -1,5 +1,5 @@ dnl -dnl $Id: config.m4 240160 2007-07-22 22:18:41Z jani $ +dnl $Id: config.m4 294029 2010-01-25 23:12:42Z johannes $ dnl PHP_ARG_ENABLE(sockets, whether to enable sockets support, @@ -29,4 +29,5 @@ if test "$PHP_SOCKETS" != "no"; then AC_DEFINE([HAVE_SOCKETS], 1, [ ]) PHP_NEW_EXTENSION([sockets], [sockets.c], [$ext_shared]) + PHP_INSTALL_HEADERS([ext/sockets/], [php_sockets.h]) fi diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 4f5c21e60..f9aaaa532 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -22,7 +22,7 @@ #ifndef PHP_SOCKETS_H #define PHP_SOCKETS_H -/* $Id: php_sockets.h 289417 2009-10-09 14:22:29Z pajoye $ */ +/* $Id: php_sockets.h 294029 2010-01-25 23:12:42Z johannes $ */ #if HAVE_SOCKETS @@ -95,6 +95,8 @@ struct sockaddr_un { PHP_SOCKETS_API int php_sockets_le_socket(void); +#define php_sockets_le_socket_name "Socket" + /* Prototypes */ #ifdef ilia_0 /* not needed, only causes a compiler warning */ static int php_open_listen_sock(php_socket **php_sock, int port, int backlog TSRMLS_DC); diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 6e74490a5..099d391d8 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -19,7 +19,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: sockets.c 289417 2009-10-09 14:22:29Z pajoye $ */ +/* $Id: sockets.c 294029 2010-01-25 23:12:42Z johannes $ */ #ifdef HAVE_CONFIG_H #include "config.h" @@ -41,6 +41,12 @@ # include "php_sockets.h" # include "win32/sockets.h" # define IS_INVALID_SOCKET(a) (a->bsd_socket == INVALID_SOCKET) +# ifdef EPROTONOSUPPORT +# undef EPROTONOSUPPORT +# endif +# ifdef ECONNRESET +# undef ECONNRESET +# endif # define EPROTONOSUPPORT WSAEPROTONOSUPPORT # define ECONNRESET WSAECONNRESET # ifdef errno @@ -104,7 +110,7 @@ static char *php_strerror(int error TSRMLS_DC); php_error_docref(NULL TSRMLS_CC, E_WARNING, "%s [%d]: %s", msg, errn, php_strerror(errn TSRMLS_CC)) static int le_socket; -#define le_socket_name "Socket" +#define le_socket_name php_sockets_le_socket_name /* {{{ arginfo */ ZEND_BEGIN_ARG_INFO_EX(arginfo_socket_select, 0, 0, 4) diff --git a/ext/sockets/tests/socket_getpeername_ipv6loop.phpt b/ext/sockets/tests/socket_getpeername_ipv6loop.phpt index ba3c1347d..e865f3e06 100644 --- a/ext/sockets/tests/socket_getpeername_ipv6loop.phpt +++ b/ext/sockets/tests/socket_getpeername_ipv6loop.phpt @@ -5,9 +5,10 @@ ext/sockets - socket_getpeername_ipv6loop - basic test # $Id: socket_getpeername_ipv6loop.phpt 494 2009-06-09 20:38:05Z tatjana.andersen@redpill-linpro.com $ --SKIPIF-- <?php - if (!extension_loaded('sockets')) { - die('skip sockets extension not available.'); - } +if (!extension_loaded('sockets')) { + die('skip sockets extension not available.'); +} +require 'ipv6_skipif.inc'; ?> --FILE-- <?php diff --git a/ext/sockets/tests/socket_set_option_rcvtimeo.phpt b/ext/sockets/tests/socket_set_option_rcvtimeo.phpt index 84c533f00..ea14fd316 100644 --- a/ext/sockets/tests/socket_set_option_rcvtimeo.phpt +++ b/ext/sockets/tests/socket_set_option_rcvtimeo.phpt @@ -1,6 +1,6 @@ --TEST-- Test if socket_set_option() works, option:SO_RCVTIMEO ---DESCRIPTION--- +--DESCRIPTION-- -wrong params -set/get params comparison --SKIPIF-- diff --git a/ext/sockets/tests/socket_set_option_seolinger.phpt b/ext/sockets/tests/socket_set_option_seolinger.phpt index 05bc21315..e49a7eb15 100644 --- a/ext/sockets/tests/socket_set_option_seolinger.phpt +++ b/ext/sockets/tests/socket_set_option_seolinger.phpt @@ -1,6 +1,6 @@ --TEST-- Test if socket_set_option() works, option:SO_SEOLINGER ---DESCRIPTION--- +--DESCRIPTION-- -wrong params -set/get params comparison -l_linger not given diff --git a/ext/sockets/tests/socket_set_option_sndtimeo.phpt b/ext/sockets/tests/socket_set_option_sndtimeo.phpt index c4e485113..6fd008c3d 100644 --- a/ext/sockets/tests/socket_set_option_sndtimeo.phpt +++ b/ext/sockets/tests/socket_set_option_sndtimeo.phpt @@ -1,6 +1,6 @@ --TEST-- Test if socket_set_option() works, option:SO_SNDTIMEO ---DESCRIPTION--- +--DESCRIPTION-- -wrong params -set/get params comparison --SKIPIF-- diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h index 8403425c9..0cba232fd 100644 --- a/ext/sockets/unix_socket_constants.h +++ b/ext/sockets/unix_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: unix_socket_constants.h 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: unix_socket_constants.h 293036 2010-01-03 09:23:27Z sebastian $ */ /* This file is to be included by sockets.c */ diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h index f593ec674..74b572ec7 100644 --- a/ext/sockets/win32_socket_constants.h +++ b/ext/sockets/win32_socket_constants.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2009 The PHP Group | + | Copyright (c) 1997-2010 The PHP Group | +----------------------------------------------------------------------+ | This source file is subject to version 3.01 of the PHP license, | | that is bundled with this package in the file LICENSE, and is | @@ -16,7 +16,7 @@ +----------------------------------------------------------------------+ */ -/* $Id: win32_socket_constants.h 272370 2008-12-31 11:15:49Z sebastian $ */ +/* $Id: win32_socket_constants.h 293036 2010-01-03 09:23:27Z sebastian $ */ /* This file is to be included by sockets.c */ |
