Skip to content

Commit d66c502

Browse files
petkremicollet
authored andcommitted
Add missing pcre dependency definition to zip extension
The zip extension also requires the pcre extension.
1 parent d8814bb commit d66c502

File tree

8 files changed

+44
-6
lines changed

8 files changed

+44
-6
lines changed

config.m4

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -142,6 +142,7 @@ if test "$PHP_ZIP" != "no"; then
142142

143143
AC_DEFINE(HAVE_ZIP,1,[ ])
144144
PHP_NEW_EXTENSION(zip, $PHP_ZIP_SOURCES, $ext_shared,, $LIBZIP_CFLAGS)
145+
PHP_ADD_EXTENSION_DEP(zip, pcre)
145146
else
146147
AC_MSG_ERROR([libzip is no more bundled: install libzip version >= 0.11 (1.3.0 recommended for encryption and bzip2 support)])
147148
fi

config.w32

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,7 @@ if (PHP_ZIP != "no") {
4141
}
4242

4343
EXTENSION('zip', 'php_zip.c zip_stream.c');
44+
ADD_EXTENSION_DEP('zip', 'pcre');
4445
configure_module_dirname = old_conf_dir;
4546

4647
AC_DEFINE('HAVE_ZIP', 1);

php5/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1338,10 +1338,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
13381338
static PHP_MINFO_FUNCTION(zip);
13391339
/* }}} */
13401340

1341+
static const zend_module_dep zip_deps[] = {
1342+
ZEND_MOD_REQUIRED("pcre")
1343+
ZEND_MOD_END
1344+
};
1345+
13411346
/* {{{ zip_module_entry
13421347
*/
13431348
zend_module_entry zip_module_entry = {
1344-
STANDARD_MODULE_HEADER,
1349+
STANDARD_MODULE_HEADER_EX, NULL,
1350+
zip_deps,
13451351
"zip",
13461352
zip_functions,
13471353
PHP_MINIT(zip),

php7/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1226,10 +1226,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
12261226
static PHP_MINFO_FUNCTION(zip);
12271227
/* }}} */
12281228

1229+
static const zend_module_dep zip_deps[] = {
1230+
ZEND_MOD_REQUIRED("pcre")
1231+
ZEND_MOD_END
1232+
};
1233+
12291234
/* {{{ zip_module_entry
12301235
*/
12311236
zend_module_entry zip_module_entry = {
1232-
STANDARD_MODULE_HEADER,
1237+
STANDARD_MODULE_HEADER_EX, NULL,
1238+
zip_deps,
12331239
"zip",
12341240
zip_functions,
12351241
PHP_MINIT(zip),

php73/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1229,10 +1229,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
12291229
static PHP_MINFO_FUNCTION(zip);
12301230
/* }}} */
12311231

1232+
static const zend_module_dep zip_deps[] = {
1233+
ZEND_MOD_REQUIRED("pcre")
1234+
ZEND_MOD_END
1235+
};
1236+
12321237
/* {{{ zip_module_entry
12331238
*/
12341239
zend_module_entry zip_module_entry = {
1235-
STANDARD_MODULE_HEADER,
1240+
STANDARD_MODULE_HEADER_EX, NULL,
1241+
zip_deps,
12361242
"zip",
12371243
zip_functions,
12381244
PHP_MINIT(zip),

php74/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1241,10 +1241,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
12411241
static PHP_MINFO_FUNCTION(zip);
12421242
/* }}} */
12431243

1244+
static const zend_module_dep zip_deps[] = {
1245+
ZEND_MOD_REQUIRED("pcre")
1246+
ZEND_MOD_END
1247+
};
1248+
12441249
/* {{{ zip_module_entry
12451250
*/
12461251
zend_module_entry zip_module_entry = {
1247-
STANDARD_MODULE_HEADER,
1252+
STANDARD_MODULE_HEADER_EX, NULL,
1253+
zip_deps,
12481254
"zip",
12491255
zip_functions,
12501256
PHP_MINIT(zip),

php8/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1141,10 +1141,16 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
11411141
static PHP_MINFO_FUNCTION(zip);
11421142
/* }}} */
11431143

1144+
static const zend_module_dep zip_deps[] = {
1145+
ZEND_MOD_REQUIRED("pcre")
1146+
ZEND_MOD_END
1147+
};
1148+
11441149
/* {{{ zip_module_entry */
11451150
zend_module_entry zip_module_entry = {
1146-
STANDARD_MODULE_HEADER,
1151+
STANDARD_MODULE_HEADER_EX, NULL,
11471152
"zip",
1153+
zip_deps,
11481154
ext_functions,
11491155
PHP_MINIT(zip),
11501156
PHP_MSHUTDOWN(zip),

php81/php_zip.c

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1156,9 +1156,15 @@ static PHP_MSHUTDOWN_FUNCTION(zip);
11561156
static PHP_MINFO_FUNCTION(zip);
11571157
/* }}} */
11581158

1159+
static const zend_module_dep zip_deps[] = {
1160+
ZEND_MOD_REQUIRED("pcre")
1161+
ZEND_MOD_END
1162+
};
1163+
11591164
/* {{{ zip_module_entry */
11601165
zend_module_entry zip_module_entry = {
1161-
STANDARD_MODULE_HEADER,
1166+
STANDARD_MODULE_HEADER_EX, NULL,
1167+
zip_deps,
11621168
"zip",
11631169
ext_functions,
11641170
PHP_MINIT(zip),

0 commit comments

Comments
 (0)