summaryrefslogtreecommitdiff
path: root/win32/ioutil.h
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.4'Christoph M. Becker2020-07-161-0/+2
|\ | | | | | | | | * PHP-7.4: Fix readlink related memory leak
| * Fix readlink related memory leakChristoph M. Becker2020-07-161-0/+2
| |
* | Remove HAVE_REALPATH checksNikita Popov2020-03-261-1/+0
| | | | | | | | | | | | | | We do not actually use realpath(), but a custom implementation. Make sure the realpath() function is always available. Closes GH-5290.
* | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-021-1/+9
|\ \ | |/ | | | | | | * PHP-7.4: Fix #78296: is_file fails to detect file
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-12-021-1/+9
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #78296: is_file fails to detect file
| | * Fix #78296: is_file fails to detect fileChristoph M. Becker2019-12-021-1/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If we're constructing extended-length paths (i.e. paths prefixed with `\\?\`), we have to replace all forward slashes with backward slashes, because the former are not supported by Windows for extended-length paths. The more efficient and likely cleaner alternative solution would be to cater to this in `php_win32_ioutil_normalize_path_w()` by always replacing forward slashes, but that might break existing code. It might be sensible to change that for `master`, though.
* | | Remove mention of PHP major version in Copyright headersGabriel Caruso2019-09-251-2/+0
|/ / | | | | | | Closes GH-4732.
* | Fix bc break in Windows readlinkjohnstevenson2019-03-101-0/+5
| | | | | | | | | | | | | | GetFinalPathNameByHandleW is given a file handle to a symbolic link, rather than one to the target, and therefore returns an incorrect path. Fix symlink with relative path and add test
* | Remove local variablesPeter Kokot2019-02-031-9/+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
| |
* | Reuse delivered lengthAnatol Belski2018-10-031-2/+2
| | | | | | | | Fix length calculation
* | Refactor php_sys_readlinkAnatol Belski2018-10-031-0/+36
| | | | | | | | Also move the implementation into win32 where it belongs
* | Merge branch 'PHP-7.3'Anatol Belski2018-10-031-5/+0
|\ \ | |/ | | | | | | * PHP-7.3: Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)
| * Fixed bug #76947 file_put_contents() blocks the directory of the file (__DIR__)Anatol Belski2018-10-031-5/+0
| | | | | | | | | | The condition was wrong. The target buffer size only matters, when some output is going to be copied into it.
* | Refactor stat implementationAnatol Belski2018-08-261-0/+79
| | | | | | | | | | | | | | | | | | | | | | | | | | | | - 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.
* | Create and expose php_sys_symlink() and php_sys_link()Christoph M. Becker2018-08-021-0/+53
|/ | | | | | | These macros are supposed to behave like POSIX's symlink() and link(), respectively, on POSIX compliant systems and on Windows. Future scope: merge link.c and link_win32.c
* Merge branch 'PHP-7.2'Anatol Belski2018-07-121-1/+1
|\ | | | | | | | | * PHP-7.2: Fix macro
| * Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2018-07-121-1/+1
| |\ | | | | | | | | | | | | * PHP-7.1: Fix macro
| | * Fix macroAnatol Belski2018-07-121-1/+1
| | |
| | * year++Xinchen Hui2018-01-021-1/+1
| | |
| * | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Avoid multiple wcslen() callsAnatol Belski2018-02-181-5/+8
| | |
* | | Avoid multiple wcslen callsAnatol Belski2018-02-181-1/+2
| | |
* | | Reduce variable scopeAnatol Belski2018-02-151-2/+2
| | |
* | | Revert "Improve conversion loop"Anatol Belski2018-02-121-2/+3
| | | | | | | | | | | | | | | | | | This reverts commit 7a4573a55ad244b66c40b4086e432775b6f185b7. Don't read over '\0'.
* | | Improve conversion loopAnatol Belski2018-02-051-3/+2
| | |
* | | Trailing whitespaces on win32Gabriel Caruso2018-01-041-3/+3
| | | | | | | | | | | | Signed-off-by: Gabriel Caruso <carusogabriel34@gmail.com>
* | | year++Xinchen Hui2018-01-021-1/+1
| | |
* | | Drop unused codeAnatol Belski2017-12-151-17/+0
| | |
* | | Modernize realpath and integrate quick variant into virtual_file_exAnatol Belski2017-12-151-0/+55
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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.
* | | Merge branch 'PHP-7.2'Anatol Belski2017-12-141-1/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.2: Fixed bug #75679 Path 260 character problem
| * | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-12-141-1/+1
| |\ \ | | |/ | | | | | | | | | * PHP-7.1: Fixed bug #75679 Path 260 character problem
| | * Fixed bug #75679 Path 260 character problemAnatol Belski2017-12-141-1/+1
| | |
* | | Use cheaper ascii conversion for modeAnatol Belski2017-12-091-2/+15
| | |
* | | Revamp fopen implementation, rely on openAnatol Belski2017-12-091-16/+15
| | |
* | | CleanupAnatol Belski2017-12-091-9/+0
| | |
* | | Rework mkdir impl and expose wide char variantAnatol Belski2017-12-091-1/+26
| | |
* | | Move declarationsAnatol Belski2017-12-081-0/+14
| | |
* | | Improve ioutil access impl and refactor tsrm_win32_accessAnatol Belski2017-12-081-3/+4
| | |
* | | Revamp unlink() implementation and improve error handlingAnatol Belski2017-12-081-6/+5
| | |
* | | Allow delete-sharing mode for CreateFile by defaultAnatol Belski2017-12-081-0/+2
| | | | | | | | | | | | | | | | | | 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.
* | | Keep up with Linux extension to POSIX.1-2001 getcwd()Anatol Belski2017-11-281-7/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If both buf and size are zero, the buf is allocated as big as required. Otherwise, the size is still to respect. Fix var name Improve error check Ensure the end buffer length is not bigger than requested
* | | Sync with the POSIX signatureAnatol Belski2017-11-281-3/+3
|/ /
* | Merge branch 'PHP-7.1' into PHP-7.2Anatol Belski2017-11-271-6/+6
|\ \ | |/ | | | | | | * PHP-7.1: Fix normalized path length calculation and error handling
| * Fix normalized path length calculation and error handlingAnatol Belski2017-11-271-6/+6
| |
* | Merge branch 'PHP-7.1'Anatol Belski2017-07-141-2/+18
|\ \ | |/ | | | | | | * PHP-7.1: Fixed bug #74923 Crash when crawling through network share
| * Fixed bug #74923 Crash when crawling through network shareAnatol Belski2017-07-141-2/+18
| |
* | comply with POSIX signatureAnatol Belski2017-07-091-1/+1
| |
* | fix warningAnatol Belski2017-07-091-1/+1
| |
* | Merge branch 'PHP-7.1'Anatol Belski2017-05-171-6/+18
|\ \ | |/ | | | | | | * PHP-7.1: improve error handling