[php-src] socket_netbsd_additions: ext/sockets: addiong few constants for NetBSD.
| From: | David Carlier | Date: | Sat, 16 Mar 2024 13:50:41 +0000 |
| Subject: | [php-src] socket_netbsd_additions: ext/sockets: addiong few constants for NetBSD. | ||
| Groups: | php.cvs | ||
| Request: | Send a blank email to php-cvs+get-127753@lists.php.net to get a copy of this message | ||
Author: David Carlier (devnexen)
Date: 2024-03-16T13:34:40Z
Commit: https://github.com/php/php-src/commit/af56ffabe200509bf59cfcdbd83fd03873224315
Raw diff: https://github.com/php/php-src/commit/af56ffabe200509bf59cfcdbd83fd03873224315.diff
ext/sockets: addiong few constants for NetBSD.
SOCK_CONN_DGRAM (and its alias SOCK_DCCP) for connection orientated
datagram.
Changed paths:
M UPGRADING
M ext/sockets/sockets.stub.php
M ext/sockets/sockets_arginfo.h
Diff:
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..0cfd4d81e70dd 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..a5c6f644bd9cd 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: 5fa651efe2d223d0b0ba2b8be27ea372cc6a14a6 */
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);