Commit graph

78 commits

Author SHA1 Message Date
Christoph M. Becker
c8955c078a
Revert GH-10220
Cf. <https://github.com/php/php-src/pull/10220#issuecomment-1383739816>.

This reverts commit ecc880f491.
This reverts commit 588a07f737.
This reverts commit f377e15751.
This reverts commit b4ba16fe18.
This reverts commit 694ec1deea.
This reverts commit 6b34de8eba.
This reverts commit aa1cd02a43.
This reverts commit 308fd311ea.
This reverts commit 16203b53e1.
This reverts commit 738fb5ca54.
This reverts commit 9fdbefacd3.
This reverts commit cd4a7c1d90.
This reverts commit 928685eba2.
This reverts commit 01e5ffc85c.
2023-01-16 12:27:33 +01:00
Max Kellermann
308fd311ea ext/{standard,json,random,...}: add missing includes 2023-01-10 14:19:03 +00:00
Máté Kocsis
98e5c4e3a3
Declare ext/sockets constants in stubs (#9349) 2022-08-16 13:18:31 +02:00
Pierrick Charron
0e062c8af8
Merge branch 'PHP-8.1' 2022-06-09 13:51:50 -04:00
Pierrick Charron
f97a650944
Merge branch 'PHP-8.0' into PHP-8.1 2022-06-09 13:49:45 -04:00
Pierrick Charron
e2d55f2f12
Fix LONG_CHECK_VALID_INT in socket extension 2022-06-09 13:48:02 -04:00
David Carlier
6fe7ff95d9 Implements ancillary data on NetBSD.
With the couple LOCAL_CREDS/SCM_CREDS, in this system we get all the
infos needed (included the process id).
Closes GH-8700.
2022-06-06 23:06:01 +01:00
David CARLIER
f813520b50
Implements socket ancillary data on FreeBSD. (#7708)
using LOCAL_CREDS_PERSISTENT/SCM_CREDS2 instead so we also get the send process id.
2022-06-02 14:08:03 +01:00
Christoph M. Becker
f16d35cfe9
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  Fix Solaris builds of ext/sockets
2022-03-10 14:51:30 +01:00
David Carlier
7eb972c456
Fix Solaris builds of ext/sockets
We enable the proper ancillary data handling layout and API.

Closes GH-7859.
2022-03-10 14:48:08 +01:00
Joe Watkins
00113b95b2
Merge branch 'PHP-8.0' into PHP-8.1
* PHP-8.0:
  socket: ancillary credentials build fix for non linux systems.
2021-12-21 07:25:55 +01:00
David Carlier
51647eb23e
socket: ancillary credentials build fix for non linux systems.
for systems using SO_PASSCRED sockopt flag but not using ucred struct.
2021-12-21 07:25:43 +01:00
KsaR
01b3fc03c3
Update http->https in license (#6945)
1. Update: http://www.php.net/license/3_01.txt to https, as there is anyway server header "Location:" to https.
2. Update few license 3.0 to 3.01 as 3.0 states "php 5.1.1, 4.1.1, and earlier".
3. In some license comments is "at through the world-wide-web" while most is without "at", so deleted.
4. fixed indentation in some files before |
2021-05-06 12:16:35 +02:00
Calvin Buckley
e074e029ee sockets: Fix variable/macro name collision on AIX
The name "rem_size" is used by a macro in a system header on AIX,
specifically `sys/xmem.h`. Without changing the name, you get the
name mangled like so:

```
In file included from /usr/include/sys/uio.h:92:0,
                 from /QOpenSys/pkgs/lib/gcc/powerpc-ibm-aix6.1.0.0/6.3.0/include-fixed-7.1/sys/socket.h:83,
                 from /usr/include/sys/syslog.h:151,
                 from /usr/include/syslog.h:29,
                 from /home/calvin/rpmbuild/BUILD/php-8.0.0RC5/main/php_syslog.h:27,
                 from /home/calvin/rpmbuild/BUILD/php-8.0.0RC5/main/php.h:318,
                 from /home/calvin/rpmbuild/BUILD/php-8.0.0RC5/ext/sockets/sendrecvmsg.c:17:
/home/calvin/rpmbuild/BUILD/php-8.0.0RC5/ext/sockets/sendrecvmsg.c: In function 'zif_socket_cmsg_space':
/home/calvin/rpmbuild/BUILD/php-8.0.0RC5/ext/sockets/sendrecvmsg.c:298:10: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   size_t rem_size = ZEND_LONG_MAX - entry->size;
          ^
/home/calvin/rpmbuild/BUILD/php-8.0.0RC5/ext/sockets/sendrecvmsg.c:298:10: error: expected expression before '.' token
/home/calvin/rpmbuild/BUILD/php-8.0.0RC5/ext/sockets/sendrecvmsg.c:299:18: error: 'u2' undeclared (first use in this function)
   size_t n_max = rem_size / entry->var_el_size;
                  ^
/home/calvin/rpmbuild/BUILD/php-8.0.0RC5/ext/sockets/sendrecvmsg.c:299:18: note: each undeclared identifier is reported only once for each function it appears in
```

...because of the declaration in `sys/xmem.h`:

```
```

This just renames the variable so that it won't trip on this
definition. Tested to fix the build on IBM i PASE.

Closes GH-6453.
2020-11-25 11:54:40 +01:00
Nikita Popov
af64001dcb Normalize error message capitalization 2020-08-05 16:44:06 +02:00
Nikita Popov
25d849d40b Merge branch 'PHP-7.4'
* PHP-7.4:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:42:55 +02:00
Nikita Popov
3b86be23e6 Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix memory leak on socket_sendmsg() / socket_recvmsg() error
2020-08-05 16:42:13 +02:00
Nikita Popov
6a1bd57df5 Fix memory leak on socket_sendmsg() / socket_recvmsg() error 2020-08-05 16:41:40 +02:00
Máté Kocsis
77172c220a Convert resources to objects in ext/sockets
Closes GH-5900.
2020-08-03 23:26:38 +02:00
Santiago M. Mola
65713aaddd Fix #79923: fix socket_set_option_bindtodevice test
Closes GH-5924.
2020-08-03 15:03:07 +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
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
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
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
77bd1ce60d Just return after exception has been thrown 2019-10-12 23:09:23 +02:00
Gabriel Caruso
5d6e923d46
Remove mention of PHP major version in Copyright headers
Closes GH-4732.
2019-09-25 14:51:43 +02:00
Christoph M. Becker
f5b9cc4bcf Merge branch 'PHP-7.3' into PHP-7.4
* PHP-7.3:
  Fix length of key passed to zend_hash_str_find_ptr
2019-09-21 18:13:06 +02:00
Christoph M. Becker
33e556fab4 Merge branch 'PHP-7.2' into PHP-7.3
* PHP-7.2:
  Fix length of key passed to zend_hash_str_find_ptr
2019-09-21 18:12:27 +02:00
Jinesh Patel
0d6c2448a7 Fix length of key passed to zend_hash_str_find_ptr 2019-09-21 18:11:21 +02:00
George Peter Banyard
1c1de0c41a Convert all php_error_docref0 to php_error_docref
Closes GH-4394
2019-07-13 02:05:17 +02:00
Zeev Suraski
0cf7de1c70 Remove yearly range from copyright notice 2019-01-30 11:03:12 +02:00
Dmitry Stogov
67e47c3ee3 Eliminate useless separations 2018-01-17 12:45:23 +03:00
Xinchen Hui
a6519d0514 year++ 2018-01-02 12:57:58 +08:00
Xinchen Hui
7a7ec01a49 year++ 2018-01-02 12:55:14 +08:00
Sammy Kaye Powers
9e29f841ce Update copyright headers to 2017 2017-01-02 09:30:12 -06:00
Dmitry Stogov
adc95c5114 Fixed compilation warnings 2016-06-23 12:47:06 +03:00
Dmitry Stogov
1616038698 Added ZEND_ATTRIBUTE_FORMAT to some middind functions.
"%p" replaced by ZEND_LONG_FMT to avoid compilation warnings.
Fixed most incorrect use cases of format specifiers.
2016-06-21 16:00:37 +03:00
Lior Kaplan
ed35de784f Merge branch 'PHP-5.6' into PHP-7.0
* PHP-5.6:
  Happy new year (Update copyright to 2016)
2016-01-01 19:48:25 +02:00
Lior Kaplan
49493a2dcf Happy new year (Update copyright to 2016) 2016-01-01 19:21:47 +02:00
Xinchen Hui
942809909e Cleanup resource handling APIs 2015-02-02 13:23:16 +08:00
Xinchen Hui
fc33f52d8c bump year 2015-01-15 23:27:30 +08:00
Xinchen Hui
0579e8278d bump year 2015-01-15 23:26:37 +08:00
Anatol Belski
bdeb220f48 first shot remove TSRMLS_* things 2014-12-13 23:06:14 +01:00
Johannes Schlüter
d0cb715373 s/PHP 5/PHP 7/ 2014-09-19 18:33:14 +02:00
Anatol Belski
202e8db1dc fixed several long vs zend_long casts 2014-08-26 11:26:53 +02:00
Anatol Belski
4d997f63d9 master renames phase 3 2014-08-25 20:22:49 +02:00
Anatol Belski
c3e3c98ec6 master renames phase 1 2014-08-25 19:24:55 +02:00