summaryrefslogtreecommitdiff
path: root/ext/standard/streamsfuncs.c
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.2'Anatol Belski2018-01-271-1/+1
|\ | | | | | | | | * PHP-7.2: fixed Big_endian issue on s390x for stream test cases
| * fixed Big_endian issue on s390x for stream test casesSam Ding2018-01-271-1/+1
| |
| * year++Xinchen Hui2018-01-021-1/+1
| |
* | Eliminate separationsDmitry Stogov2018-01-171-17/+21
| |
* | year++Xinchen Hui2018-01-021-1/+1
| |
* | Merge branch 'PHP-7.2'Joe Watkins2017-11-061-2/+2
|\ \ | |/ | | | | | | * PHP-7.2: Fix proto documents for new global functions
| * Fix proto documents for new global functionsTyson Andre2017-11-061-2/+2
| | | | | | | | See NEWS and UPGRADING (or arginfo/implementation) for details.
* | RC manipulation cleanupXinchen Hui2017-11-011-2/+2
| |
* | Encapsulate reference-counting primitives.Dmitry Stogov2017-10-271-2/+2
| | | | | | | | | | | | Prohibit direct update of GC_REFCOUNT(), GC_SET_REFCOUNT(), GC_ADDREF() and GC_DELREF() shoukf be instead. Added mactros to validate reference-counting (disabled for now). These macros are going to be used to eliminate race-condintions during reference-counting on data shared between threads.
* | Merge branch 'PHP-7.2'Sara Golemon2017-10-071-1/+1
|\ \ | |/ | | | | | | | | * PHP-7.2: Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS Add line numbers to Optimizer debug output
| * Merge branch 'PHP-7.1' into PHP-7.2Sara Golemon2017-10-071-1/+1
| |\ | | | | | | | | | | | | * PHP-7.1: Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
| | * Merge branch 'PHP-7.0' into PHP-7.1Sara Golemon2017-10-071-1/+1
| | |\ | | | | | | | | | | | | | | | | * PHP-7.0: Bugfix #74556 stream_socket_get_name() returns null bytes on MacOS
| | | * Bugfix #74556 stream_socket_get_name() returns null bytes on MacOSSara Golemon2017-10-071-1/+1
| | | |
* | | | Refactored array creation API. array_init() and array_init_size() are ↵Dmitry Stogov2017-09-201-4/+2
| | | | | | | | | | | | | | | | converted into macros calling zend_new_array(). They are not functions anymore and don't return any values.
* | | | Move cwd_state and path related routines to size_tAnatol Belski2017-07-271-1/+1
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Having `int` there is no real profit in the size or speed, while unsigned improves security and overall integration. ZPP supplied strings can be then accepted directly and structs can be still handled with smaller unsigned types for size reasons, which is safe. Yet some related places are to go. basic move tsrm_realpath_r to size_t fix conditions and sync with affected places touch ocurrences of php_sys_readlink usage follow up on phar path handling remove duplicated check move zend_resolve_path and related pieces to size_t touch yet resolve path related places remove cast missing pieces missing piece yet cleanups for php_sys_readlink for ssize_t fix wrong return
* | | Avoid useless dereferences and separations during paramter passing.Dmitry Stogov2017-06-191-16/+16
| | |
* | | Merge branch 'PHP-7.1'Sara Golemon2017-05-281-0/+5
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.1: Bugfix #74556 stream_socket_get_name() returns empty string Fix abstract name handling to be binary safe
| * | Merge branch 'PHP-7.0' into PHP-7.1Sara Golemon2017-05-281-0/+5
| |\ \ | | |/ | | | | | | | | | | | | * PHP-7.0: Bugfix #74556 stream_socket_get_name() returns empty string Fix abstract name handling to be binary safe
| | * Bugfix #74556 stream_socket_get_name() returns empty stringSara Golemon2017-05-281-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The original bug report had it returning '\0', but with a fix to abstract name handling (6d2d0bbda7) it now actually returns ''. Neither of these are good, as per unix(7) an empty socket name indicates an unbound name and "should not be inspected".
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
| * | Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
* | | Don't separate output argumentsDmitry Stogov2017-05-231-2/+2
| | |
* | | simplify and generalize crossplatform partsAnatol Belski2017-04-131-20/+7
| | |
* | | unify behaviorAnatol Belski2017-04-131-6/+4
| | |
* | | Rely on having unistd.h (which provides isatty function)Remi Collet2017-04-121-1/+4
| | | | | | | | | | | | | | | | | | rather than having the posix extension. Fix the tests when build with --disable-all
* | | Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
| | |
* | | Use new param API in standard/streamsfuncsSara Golemon2016-12-291-68/+112
| | |
* | | Add VT100 support for WindowsMichele Locati2016-10-281-0/+114
|/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Fix function names prefix Use Unicode version of GetFinalPathNameByHandle Use EG(windows_version_info) instead of RtlGetVersion Use the specified handle_id instead of STD_OUTPUT_HANDLE Switch from stream name to stream resource Allow running tests capturing only stdout and/or stderr Add tests for stream_vt100_support function Export Win32 console functions Fix x64 build Use zend_long instead of long long, use GetConsole instead of GetFinalPathNameByHandleW to check if a handle is a valid console stream Always use zend_long on any platform Use _get_osfhandle to determine the standard handle Accept stream names Raise warnings in case of invalid stream parameter Return true if disabling VT100 support on a not-console/redirected stream or on old Windows versions Remove php_win32_console_os_supports_vt100 Differentiate stdin vs stdout/stderr Simplify setting flag Allow avoid piping STDIN Let stream_vt100_support accept only resources Fix run-tests Revert console flags in case of failure Simplify logic of stream_vt100_support when setting the flag Return true if succeeded, false otherwise Drop support for STDIN More comprehensive tests for stream_vt100_support Remove old tests Fix name of included file and use absolute paths Enable ENABLE_VIRTUAL_TERMINAL_PROCESSING on Windows by default Remove tests for stream_vt100_support Split stream_vt100_support into stream_isatty+sapi_windows_vt100_support Add tests for stream_isatty Add tests for sapi_windows_vt100_support Return null from stream_isatty is neither Windows nor Posix Fallback to S_ISCHR if neither Windows nor Posix Avoid defining argc since it's only used once Better comment about php_win32_console_fileno_is_console Use events instead of cNumberOfEvents Do not restore previous console mode We need to restore previous console mode on failing SetConsole calls only for STDIN Don't configure STDOUT/STDERR on Windows with PHP_CLI_WIN32_NO_CONSOLE
* | Merge branch 'PHP-7.0' into PHP-7.1Andrea Faulds2016-09-111-72/+0
|\ \ | |/
| * Remove zpp fallback code (always use Fast ZPP)Andrea Faulds2016-09-111-72/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Squashed commit of the following: commit 3e27fbb3d22b42d181e15c345f1c59a007b6b58c Author: Andrea Faulds <ajf@ajf.me> Date: Sun Sep 11 19:14:37 2016 +0100 Keep dummy FAST_ZPP macro for compatibility commit 8a7cfd00deaa4a3c5026c97580c49c886c72a5b4 Author: Andrea Faulds <ajf@ajf.me> Date: Mon Sep 5 22:36:03 2016 +0100 Remove FAST_ZPP macro and plain zpp fallback code
* | Merge branch 'PHP-7.0' into PHP-7.1Andrea Faulds2016-09-051-2/+2
|\ \ | |/
| * Unbreak FAST_ZPP dead codeAndrea Faulds2016-09-051-2/+2
| |
* | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2016-08-161-1/+1
|\ \ | |/ | | | | | | * PHP-7.0: Fixed #72857 stream_socket_recvfrom read access violation
| * Fixed #72857 stream_socket_recvfrom read access violationAnatol Belski2016-08-161-1/+1
| |
* | Merge branch 'PHP-7.0'Anatol Belski2016-07-031-1/+1
|\ \ | |/ | | | | | | | | | | * PHP-7.0: update NEWS extend test Fixed bug #72534 stream_socket_get_name crashes
| * Fixed bug #72534 stream_socket_get_name crashesAnatol Belski2016-07-031-1/+1
| |
* | Added ZEND_ATTRIBUTE_FORMAT to some middind functions.Dmitry Stogov2016-06-211-2/+2
|/ | | | | "%p" replaced by ZEND_LONG_FMT to avoid compilation warnings. Fixed most incorrect use cases of format specifiers.
* Fixed bug #72075 (Referencing socket resources breaks stream_select)Xinchen Hui2016-04-221-0/+3
|
* Fixed Bug #71884 (Null pointer deref (segfault) in stream_context_get_default)Xinchen Hui2016-03-231-3/+2
|
* Merge branch 'PHP-5.6.18' into PHP-7.0.3Stanislav Malyshev2016-02-011-5/+6
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.6.18: fix tests fix NEWS Update NEWS update NEWS Fixed bug #71488: Stack overflow when decompressing tar archives update NEWS add missing headers for SIZE_MAX backport the escapeshell* functions hardening branch add tests Fix bug #71459 - Integer overflow in iptcembed() prepare 5.6.18RC1 Fix test when run with openssl < 1.0.2 (reorder so no more SSLv2 message) Fix skip message to work improve fix for bug #71201 Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata() Fixed bug #71331 - Uninitialized pointer in phar_make_dirstream() Fix bug #71335: Type Confusion in WDDX Packet Deserialization Fix bug #71354 - remove UMR when size is 0 Conflicts: configure.in ext/phar/dirstream.c ext/phar/phar_object.c ext/phar/tar.c ext/standard/exec.c ext/standard/iptc.c ext/standard/math.c ext/standard/streamsfuncs.c ext/wddx/wddx.c main/php_version.h main/streams/memory.c
| * Merge branch 'PHP-5.5.32' into PHP-5.6.18Stanislav Malyshev2016-02-011-10/+10
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-5.5.32: Fixed bug #71488: Stack overflow when decompressing tar archives update NEWS add missing headers for SIZE_MAX backport the escapeshell* functions hardening branch add tests Fix bug #71459 - Integer overflow in iptcembed() Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its input Fix bug #71391: NULL Pointer Dereference in phar_tar_setupmetadata() Fix bug #71335: Type Confusion in WDDX Packet Deserialization Fix bug #71354 - remove UMR when size is 0
| | * Fixed bug #71323 - Output of stream_get_meta_data can be falsified by its inputStanislav Malyshev2016-01-161-10/+10
| | |
* | | Merge branch 'PHP-5.6' into PHP-7.0Lior Kaplan2016-01-011-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-5.6: Happy new year (Update copyright to 2016)
| * | Happy new year (Update copyright to 2016)Lior Kaplan2016-01-011-1/+1
| | |
* | | This should be betterXinchen Hui2015-12-301-1/+0
| | |
* | | Fixed bug #71245 (file_get_contents() ignores "header" context option if ↵Xinchen Hui2015-12-301-2/+3
| | | | | | | | | | | | it's a reference)
* | | Internal function argumensts cleanup (strict_types)Xinchen Hui2015-12-121-1/+1
| | |
* | | Add FAST_ZPP to various important stream funcsBob Weinand2015-09-201-58/+145
| | |
* | | Fixed bug #69521 (Segfault in gc_collect_cycles()).Xinchen Hui2015-07-021-9/+4
| | |
* | | Use ZSTR_ API to access zend_string elements (this is just renaming without ↵Dmitry Stogov2015-06-301-9/+9
| | | | | | | | | | | | semantick changes).