b444af
b444af
Drop "Configure Command" from phpinfo as it doesn't
b444af
provide any useful information.
b444af
The available extensions are not related to this command.
b444af
b444af
Replace full GCC name by gcc in php -v output
b444af
b444af
b444af
Also apply
b444af
b444af
From 9bf43c45908433d382f0499d529849172d0d8206 Mon Sep 17 00:00:00 2001
b444af
From: Remi Collet <remi@remirepo.net>
b444af
Date: Mon, 28 Dec 2020 08:33:09 +0100
b444af
Subject: [PATCH] rename COMPILER and ARCHITECTURE macro (too generic)
b444af
b444af
---
b444af
 configure.ac             |  4 ++--
b444af
 ext/standard/info.c      |  8 ++++----
b444af
 sapi/cli/php_cli.c       |  8 ++++----
b444af
 win32/build/confutils.js | 10 +++++-----
b444af
 4 files changed, 15 insertions(+), 15 deletions(-)
b444af
b444af
diff --git a/configure.ac b/configure.ac
b444af
index 9d9c8b155b07..143dc061346b 100644
b444af
--- a/configure.ac
b444af
+++ b/configure.ac
b444af
@@ -1289,10 +1289,10 @@ if test -n "${PHP_BUILD_PROVIDER}"; then
b444af
   AC_DEFINE_UNQUOTED(PHP_BUILD_PROVIDER,"$PHP_BUILD_PROVIDER",[build provider])
b444af
 fi
b444af
 if test -n "${PHP_BUILD_COMPILER}"; then
b444af
-  AC_DEFINE_UNQUOTED(COMPILER,"$PHP_BUILD_COMPILER",[used compiler for build])
b444af
+  AC_DEFINE_UNQUOTED(PHP_BUILD_COMPILER,"$PHP_BUILD_COMPILER",[used compiler for build])
b444af
 fi
b444af
 if test -n "${PHP_BUILD_ARCH}"; then
b444af
-  AC_DEFINE_UNQUOTED(ARCHITECTURE,"$PHP_BUILD_ARCH",[build architecture])
b444af
+  AC_DEFINE_UNQUOTED(PHP_BUILD_ARCH,"$PHP_BUILD_ARCH",[build architecture])
b444af
 fi
b444af
 
b444af
 PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
b444af
diff --git a/ext/standard/info.c b/ext/standard/info.c
b444af
index 153cb6cde014..8ceef31d9fe4 100644
b444af
--- a/ext/standard/info.c
b444af
+++ b/ext/standard/info.c
b444af
@@ -798,11 +798,11 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
b444af
 #ifdef PHP_BUILD_PROVIDER
b444af
 		php_info_print_table_row(2, "Build Provider", PHP_BUILD_PROVIDER);
b444af
 #endif
b444af
-#ifdef COMPILER
b444af
-		php_info_print_table_row(2, "Compiler", COMPILER);
b444af
+#ifdef PHP_BUILD_COMPILER
b444af
+		php_info_print_table_row(2, "Compiler", PHP_BUILD_COMPILER);
b444af
 #endif
b444af
-#ifdef ARCHITECTURE
b444af
-		php_info_print_table_row(2, "Architecture", ARCHITECTURE);
b444af
+#ifdef PHP_BUILD_ARCH
b444af
+		php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
b444af
 #endif
b444af
 #ifdef CONFIGURE_COMMAND
b444af
 		php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
b444af
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
b444af
index 5092fb0ffd68..9d296acec631 100644
b444af
--- a/sapi/cli/php_cli.c
b444af
+++ b/sapi/cli/php_cli.c
b444af
@@ -640,12 +640,12 @@ static int do_cli(int argc, char **argv) /* {{{ */
b444af
 #else
b444af
 					"NTS "
b444af
 #endif
b444af
-#ifdef COMPILER
b444af
-					COMPILER
b444af
+#ifdef PHP_BUILD_COMPILER
b444af
+					PHP_BUILD_COMPILER
b444af
 					" "
b444af
 #endif
b444af
-#ifdef ARCHITECTURE
b444af
-					ARCHITECTURE
b444af
+#ifdef PHP_BUILD_ARCH
b444af
+					PHP_BUILD_ARCH
b444af
 					" "
b444af
 #endif
b444af
 #if ZEND_DEBUG
b444af
b444af
diff -up ./ext/standard/info.c.phpinfo ./ext/standard/info.c
b444af
--- ./ext/standard/info.c.phpinfo	2020-07-21 10:49:31.000000000 +0200
b444af
+++ ./ext/standard/info.c	2020-07-21 11:41:56.295633523 +0200
b444af
@@ -804,9 +804,6 @@ PHPAPI ZEND_COLD void php_print_info(int
b444af
 #ifdef PHP_BUILD_ARCH
b444af
 		php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
b444af
 #endif
b444af
-#ifdef CONFIGURE_COMMAND
b444af
-		php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
b444af
-#endif
b444af
 
b444af
 		if (sapi_module.pretty_name) {
b444af
 			php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
b444af
diff -up ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo ./ext/standard/tests/general_functions/phpinfo.phpt
b444af
--- ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo	2020-07-21 10:49:31.000000000 +0200
b444af
+++ ./ext/standard/tests/general_functions/phpinfo.phpt	2020-07-21 11:41:56.296633522 +0200
b444af
@@ -17,7 +17,6 @@ PHP Version => %s
b444af
 
b444af
 System => %s
b444af
 Build Date => %s%a
b444af
-Configure Command => %s
b444af
 Server API => Command Line Interface
b444af
 Virtual Directory Support => %s
b444af
 Configuration File (php.ini) Path => %s
b444af
diff -up ./sapi/cli/php_cli.c.phpinfo ./sapi/cli/php_cli.c
b444af
--- ./sapi/cli/php_cli.c.phpinfo	2020-07-21 11:43:38.812475300 +0200
b444af
+++ ./sapi/cli/php_cli.c	2020-07-21 11:43:45.783464540 +0200
b444af
@@ -641,8 +641,7 @@ static int do_cli(int argc, char **argv)
b444af
 					"NTS "
b444af
 #endif
b444af
 #ifdef PHP_BUILD_COMPILER
b444af
-					PHP_BUILD_COMPILER
b444af
-					" "
b444af
+					"gcc "
b444af
 #endif
b444af
 #ifdef PHP_BUILD_ARCH
b444af
 					PHP_BUILD_ARCH