[skip ci] Drop ZIP_STATIC hack

Old versions of libzip didn't export the `ZIP_STATIC` macro, even if
they had been built as static libraries.  This hack in config.w32 is
supposed to counteract that, since the macro is used in zip.h.
However, PHP has no business in defining macros belonging to external
libraries; instead the winlibs builds should have been fixed to set
this macro in zip.h.  Furthermore, as of libzip there is zipconf.h,
where this macro is defined as appropriate, if libzip was build with
the proper configuration options.  Unfortunately, that has not been
done so far, but assuming that new properly configured builds of libzip
will be rolled out, we need to drop this hack to avoid conflicting
macro definitions, since we define the macro to 1, but libzip only
defines it (without further hackery).
This commit is contained in:
Christoph M. Becker 2024-09-20 12:56:05 +02:00
parent 7e6e71255e
commit 78f632d6ba
No known key found for this signature in database
GPG Key ID: D66C9593118BCCB6

View File

@ -10,12 +10,6 @@ if (PHP_ZIP != "no") {
) {
EXTENSION('zip', 'php_zip.c zip_stream.c');
ADD_EXTENSION_DEP('zip', 'pcre');
if (get_define("LIBS_ZIP").match("libzip_a(?:_debug)?\.lib")) {
/* Using static dependency lib. */
AC_DEFINE("ZIP_STATIC", 1);
}
AC_DEFINE('HAVE_ZIP', 1, "Define to 1 if the PHP extension 'zip' is available.");
ADD_FLAG("CFLAGS_ZIP", "/D HAVE_SET_MTIME /D HAVE_ENCRYPTION /D HAVE_LIBZIP_VERSION /D HAVE_PROGRESS_CALLBACK /D HAVE_CANCEL_CALLBACK /D HAVE_METHOD_SUPPORTED /D LZMA_API_STATIC");
} else {