summaryrefslogtreecommitdiff
path: root/win32
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-12-171-3/+0
| | | | | | | | | | * PHP-7.3: Fixed bug #78910 Fix #78878: Buffer underflow in bc_shift_addsub Fix test Fix #78862: link() silently truncates after a null byte on Windows Fix #78863: DirectoryIterator class silently truncates after a null byte Fix #78943: mail() may release string with refcount==1 twice
* Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-12-022-2/+20
|\ | | | | | | | | * PHP-7.3: Fix #78296: is_file fails to detect file
| * Fix #78296: is_file fails to detect fileChristoph M. Becker2019-12-022-2/+20
| | | | | | | | | | | | | | | | | | | | | | | | 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.
* | Fix signature and callsAnatol Belski2019-08-271-1/+1
| |
* | Fix #78386: fstat mode has unexpected value on PHP 7.4Christoph M. Becker2019-08-201-1/+14
| | | | | | | | | | | | We must not assume that any file which is not a directory is a regular file. Therefore we employ `GetFileType()` in this case to properly distinguish between character special, FIFO special and regular files.
* | Fix WSChristoph M. Becker2019-08-121-2/+2
| |
* | Make extension compatibility check more liberalChristoph M. Becker2019-08-071-32/+13
| | | | | | | | | | | | | | Checking for the exact linker version appears to be too restrictive; it should be fine if the tens match. We also refactor to avoid repeating ourselves.
* | file encoding cleanup: remove bom in win32 filesSebastian Jennen2019-07-272-2/+2
| | | | | | | | | | | | | | | | These two files have been: "UTF-8 Unicode (with BOM) text". By applying `dos2unix` on these files the BOM has been removed. I checked the whole source code with dos2unix: These were the only two text files affected.
* | Use regedit to register event sourceChristoph M. Becker2019-07-183-30/+2
| | | | | | | | | | | | | | ext/win32std is unmaintained for years, so it is highly unlikely that it is available. We therefore use regedit instead to register the event source. We also remove the bundled syslog.reg, since it is of no use, unless generated for the respective installation.
* | Revert "Remove Windows syslog script and syslog.reg"Christoph M. Becker2019-07-173-0/+52
| | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit cc44bad1f6ded6a62c9bbe4d145b5b418aa775f4, since its assumptions were not correct. Actually, the classic event logging is still used by PHP, because Windows 7 is still to be supported for a while. Without the respective registry entries, the event log entries show an error message regarding missing ID descriptions. Thanks to ab@php.net for hinting at this! Obviously, the part depending on ext/win32std has still to be overhauled, and further improvements are conceivable; we will address this in due course.
* | Fix typoPeter Kokot2019-07-171-1/+1
| |
* | Remove unused build checksPeter Kokot2019-07-162-11/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | - yp_get_default_domain was part of ext/yp - functions checks produce HAVE_function_name symbols. These checks are currently not used in php-src neither in the extensions out there. - Removed symbols because they are not used in the code: - HAVE_GCVT - HAVE_PUTENV - HAVE_PUTENV - HAVE_SETVBUF - HAVE_TEMPNAM - HAVE_SIN (sin is also defined in C89 standard) - HAVE_SETSOCKOPT - HAVE_LOCKF - HAVE_ISASCII - HAVE_YP_GET_DEFAULT_DOMAIN (and other yp extension related unused checks) - HAVE_LINK - HAVE_USLEEP is already defined in Windows configuration header - HAVE_LIBBIND has not been used in php-src for a while anymore - HAVE_GETHOSTNAME is duplicated in Windows configuration header Closes GH-4417
* | Remove win32/php_stdbool.hPeter Kokot2019-07-151-11/+0
| | | | | | | | | | | | File usage was removed via 33fc7d77d7d0f7c85025b8aa82d62b154c4bc71f. Closes GH-4411
* | Remove unused filesPeter Kokot2019-07-157-581/+0
| | | | | | | | | | | | | | | | These were introduced in 504b9beae60a45e1b1e6466e97a6bd246dfc74f6 and their usages were removed via 4b3e19802385c5874eefd3ba4565f2efbc55dc96. Closes GH-4410
* | Remove Windows syslog script and syslog.regPeter Kokot2019-07-153-52/+0
| | | | | | | | | | | | | | | | | | These were used on old Windows systems before Vista and also were used together with unmaintained win32std extension. https://docs.microsoft.com/en-us/windows/win32/eventlog/event-logging Closes GH-4409
* | Remove some *.dsp/*.dsw leftoversPeter Kokot2019-07-151-6/+0
| | | | | | | | | | | | Usage of this was removed via 4b3e19802385c5874eefd3ba4565f2efbc55dc96 Closes GH-4408
* | Remove timelib outdated definesPeter Kokot2019-07-141-1/+0
| | | | | | | | | | | | | | | | | | - TIMELIB_OMIT_STDINT is not used anymore since https://github.com/derickr/timelib/commit/a171f99cf02baf39549ab7209e37565b8b8f6529 - HAVE_GETTIMEOFDAY was defined multiple times in Windows headers - ext/date/lib/timelib_config.h.win32 does not seem to be used Closes GH-4400
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-07-111-0/+4
|\ \ | |/ | | | | | | * PHP-7.3: Fix #78212: Segfault in built-in webserver
| * Fix #78212: Segfault in built-in webserverChristoph M. Becker2019-07-111-0/+4
| | | | | | | | | | | | | | | | Since syslog's ident and facility parameters have been added to config[1], vsyslog() segfaults on Windows, if openlog() has not been called before. We bring back the removed lines to fix this. [1] <http://git.php.net/?p=php-src.git;a=commit;h=2475337bd8a0fad0dac03db3f5e7e9d331d53653>
* | Remove C89 checks for signal.h and strerrorPeter Kokot2019-07-081-2/+0
| | | | | | | | | | | | | | | | These are part of the C89 and on today's systems not needed to be checked anymore. This removes symbols HAVE_SIGNAL and HAVE_STRERROR. - http://port70.net/~nsz/c/c89/c89-draft.html - locale.h is also part of C89 but will be removed per request in PHP 8
* | Implement FR #77230: Support custom CFLAGS and LDFLAGS from environmentChristoph M. Becker2019-07-081-0/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | While it is already possible to *set* CFLAGS and LDFLAGS (actually all variables) from the environment for `nmake` (by passing the `/E` option), it is not possible to *add* any (C|LD)FLAGS, which can be useful in some cases. Instead of allowing this for `nmake`, we add support for additional custom (C|LD)FLAGS to `configure`, similar to how that works on Linux, so one could actually write: ```` set CFLAGS=foo & set LDFLAGS=bar & configure ```` This also allows us to use these flags during configure.
* | Remove not needed checks for functionsPeter Kokot2019-07-011-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The following functions don't need to be checked anymore since the they are not used across the code or the symbols aren't used anymore: - cuserid (not used) - lrand48 (not used and removed via 6d6ef7aacc7f9b17709d2f93b70b359c75011f89) - random (check is not used) - srand48 (not used) - srandom (not used) - strdup (check is not used) and the unused check symbols: - HAVE_CUSERID - HAVE_LRAND48 - HAVE_RANDOM - HAVE_SRAND48 - HAVE_SRANDOM - HAVE_STRDUP Closes GH-4338
* | Remove HAVE_LIMITS_H checkPeter Kokot2019-06-301-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | The limits.h header is part of the C89 and is today available everywhere. There is no need to check for presence of this header anymore. The timelib has already been patched upstream via aae5907cb7e775f16bedf61b010b8692c12a2843 PHP extensions out there shouldn't rely on symbols defined during the build anyway and neither they do on this particular symbol anymore.
* | Remove HAVE_STRCOLL checkPeter Kokot2019-06-282-4/+0
| | | | | | | | | | | | | | | | | | The strcoll function is defined in the C89 standard and should be on today's systems always available via the <string.h> header. https://port70.net/~nsz/c/c89/c89-draft.html#4.11.4.3 - Remove also SKIPIF strcoll check in test
* | Set correct default versionAnatol Belski2019-06-151-2/+2
| |
* | Fix bug #78094: File Search Problem Excessive TimeChristoph M. Becker2019-06-061-2/+12
| | | | | | | | | | | | | | | | | | Instead of checking GetBinaryType() for each file, we do a much cheaper pre-check whether the filename extension matches .exe or .com, and call GetBinaryType() only in this case. For BC we also report .bat and .cmd files as executables again. The patch has been provided by @weltling.
* | Allow exceptions in __toString()Nikita Popov2019-06-051-2/+6
| | | | | | | | | | | | | | | | | | | | 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.
* | Fix ZTS issue regarding new Windows CTRL handling APIChristoph M. Becker2019-06-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | php_win32_signal_system_ctrl_handler() is called from a kernel thread, so the former initialization of `vm_interrupt_flag` has no effect, since it is defined as thread-local. This is, however, not necessary, since the CTRL signal handling is supposed to work only for the main thread anyway. We therefore change `vm_interrupt_flag` and the related variables to true globals. This also allows us to unmark the respective test case as XFAIL. Furthermore, `vm_interrupt_flag` is declared as `zend_bool *`, so we better treat it such.
* | Revert "Rename *.l files to *.re"Joe Watkins2019-05-201-6/+6
| | | | | | | | This reverts commit 969047749d33bb88a0573aa91a57e2070335111a.
* | Rename *.l files to *.rePeter Kokot2019-05-171-6/+6
| | | | | | | | | | This syncs PHP lexer files to all use *.re extension. The *.re files are processed with the RE2C tool.
* | Remove redundant memory.h filePeter Kokot2019-05-111-1/+0
| | | | | | | | | | The memory.h file is part of the pre-C89 era and is on today's systems only a simple wrapper for including the final string.h header file.
* | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2019-05-091-3/+7
|\ \ | |/ | | | | | | * PHP-7.3: Fix erroneous assertions
| * Merge branch 'PHP-7.2' into PHP-7.3Christoph M. Becker2019-05-091-4/+7
| |\ | | | | | | | | | | | | * PHP-7.2: Fix erroneous assertions
| | * Fix erroneous assertionsChristoph M. Becker2019-05-091-4/+7
| | | | | | | | | | | | | | | | | | | | | Since PHP strings are binary safe (i.e. they may contain NUL bytes), we must not assume that strlen()/wcslen() actually return the length of the string. Only if the given in_len is zero, it is safe to assert this.
* | | Merge branch 'PHP-7.3' into PHP-7.4Stanislav Malyshev2019-04-291-6/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-7.3: Fix #77821: Potential heap corruption in TSendMail()
| * | Merge branch 'PHP-7.2' into PHP-7.3Stanislav Malyshev2019-04-291-6/+7
| |\ \ | | |/ | | | | | | | | | * PHP-7.2: Fix #77821: Potential heap corruption in TSendMail()
| | * Merge branch 'PHP-7.1' into PHP-7.2Stanislav Malyshev2019-04-291-6/+7
| | |\ | | | | | | | | | | | | | | | | * PHP-7.1: Fix #77821: Potential heap corruption in TSendMail()
| | | * Fix #77821: Potential heap corruption in TSendMail()Christoph M. Becker2019-04-291-6/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | `zend_string_tolower()` returns a copy (not a duplicate) of the given string, if it is already in lower case. In this case we must not not `zend_string_free()` both strings. The cleanest solution is to call ` zend_string_release()` on both strings, which properly handles the refcount.
| | | * Sync leading and final newlines in source code filesPeter Kokot2018-10-1417-18/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds missing newlines, trims multiple redundant final newlines into a single one, and trims redundant leading newlines. According to POSIX, a line is a sequence of zero or more non-' <newline>' characters plus a terminating '<newline>' character. [1] Files should normally have at least one final newline character. C89 [2] and later standards [3] mention a final newline: "A source file that is not empty shall end in a new-line character, which shall not be immediately preceded by a backslash character." Although it is not mandatory for all files to have a final newline fixed, a more consistent and homogeneous approach brings less of commit differences issues and a better development experience in certain text editors and IDEs. [1] http://pubs.opengroup.org/onlinepubs/9699919799/basedefs/V1_chap03.html#tag_03_206 [2] https://port70.net/~nsz/c/c89/c89-draft.html#2.1.1.2 [3] https://port70.net/~nsz/c/c99/n1256.html#5.1.1.2
| | | * Trim trailing whitespace in source code filesPeter Kokot2018-10-1319-122/+122
| | | |
| | | * Convert CRLF line endings to LFPeter Kokot2018-10-132-265/+265
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch simplifies line endings tracked in the Git repository and syncs them to all include the LF style instead of the CRLF files. Newline characters: - LF (\n) (*nix and Mac) - CRLF (\r\n) (Windows) - CR (\r) (old Mac, obsolete) To see which line endings are in the index and in the working copy the following command can be used: `git ls-files --eol` Git additionally provides `.gitattributes` file to specify if some files need to have specific line endings on all platforms (either CRLF or LF). Changed files shouldn't cause issues on modern Windows platforms because also Git can do output conversion is core.autocrlf=true is set on Windows and use CRLF newlines in all files in the working tree. Unless CRLF files are tracked specifically, Git by default tracks all files in the index using LF newlines.
| | * | Fix potential OPcache file cache related issuesAnatol Belski2019-04-111-10/+36
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To solve issues detected during testing, we backport the following commits to PHP 7.2: 129c5c1181bf344b37e13fd6dc5dfe76c13d7208 9ac133a0b3863ca4d9659140154ee237e5f4669a ce72bc6b658c335dd37393d0beb28584e6805e97
* | | | Merge branch 'pull-request/4046' into PHP-7.4Peter Kokot2019-04-231-1/+0
|\ \ \ \ | | | | | | | | | | | | | | | | | | | | * pull-request/4046: Remove php.gif from the project root directory
| * | | | Remove php.gif from the project root directoryPeter Kokot2019-04-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | The PHP logo is also displayed in the main README.md file using a shiny SVG format so there is no need to use GIF format.
* | | | | Fix parameter orderChristoph M. Becker2019-04-221-1/+1
|/ / / / | | | | | | | | | | | | | | | | | | | | | | | | The parameter order of `php_sys_link()` should be identical on Windows and POSIX, bug commit c9861bd[1] got that wrong. [1] <http://git.php.net/?p=php-src.git;a=commit;h=c9861bd7a974ef1555395b879c1035a0bbc12ef1>
* | | | Remove PHP_READDIR_R_TYPEPeter Kokot2019-04-131-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The PHP_READDIR_R_TYPE m4 macro has been removed via 2b28f7189144a21e753dbc09efadd571121a82b9. HAVE_POSIX_READDIR_R in windows header file is also not needed anymore.
* | | | Use readdir() instead of readdir_r()Nikita Popov2019-04-112-43/+0
| | | | | | | | | | | | | | | | | | | | | | | | readdir_r() is deprecated in modern glibc versions. readdir() is thread safe in practice, as long as there are no concurrent accesses on the *same* directory stream.
* | | | Merge branch 'PHP-7.3' into PHP-7.4Anatol Belski2019-04-101-10/+32
|\ \ \ \ | |/ / / | | | | | | | | | | | | * PHP-7.3: Ensure double slashes are replaced by the path normalization
| * | | Ensure double slashes are replaced by the path normalizationAnatol Belski2019-04-101-10/+32
| | | |
* | | | Remove checks for locale.h, setlocale, localeconvPeter Kokot2019-04-071-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The `<loccale.h>` header file, setlocale, and localeconv are part of the standard C89 [1] and on current systems can be used unconditionally. Since PHP 7.4 requires at least C89 or greater, the `HAVE_LOCALE_H`, `HAVE_SETLOCALE`, and `HAVE_LOCALECONV` symbols defined by Autoconf in configure.ac [2] can be ommitted and simplifed. The bundled libmagic (file) has also been patched already in version 5.35 and up in upstream location so when it will be patched also in php-src the check for locale.h header is still left in the configure.ac and in windows headers definition file. [1] https://port70.net/~nsz/c/c89/c89-draft.html#4.4 [2] https://git.savannah.gnu.org/cgit/autoconf.git/tree/lib/autoconf/headers.m4 Omit the bundled libmagic files