summaryrefslogtreecommitdiff
path: root/ext/sockets/sendrecvmsg.c
diff options
context:
space:
mode:
Diffstat (limited to 'ext/sockets/sendrecvmsg.c')
-rw-r--r--ext/sockets/sendrecvmsg.c34
1 files changed, 17 insertions, 17 deletions
diff --git a/ext/sockets/sendrecvmsg.c b/ext/sockets/sendrecvmsg.c
index dcaa60ac7a..eedc9e1639 100644
--- a/ext/sockets/sendrecvmsg.c
+++ b/ext/sockets/sendrecvmsg.c
@@ -71,7 +71,7 @@ inline ssize_t sendmsg(int sockfd, const struct msghdr *msg, int flags)
#define LONG_CHECK_VALID_INT(l) \
do { \
if ((l) < INT_MIN && (l) > INT_MAX) { \
- php_error_docref0(NULL TSRMLS_CC, E_WARNING, "The value %pd does not fit inside " \
+ php_error_docref0(NULL, E_WARNING, "The value %pd does not fit inside " \
"the boundaries of a native integer", (l)); \
return; \
} \
@@ -175,7 +175,7 @@ PHP_FUNCTION(socket_sendmsg)
ssize_t res;
/* zmsg should be passed by ref */
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra|l", &zsocket, &zmsg, &flags) == FAILURE) {
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra|l", &zsocket, &zmsg, &flags) == FAILURE) {
return;
}
@@ -188,7 +188,7 @@ PHP_FUNCTION(socket_sendmsg)
sizeof(*msghdr), "msghdr", &allocations, &err);
if (err.has_error) {
- err_msg_dispose(&err TSRMLS_CC);
+ err_msg_dispose(&err);
RETURN_FALSE;
}
@@ -217,7 +217,7 @@ PHP_FUNCTION(socket_recvmsg)
struct err_s err = {0};
//ssize_t recvmsg(int sockfd, struct msghdr *msg, int flags);
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ra/|l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ra/|l",
&zsocket, &zmsg, &flags) == FAILURE) {
return;
}
@@ -231,7 +231,7 @@ PHP_FUNCTION(socket_recvmsg)
sizeof(*msghdr), "msghdr", &allocations, &err);
if (err.has_error) {
- err_msg_dispose(&err TSRMLS_CC);
+ err_msg_dispose(&err);
RETURN_FALSE;
}
@@ -256,15 +256,15 @@ PHP_FUNCTION(socket_recvmsg)
if (!err.has_error) {
ZVAL_COPY_VALUE(zmsg, zres);
} else {
- err_msg_dispose(&err TSRMLS_CC);
+ err_msg_dispose(&err);
ZVAL_FALSE(zmsg);
/* no need to destroy/free zres -- it's NULL in this circumstance */
assert(zres == NULL);
}
} else {
SOCKETS_G(last_error) = errno;
- php_error_docref(NULL TSRMLS_CC, E_WARNING, "error in recvmsg [%d]: %s",
- errno, sockets_strerror(errno TSRMLS_CC));
+ php_error_docref(NULL, E_WARNING, "error in recvmsg [%d]: %s",
+ errno, sockets_strerror(errno));
RETURN_FALSE;
}
@@ -278,7 +278,7 @@ PHP_FUNCTION(socket_cmsg_space)
n = 0;
ancillary_reg_entry *entry;
- if (zend_parse_parameters(ZEND_NUM_ARGS() TSRMLS_CC, "ll|l",
+ if (zend_parse_parameters(ZEND_NUM_ARGS(), "ll|l",
&level, &type, &n) == FAILURE) {
return;
}
@@ -288,14 +288,14 @@ PHP_FUNCTION(socket_cmsg_space)
LONG_CHECK_VALID_INT(n);
if (n < 0) {
- php_error_docref0(NULL TSRMLS_CC, E_WARNING, "The third argument "
+ php_error_docref0(NULL, E_WARNING, "The third argument "
"cannot be negative");
return;
}
entry = get_ancillary_reg_entry(level, type);
if (entry == NULL) {
- php_error_docref0(NULL TSRMLS_CC, E_WARNING, "The pair level %pd/type %pd is "
+ php_error_docref0(NULL, E_WARNING, "The pair level %pd/type %pd is "
"not supported by PHP", level, type);
return;
}
@@ -303,7 +303,7 @@ PHP_FUNCTION(socket_cmsg_space)
if (entry->var_el_size > 0 && n > (ZEND_LONG_MAX - (zend_long)entry->size -
(zend_long)CMSG_SPACE(0) - 15L) / entry->var_el_size) {
/* the -15 is to account for any padding CMSG_SPACE may add after the data */
- php_error_docref0(NULL TSRMLS_CC, E_WARNING, "The value for the "
+ php_error_docref0(NULL, E_WARNING, "The value for the "
"third argument (%pd) is too large", n);
return;
}
@@ -312,7 +312,7 @@ PHP_FUNCTION(socket_cmsg_space)
}
#if HAVE_IPV6
-int php_do_setsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname, zval *arg4 TSRMLS_DC)
+int php_do_setsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname, zval *arg4)
{
struct err_s err = {0};
zend_llist *allocations = NULL;
@@ -327,7 +327,7 @@ int php_do_setsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname,
case IPV6_PKTINFO:
#ifdef PHP_WIN32
if (Z_TYPE_P(arg4) == IS_ARRAY) {
- php_error_docref0(NULL TSRMLS_CC, E_WARNING, "Windows does not "
+ php_error_docref0(NULL, E_WARNING, "Windows does not "
"support sticky IPV6_PKTINFO");
return FAILURE;
} else {
@@ -340,7 +340,7 @@ int php_do_setsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname,
opt_ptr = from_zval_run_conversions(arg4, php_sock, from_zval_write_in6_pktinfo,
sizeof(struct in6_pktinfo), "in6_pktinfo", &allocations, &err);
if (err.has_error) {
- err_msg_dispose(&err TSRMLS_CC);
+ err_msg_dispose(&err);
return FAILURE;
}
@@ -363,7 +363,7 @@ dosockopt:
return retval != 0 ? FAILURE : SUCCESS;
}
-int php_do_getsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname, zval *result TSRMLS_DC)
+int php_do_getsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname, zval *result)
{
struct err_s err = {0};
void *buffer;
@@ -393,7 +393,7 @@ int php_do_getsockopt_ipv6_rfc3542(php_socket *php_sock, int level, int optname,
zval *zv = to_zval_run_conversions(buffer, reader, "in6_pktinfo",
empty_key_value_list, &err, &tmp);
if (err.has_error) {
- err_msg_dispose(&err TSRMLS_CC);
+ err_msg_dispose(&err);
res = -1;
} else {
ZVAL_COPY_VALUE(result, zv);