summaryrefslogtreecommitdiff
path: root/Zend/zend_virtual_cwd.c
Commit message (Collapse)AuthorAgeFilesLines
* Implemented a faster way to access predefined TSRM resources - CG(), EG(), etc.Dmitry Stogov2019-03-141-1/+2
|
* Remove local variablesPeter Kokot2019-02-031-7/+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.
* Remove yearly range from copyright noticeZeev Suraski2019-01-301-1/+1
|
* Merge branch 'PHP-7.3'Anatol Belski2019-01-191-1/+1
|\ | | | | | | | | * PHP-7.3: Fixed bug #77484 Zend engine crashes when calling realpath in invalid working dir
| * Fixed bug #77484 Zend engine crashes when calling realpath in invalid ↵Anatol Belski2019-01-191-1/+1
| | | | | | | | working dir
* | Merge branch 'PHP-7.3'Anatol Belski2018-12-261-54/+0
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #77317 __DIR__, __FILE__, realpath() reveal physical path for subst virtual drive
| * Fixed bug #77317 __DIR__, __FILE__, realpath() reveal physical path for ↵Anatol Belski2018-12-261-54/+0
| | | | | | | | | | | | | | | | | | | | | | | | subst virtual drive Keep compatibility with 7.2 and below which better comply with realpath(3). This might have been fixable another way, say by checking of QueryDosDevice or alike, sadly that comes with a huge performance impact. The new internal realpath API is kept available so is usable when bind or network mount or other OS specific realpath variants are needed. If not used by default, a userspace function for this specific case might be considered to be offered in next minor.
| * Future-proof email addressesZeev Suraski2018-11-011-1/+1
| |
* | Clean up unnecessary ternary expressions and simplify some returnsGabriel Caruso2018-12-031-1/+1
| | | | | | | | | | | | | | - Simplify conditions - Use ZEND_HASH_APPLY_* instead of hard-coded booleans - Use ZEND_NORMALIZE_BOOL - Drop sign in favor of ZEND_NORMALIZE_BOOL
* | Update email addresses. We're still @Zend, but future proofing it...Zeev Suraski2018-11-011-1/+1
| |
* | Refactor php_sys_readlinkAnatol Belski2018-10-031-72/+0
| | | | | | | | Also move the implementation into win32 where it belongs
* | Set correct error code and adapt testAnatol Belski2018-09-171-1/+1
| |
* | Fix error setting, both errors are neededAnatol Belski2018-09-171-1/+1
| |
* | Refactor stat implementationAnatol Belski2018-08-261-183/+5
|/ | | | | | | | | | | | | | - 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.
* Eliminate castAnatol Belski2018-03-191-3/+3
|
* Mark non exported symbol as staticAnatol Belski2018-03-171-1/+1
|
* year++Xinchen Hui2018-01-021-1/+1
|
* Drop unused codeAnatol Belski2017-12-151-13/+0
|
* Modernize realpath and integrate quick variant into virtual_file_exAnatol Belski2017-12-151-1/+69
| | | | | | | | | | | | | | | | | | | | The slower I/O as a traditional bottleneck on Windows which is the target of this patch. The recursive path resolution, while being an allround solution, is expensive when it comes to the common case. Files with proper ACLs set can be resolved in one go by usage of specific API. Those are available since Vista, so actually can be called old. Those simpler api is used for the cases where no CWD_EXPAND is requested. For the cases where ACLs are improper, the existing solution based on FindFirstFile still does good job also partially providing quirks. Cases involing reparse tags and other non local filesystems are also partially server by new APIs. The approach uses both APIs - the quick one for the common case still integrating realpath cache, and the existing one as a fallback. The tests show the I/O load drop on the realpath resolution part due to less system calls for the sub part resolution of paths. In most case it is justified, as the sub parts were otherwise cached or unused as well. The realpath() implementation in ioutil is also closer to the POSIX.
* Allow delete-sharing mode for CreateFile by defaultAnatol Belski2017-12-081-4/+16
| | | | | | This effectively allows a UNIX like semantics for deleting files with an open handle. Some OS related limitations still persist, but the Windows 95 times can be considered as definitely over.
* Fix unsigned comparisons and remove dead codeAnatol Belski2017-11-171-5/+0
| | | | | | | | | | | | | | | | Fix unsigned comparison Cleanup never executed block Fix unsigned comparison Fix unsigned comparison, diff can't be < 0 Fix unsigned comparison Fix unsigned comparison Remove dead code
* Merge branch 'PHP-7.2'Anatol Belski2017-11-081-2/+19
|\ | | | | | | | | | | | | * PHP-7.2: Fixed #75384 PHP seems incompatible with OneDrive files on demand bump versions Fixed ext/date tests due to changes in Olson database
| * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-11-081-2/+19
| |\ | | | | | | | | | | | | | | | | | | * PHP-7.1: Fixed #75384 PHP seems incompatible with OneDrive files on demand bump versions Fixed ext/date tests due to changes in Olson database
| | * Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-11-081-2/+19
| | |\ | | | | | | | | | | | | | | | | | | | | * PHP-7.0: Fixed #75384 PHP seems incompatible with OneDrive files on demand Fixed ext/date tests due to changes in Olson database
| | | * Fixed #75384 PHP seems incompatible with OneDrive files on demandAnatol Belski2017-11-081-2/+19
| | | |
* | | | Merge branch 'PHP-7.2'Anatol Belski2017-10-111-1/+1
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.2: Fix datatype
| * | | Fix datatypeAnatol Belski2017-10-111-1/+1
| | | |
* | | | Merge branch 'PHP-7.2'Anatol Belski2017-08-141-2/+12
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.2: Fixed bug #75063
| * | | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-08-141-2/+12
| |\ \ \ | | |/ / | | | | | | | | | | | | * PHP-7.1: Fixed bug #75063
| | * | Fixed bug #75063Anatol Belski2017-08-141-4/+13
| | | |
* | | | fix up porting mistakesAnatol Belski2017-07-271-3/+6
| | | |
* | | | Move cwd_state and path related routines to size_tAnatol Belski2017-07-271-56/+57
|/ / / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 unnecessary string copyAnatol Belski2017-04-271-1/+3
| | | | | | | | | | | | which is the case when there's no impersonation.
* | | get rid of two strlen callsAnatol Belski2017-04-271-2/+3
| | |
* | | Switch to FindFirstFileEx with basic info levelAnatol Belski2017-04-071-1/+1
| | | | | | | | | | | | That omits querying of short names, thus improving perf.
* | | missing bits for php_sys_stat_ex so everything is handled with wide charsAnatol Belski2017-04-031-14/+12
| | | | | | | | | | | | rename to pathw_len
* | | Merge branch 'PHP-7.1'Anatol Belski2017-04-031-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.1: fix possible out of bounds buffer access
| * | Merge branch 'PHP-7.0' into PHP-7.1Anatol Belski2017-04-031-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.0: fix possible out of bounds buffer access
| | * fix possible out of bounds buffer accessAnatol Belski2017-04-031-1/+1
| | |
| | * Revert "backport 51e1da6ea1e663908302e162ced1b7a8cb5aee05 into 7.0"Anatol Belski2017-01-311-8/+1
| | | | | | | | | | | | This reverts commit 8da87563122e4d14208b2827fd6b2807578677ec.
| | * backport 51e1da6ea1e663908302e162ced1b7a8cb5aee05 into 7.0Anatol Belski2017-01-211-1/+8
| | |
| | * Update copyright headers to 2017Sammy Kaye Powers2017-01-041-1/+1
| | |
* | | Drop unnecessary allocator return value checksNikita Popov2017-03-131-37/+0
| | |
* | | Merge branch 'PHP-7.1'Anatol Belski2017-01-241-4/+6
|\ \ \ | |/ / | | | | | | | | | * PHP-7.1: make length check more robust
| * | make length check more robustAnatol Belski2017-01-241-4/+6
| | |
* | | Merge branch 'PHP-7.1'Anatol Belski2017-01-211-6/+32
|\ \ \ | |/ / | | | | | | | | | | | | * PHP-7.1: exclude debug code ensure the string for conversion is \0 terminated and integrade additional path length check
| * | exclude debug codeAnatol Belski2017-01-211-2/+13
| | |
| * | ensure the string for conversion is \0 terminated and integradeAnatol Belski2017-01-211-4/+19
| | | | | | | | | | | | additional path length check
* | | Merge branch 'PHP-7.1'Anatol Belski2017-01-201-3/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-7.1: Fixed bug #73962 bug with symlink related to cyrillic directory