summaryrefslogtreecommitdiff
path: root/Zend/zend_stream.h
Commit message (Collapse)AuthorAgeFilesLines
* Revert "Drop free_filename field from zend_file_handle"Nikita Popov2019-07-241-0/+3
| | | | | | | This reverts commit e0eca262852dba1a78afcde64a49126c81fead1a. free_filename is used by the wincache extension, restore this field for PHP 7.4.
* Also report errors from Zend stream reader operationNikita Popov2019-07-221-1/+1
|
* Revert "Avoid unused fstat() call"Nikita Popov2019-07-171-0/+2
| | | | | | | This reverts commit 5a90dc77b8f244f603082aea022fadc0ce2c009c. Let's try to go with the reverse direction here and actually trust the reported size...
* Avoid unused fstat() callNikita Popov2019-07-171-2/+0
| | | | | | | | If we're including a file via PHP streams, we're not going to trust the reported file size anyway and populate in a loop -- so don't bother determining the file size in the first place. Only do this for non-tty HANDLE_FP now, which is the only case where this information was used.
* Remove ZEND_HANDLE_MAPPEDNikita Popov2019-07-161-10/+3
| | | | | The buf/len members are now simply used in addition to the main stream, without changing the handle kind.
* Drop free_filename field from zend_file_handleNikita Popov2019-07-161-1/+0
| | | | free_filename was always zero.
* Introduce zend_stream_init_filename()Nikita Popov2019-07-161-0/+1
| | | | Avoid more ad-hoc initialization of zend_file_handle structures.
* Introduce zend_stream_init_fp() APINikita Popov2019-07-161-0/+1
| | | | | Reduce the amount of code that mucks around with zend_file_handle initialization.
* Remove ZEND_HANDLE_FDNikita Popov2019-07-161-2/+0
| | | | This handle type was unused.
* Fix bug #52752 by not using mmap() to lex filesNikita Popov2019-07-161-2/+0
| | | | | | | | | | | | | | | | | | | | | Using mmap() is unsafe under concurrent modification. If the file is truncated, access past the end of the file may occur, which will generate a SIGBUS error. Even if the length does not change, the contents may, which is a situation that the lexer certainly is not prepared to deal with either. Reproduce with test.php: <?php file_put_contents(__DIR__ . '/test.tpl', 'AAA<?php $string = "' . str_repeat('A', mt_rand(1, 256 * 1024)) . '"; ?>BBB' . "\r\n"); require_once __DIR__ . '/test.tpl'; And: for ((n=0;n<100;n++)); do sapi/cli/php test.php & done
* Remove local variablesPeter Kokot2019-02-031-10/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch removes the so called local variables defined per file basis for certain editors to properly show tab width, and similar settings. These are mainly used by Vim and Emacs editors yet with recent changes the once working definitions don't work anymore in Vim without custom plugins or additional configuration. Neither are these settings synced across the PHP code base. A simpler and better approach is EditorConfig and fixing code using some code style fixing tools in the future instead. This patch also removes the so called modelines for Vim. Modelines allow Vim editor specifically to set some editor configuration such as syntax highlighting, indentation style and tab width to be set in the first line or the last 5 lines per file basis. Since the php test files have syntax highlighting already set in most editors properly and EditorConfig takes care of the indentation settings, this patch removes these as well for the Vim 6.0 and newer versions. With the removal of local variables for certain editors such as Emacs and Vim, the footer is also probably not needed anymore when creating extensions using ext_skel.php script. Additionally, Vim modelines for setting php syntax and some editor settings has been removed from some *.phpt files. All these are mostly not relevant for phpt files neither work properly in the middle of the file.
* Adios, yearly copyright rangesZeev Suraski2019-01-301-1/+1
|
* Refactor stat implementationAnatol Belski2018-08-261-7/+14
| | | | | | | | | | | | | | - move relevant parts into win32 - general cleanup - use Windows API and fallback to POSIX - improve filetime to timestamp conversion - improve stat/fsat - handle ino by using file index - handle st_dev by using volume serial number The inode implementation is based on file indexes from NTFS. On 32-bit, fake inodes are shown, that may lead to unexpeted results. 64-bit implementation is most reliable.
* Remove unused Git attributes identPeter Kokot2018-07-251-2/+0
| | | | | | | | | | | | | | | The $Id$ keywords were used in Subversion where they can be substituted with filename, last revision number change, last changed date, and last user who changed it. In Git this functionality is different and can be done with Git attribute ident. These need to be defined manually for each file in the .gitattributes file and are afterwards replaced with 40-character hexadecimal blob object name which is based only on the particular file contents. This patch simplifies handling of $Id$ keywords by removing them since they are not used anymore.
* year++Xinchen Hui2018-01-021-1/+1
|
* further sync for vim mode linesAnatol Belski2017-07-041-0/+10
|
* Update copyright headers to 2017Sammy Kaye Powers2017-01-021-1/+1
|
* bump year which is missed in rev 49493a2Xinchen Hui2016-01-021-1/+1
|
* Use zend_string* instead of char* for opened_patch handling. Avoid ↵Dmitry Stogov2015-03-041-1/+1
| | | | reallocations and improve string reuse.
* bump yearXinchen Hui2015-01-151-1/+1
|
* trailing whitespace removalStanislav Malyshev2015-01-101-1/+1
|
* first shot remove TSRMLS_* thingsAnatol Belski2014-12-131-6/+6
|
* reduce size by 8 byte on 64 bitAnatol Belski2014-09-121-3/+3
|
* first shot on merging the core fro the int64 branchAnatol Belski2014-08-161-0/+19
|
* Bump yearXinchen Hui2014-01-031-1/+1
|
* Happy New YearXinchen Hui2013-01-011-1/+1
|
* - Year++Felipe Pena2012-01-011-1/+1
|
* Fixed ZE specific compile warnings (Bug #55629)Dmitry Stogov2011-09-131-1/+1
|
* - Year++Felipe Pena2011-01-011-1/+1
|
* sed -i "s#1998-2009#1998-2010#g" **/*.c **/*.h **/*.phpSebastian Bergmann2010-01-051-1/+1
|
* - MFH: Fixed build (removed trailing comma) patch by Seiji Masugata ↵Felipe Pena2009-06-161-1/+1
| | | | <s.masugata at digicom.dnp.co.jp>
* MFH: Add proper EOF handling for language scanner. Fixes bug #46817.Brian Shire2009-03-111-1/+1
|
* MFH: Bump copyright year, 3 of 3.Sebastian Bergmann2008-12-311-1/+1
|
* add sanity checks for ZEND_MMAP_AHEAD and reduce the value from 32 to 16 ↵Nuno Lopes2008-04-041-1/+1
| | | | (lowest safe value)
* - Rewrite scanner to be based on re2c instead of flexMarcus Boerger2008-03-161-23/+40
| | | | | | | | | The full patch is available as: http://php.net/~helly/php-re2c-5.3-20080316.diff.txt This is against php-re2c repository version 98 An older patch against version 97 is available under: http://php.net/~helly/php-re2c-97-20080316.diff.txt
* MFH: Bump copyright year, 2 of 2.Sebastian Bergmann2007-12-311-1/+1
|
* MFH: Bump year.Sebastian Bergmann2007-01-011-1/+1
|
* - Update copyright notices to 2006Andi Gutmans2006-01-041-1/+1
|
* Bump up the yearfoobar2005-08-031-1/+1
|
* Thought I committed it ages ago... Anyway, without further delays, the finalZeev Suraski2005-06-041-0/+3
| | | | | __halt_compiler() patch
* export zend stream functions for zend extensions under windowsWez Furlong2004-06-251-4/+4
|
* wrap ZEND_API prototypes into BEGIN_EXTERN_C/END_EXTERN_CHartmut Holzgraefe2004-02-181-0/+2
| | | | | for C++ extension support
* - Happy new year and PHP 5 for rest of the files too..foobar2004-01-081-1/+1
| | | | | # Should the LICENSE and Zend/LICENSE dates be updated too?
* Sync: Export externally used functions.Sebastian Bergmann2003-12-161-1/+1
|
* updating license information in the headers.James Cox2003-06-101-1/+1
|
* Implement simple stream support in the ZE scanners.Wez Furlong2003-02-181-0/+59