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
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
Máté Kocsis
77172c220a
Convert resources to objects in ext/sockets
...
Closes GH-5900.
2020-08-03 23:26:38 +02:00
Nikita Popov
501db98e57
Merge branch 'PHP-7.4'
...
* PHP-7.4:
Fix bug #79924
2020-08-03 14:56:57 +02:00
Nikita Popov
8b4da1774f
Fix bug #79924
...
Move functions that are only used with ipv6 support under
HAVE_IPV6 checks.
2020-08-03 14:56:27 +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
1589266f85
Remove dead code and unused DEFINEs
...
Closes GH-5073
2020-01-10 22:24:15 +01: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
George Peter Banyard
cfdca10910
Remove dead code in sockets extension [ci skip]
2019-06-15 08:39:35 +02:00
Nikita Popov
2134cc25d2
Guard functions by SO_PASSCRED
2019-06-12 13:17:25 +02:00
Nikita Popov
a31f46421d
Allow exceptions in __toString()
...
RFC: https://wiki.php.net/rfc/tostring_exceptions
And convert some object to string conversion related recoverable
fatal errors into Error exceptions.
Improve exception safety of internal code performing string
conversions.
2019-06-05 14:25:07 +02:00
Nikita Popov
7f6c22cb3d
Fix last maybe uninit warnings on 7.4
...
Most of these only occur under GCC 5. Not fond of all the workarounds
(especially the PDO one), but it gets us a clean build...
2019-04-15 11:35:13 +02:00
Dmitry Stogov
169d454593
Use zval_ptr_dtor() imstead of zval_dtor()
2018-07-05 17:55:54 +03:00
Dmitry Stogov
4a475a4976
Replace legacy zval_dtor() by zval_ptr_dtor_nogc() or even more specialized destructors.
...
zval_dtor() doesn't make a lot of sense in PHP-7.* and it's used incorrectly in some places.
Its occurances should be replaced by zval_ptr_dtor() or zval_ptr_dtor_nogc(), or even more specialized destructors.
2018-07-04 19:22:24 +03:00
Gabriel Caruso
a5f1a585e6
Removed unused variables
2018-02-11 22:46:33 +01:00
Dmitry Stogov
ccc12b82da
Avoid unnecessary reference-counting on strings.
2017-11-16 17:09:32 +03:00
Xinchen Hui
d56a534acc
RC manipulation cleanup 2
2017-11-02 12:13:35 +08:00
Anatol Belski
afb6ca2566
Finish remaining replacement uint => uint32_t
...
Tthe core should be normalized now, no uints anymore
2016-12-22 14:32:02 +01:00
Anatol Belski
b204b3abd1
further normalizations, uint vs uint32_t
...
fix merge mistake
yet one more replacement run
2016-11-26 17:29:01 +01: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
Nikita Popov
42e32c33e2
More warning fixes
2015-07-17 21:12:15 +02:00
Dmitry Stogov
4a2e40bb86
Use ZSTR_ API to access zend_string elements (this is just renaming without semantick changes).
2015-06-30 04:05:24 +03:00
Anatol Belski
bfdc9e2805
fix unknown size of void error
2015-06-17 23:43:13 +02:00
Sara Golemon
51a259f378
Merge branch 'PHP-5.6'
...
* PHP-5.6:
Fix buffer growth in sockets/conversion.c
Implements extended error messages
2015-06-17 13:34:42 -07:00
Sara Golemon
d241711f44
Fix buffer growth in sockets/conversion.c
...
memset() the *end* of the new buffer, not the beginning
Copy the pointer to the buffer, not its initial contents
Fixes bug 69619
2015-06-17 13:34:20 -07:00
Dmitry Stogov
1eb4352143
Use new ZEND_HASH_FOREACH_... API.
2015-02-10 15:43:12 +03:00
Xinchen Hui
e98caf27ea
found type is unnecessary
2015-02-02 14:45:19 +08:00
Xinchen Hui
942809909e
Cleanup resource handling APIs
2015-02-02 13:23:16 +08:00
Stanislav Malyshev
b7a7b1a624
trailing whitespace removal
2015-01-10 15:07:38 -08:00
Anatol Belski
bdeb220f48
first shot remove TSRMLS_* things
2014-12-13 23:06:14 +01:00
Anatol Belski
c00424e427
bring back all the TSRMLS_FETCH() stuff
...
for better comparability with the mainstream
2014-10-15 09:37:55 +02:00
Anatol Belski
169701a64c
cleanup TSRMLS_FETCH in ext/sockets
2014-09-26 21:09:15 +02:00
Nikita Popov
e33f3d3b7c
Move smart_str implementation into Zend/
...
So we can use it there as well...
For now I've retained the zend_smart_str_public.h header, though
it would probably be better to just move that one struct into
zend_types.h.
2014-09-21 20:49:39 +02:00
Nikita Popov
37aaccad7d
Use inline functions for most of smart_str
...
smart_str_free_ex no longer exists, always use smart_str_free instead.
smart_str_alloc no longer requires a newlen variable to be in scope,
instead it returns the new length.
2014-09-19 23:39:07 +02:00
Dmitry Stogov
3bc8a958c5
Fixed useless or duplicated IS_INTERNED() checks
2014-09-19 15:41:01 +04:00
Nikita Popov
e06f5f0df8
Drop some unsafe-looking casting code from ext/socket
...
ZVAL_COPY before convert_to_string is probably not right.
2014-09-05 11:35:41 +02:00
Xinchen Hui
8002e2c06a
Fixed discards qualifiers from pointer target type
2014-09-05 09:31:05 +08:00
Anatol Belski
202e8db1dc
fixed several long vs zend_long casts
2014-08-26 11:26:53 +02:00
Anatol Belski
af59e92b24
master renames phase 7
2014-08-25 21:51:49 +02:00
Anatol Belski
c3e3c98ec6
master renames phase 1
2014-08-25 19:24:55 +02:00
Anatol Belski
70de6180d5
fixes to %pd format usage
2014-08-24 02:35:34 +02:00
Anatol Belski
2da1c805ec
ported ext/sockets
2014-08-19 13:22:27 +02:00
Anatol Belski
63d3f0b844
basic macro replacements, all at once
2014-08-19 08:07:31 +02:00
Xinchen Hui
f7f411e4e2
It's okey for use a stack value here (deleted immediately after use)
2014-08-14 12:26:45 +08:00
Xinchen Hui
0d3cd2486a
Finish ext/sockets
2014-05-18 12:02:05 +08:00
Xinchen Hui
489da59b08
Refactoring socket (only compilable now)
2014-05-17 10:23:46 +08:00
Rasmus Lerdorf
4a205092f7
Trivial Coverity fix
2013-10-19 17:55:34 -07:00
Gustavo Lopes
710150ccb7
socket: support unix paths in the abstract namespace
...
Those starting with '\0'.
2013-07-15 23:57:51 +02:00
Gustavo Lopes
e2744f1aa3
socket: fix bug #65260 (SCM_RIGHTS)
...
The data for messages of type SOL_SOCKET/SCM_RIGHTS was not being
passed correctly. There were actually two bugs: (1) the number of file
descriptors being passed was being read incorrectly (the length of the
cmsg array was being read instead of that of its 'data' element), as a
result it was generally being reported as always three elements
('level', 'type' and 'data') and (2) the allocated block for writing
the file descriptors was being acessed incorrectly because a 1-based
counter was being used as if it was 0-based.
Any of these two bugs would probably be enough to cause heap
corruption.
2013-07-15 23:57:49 +02:00