diff options
| author | Ondřej Surý <ondrej@sury.org> | 2013-01-16 09:02:55 +0100 |
|---|---|---|
| committer | Ondřej Surý <ondrej@sury.org> | 2013-01-16 09:02:55 +0100 |
| commit | 8572aeb0703107705fc7dde35961cd6a5f89c0c8 (patch) | |
| tree | 833d2a593591ac362a7dfe90971bef61d155bfaa /ext/sockets | |
| parent | 0b82e05fe264306004119e30119e665365331e17 (diff) | |
| download | php-8572aeb0703107705fc7dde35961cd6a5f89c0c8.tar.gz | |
Imported Upstream version 5.5.0~alpha3upstream/5.5.0_alpha3
Diffstat (limited to 'ext/sockets')
| -rw-r--r-- | ext/sockets/multicast.c | 2 | ||||
| -rw-r--r-- | ext/sockets/multicast.h | 2 | ||||
| -rw-r--r-- | ext/sockets/php_sockets.h | 2 | ||||
| -rw-r--r-- | ext/sockets/sockets.c | 5 | ||||
| -rw-r--r-- | ext/sockets/tests/bug49341.phpt | 15 | ||||
| -rw-r--r-- | ext/sockets/unix_socket_constants.h | 2 | ||||
| -rw-r--r-- | ext/sockets/win32_socket_constants.h | 2 |
7 files changed, 24 insertions, 6 deletions
diff --git a/ext/sockets/multicast.c b/ext/sockets/multicast.c index e29106087..d4a00a8d1 100644 --- a/ext/sockets/multicast.c +++ b/ext/sockets/multicast.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 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 | diff --git a/ext/sockets/multicast.h b/ext/sockets/multicast.h index 9470a39ca..498a71f67 100644 --- a/ext/sockets/multicast.h +++ b/ext/sockets/multicast.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 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 | diff --git a/ext/sockets/php_sockets.h b/ext/sockets/php_sockets.h index 38a68879b..df205e511 100644 --- a/ext/sockets/php_sockets.h +++ b/ext/sockets/php_sockets.h @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 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 | diff --git a/ext/sockets/sockets.c b/ext/sockets/sockets.c index 1eee7a620..5d09ad7fa 100644 --- a/ext/sockets/sockets.c +++ b/ext/sockets/sockets.c @@ -2,7 +2,7 @@ +----------------------------------------------------------------------+ | PHP Version 5 | +----------------------------------------------------------------------+ - | Copyright (c) 1997-2012 The PHP Group | + | Copyright (c) 1997-2013 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 | @@ -789,6 +789,9 @@ PHP_MINIT_FUNCTION(sockets) #endif REGISTER_LONG_CONSTANT("SO_DEBUG", SO_DEBUG, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_REUSEADDR", SO_REUSEADDR, CONST_CS | CONST_PERSISTENT); +#ifdef SO_REUSEPORT + REGISTER_LONG_CONSTANT("SO_REUSEPORT", SO_REUSEPORT, CONST_CS | CONST_PERSISTENT); +#endif REGISTER_LONG_CONSTANT("SO_KEEPALIVE", SO_KEEPALIVE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_DONTROUTE", SO_DONTROUTE, CONST_CS | CONST_PERSISTENT); REGISTER_LONG_CONSTANT("SO_LINGER", SO_LINGER, CONST_CS | CONST_PERSISTENT); diff --git a/ext/sockets/tests/bug49341.phpt b/ext/sockets/tests/bug49341.phpt new file mode 100644 index 000000000..961b5e7bc --- /dev/null +++ b/ext/sockets/tests/bug49341.phpt @@ -0,0 +1,15 @@ +--TEST-- +Bug #49341: add SO_REUSEPORT support for socket_set_option() +--SKIPIF-- +<?php +if (!extension_loaded('sockets')) { + die('skip sockets extension not available.'); +} +if (PHP_OS !== 'Darwin' && false === strpos(PHP_OS, 'BSD')) { + die('skip is not *BSD.'); +} +--FILE-- +<?php +var_dump(defined('SO_REUSEPORT')); +--EXPECTF-- +bool(true) diff --git a/ext/sockets/unix_socket_constants.h b/ext/sockets/unix_socket_constants.h index 9e7a11407..fb190d82b 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-2012 The PHP Group | + | Copyright (c) 1997-2013 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 | diff --git a/ext/sockets/win32_socket_constants.h b/ext/sockets/win32_socket_constants.h index da3baf015..542347dd0 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-2012 The PHP Group | + | Copyright (c) 1997-2013 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 | |
