[php-src] master: ext/sockets: adding few constants for NetBSD.

From: Date: Sun, 17 Mar 2024 21:58:44 +0000
Subject: [php-src] master: ext/sockets: adding few constants for NetBSD.
Groups: php.cvs 
Request: Send a blank email to php-cvs+get-127765@lists.php.net to get a copy of this message
Author: David Carlier (devnexen) Date: 2024-03-17T21:44:22Z Commit: https://github.com/php/php-src/commit/4c467e6eb8cf2f187a567cbab25d5a4588b8eb12 Raw diff: https://github.com/php/php-src/commit/4c467e6eb8cf2f187a567cbab25d5a4588b8eb12.diff ext/sockets: adding few constants for NetBSD. SOCK_CONN_DGRAM (and its alias SOCK_DCCP) for connection orientated datagram. Close GH-13728 Changed paths: M NEWS M UPGRADING M ext/sockets/sockets.stub.php M ext/sockets/sockets_arginfo.h Diff: diff --git a/NEWS b/NEWS index bf8838e9ea4ad..a42dbbc940eb2 100644 --- a/NEWS +++ b/NEWS @@ -188,6 +188,7 @@ PHP NEWS - Sockets: . Removed the deprecated inet_ntoa call support. (David Carlier) . Added the SO_EXECLUSIVEADDRUSE windows constant. (David Carlier) + . Added the SOCK_CONN_DGRAM/SOCK_DCCP netbsd constants. (David Carlier) - Sodium: . Add support for AEGIS-128L and AEGIS-256 (jedisct1) diff --git a/UPGRADING b/UPGRADING index 9996047cae2d8..daf712a5dce8e 100644 --- a/UPGRADING +++ b/UPGRADING @@ -545,6 +545,8 @@ PHP 8.4 UPGRADE NOTES - Sockets: . SO_EXCLUSIVEADDRUSE (Windows only). + . SOCK_CONN_DGRAM (NetBSD only). + . SOCK_DCCP (NetBSD only). - Sodium: . SODIUM_CRYPTO_AEAD_AEGIS128L_KEYBYTES diff --git a/ext/sockets/sockets.stub.php b/ext/sockets/sockets.stub.php index b6da6b020ce22..846648d28f030 100644 --- a/ext/sockets/sockets.stub.php +++ b/ext/sockets/sockets.stub.php @@ -53,6 +53,19 @@ */ const SOCK_RDM = UNKNOWN; #endif +#ifdef SOCK_CONN_DGRAM +/** + * @var int + * @cvalue SOCK_CONN_DGRAM + */ +const SOCK_CONN_DGRAM = UNKNOWN; +/** + * is an alias of SOCK_CONN_DGRAM + * @var int + * @cvalue SOCK_DCCP + */ +const SOCK_DCCP = UNKNOWN; +#endif /** * @var int diff --git a/ext/sockets/sockets_arginfo.h b/ext/sockets/sockets_arginfo.h index 11f0643451373..2d9f39b7cc2de 100644 --- a/ext/sockets/sockets_arginfo.h +++ b/ext/sockets/sockets_arginfo.h @@ -1,5 +1,5 @@ /* This is a generated file, edit the .stub.php file instead. - * Stub hash: ec04de98f14d553e10da9f7f6de7ec281215ef44 */ + * Stub hash: a99144c7c83a3f06e54a01bc21c0d30c9a21be29 */ ZEND_BEGIN_ARG_WITH_RETURN_TYPE_MASK_EX(arginfo_socket_select, 0, 4, MAY_BE_LONG|MAY_BE_FALSE) ZEND_ARG_TYPE_INFO(1, read, IS_ARRAY, 1) @@ -346,6 +346,12 @@ static void register_sockets_symbols(int module_number) REGISTER_LONG_CONSTANT("SOCK_SEQPACKET", SOCK_SEQPACKET, CONST_PERSISTENT); #if defined(SOCK_RDM) REGISTER_LONG_CONSTANT("SOCK_RDM", SOCK_RDM, CONST_PERSISTENT); +#endif +#if defined(SOCK_CONN_DGRAM) + REGISTER_LONG_CONSTANT("SOCK_CONN_DGRAM", SOCK_CONN_DGRAM, CONST_PERSISTENT); +#endif +#if defined(SOCK_CONN_DGRAM) + REGISTER_LONG_CONSTANT("SOCK_DCCP", SOCK_DCCP, CONST_PERSISTENT); #endif REGISTER_LONG_CONSTANT("MSG_OOB", MSG_OOB, CONST_PERSISTENT); REGISTER_LONG_CONSTANT("MSG_WAITALL", MSG_WAITALL, CONST_PERSISTENT);

« previous php.cvs (#127765) next »