Max Semenik
2b5de6f839
Remove proto comments from C files
...
Closes GH-5758
2020-07-06 21:13:34 +02:00
Nikita Popov
b0dc325bba
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Handle SO_ options only at SOL_SOCKET level
Allow different error message for errno 58
2020-07-02 11:44:34 +02:00
Nikita Popov
f1bf058d7c
Handle SO_ options only at SOL_SOCKET level
...
These options may have the same value as options at other levels.
This issue showed up on ppc64el.
2020-07-02 11:41:08 +02:00
Nikita Popov
0a216f5edb
Allow different error message for errno 58
...
Apparently this is EDEADLOCK on some systems.
2020-07-02 11:39:22 +02:00
Nikita Popov
c9b9f525a9
Include stub hash in generated arginfo files
...
The hash is used to check whether the arginfo file needs to be
regenerated. PHP-Parser will only be downloaded if this is actually
necessary.
This ensures that release artifacts will never try to regenerate
stubs and thus fetch PHP-Parser, as long as you do not modify any
files.
Closes GH-5739.
2020-06-24 09:55:19 +02:00
Nikita Popov
09532a12a6
Suppress deprecation warning in sockets.c
...
This one was quite a journey...
2020-06-12 12:35:02 +02:00
Nikita Popov
b53f83c0c3
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Use automatic port assignment in socket_import/export test
2020-05-28 10:20:12 +02:00
Nikita Popov
490ca05883
Use automatic port assignment in socket_import/export test
2020-05-28 10:18:59 +02:00
George Peter Banyard
f91f72607b
Drop unnecessary stdint and inttypes header checks
...
These are always available as of C99.
Closes GH-5323
Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de >
2020-04-22 20:18:19 +02:00
George Peter Banyard
0b99017516
Fix error message in ext/socket
2020-04-22 00:50:32 +02:00
George Peter Banyard
7ff8eaa545
Promote warnings to Errors in sockets's extension.
2020-04-21 20:41:26 +02:00
Nikita Popov
58f9c4053e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't rand() in test
2020-04-20 16:37:19 +02:00
Nikita Popov
3e9dac2c6b
Don't rand() in test
...
Instead use port 0 to get a free port from the OS.
2020-04-20 16:35:52 +02:00
George Peter Banyard
9f8eb9d515
Fix [-Wjump-misses-init] in sockets extension
2020-04-18 14:52:48 +02:00
Guillaume Charifi
adea221b1a
Improve socket cmsg space handling.
...
This should also fix the null pointer arithmetic warning on MacOS as we don't depend on whack code written by Apple.
Closes GH-5387
2020-04-14 17:10:21 +02:00
Nikita Popov
d0006b5fac
Use UNKNOWN default for socket_connect()
...
Specifying the port is mandatory for INET sockets.
2020-04-14 16:09:01 +02:00
Nikita Popov
b9b2e8ddde
Fix socket_write() default value
2020-04-14 16:08:55 +02:00
Máté Kocsis
3709e74b5e
Store default parameter values of internal functions in arg info
...
Closes GH-5353. From now on, PHP will have reflection information
about default values of parameters of internal functions.
Co-authored-by: Nikita Popov <nikita.ppv@gmail.com >
2020-04-08 18:37:51 +02:00
Máté Kocsis
21cfa03f17
Generate function entries for another batch of extensions
...
Closes GH-5352
2020-04-05 21:15:30 +02:00
Máté Kocsis
a43bc33fb2
Annotate function aliases in stubs
2020-04-04 13:03:16 +02:00
Nikita Popov
2bcc4ab8f4
Verify that all stubs have a return type
2020-04-03 17:59:30 +02:00
Nikita Popov
934e60b594
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Don't specify ports in socket_export_stream-4.phpt
2020-03-16 10:32:39 +01:00
Nikita Popov
a57905dbac
Don't specify ports in socket_export_stream-4.phpt
...
Let the system pick a free port instead...
2020-03-16 10:32:04 +01:00
Máté Kocsis
736b22dc0b
Add stubs for aliases
...
Closes GH-5187
2020-02-18 21:10:36 +01:00
George Peter Banyard
2efa0b3bfa
Address path is 104 bytes on macOs compared to 108 on Linux
2020-02-04 22:23:56 +01:00
Nikita Popov
f8d795820e
Reindent phpt files
2020-02-03 22:52:20 +01:00
Nikita Popov
6811222422
Eliminate uses of ZVAL_ZVAL and friends
...
Instead add RETURN_COPY(_VALUE) macros will the expected behavior.
RETURN_ZVAL doesn't make any sense since PHP 7, but has stuck
around, probably because the alternative was to write directly to
the return_value variable.
2020-01-20 10:34:17 +01:00
Máté Kocsis
d1764ca330
Make error messages more consistent by fixing capitalization
...
Closes GH-5066 As a first step, let's capitalize their initial letter when it is applicable.
2020-01-17 14:52:46 +01:00
Máté Kocsis
afdaa91170
Fix #78880 : Final spelling fixes
2020-01-16 19:14:31 +01:00
George Peter Banyard
1589266f85
Remove dead code and unused DEFINEs
...
Closes GH-5073
2020-01-10 22:24:15 +01:00
Máté Kocsis
aadd3aaed9
Use RETURN_THROWS() in various places
2020-01-03 21:10:24 +01:00
Máté Kocsis
bbcfa66e06
Use RETURN_THROWS() after zend_fetch_resource*()
2020-01-03 19:20:56 +01:00
Máté Kocsis
345703724c
Use RETURN_THROWS() during ZPP in most of the extensions
...
Except for some bigger ones: reflection, sodium, spl
2019-12-31 11:46:11 +01:00
Christoph M. Becker
424d34d1c0
Make test more resilient
...
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to be marked as borked. Since we're checking the return value
anyway, we can silence warnings.
2019-11-21 13:40:36 +01:00
Christoph M. Becker
735c4cab74
Make test more resilient
...
`socket_bind()` may raise `E_WARNING` on failure, which would cause the
test to fail.
2019-11-11 18:08:54 +01:00
Máté Kocsis
27e83d0fb8
Add union return types for function stubs
2019-11-11 14:54:55 +01:00
Máté Kocsis
9493893412
Cleanup return values when parameter parsing is unsuccessful
2019-10-30 16:05:20 +01:00
Christoph M. Becker
ecc9588d0c
Properly handle non resources passed to socket_select()
...
As of PHP 8.0.0, failing `zend_fetch_resource_ex()` throws a TypeError,
so we cannot simply skip non resources in the `$read`, `$write` and
`$except` arrays. Instead we bail out. Since these arrays are already
checked in `php_sock_array_to_fd_set()`, we remove the additional check
in `php_sock_array_from_fd_set()`.
2019-10-18 14:16:25 +02:00
Christoph M. Becker
77bd1ce60d
Just return after exception has been thrown
2019-10-12 23:09:23 +02:00
Thomas Gerbet
428bd3d908
Add stubs for ext-sockets
2019-10-12 17:08:24 +02:00
Christoph M. Becker
cc8739cfb9
Fix potentially borked test case
...
If interface 'lo' is not available, `socket_set_option()` may warn,
which would cause the test to be marked as borked. Thus we silence the
function call.
2019-10-12 16:48:45 +02:00
Christoph M. Becker
52f0610b74
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix test case
2019-10-12 16:29:42 +02:00
Christoph M. Becker
f6bd5dcbe9
Fix test case
...
`MSG_EOR` and `MSG_EOF` are not necessarily defined, in which case the
test would fail.
2019-10-12 16:28:57 +02:00
Christoph M. Becker
642f80636e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix potential heap corruption
2019-10-12 16:16:44 +02:00
Christoph M. Becker
c10d3d3a35
Fix potential heap corruption
...
`tmp` is allocated by `malloc()`, so we must not `LocalFree()` it.
2019-10-12 16:16:14 +02:00
Christoph M. Becker
993463a65e
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix #78665 : Multicasting may leak memory
2019-10-12 14:46:36 +02:00
Christoph M. Becker
586f8515d5
Merge branch 'PHP-7.3' into PHP-7.4
...
* PHP-7.3:
Fix #78665 : Multicasting may leak memory
2019-10-12 14:46:10 +02:00
Christoph M. Becker
7439d48bea
Merge branch 'PHP-7.2' into PHP-7.3
...
* PHP-7.2:
Fix #78665 : Multicasting may leak memory
2019-10-12 14:44:55 +02:00
Christoph M. Becker
900bdcbd03
Fix #78665 : Multicasting may leak memory
2019-10-12 14:43:43 +02:00
Nikita Popov
85c8c5bfac
Merge branch 'PHP-7.4'
2019-10-11 10:58:03 +02:00