summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRemi Collet <remi@php.net>2017-01-20 17:50:09 +0100
committerRemi Collet <remi@php.net>2017-01-20 17:50:09 +0100
commitfa45f64bd87b62f655e6d99c1a088efa5772b5fe (patch)
treec66a0cb61accd1347639c2e4888c5868d7a851c7
parent1f7bf2bfd63d94ddf4e28f903c692850232ef798 (diff)
parentd6c9f91e2ef0e4278a17c0c242790f5f4433be3e (diff)
downloadphp-git-fa45f64bd87b62f655e6d99c1a088efa5772b5fe.tar.gz
Merge branch 'PHP-7.1'
* PHP-7.1: NEWS NEWS Fixed bug #73965 DTrace reported as enabled when disabled
-rw-r--r--Zend/zend.c2
-rw-r--r--Zend/zend.h2
-rw-r--r--ext/standard/info.c2
3 files changed, 5 insertions, 1 deletions
diff --git a/Zend/zend.c b/Zend/zend.c
index db57f395bb..bcbca562b1 100644
--- a/Zend/zend.c
+++ b/Zend/zend.c
@@ -55,6 +55,7 @@ ZEND_TSRMLS_CACHE_DEFINE()
#endif
ZEND_API zend_utility_values zend_uv;
+ZEND_API zend_bool zend_dtrace_enabled;
/* version information */
static char *zend_version_info;
@@ -764,6 +765,7 @@ int zend_startup(zend_utility_functions *utility_functions, char **extensions) /
char *tmp = getenv("USE_ZEND_DTRACE");
if (tmp && zend_atoi(tmp, 0)) {
+ zend_dtrace_enabled = 1;
zend_compile_file = dtrace_compile_file;
zend_execute_ex = dtrace_execute_ex;
zend_execute_internal = dtrace_execute_internal;
diff --git a/Zend/zend.h b/Zend/zend.h
index 04409c23c4..bf4a6629a3 100644
--- a/Zend/zend.h
+++ b/Zend/zend.h
@@ -285,6 +285,8 @@ extern ZEND_API zend_class_entry *zend_standard_class_def;
extern ZEND_API zend_utility_values zend_uv;
extern ZEND_API zval zval_used_for_init;
+/* If DTrace is available and enabled */
+extern ZEND_API zend_bool zend_dtrace_enabled;
END_EXTERN_C()
#define ZEND_UV(name) (zend_uv.name)
diff --git a/ext/standard/info.c b/ext/standard/info.c
index dbb9dfc5a9..c40eda9d84 100644
--- a/ext/standard/info.c
+++ b/ext/standard/info.c
@@ -907,7 +907,7 @@ PHPAPI void php_print_info(int flag)
#endif
#if HAVE_DTRACE
- php_info_print_table_row(2, "DTrace Support", "enabled" );
+ php_info_print_table_row(2, "DTrace Support", (zend_dtrace_enabled ? "enabled" : "available, disabled"));
#else
php_info_print_table_row(2, "DTrace Support", "disabled" );
#endif