]> granicus.if.org Git - php/commitdiff
display headers (buildtime) and library (runtime) versions in phpinfo (libzip >=...
authorRemi Collet <remi@php.net>
Tue, 19 Dec 2017 13:46:32 +0000 (14:46 +0100)
committerRemi Collet <remi@php.net>
Tue, 19 Dec 2017 13:46:32 +0000 (14:46 +0100)
ext/zip/config.m4
ext/zip/php_zip.c
ext/zip/php_zip.h

index 7ae43250c01ef7c9bf6f91dc0254d7965c849b52..dc34cbf694d3e57639dc2b9ff0f728df9d5a1e3d 100644 (file)
@@ -109,6 +109,14 @@ if test "$PHP_ZIP" != "no"; then
       -L$LIBZIP_LIBDIR
     ])
 
+    PHP_CHECK_LIBRARY(zip, zip_libzip_version,
+    [
+      AC_DEFINE(HAVE_LIBZIP_VERSION, 1, [Libzip >= 1.3.1 with zip_libzip_version function])
+    ], [
+    ], [
+      -L$LIBZIP_LIBDIR
+    ])
+
     AC_DEFINE(HAVE_ZIP,1,[ ])
     PHP_NEW_EXTENSION(zip, php_zip.c zip_stream.c, $ext_shared,, $LIBZIP_CFLAGS)
     PHP_SUBST(ZIP_SHARED_LIBADD)
index 92a5c036b4151eec4d98e173536dd4459ed393d3..3da018d97e2ef687a18a46735b01e04731b61952 100644 (file)
@@ -3304,7 +3304,12 @@ static PHP_MINFO_FUNCTION(zip)
 
        php_info_print_table_row(2, "Zip", "enabled");
        php_info_print_table_row(2, "Zip version", PHP_ZIP_VERSION);
+#if HAVE_LIBZIP_VERSION
+       php_info_print_table_row(2, "Libzip headers version", LIBZIP_VERSION);
+       php_info_print_table_row(2, "Libzip library version", zip_libzip_version());
+#else
        php_info_print_table_row(2, "Libzip version", LIBZIP_VERSION);
+#endif
 
        php_info_print_table_end();
 }
index 585309789ee862d651a0290a84382ac2f7ceb04c..ab412f95e10f72438b97efba7e0f0142868910ab 100644 (file)
@@ -37,7 +37,7 @@ extern zend_module_entry zip_module_entry;
 #define ZIP_OVERWRITE ZIP_TRUNCATE
 #endif
 
-#define PHP_ZIP_VERSION "1.15.1"
+#define PHP_ZIP_VERSION "1.15.2"
 
 #define ZIP_OPENBASEDIR_CHECKPATH(filename) php_check_open_basedir(filename)