summaryrefslogtreecommitdiff
path: root/win32
Commit message (Collapse)AuthorAgeFilesLines
* Control VCRT leak reporting via environment variable in debug buildsChristoph M. Becker2020-06-101-1/+1
| | | | | | | | Formerly, this had to be enabled by passing the configuration flag `--enable-crt-debug`; now it can be enabled by setting the environment variable `PHP_WIN32_DEBUG_HEAP`. The advantage is that it is no longer necessary to do separate builds, at the cost of a very minor performance penalty during process startup.
* Constify char * arguments of APIstwosee2020-06-082-15/+16
| | | | Closes GH-5676.
* Drop hard-coded /W3 default in favor of custom CFLAGSChristoph M. Becker2020-06-051-3/+3
| | | | | | | | | | | Building with `/W3` shows an awful lot of warnings on Windows, so it's really hard to spot the more important ones. Since it is not possible to override the hard-coded `/W3`, we drop it altogether, so MSVC uses the default `/W1`. Users are encouraged to increase the warning level via the environment variable `CFLAGS` before doing configure. We also enable `/WX` (treat warnings as errors) for AppVeyor CI, using `/W1` for now, since otherwise the build would fail.
* Fix MSVC level 1 (severe) warningsChristoph M. Becker2020-06-051-1/+1
| | | | | | | | | | | | | | | | | | | | | | | We fix (hopefully) all instances of: * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4024> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4028> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4047> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4087> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4090> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4273> * <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4312> `zend_llist_add_element()` and `zend_llist_prepend_element()` now explicitly expect a *const* pointer. We use the macro `ZEND_VOIDP()` instead of a `(void*)` cast to suppress C4090; this should prevent accidential removal of the cast by clarifying the intention, and makes it easier to remove the casts if the issue[1] will be resolved sometime. [1] <https://developercommunity.visualstudio.com/content/problem/390711/c-compiler-incorrect-propagation-of-const-qualifie.html>
* Add AttributesBenjamin Eberlei2020-06-041-1/+1
| | | | Co-authored-by: Martin Schröder <m.schroeder2007@gmail.com>
* Merge branch 'PHP-7.4'Christoph M. Becker2020-05-281-0/+1
|\ | | | | | | | | * PHP-7.4: Fix PVS-Studio integration
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-05-281-0/+1
| |\ | | | | | | | | | | | | * PHP-7.3: Fix PVS-Studio integration
| | * Fix PVS-Studio integrationChristoph M. Becker2020-05-281-0/+1
| | | | | | | | | | | | | | | Without this configuration option, PVS-Studio looks for preprocessed files (*.i), but these do not exists.
* | | Fix --disable-ipv6 support on WindowsChristoph M. Becker2020-05-201-2/+2
| | | | | | | | | | | | | | | `HAVE_IPV6` and `HAVE_GAI_STRERROR` are supposed to be undefined now, if not supported.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-05-151-1/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79557: extension_dir = ./ext now use current directory for base
| * | Fix #79557: extension_dir = ./ext now use current directory for baseChristoph M. Becker2020-05-151-1/+7
| | | | | | | | | | | | | | | | | | For some reason, `ImageLoad()` fails to load images with a relative path starting with `.\` or `./`. We work around this issue by stripping those leading characters.
* | | Remove unused variableChristoph M. Becker2020-05-141-1/+0
| | |
* | | Use ZPP int|string and add ValueError for Windows codepagesGeorge Peter Banyard2020-05-041-41/+39
| | | | | | | | | | | | Closes GH-5517
* | | Use libenchant2 if available on WindowsChristoph M. Becker2020-05-041-2/+6
| | | | | | | | | | | | | | | | | | This is basically the same as commit 3427545[1], but for Windows. [1] <http://git.php.net/?p=php-src.git;a=commitdiff;h=342754575237da912874f781a24eefe76434ce5a>
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-04-291-0/+1
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79532: sizeof off_t can be wrong
| * | Fix #79532: sizeof off_t can be wrongChristoph M. Becker2020-04-291-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | We have to actually determine the proper `SIZEOF_OFF_T`. Interestingly, it is `4` on Windows x64. We also have to prevent the redefinition in pg_config.h. The clean solution would likely be to not include pg_config.h at all, but that's out of scope for BC reasons for now.
* | | Add gen_stub.php to devel packChristoph M. Becker2020-04-261-0/+1
| | |
* | | Fix #36365: scandir duplicates file name at every 65535th fileChristoph M. Becker2020-04-241-1/+1
| | | | | | | | | | | | | | | | | | Since DIR_W32.offset is declared as `uint16_t`, we have an overflow for directories with many entries. This patch changes the field to `uint32_t`.
* | | Drop unnecessary stdint and inttypes header checksGeorge Peter Banyard2020-04-222-578/+0
| | | | | | | | | | | | | | | | | | | | | | | | These are always available as of C99. Closes GH-5323 Co-authored-by: "Christoph M. Becker" <cmbecker69@gmx.de>
* | | Improve a last couple of argument error messagesMáté Kocsis2020-04-201-6/+4
| | | | | | | | | | | | Closes GH-5404
* | | Drop wchar header check as always defined since C95George Peter Banyard2020-03-311-4/+0
| | |
* | | 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.
* | | Remove mergesort implementationNikita Popov2020-02-271-1/+1
| | | | | | | | | | | | | | | | | | php_mergesort() isn't being used for anything, and hasn't been for a long time. Even if we wanted to use a stable sort, this isn't the implementation we'd use...
* | | Merge branch 'PHP-7.4'Nikita Popov2020-02-033-404/+404
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Apply tidy formatting
| * | Apply tidy formattingNikita Popov2020-02-034-405/+405
| | | | | | | | | | | | Mostly reindent PHP scripts to spaces.
* | | Clean up the generation of the parsersAkim Demaille2020-02-011-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Prefer '%define api.value.type' to '#define YYSTYPE', so that Bison know the type. Use '%code requires' to declare what is needed to define the api.value.type (that code is output in the generated header before the generated definition of YYSTYPE). Prefer '%define api.prefix' inside the grammar file to '-p' outside, as anyway the functions defined in the file actually use this prefix. Prefer `%param` to both `%parse-param` and `%lex-param`. Closes GH-5138
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-232-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Enable UBSan in addition to ASan
| * | Enable UBSan in addition to ASanChristoph M. Becker2020-01-232-2/+2
| | | | | | | | | | | | | | | UBSan is a useful tool, so we enable it for `--enable-sanitizer` in addition to ASan.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-215-5/+5
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79146: cscript can fail to run on some systems
| * | Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-01-215-5/+5
| |\ \ | | |/ | | | | | | | | | * PHP-7.3: Fix #79146: cscript can fail to run on some systems
| | * Fix #79146: cscript can fail to run on some systemsDeus Kane2020-01-215-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the buildconf and configure batch files, Windows' cscript utility was being run without the /e:jscript flag. This works on systems that have not had the default .js file association changed, but if .js has been re-associated to (say) an IDE, the batch files fail with the error message: Input Error: There is no script engine for file extension ".js".
* | | Fix #78880: Final spelling fixesMáté Kocsis2020-01-162-2/+2
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-01-161-2/+7
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Disable optimizations for ASan instrumented builds
| * | Disable optimizations for ASan instrumented buildsChristoph M. Becker2020-01-161-2/+7
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | ASan instrumentation does not support the MSVC debug runtime, but still it does not make sense to enable optimizations for such builds, since they are not meant for production usage anyway, and although memory corruption issues are still found in optimized builds, the generated diagnostics are close to being useless, and apparently sometimes even outright wrong. Therefore, we disable all optimizations for ASan instrumented builds. We also introduce and use `ZEND_WIN32_NEVER_INLINE` for ASan enabled builds to avoid inlining of functions, so we get even better diagnostics.
* | | Fix #78880: Yet another batch of spelling errorsMáté Kocsis2020-01-164-9/+9
| | |
* | | Fix #78880: Another bunch of spelling errorsMáté Kocsis2020-01-161-1/+1
| | |
* | | Use proper printf() specifiersChristoph M. Becker2020-01-151-1/+1
| | |
* | | Rename run-test.php to run-tests.php in the test packsChristoph M. Becker2020-01-141-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | In the php-src repository, the test runner is named run-tests.php, but when it is copied to the tests packs, it is renamed to run-test.php. This renaming does not make sense, and is actually somewhat confusing. Although changing the name back to run-tests.php constitutes a BC break, we think the benefit of having a single name outweights the disadvantages in the long run.
* | | Replace fakemail with minimal PHP scriptChristoph M. Becker2020-01-093-45/+1
| | |
* | | Unify mail related tests for *nix and WindowsChristoph M. Becker2020-01-093-1/+45
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Currently mail related tests are split for *nix and Windows (if there are even Windows versions). The basic difference is that the *nix variants set the INI directive sendmail_path to just write the email to disk, while the Windows tests use ext/imap. The latter tests are way more verbose, and such duplicated tests are generally a pain point. Furthermore, the Windows tests are much slower, and could not be run without ext/imap being available. We therefore introduce a small fakemail application, which basically works like `tee <path> >/dev/null`, and which will be shipped with the Windows tests packs. fakemail.exe would also need to be added to the PHP binary SDK, so these tests could be run during developments. To cater to the remaining differences, we also introduce support for `{MAIL:<path>}` placeholders in the INI sections to run-tests.php. How to use this can be seen in mail_basic.phpt, which is currently the only modified test case, because these tests are yet supposed to fail on Windows, due to the missing fakemail.exe in the PHP SDK.
* | | Don't enable sanitizer by default for Windows snapshot buildsChristoph M. Becker2020-01-031-1/+2
| | | | | | | | | | | | | | | Snapshot builds are release builds, and therefore enabling sanitizers is undesireable.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-311-1/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Remove superfluous compiler option
| * | Remove superfluous compiler optionChristoph M. Becker2019-12-311-1/+0
| | | | | | | | | | | | | | | `-fsanitize-address-use-after-scope` is the default as of clang 5.0.0, and we don't allow to enable ASan for older versions anyway.
* | | Fix typoChristoph M. Becker2019-12-301-2/+2
| | |
* | | Use RETURN_THROWS() during ZPP in main, sapi, win32, and ZendMáté Kocsis2019-12-302-7/+7
| | |
* | | Merge branch 'PHP-7.4'Christoph M. Becker2019-12-201-10/+0
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Fix #79008: General performance regression with PHP 7.4 on Windows
| * | Fix #79008: General performance regression with PHP 7.4 on WindowsChristoph M. Becker2019-12-201-10/+0
| | | | | | | | | | | | | | | | | | We no longer try to retrieve the filename of a given stream when fstat'ing, because this is very slow. Since we neither didn't do that in PHP 7.3 and earlier, we regard this as sensible trade-off.
* | | Merge branch 'PHP-7.4'Stanislav Malyshev2019-12-161-3/+0
|\ \ \ | |/ / | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * PHP-7.4: Fix test Fix bug #78793 Fix build - no model field anymore 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.4Stanislav Malyshev2019-12-161-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
| | * Fix #78943: mail() may release string with refcount==1 twiceChristoph M. Becker2019-12-151-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | Since we need `headers_lc` as well as `headers_trim` in the following, we do not release the former even if they are the same string, to avoid complicating the release logic even more. A new test case is not necessary, since we already have mail_basic_alt2-win32.phpt and others.