From 13fdad5a9730d2f1e1025ac08efe7e3e638e3339 Mon Sep 17 00:00:00 2001 From: Remi Collet Date: Fri, 25 Sep 2020 09:07:44 +0200 Subject: add patches for library version 8.1 and for PHP 8 from https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/8 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/9 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/10 https://github.com/chrislim2888/IP2Location-PECL-Extension/pull/11 --- 10.patch | 41 +++++++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) create mode 100644 10.patch (limited to '10.patch') diff --git a/10.patch b/10.patch new file mode 100644 index 0000000..b8ade4b --- /dev/null +++ b/10.patch @@ -0,0 +1,41 @@ +From c788be10e9bd9979b9f8ae0d649b26f6b1cce140 Mon Sep 17 00:00:00 2001 +From: Remi Collet +Date: Thu, 24 Sep 2020 11:01:28 +0200 +Subject: [PATCH] display library version in MINFO + +--- + ip2location.c | 19 ++++++++++++++++++- + 1 file changed, 18 insertions(+), 1 deletion(-) + +diff --git a/ip2location.c b/ip2location.c +index 7996b57..848bb36 100644 +--- a/ip2location.c ++++ b/ip2location.c +@@ -119,9 +119,26 @@ PHP_MSHUTDOWN_FUNCTION(ip2location) + * */ + PHP_MINFO_FUNCTION(ip2location) + { ++ char buf[32]; ++ unsigned long ver; ++ + php_info_print_table_start(); + php_info_print_table_header(2, "ip2location support", "enabled"); +- php_info_print_table_row(2, "version", PHP_IP2LOCATION_VERSION); ++ php_info_print_table_row(2, "extension version", PHP_IP2LOCATION_VERSION); ++#if API_VERSION_NUMERIC >= 80100 ++ ver = IP2Location_api_version_number(); ++#else ++ ver = IP2Location_api_version_num(); ++#endif ++ snprintf(buf, sizeof(buf), "%d.%d.%d", API_VERSION_MAJOR, API_VERSION_MINOR, API_VERSION_RELEASE); ++ if (API_VERSION_NUMERIC == ver) { ++ php_info_print_table_row(2, "library version", buf); ++ } else { ++ /* display both headers/runtime versions when differ */ ++ php_info_print_table_row(2, "library headers version", buf); ++ snprintf(buf, sizeof(buf), "%lu.%lu.%lu", ver / 10000, (ver / 100) % 100, ver % 100); ++ php_info_print_table_row(2, "library runtime version", buf); ++ } + php_info_print_table_end(); + } + /* }}} */ -- cgit