Skip to content

Commit 155b20a

Browse files
committed
Update static_extensions_win32 and win32 patches for PHP 8.5 alpha1
1 parent 92cff66 commit 155b20a

2 files changed

Lines changed: 56 additions & 0 deletions

File tree

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
diff --git a/ext/fileinfo/config.w32 b/ext/fileinfo/config.w32
2+
index 2a42dc45..c207694f 100644
3+
--- a/ext/fileinfo/config.w32
4+
+++ b/ext/fileinfo/config.w32
5+
@@ -10,7 +10,7 @@ if (PHP_FILEINFO != 'no') {
6+
readcdf.c softmagic.c der.c \
7+
strcasestr.c buffer.c is_csv.c";
8+
9+
- EXTENSION('fileinfo', 'fileinfo.c php_libmagic.c', true, "/I" + configure_module_dirname + "/libmagic /I" + configure_module_dirname);
10+
+ EXTENSION('fileinfo', 'fileinfo.c php_libmagic.c', PHP_FILEINFO_SHARED, "/I" + configure_module_dirname + "/libmagic /I" + configure_module_dirname);
11+
ADD_EXTENSION_DEP('fileinfo', 'pcre');
12+
ADD_SOURCES(configure_module_dirname + '\\libmagic', LIBMAGIC_SOURCES, "fileinfo");
13+
}
14+
diff --git a/ext/openssl/config.w32 b/ext/openssl/config.w32
15+
index 714f93a0..0ab6efff 100644
16+
--- a/ext/openssl/config.w32
17+
+++ b/ext/openssl/config.w32
18+
@@ -1,6 +1,6 @@
19+
// vim:ft=javascript
20+
21+
-ARG_WITH("openssl", "OpenSSL support", "no,shared");
22+
+ARG_WITH("openssl", "OpenSSL support", "no");
23+
24+
ARG_WITH("openssl-legacy-provider", "OPENSSL: Load legacy algorithm provider in addition to default provider", "no");
25+
26+
@@ -10,7 +10,7 @@ if (PHP_OPENSSL != "no") {
27+
var ret = SETUP_OPENSSL("openssl", PHP_OPENSSL);
28+
29+
if (ret >= 2) {
30+
- EXTENSION("openssl", "openssl.c openssl_pwhash.c openssl_backend_common.c openssl_backend_v1.c openssl_backend_v3.c xp_ssl.c");
31+
+ EXTENSION("openssl", "openssl.c openssl_pwhash.c openssl_backend_common.c openssl_backend_v1.c openssl_backend_v3.c xp_ssl.c", PHP_OPENSSL_SHARED, "/DZEND_ENABLE_STATIC_TSRMLS_CACHE=1");
32+
AC_DEFINE("HAVE_OPENSSL_EXT", 1, "Define to 1 if the PHP extension 'openssl' is available.");
33+
if (PHP_OPENSSL_LEGACY_PROVIDER != "no") {
34+
AC_DEFINE("LOAD_OPENSSL_LEGACY_PROVIDER", 1, "Define to 1 to load the OpenSSL legacy algorithm provider in addition to the default provider.");

patches/win32_85.patch

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
diff --git a/win32/build/confutils.js b/win32/build/confutils.js
2+
index 0f97a1a2..4797967d 100644
3+
--- a/win32/build/confutils.js
4+
+++ b/win32/build/confutils.js
5+
@@ -3450,7 +3450,7 @@ function toolset_setup_common_libs()
6+
function toolset_setup_build_mode()
7+
{
8+
if (PHP_DEBUG == "yes") {
9+
- ADD_FLAG("CFLAGS", "/MDd /Od /U NDebug /U NDEBUG /D ZEND_DEBUG=1 " +
10+
+ ADD_FLAG("CFLAGS", "/MTd /Od /U NDebug /U NDEBUG /D ZEND_DEBUG=1 " +
11+
(TARGET_ARCH == 'x86'?"/ZI":"/Zi"));
12+
ADD_FLAG("LDFLAGS", "/debug");
13+
// Avoid problems when linking to release libraries that use the release
14+
@@ -3462,7 +3462,7 @@ function toolset_setup_build_mode()
15+
ADD_FLAG("CFLAGS", "/Zi");
16+
ADD_FLAG("LDFLAGS", "/incremental:no /debug /opt:ref,icf");
17+
}
18+
- ADD_FLAG("CFLAGS", "/MD");
19+
+ ADD_FLAG("CFLAGS", "/MT");
20+
if (PHP_SANITIZER == "yes") {
21+
if (VS_TOOLSET) {
22+
ADD_FLAG("CFLAGS", "/Ox /U NDebug /U NDEBUG /D ZEND_DEBUG=1");

0 commit comments

Comments
 (0)