summaryrefslogtreecommitdiff
path: root/win32
Commit message (Collapse)AuthorAgeFilesLines
* Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-191-0/+25
|\ | | | | | | | | * PHP-7.4: Fix #72964: White space not unfolded for CC/Bcc headers
| * Fix #72964: White space not unfolded for CC/Bcc headersChristoph M. Becker2020-11-191-0/+25
| | | | | | | | | | | | | | | | `\r\n` does only terminate a header, if not followed by `\t` or ` `. We have to cater to that when determining the end position of the respective headers. Closes GH-6420.
* | Merge branch 'PHP-7.4' into PHP-8.0Christoph M. Becker2020-11-192-6/+16
|\ \ | |/ | | | | | | * PHP-7.4: Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSION
| * Fix #80345: PHPIZE configuration has outdated PHP_RELEASE_VERSIONChristoph M. Becker2020-11-192-6/+16
| | | | | | | | | | | | | | | | | | | | | | We must not redefine the version "constants" for phpize builds, because these have already generated in phpize.js, from where we pass these variables forward to configure.js. We also add `PHP_EXTRA_VERSION` and `PHP_VERSION_STRING` to the files for completeness. Closes GH-6419.
* | Strip trailing line breaks and periods from Windows error messagesChristoph M. Becker2020-11-121-1/+5
| | | | | | | | | | | | | | | | PHP error messages should not contain line breaks, so we remove these from the Windows specific error messages. We also remove trailing periods for the same reason. Closes GH-6423.
* | Tweak some macro definition on WindowsGeorge Peter Banyard2020-09-223-28/+2
| | | | | | | | Closes GH-5606
* | Check linker compatibility directly from HMODULEChristoph M. Becker2020-09-213-31/+33
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Checking the linker compatibility with extranous `ImageLoad()` calls is possible, but unnecessary, since the modules are either already loaded or loaded shortly afterwards, so that we can get the required information directly from the module handles. And actually, doing `ImageLoad()` as well as `LoadLibrary()` leaves a tiny room for a race condition, because both functions will lookup the module in the search path, so there is no *guarantee* that both are dealing with the same module. Dropping the `ImageLoad()` calls also has the advantage to no longer face the issue reported in bug #79557. A very minor additional advantage is that we no longer have to link against Imagehlp.dll. Furthermore, there is no need to check for CRT compatibility multiple times, so we can simplify the signature of `php_win32_crt_compatible`, and at the same time clean up main.c a bit. These changes require to change the signature of the exported `php_win32_image_compatible` and `php_win32_crt_compatible` functions, which now expect a `HMODULE` and nothing, respectively, instead of the module name.
* | Add system ID entropy APISammy Kaye Powers2020-09-181-1/+1
| | | | | | | | | | | | The `zend_system_id` is a (true global) system ID that fingerprints a process state. When extensions add engine hooks during MINIT/startup, entropy is added the system ID for each hook. This allows extensions to identify that changes have been made to the engine since the last PHP process restart. Closes GH-5871
* | Add zend_observer APILevi Morrison2020-09-011-1/+1
| | | | | | | | | | | | | | Closes GH-5857. Co-authored-by: Nikita Popov <nikita.ppv@gmail.com> Co-authored-by: Sammy Powers <sammyk@datadoghq.com>
* | Drop various unused macros/APIsGeorge Peter Banyard2020-08-261-2/+2
| | | | | | | | | | | | Also convert_libmagic_pattern() to return a zend_string* Closes GH-6029
* | Use ZPP callable check for Windows specific functionsGeorge Peter Banyard2020-08-131-11/+8
| |
* | Fix signature of callback functionChristoph M. Becker2020-08-101-2/+2
| | | | | | | | Cf. <https://docs.microsoft.com/en-us/windows/win32/api/imagehlp/nc-imagehlp-pimagehlp_status_routine>.
* | Merge branch 'PHP-7.4'Christoph M. Becker2020-07-231-1/+1
|\ \ | |/ | | | | | | * PHP-7.4: Fix #79884: PHP_CONFIG_FILE_PATH is meaningless
| * Merge branch 'PHP-7.3' into PHP-7.4Christoph M. Becker2020-07-231-1/+1
| |\ | | | | | | | | | | | | * PHP-7.3: Fix #79884: PHP_CONFIG_FILE_PATH is meaningless
| | * Fix #79884: PHP_CONFIG_FILE_PATH is meaninglessChristoph M. Becker2020-07-231-1/+1
| | | | | | | | | | | | | | | | | | | | | It does not make sense to make assumptions about `PHP_CONFIG_FILE_PATH` during build time, since that value is never used during run time on Windows. Since there is no `--with-config-file-path` on Windows either, we define `PHP_CONFIG_FILE_PATH` as `""`.
| | * Don't use deprecated curly brace offset syntaxChristoph M. Becker2020-07-071-2/+2
| | | | | | | | | | | | | | | | | | | | | (cherry picked from commit 7ec3aa1871074f5de25865af42c984a7668eb85f) Better safe than sorry in case someone ever builds PHP 7.3 with a future version of PHP SDK with bundled PHP 8.
* | | Fix warnings of strict-prototypestwosee2020-07-231-1/+1
| | | | | | | | | | | | Closes GH-5887.
* | | 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
| | |
* | | Support socketpairs in proc_open()Martin Schröder2020-07-142-12/+22
| | | | | | | | | | | | Closes GH-5777.
* | | Export php_gd_libgdimageptr_from_zval_p()Christoph M. Becker2020-07-111-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Some extension may need to retrieve the `gdImagePtr` from an `GdImage` object; thus, we export the respective function. To not being forced to include gd.h in php_gd.h, we use the opaque `struct gdImageStruct *` as return type. We also rename php_gd2.dll to php_gd.dll, since there's not really much point in giving the DLL a version number, since there is no php_gd.dll for years (if there ever has been). Renaming, on the other hand, matches the name on other systems (gd.so), and allows to actually use `ADD_EXTENSION_DEP()`.
* | | Merge branch 'PHP-7.4'Christoph M. Becker2020-07-071-2/+2
|\ \ \ | |/ / | | | | | | | | | * PHP-7.4: Don't use deprecated curly brace offset syntax
| * | Don't use deprecated curly brace offset syntaxChristoph M. Becker2020-07-071-2/+2
| | |
* | | Remove proto comments from C filesMax Semenik2020-07-062-10/+5
| | | | | | | | | | | | Closes GH-5758
* | | define build system and provider on WindowsChristoph M. Becker2020-07-061-0/+11
| | |
* | | Fix macro redifinition warnings in debug buildsChristoph M. Becker2020-06-291-1/+2
| | | | | | | | | | | | | | | | | | | | | MSVC considers these warnings[1] to be severe (level 1), so we better fix the respective code. [1] <https://docs.microsoft.com/en-us/cpp/error-messages/compiler-warnings/compiler-warning-level-1-c4005?view=vs-2019>
* | | 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