summaryrefslogtreecommitdiffstats
path: root/php-8.0.0-phpinfo.patch
blob: bd1e283f3198bfd280ad76647330e74e12917b48 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118

Drop "Configure Command" from phpinfo as it doesn't
provide any useful information.
The available extensions are not related to this command.

Replace full GCC name by gcc in php -v output


Also apply

From 9bf43c45908433d382f0499d529849172d0d8206 Mon Sep 17 00:00:00 2001
From: Remi Collet <remi@remirepo.net>
Date: Mon, 28 Dec 2020 08:33:09 +0100
Subject: [PATCH] rename COMPILER and ARCHITECTURE macro (too generic)

---
 configure.ac             |  4 ++--
 ext/standard/info.c      |  8 ++++----
 sapi/cli/php_cli.c       |  8 ++++----
 win32/build/confutils.js | 10 +++++-----
 4 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/configure.ac b/configure.ac
index 9d9c8b155b07..143dc061346b 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1300,10 +1300,10 @@ if test -n "${PHP_BUILD_PROVIDER}"; then
   AC_DEFINE_UNQUOTED(PHP_BUILD_PROVIDER,"$PHP_BUILD_PROVIDER",[build provider])
 fi
 if test -n "${PHP_BUILD_COMPILER}"; then
-  AC_DEFINE_UNQUOTED(COMPILER,"$PHP_BUILD_COMPILER",[used compiler for build])
+  AC_DEFINE_UNQUOTED(PHP_BUILD_COMPILER,"$PHP_BUILD_COMPILER",[used compiler for build])
 fi
 if test -n "${PHP_BUILD_ARCH}"; then
-  AC_DEFINE_UNQUOTED(ARCHITECTURE,"$PHP_BUILD_ARCH",[build architecture])
+  AC_DEFINE_UNQUOTED(PHP_BUILD_ARCH,"$PHP_BUILD_ARCH",[build architecture])
 fi
 
 PHP_SUBST_OLD(PHP_INSTALLED_SAPIS)
diff --git a/ext/standard/info.c b/ext/standard/info.c
index 153cb6cde014..8ceef31d9fe4 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -799,11 +799,11 @@ PHPAPI ZEND_COLD void php_print_info(int flag)
 #ifdef PHP_BUILD_PROVIDER
 		php_info_print_table_row(2, "Build Provider", PHP_BUILD_PROVIDER);
 #endif
-#ifdef COMPILER
-		php_info_print_table_row(2, "Compiler", COMPILER);
+#ifdef PHP_BUILD_COMPILER
+		php_info_print_table_row(2, "Compiler", PHP_BUILD_COMPILER);
 #endif
-#ifdef ARCHITECTURE
-		php_info_print_table_row(2, "Architecture", ARCHITECTURE);
+#ifdef PHP_BUILD_ARCH
+		php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
 #endif
 #ifdef CONFIGURE_COMMAND
 		php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
diff --git a/sapi/cli/php_cli.c b/sapi/cli/php_cli.c
index 5092fb0ffd68..9d296acec631 100644
--- a/sapi/cli/php_cli.c
+++ b/sapi/cli/php_cli.c
@@ -640,12 +640,12 @@ static int do_cli(int argc, char **argv) /* {{{ */
 #else
 					"NTS "
 #endif
-#ifdef COMPILER
-					COMPILER
+#ifdef PHP_BUILD_COMPILER
+					PHP_BUILD_COMPILER
 					" "
 #endif
-#ifdef ARCHITECTURE
-					ARCHITECTURE
+#ifdef PHP_BUILD_ARCH
+					PHP_BUILD_ARCH
 					" "
 #endif
 #if ZEND_DEBUG

diff -up ./ext/standard/info.c.phpinfo ./ext/standard/info.c
--- ./ext/standard/info.c.phpinfo	2020-07-21 10:49:31.000000000 +0200
+++ ./ext/standard/info.c	2020-07-21 11:41:56.295633523 +0200
@@ -805,9 +805,6 @@ PHPAPI ZEND_COLD void php_print_info(int
 #ifdef PHP_BUILD_ARCH
 		php_info_print_table_row(2, "Architecture", PHP_BUILD_ARCH);
 #endif
-#ifdef CONFIGURE_COMMAND
-		php_info_print_table_row(2, "Configure Command", CONFIGURE_COMMAND );
-#endif
 
 		if (sapi_module.pretty_name) {
 			php_info_print_table_row(2, "Server API", sapi_module.pretty_name );
diff -up ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo ./ext/standard/tests/general_functions/phpinfo.phpt
--- ./ext/standard/tests/general_functions/phpinfo.phpt.phpinfo	2020-07-21 10:49:31.000000000 +0200
+++ ./ext/standard/tests/general_functions/phpinfo.phpt	2020-07-21 11:41:56.296633522 +0200
@@ -17,7 +17,6 @@ PHP Version => %s
 
 System => %s
 Build Date => %s%a
-Configure Command => %s
 Server API => Command Line Interface
 Virtual Directory Support => %s
 Configuration File (php.ini) Path => %s
diff -up ./sapi/cli/php_cli.c.phpinfo ./sapi/cli/php_cli.c
--- ./sapi/cli/php_cli.c.phpinfo	2020-07-21 11:43:38.812475300 +0200
+++ ./sapi/cli/php_cli.c	2020-07-21 11:43:45.783464540 +0200
@@ -641,8 +641,7 @@ static int do_cli(int argc, char **argv)
 					"NTS "
 #endif
 #ifdef PHP_BUILD_COMPILER
-					PHP_BUILD_COMPILER
-					" "
+					"gcc "
 #endif
 #ifdef PHP_BUILD_ARCH
 					PHP_BUILD_ARCH